@marimo-team/islands 0.25.3-dev232 → 0.25.3-dev234

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.
@@ -3,27 +3,27 @@ import { c as n, g as r, h as i, t as a } from "./button-B6RjDKJx.js";
3
3
  import { t as o } from "./react-sHtZdjeP.js";
4
4
  import { t as s } from "./compiler-runtime-CldRdSsv.js";
5
5
  import { i as c, t as l } from "./copy-icon-CG57cxwb.js";
6
- import { Bt as u, Ct as d, I as f, K as p, Lt as m, Mt as h, S as g, Tt as _, W as v, Wt as y, _ as b, _t as x, a as S, b as C, ct as w, f as T, g as E, gt as D, h as O, jt as ee, l as k, lt as te, m as A, n as ne, nt as re, p as j, pt as ie, q as ae, r as oe, st as se, t as ce, u as le, ut as ue, v as de, y as fe, zt as pe } from "./html-to-image-0FooaKop.js";
7
- import { m as M, t as me } from "./tooltip-C3UnvsRe.js";
8
- import { M as he, d as ge } from "./select-BSxlITBo.js";
9
- import { _ as _e, f as ve, h as ye, i as be, n as xe, t as Se } from "./dropdown-menu-BRiE7Vnp.js";
10
- import { a as Ce, l as we } from "./config-DbjzjwxX.js";
11
- import { F as Te, G as Ee, M as De, et as Oe, h as ke, i as Ae, r as je, st as Me, t as Ne, wt as Pe, zt as Fe } from "./error-entries-CRPfxMqm.js";
12
- import { d as Ie, f as Le, i as Re, n as ze, t as Be, u as Ve } from "./process-output-BOvkTEDt.js";
13
- import { i as He, s as Ue, t as We } from "./strings-BGW-fXVJ.js";
14
- import { t as Ge } from "./jsx-runtime-3BD1kT0s.js";
15
- import { n as Ke } from "./error-banner-IsonnvA0.js";
16
- import { n as qe } from "./useTheme-DgOLVISn.js";
17
- import { t as Je } from "./isEmpty-CdX7MTE1.js";
18
- import { C as Ye, D as Xe, h as Ze } from "./utils-DXkj82sK.js";
19
- import { t as Qe } from "./objects-DCmMvZtn.js";
20
- import { Dt as $e, Et as et, St as tt, U as nt, V as rt, W as it, bt as at, kt as ot, nt as st, rt as ct, yt as lt, z as ut } from "./dist-CYeqK4Xw.js";
21
- import { B as dt, C as ft, D as pt, F as mt, H as ht, I as gt, M as _t, N as vt, O as yt, R as bt, S as xt, T as St, b as Ct, j as wt, k as Tt, v as Et, w as Dt, x as Ot, y as kt, z as At } from "./schemas-CdscWNy_.js";
22
- import { n as jt, o as Mt, r as Nt } from "./dist-BX1mn8na.js";
23
- import { n as Pt } from "./dist-DiLFTlnl.js";
24
- import { n as Ft, t as It } from "./esm-CHjVSexr.js";
25
- import { t as Lt } from "./useAsyncData-DsZMvNXn.js";
26
- var Rt = M("ban", [["circle", {
6
+ import { Bt as u, Et as d, G as f, Gt as p, I as m, J as h, Mt as g, Nt as _, Rt as v, S as y, Vt as b, _ as x, _t as S, a as C, b as w, ct as T, dt as E, f as D, g as O, h as k, l as A, lt as ee, m as j, mt as te, n as ne, p as M, q as re, r as ie, rt as ae, t as oe, u as se, ut as ce, v as le, vt as ue, wt as de, y as fe } from "./html-to-image-Gx4q3ZoD.js";
7
+ import { m as N, t as pe } from "./tooltip-C3UnvsRe.js";
8
+ import { M as me, d as he } from "./select-BSxlITBo.js";
9
+ import { _ as ge, f as _e, h as ve, i as ye, n as be, t as xe } from "./dropdown-menu-BRiE7Vnp.js";
10
+ import { a as Se, l as Ce } from "./config-DbjzjwxX.js";
11
+ import { F as we, G as Te, M as Ee, et as De, h as Oe, i as ke, r as Ae, st as je, t as Me, wt as Ne, zt as Pe } from "./error-entries-CRPfxMqm.js";
12
+ import { d as Fe, f as Ie, i as Le, n as Re, t as ze, u as Be } from "./process-output-D2ISIyIs.js";
13
+ import { i as Ve, s as He, t as Ue } from "./strings-BGW-fXVJ.js";
14
+ import { t as We } from "./jsx-runtime-3BD1kT0s.js";
15
+ import { n as Ge } from "./error-banner-IsonnvA0.js";
16
+ import { n as Ke } from "./useTheme-DgOLVISn.js";
17
+ import { t as qe } from "./isEmpty-CdX7MTE1.js";
18
+ import { C as Je, D as Ye, h as Xe } from "./utils-DXkj82sK.js";
19
+ import { t as Ze } from "./objects-DCmMvZtn.js";
20
+ import { Dt as Qe, Et as $e, St as et, U as tt, V as nt, W as rt, bt as it, kt as at, nt as ot, rt as st, yt as ct, z as lt } from "./dist-CYeqK4Xw.js";
21
+ import { B as ut, C as dt, D as ft, F as pt, H as mt, I as ht, M as gt, N as _t, O as vt, R as yt, S as bt, T as xt, b as St, j as Ct, k as wt, v as Tt, w as Et, x as Dt, y as Ot, z as kt } from "./schemas-CdscWNy_.js";
22
+ import { n as At, o as jt, r as Mt } from "./dist-BX1mn8na.js";
23
+ import { n as Nt } from "./dist-DiLFTlnl.js";
24
+ import { n as Pt, t as Ft } from "./esm-CHjVSexr.js";
25
+ import { t as It } from "./useAsyncData-DsZMvNXn.js";
26
+ var Lt = N("ban", [["circle", {
27
27
  cx: "12",
28
28
  cy: "12",
29
29
  r: "10",
@@ -31,7 +31,7 @@ var Rt = M("ban", [["circle", {
31
31
  }], ["path", {
32
32
  d: "M4.929 4.929 19.07 19.071",
33
33
  key: "196cmz"
34
- }]]), zt = M("bot-message-square", [
34
+ }]]), Rt = N("bot-message-square", [
35
35
  ["path", {
36
36
  d: "M12 6V2H8",
37
37
  key: "1155em"
@@ -56,13 +56,13 @@ var Rt = M("ban", [["circle", {
56
56
  d: "M9 11v2",
57
57
  key: "1ueba0"
58
58
  }]
59
- ]), Bt = M("circle-check-big", [["path", {
59
+ ]), zt = N("circle-check-big", [["path", {
60
60
  d: "M21.801 10A10 10 0 1 1 17 3.335",
61
61
  key: "yps3ct"
62
62
  }], ["path", {
63
63
  d: "m9 11 3 3L22 4",
64
64
  key: "1pflzl"
65
- }]]), Vt = M("circle-slash", [["circle", {
65
+ }]]), Bt = N("circle-slash", [["circle", {
66
66
  cx: "12",
67
67
  cy: "12",
68
68
  r: "10",
@@ -73,22 +73,22 @@ var Rt = M("ban", [["circle", {
73
73
  y1: "15",
74
74
  y2: "9",
75
75
  key: "1dfufj"
76
- }]]), Ht = M("paperclip", [["path", {
76
+ }]]), Vt = N("paperclip", [["path", {
77
77
  d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",
78
78
  key: "1miecu"
79
- }]]), Ut = M("rotate-cw", [["path", {
79
+ }]]), Ht = N("rotate-cw", [["path", {
80
80
  d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
81
81
  key: "1p45f6"
82
82
  }], ["path", {
83
83
  d: "M21 3v5h-5",
84
84
  key: "1q7to0"
85
- }]]), Wt = M("send-horizontal", [["path", {
85
+ }]]), Ut = N("send-horizontal", [["path", {
86
86
  d: "M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",
87
87
  key: "117uat"
88
88
  }], ["path", {
89
89
  d: "M6 12h16",
90
90
  key: "s4cdu5"
91
- }]]), Gt = M("settings", [["path", {
91
+ }]]), Wt = N("settings", [["path", {
92
92
  d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
93
93
  key: "1i5ecw"
94
94
  }], ["circle", {
@@ -96,7 +96,7 @@ var Rt = M("ban", [["circle", {
96
96
  cy: "12",
97
97
  r: "3",
98
98
  key: "1v7zrd"
99
- }]]), Kt = M("shield-question-mark", [
99
+ }]]), Gt = N("shield-question-mark", [
100
100
  ["path", {
101
101
  d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
102
102
  key: "oel41y"
@@ -109,66 +109,66 @@ var Rt = M("ban", [["circle", {
109
109
  d: "M12 17h.01",
110
110
  key: "p32p05"
111
111
  }]
112
- ]), N = s(), qt = "vercel.ai.error", Jt = Symbol.for(qt), Yt, Xt, P = class e extends (Xt = Error, Yt = Jt, Xt) {
112
+ ]), P = s(), Kt = "vercel.ai.error", qt = Symbol.for(Kt), Jt, Yt, F = class e extends (Yt = Error, Jt = qt, Yt) {
113
113
  constructor({ name: e, message: t, cause: n }) {
114
- super(t), this[Yt] = !0, this.name = e, this.cause = n;
114
+ super(t), this[Jt] = !0, this.name = e, this.cause = n;
115
115
  }
116
116
  static isInstance(t) {
117
- return e.hasMarker(t, qt);
117
+ return e.hasMarker(t, Kt);
118
118
  }
119
119
  static hasMarker(e, t) {
120
120
  let n = Symbol.for(t);
121
121
  return typeof e == "object" && !!e && n in e && typeof e[n] == "boolean" && e[n] === !0;
122
122
  }
123
- }, Zt = "AI_APICallError", Qt = `vercel.ai.error.${Zt}`, $t = Symbol.for(Qt), en, tn, nn = class extends (tn = P, en = $t, tn) {
123
+ }, Xt = "AI_APICallError", Zt = `vercel.ai.error.${Xt}`, Qt = Symbol.for(Zt), $t, en, tn = class extends (en = F, $t = Qt, en) {
124
124
  constructor({ message: e, url: t, requestBodyValues: n, statusCode: r, responseHeaders: i, responseBody: a, cause: o, isRetryable: s = r != null && (r === 408 || r === 409 || r === 429 || r >= 500), data: c }) {
125
125
  super({
126
- name: Zt,
126
+ name: Xt,
127
127
  message: e,
128
128
  cause: o
129
- }), this[en] = !0, this.url = t, this.requestBodyValues = n, this.statusCode = r, this.responseHeaders = i, this.responseBody = a, this.isRetryable = s, this.data = c;
129
+ }), this[$t] = !0, this.url = t, this.requestBodyValues = n, this.statusCode = r, this.responseHeaders = i, this.responseBody = a, this.isRetryable = s, this.data = c;
130
130
  }
131
131
  static isInstance(e) {
132
- return P.hasMarker(e, Qt);
132
+ return F.hasMarker(e, Zt);
133
133
  }
134
- }, rn = "AI_EmptyResponseBodyError", an = `vercel.ai.error.${rn}`, on = Symbol.for(an), sn, cn, ln = class extends (cn = P, sn = on, cn) {
134
+ }, nn = "AI_EmptyResponseBodyError", rn = `vercel.ai.error.${nn}`, an = Symbol.for(rn), on, sn, cn = class extends (sn = F, on = an, sn) {
135
135
  constructor({ message: e = "Empty response body" } = {}) {
136
136
  super({
137
- name: rn,
137
+ name: nn,
138
138
  message: e
139
- }), this[sn] = !0;
139
+ }), this[on] = !0;
140
140
  }
141
141
  static isInstance(e) {
142
- return P.hasMarker(e, an);
142
+ return F.hasMarker(e, rn);
143
143
  }
144
144
  };
145
- function un(e) {
145
+ function ln(e) {
146
146
  return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.toString() : JSON.stringify(e);
147
147
  }
148
- var dn = "AI_InvalidArgumentError", fn = `vercel.ai.error.${dn}`, pn = Symbol.for(fn), mn, hn, gn = class extends (hn = P, mn = pn, hn) {
148
+ var un = "AI_InvalidArgumentError", dn = `vercel.ai.error.${un}`, fn = Symbol.for(dn), pn, mn, hn = class extends (mn = F, pn = fn, mn) {
149
149
  constructor({ message: e, cause: t, argument: n }) {
150
150
  super({
151
- name: dn,
151
+ name: un,
152
152
  message: e,
153
153
  cause: t
154
- }), this[mn] = !0, this.argument = n;
154
+ }), this[pn] = !0, this.argument = n;
155
155
  }
156
156
  static isInstance(e) {
157
- return P.hasMarker(e, fn);
157
+ return F.hasMarker(e, dn);
158
158
  }
159
- }, _n = "AI_JSONParseError", vn = `vercel.ai.error.${_n}`, yn = Symbol.for(vn), bn, xn, Sn = class extends (xn = P, bn = yn, xn) {
159
+ }, gn = "AI_JSONParseError", _n = `vercel.ai.error.${gn}`, vn = Symbol.for(_n), yn, bn, xn = class extends (bn = F, yn = vn, bn) {
160
160
  constructor({ text: e, cause: t }) {
161
161
  super({
162
- name: _n,
162
+ name: gn,
163
163
  message: `JSON parsing failed: Text: ${e}.
164
- Error message: ${un(t)}`,
164
+ Error message: ${ln(t)}`,
165
165
  cause: t
166
- }), this[bn] = !0, this.text = e;
166
+ }), this[yn] = !0, this.text = e;
167
167
  }
168
168
  static isInstance(e) {
169
- return P.hasMarker(e, vn);
169
+ return F.hasMarker(e, _n);
170
170
  }
171
- }, Cn = "AI_TypeValidationError", wn = `vercel.ai.error.${Cn}`, Tn = Symbol.for(wn), En, Dn, F = class e extends (Dn = P, En = Tn, Dn) {
171
+ }, Sn = "AI_TypeValidationError", Cn = `vercel.ai.error.${Sn}`, wn = Symbol.for(Cn), Tn, En, Dn = class e extends (En = F, Tn = wn, En) {
172
172
  constructor({ value: e, cause: t, context: n }) {
173
173
  let r = "Type validation failed";
174
174
  if (n?.field && (r += ` for ${n.field}`), n?.entityName || n?.entityId) {
@@ -177,14 +177,14 @@ Error message: ${un(t)}`,
177
177
  n.entityName && e.push(n.entityName), n.entityId && e.push(`id: "${n.entityId}"`), r += e.join(", "), r += ")";
178
178
  }
179
179
  super({
180
- name: Cn,
180
+ name: Sn,
181
181
  message: `${r}: Value: ${JSON.stringify(e)}.
182
- Error message: ${un(t)}`,
182
+ Error message: ${ln(t)}`,
183
183
  cause: t
184
- }), this[En] = !0, this.value = e, this.context = n;
184
+ }), this[Tn] = !0, this.value = e, this.context = n;
185
185
  }
186
186
  static isInstance(e) {
187
- return P.hasMarker(e, wn);
187
+ return F.hasMarker(e, Cn);
188
188
  }
189
189
  static wrap({ value: t, cause: n, context: r }) {
190
190
  return e.isInstance(n) && n.value === t && n.context?.field === r?.field && n.context?.entityName === r?.entityName && n.context?.entityId === r?.entityId ? n : new e({
@@ -193,7 +193,7 @@ Error message: ${un(t)}`,
193
193
  context: r
194
194
  });
195
195
  }
196
- }, On = "AI_UnsupportedFunctionalityError", kn = `vercel.ai.error.${On}`, An = Symbol.for(kn), jn, Mn, Nn = class extends (Mn = P, jn = An, Mn) {
196
+ }, On = "AI_UnsupportedFunctionalityError", kn = `vercel.ai.error.${On}`, An = Symbol.for(kn), jn, Mn, Nn = class extends (Mn = F, jn = An, Mn) {
197
197
  constructor({ functionality: e, message: t = `'${e}' functionality not supported.` }) {
198
198
  super({
199
199
  name: On,
@@ -201,7 +201,7 @@ Error message: ${un(t)}`,
201
201
  }), this[jn] = !0, this.functionality = e;
202
202
  }
203
203
  static isInstance(e) {
204
- return P.hasMarker(e, kn);
204
+ return F.hasMarker(e, kn);
205
205
  }
206
206
  }, Pn = class extends Error {
207
207
  constructor(e, t) {
@@ -404,7 +404,7 @@ var I = ({ prefix: e, size: t = 16, alphabet: n = "0123456789ABCDEFGHIJKLMNOPQRS
404
404
  return r.join("");
405
405
  };
406
406
  if (e == null) return i;
407
- if (n.includes(r)) throw new gn({
407
+ if (n.includes(r)) throw new hn({
408
408
  argument: "separator",
409
409
  message: `The separator "${r}" must not be part of the alphabet "${n}".`
410
410
  });
@@ -449,19 +449,19 @@ function Qn(e) {
449
449
  function $n(e) {
450
450
  if (e.type === "object" || Array.isArray(e.type) && e.type.includes("object")) {
451
451
  let { additionalProperties: t } = e;
452
- e.additionalProperties = t != null && typeof t != "boolean" && er(t);
452
+ e.additionalProperties = t != null && typeof t != "boolean" && L(t);
453
453
  let { properties: n } = e;
454
- if (n != null) for (let e of Object.keys(n)) n[e] = er(n[e]);
454
+ if (n != null) for (let e of Object.keys(n)) n[e] = L(n[e]);
455
455
  }
456
- e.items != null && (e.items = Array.isArray(e.items) ? e.items.map(er) : er(e.items)), e.anyOf != null && (e.anyOf = e.anyOf.map(er)), e.allOf != null && (e.allOf = e.allOf.map(er)), e.oneOf != null && (e.oneOf = e.oneOf.map(er));
456
+ e.items != null && (e.items = Array.isArray(e.items) ? e.items.map(L) : L(e.items)), e.anyOf != null && (e.anyOf = e.anyOf.map(L)), e.allOf != null && (e.allOf = e.allOf.map(L)), e.oneOf != null && (e.oneOf = e.oneOf.map(L));
457
457
  let { definitions: t } = e;
458
- if (t != null) for (let e of Object.keys(t)) t[e] = er(t[e]);
458
+ if (t != null) for (let e of Object.keys(t)) t[e] = L(t[e]);
459
459
  return e;
460
460
  }
461
- function er(e) {
461
+ function L(e) {
462
462
  return typeof e == "boolean" ? e : $n(e);
463
463
  }
464
- var tr = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use"), nr = {
464
+ var er = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use"), tr = {
465
465
  name: void 0,
466
466
  $refStrategy: "root",
467
467
  basePath: ["#"],
@@ -481,24 +481,24 @@ var tr = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to u
481
481
  emailStrategy: "format:email",
482
482
  base64Strategy: "contentEncoding:base64",
483
483
  nameStrategy: "ref"
484
- }, rr = (e) => typeof e == "string" ? {
485
- ...nr,
484
+ }, nr = (e) => typeof e == "string" ? {
485
+ ...tr,
486
486
  name: e
487
487
  } : {
488
- ...nr,
488
+ ...tr,
489
489
  ...e
490
490
  };
491
- function L() {
491
+ function R() {
492
492
  return {};
493
493
  }
494
- function ir(e, t) {
494
+ function rr(e, t) {
495
495
  let n = { type: "array" };
496
- return e.type?._def && e.type?._def?.typeName !== "ZodAny" && (n.items = V(e.type._def, {
496
+ return e.type?._def && e.type?._def?.typeName !== "ZodAny" && (n.items = H(e.type._def, {
497
497
  ...t,
498
498
  currentPath: [...t.currentPath, "items"]
499
499
  })), e.minLength && (n.minItems = e.minLength.value), e.maxLength && (n.maxItems = e.maxLength.value), e.exactLength && (n.minItems = e.exactLength.value, n.maxItems = e.exactLength.value), n;
500
500
  }
501
- function ar(e) {
501
+ function ir(e) {
502
502
  let t = {
503
503
  type: "integer",
504
504
  format: "int64"
@@ -515,16 +515,16 @@ function ar(e) {
515
515
  }
516
516
  return t;
517
517
  }
518
- function or() {
518
+ function ar() {
519
519
  return { type: "boolean" };
520
520
  }
521
- function sr(e, t) {
522
- return V(e.type._def, t);
521
+ function or(e, t) {
522
+ return H(e.type._def, t);
523
523
  }
524
- var cr = (e, t) => V(e.innerType._def, t);
525
- function lr(e, t, n) {
524
+ var sr = (e, t) => H(e.innerType._def, t);
525
+ function cr(e, t, n) {
526
526
  let r = n ?? t.dateStrategy;
527
- if (Array.isArray(r)) return { anyOf: r.map((n) => lr(e, t, n)) };
527
+ if (Array.isArray(r)) return { anyOf: r.map((n) => cr(e, t, n)) };
528
528
  switch (r) {
529
529
  case "string":
530
530
  case "format:date-time": return {
@@ -535,10 +535,10 @@ function lr(e, t, n) {
535
535
  type: "string",
536
536
  format: "date"
537
537
  };
538
- case "integer": return ur(e);
538
+ case "integer": return lr(e);
539
539
  }
540
540
  }
541
- var ur = (e) => {
541
+ var lr = (e) => {
542
542
  let t = {
543
543
  type: "integer",
544
544
  format: "unix-time"
@@ -551,31 +551,31 @@ var ur = (e) => {
551
551
  }
552
552
  return t;
553
553
  };
554
- function dr(e, t) {
554
+ function ur(e, t) {
555
555
  return {
556
- ...V(e.innerType._def, t),
556
+ ...H(e.innerType._def, t),
557
557
  default: e.defaultValue()
558
558
  };
559
559
  }
560
- function fr(e, t) {
561
- return t.effectStrategy === "input" ? V(e.schema._def, t) : L();
560
+ function dr(e, t) {
561
+ return t.effectStrategy === "input" ? H(e.schema._def, t) : R();
562
562
  }
563
- function pr(e) {
563
+ function fr(e) {
564
564
  return {
565
565
  type: "string",
566
566
  enum: Array.from(e.values)
567
567
  };
568
568
  }
569
- var mr = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
570
- function hr(e, t) {
571
- let n = [V(e.left._def, {
569
+ var pr = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
570
+ function mr(e, t) {
571
+ let n = [H(e.left._def, {
572
572
  ...t,
573
573
  currentPath: [
574
574
  ...t.currentPath,
575
575
  "allOf",
576
576
  "0"
577
577
  ]
578
- }), V(e.right._def, {
578
+ }), H(e.right._def, {
579
579
  ...t,
580
580
  currentPath: [
581
581
  ...t.currentPath,
@@ -584,7 +584,7 @@ function hr(e, t) {
584
584
  ]
585
585
  })].filter((e) => !!e), r = [];
586
586
  return n.forEach((e) => {
587
- if (mr(e)) r.push(...e.allOf);
587
+ if (pr(e)) r.push(...e.allOf);
588
588
  else {
589
589
  let t = e;
590
590
  if ("additionalProperties" in e && e.additionalProperties === !1) {
@@ -595,19 +595,19 @@ function hr(e, t) {
595
595
  }
596
596
  }), r.length ? { allOf: r } : void 0;
597
597
  }
598
- function gr(e) {
598
+ function hr(e) {
599
599
  let t = typeof e.value;
600
600
  return t !== "bigint" && t !== "number" && t !== "boolean" && t !== "string" ? { type: Array.isArray(e.value) ? "array" : "object" } : {
601
601
  type: t === "bigint" ? "integer" : t,
602
602
  const: e.value
603
603
  };
604
604
  }
605
- var _r = void 0, R = {
605
+ var gr = void 0, z = {
606
606
  cuid: /^[cC][^\s-]{8,}$/,
607
607
  cuid2: /^[0-9a-z]+$/,
608
608
  ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
609
609
  email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
610
- emoji: () => (_r === void 0 && (_r = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), _r),
610
+ emoji: () => (gr === void 0 && (gr = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), gr),
611
611
  uuid: /^[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}$/,
612
612
  ipv4: /^(?:(?: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])$/,
613
613
  ipv4Cidr: /^(?:(?: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])$/,
@@ -618,7 +618,7 @@ var _r = void 0, R = {
618
618
  nanoid: /^[a-zA-Z0-9_-]{21}$/,
619
619
  jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
620
620
  };
621
- function vr(e, t) {
621
+ function _r(e, t) {
622
622
  let n = { type: "string" };
623
623
  if (e.checks) for (let r of e.checks) switch (r.kind) {
624
624
  case "min":
@@ -630,108 +630,108 @@ function vr(e, t) {
630
630
  case "email":
631
631
  switch (t.emailStrategy) {
632
632
  case "format:email":
633
- z(n, "email", r.message, t);
633
+ B(n, "email", r.message, t);
634
634
  break;
635
635
  case "format:idn-email":
636
- z(n, "idn-email", r.message, t);
636
+ B(n, "idn-email", r.message, t);
637
637
  break;
638
- case "pattern:zod": B(n, R.email, r.message, t);
638
+ case "pattern:zod": V(n, z.email, r.message, t);
639
639
  }
640
640
  break;
641
641
  case "url":
642
- z(n, "uri", r.message, t);
642
+ B(n, "uri", r.message, t);
643
643
  break;
644
644
  case "uuid":
645
- z(n, "uuid", r.message, t);
645
+ B(n, "uuid", r.message, t);
646
646
  break;
647
647
  case "regex":
648
- B(n, r.regex, r.message, t);
648
+ V(n, r.regex, r.message, t);
649
649
  break;
650
650
  case "cuid":
651
- B(n, R.cuid, r.message, t);
651
+ V(n, z.cuid, r.message, t);
652
652
  break;
653
653
  case "cuid2":
654
- B(n, R.cuid2, r.message, t);
654
+ V(n, z.cuid2, r.message, t);
655
655
  break;
656
656
  case "startsWith":
657
- B(n, RegExp(`^${yr(r.value, t)}`), r.message, t);
657
+ V(n, RegExp(`^${vr(r.value, t)}`), r.message, t);
658
658
  break;
659
659
  case "endsWith":
660
- B(n, RegExp(`${yr(r.value, t)}$`), r.message, t);
660
+ V(n, RegExp(`${vr(r.value, t)}$`), r.message, t);
661
661
  break;
662
662
  case "datetime":
663
- z(n, "date-time", r.message, t);
663
+ B(n, "date-time", r.message, t);
664
664
  break;
665
665
  case "date":
666
- z(n, "date", r.message, t);
666
+ B(n, "date", r.message, t);
667
667
  break;
668
668
  case "time":
669
- z(n, "time", r.message, t);
669
+ B(n, "time", r.message, t);
670
670
  break;
671
671
  case "duration":
672
- z(n, "duration", r.message, t);
672
+ B(n, "duration", r.message, t);
673
673
  break;
674
674
  case "length":
675
675
  n.minLength = typeof n.minLength == "number" ? Math.max(n.minLength, r.value) : r.value, n.maxLength = typeof n.maxLength == "number" ? Math.min(n.maxLength, r.value) : r.value;
676
676
  break;
677
677
  case "includes":
678
- B(n, RegExp(yr(r.value, t)), r.message, t);
678
+ V(n, RegExp(vr(r.value, t)), r.message, t);
679
679
  break;
680
680
  case "ip":
681
- r.version !== "v6" && z(n, "ipv4", r.message, t), r.version !== "v4" && z(n, "ipv6", r.message, t);
681
+ r.version !== "v6" && B(n, "ipv4", r.message, t), r.version !== "v4" && B(n, "ipv6", r.message, t);
682
682
  break;
683
683
  case "base64url":
684
- B(n, R.base64url, r.message, t);
684
+ V(n, z.base64url, r.message, t);
685
685
  break;
686
686
  case "jwt":
687
- B(n, R.jwt, r.message, t);
687
+ V(n, z.jwt, r.message, t);
688
688
  break;
689
689
  case "cidr":
690
- r.version !== "v6" && B(n, R.ipv4Cidr, r.message, t), r.version !== "v4" && B(n, R.ipv6Cidr, r.message, t);
690
+ r.version !== "v6" && V(n, z.ipv4Cidr, r.message, t), r.version !== "v4" && V(n, z.ipv6Cidr, r.message, t);
691
691
  break;
692
692
  case "emoji":
693
- B(n, R.emoji(), r.message, t);
693
+ V(n, z.emoji(), r.message, t);
694
694
  break;
695
695
  case "ulid":
696
- B(n, R.ulid, r.message, t);
696
+ V(n, z.ulid, r.message, t);
697
697
  break;
698
698
  case "base64":
699
699
  switch (t.base64Strategy) {
700
700
  case "format:binary":
701
- z(n, "binary", r.message, t);
701
+ B(n, "binary", r.message, t);
702
702
  break;
703
703
  case "contentEncoding:base64":
704
704
  n.contentEncoding = "base64";
705
705
  break;
706
- case "pattern:zod": B(n, R.base64, r.message, t);
706
+ case "pattern:zod": V(n, z.base64, r.message, t);
707
707
  }
708
708
  break;
709
- case "nanoid": B(n, R.nanoid, r.message, t);
709
+ case "nanoid": V(n, z.nanoid, r.message, t);
710
710
  }
711
711
  return n;
712
712
  }
713
- function yr(e, t) {
714
- return t.patternStrategy === "escape" ? xr(e) : e;
713
+ function vr(e, t) {
714
+ return t.patternStrategy === "escape" ? br(e) : e;
715
715
  }
716
- var br = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
717
- function xr(e) {
716
+ var yr = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
717
+ function br(e) {
718
718
  let t = "";
719
- for (let n = 0; n < e.length; n++) br.has(e[n]) || (t += "\\"), t += e[n];
719
+ for (let n = 0; n < e.length; n++) yr.has(e[n]) || (t += "\\"), t += e[n];
720
720
  return t;
721
721
  }
722
- function z(e, t, n, r) {
722
+ function B(e, t, n, r) {
723
723
  e.format || e.anyOf?.some((e) => e.format) ? (e.anyOf ||= [], e.format && (e.anyOf.push({ format: e.format }), delete e.format), e.anyOf.push({
724
724
  format: t,
725
725
  ...n && r.errorMessages && { errorMessage: { format: n } }
726
726
  })) : e.format = t;
727
727
  }
728
- function B(e, t, n, r) {
728
+ function V(e, t, n, r) {
729
729
  e.pattern || e.allOf?.some((e) => e.pattern) ? (e.allOf ||= [], e.pattern && (e.allOf.push({ pattern: e.pattern }), delete e.pattern), e.allOf.push({
730
- pattern: Sr(t, r),
730
+ pattern: xr(t, r),
731
731
  ...n && r.errorMessages && { errorMessage: { pattern: n } }
732
- })) : e.pattern = Sr(t, r);
732
+ })) : e.pattern = xr(t, r);
733
733
  }
734
- function Sr(e, t) {
734
+ function xr(e, t) {
735
735
  if (!t.applyRegexFlags || !e.flags) return e.source;
736
736
  let n = {
737
737
  i: e.flags.includes("i"),
@@ -779,16 +779,16 @@ function Sr(e, t) {
779
779
  }
780
780
  return i;
781
781
  }
782
- function Cr(e, t) {
782
+ function Sr(e, t) {
783
783
  let n = {
784
784
  type: "object",
785
- additionalProperties: V(e.valueType._def, {
785
+ additionalProperties: H(e.valueType._def, {
786
786
  ...t,
787
787
  currentPath: [...t.currentPath, "additionalProperties"]
788
788
  }) ?? t.allowedAdditionalProperties
789
789
  };
790
790
  if (e.keyType?._def.typeName === "ZodString" && e.keyType._def.checks?.length) {
791
- let { type: r, ...i } = vr(e.keyType._def, t);
791
+ let { type: r, ...i } = _r(e.keyType._def, t);
792
792
  return {
793
793
  ...n,
794
794
  propertyNames: i
@@ -799,7 +799,7 @@ function Cr(e, t) {
799
799
  propertyNames: { enum: e.keyType._def.values }
800
800
  };
801
801
  if (e.keyType?._def.typeName === "ZodBranded" && e.keyType._def.type._def.typeName === "ZodString" && e.keyType._def.type._def.checks?.length) {
802
- let { type: r, ...i } = sr(e.keyType._def, t);
802
+ let { type: r, ...i } = or(e.keyType._def, t);
803
803
  return {
804
804
  ...n,
805
805
  propertyNames: i
@@ -807,13 +807,13 @@ function Cr(e, t) {
807
807
  }
808
808
  return n;
809
809
  }
810
- function wr(e, t) {
811
- return t.mapStrategy === "record" ? Cr(e, t) : {
810
+ function Cr(e, t) {
811
+ return t.mapStrategy === "record" ? Sr(e, t) : {
812
812
  type: "array",
813
813
  maxItems: 125,
814
814
  items: {
815
815
  type: "array",
816
- items: [V(e.keyType._def, {
816
+ items: [H(e.keyType._def, {
817
817
  ...t,
818
818
  currentPath: [
819
819
  ...t.currentPath,
@@ -821,7 +821,7 @@ function wr(e, t) {
821
821
  "items",
822
822
  "0"
823
823
  ]
824
- }) || L(), V(e.valueType._def, {
824
+ }) || R(), H(e.valueType._def, {
825
825
  ...t,
826
826
  currentPath: [
827
827
  ...t.currentPath,
@@ -829,37 +829,37 @@ function wr(e, t) {
829
829
  "items",
830
830
  "1"
831
831
  ]
832
- }) || L()],
832
+ }) || R()],
833
833
  minItems: 2,
834
834
  maxItems: 2
835
835
  }
836
836
  };
837
837
  }
838
- function Tr(e) {
838
+ function wr(e) {
839
839
  let t = e.values, n = Object.keys(e.values).filter((e) => typeof t[t[e]] != "number").map((e) => t[e]), r = Array.from(new Set(n.map((e) => typeof e)));
840
840
  return {
841
841
  type: r.length === 1 ? r[0] === "string" ? "string" : "number" : ["string", "number"],
842
842
  enum: n
843
843
  };
844
844
  }
845
- function Er() {
846
- return { not: L() };
845
+ function Tr() {
846
+ return { not: R() };
847
847
  }
848
- function Dr() {
848
+ function Er() {
849
849
  return { type: "null" };
850
850
  }
851
- var Or = {
851
+ var Dr = {
852
852
  ZodString: "string",
853
853
  ZodNumber: "number",
854
854
  ZodBigInt: "integer",
855
855
  ZodBoolean: "boolean",
856
856
  ZodNull: "null"
857
857
  };
858
- function kr(e, t) {
858
+ function Or(e, t) {
859
859
  let n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
860
- if (n.every((e) => e._def.typeName in Or && (!e._def.checks || !e._def.checks.length))) {
860
+ if (n.every((e) => e._def.typeName in Dr && (!e._def.checks || !e._def.checks.length))) {
861
861
  let e = n.reduce((e, t) => {
862
- let n = Or[t._def.typeName];
862
+ let n = Dr[t._def.typeName];
863
863
  return n && !e.includes(n) ? [...e, n] : e;
864
864
  }, []);
865
865
  return { type: e.length > 1 ? e : e[0] };
@@ -887,10 +887,10 @@ function kr(e, t) {
887
887
  type: "string",
888
888
  enum: n.reduce((e, t) => [...e, ...t._def.values.filter((t) => !e.includes(t))], [])
889
889
  };
890
- return Ar(e, t);
890
+ return kr(e, t);
891
891
  }
892
- var Ar = (e, t) => {
893
- let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => V(e._def, {
892
+ var kr = (e, t) => {
893
+ let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => H(e._def, {
894
894
  ...t,
895
895
  currentPath: [
896
896
  ...t.currentPath,
@@ -900,15 +900,15 @@ var Ar = (e, t) => {
900
900
  })).filter((e) => !!e && (!t.strictUnions || typeof e == "object" && Object.keys(e).length > 0));
901
901
  return n.length ? { anyOf: n } : void 0;
902
902
  };
903
- function jr(e, t) {
903
+ function Ar(e, t) {
904
904
  if ([
905
905
  "ZodString",
906
906
  "ZodNumber",
907
907
  "ZodBigInt",
908
908
  "ZodBoolean",
909
909
  "ZodNull"
910
- ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return { type: [Or[e.innerType._def.typeName], "null"] };
911
- let n = V(e.innerType._def, {
910
+ ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return { type: [Dr[e.innerType._def.typeName], "null"] };
911
+ let n = H(e.innerType._def, {
912
912
  ...t,
913
913
  currentPath: [
914
914
  ...t.currentPath,
@@ -918,7 +918,7 @@ function jr(e, t) {
918
918
  });
919
919
  return n && { anyOf: [n, { type: "null" }] };
920
920
  }
921
- function Mr(e) {
921
+ function jr(e) {
922
922
  let t = { type: "number" };
923
923
  if (!e.checks) return t;
924
924
  for (let n of e.checks) switch (n.kind) {
@@ -935,7 +935,7 @@ function Mr(e) {
935
935
  }
936
936
  return t;
937
937
  }
938
- function Nr(e, t) {
938
+ function Mr(e, t) {
939
939
  let n = {
940
940
  type: "object",
941
941
  properties: {}
@@ -943,7 +943,7 @@ function Nr(e, t) {
943
943
  for (let e in i) {
944
944
  let a = i[e];
945
945
  if (a === void 0 || a._def === void 0) continue;
946
- let o = Fr(a), s = V(a._def, {
946
+ let o = Pr(a), s = H(a._def, {
947
947
  ...t,
948
948
  currentPath: [
949
949
  ...t.currentPath,
@@ -959,11 +959,11 @@ function Nr(e, t) {
959
959
  s !== void 0 && (n.properties[e] = s, o || r.push(e));
960
960
  }
961
961
  r.length && (n.required = r);
962
- let a = Pr(e, t);
962
+ let a = Nr(e, t);
963
963
  return a !== void 0 && (n.additionalProperties = a), n;
964
964
  }
965
- function Pr(e, t) {
966
- if (e.catchall._def.typeName !== "ZodNever") return V(e.catchall._def, {
965
+ function Nr(e, t) {
966
+ if (e.catchall._def.typeName !== "ZodNever") return H(e.catchall._def, {
967
967
  ...t,
968
968
  currentPath: [...t.currentPath, "additionalProperties"]
969
969
  });
@@ -973,16 +973,16 @@ function Pr(e, t) {
973
973
  case "strip": return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
974
974
  }
975
975
  }
976
- function Fr(e) {
976
+ function Pr(e) {
977
977
  try {
978
978
  return e.isOptional();
979
979
  } catch {
980
980
  return !0;
981
981
  }
982
982
  }
983
- var Ir = (e, t) => {
984
- if (t.currentPath.toString() === t.propertyPath?.toString()) return V(e.innerType._def, t);
985
- let n = V(e.innerType._def, {
983
+ var Fr = (e, t) => {
984
+ if (t.currentPath.toString() === t.propertyPath?.toString()) return H(e.innerType._def, t);
985
+ let n = H(e.innerType._def, {
986
986
  ...t,
987
987
  currentPath: [
988
988
  ...t.currentPath,
@@ -990,11 +990,11 @@ var Ir = (e, t) => {
990
990
  "1"
991
991
  ]
992
992
  });
993
- return n ? { anyOf: [{ not: L() }, n] } : L();
994
- }, Lr = (e, t) => {
995
- if (t.pipeStrategy === "input") return V(e.in._def, t);
996
- if (t.pipeStrategy === "output") return V(e.out._def, t);
997
- let n = V(e.in._def, {
993
+ return n ? { anyOf: [{ not: R() }, n] } : R();
994
+ }, Ir = (e, t) => {
995
+ if (t.pipeStrategy === "input") return H(e.in._def, t);
996
+ if (t.pipeStrategy === "output") return H(e.out._def, t);
997
+ let n = H(e.in._def, {
998
998
  ...t,
999
999
  currentPath: [
1000
1000
  ...t.currentPath,
@@ -1002,7 +1002,7 @@ var Ir = (e, t) => {
1002
1002
  "0"
1003
1003
  ]
1004
1004
  });
1005
- return { allOf: [n, V(e.out._def, {
1005
+ return { allOf: [n, H(e.out._def, {
1006
1006
  ...t,
1007
1007
  currentPath: [
1008
1008
  ...t.currentPath,
@@ -1011,25 +1011,25 @@ var Ir = (e, t) => {
1011
1011
  ]
1012
1012
  })].filter((e) => e !== void 0) };
1013
1013
  };
1014
- function Rr(e, t) {
1015
- return V(e.type._def, t);
1014
+ function Lr(e, t) {
1015
+ return H(e.type._def, t);
1016
1016
  }
1017
- function zr(e, t) {
1017
+ function Rr(e, t) {
1018
1018
  let n = {
1019
1019
  type: "array",
1020
1020
  uniqueItems: !0,
1021
- items: V(e.valueType._def, {
1021
+ items: H(e.valueType._def, {
1022
1022
  ...t,
1023
1023
  currentPath: [...t.currentPath, "items"]
1024
1024
  })
1025
1025
  };
1026
1026
  return e.minSize && (n.minItems = e.minSize.value), e.maxSize && (n.maxItems = e.maxSize.value), n;
1027
1027
  }
1028
- function Br(e, t) {
1028
+ function zr(e, t) {
1029
1029
  return e.rest ? {
1030
1030
  type: "array",
1031
1031
  minItems: e.items.length,
1032
- items: e.items.map((e, n) => V(e._def, {
1032
+ items: e.items.map((e, n) => H(e._def, {
1033
1033
  ...t,
1034
1034
  currentPath: [
1035
1035
  ...t.currentPath,
@@ -1037,7 +1037,7 @@ function Br(e, t) {
1037
1037
  `${n}`
1038
1038
  ]
1039
1039
  })).reduce((e, t) => t === void 0 ? e : [...e, t], []),
1040
- additionalItems: V(e.rest._def, {
1040
+ additionalItems: H(e.rest._def, {
1041
1041
  ...t,
1042
1042
  currentPath: [...t.currentPath, "additionalItems"]
1043
1043
  })
@@ -1045,7 +1045,7 @@ function Br(e, t) {
1045
1045
  type: "array",
1046
1046
  minItems: e.items.length,
1047
1047
  maxItems: e.items.length,
1048
- items: e.items.map((e, n) => V(e._def, {
1048
+ items: e.items.map((e, n) => H(e._def, {
1049
1049
  ...t,
1050
1050
  currentPath: [
1051
1051
  ...t.currentPath,
@@ -1055,65 +1055,65 @@ function Br(e, t) {
1055
1055
  })).reduce((e, t) => t === void 0 ? e : [...e, t], [])
1056
1056
  };
1057
1057
  }
1058
- function Vr() {
1059
- return { not: L() };
1058
+ function Br() {
1059
+ return { not: R() };
1060
1060
  }
1061
- function Hr() {
1062
- return L();
1061
+ function Vr() {
1062
+ return R();
1063
1063
  }
1064
- var Ur = (e, t) => V(e.innerType._def, t), Wr = (e, t, n) => {
1064
+ var Hr = (e, t) => H(e.innerType._def, t), Ur = (e, t, n) => {
1065
1065
  switch (t) {
1066
- case "ZodString": return vr(e, n);
1067
- case "ZodNumber": return Mr(e);
1068
- case "ZodObject": return Nr(e, n);
1069
- case "ZodBigInt": return ar(e);
1070
- case "ZodBoolean": return or();
1071
- case "ZodDate": return lr(e, n);
1072
- case "ZodUndefined": return Vr();
1073
- case "ZodNull": return Dr();
1074
- case "ZodArray": return ir(e, n);
1066
+ case "ZodString": return _r(e, n);
1067
+ case "ZodNumber": return jr(e);
1068
+ case "ZodObject": return Mr(e, n);
1069
+ case "ZodBigInt": return ir(e);
1070
+ case "ZodBoolean": return ar();
1071
+ case "ZodDate": return cr(e, n);
1072
+ case "ZodUndefined": return Br();
1073
+ case "ZodNull": return Er();
1074
+ case "ZodArray": return rr(e, n);
1075
1075
  case "ZodUnion":
1076
- case "ZodDiscriminatedUnion": return kr(e, n);
1077
- case "ZodIntersection": return hr(e, n);
1078
- case "ZodTuple": return Br(e, n);
1079
- case "ZodRecord": return Cr(e, n);
1080
- case "ZodLiteral": return gr(e);
1081
- case "ZodEnum": return pr(e);
1082
- case "ZodNativeEnum": return Tr(e);
1083
- case "ZodNullable": return jr(e, n);
1084
- case "ZodOptional": return Ir(e, n);
1085
- case "ZodMap": return wr(e, n);
1086
- case "ZodSet": return zr(e, n);
1076
+ case "ZodDiscriminatedUnion": return Or(e, n);
1077
+ case "ZodIntersection": return mr(e, n);
1078
+ case "ZodTuple": return zr(e, n);
1079
+ case "ZodRecord": return Sr(e, n);
1080
+ case "ZodLiteral": return hr(e);
1081
+ case "ZodEnum": return fr(e);
1082
+ case "ZodNativeEnum": return wr(e);
1083
+ case "ZodNullable": return Ar(e, n);
1084
+ case "ZodOptional": return Fr(e, n);
1085
+ case "ZodMap": return Cr(e, n);
1086
+ case "ZodSet": return Rr(e, n);
1087
1087
  case "ZodLazy": return () => e.getter()._def;
1088
- case "ZodPromise": return Rr(e, n);
1088
+ case "ZodPromise": return Lr(e, n);
1089
1089
  case "ZodNaN":
1090
- case "ZodNever": return Er();
1091
- case "ZodEffects": return fr(e, n);
1092
- case "ZodAny": return L();
1093
- case "ZodUnknown": return Hr();
1094
- case "ZodDefault": return dr(e, n);
1095
- case "ZodBranded": return sr(e, n);
1096
- case "ZodReadonly": return Ur(e, n);
1097
- case "ZodCatch": return cr(e, n);
1098
- case "ZodPipeline": return Lr(e, n);
1090
+ case "ZodNever": return Tr();
1091
+ case "ZodEffects": return dr(e, n);
1092
+ case "ZodAny": return R();
1093
+ case "ZodUnknown": return Vr();
1094
+ case "ZodDefault": return ur(e, n);
1095
+ case "ZodBranded": return or(e, n);
1096
+ case "ZodReadonly": return Hr(e, n);
1097
+ case "ZodCatch": return sr(e, n);
1098
+ case "ZodPipeline": return Ir(e, n);
1099
1099
  case "ZodFunction":
1100
1100
  case "ZodVoid":
1101
1101
  case "ZodSymbol": return;
1102
1102
  default: return /* @__PURE__ */ ((e) => void 0)(t);
1103
1103
  }
1104
- }, Gr = (e, t) => {
1104
+ }, Wr = (e, t) => {
1105
1105
  let n = 0;
1106
1106
  for (; n < e.length && n < t.length && e[n] === t[n]; n++);
1107
1107
  return [(e.length - n).toString(), ...t.slice(n)].join("/");
1108
1108
  };
1109
- function V(e, t, n = !1) {
1109
+ function H(e, t, n = !1) {
1110
1110
  let r = t.seen.get(e);
1111
1111
  if (t.override) {
1112
1112
  let i = t.override?.call(t, e, t, r, n);
1113
- if (i !== tr) return i;
1113
+ if (i !== er) return i;
1114
1114
  }
1115
1115
  if (r && !n) {
1116
- let e = Kr(r, t);
1116
+ let e = Gr(r, t);
1117
1117
  if (e !== void 0) return e;
1118
1118
  }
1119
1119
  let i = {
@@ -1122,22 +1122,22 @@ function V(e, t, n = !1) {
1122
1122
  jsonSchema: void 0
1123
1123
  };
1124
1124
  t.seen.set(e, i);
1125
- let a = Wr(e, e.typeName, t), o = typeof a == "function" ? V(a(), t) : a;
1126
- if (o && qr(e, t, o), t.postProcess) {
1125
+ let a = Ur(e, e.typeName, t), o = typeof a == "function" ? H(a(), t) : a;
1126
+ if (o && Kr(e, t, o), t.postProcess) {
1127
1127
  let n = t.postProcess(o, e, t);
1128
1128
  return i.jsonSchema = o, n;
1129
1129
  }
1130
1130
  return i.jsonSchema = o, o;
1131
1131
  }
1132
- var Kr = (e, t) => {
1132
+ var Gr = (e, t) => {
1133
1133
  switch (t.$refStrategy) {
1134
1134
  case "root": return { $ref: e.path.join("/") };
1135
- case "relative": return { $ref: Gr(t.currentPath, e.path) };
1135
+ case "relative": return { $ref: Wr(t.currentPath, e.path) };
1136
1136
  case "none":
1137
- case "seen": return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`), L()) : t.$refStrategy === "seen" ? L() : void 0;
1137
+ case "seen": return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`), R()) : t.$refStrategy === "seen" ? R() : void 0;
1138
1138
  }
1139
- }, qr = (e, t, n) => (e.description && (n.description = e.description), n), Jr = (e) => {
1140
- let t = rr(e), n = t.name === void 0 ? t.basePath : [
1139
+ }, Kr = (e, t, n) => (e.description && (n.description = e.description), n), qr = (e) => {
1140
+ let t = nr(e), n = t.name === void 0 ? t.basePath : [
1141
1141
  ...t.basePath,
1142
1142
  t.definitionPath,
1143
1143
  t.name
@@ -1156,25 +1156,25 @@ var Kr = (e, t) => {
1156
1156
  jsonSchema: void 0
1157
1157
  }]))
1158
1158
  };
1159
- }, Yr = (e, t) => {
1160
- let n = Jr(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
1159
+ }, Jr = (e, t) => {
1160
+ let n = qr(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
1161
1161
  ...e,
1162
- [t]: V(r._def, {
1162
+ [t]: H(r._def, {
1163
1163
  ...n,
1164
1164
  currentPath: [
1165
1165
  ...n.basePath,
1166
1166
  n.definitionPath,
1167
1167
  t
1168
1168
  ]
1169
- }, !0) ?? L()
1170
- }), {}) : void 0, i = typeof t == "string" ? t : t?.nameStrategy === "title" ? void 0 : t?.name, a = V(e._def, i === void 0 ? n : {
1169
+ }, !0) ?? R()
1170
+ }), {}) : void 0, i = typeof t == "string" ? t : t?.nameStrategy === "title" ? void 0 : t?.name, a = H(e._def, i === void 0 ? n : {
1171
1171
  ...n,
1172
1172
  currentPath: [
1173
1173
  ...n.basePath,
1174
1174
  n.definitionPath,
1175
1175
  i
1176
1176
  ]
1177
- }, !1) ?? L(), o = typeof t == "object" && t.name !== void 0 && t.nameStrategy === "title" ? t.name : void 0;
1177
+ }, !1) ?? R(), o = typeof t == "object" && t.name !== void 0 && t.nameStrategy === "title" ? t.name : void 0;
1178
1178
  o !== void 0 && (a.title = o);
1179
1179
  let s = i === void 0 ? r ? {
1180
1180
  ...a,
@@ -1191,14 +1191,14 @@ var Kr = (e, t) => {
1191
1191
  }
1192
1192
  };
1193
1193
  return s.$schema = "http://json-schema.org/draft-07/schema#", s;
1194
- }, Xr = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
1195
- function Zr(e) {
1194
+ }, Yr = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
1195
+ function Xr(e) {
1196
1196
  let t;
1197
1197
  return () => (t ??= e(), t);
1198
1198
  }
1199
- function Qr(e, { validate: t } = {}) {
1199
+ function Zr(e, { validate: t } = {}) {
1200
1200
  return {
1201
- [Xr]: !0,
1201
+ [Yr]: !0,
1202
1202
  _type: void 0,
1203
1203
  get jsonSchema() {
1204
1204
  return typeof e == "function" && (e = e()), e;
@@ -1206,19 +1206,19 @@ function Qr(e, { validate: t } = {}) {
1206
1206
  validate: t
1207
1207
  };
1208
1208
  }
1209
- function $r(e) {
1210
- return typeof e == "object" && !!e && Xr in e && e[Xr] === !0 && "jsonSchema" in e && "validate" in e;
1209
+ function Qr(e) {
1210
+ return typeof e == "object" && !!e && Yr in e && e[Yr] === !0 && "jsonSchema" in e && "validate" in e;
1211
1211
  }
1212
- function ei(e) {
1213
- return e == null ? Qr({
1212
+ function $r(e) {
1213
+ return e == null ? Zr({
1214
1214
  type: "object",
1215
1215
  properties: {},
1216
1216
  additionalProperties: !1
1217
- }) : $r(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? oi(e) : ti(e) : e();
1217
+ }) : Qr(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? ai(e) : ei(e) : e();
1218
1218
  }
1219
- function ti(e) {
1220
- return Qr(() => {
1221
- if (!ni(e)) throw Error(`Standard schema vendor '${e["~standard"].vendor}' does not support JSON Schema conversion.`);
1219
+ function ei(e) {
1220
+ return Zr(() => {
1221
+ if (!ti(e)) throw Error(`Standard schema vendor '${e["~standard"].vendor}' does not support JSON Schema conversion.`);
1222
1222
  return $n(e["~standard"].jsonSchema.input({ target: "draft-07" }));
1223
1223
  }, { validate: async (t) => {
1224
1224
  let n = await e["~standard"].validate(t);
@@ -1227,19 +1227,19 @@ function ti(e) {
1227
1227
  value: n.value
1228
1228
  } : {
1229
1229
  success: !1,
1230
- error: new F({
1230
+ error: new Dn({
1231
1231
  value: t,
1232
1232
  cause: n.issues
1233
1233
  })
1234
1234
  };
1235
1235
  } });
1236
1236
  }
1237
- function ni(e) {
1237
+ function ti(e) {
1238
1238
  return e["~standard"].jsonSchema != null;
1239
1239
  }
1240
- function ri(e, t) {
1240
+ function ni(e, t) {
1241
1241
  let n = t?.useReferences ?? !1;
1242
- return Qr(() => Yr(e, { $refStrategy: n ? "root" : "none" }), { validate: async (t) => {
1242
+ return Zr(() => Jr(e, { $refStrategy: n ? "root" : "none" }), { validate: async (t) => {
1243
1243
  let n = await e.safeParseAsync(t);
1244
1244
  return n.success ? {
1245
1245
  success: !0,
@@ -1250,14 +1250,14 @@ function ri(e, t) {
1250
1250
  };
1251
1251
  } });
1252
1252
  }
1253
- function ii(e, t) {
1253
+ function ri(e, t) {
1254
1254
  let n = t?.useReferences ?? !1;
1255
- return Qr(() => $n(ht(e, {
1255
+ return Zr(() => $n(mt(e, {
1256
1256
  target: "draft-7",
1257
1257
  io: "input",
1258
1258
  reused: n ? "ref" : "inline"
1259
1259
  })), { validate: async (t) => {
1260
- let n = await dt(e, t);
1260
+ let n = await ut(e, t);
1261
1261
  return n.success ? {
1262
1262
  success: !0,
1263
1263
  value: n.data
@@ -1267,27 +1267,27 @@ function ii(e, t) {
1267
1267
  };
1268
1268
  } });
1269
1269
  }
1270
- function ai(e) {
1270
+ function ii(e) {
1271
1271
  return "_zod" in e;
1272
1272
  }
1273
- function oi(e, t) {
1274
- return ai(e) ? ii(e, t) : ri(e, t);
1273
+ function ai(e, t) {
1274
+ return ii(e) ? ri(e, t) : ni(e, t);
1275
1275
  }
1276
- async function si({ value: e, schema: t, context: n }) {
1277
- let r = await ci({
1276
+ async function oi({ value: e, schema: t, context: n }) {
1277
+ let r = await si({
1278
1278
  value: e,
1279
1279
  schema: t,
1280
1280
  context: n
1281
1281
  });
1282
- if (!r.success) throw F.wrap({
1282
+ if (!r.success) throw Dn.wrap({
1283
1283
  value: e,
1284
1284
  cause: r.error,
1285
1285
  context: n
1286
1286
  });
1287
1287
  return r.value;
1288
1288
  }
1289
- async function ci({ value: e, schema: t, context: n }) {
1290
- let r = ei(t);
1289
+ async function si({ value: e, schema: t, context: n }) {
1290
+ let r = $r(t);
1291
1291
  try {
1292
1292
  if (r.validate == null) return {
1293
1293
  success: !0,
@@ -1301,7 +1301,7 @@ async function ci({ value: e, schema: t, context: n }) {
1301
1301
  rawValue: e
1302
1302
  } : {
1303
1303
  success: !1,
1304
- error: F.wrap({
1304
+ error: Dn.wrap({
1305
1305
  value: e,
1306
1306
  cause: t.error,
1307
1307
  context: n
@@ -1311,7 +1311,7 @@ async function ci({ value: e, schema: t, context: n }) {
1311
1311
  } catch (t) {
1312
1312
  return {
1313
1313
  success: !1,
1314
- error: F.wrap({
1314
+ error: Dn.wrap({
1315
1315
  value: e,
1316
1316
  cause: t,
1317
1317
  context: n
@@ -1320,21 +1320,21 @@ async function ci({ value: e, schema: t, context: n }) {
1320
1320
  };
1321
1321
  }
1322
1322
  }
1323
- async function li({ text: e, schema: t }) {
1323
+ async function ci({ text: e, schema: t }) {
1324
1324
  try {
1325
1325
  let n = Qn(e);
1326
1326
  return t == null ? {
1327
1327
  success: !0,
1328
1328
  value: n,
1329
1329
  rawValue: n
1330
- } : await ci({
1330
+ } : await si({
1331
1331
  value: n,
1332
1332
  schema: t
1333
1333
  });
1334
1334
  } catch (t) {
1335
1335
  return {
1336
1336
  success: !1,
1337
- error: Sn.isInstance(t) ? t : new Sn({
1337
+ error: xn.isInstance(t) ? t : new xn({
1338
1338
  text: e,
1339
1339
  cause: t
1340
1340
  }),
@@ -1342,15 +1342,15 @@ async function li({ text: e, schema: t }) {
1342
1342
  };
1343
1343
  }
1344
1344
  }
1345
- function ui({ stream: e, schema: t }) {
1345
+ function li({ stream: e, schema: t }) {
1346
1346
  return e.pipeThrough(new TextDecoderStream()).pipeThrough(new Hn()).pipeThrough(new TransformStream({ async transform({ data: e }, n) {
1347
- e !== "[DONE]" && n.enqueue(await li({
1347
+ e !== "[DONE]" && n.enqueue(await ci({
1348
1348
  text: e,
1349
1349
  schema: t
1350
1350
  }));
1351
1351
  } }));
1352
1352
  }
1353
- async function H(e) {
1353
+ async function ui(e) {
1354
1354
  return typeof e == "function" && (e = e()), Promise.resolve(e);
1355
1355
  }
1356
1356
  new TextDecoder();
@@ -1359,7 +1359,7 @@ var di = Object.defineProperty, fi = (e, t) => {
1359
1359
  get: t[n],
1360
1360
  enumerable: !0
1361
1361
  });
1362
- }, pi = "AI_InvalidArgumentError", mi = `vercel.ai.error.${pi}`, hi = Symbol.for(mi), gi, _i, vi = class extends (_i = P, gi = hi, _i) {
1362
+ }, pi = "AI_InvalidArgumentError", mi = `vercel.ai.error.${pi}`, hi = Symbol.for(mi), gi, _i, vi = class extends (_i = F, gi = hi, _i) {
1363
1363
  constructor({ parameter: e, value: t, message: n }) {
1364
1364
  super({
1365
1365
  name: pi,
@@ -1367,9 +1367,9 @@ var di = Object.defineProperty, fi = (e, t) => {
1367
1367
  }), this[gi] = !0, this.parameter = e, this.value = t;
1368
1368
  }
1369
1369
  static isInstance(e) {
1370
- return P.hasMarker(e, mi);
1370
+ return F.hasMarker(e, mi);
1371
1371
  }
1372
- }, yi = "AI_NoObjectGeneratedError", bi = `vercel.ai.error.${yi}`, xi = Symbol.for(bi), Si, Ci, U = class extends (Ci = P, Si = xi, Ci) {
1372
+ }, yi = "AI_NoObjectGeneratedError", bi = `vercel.ai.error.${yi}`, xi = Symbol.for(bi), Si, Ci, U = class extends (Ci = F, Si = xi, Ci) {
1373
1373
  constructor({ message: e = "No object generated.", cause: t, text: n, response: r, usage: i, finishReason: a }) {
1374
1374
  super({
1375
1375
  name: yi,
@@ -1378,9 +1378,9 @@ var di = Object.defineProperty, fi = (e, t) => {
1378
1378
  }), this[Si] = !0, this.text = n, this.response = r, this.usage = i, this.finishReason = a;
1379
1379
  }
1380
1380
  static isInstance(e) {
1381
- return P.hasMarker(e, bi);
1381
+ return F.hasMarker(e, bi);
1382
1382
  }
1383
- }, wi = "AI_UIMessageStreamError", Ti = `vercel.ai.error.${wi}`, Ei = Symbol.for(Ti), Di, Oi, ki = class extends (Oi = P, Di = Ei, Oi) {
1383
+ }, wi = "AI_UIMessageStreamError", Ti = `vercel.ai.error.${wi}`, Ei = Symbol.for(Ti), Di, Oi, ki = class extends (Oi = F, Di = Ei, Oi) {
1384
1384
  constructor({ chunkType: e, chunkId: t, message: n }) {
1385
1385
  super({
1386
1386
  name: wi,
@@ -1388,7 +1388,7 @@ var di = Object.defineProperty, fi = (e, t) => {
1388
1388
  }), this[Di] = !0, this.chunkType = e, this.chunkId = t;
1389
1389
  }
1390
1390
  static isInstance(e) {
1391
- return P.hasMarker(e, Ti);
1391
+ return F.hasMarker(e, Ti);
1392
1392
  }
1393
1393
  };
1394
1394
  function Ai({ warning: e, provider: t, model: n }) {
@@ -1447,23 +1447,23 @@ function Fi(e, t) {
1447
1447
  return n;
1448
1448
  }
1449
1449
  var W = {
1450
- array: xt,
1451
- boolean: ft,
1452
- custom: Dt,
1453
- discriminatedUnion: St,
1454
- enum: Et,
1455
- instanceof: kt,
1456
- lazy: pt,
1457
- literal: yt,
1458
- looseObject: Tt,
1459
- never: wt,
1460
- null: Ct,
1461
- number: _t,
1462
- object: vt,
1463
- record: mt,
1464
- string: gt,
1465
- union: bt,
1466
- unknown: At
1450
+ array: bt,
1451
+ boolean: dt,
1452
+ custom: Et,
1453
+ discriminatedUnion: xt,
1454
+ enum: Tt,
1455
+ instanceof: Ot,
1456
+ lazy: ft,
1457
+ literal: vt,
1458
+ looseObject: wt,
1459
+ never: Ct,
1460
+ null: St,
1461
+ number: gt,
1462
+ object: _t,
1463
+ record: pt,
1464
+ string: ht,
1465
+ union: yt,
1466
+ unknown: kt
1467
1467
  }, Ii = W.lazy(() => W.union([
1468
1468
  W.null(),
1469
1469
  W.string(),
@@ -1883,11 +1883,11 @@ async function ra(e) {
1883
1883
  value: void 0,
1884
1884
  state: "undefined-input"
1885
1885
  };
1886
- let t = await li({ text: e });
1886
+ let t = await ci({ text: e });
1887
1887
  return t.success ? {
1888
1888
  value: t.value,
1889
1889
  state: "successful-parse"
1890
- } : (t = await li({ text: na(e) }), t.success ? {
1890
+ } : (t = await ci({ text: na(e) }), t.success ? {
1891
1891
  value: t.value,
1892
1892
  state: "repaired-parse"
1893
1893
  } : {
@@ -1906,17 +1906,17 @@ var ia = () => ({
1906
1906
  },
1907
1907
  createElementStreamTransform() {}
1908
1908
  }), aa = ({ schema: e, name: t, description: n }) => {
1909
- let r = ei(e);
1909
+ let r = $r(e);
1910
1910
  return {
1911
1911
  name: "object",
1912
- responseFormat: H(r.jsonSchema).then((e) => ({
1912
+ responseFormat: ui(r.jsonSchema).then((e) => ({
1913
1913
  type: "json",
1914
1914
  schema: e,
1915
1915
  ...t != null && { name: t },
1916
1916
  ...n != null && { description: n }
1917
1917
  })),
1918
1918
  async parseCompleteOutput({ text: e }, t) {
1919
- let n = await li({ text: e });
1919
+ let n = await ci({ text: e });
1920
1920
  if (!n.success) throw new U({
1921
1921
  message: "No object generated: could not parse the response.",
1922
1922
  cause: n.error,
@@ -1925,7 +1925,7 @@ var ia = () => ({
1925
1925
  usage: t.usage,
1926
1926
  finishReason: t.finishReason
1927
1927
  });
1928
- let i = await ci({
1928
+ let i = await si({
1929
1929
  value: n.value,
1930
1930
  schema: r
1931
1931
  });
@@ -1962,10 +1962,10 @@ var ia = () => ({
1962
1962
  value: t,
1963
1963
  message: "minItems must be less than or equal to maxItems"
1964
1964
  });
1965
- let a = ei(e);
1965
+ let a = $r(e);
1966
1966
  return {
1967
1967
  name: "array",
1968
- responseFormat: H(a.jsonSchema).then((e) => {
1968
+ responseFormat: ui(a.jsonSchema).then((e) => {
1969
1969
  let { $schema: a, definitions: o, $defs: s, ...c } = e;
1970
1970
  return {
1971
1971
  type: "json",
@@ -1988,7 +1988,7 @@ var ia = () => ({
1988
1988
  };
1989
1989
  }),
1990
1990
  async parseCompleteOutput({ text: e }, r) {
1991
- let i = await li({ text: e });
1991
+ let i = await ci({ text: e });
1992
1992
  if (!i.success) throw new U({
1993
1993
  message: "No object generated: could not parse the response.",
1994
1994
  cause: i.error,
@@ -2000,7 +2000,7 @@ var ia = () => ({
2000
2000
  let o = i.value;
2001
2001
  if (typeof o != "object" || !o || !("elements" in o) || !Array.isArray(o.elements)) throw new U({
2002
2002
  message: "No object generated: response did not match schema.",
2003
- cause: new F({
2003
+ cause: new Dn({
2004
2004
  value: o,
2005
2005
  cause: "response must be an object with an elements array"
2006
2006
  }),
@@ -2024,7 +2024,7 @@ var ia = () => ({
2024
2024
  });
2025
2025
  let c = [];
2026
2026
  for (let t of o.elements) {
2027
- let n = await ci({
2027
+ let n = await si({
2028
2028
  value: t,
2029
2029
  schema: a
2030
2030
  });
@@ -2051,7 +2051,7 @@ var ia = () => ({
2051
2051
  if (typeof e != "object" || !e || !("elements" in e) || !Array.isArray(e.elements)) return;
2052
2052
  let n = t.state === "repaired-parse" && e.elements.length > 0 ? e.elements.slice(0, -1) : e.elements, r = [];
2053
2053
  for (let e of n) {
2054
- let t = await ci({
2054
+ let t = await si({
2055
2055
  value: e,
2056
2056
  schema: a
2057
2057
  });
@@ -2093,11 +2093,11 @@ function sa({ name: e, value: t }) {
2093
2093
  }
2094
2094
  }
2095
2095
  function ca({ value: e, minItems: t, maxItems: n }) {
2096
- if (t != null && e.length < t) return new F({
2096
+ if (t != null && e.length < t) return new Dn({
2097
2097
  value: e,
2098
2098
  cause: `elements array must contain at least ${t} items`
2099
2099
  });
2100
- if (n != null && e.length > n) return new F({
2100
+ if (n != null && e.length > n) return new Dn({
2101
2101
  value: e,
2102
2102
  cause: `elements array must contain at most ${n} items`
2103
2103
  });
@@ -2120,7 +2120,7 @@ var la = ({ options: e, name: t, description: n }) => ({
2120
2120
  ...n != null && { description: n }
2121
2121
  }),
2122
2122
  async parseCompleteOutput({ text: t }, n) {
2123
- let r = await li({ text: t });
2123
+ let r = await ci({ text: t });
2124
2124
  if (!r.success) throw new U({
2125
2125
  message: "No object generated: could not parse the response.",
2126
2126
  cause: r.error,
@@ -2132,7 +2132,7 @@ var la = ({ options: e, name: t, description: n }) => ({
2132
2132
  let i = r.value;
2133
2133
  if (typeof i != "object" || !i || !("result" in i) || typeof i.result != "string" || !e.includes(i.result)) throw new U({
2134
2134
  message: "No object generated: response did not match schema.",
2135
- cause: new F({
2135
+ cause: new Dn({
2136
2136
  value: i,
2137
2137
  cause: "response must be an object that contains a choice value."
2138
2138
  }),
@@ -2166,7 +2166,7 @@ var la = ({ options: e, name: t, description: n }) => ({
2166
2166
  ...t != null && { description: t }
2167
2167
  }),
2168
2168
  async parseCompleteOutput({ text: e }, t) {
2169
- let n = await li({ text: e });
2169
+ let n = await ci({ text: e });
2170
2170
  if (!n.success) throw new U({
2171
2171
  message: "No object generated: could not parse the response.",
2172
2172
  cause: n.error,
@@ -2232,7 +2232,7 @@ function ma({ status: e, statusText: t, headers: n, stream: r, consumeSseStream:
2232
2232
  headers: da(n, pa)
2233
2233
  });
2234
2234
  }
2235
- var ha = W.record(W.string(), Ii.optional()), ga = Zr(() => oi(W.union([
2235
+ var ha = W.record(W.string(), Ii.optional()), ga = Xr(() => ai(W.union([
2236
2236
  W.looseObject({
2237
2237
  type: W.literal("text-start"),
2238
2238
  id: W.string(),
@@ -2549,7 +2549,7 @@ function Ta({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2549
2549
  async function h(e) {
2550
2550
  if (e != null) {
2551
2551
  let n = r.message.metadata == null ? e : Fi(r.message.metadata, e);
2552
- t != null && await si({
2552
+ t != null && await oi({
2553
2553
  value: n,
2554
2554
  schema: t,
2555
2555
  context: {
@@ -2862,7 +2862,7 @@ function Ta({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2862
2862
  default: if (_a(e)) {
2863
2863
  if (n?.[e.type] != null) {
2864
2864
  let t = r.message.parts.findIndex((t) => "id" in t && "data" in t && t.id === e.id && t.type === e.type), i = t >= 0 ? t : r.message.parts.length;
2865
- await si({
2865
+ await oi({
2866
2866
  value: e.data,
2867
2867
  schema: n[e.type],
2868
2868
  context: {
@@ -2971,7 +2971,7 @@ I({
2971
2971
  });
2972
2972
  async function ka({ response: e, url: t, fallbackMessage: n }) {
2973
2973
  let r = await e.text();
2974
- return new nn({
2974
+ return new tn({
2975
2975
  message: r || n,
2976
2976
  url: t,
2977
2977
  requestBodyValues: void 0,
@@ -3009,7 +3009,7 @@ var Ma = class {
3009
3009
  this.api = e, this.credentials = t, this.headers = n, this.body = r, this.fetch = i, this.prepareSendMessagesRequest = a, this.prepareReconnectToStreamRequest = o;
3010
3010
  }
3011
3011
  async sendMessages({ abortSignal: e, ...t }) {
3012
- let n = await H(this.body), r = await H(this.headers), i = await H(this.credentials), a = {
3012
+ let n = await ui(this.body), r = await ui(this.headers), i = await ui(this.credentials), a = {
3013
3013
  ...Gn(r),
3014
3014
  ...Gn(t.headers)
3015
3015
  }, o = await this.prepareSendMessagesRequest?.call(this, {
@@ -3047,11 +3047,11 @@ var Ma = class {
3047
3047
  url: s,
3048
3048
  fallbackMessage: "Failed to fetch the chat response."
3049
3049
  });
3050
- if (!d.body) throw new ln({ message: "The response body is empty." });
3050
+ if (!d.body) throw new cn({ message: "The response body is empty." });
3051
3051
  return this.processResponseStream(d.body);
3052
3052
  }
3053
3053
  async reconnectToStream(e) {
3054
- let t = await H(this.body), n = await H(this.headers), r = await H(this.credentials), i = {
3054
+ let t = await ui(this.body), n = await ui(this.headers), r = await ui(this.credentials), i = {
3055
3055
  ...Gn(n),
3056
3056
  ...Gn(e.headers)
3057
3057
  }, a = await this.prepareReconnectToStreamRequest?.call(this, {
@@ -3076,7 +3076,7 @@ var Ma = class {
3076
3076
  url: o,
3077
3077
  fallbackMessage: "Failed to fetch the chat response."
3078
3078
  });
3079
- if (!l.body) throw new ln({ message: "The response body is empty." });
3079
+ if (!l.body) throw new cn({ message: "The response body is empty." });
3080
3080
  return this.processResponseStream(l.body);
3081
3081
  }
3082
3082
  }, Na = class extends Ma {
@@ -3084,7 +3084,7 @@ var Ma = class {
3084
3084
  super(e);
3085
3085
  }
3086
3086
  processResponseStream(e) {
3087
- return ui({
3087
+ return li({
3088
3088
  stream: e,
3089
3089
  schema: ga
3090
3090
  }).pipeThrough(new TransformStream({ async transform(e, t) {
@@ -3376,7 +3376,7 @@ var La = /* @__PURE__ */ t(((e, t) => {
3376
3376
  };
3377
3377
  }
3378
3378
  t.exports = n;
3379
- })), q = /* @__PURE__ */ e(o(), 1), Ra = /* @__PURE__ */ e(La(), 1), J = Ge(), za = (e, t, n) => {
3379
+ })), q = /* @__PURE__ */ e(o(), 1), Ra = /* @__PURE__ */ e(La(), 1), J = We(), za = (e, t, n) => {
3380
3380
  if (!t.has(e)) throw TypeError("Cannot " + n);
3381
3381
  }, Y = (e, t, n) => (za(e, t, "read from private field"), n ? n.call(e) : t.get(e)), X = (e, t, n) => {
3382
3382
  if (t.has(e)) throw TypeError("Cannot add the same private member more than once");
@@ -3567,7 +3567,7 @@ function ao(e, t) {
3567
3567
  "<marimo-ui-element"
3568
3568
  ].some((e) => t.includes(e))) : !1;
3569
3569
  }
3570
- var oo = class extends O {
3570
+ var oo = class extends k {
3571
3571
  title = "Cell Outputs";
3572
3572
  mentionPrefix = "@";
3573
3573
  contextType = "cell-output";
@@ -3576,7 +3576,7 @@ var oo = class extends O {
3576
3576
  super(), this.store = e;
3577
3577
  }
3578
3578
  getItems() {
3579
- let e = this.store.get(ke), t = [];
3579
+ let e = this.store.get(Oe), t = [];
3580
3580
  for (let n of e.cellIds) {
3581
3581
  let r = lo(n, e), i = r.cellOutput;
3582
3582
  if (!i) continue;
@@ -3600,9 +3600,9 @@ var oo = class extends O {
3600
3600
  label: `@${n}`,
3601
3601
  displayLabel: n,
3602
3602
  detail: `${t.outputType} output`,
3603
- boost: t.outputType === "media" ? T.HIGH : T.MEDIUM,
3603
+ boost: t.outputType === "media" ? D.HIGH : D.MEDIUM,
3604
3604
  type: this.contextType,
3605
- section: j.CELL_OUTPUT,
3605
+ section: M.CELL_OUTPUT,
3606
3606
  apply: `@${n}`,
3607
3607
  info: () => {
3608
3608
  let e = document.createElement("div");
@@ -3639,7 +3639,7 @@ var oo = class extends O {
3639
3639
  outputType: t.outputType,
3640
3640
  mimetype: t.output.mimetype
3641
3641
  }, o = `Cell Code:\n${i}\n\n`;
3642
- return t.outputType === "text" && t.processedContent ? o += `Output:\n${t.processedContent}` : t.outputType === "media" && (o += `Media Output: Contains ${t.output.mimetype} content`, t.imageUrl && (o += `\nImage URL: ${t.imageUrl}`)), A({
3642
+ return t.outputType === "text" && t.processedContent ? o += `Output:\n${t.processedContent}` : t.outputType === "media" && (o += `Media Output: Contains ${t.output.mimetype} content`, t.imageUrl && (o += `\nImage URL: ${t.imageUrl}`)), j({
3643
3643
  type: this.contextType,
3644
3644
  data: a,
3645
3645
  details: o
@@ -3654,7 +3654,7 @@ async function so(e, t, n) {
3654
3654
  let i = e.filter((e) => e.shouldDownloadImage && e.outputType === "media");
3655
3655
  if (i.length === 0) return [];
3656
3656
  let a = i.flatMap((e) => {
3657
- let i = document.getElementById(Pe.create(t));
3657
+ let i = document.getElementById(Ne.create(t));
3658
3658
  return i ? {
3659
3659
  cellId: t,
3660
3660
  cellName: n,
@@ -3667,15 +3667,15 @@ async function so(e, t, n) {
3667
3667
  type: "file",
3668
3668
  filename: `${n}-output-screenshot`,
3669
3669
  mediaType: "image/png",
3670
- url: await ce(e.element)
3670
+ url: await oe(e.element)
3671
3671
  })));
3672
3672
  } catch (e) {
3673
3673
  return r.error("Error downloading cell output images:", e), [];
3674
3674
  }
3675
3675
  }
3676
3676
  function co(e) {
3677
- if (S(e)) return null;
3678
- let t = e.mimetype, n = ao(t, String(e.data)) ? "media" : "text", r = Be(e), i, a = !1;
3677
+ if (C(e)) return null;
3678
+ let t = e.mimetype, n = ao(t, String(e.data)) ? "media" : "text", r = ze(e), i, a = !1;
3679
3679
  return n === "media" && (typeof e.data == "string" && e.data.startsWith("data:") || typeof e.data == "string" && e.data.startsWith("http") ? i = e.data : a = !0), {
3680
3680
  processedContent: r,
3681
3681
  imageUrl: i,
@@ -3685,10 +3685,10 @@ function co(e) {
3685
3685
  };
3686
3686
  }
3687
3687
  function lo(e, t, n) {
3688
- let { includeConsoleOutput: r = !1 } = n || {}, i = t.cellRuntime[e], a = t.cellData[e], o = t.cellIds.indexOf(e), s = Me(a.name, o), c;
3688
+ let { includeConsoleOutput: r = !1 } = n || {}, i = t.cellRuntime[e], a = t.cellData[e], o = t.cellIds.indexOf(e), s = je(a.name, o), c;
3689
3689
  r && (c = i.consoleOutputs.map((e) => co(e)).filter((e) => e !== null));
3690
3690
  let l, u = i.output;
3691
- return u && !S(u) && (l = co(u) ?? void 0), {
3691
+ return u && !C(u) && (l = co(u) ?? void 0), {
3692
3692
  cellId: e,
3693
3693
  cellName: s,
3694
3694
  cellCode: a.code,
@@ -3700,14 +3700,14 @@ function lo(e, t, n) {
3700
3700
  //#region src/core/ai/context/providers/error.ts
3701
3701
  function uo(e, t) {
3702
3702
  let n = [`Code:\n${e.cellCode}`];
3703
- if (e.tracebackHtml && n.push(`Traceback:\n${Oe(e.tracebackHtml)}`), e.errorData.length > 0 && n.push(e.errorData.map((e) => je(e)).join("\n\n")), e.errorData.some((e) => e.type === "sql-error")) {
3704
- let r = le(e.cellId, t);
3703
+ if (e.tracebackHtml && n.push(`Traceback:\n${De(e.tracebackHtml)}`), e.errorData.length > 0 && n.push(e.errorData.map((e) => Ae(e)).join("\n\n")), e.errorData.some((e) => e.type === "sql-error")) {
3704
+ let r = se(e.cellId, t);
3705
3705
  r && n.push(`Database schema:\n${r}`);
3706
3706
  }
3707
3707
  return n.join("\n\n");
3708
3708
  }
3709
3709
  function fo(e, t) {
3710
- return A({
3710
+ return j({
3711
3711
  type: "error",
3712
3712
  data: {
3713
3713
  name: e.cellName || `Cell ${e.cellId}`,
@@ -3717,12 +3717,12 @@ function fo(e, t) {
3717
3717
  });
3718
3718
  }
3719
3719
  function po(e) {
3720
- return e.errorData.length === 1 ? Ne(e.errorData[0]) : e.errorData.length > 1 ? `${e.errorData.length} errors` : e.tracebackHtml ? Oe(e.tracebackHtml).trim().split("\n").find((e) => e.trim())?.trim() || "traceback" : "error";
3720
+ return e.errorData.length === 1 ? Me(e.errorData[0]) : e.errorData.length > 1 ? `${e.errorData.length} errors` : e.tracebackHtml ? De(e.tracebackHtml).trim().split("\n").find((e) => e.trim())?.trim() || "traceback" : "error";
3721
3721
  }
3722
3722
  function mo(e) {
3723
3723
  return `Error: ${e.cellName || `Cell ${e.cellId}`}`;
3724
3724
  }
3725
- var ho = new re("error", "errors"), go = class extends O {
3725
+ var ho = new ae("error", "errors"), go = class extends k {
3726
3726
  title = "Errors";
3727
3727
  mentionPrefix = "@";
3728
3728
  contextType = "error";
@@ -3731,7 +3731,7 @@ var ho = new re("error", "errors"), go = class extends O {
3731
3731
  super(), this.store = e;
3732
3732
  }
3733
3733
  getItems() {
3734
- let e = Ae(this.store);
3734
+ let e = ke(this.store);
3735
3735
  if (e.length === 0) return [];
3736
3736
  let t = [{
3737
3737
  uri: this.asURI("all"),
@@ -3764,7 +3764,7 @@ var ho = new re("error", "errors"), go = class extends O {
3764
3764
  detail: `${t} ${ho.pluralize(t)}`,
3765
3765
  type: "error",
3766
3766
  apply: "@error://all",
3767
- section: j.ERROR,
3767
+ section: M.ERROR,
3768
3768
  info: () => {
3769
3769
  let e = document.createElement("div");
3770
3770
  e.classList.add("mo-cm-tooltip", "docs-documentation", "min-w-[200px]", "flex", "flex-col", "gap-1", "p-2");
@@ -3784,24 +3784,24 @@ var ho = new re("error", "errors"), go = class extends O {
3784
3784
  detail: po(t),
3785
3785
  type: "error"
3786
3786
  }),
3787
- section: j.ERROR
3787
+ section: M.ERROR
3788
3788
  };
3789
3789
  }
3790
3790
  return {
3791
3791
  label: "Error",
3792
3792
  displayLabel: "Error",
3793
- section: j.ERROR
3793
+ section: M.ERROR
3794
3794
  };
3795
3795
  }
3796
3796
  formatContext(e) {
3797
3797
  return (e.data.type === "all-errors" ? e.data.errors : [e.data.error]).map((e) => fo(e, this.store)).join("\n\n");
3798
3798
  }
3799
- }, _o = d(), vo = {
3799
+ }, _o = de(), vo = {
3800
3800
  maxDepth: 3,
3801
3801
  maxResults: 20,
3802
3802
  defaultResultsLimit: 5,
3803
3803
  includeDirectories: !1
3804
- }, yo = class extends O {
3804
+ }, yo = class extends k {
3805
3805
  title = "Files";
3806
3806
  mentionPrefix = "#";
3807
3807
  contextType = "file";
@@ -3903,8 +3903,8 @@ var ho = new re("error", "errors"), go = class extends O {
3903
3903
  return {
3904
3904
  ...this.createBasicCompletion(e),
3905
3905
  type: "file",
3906
- section: j.FILE,
3907
- boost: t.isDirectory ? T.MEDIUM : T.LOW,
3906
+ section: M.FILE,
3907
+ boost: t.isDirectory ? D.MEDIUM : D.LOW,
3908
3908
  detail: t.path,
3909
3909
  displayLabel: `${i} ${n}`,
3910
3910
  apply: async (e, i, a, o) => {
@@ -3918,7 +3918,7 @@ var ho = new re("error", "errors"), go = class extends O {
3918
3918
  description: e.message
3919
3919
  }), null));
3920
3920
  if (!l) return;
3921
- let u = l.mimeType || "text/plain", d = Ve({
3921
+ let u = l.mimeType || "text/plain", d = Be({
3922
3922
  contents: l.contents ?? "",
3923
3923
  mimeType: u,
3924
3924
  isBase64: l.isBase64 ?? !1
@@ -3927,7 +3927,7 @@ var ho = new re("error", "errors"), go = class extends O {
3927
3927
  from: a,
3928
3928
  to: o,
3929
3929
  insert: ""
3930
- } }), Mt(e);
3930
+ } }), jt(e);
3931
3931
  },
3932
3932
  info: () => {
3933
3933
  let e = document.createElement("div");
@@ -3941,7 +3941,7 @@ var ho = new re("error", "errors"), go = class extends O {
3941
3941
  }
3942
3942
  formatContext(e) {
3943
3943
  let { data: t, name: n } = e;
3944
- return A({
3944
+ return j({
3945
3945
  type: this.contextType,
3946
3946
  data: {
3947
3947
  name: n,
@@ -3951,7 +3951,7 @@ var ho = new re("error", "errors"), go = class extends O {
3951
3951
  details: t.isDirectory ? "Directory containing files and subdirectories" : "File"
3952
3952
  });
3953
3953
  }
3954
- }, bo = class extends O {
3954
+ }, bo = class extends k {
3955
3955
  title = "Tables";
3956
3956
  mentionPrefix = "@";
3957
3957
  contextType = "data";
@@ -3981,7 +3981,7 @@ var ho = new re("error", "errors"), go = class extends O {
3981
3981
  l += `${t}\n`;
3982
3982
  }
3983
3983
  }
3984
- return A({
3984
+ return j({
3985
3985
  type: this.contextType,
3986
3986
  data: {
3987
3987
  name: o,
@@ -3996,12 +3996,12 @@ var ho = new re("error", "errors"), go = class extends O {
3996
3996
  label: `@${t}`,
3997
3997
  displayLabel: t,
3998
3998
  detail: n.source === "memory" ? "in-memory" : n.source,
3999
- boost: n.source_type === "local" ? T.LOCAL_TABLE : T.REMOTE_TABLE,
4000
- type: ue(n),
3999
+ boost: n.source_type === "local" ? D.LOCAL_TABLE : D.REMOTE_TABLE,
4000
+ type: E(n),
4001
4001
  apply: `@${t}`,
4002
4002
  section: {
4003
- name: ue(n) === "dataframe" ? "Dataframe" : "Table",
4004
- rank: j.TABLE.rank
4003
+ name: E(n) === "dataframe" ? "Dataframe" : "Table",
4004
+ rank: M.TABLE.rank
4005
4005
  },
4006
4006
  info: () => this.createTableInfoElement(t, n)
4007
4007
  };
@@ -4059,7 +4059,7 @@ var ho = new re("error", "errors"), go = class extends O {
4059
4059
  return e.classList.add("text-xs", "px-1.5", "py-0.5", "rounded-full", "font-medium", ...t.split(" ")), e;
4060
4060
  }
4061
4061
  }
4062
- }, xo = class extends O {
4062
+ }, xo = class extends k {
4063
4063
  title = "Variables";
4064
4064
  mentionPrefix = "@";
4065
4065
  contextType = "variable";
@@ -4086,13 +4086,13 @@ var ho = new re("error", "errors"), go = class extends O {
4086
4086
  displayLabel: n.name,
4087
4087
  detail: n.dataType ?? "",
4088
4088
  type: this.contextType,
4089
- section: j.VARIABLE,
4090
- info: () => se(n)
4089
+ section: M.VARIABLE,
4090
+ info: () => T(n)
4091
4091
  };
4092
4092
  }
4093
4093
  formatContext(e) {
4094
4094
  let { data: t } = e, { variable: n } = t;
4095
- return A({
4095
+ return j({
4096
4096
  type: this.contextType,
4097
4097
  data: {
4098
4098
  name: n.name,
@@ -4105,11 +4105,11 @@ var ho = new re("error", "errors"), go = class extends O {
4105
4105
  //#endregion
4106
4106
  //#region src/core/ai/context/context.ts
4107
4107
  function So(e) {
4108
- let t = e.get(te), n = e.get(w), r = e.get(x);
4109
- return new E().register(new bo(n)).register(new xo(r, n)).register(new go(e)).register(new oo(e)).register(new k(t.connectionsMap, n));
4108
+ let t = e.get(ce), n = e.get(ee), r = e.get(ue);
4109
+ return new O().register(new bo(n)).register(new xo(r, n)).register(new go(e)).register(new oo(e)).register(new A(t.connectionsMap, n));
4110
4110
  }
4111
4111
  function Co() {
4112
- return new yo(Ee());
4112
+ return new yo(Te());
4113
4113
  }
4114
4114
  //#endregion
4115
4115
  //#region src/components/editor/ai/completion-utils.ts
@@ -4129,7 +4129,7 @@ async function To(e) {
4129
4129
  type: "file",
4130
4130
  mediaType: e.type,
4131
4131
  filename: e.name,
4132
- url: await ze(e, "dataUrl")
4132
+ url: await Re(e, "dataUrl")
4133
4133
  })));
4134
4134
  }
4135
4135
  function Eo(e) {
@@ -4141,7 +4141,7 @@ function Eo(e) {
4141
4141
  //#endregion
4142
4142
  //#region src/components/chat/chat-components.tsx
4143
4143
  var Do = (e) => {
4144
- let t = (0, N.c)(6), { attachment: n } = e;
4144
+ let t = (0, P.c)(6), { attachment: n } = e;
4145
4145
  if (n.mediaType?.startsWith("image/")) {
4146
4146
  let e = n.filename || "Attachment", r;
4147
4147
  return t[0] !== n.url || t[1] !== e ? (r = /* @__PURE__ */ (0, J.jsx)("img", {
@@ -4151,14 +4151,14 @@ var Do = (e) => {
4151
4151
  }), t[0] = n.url, t[1] = e, t[2] = r) : r = t[2], r;
4152
4152
  }
4153
4153
  let r;
4154
- t[3] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ (0, J.jsx)(Le, { className: "h-3 w-3 mt-0.5" }), t[3] = r) : r = t[3];
4154
+ t[3] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ (0, J.jsx)(Ie, { className: "h-3 w-3 mt-0.5" }), t[3] = r) : r = t[3];
4155
4155
  let i = n.filename || "Attachment", a;
4156
4156
  return t[4] === i ? a = t[5] : (a = /* @__PURE__ */ (0, J.jsxs)("div", {
4157
4157
  className: "flex flex-row gap-1 items-center text-xs",
4158
4158
  children: [r, i]
4159
4159
  }), t[4] = i, t[5] = a), a;
4160
4160
  }, Oo = (e) => {
4161
- let t = (0, N.c)(15), { icon: n, title: r, subtitle: i, href: a } = e, o;
4161
+ let t = (0, P.c)(15), { icon: n, title: r, subtitle: i, href: a } = e, o;
4162
4162
  t[0] === r ? o = t[1] : (o = /* @__PURE__ */ (0, J.jsx)("span", {
4163
4163
  className: "truncate font-medium",
4164
4164
  children: r
@@ -4179,7 +4179,7 @@ var Do = (e) => {
4179
4179
  s
4180
4180
  ] }), t[4] = n, t[5] = o, t[6] = s, t[7] = c) : c = t[7];
4181
4181
  let l = c;
4182
- if (a && Ce(a)) {
4182
+ if (a && Se(a)) {
4183
4183
  let e = i ?? r, n;
4184
4184
  return t[8] !== l || t[9] !== a || t[10] !== e ? (n = /* @__PURE__ */ (0, J.jsx)("a", {
4185
4185
  href: a,
@@ -4197,12 +4197,12 @@ var Do = (e) => {
4197
4197
  children: l
4198
4198
  }), t[12] = l, t[13] = u, t[14] = d) : d = t[14], d;
4199
4199
  }, ko = (e) => {
4200
- let t = (0, N.c)(13), { reasoning: n, index: r, isStreaming: i } = e, a = r === void 0 ? 0 : r, o = i !== void 0 && i, [s, c] = q.useState("");
4200
+ let t = (0, P.c)(13), { reasoning: n, index: r, isStreaming: i } = e, a = r === void 0 ? 0 : r, o = i !== void 0 && i, [s, c] = q.useState("");
4201
4201
  if (!n && !o) return null;
4202
4202
  let l = o ? "reasoning" : s, u;
4203
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, J.jsx)(zt, { className: "h-3 w-3" }), t[0] = u) : u = t[0];
4203
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, J.jsx)(Rt, { className: "h-3 w-3" }), t[0] = u) : u = t[0];
4204
4204
  let d = o ? "Thinking" : "View reasoning", f = n.length > 0 && ` (${n.length} chars)`, p;
4205
- t[1] !== d || t[2] !== f ? (p = /* @__PURE__ */ (0, J.jsx)(C, {
4205
+ t[1] !== d || t[2] !== f ? (p = /* @__PURE__ */ (0, J.jsx)(w, {
4206
4206
  className: "text-xs text-muted-foreground hover:bg-muted/50 px-2 py-1 h-auto rounded-sm [&[data-state=open]>svg]:rotate-180",
4207
4207
  children: /* @__PURE__ */ (0, J.jsxs)("span", {
4208
4208
  className: "flex items-center gap-2",
@@ -4214,13 +4214,13 @@ var Do = (e) => {
4214
4214
  })
4215
4215
  }), t[1] = d, t[2] = f, t[3] = p) : p = t[3];
4216
4216
  let m;
4217
- t[4] === n ? m = t[5] : (m = /* @__PURE__ */ (0, J.jsx)(de, {
4217
+ t[4] === n ? m = t[5] : (m = /* @__PURE__ */ (0, J.jsx)(le, {
4218
4218
  className: "pb-2 px-2",
4219
4219
  children: /* @__PURE__ */ (0, J.jsx)("div", {
4220
4220
  className: "bg-muted/30 border border-muted/50 rounded-md p-3 italic text-muted-foreground/90 relative",
4221
4221
  children: /* @__PURE__ */ (0, J.jsx)("div", {
4222
4222
  className: "pr-6",
4223
- children: /* @__PURE__ */ (0, J.jsx)(oe, { content: n })
4223
+ children: /* @__PURE__ */ (0, J.jsx)(ie, { content: n })
4224
4224
  })
4225
4225
  })
4226
4226
  }), t[4] = n, t[5] = m);
@@ -4231,7 +4231,7 @@ var Do = (e) => {
4231
4231
  children: [p, m]
4232
4232
  }), t[6] = p, t[7] = m, t[8] = h) : h = t[8];
4233
4233
  let g;
4234
- return t[9] !== a || t[10] !== l || t[11] !== h ? (g = /* @__PURE__ */ (0, J.jsx)(b, {
4234
+ return t[9] !== a || t[10] !== l || t[11] !== h ? (g = /* @__PURE__ */ (0, J.jsx)(x, {
4235
4235
  type: "single",
4236
4236
  collapsible: !0,
4237
4237
  className: "w-full mb-2",
@@ -4248,7 +4248,7 @@ function Ao(e) {
4248
4248
  //#endregion
4249
4249
  //#region src/components/chat/tool-call/tool-args.tsx
4250
4250
  var jo = (e) => {
4251
- let t = (0, N.c)(9), { input: n, label: r } = e, i = r === void 0 ? "Tool Request" : r;
4251
+ let t = (0, P.c)(9), { input: n, label: r } = e, i = r === void 0 ? "Tool Request" : r;
4252
4252
  if (n == null) return null;
4253
4253
  let a;
4254
4254
  t[0] === i ? a = t[1] : (a = /* @__PURE__ */ (0, J.jsx)("h3", {
@@ -4268,12 +4268,12 @@ var jo = (e) => {
4268
4268
  children: [a, s]
4269
4269
  }), t[6] = a, t[7] = s, t[8] = c) : c = t[8], c;
4270
4270
  }, Mo = (e) => {
4271
- let t = (0, N.c)(27), { toolName: n, input: r, approval: o, onApprove: s, className: c } = e, l;
4271
+ let t = (0, P.c)(27), { toolName: n, input: r, approval: o, onApprove: s, className: c } = e, l;
4272
4272
  t[0] === c ? l = t[1] : (l = i("rounded-md border border-(--amber-6) bg-(--amber-2) p-3 space-y-3", c), t[0] = c, t[1] = l);
4273
4273
  let u;
4274
4274
  t[2] === n ? u = t[3] : (u = Ao(n), t[2] = n, t[3] = u);
4275
4275
  let d = `Approval required for ${u}`, f;
4276
- t[4] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, J.jsx)(Kt, { className: "h-4 w-4 text-(--amber-11) mt-0.5 shrink-0" }), t[4] = f) : f = t[4];
4276
+ t[4] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, J.jsx)(Gt, { className: "h-4 w-4 text-(--amber-11) mt-0.5 shrink-0" }), t[4] = f) : f = t[4];
4277
4277
  let p;
4278
4278
  t[5] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ (0, J.jsx)("span", {
4279
4279
  className: "font-semibold",
@@ -4334,51 +4334,51 @@ var jo = (e) => {
4334
4334
  ]
4335
4335
  }), t[21] = l, t[22] = y, t[23] = d, t[24] = h, t[25] = g, t[26] = b) : b = t[26], b;
4336
4336
  }, No = (e) => {
4337
- let t = (0, N.c)(28), { toolName: n, input: r, errorText: a, isLive: o, className: s } = e, [c, l] = q.useState(o), u = q.useRef(o), d, f;
4337
+ let t = (0, P.c)(28), { toolName: n, input: r, errorText: a, isLive: o, className: s } = e, [c, l] = q.useState(o), u = q.useRef(o), d, f;
4338
4338
  t[0] === o ? (d = t[1], f = t[2]) : (d = () => {
4339
4339
  u.current && !o && l(!1), u.current = o;
4340
4340
  }, f = [o], t[0] = o, t[1] = d, t[2] = f), q.useEffect(d, f);
4341
- let p;
4342
- t[3] === s ? p = t[4] : (p = i("rounded-md border border-(--red-6) bg-(--red-2)", s), t[3] = s, t[4] = p);
4343
4341
  let m;
4344
- t[5] === Symbol.for("react.memo_cache_sentinel") ? (m = () => l(Po), t[5] = m) : m = t[5];
4342
+ t[3] === s ? m = t[4] : (m = i("rounded-md border border-(--red-6) bg-(--red-2)", s), t[3] = s, t[4] = m);
4345
4343
  let h;
4346
- t[6] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, J.jsx)(y, { className: "h-3.5 w-3.5 shrink-0" }), t[6] = h) : h = t[6];
4344
+ t[5] === Symbol.for("react.memo_cache_sentinel") ? (h = () => l(Po), t[5] = h) : h = t[5];
4347
4345
  let g;
4348
- t[7] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, J.jsx)("span", {
4346
+ t[6] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, J.jsx)(p, { className: "h-3.5 w-3.5 shrink-0" }), t[6] = g) : g = t[6];
4347
+ let _;
4348
+ t[7] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ (0, J.jsx)("span", {
4349
4349
  className: "font-semibold",
4350
4350
  children: "Failed:"
4351
- }), t[7] = g) : g = t[7];
4352
- let _;
4353
- t[8] === n ? _ = t[9] : (_ = Ao(n), t[8] = n, t[9] = _);
4351
+ }), t[7] = _) : _ = t[7];
4354
4352
  let v;
4355
- t[10] === _ ? v = t[11] : (v = /* @__PURE__ */ (0, J.jsxs)("span", {
4353
+ t[8] === n ? v = t[9] : (v = Ao(n), t[8] = n, t[9] = v);
4354
+ let y;
4355
+ t[10] === v ? y = t[11] : (y = /* @__PURE__ */ (0, J.jsxs)("span", {
4356
4356
  className: "flex-1 text-left",
4357
4357
  children: [
4358
- g,
4358
+ _,
4359
4359
  " ",
4360
4360
  /* @__PURE__ */ (0, J.jsx)("code", {
4361
4361
  className: "font-mono",
4362
- children: _
4362
+ children: v
4363
4363
  })
4364
4364
  ]
4365
- }), t[10] = _, t[11] = v);
4365
+ }), t[10] = v, t[11] = y);
4366
4366
  let b = c && "rotate-180", x;
4367
4367
  t[12] === b ? x = t[13] : (x = i("h-3.5 w-3.5 shrink-0 transition-transform", b), t[12] = b, t[13] = x);
4368
4368
  let S;
4369
- t[14] === x ? S = t[15] : (S = /* @__PURE__ */ (0, J.jsx)(he, { className: x }), t[14] = x, t[15] = S);
4369
+ t[14] === x ? S = t[15] : (S = /* @__PURE__ */ (0, J.jsx)(me, { className: x }), t[14] = x, t[15] = S);
4370
4370
  let C;
4371
- t[16] !== c || t[17] !== S || t[18] !== v ? (C = /* @__PURE__ */ (0, J.jsxs)("button", {
4371
+ t[16] !== c || t[17] !== S || t[18] !== y ? (C = /* @__PURE__ */ (0, J.jsxs)("button", {
4372
4372
  type: "button",
4373
- onClick: m,
4373
+ onClick: h,
4374
4374
  className: "w-full flex items-center gap-2 px-3 py-2 text-xs text-(--red-11) hover:bg-(--red-3) rounded-md transition-colors",
4375
4375
  "aria-expanded": c,
4376
4376
  children: [
4377
- h,
4378
- v,
4377
+ g,
4378
+ y,
4379
4379
  S
4380
4380
  ]
4381
- }), t[16] = c, t[17] = S, t[18] = v, t[19] = C) : C = t[19];
4381
+ }), t[16] = c, t[17] = S, t[18] = y, t[19] = C) : C = t[19];
4382
4382
  let w;
4383
4383
  t[20] !== a || t[21] !== r || t[22] !== c ? (w = c && /* @__PURE__ */ (0, J.jsxs)("div", {
4384
4384
  className: "px-3 pb-3 space-y-3 border-t border-(--red-6)/40 pt-3",
@@ -4391,10 +4391,10 @@ var jo = (e) => {
4391
4391
  })] })]
4392
4392
  }), t[20] = a, t[21] = r, t[22] = c, t[23] = w) : w = t[23];
4393
4393
  let T;
4394
- return t[24] !== C || t[25] !== w || t[26] !== p ? (T = /* @__PURE__ */ (0, J.jsxs)("div", {
4395
- className: p,
4394
+ return t[24] !== C || t[25] !== w || t[26] !== m ? (T = /* @__PURE__ */ (0, J.jsxs)("div", {
4395
+ className: m,
4396
4396
  children: [C, w]
4397
- }), t[24] = C, t[25] = w, t[26] = p, t[27] = T) : T = t[27], T;
4397
+ }), t[24] = C, t[25] = w, t[26] = m, t[27] = T) : T = t[27], T;
4398
4398
  };
4399
4399
  function Po(e) {
4400
4400
  return !e;
@@ -4402,53 +4402,53 @@ function Po(e) {
4402
4402
  //#endregion
4403
4403
  //#region src/components/chat/tool-call/tool-result.tsx
4404
4404
  function Fo(e) {
4405
- return e == null || typeof e == "object" && Je(e);
4406
- }
4407
- var Io = Tt({
4408
- status: gt().default("success"),
4409
- auth_required: ft().default(!1),
4410
- action_url: Ot().optional(),
4411
- next_steps: Ot().optional(),
4412
- meta: Ot().optional(),
4413
- message: gt().nullish()
4405
+ return e == null || typeof e == "object" && qe(e);
4406
+ }
4407
+ var Io = wt({
4408
+ status: ht().default("success"),
4409
+ auth_required: dt().default(!1),
4410
+ action_url: Dt().optional(),
4411
+ next_steps: Dt().optional(),
4412
+ meta: Dt().optional(),
4413
+ message: ht().nullish()
4414
4414
  }), Lo = (e) => {
4415
- let t = (0, N.c)(12), { data: n } = e, r;
4415
+ let t = (0, P.c)(12), { data: n } = e, r;
4416
4416
  if (t[0] !== n) {
4417
- let { status: e, auth_required: i, action_url: a, meta: o, next_steps: s, message: c, ...l } = n, u;
4418
- t[2] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, J.jsx)("h3", {
4417
+ let { status: e, auth_required: i, action_url: a, meta: o, next_steps: s, message: c, ...l } = n, d;
4418
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0, J.jsx)("h3", {
4419
4419
  className: "text-xs font-semibold text-muted-foreground",
4420
4420
  children: "Tool Result"
4421
- }), t[2] = u) : u = t[2];
4422
- let d;
4423
- t[3] === e ? d = t[4] : (d = /* @__PURE__ */ (0, J.jsx)("span", {
4421
+ }), t[2] = d) : d = t[2];
4422
+ let f;
4423
+ t[3] === e ? f = t[4] : (f = /* @__PURE__ */ (0, J.jsx)("span", {
4424
4424
  className: "text-xs px-2 py-0.5 bg-(--grass-2) text-(--grass-11) rounded-full font-medium capitalize",
4425
4425
  children: e
4426
- }), t[3] = e, t[4] = d);
4427
- let f;
4428
- t[5] === i ? f = t[6] : (f = i && /* @__PURE__ */ (0, J.jsx)("span", {
4426
+ }), t[3] = e, t[4] = f);
4427
+ let p;
4428
+ t[5] === i ? p = t[6] : (p = i && /* @__PURE__ */ (0, J.jsx)("span", {
4429
4429
  className: "text-xs px-2 py-0.5 bg-(--amber-2) text-(--amber-11) rounded-full",
4430
4430
  children: "Auth Required"
4431
- }), t[5] = i, t[6] = f);
4432
- let p;
4433
- t[7] !== d || t[8] !== f ? (p = /* @__PURE__ */ (0, J.jsxs)("div", {
4431
+ }), t[5] = i, t[6] = p);
4432
+ let m;
4433
+ t[7] !== f || t[8] !== p ? (m = /* @__PURE__ */ (0, J.jsxs)("div", {
4434
4434
  className: "flex items-center justify-between",
4435
- children: [u, /* @__PURE__ */ (0, J.jsxs)("div", {
4435
+ children: [d, /* @__PURE__ */ (0, J.jsxs)("div", {
4436
4436
  className: "flex items-center gap-2",
4437
- children: [d, f]
4437
+ children: [f, p]
4438
4438
  })]
4439
- }), t[7] = d, t[8] = f, t[9] = p) : p = t[9];
4440
- let m;
4441
- t[10] === c ? m = t[11] : (m = c && /* @__PURE__ */ (0, J.jsxs)("div", {
4439
+ }), t[7] = f, t[8] = p, t[9] = m) : m = t[9];
4440
+ let h;
4441
+ t[10] === c ? h = t[11] : (h = c && /* @__PURE__ */ (0, J.jsxs)("div", {
4442
4442
  className: "flex items-start gap-2",
4443
- children: [/* @__PURE__ */ (0, J.jsx)(pe, { className: "h-3 w-3 text-(--blue-11) mt-0.5 shrink-0" }), /* @__PURE__ */ (0, J.jsx)("div", {
4443
+ children: [/* @__PURE__ */ (0, J.jsx)(u, { className: "h-3 w-3 text-(--blue-11) mt-0.5 shrink-0" }), /* @__PURE__ */ (0, J.jsx)("div", {
4444
4444
  className: "text-xs text-foreground",
4445
4445
  children: c
4446
4446
  })]
4447
- }), t[10] = c, t[11] = m), r = /* @__PURE__ */ (0, J.jsxs)("div", {
4447
+ }), t[10] = c, t[11] = h), r = /* @__PURE__ */ (0, J.jsxs)("div", {
4448
4448
  className: "flex flex-col gap-1.5",
4449
4449
  children: [
4450
- p,
4451
4450
  m,
4451
+ h,
4452
4452
  l && /* @__PURE__ */ (0, J.jsx)("div", {
4453
4453
  className: "space-y-3",
4454
4454
  children: Object.entries(l).map(zo)
@@ -4458,7 +4458,7 @@ var Io = Tt({
4458
4458
  } else r = t[1];
4459
4459
  return r;
4460
4460
  }, Ro = (e) => {
4461
- let t = (0, N.c)(8), { result: n } = e, r;
4461
+ let t = (0, P.c)(8), { result: n } = e, r;
4462
4462
  t[0] === n ? r = t[1] : (r = Io.safeParse(n), t[0] = n, t[1] = r);
4463
4463
  let i = r;
4464
4464
  if (i.success) {
@@ -4499,30 +4499,30 @@ var Bo = {
4499
4499
  "input-available",
4500
4500
  "approval-responded"
4501
4501
  ]), Ho = (e) => {
4502
- let t = (0, N.c)(5), { state: n, interrupted: r } = e;
4502
+ let t = (0, P.c)(5), { state: n, interrupted: r } = e;
4503
4503
  if (r) {
4504
4504
  let e;
4505
- return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(Vt, { className: "h-3 w-3 text-muted-foreground" }), t[0] = e) : e = t[0], e;
4505
+ return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(Bt, { className: "h-3 w-3 text-muted-foreground" }), t[0] = e) : e = t[0], e;
4506
4506
  }
4507
4507
  switch (n) {
4508
4508
  case "input-streaming":
4509
4509
  case "input-available":
4510
4510
  case "approval-responded": {
4511
4511
  let e;
4512
- return t[1] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(m, { className: "h-3 w-3 animate-spin" }), t[1] = e) : e = t[1], e;
4512
+ return t[1] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(v, { className: "h-3 w-3 animate-spin" }), t[1] = e) : e = t[1], e;
4513
4513
  }
4514
4514
  case "output-available": {
4515
4515
  let e;
4516
- return t[2] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(Bt, { className: "h-3 w-3 text-(--grass-11)" }), t[2] = e) : e = t[2], e;
4516
+ return t[2] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(zt, { className: "h-3 w-3 text-(--grass-11)" }), t[2] = e) : e = t[2], e;
4517
4517
  }
4518
4518
  case "output-denied": {
4519
4519
  let e;
4520
- return t[3] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(Rt, { className: "h-3 w-3 text-muted-foreground" }), t[3] = e) : e = t[3], e;
4520
+ return t[3] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(Lt, { className: "h-3 w-3 text-muted-foreground" }), t[3] = e) : e = t[3], e;
4521
4521
  }
4522
4522
  default: {
4523
- He(n);
4523
+ Ve(n);
4524
4524
  let e;
4525
- return t[4] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(ee, { className: "h-3 w-3" }), t[4] = e) : e = t[4], e;
4525
+ return t[4] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(g, { className: "h-3 w-3" }), t[4] = e) : e = t[4], e;
4526
4526
  }
4527
4527
  }
4528
4528
  };
@@ -4533,11 +4533,11 @@ function Uo(e) {
4533
4533
  case "input-streaming":
4534
4534
  case "input-available":
4535
4535
  case "approval-responded": return "";
4536
- default: return He(e), "";
4536
+ default: return Ve(e), "";
4537
4537
  }
4538
4538
  }
4539
4539
  var Wo = (e) => {
4540
- let t = (0, N.c)(34), { toolName: n, state: r, input: a, result: o, approval: s, index: c, className: l, isActive: u } = e, d = c === void 0 ? 0 : c, f = u === void 0 || u, p;
4540
+ let t = (0, P.c)(34), { toolName: n, state: r, input: a, result: o, approval: s, index: c, className: l, isActive: u } = e, d = c === void 0 ? 0 : c, f = u === void 0 || u, p;
4541
4541
  t[0] !== f || t[1] !== r ? (p = !f && Vo.has(r), t[0] = f, t[1] = r, t[2] = p) : p = t[2];
4542
4542
  let m = p, h = `tool-${d}`, g;
4543
4543
  t[3] === l ? g = t[4] : (g = i("w-full", l), t[3] = l, t[4] = g);
@@ -4548,15 +4548,15 @@ var Wo = (e) => {
4548
4548
  state: r,
4549
4549
  interrupted: m
4550
4550
  }), t[8] = m, t[9] = r, t[10] = v) : v = t[10];
4551
- let y = m ? "Interrupted" : Bo[r], x;
4552
- t[11] === n ? x = t[12] : (x = Ao(n), t[11] = n, t[12] = x);
4551
+ let y = m ? "Interrupted" : Bo[r], b;
4552
+ t[11] === n ? b = t[12] : (b = Ao(n), t[11] = n, t[12] = b);
4553
4553
  let S;
4554
- t[13] === x ? S = t[14] : (S = /* @__PURE__ */ (0, J.jsx)("code", {
4554
+ t[13] === b ? S = t[14] : (S = /* @__PURE__ */ (0, J.jsx)("code", {
4555
4555
  className: "font-mono text-xs",
4556
- children: x
4557
- }), t[13] = x, t[14] = S);
4558
- let w;
4559
- t[15] !== S || t[16] !== v || t[17] !== y ? (w = /* @__PURE__ */ (0, J.jsxs)("span", {
4556
+ children: b
4557
+ }), t[13] = b, t[14] = S);
4558
+ let C;
4559
+ t[15] !== S || t[16] !== v || t[17] !== y ? (C = /* @__PURE__ */ (0, J.jsxs)("span", {
4560
4560
  className: "flex items-center gap-1",
4561
4561
  children: [
4562
4562
  v,
@@ -4564,14 +4564,14 @@ var Wo = (e) => {
4564
4564
  ":",
4565
4565
  S
4566
4566
  ]
4567
- }), t[15] = S, t[16] = v, t[17] = y, t[18] = w) : w = t[18];
4567
+ }), t[15] = S, t[16] = v, t[17] = y, t[18] = C) : C = t[18];
4568
4568
  let T;
4569
- t[19] !== w || t[20] !== _ ? (T = /* @__PURE__ */ (0, J.jsx)(C, {
4569
+ t[19] !== C || t[20] !== _ ? (T = /* @__PURE__ */ (0, J.jsx)(w, {
4570
4570
  className: _,
4571
- children: w
4572
- }), t[19] = w, t[20] = _, t[21] = T) : T = t[21];
4571
+ children: C
4572
+ }), t[19] = C, t[20] = _, t[21] = T) : T = t[21];
4573
4573
  let E;
4574
- t[22] !== s || t[23] !== a || t[24] !== o || t[25] !== r ? (E = /* @__PURE__ */ (0, J.jsx)(de, {
4574
+ t[22] !== s || t[23] !== a || t[24] !== o || t[25] !== r ? (E = /* @__PURE__ */ (0, J.jsx)(le, {
4575
4575
  className: "py-2 px-2",
4576
4576
  children: /* @__PURE__ */ (0, J.jsx)(Go, {
4577
4577
  state: r,
@@ -4587,14 +4587,14 @@ var Wo = (e) => {
4587
4587
  children: [T, E]
4588
4588
  }), t[27] = T, t[28] = E, t[29] = D) : D = t[29];
4589
4589
  let O;
4590
- return t[30] !== D || t[31] !== h || t[32] !== g ? (O = /* @__PURE__ */ (0, J.jsx)(b, {
4590
+ return t[30] !== D || t[31] !== h || t[32] !== g ? (O = /* @__PURE__ */ (0, J.jsx)(x, {
4591
4591
  type: "single",
4592
4592
  collapsible: !0,
4593
4593
  className: g,
4594
4594
  children: D
4595
4595
  }, h), t[30] = D, t[31] = h, t[32] = g, t[33] = O) : O = t[33], O;
4596
4596
  }, Go = (e) => {
4597
- let t = (0, N.c)(16), { state: n, input: r, result: i, approval: a } = e;
4597
+ let t = (0, P.c)(16), { state: n, input: r, result: i, approval: a } = e;
4598
4598
  switch (n) {
4599
4599
  case "input-streaming":
4600
4600
  case "input-available":
@@ -4627,10 +4627,10 @@ var Wo = (e) => {
4627
4627
  children: [e, i]
4628
4628
  }), t[13] = e, t[14] = i, t[15] = o) : o = t[15], o;
4629
4629
  }
4630
- default: return He(n), null;
4630
+ default: return Ve(n), null;
4631
4631
  }
4632
4632
  }, Ko = (e) => {
4633
- let t = (0, N.c)(27), { toolName: n, state: r, result: i, errorText: a, input: o, approval: s, onApprove: c, index: l, className: u, isLive: d, isActive: f } = e, p = d === void 0 || d, m = f === void 0 || f;
4633
+ let t = (0, P.c)(27), { toolName: n, state: r, result: i, errorText: a, input: o, approval: s, onApprove: c, index: l, className: u, isLive: d, isActive: f } = e, p = d === void 0 || d, m = f === void 0 || f;
4634
4634
  switch (r) {
4635
4635
  case "approval-requested": {
4636
4636
  if (s != null && c != null) {
@@ -4680,7 +4680,7 @@ var Wo = (e) => {
4680
4680
  isActive: m
4681
4681
  }), t[18] = s, t[19] = u, t[20] = l, t[21] = o, t[22] = m, t[23] = i, t[24] = r, t[25] = n, t[26] = e) : e = t[26], e;
4682
4682
  }
4683
- default: return He(r), null;
4683
+ default: return Ve(r), null;
4684
4684
  }
4685
4685
  }, qo = ({ message: e, isStreamingReasoning: t, isLast: n, isActive: i, addToolApprovalResponse: a }) => {
4686
4686
  return /* @__PURE__ */ (0, J.jsx)(J.Fragment, { children: e.parts.map((e, t) => o(e, t)) });
@@ -4700,7 +4700,7 @@ var Wo = (e) => {
4700
4700
  }, s);
4701
4701
  if (Yo(o)) return r.debug("Found data part", o), null;
4702
4702
  switch (o.type) {
4703
- case "text": return o.text.includes("<marimo-") ? /* @__PURE__ */ (0, J.jsx)(q.Fragment, { children: f({ html: o.text }) }, s) : /* @__PURE__ */ (0, J.jsx)(oe, { content: o.text }, s);
4703
+ case "text": return o.text.includes("<marimo-") ? /* @__PURE__ */ (0, J.jsx)(q.Fragment, { children: m({ html: o.text }) }, s) : /* @__PURE__ */ (0, J.jsx)(ie, { content: o.text }, s);
4704
4704
  case "reasoning": return /* @__PURE__ */ (0, J.jsx)(ko, {
4705
4705
  reasoning: o.text,
4706
4706
  index: s,
@@ -4724,12 +4724,12 @@ var Wo = (e) => {
4724
4724
  isActive: i
4725
4725
  }, s);
4726
4726
  case "source-document": return /* @__PURE__ */ (0, J.jsx)(Oo, {
4727
- icon: /* @__PURE__ */ (0, J.jsx)(u, { className: "h-3 w-3 shrink-0" }),
4727
+ icon: /* @__PURE__ */ (0, J.jsx)(b, { className: "h-3 w-3 shrink-0" }),
4728
4728
  title: o.title,
4729
4729
  subtitle: o.filename
4730
4730
  }, s);
4731
4731
  case "source-url": return /* @__PURE__ */ (0, J.jsx)(Oo, {
4732
- icon: /* @__PURE__ */ (0, J.jsx)(Fe, { className: "h-3 w-3 shrink-0" }),
4732
+ icon: /* @__PURE__ */ (0, J.jsx)(Pe, { className: "h-3 w-3 shrink-0" }),
4733
4733
  title: o.title ?? o.url,
4734
4734
  subtitle: o.title ? o.url : void 0,
4735
4735
  href: o.url
@@ -4739,7 +4739,7 @@ var Wo = (e) => {
4739
4739
  children: o.kind
4740
4740
  }, s);
4741
4741
  case "step-start": return null;
4742
- default: return He(o), null;
4742
+ default: return Ve(o), null;
4743
4743
  }
4744
4744
  }
4745
4745
  };
@@ -4752,11 +4752,11 @@ function Yo(e) {
4752
4752
  //#endregion
4753
4753
  //#region ../node_modules/.pnpm/@marimo-team+codemirror-ai@0.3.10_@codemirror+state@6.7.6_@codemirror+view@6.43.13/node_modules/@marimo-team/codemirror-ai/dist/utils/facet.js
4754
4754
  function Xo(e) {
4755
- return at.define({ combine: (t) => t[0] ?? e });
4755
+ return it.define({ combine: (t) => t[0] ?? e });
4756
4756
  }
4757
4757
  //#endregion
4758
4758
  //#region ../node_modules/.pnpm/@marimo-team+codemirror-ai@0.3.10_@codemirror+state@6.7.6_@codemirror+view@6.43.13/node_modules/@marimo-team/codemirror-ai/dist/prompt-history/extension.js
4759
- var Zo = Xo({}), Qo = et.define(), $o = et.define(), es = 50, ts = $e.define({
4759
+ var Zo = Xo({}), Qo = $e.define(), $o = $e.define(), es = 50, ts = Qe.define({
4760
4760
  create() {
4761
4761
  return {
4762
4762
  prompts: [],
@@ -4815,7 +4815,7 @@ function is(e = {}) {
4815
4815
  navigationIndex: -1,
4816
4816
  originalText: ""
4817
4817
  })), Zo.of(t ?? {})];
4818
- return n && r.push(ct.of([{
4818
+ return n && r.push(st.of([{
4819
4819
  key: "ArrowUp",
4820
4820
  run: ns
4821
4821
  }, {
@@ -4825,7 +4825,7 @@ function is(e = {}) {
4825
4825
  }
4826
4826
  //#endregion
4827
4827
  //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_6b342e94e942eed410acc909cdad6bca/node_modules/@marimo-team/codemirror-mcp/dist/state.js
4828
- var as = et.define(), Q = $e.define({
4828
+ var as = $e.define(), Q = Qe.define({
4829
4829
  create() {
4830
4830
  return /* @__PURE__ */ new Map();
4831
4831
  },
@@ -4837,7 +4837,7 @@ var as = et.define(), Q = $e.define({
4837
4837
  }
4838
4838
  return r;
4839
4839
  }
4840
- }), os = $e.define({
4840
+ }), os = Qe.define({
4841
4841
  create() {
4842
4842
  return {
4843
4843
  onResourceClick: void 0,
@@ -4849,8 +4849,8 @@ var as = et.define(), Q = $e.define({
4849
4849
  update(e) {
4850
4850
  return e;
4851
4851
  }
4852
- }), ss = et.define();
4853
- $e.define({
4852
+ }), ss = $e.define();
4853
+ Qe.define({
4854
4854
  create() {
4855
4855
  return /* @__PURE__ */ new Map();
4856
4856
  },
@@ -4898,7 +4898,7 @@ function $(e) {
4898
4898
  }
4899
4899
  //#endregion
4900
4900
  //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_6b342e94e942eed410acc909cdad6bca/node_modules/@marimo-team/codemirror-mcp/dist/resources/decoration.js
4901
- var us = class extends it {
4901
+ var us = class extends rt {
4902
4902
  resource;
4903
4903
  view;
4904
4904
  constructor(e, t) {
@@ -4919,7 +4919,7 @@ var us = class extends it {
4919
4919
  e.preventDefault(), e.stopPropagation(), i(this.resource);
4920
4920
  }), e;
4921
4921
  }
4922
- }, ds = class extends it {
4922
+ }, ds = class extends rt {
4923
4923
  uri;
4924
4924
  view;
4925
4925
  constructor(e, t) {
@@ -4939,12 +4939,12 @@ function fs(e) {
4939
4939
  let a = e.state.doc.sliceString(r, i);
4940
4940
  for (let i of $(a)) {
4941
4941
  let a = r + i.index, o = i[0].slice(1), s = t.get(o);
4942
- s ? n.push(ut.replace({ widget: new us(s, e) }).range(a, a + i[0].length)) : n.push(ut.replace({ widget: new ds(o, e) }).range(a, a + i[0].length));
4942
+ s ? n.push(lt.replace({ widget: new us(s, e) }).range(a, a + i[0].length)) : n.push(lt.replace({ widget: new ds(o, e) }).range(a, a + i[0].length));
4943
4943
  }
4944
4944
  }
4945
- return ut.set(n);
4945
+ return lt.set(n);
4946
4946
  }
4947
- var ps = nt.fromClass(class {
4947
+ var ps = tt.fromClass(class {
4948
4948
  decorations;
4949
4949
  constructor(e) {
4950
4950
  this.decorations = fs(e);
@@ -4984,7 +4984,7 @@ function hs(e, t, n, r = 0) {
4984
4984
  return null;
4985
4985
  }
4986
4986
  function gs(e) {
4987
- return st((t, n) => {
4987
+ return ot((t, n) => {
4988
4988
  let { from: r, text: i } = t.state.doc.lineAt(n), a = hs(i, n, t.state.field(Q), r);
4989
4989
  return a ? {
4990
4990
  pos: a.start,
@@ -5054,8 +5054,8 @@ function xs(e, t) {
5054
5054
  }
5055
5055
  return null;
5056
5056
  }
5057
- var Ss = lt.transactionFilter.of((e) => {
5058
- let t = e.annotation(ot.userEvent);
5057
+ var Ss = ct.transactionFilter.of((e) => {
5058
+ let t = e.annotation(at.userEvent);
5059
5059
  if (!t) return e;
5060
5060
  let n = e.startState.selection.main;
5061
5061
  if (!n.empty) return e;
@@ -5237,11 +5237,11 @@ function Os(e, t) {
5237
5237
  };
5238
5238
  }
5239
5239
  function ks(e, t = {}) {
5240
- return nt.fromClass(Os(e, t));
5240
+ return tt.fromClass(Os(e, t));
5241
5241
  }
5242
5242
  //#endregion
5243
5243
  //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_6b342e94e942eed410acc909cdad6bca/node_modules/@marimo-team/codemirror-mcp/dist/theme.js
5244
- var As = rt.baseTheme({
5244
+ var As = nt.baseTheme({
5245
5245
  ".cm-resource-widget": {
5246
5246
  background: "light-dark(rgba(86,156,214,0.08),rgba(86,156,214,0.18))",
5247
5247
  borderRadius: "4px",
@@ -5274,10 +5274,10 @@ function Fs(e) {
5274
5274
  let { language: t, store: n, onAddFiles: i } = e, a = () => Ps(n);
5275
5275
  return [
5276
5276
  t.data.of({ autocomplete: cs(async () => a(), (e) => e.type === js ? Ns : So(n).getProvider(e.type)?.formatCompletion(e) || {}) }),
5277
- tt.high(ct.of([{
5277
+ et.high(st.of([{
5278
5278
  key: "Tab",
5279
5279
  preventDefault: !0,
5280
- run: (e) => jt(e)
5280
+ run: (e) => At(e)
5281
5281
  }])),
5282
5282
  _o.of({ addAttachment: (e) => i?.([e]) }),
5283
5283
  ...i ? [t.data.of({ autocomplete: Co().createCompletionSource() })] : [],
@@ -5304,14 +5304,14 @@ function Is(e) {
5304
5304
  let t = document.createElement("div");
5305
5305
  return t.textContent = e, { dom: t };
5306
5306
  }
5307
- Ze("marimo:ai-language", "python", D);
5308
- var Ls = "marimo:ai-prompt-history", Rs = new Te(xt(gt()), () => []), zs = (e) => {
5309
- let t = (0, N.c)(35), { value: n, placeholder: r, inputRef: a, className: o, onChange: s, onSubmit: c, onKeyDown: l, onClose: u, onAddFiles: d, additionalCompletions: f, maxHeight: p } = e, m = c, h = u, g = Ye(), { theme: _ } = qe(), v;
5307
+ Xe("marimo:ai-language", "python", S);
5308
+ var Ls = "marimo:ai-prompt-history", Rs = new we(bt(ht()), () => []), zs = (e) => {
5309
+ let t = (0, P.c)(35), { value: n, placeholder: r, inputRef: a, className: o, onChange: s, onSubmit: c, onKeyDown: l, onClose: u, onAddFiles: d, additionalCompletions: f, maxHeight: p } = e, m = c, h = u, g = Je(), { theme: _ } = Ke(), v;
5310
5310
  t[0] === f ? v = t[1] : (v = (e) => f ? wo([f.triggerCompletionRegex], f.completions)(e) : null, t[0] = f, t[1] = v);
5311
- let y = Xe(v), b, x, S, C;
5311
+ let y = Ye(v), b, x, S, C;
5312
5312
  if (t[2] !== y || t[3] !== d || t[4] !== g) {
5313
- let e = Pt();
5314
- t[9] === Symbol.for("react.memo_cache_sentinel") ? (b = Nt({}), t[9] = b) : b = t[9], x = e, S = Fs({
5313
+ let e = Nt();
5314
+ t[9] === Symbol.for("react.memo_cache_sentinel") ? (b = Mt({}), t[9] = b) : b = t[9], x = e, S = Fs({
5315
5315
  language: e.language,
5316
5316
  store: g,
5317
5317
  onAddFiles: d
@@ -5323,9 +5323,9 @@ var Ls = "marimo:ai-prompt-history", Rs = new Te(xt(gt()), () => []), zs = (e) =
5323
5323
  save: Vs
5324
5324
  } }), t[10] = w) : w = t[10];
5325
5325
  let T;
5326
- t[11] === Symbol.for("react.memo_cache_sentinel") ? (T = Ft(), t[11] = T) : T = t[11];
5326
+ t[11] === Symbol.for("react.memo_cache_sentinel") ? (T = Pt(), t[11] = T) : T = t[11];
5327
5327
  let E;
5328
- t[12] === m ? E = t[13] : (E = tt.highest(ct.of([{
5328
+ t[12] === m ? E = t[13] : (E = et.highest(st.of([{
5329
5329
  preventDefault: !0,
5330
5330
  stopPropagation: !0,
5331
5331
  any: (e, t) => {
@@ -5349,7 +5349,7 @@ var Ls = "marimo:ai-prompt-history", Rs = new Te(xt(gt()), () => []), zs = (e) =
5349
5349
  }
5350
5350
  }])), t[12] = m, t[13] = E);
5351
5351
  let D;
5352
- t[14] === h ? D = t[15] : (D = ct.of([{
5352
+ t[14] === h ? D = t[15] : (D = st.of([{
5353
5353
  key: "Escape",
5354
5354
  preventDefault: !0,
5355
5355
  stopPropagation: !0,
@@ -5362,27 +5362,27 @@ var Ls = "marimo:ai-prompt-history", Rs = new Te(xt(gt()), () => []), zs = (e) =
5362
5362
  S,
5363
5363
  C,
5364
5364
  w,
5365
- rt.lineWrapping,
5365
+ nt.lineWrapping,
5366
5366
  T,
5367
5367
  E,
5368
5368
  D
5369
5369
  ], t[16] = b, t[17] = x, t[18] = S, t[19] = C, t[20] = E, t[21] = D, t[22] = O) : O = t[22];
5370
- let ee = O, k;
5371
- t[23] === o ? k = t[24] : (k = i("flex-1 font-sans overflow-auto my-1", o), t[23] = o, t[24] = k);
5372
- let te = _ === "dark" ? "dark" : "light", A = r || "Generate with AI, @ to include context", ne;
5373
- return t[25] !== ee || t[26] !== a || t[27] !== p || t[28] !== s || t[29] !== l || t[30] !== k || t[31] !== te || t[32] !== A || t[33] !== n ? (ne = /* @__PURE__ */ (0, J.jsx)(It, {
5370
+ let k = O, A;
5371
+ t[23] === o ? A = t[24] : (A = i("flex-1 font-sans overflow-auto my-1", o), t[23] = o, t[24] = A);
5372
+ let ee = _ === "dark" ? "dark" : "light", j = r || "Generate with AI, @ to include context", te;
5373
+ return t[25] !== k || t[26] !== a || t[27] !== p || t[28] !== s || t[29] !== l || t[30] !== A || t[31] !== ee || t[32] !== j || t[33] !== n ? (te = /* @__PURE__ */ (0, J.jsx)(Ft, {
5374
5374
  ref: a,
5375
- className: k,
5375
+ className: A,
5376
5376
  width: "100%",
5377
5377
  maxHeight: p,
5378
5378
  value: n,
5379
5379
  basicSetup: !1,
5380
- extensions: ee,
5380
+ extensions: k,
5381
5381
  onChange: s,
5382
5382
  onKeyDown: l,
5383
- theme: te,
5384
- placeholder: A
5385
- }), t[25] = ee, t[26] = a, t[27] = p, t[28] = s, t[29] = l, t[30] = k, t[31] = te, t[32] = A, t[33] = n, t[34] = ne) : ne = t[34], ne;
5383
+ theme: ee,
5384
+ placeholder: j
5385
+ }), t[25] = k, t[26] = a, t[27] = p, t[28] = s, t[29] = l, t[30] = A, t[31] = ee, t[32] = j, t[33] = n, t[34] = te) : te = t[34], te;
5386
5386
  };
5387
5387
  function Bs() {
5388
5388
  return Rs.get(Ls);
@@ -5392,11 +5392,11 @@ function Vs(e) {
5392
5392
  }
5393
5393
  //#endregion
5394
5394
  //#region src/plugins/impl/chat/chat-ui.tsx
5395
- var Hs = _, Us = vt({
5396
- type: yt("stream_chunk"),
5397
- message_id: gt(),
5398
- content: Ot().nullable().transform((e) => e),
5399
- is_final: ft().optional()
5395
+ var Hs = d, Us = _t({
5396
+ type: vt("stream_chunk"),
5397
+ message_id: ht(),
5398
+ content: Dt().nullable().transform((e) => e),
5399
+ is_final: dt().optional()
5400
5400
  });
5401
5401
  function Ws(e, t) {
5402
5402
  let { controllerRef: n, activeRequestIdRef: i } = t, a = n.current;
@@ -5408,7 +5408,7 @@ function Ws(e, t) {
5408
5408
  }), "dropped-stale") : (e.content && a.enqueue(e.content), e.is_final ? (a.close(), n.current = null, i.current = null, "closed") : "enqueued");
5409
5409
  }
5410
5410
  var Gs = (e) => {
5411
- let [t, o] = (0, q.useState)(""), [s, c] = (0, q.useState)(e.config), [u, d] = (0, q.useState)(e.config), [f, p] = (0, q.useState)(void 0), m = (0, q.useRef)(null), g = (0, q.useRef)(null), _ = (0, q.useRef)(null), v = (0, q.useRef)(null);
5411
+ let [t, o] = (0, q.useState)(""), [s, c] = (0, q.useState)(e.config), [u, d] = (0, q.useState)(e.config), [f, p] = (0, q.useState)(void 0), m = (0, q.useRef)(null), h = (0, q.useRef)(null), g = (0, q.useRef)(null), v = (0, q.useRef)(null);
5412
5412
  Object.keys(e.config).some((t) => e.config[t] !== u[t]) && (c(e.config), d(e.config));
5413
5413
  let y = (0, q.useRef)(s);
5414
5414
  (0, q.useLayoutEffect)(() => {
@@ -5416,7 +5416,7 @@ var Gs = (e) => {
5416
5416
  }, [s]);
5417
5417
  let b = (0, q.useRef)(null), x = (0, q.useRef)(null), S = (0, q.useRef)(null), [C, w] = (0, q.useState)(null), T = () => {
5418
5418
  S.current = null, w(null);
5419
- }, { data: E } = Lt(async () => (await e.get_chat_history({})).messages, []), D = e.value.length > 0 ? e.value : E, { messages: O, sendMessage: ee, setMessages: k, status: te, stop: A, error: re, regenerate: j, clearError: ae, addToolApprovalResponse: oe } = eo({
5419
+ }, { data: E } = It(async () => (await e.get_chat_history({})).messages, []), D = e.value.length > 0 ? e.value : E, { messages: O, sendMessage: k, setMessages: A, status: ee, stop: j, error: M, regenerate: re, clearError: ie, addToolApprovalResponse: ae } = eo({
5420
5420
  sendAutomaticallyWhen: ({ messages: e }) => Eo(e),
5421
5421
  transport: new Na({ fetch: async (t, n) => {
5422
5422
  if (n === void 0) return fetch(t);
@@ -5432,7 +5432,7 @@ var Gs = (e) => {
5432
5432
  let t = i.messages.map((e) => ({
5433
5433
  ...e,
5434
5434
  content: e.parts?.map((e) => "text" in e ? e.text : "").join("\n")
5435
- })), n = ie();
5435
+ })), n = te();
5436
5436
  T();
5437
5437
  let s = new ReadableStream({
5438
5438
  start(t) {
@@ -5492,7 +5492,7 @@ var Gs = (e) => {
5492
5492
  r.error("An error occurred:", e);
5493
5493
  }
5494
5494
  });
5495
- n(e.host, Re.TYPE, (e) => {
5495
+ n(e.host, Le.TYPE, (e) => {
5496
5496
  let t = Us.safeParse(e.detail.message);
5497
5497
  if (t.success) {
5498
5498
  if (t.data.content && t.data.message_id === x.current) {
@@ -5505,28 +5505,28 @@ var Gs = (e) => {
5505
5505
  });
5506
5506
  }
5507
5507
  });
5508
- let se = te === "submitted" || te === "streaming", ce = (t) => {
5508
+ let oe = ee === "submitted" || ee === "streaming", se = (t) => {
5509
5509
  let n = O.findIndex((e) => e.id === t);
5510
5510
  if (n !== -1) {
5511
5511
  let r = O.filter((e) => e.id !== t);
5512
- e.delete_chat_message({ index: n }), k(r), e.setValue(r), r.length === 0 && T();
5512
+ e.delete_chat_message({ index: n }), A(r), e.setValue(r), r.length === 0 && T();
5513
5513
  }
5514
- }, le = Array.isArray(e.allowAttachments) && e.allowAttachments.length > 0 || e.allowAttachments === !0, ue = {
5514
+ }, ce = Array.isArray(e.allowAttachments) && e.allowAttachments.length > 0 || e.allowAttachments === !0, le = {
5515
5515
  triggerCompletionRegex: /^\/(\w+)?/,
5516
5516
  completions: e.prompts.map((e) => ({
5517
5517
  label: `/${e}`,
5518
5518
  displayLabel: e,
5519
5519
  apply: e
5520
5520
  }))
5521
- }, de = e.prompts.length > 0 ? "Type your message here, / for prompts" : "Type your message here...";
5521
+ }, ue = e.prompts.length > 0 ? "Type your message here, / for prompts" : "Type your message here...";
5522
5522
  (0, q.useEffect)(() => {
5523
5523
  v.current?.scrollTo({
5524
5524
  top: v.current.scrollHeight,
5525
5525
  behavior: "smooth"
5526
5526
  });
5527
5527
  }, [O.length, v]);
5528
- let fe = () => {
5529
- let e = _.current?.view;
5528
+ let de = () => {
5529
+ let e = g.current?.view;
5530
5530
  if (e) {
5531
5531
  let t = e.state.doc.length;
5532
5532
  e.dispatch({ changes: {
@@ -5549,9 +5549,9 @@ var Gs = (e) => {
5549
5549
  size: "icon",
5550
5550
  disabled: O.length === 0,
5551
5551
  onClick: () => {
5552
- k([]), e.setValue([]), e.delete_chat_history({}), ae(), T();
5552
+ A([]), e.setValue([]), e.delete_chat_history({}), ie(), T();
5553
5553
  },
5554
- children: /* @__PURE__ */ (0, J.jsx)(Ut, { className: "h-3 w-3" })
5554
+ children: /* @__PURE__ */ (0, J.jsx)(Ht, { className: "h-3 w-3" })
5555
5555
  })
5556
5556
  }),
5557
5557
  /* @__PURE__ */ (0, J.jsxs)("div", {
@@ -5561,7 +5561,7 @@ var Gs = (e) => {
5561
5561
  O.length === 0 && /* @__PURE__ */ (0, J.jsxs)("div", {
5562
5562
  className: "flex flex-col items-center justify-center h-full text-muted-foreground text-center p-4",
5563
5563
  children: [
5564
- /* @__PURE__ */ (0, J.jsx)(zt, { className: "h-12 w-12 mb-4" }),
5564
+ /* @__PURE__ */ (0, J.jsx)(Rt, { className: "h-12 w-12 mb-4" }),
5565
5565
  /* @__PURE__ */ (0, J.jsx)("h3", {
5566
5566
  className: "text-lg font-semibold mb-2",
5567
5567
  children: "No messages yet"
@@ -5580,10 +5580,10 @@ var Gs = (e) => {
5580
5580
  className: `max-w-[80%] p-3 rounded-lg ${e.role === "user" ? "bg-(--sky-11) text-(--slate-1) whitespace-pre-wrap" : "bg-(--slate-4) text-(--slate-12)"}`,
5581
5581
  children: qo({
5582
5582
  message: e,
5583
- isStreamingReasoning: te === "streaming",
5583
+ isStreamingReasoning: ee === "streaming",
5584
5584
  isLast: r,
5585
- isActive: se,
5586
- addToolApprovalResponse: r ? oe : void 0
5585
+ isActive: oe,
5586
+ addToolApprovalResponse: r ? ae : void 0
5587
5587
  })
5588
5588
  }), /* @__PURE__ */ (0, J.jsxs)("div", {
5589
5589
  className: "flex justify-end text-xs gap-2 opacity-0 group-hover:opacity-100 focus-within:opacity-100",
@@ -5594,27 +5594,27 @@ var Gs = (e) => {
5594
5594
  }), /* @__PURE__ */ (0, J.jsx)("button", {
5595
5595
  type: "button",
5596
5596
  "aria-label": "Delete message",
5597
- onClick: () => ce(e.id),
5597
+ onClick: () => se(e.id),
5598
5598
  className: "text-xs text-(--slate-9) hover:text-(--slate-11)",
5599
- children: /* @__PURE__ */ (0, J.jsx)(h, { className: "h-3 w-3 text-(--red-9)" })
5599
+ children: /* @__PURE__ */ (0, J.jsx)(_, { className: "h-3 w-3 text-(--red-9)" })
5600
5600
  })]
5601
5601
  })]
5602
5602
  }, e.id);
5603
5603
  }),
5604
- se && /* @__PURE__ */ (0, J.jsx)("div", {
5604
+ oe && /* @__PURE__ */ (0, J.jsx)("div", {
5605
5605
  className: "flex items-center justify-center mb-4",
5606
5606
  children: /* @__PURE__ */ (0, J.jsx)(ne, { size: "small" })
5607
5607
  }),
5608
- re && /* @__PURE__ */ (0, J.jsxs)("div", {
5608
+ M && /* @__PURE__ */ (0, J.jsxs)("div", {
5609
5609
  className: "flex items-center justify-center space-x-2 mb-4",
5610
- children: [/* @__PURE__ */ (0, J.jsx)(Ke, { error: re }), /* @__PURE__ */ (0, J.jsx)(a, {
5610
+ children: [/* @__PURE__ */ (0, J.jsx)(Ge, { error: M }), /* @__PURE__ */ (0, J.jsx)(a, {
5611
5611
  variant: "outline",
5612
5612
  size: "sm",
5613
- onClick: () => j(),
5613
+ onClick: () => re(),
5614
5614
  children: "Retry"
5615
5615
  })]
5616
5616
  }),
5617
- C && !se && !re && /* @__PURE__ */ (0, J.jsx)("div", {
5617
+ C && !oe && !M && /* @__PURE__ */ (0, J.jsx)("div", {
5618
5618
  className: "flex justify-center py-2",
5619
5619
  children: /* @__PURE__ */ (0, J.jsx)("span", {
5620
5620
  className: "text-xs text-muted-foreground",
@@ -5627,15 +5627,15 @@ var Gs = (e) => {
5627
5627
  onSubmit: async (n) => {
5628
5628
  if (n.preventDefault(), e.disabled) return;
5629
5629
  let r = f ? await To(f) : void 0;
5630
- ee({
5630
+ k({
5631
5631
  role: "user",
5632
5632
  parts: [{
5633
5633
  type: "text",
5634
5634
  text: t
5635
5635
  }, ...r ?? []]
5636
- }), fe();
5636
+ }), de();
5637
5637
  },
5638
- ref: g,
5638
+ ref: h,
5639
5639
  inert: e.disabled || void 0,
5640
5640
  className: i("flex w-full border-t border-(--slate-6) px-2 py-1 items-center", e.disabled && "opacity-50 cursor-not-allowed"),
5641
5641
  children: [
@@ -5647,23 +5647,23 @@ var Gs = (e) => {
5647
5647
  prompts: e.prompts,
5648
5648
  onSelect: (e) => {
5649
5649
  o(e), requestAnimationFrame(() => {
5650
- let e = _.current?.view;
5651
- e?.focus(), De(e);
5650
+ let e = g.current?.view;
5651
+ e?.focus(), Ee(e);
5652
5652
  });
5653
5653
  }
5654
5654
  }),
5655
5655
  /* @__PURE__ */ (0, J.jsx)(zs, {
5656
5656
  className: "rounded-sm mr-2",
5657
- placeholder: de,
5657
+ placeholder: ue,
5658
5658
  value: t,
5659
- inputRef: _,
5659
+ inputRef: g,
5660
5660
  maxHeight: e.maxHeight ? `${e.maxHeight / 2}px` : void 0,
5661
5661
  onChange: o,
5662
5662
  onSubmit: (e, t) => {
5663
- t.trim() && g.current?.requestSubmit();
5663
+ t.trim() && h.current?.requestSubmit();
5664
5664
  },
5665
5665
  onClose: () => {},
5666
- additionalCompletions: ue
5666
+ additionalCompletions: le
5667
5667
  }),
5668
5668
  f && f.length === 1 && /* @__PURE__ */ (0, J.jsx)("span", {
5669
5669
  title: f[0].name,
@@ -5682,14 +5682,14 @@ var Gs = (e) => {
5682
5682
  onClick: () => {
5683
5683
  p(void 0), m.current && (m.current.value = "");
5684
5684
  },
5685
- children: /* @__PURE__ */ (0, J.jsx)(Ue, { className: "size-3" })
5685
+ children: /* @__PURE__ */ (0, J.jsx)(He, { className: "size-3" })
5686
5686
  }),
5687
- le && /* @__PURE__ */ (0, J.jsxs)(J.Fragment, { children: [/* @__PURE__ */ (0, J.jsx)(a, {
5687
+ ce && /* @__PURE__ */ (0, J.jsxs)(J.Fragment, { children: [/* @__PURE__ */ (0, J.jsx)(a, {
5688
5688
  type: "button",
5689
5689
  variant: "text",
5690
5690
  size: "sm",
5691
5691
  onClick: () => m.current?.click(),
5692
- children: /* @__PURE__ */ (0, J.jsx)(Ht, { className: "h-4" })
5692
+ children: /* @__PURE__ */ (0, J.jsx)(Vt, { className: "h-4" })
5693
5693
  }), /* @__PURE__ */ (0, J.jsx)("input", {
5694
5694
  type: "file",
5695
5695
  ref: m,
@@ -5700,15 +5700,15 @@ var Gs = (e) => {
5700
5700
  e.target.files && p([...e.target.files]);
5701
5701
  }
5702
5702
  })] }),
5703
- se ? /* @__PURE__ */ (0, J.jsx)(me, {
5703
+ oe ? /* @__PURE__ */ (0, J.jsx)(pe, {
5704
5704
  content: "Stop generating",
5705
5705
  children: /* @__PURE__ */ (0, J.jsx)(a, {
5706
5706
  type: "button",
5707
5707
  variant: "link",
5708
5708
  size: "xs",
5709
- onClick: () => A(),
5709
+ onClick: () => j(),
5710
5710
  className: "text-(--red-9) hover:text-(--red-11)",
5711
- children: /* @__PURE__ */ (0, J.jsx)(Ie, { className: "h-4 w-4 fill-current" })
5711
+ children: /* @__PURE__ */ (0, J.jsx)(Fe, { className: "h-4 w-4 fill-current" })
5712
5712
  })
5713
5713
  }) : /* @__PURE__ */ (0, J.jsx)(a, {
5714
5714
  type: "submit",
@@ -5717,7 +5717,7 @@ var Gs = (e) => {
5717
5717
  size: "xs",
5718
5718
  className: "text-(--slate-11)",
5719
5719
  "aria-label": "Send message",
5720
- children: /* @__PURE__ */ (0, J.jsx)(Wt, { className: "h-4 w-4" })
5720
+ children: /* @__PURE__ */ (0, J.jsx)(Ut, { className: "h-4 w-4" })
5721
5721
  })
5722
5722
  ]
5723
5723
  })
@@ -5757,7 +5757,7 @@ var Gs = (e) => {
5757
5757
  description: "Penalizes new tokens (-2: favor, 2: avoid)"
5758
5758
  }
5759
5759
  }, qs = (e) => {
5760
- let t = (0, N.c)(16), { config: n, onChange: r } = e, [i, o] = (0, q.useState)(!1), s;
5760
+ let t = (0, P.c)(16), { config: n, onChange: r } = e, [i, o] = (0, q.useState)(!1), s;
5761
5761
  t[0] !== n || t[1] !== r ? (s = (e, t) => {
5762
5762
  let i = t === null || Number.isNaN(t) ? null : t;
5763
5763
  if (i !== null) {
@@ -5775,23 +5775,23 @@ var Gs = (e) => {
5775
5775
  e.key === "Enter" && (e.preventDefault(), o(!1));
5776
5776
  }, t[3] = l) : l = t[3];
5777
5777
  let u = l, d;
5778
- t[4] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0, J.jsx)(me, {
5778
+ t[4] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0, J.jsx)(pe, {
5779
5779
  content: "Configuration",
5780
- children: /* @__PURE__ */ (0, J.jsx)(ae, {
5780
+ children: /* @__PURE__ */ (0, J.jsx)(h, {
5781
5781
  asChild: !0,
5782
5782
  children: /* @__PURE__ */ (0, J.jsx)(a, {
5783
5783
  variant: "outline",
5784
5784
  size: "sm",
5785
5785
  className: "border-none shadow-none hover:bg-transparent",
5786
- children: /* @__PURE__ */ (0, J.jsx)(Gt, { className: "h-3 w-3" })
5786
+ children: /* @__PURE__ */ (0, J.jsx)(Wt, { className: "h-3 w-3" })
5787
5787
  })
5788
5788
  })
5789
5789
  }), t[4] = d) : d = t[4];
5790
- let f;
5791
- t[5] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, J.jsx)("h4", {
5790
+ let p;
5791
+ t[5] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ (0, J.jsx)("h4", {
5792
5792
  className: "font-bold leading-none",
5793
5793
  children: "Configuration"
5794
- }), t[5] = f) : f = t[5];
5794
+ }), t[5] = p) : p = t[5];
5795
5795
  let m;
5796
5796
  if (t[6] !== n || t[7] !== c) {
5797
5797
  let e;
@@ -5799,19 +5799,19 @@ var Gs = (e) => {
5799
5799
  let [t, n] = e;
5800
5800
  return /* @__PURE__ */ (0, J.jsxs)("div", {
5801
5801
  className: "grid grid-cols-3 items-center gap-1",
5802
- children: [/* @__PURE__ */ (0, J.jsxs)(ge, {
5802
+ children: [/* @__PURE__ */ (0, J.jsxs)(he, {
5803
5803
  htmlFor: t,
5804
5804
  className: "flex w-full justify-between col-span-3 align-end",
5805
- children: [We.startCase(t), /* @__PURE__ */ (0, J.jsx)(me, {
5805
+ children: [Ue.startCase(t), /* @__PURE__ */ (0, J.jsx)(pe, {
5806
5806
  delayDuration: 200,
5807
5807
  side: "top",
5808
5808
  content: /* @__PURE__ */ (0, J.jsx)("div", {
5809
5809
  className: "text-xs flex flex-col",
5810
5810
  children: Ks[t].description
5811
5811
  }),
5812
- children: /* @__PURE__ */ (0, J.jsx)(we, { className: "h-3 w-3 cursor-help text-muted-foreground hover:text-foreground" })
5812
+ children: /* @__PURE__ */ (0, J.jsx)(Ce, { className: "h-3 w-3 cursor-help text-muted-foreground hover:text-foreground" })
5813
5813
  })]
5814
- }), /* @__PURE__ */ (0, J.jsx)(_e, {
5814
+ }), /* @__PURE__ */ (0, J.jsx)(ge, {
5815
5815
  id: t,
5816
5816
  "aria-label": t,
5817
5817
  value: n ?? NaN,
@@ -5824,61 +5824,61 @@ var Gs = (e) => {
5824
5824
  className: "col-span-3"
5825
5825
  })]
5826
5826
  }, t);
5827
- }, t[9] = c, t[10] = e), m = Qe.entries(n).map(e), t[6] = n, t[7] = c, t[8] = m;
5827
+ }, t[9] = c, t[10] = e), m = Ze.entries(n).map(e), t[6] = n, t[7] = c, t[8] = m;
5828
5828
  } else m = t[8];
5829
- let h;
5830
- t[11] === m ? h = t[12] : (h = /* @__PURE__ */ (0, J.jsx)(p, {
5829
+ let g;
5830
+ t[11] === m ? g = t[12] : (g = /* @__PURE__ */ (0, J.jsx)(re, {
5831
5831
  className: "w-70 border",
5832
5832
  children: /* @__PURE__ */ (0, J.jsxs)("div", {
5833
5833
  className: "grid gap-3",
5834
- children: [f, m]
5834
+ children: [p, m]
5835
5835
  })
5836
- }), t[11] = m, t[12] = h);
5837
- let g;
5838
- return t[13] !== i || t[14] !== h ? (g = /* @__PURE__ */ (0, J.jsxs)(v, {
5836
+ }), t[11] = m, t[12] = g);
5837
+ let _;
5838
+ return t[13] !== i || t[14] !== g ? (_ = /* @__PURE__ */ (0, J.jsxs)(f, {
5839
5839
  open: i,
5840
5840
  onOpenChange: o,
5841
- children: [d, h]
5842
- }), t[13] = i, t[14] = h, t[15] = g) : g = t[15], g;
5841
+ children: [d, g]
5842
+ }), t[13] = i, t[14] = g, t[15] = _) : _ = t[15], _;
5843
5843
  }, Js = (e) => {
5844
- let t = (0, N.c)(18), { prompts: n, onSelect: r } = e, [i, o] = (0, q.useState)(!1), [s, c] = (0, q.useState)(""), l;
5844
+ let t = (0, P.c)(18), { prompts: n, onSelect: r } = e, [i, o] = (0, q.useState)(!1), [s, c] = (0, q.useState)(""), l;
5845
5845
  t[0] === r ? l = t[1] : (l = (e) => {
5846
5846
  [...e.matchAll(/{{(\w+)}}/g)].length > 0 ? (c(e), o(!0)) : r(e);
5847
5847
  }, t[0] = r, t[1] = l);
5848
5848
  let u = l, d;
5849
- t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0, J.jsx)(me, {
5849
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0, J.jsx)(pe, {
5850
5850
  content: "Select a prompt",
5851
- children: /* @__PURE__ */ (0, J.jsx)(ve, {
5851
+ children: /* @__PURE__ */ (0, J.jsx)(_e, {
5852
5852
  asChild: !0,
5853
5853
  children: /* @__PURE__ */ (0, J.jsx)(a, {
5854
5854
  variant: "outline",
5855
5855
  size: "sm",
5856
5856
  className: "border-none shadow-none hover:bg-transparent",
5857
- children: /* @__PURE__ */ (0, J.jsx)(g, { className: "h-3 w-3" })
5857
+ children: /* @__PURE__ */ (0, J.jsx)(y, { className: "h-3 w-3" })
5858
5858
  })
5859
5859
  })
5860
5860
  }), t[2] = d) : d = t[2];
5861
- let f;
5861
+ let p;
5862
5862
  if (t[3] !== u || t[4] !== n) {
5863
5863
  let e;
5864
- t[6] === u ? e = t[7] : (e = (e, t) => /* @__PURE__ */ (0, J.jsx)(be, {
5864
+ t[6] === u ? e = t[7] : (e = (e, t) => /* @__PURE__ */ (0, J.jsx)(ye, {
5865
5865
  onSelect: () => u(e),
5866
5866
  className: "whitespace-normal text-left",
5867
5867
  children: e
5868
- }, t), t[6] = u, t[7] = e), f = n.map(e), t[3] = u, t[4] = n, t[5] = f;
5869
- } else f = t[5];
5868
+ }, t), t[6] = u, t[7] = e), p = n.map(e), t[3] = u, t[4] = n, t[5] = p;
5869
+ } else p = t[5];
5870
5870
  let m;
5871
- t[8] === f ? m = t[9] : (m = /* @__PURE__ */ (0, J.jsx)(Hs, { children: /* @__PURE__ */ (0, J.jsxs)(Se, { children: [d, /* @__PURE__ */ (0, J.jsx)(xe, {
5871
+ t[8] === p ? m = t[9] : (m = /* @__PURE__ */ (0, J.jsx)(Hs, { children: /* @__PURE__ */ (0, J.jsxs)(xe, { children: [d, /* @__PURE__ */ (0, J.jsx)(be, {
5872
5872
  side: "right",
5873
5873
  align: "end",
5874
5874
  onCloseAutoFocus: Xs,
5875
5875
  className: "w-64 max-h-96 overflow-y-auto",
5876
- children: f
5877
- })] }) }), t[8] = f, t[9] = m);
5876
+ children: p
5877
+ })] }) }), t[8] = p, t[9] = m);
5878
5878
  let h;
5879
5879
  t[10] === Symbol.for("react.memo_cache_sentinel") ? (h = () => o(!1), t[10] = h) : h = t[10];
5880
- let _;
5881
- t[11] !== r || t[12] !== s ? (_ = /* @__PURE__ */ (0, J.jsx)(p, {
5880
+ let g;
5881
+ t[11] !== r || t[12] !== s ? (g = /* @__PURE__ */ (0, J.jsx)(re, {
5882
5882
  side: "right",
5883
5883
  align: "end",
5884
5884
  className: "min-w-80 px-2",
@@ -5887,15 +5887,15 @@ var Gs = (e) => {
5887
5887
  onClose: h,
5888
5888
  onSelect: r
5889
5889
  }, s)
5890
- }), t[11] = r, t[12] = s, t[13] = _) : _ = t[13];
5891
- let y;
5892
- return t[14] !== i || t[15] !== m || t[16] !== _ ? (y = /* @__PURE__ */ (0, J.jsxs)(v, {
5890
+ }), t[11] = r, t[12] = s, t[13] = g) : g = t[13];
5891
+ let _;
5892
+ return t[14] !== i || t[15] !== m || t[16] !== g ? (_ = /* @__PURE__ */ (0, J.jsxs)(f, {
5893
5893
  open: i,
5894
5894
  onOpenChange: o,
5895
- children: [m, _]
5896
- }), t[14] = i, t[15] = m, t[16] = _, t[17] = y) : y = t[17], y;
5895
+ children: [m, g]
5896
+ }), t[14] = i, t[15] = m, t[16] = g, t[17] = _) : _ = t[17], _;
5897
5897
  }, Ys = (e) => {
5898
- let t = (0, N.c)(30), { prompt: n, onClose: r, onSelect: i } = e, o;
5898
+ let t = (0, P.c)(30), { prompt: n, onClose: r, onSelect: i } = e, o;
5899
5899
  t[0] === n ? o = t[1] : (o = () => [...n.matchAll(/{{(\w+)}}/g)].reduce(Zs, {}), t[0] = n, t[1] = o);
5900
5900
  let [s, c] = (0, q.useState)(o), l;
5901
5901
  t[2] === Symbol.for("react.memo_cache_sentinel") ? (l = (e, t) => {
@@ -5924,11 +5924,11 @@ var Gs = (e) => {
5924
5924
  let [n, r] = e;
5925
5925
  return /* @__PURE__ */ (0, J.jsxs)("div", {
5926
5926
  className: "grid grid-cols-4 items-center gap-2",
5927
- children: [/* @__PURE__ */ (0, J.jsx)(ge, {
5927
+ children: [/* @__PURE__ */ (0, J.jsx)(he, {
5928
5928
  htmlFor: n,
5929
5929
  className: "font-semibold text-base",
5930
5930
  children: n
5931
- }), /* @__PURE__ */ (0, J.jsx)(ye, {
5931
+ }), /* @__PURE__ */ (0, J.jsx)(ve, {
5932
5932
  id: n,
5933
5933
  value: r,
5934
5934
  onChange: (e) => u(n, e.target.value),