@8wave/ai-elements 0.98.0-beta.1 → 0.98.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +20 -19
  2. package/dist/_chunks/{Document-njJL_3oo.js → Document-CjCQXPDF.js} +54 -54
  3. package/dist/_chunks/{Document-njJL_3oo.js.map → Document-CjCQXPDF.js.map} +1 -1
  4. package/dist/_chunks/{PkStreamingMarkdown-Bns7j3b7.js → PkStreamingMarkdown-Djw604Ny.js} +43 -43
  5. package/dist/_chunks/PkStreamingMarkdown-Djw604Ny.js.map +1 -0
  6. package/dist/_chunks/{PkToolShowArtifact-BHGuiacA.js → PkToolShowArtifact-BaGEr7O9.js} +2 -2
  7. package/dist/_chunks/{PkToolShowArtifact-BHGuiacA.js.map → PkToolShowArtifact-BaGEr7O9.js.map} +1 -1
  8. package/dist/_chunks/{PkToolShowContactForm-Cp6fDIOT.js → PkToolShowContactForm-DEQBTzf4.js} +4 -4
  9. package/dist/_chunks/{PkToolShowContactForm-Cp6fDIOT.js.map → PkToolShowContactForm-DEQBTzf4.js.map} +1 -1
  10. package/dist/_chunks/{PkToolShowForm-BqUkMxMK.js → PkToolShowForm-AZwrmmM9.js} +2 -2
  11. package/dist/_chunks/{PkToolShowForm-BqUkMxMK.js.map → PkToolShowForm-AZwrmmM9.js.map} +1 -1
  12. package/dist/_chunks/{PkToolShowSources-Bg0QAcmF.js → PkToolShowSources-FnMkkdm6.js} +3 -3
  13. package/dist/_chunks/{PkToolShowSources-Bg0QAcmF.js.map → PkToolShowSources-FnMkkdm6.js.map} +1 -1
  14. package/dist/_chunks/{VvCheckbox.es-If2fZZst.js → VvCheckbox.es-D5d8k9yP.js} +2 -2
  15. package/dist/_chunks/{VvCheckbox.es-If2fZZst.js.map → VvCheckbox.es-D5d8k9yP.js.map} +1 -1
  16. package/dist/_chunks/{VvCheckboxGroup.es-A-IjEdQh.js → VvCheckboxGroup.es-DVnsOjX0.js} +2 -2
  17. package/dist/_chunks/{VvCheckboxGroup.es-A-IjEdQh.js.map → VvCheckboxGroup.es-DVnsOjX0.js.map} +1 -1
  18. package/dist/_chunks/{VvCombobox.es-DLRkNj0w.js → VvCombobox.es-CFA-K-cQ.js} +2 -2
  19. package/dist/_chunks/{VvCombobox.es-DLRkNj0w.js.map → VvCombobox.es-CFA-K-cQ.js.map} +1 -1
  20. package/dist/_chunks/{VvInputText.es-DV6kHrYx.js → VvInputText.es-csEQ-bSG.js} +2 -2
  21. package/dist/_chunks/{VvInputText.es-DV6kHrYx.js.map → VvInputText.es-csEQ-bSG.js.map} +1 -1
  22. package/dist/_chunks/{VvRadio.es-C_L52PYW.js → VvRadio.es-BpymhC73.js} +2 -2
  23. package/dist/_chunks/{VvRadio.es-C_L52PYW.js.map → VvRadio.es-BpymhC73.js.map} +1 -1
  24. package/dist/_chunks/{VvRadioGroup.es-B64sR46T.js → VvRadioGroup.es-CSNzOJKx.js} +2 -2
  25. package/dist/_chunks/{VvRadioGroup.es-B64sR46T.js.map → VvRadioGroup.es-CSNzOJKx.js.map} +1 -1
  26. package/dist/_chunks/{VvSelect.es-D_WR7HcC.js → VvSelect.es-CjKMd0nH.js} +2 -2
  27. package/dist/_chunks/{VvSelect.es-D_WR7HcC.js.map → VvSelect.es-CjKMd0nH.js.map} +1 -1
  28. package/dist/_chunks/{VvTextarea.es-DpF-slnp.js → VvTextarea.es-eEyRRpuT.js} +2 -2
  29. package/dist/_chunks/{VvTextarea.es-DpF-slnp.js.map → VvTextarea.es-eEyRRpuT.js.map} +1 -1
  30. package/dist/_chunks/index.es-BYny0uhz.js.map +1 -1
  31. package/dist/_chunks/{index.es-DN8D4nRq.js → index.es-eLFDkB2Y.js} +11 -11
  32. package/dist/_chunks/{index.es-DN8D4nRq.js.map → index.es-eLFDkB2Y.js.map} +1 -1
  33. package/dist/_chunks/{schemas-BsOP_5an.js → schemas-DnUKIqgi.js} +503 -503
  34. package/dist/_chunks/{schemas-BsOP_5an.js.map → schemas-DnUKIqgi.js.map} +1 -1
  35. package/dist/ai-elements.es.js +3830 -3743
  36. package/dist/ai-elements.es.js.map +1 -1
  37. package/dist-vue/PkChatbot.js +1 -1
  38. package/dist-vue/PkChatbotAuth.js +1 -1
  39. package/dist-vue/PkChatbotEmptyState.js +1 -1
  40. package/dist-vue/PkChatbotFeedbackForm.js +1 -1
  41. package/dist-vue/PkChatbotInput.js +1 -1
  42. package/dist-vue/PkChatbotMessages.js +1 -1
  43. package/dist-vue/PkChatbotSteps.js +1 -1
  44. package/dist-vue/PkChatbotViewChat.js +1 -1
  45. package/dist-vue/PkChatbotViewConversations.js +1 -1
  46. package/dist-vue/PkChatbotViewFiles.js +1 -1
  47. package/dist-vue/PkChatbotViewProfile.js +1 -1
  48. package/dist-vue/_chunks/{Document-q67u4D3u.js → Document-B8gv0e2O.js} +15 -15
  49. package/dist-vue/_chunks/{Document-q67u4D3u.js.map → Document-B8gv0e2O.js.map} +1 -1
  50. package/dist-vue/_chunks/{Media-BmW9F_3T.js → Media-B_7Yj-ml.js} +26 -26
  51. package/dist-vue/_chunks/{Media-BmW9F_3T.js.map → Media-B_7Yj-ml.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkChatbot-A1jKttsQ.js → PkChatbot-CneS8fVC.js} +7 -7
  53. package/dist-vue/_chunks/{PkChatbot-A1jKttsQ.js.map → PkChatbot-CneS8fVC.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkChatbotAuth-C0ATmt-9.js → PkChatbotAuth-C_L2xWuD.js} +4 -4
  55. package/dist-vue/_chunks/{PkChatbotAuth-C0ATmt-9.js.map → PkChatbotAuth-C_L2xWuD.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkChatbotEmptyState-BGTSWFSS.js → PkChatbotEmptyState-BGOC6vxr.js} +2 -2
  57. package/dist-vue/_chunks/{PkChatbotEmptyState-BGTSWFSS.js.map → PkChatbotEmptyState-BGOC6vxr.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkChatbotFeedbackForm-Dhsa1c06.js → PkChatbotFeedbackForm-BSe40qlc.js} +3 -3
  59. package/dist-vue/_chunks/{PkChatbotFeedbackForm-Dhsa1c06.js.map → PkChatbotFeedbackForm-BSe40qlc.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotInput-Be3J_Fgz.js → PkChatbotInput-DTazYlPd.js} +2 -2
  61. package/dist-vue/_chunks/{PkChatbotInput-Be3J_Fgz.js.map → PkChatbotInput-DTazYlPd.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotMessages-Cbn8okze.js → PkChatbotMessages-DEzcxcqc.js} +9 -9
  63. package/dist-vue/_chunks/{PkChatbotMessages-Cbn8okze.js.map → PkChatbotMessages-DEzcxcqc.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotSteps-BhqYCNWy.js → PkChatbotSteps-BpqdFhsG.js} +2 -2
  65. package/dist-vue/_chunks/{PkChatbotSteps-BhqYCNWy.js.map → PkChatbotSteps-BpqdFhsG.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkChatbotViewChat-Cc8bZfAr.js → PkChatbotViewChat-C7Xv2Oer.js} +6 -6
  67. package/dist-vue/_chunks/{PkChatbotViewChat-Cc8bZfAr.js.map → PkChatbotViewChat-C7Xv2Oer.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkChatbotViewConversations-BsfA4A7O.js → PkChatbotViewConversations-YbHHc8oD.js} +2 -2
  69. package/dist-vue/_chunks/{PkChatbotViewConversations-BsfA4A7O.js.map → PkChatbotViewConversations-YbHHc8oD.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkChatbotViewFiles-C6aouWQh.js → PkChatbotViewFiles-BPE0g2Jk.js} +3 -3
  71. package/dist-vue/_chunks/{PkChatbotViewFiles-C6aouWQh.js.map → PkChatbotViewFiles-BPE0g2Jk.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkChatbotViewProfile-B_ZAXIrC.js → PkChatbotViewProfile-B_gWPgVY.js} +2 -2
  73. package/dist-vue/_chunks/{PkChatbotViewProfile-B_ZAXIrC.js.map → PkChatbotViewProfile-B_gWPgVY.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkStreamingMarkdown-CNLdk20r.js → PkStreamingMarkdown-DEhbK-3c.js} +43 -43
  75. package/dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js.map +1 -0
  76. package/dist-vue/_chunks/{PkToolShowArtifact-B2ilUNT0.js → PkToolShowArtifact-CTBwt4DN.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolShowArtifact-B2ilUNT0.js.map → PkToolShowArtifact-CTBwt4DN.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolShowContactForm-C3CXe6sh.js → PkToolShowContactForm-B6-MsExL.js} +4 -4
  79. package/dist-vue/_chunks/{PkToolShowContactForm-C3CXe6sh.js.map → PkToolShowContactForm-B6-MsExL.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowForm-DnzUxm2o.js → PkToolShowForm-C-mWyeka.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowForm-DnzUxm2o.js.map → PkToolShowForm-C-mWyeka.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowSources-BF2-VGSg.js → PkToolShowSources-rGZz65c2.js} +3 -3
  83. package/dist-vue/_chunks/{PkToolShowSources-BF2-VGSg.js.map → PkToolShowSources-rGZz65c2.js.map} +1 -1
  84. package/dist-vue/_chunks/{constants-DtnBK4PW.js → constants-BSe0uxSf.js} +4 -4
  85. package/dist-vue/_chunks/{constants-DtnBK4PW.js.map → constants-BSe0uxSf.js.map} +1 -1
  86. package/dist-vue/_chunks/{createChatbotApiClient-BHfNaVk8.js → createChatbotApiClient-Bf5DbqVH.js} +125 -113
  87. package/dist-vue/_chunks/createChatbotApiClient-Bf5DbqVH.js.map +1 -0
  88. package/dist-vue/_chunks/{index.es-BODtrBxv.js → index.es-XfWQ82pb.js} +3 -3
  89. package/dist-vue/_chunks/{index.es-BODtrBxv.js.map → index.es-XfWQ82pb.js.map} +1 -1
  90. package/dist-vue/_chunks/{schemas-BsOP_5an.js → schemas-DnUKIqgi.js} +503 -503
  91. package/dist-vue/_chunks/{schemas-BsOP_5an.js.map → schemas-DnUKIqgi.js.map} +1 -1
  92. package/dist-vue/_chunks/{useChatbotStore-bbenzuMe.js → useChatbotStore-Cfx-qlC4.js} +778 -761
  93. package/dist-vue/_chunks/useChatbotStore-Cfx-qlC4.js.map +1 -0
  94. package/dist-vue/api.js +1 -1
  95. package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +6 -0
  96. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -0
  97. package/dist-vue/apps/web-component/src/lib.d.ts +1 -0
  98. package/dist-vue/composables.js +5 -3
  99. package/dist-vue/composables.js.map +1 -1
  100. package/dist-vue/index.js +23 -23
  101. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +134 -3
  102. package/dist-vue/packages/components/src/chat/PkMessageParts.d.ts +134 -3
  103. package/dist-vue/packages/composable/src/chatbot/api/index.d.ts +1 -0
  104. package/dist-vue/packages/composable/src/chatbot/api/resolveShortUrls.d.ts +16 -0
  105. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +24 -24
  106. package/package.json +3 -3
  107. package/dist/_chunks/PkStreamingMarkdown-Bns7j3b7.js.map +0 -1
  108. package/dist-vue/_chunks/PkStreamingMarkdown-CNLdk20r.js.map +0 -1
  109. package/dist-vue/_chunks/createChatbotApiClient-BHfNaVk8.js.map +0 -1
  110. package/dist-vue/_chunks/useChatbotStore-bbenzuMe.js.map +0 -1
@@ -1,15 +1,15 @@
1
- import { C as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, r as m, v as h, w as ee, y as g } from "./schemas-BsOP_5an.js";
2
- import { t as te } from "./createChatbotApiClient-BHfNaVk8.js";
1
+ import { C as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, n as d, o as f, p, r as m, v as h, w as ee, y as g } from "./schemas-DnUKIqgi.js";
2
+ import { t as te } from "./createChatbotApiClient-Bf5DbqVH.js";
3
3
  import { t as ne } from "./src-8QXYVWIx.js";
4
4
  import { n as re } from "./message-RohfrdWS.js";
5
5
  import { a as _, i as v, n as y, r as b, t as x } from "./ZodError-BoB_0oSl.js";
6
6
  import { t as ie } from "./useSafeLocalStorage-BGbMO01p.js";
7
- import { computed as S, getCurrentScope as ae, isReadonly as oe, onScopeDispose as se, reactive as ce, ref as C, toRefs as le, watch as ue, watchEffect as de } from "vue";
8
- import { useI18n as fe } from "vue-i18n";
9
- import { usePreferredDark as pe } from "@vueuse/core";
10
- import { defineStore as w } from "pinia";
7
+ import { computed as S, getCurrentScope as ae, isReadonly as oe, onScopeDispose as C, reactive as se, ref as w, toRefs as ce, watch as le, watchEffect as ue } from "vue";
8
+ import { useI18n as de } from "vue-i18n";
9
+ import { usePreferredDark as fe } from "@vueuse/core";
10
+ import { defineStore as T } from "pinia";
11
11
  //#region ../../packages/utils/src/device-context.ts
