@mlightcad/cad-llm-plugin 1.8.0-preview.6 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { AcApTextRecognitionService as Lo, AcUiDialog as bc, AcEdCommand as wc, AcEdCommandStack as xc } from "@mlightcad/cad-simple-viewer";
2
- import { l as j, a as kc, L as Ic } from "./cad-llm-plugin-cad-llm-plugin-register-W9G8zpBG.js";
1
+ import { AcApTextRecognitionService as _r, AcUiDialog as bc, AcEdCommand as wc, AcEdCommandStack as xc } from "@mlightcad/cad-simple-viewer";
2
+ import { l as j, a as kc, L as Ic } from "./cad-llm-plugin-cad-llm-plugin-register-TJETetnW.js";
3
3
  var ws = "vercel.ai.error", Tc = Symbol.for(ws), Uo, Bo, te = class xs extends (Bo = Error, Uo = Tc, Bo) {
4
4
  /**
5
5
  * Creates an AI SDK Error.
@@ -83,7 +83,7 @@ var Es = "AI_InvalidArgumentError", Cs = `vercel.ai.error.${Es}`, Oc = Symbol.fo
83
83
  static isInstance(e) {
84
84
  return te.hasMarker(e, $s);
85
85
  }
86
- }, Ns = "AI_InvalidResponseDataError", Rs = `vercel.ai.error.${Ns}`, $c = Symbol.for(Rs), Yo, Xo, mr = class extends (Xo = te, Yo = $c, Xo) {
86
+ }, Ns = "AI_InvalidResponseDataError", Rs = `vercel.ai.error.${Ns}`, $c = Symbol.for(Rs), Yo, Xo, gr = class extends (Xo = te, Yo = $c, Xo) {
87
87
  constructor({
88
88
  data: e,
89
89
  message: t = `Invalid response data: ${JSON.stringify(e)}.`
@@ -93,7 +93,7 @@ var Es = "AI_InvalidArgumentError", Cs = `vercel.ai.error.${Es}`, Oc = Symbol.fo
93
93
  static isInstance(e) {
94
94
  return te.hasMarker(e, Rs);
95
95
  }
96
- }, Ps = "AI_JSONParseError", Ms = `vercel.ai.error.${Ps}`, Nc = Symbol.for(Ms), Qo, ei, Fn = class extends (ei = te, Qo = Nc, ei) {
96
+ }, Ps = "AI_JSONParseError", Ms = `vercel.ai.error.${Ps}`, Nc = Symbol.for(Ms), Qo, ei, Vn = class extends (ei = te, Qo = Nc, ei) {
97
97
  constructor({ text: e, cause: t }) {
98
98
  super({
99
99
  name: Ps,
@@ -135,7 +135,7 @@ Error message: ${In(t)}`,
135
135
  static isInstance(e) {
136
136
  return te.hasMarker(e, Us);
137
137
  }
138
- }, Bs = "AI_TypeValidationError", Fs = `vercel.ai.error.${Bs}`, Dc = Symbol.for(Fs), li, ui, mn = class Mr extends (ui = te, li = Dc, ui) {
138
+ }, Bs = "AI_TypeValidationError", Fs = `vercel.ai.error.${Bs}`, Dc = Symbol.for(Fs), li, ui, mn = class zr extends (ui = te, li = Dc, ui) {
139
139
  constructor({ value: t, cause: n }) {
140
140
  super({
141
141
  name: Bs,
@@ -161,7 +161,7 @@ Error message: ${In(n)}`,
161
161
  value: t,
162
162
  cause: n
163
163
  }) {
164
- return Mr.isInstance(n) && n.value === t ? n : new Mr({ value: t, cause: n });
164
+ return zr.isInstance(n) && n.value === t ? n : new zr({ value: t, cause: n });
165
165
  }
166
166
  }, Vs = "AI_UnsupportedFunctionalityError", qs = `vercel.ai.error.${Vs}`, Zc = Symbol.for(qs), ci, di, Le = class extends (di = te, ci = Zc, di) {
167
167
  constructor({
@@ -174,20 +174,20 @@ Error message: ${In(n)}`,
174
174
  return te.hasMarker(e, qs);
175
175
  }
176
176
  };
177
- class _r extends Error {
177
+ class yr extends Error {
178
178
  constructor(t, n) {
179
179
  super(t), this.name = "ParseError", this.type = n.type, this.field = n.field, this.value = n.value, this.line = n.line;
180
180
  }
181
181
  }
182
182
  const pi = 10, jc = 13, Dt = 32;
183
- function gr(e) {
183
+ function vr(e) {
184
184
  }
185
185
  function Lc(e) {
186
186
  if (typeof e == "function")
187
187
  throw new TypeError(
188
188
  "`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?"
189
189
  );
190
- const { onEvent: t = gr, onError: n = gr, onRetry: r = gr, onComment: o, maxBufferSize: i } = e, a = [];
190
+ const { onEvent: t = vr, onError: n = vr, onRetry: r = vr, onComment: o, maxBufferSize: i } = e, a = [];
191
191
  let s = 0, l = !0, c, p = "", g = 0, x, T = !1;
192
192
  function I(b) {
193
193
  if (T)
@@ -212,7 +212,7 @@ function Lc(e) {
212
212
  }
213
213
  function E() {
214
214
  i !== void 0 && (s + p.length <= i || (T = !0, a.length = 0, s = 0, c = void 0, p = "", g = 0, x = void 0, n(
215
- new _r(`Buffered data exceeded max buffer size of ${i} characters`, {
215
+ new yr(`Buffered data exceeded max buffer size of ${i} characters`, {
216
216
  type: "max-buffer-size-exceeded"
217
217
  })
218
218
  )));
@@ -307,7 +307,7 @@ ${S}`, g++;
307
307
  break;
308
308
  case "retry":
309
309
  /^\d+$/.test(S) ? r(parseInt(S, 10)) : n(
310
- new _r(`Invalid \`retry\` value: "${S}"`, {
310
+ new yr(`Invalid \`retry\` value: "${S}"`, {
311
311
  type: "invalid-retry",
312
312
  value: S,
313
313
  line: m
@@ -316,7 +316,7 @@ ${S}`, g++;
316
316
  break;
317
317
  default:
318
318
  n(
319
- new _r(
319
+ new yr(
320
320
  `Unknown field "${b.length > 20 ? `${b.slice(0, 20)}…` : b}"`,
321
321
  { type: "unknown-field", field: b, value: S, line: m }
322
322
  )
@@ -415,7 +415,7 @@ function Hs(e) {
415
415
  function Bc(e, t) {
416
416
  return typeof t == "bigint" ? t.toString() : t;
417
417
  }
418
- function ro(e) {
418
+ function oo(e) {
419
419
  return {
420
420
  get value() {
421
421
  {
@@ -425,10 +425,10 @@ function ro(e) {
425
425
  }
426
426
  };
427
427
  }
428
- function oo(e) {
428
+ function io(e) {
429
429
  return e == null;
430
430
  }
431
- function io(e) {
431
+ function ao(e) {
432
432
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
433
433
  return e.slice(t, n);
434
434
  }
@@ -453,7 +453,7 @@ function fe(e, t, n) {
453
453
  configurable: !0
454
454
  });
455
455
  }
456
- function ir(e, t, n) {
456
+ function ar(e, t, n) {
457
457
  Object.defineProperty(e, t, {
458
458
  value: n,
459
459
  writable: !0,
@@ -466,10 +466,10 @@ function an(e) {
466
466
  }
467
467
  const Ws = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
468
468
  };
469
- function Vn(e) {
469
+ function qn(e) {
470
470
  return typeof e == "object" && e !== null && !Array.isArray(e);
471
471
  }
472
- const Vc = ro(() => {
472
+ const Vc = oo(() => {
473
473
  var e;
474
474
  if (typeof navigator < "u" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
475
475
  return !1;
@@ -480,14 +480,14 @@ const Vc = ro(() => {
480
480
  return !1;
481
481
  }
482
482
  });
483
- function qn(e) {
484
- if (Vn(e) === !1)
483
+ function Gn(e) {
484
+ if (qn(e) === !1)
485
485
  return !1;
486
486
  const t = e.constructor;
487
487
  if (t === void 0)
488
488
  return !0;
489
489
  const n = t.prototype;
490
- return !(Vn(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
490
+ return !(qn(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
491
491
  }
492
492
  const qc = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
493
493
  function Tn(e) {
@@ -547,13 +547,13 @@ function Jc(e, t) {
547
547
  });
548
548
  }
549
549
  function Kc(e, t) {
550
- if (!qn(t))
550
+ if (!Gn(t))
551
551
  throw new Error("Invalid input to extend: expected a plain object");
552
552
  const n = {
553
553
  ...e._zod.def,
554
554
  get shape() {
555
555
  const r = { ...e._zod.def.shape, ...t };
556
- return ir(this, "shape", r), r;
556
+ return ar(this, "shape", r), r;
557
557
  },
558
558
  checks: []
559
559
  // delete existing checks
@@ -565,7 +565,7 @@ function Yc(e, t) {
565
565
  ...e._zod.def,
566
566
  get shape() {
567
567
  const n = { ...e._zod.def.shape, ...t._zod.def.shape };
568
- return ir(this, "shape", n), n;
568
+ return ar(this, "shape", n), n;
569
569
  },
570
570
  catchall: t._zod.def.catchall,
571
571
  checks: []
@@ -644,7 +644,7 @@ function At(e, t, n) {
644
644
  }
645
645
  return delete r.inst, delete r.continue, t != null && t.reportInput || delete r.input, r;
646
646
  }
647
- function ao(e) {
647
+ function so(e) {
648
648
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
649
649
  }
650
650
  function gn(...e) {
@@ -874,7 +874,7 @@ const Ed = (e) => {
874
874
  var n;
875
875
  Fe.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
876
876
  const o = r.value;
877
- return !oo(o) && o.length !== void 0;
877
+ return !io(o) && o.length !== void 0;
878
878
  }), e._zod.onattach.push((r) => {
879
879
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
880
880
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -882,7 +882,7 @@ const Ed = (e) => {
882
882
  const o = r.value;
883
883
  if (o.length <= t.maximum)
884
884
  return;
885
- const a = ao(o);
885
+ const a = so(o);
886
886
  r.issues.push({
887
887
  origin: a,
888
888
  code: "too_big",
@@ -897,7 +897,7 @@ const Ed = (e) => {
897
897
  var n;
898
898
  Fe.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
899
899
  const o = r.value;
900
- return !oo(o) && o.length !== void 0;
900
+ return !io(o) && o.length !== void 0;
901
901
  }), e._zod.onattach.push((r) => {
902
902
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
903
903
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -905,7 +905,7 @@ const Ed = (e) => {
905
905
  const o = r.value;
906
906
  if (o.length >= t.minimum)
907
907
  return;
908
- const a = ao(o);
908
+ const a = so(o);
909
909
  r.issues.push({
910
910
  origin: a,
911
911
  code: "too_small",
@@ -920,7 +920,7 @@ const Ed = (e) => {
920
920
  var n;
921
921
  Fe.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
922
922
  const o = r.value;
923
- return !oo(o) && o.length !== void 0;
923
+ return !io(o) && o.length !== void 0;
924
924
  }), e._zod.onattach.push((r) => {
925
925
  const o = r._zod.bag;
926
926
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
@@ -928,7 +928,7 @@ const Ed = (e) => {
928
928
  const o = r.value, i = o.length;
929
929
  if (i === t.length)
930
930
  return;
931
- const a = ao(o), s = i > t.length;
931
+ const a = so(o), s = i > t.length;
932
932
  r.issues.push({
933
933
  origin: a,
934
934
  ...s ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
@@ -939,7 +939,7 @@ const Ed = (e) => {
939
939
  continue: !t.abort
940
940
  });
941
941
  };
942
- }), ar = /* @__PURE__ */ O("$ZodCheckStringFormat", (e, t) => {
942
+ }), sr = /* @__PURE__ */ O("$ZodCheckStringFormat", (e, t) => {
943
943
  var n, r;
944
944
  Fe.init(e, t), e._zod.onattach.push((o) => {
945
945
  const i = o._zod.bag;
@@ -957,7 +957,7 @@ const Ed = (e) => {
957
957
  }) : (r = e._zod).check ?? (r.check = () => {
958
958
  });
959
959
  }), jd = /* @__PURE__ */ O("$ZodCheckRegex", (e, t) => {
960
- ar.init(e, t), e._zod.check = (n) => {
960
+ sr.init(e, t), e._zod.check = (n) => {
961
961
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
962
962
  origin: "string",
963
963
  code: "invalid_format",
@@ -969,9 +969,9 @@ const Ed = (e) => {
969
969
  });
970
970
  };
971
971
  }), Ld = /* @__PURE__ */ O("$ZodCheckLowerCase", (e, t) => {
972
- t.pattern ?? (t.pattern = Nd), ar.init(e, t);
972
+ t.pattern ?? (t.pattern = Nd), sr.init(e, t);
973
973
  }), Ud = /* @__PURE__ */ O("$ZodCheckUpperCase", (e, t) => {
974
- t.pattern ?? (t.pattern = Rd), ar.init(e, t);
974
+ t.pattern ?? (t.pattern = Rd), sr.init(e, t);
975
975
  }), Bd = /* @__PURE__ */ O("$ZodCheckIncludes", (e, t) => {
976
976
  Fe.init(e, t);
977
977
  const n = Tn(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
@@ -1118,7 +1118,7 @@ const Hd = {
1118
1118
  vendor: "zod",
1119
1119
  version: 1
1120
1120
  };
1121
- }), so = /* @__PURE__ */ O("$ZodString", (e, t) => {
1121
+ }), lo = /* @__PURE__ */ O("$ZodString", (e, t) => {
1122
1122
  var n;
1123
1123
  _e.init(e, t), e._zod.pattern = [...((n = e == null ? void 0 : e._zod.bag) == null ? void 0 : n.patterns) ?? []].pop() ?? Ed(e._zod.bag), e._zod.parse = (r, o) => {
1124
1124
  if (t.coerce)
@@ -1134,7 +1134,7 @@ const Hd = {
1134
1134
  }), r;
1135
1135
  };
1136
1136
  }), xe = /* @__PURE__ */ O("$ZodStringFormat", (e, t) => {
1137
- ar.init(e, t), so.init(e, t);
1137
+ sr.init(e, t), lo.init(e, t);
1138
1138
  }), Wd = /* @__PURE__ */ O("$ZodGUID", (e, t) => {
1139
1139
  t.pattern ?? (t.pattern = hd), xe.init(e, t);
1140
1140
  }), Jd = /* @__PURE__ */ O("$ZodUUID", (e, t) => {
@@ -1418,7 +1418,7 @@ function gi(e, t, n, r) {
1418
1418
  }
1419
1419
  const Sp = /* @__PURE__ */ O("$ZodObject", (e, t) => {
1420
1420
  _e.init(e, t);
1421
- const n = ro(() => {
1421
+ const n = oo(() => {
1422
1422
  const g = Object.keys(t.shape);
1423
1423
  for (const T of g)
1424
1424
  if (!(t.shape[T] instanceof _e))
@@ -1493,7 +1493,7 @@ const Sp = /* @__PURE__ */ O("$ZodObject", (e, t) => {
1493
1493
  return (v, y) => _(g, v, y);
1494
1494
  };
1495
1495
  let o;
1496
- const i = Vn, a = !Gs.jitless, l = a && Vc.value, c = t.catchall;
1496
+ const i = qn, a = !Gs.jitless, l = a && Vc.value, c = t.catchall;
1497
1497
  let p;
1498
1498
  e._zod.parse = (g, x) => {
1499
1499
  p ?? (p = n.value);
@@ -1555,7 +1555,7 @@ const ll = /* @__PURE__ */ O("$ZodUnion", (e, t) => {
1555
1555
  }), fe(e._zod, "pattern", () => {
1556
1556
  if (t.options.every((n) => n._zod.pattern)) {
1557
1557
  const n = t.options.map((r) => r._zod.pattern);
1558
- return new RegExp(`^(${n.map((r) => io(r.source)).join("|")})$`);
1558
+ return new RegExp(`^(${n.map((r) => ao(r.source)).join("|")})$`);
1559
1559
  }
1560
1560
  }), e._zod.parse = (n, r) => {
1561
1561
  let o = !1;
@@ -1592,7 +1592,7 @@ const ll = /* @__PURE__ */ O("$ZodUnion", (e, t) => {
1592
1592
  }
1593
1593
  return o;
1594
1594
  });
1595
- const r = ro(() => {
1595
+ const r = oo(() => {
1596
1596
  const o = t.options, i = /* @__PURE__ */ new Map();
1597
1597
  for (const a of o) {
1598
1598
  const s = a._zod.propValues[t.discriminator];
@@ -1608,7 +1608,7 @@ const ll = /* @__PURE__ */ O("$ZodUnion", (e, t) => {
1608
1608
  });
1609
1609
  e._zod.parse = (o, i) => {
1610
1610
  const a = o.value;
1611
- if (!Vn(a))
1611
+ if (!qn(a))
1612
1612
  return o.issues.push({
1613
1613
  code: "invalid_type",
1614
1614
  expected: "object",
@@ -1631,15 +1631,15 @@ const ll = /* @__PURE__ */ O("$ZodUnion", (e, t) => {
1631
1631
  return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([l, c]) => vi(n, l, c)) : vi(n, i, a);
1632
1632
  };
1633
1633
  });
1634
- function zr(e, t) {
1634
+ function Dr(e, t) {
1635
1635
  if (e === t)
1636
1636
  return { valid: !0, data: e };
1637
1637
  if (e instanceof Date && t instanceof Date && +e == +t)
1638
1638
  return { valid: !0, data: e };
1639
- if (qn(e) && qn(t)) {
1639
+ if (Gn(e) && Gn(t)) {
1640
1640
  const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
1641
1641
  for (const i of r) {
1642
- const a = zr(e[i], t[i]);
1642
+ const a = Dr(e[i], t[i]);
1643
1643
  if (!a.valid)
1644
1644
  return {
1645
1645
  valid: !1,
@@ -1654,7 +1654,7 @@ function zr(e, t) {
1654
1654
  return { valid: !1, mergeErrorPath: [] };
1655
1655
  const n = [];
1656
1656
  for (let r = 0; r < e.length; r++) {
1657
- const o = e[r], i = t[r], a = zr(o, i);
1657
+ const o = e[r], i = t[r], a = Dr(o, i);
1658
1658
  if (!a.valid)
1659
1659
  return {
1660
1660
  valid: !1,
@@ -1669,7 +1669,7 @@ function zr(e, t) {
1669
1669
  function vi(e, t, n) {
1670
1670
  if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), pn(e))
1671
1671
  return e;
1672
- const r = zr(t.value, n.value);
1672
+ const r = Dr(t.value, n.value);
1673
1673
  if (!r.valid)
1674
1674
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
1675
1675
  return e.value = r.data, e;
@@ -1728,7 +1728,7 @@ function zn(e, t, n) {
1728
1728
  const Ap = /* @__PURE__ */ O("$ZodRecord", (e, t) => {
1729
1729
  _e.init(e, t), e._zod.parse = (n, r) => {
1730
1730
  const o = n.value;
1731
- if (!qn(o))
1731
+ if (!Gn(o))
1732
1732
  return n.issues.push({
1733
1733
  expected: "record",
1734
1734
  code: "invalid_type",
@@ -1816,12 +1816,12 @@ const Ap = /* @__PURE__ */ O("$ZodRecord", (e, t) => {
1816
1816
  }), Pp = /* @__PURE__ */ O("$ZodOptional", (e, t) => {
1817
1817
  _e.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", fe(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), fe(e._zod, "pattern", () => {
1818
1818
  const n = t.innerType._zod.pattern;
1819
- return n ? new RegExp(`^(${io(n.source)})?$`) : void 0;
1819
+ return n ? new RegExp(`^(${ao(n.source)})?$`) : void 0;
1820
1820
  }), e._zod.parse = (n, r) => t.innerType._zod.optin === "optional" ? t.innerType._zod.run(n, r) : n.value === void 0 ? n : t.innerType._zod.run(n, r);
1821
1821
  }), Mp = /* @__PURE__ */ O("$ZodNullable", (e, t) => {
1822
1822
  _e.init(e, t), fe(e._zod, "optin", () => t.innerType._zod.optin), fe(e._zod, "optout", () => t.innerType._zod.optout), fe(e._zod, "pattern", () => {
1823
1823
  const n = t.innerType._zod.pattern;
1824
- return n ? new RegExp(`^(${io(n.source)}|null)$`) : void 0;
1824
+ return n ? new RegExp(`^(${ao(n.source)}|null)$`) : void 0;
1825
1825
  }), fe(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
1826
1826
  }), zp = /* @__PURE__ */ O("$ZodDefault", (e, t) => {
1827
1827
  _e.init(e, t), e._zod.optin = "optional", fe(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
@@ -2252,7 +2252,7 @@ function Si(e, t) {
2252
2252
  inclusive: !1
2253
2253
  });
2254
2254
  }
2255
- function yr(e, t) {
2255
+ function br(e, t) {
2256
2256
  return new ol({
2257
2257
  check: "less_than",
2258
2258
  ...q(t),
@@ -2268,7 +2268,7 @@ function Ei(e, t) {
2268
2268
  inclusive: !1
2269
2269
  });
2270
2270
  }
2271
- function vr(e, t) {
2271
+ function wr(e, t) {
2272
2272
  return new il({
2273
2273
  check: "greater_than",
2274
2274
  ...q(t),
@@ -2290,7 +2290,7 @@ function cl(e, t) {
2290
2290
  maximum: e
2291
2291
  });
2292
2292
  }
2293
- function Gn(e, t) {
2293
+ function Hn(e, t) {
2294
2294
  return new Dd({
2295
2295
  check: "min_length",
2296
2296
  ...q(t),
@@ -2957,9 +2957,9 @@ const Hh = (e, t) => {
2957
2957
  // enumerable: false,
2958
2958
  }
2959
2959
  });
2960
- }, sr = O("ZodError", Hh, {
2960
+ }, lr = O("ZodError", Hh, {
2961
2961
  Parent: Error
2962
- }), Wh = /* @__PURE__ */ nd(sr), Jh = /* @__PURE__ */ rd(sr), Kh = /* @__PURE__ */ Xs(sr), pl = /* @__PURE__ */ Qs(sr), ve = /* @__PURE__ */ O("ZodType", (e, t) => (_e.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(
2962
+ }), Wh = /* @__PURE__ */ nd(lr), Jh = /* @__PURE__ */ rd(lr), Kh = /* @__PURE__ */ Xs(lr), pl = /* @__PURE__ */ Qs(lr), ve = /* @__PURE__ */ O("ZodType", (e, t) => (_e.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(
2963
2963
  {
2964
2964
  ...t,
2965
2965
  checks: [
@@ -2983,11 +2983,11 @@ const Hh = (e, t) => {
2983
2983
  const r = e.clone();
2984
2984
  return cn.add(r, n[0]), r;
2985
2985
  }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), hl = /* @__PURE__ */ O("_ZodString", (e, t) => {
2986
- so.init(e, t), ve.init(e, t);
2986
+ lo.init(e, t), ve.init(e, t);
2987
2987
  const n = e._zod.bag;
2988
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(Th(...r)), e.includes = (...r) => e.check(Ch(...r)), e.startsWith = (...r) => e.check(Oh(...r)), e.endsWith = (...r) => e.check(Ah(...r)), e.min = (...r) => e.check(Gn(...r)), e.max = (...r) => e.check(cl(...r)), e.length = (...r) => e.check(dl(...r)), e.nonempty = (...r) => e.check(Gn(1, ...r)), e.lowercase = (r) => e.check(Sh(r)), e.uppercase = (r) => e.check(Eh(r)), e.trim = () => e.check(Nh()), e.normalize = (...r) => e.check($h(...r)), e.toLowerCase = () => e.check(Rh()), e.toUpperCase = () => e.check(Ph());
2988
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(Th(...r)), e.includes = (...r) => e.check(Ch(...r)), e.startsWith = (...r) => e.check(Oh(...r)), e.endsWith = (...r) => e.check(Ah(...r)), e.min = (...r) => e.check(Hn(...r)), e.max = (...r) => e.check(cl(...r)), e.length = (...r) => e.check(dl(...r)), e.nonempty = (...r) => e.check(Hn(1, ...r)), e.lowercase = (r) => e.check(Sh(r)), e.uppercase = (r) => e.check(Eh(r)), e.trim = () => e.check(Nh()), e.normalize = (...r) => e.check($h(...r)), e.toLowerCase = () => e.check(Rh()), e.toUpperCase = () => e.check(Ph());
2989
2989
  }), Yh = /* @__PURE__ */ O("ZodString", (e, t) => {
2990
- so.init(e, t), hl.init(e, t), e.email = (n) => e.check(Gp(Xh, n)), e.url = (n) => e.check(Yp(Qh, n)), e.jwt = (n) => e.check(ph(mf, n)), e.emoji = (n) => e.check(Xp(ef, n)), e.guid = (n) => e.check(Ti(Ai, n)), e.uuid = (n) => e.check(Hp(Dn, n)), e.uuidv4 = (n) => e.check(Wp(Dn, n)), e.uuidv6 = (n) => e.check(Jp(Dn, n)), e.uuidv7 = (n) => e.check(Kp(Dn, n)), e.nanoid = (n) => e.check(Qp(tf, n)), e.guid = (n) => e.check(Ti(Ai, n)), e.cuid = (n) => e.check(eh(nf, n)), e.cuid2 = (n) => e.check(th(rf, n)), e.ulid = (n) => e.check(nh(of, n)), e.base64 = (n) => e.check(uh(pf, n)), e.base64url = (n) => e.check(ch(hf, n)), e.xid = (n) => e.check(rh(af, n)), e.ksuid = (n) => e.check(oh(sf, n)), e.ipv4 = (n) => e.check(ih(lf, n)), e.ipv6 = (n) => e.check(ah(uf, n)), e.cidrv4 = (n) => e.check(sh(cf, n)), e.cidrv6 = (n) => e.check(lh(df, n)), e.e164 = (n) => e.check(dh(ff, n)), e.datetime = (n) => e.check(Lh(n)), e.date = (n) => e.check(Bh(n)), e.time = (n) => e.check(Vh(n)), e.duration = (n) => e.check(Gh(n));
2990
+ lo.init(e, t), hl.init(e, t), e.email = (n) => e.check(Gp(Xh, n)), e.url = (n) => e.check(Yp(Qh, n)), e.jwt = (n) => e.check(ph(mf, n)), e.emoji = (n) => e.check(Xp(ef, n)), e.guid = (n) => e.check(Ti(Ai, n)), e.uuid = (n) => e.check(Hp(Dn, n)), e.uuidv4 = (n) => e.check(Wp(Dn, n)), e.uuidv6 = (n) => e.check(Jp(Dn, n)), e.uuidv7 = (n) => e.check(Kp(Dn, n)), e.nanoid = (n) => e.check(Qp(tf, n)), e.guid = (n) => e.check(Ti(Ai, n)), e.cuid = (n) => e.check(eh(nf, n)), e.cuid2 = (n) => e.check(th(rf, n)), e.ulid = (n) => e.check(nh(of, n)), e.base64 = (n) => e.check(uh(pf, n)), e.base64url = (n) => e.check(ch(hf, n)), e.xid = (n) => e.check(rh(af, n)), e.ksuid = (n) => e.check(oh(sf, n)), e.ipv4 = (n) => e.check(ih(lf, n)), e.ipv6 = (n) => e.check(ah(uf, n)), e.cidrv4 = (n) => e.check(sh(cf, n)), e.cidrv6 = (n) => e.check(lh(df, n)), e.e164 = (n) => e.check(dh(ff, n)), e.datetime = (n) => e.check(Lh(n)), e.date = (n) => e.check(Bh(n)), e.time = (n) => e.check(Vh(n)), e.duration = (n) => e.check(Gh(n));
2991
2991
  });
2992
2992
  function u(e) {
2993
2993
  return qp(Yh, e);
@@ -3032,16 +3032,16 @@ const Te = /* @__PURE__ */ O("ZodStringFormat", (e, t) => {
3032
3032
  _p.init(e, t), Te.init(e, t);
3033
3033
  }), mf = /* @__PURE__ */ O("ZodJWT", (e, t) => {
3034
3034
  yp.init(e, t), Te.init(e, t);
3035
- }), lo = /* @__PURE__ */ O("ZodNumber", (e, t) => {
3036
- sl.init(e, t), ve.init(e, t), e.gt = (r, o) => e.check(Ei(r, o)), e.gte = (r, o) => e.check(vr(r, o)), e.min = (r, o) => e.check(vr(r, o)), e.lt = (r, o) => e.check(Si(r, o)), e.lte = (r, o) => e.check(yr(r, o)), e.max = (r, o) => e.check(yr(r, o)), e.int = (r) => e.check($i(r)), e.safe = (r) => e.check($i(r)), e.positive = (r) => e.check(Ei(0, r)), e.nonnegative = (r) => e.check(vr(0, r)), e.negative = (r) => e.check(Si(0, r)), e.nonpositive = (r) => e.check(yr(0, r)), e.multipleOf = (r, o) => e.check(Ci(r, o)), e.step = (r, o) => e.check(Ci(r, o)), e.finite = () => e;
3035
+ }), uo = /* @__PURE__ */ O("ZodNumber", (e, t) => {
3036
+ sl.init(e, t), ve.init(e, t), e.gt = (r, o) => e.check(Ei(r, o)), e.gte = (r, o) => e.check(wr(r, o)), e.min = (r, o) => e.check(wr(r, o)), e.lt = (r, o) => e.check(Si(r, o)), e.lte = (r, o) => e.check(br(r, o)), e.max = (r, o) => e.check(br(r, o)), e.int = (r) => e.check($i(r)), e.safe = (r) => e.check($i(r)), e.positive = (r) => e.check(Ei(0, r)), e.nonnegative = (r) => e.check(wr(0, r)), e.negative = (r) => e.check(Si(0, r)), e.nonpositive = (r) => e.check(br(0, r)), e.multipleOf = (r, o) => e.check(Ci(r, o)), e.step = (r, o) => e.check(Ci(r, o)), e.finite = () => e;
3037
3037
  const n = e._zod.bag;
3038
3038
  e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
3039
3039
  });
3040
3040
  function f(e) {
3041
- return gh(lo, e);
3041
+ return gh(uo, e);
3042
3042
  }
3043
3043
  const _f = /* @__PURE__ */ O("ZodNumberFormat", (e, t) => {
3044
- vp.init(e, t), lo.init(e, t);
3044
+ vp.init(e, t), uo.init(e, t);
3045
3045
  });
3046
3046
  function $i(e) {
3047
3047
  return vh(_f, e);
@@ -3077,7 +3077,7 @@ function kf(e) {
3077
3077
  return Ih(xf, e);
3078
3078
  }
3079
3079
  const If = /* @__PURE__ */ O("ZodArray", (e, t) => {
3080
- Tp.init(e, t), ve.init(e, t), e.element = t.element, e.min = (n, r) => e.check(Gn(n, r)), e.nonempty = (n) => e.check(Gn(1, n)), e.max = (n, r) => e.check(cl(n, r)), e.length = (n, r) => e.check(dl(n, r)), e.unwrap = () => e.element;
3080
+ Tp.init(e, t), ve.init(e, t), e.element = t.element, e.min = (n, r) => e.check(Hn(n, r)), e.nonempty = (n) => e.check(Hn(1, n)), e.max = (n, r) => e.check(cl(n, r)), e.length = (n, r) => e.check(dl(n, r)), e.unwrap = () => e.element;
3081
3081
  });
3082
3082
  function R(e, t) {
3083
3083
  return Mh(If, e, t);
@@ -3089,17 +3089,17 @@ function d(e, t) {
3089
3089
  const n = {
3090
3090
  type: "object",
3091
3091
  get shape() {
3092
- return ir(this, "shape", { ...e }), this.shape;
3092
+ return ar(this, "shape", { ...e }), this.shape;
3093
3093
  },
3094
3094
  ...q(t)
3095
3095
  };
3096
3096
  return new fl(n);
3097
3097
  }
3098
- function Dr(e, t) {
3098
+ function Zr(e, t) {
3099
3099
  return new fl({
3100
3100
  type: "object",
3101
3101
  get shape() {
3102
- return ir(this, "shape", { ...e }), this.shape;
3102
+ return ar(this, "shape", { ...e }), this.shape;
3103
3103
  },
3104
3104
  catchall: ze(),
3105
3105
  ...q(t)
@@ -3142,7 +3142,7 @@ const Cf = /* @__PURE__ */ O("ZodTuple", (e, t) => {
3142
3142
  rest: n
3143
3143
  });
3144
3144
  });
3145
- function Zr(e, t, n) {
3145
+ function jr(e, t, n) {
3146
3146
  const r = t instanceof _e, o = r ? n : t, i = r ? t : null;
3147
3147
  return new Cf({
3148
3148
  type: "tuple",
@@ -3162,7 +3162,7 @@ function Se(e, t, n) {
3162
3162
  ...q(n)
3163
3163
  });
3164
3164
  }
3165
- const jr = /* @__PURE__ */ O("ZodEnum", (e, t) => {
3165
+ const Lr = /* @__PURE__ */ O("ZodEnum", (e, t) => {
3166
3166
  $p.init(e, t), ve.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
3167
3167
  const n = new Set(Object.keys(t.entries));
3168
3168
  e.extract = (r, o) => {
@@ -3172,7 +3172,7 @@ const jr = /* @__PURE__ */ O("ZodEnum", (e, t) => {
3172
3172
  i[a] = t.entries[a];
3173
3173
  else
3174
3174
  throw new Error(`Key ${a} not found in enum`);
3175
- return new jr({
3175
+ return new Lr({
3176
3176
  ...t,
3177
3177
  checks: [],
3178
3178
  ...q(o),
@@ -3185,7 +3185,7 @@ const jr = /* @__PURE__ */ O("ZodEnum", (e, t) => {
3185
3185
  delete i[a];
3186
3186
  else
3187
3187
  throw new Error(`Key ${a} not found in enum`);
3188
- return new jr({
3188
+ return new Lr({
3189
3189
  ...t,
3190
3190
  checks: [],
3191
3191
  ...q(o),
@@ -3195,7 +3195,7 @@ const jr = /* @__PURE__ */ O("ZodEnum", (e, t) => {
3195
3195
  });
3196
3196
  function X(e, t) {
3197
3197
  const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
3198
- return new jr({
3198
+ return new Lr({
3199
3199
  type: "enum",
3200
3200
  entries: n,
3201
3201
  ...q(t)
@@ -3328,7 +3328,7 @@ function yl(e) {
3328
3328
  getter: e
3329
3329
  });
3330
3330
  }
3331
- const uo = /* @__PURE__ */ O("ZodCustom", (e, t) => {
3331
+ const co = /* @__PURE__ */ O("ZodCustom", (e, t) => {
3332
3332
  Fp.init(e, t), ve.init(e, t);
3333
3333
  });
3334
3334
  function qf(e) {
@@ -3339,10 +3339,10 @@ function qf(e) {
3339
3339
  return t._zod.check = e, t;
3340
3340
  }
3341
3341
  function Gf(e, t) {
3342
- return zh(uo, e ?? (() => !0), t);
3342
+ return zh(co, e ?? (() => !0), t);
3343
3343
  }
3344
3344
  function Hf(e, t = {}) {
3345
- return Dh(uo, e, t);
3345
+ return Dh(co, e, t);
3346
3346
  }
3347
3347
  function Wf(e) {
3348
3348
  const t = qf((n) => (n.addIssue = (r) => {
@@ -3355,10 +3355,10 @@ function Wf(e) {
3355
3355
  }, e(n.value, n)));
3356
3356
  return t;
3357
3357
  }
3358
- function Hn(e, t = {
3358
+ function Wn(e, t = {
3359
3359
  error: `Input not instance of ${e.name}`
3360
3360
  }) {
3361
- const n = new uo({
3361
+ const n = new co({
3362
3362
  type: "custom",
3363
3363
  check: "custom",
3364
3364
  fn: (r) => r instanceof e,
@@ -3368,7 +3368,7 @@ function Hn(e, t = {
3368
3368
  return n._zod.bag.Class = e, n;
3369
3369
  }
3370
3370
  function Jf(e) {
3371
- return yh(lo, e);
3371
+ return yh(uo, e);
3372
3372
  }
3373
3373
  var pe;
3374
3374
  (function(e) {
@@ -3539,7 +3539,7 @@ class _t extends Error {
3539
3539
  }
3540
3540
  }
3541
3541
  _t.create = (e) => new _t(e);
3542
- const Lr = (e, t) => {
3542
+ const Ur = (e, t) => {
3543
3543
  let n;
3544
3544
  switch (e.code) {
3545
3545
  case P.invalid_type:
@@ -3595,7 +3595,7 @@ const Lr = (e, t) => {
3595
3595
  }
3596
3596
  return { message: n };
3597
3597
  };
3598
- let Kf = Lr;
3598
+ let Kf = Ur;
3599
3599
  function Yf() {
3600
3600
  return Kf;
3601
3601
  }
@@ -3632,7 +3632,7 @@ function U(e, t) {
3632
3632
  // then schema-bound map if available
3633
3633
  n,
3634
3634
  // then global override map
3635
- n === Lr ? void 0 : Lr
3635
+ n === Ur ? void 0 : Ur
3636
3636
  // then global default map
3637
3637
  ].filter((o) => !!o)
3638
3638
  });
@@ -3681,7 +3681,7 @@ class Je {
3681
3681
  }
3682
3682
  const Q = Object.freeze({
3683
3683
  status: "aborted"
3684
- }), dn = (e) => ({ status: "dirty", value: e }), et = (e) => ({ status: "valid", value: e }), zi = (e) => e.status === "aborted", Di = (e) => e.status === "dirty", Kt = (e) => e.status === "valid", Wn = (e) => typeof Promise < "u" && e instanceof Promise;
3684
+ }), dn = (e) => ({ status: "dirty", value: e }), et = (e) => ({ status: "valid", value: e }), zi = (e) => e.status === "aborted", Di = (e) => e.status === "dirty", Kt = (e) => e.status === "valid", Jn = (e) => typeof Promise < "u" && e instanceof Promise;
3685
3685
  var G;
3686
3686
  (function(e) {
3687
3687
  e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
@@ -3752,7 +3752,7 @@ class ce {
3752
3752
  }
3753
3753
  _parseSync(t) {
3754
3754
  const n = this._parse(t);
3755
- if (Wn(n))
3755
+ if (Jn(n))
3756
3756
  throw new Error("Synchronous parse encountered promise.");
3757
3757
  return n;
3758
3758
  }
@@ -3832,7 +3832,7 @@ class ce {
3832
3832
  parent: null,
3833
3833
  data: t,
3834
3834
  parsedType: xt(t)
3835
- }, o = this._parse({ data: t, path: r.path, parent: r }), i = await (Wn(o) ? o : Promise.resolve(o));
3835
+ }, o = this._parse({ data: t, path: r.path, parent: r }), i = await (Jn(o) ? o : Promise.resolve(o));
3836
3836
  return Zi(r, i);
3837
3837
  }
3838
3838
  refine(t, n) {
@@ -3878,13 +3878,13 @@ class ce {
3878
3878
  return dt.create(this);
3879
3879
  }
3880
3880
  promise() {
3881
- return Xn.create(this, this._def);
3881
+ return Qn.create(this, this._def);
3882
3882
  }
3883
3883
  or(t) {
3884
- return Kn.create([this, t], this._def);
3884
+ return Yn.create([this, t], this._def);
3885
3885
  }
3886
3886
  and(t) {
3887
- return Yn.create(this, t, this._def);
3887
+ return Xn.create(this, t, this._def);
3888
3888
  }
3889
3889
  transform(t) {
3890
3890
  return new Qt({
@@ -3896,7 +3896,7 @@ class ce {
3896
3896
  }
3897
3897
  default(t) {
3898
3898
  const n = typeof t == "function" ? t : () => t;
3899
- return new Br({
3899
+ return new Fr({
3900
3900
  ...ae(this._def),
3901
3901
  innerType: this,
3902
3902
  defaultValue: n,
@@ -3912,7 +3912,7 @@ class ce {
3912
3912
  }
3913
3913
  catch(t) {
3914
3914
  const n = typeof t == "function" ? t : () => t;
3915
- return new Fr({
3915
+ return new Vr({
3916
3916
  ...ae(this._def),
3917
3917
  innerType: this,
3918
3918
  catchValue: n,
@@ -3927,10 +3927,10 @@ class ce {
3927
3927
  });
3928
3928
  }
3929
3929
  pipe(t) {
3930
- return co.create(this, t);
3930
+ return po.create(this, t);
3931
3931
  }
3932
3932
  readonly() {
3933
- return Vr.create(this);
3933
+ return qr.create(this);
3934
3934
  }
3935
3935
  isOptional() {
3936
3936
  return this.safeParse(void 0).success;
@@ -3940,7 +3940,7 @@ class ce {
3940
3940
  }
3941
3941
  }
3942
3942
  const Qf = /^c[^\s-]{8,}$/i, em = /^[0-9a-z]+$/, tm = /^[0-9A-HJKMNP-TV-Z]{26}$/i, nm = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, rm = /^[a-z0-9_-]{21}$/i, om = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, im = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, am = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, sm = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
3943
- let br;
3943
+ let xr;
3944
3944
  const lm = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, um = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, cm = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, dm = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, pm = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, hm = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, vl = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", fm = new RegExp(`^${vl}$`);
3945
3945
  function bl(e) {
3946
3946
  let t = "[0-5]\\d";
@@ -4030,7 +4030,7 @@ class It extends ce {
4030
4030
  message: i.message
4031
4031
  }), r.dirty());
4032
4032
  else if (i.kind === "emoji")
4033
- br || (br = new RegExp(sm, "u")), br.test(t.data) || (o = this._getOrReturnCtx(t, o), U(o, {
4033
+ xr || (xr = new RegExp(sm, "u")), xr.test(t.data) || (o = this._getOrReturnCtx(t, o), U(o, {
4034
4034
  validation: "emoji",
4035
4035
  code: P.invalid_string,
4036
4036
  message: i.message
@@ -4685,7 +4685,7 @@ ji.create = (e) => new ji({
4685
4685
  coerce: (e == null ? void 0 : e.coerce) || !1,
4686
4686
  ...ae(e)
4687
4687
  });
4688
- class Jn extends ce {
4688
+ class Kn extends ce {
4689
4689
  _parse(t) {
4690
4690
  if (this._def.coerce && (t.data = new Date(t.data)), this._getType(t) !== V.date) {
4691
4691
  const i = this._getOrReturnCtx(t);
@@ -4725,7 +4725,7 @@ class Jn extends ce {
4725
4725
  };
4726
4726
  }
4727
4727
  _addCheck(t) {
4728
- return new Jn({
4728
+ return new Kn({
4729
4729
  ...this._def,
4730
4730
  checks: [...this._def.checks, t]
4731
4731
  });
@@ -4757,7 +4757,7 @@ class Jn extends ce {
4757
4757
  return t != null ? new Date(t) : null;
4758
4758
  }
4759
4759
  }
4760
- Jn.create = (e) => new Jn({
4760
+ Kn.create = (e) => new Kn({
4761
4761
  checks: [],
4762
4762
  coerce: (e == null ? void 0 : e.coerce) || !1,
4763
4763
  typeName: M.ZodDate,
@@ -5246,7 +5246,7 @@ Oe.lazycreate = (e, t) => new Oe({
5246
5246
  typeName: M.ZodObject,
5247
5247
  ...ae(t)
5248
5248
  });
5249
- class Kn extends ce {
5249
+ class Yn extends ce {
5250
5250
  _parse(t) {
5251
5251
  const { ctx: n } = this._processInputParams(t), r = this._def.options;
5252
5252
  function o(i) {
@@ -5314,19 +5314,19 @@ class Kn extends ce {
5314
5314
  return this._def.options;
5315
5315
  }
5316
5316
  }
5317
- Kn.create = (e, t) => new Kn({
5317
+ Yn.create = (e, t) => new Yn({
5318
5318
  options: e,
5319
5319
  typeName: M.ZodUnion,
5320
5320
  ...ae(t)
5321
5321
  });
5322
- function Ur(e, t) {
5322
+ function Br(e, t) {
5323
5323
  const n = xt(e), r = xt(t);
5324
5324
  if (e === t)
5325
5325
  return { valid: !0, data: e };
5326
5326
  if (n === V.object && r === V.object) {
5327
5327
  const o = pe.objectKeys(t), i = pe.objectKeys(e).filter((s) => o.indexOf(s) !== -1), a = { ...e, ...t };
5328
5328
  for (const s of i) {
5329
- const l = Ur(e[s], t[s]);
5329
+ const l = Br(e[s], t[s]);
5330
5330
  if (!l.valid)
5331
5331
  return { valid: !1 };
5332
5332
  a[s] = l.data;
@@ -5337,7 +5337,7 @@ function Ur(e, t) {
5337
5337
  return { valid: !1 };
5338
5338
  const o = [];
5339
5339
  for (let i = 0; i < e.length; i++) {
5340
- const a = e[i], s = t[i], l = Ur(a, s);
5340
+ const a = e[i], s = t[i], l = Br(a, s);
5341
5341
  if (!l.valid)
5342
5342
  return { valid: !1 };
5343
5343
  o.push(l.data);
@@ -5345,12 +5345,12 @@ function Ur(e, t) {
5345
5345
  return { valid: !0, data: o };
5346
5346
  } else return n === V.date && r === V.date && +e == +t ? { valid: !0, data: e } : { valid: !1 };
5347
5347
  }
5348
- class Yn extends ce {
5348
+ class Xn extends ce {
5349
5349
  _parse(t) {
5350
5350
  const { status: n, ctx: r } = this._processInputParams(t), o = (i, a) => {
5351
5351
  if (zi(i) || zi(a))
5352
5352
  return Q;
5353
- const s = Ur(i.value, a.value);
5353
+ const s = Br(i.value, a.value);
5354
5354
  return s.valid ? ((Di(i) || Di(a)) && n.dirty(), { status: n.value, value: s.data }) : (U(r, {
5355
5355
  code: P.invalid_intersection_types
5356
5356
  }), Q);
@@ -5377,7 +5377,7 @@ class Yn extends ce {
5377
5377
  }));
5378
5378
  }
5379
5379
  }
5380
- Yn.create = (e, t, n) => new Yn({
5380
+ Xn.create = (e, t, n) => new Xn({
5381
5381
  left: e,
5382
5382
  right: t,
5383
5383
  typeName: M.ZodIntersection,
@@ -5672,7 +5672,7 @@ Ji.create = (e, t) => new Ji({
5672
5672
  typeName: M.ZodNativeEnum,
5673
5673
  ...ae(t)
5674
5674
  });
5675
- class Xn extends ce {
5675
+ class Qn extends ce {
5676
5676
  unwrap() {
5677
5677
  return this._def.type;
5678
5678
  }
@@ -5691,7 +5691,7 @@ class Xn extends ce {
5691
5691
  })));
5692
5692
  }
5693
5693
  }
5694
- Xn.create = (e, t) => new Xn({
5694
+ Qn.create = (e, t) => new Qn({
5695
5695
  type: e,
5696
5696
  typeName: M.ZodPromise,
5697
5697
  ...ae(t)
@@ -5814,7 +5814,7 @@ en.create = (e, t) => new en({
5814
5814
  typeName: M.ZodNullable,
5815
5815
  ...ae(t)
5816
5816
  });
5817
- class Br extends ce {
5817
+ class Fr extends ce {
5818
5818
  _parse(t) {
5819
5819
  const { ctx: n } = this._processInputParams(t);
5820
5820
  let r = n.data;
@@ -5828,13 +5828,13 @@ class Br extends ce {
5828
5828
  return this._def.innerType;
5829
5829
  }
5830
5830
  }
5831
- Br.create = (e, t) => new Br({
5831
+ Fr.create = (e, t) => new Fr({
5832
5832
  innerType: e,
5833
5833
  typeName: M.ZodDefault,
5834
5834
  defaultValue: typeof t.default == "function" ? t.default : () => t.default,
5835
5835
  ...ae(t)
5836
5836
  });
5837
- class Fr extends ce {
5837
+ class Vr extends ce {
5838
5838
  _parse(t) {
5839
5839
  const { ctx: n } = this._processInputParams(t), r = {
5840
5840
  ...n,
@@ -5849,7 +5849,7 @@ class Fr extends ce {
5849
5849
  ...r
5850
5850
  }
5851
5851
  });
5852
- return Wn(o) ? o.then((i) => ({
5852
+ return Jn(o) ? o.then((i) => ({
5853
5853
  status: "valid",
5854
5854
  value: i.status === "valid" ? i.value : this._def.catchValue({
5855
5855
  get error() {
@@ -5871,7 +5871,7 @@ class Fr extends ce {
5871
5871
  return this._def.innerType;
5872
5872
  }
5873
5873
  }
5874
- Fr.create = (e, t) => new Fr({
5874
+ Vr.create = (e, t) => new Vr({
5875
5875
  innerType: e,
5876
5876
  typeName: M.ZodCatch,
5877
5877
  catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
@@ -5907,7 +5907,7 @@ class wm extends ce {
5907
5907
  return this._def.type;
5908
5908
  }
5909
5909
  }
5910
- class co extends ce {
5910
+ class po extends ce {
5911
5911
  _parse(t) {
5912
5912
  const { status: n, ctx: r } = this._processInputParams(t);
5913
5913
  if (r.common.async)
@@ -5940,23 +5940,23 @@ class co extends ce {
5940
5940
  }
5941
5941
  }
5942
5942
  static create(t, n) {
5943
- return new co({
5943
+ return new po({
5944
5944
  in: t,
5945
5945
  out: n,
5946
5946
  typeName: M.ZodPipeline
5947
5947
  });
5948
5948
  }
5949
5949
  }
5950
- class Vr extends ce {
5950
+ class qr extends ce {
5951
5951
  _parse(t) {
5952
5952
  const n = this._def.innerType._parse(t), r = (o) => (Kt(o) && (o.value = Object.freeze(o.value)), o);
5953
- return Wn(n) ? n.then((o) => r(o)) : r(n);
5953
+ return Jn(n) ? n.then((o) => r(o)) : r(n);
5954
5954
  }
5955
5955
  unwrap() {
5956
5956
  return this._def.innerType;
5957
5957
  }
5958
5958
  }
5959
- Vr.create = (e, t) => new Vr({
5959
+ qr.create = (e, t) => new qr({
5960
5960
  innerType: e,
5961
5961
  typeName: M.ZodReadonly,
5962
5962
  ...ae(t)
@@ -5967,11 +5967,11 @@ var M;
5967
5967
  })(M || (M = {}));
5968
5968
  const ye = It.create, ct = Yt.create;
5969
5969
  Nt.create;
5970
- const Ct = dt.create, it = Oe.create, po = Kn.create;
5971
- Yn.create;
5972
- Lt.create;
5973
- const lr = Xt.create;
5970
+ const Ct = dt.create, it = Oe.create, ho = Yn.create;
5974
5971
  Xn.create;
5972
+ Lt.create;
5973
+ const ur = Xt.create;
5974
+ Qn.create;
5975
5975
  Et.create;
5976
5976
  en.create;
5977
5977
  function De(...e) {
@@ -6022,7 +6022,7 @@ var xl = "AI_DownloadError", kl = `vercel.ai.error.${xl}`, km = Symbol.for(kl),
6022
6022
  return te.hasMarker(e, kl);
6023
6023
  }
6024
6024
  };
6025
- async function ho(e) {
6025
+ async function fo(e) {
6026
6026
  var t;
6027
6027
  try {
6028
6028
  await ((t = e.body) == null ? void 0 : t.cancel());
@@ -6164,7 +6164,7 @@ async function Om({
6164
6164
  }
6165
6165
  const l = s.headers.get("location");
6166
6166
  if (s.status >= 300 && s.status < 400 && l) {
6167
- await ho(s), i = new URL(l, i).toString();
6167
+ await fo(s), i = new URL(l, i).toString();
6168
6168
  continue;
6169
6169
  }
6170
6170
  return s;
@@ -6184,7 +6184,7 @@ async function El({
6184
6184
  if (r != null) {
6185
6185
  const p = parseInt(r, 10);
6186
6186
  if (!isNaN(p) && p > n)
6187
- throw await ho(e), new qe({
6187
+ throw await fo(e), new qe({
6188
6188
  url: t,
6189
6189
  message: `Download of ${t} exceeded maximum size of ${n} bytes (Content-Length: ${p}).`
6190
6190
  });
@@ -6269,7 +6269,7 @@ function Ol({
6269
6269
  }
6270
6270
  return e;
6271
6271
  }
6272
- function fo(e = globalThis) {
6272
+ function mo(e = globalThis) {
6273
6273
  var t, n, r;
6274
6274
  return e.window ? "runtime/browser" : (t = e.navigator) != null && t.userAgent ? `runtime/${e.navigator.userAgent.toLowerCase()}` : (r = (n = e.process) == null ? void 0 : n.versions) != null && r.node ? `runtime/node.js/${e.process.version.substring(0)}` : e.EdgeRuntime ? "runtime/vercel-edge" : "runtime/unknown";
6275
6275
  }
@@ -6295,7 +6295,7 @@ function qt(e, ...t) {
6295
6295
  [r, ...t].filter(Boolean).join(" ")
6296
6296
  ), Object.fromEntries(n.entries());
6297
6297
  }
6298
- var Al = "3.0.28", Nm = () => globalThis.fetch, Qn = async ({
6298
+ var Al = "3.0.28", Nm = () => globalThis.fetch, er = async ({
6299
6299
  url: e,
6300
6300
  headers: t = {},
6301
6301
  successfulResponseHandler: n,
@@ -6309,7 +6309,7 @@ var Al = "3.0.28", Nm = () => globalThis.fetch, Qn = async ({
6309
6309
  headers: qt(
6310
6310
  t,
6311
6311
  `ai-sdk/provider-utils/${Al}`,
6312
- fo()
6312
+ mo()
6313
6313
  ),
6314
6314
  signal: o
6315
6315
  }), s = nn(a);
@@ -6432,7 +6432,7 @@ function Dm(e) {
6432
6432
  }
6433
6433
  return e;
6434
6434
  }
6435
- function mo(e) {
6435
+ function _o(e) {
6436
6436
  const { stackTraceLimit: t } = Error;
6437
6437
  try {
6438
6438
  Error.stackTraceLimit = 0;
@@ -6445,12 +6445,12 @@ function mo(e) {
6445
6445
  Error.stackTraceLimit = t;
6446
6446
  }
6447
6447
  }
6448
- var er = /* @__PURE__ */ Symbol.for("vercel.ai.validator");
6448
+ var tr = /* @__PURE__ */ Symbol.for("vercel.ai.validator");
6449
6449
  function Zm(e) {
6450
- return { [er]: !0, validate: e };
6450
+ return { [tr]: !0, validate: e };
6451
6451
  }
6452
6452
  function jm(e) {
6453
- return typeof e == "object" && e !== null && er in e && e[er] === !0 && "validate" in e;
6453
+ return typeof e == "object" && e !== null && tr in e && e[tr] === !0 && "validate" in e;
6454
6454
  }
6455
6455
  function Ee(e) {
6456
6456
  let t;
@@ -6507,10 +6507,10 @@ async function Bm({
6507
6507
  schema: t
6508
6508
  }) {
6509
6509
  try {
6510
- const n = mo(e);
6510
+ const n = _o(e);
6511
6511
  return t == null ? n : Me({ value: n, schema: t });
6512
6512
  } catch (n) {
6513
- throw Fn.isInstance(n) || mn.isInstance(n) ? n : new Fn({ text: e, cause: n });
6513
+ throw Vn.isInstance(n) || mn.isInstance(n) ? n : new Vn({ text: e, cause: n });
6514
6514
  }
6515
6515
  }
6516
6516
  async function Ut({
@@ -6518,19 +6518,19 @@ async function Ut({
6518
6518
  schema: t
6519
6519
  }) {
6520
6520
  try {
6521
- const n = mo(e);
6521
+ const n = _o(e);
6522
6522
  return t == null ? { success: !0, value: n, rawValue: n } : await gt({ value: n, schema: t });
6523
6523
  } catch (n) {
6524
6524
  return {
6525
6525
  success: !1,
6526
- error: Fn.isInstance(n) ? n : new Fn({ text: e, cause: n }),
6526
+ error: Vn.isInstance(n) ? n : new Vn({ text: e, cause: n }),
6527
6527
  rawValue: void 0
6528
6528
  };
6529
6529
  }
6530
6530
  }
6531
6531
  function ta(e) {
6532
6532
  try {
6533
- return mo(e), !0;
6533
+ return _o(e), !0;
6534
6534
  } catch {
6535
6535
  return !1;
6536
6536
  }
@@ -6622,7 +6622,7 @@ var Vm = () => globalThis.fetch, Ze = async ({
6622
6622
  headers: qt(
6623
6623
  t,
6624
6624
  `ai-sdk/provider-utils/${Al}`,
6625
- fo()
6625
+ mo()
6626
6626
  ),
6627
6627
  body: n.content,
6628
6628
  signal: i
@@ -6846,38 +6846,38 @@ var pt = ({
6846
6846
  cause: o
6847
6847
  });
6848
6848
  }
6849
- }, qr = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
6849
+ }, Gr = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
6850
6850
  function K(e) {
6851
6851
  let t;
6852
6852
  return () => (t == null && (t = e()), t);
6853
6853
  }
6854
- function _o(e, {
6854
+ function go(e, {
6855
6855
  validate: t
6856
6856
  } = {}) {
6857
6857
  return {
6858
- [qr]: !0,
6858
+ [Gr]: !0,
6859
6859
  _type: void 0,
6860
6860
  // should never be used directly
6861
- [er]: !0,
6861
+ [tr]: !0,
6862
6862
  get jsonSchema() {
6863
6863
  return typeof e == "function" && (e = e()), e;
6864
6864
  },
6865
6865
  validate: t
6866
6866
  };
6867
6867
  }
6868
- function Ln(e) {
6868
+ function Un(e) {
6869
6869
  if (e.type === "object") {
6870
6870
  e.additionalProperties = !1;
6871
6871
  const t = e.properties;
6872
6872
  if (t != null)
6873
6873
  for (const n in t)
6874
- t[n] = Ln(
6874
+ t[n] = Un(
6875
6875
  t[n]
6876
6876
  );
6877
6877
  }
6878
6878
  return e.type === "array" && e.items != null && (Array.isArray(e.items) ? e.items = e.items.map(
6879
- (t) => Ln(t)
6880
- ) : e.items = Ln(
6879
+ (t) => Un(t)
6880
+ ) : e.items = Un(
6881
6881
  e.items
6882
6882
  )), e;
6883
6883
  }
@@ -7037,7 +7037,7 @@ function a_(e) {
7037
7037
  const: e.value
7038
7038
  };
7039
7039
  }
7040
- var wr = void 0, rt = {
7040
+ var kr = void 0, rt = {
7041
7041
  /**
7042
7042
  * `c` was changed to `[cC]` to replicate /i flag
7043
7043
  */
@@ -7059,10 +7059,10 @@ var wr = void 0, rt = {
7059
7059
  * Fix in Zod:
7060
7060
  * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
7061
7061
  */
7062
- emoji: () => (wr === void 0 && (wr = RegExp(
7062
+ emoji: () => (kr === void 0 && (kr = RegExp(
7063
7063
  "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
7064
7064
  "u"
7065
- )), wr),
7065
+ )), kr),
7066
7066
  /**
7067
7067
  * Unused
7068
7068
  */
@@ -7126,7 +7126,7 @@ function zl(e, t) {
7126
7126
  case "startsWith":
7127
7127
  Pe(
7128
7128
  n,
7129
- RegExp(`^${xr(r.value, t)}`),
7129
+ RegExp(`^${Ir(r.value, t)}`),
7130
7130
  r.message,
7131
7131
  t
7132
7132
  );
@@ -7134,7 +7134,7 @@ function zl(e, t) {
7134
7134
  case "endsWith":
7135
7135
  Pe(
7136
7136
  n,
7137
- RegExp(`${xr(r.value, t)}$`),
7137
+ RegExp(`${Ir(r.value, t)}$`),
7138
7138
  r.message,
7139
7139
  t
7140
7140
  );
@@ -7157,7 +7157,7 @@ function zl(e, t) {
7157
7157
  case "includes": {
7158
7158
  Pe(
7159
7159
  n,
7160
- RegExp(xr(r.value, t)),
7160
+ RegExp(Ir(r.value, t)),
7161
7161
  r.message,
7162
7162
  t
7163
7163
  );
@@ -7206,7 +7206,7 @@ function zl(e, t) {
7206
7206
  }
7207
7207
  return n;
7208
7208
  }
7209
- function xr(e, t) {
7209
+ function Ir(e, t) {
7210
7210
  return t.patternStrategy === "escape" ? l_(e) : e;
7211
7211
  }
7212
7212
  var s_ = new Set(
@@ -7369,7 +7369,7 @@ function p_() {
7369
7369
  type: "null"
7370
7370
  };
7371
7371
  }
7372
- var Gr = {
7372
+ var Hr = {
7373
7373
  ZodString: "string",
7374
7374
  ZodNumber: "number",
7375
7375
  ZodBigInt: "integer",
@@ -7379,10 +7379,10 @@ var Gr = {
7379
7379
  function h_(e, t) {
7380
7380
  const n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
7381
7381
  if (n.every(
7382
- (r) => r._def.typeName in Gr && (!r._def.checks || !r._def.checks.length)
7382
+ (r) => r._def.typeName in Hr && (!r._def.checks || !r._def.checks.length)
7383
7383
  )) {
7384
7384
  const r = n.reduce((o, i) => {
7385
- const a = Gr[i._def.typeName];
7385
+ const a = Hr[i._def.typeName];
7386
7386
  return a && !o.includes(a) ? [...o, a] : o;
7387
7387
  }, []);
7388
7388
  return {
@@ -7450,7 +7450,7 @@ function m_(e, t) {
7450
7450
  ) && (!e.innerType._def.checks || !e.innerType._def.checks.length))
7451
7451
  return {
7452
7452
  type: [
7453
- Gr[e.innerType._def.typeName],
7453
+ Hr[e.innerType._def.typeName],
7454
7454
  "null"
7455
7455
  ]
7456
7456
  };
@@ -7791,7 +7791,7 @@ var A_ = (e, t) => {
7791
7791
  function M_(e, t) {
7792
7792
  var n;
7793
7793
  const r = (n = void 0) != null ? n : !1;
7794
- return _o(
7794
+ return go(
7795
7795
  // defer json schema creation to avoid unnecessary computation when only validation is needed
7796
7796
  () => P_(e, {
7797
7797
  $refStrategy: r ? "root" : "none"
@@ -7807,9 +7807,9 @@ function M_(e, t) {
7807
7807
  function z_(e, t) {
7808
7808
  var n;
7809
7809
  const r = (n = void 0) != null ? n : !1;
7810
- return _o(
7810
+ return go(
7811
7811
  // defer json schema creation to avoid unnecessary computation when only validation is needed
7812
- () => Ln(
7812
+ () => Un(
7813
7813
  Zh(e, {
7814
7814
  target: "draft-7",
7815
7815
  io: "input",
@@ -7831,29 +7831,29 @@ function L(e, t) {
7831
7831
  return D_(e) ? z_(e) : M_(e);
7832
7832
  }
7833
7833
  function Z_(e) {
7834
- return typeof e == "object" && e !== null && qr in e && e[qr] === !0 && "jsonSchema" in e && "validate" in e;
7834
+ return typeof e == "object" && e !== null && Gr in e && e[Gr] === !0 && "jsonSchema" in e && "validate" in e;
7835
7835
  }
7836
- function ur(e) {
7837
- return e == null ? _o({
7836
+ function cr(e) {
7837
+ return e == null ? go({
7838
7838
  properties: {},
7839
7839
  additionalProperties: !1
7840
7840
  }) : Z_(e) ? e : typeof e == "function" ? e() : L(e);
7841
7841
  }
7842
7842
  var { btoa: j_, atob: L_ } = globalThis;
7843
- function cr(e) {
7843
+ function dr(e) {
7844
7844
  const t = e.replace(/-/g, "+").replace(/_/g, "/"), n = L_(t);
7845
7845
  return Uint8Array.from(n, (r) => r.codePointAt(0));
7846
7846
  }
7847
- function tr(e) {
7847
+ function nr(e) {
7848
7848
  let t = "";
7849
7849
  for (let n = 0; n < e.length; n++)
7850
7850
  t += String.fromCodePoint(e[n]);
7851
7851
  return j_(t);
7852
7852
  }
7853
7853
  function Tt(e) {
7854
- return e instanceof Uint8Array ? tr(e) : e;
7854
+ return e instanceof Uint8Array ? nr(e) : e;
7855
7855
  }
7856
- function go(e) {
7856
+ function yo(e) {
7857
7857
  return e == null ? void 0 : e.replace(/\/$/, "");
7858
7858
  }
7859
7859
  function U_(e) {
@@ -7873,9 +7873,9 @@ async function* B_({
7873
7873
  } else
7874
7874
  yield { type: "final", output: await r };
7875
7875
  }
7876
- var kr, oa;
7876
+ var Tr, oa;
7877
7877
  function F_() {
7878
- if (oa) return kr;
7878
+ if (oa) return Tr;
7879
7879
  oa = 1;
7880
7880
  var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, o = (p, g) => {
7881
7881
  for (var x in g)
@@ -7889,17 +7889,17 @@ function F_() {
7889
7889
  o(s, {
7890
7890
  SYMBOL_FOR_REQ_CONTEXT: () => l,
7891
7891
  getContext: () => c
7892
- }), kr = a(s);
7892
+ }), Tr = a(s);
7893
7893
  const l = Symbol.for("@vercel/request-context");
7894
7894
  function c() {
7895
7895
  var g, x;
7896
7896
  return ((x = (g = globalThis[l]) == null ? void 0 : g.get) == null ? void 0 : x.call(g)) ?? {};
7897
7897
  }
7898
- return kr;
7898
+ return Tr;
7899
7899
  }
7900
- var Ir, ia;
7900
+ var Sr, ia;
7901
7901
  function V_() {
7902
- if (ia) return Ir;
7902
+ if (ia) return Sr;
7903
7903
  ia = 1;
7904
7904
  var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, o = (g, x) => {
7905
7905
  for (var T in x)
@@ -7914,7 +7914,7 @@ function V_() {
7914
7914
  getContext: () => l.getContext,
7915
7915
  getVercelOidcToken: () => c,
7916
7916
  getVercelOidcTokenSync: () => p
7917
- }), Ir = a(s);
7917
+ }), Sr = a(s);
7918
7918
  var l = F_();
7919
7919
  async function c() {
7920
7920
  return "";
@@ -7922,9 +7922,9 @@ function V_() {
7922
7922
  function p() {
7923
7923
  return "";
7924
7924
  }
7925
- return Ir;
7925
+ return Sr;
7926
7926
  }
7927
- var Zl = V_(), q_ = "vercel.ai.gateway.error", Tr = Symbol.for(q_), aa, sa, Ne = class jl extends (sa = Error, aa = Tr, sa) {
7927
+ var Zl = V_(), q_ = "vercel.ai.gateway.error", Er = Symbol.for(q_), aa, sa, Ne = class jl extends (sa = Error, aa = Er, sa) {
7928
7928
  constructor({
7929
7929
  message: t,
7930
7930
  statusCode: n = 500,
@@ -7941,9 +7941,9 @@ var Zl = V_(), q_ = "vercel.ai.gateway.error", Tr = Symbol.for(q_), aa, sa, Ne =
7941
7941
  return jl.hasMarker(t);
7942
7942
  }
7943
7943
  static hasMarker(t) {
7944
- return typeof t == "object" && t !== null && Tr in t && t[Tr] === !0;
7944
+ return typeof t == "object" && t !== null && Er in t && t[Er] === !0;
7945
7945
  }
7946
- }, Ll = "GatewayAuthenticationError", G_ = `vercel.ai.gateway.error.${Ll}`, la = Symbol.for(G_), ua, ca, yo = class Ul extends (ca = Ne, ua = la, ca) {
7946
+ }, Ll = "GatewayAuthenticationError", G_ = `vercel.ai.gateway.error.${Ll}`, la = Symbol.for(G_), ua, ca, vo = class Ul extends (ca = Ne, ua = la, ca) {
7947
7947
  constructor({
7948
7948
  message: t = "Authentication failed",
7949
7949
  statusCode: n = 401,
@@ -8084,7 +8084,7 @@ async function Aa({
8084
8084
  const a = i.value, s = a.error.type, l = a.error.message;
8085
8085
  switch (s) {
8086
8086
  case "authentication_error":
8087
- return yo.createContextualError({
8087
+ return vo.createContextualError({
8088
8088
  apiKeyProvided: o === "api-key",
8089
8089
  oidcTokenProvided: o === "oidc",
8090
8090
  statusCode: t,
@@ -8214,7 +8214,7 @@ var lg = Ee(
8214
8214
  }
8215
8215
  async getAvailableModels() {
8216
8216
  try {
8217
- const { value: e } = await Qn({
8217
+ const { value: e } = await er({
8218
8218
  url: `${this.config.baseURL}/config`,
8219
8219
  headers: await Ue(this.config.headers()),
8220
8220
  successfulResponseHandler: Be(
@@ -8233,7 +8233,7 @@ var lg = Ee(
8233
8233
  }
8234
8234
  async getCredits() {
8235
8235
  try {
8236
- const e = new URL(this.config.baseURL), { value: t } = await Qn({
8236
+ const e = new URL(this.config.baseURL), { value: t } = await er({
8237
8237
  url: `${e.origin}/v1/credits`,
8238
8238
  headers: await Ue(this.config.headers()),
8239
8239
  successfulResponseHandler: Be(
@@ -8303,7 +8303,7 @@ var lg = Ee(
8303
8303
  try {
8304
8304
  const t = new URL(this.config.baseURL), n = new URLSearchParams();
8305
8305
  n.set("start_date", e.startDate), n.set("end_date", e.endDate), e.groupBy && n.set("group_by", e.groupBy), e.datePart && n.set("date_part", e.datePart), e.userId && n.set("user_id", e.userId), e.model && n.set("model", e.model), e.provider && n.set("provider", e.provider), e.credentialType && n.set("credential_type", e.credentialType), e.tags && e.tags.length > 0 && n.set("tags", e.tags.join(","));
8306
- const { value: r } = await Qn({
8306
+ const { value: r } = await er({
8307
8307
  url: `${t.origin}/v1/report?${n.toString()}`,
8308
8308
  headers: await Ue(this.config.headers()),
8309
8309
  successfulResponseHandler: Be(
@@ -8374,7 +8374,7 @@ var lg = Ee(
8374
8374
  }
8375
8375
  async getGenerationInfo(e) {
8376
8376
  try {
8377
- const t = new URL(this.config.baseURL), { value: n } = await Qn({
8377
+ const t = new URL(this.config.baseURL), { value: n } = await er({
8378
8378
  url: `${t.origin}/v1/generation?id=${encodeURIComponent(e.id)}`,
8379
8379
  headers: await Ue(this.config.headers()),
8380
8380
  successfulResponseHandler: Be(
@@ -8751,7 +8751,7 @@ var lg = Ee(
8751
8751
  search_queries: Ct(ye()).optional().describe(
8752
8752
  "Optional search queries to supplement the objective. Maximum 200 characters per query."
8753
8753
  ),
8754
- mode: lr(["one-shot", "agentic"]).optional().describe(
8754
+ mode: ur(["one-shot", "agentic"]).optional().describe(
8755
8755
  'Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'
8756
8756
  ),
8757
8757
  max_results: ct().optional().describe(
@@ -8779,7 +8779,7 @@ var lg = Ee(
8779
8779
  )
8780
8780
  ), Ig = K(
8781
8781
  () => L(
8782
- po([
8782
+ ho([
8783
8783
  // Success response
8784
8784
  it({
8785
8785
  searchId: ye(),
@@ -8795,7 +8795,7 @@ var lg = Ee(
8795
8795
  }),
8796
8796
  // Error response
8797
8797
  it({
8798
- error: lr([
8798
+ error: ur([
8799
8799
  "api_error",
8800
8800
  "rate_limit",
8801
8801
  "timeout",
@@ -8816,7 +8816,7 @@ var lg = Ee(
8816
8816
  }), Sg = (e = {}) => Tg(e), Eg = K(
8817
8817
  () => L(
8818
8818
  it({
8819
- query: po([ye(), Ct(ye())]).describe(
8819
+ query: ho([ye(), Ct(ye())]).describe(
8820
8820
  "Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."
8821
8821
  ),
8822
8822
  max_results: ct().optional().describe(
@@ -8849,14 +8849,14 @@ var lg = Ee(
8849
8849
  last_updated_before_filter: ye().optional().describe(
8850
8850
  "Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."
8851
8851
  ),
8852
- search_recency_filter: lr(["day", "week", "month", "year"]).optional().describe(
8852
+ search_recency_filter: ur(["day", "week", "month", "year"]).optional().describe(
8853
8853
  "Filter results by relative time period. Cannot be used with search_after_date or search_before_date."
8854
8854
  )
8855
8855
  })
8856
8856
  )
8857
8857
  ), Cg = K(
8858
8858
  () => L(
8859
- po([
8859
+ ho([
8860
8860
  // Success response
8861
8861
  it({
8862
8862
  results: Ct(
@@ -8872,7 +8872,7 @@ var lg = Ee(
8872
8872
  }),
8873
8873
  // Error response
8874
8874
  it({
8875
- error: lr([
8875
+ error: ur([
8876
8876
  "api_error",
8877
8877
  "rate_limit",
8878
8878
  "timeout",
@@ -8918,7 +8918,7 @@ function Mg(e = {}) {
8918
8918
  let r = null, o = null;
8919
8919
  const i = (t = e.metadataCacheRefreshMillis) != null ? t : 1e3 * 60 * 5;
8920
8920
  let a = 0;
8921
- const s = (n = go(e.baseURL)) != null ? n : "https://ai-gateway.vercel.sh/v1/ai", l = async () => {
8921
+ const s = (n = yo(e.baseURL)) != null ? n : "https://ai-gateway.vercel.sh/v1/ai", l = async () => {
8922
8922
  const k = await Dg(e);
8923
8923
  if (k)
8924
8924
  return qt(
@@ -8930,7 +8930,7 @@ function Mg(e = {}) {
8930
8930
  },
8931
8931
  `ai-sdk/gateway/${Rg}`
8932
8932
  );
8933
- throw yo.createContextualError({
8933
+ throw vo.createContextualError({
8934
8934
  apiKeyProvided: !1,
8935
8935
  oidcTokenProvided: !1,
8936
8936
  statusCode: 401
@@ -9379,7 +9379,7 @@ var Qg = (
9379
9379
  }, e.prototype.removeBatchObservableCallback = function(t) {
9380
9380
  }, e;
9381
9381
  })()
9382
- ), dr = (
9382
+ ), pr = (
9383
9383
  /** @class */
9384
9384
  /* @__PURE__ */ (function() {
9385
9385
  function e() {
@@ -9395,7 +9395,7 @@ var Qg = (
9395
9395
  }
9396
9396
  return t.prototype.add = function(n, r) {
9397
9397
  }, t;
9398
- })(dr)
9398
+ })(pr)
9399
9399
  ), ry = (
9400
9400
  /** @class */
9401
9401
  (function(e) {
@@ -9405,7 +9405,7 @@ var Qg = (
9405
9405
  }
9406
9406
  return t.prototype.add = function(n, r) {
9407
9407
  }, t;
9408
- })(dr)
9408
+ })(pr)
9409
9409
  ), oy = (
9410
9410
  /** @class */
9411
9411
  (function(e) {
@@ -9415,7 +9415,7 @@ var Qg = (
9415
9415
  }
9416
9416
  return t.prototype.record = function(n, r) {
9417
9417
  }, t;
9418
- })(dr)
9418
+ })(pr)
9419
9419
  ), iy = (
9420
9420
  /** @class */
9421
9421
  (function(e) {
@@ -9425,8 +9425,8 @@ var Qg = (
9425
9425
  }
9426
9426
  return t.prototype.record = function(n, r) {
9427
9427
  }, t;
9428
- })(dr)
9429
- ), vo = (
9428
+ })(pr)
9429
+ ), bo = (
9430
9430
  /** @class */
9431
9431
  (function() {
9432
9432
  function e() {
@@ -9443,7 +9443,7 @@ var Qg = (
9443
9443
  return e !== null && e.apply(this, arguments) || this;
9444
9444
  }
9445
9445
  return t;
9446
- })(vo)
9446
+ })(bo)
9447
9447
  ), sy = (
9448
9448
  /** @class */
9449
9449
  (function(e) {
@@ -9452,7 +9452,7 @@ var Qg = (
9452
9452
  return e !== null && e.apply(this, arguments) || this;
9453
9453
  }
9454
9454
  return t;
9455
- })(vo)
9455
+ })(bo)
9456
9456
  ), ly = (
9457
9457
  /** @class */
9458
9458
  (function(e) {
@@ -9461,7 +9461,7 @@ var Qg = (
9461
9461
  return e !== null && e.apply(this, arguments) || this;
9462
9462
  }
9463
9463
  return t;
9464
- })(vo)
9464
+ })(bo)
9465
9465
  ), uy = new ty(), cy = new ny(), dy = new oy(), py = new iy(), hy = new ry(), fy = new ay(), my = new sy(), _y = new ly(), gy = {
9466
9466
  get: function(e, t) {
9467
9467
  if (e != null)
@@ -9533,7 +9533,7 @@ var Qg = (
9533
9533
  if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
9534
9534
  (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
9535
9535
  return e.concat(i || Array.prototype.slice.call(t));
9536
- }, Sr = "context", Iy = new wy(), pr = (
9536
+ }, Cr = "context", Iy = new wy(), hr = (
9537
9537
  /** @class */
9538
9538
  (function() {
9539
9539
  function e() {
@@ -9541,7 +9541,7 @@ var Qg = (
9541
9541
  return e.getInstance = function() {
9542
9542
  return this._instance || (this._instance = new e()), this._instance;
9543
9543
  }, e.prototype.setGlobalContextManager = function(t) {
9544
- return On(Sr, t, ht.instance());
9544
+ return On(Cr, t, ht.instance());
9545
9545
  }, e.prototype.active = function() {
9546
9546
  return this._getContextManager().active();
9547
9547
  }, e.prototype.with = function(t, n, r) {
@@ -9551,19 +9551,19 @@ var Qg = (
9551
9551
  }, e.prototype.bind = function(t, n) {
9552
9552
  return this._getContextManager().bind(t, n);
9553
9553
  }, e.prototype._getContextManager = function() {
9554
- return Bt(Sr) || Iy;
9554
+ return Bt(Cr) || Iy;
9555
9555
  }, e.prototype.disable = function() {
9556
- this._getContextManager().disable(), An(Sr, ht.instance());
9556
+ this._getContextManager().disable(), An(Cr, ht.instance());
9557
9557
  }, e;
9558
9558
  })()
9559
- ), Hr;
9559
+ ), Wr;
9560
9560
  (function(e) {
9561
9561
  e[e.NONE = 0] = "NONE", e[e.SAMPLED = 1] = "SAMPLED";
9562
- })(Hr || (Hr = {}));
9562
+ })(Wr || (Wr = {}));
9563
9563
  var Xl = "0000000000000000", Ql = "00000000000000000000000000000000", Ty = {
9564
9564
  traceId: Ql,
9565
9565
  spanId: Xl,
9566
- traceFlags: Hr.NONE
9566
+ traceFlags: Wr.NONE
9567
9567
  }, hn = (
9568
9568
  /** @class */
9569
9569
  (function() {
@@ -9592,25 +9592,25 @@ var Xl = "0000000000000000", Ql = "00000000000000000000000000000000", Ty = {
9592
9592
  }, e.prototype.recordException = function(t, n) {
9593
9593
  }, e;
9594
9594
  })()
9595
- ), bo = Yl("OpenTelemetry Context Key SPAN");
9596
- function wo(e) {
9597
- return e.getValue(bo) || void 0;
9595
+ ), wo = Yl("OpenTelemetry Context Key SPAN");
9596
+ function xo(e) {
9597
+ return e.getValue(wo) || void 0;
9598
9598
  }
9599
9599
  function Sy() {
9600
- return wo(pr.getInstance().active());
9600
+ return xo(hr.getInstance().active());
9601
9601
  }
9602
- function xo(e, t) {
9603
- return e.setValue(bo, t);
9602
+ function ko(e, t) {
9603
+ return e.setValue(wo, t);
9604
9604
  }
9605
9605
  function Ey(e) {
9606
- return e.deleteValue(bo);
9606
+ return e.deleteValue(wo);
9607
9607
  }
9608
9608
  function Cy(e, t) {
9609
- return xo(e, new hn(t));
9609
+ return ko(e, new hn(t));
9610
9610
  }
9611
9611
  function eu(e) {
9612
9612
  var t;
9613
- return (t = wo(e)) === null || t === void 0 ? void 0 : t.spanContext();
9613
+ return (t = xo(e)) === null || t === void 0 ? void 0 : t.spanContext();
9614
9614
  }
9615
9615
  var Oy = /^([0-9a-f]{32})$/i, Ay = /^[0-9a-f]{16}$/i;
9616
9616
  function $y(e) {
@@ -9625,13 +9625,13 @@ function tu(e) {
9625
9625
  function Ry(e) {
9626
9626
  return new hn(e);
9627
9627
  }
9628
- var Er = pr.getInstance(), nu = (
9628
+ var Or = hr.getInstance(), nu = (
9629
9629
  /** @class */
9630
9630
  (function() {
9631
9631
  function e() {
9632
9632
  }
9633
9633
  return e.prototype.startSpan = function(t, n, r) {
9634
- r === void 0 && (r = Er.active());
9634
+ r === void 0 && (r = Or.active());
9635
9635
  var o = !!(n != null && n.root);
9636
9636
  if (o)
9637
9637
  return new hn();
@@ -9641,8 +9641,8 @@ var Er = pr.getInstance(), nu = (
9641
9641
  var i, a, s;
9642
9642
  if (!(arguments.length < 2)) {
9643
9643
  arguments.length === 2 ? s = n : arguments.length === 3 ? (i = n, s = r) : (i = n, a = r, s = o);
9644
- var l = a ?? Er.active(), c = this.startSpan(t, i, l), p = xo(l, c);
9645
- return Er.with(p, s, void 0, c);
9644
+ var l = a ?? Or.active(), c = this.startSpan(t, i, l), p = ko(l, c);
9645
+ return Or.with(p, s, void 0, c);
9646
9646
  }
9647
9647
  }, e;
9648
9648
  })()
@@ -9695,11 +9695,11 @@ var My = new nu(), zy = (
9695
9695
  return (o = this._delegate) === null || o === void 0 ? void 0 : o.getTracer(t, n, r);
9696
9696
  }, e;
9697
9697
  })()
9698
- ), nr;
9698
+ ), rr;
9699
9699
  (function(e) {
9700
9700
  e[e.UNSET = 0] = "UNSET", e[e.OK = 1] = "OK", e[e.ERROR = 2] = "ERROR";
9701
- })(nr || (nr = {}));
9702
- pr.getInstance();
9701
+ })(rr || (rr = {}));
9702
+ hr.getInstance();
9703
9703
  ht.instance();
9704
9704
  var jy = (
9705
9705
  /** @class */
@@ -9710,7 +9710,7 @@ var jy = (
9710
9710
  return uy;
9711
9711
  }, e;
9712
9712
  })()
9713
- ), Ly = new jy(), Cr = "metrics", Uy = (
9713
+ ), Ly = new jy(), Ar = "metrics", Uy = (
9714
9714
  /** @class */
9715
9715
  (function() {
9716
9716
  function e() {
@@ -9718,13 +9718,13 @@ var jy = (
9718
9718
  return e.getInstance = function() {
9719
9719
  return this._instance || (this._instance = new e()), this._instance;
9720
9720
  }, e.prototype.setGlobalMeterProvider = function(t) {
9721
- return On(Cr, t, ht.instance());
9721
+ return On(Ar, t, ht.instance());
9722
9722
  }, e.prototype.getMeterProvider = function() {
9723
- return Bt(Cr) || Ly;
9723
+ return Bt(Ar) || Ly;
9724
9724
  }, e.prototype.getMeter = function(t, n, r) {
9725
9725
  return this.getMeterProvider().getMeter(t, n, r);
9726
9726
  }, e.prototype.disable = function() {
9727
- An(Cr, ht.instance());
9727
+ An(Ar, ht.instance());
9728
9728
  }, e;
9729
9729
  })()
9730
9730
  );
@@ -9741,20 +9741,20 @@ var By = (
9741
9741
  return [];
9742
9742
  }, e;
9743
9743
  })()
9744
- ), ko = Yl("OpenTelemetry Baggage Key");
9744
+ ), Io = Yl("OpenTelemetry Baggage Key");
9745
9745
  function ru(e) {
9746
- return e.getValue(ko) || void 0;
9746
+ return e.getValue(Io) || void 0;
9747
9747
  }
9748
9748
  function Fy() {
9749
- return ru(pr.getInstance().active());
9749
+ return ru(hr.getInstance().active());
9750
9750
  }
9751
9751
  function Vy(e, t) {
9752
- return e.setValue(ko, t);
9752
+ return e.setValue(Io, t);
9753
9753
  }
9754
9754
  function qy(e) {
9755
- return e.deleteValue(ko);
9755
+ return e.deleteValue(Io);
9756
9756
  }
9757
- var Or = "propagation", Gy = new By(), Hy = (
9757
+ var $r = "propagation", Gy = new By(), Hy = (
9758
9758
  /** @class */
9759
9759
  (function() {
9760
9760
  function e() {
@@ -9763,7 +9763,7 @@ var Or = "propagation", Gy = new By(), Hy = (
9763
9763
  return e.getInstance = function() {
9764
9764
  return this._instance || (this._instance = new e()), this._instance;
9765
9765
  }, e.prototype.setGlobalPropagator = function(t) {
9766
- return On(Or, t, ht.instance());
9766
+ return On($r, t, ht.instance());
9767
9767
  }, e.prototype.inject = function(t, n, r) {
9768
9768
  return r === void 0 && (r = yy), this._getGlobalPropagator().inject(t, n, r);
9769
9769
  }, e.prototype.extract = function(t, n, r) {
@@ -9771,30 +9771,30 @@ var Or = "propagation", Gy = new By(), Hy = (
9771
9771
  }, e.prototype.fields = function() {
9772
9772
  return this._getGlobalPropagator().fields();
9773
9773
  }, e.prototype.disable = function() {
9774
- An(Or, ht.instance());
9774
+ An($r, ht.instance());
9775
9775
  }, e.prototype._getGlobalPropagator = function() {
9776
- return Bt(Or) || Gy;
9776
+ return Bt($r) || Gy;
9777
9777
  }, e;
9778
9778
  })()
9779
9779
  );
9780
9780
  Hy.getInstance();
9781
- var Ar = "trace", Wy = (
9781
+ var Nr = "trace", Wy = (
9782
9782
  /** @class */
9783
9783
  (function() {
9784
9784
  function e() {
9785
- this._proxyTracerProvider = new Za(), this.wrapSpanContext = Ry, this.isSpanContextValid = tu, this.deleteSpan = Ey, this.getSpan = wo, this.getActiveSpan = Sy, this.getSpanContext = eu, this.setSpan = xo, this.setSpanContext = Cy;
9785
+ this._proxyTracerProvider = new Za(), this.wrapSpanContext = Ry, this.isSpanContextValid = tu, this.deleteSpan = Ey, this.getSpan = xo, this.getActiveSpan = Sy, this.getSpanContext = eu, this.setSpan = ko, this.setSpanContext = Cy;
9786
9786
  }
9787
9787
  return e.getInstance = function() {
9788
9788
  return this._instance || (this._instance = new e()), this._instance;
9789
9789
  }, e.prototype.setGlobalTracerProvider = function(t) {
9790
- var n = On(Ar, this._proxyTracerProvider, ht.instance());
9790
+ var n = On(Nr, this._proxyTracerProvider, ht.instance());
9791
9791
  return n && this._proxyTracerProvider.setDelegate(t), n;
9792
9792
  }, e.prototype.getTracerProvider = function() {
9793
- return Bt(Ar) || this._proxyTracerProvider;
9793
+ return Bt(Nr) || this._proxyTracerProvider;
9794
9794
  }, e.prototype.getTracer = function(t, n) {
9795
9795
  return this.getTracerProvider().getTracer(t, n);
9796
9796
  }, e.prototype.disable = function() {
9797
- An(Ar, ht.instance()), this._proxyTracerProvider = new Za();
9797
+ An(Nr, ht.instance()), this._proxyTracerProvider = new Za();
9798
9798
  }, e;
9799
9799
  })()
9800
9800
  ), Jy = Wy.getInstance(), Ky = Object.defineProperty, Yy = (e, t) => {
@@ -9887,7 +9887,7 @@ var fu = "AI_NoObjectGeneratedError", mu = `vercel.ai.error.${fu}`, iv = Symbol.
9887
9887
  }
9888
9888
  };
9889
9889
  _u = iv;
9890
- var gu = "AI_NoSuchToolError", yu = `vercel.ai.error.${gu}`, av = Symbol.for(yu), vu, Wr = class extends te {
9890
+ var gu = "AI_NoSuchToolError", yu = `vercel.ai.error.${gu}`, av = Symbol.for(yu), vu, Jr = class extends te {
9891
9891
  constructor({
9892
9892
  toolName: e,
9893
9893
  availableTools: t = void 0,
@@ -10044,7 +10044,7 @@ var fv = [
10044
10044
  ]
10045
10045
  }
10046
10046
  ], mv = (e) => {
10047
- const t = typeof e == "string" ? cr(e) : e, n = (t[6] & 127) << 21 | (t[7] & 127) << 14 | (t[8] & 127) << 7 | t[9] & 127;
10047
+ const t = typeof e == "string" ? dr(e) : e, n = (t[6] & 127) << 21 | (t[7] & 127) << 14 | (t[8] & 127) << 7 | t[9] & 127;
10048
10048
  return t.slice(n + 10);
10049
10049
  };
10050
10050
  function _v(e) {
@@ -10056,7 +10056,7 @@ function gv({
10056
10056
  data: e,
10057
10057
  signatures: t
10058
10058
  }) {
10059
- const n = _v(e), r = typeof n == "string" ? cr(
10059
+ const n = _v(e), r = typeof n == "string" ? dr(
10060
10060
  n.substring(0, Math.min(n.length, 24))
10061
10061
  ) : n;
10062
10062
  for (const o of t)
@@ -10076,14 +10076,14 @@ var Ou = "5.0.208", Au = async ({
10076
10076
  const i = qt(
10077
10077
  {},
10078
10078
  `ai-sdk/${Ou}`,
10079
- fo()
10079
+ mo()
10080
10080
  ), a = await Om({
10081
10081
  url: o,
10082
10082
  headers: i,
10083
10083
  abortSignal: n
10084
10084
  });
10085
10085
  if (!a.ok)
10086
- throw await ho(a), new qe({
10086
+ throw await fo(a), new qe({
10087
10087
  url: o,
10088
10088
  statusCode: a.status,
10089
10089
  statusText: a.statusText
@@ -10120,8 +10120,8 @@ function vv(e) {
10120
10120
  }
10121
10121
  var $u = ee([
10122
10122
  u(),
10123
- Hn(Uint8Array),
10124
- Hn(ArrayBuffer),
10123
+ Wn(Uint8Array),
10124
+ Wn(ArrayBuffer),
10125
10125
  Gf(
10126
10126
  // Buffer might not be available in some environments such as CloudFlare:
10127
10127
  (e) => {
@@ -10155,7 +10155,7 @@ function Nu(e) {
10155
10155
  return { data: e, mediaType: void 0 };
10156
10156
  }
10157
10157
  function bv(e) {
10158
- return typeof e == "string" ? e : e instanceof ArrayBuffer ? tr(new Uint8Array(e)) : tr(e);
10158
+ return typeof e == "string" ? e : e instanceof ArrayBuffer ? nr(new Uint8Array(e)) : nr(e);
10159
10159
  }
10160
10160
  async function wv({
10161
10161
  prompt: e,
@@ -10447,7 +10447,7 @@ function Sv({
10447
10447
  type: "function",
10448
10448
  name: o,
10449
10449
  description: i.description,
10450
- inputSchema: ur(i.inputSchema).jsonSchema,
10450
+ inputSchema: cr(i.inputSchema).jsonSchema,
10451
10451
  providerOptions: i.providerOptions
10452
10452
  };
10453
10453
  case "provider-defined":
@@ -10487,12 +10487,12 @@ var xn = yl(
10487
10487
  providerOptions: mt.optional()
10488
10488
  }), Ev = d({
10489
10489
  type: h("image"),
10490
- image: ee([$u, Hn(URL)]),
10490
+ image: ee([$u, Wn(URL)]),
10491
10491
  mediaType: u().optional(),
10492
10492
  providerOptions: mt.optional()
10493
10493
  }), Pu = d({
10494
10494
  type: h("file"),
10495
- data: ee([$u, Hn(URL)]),
10495
+ data: ee([$u, Wn(URL)]),
10496
10496
  filename: u().optional(),
10497
10497
  mediaType: u(),
10498
10498
  providerOptions: mt.optional()
@@ -10642,7 +10642,7 @@ async function zv({
10642
10642
  return { messages: r, system: t };
10643
10643
  }
10644
10644
  function Dv(e) {
10645
- if (!yo.isInstance(e))
10645
+ if (!vo.isInstance(e))
10646
10646
  return e;
10647
10647
  const t = (process == null ? void 0 : process.env.NODE_ENV) === "production", n = "https://v5.ai-sdk.dev/unauthenticated-ai-gateway";
10648
10648
  return t ? new te({
@@ -10661,7 +10661,7 @@ Learn more: \x1B[34m${n}\x1B[0m
10661
10661
  { name: "GatewayAuthenticationError" }
10662
10662
  );
10663
10663
  }
10664
- function Jr({
10664
+ function Kr({
10665
10665
  operationId: e,
10666
10666
  telemetry: t
10667
10667
  }) {
@@ -10752,7 +10752,7 @@ function Uv({
10752
10752
  } = {}) {
10753
10753
  return e ? t || Jy.getTracer("ai") : jv;
10754
10754
  }
10755
- function Kr({
10755
+ function Yr({
10756
10756
  name: e,
10757
10757
  tracer: t,
10758
10758
  attributes: n,
@@ -10779,9 +10779,9 @@ function zu(e, t) {
10779
10779
  message: t.message,
10780
10780
  stack: t.stack
10781
10781
  }), e.setStatus({
10782
- code: nr.ERROR,
10782
+ code: rr.ERROR,
10783
10783
  message: t.message
10784
- })) : e.setStatus({ code: nr.ERROR });
10784
+ })) : e.setStatus({ code: rr.ERROR });
10785
10785
  }
10786
10786
  function Jt({
10787
10787
  telemetry: e,
@@ -10956,11 +10956,11 @@ var Wv = class {
10956
10956
  }
10957
10957
  // lazy conversion with caching to avoid unnecessary conversion overhead:
10958
10958
  get base64() {
10959
- return this.base64Data == null && (this.base64Data = tr(this.uint8ArrayData)), this.base64Data;
10959
+ return this.base64Data == null && (this.base64Data = nr(this.uint8ArrayData)), this.base64Data;
10960
10960
  }
10961
10961
  // lazy conversion with caching to avoid unnecessary conversion overhead:
10962
10962
  get uint8Array() {
10963
- return this.uint8ArrayData == null && (this.uint8ArrayData = cr(this.base64Data)), this.uint8ArrayData;
10963
+ return this.uint8ArrayData == null && (this.uint8ArrayData = dr(this.base64Data)), this.uint8ArrayData;
10964
10964
  }
10965
10965
  };
10966
10966
  async function Jv({
@@ -10972,11 +10972,11 @@ async function Jv({
10972
10972
  }) {
10973
10973
  try {
10974
10974
  if (t == null)
10975
- throw new Wr({ toolName: e.toolName });
10975
+ throw new Jr({ toolName: e.toolName });
10976
10976
  try {
10977
10977
  return await qa({ toolCall: e, tools: t });
10978
10978
  } catch (i) {
10979
- if (n == null || !(Wr.isInstance(i) || hu.isInstance(i)))
10979
+ if (n == null || !(Jr.isInstance(i) || hu.isInstance(i)))
10980
10980
  throw i;
10981
10981
  let a = null;
10982
10982
  try {
@@ -10985,7 +10985,7 @@ async function Jv({
10985
10985
  tools: t,
10986
10986
  inputSchema: ({ toolName: s }) => {
10987
10987
  const { inputSchema: l } = t[s];
10988
- return ur(l).jsonSchema;
10988
+ return cr(l).jsonSchema;
10989
10989
  },
10990
10990
  system: r,
10991
10991
  messages: o,
@@ -11021,11 +11021,11 @@ async function qa({
11021
11021
  }) {
11022
11022
  const n = e.toolName, r = t[n];
11023
11023
  if (r == null)
11024
- throw new Wr({
11024
+ throw new Jr({
11025
11025
  toolName: e.toolName,
11026
11026
  availableTools: Object.keys(t)
11027
11027
  });
11028
- const o = ur(r.inputSchema), i = e.input.trim() === "" ? await gt({ value: {}, schema: o }) : await Ut({ text: e.input, schema: o });
11028
+ const o = cr(r.inputSchema), i = e.input.trim() === "" ? await gt({ value: {}, schema: o }) : await Ut({ text: e.input, schema: o });
11029
11029
  if (i.success === !1)
11030
11030
  throw new hu({
11031
11031
  toolName: n,
@@ -11112,7 +11112,7 @@ async function Xv({
11112
11112
  }) {
11113
11113
  return (await Promise.all(e.map((n) => n({ steps: t })))).some((n) => n);
11114
11114
  }
11115
- function $r({
11115
+ function Rr({
11116
11116
  output: e,
11117
11117
  tool: t,
11118
11118
  errorMode: n
@@ -11163,7 +11163,7 @@ function Qv({
11163
11163
  type: "tool-result",
11164
11164
  toolCallId: i.toolCallId,
11165
11165
  toolName: i.toolName,
11166
- output: $r({
11166
+ output: Rr({
11167
11167
  tool: t == null ? void 0 : t[i.toolName],
11168
11168
  output: i.output,
11169
11169
  errorMode: "none"
@@ -11176,7 +11176,7 @@ function Qv({
11176
11176
  type: "tool-result",
11177
11177
  toolCallId: i.toolCallId,
11178
11178
  toolName: i.toolName,
11179
- output: $r({
11179
+ output: Rr({
11180
11180
  tool: t == null ? void 0 : t[i.toolName],
11181
11181
  output: i.error,
11182
11182
  errorMode: "json"
@@ -11193,7 +11193,7 @@ function Qv({
11193
11193
  type: "tool-result",
11194
11194
  toolCallId: i.toolCallId,
11195
11195
  toolName: i.toolName,
11196
- output: $r({
11196
+ output: Rr({
11197
11197
  tool: t == null ? void 0 : t[i.toolName],
11198
11198
  output: i.type === "tool-result" ? i.output : i.error,
11199
11199
  errorMode: i.type === "tool-error" ? "text" : "none"
@@ -11256,12 +11256,12 @@ async function Zu({
11256
11256
  allowSystemInMessages: a
11257
11257
  }), Y = Uv(x);
11258
11258
  try {
11259
- return await Kr({
11259
+ return await Yr({
11260
11260
  name: "ai.generateText",
11261
11261
  attributes: Jt({
11262
11262
  telemetry: x,
11263
11263
  attributes: {
11264
- ...Jr({
11264
+ ...Kr({
11265
11265
  operationId: "ai.generateText",
11266
11266
  telemetry: x
11267
11267
  }),
@@ -11292,14 +11292,14 @@ async function Zu({
11292
11292
  messages: nt
11293
11293
  })), Mt = Ba(
11294
11294
  (ge = st == null ? void 0 : st.model) != null ? ge : Z
11295
- ), Co = await wv({
11295
+ ), Oo = await wv({
11296
11296
  prompt: {
11297
11297
  system: (Ce = st == null ? void 0 : st.system) != null ? Ce : be.system,
11298
11298
  messages: (le = st == null ? void 0 : st.messages) != null ? le : nt
11299
11299
  },
11300
11300
  supportedUrls: await Mt.supportedUrls,
11301
11301
  download: y
11302
- }), { toolChoice: hr, tools: fr } = Sv({
11302
+ }), { toolChoice: fr, tools: mr } = Sv({
11303
11303
  tools: t,
11304
11304
  toolChoice: (he = st == null ? void 0 : st.toolChoice) != null ? he : n,
11305
11305
  activeTools: (de = st == null ? void 0 : st.activeTools) != null ? de : E
@@ -11307,12 +11307,12 @@ async function Zu({
11307
11307
  C = await oe(
11308
11308
  () => {
11309
11309
  var Ie;
11310
- return Kr({
11310
+ return Yr({
11311
11311
  name: "ai.generateText.doGenerate",
11312
11312
  attributes: Jt({
11313
11313
  telemetry: x,
11314
11314
  attributes: {
11315
- ...Jr({
11315
+ ...Kr({
11316
11316
  operationId: "ai.generateText.doGenerate",
11317
11317
  telemetry: x
11318
11318
  }),
@@ -11322,14 +11322,14 @@ async function Zu({
11322
11322
  "ai.model.id": Mt.modelId,
11323
11323
  // prompt:
11324
11324
  "ai.prompt.messages": {
11325
- input: () => Bv(Co)
11325
+ input: () => Bv(Oo)
11326
11326
  },
11327
11327
  "ai.prompt.tools": {
11328
11328
  // convert the language model level tools:
11329
- input: () => fr == null ? void 0 : fr.map((zt) => JSON.stringify(zt))
11329
+ input: () => mr == null ? void 0 : mr.map((zt) => JSON.stringify(zt))
11330
11330
  },
11331
11331
  "ai.prompt.toolChoice": {
11332
- input: () => hr != null ? JSON.stringify(hr) : void 0
11332
+ input: () => fr != null ? JSON.stringify(fr) : void 0
11333
11333
  },
11334
11334
  // standardized gen-ai llm span attributes:
11335
11335
  "gen_ai.system": Mt.provider,
@@ -11345,22 +11345,22 @@ async function Zu({
11345
11345
  }),
11346
11346
  tracer: Y,
11347
11347
  fn: async (zt) => {
11348
- var $o, No, Ro, Po, Mo, zo, Do, Zo;
11348
+ var No, Ro, Po, Mo, zo, Do, Zo, jo;
11349
11349
  const Re = await Mt.doGenerate({
11350
11350
  ...ne,
11351
- tools: fr,
11352
- toolChoice: hr,
11351
+ tools: mr,
11352
+ toolChoice: fr,
11353
11353
  responseFormat: g == null ? void 0 : g.responseFormat,
11354
- prompt: Co,
11354
+ prompt: Oo,
11355
11355
  providerOptions: T,
11356
11356
  abortSignal: l,
11357
11357
  headers: F
11358
11358
  }), Ht = {
11359
- id: (No = ($o = Re.response) == null ? void 0 : $o.id) != null ? No : b(),
11360
- timestamp: (Po = (Ro = Re.response) == null ? void 0 : Ro.timestamp) != null ? Po : S(),
11361
- modelId: (zo = (Mo = Re.response) == null ? void 0 : Mo.modelId) != null ? zo : Mt.modelId,
11362
- headers: (Do = Re.response) == null ? void 0 : Do.headers,
11363
- body: (Zo = Re.response) == null ? void 0 : Zo.body
11359
+ id: (Ro = (No = Re.response) == null ? void 0 : No.id) != null ? Ro : b(),
11360
+ timestamp: (Mo = (Po = Re.response) == null ? void 0 : Po.timestamp) != null ? Mo : S(),
11361
+ modelId: (Do = (zo = Re.response) == null ? void 0 : zo.modelId) != null ? Do : Mt.modelId,
11362
+ headers: (Zo = Re.response) == null ? void 0 : Zo.headers,
11363
+ body: (jo = Re.response) == null ? void 0 : jo.body
11364
11364
  };
11365
11365
  return zt.setAttributes(
11366
11366
  Jt({
@@ -11372,8 +11372,8 @@ async function Zu({
11372
11372
  },
11373
11373
  "ai.response.toolCalls": {
11374
11374
  output: () => {
11375
- const jo = Ha(Re.content);
11376
- return jo == null ? void 0 : JSON.stringify(jo);
11375
+ const Lo = Ha(Re.content);
11376
+ return Lo == null ? void 0 : JSON.stringify(Lo);
11377
11377
  }
11378
11378
  },
11379
11379
  "ai.response.id": Ht.id,
@@ -11451,19 +11451,19 @@ async function Zu({
11451
11451
  experimental_context: $
11452
11452
  })
11453
11453
  );
11454
- const Oo = rb({
11454
+ const Ao = rb({
11455
11455
  content: C.content,
11456
11456
  toolCalls: Nn,
11457
11457
  toolOutputs: re
11458
11458
  });
11459
11459
  w.push(
11460
11460
  ...Qv({
11461
- content: Oo,
11461
+ content: Ao,
11462
11462
  tools: t
11463
11463
  })
11464
11464
  );
11465
- const Ao = new Kv({
11466
- content: Oo,
11465
+ const $o = new Kv({
11466
+ content: Ao,
11467
11467
  finishReason: C.finishReason,
11468
11468
  usage: C.usage,
11469
11469
  warnings: C.warnings,
@@ -11475,7 +11475,7 @@ async function Zu({
11475
11475
  messages: structuredClone(w)
11476
11476
  }
11477
11477
  });
11478
- nv((A = C.warnings) != null ? A : []), ie.push(Ao), await (m == null ? void 0 : m(Ao));
11478
+ nv((A = C.warnings) != null ? A : []), ie.push($o), await (m == null ? void 0 : m($o));
11479
11479
  } while (
11480
11480
  // there are tool calls:
11481
11481
  H.length > 0 && // all current tool calls have outputs (incl. execution errors):
@@ -11537,12 +11537,12 @@ async function tb({
11537
11537
  e.map(async ({ toolCallId: l, toolName: c, input: p }) => {
11538
11538
  const g = t[c];
11539
11539
  if ((g == null ? void 0 : g.execute) != null)
11540
- return Kr({
11540
+ return Yr({
11541
11541
  name: "ai.toolCall",
11542
11542
  attributes: Jt({
11543
11543
  telemetry: r,
11544
11544
  attributes: {
11545
- ...Jr({
11545
+ ...Kr({
11546
11546
  operationId: "ai.toolCall",
11547
11547
  telemetry: r
11548
11548
  }),
@@ -12043,7 +12043,7 @@ var lb = () => ({
12043
12043
  }), ub = ({
12044
12044
  schema: e
12045
12045
  }) => {
12046
- const t = ur(e);
12046
+ const t = cr(e);
12047
12047
  return {
12048
12048
  type: "object",
12049
12049
  responseFormat: {
@@ -12312,7 +12312,7 @@ var lb = () => ({
12312
12312
  stop_reason: u().nullish(),
12313
12313
  stop_sequence: u().nullish(),
12314
12314
  stop_details: ju.nullish(),
12315
- usage: Dr({
12315
+ usage: Zr({
12316
12316
  input_tokens: f(),
12317
12317
  output_tokens: f(),
12318
12318
  cache_creation_input_tokens: f().nullish(),
@@ -12373,7 +12373,7 @@ var lb = () => ({
12373
12373
  message: d({
12374
12374
  id: u().nullish(),
12375
12375
  model: u().nullish(),
12376
- usage: Dr({
12376
+ usage: Zr({
12377
12377
  input_tokens: f(),
12378
12378
  cache_creation_input_tokens: f().nullish(),
12379
12379
  cache_read_input_tokens: f().nullish()
@@ -12628,7 +12628,7 @@ var lb = () => ({
12628
12628
  ).nullish()
12629
12629
  }).nullish()
12630
12630
  }),
12631
- usage: Dr({
12631
+ usage: Zr({
12632
12632
  input_tokens: f().nullish(),
12633
12633
  output_tokens: f(),
12634
12634
  cache_creation_input_tokens: f().nullish(),
@@ -12902,7 +12902,7 @@ function _b(e) {
12902
12902
  const n = e == null ? void 0 : e.anthropic;
12903
12903
  return (t = n == null ? void 0 : n.cacheControl) != null ? t : n == null ? void 0 : n.cache_control;
12904
12904
  }
12905
- var Io = class {
12905
+ var To = class {
12906
12906
  constructor() {
12907
12907
  this.breakpointCount = 0, this.warnings = [];
12908
12908
  }
@@ -13046,7 +13046,7 @@ async function Ob({
13046
13046
  }) {
13047
13047
  var o;
13048
13048
  e = e != null && e.length ? e : void 0;
13049
- const i = [], a = /* @__PURE__ */ new Set(), s = r || new Io();
13049
+ const i = [], a = /* @__PURE__ */ new Set(), s = r || new To();
13050
13050
  if (e == null)
13051
13051
  return { tools: void 0, toolChoice: void 0, toolWarnings: i, betas: a };
13052
13052
  const l = [];
@@ -13386,7 +13386,7 @@ async function Db({
13386
13386
  cacheControlValidator: r
13387
13387
  }) {
13388
13388
  var o, i, a, s, l, c;
13389
- const p = /* @__PURE__ */ new Set(), g = Zb(e), x = r || new Io();
13389
+ const p = /* @__PURE__ */ new Set(), g = Zb(e), x = r || new To();
13390
13390
  let T;
13391
13391
  const I = [];
13392
13392
  async function E(_) {
@@ -14069,7 +14069,7 @@ var qb = class {
14069
14069
  name: "json",
14070
14070
  description: "Respond with a JSON object.",
14071
14071
  inputSchema: c.schema
14072
- } : void 0, W = new Io(), { prompt: be, betas: Y } = await Db({
14072
+ } : void 0, W = new To(), { prompt: be, betas: Y } = await Db({
14073
14073
  prompt: t,
14074
14074
  sendReasoning: (E = m == null ? void 0 : m.sendReasoning) != null ? E : !0,
14075
14075
  warnings: S,
@@ -15334,11 +15334,11 @@ var Hb = K(
15334
15334
  "wait",
15335
15335
  "screenshot"
15336
15336
  ]),
15337
- coordinate: Zr([f().int(), f().int()]).optional(),
15337
+ coordinate: jr([f().int(), f().int()]).optional(),
15338
15338
  duration: f().optional(),
15339
15339
  scroll_amount: f().optional(),
15340
15340
  scroll_direction: X(["up", "down", "left", "right"]).optional(),
15341
- start_coordinate: Zr([f().int(), f().int()]).optional(),
15341
+ start_coordinate: jr([f().int(), f().int()]).optional(),
15342
15342
  text: u().optional()
15343
15343
  })
15344
15344
  )
@@ -15352,7 +15352,7 @@ var Hb = K(
15352
15352
  d({
15353
15353
  command: h("view"),
15354
15354
  path: u(),
15355
- view_range: Zr([f(), f()]).optional()
15355
+ view_range: jr([f(), f()]).optional()
15356
15356
  }),
15357
15357
  d({
15358
15358
  command: h("create"),
@@ -15599,7 +15599,7 @@ var Hb = K(
15599
15599
  };
15600
15600
  function Gu(e = {}) {
15601
15601
  var t, n;
15602
- const r = (t = go(
15602
+ const r = (t = yo(
15603
15603
  Zt({
15604
15604
  settingValue: e.baseURL,
15605
15605
  environmentVariableName: "ANTHROPIC_BASE_URL"
@@ -15641,7 +15641,7 @@ function Gu(e = {}) {
15641
15641
  }, s.tools = hw, s;
15642
15642
  }
15643
15643
  Gu();
15644
- var To = d({
15644
+ var So = d({
15645
15645
  error: d({
15646
15646
  message: u(),
15647
15647
  // The additional information below is handled loosely to support
@@ -15652,7 +15652,7 @@ var To = d({
15652
15652
  code: ee([u(), f()]).nullish()
15653
15653
  })
15654
15654
  }), ft = pt({
15655
- errorSchema: To,
15655
+ errorSchema: So,
15656
15656
  errorToMessage: (e) => e.error.message
15657
15657
  });
15658
15658
  function Hu(e) {
@@ -15828,7 +15828,7 @@ function fw({
15828
15828
  }
15829
15829
  return { messages: n, warnings: r };
15830
15830
  }
15831
- function Nr({
15831
+ function Pr({
15832
15832
  id: e,
15833
15833
  model: t,
15834
15834
  created: n
@@ -15987,7 +15987,7 @@ var mw = Ee(
15987
15987
  }).nullish()
15988
15988
  }).nullish()
15989
15989
  }),
15990
- To
15990
+ So
15991
15991
  ])
15992
15992
  )
15993
15993
  ), gw = Ee(
@@ -16339,7 +16339,7 @@ var vw = class {
16339
16339
  },
16340
16340
  request: { body: E },
16341
16341
  response: {
16342
- ...Nr(v),
16342
+ ...Pr(v),
16343
16343
  headers: _,
16344
16344
  body: y
16345
16345
  },
@@ -16394,10 +16394,10 @@ var vw = class {
16394
16394
  return;
16395
16395
  }
16396
16396
  if (!c) {
16397
- const A = Nr(he);
16397
+ const A = Pr(he);
16398
16398
  Object.values(A).some(Boolean) && (c = !0, T.enqueue({
16399
16399
  type: "response-metadata",
16400
- ...Nr(he)
16400
+ ...Pr(he)
16401
16401
  }));
16402
16402
  }
16403
16403
  he.usage != null && (l.inputTokens = (I = he.usage.prompt_tokens) != null ? I : void 0, l.outputTokens = (E = he.usage.completion_tokens) != null ? E : void 0, l.totalTokens = (k = he.usage.total_tokens) != null ? k : void 0, l.reasoningTokens = (v = (_ = he.usage.completion_tokens_details) == null ? void 0 : _.reasoning_tokens) != null ? v : void 0, l.cachedInputTokens = ($ = (y = he.usage.prompt_tokens_details) == null ? void 0 : y.cached_tokens) != null ? $ : void 0, ((b = he.usage.completion_tokens_details) == null ? void 0 : b.accepted_prediction_tokens) != null && (g.openai.acceptedPredictionTokens = (S = he.usage.completion_tokens_details) == null ? void 0 : S.accepted_prediction_tokens), ((m = he.usage.completion_tokens_details) == null ? void 0 : m.rejected_prediction_tokens) != null && (g.openai.rejectedPredictionTokens = (N = he.usage.completion_tokens_details) == null ? void 0 : N.rejected_prediction_tokens));
@@ -16414,17 +16414,17 @@ var vw = class {
16414
16414
  const ne = A.index;
16415
16415
  if (a[ne] == null) {
16416
16416
  if (A.type != null && A.type !== "function")
16417
- throw new mr({
16417
+ throw new gr({
16418
16418
  data: A,
16419
16419
  message: "Expected 'function' type."
16420
16420
  });
16421
16421
  if (A.id == null)
16422
- throw new mr({
16422
+ throw new gr({
16423
16423
  data: A,
16424
16424
  message: "Expected 'id' to be a string."
16425
16425
  });
16426
16426
  if (((B = A.function) == null ? void 0 : B.name) == null)
16427
- throw new mr({
16427
+ throw new gr({
16428
16428
  data: A,
16429
16429
  message: "Expected 'function.name' to be a string."
16430
16430
  });
@@ -16634,7 +16634,7 @@ var ww = Ee(
16634
16634
  total_tokens: f()
16635
16635
  }).nullish()
16636
16636
  }),
16637
- To
16637
+ So
16638
16638
  ])
16639
16639
  )
16640
16640
  ), rs = Ee(
@@ -19465,7 +19465,7 @@ var b0 = Ee(
19465
19465
  provider: "openai",
19466
19466
  providerOptions: n,
19467
19467
  schema: k0
19468
- }), i = new FormData(), a = e instanceof Uint8Array ? new Blob([e]) : new Blob([cr(e)]);
19468
+ }), i = new FormData(), a = e instanceof Uint8Array ? new Blob([e]) : new Blob([dr(e)]);
19469
19469
  i.append("model", this.modelId);
19470
19470
  const s = Pm(t);
19471
19471
  if (i.append(
@@ -19542,9 +19542,9 @@ var b0 = Ee(
19542
19542
  };
19543
19543
  }
19544
19544
  }, T0 = "2.0.110";
19545
- function Un(e = {}) {
19545
+ function Bn(e = {}) {
19546
19546
  var t, n;
19547
- const r = (t = go(
19547
+ const r = (t = yo(
19548
19548
  Zt({
19549
19549
  settingValue: e.baseURL,
19550
19550
  environmentVariableName: "OPENAI_BASE_URL"
@@ -19608,7 +19608,7 @@ function Un(e = {}) {
19608
19608
  };
19609
19609
  return I.languageModel = x, I.chat = a, I.completion = s, I.responses = T, I.embedding = l, I.textEmbedding = l, I.textEmbeddingModel = l, I.image = c, I.imageModel = c, I.transcription = p, I.transcriptionModel = p, I.speech = g, I.speechModel = g, I.tools = r0, I;
19610
19610
  }
19611
- Un();
19611
+ Bn();
19612
19612
  const Qu = {
19613
19613
  "anthropic-dangerous-direct-browser-access": "true"
19614
19614
  };
@@ -19649,7 +19649,7 @@ function tc(e) {
19649
19649
  apiKey: e.apiKey,
19650
19650
  baseURL: t,
19651
19651
  headers: Qu
19652
- })(e.model) : e.protocol === "openai-responses" ? Un({ apiKey: e.apiKey, baseURL: t }).responses(e.model) : e.kind === "builtin" && e.provider === "openai" ? Un({ apiKey: e.apiKey, baseURL: t }).chat(e.model) : Un({
19652
+ })(e.model) : e.protocol === "openai-responses" ? Bn({ apiKey: e.apiKey, baseURL: t }).responses(e.model) : e.kind === "builtin" && e.provider === "openai" ? Bn({ apiKey: e.apiKey, baseURL: t }).chat(e.model) : Bn({
19653
19653
  apiKey: e.apiKey,
19654
19654
  baseURL: t,
19655
19655
  fetch: S0()
@@ -19756,7 +19756,7 @@ function oc(e) {
19756
19756
  var t;
19757
19757
  return ((t = e.name) == null ? void 0 : t.trim()) || e.id;
19758
19758
  }
19759
- const N0 = 1, ic = "cad-agent-plugin-api-key-v1", Yr = 12, Xr = `enc:v${N0}:`;
19759
+ const N0 = 1, ic = "cad-agent-plugin-api-key-v1", Xr = 12, Qr = `enc:v${N0}:`;
19760
19760
  function R0() {
19761
19761
  var t;
19762
19762
  return `${typeof ((t = globalThis.location) == null ? void 0 : t.origin) == "string" ? globalThis.location.origin : "file://"}:${ic}`;
@@ -19797,22 +19797,22 @@ function M0(e) {
19797
19797
  async function z0(e) {
19798
19798
  if (!e)
19799
19799
  return "";
19800
- const t = await ac(), n = crypto.getRandomValues(new Uint8Array(Yr)), r = new TextEncoder().encode(e), o = await crypto.subtle.encrypt(
19800
+ const t = await ac(), n = crypto.getRandomValues(new Uint8Array(Xr)), r = new TextEncoder().encode(e), o = await crypto.subtle.encrypt(
19801
19801
  { name: "AES-GCM", iv: n },
19802
19802
  t,
19803
19803
  r
19804
19804
  ), i = new Uint8Array(n.length + o.byteLength);
19805
- return i.set(n, 0), i.set(new Uint8Array(o), n.length), `${Xr}${P0(i)}`;
19805
+ return i.set(n, 0), i.set(new Uint8Array(o), n.length), `${Qr}${P0(i)}`;
19806
19806
  }
19807
19807
  async function sc(e) {
19808
19808
  if (!e)
19809
19809
  return "";
19810
- if (!e.startsWith(Xr))
19810
+ if (!e.startsWith(Qr))
19811
19811
  return e;
19812
19812
  try {
19813
19813
  const t = await ac(), n = M0(
19814
- e.slice(Xr.length)
19815
- ), r = n.slice(0, Yr), o = n.slice(Yr), i = await crypto.subtle.decrypt(
19814
+ e.slice(Qr.length)
19815
+ ), r = n.slice(0, Xr), o = n.slice(Xr), i = await crypto.subtle.decrypt(
19816
19816
  { name: "AES-GCM", iv: r },
19817
19817
  t,
19818
19818
  o
@@ -19822,12 +19822,12 @@ async function sc(e) {
19822
19822
  return "";
19823
19823
  }
19824
19824
  }
19825
- const lc = "cad-agent-plugin.llm-config", D0 = "cad-agent-plugin.llm-settings", rr = "deepseek", uc = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
19826
- function Bn() {
19825
+ const lc = "cad-agent-plugin.llm-config", D0 = "cad-agent-plugin.llm-settings", or = "deepseek", uc = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
19826
+ function Fn() {
19827
19827
  return {
19828
19828
  providers: [],
19829
- activeProviderId: rr,
19830
- activeModel: rn[rr].models[0].id
19829
+ activeProviderId: or,
19830
+ activeModel: rn[or].models[0].id
19831
19831
  };
19832
19832
  }
19833
19833
  function Ft(e) {
@@ -19840,7 +19840,7 @@ function Ft(e) {
19840
19840
  models: null
19841
19841
  };
19842
19842
  }
19843
- function Qr() {
19843
+ function eo() {
19844
19844
  return {
19845
19845
  id: "",
19846
19846
  kind: "custom",
@@ -19858,18 +19858,18 @@ function on(e, t) {
19858
19858
  function Rt(e) {
19859
19859
  return e.models ? e.models : e.kind === "builtin" && at(e.id) ? rn[e.id].models : [];
19860
19860
  }
19861
- function or(e) {
19861
+ function ir(e) {
19862
19862
  const t = e.baseUrl.trim();
19863
19863
  return t || (e.kind === "builtin" && at(e.id) ? rn[e.id].baseUrl : "");
19864
19864
  }
19865
19865
  function cc(e) {
19866
- const t = on(e, e.activeProviderId) ?? Ft(rr);
19866
+ const t = on(e, e.activeProviderId) ?? Ft(or);
19867
19867
  return {
19868
19868
  provider: t.id,
19869
19869
  kind: t.kind,
19870
19870
  protocol: t.protocol,
19871
19871
  apiKey: t.apiKey,
19872
- baseUrl: or(t),
19872
+ baseUrl: ir(t),
19873
19873
  model: e.activeModel
19874
19874
  };
19875
19875
  }
@@ -19879,7 +19879,7 @@ function dc(e) {
19879
19879
  ) : void 0;
19880
19880
  return n ? n.vision : kn(e.activeModel);
19881
19881
  }
19882
- function So(e) {
19882
+ function Eo(e) {
19883
19883
  const t = cc(e);
19884
19884
  if (t.apiKey.trim() && dc(e))
19885
19885
  return t;
@@ -19915,7 +19915,7 @@ function hc(e, t) {
19915
19915
  kind: e.kind,
19916
19916
  protocol: e.protocol,
19917
19917
  apiKey: e.apiKey,
19918
- baseUrl: or(e),
19918
+ baseUrl: ir(e),
19919
19919
  model: t
19920
19920
  };
19921
19921
  }
@@ -19956,10 +19956,10 @@ function U0(e) {
19956
19956
  };
19957
19957
  }
19958
19958
  const o = (s = e.model) == null ? void 0 : s.trim();
19959
- return r !== "openai-compatible" || !o ? Bn() : {
19959
+ return r !== "openai-compatible" || !o ? Fn() : {
19960
19960
  providers: [
19961
19961
  {
19962
- ...Qr(),
19962
+ ...eo(),
19963
19963
  id: r,
19964
19964
  baseUrl: n,
19965
19965
  apiKey: t,
@@ -20009,7 +20009,7 @@ function ds(e) {
20009
20009
  function fc(e) {
20010
20010
  var n;
20011
20011
  if (on(e, e.activeProviderId)) return e;
20012
- const t = e.providers.find((r) => r.apiKey.trim()) ?? Ft(rr);
20012
+ const t = e.providers.find((r) => r.apiKey.trim()) ?? Ft(or);
20013
20013
  return {
20014
20014
  ...e,
20015
20015
  activeProviderId: t.id,
@@ -20025,21 +20025,21 @@ async function $n() {
20025
20025
  const e = localStorage.getItem(lc);
20026
20026
  if (!e) {
20027
20027
  const o = localStorage.getItem(D0);
20028
- return o ? U0(await F0(o)) : Bn();
20028
+ return o ? U0(await F0(o)) : Fn();
20029
20029
  }
20030
20030
  const t = JSON.parse(e), n = [];
20031
20031
  for (const o of t.providers ?? []) {
20032
20032
  const i = o.apiKeyEnc ? await sc(o.apiKeyEnc) : "", a = B0(o, i);
20033
20033
  a && !n.some((s) => s.id === a.id) && n.push(a);
20034
20034
  }
20035
- const r = Bn();
20035
+ const r = Fn();
20036
20036
  return fc({
20037
20037
  providers: n,
20038
20038
  activeProviderId: t.activeProviderId ?? r.activeProviderId,
20039
20039
  activeModel: t.activeModel ?? r.activeModel
20040
20040
  });
20041
20041
  } catch {
20042
- return Bn();
20042
+ return Fn();
20043
20043
  }
20044
20044
  }
20045
20045
  async function ps(e) {
@@ -20059,20 +20059,20 @@ async function ps(e) {
20059
20059
  activeProviderId: e.activeProviderId,
20060
20060
  activeModel: e.activeModel
20061
20061
  };
20062
- localStorage.setItem(lc, JSON.stringify(n)), to.dispatchEvent(
20063
- new CustomEvent(eo, { detail: e })
20062
+ localStorage.setItem(lc, JSON.stringify(n)), no.dispatchEvent(
20063
+ new CustomEvent(to, { detail: e })
20064
20064
  );
20065
20065
  }
20066
- const eo = "change", to = new EventTarget();
20066
+ const to = "change", no = new EventTarget();
20067
20067
  function V0(e) {
20068
20068
  const t = (n) => e(n.detail);
20069
- return to.addEventListener(eo, t), () => to.removeEventListener(eo, t);
20069
+ return no.addEventListener(to, t), () => no.removeEventListener(to, t);
20070
20070
  }
20071
20071
  async function wx() {
20072
20072
  const e = await $n();
20073
20073
  return {
20074
20074
  configured: e.providers.some((t) => t.apiKey.trim()),
20075
- vision: !!So(e)
20075
+ vision: !!Eo(e)
20076
20076
  };
20077
20077
  }
20078
20078
  const q0 = `You read text from images of CAD drawings.
@@ -20213,7 +20213,7 @@ function gc(e, t) {
20213
20213
  e,
20214
20214
  t.providerId,
20215
20215
  t.modelId
20216
- ) : pc(e, t.providerId) : So(e);
20216
+ ) : pc(e, t.providerId) : Eo(e);
20217
20217
  }
20218
20218
  const K0 = {
20219
20219
  deepseek: "providerDeepseek",
@@ -20224,11 +20224,11 @@ const K0 = {
20224
20224
  function yc(e) {
20225
20225
  return j(K0[e]);
20226
20226
  }
20227
- function Eo(e) {
20227
+ function Co(e) {
20228
20228
  var t;
20229
20229
  return e.kind === "builtin" && at(e.id) ? yc(e.id) : ((t = e.displayName) == null ? void 0 : t.trim()) || e.id;
20230
20230
  }
20231
- const Rr = /* @__PURE__ */ new Set();
20231
+ const jn = /* @__PURE__ */ new Map();
20232
20232
  let _s, un;
20233
20233
  async function Y0() {
20234
20234
  return un || (un = X0().finally(() => {
@@ -20244,41 +20244,44 @@ async function X0() {
20244
20244
  const e = await $n(), t = /* @__PURE__ */ new Set();
20245
20245
  for (const n of e.providers) {
20246
20246
  if (!n.apiKey.trim()) continue;
20247
- const r = Eo(n);
20247
+ const r = Co(n);
20248
20248
  for (const o of Q0(n)) {
20249
20249
  const i = kc(n.id, o.id);
20250
20250
  t.add(i);
20251
- const a = oc(o), s = () => `${r} — ${a}`;
20252
- Lo.register({
20251
+ const a = oc(o), s = `${r} — ${a}`;
20252
+ if (jn.get(i) === s && _r.has(i))
20253
+ continue;
20254
+ const l = () => s;
20255
+ _r.register({
20253
20256
  id: i,
20254
- label: s,
20257
+ label: l,
20255
20258
  keyword: () => ({
20256
- display: s(),
20257
- local: s(),
20259
+ display: l(),
20260
+ local: l(),
20258
20261
  // Stable English slug for `-pdfimport` keywords.
20259
20262
  global: `${n.id}/${o.id}`
20260
20263
  }),
20261
20264
  // Picker-only: `pdftext` keeps using the bootstrap `cad-llm` auto entry.
20262
20265
  auto: !1,
20263
20266
  isAvailable: () => !0,
20264
- recognize: (l) => J0(l, {
20267
+ recognize: (c) => J0(c, {
20265
20268
  providerId: n.id,
20266
20269
  modelId: o.id
20267
20270
  }),
20268
- recognizeBatch: (l) => H0(l, {
20271
+ recognizeBatch: (c) => H0(c, {
20269
20272
  providerId: n.id,
20270
20273
  modelId: o.id
20271
20274
  })
20272
- }), Rr.add(i);
20275
+ }), jn.set(i, s);
20273
20276
  }
20274
20277
  }
20275
- for (const n of [...Rr])
20276
- t.has(n) || (Lo.unregister(n), Rr.delete(n));
20278
+ for (const n of [...jn.keys()])
20279
+ t.has(n) || (_r.unregister(n), jn.delete(n));
20277
20280
  }
20278
20281
  function Q0(e) {
20279
20282
  return Rt(e).filter((t) => t.vision);
20280
20283
  }
20281
- const ex = "1.8.0-preview.6", tx = {
20284
+ const ex = "1.8.0", tx = {
20282
20285
  version: ex
20283
20286
  };
20284
20287
  class fn extends Error {
@@ -20357,7 +20360,7 @@ function ux(e) {
20357
20360
  return o === t && n && !a.some((s) => s.id === n) && a.push({ id: n, vision: !1 }), [
20358
20361
  {
20359
20362
  providerId: o,
20360
- label: Eo(i),
20363
+ label: Co(i),
20361
20364
  options: a.map((s) => ({
20362
20365
  providerId: o,
20363
20366
  modelId: s.id,
@@ -20788,7 +20791,7 @@ const cx = `
20788
20791
  "openai-chat": "protocolOpenaiChat",
20789
20792
  "openai-responses": "protocolOpenaiResponses",
20790
20793
  "anthropic-messages": "protocolAnthropicMessages"
20791
- }, jn = `
20794
+ }, Ln = `
20792
20795
  `, px = "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z", hx = "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z", fx = "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z";
20793
20796
  function ys(e) {
20794
20797
  return {
@@ -20825,7 +20828,7 @@ function J(e, t = "", n) {
20825
20828
  const r = document.createElement(e);
20826
20829
  return t && (r.className = t), n !== void 0 && (r.textContent = n), r;
20827
20830
  }
20828
- function Pr(e, t = "") {
20831
+ function Mr(e, t = "") {
20829
20832
  const n = "http://www.w3.org/2000/svg", r = document.createElementNS(n, "svg");
20830
20833
  r.setAttribute("viewBox", "0 0 24 24"), r.setAttribute("aria-hidden", "true"), t && r.setAttribute("class", t);
20831
20834
  const o = document.createElementNS(n, "path");
@@ -20895,7 +20898,7 @@ const je = class je extends bc {
20895
20898
  }
20896
20899
  loadCustom(t) {
20897
20900
  const n = t ? this.storedProvider(t) : void 0;
20898
- return ys(n ?? Qr());
20901
+ return ys(n ?? eo());
20899
20902
  }
20900
20903
  get draft() {
20901
20904
  return this.mode === "builtin" ? this.builtinDraft : this.customDraft;
@@ -20905,7 +20908,7 @@ const je = class je extends bc {
20905
20908
  }
20906
20909
  /** Whether the provider being edited differs from its saved copy. */
20907
20910
  isDirty() {
20908
- const t = this.mode === "builtin" ? this.storedProvider(this.builtinId) ?? Ft(this.builtinId) : this.storedProvider(this.customId) ?? Qr();
20911
+ const t = this.mode === "builtin" ? this.storedProvider(this.builtinId) ?? Ft(this.builtinId) : this.storedProvider(this.customId) ?? eo();
20909
20912
  return !lx(this.draft, t);
20910
20913
  }
20911
20914
  displayModels() {
@@ -20916,7 +20919,7 @@ const je = class je extends bc {
20916
20919
  this.draft.models = t;
20917
20920
  }
20918
20921
  fetchBlockedReason() {
20919
- return or(this.draft) ? this.draft.apiKey.trim() ? "" : j("fetchNeedsKey") : j("fetchNeedsBaseUrl");
20922
+ return ir(this.draft) ? this.draft.apiKey.trim() ? "" : j("fetchNeedsKey") : j("fetchNeedsBaseUrl");
20920
20923
  }
20921
20924
  providerIdError() {
20922
20925
  if (!this.isNewCustom()) return "";
@@ -20989,15 +20992,15 @@ const je = class je extends bc {
20989
20992
  a.label = i.label;
20990
20993
  for (const s of i.options) {
20991
20994
  const l = J("option", "", s.label);
20992
- l.value = `${s.providerId}${jn}${s.modelId}`, a.appendChild(l);
20995
+ l.value = `${s.providerId}${Ln}${s.modelId}`, a.appendChild(l);
20993
20996
  }
20994
20997
  n.appendChild(a);
20995
20998
  }
20996
- return n.value = `${this.config.activeProviderId}${jn}${this.config.activeModel}`, n.addEventListener("change", () => {
20999
+ return n.value = `${this.config.activeProviderId}${Ln}${this.config.activeModel}`, n.addEventListener("change", () => {
20997
21000
  this.selectActiveModel(n.value);
20998
21001
  }), t.appendChild(lt(j("activeModel"), n)), this.config.providers.some(
20999
21002
  (i) => i.apiKey.trim()
21000
- ) ? So(this.config) || t.appendChild(J("p", "ml-llm-warning", j("visionMissing"))) : t.appendChild(J("p", "ml-llm-warning", j("activeModelNone"))), t.appendChild(J("p", "ml-llm-hint", j("activeModelHint"))), t;
21003
+ ) ? Eo(this.config) || t.appendChild(J("p", "ml-llm-warning", j("visionMissing"))) : t.appendChild(J("p", "ml-llm-warning", j("activeModelNone"))), t.appendChild(J("p", "ml-llm-hint", j("activeModelHint"))), t;
21001
21004
  }
21002
21005
  renderEditor() {
21003
21006
  const t = J("div", "ml-llm-segmented");
@@ -21057,7 +21060,7 @@ const je = class je extends bc {
21057
21060
  this.showAdvanced = !this.showAdvanced, this.render();
21058
21061
  });
21059
21062
  i.setAttribute("aria-expanded", String(this.showAdvanced)), i.append(
21060
- Pr(
21063
+ Mr(
21061
21064
  px,
21062
21065
  `ml-llm-disclosure-icon${this.showAdvanced ? " is-open" : ""}`
21063
21066
  ),
@@ -21095,7 +21098,7 @@ const je = class je extends bc {
21095
21098
  if (r.length) {
21096
21099
  const l = J("select");
21097
21100
  for (const p of r) {
21098
- const g = J("option", "", Eo(p));
21101
+ const g = J("option", "", Co(p));
21099
21102
  g.value = p.id, l.appendChild(g);
21100
21103
  }
21101
21104
  const c = J("option", "", j("newCustomProvider"));
@@ -21212,7 +21215,7 @@ const je = class je extends bc {
21212
21215
  this.displayModels().filter((p, g) => g !== o).map((p) => ({ ...p }))
21213
21216
  ), this.statusMessage = "", this.render();
21214
21217
  });
21215
- c.title = j("removeModel"), c.setAttribute("aria-label", `${j("removeModel")} ${o + 1}`), c.appendChild(Pr(hx)), i.append(s, l, c), n.appendChild(i);
21218
+ c.title = j("removeModel"), c.setAttribute("aria-label", `${j("removeModel")} ${o + 1}`), c.appendChild(Mr(hx)), i.append(s, l, c), n.appendChild(i);
21216
21219
  }), [n, this.renderAddModelButton()];
21217
21220
  }
21218
21221
  renderAddModelButton() {
@@ -21229,7 +21232,7 @@ const je = class je extends bc {
21229
21232
  (r = n[n.length - 1]) == null || r.focus();
21230
21233
  }
21231
21234
  );
21232
- return t.append(Pr(fx), document.createTextNode(j("addModel"))), t;
21235
+ return t.append(Mr(fx), document.createTextNode(j("addModel"))), t;
21233
21236
  }
21234
21237
  updateModel(t, n) {
21235
21238
  this.setModels(
@@ -21372,7 +21375,7 @@ const je = class je extends bc {
21372
21375
  const r = await ax(
21373
21376
  {
21374
21377
  protocol: this.draft.protocol,
21375
- baseUrl: or(this.draft),
21378
+ baseUrl: ir(this.draft),
21376
21379
  apiKey: this.draft.apiKey
21377
21380
  },
21378
21381
  void 0,
@@ -21452,9 +21455,9 @@ const je = class je extends bc {
21452
21455
  this.customId = ((r = n.providers.find((o) => o.kind === "custom")) == null ? void 0 : r.id) ?? "", await this.commit(n);
21453
21456
  }
21454
21457
  async selectActiveModel(t) {
21455
- const n = t.indexOf(jn);
21458
+ const n = t.indexOf(Ln);
21456
21459
  if (n < 0) return;
21457
- const r = t.slice(0, n), o = t.slice(n + jn.length);
21460
+ const r = t.slice(0, n), o = t.slice(n + Ln.length);
21458
21461
  r === this.config.activeProviderId && o === this.config.activeModel || (this.config = { ...this.config, activeProviderId: r, activeModel: o }, await ps(this.config), this.statusMessage = j("saved"), this.render());
21459
21462
  }
21460
21463
  /** Injects the dialog styles once per document. */
@@ -21465,7 +21468,7 @@ const je = class je extends bc {
21465
21468
  }
21466
21469
  };
21467
21470
  je.settingsStyleId = "ml-llm-settings-styles", je.openInstance = null;
21468
- let no = je;
21471
+ let ro = je;
21469
21472
  class _x extends wc {
21470
21473
  constructor() {
21471
21474
  super(...arguments), this.recordsUndoStack = !1;
@@ -21477,7 +21480,7 @@ class _x extends wc {
21477
21480
  */
21478
21481
  async execute(t) {
21479
21482
  var n;
21480
- await no.open({
21483
+ await ro.open({
21481
21484
  host: ((n = t.view) == null ? void 0 : n.container) ?? document.body
21482
21485
  });
21483
21486
  }
@@ -21526,13 +21529,13 @@ export {
21526
21529
  V0 as F,
21527
21530
  W0 as G,
21528
21531
  ix as H,
21529
- Eo as I,
21532
+ Co as I,
21530
21533
  J0 as J,
21531
21534
  H0 as K,
21532
21535
  Ix as L,
21533
21536
  L0 as M,
21534
21537
  cc as N,
21535
- So as O,
21538
+ Eo as O,
21536
21539
  Z0 as P,
21537
21540
  pc as Q,
21538
21541
  ds as R,
@@ -21550,16 +21553,16 @@ export {
21550
21553
  fn as e,
21551
21554
  gx as f,
21552
21555
  _x as g,
21553
- no as h,
21556
+ ro as h,
21554
21557
  dc as i,
21555
21558
  lx as j,
21556
21559
  yc as k,
21557
21560
  _c as l,
21558
21561
  Ft as m,
21559
- Qr as n,
21560
- Bn as o,
21562
+ eo as n,
21563
+ Fn as o,
21561
21564
  tc as p,
21562
- or as q,
21565
+ ir as q,
21563
21566
  Rt as r,
21564
21567
  fc as s,
21565
21568
  ax as t,