12
- function me() {
12
+ function pe() {
13
13
  let e = navigator.connection, t = navigator.userAgentData;
14
14
  return {
15
15
  dateTime: (/* @__PURE__ */ new Date()).toISOString(),
@@ -39,7 +39,7 @@ function me() {
39
39
  historyLength: window.history.length
40
40
  };
41
41
  }
42
- async function he(e) {
42
+ async function me(e) {
43
43
  if (!navigator.geolocation || !navigator.permissions) return null;
44
44
  try {
45
45
  if ((await navigator.permissions.query({ name: "geolocation" })).state !== "granted") return null;
@@ -58,45 +58,45 @@ async function he(e) {
58
58
  }
59
59
  //#endregion
60
60
  //#region ../../node_modules/.pnpm/@ai-sdk+provider@4.0.3/node_modules/@ai-sdk/provider/dist/index.js
61
- var ge = "vercel.ai.error", _e = Symbol.for(ge), ve, ye, T = class e extends (ye = Error, ve = _e, ye) {
61
+ var he = "vercel.ai.error", ge = Symbol.for(he), _e, ve, E = class e extends (ve = Error, _e = ge, ve) {
62
62
  constructor({ name: e, message: t, cause: n }) {
63
- super(t), this[ve] = !0, this.name = e, this.cause = n;
63
+ super(t), this[_e] = !0, this.name = e, this.cause = n;
64
64
  }
65
65
  static isInstance(t) {
66
- return e.hasMarker(t, ge);
66
+ return e.hasMarker(t, he);
67
67
  }
68
68
  static hasMarker(e, t) {
69
69
  let n = Symbol.for(t);
70
70
  return typeof e == "object" && !!e && n in e && typeof e[n] == "boolean" && e[n] === !0;
71
71
  }
72
72
  };
73
- function E(e) {
73
+ function D(e) {
74
74
  return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.toString() : JSON.stringify(e);
75
75
  }
76
- var be = "AI_InvalidArgumentError", D = `vercel.ai.error.${be}`, xe = Symbol.for(D), Se, Ce, we = class extends (Ce = T, Se = xe, Ce) {
76
+ var ye = "AI_InvalidArgumentError", O = `vercel.ai.error.${ye}`, be = Symbol.for(O), xe, Se, Ce = class extends (Se = E, xe = be, Se) {
77
77
  constructor({ message: e, cause: t, argument: n }) {
78
78
  super({
79
- name: be,
79
+ name: ye,
80
80
  message: e,
81
81
  cause: t
82
- }), this[Se] = !0, this.argument = n;
82
+ }), this[xe] = !0, this.argument = n;
83
83
  }
84
84
  static isInstance(e) {
85
- return T.hasMarker(e, D);
85
+ return E.hasMarker(e, O);
86
86
  }
87
- }, Te = "AI_JSONParseError", O = `vercel.ai.error.${Te}`, Ee = Symbol.for(O), k, De, Oe = class extends (De = T, k = Ee, De) {
87
+ }, we = "AI_JSONParseError", k = `vercel.ai.error.${we}`, Te = Symbol.for(k), Ee, De, Oe = class extends (De = E, Ee = Te, De) {
88
88
  constructor({ text: e, cause: t }) {
89
89
  super({
90
- name: Te,
90
+ name: we,
91
91
  message: `JSON parsing failed: Text: ${e}.
92
- Error message: ${E(t)}`,
92
+ Error message: ${D(t)}`,
93
93
  cause: t
94
- }), this[k] = !0, this.text = e;
94
+ }), this[Ee] = !0, this.text = e;
95
95
  }
96
96
  static isInstance(e) {
97
- return T.hasMarker(e, O);
97
+ return E.hasMarker(e, k);
98
98
  }
99
- }, ke = "AI_TypeValidationError", Ae = `vercel.ai.error.${ke}`, je = Symbol.for(Ae), Me, Ne, A = class e extends (Ne = T, Me = je, Ne) {
99
+ }, ke = "AI_TypeValidationError", Ae = `vercel.ai.error.${ke}`, je = Symbol.for(Ae), Me, Ne, A = class e extends (Ne = E, Me = je, Ne) {
100
100
  constructor({ value: e, cause: t, context: n }) {
101
101
  let r = "Type validation failed";
102
102
  if (n?.field && (r += ` for ${n.field}`), n?.entityName || n?.entityId) {
@@ -107,12 +107,12 @@ Error message: ${E(t)}`,
107
107
  super({
108
108
  name: ke,
109
109
  message: `${r}: Value: ${JSON.stringify(e)}.
110
- Error message: ${E(t)}`,
110
+ Error message: ${D(t)}`,
111
111
  cause: t
112
112
  }), this[Me] = !0, this.value = e, this.context = n;
113
113
  }
114
114
  static isInstance(e) {
115
- return T.hasMarker(e, Ae);
115
+ return E.hasMarker(e, Ae);
116
116
  }
117
117
  static wrap({ value: t, cause: n, context: r }) {
118
118
  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({
@@ -121,7 +121,7 @@ Error message: ${E(t)}`,
121
121
  context: r
122
122
  });
123
123
  }
124
- }, Pe = (e, t) => {
124
+ }, j = (e, t) => {
125
125
  let n;
126
126
  switch (e.code) {
127
127
  case y.invalid_type:
@@ -175,13 +175,13 @@ Error message: ${E(t)}`,
175
175
  default: n = t.defaultError, _.assertNever(e);
176
176
  }
177
177
  return { message: n };
178
- }, Fe = Pe;
179
- function Ie() {
180
- return Fe;
178
+ }, Pe = j;
179
+ function Fe() {
180
+ return Pe;
181
181
  }
182
182
  //#endregion
183
183
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v3/helpers/parseUtil.js
184
- var j = (e) => {
184
+ var M = (e) => {
185
185
  let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
186
186
  ...i,
187
187
  path: a
@@ -202,8 +202,8 @@ var j = (e) => {
202
202
  message: s
203
203
  };
204
204
  };
205
- function M(e, t) {
206
- let n = Ie(), r = j({
205
+ function N(e, t) {
206
+ let n = Fe(), r = M({
207
207
  issueData: t,
208
208
  data: e.data,
209
209
  path: e.path,
@@ -211,12 +211,12 @@ function M(e, t) {
211
211
  e.common.contextualErrorMap,
212
212
  e.schemaErrorMap,
213
213
  n,
214
- n === Pe ? void 0 : Pe
214
+ n === j ? void 0 : j
215
215
  ].filter((e) => !!e)
216
216
  });
217
217
  e.common.issues.push(r);
218
218
  }
219
- var N = class e {
219
+ var P = class e {
220
220
  constructor() {
221
221
  this.value = "valid";
222
222
  }
@@ -229,7 +229,7 @@ var N = class e {
229
229
  static mergeArray(e, t) {
230
230
  let n = [];
231
231
  for (let r of t) {
232
- if (r.status === "aborted") return P;
232
+ if (r.status === "aborted") return F;
233
233
  r.status === "dirty" && e.dirty(), n.push(r.value);
234
234
  }
235
235
  return {
@@ -252,7 +252,7 @@ var N = class e {
252
252
  let n = {};
253
253
  for (let r of t) {
254
254
  let { key: t, value: i } = r;
255
- if (t.status === "aborted" || i.status === "aborted") return P;
255
+ if (t.status === "aborted" || i.status === "aborted") return F;
256
256
  t.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), t.value !== "__proto__" && (i.value !== void 0 || r.alwaysSet) && (n[t.value] = i.value);
257
257
  }
258
258
  return {
@@ -260,27 +260,27 @@ var N = class e {
260
260
  value: n
261
261
  };
262
262
  }
263
- }, P = Object.freeze({ status: "aborted" }), Le = (e) => ({
263
+ }, F = Object.freeze({ status: "aborted" }), Ie = (e) => ({
264
264
  status: "dirty",
265
265
  value: e
266
- }), F = (e) => ({
266
+ }), I = (e) => ({
267
267
  status: "valid",
268
268
  value: e
269
- }), Re = (e) => e.status === "aborted", ze = (e) => e.status === "dirty", Be = (e) => e.status === "valid", Ve = (e) => typeof Promise < "u" && e instanceof Promise, I;
269
+ }), Le = (e) => e.status === "aborted", Re = (e) => e.status === "dirty", ze = (e) => e.status === "valid", Be = (e) => typeof Promise < "u" && e instanceof Promise, L;
270
270
  (function(e) {
271
271
  e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
272
- })(I ||= {});
272
+ })(L ||= {});
273
273
  //#endregion
274
274
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v3/types.js
275
- var L = class {
275
+ var R = class {
276
276
  constructor(e, t, n, r) {
277
277
  this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = r;
278
278
  }
279
279
  get path() {
280
280
  return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
281
281
  }
282
- }, He = (e, t) => {
283
- if (Be(t)) return {
282
+ }, Ve = (e, t) => {
283
+ if (ze(t)) return {
284
284
  success: !0,
285
285
  data: t.value
286
286
  };
@@ -294,7 +294,7 @@ var L = class {
294
294
  }
295
295
  };
296
296
  };
297
- function R(e) {
297
+ function z(e) {
298
298
  if (!e) return {};
299
299
  let { errorMap: t, invalid_type_error: n, required_error: r, description: i } = e;
300
300
  if (t && (n || r)) throw Error("Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.");
@@ -309,7 +309,7 @@ function R(e) {
309
309
  description: i
310
310
  };
311
311
  }
312
- var z = class {
312
+ var B = class {
313
313
  get description() {
314
314
  return this._def.description;
315
315
  }
@@ -328,7 +328,7 @@ var z = class {
328
328
  }
329
329
  _processInputParams(e) {
330
330
  return {
331
- status: new N(),
331
+ status: new P(),
332
332
  ctx: {
333
333
  common: e.parent.common,
334
334
  data: e.data,
@@ -341,7 +341,7 @@ var z = class {
341
341
  }
342
342
  _parseSync(e) {
343
343
  let t = this._parse(e);
344
- if (Ve(t)) throw Error("Synchronous parse encountered promise.");
344
+ if (Be(t)) throw Error("Synchronous parse encountered promise.");
345
345
  return t;
346
346
  }
347
347
  _parseAsync(e) {
@@ -366,7 +366,7 @@ var z = class {
366
366
  data: e,
367
367
  parsedType: v(e)
368
368
  };
369
- return He(n, this._parseSync({
369
+ return Ve(n, this._parseSync({
370
370
  data: e,
371
371
  path: n.path,
372
372
  parent: n
@@ -390,7 +390,7 @@ var z = class {
390
390
  path: [],
391
391
  parent: t
392
392
  });
393
- return Be(n) ? { value: n.value } : { issues: t.common.issues };
393
+ return ze(n) ? { value: n.value } : { issues: t.common.issues };
394
394
  } catch (e) {
395
395
  e?.message?.toLowerCase()?.includes("encountered") && (this["~standard"].async = !0), t.common = {
396
396
  issues: [],
@@ -401,7 +401,7 @@ var z = class {
401
401
  data: e,
402
402
  path: [],
403
403
  parent: t
404
- }).then((e) => Be(e) ? { value: e.value } : { issues: t.common.issues });
404
+ }).then((e) => ze(e) ? { value: e.value } : { issues: t.common.issues });
405
405
  }
406
406
  async parseAsync(e, t) {
407
407
  let n = await this.safeParseAsync(e, t);
@@ -425,7 +425,7 @@ var z = class {
425
425
  path: n.path,
426
426
  parent: n
427
427
  });
428
- return He(n, await (Ve(r) ? r : Promise.resolve(r)));
428
+ return Ve(n, await (Be(r) ? r : Promise.resolve(r)));
429
429
  }
430
430
  refine(e, t) {
431
431
  let n = (e) => typeof t == "string" || t === void 0 ? { message: t } : typeof t == "function" ? t(e) : t;
@@ -483,7 +483,7 @@ var z = class {
483
483
  }
484
484
  transform(e) {
485
485
  return new U({
486
- ...R(this._def),
486
+ ...z(this._def),
487
487
  schema: this,
488
488
  typeName: G.ZodEffects,
489
489
  effect: {
@@ -495,7 +495,7 @@ var z = class {
495
495
  default(e) {
496
496
  let t = typeof e == "function" ? e : () => e;
497
497
  return new Ut({
498
- ...R(this._def),
498
+ ...z(this._def),
499
499
  innerType: this,
500
500
  defaultValue: t,
501
501
  typeName: G.ZodDefault
@@ -505,13 +505,13 @@ var z = class {
505
505
  return new Kt({
506
506
  typeName: G.ZodBranded,
507
507
  type: this,
508
- ...R(this._def)
508
+ ...z(this._def)
509
509
  });
510
510
  }
511
511
  catch(e) {
512
512
  let t = typeof e == "function" ? e : () => e;
513
513
  return new Wt({
514
- ...R(this._def),
514
+ ...z(this._def),
515
515
  innerType: this,
516
516
  catchValue: t,
517
517
  typeName: G.ZodCatch
@@ -536,25 +536,25 @@ var z = class {
536
536
  isNullable() {
537
537
  return this.safeParse(null).success;
538
538
  }
539
- }, Ue = /^c[^\s-]{8,}$/i, We = /^[0-9a-z]+$/, Ge = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ke = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, qe = /^[a-z0-9_-]{21}$/i, Je = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ye = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Xe = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ze = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", Qe, $e = /^(?:(?: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])$/, et = /^(?:(?: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])$/, tt = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, nt = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, rt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, it = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, at = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", ot = RegExp(`^${at}$`);
540
- function st(e) {
539
+ }, He = /^c[^\s-]{8,}$/i, Ue = /^[0-9a-z]+$/, We = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ge = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Ke = /^[a-z0-9_-]{21}$/i, qe = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Je = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ye = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Xe = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", Ze, Qe = /^(?:(?: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])$/, $e = /^(?:(?: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])$/, et = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, tt = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, nt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, rt = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, it = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", at = RegExp(`^${it}$`);
540
+ function ot(e) {
541
541
  let t = "[0-5]\\d";
542
542
  e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision ?? (t = `${t}(\\.\\d+)?`);
543
543
  let n = e.precision ? "+" : "?";
544
544
  return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
545
545
  }
546
- function ct(e) {
547
- return RegExp(`^${st(e)}$`);
546
+ function st(e) {
547
+ return RegExp(`^${ot(e)}$`);
548
548
  }
549
- function lt(e) {
550
- let t = `${at}T${st(e)}`, n = [];
549
+ function ct(e) {
550
+ let t = `${it}T${ot(e)}`, n = [];
551
551
  return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
552
552
  }
553
- function ut(e, t) {
554
- return !!((t === "v4" || !t) && $e.test(e) || (t === "v6" || !t) && tt.test(e));
553
+ function lt(e, t) {
554
+ return !!((t === "v4" || !t) && Qe.test(e) || (t === "v6" || !t) && et.test(e));
555
555
  }
556
- function dt(e, t) {
557
- if (!Je.test(e)) return !1;
556
+ function ut(e, t) {
557
+ if (!qe.test(e)) return !1;
558
558
  try {
559
559
  let [n] = e.split(".");
560
560
  if (!n) return !1;
@@ -564,21 +564,21 @@ function dt(e, t) {
564
564
  return !1;
565
565
  }
566
566
  }
567
- function ft(e, t) {
568
- return !!((t === "v4" || !t) && et.test(e) || (t === "v6" || !t) && nt.test(e));
567
+ function dt(e, t) {
568
+ return !!((t === "v4" || !t) && $e.test(e) || (t === "v6" || !t) && tt.test(e));
569
569
  }
570
- var pt = class e extends z {
570
+ var ft = class e extends B {
571
571
  _parse(e) {
572
572
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== b.string) {
573
573
  let t = this._getOrReturnCtx(e);
574
- return M(t, {
574
+ return N(t, {
575
575
  code: y.invalid_type,
576
576
  expected: b.string,
577
577
  received: t.parsedType
578
- }), P;
578
+ }), F;
579
579
  }
580
- let t = new N(), n;
581
- for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), M(n, {
580
+ let t = new P(), n;
581
+ for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), N(n, {
582
582
  code: y.too_small,
583
583
  minimum: r.value,
584
584
  type: "string",
@@ -586,7 +586,7 @@ var pt = class e extends z {
586
586
  exact: !1,
587
587
  message: r.message
588
588
  }), t.dirty());
589
- else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), M(n, {
589
+ else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), N(n, {
590
590
  code: y.too_big,
591
591
  maximum: r.value,
592
592
  type: "string",
@@ -596,14 +596,14 @@ var pt = class e extends z {
596
596
  }), t.dirty());
597
597
  else if (r.kind === "length") {
598
598
  let i = e.data.length > r.value, a = e.data.length < r.value;
599
- (i || a) && (n = this._getOrReturnCtx(e, n), i ? M(n, {
599
+ (i || a) && (n = this._getOrReturnCtx(e, n), i ? N(n, {
600
600
  code: y.too_big,
601
601
  maximum: r.value,
602
602
  type: "string",
603
603
  inclusive: !0,
604
604
  exact: !0,
605
605
  message: r.message
606
- }) : a && M(n, {
606
+ }) : a && N(n, {
607
607
  code: y.too_small,
608
608
  minimum: r.value,
609
609
  type: "string",
@@ -611,37 +611,37 @@ var pt = class e extends z {
611
611
  exact: !0,
612
612
  message: r.message
613
613
  }), t.dirty());
614
- } else if (r.kind === "email") Xe.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
614
+ } else if (r.kind === "email") Ye.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
615
615
  validation: "email",
616
616
  code: y.invalid_string,
617
617
  message: r.message
618
618
  }), t.dirty());
619
- else if (r.kind === "emoji") Qe ||= new RegExp(Ze, "u"), Qe.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
619
+ else if (r.kind === "emoji") Ze ||= new RegExp(Xe, "u"), Ze.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
620
620
  validation: "emoji",
621
621
  code: y.invalid_string,
622
622
  message: r.message
623
623
  }), t.dirty());
624
- else if (r.kind === "uuid") Ke.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
624
+ else if (r.kind === "uuid") Ge.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
625
625
  validation: "uuid",
626
626
  code: y.invalid_string,
627
627
  message: r.message
628
628
  }), t.dirty());
629
- else if (r.kind === "nanoid") qe.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
629
+ else if (r.kind === "nanoid") Ke.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
630
630
  validation: "nanoid",
631
631
  code: y.invalid_string,
632
632
  message: r.message
633
633
  }), t.dirty());
634
- else if (r.kind === "cuid") Ue.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
634
+ else if (r.kind === "cuid") He.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
635
635
  validation: "cuid",
636
636
  code: y.invalid_string,
637
637
  message: r.message
638
638
  }), t.dirty());
639
- else if (r.kind === "cuid2") We.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
639
+ else if (r.kind === "cuid2") Ue.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
640
640
  validation: "cuid2",
641
641
  code: y.invalid_string,
642
642
  message: r.message
643
643
  }), t.dirty());
644
- else if (r.kind === "ulid") Ge.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
644
+ else if (r.kind === "ulid") We.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
645
645
  validation: "ulid",
646
646
  code: y.invalid_string,
647
647
  message: r.message
@@ -649,64 +649,64 @@ var pt = class e extends z {
649
649
  else if (r.kind === "url") try {
650
650
  new URL(e.data);
651
651
  } catch {
652
- n = this._getOrReturnCtx(e, n), M(n, {
652
+ n = this._getOrReturnCtx(e, n), N(n, {
653
653
  validation: "url",
654
654
  code: y.invalid_string,
655
655
  message: r.message
656
656
  }), t.dirty();
657
657
  }
658
- else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
658
+ else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
659
659
  validation: "regex",
660
660
  code: y.invalid_string,
661
661
  message: r.message
662
- }), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), M(n, {
662
+ }), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), N(n, {
663
663
  code: y.invalid_string,
664
664
  validation: {
665
665
  includes: r.value,
666
666
  position: r.position
667
667
  },
668
668
  message: r.message
669
- }), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), M(n, {
669
+ }), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), N(n, {
670
670
  code: y.invalid_string,
671
671
  validation: { startsWith: r.value },
672
672
  message: r.message
673
- }), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), M(n, {
673
+ }), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), N(n, {
674
674
  code: y.invalid_string,
675
675
  validation: { endsWith: r.value },
676
676
  message: r.message
677
- }), t.dirty()) : r.kind === "datetime" ? lt(r).test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
677
+ }), t.dirty()) : r.kind === "datetime" ? ct(r).test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
678
678
  code: y.invalid_string,
679
679
  validation: "datetime",
680
680
  message: r.message
681
- }), t.dirty()) : r.kind === "date" ? ot.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
681
+ }), t.dirty()) : r.kind === "date" ? at.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
682
682
  code: y.invalid_string,
683
683
  validation: "date",
684
684
  message: r.message
685
- }), t.dirty()) : r.kind === "time" ? ct(r).test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
685
+ }), t.dirty()) : r.kind === "time" ? st(r).test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
686
686
  code: y.invalid_string,
687
687
  validation: "time",
688
688
  message: r.message
689
- }), t.dirty()) : r.kind === "duration" ? Ye.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
689
+ }), t.dirty()) : r.kind === "duration" ? Je.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
690
690
  validation: "duration",
691
691
  code: y.invalid_string,
692
692
  message: r.message
693
- }), t.dirty()) : r.kind === "ip" ? ut(e.data, r.version) || (n = this._getOrReturnCtx(e, n), M(n, {
693
+ }), t.dirty()) : r.kind === "ip" ? lt(e.data, r.version) || (n = this._getOrReturnCtx(e, n), N(n, {
694
694
  validation: "ip",
695
695
  code: y.invalid_string,
696
696
  message: r.message
697
- }), t.dirty()) : r.kind === "jwt" ? dt(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), M(n, {
697
+ }), t.dirty()) : r.kind === "jwt" ? ut(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), N(n, {
698
698
  validation: "jwt",
699
699
  code: y.invalid_string,
700
700
  message: r.message
701
- }), t.dirty()) : r.kind === "cidr" ? ft(e.data, r.version) || (n = this._getOrReturnCtx(e, n), M(n, {
701
+ }), t.dirty()) : r.kind === "cidr" ? dt(e.data, r.version) || (n = this._getOrReturnCtx(e, n), N(n, {
702
702
  validation: "cidr",
703
703
  code: y.invalid_string,
704
704
  message: r.message
705
- }), t.dirty()) : r.kind === "base64" ? rt.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
705
+ }), t.dirty()) : r.kind === "base64" ? nt.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
706
706
  validation: "base64",
707
707
  code: y.invalid_string,
708
708
  message: r.message
709
- }), t.dirty()) : r.kind === "base64url" ? it.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
709
+ }), t.dirty()) : r.kind === "base64url" ? rt.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
710
710
  validation: "base64url",
711
711
  code: y.invalid_string,
712
712
  message: r.message
@@ -720,7 +720,7 @@ var pt = class e extends z {
720
720
  return this.refinement((t) => e.test(t), {
721
721
  validation: t,
722
722
  code: y.invalid_string,
723
- ...I.errToObj(n)
723
+ ...L.errToObj(n)
724
724
  });
725
725
  }
726
726
  _addCheck(t) {
@@ -732,79 +732,79 @@ var pt = class e extends z {
732
732
  email(e) {
733
733
  return this._addCheck({
734
734
  kind: "email",
735
- ...I.errToObj(e)
735
+ ...L.errToObj(e)
736
736
  });
737
737
  }
738
738
  url(e) {
739
739
  return this._addCheck({
740
740
  kind: "url",
741
- ...I.errToObj(e)
741
+ ...L.errToObj(e)
742
742
  });
743
743
  }
744
744
  emoji(e) {
745
745
  return this._addCheck({
746
746
  kind: "emoji",
747
- ...I.errToObj(e)
747
+ ...L.errToObj(e)
748
748
  });
749
749
  }
750
750
  uuid(e) {
751
751
  return this._addCheck({
752
752
  kind: "uuid",
753
- ...I.errToObj(e)
753
+ ...L.errToObj(e)
754
754
  });
755
755
  }
756
756
  nanoid(e) {
757
757
  return this._addCheck({
758
758
  kind: "nanoid",
759
- ...I.errToObj(e)
759
+ ...L.errToObj(e)
760
760
  });
761
761
  }
762
762
  cuid(e) {
763
763
  return this._addCheck({
764
764
  kind: "cuid",
765
- ...I.errToObj(e)
765
+ ...L.errToObj(e)
766
766
  });
767
767
  }
768
768
  cuid2(e) {
769
769
  return this._addCheck({
770
770
  kind: "cuid2",
771
- ...I.errToObj(e)
771
+ ...L.errToObj(e)
772
772
  });
773
773
  }
774
774
  ulid(e) {
775
775
  return this._addCheck({
776
776
  kind: "ulid",
777
- ...I.errToObj(e)
777
+ ...L.errToObj(e)
778
778
  });
779
779
  }
780
780
  base64(e) {
781
781
  return this._addCheck({
782
782
  kind: "base64",
783
- ...I.errToObj(e)
783
+ ...L.errToObj(e)
784
784
  });
785
785
  }
786
786
  base64url(e) {
787
787
  return this._addCheck({
788
788
  kind: "base64url",
789
- ...I.errToObj(e)
789
+ ...L.errToObj(e)
790
790
  });
791
791
  }
792
792
  jwt(e) {
793
793
  return this._addCheck({
794
794
  kind: "jwt",
795
- ...I.errToObj(e)
795
+ ...L.errToObj(e)
796
796
  });
797
797
  }
798
798
  ip(e) {
799
799
  return this._addCheck({
800
800
  kind: "ip",
801
- ...I.errToObj(e)
801
+ ...L.errToObj(e)
802
802
  });
803
803
  }
804
804
  cidr(e) {
805
805
  return this._addCheck({
806
806
  kind: "cidr",
807
- ...I.errToObj(e)
807
+ ...L.errToObj(e)
808
808
  });
809
809
  }
810
810
  datetime(e) {
@@ -819,7 +819,7 @@ var pt = class e extends z {
819
819
  precision: e?.precision === void 0 ? null : e?.precision,
820
820
  offset: e?.offset ?? !1,
821
821
  local: e?.local ?? !1,
822
- ...I.errToObj(e?.message)
822
+ ...L.errToObj(e?.message)
823
823
  });
824
824
  }
825
825
  date(e) {
@@ -836,20 +836,20 @@ var pt = class e extends z {
836
836
  }) : this._addCheck({
837
837
  kind: "time",
838
838
  precision: e?.precision === void 0 ? null : e?.precision,
839
- ...I.errToObj(e?.message)
839
+ ...L.errToObj(e?.message)
840
840
  });
841
841
  }
842
842
  duration(e) {
843
843
  return this._addCheck({
844
844
  kind: "duration",
845
- ...I.errToObj(e)
845
+ ...L.errToObj(e)
846
846
  });
847
847
  }
848
848
  regex(e, t) {
849
849
  return this._addCheck({
850
850
  kind: "regex",
851
851
  regex: e,
852
- ...I.errToObj(t)
852
+ ...L.errToObj(t)
853
853
  });
854
854
  }
855
855
  includes(e, t) {
@@ -857,46 +857,46 @@ var pt = class e extends z {
857
857
  kind: "includes",
858
858
  value: e,
859
859
  position: t?.position,
860
- ...I.errToObj(t?.message)
860
+ ...L.errToObj(t?.message)
861
861
  });
862
862
  }
863
863
  startsWith(e, t) {
864
864
  return this._addCheck({
865
865
  kind: "startsWith",
866
866
  value: e,
867
- ...I.errToObj(t)
867
+ ...L.errToObj(t)
868
868
  });
869
869
  }
870
870
  endsWith(e, t) {
871
871
  return this._addCheck({
872
872
  kind: "endsWith",
873
873
  value: e,
874
- ...I.errToObj(t)
874
+ ...L.errToObj(t)
875
875
  });
876
876
  }
877
877
  min(e, t) {
878
878
  return this._addCheck({
879
879
  kind: "min",
880
880
  value: e,
881
- ...I.errToObj(t)
881
+ ...L.errToObj(t)
882
882
  });
883
883
  }
884
884
  max(e, t) {
885
885
  return this._addCheck({
886
886
  kind: "max",
887
887
  value: e,
888
- ...I.errToObj(t)
888
+ ...L.errToObj(t)
889
889
  });
890
890
  }
891
891
  length(e, t) {
892
892
  return this._addCheck({
893
893
  kind: "length",
894
894
  value: e,
895
- ...I.errToObj(t)
895
+ ...L.errToObj(t)
896
896
  });
897
897
  }
898
898
  nonempty(e) {
899
- return this.min(1, I.errToObj(e));
899
+ return this.min(1, L.errToObj(e));
900
900
  }
901
901
  trim() {
902
902
  return new e({
@@ -975,54 +975,54 @@ var pt = class e extends z {
975
975
  return e;
976
976
  }
977
977
  };
978
- pt.create = (e) => new pt({
978
+ ft.create = (e) => new ft({
979
979
  checks: [],
980
980
  typeName: G.ZodString,
981
981
  coerce: e?.coerce ?? !1,
982
- ...R(e)
982
+ ...z(e)
983
983
  });
984
- function mt(e, t) {
984
+ function pt(e, t) {
985
985
  let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = n > r ? n : r;
986
986
  return Number.parseInt(e.toFixed(i).replace(".", "")) % Number.parseInt(t.toFixed(i).replace(".", "")) / 10 ** i;
987
987
  }
988
- var ht = class e extends z {
988
+ var mt = class e extends B {
989
989
  constructor() {
990
990
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
991
991
  }
992
992
  _parse(e) {
993
993
  if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== b.number) {
994
994
  let t = this._getOrReturnCtx(e);
995
- return M(t, {
995
+ return N(t, {
996
996
  code: y.invalid_type,
997
997
  expected: b.number,
998
998
  received: t.parsedType
999
- }), P;
999
+ }), F;
1000
1000
  }
1001
- let t, n = new N();
1002
- for (let r of this._def.checks) r.kind === "int" ? _.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), M(t, {
1001
+ let t, n = new P();
1002
+ for (let r of this._def.checks) r.kind === "int" ? _.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), N(t, {
1003
1003
  code: y.invalid_type,
1004
1004
  expected: "integer",
1005
1005
  received: "float",
1006
1006
  message: r.message
1007
- }), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), M(t, {
1007
+ }), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
1008
1008
  code: y.too_small,
1009
1009
  minimum: r.value,
1010
1010
  type: "number",
1011
1011
  inclusive: r.inclusive,
1012
1012
  exact: !1,
1013
1013
  message: r.message
1014
- }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), M(t, {
1014
+ }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
1015
1015
  code: y.too_big,
1016
1016
  maximum: r.value,
1017
1017
  type: "number",
1018
1018
  inclusive: r.inclusive,
1019
1019
  exact: !1,
1020
1020
  message: r.message
1021
- }), n.dirty()) : r.kind === "multipleOf" ? mt(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), M(t, {
1021
+ }), n.dirty()) : r.kind === "multipleOf" ? pt(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), N(t, {
1022
1022
  code: y.not_multiple_of,
1023
1023
  multipleOf: r.value,
1024
1024
  message: r.message
1025
- }), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), M(t, {
1025
+ }), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), N(t, {
1026
1026
  code: y.not_finite,
1027
1027
  message: r.message
1028
1028
  }), n.dirty()) : _.assertNever(r);
@@ -1032,16 +1032,16 @@ var ht = class e extends z {
1032
1032
  };
1033
1033
  }
1034
1034
  gte(e, t) {
1035
- return this.setLimit("min", e, !0, I.toString(t));
1035
+ return this.setLimit("min", e, !0, L.toString(t));
1036
1036
  }
1037
1037
  gt(e, t) {
1038
- return this.setLimit("min", e, !1, I.toString(t));
1038
+ return this.setLimit("min", e, !1, L.toString(t));
1039
1039
  }
1040
1040
  lte(e, t) {
1041
- return this.setLimit("max", e, !0, I.toString(t));
1041
+ return this.setLimit("max", e, !0, L.toString(t));
1042
1042
  }
1043
1043
  lt(e, t) {
1044
- return this.setLimit("max", e, !1, I.toString(t));
1044
+ return this.setLimit("max", e, !1, L.toString(t));
1045
1045
  }
1046
1046
  setLimit(t, n, r, i) {
1047
1047
  return new e({
@@ -1050,7 +1050,7 @@ var ht = class e extends z {
1050
1050
  kind: t,
1051
1051
  value: n,
1052
1052
  inclusive: r,
1053
- message: I.toString(i)
1053
+ message: L.toString(i)
1054
1054
  }]
1055
1055
  });
1056
1056
  }
@@ -1063,7 +1063,7 @@ var ht = class e extends z {
1063
1063
  int(e) {
1064
1064
  return this._addCheck({
1065
1065
  kind: "int",
1066
- message: I.toString(e)
1066
+ message: L.toString(e)
1067
1067
  });
1068
1068
  }
1069
1069
  positive(e) {
@@ -1071,7 +1071,7 @@ var ht = class e extends z {
1071
1071
  kind: "min",
1072
1072
  value: 0,
1073
1073
  inclusive: !1,
1074
- message: I.toString(e)
1074
+ message: L.toString(e)
1075
1075
  });
1076
1076
  }
1077
1077
  negative(e) {
@@ -1079,7 +1079,7 @@ var ht = class e extends z {
1079
1079
  kind: "max",
1080
1080
  value: 0,
1081
1081
  inclusive: !1,
1082
- message: I.toString(e)
1082
+ message: L.toString(e)
1083
1083
  });
1084
1084
  }
1085
1085
  nonpositive(e) {
@@ -1087,7 +1087,7 @@ var ht = class e extends z {
1087
1087
  kind: "max",
1088
1088
  value: 0,
1089
1089
  inclusive: !0,
1090
- message: I.toString(e)
1090
+ message: L.toString(e)
1091
1091
  });
1092
1092
  }
1093
1093
  nonnegative(e) {
@@ -1095,20 +1095,20 @@ var ht = class e extends z {
1095
1095
  kind: "min",
1096
1096
  value: 0,
1097
1097
  inclusive: !0,
1098
- message: I.toString(e)
1098
+ message: L.toString(e)
1099
1099
  });
1100
1100
  }
1101
1101
  multipleOf(e, t) {
1102
1102
  return this._addCheck({
1103
1103
  kind: "multipleOf",
1104
1104
  value: e,
1105
- message: I.toString(t)
1105
+ message: L.toString(t)
1106
1106
  });
1107
1107
  }
1108
1108
  finite(e) {
1109
1109
  return this._addCheck({
1110
1110
  kind: "finite",
1111
- message: I.toString(e)
1111
+ message: L.toString(e)
1112
1112
  });
1113
1113
  }
1114
1114
  safe(e) {
@@ -1116,12 +1116,12 @@ var ht = class e extends z {
1116
1116
  kind: "min",
1117
1117
  inclusive: !0,
1118
1118
  value: -(2 ** 53 - 1),
1119
- message: I.toString(e)
1119
+ message: L.toString(e)
1120
1120
  })._addCheck({
1121
1121
  kind: "max",
1122
1122
  inclusive: !0,
1123
1123
  value: 2 ** 53 - 1,
1124
- message: I.toString(e)
1124
+ message: L.toString(e)
1125
1125
  });
1126
1126
  }
1127
1127
  get minValue() {
@@ -1144,13 +1144,13 @@ var ht = class e extends z {
1144
1144
  return Number.isFinite(t) && Number.isFinite(e);
1145
1145
  }
1146
1146
  };
1147
- ht.create = (e) => new ht({
1147
+ mt.create = (e) => new mt({
1148
1148
  checks: [],
1149
1149
  typeName: G.ZodNumber,
1150
1150
  coerce: e?.coerce || !1,
1151
- ...R(e)
1151
+ ...z(e)
1152
1152
  });
1153
- var gt = class e extends z {
1153
+ var ht = class e extends B {
1154
1154
  constructor() {
1155
1155
  super(...arguments), this.min = this.gte, this.max = this.lte;
1156
1156
  }
@@ -1161,20 +1161,20 @@ var gt = class e extends z {
1161
1161
  return this._getInvalidInput(e);
1162
1162
  }
1163
1163
  if (this._getType(e) !== b.bigint) return this._getInvalidInput(e);
1164
- let t, n = new N();
1165
- for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), M(t, {
1164
+ let t, n = new P();
1165
+ for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
1166
1166
  code: y.too_small,
1167
1167
  type: "bigint",
1168
1168
  minimum: r.value,
1169
1169
  inclusive: r.inclusive,
1170
1170
  message: r.message
1171
- }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), M(t, {
1171
+ }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
1172
1172
  code: y.too_big,
1173
1173
  type: "bigint",
1174
1174
  maximum: r.value,
1175
1175
  inclusive: r.inclusive,
1176
1176
  message: r.message
1177
- }), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), M(t, {
1177
+ }), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), N(t, {
1178
1178
  code: y.not_multiple_of,
1179
1179
  multipleOf: r.value,
1180
1180
  message: r.message
@@ -1186,23 +1186,23 @@ var gt = class e extends z {
1186
1186
  }
1187
1187
  _getInvalidInput(e) {
1188
1188
  let t = this._getOrReturnCtx(e);
1189
- return M(t, {
1189
+ return N(t, {
1190
1190
  code: y.invalid_type,
1191
1191
  expected: b.bigint,
1192
1192
  received: t.parsedType
1193
- }), P;
1193
+ }), F;
1194
1194
  }
1195
1195
  gte(e, t) {
1196
- return this.setLimit("min", e, !0, I.toString(t));
1196
+ return this.setLimit("min", e, !0, L.toString(t));
1197
1197
  }
1198
1198
  gt(e, t) {
1199
- return this.setLimit("min", e, !1, I.toString(t));
1199
+ return this.setLimit("min", e, !1, L.toString(t));
1200
1200
  }
1201
1201
  lte(e, t) {
1202
- return this.setLimit("max", e, !0, I.toString(t));
1202
+ return this.setLimit("max", e, !0, L.toString(t));
1203
1203
  }
1204
1204
  lt(e, t) {
1205
- return this.setLimit("max", e, !1, I.toString(t));
1205
+ return this.setLimit("max", e, !1, L.toString(t));
1206
1206
  }
1207
1207
  setLimit(t, n, r, i) {
1208
1208
  return new e({
@@ -1211,7 +1211,7 @@ var gt = class e extends z {
1211
1211
  kind: t,
1212
1212
  value: n,
1213
1213
  inclusive: r,
1214
- message: I.toString(i)
1214
+ message: L.toString(i)
1215
1215
  }]
1216
1216
  });
1217
1217
  }
@@ -1226,7 +1226,7 @@ var gt = class e extends z {
1226
1226
  kind: "min",
1227
1227
  value: BigInt(0),
1228
1228
  inclusive: !1,
1229
- message: I.toString(e)
1229
+ message: L.toString(e)
1230
1230
  });
1231
1231
  }
1232
1232
  negative(e) {
@@ -1234,7 +1234,7 @@ var gt = class e extends z {
1234
1234
  kind: "max",
1235
1235
  value: BigInt(0),
1236
1236
  inclusive: !1,
1237
- message: I.toString(e)
1237
+ message: L.toString(e)
1238
1238
  });
1239
1239
  }
1240
1240
  nonpositive(e) {
@@ -1242,7 +1242,7 @@ var gt = class e extends z {
1242
1242
  kind: "max",
1243
1243
  value: BigInt(0),
1244
1244
  inclusive: !0,
1245
- message: I.toString(e)
1245
+ message: L.toString(e)
1246
1246
  });
1247
1247
  }
1248
1248
  nonnegative(e) {
@@ -1250,14 +1250,14 @@ var gt = class e extends z {
1250
1250
  kind: "min",
1251
1251
  value: BigInt(0),
1252
1252
  inclusive: !0,
1253
- message: I.toString(e)
1253
+ message: L.toString(e)
1254
1254
  });
1255
1255
  }
1256
1256
  multipleOf(e, t) {
1257
1257
  return this._addCheck({
1258
1258
  kind: "multipleOf",
1259
1259
  value: e,
1260
- message: I.toString(t)
1260
+ message: L.toString(t)
1261
1261
  });
1262
1262
  }
1263
1263
  get minValue() {
@@ -1271,50 +1271,50 @@ var gt = class e extends z {
1271
1271
  return e;
1272
1272
  }
1273
1273
  };
1274
- gt.create = (e) => new gt({
1274
+ ht.create = (e) => new ht({
1275
1275
  checks: [],
1276
1276
  typeName: G.ZodBigInt,
1277
1277
  coerce: e?.coerce ?? !1,
1278
- ...R(e)
1278
+ ...z(e)
1279
1279
  });
1280
- var _t = class extends z {
1280
+ var gt = class extends B {
1281
1281
  _parse(e) {
1282
1282
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== b.boolean) {
1283
1283
  let t = this._getOrReturnCtx(e);
1284
- return M(t, {
1284
+ return N(t, {
1285
1285
  code: y.invalid_type,
1286
1286
  expected: b.boolean,
1287
1287
  received: t.parsedType
1288
- }), P;
1288
+ }), F;
1289
1289
  }
1290
- return F(e.data);
1290
+ return I(e.data);
1291
1291
  }
1292
1292
  };
1293
- _t.create = (e) => new _t({
1293
+ gt.create = (e) => new gt({
1294
1294
  typeName: G.ZodBoolean,
1295
1295
  coerce: e?.coerce || !1,
1296
- ...R(e)
1296
+ ...z(e)
1297
1297
  });
1298
- var vt = class e extends z {
1298
+ var _t = class e extends B {
1299
1299
  _parse(e) {
1300
1300
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== b.date) {
1301
1301
  let t = this._getOrReturnCtx(e);
1302
- return M(t, {
1302
+ return N(t, {
1303
1303
  code: y.invalid_type,
1304
1304
  expected: b.date,
1305
1305
  received: t.parsedType
1306
- }), P;
1306
+ }), F;
1307
1307
  }
1308
- if (Number.isNaN(e.data.getTime())) return M(this._getOrReturnCtx(e), { code: y.invalid_date }), P;
1309
- let t = new N(), n;
1310
- for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), M(n, {
1308
+ if (Number.isNaN(e.data.getTime())) return N(this._getOrReturnCtx(e), { code: y.invalid_date }), F;
1309
+ let t = new P(), n;
1310
+ for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), N(n, {
1311
1311
  code: y.too_small,
1312
1312
  message: r.message,
1313
1313
  inclusive: !0,
1314
1314
  exact: !1,
1315
1315
  minimum: r.value,
1316
1316
  type: "date"
1317
- }), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), M(n, {
1317
+ }), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), N(n, {
1318
1318
  code: y.too_big,
1319
1319
  message: r.message,
1320
1320
  inclusive: !0,
@@ -1337,14 +1337,14 @@ var vt = class e extends z {
1337
1337
  return this._addCheck({
1338
1338
  kind: "min",
1339
1339
  value: e.getTime(),
1340
- message: I.toString(t)
1340
+ message: L.toString(t)
1341
1341
  });
1342
1342
  }
1343
1343
  max(e, t) {
1344
1344
  return this._addCheck({
1345
1345
  kind: "max",
1346
1346
  value: e.getTime(),
1347
- message: I.toString(t)
1347
+ message: L.toString(t)
1348
1348
  });
1349
1349
  }
1350
1350
  get minDate() {
@@ -1358,129 +1358,129 @@ var vt = class e extends z {
1358
1358
  return e == null ? null : new Date(e);
1359
1359
  }
1360
1360
  };
1361
- vt.create = (e) => new vt({
1361
+ _t.create = (e) => new _t({
1362
1362
  checks: [],
1363
1363
  coerce: e?.coerce || !1,
1364
1364
  typeName: G.ZodDate,
1365
- ...R(e)
1365
+ ...z(e)
1366
1366
  });
1367
- var yt = class extends z {
1367
+ var vt = class extends B {
1368
1368
  _parse(e) {
1369
1369
  if (this._getType(e) !== b.symbol) {
1370
1370
  let t = this._getOrReturnCtx(e);
1371
- return M(t, {
1371
+ return N(t, {
1372
1372
  code: y.invalid_type,
1373
1373
  expected: b.symbol,
1374
1374
  received: t.parsedType
1375
- }), P;
1375
+ }), F;
1376
1376
  }
1377
- return F(e.data);
1377
+ return I(e.data);
1378
1378
  }
1379
1379
  };
1380
- yt.create = (e) => new yt({
1380
+ vt.create = (e) => new vt({
1381
1381
  typeName: G.ZodSymbol,
1382
- ...R(e)
1382
+ ...z(e)
1383
1383
  });
1384
- var bt = class extends z {
1384
+ var yt = class extends B {
1385
1385
  _parse(e) {
1386
1386
  if (this._getType(e) !== b.undefined) {
1387
1387
  let t = this._getOrReturnCtx(e);
1388
- return M(t, {
1388
+ return N(t, {
1389
1389
  code: y.invalid_type,
1390
1390
  expected: b.undefined,
1391
1391
  received: t.parsedType
1392
- }), P;
1392
+ }), F;
1393
1393
  }
1394
- return F(e.data);
1394
+ return I(e.data);
1395
1395
  }
1396
1396
  };
1397
- bt.create = (e) => new bt({
1397
+ yt.create = (e) => new yt({
1398
1398
  typeName: G.ZodUndefined,
1399
- ...R(e)
1399
+ ...z(e)
1400
1400
  });
1401
- var xt = class extends z {
1401
+ var bt = class extends B {
1402
1402
  _parse(e) {
1403
1403
  if (this._getType(e) !== b.null) {
1404
1404
  let t = this._getOrReturnCtx(e);
1405
- return M(t, {
1405
+ return N(t, {
1406
1406
  code: y.invalid_type,
1407
1407
  expected: b.null,
1408
1408
  received: t.parsedType
1409
- }), P;
1409
+ }), F;
1410
1410
  }
1411
- return F(e.data);
1411
+ return I(e.data);
1412
1412
  }
1413
1413
  };
1414
- xt.create = (e) => new xt({
1414
+ bt.create = (e) => new bt({
1415
1415
  typeName: G.ZodNull,
1416
- ...R(e)
1416
+ ...z(e)
1417
1417
  });
1418
- var St = class extends z {
1418
+ var xt = class extends B {
1419
1419
  constructor() {
1420
1420
  super(...arguments), this._any = !0;
1421
1421
  }
1422
1422
  _parse(e) {
1423
- return F(e.data);
1423
+ return I(e.data);
1424
1424
  }
1425
1425
  };
1426
- St.create = (e) => new St({
1426
+ xt.create = (e) => new xt({
1427
1427
  typeName: G.ZodAny,
1428
- ...R(e)
1428
+ ...z(e)
1429
1429
  });
1430
- var Ct = class extends z {
1430
+ var St = class extends B {
1431
1431
  constructor() {
1432
1432
  super(...arguments), this._unknown = !0;
1433
1433
  }
1434
1434
  _parse(e) {
1435
- return F(e.data);
1435
+ return I(e.data);
1436
1436
  }
1437
1437
  };
1438
- Ct.create = (e) => new Ct({
1438
+ St.create = (e) => new St({
1439
1439
  typeName: G.ZodUnknown,
1440
- ...R(e)
1440
+ ...z(e)
1441
1441
  });
1442
- var B = class extends z {
1442
+ var Ct = class extends B {
1443
1443
  _parse(e) {
1444
1444
  let t = this._getOrReturnCtx(e);
1445
- return M(t, {
1445
+ return N(t, {
1446
1446
  code: y.invalid_type,
1447
1447
  expected: b.never,
1448
1448
  received: t.parsedType
1449
- }), P;
1449
+ }), F;
1450
1450
  }
1451
1451
  };
1452
- B.create = (e) => new B({
1452
+ Ct.create = (e) => new Ct({
1453
1453
  typeName: G.ZodNever,
1454
- ...R(e)
1454
+ ...z(e)
1455
1455
  });
1456
- var wt = class extends z {
1456
+ var wt = class extends B {
1457
1457
  _parse(e) {
1458
1458
  if (this._getType(e) !== b.undefined) {
1459
1459
  let t = this._getOrReturnCtx(e);
1460
- return M(t, {
1460
+ return N(t, {
1461
1461
  code: y.invalid_type,
1462
1462
  expected: b.void,
1463
1463
  received: t.parsedType
1464
- }), P;
1464
+ }), F;
1465
1465
  }
1466
- return F(e.data);
1466
+ return I(e.data);
1467
1467
  }
1468
1468
  };
1469
1469
  wt.create = (e) => new wt({
1470
1470
  typeName: G.ZodVoid,
1471
- ...R(e)
1471
+ ...z(e)
1472
1472
  });
1473
- var Tt = class e extends z {
1473
+ var Tt = class e extends B {
1474
1474
  _parse(e) {
1475
1475
  let { ctx: t, status: n } = this._processInputParams(e), r = this._def;
1476
- if (t.parsedType !== b.array) return M(t, {
1476
+ if (t.parsedType !== b.array) return N(t, {
1477
1477
  code: y.invalid_type,
1478
1478
  expected: b.array,
1479
1479
  received: t.parsedType
1480
- }), P;
1480
+ }), F;
1481
1481
  if (r.exactLength !== null) {
1482
1482
  let e = t.data.length > r.exactLength.value, i = t.data.length < r.exactLength.value;
1483
- (e || i) && (M(t, {
1483
+ (e || i) && (N(t, {
1484
1484
  code: e ? y.too_big : y.too_small,
1485
1485
  minimum: i ? r.exactLength.value : void 0,
1486
1486
  maximum: e ? r.exactLength.value : void 0,
@@ -1490,23 +1490,23 @@ var Tt = class e extends z {
1490
1490
  message: r.exactLength.message
1491
1491
  }), n.dirty());
1492
1492
  }
1493
- if (r.minLength !== null && t.data.length < r.minLength.value && (M(t, {
1493
+ if (r.minLength !== null && t.data.length < r.minLength.value && (N(t, {
1494
1494
  code: y.too_small,
1495
1495
  minimum: r.minLength.value,
1496
1496
  type: "array",
1497
1497
  inclusive: !0,
1498
1498
  exact: !1,
1499
1499
  message: r.minLength.message
1500
- }), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (M(t, {
1500
+ }), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (N(t, {
1501
1501
  code: y.too_big,
1502
1502
  maximum: r.maxLength.value,
1503
1503
  type: "array",
1504
1504
  inclusive: !0,
1505
1505
  exact: !1,
1506
1506
  message: r.maxLength.message
1507
- }), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new L(t, e, t.path, n)))).then((e) => N.mergeArray(n, e));
1508
- let i = [...t.data].map((e, n) => r.type._parseSync(new L(t, e, t.path, n)));
1509
- return N.mergeArray(n, i);
1507
+ }), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new R(t, e, t.path, n)))).then((e) => P.mergeArray(n, e));
1508
+ let i = [...t.data].map((e, n) => r.type._parseSync(new R(t, e, t.path, n)));
1509
+ return P.mergeArray(n, i);
1510
1510
  }
1511
1511
  get element() {
1512
1512
  return this._def.type;
@@ -1516,7 +1516,7 @@ var Tt = class e extends z {
1516
1516
  ...this._def,
1517
1517
  minLength: {
1518
1518
  value: t,
1519
- message: I.toString(n)
1519
+ message: L.toString(n)
1520
1520
  }
1521
1521
  });
1522
1522
  }
@@ -1525,7 +1525,7 @@ var Tt = class e extends z {
1525
1525
  ...this._def,
1526
1526
  maxLength: {
1527
1527
  value: t,
1528
- message: I.toString(n)
1528
+ message: L.toString(n)
1529
1529
  }
1530
1530
  });
1531
1531
  }
@@ -1534,7 +1534,7 @@ var Tt = class e extends z {
1534
1534
  ...this._def,
1535
1535
  exactLength: {
1536
1536
  value: t,
1537
- message: I.toString(n)
1537
+ message: L.toString(n)
1538
1538
  }
1539
1539
  });
1540
1540
  }
@@ -1548,7 +1548,7 @@ Tt.create = (e, t) => new Tt({
1548
1548
  maxLength: null,
1549
1549
  exactLength: null,
1550
1550
  typeName: G.ZodArray,
1551
- ...R(t)
1551
+ ...z(t)
1552
1552
  });
1553
1553
  function Et(e) {
1554
1554
  if (e instanceof V) {
@@ -1570,7 +1570,7 @@ function Et(e) {
1570
1570
  else if (e instanceof jt) return jt.create(e.items.map((e) => Et(e)));
1571
1571
  else return e;
1572
1572
  }
1573
- var V = class e extends z {
1573
+ var V = class e extends B {
1574
1574
  constructor() {
1575
1575
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
1576
1576
  }
@@ -1585,14 +1585,14 @@ var V = class e extends z {
1585
1585
  _parse(e) {
1586
1586
  if (this._getType(e) !== b.object) {
1587
1587
  let t = this._getOrReturnCtx(e);
1588
- return M(t, {
1588
+ return N(t, {
1589
1589
  code: y.invalid_type,
1590
1590
  expected: b.object,
1591
1591
  received: t.parsedType
1592
- }), P;
1592
+ }), F;
1593
1593
  }
1594
1594
  let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = [];
1595
- if (!(this._def.catchall instanceof B && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
1595
+ if (!(this._def.catchall instanceof Ct && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
1596
1596
  let o = [];
1597
1597
  for (let e of i) {
1598
1598
  let t = r[e], i = n.data[e];
@@ -1601,11 +1601,11 @@ var V = class e extends z {
1601
1601
  status: "valid",
1602
1602
  value: e
1603
1603
  },
1604
- value: t._parse(new L(n, i, n.path, e)),
1604
+ value: t._parse(new R(n, i, n.path, e)),
1605
1605
  alwaysSet: e in n.data
1606
1606
  });
1607
1607
  }
1608
- if (this._def.catchall instanceof B) {
1608
+ if (this._def.catchall instanceof Ct) {
1609
1609
  let e = this._def.unknownKeys;
1610
1610
  if (e === "passthrough") for (let e of a) o.push({
1611
1611
  key: {
@@ -1617,7 +1617,7 @@ var V = class e extends z {
1617
1617
  value: n.data[e]
1618
1618
  }
1619
1619
  });
1620
- else if (e === "strict") a.length > 0 && (M(n, {
1620
+ else if (e === "strict") a.length > 0 && (N(n, {
1621
1621
  code: y.unrecognized_keys,
1622
1622
  keys: a
1623
1623
  }), t.dirty());
@@ -1631,7 +1631,7 @@ var V = class e extends z {
1631
1631
  status: "valid",
1632
1632
  value: t
1633
1633
  },
1634
- value: e._parse(new L(n, r, n.path, t)),
1634
+ value: e._parse(new R(n, r, n.path, t)),
1635
1635
  alwaysSet: t in n.data
1636
1636
  });
1637
1637
  }
@@ -1647,18 +1647,18 @@ var V = class e extends z {
1647
1647
  });
1648
1648
  }
1649
1649
  return e;
1650
- }).then((e) => N.mergeObjectSync(t, e)) : N.mergeObjectSync(t, o);
1650
+ }).then((e) => P.mergeObjectSync(t, e)) : P.mergeObjectSync(t, o);
1651
1651
  }
1652
1652
  get shape() {
1653
1653
  return this._def.shape();
1654
1654
  }
1655
1655
  strict(t) {
1656
- return I.errToObj, new e({
1656
+ return L.errToObj, new e({
1657
1657
  ...this._def,
1658
1658
  unknownKeys: "strict",
1659
1659
  ...t === void 0 ? {} : { errorMap: (e, n) => {
1660
1660
  let r = this._def.errorMap?.(e, n).message ?? n.defaultError;
1661
- return e.code === "unrecognized_keys" ? { message: I.errToObj(t).message ?? r } : { message: r };
1661
+ return e.code === "unrecognized_keys" ? { message: L.errToObj(t).message ?? r } : { message: r };
1662
1662
  } }
1663
1663
  });
1664
1664
  }
@@ -1753,33 +1753,33 @@ var V = class e extends z {
1753
1753
  V.create = (e, t) => new V({
1754
1754
  shape: () => e,
1755
1755
  unknownKeys: "strip",
1756
- catchall: B.create(),
1756
+ catchall: Ct.create(),
1757
1757
  typeName: G.ZodObject,
1758
- ...R(t)
1758
+ ...z(t)
1759
1759
  }), V.strictCreate = (e, t) => new V({
1760
1760
  shape: () => e,
1761
1761
  unknownKeys: "strict",
1762
- catchall: B.create(),
1762
+ catchall: Ct.create(),
1763
1763
  typeName: G.ZodObject,
1764
- ...R(t)
1764
+ ...z(t)
1765
1765
  }), V.lazycreate = (e, t) => new V({
1766
1766
  shape: e,
1767
1767
  unknownKeys: "strip",
1768
- catchall: B.create(),
1768
+ catchall: Ct.create(),
1769
1769
  typeName: G.ZodObject,
1770
- ...R(t)
1770
+ ...z(t)
1771
1771
  });
1772
- var Dt = class extends z {
1772
+ var Dt = class extends B {
1773
1773
  _parse(e) {
1774
1774
  let { ctx: t } = this._processInputParams(e), n = this._def.options;
1775
1775
  function r(e) {
1776
1776
  for (let t of e) if (t.result.status === "valid") return t.result;
1777
1777
  for (let n of e) if (n.result.status === "dirty") return t.common.issues.push(...n.ctx.common.issues), n.result;
1778
1778
  let n = e.map((e) => new x(e.ctx.common.issues));
1779
- return M(t, {
1779
+ return N(t, {
1780
1780
  code: y.invalid_union,
1781
1781
  unionErrors: n
1782
- }), P;
1782
+ }), F;
1783
1783
  }
1784
1784
  if (t.common.async) return Promise.all(n.map(async (e) => {
1785
1785
  let n = {
@@ -1822,10 +1822,10 @@ var Dt = class extends z {
1822
1822
  }
1823
1823
  if (e) return t.common.issues.push(...e.ctx.common.issues), e.result;
1824
1824
  let i = r.map((e) => new x(e));
1825
- return M(t, {
1825
+ return N(t, {
1826
1826
  code: y.invalid_union,
1827
1827
  unionErrors: i
1828
- }), P;
1828
+ }), F;
1829
1829
  }
1830
1830
  }
1831
1831
  get options() {
@@ -1835,16 +1835,16 @@ var Dt = class extends z {
1835
1835
  Dt.create = (e, t) => new Dt({
1836
1836
  options: e,
1837
1837
  typeName: G.ZodUnion,
1838
- ...R(t)
1838
+ ...z(t)
1839
1839
  });
1840
- var H = (e) => e instanceof It ? H(e.schema) : e instanceof U ? H(e.innerType()) : e instanceof Lt ? [e.value] : e instanceof zt ? e.options : e instanceof Bt ? _.objectValues(e.enum) : e instanceof Ut ? H(e._def.innerType) : e instanceof bt ? [void 0] : e instanceof xt ? [null] : e instanceof W ? [void 0, ...H(e.unwrap())] : e instanceof Ht ? [null, ...H(e.unwrap())] : e instanceof Kt || e instanceof Jt ? H(e.unwrap()) : e instanceof Wt ? H(e._def.innerType) : [], Ot = class e extends z {
1840
+ var H = (e) => e instanceof It ? H(e.schema) : e instanceof U ? H(e.innerType()) : e instanceof Lt ? [e.value] : e instanceof zt ? e.options : e instanceof Bt ? _.objectValues(e.enum) : e instanceof Ut ? H(e._def.innerType) : e instanceof yt ? [void 0] : e instanceof bt ? [null] : e instanceof W ? [void 0, ...H(e.unwrap())] : e instanceof Ht ? [null, ...H(e.unwrap())] : e instanceof Kt || e instanceof Jt ? H(e.unwrap()) : e instanceof Wt ? H(e._def.innerType) : [], Ot = class e extends B {
1841
1841
  _parse(e) {
1842
1842
  let { ctx: t } = this._processInputParams(e);
1843
- if (t.parsedType !== b.object) return M(t, {
1843
+ if (t.parsedType !== b.object) return N(t, {
1844
1844
  code: y.invalid_type,
1845
1845
  expected: b.object,
1846
1846
  received: t.parsedType
1847
- }), P;
1847
+ }), F;
1848
1848
  let n = this.discriminator, r = t.data[n], i = this.optionsMap.get(r);
1849
1849
  return i ? t.common.async ? i._parseAsync({
1850
1850
  data: t.data,
@@ -1854,11 +1854,11 @@ var H = (e) => e instanceof It ? H(e.schema) : e instanceof U ? H(e.innerType())
1854
1854
  data: t.data,
1855
1855
  path: t.path,
1856
1856
  parent: t
1857
- }) : (M(t, {
1857
+ }) : (N(t, {
1858
1858
  code: y.invalid_union_discriminator,
1859
1859
  options: Array.from(this.optionsMap.keys()),
1860
1860
  path: [n]
1861
- }), P);
1861
+ }), F);
1862
1862
  }
1863
1863
  get discriminator() {
1864
1864
  return this._def.discriminator;
@@ -1884,7 +1884,7 @@ var H = (e) => e instanceof It ? H(e.schema) : e instanceof U ? H(e.innerType())
1884
1884
  discriminator: t,
1885
1885
  options: n,
1886
1886
  optionsMap: i,
1887
- ...R(r)
1887
+ ...z(r)
1888
1888
  });
1889
1889
  }
1890
1890
  };
@@ -1926,15 +1926,15 @@ function kt(e, t) {
1926
1926
  };
1927
1927
  else return { valid: !1 };
1928
1928
  }
1929
- var At = class extends z {
1929
+ var At = class extends B {
1930
1930
  _parse(e) {
1931
1931
  let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
1932
- if (Re(e) || Re(r)) return P;
1932
+ if (Le(e) || Le(r)) return F;
1933
1933
  let i = kt(e.value, r.value);
1934
- return i.valid ? ((ze(e) || ze(r)) && t.dirty(), {
1934
+ return i.valid ? ((Re(e) || Re(r)) && t.dirty(), {
1935
1935
  status: t.value,
1936
1936
  value: i.data
1937
- }) : (M(n, { code: y.invalid_intersection_types }), P);
1937
+ }) : (N(n, { code: y.invalid_intersection_types }), F);
1938
1938
  };
1939
1939
  return n.common.async ? Promise.all([this._def.left._parseAsync({
1940
1940
  data: n.data,
@@ -1959,24 +1959,24 @@ At.create = (e, t, n) => new At({
1959
1959
  left: e,
1960
1960
  right: t,
1961
1961
  typeName: G.ZodIntersection,
1962
- ...R(n)
1962
+ ...z(n)
1963
1963
  });
1964
- var jt = class e extends z {
1964
+ var jt = class e extends B {
1965
1965
  _parse(e) {
1966
1966
  let { status: t, ctx: n } = this._processInputParams(e);
1967
- if (n.parsedType !== b.array) return M(n, {
1967
+ if (n.parsedType !== b.array) return N(n, {
1968
1968
  code: y.invalid_type,
1969
1969
  expected: b.array,
1970
1970
  received: n.parsedType
1971
- }), P;
1972
- if (n.data.length < this._def.items.length) return M(n, {
1971
+ }), F;
1972
+ if (n.data.length < this._def.items.length) return N(n, {
1973
1973
  code: y.too_small,
1974
1974
  minimum: this._def.items.length,
1975
1975
  inclusive: !0,
1976
1976
  exact: !1,
1977
1977
  type: "array"
1978
- }), P;
1979
- !this._def.rest && n.data.length > this._def.items.length && (M(n, {
1978
+ }), F;
1979
+ !this._def.rest && n.data.length > this._def.items.length && (N(n, {
1980
1980
  code: y.too_big,
1981
1981
  maximum: this._def.items.length,
1982
1982
  inclusive: !0,
@@ -1985,9 +1985,9 @@ var jt = class e extends z {
1985
1985
  }), t.dirty());
1986
1986
  let r = [...n.data].map((e, t) => {
1987
1987
  let r = this._def.items[t] || this._def.rest;
1988
- return r ? r._parse(new L(n, e, n.path, t)) : null;
1988
+ return r ? r._parse(new R(n, e, n.path, t)) : null;
1989
1989
  }).filter((e) => !!e);
1990
- return n.common.async ? Promise.all(r).then((e) => N.mergeArray(t, e)) : N.mergeArray(t, r);
1990
+ return n.common.async ? Promise.all(r).then((e) => P.mergeArray(t, e)) : P.mergeArray(t, r);
1991
1991
  }
1992
1992
  get items() {
1993
1993
  return this._def.items;
@@ -2005,10 +2005,10 @@ jt.create = (e, t) => {
2005
2005
  items: e,
2006
2006
  typeName: G.ZodTuple,
2007
2007
  rest: null,
2008
- ...R(t)
2008
+ ...z(t)
2009
2009
  });
2010
2010
  };
2011
- var Mt = class e extends z {
2011
+ var Mt = class e extends B {
2012
2012
  get keySchema() {
2013
2013
  return this._def.keyType;
2014
2014
  }
@@ -2017,36 +2017,36 @@ var Mt = class e extends z {
2017
2017
  }
2018
2018
  _parse(e) {
2019
2019
  let { status: t, ctx: n } = this._processInputParams(e);
2020
- if (n.parsedType !== b.object) return M(n, {
2020
+ if (n.parsedType !== b.object) return N(n, {
2021
2021
  code: y.invalid_type,
2022
2022
  expected: b.object,
2023
2023
  received: n.parsedType
2024
- }), P;
2024
+ }), F;
2025
2025
  let r = [], i = this._def.keyType, a = this._def.valueType;
2026
2026
  for (let e in n.data) r.push({
2027
- key: i._parse(new L(n, e, n.path, e)),
2028
- value: a._parse(new L(n, n.data[e], n.path, e)),
2027
+ key: i._parse(new R(n, e, n.path, e)),
2028
+ value: a._parse(new R(n, n.data[e], n.path, e)),
2029
2029
  alwaysSet: e in n.data
2030
2030
  });
2031
- return n.common.async ? N.mergeObjectAsync(t, r) : N.mergeObjectSync(t, r);
2031
+ return n.common.async ? P.mergeObjectAsync(t, r) : P.mergeObjectSync(t, r);
2032
2032
  }
2033
2033
  get element() {
2034
2034
  return this._def.valueType;
2035
2035
  }
2036
2036
  static create(t, n, r) {
2037
- return n instanceof z ? new e({
2037
+ return n instanceof B ? new e({
2038
2038
  keyType: t,
2039
2039
  valueType: n,
2040
2040
  typeName: G.ZodRecord,
2041
- ...R(r)
2041
+ ...z(r)
2042
2042
  }) : new e({
2043
- keyType: pt.create(),
2043
+ keyType: ft.create(),
2044
2044
  valueType: t,
2045
2045
  typeName: G.ZodRecord,
2046
- ...R(n)
2046
+ ...z(n)
2047
2047
  });
2048
2048
  }
2049
- }, Nt = class extends z {
2049
+ }, Nt = class extends B {
2050
2050
  get keySchema() {
2051
2051
  return this._def.keyType;
2052
2052
  }
@@ -2055,21 +2055,21 @@ var Mt = class e extends z {
2055
2055
  }
2056
2056
  _parse(e) {
2057
2057
  let { status: t, ctx: n } = this._processInputParams(e);
2058
- if (n.parsedType !== b.map) return M(n, {
2058
+ if (n.parsedType !== b.map) return N(n, {
2059
2059
  code: y.invalid_type,
2060
2060
  expected: b.map,
2061
2061
  received: n.parsedType
2062
- }), P;
2062
+ }), F;
2063
2063
  let r = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([e, t], a) => ({
2064
- key: r._parse(new L(n, e, n.path, [a, "key"])),
2065
- value: i._parse(new L(n, t, n.path, [a, "value"]))
2064
+ key: r._parse(new R(n, e, n.path, [a, "key"])),
2065
+ value: i._parse(new R(n, t, n.path, [a, "value"]))
2066
2066
  }));
2067
2067
  if (n.common.async) {
2068
2068
  let e = /* @__PURE__ */ new Map();
2069
2069
  return Promise.resolve().then(async () => {
2070
2070
  for (let n of a) {
2071
2071
  let r = await n.key, i = await n.value;
2072
- if (r.status === "aborted" || i.status === "aborted") return P;
2072
+ if (r.status === "aborted" || i.status === "aborted") return F;
2073
2073
  (r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
2074
2074
  }
2075
2075
  return {
@@ -2081,7 +2081,7 @@ var Mt = class e extends z {
2081
2081
  let e = /* @__PURE__ */ new Map();
2082
2082
  for (let n of a) {
2083
2083
  let r = n.key, i = n.value;
2084
- if (r.status === "aborted" || i.status === "aborted") return P;
2084
+ if (r.status === "aborted" || i.status === "aborted") return F;
2085
2085
  (r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
2086
2086
  }
2087
2087
  return {
@@ -2095,25 +2095,25 @@ Nt.create = (e, t, n) => new Nt({
2095
2095
  valueType: t,
2096
2096
  keyType: e,
2097
2097
  typeName: G.ZodMap,
2098
- ...R(n)
2098
+ ...z(n)
2099
2099
  });
2100
- var Pt = class e extends z {
2100
+ var Pt = class e extends B {
2101
2101
  _parse(e) {
2102
2102
  let { status: t, ctx: n } = this._processInputParams(e);
2103
- if (n.parsedType !== b.set) return M(n, {
2103
+ if (n.parsedType !== b.set) return N(n, {
2104
2104
  code: y.invalid_type,
2105
2105
  expected: b.set,
2106
2106
  received: n.parsedType
2107
- }), P;
2107
+ }), F;
2108
2108
  let r = this._def;
2109
- r.minSize !== null && n.data.size < r.minSize.value && (M(n, {
2109
+ r.minSize !== null && n.data.size < r.minSize.value && (N(n, {
2110
2110
  code: y.too_small,
2111
2111
  minimum: r.minSize.value,
2112
2112
  type: "set",
2113
2113
  inclusive: !0,
2114
2114
  exact: !1,
2115
2115
  message: r.minSize.message
2116
- }), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (M(n, {
2116
+ }), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (N(n, {
2117
2117
  code: y.too_big,
2118
2118
  maximum: r.maxSize.value,
2119
2119
  type: "set",
@@ -2125,7 +2125,7 @@ var Pt = class e extends z {
2125
2125
  function a(e) {
2126
2126
  let n = /* @__PURE__ */ new Set();
2127
2127
  for (let r of e) {
2128
- if (r.status === "aborted") return P;
2128
+ if (r.status === "aborted") return F;
2129
2129
  r.status === "dirty" && t.dirty(), n.add(r.value);
2130
2130
  }
2131
2131
  return {
@@ -2133,7 +2133,7 @@ var Pt = class e extends z {
2133
2133
  value: n
2134
2134
  };
2135
2135
  }
2136
- let o = [...n.data.values()].map((e, t) => i._parse(new L(n, e, n.path, t)));
2136
+ let o = [...n.data.values()].map((e, t) => i._parse(new R(n, e, n.path, t)));
2137
2137
  return n.common.async ? Promise.all(o).then((e) => a(e)) : a(o);
2138
2138
  }
2139
2139
  min(t, n) {
@@ -2141,7 +2141,7 @@ var Pt = class e extends z {
2141
2141
  ...this._def,
2142
2142
  minSize: {
2143
2143
  value: t,
2144
- message: I.toString(n)
2144
+ message: L.toString(n)
2145
2145
  }
2146
2146
  });
2147
2147
  }
@@ -2150,7 +2150,7 @@ var Pt = class e extends z {
2150
2150
  ...this._def,
2151
2151
  maxSize: {
2152
2152
  value: t,
2153
- message: I.toString(n)
2153
+ message: L.toString(n)
2154
2154
  }
2155
2155
  });
2156
2156
  }
@@ -2166,28 +2166,28 @@ Pt.create = (e, t) => new Pt({
2166
2166
  minSize: null,
2167
2167
  maxSize: null,
2168
2168
  typeName: G.ZodSet,
2169
- ...R(t)
2169
+ ...z(t)
2170
2170
  });
2171
- var Ft = class e extends z {
2171
+ var Ft = class e extends B {
2172
2172
  constructor() {
2173
2173
  super(...arguments), this.validate = this.implement;
2174
2174
  }
2175
2175
  _parse(e) {
2176
2176
  let { ctx: t } = this._processInputParams(e);
2177
- if (t.parsedType !== b.function) return M(t, {
2177
+ if (t.parsedType !== b.function) return N(t, {
2178
2178
  code: y.invalid_type,
2179
2179
  expected: b.function,
2180
2180
  received: t.parsedType
2181
- }), P;
2181
+ }), F;
2182
2182
  function n(e, n) {
2183
- return j({
2183
+ return M({
2184
2184
  data: e,
2185
2185
  path: t.path,
2186
2186
  errorMaps: [
2187
2187
  t.common.contextualErrorMap,
2188
2188
  t.schemaErrorMap,
2189
- Ie(),
2190
- Pe
2189
+ Fe(),
2190
+ j
2191
2191
  ].filter((e) => !!e),
2192
2192
  issueData: {
2193
2193
  code: y.invalid_arguments,
@@ -2196,14 +2196,14 @@ var Ft = class e extends z {
2196
2196
  });
2197
2197
  }
2198
2198
  function r(e, n) {
2199
- return j({
2199
+ return M({
2200
2200
  data: e,
2201
2201
  path: t.path,
2202
2202
  errorMaps: [
2203
2203
  t.common.contextualErrorMap,
2204
2204
  t.schemaErrorMap,
2205
- Ie(),
2206
- Pe
2205
+ Fe(),
2206
+ j
2207
2207
  ].filter((e) => !!e),
2208
2208
  issueData: {
2209
2209
  code: y.invalid_return_type,
@@ -2214,7 +2214,7 @@ var Ft = class e extends z {
2214
2214
  let i = { errorMap: t.common.contextualErrorMap }, a = t.data;
2215
2215
  if (this._def.returns instanceof Vt) {
2216
2216
  let e = this;
2217
- return F(async function(...t) {
2217
+ return I(async function(...t) {
2218
2218
  let o = new x([]), s = await e._def.args.parseAsync(t, i).catch((e) => {
2219
2219
  throw o.addIssue(n(t, e)), o;
2220
2220
  }), c = await Reflect.apply(a, this, s);
@@ -2224,7 +2224,7 @@ var Ft = class e extends z {
2224
2224
  });
2225
2225
  } else {
2226
2226
  let e = this;
2227
- return F(function(...t) {
2227
+ return I(function(...t) {
2228
2228
  let o = e._def.args.safeParse(t, i);
2229
2229
  if (!o.success) throw new x([n(t, o.error)]);
2230
2230
  let s = Reflect.apply(a, this, o.data), c = e._def.returns.safeParse(s, i);
@@ -2242,7 +2242,7 @@ var Ft = class e extends z {
2242
2242
  args(...t) {
2243
2243
  return new e({
2244
2244
  ...this._def,
2245
- args: jt.create(t).rest(Ct.create())
2245
+ args: jt.create(t).rest(St.create())
2246
2246
  });
2247
2247
  }
2248
2248
  returns(t) {
@@ -2259,13 +2259,13 @@ var Ft = class e extends z {
2259
2259
  }
2260
2260
  static create(t, n, r) {
2261
2261
  return new e({
2262
- args: t || jt.create([]).rest(Ct.create()),
2263
- returns: n || Ct.create(),
2262
+ args: t || jt.create([]).rest(St.create()),
2263
+ returns: n || St.create(),
2264
2264
  typeName: G.ZodFunction,
2265
- ...R(r)
2265
+ ...z(r)
2266
2266
  });
2267
2267
  }
2268
- }, It = class extends z {
2268
+ }, It = class extends B {
2269
2269
  get schema() {
2270
2270
  return this._def.getter();
2271
2271
  }
@@ -2281,17 +2281,17 @@ var Ft = class e extends z {
2281
2281
  It.create = (e, t) => new It({
2282
2282
  getter: e,
2283
2283
  typeName: G.ZodLazy,
2284
- ...R(t)
2284
+ ...z(t)
2285
2285
  });
2286
- var Lt = class extends z {
2286
+ var Lt = class extends B {
2287
2287
  _parse(e) {
2288
2288
  if (e.data !== this._def.value) {
2289
2289
  let t = this._getOrReturnCtx(e);
2290
- return M(t, {
2290
+ return N(t, {
2291
2291
  received: t.data,
2292
2292
  code: y.invalid_literal,
2293
2293
  expected: this._def.value
2294
- }), P;
2294
+ }), F;
2295
2295
  }
2296
2296
  return {
2297
2297
  status: "valid",
@@ -2305,34 +2305,34 @@ var Lt = class extends z {
2305
2305
  Lt.create = (e, t) => new Lt({
2306
2306
  value: e,
2307
2307
  typeName: G.ZodLiteral,
2308
- ...R(t)
2308
+ ...z(t)
2309
2309
  });
2310
2310
  function Rt(e, t) {
2311
2311
  return new zt({
2312
2312
  values: e,
2313
2313
  typeName: G.ZodEnum,
2314
- ...R(t)
2314
+ ...z(t)
2315
2315
  });
2316
2316
  }
2317
- var zt = class e extends z {
2317
+ var zt = class e extends B {
2318
2318
  _parse(e) {
2319
2319
  if (typeof e.data != "string") {
2320
2320
  let t = this._getOrReturnCtx(e), n = this._def.values;
2321
- return M(t, {
2321
+ return N(t, {
2322
2322
  expected: _.joinValues(n),
2323
2323
  received: t.parsedType,
2324
2324
  code: y.invalid_type
2325
- }), P;
2325
+ }), F;
2326
2326
  }
2327
2327
  if (this._cache ||= new Set(this._def.values), !this._cache.has(e.data)) {
2328
2328
  let t = this._getOrReturnCtx(e), n = this._def.values;
2329
- return M(t, {
2329
+ return N(t, {
2330
2330
  received: t.data,
2331
2331
  code: y.invalid_enum_value,
2332
2332
  options: n
2333
- }), P;
2333
+ }), F;
2334
2334
  }
2335
- return F(e.data);
2335
+ return I(e.data);
2336
2336
  }
2337
2337
  get options() {
2338
2338
  return this._def.values;
@@ -2366,26 +2366,26 @@ var zt = class e extends z {
2366
2366
  }
2367
2367
  };
2368
2368
  zt.create = Rt;
2369
- var Bt = class extends z {
2369
+ var Bt = class extends B {
2370
2370
  _parse(e) {
2371
2371
  let t = _.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
2372
2372
  if (n.parsedType !== b.string && n.parsedType !== b.number) {
2373
2373
  let e = _.objectValues(t);
2374
- return M(n, {
2374
+ return N(n, {
2375
2375
  expected: _.joinValues(e),
2376
2376
  received: n.parsedType,
2377
2377
  code: y.invalid_type
2378
- }), P;
2378
+ }), F;
2379
2379
  }
2380
2380
  if (this._cache ||= new Set(_.getValidEnumValues(this._def.values)), !this._cache.has(e.data)) {
2381
2381
  let e = _.objectValues(t);
2382
- return M(n, {
2382
+ return N(n, {
2383
2383
  received: n.data,
2384
2384
  code: y.invalid_enum_value,
2385
2385
  options: e
2386
- }), P;
2386
+ }), F;
2387
2387
  }
2388
- return F(e.data);
2388
+ return I(e.data);
2389
2389
  }
2390
2390
  get enum() {
2391
2391
  return this._def.values;
@@ -2394,19 +2394,19 @@ var Bt = class extends z {
2394
2394
  Bt.create = (e, t) => new Bt({
2395
2395
  values: e,
2396
2396
  typeName: G.ZodNativeEnum,
2397
- ...R(t)
2397
+ ...z(t)
2398
2398
  });
2399
- var Vt = class extends z {
2399
+ var Vt = class extends B {
2400
2400
  unwrap() {
2401
2401
  return this._def.type;
2402
2402
  }
2403
2403
  _parse(e) {
2404
2404
  let { ctx: t } = this._processInputParams(e);
2405
- return t.parsedType !== b.promise && t.common.async === !1 ? (M(t, {
2405
+ return t.parsedType !== b.promise && t.common.async === !1 ? (N(t, {
2406
2406
  code: y.invalid_type,
2407
2407
  expected: b.promise,
2408
2408
  received: t.parsedType
2409
- }), P) : F((t.parsedType === b.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
2409
+ }), F) : I((t.parsedType === b.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
2410
2410
  path: t.path,
2411
2411
  errorMap: t.common.contextualErrorMap
2412
2412
  })));
@@ -2415,9 +2415,9 @@ var Vt = class extends z {
2415
2415
  Vt.create = (e, t) => new Vt({
2416
2416
  type: e,
2417
2417
  typeName: G.ZodPromise,
2418
- ...R(t)
2418
+ ...z(t)
2419
2419
  });
2420
- var U = class extends z {
2420
+ var U = class extends B {
2421
2421
  innerType() {
2422
2422
  return this._def.schema;
2423
2423
  }
@@ -2427,7 +2427,7 @@ var U = class extends z {
2427
2427
  _parse(e) {
2428
2428
  let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, i = {
2429
2429
  addIssue: (e) => {
2430
- M(n, e), e.fatal ? t.abort() : t.dirty();
2430
+ N(n, e), e.fatal ? t.abort() : t.dirty();
2431
2431
  },
2432
2432
  get path() {
2433
2433
  return n.path;
@@ -2436,22 +2436,22 @@ var U = class extends z {
2436
2436
  if (i.addIssue = i.addIssue.bind(i), r.type === "preprocess") {
2437
2437
  let e = r.transform(n.data, i);
2438
2438
  if (n.common.async) return Promise.resolve(e).then(async (e) => {
2439
- if (t.value === "aborted") return P;
2439
+ if (t.value === "aborted") return F;
2440
2440
  let r = await this._def.schema._parseAsync({
2441
2441
  data: e,
2442
2442
  path: n.path,
2443
2443
  parent: n
2444
2444
  });
2445
- return r.status === "aborted" ? P : r.status === "dirty" || t.value === "dirty" ? Le(r.value) : r;
2445
+ return r.status === "aborted" ? F : r.status === "dirty" || t.value === "dirty" ? Ie(r.value) : r;
2446
2446
  });
2447
2447
  {
2448
- if (t.value === "aborted") return P;
2448
+ if (t.value === "aborted") return F;
2449
2449
  let r = this._def.schema._parseSync({
2450
2450
  data: e,
2451
2451
  path: n.path,
2452
2452
  parent: n
2453
2453
  });
2454
- return r.status === "aborted" ? P : r.status === "dirty" || t.value === "dirty" ? Le(r.value) : r;
2454
+ return r.status === "aborted" ? F : r.status === "dirty" || t.value === "dirty" ? Ie(r.value) : r;
2455
2455
  }
2456
2456
  }
2457
2457
  if (r.type === "refinement") {
@@ -2467,7 +2467,7 @@ var U = class extends z {
2467
2467
  path: n.path,
2468
2468
  parent: n
2469
2469
  });
2470
- return r.status === "aborted" ? P : (r.status === "dirty" && t.dirty(), e(r.value), {
2470
+ return r.status === "aborted" ? F : (r.status === "dirty" && t.dirty(), e(r.value), {
2471
2471
  status: t.value,
2472
2472
  value: r.value
2473
2473
  });
@@ -2475,7 +2475,7 @@ var U = class extends z {
2475
2475
  data: n.data,
2476
2476
  path: n.path,
2477
2477
  parent: n
2478
- }).then((n) => n.status === "aborted" ? P : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
2478
+ }).then((n) => n.status === "aborted" ? F : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
2479
2479
  status: t.value,
2480
2480
  value: n.value
2481
2481
  }))));
@@ -2486,7 +2486,7 @@ var U = class extends z {
2486
2486
  path: n.path,
2487
2487
  parent: n
2488
2488
  });
2489
- if (!Be(e)) return P;
2489
+ if (!ze(e)) return F;
2490
2490
  let a = r.transform(e.value, i);
2491
2491
  if (a instanceof Promise) throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2492
2492
  return {
@@ -2497,10 +2497,10 @@ var U = class extends z {
2497
2497
  data: n.data,
2498
2498
  path: n.path,
2499
2499
  parent: n
2500
- }).then((e) => Be(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
2500
+ }).then((e) => ze(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
2501
2501
  status: t.value,
2502
2502
  value: e
2503
- })) : P);
2503
+ })) : F);
2504
2504
  _.assertNever(r);
2505
2505
  }
2506
2506
  };
@@ -2508,7 +2508,7 @@ U.create = (e, t, n) => new U({
2508
2508
  schema: e,
2509
2509
  typeName: G.ZodEffects,
2510
2510
  effect: t,
2511
- ...R(n)
2511
+ ...z(n)
2512
2512
  }), U.createWithPreprocess = (e, t, n) => new U({
2513
2513
  schema: t,
2514
2514
  effect: {
@@ -2516,11 +2516,11 @@ U.create = (e, t, n) => new U({
2516
2516
  transform: e
2517
2517
  },
2518
2518
  typeName: G.ZodEffects,
2519
- ...R(n)
2519
+ ...z(n)
2520
2520
  });
2521
- var W = class extends z {
2521
+ var W = class extends B {
2522
2522
  _parse(e) {
2523
- return this._getType(e) === b.undefined ? F(void 0) : this._def.innerType._parse(e);
2523
+ return this._getType(e) === b.undefined ? I(void 0) : this._def.innerType._parse(e);
2524
2524
  }
2525
2525
  unwrap() {
2526
2526
  return this._def.innerType;
@@ -2529,11 +2529,11 @@ var W = class extends z {
2529
2529
  W.create = (e, t) => new W({
2530
2530
  innerType: e,
2531
2531
  typeName: G.ZodOptional,
2532
- ...R(t)
2532
+ ...z(t)
2533
2533
  });
2534
- var Ht = class extends z {
2534
+ var Ht = class extends B {
2535
2535
  _parse(e) {
2536
- return this._getType(e) === b.null ? F(null) : this._def.innerType._parse(e);
2536
+ return this._getType(e) === b.null ? I(null) : this._def.innerType._parse(e);
2537
2537
  }
2538
2538
  unwrap() {
2539
2539
  return this._def.innerType;
@@ -2542,9 +2542,9 @@ var Ht = class extends z {
2542
2542
  Ht.create = (e, t) => new Ht({
2543
2543
  innerType: e,
2544
2544
  typeName: G.ZodNullable,
2545
- ...R(t)
2545
+ ...z(t)
2546
2546
  });
2547
- var Ut = class extends z {
2547
+ var Ut = class extends B {
2548
2548
  _parse(e) {
2549
2549
  let { ctx: t } = this._processInputParams(e), n = t.data;
2550
2550
  return t.parsedType === b.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
@@ -2561,9 +2561,9 @@ Ut.create = (e, t) => new Ut({
2561
2561
  innerType: e,
2562
2562
  typeName: G.ZodDefault,
2563
2563
  defaultValue: typeof t.default == "function" ? t.default : () => t.default,
2564
- ...R(t)
2564
+ ...z(t)
2565
2565
  });
2566
- var Wt = class extends z {
2566
+ var Wt = class extends B {
2567
2567
  _parse(e) {
2568
2568
  let { ctx: t } = this._processInputParams(e), n = {
2569
2569
  ...t,
@@ -2576,7 +2576,7 @@ var Wt = class extends z {
2576
2576
  path: n.path,
2577
2577
  parent: { ...n }
2578
2578
  });
2579
- return Ve(r) ? r.then((e) => ({
2579
+ return Be(r) ? r.then((e) => ({
2580
2580
  status: "valid",
2581
2581
  value: e.status === "valid" ? e.value : this._def.catchValue({
2582
2582
  get error() {
@@ -2602,17 +2602,17 @@ Wt.create = (e, t) => new Wt({
2602
2602
  innerType: e,
2603
2603
  typeName: G.ZodCatch,
2604
2604
  catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
2605
- ...R(t)
2605
+ ...z(t)
2606
2606
  });
2607
- var Gt = class extends z {
2607
+ var Gt = class extends B {
2608
2608
  _parse(e) {
2609
2609
  if (this._getType(e) !== b.nan) {
2610
2610
  let t = this._getOrReturnCtx(e);
2611
- return M(t, {
2611
+ return N(t, {
2612
2612
  code: y.invalid_type,
2613
2613
  expected: b.nan,
2614
2614
  received: t.parsedType
2615
- }), P;
2615
+ }), F;
2616
2616
  }
2617
2617
  return {
2618
2618
  status: "valid",
@@ -2622,9 +2622,9 @@ var Gt = class extends z {
2622
2622
  };
2623
2623
  Gt.create = (e) => new Gt({
2624
2624
  typeName: G.ZodNaN,
2625
- ...R(e)
2625
+ ...z(e)
2626
2626
  });
2627
- var Kt = class extends z {
2627
+ var Kt = class extends B {
2628
2628
  _parse(e) {
2629
2629
  let { ctx: t } = this._processInputParams(e), n = t.data;
2630
2630
  return this._def.type._parse({
@@ -2636,7 +2636,7 @@ var Kt = class extends z {
2636
2636
  unwrap() {
2637
2637
  return this._def.type;
2638
2638
  }
2639
- }, qt = class e extends z {
2639
+ }, qt = class e extends B {
2640
2640
  _parse(e) {
2641
2641
  let { status: t, ctx: n } = this._processInputParams(e);
2642
2642
  if (n.common.async) return (async () => {
@@ -2645,7 +2645,7 @@ var Kt = class extends z {
2645
2645
  path: n.path,
2646
2646
  parent: n
2647
2647
  });
2648
- return e.status === "aborted" ? P : e.status === "dirty" ? (t.dirty(), Le(e.value)) : this._def.out._parseAsync({
2648
+ return e.status === "aborted" ? F : e.status === "dirty" ? (t.dirty(), Ie(e.value)) : this._def.out._parseAsync({
2649
2649
  data: e.value,
2650
2650
  path: n.path,
2651
2651
  parent: n
@@ -2657,7 +2657,7 @@ var Kt = class extends z {
2657
2657
  path: n.path,
2658
2658
  parent: n
2659
2659
  });
2660
- return e.status === "aborted" ? P : e.status === "dirty" ? (t.dirty(), {
2660
+ return e.status === "aborted" ? F : e.status === "dirty" ? (t.dirty(), {
2661
2661
  status: "dirty",
2662
2662
  value: e.value
2663
2663
  }) : this._def.out._parseSync({
@@ -2674,10 +2674,10 @@ var Kt = class extends z {
2674
2674
  typeName: G.ZodPipeline
2675
2675
  });
2676
2676
  }
2677
- }, Jt = class extends z {
2677
+ }, Jt = class extends B {
2678
2678
  _parse(e) {
2679
- let t = this._def.innerType._parse(e), n = (e) => (Be(e) && (e.value = Object.freeze(e.value)), e);
2680
- return Ve(t) ? t.then((e) => n(e)) : n(t);
2679
+ let t = this._def.innerType._parse(e), n = (e) => (ze(e) && (e.value = Object.freeze(e.value)), e);
2680
+ return Be(t) ? t.then((e) => n(e)) : n(t);
2681
2681
  }
2682
2682
  unwrap() {
2683
2683
  return this._def.innerType;
@@ -2686,12 +2686,12 @@ var Kt = class extends z {
2686
2686
  Jt.create = (e, t) => new Jt({
2687
2687
  innerType: e,
2688
2688
  typeName: G.ZodReadonly,
2689
- ...R(t)
2689
+ ...z(t)
2690
2690
  }), V.lazycreate;
2691
2691
  var G;
2692
2692
  (function(e) {
2693
2693
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
2694
- })(G ||= {}), pt.create, ht.create, Gt.create, gt.create, _t.create, vt.create, yt.create, bt.create, xt.create, St.create, Ct.create, B.create, wt.create, Tt.create, V.create, V.strictCreate, Dt.create, Ot.create, At.create, jt.create, Mt.create, Nt.create, Pt.create, Ft.create, It.create, Lt.create, zt.create, Bt.create, Vt.create, U.create, W.create, Ht.create, U.createWithPreprocess, qt.create;
2694
+ })(G ||= {}), ft.create, mt.create, Gt.create, ht.create, gt.create, _t.create, vt.create, yt.create, bt.create, xt.create, St.create, Ct.create, wt.create, Tt.create, V.create, V.strictCreate, Dt.create, Ot.create, At.create, jt.create, Mt.create, Nt.create, Pt.create, Ft.create, It.create, Lt.create, zt.create, Bt.create, Vt.create, U.create, W.create, Ht.create, U.createWithPreprocess, qt.create;
2695
2695
  //#endregion
2696
2696
  //#region ../../node_modules/.pnpm/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/index.js
2697
2697
  var Yt = class extends Error {
@@ -2884,7 +2884,7 @@ var { btoa: an, atob: on } = globalThis, K = ({ prefix: e, size: t = 16, alphabe
2884
2884
  return r.join("");
2885
2885
  };
2886
2886
  if (e == null) return i;
2887
- if (n.includes(r)) throw new we({
2887
+ if (n.includes(r)) throw new Ce({
2888
2888
  argument: "separator",
2889
2889
  message: `The separator "${r}" must not be part of the alphabet "${n}".`
2890
2890
  });
@@ -3857,13 +3857,13 @@ async function Dr(e) {
3857
3857
  }
3858
3858
  new TextDecoder();
3859
3859
  //#endregion
3860
- //#region ../../node_modules/.pnpm/ai@7.0.31_zod@4.4.3/node_modules/ai/dist/index.js
3860
+ //#region ../../node_modules/.pnpm/ai@7.0.35_zod@4.4.3/node_modules/ai/dist/index.js
3861
3861
  var Or = Object.defineProperty, kr = (e, t) => {
3862
3862
  for (var n in t) Or(e, n, {
3863
3863
  get: t[n],
3864
3864
  enumerable: !0
3865
3865
  });
3866
- }, Ar = "AI_NoObjectGeneratedError", jr = `vercel.ai.error.${Ar}`, Mr = Symbol.for(jr), Nr, Pr = class extends T {
3866
+ }, Ar = "AI_NoObjectGeneratedError", jr = `vercel.ai.error.${Ar}`, Mr = Symbol.for(jr), Nr, Pr = class extends E {
3867
3867
  constructor({ message: e = "No object generated.", cause: t, text: n, response: r, usage: i, finishReason: a }) {
3868
3868
  super({
3869
3869
  name: Ar,
@@ -3872,11 +3872,11 @@ var Or = Object.defineProperty, kr = (e, t) => {
3872
3872
  }), this[Nr] = !0, this.text = n, this.response = r, this.usage = i, this.finishReason = a;
3873
3873
  }
3874
3874
  static isInstance(e) {
3875
- return T.hasMarker(e, jr);
3875
+ return E.hasMarker(e, jr);
3876
3876
  }
3877
3877
  };
3878
3878
  Nr = Mr;
3879
- var Fr = "AI_UIMessageStreamError", Ir = `vercel.ai.error.${Fr}`, Lr = Symbol.for(Ir), Rr, zr = class extends T {
3879
+ var Fr = "AI_UIMessageStreamError", Ir = `vercel.ai.error.${Fr}`, Lr = Symbol.for(Ir), Rr, zr = class extends E {
3880
3880
  constructor({ chunkType: e, chunkId: t, message: n }) {
3881
3881
  super({
3882
3882
  name: Fr,
@@ -3884,249 +3884,248 @@ var Fr = "AI_UIMessageStreamError", Ir = `vercel.ai.error.${Fr}`, Lr = Symbol.fo
3884
3884
  }), this[Rr] = !0, this.chunkType = e, this.chunkId = t;
3885
3885
  }
3886
3886
  static isInstance(e) {
3887
- return T.hasMarker(e, Ir);
3887
+ return E.hasMarker(e, Ir);
3888
3888
  }
3889
3889
  };
3890
3890
  Rr = Lr;
3891
- var Br = a(() => g([
3891
+ function Br(e, t) {
3892
+ if (e === void 0 && t === void 0) return;
3893
+ if (e === void 0) return t;
3894
+ if (t === void 0) return e;
3895
+ let n = { ...e };
3896
+ for (let r in t) if (!(r === "__proto__" || r === "constructor" || r === "prototype") && Object.prototype.hasOwnProperty.call(t, r)) {
3897
+ let i = t[r];
3898
+ if (i === void 0) continue;
3899
+ let a = r in e ? e[r] : void 0, o = typeof i == "object" && !!i && !Array.isArray(i) && !(i instanceof Date) && !(i instanceof RegExp), s = typeof a == "object" && !!a && !Array.isArray(a) && !(a instanceof Date) && !(a instanceof RegExp);
3900
+ o && s ? n[r] = Br(a, i) : n[r] = i;
3901
+ }
3902
+ return n;
3903
+ }
3904
+ var Vr = a(() => g([
3892
3905
  l(),
3893
3906
  h(),
3894
- d(),
3895
- p(),
3896
- s(h(), Br.optional()),
3897
- n(Br)
3898
- ])), Q = s(h(), s(h(), Br.optional())), Vr = g([
3907
+ c(),
3908
+ f(),
3909
+ t(h(), Vr.optional()),
3910
+ n(Vr)
3911
+ ])), Q = t(h(), t(h(), Vr.optional())), Hr = g([
3899
3912
  h(),
3900
3913
  m(Uint8Array),
3901
3914
  m(ArrayBuffer),
3902
3915
  i(ln, { message: "Must be a Buffer" })
3903
- ]), Hr = s(h(), h()), Ur = c({
3916
+ ]), Ur = t(h(), h()), Wr = s({
3904
3917
  type: o("text"),
3905
3918
  text: h(),
3906
3919
  providerOptions: Q.optional()
3907
- }), Wr = c({
3920
+ }), Gr = s({
3908
3921
  type: o("image"),
3909
3922
  image: g([
3910
- Vr,
3923
+ Hr,
3911
3924
  m(URL),
3912
- Hr
3925
+ Ur
3913
3926
  ]),
3914
3927
  mediaType: h().optional(),
3915
3928
  providerOptions: Q.optional()
3916
- }), Gr = u("type", [
3917
- c({
3929
+ }), Kr = u("type", [
3930
+ s({
3918
3931
  type: o("data"),
3919
- data: Vr
3932
+ data: Hr
3920
3933
  }),
3921
- c({
3934
+ s({
3922
3935
  type: o("url"),
3923
3936
  url: m(URL)
3924
3937
  }),
3925
- c({
3938
+ s({
3926
3939
  type: o("reference"),
3927
- reference: Hr
3940
+ reference: Ur
3928
3941
  }),
3929
- c({
3942
+ s({
3930
3943
  type: o("text"),
3931
3944
  text: h()
3932
3945
  })
3933
- ]), Kr = u("type", [c({
3946
+ ]), qr = u("type", [s({
3934
3947
  type: o("data"),
3935
- data: Vr
3936
- }), c({
3948
+ data: Hr
3949
+ }), s({
3937
3950
  type: o("url"),
3938
3951
  url: m(URL)
3939
- })]), qr = c({
3952
+ })]), Jr = s({
3940
3953
  type: o("file"),
3941
3954
  data: g([
3942
- Gr,
3943
- Vr,
3955
+ Kr,
3956
+ Hr,
3944
3957
  m(URL),
3945
- Hr
3958
+ Ur
3946
3959
  ]),
3947
3960
  filename: h().optional(),
3948
3961
  mediaType: h(),
3949
3962
  providerOptions: Q.optional()
3950
- }), Jr = c({
3963
+ }), Yr = s({
3951
3964
  type: o("reasoning"),
3952
3965
  text: h(),
3953
3966
  providerOptions: Q.optional()
3954
- }), Yr = c({
3967
+ }), Xr = s({
3955
3968
  type: o("custom"),
3956
3969
  kind: h().transform((e) => e),
3957
3970
  providerOptions: Q.optional()
3958
- }), Xr = c({
3971
+ }), Zr = s({
3959
3972
  type: o("reasoning-file"),
3960
3973
  data: g([
3961
- Kr,
3962
- Vr,
3974
+ qr,
3975
+ Hr,
3963
3976
  m(URL)
3964
3977
  ]),
3965
3978
  mediaType: h(),
3966
3979
  providerOptions: Q.optional()
3967
- }), Zr = c({
3980
+ }), Qr = s({
3968
3981
  type: o("tool-call"),
3969
3982
  toolCallId: h(),
3970
3983
  toolName: h(),
3971
3984
  input: r(),
3972
3985
  providerOptions: Q.optional(),
3973
- providerExecuted: p().optional()
3974
- }), Qr = u("type", [
3975
- c({
3986
+ providerExecuted: f().optional()
3987
+ }), $r = u("type", [
3988
+ s({
3976
3989
  type: o("text"),
3977
3990
  value: h(),
3978
3991
  providerOptions: Q.optional()
3979
3992
  }),
3980
- c({
3993
+ s({
3981
3994
  type: o("json"),
3982
- value: Br,
3995
+ value: Vr,
3983
3996
  providerOptions: Q.optional()
3984
3997
  }),
3985
- c({
3998
+ s({
3986
3999
  type: o("execution-denied"),
3987
4000
  reason: h().optional(),
3988
4001
  providerOptions: Q.optional()
3989
4002
  }),
3990
- c({
4003
+ s({
3991
4004
  type: o("error-text"),
3992
4005
  value: h(),
3993
4006
  providerOptions: Q.optional()
3994
4007
  }),
3995
- c({
4008
+ s({
3996
4009
  type: o("error-json"),
3997
- value: Br,
4010
+ value: Vr,
3998
4011
  providerOptions: Q.optional()
3999
4012
  }),
4000
- c({
4013
+ s({
4001
4014
  type: o("content"),
4002
4015
  value: n(g([
4003
- c({
4016
+ s({
4004
4017
  type: o("text"),
4005
4018
  text: h(),
4006
4019
  providerOptions: Q.optional()
4007
4020
  }),
4008
- c({
4021
+ s({
4009
4022
  type: o("file"),
4010
- data: Gr,
4023
+ data: Kr,
4011
4024
  mediaType: h(),
4012
4025
  filename: h().optional(),
4013
4026
  providerOptions: Q.optional()
4014
4027
  }),
4015
- c({
4028
+ s({
4016
4029
  type: o("file-data"),
4017
4030
  data: h(),
4018
4031
  mediaType: h(),
4019
4032
  filename: h().optional(),
4020
4033
  providerOptions: Q.optional()
4021
4034
  }),
4022
- c({
4035
+ s({
4023
4036
  type: o("file-url"),
4024
4037
  url: h(),
4025
4038
  mediaType: h().optional(),
4026
4039
  providerOptions: Q.optional()
4027
4040
  }),
4028
- c({
4041
+ s({
4029
4042
  type: o("file-id"),
4030
- fileId: g([h(), s(h(), h())]),
4043
+ fileId: g([h(), t(h(), h())]),
4031
4044
  providerOptions: Q.optional()
4032
4045
  }),
4033
- c({
4046
+ s({
4034
4047
  type: o("file-reference"),
4035
- providerReference: s(h(), h()),
4048
+ providerReference: t(h(), h()),
4036
4049
  providerOptions: Q.optional()
4037
4050
  }),
4038
- c({
4051
+ s({
4039
4052
  type: o("image-data"),
4040
4053
  data: h(),
4041
4054
  mediaType: h(),
4042
4055
  providerOptions: Q.optional()
4043
4056
  }),
4044
- c({
4057
+ s({
4045
4058
  type: o("image-url"),
4046
4059
  url: h(),
4047
4060
  providerOptions: Q.optional()
4048
4061
  }),
4049
- c({
4062
+ s({
4050
4063
  type: o("image-file-id"),
4051
- fileId: g([h(), s(h(), h())]),
4064
+ fileId: g([h(), t(h(), h())]),
4052
4065
  providerOptions: Q.optional()
4053
4066
  }),
4054
- c({
4067
+ s({
4055
4068
  type: o("image-file-reference"),
4056
- providerReference: s(h(), h()),
4069
+ providerReference: t(h(), h()),
4057
4070
  providerOptions: Q.optional()
4058
4071
  }),
4059
- c({
4072
+ s({
4060
4073
  type: o("custom"),
4061
4074
  providerOptions: Q.optional()
4062
4075
  })
4063
4076
  ]))
4064
4077
  })
4065
- ]), $r = c({
4078
+ ]), ei = s({
4066
4079
  type: o("tool-result"),
4067
4080
  toolCallId: h(),
4068
4081
  toolName: h(),
4069
- output: Qr,
4082
+ output: $r,
4070
4083
  providerOptions: Q.optional()
4071
- }), ei = c({
4084
+ }), ti = s({
4072
4085
  type: o("tool-approval-request"),
4073
4086
  approvalId: h(),
4074
4087
  toolCallId: h()
4075
- }), ti = c({
4088
+ }), ni = s({
4076
4089
  type: o("tool-approval-response"),
4077
4090
  approvalId: h(),
4078
- approved: p(),
4091
+ approved: f(),
4079
4092
  reason: h().optional()
4080
4093
  });
4081
4094
  g([
4082
- c({
4095
+ s({
4083
4096
  role: o("system"),
4084
4097
  content: h(),
4085
4098
  providerOptions: Q.optional()
4086
4099
  }),
4087
- c({
4100
+ s({
4088
4101
  role: o("user"),
4089
4102
  content: g([h(), n(g([
4090
- Ur,
4091
4103
  Wr,
4092
- qr
4104
+ Gr,
4105
+ Jr
4093
4106
  ]))]),
4094
4107
  providerOptions: Q.optional()
4095
4108
  }),
4096
- c({
4109
+ s({
4097
4110
  role: o("assistant"),
4098
4111
  content: g([h(), n(g([
4099
- Ur,
4100
- Yr,
4101
- qr,
4102
- Jr,
4112
+ Wr,
4103
4113
  Xr,
4114
+ Jr,
4115
+ Yr,
4104
4116
  Zr,
4105
- $r,
4106
- ei
4117
+ Qr,
4118
+ ei,
4119
+ ti
4107
4120
  ]))]),
4108
4121
  providerOptions: Q.optional()
4109
4122
  }),
4110
- c({
4123
+ s({
4111
4124
  role: o("tool"),
4112
- content: n(g([$r, ti])),
4125
+ content: n(g([ei, ni])),
4113
4126
  providerOptions: Q.optional()
4114
4127
  })
4115
- ]);
4116
- function ni(e, t) {
4117
- if (e === void 0 && t === void 0) return;
4118
- if (e === void 0) return t;
4119
- if (t === void 0) return e;
4120
- let n = { ...e };
4121
- for (let r in t) if (!(r === "__proto__" || r === "constructor" || r === "prototype") && Object.prototype.hasOwnProperty.call(t, r)) {
4122
- let i = t[r];
4123
- if (i === void 0) continue;
4124
- let a = r in e ? e[r] : void 0, o = typeof i == "object" && !!i && !Array.isArray(i) && !(i instanceof Date) && !(i instanceof RegExp), s = typeof a == "object" && !!a && !Array.isArray(a) && !(a instanceof Date) && !(a instanceof RegExp);
4125
- o && s ? n[r] = ni(a, i) : n[r] = i;
4126
- }
4127
- return n;
4128
- }
4129
- kr({}, {
4128
+ ]), kr({}, {
4130
4129
  array: () => si,
4131
4130
  choice: () => ci,
4132
4131
  json: () => li,
@@ -4596,132 +4595,132 @@ new TextEncoder(), new TextEncoder(), K({
4596
4595
  prefix: "call",
4597
4596
  size: 24
4598
4597
  }), TransformStream;
4599
- var ui = s(h(), Br.optional()), di = pr(() => Sr(g([
4600
- t({
4598
+ var ui = t(h(), Vr.optional()), di = pr(() => Sr(g([
4599
+ p({
4601
4600
  type: o("text-start"),
4602
4601
  id: h(),
4603
4602
  providerMetadata: Q.optional()
4604
4603
  }),
4605
- t({
4604
+ p({
4606
4605
  type: o("text-delta"),
4607
4606
  id: h(),
4608
4607
  delta: h(),
4609
4608
  providerMetadata: Q.optional()
4610
4609
  }),
4611
- t({
4610
+ p({
4612
4611
  type: o("text-end"),
4613
4612
  id: h(),
4614
4613
  providerMetadata: Q.optional()
4615
4614
  }),
4616
- t({
4615
+ p({
4617
4616
  type: o("error"),
4618
4617
  errorText: h()
4619
4618
  }),
4620
- t({
4619
+ p({
4621
4620
  type: o("tool-input-start"),
4622
4621
  toolCallId: h(),
4623
4622
  toolName: h(),
4624
- providerExecuted: p().optional(),
4623
+ providerExecuted: f().optional(),
4625
4624
  providerMetadata: Q.optional(),
4626
4625
  toolMetadata: ui.optional(),
4627
- dynamic: p().optional(),
4626
+ dynamic: f().optional(),
4628
4627
  title: h().optional()
4629
4628
  }),
4630
- t({
4629
+ p({
4631
4630
  type: o("tool-input-delta"),
4632
4631
  toolCallId: h(),
4633
4632
  inputTextDelta: h()
4634
4633
  }),
4635
- t({
4634
+ p({
4636
4635
  type: o("tool-input-available"),
4637
4636
  toolCallId: h(),
4638
4637
  toolName: h(),
4639
4638
  input: r(),
4640
- providerExecuted: p().optional(),
4639
+ providerExecuted: f().optional(),
4641
4640
  providerMetadata: Q.optional(),
4642
4641
  toolMetadata: ui.optional(),
4643
- dynamic: p().optional(),
4642
+ dynamic: f().optional(),
4644
4643
  title: h().optional()
4645
4644
  }),
4646
- t({
4645
+ p({
4647
4646
  type: o("tool-input-error"),
4648
4647
  toolCallId: h(),
4649
4648
  toolName: h(),
4650
4649
  input: r(),
4651
- providerExecuted: p().optional(),
4650
+ providerExecuted: f().optional(),
4652
4651
  providerMetadata: Q.optional(),
4653
4652
  toolMetadata: ui.optional(),
4654
- dynamic: p().optional(),
4653
+ dynamic: f().optional(),
4655
4654
  errorText: h(),
4656
4655
  title: h().optional()
4657
4656
  }),
4658
- t({
4657
+ p({
4659
4658
  type: o("tool-approval-request"),
4660
4659
  approvalId: h(),
4661
4660
  toolCallId: h(),
4662
- isAutomatic: p().optional(),
4661
+ isAutomatic: f().optional(),
4663
4662
  signature: h().optional()
4664
4663
  }),
4665
- t({
4664
+ p({
4666
4665
  type: o("tool-approval-response"),
4667
4666
  approvalId: h(),
4668
- approved: p(),
4667
+ approved: f(),
4669
4668
  reason: h().optional(),
4670
- providerExecuted: p().optional(),
4669
+ providerExecuted: f().optional(),
4671
4670
  providerMetadata: Q.optional()
4672
4671
  }),
4673
- t({
4672
+ p({
4674
4673
  type: o("tool-output-available"),
4675
4674
  toolCallId: h(),
4676
4675
  output: r(),
4677
- providerExecuted: p().optional(),
4676
+ providerExecuted: f().optional(),
4678
4677
  providerMetadata: Q.optional(),
4679
4678
  toolMetadata: ui.optional(),
4680
- dynamic: p().optional(),
4681
- preliminary: p().optional()
4679
+ dynamic: f().optional(),
4680
+ preliminary: f().optional()
4682
4681
  }),
4683
- t({
4682
+ p({
4684
4683
  type: o("tool-output-error"),
4685
4684
  toolCallId: h(),
4686
4685
  errorText: h(),
4687
- providerExecuted: p().optional(),
4686
+ providerExecuted: f().optional(),
4688
4687
  providerMetadata: Q.optional(),
4689
4688
  toolMetadata: ui.optional(),
4690
- dynamic: p().optional()
4689
+ dynamic: f().optional()
4691
4690
  }),
4692
- t({
4691
+ p({
4693
4692
  type: o("tool-output-denied"),
4694
4693
  toolCallId: h()
4695
4694
  }),
4696
- t({
4695
+ p({
4697
4696
  type: o("reasoning-start"),
4698
4697
  id: h(),
4699
4698
  providerMetadata: Q.optional()
4700
4699
  }),
4701
- t({
4700
+ p({
4702
4701
  type: o("reasoning-delta"),
4703
4702
  id: h(),
4704
4703
  delta: h(),
4705
4704
  providerMetadata: Q.optional()
4706
4705
  }),
4707
- t({
4706
+ p({
4708
4707
  type: o("reasoning-end"),
4709
4708
  id: h(),
4710
4709
  providerMetadata: Q.optional()
4711
4710
  }),
4712
- t({
4711
+ p({
4713
4712
  type: o("custom"),
4714
4713
  kind: h().transform((e) => e),
4715
4714
  providerMetadata: Q.optional()
4716
4715
  }),
4717
- t({
4716
+ p({
4718
4717
  type: o("source-url"),
4719
4718
  sourceId: h(),
4720
4719
  url: h(),
4721
4720
  title: h().optional(),
4722
4721
  providerMetadata: Q.optional()
4723
4722
  }),
4724
- t({
4723
+ p({
4725
4724
  type: o("source-document"),
4726
4725
  sourceId: h(),
4727
4726
  mediaType: h(),
@@ -4729,34 +4728,34 @@ var ui = s(h(), Br.optional()), di = pr(() => Sr(g([
4729
4728
  filename: h().optional(),
4730
4729
  providerMetadata: Q.optional()
4731
4730
  }),
4732
- t({
4731
+ p({
4733
4732
  type: o("file"),
4734
4733
  url: h(),
4735
4734
  mediaType: h(),
4736
4735
  providerMetadata: Q.optional()
4737
4736
  }),
4738
- t({
4737
+ p({
4739
4738
  type: o("reasoning-file"),
4740
4739
  url: h(),
4741
4740
  mediaType: h(),
4742
4741
  providerMetadata: Q.optional()
4743
4742
  }),
4744
- t({
4743
+ p({
4745
4744
  type: i((e) => typeof e == "string" && e.startsWith("data-"), { message: "Type must start with \"data-\"" }),
4746
4745
  id: h().optional(),
4747
4746
  data: r(),
4748
- transient: p().optional()
4747
+ transient: f().optional()
4749
4748
  }),
4750
- t({ type: o("start-step") }),
4751
- t({ type: o("finish-step") }),
4752
- t({
4749
+ p({ type: o("start-step") }),
4750
+ p({ type: o("finish-step") }),
4751
+ p({
4753
4752
  type: o("start"),
4754
4753
  messageId: h().optional(),
4755
4754
  messageMetadata: r().optional()
4756
4755
  }),
4757
- t({
4756
+ p({
4758
4757
  type: o("finish"),
4759
- finishReason: f([
4758
+ finishReason: d([
4760
4759
  "stop",
4761
4760
  "length",
4762
4761
  "content-filter",
@@ -4766,11 +4765,11 @@ var ui = s(h(), Br.optional()), di = pr(() => Sr(g([
4766
4765
  ]).optional(),
4767
4766
  messageMetadata: r().optional()
4768
4767
  }),
4769
- t({
4768
+ p({
4770
4769
  type: o("abort"),
4771
4770
  reason: h().optional()
4772
4771
  }),
4773
- t({
4772
+ p({
4774
4773
  type: o("message-metadata"),
4775
4774
  messageMetadata: r()
4776
4775
  })
@@ -4809,8 +4808,26 @@ function vi({ lastMessage: e, messageId: t }) {
4809
4808
  function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdateMessageJob: r, onError: i, onToolCall: a, onData: o }) {
4810
4809
  return e.pipeThrough(new TransformStream({ async transform(e, s) {
4811
4810
  await r(async ({ state: r, write: c }) => {
4812
- function l(e) {
4813
- let t = r.message.parts.filter(gi).find((t) => t.toolCallId === e);
4811
+ function l() {
4812
+ let e = r.message.parts, t = e.length - 1;
4813
+ for (; t >= 0 && e[t].type !== "step-start";) t--;
4814
+ return e.slice(t + 1);
4815
+ }
4816
+ function u() {
4817
+ return l().filter(gi);
4818
+ }
4819
+ function d(e) {
4820
+ let t = u().find((t) => t.toolCallId === e);
4821
+ if (t == null) {
4822
+ let n = r.message.parts;
4823
+ for (let r = n.length - 1; r >= 0; r--) {
4824
+ let i = n[r];
4825
+ if (gi(i) && i.toolCallId === e) {
4826
+ t = i;
4827
+ break;
4828
+ }
4829
+ }
4830
+ }
4814
4831
  if (t == null) throw new zr({
4815
4832
  chunkType: "tool-invocation",
4816
4833
  chunkId: e,
@@ -4818,7 +4835,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4818
4835
  });
4819
4836
  return t;
4820
4837
  }
4821
- function u(e) {
4838
+ function f(e) {
4822
4839
  let t = r.message.parts.filter(gi).find((t) => t.approval?.id === e);
4823
4840
  if (t == null) throw new zr({
4824
4841
  chunkType: "tool-approval-response",
@@ -4827,59 +4844,59 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4827
4844
  });
4828
4845
  return t;
4829
4846
  }
4830
- function d(e) {
4831
- let t = r.message.parts.find((t) => mi(t) && t.toolCallId === e.toolCallId), n = e, i = t;
4832
- if (t != null) {
4833
- t.state = e.state, i.input = n.input, i.output = n.output, i.errorText = n.errorText, i.rawInput = n.rawInput, i.preliminary = n.preliminary, e.title !== void 0 && (i.title = e.title), e.toolMetadata !== void 0 && (i.toolMetadata = e.toolMetadata), i.providerExecuted = n.providerExecuted ?? t.providerExecuted;
4834
- let r = n.providerMetadata;
4835
- if (r != null) if (e.state === "output-available" || e.state === "output-error") {
4836
- let e = t;
4837
- e.resultProviderMetadata = r;
4838
- } else t.callProviderMetadata = r;
4847
+ function p(e, t) {
4848
+ let n = t ?? l().find((t) => mi(t) && t.toolCallId === e.toolCallId), i = e, a = n;
4849
+ if (n != null) {
4850
+ n.state = e.state, a.input = i.input, a.output = i.output, a.errorText = i.errorText, a.rawInput = i.rawInput, a.preliminary = i.preliminary, e.title !== void 0 && (a.title = e.title), e.toolMetadata !== void 0 && (a.toolMetadata = e.toolMetadata), a.providerExecuted = i.providerExecuted ?? n.providerExecuted;
4851
+ let t = i.providerMetadata;
4852
+ if (t != null) if (e.state === "output-available" || e.state === "output-error") {
4853
+ let e = n;
4854
+ e.resultProviderMetadata = t;
4855
+ } else n.callProviderMetadata = t;
4839
4856
  } else r.message.parts.push({
4840
4857
  type: `tool-${e.toolName}`,
4841
4858
  toolCallId: e.toolCallId,
4842
4859
  state: e.state,
4843
4860
  title: e.title,
4844
4861
  ...e.toolMetadata === void 0 ? {} : { toolMetadata: e.toolMetadata },
4845
- input: n.input,
4846
- output: n.output,
4847
- rawInput: n.rawInput,
4848
- errorText: n.errorText,
4849
- providerExecuted: n.providerExecuted,
4850
- preliminary: n.preliminary,
4851
- ...n.providerMetadata != null && (e.state === "output-available" || e.state === "output-error") ? { resultProviderMetadata: n.providerMetadata } : {},
4852
- ...n.providerMetadata != null && !(e.state === "output-available" || e.state === "output-error") ? { callProviderMetadata: n.providerMetadata } : {}
4862
+ input: i.input,
4863
+ output: i.output,
4864
+ rawInput: i.rawInput,
4865
+ errorText: i.errorText,
4866
+ providerExecuted: i.providerExecuted,
4867
+ preliminary: i.preliminary,
4868
+ ...i.providerMetadata != null && (e.state === "output-available" || e.state === "output-error") ? { resultProviderMetadata: i.providerMetadata } : {},
4869
+ ...i.providerMetadata != null && !(e.state === "output-available" || e.state === "output-error") ? { callProviderMetadata: i.providerMetadata } : {}
4853
4870
  });
4854
4871
  }
4855
- function f(e) {
4856
- let t = r.message.parts.find((t) => t.type === "dynamic-tool" && t.toolCallId === e.toolCallId), n = e, i = t;
4857
- if (t != null) {
4858
- t.state = e.state, i.toolName = e.toolName, i.input = n.input, i.output = n.output, i.errorText = n.errorText, i.rawInput = n.rawInput ?? i.rawInput, i.preliminary = n.preliminary, e.title !== void 0 && (i.title = e.title), e.toolMetadata !== void 0 && (i.toolMetadata = e.toolMetadata), i.providerExecuted = n.providerExecuted ?? t.providerExecuted;
4859
- let r = n.providerMetadata;
4860
- if (r != null) if (e.state === "output-available" || e.state === "output-error") {
4861
- let e = t;
4862
- e.resultProviderMetadata = r;
4863
- } else t.callProviderMetadata = r;
4872
+ function m(e, t) {
4873
+ let n = t ?? l().find((t) => t.type === "dynamic-tool" && t.toolCallId === e.toolCallId), i = e, a = n;
4874
+ if (n != null) {
4875
+ n.state = e.state, a.toolName = e.toolName, a.input = i.input, a.output = i.output, a.errorText = i.errorText, a.rawInput = i.rawInput ?? a.rawInput, a.preliminary = i.preliminary, e.title !== void 0 && (a.title = e.title), e.toolMetadata !== void 0 && (a.toolMetadata = e.toolMetadata), a.providerExecuted = i.providerExecuted ?? n.providerExecuted;
4876
+ let t = i.providerMetadata;
4877
+ if (t != null) if (e.state === "output-available" || e.state === "output-error") {
4878
+ let e = n;
4879
+ e.resultProviderMetadata = t;
4880
+ } else n.callProviderMetadata = t;
4864
4881
  } else r.message.parts.push({
4865
4882
  type: "dynamic-tool",
4866
4883
  toolName: e.toolName,
4867
4884
  toolCallId: e.toolCallId,
4868
4885
  state: e.state,
4869
- input: n.input,
4870
- output: n.output,
4871
- errorText: n.errorText,
4872
- preliminary: n.preliminary,
4873
- providerExecuted: n.providerExecuted,
4886
+ input: i.input,
4887
+ output: i.output,
4888
+ errorText: i.errorText,
4889
+ preliminary: i.preliminary,
4890
+ providerExecuted: i.providerExecuted,
4874
4891
  title: e.title,
4875
4892
  ...e.toolMetadata === void 0 ? {} : { toolMetadata: e.toolMetadata },
4876
- ...n.providerMetadata != null && (e.state === "output-available" || e.state === "output-error") ? { resultProviderMetadata: n.providerMetadata } : {},
4877
- ...n.providerMetadata != null && !(e.state === "output-available" || e.state === "output-error") ? { callProviderMetadata: n.providerMetadata } : {}
4893
+ ...i.providerMetadata != null && (e.state === "output-available" || e.state === "output-error") ? { resultProviderMetadata: i.providerMetadata } : {},
4894
+ ...i.providerMetadata != null && !(e.state === "output-available" || e.state === "output-error") ? { callProviderMetadata: i.providerMetadata } : {}
4878
4895
  });
4879
4896
  }
4880
- async function p(e) {
4897
+ async function h(e) {
4881
4898
  if (e != null) {
4882
- let n = r.message.metadata == null ? e : ni(r.message.metadata, e);
4899
+ let n = r.message.metadata == null ? e : Br(r.message.metadata, e);
4883
4900
  t != null && await Cr({
4884
4901
  value: n,
4885
4902
  schema: t,
@@ -4989,7 +5006,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4989
5006
  }), c();
4990
5007
  break;
4991
5008
  case "tool-input-start": {
4992
- let t = r.message.parts.filter(mi);
5009
+ let t = l().filter(mi);
4993
5010
  r.partialToolCalls[e.toolCallId] = {
4994
5011
  text: "",
4995
5012
  toolName: e.toolName,
@@ -4997,7 +5014,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4997
5014
  dynamic: e.dynamic,
4998
5015
  title: e.title,
4999
5016
  toolMetadata: e.toolMetadata
5000
- }, e.dynamic ? f({
5017
+ }, e.dynamic ? m({
5001
5018
  toolCallId: e.toolCallId,
5002
5019
  toolName: e.toolName,
5003
5020
  state: "input-streaming",
@@ -5006,7 +5023,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5006
5023
  title: e.title,
5007
5024
  toolMetadata: e.toolMetadata,
5008
5025
  providerMetadata: e.providerMetadata
5009
- }) : d({
5026
+ }) : p({
5010
5027
  toolCallId: e.toolCallId,
5011
5028
  toolName: e.toolName,
5012
5029
  state: "input-streaming",
@@ -5027,14 +5044,14 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5027
5044
  });
5028
5045
  t.text += e.inputTextDelta;
5029
5046
  let { value: n } = await ii(t.text);
5030
- t.dynamic ? f({
5047
+ t.dynamic ? m({
5031
5048
  toolCallId: e.toolCallId,
5032
5049
  toolName: t.toolName,
5033
5050
  state: "input-streaming",
5034
5051
  input: n,
5035
5052
  title: t.title,
5036
5053
  toolMetadata: t.toolMetadata
5037
- }) : d({
5054
+ }) : p({
5038
5055
  toolCallId: e.toolCallId,
5039
5056
  toolName: t.toolName,
5040
5057
  state: "input-streaming",
@@ -5045,7 +5062,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5045
5062
  break;
5046
5063
  }
5047
5064
  case "tool-input-available":
5048
- e.dynamic ? f({
5065
+ e.dynamic ? m({
5049
5066
  toolCallId: e.toolCallId,
5050
5067
  toolName: e.toolName,
5051
5068
  state: "input-available",
@@ -5054,7 +5071,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5054
5071
  providerMetadata: e.providerMetadata,
5055
5072
  title: e.title,
5056
5073
  toolMetadata: e.toolMetadata
5057
- }) : d({
5074
+ }) : p({
5058
5075
  toolCallId: e.toolCallId,
5059
5076
  toolName: e.toolName,
5060
5077
  state: "input-available",
@@ -5066,8 +5083,8 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5066
5083
  }), c(), a && !e.providerExecuted && await a({ toolCall: e });
5067
5084
  break;
5068
5085
  case "tool-input-error": {
5069
- let t = r.message.parts.filter(gi).find((t) => t.toolCallId === e.toolCallId);
5070
- (t == null ? e.dynamic : t.type === "dynamic-tool") ? f({
5086
+ let t = l().filter(gi).find((t) => t.toolCallId === e.toolCallId);
5087
+ (t == null ? e.dynamic : t.type === "dynamic-tool") ? m({
5071
5088
  toolCallId: e.toolCallId,
5072
5089
  toolName: e.toolName,
5073
5090
  state: "output-error",
@@ -5076,7 +5093,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5076
5093
  providerExecuted: e.providerExecuted,
5077
5094
  providerMetadata: e.providerMetadata,
5078
5095
  toolMetadata: e.toolMetadata
5079
- }) : d({
5096
+ }) : p({
5080
5097
  toolCallId: e.toolCallId,
5081
5098
  toolName: e.toolName,
5082
5099
  state: "output-error",
@@ -5090,7 +5107,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5090
5107
  break;
5091
5108
  }
5092
5109
  case "tool-approval-request": {
5093
- let t = l(e.toolCallId);
5110
+ let t = d(e.toolCallId);
5094
5111
  t.state = "approval-requested", t.approval = {
5095
5112
  id: e.approvalId,
5096
5113
  ...e.isAutomatic === !0 ? { isAutomatic: !0 } : {},
@@ -5099,7 +5116,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5099
5116
  break;
5100
5117
  }
5101
5118
  case "tool-approval-response": {
5102
- let t = u(e.approvalId), n = t.approval == null ? { id: e.approvalId } : t.approval;
5119
+ let t = f(e.approvalId), n = t.approval == null ? { id: e.approvalId } : t.approval;
5103
5120
  t.state = "approval-responded", t.approval = {
5104
5121
  id: e.approvalId,
5105
5122
  approved: e.approved,
@@ -5110,13 +5127,13 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5110
5127
  break;
5111
5128
  }
5112
5129
  case "tool-output-denied": {
5113
- let t = l(e.toolCallId);
5130
+ let t = d(e.toolCallId);
5114
5131
  t.state = "output-denied", c();
5115
5132
  break;
5116
5133
  }
5117
5134
  case "tool-output-available": {
5118
- let t = l(e.toolCallId);
5119
- t.type === "dynamic-tool" ? f({
5135
+ let t = d(e.toolCallId);
5136
+ t.type === "dynamic-tool" ? m({
5120
5137
  toolCallId: e.toolCallId,
5121
5138
  toolName: t.toolName,
5122
5139
  state: "output-available",
@@ -5127,7 +5144,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5127
5144
  providerMetadata: e.providerMetadata,
5128
5145
  title: t.title,
5129
5146
  toolMetadata: t.toolMetadata
5130
- }) : d({
5147
+ }, t) : p({
5131
5148
  toolCallId: e.toolCallId,
5132
5149
  toolName: _i(t),
5133
5150
  state: "output-available",
@@ -5138,12 +5155,12 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5138
5155
  providerMetadata: e.providerMetadata,
5139
5156
  title: t.title,
5140
5157
  toolMetadata: t.toolMetadata
5141
- }), c();
5158
+ }, t), c();
5142
5159
  break;
5143
5160
  }
5144
5161
  case "tool-output-error": {
5145
- let t = l(e.toolCallId);
5146
- t.type === "dynamic-tool" ? f({
5162
+ let t = d(e.toolCallId);
5163
+ t.type === "dynamic-tool" ? m({
5147
5164
  toolCallId: e.toolCallId,
5148
5165
  toolName: t.toolName,
5149
5166
  state: "output-error",
@@ -5153,7 +5170,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5153
5170
  providerMetadata: e.providerMetadata,
5154
5171
  title: t.title,
5155
5172
  toolMetadata: t.toolMetadata
5156
- }) : d({
5173
+ }, t) : p({
5157
5174
  toolCallId: e.toolCallId,
5158
5175
  toolName: _i(t),
5159
5176
  state: "output-error",
@@ -5164,7 +5181,7 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5164
5181
  providerMetadata: e.providerMetadata,
5165
5182
  title: t.title,
5166
5183
  toolMetadata: t.toolMetadata
5167
- }), c();
5184
+ }, t), c();
5168
5185
  break;
5169
5186
  }
5170
5187
  case "start-step":
@@ -5174,13 +5191,13 @@ function yi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5174
5191
  r.activeTextParts = pi(), r.activeReasoningParts = pi();
5175
5192
  break;
5176
5193
  case "start":
5177
- e.messageId != null && (r.message.id = e.messageId), await p(e.messageMetadata), (e.messageId != null || e.messageMetadata != null) && c();
5194
+ e.messageId != null && (r.message.id = e.messageId), await h(e.messageMetadata), (e.messageId != null || e.messageMetadata != null) && c();
5178
5195
  break;
5179
5196
  case "finish":
5180
- e.finishReason != null && (r.finishReason = e.finishReason), await p(e.messageMetadata), e.messageMetadata != null && c();
5197
+ e.finishReason != null && (r.finishReason = e.finishReason), await h(e.messageMetadata), e.messageMetadata != null && c();
5181
5198
  break;
5182
5199
  case "message-metadata":
5183
- await p(e.messageMetadata), e.messageMetadata != null && c();
5200
+ await h(e.messageMetadata), e.messageMetadata != null && c();
5184
5201
  break;
5185
5202
  case "error":
5186
5203
  i?.(Error(e.errorText));
@@ -5236,7 +5253,7 @@ K({
5236
5253
  }), K({
5237
5254
  prefix: "call",
5238
5255
  size: 24
5239
- }), s(h(), Br.optional()), s(h(), h()), K({
5256
+ }), t(h(), Vr.optional()), t(h(), h()), K({
5240
5257
  prefix: "call",
5241
5258
  size: 24
5242
5259
  }), K({
@@ -5852,10 +5869,10 @@ function qi() {
5852
5869
  if (!ae()) return console.error("useSWRV must be called inside setup() or an active effectScope()."), null;
5853
5870
  var c = typeof window > "u" || typeof document > "u";
5854
5871
  t.length >= 1 && (r = t[0]), t.length >= 2 && (i = t[1]), t.length > 2 && (a = $($({}, a), t[2]));
5855
- var l = c ? a.serverTTL : a.ttl, u = typeof r == "function" ? r : C(r);
5872
+ var l = c ? a.serverTTL : a.ttl, u = typeof r == "function" ? r : w(r);
5856
5873
  i === void 0 && (i = a.fetcher);
5857
5874
  var d = null;
5858
- d ||= ce({
5875
+ d ||= se({
5859
5876
  data: void 0,
5860
5877
  error: void 0,
5861
5878
  isValidating: !0,
@@ -5925,7 +5942,7 @@ function qi() {
5925
5942
  };
5926
5943
  a.refreshInterval && (m = setTimeout(h, a.refreshInterval)), a.revalidateOnFocus && (document.addEventListener("visibilitychange", p, !1), window.addEventListener("focus", p, !1));
5927
5944
  }
5928
- se(function() {
5945
+ C(function() {
5929
5946
  o = !0, m &&= (clearTimeout(m), null), !c && a.revalidateOnFocus && (document.removeEventListener("visibilitychange", p, !1), window.removeEventListener("focus", p, !1));
5930
5947
  var e = Bi.get(u.value);
5931
5948
  e && (e.data = e.data.filter(function(e) {
@@ -5933,11 +5950,11 @@ function qi() {
5933
5950
  }));
5934
5951
  });
5935
5952
  try {
5936
- ue(u, function(e) {
5953
+ le(u, function(e) {
5937
5954
  oe(u) || (u.value = e), d.key = e, d.isValidating = !!e, Ui(u.value, d, l), !c && !s && u.value && f(), s = !1;
5938
5955
  }, { immediate: !0 });
5939
5956
  } catch {}
5940
- return $($({}, le(d)), { mutate: function(e, t) {
5957
+ return $($({}, ce(d)), { mutate: function(e, t) {
5941
5958
  return f(e, $($({}, t), { forceRevalidate: !0 }));
5942
5959
  } });
5943
5960
  }
@@ -5950,13 +5967,13 @@ var Yi = qi;
5950
5967
  Yi.default, Yi.default;
5951
5968
  var Xi = class {
5952
5969
  constructor(e) {
5953
- this.statusRef = C("ready"), this.errorRef = C(void 0), this.pushMessage = (e) => {
5970
+ this.statusRef = w("ready"), this.errorRef = w(void 0), this.pushMessage = (e) => {
5954
5971
  this.messagesRef.value = [...this.messagesRef.value, e];
5955
5972
  }, this.popMessage = () => {
5956
5973
  this.messagesRef.value = this.messagesRef.value.slice(0, -1);
5957
5974
  }, this.replaceMessage = (e, t) => {
5958
5975
  this.messagesRef.value[e] = { ...t };
5959
- }, this.snapshot = (e) => e, this.messagesRef = C(e ?? []);
5976
+ }, this.snapshot = (e) => e, this.messagesRef = w(e ?? []);
5960
5977
  }
5961
5978
  get messages() {
5962
5979
  return this.messagesRef.value;
@@ -5987,25 +6004,25 @@ var Xi = class {
5987
6004
  //#endregion
5988
6005
  //#region ../../packages/composable/src/chatbot/useChatbotStore.ts
5989
6006
  function Qi(e) {
5990
- return w(`chatbot-${e}`, () => {
5991
- let { t, te: n, locale: r } = fe({ useScope: "global" }), i = C(""), a = C(), o = C(e), s = C(), c = C(), l = C(), u = C(), d = C(), f = C(), p = C(), m = C(), h = C(), ee = C(), g = C(), _ = C(), v = C(), y = C(), b = C(), x = C(!1), ae = pe(), oe = S(() => {
6007
+ return T(`chatbot-${e}`, () => {
6008
+ let { t, te: n, locale: r } = de({ useScope: "global" }), i = w(""), a = w(), o = w(e), s = w(), c = w(), l = w(), u = w(), d = w(), f = w(), p = w(), m = w(), h = w(), ee = w(), g = w(), _ = w(), v = w(), y = w(), b = w(), x = w(!1), ae = fe(), oe = S(() => {
5992
6009
  let e = u.value?.theme;
5993
6010
  return (!e || e === "auto") && (e = b.value), e ? e === "dark" : ae.value;
5994
- }), se = S(() => c.value === "reasoning"), ce = S(() => se.value ? ee.value?.filter((e) => ![
6011
+ }), C = S(() => c.value === "reasoning"), se = S(() => C.value ? ee.value?.filter((e) => ![
5995
6012
  "upvote",
5996
6013
  "downvote",
5997
6014
  "feedback"
5998
- ].includes(e)) : ee.value), le = ie(S(() => `${o.value}-chatId`), null);
5999
- de(() => {
6000
- le.value ||= sn();
6015
+ ].includes(e)) : ee.value), ce = ie(S(() => `${o.value}-chatId`), null);
6016
+ ue(() => {
6017
+ ce.value ||= sn();
6001
6018
  });
6002
- let w = S({
6003
- get: () => le.value,
6019
+ let T = S({
6020
+ get: () => ce.value,
6004
6021
  set: (e) => {
6005
- le.value = e;
6022
+ ce.value = e;
6006
6023
  }
6007
- }), ge = C(), _e = C(!1), ve = S(() => ge.value?.message?.toLowerCase().includes("conversation-blocked") ?? !1);
6008
- function ye(e) {
6024
+ }), he = w(), ge = w(!1), _e = S(() => he.value?.message?.toLowerCase().includes("conversation-blocked") ?? !1);
6025
+ function ve(e) {
6009
6026
  try {
6010
6027
  let t = JSON.parse(e.message);
6011
6028
  return t.status === 404 || t.type?.includes("entity-not-found");
@@ -6013,22 +6030,22 @@ function Qi(e) {
6013
6030
  return !1;
6014
6031
  }
6015
6032
  }
6016
- function T(e) {
6017
- if (ye(e)) {
6018
- let e = D.value.messages.filter((e) => e.role === "user"), t = e[e.length - 1], n = t ? re(t) : void 0;
6019
- w.value = sn(), D.value.clearError(), ge.value = void 0, n && D.value.sendMessage({ text: n });
6033
+ function E(e) {
6034
+ if (ve(e)) {
6035
+ let e = O.value.messages.filter((e) => e.role === "user"), t = e[e.length - 1], n = t ? re(t) : void 0;
6036
+ T.value = sn(), O.value.clearError(), he.value = void 0, n && O.value.sendMessage({ text: n });
6020
6037
  return;
6021
6038
  }
6022
- ne.error(e), ge.value = e, ve.value && (_e.value = !0);
6039
+ ne.error(e), he.value = e, _e.value && (ge.value = !0);
6023
6040
  }
6024
- let E = S(() => te({
6041
+ let D = S(() => te({
6025
6042
  baseUrl: i.value,
6026
6043
  basePath: a.value,
6027
6044
  headers: () => p.value
6028
- })), be = C(null), D = S(() => new Zi({
6029
- id: w.value,
6045
+ })), ye = w(null), O = S(() => new Zi({
6046
+ id: T.value,
6030
6047
  transport: new wi({
6031
- api: E.value.getChatEndpoint(o.value, se.value ? "reasoning" : "chat"),
6048
+ api: D.value.getChatEndpoint(o.value, C.value ? "reasoning" : "chat"),
6032
6049
  prepareSendMessagesRequest: ({ messages: e, id: t }) => ({ body: {
6033
6050
  id: t,
6034
6051
  messages: [e[e.length - 1]],
@@ -6044,8 +6061,8 @@ function Qi(e) {
6044
6061
  webSearch: f.value?.webSearch,
6045
6062
  smoothStream: u.value?.smoothStream,
6046
6063
  deviceContext: {
6047
- ...me(),
6048
- ...be.value ?? {}
6064
+ ...pe(),
6065
+ ...ye.value ?? {}
6049
6066
  },
6050
6067
  externalContext: y.value,
6051
6068
  disabledTools: f.value?.disabled,
@@ -6059,22 +6076,22 @@ function Qi(e) {
6059
6076
  ne.log("Tool call:", e);
6060
6077
  },
6061
6078
  sendAutomaticallyWhen: Ei,
6062
- onError: T,
6079
+ onError: E,
6063
6080
  onFinish: () => {
6064
- let e = w.value;
6065
- !se.value && !O.value.some((t) => t.id === e) && P(o.value);
6081
+ let e = T.value;
6082
+ !C.value && !k.value.some((t) => t.id === e) && F(o.value);
6066
6083
  }
6067
- })), xe = S(() => {
6084
+ })), be = S(() => {
6068
6085
  let e = u.value?.initialMessage;
6069
6086
  return e?.[r.value] ? e[r.value] : n("message.defaultAgentWelcome") ? t("message.defaultAgentWelcome") : "";
6070
- }), Se = sn(), Ce = S(() => ({
6071
- id: Se,
6087
+ }), xe = sn(), Se = S(() => ({
6088
+ id: xe,
6072
6089
  role: "assistant",
6073
6090
  parts: [{
6074
6091
  type: "text",
6075
- text: xe.value
6092
+ text: be.value
6076
6093
  }]
6077
- })), we = S(() => {
6094
+ })), Ce = S(() => {
6078
6095
  let e = (e) => e.map((e) => e.role !== "user" || !e.parts.some((e) => e.type === "file") ? e : {
6079
6096
  ...e,
6080
6097
  parts: e.parts.map((e) => {
@@ -6084,160 +6101,160 @@ function Qi(e) {
6084
6101
  let e = t.url.slice(13);
6085
6102
  return {
6086
6103
  ...t,
6087
- url: E.value.getMediaUrl(o.value, w.value, e)
6104
+ url: D.value.getMediaUrl(o.value, T.value, e)
6088
6105
  };
6089
6106
  }
6090
6107
  return t.url.startsWith("blob:") ? t : {
6091
6108
  ...t,
6092
- url: E.value.appendAuthToken(t.url)
6109
+ url: D.value.appendAuthToken(t.url)
6093
6110
  };
6094
6111
  })
6095
6112
  });
6096
- return se.value ? e(D.value.messages) : !x.value && D.value.messages?.[0]?.role !== "assistant" ? [Ce.value, ...e(D.value.messages)] : e(D.value.messages);
6097
- }), Te = S(() => {
6113
+ return C.value ? e(O.value.messages) : !x.value && O.value.messages?.[0]?.role !== "assistant" ? [Se.value, ...e(O.value.messages)] : e(O.value.messages);
6114
+ }), we = S(() => {
6098
6115
  let e = u.value?.messagePlaceholder;
6099
6116
  return e?.[r.value] ? e[r.value] : n("placeholder.askAnything") ? t("placeholder.askAnything") : "";
6100
- }), O = C([]), Ee = C(!1), k = C([]), De = C(!1), Oe = C("chat"), ke = C([]), Ae = C(), je = C(!1), Me = C(!1), Ne = C(), A = C(!1), Pe = C(!1), Fe = C(), Ie = C(""), j = C([]), M = C(""), N = C(0);
6101
- async function P(e) {
6102
- if (se.value) {
6103
- O.value = [];
6117
+ }), k = w([]), Te = w(!1), Ee = w([]), De = w(!1), Oe = w("chat"), ke = w([]), Ae = w(), je = w(!1), Me = w(!1), Ne = w(), A = w(!1), j = w(!1), Pe = w(), Fe = w(""), M = w([]), N = w(""), P = w(0);
6118
+ async function F(e) {
6119
+ if (C.value) {
6120
+ k.value = [];
6104
6121
  return;
6105
6122
  }
6106
- Ee.value = !0;
6123
+ Te.value = !0;
6107
6124
  try {
6108
- O.value = await E.value.getConversations(e, l.value);
6125
+ k.value = await D.value.getConversations(e, l.value);
6109
6126
  } catch {
6110
- O.value = [];
6127
+ k.value = [];
6111
6128
  } finally {
6112
- Ee.value = !1;
6129
+ Te.value = !1;
6113
6130
  }
6114
6131
  }
6115
- async function Le() {
6116
- let e = w.value;
6132
+ async function Ie() {
6133
+ let e = T.value;
6117
6134
  if (!e) {
6118
- k.value = [];
6135
+ Ee.value = [];
6119
6136
  return;
6120
6137
  }
6121
6138
  De.value = !0;
6122
6139
  try {
6123
- k.value = await E.value.getChatFiles(e);
6140
+ Ee.value = await D.value.getChatFiles(e);
6124
6141
  } catch {
6125
- k.value = [];
6142
+ Ee.value = [];
6126
6143
  } finally {
6127
6144
  De.value = !1;
6128
6145
  }
6129
6146
  }
6130
- function F(e, t = !1) {
6131
- return E.value.getChatFileDownloadUrl(e, t);
6147
+ function I(e, t = !1) {
6148
+ return D.value.getChatFileDownloadUrl(e, t);
6132
6149
  }
6133
- function Re(e) {
6134
- return E.value.getChatFilePreviewUrl(e);
6150
+ function Le(e) {
6151
+ return D.value.getChatFilePreviewUrl(e);
6135
6152
  }
6136
- async function ze(e) {
6137
- await E.value.deleteChatFile(e), k.value = k.value.filter((t) => t.documentId !== e);
6153
+ async function Re(e) {
6154
+ await D.value.deleteChatFile(e), Ee.value = Ee.value.filter((t) => t.documentId !== e);
6138
6155
  }
6139
- async function Be(e, t) {
6140
- if (!se.value) try {
6141
- let n = await E.value.getChat(e, t);
6142
- if (t !== w.value || D.value.status !== "ready" || D.value.messages.length > 0) return;
6143
- n && (D.value.messages = n.messages, _e.value = n.blocked ?? !1);
6156
+ async function ze(e, t) {
6157
+ if (!C.value) try {
6158
+ let n = await D.value.getChat(e, t);
6159
+ if (t !== T.value || O.value.status !== "ready" || O.value.messages.length > 0) return;
6160
+ n && (O.value.messages = n.messages, ge.value = n.blocked ?? !1);
6144
6161
  } catch {}
6145
6162
  }
6146
- async function Ve(e) {
6163
+ async function Be(e) {
6147
6164
  try {
6148
- ke.value = await E.value.getMessageFeedbacks(e);
6165
+ ke.value = await D.value.getMessageFeedbacks(e);
6149
6166
  } catch {
6150
6167
  ke.value = [];
6151
6168
  }
6152
6169
  }
6153
- function I(e) {
6170
+ function L(e) {
6154
6171
  let t = ke.value.findIndex((t) => t.messageId === e.messageId);
6155
6172
  t >= 0 ? ke.value[t] = e : ke.value.push(e);
6156
6173
  }
6157
- function L(e) {
6158
- let t = we.value, n = t.findIndex((t) => t.id === e.id), r = re(e) ?? "";
6174
+ function R(e) {
6175
+ let t = Ce.value, n = t.findIndex((t) => t.id === e.id), r = re(e) ?? "";
6159
6176
  return {
6160
6177
  userQuestion: re(t.slice(0, n).reverse().find((e) => e.role === "user") ?? e) ?? "",
6161
6178
  assistantMessage: r
6162
6179
  };
6163
6180
  }
6164
- async function He(e, t) {
6181
+ async function Ve(e, t) {
6165
6182
  await Promise.all([
6166
- Be(e, t),
6167
- P(e),
6168
- Ve(t)
6169
- ]), be.value || he((e, t) => E.value.reverseGeocode(e, t, r.value)).then((e) => {
6170
- e && (be.value = e);
6183
+ ze(e, t),
6184
+ F(e),
6185
+ Be(t)
6186
+ ]), ye.value || me((e, t) => D.value.reverseGeocode(e, t, r.value)).then((e) => {
6187
+ e && (ye.value = e);
6171
6188
  });
6172
6189
  }
6173
- async function R() {
6174
- let e = Ie.value.trim(), t = j.value.filter((e) => e.state === "done" && e.mediaSource !== void 0).map((e) => ({
6190
+ async function z() {
6191
+ let e = Fe.value.trim(), t = M.value.filter((e) => e.state === "done" && e.mediaSource !== void 0).map((e) => ({
6175
6192
  type: "file",
6176
6193
  mediaType: e.mediaSource.mimeType,
6177
6194
  url: e.localUrl,
6178
6195
  filename: e.mediaSource.name,
6179
6196
  providerMetadata: { "8bot": { media: e.mediaSource } }
6180
6197
  }));
6181
- se.value && we.value.length > 0 && await Ge(), M.value = e, N.value = D.value.messages.length;
6182
- let n = D.value.sendMessage;
6198
+ C.value && Ce.value.length > 0 && await We(), N.value = e, P.value = O.value.messages.length;
6199
+ let n = O.value.sendMessage;
6183
6200
  n({
6184
6201
  text: e,
6185
6202
  files: t.length > 0 ? t : void 0
6186
- }), Ie.value = "", We();
6203
+ }), Fe.value = "", Ue();
6187
6204
  }
6188
- function z(e) {
6205
+ function B(e) {
6189
6206
  let t = e.trim();
6190
6207
  if (!t) return;
6191
- if (D.value.status !== "ready") {
6208
+ if (O.value.status !== "ready") {
6192
6209
  ne.warn("[useChatbotStore] sendMessage called before chat is ready. Listen for the \"ready\" event on the widget element.");
6193
6210
  return;
6194
6211
  }
6195
- let n = D.value.sendMessage;
6212
+ let n = O.value.sendMessage;
6196
6213
  n({ text: t });
6197
6214
  }
6198
- async function Ue() {
6199
- let e = M.value.length > 0;
6200
- await D.value.stop(), e && (Ie.value = M.value, D.value.messages = D.value.messages.slice(0, N.value), M.value = "");
6215
+ async function He() {
6216
+ let e = N.value.length > 0;
6217
+ await O.value.stop(), e && (Fe.value = N.value, O.value.messages = O.value.messages.slice(0, P.value), N.value = "");
6201
6218
  }
6202
- ue(() => D.value.status, (e) => {
6203
- e === "ready" && M.value.length > 0 && (M.value = "");
6219
+ le(() => O.value.status, (e) => {
6220
+ e === "ready" && N.value.length > 0 && (N.value = "");
6204
6221
  });
6205
- function We(e = !1) {
6206
- for (let t of j.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
6207
- j.value = [], $e.value = null;
6222
+ function Ue(e = !1) {
6223
+ for (let t of M.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
6224
+ M.value = [], Qe.value = null;
6208
6225
  }
6209
- async function Ge() {
6210
- return M.value = "", await Ue(), w.value = sn(), D.value.clearError(), ge.value = void 0, _e.value = !1, We(!0), ut("chat"), w.value;
6226
+ async function We() {
6227
+ return N.value = "", await He(), T.value = sn(), O.value.clearError(), he.value = void 0, ge.value = !1, Ue(!0), lt("chat"), T.value;
6211
6228
  }
6212
- async function Ke(e) {
6213
- D.value.status !== "ready" && (M.value = "", await Ue()), await D.value.regenerate(e);
6229
+ async function Ge(e) {
6230
+ O.value.status !== "ready" && (N.value = "", await He()), await O.value.regenerate(e);
6214
6231
  }
6215
- function qe(e) {
6232
+ function Ke(e) {
6216
6233
  if (e.tool === "requestGeolocation") {
6217
6234
  let t = e.output;
6218
- "latitude" in t && (be.value = {
6235
+ "latitude" in t && (ye.value = {
6219
6236
  geolocationLatitude: t.latitude,
6220
6237
  geolocationLongitude: t.longitude,
6221
6238
  geolocationAccuracy: t.accuracy,
6222
6239
  geolocationCity: t.city
6223
6240
  });
6224
6241
  }
6225
- D.value.addToolOutput(e);
6242
+ O.value.addToolOutput(e);
6226
6243
  }
6227
- let Je = S(() => D.value.messages.reduce((e, t) => e + t.parts.filter((e) => e.type === "file").length, 0)), Ye = S(() => g.value?.maxFilesPerMessage ?? 5), Xe = S(() => g.value?.maxFilesPerChat ?? 20), Ze = S(() => Math.max(0, Math.min(Ye.value - j.value.length, Xe.value - Je.value - j.value.length))), Qe = S(() => Ze.value <= 0), $e = C(null), et = () => {
6228
- $e.value = null;
6244
+ let qe = S(() => O.value.messages.reduce((e, t) => e + t.parts.filter((e) => e.type === "file").length, 0)), Je = S(() => g.value?.maxFilesPerMessage ?? 5), Ye = S(() => g.value?.maxFilesPerChat ?? 20), Xe = S(() => Math.max(0, Math.min(Je.value - M.value.length, Ye.value - qe.value - M.value.length))), Ze = S(() => Xe.value <= 0), Qe = w(null), $e = () => {
6245
+ Qe.value = null;
6229
6246
  };
6230
- ue(Qe, (e) => {
6231
- e || ($e.value = null);
6247
+ le(Ze, (e) => {
6248
+ e || (Qe.value = null);
6232
6249
  });
6233
- async function tt(e) {
6234
- if (Qe.value) {
6235
- $e.value = Xe.value - Je.value - j.value.length <= Ye.value - j.value.length ? {
6250
+ async function et(e) {
6251
+ if (Ze.value) {
6252
+ Qe.value = Ye.value - qe.value - M.value.length <= Je.value - M.value.length ? {
6236
6253
  reason: "per-chat",
6237
- max: Xe.value
6254
+ max: Ye.value
6238
6255
  } : {
6239
6256
  reason: "per-message",
6240
- max: Ye.value
6257
+ max: Je.value
6241
6258
  };
6242
6259
  return;
6243
6260
  }
@@ -6247,89 +6264,89 @@ function Qi(e) {
6247
6264
  localUrl: URL.createObjectURL(e),
6248
6265
  state: "uploading"
6249
6266
  };
6250
- j.value = [...j.value, n];
6267
+ M.value = [...M.value, n];
6251
6268
  try {
6252
- let n = await E.value.uploadMedia(o.value, w.value, e);
6253
- j.value = j.value.map((e) => e.id === t ? {
6269
+ let n = await D.value.uploadMedia(o.value, T.value, e);
6270
+ M.value = M.value.map((e) => e.id === t ? {
6254
6271
  ...e,
6255
6272
  state: "done",
6256
6273
  mediaSource: n
6257
6274
  } : e);
6258
6275
  } catch (e) {
6259
6276
  let n = e instanceof Error ? e.message : "Upload failed";
6260
- j.value = j.value.map((e) => e.id === t ? {
6277
+ M.value = M.value.map((e) => e.id === t ? {
6261
6278
  ...e,
6262
6279
  state: "error",
6263
6280
  error: n
6264
6281
  } : e);
6265
6282
  }
6266
6283
  }
6267
- async function nt(e, t) {
6268
- let { userQuestion: n, assistantMessage: r } = L(e);
6269
- I(await E.value.submitMessageFeedback({
6284
+ async function tt(e, t) {
6285
+ let { userQuestion: n, assistantMessage: r } = R(e);
6286
+ L(await D.value.submitMessageFeedback({
6270
6287
  messageId: e.id,
6271
- chatId: w.value,
6288
+ chatId: T.value,
6272
6289
  agentId: o.value,
6273
6290
  vote: t,
6274
6291
  userQuestion: n,
6275
6292
  assistantMessage: r
6276
6293
  }));
6277
6294
  }
6278
- async function rt(e) {
6279
- await nt(e, "upvote");
6295
+ async function nt(e) {
6296
+ await tt(e, "upvote");
6280
6297
  }
6281
- async function it(e) {
6282
- await nt(e, "downvote");
6298
+ async function rt(e) {
6299
+ await tt(e, "downvote");
6283
6300
  }
6284
- function at(e) {
6301
+ function it(e) {
6285
6302
  Me.value = !1, Ne.value = void 0, Ae.value = e;
6286
6303
  }
6287
- async function ot(e) {
6304
+ async function at(e) {
6288
6305
  if (Ae.value) try {
6289
6306
  je.value = !0, Me.value = !1, Ne.value = void 0;
6290
- let { userQuestion: t, assistantMessage: n } = L(Ae.value);
6291
- I(await E.value.submitMessageFeedback({
6307
+ let { userQuestion: t, assistantMessage: n } = R(Ae.value);
6308
+ L(await D.value.submitMessageFeedback({
6292
6309
  messageId: Ae.value.id,
6293
- chatId: w.value,
6310
+ chatId: T.value,
6294
6311
  agentId: o.value,
6295
6312
  userQuestion: t,
6296
6313
  assistantMessage: n,
6297
6314
  comment: e
6298
- })), Me.value = !0, await Ve(w.value);
6315
+ })), Me.value = !0, await Be(T.value);
6299
6316
  } catch {
6300
6317
  Ne.value = n("message.feedbackSubmitError") ? t("message.feedbackSubmitError") : "Failed to submit feedback";
6301
6318
  } finally {
6302
6319
  je.value = !1;
6303
6320
  }
6304
6321
  }
6305
- async function st(e) {
6322
+ async function ot(e) {
6306
6323
  try {
6307
- Pe.value = !0, A.value = !1, Fe.value = void 0, await E.value.submitLead({
6324
+ j.value = !0, A.value = !1, Pe.value = void 0, await D.value.submitLead({
6308
6325
  agentId: o.value,
6309
- chatId: w.value,
6326
+ chatId: T.value,
6310
6327
  ...e
6311
6328
  }), A.value = !0;
6312
6329
  } catch {
6313
- Fe.value = n("message.leadSubmitError") ? t("message.leadSubmitError") : "Failed to submit lead";
6330
+ Pe.value = n("message.leadSubmitError") ? t("message.leadSubmitError") : "Failed to submit lead";
6314
6331
  } finally {
6315
- Pe.value = !1;
6332
+ j.value = !1;
6316
6333
  }
6317
6334
  }
6318
- async function ct(e, t) {
6319
- let n = await E.value.updateChatTitle(o.value, e, t);
6320
- O.value = O.value.map((t) => t.id === e ? {
6335
+ async function st(e, t) {
6336
+ let n = await D.value.updateChatTitle(o.value, e, t);
6337
+ k.value = k.value.map((t) => t.id === e ? {
6321
6338
  ...t,
6322
6339
  title: n.title
6323
6340
  } : t);
6324
6341
  }
6325
- async function lt(e) {
6326
- await E.value.deleteChat(o.value, e), O.value = O.value.filter((t) => t.id !== e), w.value === e && await Ge();
6342
+ async function ct(e) {
6343
+ await D.value.deleteChat(o.value, e), k.value = k.value.filter((t) => t.id !== e), T.value === e && await We();
6327
6344
  }
6328
- function ut(e) {
6345
+ function lt(e) {
6329
6346
  Oe.value = e;
6330
6347
  }
6331
6348
  return {
6332
- apiClient: E,
6349
+ apiClient: D,
6333
6350
  baseUrl: i,
6334
6351
  basePath: a,
6335
6352
  agentId: o,
@@ -6343,7 +6360,7 @@ function Qi(e) {
6343
6360
  revisedAnswers: m,
6344
6361
  model: h,
6345
6362
  actionsInput: ee,
6346
- actions: ce,
6363
+ actions: se,
6347
6364
  agentFileUpload: g,
6348
6365
  fallbackModels: _,
6349
6366
  gatewayOptions: v,
@@ -6351,20 +6368,20 @@ function Qi(e) {
6351
6368
  systemTheme: b,
6352
6369
  hideWelcomeMessage: x,
6353
6370
  isDark: oe,
6354
- chat: D,
6355
- messages: we,
6356
- conversations: O,
6357
- isLoadingConversations: Ee,
6358
- chatFiles: k,
6371
+ chat: O,
6372
+ messages: Ce,
6373
+ conversations: k,
6374
+ isLoadingConversations: Te,
6375
+ chatFiles: Ee,
6359
6376
  isLoadingChatFiles: De,
6360
- input: Ie,
6361
- pendingAttachments: j,
6362
- isAttachmentLimitReached: Qe,
6363
- fileLimitError: $e,
6364
- localChatId: w,
6365
- isConversationBlocked: _e,
6366
- inputMessagePlaceholder: Te,
6367
- chatError: ge,
6377
+ input: Fe,
6378
+ pendingAttachments: M,
6379
+ isAttachmentLimitReached: Ze,
6380
+ fileLimitError: Qe,
6381
+ localChatId: T,
6382
+ isConversationBlocked: ge,
6383
+ inputMessagePlaceholder: we,
6384
+ chatError: he,
6368
6385
  activeView: Oe,
6369
6386
  messageFeedbacks: ke,
6370
6387
  feedbackDialogMessage: Ae,
@@ -6372,35 +6389,35 @@ function Qi(e) {
6372
6389
  isFeedbackSubmitted: Me,
6373
6390
  feedbackSubmitError: Ne,
6374
6391
  isLeadSubmitted: A,
6375
- isLoadingSubmitLead: Pe,
6376
- submitLeadError: Fe,
6377
- initialize: He,
6378
- loadConversations: P,
6379
- loadChatFiles: Le,
6380
- getChatFileUrl: F,
6381
- getChatFilePreviewUrl: Re,
6382
- deleteChatFile: ze,
6383
- handleSubmit: R,
6384
- sendMessage: z,
6385
- stopGeneration: Ue,
6386
- startNewChat: Ge,
6387
- regenerate: Ke,
6388
- addToolOutput: qe,
6389
- handleFileSelect: tt,
6390
- clearFileLimitError: et,
6391
- clearPendingAttachments: We,
6392
- onUpvote: rt,
6393
- onDownvote: it,
6394
- onFeedback: at,
6395
- onFeedbackSubmit: ot,
6396
- onLeadSubmit: st,
6397
- navigate: ut,
6398
- renameChatTitle: ct,
6399
- deleteChat: lt
6392
+ isLoadingSubmitLead: j,
6393
+ submitLeadError: Pe,
6394
+ initialize: Ve,
6395
+ loadConversations: F,
6396
+ loadChatFiles: Ie,
6397
+ getChatFileUrl: I,
6398
+ getChatFilePreviewUrl: Le,
6399
+ deleteChatFile: Re,
6400
+ handleSubmit: z,
6401
+ sendMessage: B,
6402
+ stopGeneration: He,
6403
+ startNewChat: We,
6404
+ regenerate: Ge,
6405
+ addToolOutput: Ke,
6406
+ handleFileSelect: et,
6407
+ clearFileLimitError: $e,
6408
+ clearPendingAttachments: Ue,
6409
+ onUpvote: nt,
6410
+ onDownvote: rt,
6411
+ onFeedback: it,
6412
+ onFeedbackSubmit: at,
6413
+ onLeadSubmit: ot,
6414
+ navigate: lt,
6415
+ renameChatTitle: st,
6416
+ deleteChat: ct
6400
6417
  };
6401
6418
  })();
6402
6419
  }
6403
6420
  //#endregion
6404
6421
  export { sn as i, Zi as n, wi as r, Qi as t };
6405
6422
 
6406
- //# sourceMappingURL=useChatbotStore-bbenzuMe.js.map
6423
+ //# sourceMappingURL=useChatbotStore-Cfx-qlC4.js.map