@solostylist/ui-kit 1.0.68 → 1.0.70

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 (89) hide show
  1. package/dist/{Box-6v9dDzdR.js → Box-reWd7MO-.js} +16 -16
  2. package/dist/{Close-Cq0bfDqS.js → Close-CVFQMMUW.js} +2 -2
  3. package/dist/{HelpOutlineOutlined-CrsJM_1C.js → HelpOutlineOutlined-Dw_XSjYK.js} +2 -2
  4. package/dist/{Menu-C3Ku2lqS.js → Menu-CGTDGEoX.js} +23 -23
  5. package/dist/{MenuItem-ODcKB-fe.js → MenuItem-Bdna3McP.js} +84 -86
  6. package/dist/{Select-CukDtghB.js → Select-D54ugORZ.js} +473 -466
  7. package/dist/{Stack-DvJ0EY9Z.js → Stack-ISlVeD89.js} +23 -24
  8. package/dist/{TransitionGroup-D2o-MIVr.js → TransitionGroup-DuMpOHcM.js} +1 -1
  9. package/dist/{Typography-BnBI5JmA.js → Typography-D38zoHJr.js} +42 -44
  10. package/dist/{buttonBaseClasses-jvvoR1a5.js → buttonBaseClasses-CF7RfAgE.js} +2 -2
  11. package/dist/{chipClasses-DCs-mJQc.js → chipClasses-WFcUH6gU.js} +2 -2
  12. package/dist/chunk-5P46WS5M-OG9gpzOE.js +4862 -0
  13. package/dist/clsx-OuTLNxxd.js +16 -0
  14. package/dist/createSvgIcon-DN-sh_sr.js +520 -0
  15. package/dist/createTheme-DuP3DZSF.js +3005 -0
  16. package/dist/defaultTheme-BDQAWvCM.js +55 -0
  17. package/dist/{extendSxProp-B_wB9j9Z.js → extendSxProp-KtEeHd8h.js} +1 -1
  18. package/dist/{generateUtilityClasses-DMkCz287.js → generateUtilityClasses-BpNk3DNr.js} +2 -2
  19. package/dist/{iconButtonClasses-FfLS-X2M.js → iconButtonClasses-DMst1jJO.js} +2 -2
  20. package/dist/identifier-BKLqN993.js +4 -0
  21. package/dist/{index-Bs0mGmsj.js → index-x815ub0T.js} +46 -40
  22. package/dist/{jsx-runtime-C5mzlN2N.js → jsx-runtime-DywqP_6a.js} +13 -13
  23. package/dist/main.d.ts +2 -0
  24. package/dist/main.js +30 -28
  25. package/dist/{outlinedInputClasses-rfxFh721.js → outlinedInputClasses-E4FwVkZh.js} +2 -2
  26. package/dist/s-autocomplete/s-autocomplete.js +1 -1
  27. package/dist/s-button-link/s-button-link.js +1 -1
  28. package/dist/s-checkbox/s-checkbox.js +1 -1
  29. package/dist/s-chips/s-chips.js +1 -1
  30. package/dist/s-copilot-kit-provider/s-copilot-kit-provider.js +2 -2
  31. package/dist/s-data-table/s-data-table.js +271 -270
  32. package/dist/s-date-picker/s-date-picker.js +28 -30
  33. package/dist/s-datetime-picker/s-datetime-picker.js +655 -657
  34. package/dist/s-dialog/s-dialog.js +2 -2
  35. package/dist/s-dialog-confirm/s-dialog-confirm.js +3 -3
  36. package/dist/s-dialog-message/s-dialog-message.js +3 -3
  37. package/dist/s-empty/s-empty.js +1 -1
  38. package/dist/s-error/s-error.js +1 -1
  39. package/dist/s-file-dropzone/s-file-dropzone.js +5 -5
  40. package/dist/s-file-icon/s-file-icon.js +2 -2
  41. package/dist/s-form/s-form.js +2 -2
  42. package/dist/s-glow-button/s-glow-button.js +21 -196
  43. package/dist/s-gradient-icon/s-gradient-icon.js +1 -1
  44. package/dist/s-i18n-provider/s-i18n-provider.js +1 -1
  45. package/dist/s-icon-button/s-icon-button.js +1 -1
  46. package/dist/s-label/s-label.js +2 -2
  47. package/dist/s-localization-provider/s-localization-provider.js +196 -199
  48. package/dist/s-moving-border/index.d.ts +2 -0
  49. package/dist/s-moving-border/index.js +4 -0
  50. package/dist/s-moving-border/package.json +5 -0
  51. package/dist/s-moving-border/s-moving-border.d.ts +11 -0
  52. package/dist/s-moving-border/s-moving-border.js +135 -0
  53. package/dist/s-multi-select/s-multi-select.js +4 -4
  54. package/dist/s-no-ssr/s-no-ssr.js +1 -1
  55. package/dist/s-pagination/s-pagination.js +1 -1
  56. package/dist/s-select/s-select.js +1 -1
  57. package/dist/s-skeleton/s-skeleton.js +1 -1
  58. package/dist/s-smart-text-field/s-smart-text-field.js +4252 -4226
  59. package/dist/s-snackbar-message/s-snackbar-message.js +1 -1
  60. package/dist/s-stripe/s-stripe.js +1 -1
  61. package/dist/s-stripe/stripe-input.js +1 -1
  62. package/dist/s-text-editor/s-text-editor-toolbar.js +5 -5
  63. package/dist/s-text-editor/s-text-editor.js +2 -2
  64. package/dist/s-text-field/s-text-field.js +1 -1
  65. package/dist/s-text-truncation/s-text-truncation.js +1 -1
  66. package/dist/s-theme-provider/s-theme-provider.js +1 -1
  67. package/dist/s-tip/s-tip.js +4 -4
  68. package/dist/{tabClasses-PH6lKUvl.js → tabClasses-LXCeUS4i.js} +2 -2
  69. package/dist/theme/components/avatar.js +2 -2
  70. package/dist/theme/customizations/data-display.js +8 -8
  71. package/dist/theme/customizations/feedback.js +1 -1
  72. package/dist/theme/customizations/inputs.js +5 -5
  73. package/dist/theme/customizations/navigation.js +4 -4
  74. package/dist/theme/customizations/surfaces.js +1 -1
  75. package/dist/theme/theme-primitives.js +1 -1
  76. package/dist/{typographyClasses-ZiwLh_jE.js → typographyClasses-QAKcrTAX.js} +2 -2
  77. package/dist/{useMobilePicker-BzxyifzK.js → useMobilePicker-DlmTFHhN.js} +2811 -2789
  78. package/dist/{useSlot-C4SHe-Bx.js → useSlot-CiHsL61G.js} +134 -134
  79. package/dist/{useTheme-Bn9C3FUK.js → useTheme-Dy5JmnOe.js} +1 -1
  80. package/dist/{useThemeProps-BUFb1TtB.js → useThemeProps-BGjjVPlJ.js} +2 -2
  81. package/dist/utils/dayjs.js +14 -14
  82. package/dist/{warning-D7W5-6D5.js → warning-DWsjz4u6.js} +5 -5
  83. package/package.json +3 -3
  84. package/dist/chunk-GIMSRCVW-DUi-T6vz.js +0 -10072
  85. package/dist/createSvgIcon-BTLVR-ad.js +0 -504
  86. package/dist/createTheme-BlQh0eyI.js +0 -2268
  87. package/dist/defaultTheme-CkLTWyeE.js +0 -42
  88. package/dist/identifier-CGgVMHib.js +0 -18
  89. package/dist/index-5OJKu9qh.js +0 -667
@@ -0,0 +1,4862 @@
1
+ import { j as c } from "./jsx-runtime-DywqP_6a.js";
2
+ import we, { useState as M, useCallback as I, createContext as Vt, useContext as Gt, useRef as W, useEffect as ee, useMemo as ie, useReducer as Wt } from "react";
3
+ import { v4 as Bt } from "uuid";
4
+ import { flushSync as dr } from "react-dom";
5
+ var ur = "1.10.1";
6
+ function pr(e) {
7
+ return typeof e == "object" && e !== null;
8
+ }
9
+ function fr(e, t) {
10
+ if (!!!e)
11
+ throw new Error(
12
+ "Unexpected invariant triggered."
13
+ );
14
+ }
15
+ const gr = /\r\n|[\n\r]/g;
16
+ function Ze(e, t) {
17
+ let n = 0, r = 1;
18
+ for (const i of e.body.matchAll(gr)) {
19
+ if (typeof i.index == "number" || fr(!1), i.index >= t)
20
+ break;
21
+ n = i.index + i[0].length, r += 1;
22
+ }
23
+ return {
24
+ line: r,
25
+ column: t + 1 - n
26
+ };
27
+ }
28
+ function mr(e) {
29
+ return qt(
30
+ e.source,
31
+ Ze(e.source, e.start)
32
+ );
33
+ }
34
+ function qt(e, t) {
35
+ const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, a = e.locationOffset.line - 1, s = t.line + a, l = t.line === 1 ? n : 0, d = t.column + l, o = `${e.name}:${s}:${d}
36
+ `, u = r.split(/\r\n|[\n\r]/g), g = u[i];
37
+ if (g.length > 120) {
38
+ const m = Math.floor(d / 80), h = d % 80, f = [];
39
+ for (let N = 0; N < g.length; N += 80)
40
+ f.push(g.slice(N, N + 80));
41
+ return o + yt([
42
+ [`${s} |`, f[0]],
43
+ ...f.slice(1, m + 1).map((N) => ["|", N]),
44
+ ["|", "^".padStart(h)],
45
+ ["|", f[m + 1]]
46
+ ]);
47
+ }
48
+ return o + yt([
49
+ // Lines specified like this: ["prefix", "string"],
50
+ [`${s - 1} |`, u[i - 1]],
51
+ [`${s} |`, g],
52
+ ["|", "^".padStart(d)],
53
+ [`${s + 1} |`, u[i + 1]]
54
+ ]);
55
+ }
56
+ function yt(e) {
57
+ const t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length));
58
+ return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(`
59
+ `);
60
+ }
61
+ function vr(e) {
62
+ const t = e[0];
63
+ return t == null || "kind" in t || "length" in t ? {
64
+ nodes: t,
65
+ source: e[1],
66
+ positions: e[2],
67
+ path: e[3],
68
+ originalError: e[4],
69
+ extensions: e[5]
70
+ } : t;
71
+ }
72
+ let hr = class Yt extends Error {
73
+ /**
74
+ * An array of `{ line, column }` locations within the source GraphQL document
75
+ * which correspond to this error.
76
+ *
77
+ * Errors during validation often contain multiple locations, for example to
78
+ * point out two things with the same name. Errors during execution include a
79
+ * single location, the field which produced the error.
80
+ *
81
+ * Enumerable, and appears in the result of JSON.stringify().
82
+ */
83
+ /**
84
+ * An array describing the JSON-path into the execution response which
85
+ * corresponds to this error. Only included for errors during execution.
86
+ *
87
+ * Enumerable, and appears in the result of JSON.stringify().
88
+ */
89
+ /**
90
+ * An array of GraphQL AST Nodes corresponding to this error.
91
+ */
92
+ /**
93
+ * The source GraphQL document for the first location of this error.
94
+ *
95
+ * Note that if this Error represents more than one node, the source may not
96
+ * represent nodes after the first node.
97
+ */
98
+ /**
99
+ * An array of character offsets within the source GraphQL document
100
+ * which correspond to this error.
101
+ */
102
+ /**
103
+ * The original error thrown from a field resolver during execution.
104
+ */
105
+ /**
106
+ * Extension fields to add to the formatted error.
107
+ */
108
+ /**
109
+ * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
110
+ */
111
+ constructor(t, ...n) {
112
+ var r, i, a;
113
+ const { nodes: s, source: l, positions: d, path: o, originalError: u, extensions: g } = vr(n);
114
+ super(t), this.name = "GraphQLError", this.path = o ?? void 0, this.originalError = u ?? void 0, this.nodes = bt(
115
+ Array.isArray(s) ? s : s ? [s] : void 0
116
+ );
117
+ const m = bt(
118
+ (r = this.nodes) === null || r === void 0 ? void 0 : r.map((f) => f.loc).filter((f) => f != null)
119
+ );
120
+ this.source = l ?? (m == null || (i = m[0]) === null || i === void 0 ? void 0 : i.source), this.positions = d ?? (m == null ? void 0 : m.map((f) => f.start)), this.locations = d && l ? d.map((f) => Ze(l, f)) : m == null ? void 0 : m.map((f) => Ze(f.source, f.start));
121
+ const h = pr(
122
+ u == null ? void 0 : u.extensions
123
+ ) ? u == null ? void 0 : u.extensions : void 0;
124
+ this.extensions = (a = g ?? h) !== null && a !== void 0 ? a : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
125
+ message: {
126
+ writable: !0,
127
+ enumerable: !0
128
+ },
129
+ name: {
130
+ enumerable: !1
131
+ },
132
+ nodes: {
133
+ enumerable: !1
134
+ },
135
+ source: {
136
+ enumerable: !1
137
+ },
138
+ positions: {
139
+ enumerable: !1
140
+ },
141
+ originalError: {
142
+ enumerable: !1
143
+ }
144
+ }), u != null && u.stack ? Object.defineProperty(this, "stack", {
145
+ value: u.stack,
146
+ writable: !0,
147
+ configurable: !0
148
+ }) : Error.captureStackTrace ? Error.captureStackTrace(this, Yt) : Object.defineProperty(this, "stack", {
149
+ value: Error().stack,
150
+ writable: !0,
151
+ configurable: !0
152
+ });
153
+ }
154
+ get [Symbol.toStringTag]() {
155
+ return "GraphQLError";
156
+ }
157
+ toString() {
158
+ let t = this.message;
159
+ if (this.nodes)
160
+ for (const n of this.nodes)
161
+ n.loc && (t += `
162
+
163
+ ` + mr(n.loc));
164
+ else if (this.source && this.locations)
165
+ for (const n of this.locations)
166
+ t += `
167
+
168
+ ` + qt(this.source, n);
169
+ return t;
170
+ }
171
+ toJSON() {
172
+ const t = {
173
+ message: this.message
174
+ };
175
+ return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
176
+ }
177
+ };
178
+ function bt(e) {
179
+ return e === void 0 || e.length === 0 ? void 0 : e;
180
+ }
181
+ function Qt(e, t = "unset") {
182
+ try {
183
+ return JSON.parse(e);
184
+ } catch {
185
+ return t === "unset" ? null : t;
186
+ }
187
+ }
188
+ function ma() {
189
+ return /Mac|iMac|Macintosh/i.test(navigator.userAgent);
190
+ }
191
+ var xe = ur, $ = /* @__PURE__ */ ((e) => (e.CRITICAL = "critical", e.WARNING = "warning", e.INFO = "info", e))($ || {}), it = /* @__PURE__ */ ((e) => (e.BANNER = "banner", e.TOAST = "toast", e.SILENT = "silent", e.DEV_ONLY = "dev_only", e))(it || {}), H = {
192
+ COPILOT_ERROR: "CopilotError",
193
+ COPILOT_API_DISCOVERY_ERROR: "CopilotApiDiscoveryError",
194
+ COPILOT_REMOTE_ENDPOINT_DISCOVERY_ERROR: "CopilotKitRemoteEndpointDiscoveryError",
195
+ COPILOT_KIT_AGENT_DISCOVERY_ERROR: "CopilotKitAgentDiscoveryError",
196
+ COPILOT_KIT_LOW_LEVEL_ERROR: "CopilotKitLowLevelError",
197
+ COPILOT_KIT_VERSION_MISMATCH_ERROR: "CopilotKitVersionMismatchError",
198
+ RESOLVED_COPILOT_KIT_ERROR: "ResolvedCopilotKitError",
199
+ CONFIGURATION_ERROR: "ConfigurationError",
200
+ MISSING_PUBLIC_API_KEY_ERROR: "MissingPublicApiKeyError"
201
+ }, te = /* @__PURE__ */ ((e) => (e.NETWORK_ERROR = "NETWORK_ERROR", e.NOT_FOUND = "NOT_FOUND", e.AGENT_NOT_FOUND = "AGENT_NOT_FOUND", e.API_NOT_FOUND = "API_NOT_FOUND", e.REMOTE_ENDPOINT_NOT_FOUND = "REMOTE_ENDPOINT_NOT_FOUND", e.AUTHENTICATION_ERROR = "AUTHENTICATION_ERROR", e.MISUSE = "MISUSE", e.UNKNOWN = "UNKNOWN", e.VERSION_MISMATCH = "VERSION_MISMATCH", e.CONFIGURATION_ERROR = "CONFIGURATION_ERROR", e.MISSING_PUBLIC_API_KEY_ERROR = "MISSING_PUBLIC_API_KEY_ERROR", e.UPGRADE_REQUIRED_ERROR = "UPGRADE_REQUIRED_ERROR", e))(te || {}), le = "https://docs.copilotkit.ai", de = (e) => `See more: [${e}](${e})`, ye = {
202
+ NETWORK_ERROR: {
203
+ statusCode: 503,
204
+ troubleshootingUrl: `${le}/troubleshooting/common-issues#i-am-getting-a-network-errors--api-not-found`,
205
+ visibility: "banner",
206
+ severity: "critical"
207
+ /* CRITICAL */
208
+ },
209
+ NOT_FOUND: {
210
+ statusCode: 404,
211
+ troubleshootingUrl: `${le}/troubleshooting/common-issues#i-am-getting-a-network-errors--api-not-found`,
212
+ visibility: "banner",
213
+ severity: "critical"
214
+ /* CRITICAL */
215
+ },
216
+ AGENT_NOT_FOUND: {
217
+ statusCode: 500,
218
+ troubleshootingUrl: `${le}/coagents/troubleshooting/common-issues#i-am-getting-agent-not-found-error`,
219
+ visibility: "banner",
220
+ severity: "critical"
221
+ /* CRITICAL */
222
+ },
223
+ API_NOT_FOUND: {
224
+ statusCode: 404,
225
+ troubleshootingUrl: `${le}/troubleshooting/common-issues#i-am-getting-a-network-errors--api-not-found`,
226
+ visibility: "banner",
227
+ severity: "critical"
228
+ /* CRITICAL */
229
+ },
230
+ REMOTE_ENDPOINT_NOT_FOUND: {
231
+ statusCode: 404,
232
+ troubleshootingUrl: `${le}/troubleshooting/common-issues#i-am-getting-copilotkits-remote-endpoint-not-found-error`,
233
+ visibility: "banner",
234
+ severity: "critical"
235
+ /* CRITICAL */
236
+ },
237
+ AUTHENTICATION_ERROR: {
238
+ statusCode: 401,
239
+ troubleshootingUrl: `${le}/troubleshooting/common-issues#authentication-errors`,
240
+ visibility: "banner",
241
+ severity: "critical"
242
+ /* CRITICAL */
243
+ },
244
+ MISUSE: {
245
+ statusCode: 400,
246
+ troubleshootingUrl: null,
247
+ visibility: "dev_only",
248
+ severity: "warning"
249
+ /* WARNING */
250
+ },
251
+ UNKNOWN: {
252
+ statusCode: 500,
253
+ visibility: "toast",
254
+ severity: "critical"
255
+ /* CRITICAL */
256
+ },
257
+ CONFIGURATION_ERROR: {
258
+ statusCode: 400,
259
+ troubleshootingUrl: null,
260
+ severity: "warning",
261
+ visibility: "banner"
262
+ /* BANNER */
263
+ },
264
+ MISSING_PUBLIC_API_KEY_ERROR: {
265
+ statusCode: 400,
266
+ troubleshootingUrl: null,
267
+ severity: "critical",
268
+ visibility: "banner"
269
+ /* BANNER */
270
+ },
271
+ UPGRADE_REQUIRED_ERROR: {
272
+ statusCode: 402,
273
+ troubleshootingUrl: null,
274
+ severity: "warning",
275
+ visibility: "banner"
276
+ /* BANNER */
277
+ },
278
+ VERSION_MISMATCH: {
279
+ statusCode: 400,
280
+ troubleshootingUrl: null,
281
+ visibility: "dev_only",
282
+ severity: "info"
283
+ /* INFO */
284
+ }
285
+ }, P = class extends hr {
286
+ constructor({
287
+ message: e = "Unknown error occurred",
288
+ code: t,
289
+ severity: n,
290
+ visibility: r
291
+ }) {
292
+ const i = H.COPILOT_ERROR, a = ye[t], { statusCode: s } = a, l = r ?? a.visibility ?? "toast", d = n ?? ("severity" in a ? a.severity : void 0);
293
+ super(e, {
294
+ extensions: {
295
+ name: i,
296
+ statusCode: s,
297
+ code: t,
298
+ visibility: l,
299
+ severity: d,
300
+ troubleshootingUrl: "troubleshootingUrl" in a ? a.troubleshootingUrl : null,
301
+ originalError: {
302
+ message: e,
303
+ stack: new Error().stack
304
+ }
305
+ }
306
+ }), this.code = t, this.name = i, this.statusCode = s, this.severity = d, this.visibility = l;
307
+ }
308
+ }, Xt = ({
309
+ reactCoreVersion: e,
310
+ runtimeVersion: t,
311
+ runtimeClientGqlVersion: n
312
+ }) => `Version mismatch detected: @copilotkit/runtime@${t ?? ""} is not compatible with @copilotkit/react-core@${e} and @copilotkit/runtime-client-gql@${n}. Please ensure all installed copilotkit packages are on the same version.`, xr = class extends P {
313
+ constructor({
314
+ reactCoreVersion: e,
315
+ runtimeVersion: t,
316
+ runtimeClientGqlVersion: n
317
+ }) {
318
+ super({
319
+ message: Xt({
320
+ reactCoreVersion: e,
321
+ runtimeVersion: t,
322
+ runtimeClientGqlVersion: n
323
+ }),
324
+ code: "VERSION_MISMATCH"
325
+ }), this.name = H.COPILOT_KIT_VERSION_MISMATCH_ERROR;
326
+ }
327
+ }, be = class extends P {
328
+ constructor(e = {}) {
329
+ const t = e.url ?? "";
330
+ let n = "";
331
+ t != null && t.includes("/info") ? n = "when fetching CopilotKit info" : t.includes("/actions/execute") ? n = "when attempting to execute actions." : t.includes("/agents/state") ? n = "when attempting to get agent state." : t.includes("/agents/execute") && (n = "when attempting to execute agent(s).");
332
+ const r = e.message ?? (e.url ? `Failed to find CopilotKit API endpoint at url ${e.url} ${n}` : "Failed to find CopilotKit API endpoint."), i = e.code ?? "API_NOT_FOUND", a = `${r}.
333
+
334
+ ${de(ye[i].troubleshootingUrl)}`;
335
+ super({ message: a, code: i }), this.name = H.COPILOT_API_DISCOVERY_ERROR;
336
+ }
337
+ }, at = class extends be {
338
+ constructor(e) {
339
+ const t = (e == null ? void 0 : e.message) ?? (e != null && e.url ? `Failed to find or contact remote endpoint at url ${e.url}` : "Failed to find or contact remote endpoint");
340
+ super({ message: t, code: "REMOTE_ENDPOINT_NOT_FOUND" }), this.name = H.COPILOT_REMOTE_ENDPOINT_DISCOVERY_ERROR;
341
+ }
342
+ }, Ht = class extends P {
343
+ constructor(e) {
344
+ const { agentName: t, availableAgents: n } = e, r = "AGENT_NOT_FOUND", i = de(ye[r].troubleshootingUrl);
345
+ let a;
346
+ if (n.length) {
347
+ const s = n.map((l) => l.name).join(", ");
348
+ t ? a = `Agent '${t}' was not found. Available agents are: ${s}. Please verify the agent name in your configuration and ensure it matches one of the available agents.
349
+
350
+ ${i}` : a = `The requested agent was not found. Available agents are: ${s}. Please verify the agent name in your configuration and ensure it matches one of the available agents.
351
+
352
+ ${i}`;
353
+ } else
354
+ a = `${t ? `Agent '${t}'` : "The requested agent"} was not found. Please set up at least one agent before proceeding. ${i}`;
355
+ super({ message: a, code: r }), this.name = H.COPILOT_KIT_AGENT_DISCOVERY_ERROR;
356
+ }
357
+ }, yr = class extends P {
358
+ constructor({ error: e, url: t, message: n }) {
359
+ let r = "NETWORK_ERROR";
360
+ const i = e.code, a = n ?? Ar({ errorCode: i, url: t });
361
+ super({ message: a, code: r }), this.name = H.COPILOT_KIT_LOW_LEVEL_ERROR;
362
+ }
363
+ }, br = class extends P {
364
+ constructor({
365
+ status: e,
366
+ message: t,
367
+ code: n,
368
+ isRemoteEndpoint: r,
369
+ url: i
370
+ }) {
371
+ let a = n;
372
+ if (!a)
373
+ switch (e) {
374
+ case 400:
375
+ throw new be({ message: t, url: i });
376
+ case 404:
377
+ throw r ? new at({ message: t, url: i }) : new be({ message: t, url: i });
378
+ default:
379
+ a = "UNKNOWN";
380
+ break;
381
+ }
382
+ super({ message: t, code: a }), this.name = H.RESOLVED_COPILOT_KIT_ERROR;
383
+ }
384
+ }, Jt = class extends P {
385
+ constructor(e) {
386
+ super({
387
+ message: e,
388
+ code: "CONFIGURATION_ERROR"
389
+ /* CONFIGURATION_ERROR */
390
+ }), this.name = H.CONFIGURATION_ERROR, this.severity = "warning";
391
+ }
392
+ }, kr = class extends Jt {
393
+ constructor(e) {
394
+ super(e), this.name = H.MISSING_PUBLIC_API_KEY_ERROR, this.severity = "critical";
395
+ }
396
+ };
397
+ async function Nr({
398
+ runtimeVersion: e,
399
+ runtimeClientGqlVersion: t
400
+ }) {
401
+ if (!(!e || e === "" || !t) && (xe !== e || xe !== t || e !== t))
402
+ return {
403
+ runtimeVersion: e,
404
+ runtimeClientGqlVersion: t,
405
+ reactCoreVersion: xe,
406
+ message: Xt({
407
+ runtimeVersion: e,
408
+ runtimeClientGqlVersion: t,
409
+ reactCoreVersion: xe
410
+ })
411
+ };
412
+ }
413
+ var Ar = ({ errorCode: e, url: t }) => {
414
+ const n = ye.NETWORK_ERROR.troubleshootingUrl, r = (i = `Failed to fetch from url ${t}.`) => `${i}.
415
+
416
+ Possible reasons:
417
+ - -The server may have an error preventing it from returning a response (Check the server logs for more info).
418
+ - -The server might be down or unreachable
419
+ - -There might be a network issue (e.g., DNS failure, connection timeout)
420
+ - -The URL might be incorrect
421
+ - -The server is not running on the specified port
422
+
423
+ ${de(n)}`;
424
+ if (t.includes("/info"))
425
+ return r(`Failed to fetch CopilotKit agents/action information from url ${t}.`);
426
+ if (t.includes("/actions/execute"))
427
+ return r(`Fetch call to ${t} to execute actions failed.`);
428
+ if (t.includes("/agents/state"))
429
+ return r(`Fetch call to ${t} to get agent state failed.`);
430
+ if (t.includes("/agents/execute"))
431
+ return r(`Fetch call to ${t} to execute agent(s) failed.`);
432
+ switch (e) {
433
+ case "ECONNREFUSED":
434
+ return `Connection to ${t} was refused. Ensure the server is running and accessible.
435
+
436
+ ${de(n)}`;
437
+ case "ENOTFOUND":
438
+ return `The server on ${t} could not be found. Check the URL or your network configuration.
439
+
440
+ ${de(ye.NOT_FOUND.troubleshootingUrl)}`;
441
+ case "ETIMEDOUT":
442
+ return `The connection to ${t} timed out. The server might be overloaded or taking too long to respond.
443
+
444
+ ${de(n)}`;
445
+ default:
446
+ return;
447
+ }
448
+ };
449
+ function st() {
450
+ return "ck-" + Bt();
451
+ }
452
+ function wr() {
453
+ return Bt();
454
+ }
455
+ var Zt = "https://api.cloud.copilotkit.ai", Sr = "v1", Er = `${Zt}/copilotkit/${Sr}`, _t = "X-CopilotCloud-Public-Api-Key", Cr = /* @__PURE__ */ ((e) => (e.Chat = "Chat", e.Suggestion = "Suggestion", e.Task = "Task", e.TextareaCompletion = "TextareaCompletion", e.TextareaPopover = "TextareaPopover", e))(Cr || {}), $t = /* @__PURE__ */ ((e) => (e.Assistant = "assistant", e.Developer = "developer", e.System = "system", e.Tool = "tool", e.User = "user", e))($t || {}), Or = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "generateCopilotResponse" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GenerateCopilotResponseInput" } } } }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "properties" } }, type: { kind: "NamedType", name: { kind: "Name", value: "JSONObject" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "generateCopilotResponse" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }, { kind: "Argument", name: { kind: "Name", value: "properties" }, value: { kind: "Variable", name: { kind: "Name", value: "properties" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "threadId" } }, { kind: "Field", name: { kind: "Name", value: "runId" } }, { kind: "Field", name: { kind: "Name", value: "extensions" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "openaiAssistantAPI" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "runId" } }, { kind: "Field", name: { kind: "Name", value: "threadId" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CopilotResponse" } }, directives: [{ kind: "Directive", name: { kind: "Name", value: "defer" } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "status" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BaseResponseStatus" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "FailedResponseStatus" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "reason" } }, { kind: "Field", name: { kind: "Name", value: "details" } }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "messages" }, directives: [{ kind: "Directive", name: { kind: "Name", value: "stream" } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BaseMessageOutput" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "createdAt" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BaseMessageOutput" } }, directives: [{ kind: "Directive", name: { kind: "Name", value: "defer" } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "status" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SuccessMessageStatus" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "FailedMessageStatus" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" } }, { kind: "Field", name: { kind: "Name", value: "reason" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "PendingMessageStatus" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "TextMessageOutput" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "content" }, directives: [{ kind: "Directive", name: { kind: "Name", value: "stream" } }] }, { kind: "Field", name: { kind: "Name", value: "role" } }, { kind: "Field", name: { kind: "Name", value: "parentMessageId" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ImageMessageOutput" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "format" } }, { kind: "Field", name: { kind: "Name", value: "bytes" } }, { kind: "Field", name: { kind: "Name", value: "role" } }, { kind: "Field", name: { kind: "Name", value: "parentMessageId" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ActionExecutionMessageOutput" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "arguments" }, directives: [{ kind: "Directive", name: { kind: "Name", value: "stream" } }] }, { kind: "Field", name: { kind: "Name", value: "parentMessageId" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ResultMessageOutput" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "result" } }, { kind: "Field", name: { kind: "Name", value: "actionExecutionId" } }, { kind: "Field", name: { kind: "Name", value: "actionName" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "AgentStateMessageOutput" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "threadId" } }, { kind: "Field", name: { kind: "Name", value: "state" } }, { kind: "Field", name: { kind: "Name", value: "running" } }, { kind: "Field", name: { kind: "Name", value: "agentName" } }, { kind: "Field", name: { kind: "Name", value: "nodeName" } }, { kind: "Field", name: { kind: "Name", value: "runId" } }, { kind: "Field", name: { kind: "Name", value: "active" } }, { kind: "Field", name: { kind: "Name", value: "role" } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "metaEvents" }, directives: [{ kind: "Directive", name: { kind: "Name", value: "stream" } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LangGraphInterruptEvent" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "value" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CopilotKitLangGraphInterruptEvent" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "messages" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BaseMessageOutput" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "createdAt" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BaseMessageOutput" } }, directives: [{ kind: "Directive", name: { kind: "Name", value: "defer" } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "status" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SuccessMessageStatus" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "FailedMessageStatus" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" } }, { kind: "Field", name: { kind: "Name", value: "reason" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "PendingMessageStatus" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "TextMessageOutput" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "content" } }, { kind: "Field", name: { kind: "Name", value: "role" } }, { kind: "Field", name: { kind: "Name", value: "parentMessageId" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ActionExecutionMessageOutput" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "arguments" } }, { kind: "Field", name: { kind: "Name", value: "parentMessageId" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ResultMessageOutput" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "result" } }, { kind: "Field", name: { kind: "Name", value: "actionExecutionId" } }, { kind: "Field", name: { kind: "Name", value: "actionName" } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "value" } }] } }] } }] } }] } }] } }] }, Ir = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "availableAgents" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "availableAgents" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "agents" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "description" } }] } }] } }] } }] }, Rr = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "loadAgentState" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "LoadAgentStateInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "loadAgentState" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "threadId" } }, { kind: "Field", name: { kind: "Name", value: "threadExists" } }, { kind: "Field", name: { kind: "Name", value: "state" } }, { kind: "Field", name: { kind: "Name", value: "messages" } }] } }] } }] }, Se = class {
456
+ constructor(e) {
457
+ e.id ?? (e.id = st()), e.status ?? (e.status = {
458
+ code: "Success"
459
+ /* Success */
460
+ }), e.createdAt ?? (e.createdAt = /* @__PURE__ */ new Date()), Object.assign(this, e);
461
+ }
462
+ isTextMessage() {
463
+ return this.type === "TextMessage";
464
+ }
465
+ isActionExecutionMessage() {
466
+ return this.type === "ActionExecutionMessage";
467
+ }
468
+ isResultMessage() {
469
+ return this.type === "ResultMessage";
470
+ }
471
+ isAgentStateMessage() {
472
+ return this.type === "AgentStateMessage";
473
+ }
474
+ isImageMessage() {
475
+ return this.type === "ImageMessage";
476
+ }
477
+ }, va = $t, en = class extends Se {
478
+ constructor(e) {
479
+ super(e), this.type = "TextMessage";
480
+ }
481
+ }, tn = class extends Se {
482
+ constructor(e) {
483
+ super(e), this.type = "ActionExecutionMessage";
484
+ }
485
+ }, nn = class extends Se {
486
+ constructor(e) {
487
+ super(e), this.type = "ResultMessage";
488
+ }
489
+ static decodeResult(e) {
490
+ return Qt(e, e);
491
+ }
492
+ static encodeResult(e) {
493
+ return e === void 0 ? "" : typeof e == "string" ? e : JSON.stringify(e);
494
+ }
495
+ }, rn = class extends Se {
496
+ constructor(e) {
497
+ super(e), this.type = "AgentStateMessage";
498
+ }
499
+ }, an = class extends Se {
500
+ constructor(e) {
501
+ super(e), this.type = "ImageMessage";
502
+ }
503
+ }, Tr = {
504
+ "\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\n generateCopilotResponse(data: $data, properties: $properties) {\n threadId\n runId\n extensions {\n openaiAssistantAPI {\n runId\n threadId\n }\n }\n ... on CopilotResponse @defer {\n status {\n ... on BaseResponseStatus {\n code\n }\n ... on FailedResponseStatus {\n reason\n details\n }\n }\n }\n messages @stream {\n __typename\n ... on BaseMessageOutput {\n id\n createdAt\n }\n ... on BaseMessageOutput @defer {\n status {\n ... on SuccessMessageStatus {\n code\n }\n ... on FailedMessageStatus {\n code\n reason\n }\n ... on PendingMessageStatus {\n code\n }\n }\n }\n ... on TextMessageOutput {\n content @stream\n role\n parentMessageId\n }\n ... on ImageMessageOutput {\n format\n bytes\n role\n parentMessageId\n }\n ... on ActionExecutionMessageOutput {\n name\n arguments @stream\n parentMessageId\n }\n ... on ResultMessageOutput {\n result\n actionExecutionId\n actionName\n }\n ... on AgentStateMessageOutput {\n threadId\n state\n running\n agentName\n nodeName\n runId\n active\n role\n }\n }\n metaEvents @stream {\n ... on LangGraphInterruptEvent {\n type\n name\n value\n }\n\n ... on CopilotKitLangGraphInterruptEvent {\n type\n name\n data {\n messages {\n __typename\n ... on BaseMessageOutput {\n id\n createdAt\n }\n ... on BaseMessageOutput @defer {\n status {\n ... on SuccessMessageStatus {\n code\n }\n ... on FailedMessageStatus {\n code\n reason\n }\n ... on PendingMessageStatus {\n code\n }\n }\n }\n ... on TextMessageOutput {\n content\n role\n parentMessageId\n }\n ... on ActionExecutionMessageOutput {\n name\n arguments\n parentMessageId\n }\n ... on ResultMessageOutput {\n result\n actionExecutionId\n actionName\n }\n }\n value\n }\n }\n }\n }\n }\n": Or,
505
+ "\n query availableAgents {\n availableAgents {\n agents {\n name\n id\n description\n }\n }\n }\n": Ir,
506
+ "\n query loadAgentState($data: LoadAgentStateInput!) {\n loadAgentState(data: $data) {\n threadId\n threadExists\n state\n messages\n }\n }\n": Rr
507
+ };
508
+ function ot(e) {
509
+ return Tr[e] ?? {};
510
+ }
511
+ var Mr = ot(
512
+ /** GraphQL **/
513
+ `
514
+ query availableAgents {
515
+ availableAgents {
516
+ agents {
517
+ name
518
+ id
519
+ description
520
+ }
521
+ }
522
+ }
523
+ `
524
+ ), Fr = ot(
525
+ /** GraphQL **/
526
+ `
527
+ query loadAgentState($data: LoadAgentStateInput!) {
528
+ loadAgentState(data: $data) {
529
+ threadId
530
+ threadExists
531
+ state
532
+ messages
533
+ }
534
+ }
535
+ `
536
+ ), Dr = ot(
537
+ /** GraphQL **/
538
+ `
539
+ mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {
540
+ generateCopilotResponse(data: $data, properties: $properties) {
541
+ threadId
542
+ runId
543
+ extensions {
544
+ openaiAssistantAPI {
545
+ runId
546
+ threadId
547
+ }
548
+ }
549
+ ... on CopilotResponse @defer {
550
+ status {
551
+ ... on BaseResponseStatus {
552
+ code
553
+ }
554
+ ... on FailedResponseStatus {
555
+ reason
556
+ details
557
+ }
558
+ }
559
+ }
560
+ messages @stream {
561
+ __typename
562
+ ... on BaseMessageOutput {
563
+ id
564
+ createdAt
565
+ }
566
+ ... on BaseMessageOutput @defer {
567
+ status {
568
+ ... on SuccessMessageStatus {
569
+ code
570
+ }
571
+ ... on FailedMessageStatus {
572
+ code
573
+ reason
574
+ }
575
+ ... on PendingMessageStatus {
576
+ code
577
+ }
578
+ }
579
+ }
580
+ ... on TextMessageOutput {
581
+ content @stream
582
+ role
583
+ parentMessageId
584
+ }
585
+ ... on ImageMessageOutput {
586
+ format
587
+ bytes
588
+ role
589
+ parentMessageId
590
+ }
591
+ ... on ActionExecutionMessageOutput {
592
+ name
593
+ arguments @stream
594
+ parentMessageId
595
+ }
596
+ ... on ResultMessageOutput {
597
+ result
598
+ actionExecutionId
599
+ actionName
600
+ }
601
+ ... on AgentStateMessageOutput {
602
+ threadId
603
+ state
604
+ running
605
+ agentName
606
+ nodeName
607
+ runId
608
+ active
609
+ role
610
+ }
611
+ }
612
+ metaEvents @stream {
613
+ ... on LangGraphInterruptEvent {
614
+ type
615
+ name
616
+ value
617
+ }
618
+
619
+ ... on CopilotKitLangGraphInterruptEvent {
620
+ type
621
+ name
622
+ data {
623
+ messages {
624
+ __typename
625
+ ... on BaseMessageOutput {
626
+ id
627
+ createdAt
628
+ }
629
+ ... on BaseMessageOutput @defer {
630
+ status {
631
+ ... on SuccessMessageStatus {
632
+ code
633
+ }
634
+ ... on FailedMessageStatus {
635
+ code
636
+ reason
637
+ }
638
+ ... on PendingMessageStatus {
639
+ code
640
+ }
641
+ }
642
+ }
643
+ ... on TextMessageOutput {
644
+ content
645
+ role
646
+ parentMessageId
647
+ }
648
+ ... on ActionExecutionMessageOutput {
649
+ name
650
+ arguments
651
+ parentMessageId
652
+ }
653
+ ... on ResultMessageOutput {
654
+ result
655
+ actionExecutionId
656
+ actionName
657
+ }
658
+ }
659
+ value
660
+ }
661
+ }
662
+ }
663
+ }
664
+ }
665
+ `
666
+ ), ue = {
667
+ NAME: "Name",
668
+ OPERATION_DEFINITION: "OperationDefinition",
669
+ FIELD: "Field"
670
+ };
671
+ class _e extends Error {
672
+ constructor(t, n, r, i, a, s, l) {
673
+ super(t), this.name = "GraphQLError", this.message = t, a && (this.path = a), n && (this.nodes = Array.isArray(n) ? n : [n]), r && (this.source = r), i && (this.positions = i), s && (this.originalError = s);
674
+ var d = l;
675
+ if (!d && s) {
676
+ var o = s.extensions;
677
+ o && typeof o == "object" && (d = o);
678
+ }
679
+ this.extensions = d || {};
680
+ }
681
+ toJSON() {
682
+ return {
683
+ ...this,
684
+ message: this.message
685
+ };
686
+ }
687
+ toString() {
688
+ return this.message;
689
+ }
690
+ get [Symbol.toStringTag]() {
691
+ return "GraphQLError";
692
+ }
693
+ }
694
+ var y, v;
695
+ function L(e) {
696
+ return new _e(`Syntax Error: Unexpected token at ${v} in ${e}`);
697
+ }
698
+ function kt(e) {
699
+ if (e.lastIndex = v, e.test(y))
700
+ return y.slice(v, v = e.lastIndex);
701
+ }
702
+ var Ie = / +(?=[^\s])/y;
703
+ function jr(e) {
704
+ for (var t = e.split(`
705
+ `), n = "", r = 0, i = 0, a = t.length - 1, s = 0; s < t.length; s++)
706
+ Ie.lastIndex = 0, Ie.test(t[s]) && (s && (!r || Ie.lastIndex < r) && (r = Ie.lastIndex), i = i || s, a = s);
707
+ for (var l = i; l <= a; l++)
708
+ l !== i && (n += `
709
+ `), n += t[l].slice(r).replace(/\\"""/g, '"""');
710
+ return n;
711
+ }
712
+ function C() {
713
+ for (var e = 0 | y.charCodeAt(v++); e === 9 || e === 10 || e === 13 || e === 32 || e === 35 || e === 44 || e === 65279; e = 0 | y.charCodeAt(v++))
714
+ if (e === 35)
715
+ for (; (e = 0 | y.charCodeAt(v++)) && e !== 10 && e !== 13; )
716
+ ;
717
+ v--;
718
+ }
719
+ function lt() {
720
+ for (var e = v, t = 0 | y.charCodeAt(v++); t >= 48 && t <= 57 || t >= 65 && t <= 90 || t === 95 || t >= 97 && t <= 122; t = 0 | y.charCodeAt(v++))
721
+ ;
722
+ if (e === v - 1)
723
+ throw L("Name");
724
+ var n = y.slice(e, --v);
725
+ return C(), n;
726
+ }
727
+ function K() {
728
+ return {
729
+ kind: "Name",
730
+ value: lt()
731
+ };
732
+ }
733
+ var Lr = /(?:"""|(?:[\s\S]*?[^\\])""")/y, Pr = /(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;
734
+ function pe(e) {
735
+ var t;
736
+ switch (y.charCodeAt(v)) {
737
+ case 91:
738
+ v++, C();
739
+ for (var n = []; y.charCodeAt(v) !== 93; )
740
+ n.push(pe(e));
741
+ return v++, C(), {
742
+ kind: "ListValue",
743
+ values: n
744
+ };
745
+ case 123:
746
+ v++, C();
747
+ for (var r = []; y.charCodeAt(v) !== 125; ) {
748
+ var i = K();
749
+ if (y.charCodeAt(v++) !== 58)
750
+ throw L("ObjectField");
751
+ C(), r.push({
752
+ kind: "ObjectField",
753
+ name: i,
754
+ value: pe(e)
755
+ });
756
+ }
757
+ return v++, C(), {
758
+ kind: "ObjectValue",
759
+ fields: r
760
+ };
761
+ case 36:
762
+ if (e)
763
+ throw L("Variable");
764
+ return v++, {
765
+ kind: "Variable",
766
+ name: K()
767
+ };
768
+ case 34:
769
+ if (y.charCodeAt(v + 1) === 34 && y.charCodeAt(v + 2) === 34) {
770
+ if (v += 3, (t = kt(Lr)) == null)
771
+ throw L("StringValue");
772
+ return C(), {
773
+ kind: "StringValue",
774
+ value: jr(t.slice(0, -3)),
775
+ block: !0
776
+ };
777
+ } else {
778
+ var a = v, s;
779
+ v++;
780
+ var l = !1;
781
+ for (s = 0 | y.charCodeAt(v++); s === 92 && (v++, l = !0) || s !== 10 && s !== 13 && s !== 34 && s; s = 0 | y.charCodeAt(v++))
782
+ ;
783
+ if (s !== 34)
784
+ throw L("StringValue");
785
+ return t = y.slice(a, v), C(), {
786
+ kind: "StringValue",
787
+ value: l ? JSON.parse(t) : t.slice(1, -1),
788
+ block: !1
789
+ };
790
+ }
791
+ case 45:
792
+ case 48:
793
+ case 49:
794
+ case 50:
795
+ case 51:
796
+ case 52:
797
+ case 53:
798
+ case 54:
799
+ case 55:
800
+ case 56:
801
+ case 57:
802
+ for (var d = v++, o; (o = 0 | y.charCodeAt(v++)) >= 48 && o <= 57; )
803
+ ;
804
+ var u = y.slice(d, --v);
805
+ if ((o = y.charCodeAt(v)) === 46 || o === 69 || o === 101) {
806
+ if ((t = kt(Pr)) == null)
807
+ throw L("FloatValue");
808
+ return C(), {
809
+ kind: "FloatValue",
810
+ value: u + t
811
+ };
812
+ } else
813
+ return C(), {
814
+ kind: "IntValue",
815
+ value: u
816
+ };
817
+ case 110:
818
+ if (y.charCodeAt(v + 1) === 117 && y.charCodeAt(v + 2) === 108 && y.charCodeAt(v + 3) === 108)
819
+ return v += 4, C(), {
820
+ kind: "NullValue"
821
+ };
822
+ break;
823
+ case 116:
824
+ if (y.charCodeAt(v + 1) === 114 && y.charCodeAt(v + 2) === 117 && y.charCodeAt(v + 3) === 101)
825
+ return v += 4, C(), {
826
+ kind: "BooleanValue",
827
+ value: !0
828
+ };
829
+ break;
830
+ case 102:
831
+ if (y.charCodeAt(v + 1) === 97 && y.charCodeAt(v + 2) === 108 && y.charCodeAt(v + 3) === 115 && y.charCodeAt(v + 4) === 101)
832
+ return v += 5, C(), {
833
+ kind: "BooleanValue",
834
+ value: !1
835
+ };
836
+ break;
837
+ }
838
+ return {
839
+ kind: "EnumValue",
840
+ value: lt()
841
+ };
842
+ }
843
+ function sn(e) {
844
+ if (y.charCodeAt(v) === 40) {
845
+ var t = [];
846
+ v++, C();
847
+ do {
848
+ var n = K();
849
+ if (y.charCodeAt(v++) !== 58)
850
+ throw L("Argument");
851
+ C(), t.push({
852
+ kind: "Argument",
853
+ name: n,
854
+ value: pe(e)
855
+ });
856
+ } while (y.charCodeAt(v) !== 41);
857
+ return v++, C(), t;
858
+ }
859
+ }
860
+ function _(e) {
861
+ if (y.charCodeAt(v) === 64) {
862
+ var t = [];
863
+ do
864
+ v++, t.push({
865
+ kind: "Directive",
866
+ name: K(),
867
+ arguments: sn(e)
868
+ });
869
+ while (y.charCodeAt(v) === 64);
870
+ return t;
871
+ }
872
+ }
873
+ function Ur() {
874
+ for (var e = 0; y.charCodeAt(v) === 91; )
875
+ e++, v++, C();
876
+ var t = {
877
+ kind: "NamedType",
878
+ name: K()
879
+ };
880
+ do
881
+ if (y.charCodeAt(v) === 33 && (v++, C(), t = {
882
+ kind: "NonNullType",
883
+ type: t
884
+ }), e) {
885
+ if (y.charCodeAt(v++) !== 93)
886
+ throw L("NamedType");
887
+ C(), t = {
888
+ kind: "ListType",
889
+ type: t
890
+ };
891
+ }
892
+ while (e--);
893
+ return t;
894
+ }
895
+ function Fe() {
896
+ if (y.charCodeAt(v++) !== 123)
897
+ throw L("SelectionSet");
898
+ return C(), De();
899
+ }
900
+ function De() {
901
+ var e = [];
902
+ do
903
+ if (y.charCodeAt(v) === 46) {
904
+ if (y.charCodeAt(++v) !== 46 || y.charCodeAt(++v) !== 46)
905
+ throw L("SelectionSet");
906
+ switch (v++, C(), y.charCodeAt(v)) {
907
+ case 64:
908
+ e.push({
909
+ kind: "InlineFragment",
910
+ typeCondition: void 0,
911
+ directives: _(!1),
912
+ selectionSet: Fe()
913
+ });
914
+ break;
915
+ case 111:
916
+ y.charCodeAt(v + 1) === 110 ? (v += 2, C(), e.push({
917
+ kind: "InlineFragment",
918
+ typeCondition: {
919
+ kind: "NamedType",
920
+ name: K()
921
+ },
922
+ directives: _(!1),
923
+ selectionSet: Fe()
924
+ })) : e.push({
925
+ kind: "FragmentSpread",
926
+ name: K(),
927
+ directives: _(!1)
928
+ });
929
+ break;
930
+ case 123:
931
+ v++, C(), e.push({
932
+ kind: "InlineFragment",
933
+ typeCondition: void 0,
934
+ directives: void 0,
935
+ selectionSet: De()
936
+ });
937
+ break;
938
+ default:
939
+ e.push({
940
+ kind: "FragmentSpread",
941
+ name: K(),
942
+ directives: _(!1)
943
+ });
944
+ }
945
+ } else {
946
+ var t = K(), n = void 0;
947
+ y.charCodeAt(v) === 58 && (v++, C(), n = t, t = K());
948
+ var r = sn(!1), i = _(!1), a = void 0;
949
+ y.charCodeAt(v) === 123 && (v++, C(), a = De()), e.push({
950
+ kind: "Field",
951
+ alias: n,
952
+ name: t,
953
+ arguments: r,
954
+ directives: i,
955
+ selectionSet: a
956
+ });
957
+ }
958
+ while (y.charCodeAt(v) !== 125);
959
+ return v++, C(), {
960
+ kind: "SelectionSet",
961
+ selections: e
962
+ };
963
+ }
964
+ function Kr() {
965
+ if (C(), y.charCodeAt(v) === 40) {
966
+ var e = [];
967
+ v++, C();
968
+ do {
969
+ var t = void 0;
970
+ if (y.charCodeAt(v) === 34 && (t = pe(!0)), y.charCodeAt(v++) !== 36)
971
+ throw L("Variable");
972
+ var n = K();
973
+ if (y.charCodeAt(v++) !== 58)
974
+ throw L("VariableDefinition");
975
+ C();
976
+ var r = Ur(), i = void 0;
977
+ y.charCodeAt(v) === 61 && (v++, C(), i = pe(!0)), C();
978
+ var a = {
979
+ kind: "VariableDefinition",
980
+ variable: {
981
+ kind: "Variable",
982
+ name: n
983
+ },
984
+ type: r,
985
+ defaultValue: i,
986
+ directives: _(!0)
987
+ };
988
+ t && (a.description = t), e.push(a);
989
+ } while (y.charCodeAt(v) !== 41);
990
+ return v++, C(), e;
991
+ }
992
+ }
993
+ function zr(e) {
994
+ var t = K();
995
+ if (y.charCodeAt(v++) !== 111 || y.charCodeAt(v++) !== 110)
996
+ throw L("FragmentDefinition");
997
+ C();
998
+ var n = {
999
+ kind: "FragmentDefinition",
1000
+ name: t,
1001
+ typeCondition: {
1002
+ kind: "NamedType",
1003
+ name: K()
1004
+ },
1005
+ directives: _(!1),
1006
+ selectionSet: Fe()
1007
+ };
1008
+ return e && (n.description = e), n;
1009
+ }
1010
+ function Nt() {
1011
+ var e = [];
1012
+ do {
1013
+ var t = void 0;
1014
+ if (y.charCodeAt(v) === 34 && (t = pe(!0)), y.charCodeAt(v) === 123) {
1015
+ if (t)
1016
+ throw L("Document");
1017
+ v++, C(), e.push({
1018
+ kind: "OperationDefinition",
1019
+ operation: "query",
1020
+ name: void 0,
1021
+ variableDefinitions: void 0,
1022
+ directives: void 0,
1023
+ selectionSet: De()
1024
+ });
1025
+ } else {
1026
+ var n = lt();
1027
+ switch (n) {
1028
+ case "fragment":
1029
+ e.push(zr(t));
1030
+ break;
1031
+ case "query":
1032
+ case "mutation":
1033
+ case "subscription":
1034
+ var r, i = void 0;
1035
+ (r = y.charCodeAt(v)) !== 40 && r !== 64 && r !== 123 && (i = K());
1036
+ var a = {
1037
+ kind: "OperationDefinition",
1038
+ operation: n,
1039
+ name: i,
1040
+ variableDefinitions: Kr(),
1041
+ directives: _(!1),
1042
+ selectionSet: Fe()
1043
+ };
1044
+ t && (a.description = t), e.push(a);
1045
+ break;
1046
+ default:
1047
+ throw L("Document");
1048
+ }
1049
+ }
1050
+ } while (v < y.length);
1051
+ return e;
1052
+ }
1053
+ function Vr(e, t) {
1054
+ return y = e.body ? e.body : e, v = 0, C(), t && t.noLocation ? {
1055
+ kind: "Document",
1056
+ definitions: Nt()
1057
+ } : {
1058
+ kind: "Document",
1059
+ definitions: Nt(),
1060
+ loc: {
1061
+ start: 0,
1062
+ end: y.length,
1063
+ startToken: void 0,
1064
+ endToken: void 0,
1065
+ source: {
1066
+ body: y,
1067
+ name: "graphql.web",
1068
+ locationOffset: {
1069
+ line: 1,
1070
+ column: 1
1071
+ }
1072
+ }
1073
+ }
1074
+ };
1075
+ }
1076
+ function U(e, t, n) {
1077
+ for (var r = "", i = 0; i < e.length; i++)
1078
+ i && (r += t), r += n(e[i]);
1079
+ return r;
1080
+ }
1081
+ function Gr(e) {
1082
+ return JSON.stringify(e);
1083
+ }
1084
+ function Wr(e) {
1085
+ return `"""
1086
+ ` + e.replace(/"""/g, '\\"""') + `
1087
+ """`;
1088
+ }
1089
+ var Q = `
1090
+ `, D = {
1091
+ OperationDefinition(e) {
1092
+ var t = "";
1093
+ e.description && (t += D.StringValue(e.description) + `
1094
+ `), t += e.operation, e.name && (t += " " + e.name.value), e.variableDefinitions && e.variableDefinitions.length && (e.name || (t += " "), t += "(" + U(e.variableDefinitions, ", ", D.VariableDefinition) + ")"), e.directives && e.directives.length && (t += " " + U(e.directives, " ", D.Directive));
1095
+ var n = D.SelectionSet(e.selectionSet);
1096
+ return t !== "query" ? t + " " + n : n;
1097
+ },
1098
+ VariableDefinition(e) {
1099
+ var t = "";
1100
+ return e.description && (t += D.StringValue(e.description) + " "), t += D.Variable(e.variable) + ": " + X(e.type), e.defaultValue && (t += " = " + X(e.defaultValue)), e.directives && e.directives.length && (t += " " + U(e.directives, " ", D.Directive)), t;
1101
+ },
1102
+ Field(e) {
1103
+ var t = e.alias ? e.alias.value + ": " + e.name.value : e.name.value;
1104
+ if (e.arguments && e.arguments.length) {
1105
+ var n = U(e.arguments, ", ", D.Argument);
1106
+ t.length + n.length + 2 > 80 ? t += "(" + (Q += " ") + U(e.arguments, Q, D.Argument) + (Q = Q.slice(0, -2)) + ")" : t += "(" + n + ")";
1107
+ }
1108
+ return e.directives && e.directives.length && (t += " " + U(e.directives, " ", D.Directive)), e.selectionSet && e.selectionSet.selections.length && (t += " " + D.SelectionSet(e.selectionSet)), t;
1109
+ },
1110
+ StringValue(e) {
1111
+ return e.block ? Wr(e.value).replace(/\n/g, Q) : Gr(e.value);
1112
+ },
1113
+ BooleanValue: (e) => "" + e.value,
1114
+ NullValue: (e) => "null",
1115
+ IntValue: (e) => e.value,
1116
+ FloatValue: (e) => e.value,
1117
+ EnumValue: (e) => e.value,
1118
+ Name: (e) => e.value,
1119
+ Variable: (e) => "$" + e.name.value,
1120
+ ListValue: (e) => "[" + U(e.values, ", ", X) + "]",
1121
+ ObjectValue: (e) => "{" + U(e.fields, ", ", D.ObjectField) + "}",
1122
+ ObjectField: (e) => e.name.value + ": " + X(e.value),
1123
+ Document(e) {
1124
+ return !e.definitions || !e.definitions.length ? "" : U(e.definitions, `
1125
+
1126
+ `, X);
1127
+ },
1128
+ SelectionSet: (e) => "{" + (Q += " ") + U(e.selections, Q, X) + (Q = Q.slice(0, -2)) + "}",
1129
+ Argument: (e) => e.name.value + ": " + X(e.value),
1130
+ FragmentSpread(e) {
1131
+ var t = "..." + e.name.value;
1132
+ return e.directives && e.directives.length && (t += " " + U(e.directives, " ", D.Directive)), t;
1133
+ },
1134
+ InlineFragment(e) {
1135
+ var t = "...";
1136
+ return e.typeCondition && (t += " on " + e.typeCondition.name.value), e.directives && e.directives.length && (t += " " + U(e.directives, " ", D.Directive)), t += " " + D.SelectionSet(e.selectionSet);
1137
+ },
1138
+ FragmentDefinition(e) {
1139
+ var t = "";
1140
+ return e.description && (t += D.StringValue(e.description) + `
1141
+ `), t += "fragment " + e.name.value, t += " on " + e.typeCondition.name.value, e.directives && e.directives.length && (t += " " + U(e.directives, " ", D.Directive)), t + " " + D.SelectionSet(e.selectionSet);
1142
+ },
1143
+ Directive(e) {
1144
+ var t = "@" + e.name.value;
1145
+ return e.arguments && e.arguments.length && (t += "(" + U(e.arguments, ", ", D.Argument) + ")"), t;
1146
+ },
1147
+ NamedType: (e) => e.name.value,
1148
+ ListType: (e) => "[" + X(e.type) + "]",
1149
+ NonNullType: (e) => X(e.type) + "!"
1150
+ }, X = (e) => D[e.kind](e);
1151
+ function Br(e) {
1152
+ return Q = `
1153
+ `, D[e.kind] ? D[e.kind](e) : "";
1154
+ }
1155
+ var on = () => {
1156
+ }, V = on;
1157
+ function B(e) {
1158
+ return {
1159
+ tag: 0,
1160
+ 0: e
1161
+ };
1162
+ }
1163
+ function Ee(e) {
1164
+ return {
1165
+ tag: 1,
1166
+ 0: e
1167
+ };
1168
+ }
1169
+ var At = () => typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator", qr = (e) => e;
1170
+ function z(e) {
1171
+ return (t) => (n) => {
1172
+ var r = V;
1173
+ t((i) => {
1174
+ i === 0 ? n(0) : i.tag === 0 ? (r = i[0], n(i)) : e(i[0]) ? n(i) : r(0);
1175
+ });
1176
+ };
1177
+ }
1178
+ function Re(e) {
1179
+ return (t) => (n) => t((r) => {
1180
+ r === 0 || r.tag === 0 ? n(r) : n(Ee(e(r[0])));
1181
+ });
1182
+ }
1183
+ function ln(e) {
1184
+ return (t) => (n) => {
1185
+ var r = [], i = V, a = !1, s = !1;
1186
+ t((l) => {
1187
+ s || (l === 0 ? (s = !0, r.length || n(0)) : l.tag === 0 ? i = l[0] : (a = !1, function(o) {
1188
+ var u = V;
1189
+ o((g) => {
1190
+ if (g === 0) {
1191
+ if (r.length) {
1192
+ var m = r.indexOf(u);
1193
+ m > -1 && (r = r.slice()).splice(m, 1), r.length || (s ? n(0) : a || (a = !0, i(0)));
1194
+ }
1195
+ } else g.tag === 0 ? (r.push(u = g[0]), u(0)) : r.length && (n(g), u(0));
1196
+ });
1197
+ }(e(l[0])), a || (a = !0, i(0))));
1198
+ }), n(B((l) => {
1199
+ if (l === 1) {
1200
+ s || (s = !0, i(1));
1201
+ for (var d = 0, o = r, u = r.length; d < u; d++)
1202
+ o[d](1);
1203
+ r.length = 0;
1204
+ } else {
1205
+ !s && !a ? (a = !0, i(0)) : a = !1;
1206
+ for (var g = 0, m = r, h = r.length; g < h; g++)
1207
+ m[g](0);
1208
+ }
1209
+ }));
1210
+ };
1211
+ }
1212
+ function Yr(e) {
1213
+ return ln(qr)(e);
1214
+ }
1215
+ function ke(e) {
1216
+ return Yr(Jr(e));
1217
+ }
1218
+ function cn(e) {
1219
+ return (t) => (n) => {
1220
+ var r = !1;
1221
+ t((i) => {
1222
+ if (!r) if (i === 0)
1223
+ r = !0, n(0), e();
1224
+ else if (i.tag === 0) {
1225
+ var a = i[0];
1226
+ n(B((s) => {
1227
+ s === 1 ? (r = !0, a(1), e()) : a(s);
1228
+ }));
1229
+ } else
1230
+ n(i);
1231
+ });
1232
+ };
1233
+ }
1234
+ function Ge(e) {
1235
+ return (t) => (n) => {
1236
+ var r = !1;
1237
+ t((i) => {
1238
+ if (!r) if (i === 0)
1239
+ r = !0, n(0);
1240
+ else if (i.tag === 0) {
1241
+ var a = i[0];
1242
+ n(B((s) => {
1243
+ s === 1 && (r = !0), a(s);
1244
+ }));
1245
+ } else
1246
+ e(i[0]), n(i);
1247
+ });
1248
+ };
1249
+ }
1250
+ function wt(e) {
1251
+ return (t) => (n) => t((r) => {
1252
+ r === 0 ? n(0) : r.tag === 0 ? (n(r), e()) : n(r);
1253
+ });
1254
+ }
1255
+ function Ne(e) {
1256
+ var t = [], n = V, r = !1;
1257
+ return (i) => {
1258
+ t.push(i), t.length === 1 && e((a) => {
1259
+ if (a === 0) {
1260
+ for (var s = 0, l = t, d = t.length; s < d; s++)
1261
+ l[s](0);
1262
+ t.length = 0;
1263
+ } else if (a.tag === 0)
1264
+ n = a[0];
1265
+ else {
1266
+ r = !1;
1267
+ for (var o = 0, u = t, g = t.length; o < g; o++)
1268
+ u[o](a);
1269
+ }
1270
+ }), i(B((a) => {
1271
+ if (a === 1) {
1272
+ var s = t.indexOf(i);
1273
+ s > -1 && (t = t.slice()).splice(s, 1), t.length || n(1);
1274
+ } else r || (r = !0, n(0));
1275
+ }));
1276
+ };
1277
+ }
1278
+ function St(e) {
1279
+ return (t) => (n) => {
1280
+ var r = V, i = V, a = !1, s = !1, l = !1, d = !1;
1281
+ t((o) => {
1282
+ d || (o === 0 ? (d = !0, l || n(0)) : o.tag === 0 ? r = o[0] : (l && (i(1), i = V), a ? a = !1 : (a = !0, r(0)), function(g) {
1283
+ l = !0, g((m) => {
1284
+ l && (m === 0 ? (l = !1, d ? n(0) : a || (a = !0, r(0))) : m.tag === 0 ? (s = !1, (i = m[0])(0)) : (n(m), s ? s = !1 : i(0)));
1285
+ });
1286
+ }(e(o[0]))));
1287
+ }), n(B((o) => {
1288
+ o === 1 ? (d || (d = !0, r(1)), l && (l = !1, i(1))) : (!d && !a && (a = !0, r(0)), l && !s && (s = !0, i(0)));
1289
+ }));
1290
+ };
1291
+ }
1292
+ function dn(e) {
1293
+ return (t) => (n) => {
1294
+ var r = V, i = !1, a = 0;
1295
+ t((s) => {
1296
+ i || (s === 0 ? (i = !0, n(0)) : s.tag === 0 ? r = s[0] : a++ < e ? (n(s), !i && a >= e && (i = !0, n(0), r(1))) : n(s));
1297
+ }), n(B((s) => {
1298
+ s === 1 && !i ? (i = !0, r(1)) : s === 0 && !i && a < e && r(0);
1299
+ }));
1300
+ };
1301
+ }
1302
+ function un(e) {
1303
+ return (t) => (n) => {
1304
+ var r = V, i = V, a = !1;
1305
+ t((s) => {
1306
+ a || (s === 0 ? (a = !0, i(1), n(0)) : s.tag === 0 ? (r = s[0], e((l) => {
1307
+ l === 0 || (l.tag === 0 ? (i = l[0])(0) : (a = !0, i(1), r(1), n(0)));
1308
+ })) : n(s));
1309
+ }), n(B((s) => {
1310
+ s === 1 && !a ? (a = !0, r(1), i(1)) : a || r(0);
1311
+ }));
1312
+ };
1313
+ }
1314
+ function Qr(e, t) {
1315
+ return (n) => (r) => {
1316
+ var i = V, a = !1;
1317
+ n((s) => {
1318
+ a || (s === 0 ? (a = !0, r(0)) : s.tag === 0 ? (i = s[0], r(s)) : e(s[0]) ? r(s) : (a = !0, r(s), r(0), i(1)));
1319
+ });
1320
+ };
1321
+ }
1322
+ function Xr(e) {
1323
+ return (t) => e()(t);
1324
+ }
1325
+ function pn(e) {
1326
+ return (t) => {
1327
+ var n = e[At()] && e[At()]() || e, r = !1, i = !1, a = !1, s;
1328
+ t(B(async (l) => {
1329
+ if (l === 1)
1330
+ r = !0, n.return && n.return();
1331
+ else if (i)
1332
+ a = !0;
1333
+ else {
1334
+ for (a = i = !0; a && !r; )
1335
+ if ((s = await n.next()).done)
1336
+ r = !0, n.return && await n.return(), t(0);
1337
+ else
1338
+ try {
1339
+ a = !1, t(Ee(s.value));
1340
+ } catch (d) {
1341
+ if (n.throw)
1342
+ (r = !!(await n.throw(d)).done) && t(0);
1343
+ else
1344
+ throw d;
1345
+ }
1346
+ i = !1;
1347
+ }
1348
+ }));
1349
+ };
1350
+ }
1351
+ function Hr(e) {
1352
+ return e[Symbol.asyncIterator] ? pn(e) : (t) => {
1353
+ var n = e[Symbol.iterator](), r = !1, i = !1, a = !1, s;
1354
+ t(B((l) => {
1355
+ if (l === 1)
1356
+ r = !0, n.return && n.return();
1357
+ else if (i)
1358
+ a = !0;
1359
+ else {
1360
+ for (a = i = !0; a && !r; )
1361
+ if ((s = n.next()).done)
1362
+ r = !0, n.return && n.return(), t(0);
1363
+ else
1364
+ try {
1365
+ a = !1, t(Ee(s.value));
1366
+ } catch (d) {
1367
+ if (n.throw)
1368
+ (r = !!n.throw(d).done) && t(0);
1369
+ else
1370
+ throw d;
1371
+ }
1372
+ i = !1;
1373
+ }
1374
+ }));
1375
+ };
1376
+ }
1377
+ var Jr = Hr;
1378
+ function Qe(e) {
1379
+ return (t) => {
1380
+ var n = !1;
1381
+ t(B((r) => {
1382
+ r === 1 ? n = !0 : n || (n = !0, t(Ee(e)), t(0));
1383
+ }));
1384
+ };
1385
+ }
1386
+ function Zr(e) {
1387
+ return (t) => {
1388
+ var n = !1, r = e({
1389
+ next(i) {
1390
+ n || t(Ee(i));
1391
+ },
1392
+ complete() {
1393
+ n || (n = !0, t(0));
1394
+ }
1395
+ });
1396
+ t(B((i) => {
1397
+ i === 1 && !n && (n = !0, r());
1398
+ }));
1399
+ };
1400
+ }
1401
+ function Et() {
1402
+ var e, t;
1403
+ return {
1404
+ source: Ne(Zr((n) => (e = n.next, t = n.complete, on))),
1405
+ next(n) {
1406
+ e && e(n);
1407
+ },
1408
+ complete() {
1409
+ t && t();
1410
+ }
1411
+ };
1412
+ }
1413
+ function je(e) {
1414
+ return (t) => {
1415
+ var n = V, r = !1;
1416
+ return t((i) => {
1417
+ i === 0 ? r = !0 : i.tag === 0 ? (n = i[0])(0) : r || (e(i[0]), n(0));
1418
+ }), {
1419
+ unsubscribe() {
1420
+ r || (r = !0, n(1));
1421
+ }
1422
+ };
1423
+ };
1424
+ }
1425
+ function _r(e) {
1426
+ je((t) => {
1427
+ })(e);
1428
+ }
1429
+ function $r(e) {
1430
+ return new Promise((t) => {
1431
+ var n = V, r;
1432
+ e((i) => {
1433
+ i === 0 ? Promise.resolve(r).then(t) : i.tag === 0 ? (n = i[0])(0) : (r = i[0], n(0));
1434
+ });
1435
+ });
1436
+ }
1437
+ var ei = (e) => e && typeof e.message == "string" && (e.extensions || e.name === "GraphQLError") ? e : typeof e == "object" && typeof e.message == "string" ? new _e(e.message, e.nodes, e.source, e.positions, e.path, e, e.extensions || {}) : new _e(e);
1438
+ class ct extends Error {
1439
+ constructor(t) {
1440
+ var n = (t.graphQLErrors || []).map(ei), r = ((i, a) => {
1441
+ var s = "";
1442
+ if (i)
1443
+ return `[Network] ${i.message}`;
1444
+ if (a)
1445
+ for (var l = 0, d = a.length; l < d; l++)
1446
+ s && (s += `
1447
+ `), s += `[GraphQL] ${a[l].message}`;
1448
+ return s;
1449
+ })(t.networkError, n);
1450
+ super(r), this.name = "CombinedError", this.message = r, this.graphQLErrors = n, this.networkError = t.networkError, this.response = t.response;
1451
+ }
1452
+ toString() {
1453
+ return this.message;
1454
+ }
1455
+ }
1456
+ var Te = (e, t) => {
1457
+ for (var n = 0 | (t || 5381), r = 0, i = 0 | e.length; r < i; r++)
1458
+ n = (n << 5) + n + e.charCodeAt(r);
1459
+ return n;
1460
+ }, ae = /* @__PURE__ */ new Set(), Ct = /* @__PURE__ */ new WeakMap(), ce = (e, t) => {
1461
+ if (e === null || ae.has(e))
1462
+ return "null";
1463
+ if (typeof e != "object")
1464
+ return JSON.stringify(e) || "";
1465
+ if (e.toJSON)
1466
+ return ce(e.toJSON(), t);
1467
+ if (Array.isArray(e)) {
1468
+ for (var n = "[", r = 0, i = e.length; r < i; r++)
1469
+ n.length > 1 && (n += ","), n += ce(e[r], t) || "null";
1470
+ return n += "]";
1471
+ } else if (!t && (Pe !== fe && e instanceof Pe || Ue !== fe && e instanceof Ue))
1472
+ return "null";
1473
+ var a = Object.keys(e).sort();
1474
+ if (!a.length && e.constructor && Object.getPrototypeOf(e).constructor !== Object.prototype.constructor) {
1475
+ var s = Ct.get(e) || Math.random().toString(36).slice(2);
1476
+ return Ct.set(e, s), ce({
1477
+ __key: s
1478
+ }, t);
1479
+ }
1480
+ ae.add(e);
1481
+ for (var l = "{", d = 0, o = a.length; d < o; d++) {
1482
+ var u = ce(e[a[d]], t);
1483
+ u && (l.length > 1 && (l += ","), l += ce(a[d], t) + ":" + u);
1484
+ }
1485
+ return ae.delete(e), l += "}";
1486
+ }, $e = (e, t, n) => {
1487
+ if (!(n == null || typeof n != "object" || n.toJSON || ae.has(n))) if (Array.isArray(n))
1488
+ for (var r = 0, i = n.length; r < i; r++)
1489
+ $e(e, `${t}.${r}`, n[r]);
1490
+ else if (n instanceof Pe || n instanceof Ue)
1491
+ e.set(t, n);
1492
+ else {
1493
+ ae.add(n);
1494
+ for (var a in n)
1495
+ $e(e, `${t}.${a}`, n[a]);
1496
+ }
1497
+ }, Le = (e, t) => (ae.clear(), ce(e, t || !1));
1498
+ class fe {
1499
+ }
1500
+ var Pe = typeof File < "u" ? File : fe, Ue = typeof Blob < "u" ? Blob : fe, ti = /("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g, ni = /(?:#[^\n\r]+)?(?:[\r\n]+|$)/g, ri = (e, t) => t % 2 == 0 ? e.replace(ni, `
1501
+ `) : e, Ot = (e) => e.split(ti).map(ri).join("").trim(), It = /* @__PURE__ */ new Map(), Me = /* @__PURE__ */ new Map(), dt = (e) => {
1502
+ var t;
1503
+ return typeof e == "string" ? t = Ot(e) : e.loc && Me.get(e.__key) === e ? t = e.loc.source.body : (t = It.get(e) || Ot(Br(e)), It.set(e, t)), typeof e != "string" && !e.loc && (e.loc = {
1504
+ start: 0,
1505
+ end: t.length,
1506
+ source: {
1507
+ body: t,
1508
+ name: "gql",
1509
+ locationOffset: {
1510
+ line: 1,
1511
+ column: 1
1512
+ }
1513
+ }
1514
+ }), t;
1515
+ }, Rt = (e) => {
1516
+ var t;
1517
+ if (e.documentId)
1518
+ t = Te(e.documentId);
1519
+ else if (t = Te(dt(e)), e.definitions) {
1520
+ var n = gn(e);
1521
+ n && (t = Te(`
1522
+ # ${n}`, t));
1523
+ }
1524
+ return t;
1525
+ }, fn = (e) => {
1526
+ var t, n;
1527
+ return typeof e == "string" ? (t = Rt(e), n = Me.get(t) || Vr(e, {
1528
+ noLocation: !0
1529
+ })) : (t = e.__key || Rt(e), n = Me.get(t) || e), n.loc || dt(n), n.__key = t, Me.set(t, n), n;
1530
+ }, Xe = (e, t, n) => {
1531
+ var r = t || {}, i = fn(e), a = Le(r, !0), s = i.__key;
1532
+ return a !== "{}" && (s = Te(a, s)), {
1533
+ key: s,
1534
+ query: i,
1535
+ variables: r,
1536
+ extensions: n
1537
+ };
1538
+ }, gn = (e) => {
1539
+ for (var t = 0, n = e.definitions.length; t < n; t++) {
1540
+ var r = e.definitions[t];
1541
+ if (r.kind === ue.OPERATION_DEFINITION)
1542
+ return r.name ? r.name.value : void 0;
1543
+ }
1544
+ }, ii = (e) => {
1545
+ for (var t = 0, n = e.definitions.length; t < n; t++) {
1546
+ var r = e.definitions[t];
1547
+ if (r.kind === ue.OPERATION_DEFINITION)
1548
+ return r.operation;
1549
+ }
1550
+ }, et = (e, t, n) => {
1551
+ if (!("data" in t || "errors" in t && Array.isArray(t.errors)))
1552
+ throw new Error("No Content");
1553
+ var r = e.kind === "subscription";
1554
+ return {
1555
+ operation: e,
1556
+ data: t.data,
1557
+ error: Array.isArray(t.errors) ? new ct({
1558
+ graphQLErrors: t.errors,
1559
+ response: n
1560
+ }) : void 0,
1561
+ extensions: t.extensions ? {
1562
+ ...t.extensions
1563
+ } : void 0,
1564
+ hasNext: t.hasNext == null ? r : t.hasNext,
1565
+ stale: !1
1566
+ };
1567
+ }, Ke = (e, t) => {
1568
+ if (typeof e == "object" && e != null) {
1569
+ if (Array.isArray(e)) {
1570
+ e = [...e];
1571
+ for (var n = 0, r = t.length; n < r; n++)
1572
+ e[n] = Ke(e[n], t[n]);
1573
+ return e;
1574
+ }
1575
+ if (!e.constructor || e.constructor === Object) {
1576
+ e = {
1577
+ ...e
1578
+ };
1579
+ for (var i in t)
1580
+ e[i] = Ke(e[i], t[i]);
1581
+ return e;
1582
+ }
1583
+ }
1584
+ return t;
1585
+ }, ai = (e, t, n, r) => {
1586
+ var i = e.error ? e.error.graphQLErrors : [], a = !!e.extensions || !!(t.payload || t).extensions, s = {
1587
+ ...e.extensions,
1588
+ ...(t.payload || t).extensions
1589
+ }, l = t.incremental;
1590
+ "path" in t && (l = [t]);
1591
+ var d = {
1592
+ data: e.data
1593
+ };
1594
+ if (l)
1595
+ for (var o = function() {
1596
+ var m = l[u];
1597
+ Array.isArray(m.errors) && i.push(...m.errors), m.extensions && (Object.assign(s, m.extensions), a = !0);
1598
+ var h = "data", f = d, N = [];
1599
+ if (m.path)
1600
+ N = m.path;
1601
+ else if (r) {
1602
+ var E = r.find((x) => x.id === m.id);
1603
+ m.subPath ? N = [...E.path, ...m.subPath] : N = E.path;
1604
+ }
1605
+ for (var O = 0, A = N.length; O < A; h = N[O++])
1606
+ f = f[h] = Array.isArray(f[h]) ? [...f[h]] : {
1607
+ ...f[h]
1608
+ };
1609
+ if (m.items)
1610
+ for (var R = +h >= 0 ? h : 0, p = 0, b = m.items.length; p < b; p++)
1611
+ f[R + p] = Ke(f[R + p], m.items[p]);
1612
+ else m.data !== void 0 && (f[h] = Ke(f[h], m.data));
1613
+ }, u = 0, g = l.length; u < g; u++)
1614
+ o();
1615
+ else
1616
+ d.data = (t.payload || t).data || e.data, i = t.errors || t.payload && t.payload.errors || i;
1617
+ return {
1618
+ operation: e.operation,
1619
+ data: d.data,
1620
+ error: i.length ? new ct({
1621
+ graphQLErrors: i,
1622
+ response: n
1623
+ }) : void 0,
1624
+ extensions: a ? s : void 0,
1625
+ hasNext: t.hasNext != null ? t.hasNext : e.hasNext,
1626
+ stale: !1
1627
+ };
1628
+ }, si = (e, t, n) => ({
1629
+ operation: e,
1630
+ data: void 0,
1631
+ error: new ct({
1632
+ networkError: t,
1633
+ response: n
1634
+ }),
1635
+ extensions: void 0,
1636
+ hasNext: !1,
1637
+ stale: !1
1638
+ });
1639
+ function oi(e) {
1640
+ var t = {
1641
+ query: void 0,
1642
+ documentId: void 0,
1643
+ operationName: gn(e.query),
1644
+ variables: e.variables || void 0,
1645
+ extensions: e.extensions
1646
+ };
1647
+ return "documentId" in e.query && e.query.documentId && (!e.query.definitions || !e.query.definitions.length) ? t.documentId = e.query.documentId : (!e.extensions || !e.extensions.persistedQuery || e.extensions.persistedQuery.miss) && (t.query = dt(e.query)), t;
1648
+ }
1649
+ var li = (e, t) => {
1650
+ var n = e.kind === "query" && e.context.preferGetMethod;
1651
+ if (!n || !t)
1652
+ return e.context.url;
1653
+ var r = ci(e.context.url);
1654
+ for (var i in t) {
1655
+ var a = t[i];
1656
+ a && r[1].set(i, typeof a == "object" ? Le(a) : a);
1657
+ }
1658
+ var s = r.join("?");
1659
+ return s.length > 2047 && n !== "force" ? (e.context.preferGetMethod = !1, e.context.url) : s;
1660
+ }, ci = (e) => {
1661
+ var t = e.indexOf("?");
1662
+ return t > -1 ? [e.slice(0, t), new URLSearchParams(e.slice(t + 1))] : [e, new URLSearchParams()];
1663
+ }, di = (e, t) => {
1664
+ if (t && !(e.kind === "query" && e.context.preferGetMethod)) {
1665
+ var n = Le(t), r = ((l) => {
1666
+ var d = /* @__PURE__ */ new Map();
1667
+ return (Pe !== fe || Ue !== fe) && (ae.clear(), $e(d, "variables", l)), d;
1668
+ })(t.variables);
1669
+ if (r.size) {
1670
+ var i = new FormData();
1671
+ i.append("operations", n), i.append("map", Le({
1672
+ ...[...r.keys()].map((l) => [l])
1673
+ }));
1674
+ var a = 0;
1675
+ for (var s of r.values())
1676
+ i.append("" + a++, s);
1677
+ return i;
1678
+ }
1679
+ return n;
1680
+ }
1681
+ }, ui = (e, t) => {
1682
+ var n = {
1683
+ accept: e.kind === "subscription" ? "text/event-stream, multipart/mixed" : "application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed"
1684
+ }, r = (typeof e.context.fetchOptions == "function" ? e.context.fetchOptions() : e.context.fetchOptions) || {};
1685
+ if (r.headers)
1686
+ if (((s) => "has" in s && !Object.keys(s).length)(r.headers))
1687
+ r.headers.forEach((s, l) => {
1688
+ n[l] = s;
1689
+ });
1690
+ else if (Array.isArray(r.headers))
1691
+ r.headers.forEach((s, l) => {
1692
+ Array.isArray(s) ? n[s[0]] ? n[s[0]] = `${n[s[0]]},${s[1]}` : n[s[0]] = s[1] : n[l] = s;
1693
+ });
1694
+ else
1695
+ for (var i in r.headers)
1696
+ n[i.toLowerCase()] = r.headers[i];
1697
+ var a = di(e, t);
1698
+ return typeof a == "string" && !n["content-type"] && (n["content-type"] = "application/json"), {
1699
+ ...r,
1700
+ method: a ? "POST" : "GET",
1701
+ body: a,
1702
+ headers: n
1703
+ };
1704
+ }, pi = /boundary="?([^=";]+)"?/i, fi = /data: ?([^\n]+)/;
1705
+ async function* Tt(e) {
1706
+ if (e.body[Symbol.asyncIterator])
1707
+ for await (var t of e.body)
1708
+ yield t;
1709
+ else {
1710
+ var n = e.body.getReader(), r;
1711
+ try {
1712
+ for (; !(r = await n.read()).done; )
1713
+ yield r.value;
1714
+ } finally {
1715
+ n.cancel();
1716
+ }
1717
+ }
1718
+ }
1719
+ async function* Mt(e, t) {
1720
+ var n = typeof TextDecoder < "u" ? new TextDecoder() : null, r = "", i;
1721
+ for await (var a of e)
1722
+ for (r += a.constructor.name === "Buffer" ? a.toString() : n.decode(a, {
1723
+ stream: !0
1724
+ }); (i = r.indexOf(t)) > -1; )
1725
+ yield r.slice(0, i), r = r.slice(i + t.length);
1726
+ }
1727
+ async function* gi(e, t, n) {
1728
+ var r = !0, i = null, a;
1729
+ try {
1730
+ yield await Promise.resolve();
1731
+ var s = (a = await (e.context.fetch || fetch)(t, n)).headers.get("Content-Type") || "", l;
1732
+ /multipart\/mixed/i.test(s) ? l = async function* (g, m) {
1733
+ var h = g.match(pi), f = "--" + (h ? h[1] : "-"), N = !0, E;
1734
+ for await (var O of Mt(Tt(m), `\r
1735
+ ` + f)) {
1736
+ if (N) {
1737
+ N = !1;
1738
+ var A = O.indexOf(f);
1739
+ if (A > -1)
1740
+ O = O.slice(A + f.length);
1741
+ else
1742
+ continue;
1743
+ }
1744
+ try {
1745
+ yield E = JSON.parse(O.slice(O.indexOf(`\r
1746
+ \r
1747
+ `) + 4));
1748
+ } catch (R) {
1749
+ if (!E)
1750
+ throw R;
1751
+ }
1752
+ if (E && E.hasNext === !1)
1753
+ break;
1754
+ }
1755
+ E && E.hasNext !== !1 && (yield {
1756
+ hasNext: !1
1757
+ });
1758
+ }(s, a) : /text\/event-stream/i.test(s) ? l = async function* (g) {
1759
+ var m;
1760
+ for await (var h of Mt(Tt(g), `
1761
+
1762
+ `)) {
1763
+ var f = h.match(fi);
1764
+ if (f) {
1765
+ var N = f[1];
1766
+ try {
1767
+ yield m = JSON.parse(N);
1768
+ } catch (E) {
1769
+ if (!m)
1770
+ throw E;
1771
+ }
1772
+ if (m && m.hasNext === !1)
1773
+ break;
1774
+ }
1775
+ }
1776
+ m && m.hasNext !== !1 && (yield {
1777
+ hasNext: !1
1778
+ });
1779
+ }(a) : /text\//i.test(s) ? l = async function* (g) {
1780
+ var m = await g.text();
1781
+ try {
1782
+ var h = JSON.parse(m);
1783
+ process.env.NODE_ENV !== "production" && console.warn('Found response with content-type "text/plain" but it had a valid "application/json" response.'), yield h;
1784
+ } catch {
1785
+ throw new Error(m);
1786
+ }
1787
+ }(a) : l = async function* (g) {
1788
+ yield JSON.parse(await g.text());
1789
+ }(a);
1790
+ var d;
1791
+ for await (var o of l)
1792
+ o.pending && !i ? d = o.pending : o.pending && (d = [...d, ...o.pending]), i = i ? ai(i, o, a, d) : et(e, o, a), r = !1, yield i, r = !0;
1793
+ i || (yield i = et(e, {}, a));
1794
+ } catch (u) {
1795
+ if (!r)
1796
+ throw u;
1797
+ yield si(e, a && (a.status < 200 || a.status >= 300) && a.statusText ? new Error(a.statusText) : u, a);
1798
+ }
1799
+ }
1800
+ function mi(e, t, n) {
1801
+ var r;
1802
+ return typeof AbortController < "u" && (n.signal = (r = new AbortController()).signal), cn(() => {
1803
+ r && r.abort();
1804
+ })(z((i) => !!i)(pn(gi(e, t, n))));
1805
+ }
1806
+ var tt = (e, t) => {
1807
+ if (Array.isArray(e))
1808
+ for (var n = 0, r = e.length; n < r; n++)
1809
+ tt(e[n], t);
1810
+ else if (typeof e == "object" && e !== null)
1811
+ for (var i in e)
1812
+ i === "__typename" && typeof e[i] == "string" ? t.add(e[i]) : tt(e[i], t);
1813
+ return t;
1814
+ }, nt = (e) => {
1815
+ if ("definitions" in e) {
1816
+ for (var t = [], n = 0, r = e.definitions.length; n < r; n++) {
1817
+ var i = nt(e.definitions[n]);
1818
+ t.push(i);
1819
+ }
1820
+ return {
1821
+ ...e,
1822
+ definitions: t
1823
+ };
1824
+ }
1825
+ if ("directives" in e && e.directives && e.directives.length) {
1826
+ for (var a = [], s = {}, l = 0, d = e.directives.length; l < d; l++) {
1827
+ var o = e.directives[l], u = o.name.value;
1828
+ u[0] !== "_" ? a.push(o) : u = u.slice(1), s[u] = o;
1829
+ }
1830
+ e = {
1831
+ ...e,
1832
+ directives: a,
1833
+ _directives: s
1834
+ };
1835
+ }
1836
+ if ("selectionSet" in e) {
1837
+ var g = [], m = e.kind === ue.OPERATION_DEFINITION;
1838
+ if (e.selectionSet) {
1839
+ for (var h = 0, f = e.selectionSet.selections.length; h < f; h++) {
1840
+ var N = e.selectionSet.selections[h];
1841
+ m = m || N.kind === ue.FIELD && N.name.value === "__typename" && !N.alias;
1842
+ var E = nt(N);
1843
+ g.push(E);
1844
+ }
1845
+ return m || g.push({
1846
+ kind: ue.FIELD,
1847
+ name: {
1848
+ kind: ue.NAME,
1849
+ value: "__typename"
1850
+ },
1851
+ _generated: !0
1852
+ }), {
1853
+ ...e,
1854
+ selectionSet: {
1855
+ ...e.selectionSet,
1856
+ selections: g
1857
+ }
1858
+ };
1859
+ }
1860
+ }
1861
+ return e;
1862
+ }, Ft = /* @__PURE__ */ new Map(), vi = (e) => {
1863
+ var t = fn(e), n = Ft.get(t.__key);
1864
+ return n || (Ft.set(t.__key, n = nt(t)), Object.defineProperty(n, "__key", {
1865
+ value: t.__key,
1866
+ enumerable: !1
1867
+ })), n;
1868
+ };
1869
+ function Dt(e) {
1870
+ var t = (n) => e(n);
1871
+ return t.toPromise = () => $r(dn(1)(z((n) => !n.stale && !n.hasNext)(t))), t.then = (n, r) => t.toPromise().then(n, r), t.subscribe = (n) => je(n)(t), t;
1872
+ }
1873
+ function Ae(e, t, n) {
1874
+ return {
1875
+ ...t,
1876
+ kind: e,
1877
+ context: t.context ? {
1878
+ ...t.context,
1879
+ ...n
1880
+ } : n || t.context
1881
+ };
1882
+ }
1883
+ var jt = (e, t) => Ae(e.kind, e, {
1884
+ meta: {
1885
+ ...e.context.meta,
1886
+ ...t
1887
+ }
1888
+ }), hi = () => {
1889
+ }, He = ({ kind: e }) => e !== "mutation" && e !== "query", xi = (e) => {
1890
+ var t = vi(e.query);
1891
+ if (t !== e.query) {
1892
+ var n = Ae(e.kind, e);
1893
+ return n.query = t, n;
1894
+ } else
1895
+ return e;
1896
+ }, yi = ({ forward: e, client: t, dispatchDebug: n }) => {
1897
+ var r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = (s) => s.kind === "query" && s.context.requestPolicy !== "network-only" && (s.context.requestPolicy === "cache-only" || r.has(s.key));
1898
+ return (s) => {
1899
+ var l = Re((o) => {
1900
+ var u = r.get(o.key);
1901
+ process.env.NODE_ENV !== "production" && n({
1902
+ operation: o,
1903
+ ...u ? {
1904
+ type: "cacheHit",
1905
+ message: "The result was successfully retrieved from the cache"
1906
+ } : {
1907
+ type: "cacheMiss",
1908
+ message: "The result could not be retrieved from the cache"
1909
+ },
1910
+ source: "cacheExchange"
1911
+ });
1912
+ var g = u || et(o, {
1913
+ data: null
1914
+ });
1915
+ return g = {
1916
+ ...g,
1917
+ operation: jt(o, {
1918
+ cacheOutcome: u ? "hit" : "miss"
1919
+ })
1920
+ }, o.context.requestPolicy === "cache-and-network" && (g.stale = !0, Lt(t, o)), g;
1921
+ })(z((o) => !He(o) && a(o))(s)), d = Ge((o) => {
1922
+ var { operation: u } = o;
1923
+ if (u) {
1924
+ var g = u.context.additionalTypenames || [];
1925
+ if (o.operation.kind !== "subscription" && (g = ((b) => [...tt(b, /* @__PURE__ */ new Set())])(o.data).concat(g)), o.operation.kind === "mutation" || o.operation.kind === "subscription") {
1926
+ var m = /* @__PURE__ */ new Set();
1927
+ process.env.NODE_ENV !== "production" && n({
1928
+ type: "cacheInvalidation",
1929
+ message: `The following typenames have been invalidated: ${g}`,
1930
+ operation: u,
1931
+ data: {
1932
+ typenames: g,
1933
+ response: o
1934
+ },
1935
+ source: "cacheExchange"
1936
+ });
1937
+ for (var h = 0; h < g.length; h++) {
1938
+ var f = g[h], N = i.get(f);
1939
+ N || i.set(f, N = /* @__PURE__ */ new Set());
1940
+ for (var E of N.values())
1941
+ m.add(E);
1942
+ N.clear();
1943
+ }
1944
+ for (var O of m.values())
1945
+ r.has(O) && (u = r.get(O).operation, r.delete(O), Lt(t, u));
1946
+ } else if (u.kind === "query" && o.data) {
1947
+ r.set(u.key, o);
1948
+ for (var A = 0; A < g.length; A++) {
1949
+ var R = g[A], p = i.get(R);
1950
+ p || i.set(R, p = /* @__PURE__ */ new Set()), p.add(u.key);
1951
+ }
1952
+ }
1953
+ }
1954
+ })(e(z((o) => o.kind !== "query" || o.context.requestPolicy !== "cache-only")(Re((o) => jt(o, {
1955
+ cacheOutcome: "miss"
1956
+ }))(ke([Re(xi)(z((o) => !He(o) && !a(o))(s)), z((o) => He(o))(s)])))));
1957
+ return ke([l, d]);
1958
+ };
1959
+ }, Lt = (e, t) => e.reexecuteOperation(Ae(t.kind, t, {
1960
+ requestPolicy: "network-only"
1961
+ })), bi = ({ forward: e, dispatchDebug: t }) => (n) => {
1962
+ var r = ln((a) => {
1963
+ var s = oi(a), l = li(a, s), d = ui(a, s);
1964
+ process.env.NODE_ENV !== "production" && t({
1965
+ type: "fetchRequest",
1966
+ message: "A fetch request is being executed.",
1967
+ operation: a,
1968
+ data: {
1969
+ url: l,
1970
+ fetchOptions: d
1971
+ },
1972
+ source: "fetchExchange"
1973
+ });
1974
+ var o = un(z((u) => u.kind === "teardown" && u.key === a.key)(n))(mi(a, l, d));
1975
+ return process.env.NODE_ENV !== "production" ? Ge((u) => {
1976
+ var g = u.data ? void 0 : u.error;
1977
+ process.env.NODE_ENV !== "production" && t({
1978
+ type: g ? "fetchError" : "fetchSuccess",
1979
+ message: `A ${g ? "failed" : "successful"} fetch response has been returned.`,
1980
+ operation: a,
1981
+ data: {
1982
+ url: l,
1983
+ fetchOptions: d,
1984
+ value: g || u
1985
+ },
1986
+ source: "fetchExchange"
1987
+ });
1988
+ })(o) : o;
1989
+ })(z((a) => a.kind !== "teardown" && (a.kind !== "subscription" || !!a.context.fetchSubscriptions))(n)), i = e(z((a) => a.kind === "teardown" || a.kind === "subscription" && !a.context.fetchSubscriptions)(n));
1990
+ return ke([r, i]);
1991
+ }, ki = (e) => ({ client: t, forward: n, dispatchDebug: r }) => e.reduceRight((i, a) => {
1992
+ var s = !1;
1993
+ return a({
1994
+ client: t,
1995
+ forward(l) {
1996
+ if (process.env.NODE_ENV !== "production") {
1997
+ if (s)
1998
+ throw new Error("forward() must only be called once in each Exchange.");
1999
+ s = !0;
2000
+ }
2001
+ return Ne(i(Ne(l)));
2002
+ },
2003
+ dispatchDebug(l) {
2004
+ process.env.NODE_ENV !== "production" && r({
2005
+ timestamp: Date.now(),
2006
+ source: a.name,
2007
+ ...l
2008
+ });
2009
+ }
2010
+ });
2011
+ }, n), Ni = ({ dispatchDebug: e }) => (t) => (process.env.NODE_ENV !== "production" && (t = Ge((n) => {
2012
+ if (n.kind !== "teardown" && process.env.NODE_ENV !== "production") {
2013
+ var r = `No exchange has handled operations of kind "${n.kind}". Check whether you've added an exchange responsible for these operations.`;
2014
+ process.env.NODE_ENV !== "production" && e({
2015
+ type: "fallbackCatch",
2016
+ message: r,
2017
+ operation: n,
2018
+ source: "fallbackExchange"
2019
+ }), console.warn(r);
2020
+ }
2021
+ })(t)), z((n) => !1)(t)), Ai = function e(t) {
2022
+ if (process.env.NODE_ENV !== "production" && !t.url)
2023
+ throw new Error("You are creating an urql-client without a url.");
2024
+ var n = 0, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set(), s = [], l = {
2025
+ url: t.url,
2026
+ fetchSubscriptions: t.fetchSubscriptions,
2027
+ fetchOptions: t.fetchOptions,
2028
+ fetch: t.fetch,
2029
+ preferGetMethod: t.preferGetMethod,
2030
+ requestPolicy: t.requestPolicy || "cache-first"
2031
+ }, d = Et();
2032
+ function o(p) {
2033
+ (p.kind === "mutation" || p.kind === "teardown" || !a.has(p.key)) && (p.kind === "teardown" ? a.delete(p.key) : p.kind !== "mutation" && a.add(p.key), d.next(p));
2034
+ }
2035
+ var u = !1;
2036
+ function g(p) {
2037
+ if (p && o(p), !u) {
2038
+ for (u = !0; u && (p = s.shift()); )
2039
+ o(p);
2040
+ u = !1;
2041
+ }
2042
+ }
2043
+ var m = (p) => {
2044
+ var b = un(z((x) => x.kind === "teardown" && x.key === p.key)(d.source))(z((x) => x.operation.kind === p.kind && x.operation.key === p.key && (!x.operation.context._instance || x.operation.context._instance === p.context._instance))(R));
2045
+ return p.kind !== "query" ? b = Qr((x) => !!x.hasNext)(b) : b = St((x) => {
2046
+ var T = Qe(x);
2047
+ return x.stale || x.hasNext ? T : ke([T, Re(() => (x.stale = !0, x))(dn(1)(z((F) => F.key === p.key)(d.source)))]);
2048
+ })(b), p.kind !== "mutation" ? b = cn(() => {
2049
+ a.delete(p.key), r.delete(p.key), i.delete(p.key), u = !1;
2050
+ for (var x = s.length - 1; x >= 0; x--)
2051
+ s[x].key === p.key && s.splice(x, 1);
2052
+ o(Ae("teardown", p, p.context));
2053
+ })(Ge((x) => {
2054
+ if (x.stale)
2055
+ if (!x.hasNext)
2056
+ a.delete(p.key);
2057
+ else
2058
+ for (var T = 0; T < s.length; T++) {
2059
+ var F = s[T];
2060
+ if (F.key === x.operation.key) {
2061
+ a.delete(F.key);
2062
+ break;
2063
+ }
2064
+ }
2065
+ else x.hasNext || a.delete(p.key);
2066
+ r.set(p.key, x);
2067
+ })(b)) : b = wt(() => {
2068
+ o(p);
2069
+ })(b), Ne(b);
2070
+ }, h = this instanceof e ? this : Object.create(e.prototype), f = Object.assign(h, {
2071
+ suspense: !!t.suspense,
2072
+ operations$: d.source,
2073
+ reexecuteOperation(p) {
2074
+ if (p.kind === "teardown")
2075
+ g(p);
2076
+ else if (p.kind === "mutation")
2077
+ s.push(p), Promise.resolve().then(g);
2078
+ else if (i.has(p.key)) {
2079
+ for (var b = !1, x = 0; x < s.length; x++)
2080
+ s[x].key === p.key && (s[x] = p, b = !0);
2081
+ b || a.has(p.key) && p.context.requestPolicy !== "network-only" ? (a.delete(p.key), Promise.resolve().then(g)) : (s.push(p), Promise.resolve().then(g));
2082
+ }
2083
+ },
2084
+ createRequestOperation(p, b, x) {
2085
+ x || (x = {});
2086
+ var T;
2087
+ if (process.env.NODE_ENV !== "production" && p !== "teardown" && (T = ii(b.query)) !== p)
2088
+ throw new Error(`Expected operation of type "${p}" but found "${T}"`);
2089
+ return Ae(p, b, {
2090
+ _instance: p === "mutation" ? n = n + 1 | 0 : void 0,
2091
+ ...l,
2092
+ ...x,
2093
+ requestPolicy: x.requestPolicy || l.requestPolicy,
2094
+ suspense: x.suspense || x.suspense !== !1 && f.suspense
2095
+ });
2096
+ },
2097
+ executeRequestOperation(p) {
2098
+ return p.kind === "mutation" ? Dt(m(p)) : Dt(Xr(() => {
2099
+ var b = i.get(p.key);
2100
+ b || i.set(p.key, b = m(p)), b = wt(() => {
2101
+ g(p);
2102
+ })(b);
2103
+ var x = r.get(p.key);
2104
+ return p.kind === "query" && x && (x.stale || x.hasNext) ? St(Qe)(ke([b, z((T) => T === r.get(p.key))(Qe(x))])) : b;
2105
+ }));
2106
+ },
2107
+ executeQuery(p, b) {
2108
+ var x = f.createRequestOperation("query", p, b);
2109
+ return f.executeRequestOperation(x);
2110
+ },
2111
+ executeSubscription(p, b) {
2112
+ var x = f.createRequestOperation("subscription", p, b);
2113
+ return f.executeRequestOperation(x);
2114
+ },
2115
+ executeMutation(p, b) {
2116
+ var x = f.createRequestOperation("mutation", p, b);
2117
+ return f.executeRequestOperation(x);
2118
+ },
2119
+ readQuery(p, b, x) {
2120
+ var T = null;
2121
+ return je((F) => {
2122
+ T = F;
2123
+ })(f.query(p, b, x)).unsubscribe(), T;
2124
+ },
2125
+ query: (p, b, x) => f.executeQuery(Xe(p, b), x),
2126
+ subscription: (p, b, x) => f.executeSubscription(Xe(p, b), x),
2127
+ mutation: (p, b, x) => f.executeMutation(Xe(p, b), x)
2128
+ }), N = hi;
2129
+ if (process.env.NODE_ENV !== "production") {
2130
+ var { next: E, source: O } = Et();
2131
+ f.subscribeToDebugTarget = (p) => je(p)(O), N = E;
2132
+ }
2133
+ var A = ki(t.exchanges), R = Ne(A({
2134
+ client: f,
2135
+ dispatchDebug: N,
2136
+ forward: Ni({
2137
+ dispatchDebug: N
2138
+ })
2139
+ })(d.source));
2140
+ return _r(R), f;
2141
+ }, mn = "1.10.1", Je = (e, t) => async (...n) => {
2142
+ var r, i;
2143
+ const a = (i = (r = n[1]) == null ? void 0 : r.headers) == null ? void 0 : i["x-copilotcloud-public-api-key"];
2144
+ try {
2145
+ const s = await fetch(n[0], { ...n[1] ?? {}, signal: e }), l = a ? null : await Nr({
2146
+ runtimeVersion: s.headers.get("X-CopilotKit-Runtime-Version"),
2147
+ runtimeClientGqlVersion: mn
2148
+ });
2149
+ if (s.status !== 200 && s.status >= 400 && s.status <= 500)
2150
+ throw l ? new xr(l) : new br({ status: s.status });
2151
+ return l && t && t(l.message), s;
2152
+ } catch (s) {
2153
+ throw s.message.includes("BodyStreamBuffer was aborted") || s.message.includes("signal is aborted without reason") || s instanceof P ? s : new yr({ error: s, url: n[0] });
2154
+ }
2155
+ }, rt = class {
2156
+ constructor(e) {
2157
+ const t = {};
2158
+ this.handleGQLErrors = e.handleGQLErrors, this.handleGQLWarning = e.handleGQLWarning, e.headers && Object.assign(t, e.headers), e.publicApiKey && (t["x-copilotcloud-public-api-key"] = e.publicApiKey), this.client = new Ai({
2159
+ url: e.url,
2160
+ exchanges: [yi, bi],
2161
+ fetchOptions: {
2162
+ headers: {
2163
+ ...t,
2164
+ "X-CopilotKit-Runtime-Client-GQL-Version": mn
2165
+ },
2166
+ ...e.credentials ? { credentials: e.credentials } : {}
2167
+ }
2168
+ });
2169
+ }
2170
+ generateCopilotResponse({
2171
+ data: e,
2172
+ properties: t,
2173
+ signal: n
2174
+ }) {
2175
+ const r = Je(n, this.handleGQLWarning), i = this.client.mutation(Dr, { data: e, properties: t }, { fetch: r });
2176
+ return i.subscribe(({ error: a }) => {
2177
+ a && this.handleGQLErrors && this.handleGQLErrors(a);
2178
+ }), i;
2179
+ }
2180
+ asStream(e) {
2181
+ const t = this.handleGQLErrors;
2182
+ return new ReadableStream({
2183
+ start(n) {
2184
+ e.subscribe(({ data: r, hasNext: i, error: a }) => {
2185
+ var s;
2186
+ if (a) {
2187
+ if (a.message.includes("BodyStreamBuffer was aborted") || a.message.includes("signal is aborted without reason")) {
2188
+ i || n.close(), console.warn("Abort error suppressed");
2189
+ return;
2190
+ }
2191
+ if ((s = a.extensions) != null && s.visibility) {
2192
+ const l = {
2193
+ ...a,
2194
+ graphQLErrors: [
2195
+ {
2196
+ message: a.message,
2197
+ extensions: a.extensions
2198
+ }
2199
+ ]
2200
+ };
2201
+ t && t(l);
2202
+ return;
2203
+ }
2204
+ n.error(a), t && t(a);
2205
+ } else
2206
+ n.enqueue(r), i || n.close();
2207
+ });
2208
+ }
2209
+ });
2210
+ }
2211
+ availableAgents() {
2212
+ const e = Je();
2213
+ return this.client.query(Mr, {}, { fetch: e });
2214
+ }
2215
+ loadAgentState(e) {
2216
+ const t = Je(), n = this.client.query(
2217
+ Fr,
2218
+ { data: e },
2219
+ { fetch: t }
2220
+ );
2221
+ return n.toPromise().then(({ error: r }) => {
2222
+ r && this.handleGQLErrors && this.handleGQLErrors(r);
2223
+ }).catch(() => {
2224
+ }), n;
2225
+ }
2226
+ static removeGraphQLTypename(e) {
2227
+ return Array.isArray(e) ? e.forEach((t) => rt.removeGraphQLTypename(t)) : typeof e == "object" && e !== null && (delete e.__typename, Object.keys(e).forEach((t) => {
2228
+ typeof e[t] == "object" && e[t] !== null && rt.removeGraphQLTypename(e[t]);
2229
+ })), e;
2230
+ }
2231
+ };
2232
+ function Pt(e) {
2233
+ return ` \r
2234
+ `.indexOf(e) >= 0;
2235
+ }
2236
+ function wi(e) {
2237
+ for (var t = [
2238
+ "topLevel"
2239
+ /* TOP_LEVEL */
2240
+ ], n = 0, r, i, a, s = function(A) {
2241
+ return t.push(A);
2242
+ }, l = function(A) {
2243
+ return t[t.length - 1] = A;
2244
+ }, d = function(A) {
2245
+ r == null && (r = n, i = t.length, a = A);
2246
+ }, o = function(A) {
2247
+ A === a && (r = void 0, i = void 0, a = void 0);
2248
+ }, u = function() {
2249
+ return t.pop();
2250
+ }, g = function() {
2251
+ return n--;
2252
+ }, m = function(A) {
2253
+ if ("0" <= A && A <= "9") {
2254
+ s(
2255
+ "number"
2256
+ /* NUMBER */
2257
+ );
2258
+ return;
2259
+ }
2260
+ switch (A) {
2261
+ case '"':
2262
+ s(
2263
+ "string"
2264
+ /* STRING */
2265
+ );
2266
+ return;
2267
+ case "-":
2268
+ s(
2269
+ "numberNeedsDigit"
2270
+ /* NUMBER_NEEDS_DIGIT */
2271
+ );
2272
+ return;
2273
+ case "t":
2274
+ s(
2275
+ "true"
2276
+ /* TRUE */
2277
+ );
2278
+ return;
2279
+ case "f":
2280
+ s(
2281
+ "false"
2282
+ /* FALSE */
2283
+ );
2284
+ return;
2285
+ case "n":
2286
+ s(
2287
+ "null"
2288
+ /* NULL */
2289
+ );
2290
+ return;
2291
+ case "[":
2292
+ s(
2293
+ "arrayNeedsValue"
2294
+ /* ARRAY_NEEDS_VALUE */
2295
+ );
2296
+ return;
2297
+ case "{":
2298
+ s(
2299
+ "objectNeedsKey"
2300
+ /* OBJECT_NEEDS_KEY */
2301
+ );
2302
+ return;
2303
+ }
2304
+ }, h = e.length; n < h; n++) {
2305
+ var f = e[n];
2306
+ switch (t[t.length - 1]) {
2307
+ case "topLevel":
2308
+ m(f);
2309
+ break;
2310
+ case "string":
2311
+ switch (f) {
2312
+ case '"':
2313
+ u();
2314
+ break;
2315
+ case "\\":
2316
+ d(
2317
+ "stringEscape"
2318
+ /* STRING_ESCAPE */
2319
+ ), s(
2320
+ "stringEscaped"
2321
+ /* STRING_ESCAPED */
2322
+ );
2323
+ break;
2324
+ }
2325
+ break;
2326
+ case "stringEscaped":
2327
+ f === "u" ? s(
2328
+ "stringUnicode"
2329
+ /* STRING_UNICODE */
2330
+ ) : (o(
2331
+ "stringEscape"
2332
+ /* STRING_ESCAPE */
2333
+ ), u());
2334
+ break;
2335
+ case "stringUnicode":
2336
+ n - e.lastIndexOf("u", n) === 4 && (o(
2337
+ "stringEscape"
2338
+ /* STRING_ESCAPE */
2339
+ ), u());
2340
+ break;
2341
+ case "number":
2342
+ f === "." ? l(
2343
+ "numberNeedsDigit"
2344
+ /* NUMBER_NEEDS_DIGIT */
2345
+ ) : f === "e" || f === "E" ? l(
2346
+ "numberNeedsExponent"
2347
+ /* NUMBER_NEEDS_EXPONENT */
2348
+ ) : (f < "0" || f > "9") && (g(), u());
2349
+ break;
2350
+ case "numberNeedsDigit":
2351
+ l(
2352
+ "number"
2353
+ /* NUMBER */
2354
+ );
2355
+ break;
2356
+ case "numberNeedsExponent":
2357
+ l(
2358
+ f === "+" || f === "-" ? "numberNeedsDigit" : "number"
2359
+ /* NUMBER_NEEDS_DIGIT */
2360
+ );
2361
+ break;
2362
+ case "true":
2363
+ case "false":
2364
+ case "null":
2365
+ (f < "a" || f > "z") && (g(), u());
2366
+ break;
2367
+ case "arrayNeedsValue":
2368
+ f === "]" ? u() : Pt(f) || (o(
2369
+ "collectionItem"
2370
+ /* COLLECTION_ITEM */
2371
+ ), l(
2372
+ "arrayNeedsComma"
2373
+ /* ARRAY_NEEDS_COMMA */
2374
+ ), m(f));
2375
+ break;
2376
+ case "arrayNeedsComma":
2377
+ f === "]" ? u() : f === "," && (d(
2378
+ "collectionItem"
2379
+ /* COLLECTION_ITEM */
2380
+ ), l(
2381
+ "arrayNeedsValue"
2382
+ /* ARRAY_NEEDS_VALUE */
2383
+ ));
2384
+ break;
2385
+ case "objectNeedsKey":
2386
+ f === "}" ? u() : f === '"' && (d(
2387
+ "collectionItem"
2388
+ /* COLLECTION_ITEM */
2389
+ ), l(
2390
+ "objectNeedsColon"
2391
+ /* OBJECT_NEEDS_COLON */
2392
+ ), s(
2393
+ "string"
2394
+ /* STRING */
2395
+ ));
2396
+ break;
2397
+ case "objectNeedsColon":
2398
+ f === ":" && l(
2399
+ "objectNeedsValue"
2400
+ /* OBJECT_NEEDS_VALUE */
2401
+ );
2402
+ break;
2403
+ case "objectNeedsValue":
2404
+ Pt(f) || (o(
2405
+ "collectionItem"
2406
+ /* COLLECTION_ITEM */
2407
+ ), l(
2408
+ "objectNeedsComma"
2409
+ /* OBJECT_NEEDS_COMMA */
2410
+ ), m(f));
2411
+ break;
2412
+ case "objectNeedsComma":
2413
+ f === "}" ? u() : f === "," && (d(
2414
+ "collectionItem"
2415
+ /* COLLECTION_ITEM */
2416
+ ), l(
2417
+ "objectNeedsKey"
2418
+ /* OBJECT_NEEDS_KEY */
2419
+ ));
2420
+ break;
2421
+ }
2422
+ }
2423
+ i != null && (t.length = i);
2424
+ for (var N = [
2425
+ r != null ? e.slice(0, r) : e
2426
+ ], E = function(A) {
2427
+ return N.push(A.slice(e.length - e.lastIndexOf(A[0])));
2428
+ }, O = t.length - 1; O >= 0; O--)
2429
+ switch (t[O]) {
2430
+ case "string":
2431
+ N.push('"');
2432
+ break;
2433
+ case "numberNeedsDigit":
2434
+ case "numberNeedsExponent":
2435
+ N.push("0");
2436
+ break;
2437
+ case "true":
2438
+ E("true");
2439
+ break;
2440
+ case "false":
2441
+ E("false");
2442
+ break;
2443
+ case "null":
2444
+ E("null");
2445
+ break;
2446
+ case "arrayNeedsValue":
2447
+ case "arrayNeedsComma":
2448
+ N.push("]");
2449
+ break;
2450
+ case "objectNeedsKey":
2451
+ case "objectNeedsColon":
2452
+ case "objectNeedsValue":
2453
+ case "objectNeedsComma":
2454
+ N.push("}");
2455
+ break;
2456
+ }
2457
+ return N.join("");
2458
+ }
2459
+ function ha(e) {
2460
+ return e.filter((t) => !t.isAgentStateMessage());
2461
+ }
2462
+ function xa(e) {
2463
+ return e.map((t) => {
2464
+ if (t.isTextMessage())
2465
+ return {
2466
+ id: t.id,
2467
+ createdAt: t.createdAt,
2468
+ textMessage: {
2469
+ content: t.content,
2470
+ role: t.role,
2471
+ parentMessageId: t.parentMessageId
2472
+ }
2473
+ };
2474
+ if (t.isActionExecutionMessage())
2475
+ return {
2476
+ id: t.id,
2477
+ createdAt: t.createdAt,
2478
+ actionExecutionMessage: {
2479
+ name: t.name,
2480
+ arguments: JSON.stringify(t.arguments),
2481
+ parentMessageId: t.parentMessageId
2482
+ }
2483
+ };
2484
+ if (t.isResultMessage())
2485
+ return {
2486
+ id: t.id,
2487
+ createdAt: t.createdAt,
2488
+ resultMessage: {
2489
+ result: t.result,
2490
+ actionExecutionId: t.actionExecutionId,
2491
+ actionName: t.actionName
2492
+ }
2493
+ };
2494
+ if (t.isAgentStateMessage())
2495
+ return {
2496
+ id: t.id,
2497
+ createdAt: t.createdAt,
2498
+ agentStateMessage: {
2499
+ threadId: t.threadId,
2500
+ role: t.role,
2501
+ agentName: t.agentName,
2502
+ nodeName: t.nodeName,
2503
+ runId: t.runId,
2504
+ active: t.active,
2505
+ running: t.running,
2506
+ state: JSON.stringify(t.state)
2507
+ }
2508
+ };
2509
+ if (t.isImageMessage())
2510
+ return {
2511
+ id: t.id,
2512
+ createdAt: t.createdAt,
2513
+ imageMessage: {
2514
+ format: t.format,
2515
+ bytes: t.bytes,
2516
+ role: t.role,
2517
+ parentMessageId: t.parentMessageId
2518
+ }
2519
+ };
2520
+ throw new Error("Unknown message type");
2521
+ });
2522
+ }
2523
+ function ya(e) {
2524
+ return e.map((t) => {
2525
+ if (t.__typename === "TextMessageOutput")
2526
+ return new en({
2527
+ id: t.id,
2528
+ role: t.role,
2529
+ content: t.content.join(""),
2530
+ parentMessageId: t.parentMessageId,
2531
+ createdAt: /* @__PURE__ */ new Date(),
2532
+ status: t.status || {
2533
+ code: "Pending"
2534
+ /* Pending */
2535
+ }
2536
+ });
2537
+ if (t.__typename === "ActionExecutionMessageOutput")
2538
+ return new tn({
2539
+ id: t.id,
2540
+ name: t.name,
2541
+ arguments: Ei(t.arguments),
2542
+ parentMessageId: t.parentMessageId,
2543
+ createdAt: /* @__PURE__ */ new Date(),
2544
+ status: t.status || {
2545
+ code: "Pending"
2546
+ /* Pending */
2547
+ }
2548
+ });
2549
+ if (t.__typename === "ResultMessageOutput")
2550
+ return new nn({
2551
+ id: t.id,
2552
+ result: t.result,
2553
+ actionExecutionId: t.actionExecutionId,
2554
+ actionName: t.actionName,
2555
+ createdAt: /* @__PURE__ */ new Date(),
2556
+ status: t.status || {
2557
+ code: "Pending"
2558
+ /* Pending */
2559
+ }
2560
+ });
2561
+ if (t.__typename === "AgentStateMessageOutput")
2562
+ return new rn({
2563
+ id: t.id,
2564
+ threadId: t.threadId,
2565
+ role: t.role,
2566
+ agentName: t.agentName,
2567
+ nodeName: t.nodeName,
2568
+ runId: t.runId,
2569
+ active: t.active,
2570
+ running: t.running,
2571
+ state: Qt(t.state, {}),
2572
+ createdAt: /* @__PURE__ */ new Date()
2573
+ });
2574
+ if (t.__typename === "ImageMessageOutput")
2575
+ return new an({
2576
+ id: t.id,
2577
+ format: t.format,
2578
+ bytes: t.bytes,
2579
+ role: t.role,
2580
+ parentMessageId: t.parentMessageId,
2581
+ createdAt: /* @__PURE__ */ new Date(),
2582
+ status: t.status || {
2583
+ code: "Pending"
2584
+ /* Pending */
2585
+ }
2586
+ });
2587
+ throw new Error("Unknown message type");
2588
+ });
2589
+ }
2590
+ function Si(e) {
2591
+ const t = [];
2592
+ for (const n of e)
2593
+ "content" in n ? t.push(
2594
+ new en({
2595
+ id: n.id,
2596
+ role: n.role,
2597
+ content: n.content,
2598
+ parentMessageId: n.parentMessageId,
2599
+ createdAt: n.createdAt || /* @__PURE__ */ new Date(),
2600
+ status: n.status || {
2601
+ code: "Success"
2602
+ /* Success */
2603
+ }
2604
+ })
2605
+ ) : "arguments" in n ? t.push(
2606
+ new tn({
2607
+ id: n.id,
2608
+ name: n.name,
2609
+ arguments: n.arguments,
2610
+ parentMessageId: n.parentMessageId,
2611
+ createdAt: n.createdAt || /* @__PURE__ */ new Date(),
2612
+ status: n.status || {
2613
+ code: "Success"
2614
+ /* Success */
2615
+ }
2616
+ })
2617
+ ) : "result" in n ? t.push(
2618
+ new nn({
2619
+ id: n.id,
2620
+ result: n.result,
2621
+ actionExecutionId: n.actionExecutionId,
2622
+ actionName: n.actionName,
2623
+ createdAt: n.createdAt || /* @__PURE__ */ new Date(),
2624
+ status: n.status || {
2625
+ code: "Success"
2626
+ /* Success */
2627
+ }
2628
+ })
2629
+ ) : "state" in n ? t.push(
2630
+ new rn({
2631
+ id: n.id,
2632
+ threadId: n.threadId,
2633
+ role: n.role,
2634
+ agentName: n.agentName,
2635
+ nodeName: n.nodeName,
2636
+ runId: n.runId,
2637
+ active: n.active,
2638
+ running: n.running,
2639
+ state: n.state,
2640
+ createdAt: n.createdAt || /* @__PURE__ */ new Date()
2641
+ })
2642
+ ) : "format" in n && "bytes" in n && t.push(
2643
+ new an({
2644
+ id: n.id,
2645
+ format: n.format,
2646
+ bytes: n.bytes,
2647
+ role: n.role,
2648
+ parentMessageId: n.parentMessageId,
2649
+ createdAt: n.createdAt || /* @__PURE__ */ new Date(),
2650
+ status: n.status || {
2651
+ code: "Success"
2652
+ /* Success */
2653
+ }
2654
+ })
2655
+ );
2656
+ return t;
2657
+ }
2658
+ function Ei(e) {
2659
+ try {
2660
+ return e.length ? JSON.parse(wi(e.join(""))) : {};
2661
+ } catch {
2662
+ return {};
2663
+ }
2664
+ }
2665
+ var Ci = Object.defineProperty, Oi = Object.defineProperties, Ii = Object.getOwnPropertyDescriptors, ze = Object.getOwnPropertySymbols, vn = Object.prototype.hasOwnProperty, hn = Object.prototype.propertyIsEnumerable, Ut = (e, t, n) => t in e ? Ci(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, j = (e, t) => {
2666
+ for (var n in t || (t = {}))
2667
+ vn.call(t, n) && Ut(e, n, t[n]);
2668
+ if (ze)
2669
+ for (var n of ze(t))
2670
+ hn.call(t, n) && Ut(e, n, t[n]);
2671
+ return e;
2672
+ }, G = (e, t) => Oi(e, Ii(t)), Ri = (e) => typeof e == "symbol" ? e : e + "", Ve = (e, t) => {
2673
+ var n = {};
2674
+ for (var r in e)
2675
+ vn.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2676
+ if (e != null && ze)
2677
+ for (var r of ze(e))
2678
+ t.indexOf(r) < 0 && hn.call(e, r) && (n[r] = e[r]);
2679
+ return n;
2680
+ }, ne = (e, t, n) => new Promise((r, i) => {
2681
+ var a = (d) => {
2682
+ try {
2683
+ l(n.next(d));
2684
+ } catch (o) {
2685
+ i(o);
2686
+ }
2687
+ }, s = (d) => {
2688
+ try {
2689
+ l(n.throw(d));
2690
+ } catch (o) {
2691
+ i(o);
2692
+ }
2693
+ }, l = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(a, s);
2694
+ l((n = n.apply(e, t)).next());
2695
+ }), Ti = 1e3 * 60 * 5, Mi = class {
2696
+ constructor() {
2697
+ this.activeKey = null, this.intervalId = null, this.instanceCount = 0, this.lastResponse = null;
2698
+ }
2699
+ start(e, t) {
2700
+ return ne(this, null, function* () {
2701
+ if (this.instanceCount++, this.activeKey === e)
2702
+ return;
2703
+ this.intervalId && clearInterval(this.intervalId);
2704
+ const n = () => ne(this, null, function* () {
2705
+ try {
2706
+ const i = yield fetch(`${Zt}/ciu`, {
2707
+ method: "GET",
2708
+ headers: {
2709
+ [_t]: e
2710
+ }
2711
+ }).then((a) => a.json());
2712
+ return this.lastResponse = i, t == null || t(i), i;
2713
+ } catch {
2714
+ return null;
2715
+ }
2716
+ }), r = yield n();
2717
+ return this.intervalId = setInterval(n, Ti), this.activeKey = e, r;
2718
+ });
2719
+ }
2720
+ getLastResponse() {
2721
+ return this.lastResponse;
2722
+ }
2723
+ stop() {
2724
+ this.instanceCount--, this.instanceCount === 0 && this.intervalId && (clearInterval(this.intervalId), this.intervalId = null, this.activeKey = null, this.lastResponse = null);
2725
+ }
2726
+ }, xn = Vt(void 0);
2727
+ function Fi(e) {
2728
+ if (e.severity)
2729
+ switch (e.severity) {
2730
+ case $.CRITICAL:
2731
+ return "critical";
2732
+ case $.WARNING:
2733
+ return "warning";
2734
+ case $.INFO:
2735
+ return "info";
2736
+ default:
2737
+ return "info";
2738
+ }
2739
+ const t = e.message.toLowerCase();
2740
+ return t.includes("api key") || t.includes("401") || t.includes("unauthorized") || t.includes("authentication") || t.includes("incorrect api key") ? "critical" : "info";
2741
+ }
2742
+ function Di(e) {
2743
+ switch (e) {
2744
+ case "critical":
2745
+ return {
2746
+ background: "#fee2e2",
2747
+ border: "#dc2626",
2748
+ text: "#7f1d1d",
2749
+ icon: "#dc2626"
2750
+ };
2751
+ case "warning":
2752
+ return {
2753
+ background: "#fef3c7",
2754
+ border: "#d97706",
2755
+ text: "#78350f",
2756
+ icon: "#d97706"
2757
+ };
2758
+ case "info":
2759
+ return {
2760
+ background: "#dbeafe",
2761
+ border: "#2563eb",
2762
+ text: "#1e3a8a",
2763
+ icon: "#2563eb"
2764
+ };
2765
+ }
2766
+ }
2767
+ function yn() {
2768
+ const e = Gt(xn);
2769
+ if (!e)
2770
+ throw new Error("useToast must be used within a ToastProvider");
2771
+ return e;
2772
+ }
2773
+ function ji({
2774
+ enabled: e,
2775
+ children: t
2776
+ }) {
2777
+ const [n, r] = M([]), [i, a] = M(null), s = I((g) => {
2778
+ r((m) => m.filter((h) => h.id !== g));
2779
+ }, []), l = I(
2780
+ (g) => {
2781
+ var m;
2782
+ if (!e)
2783
+ return;
2784
+ const h = (m = g.id) != null ? m : Math.random().toString(36).substring(2, 9);
2785
+ r((f) => f.find((N) => N.id === h) ? f : [...f, G(j({}, g), { id: h })]), g.duration && setTimeout(() => {
2786
+ s(h);
2787
+ }, g.duration);
2788
+ },
2789
+ [e, s]
2790
+ ), d = I(
2791
+ (g) => {
2792
+ !e && g !== null || a(g);
2793
+ },
2794
+ [e]
2795
+ ), o = I((g) => {
2796
+ console.warn("addGraphQLErrorsToast is deprecated. All errors now show as banners.");
2797
+ }, []), u = {
2798
+ toasts: n,
2799
+ addToast: l,
2800
+ addGraphQLErrorsToast: o,
2801
+ removeToast: s,
2802
+ enabled: e,
2803
+ bannerError: i,
2804
+ setBannerError: d
2805
+ };
2806
+ return /* @__PURE__ */ c.jsxs(xn.Provider, { value: u, children: [
2807
+ i && (() => {
2808
+ const g = Fi(i), m = Di(g);
2809
+ return /* @__PURE__ */ c.jsx(
2810
+ "div",
2811
+ {
2812
+ style: {
2813
+ position: "fixed",
2814
+ bottom: "20px",
2815
+ left: "50%",
2816
+ transform: "translateX(-50%)",
2817
+ zIndex: 9999,
2818
+ backgroundColor: m.background,
2819
+ border: `1px solid ${m.border}`,
2820
+ borderLeft: `4px solid ${m.border}`,
2821
+ borderRadius: "8px",
2822
+ padding: "12px 16px",
2823
+ fontSize: "13px",
2824
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
2825
+ backdropFilter: "blur(8px)",
2826
+ maxWidth: "min(90vw, 700px)",
2827
+ width: "100%",
2828
+ boxSizing: "border-box",
2829
+ overflow: "hidden"
2830
+ },
2831
+ children: /* @__PURE__ */ c.jsxs(
2832
+ "div",
2833
+ {
2834
+ style: {
2835
+ display: "flex",
2836
+ justifyContent: "space-between",
2837
+ alignItems: "center",
2838
+ gap: "10px"
2839
+ },
2840
+ children: [
2841
+ /* @__PURE__ */ c.jsxs(
2842
+ "div",
2843
+ {
2844
+ style: {
2845
+ display: "flex",
2846
+ alignItems: "center",
2847
+ gap: "8px",
2848
+ flex: 1,
2849
+ minWidth: 0
2850
+ },
2851
+ children: [
2852
+ /* @__PURE__ */ c.jsx(
2853
+ "div",
2854
+ {
2855
+ style: {
2856
+ width: "12px",
2857
+ height: "12px",
2858
+ borderRadius: "50%",
2859
+ backgroundColor: m.border,
2860
+ flexShrink: 0
2861
+ }
2862
+ }
2863
+ ),
2864
+ /* @__PURE__ */ c.jsxs(
2865
+ "div",
2866
+ {
2867
+ style: {
2868
+ display: "flex",
2869
+ alignItems: "center",
2870
+ gap: "10px",
2871
+ flex: 1,
2872
+ minWidth: 0
2873
+ },
2874
+ children: [
2875
+ /* @__PURE__ */ c.jsx(
2876
+ "div",
2877
+ {
2878
+ style: {
2879
+ color: m.text,
2880
+ lineHeight: "1.4",
2881
+ fontWeight: "400",
2882
+ fontSize: "13px",
2883
+ flex: 1,
2884
+ wordBreak: "break-all",
2885
+ overflowWrap: "break-word",
2886
+ maxWidth: "550px",
2887
+ overflow: "hidden",
2888
+ display: "-webkit-box",
2889
+ WebkitLineClamp: 10,
2890
+ WebkitBoxOrient: "vertical"
2891
+ },
2892
+ children: (() => {
2893
+ let h = i.message;
2894
+ const f = h.match(/'message':\s*'([^']+)'/);
2895
+ return f ? f[1] : (h = h.split(" - ")[0], h = h.split(": Error code")[0], h = h.replace(/:\s*\d{3}$/, ""), h = h.replace(/See more:.*$/g, ""), h = h.trim(), h || "Configuration error occurred.");
2896
+ })()
2897
+ }
2898
+ ),
2899
+ (() => {
2900
+ const h = i.message, f = /\[([^\]]+)\]\(([^)]+)\)/g, N = /(https?:\/\/[^\s)]+)/g;
2901
+ let E = null, O = "See More";
2902
+ const A = f.exec(h);
2903
+ if (A)
2904
+ E = A[2], O = "See More";
2905
+ else {
2906
+ const R = N.exec(h);
2907
+ R && (E = R[0].replace(/[.,;:'"]*$/, ""), O = "See More");
2908
+ }
2909
+ return E ? /* @__PURE__ */ c.jsx(
2910
+ "button",
2911
+ {
2912
+ onClick: () => window.open(E, "_blank", "noopener,noreferrer"),
2913
+ style: {
2914
+ background: m.border,
2915
+ color: "white",
2916
+ border: "none",
2917
+ borderRadius: "5px",
2918
+ padding: "4px 10px",
2919
+ fontSize: "11px",
2920
+ fontWeight: "500",
2921
+ cursor: "pointer",
2922
+ transition: "all 0.2s ease",
2923
+ flexShrink: 0
2924
+ },
2925
+ onMouseEnter: (R) => {
2926
+ R.currentTarget.style.opacity = "0.9", R.currentTarget.style.transform = "translateY(-1px)";
2927
+ },
2928
+ onMouseLeave: (R) => {
2929
+ R.currentTarget.style.opacity = "1", R.currentTarget.style.transform = "translateY(0)";
2930
+ },
2931
+ children: O
2932
+ }
2933
+ ) : null;
2934
+ })()
2935
+ ]
2936
+ }
2937
+ )
2938
+ ]
2939
+ }
2940
+ ),
2941
+ /* @__PURE__ */ c.jsx(
2942
+ "button",
2943
+ {
2944
+ onClick: () => d(null),
2945
+ style: {
2946
+ background: "transparent",
2947
+ border: "none",
2948
+ color: m.text,
2949
+ cursor: "pointer",
2950
+ padding: "2px",
2951
+ borderRadius: "3px",
2952
+ fontSize: "14px",
2953
+ lineHeight: "1",
2954
+ opacity: 0.6,
2955
+ transition: "all 0.2s ease",
2956
+ flexShrink: 0
2957
+ },
2958
+ title: "Dismiss",
2959
+ onMouseEnter: (h) => {
2960
+ h.currentTarget.style.opacity = "1", h.currentTarget.style.background = "rgba(0, 0, 0, 0.05)";
2961
+ },
2962
+ onMouseLeave: (h) => {
2963
+ h.currentTarget.style.opacity = "0.6", h.currentTarget.style.background = "transparent";
2964
+ },
2965
+ children: "×"
2966
+ }
2967
+ )
2968
+ ]
2969
+ }
2970
+ )
2971
+ }
2972
+ );
2973
+ })(),
2974
+ t
2975
+ ] });
2976
+ }
2977
+ function bn({
2978
+ severity: e = $.CRITICAL,
2979
+ message: t = "",
2980
+ onClose: n,
2981
+ actions: r
2982
+ }) {
2983
+ if (!t || !e)
2984
+ return null;
2985
+ const a = {
2986
+ [$.INFO]: {
2987
+ bg: "#f8fafc",
2988
+ border: "#e2e8f0",
2989
+ text: "#475569",
2990
+ accent: "#3b82f6"
2991
+ },
2992
+ [$.WARNING]: {
2993
+ bg: "#fffbeb",
2994
+ border: "#fbbf24",
2995
+ text: "#92400e",
2996
+ accent: "#f59e0b"
2997
+ },
2998
+ [$.CRITICAL]: {
2999
+ bg: "#fef2f2",
3000
+ border: "#fecaca",
3001
+ text: "#dc2626",
3002
+ accent: "#ef4444"
3003
+ }
3004
+ }[e];
3005
+ return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
3006
+ /* @__PURE__ */ c.jsx("style", { children: `
3007
+ @keyframes slideUp {
3008
+ from { opacity: 0; transform: translateX(-50%) translateY(8px); }
3009
+ to { opacity: 1; transform: translateX(-50%) translateY(0); }
3010
+ }
3011
+
3012
+ .usage-banner {
3013
+ position: fixed;
3014
+ bottom: 24px;
3015
+ left: 50%;
3016
+ transform: translateX(-50%);
3017
+ width: min(600px, calc(100vw - 32px));
3018
+ z-index: 10000;
3019
+ animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
3020
+ }
3021
+
3022
+ .banner-content {
3023
+ background: linear-gradient(135deg, ${a.bg} 0%, ${a.bg}f5 100%);
3024
+ border: 1px solid ${a.border};
3025
+ border-radius: 12px;
3026
+ padding: 18px 20px;
3027
+ box-shadow:
3028
+ 0 4px 24px rgba(0, 0, 0, 0.08),
3029
+ 0 2px 8px rgba(0, 0, 0, 0.04),
3030
+ inset 0 1px 0 rgba(255, 255, 255, 0.7);
3031
+ display: flex;
3032
+ align-items: center;
3033
+ gap: 16px;
3034
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
3035
+ backdrop-filter: blur(12px);
3036
+ position: relative;
3037
+ overflow: hidden;
3038
+ }
3039
+
3040
+ .banner-content::before {
3041
+ content: '';
3042
+ position: absolute;
3043
+ top: 0;
3044
+ left: 0;
3045
+ right: 0;
3046
+ height: 1px;
3047
+ background: linear-gradient(90deg, transparent, ${a.accent}40, transparent);
3048
+ }
3049
+
3050
+ .banner-message {
3051
+ color: ${a.text};
3052
+ font-size: 14px;
3053
+ line-height: 1.5;
3054
+ font-weight: 500;
3055
+ flex: 1;
3056
+ letter-spacing: -0.01em;
3057
+ }
3058
+
3059
+ .close-btn {
3060
+ background: rgba(0, 0, 0, 0.05);
3061
+ border: none;
3062
+ color: ${a.text};
3063
+ cursor: pointer;
3064
+ padding: 0;
3065
+ border-radius: 6px;
3066
+ opacity: 0.6;
3067
+ transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
3068
+ font-size: 14px;
3069
+ line-height: 1;
3070
+ flex-shrink: 0;
3071
+ width: 24px;
3072
+ height: 24px;
3073
+ display: flex;
3074
+ align-items: center;
3075
+ justify-content: center;
3076
+ }
3077
+
3078
+ .close-btn:hover {
3079
+ opacity: 1;
3080
+ background: rgba(0, 0, 0, 0.08);
3081
+ transform: scale(1.05);
3082
+ }
3083
+
3084
+ .btn-primary {
3085
+ background: linear-gradient(135deg, ${a.accent} 0%, ${a.accent}e6 100%);
3086
+ color: white;
3087
+ border: none;
3088
+ border-radius: 8px;
3089
+ padding: 10px 18px;
3090
+ font-size: 13px;
3091
+ font-weight: 600;
3092
+ cursor: pointer;
3093
+ transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
3094
+ font-family: inherit;
3095
+ flex-shrink: 0;
3096
+ box-shadow:
3097
+ 0 2px 8px ${a.accent}30,
3098
+ inset 0 1px 0 rgba(255, 255, 255, 0.2);
3099
+ letter-spacing: -0.01em;
3100
+ }
3101
+
3102
+ .btn-primary:hover {
3103
+ transform: translateY(-1px) scale(1.02);
3104
+ box-shadow:
3105
+ 0 4px 12px ${a.accent}40,
3106
+ inset 0 1px 0 rgba(255, 255, 255, 0.25);
3107
+ }
3108
+
3109
+ .btn-primary:active {
3110
+ transform: translateY(0) scale(0.98);
3111
+ transition: all 0.08s cubic-bezier(0.16, 1, 0.3, 1);
3112
+ }
3113
+
3114
+ @media (max-width: 640px) {
3115
+ .usage-banner {
3116
+ width: calc(100vw - 24px);
3117
+ }
3118
+
3119
+ .banner-content {
3120
+ padding: 16px;
3121
+ gap: 12px;
3122
+ }
3123
+
3124
+ .banner-message {
3125
+ font-size: 13px;
3126
+ line-height: 1.45;
3127
+ }
3128
+
3129
+ .btn-primary {
3130
+ padding: 8px 14px;
3131
+ font-size: 12px;
3132
+ }
3133
+
3134
+ .close-btn {
3135
+ width: 22px;
3136
+ height: 22px;
3137
+ font-size: 12px;
3138
+ }
3139
+ }
3140
+ ` }),
3141
+ /* @__PURE__ */ c.jsx("div", { className: "usage-banner", children: /* @__PURE__ */ c.jsxs("div", { className: "banner-content", children: [
3142
+ /* @__PURE__ */ c.jsx("div", { className: "banner-message", children: t }),
3143
+ (r == null ? void 0 : r.primary) && /* @__PURE__ */ c.jsx("button", { className: "btn-primary", onClick: r.primary.onClick, children: r.primary.label }),
3144
+ n && /* @__PURE__ */ c.jsx("button", { className: "close-btn", onClick: n, title: "Close", children: "×" })
3145
+ ] }) })
3146
+ ] });
3147
+ }
3148
+ var kn = (e) => {
3149
+ switch (e.code) {
3150
+ case te.MISSING_PUBLIC_API_KEY_ERROR:
3151
+ return {
3152
+ primary: {
3153
+ label: "Show me how",
3154
+ onClick: () => window.open(
3155
+ "https://docs.copilotkit.ai/premium#how-do-i-get-access-to-premium-features",
3156
+ "_blank",
3157
+ "noopener,noreferrer"
3158
+ )
3159
+ }
3160
+ };
3161
+ case te.UPGRADE_REQUIRED_ERROR:
3162
+ return {
3163
+ primary: {
3164
+ label: "Upgrade",
3165
+ onClick: () => window.open("https://cloud.copilotkit.ai", "_blank", "noopener,noreferrer")
3166
+ }
3167
+ };
3168
+ default:
3169
+ return;
3170
+ }
3171
+ }, Kt = new Mi(), Li = class extends we.Component {
3172
+ constructor(e) {
3173
+ super(e), this.state = {
3174
+ hasError: !1
3175
+ };
3176
+ }
3177
+ static getDerivedStateFromError(e) {
3178
+ return { hasError: !0, error: e };
3179
+ }
3180
+ componentDidMount() {
3181
+ this.props.publicApiKey && Kt.start(this.props.publicApiKey, (e) => {
3182
+ this.setState((t) => {
3183
+ var n;
3184
+ return (e == null ? void 0 : e.severity) !== ((n = t.status) == null ? void 0 : n.severity) ? { status: e ?? void 0 } : null;
3185
+ });
3186
+ });
3187
+ }
3188
+ componentWillUnmount() {
3189
+ Kt.stop();
3190
+ }
3191
+ componentDidCatch(e, t) {
3192
+ console.error("CopilotKit Error:", e, t);
3193
+ }
3194
+ render() {
3195
+ var e, t, n, r;
3196
+ if (this.state.hasError) {
3197
+ if (this.state.error instanceof P)
3198
+ return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
3199
+ this.props.children,
3200
+ this.props.showUsageBanner && /* @__PURE__ */ c.jsx(
3201
+ bn,
3202
+ {
3203
+ severity: (t = (e = this.state.status) == null ? void 0 : e.severity) != null ? t : this.state.error.severity,
3204
+ message: (r = (n = this.state.status) == null ? void 0 : n.message) != null ? r : this.state.error.message,
3205
+ actions: kn(this.state.error)
3206
+ }
3207
+ )
3208
+ ] });
3209
+ throw this.state.error;
3210
+ }
3211
+ return this.props.children;
3212
+ }
3213
+ };
3214
+ function Pi() {
3215
+ return typeof window > "u" ? !1 : window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname === "0.0.0.0";
3216
+ }
3217
+ function se(e) {
3218
+ return e !== void 0 ? e : Pi();
3219
+ }
3220
+ var Nn = {
3221
+ actions: {},
3222
+ setAction: () => {
3223
+ },
3224
+ removeAction: () => {
3225
+ },
3226
+ coAgentStateRenders: {},
3227
+ setCoAgentStateRender: () => {
3228
+ },
3229
+ removeCoAgentStateRender: () => {
3230
+ },
3231
+ chatComponentsCache: { current: { actions: {}, coAgentStateRenders: {} } },
3232
+ getContextString: (e, t) => re(),
3233
+ addContext: () => "",
3234
+ removeContext: () => {
3235
+ },
3236
+ getAllContext: () => [],
3237
+ getFunctionCallHandler: () => re(),
3238
+ isLoading: !1,
3239
+ setIsLoading: () => re(),
3240
+ chatInstructions: "",
3241
+ setChatInstructions: () => re(),
3242
+ additionalInstructions: [],
3243
+ setAdditionalInstructions: () => re(),
3244
+ getDocumentsContext: (e) => re(),
3245
+ addDocumentContext: () => re(),
3246
+ removeDocumentContext: () => {
3247
+ },
3248
+ runtimeClient: {},
3249
+ copilotApiConfig: new class {
3250
+ get chatApiEndpoint() {
3251
+ throw new Error("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
3252
+ }
3253
+ get headers() {
3254
+ return {};
3255
+ }
3256
+ get body() {
3257
+ return {};
3258
+ }
3259
+ }(),
3260
+ chatSuggestionConfiguration: {},
3261
+ addChatSuggestionConfiguration: () => {
3262
+ },
3263
+ removeChatSuggestionConfiguration: () => {
3264
+ },
3265
+ showDevConsole: !1,
3266
+ coagentStates: {},
3267
+ setCoagentStates: () => {
3268
+ },
3269
+ coagentStatesRef: { current: {} },
3270
+ setCoagentStatesWithRef: () => {
3271
+ },
3272
+ agentSession: null,
3273
+ setAgentSession: () => {
3274
+ },
3275
+ forwardedParameters: {},
3276
+ agentLock: null,
3277
+ threadId: "",
3278
+ setThreadId: () => {
3279
+ },
3280
+ runId: null,
3281
+ setRunId: () => {
3282
+ },
3283
+ chatAbortControllerRef: { current: null },
3284
+ availableAgents: [],
3285
+ extensions: {},
3286
+ setExtensions: () => {
3287
+ },
3288
+ langGraphInterruptAction: null,
3289
+ setLangGraphInterruptAction: () => null,
3290
+ removeLangGraphInterruptAction: () => null,
3291
+ onError: void 0,
3292
+ bannerError: null,
3293
+ setBannerError: () => {
3294
+ }
3295
+ }, An = we.createContext(Nn);
3296
+ function ut() {
3297
+ const e = we.useContext(An);
3298
+ if (e === Nn)
3299
+ throw new Error("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
3300
+ return e;
3301
+ }
3302
+ function re(e) {
3303
+ throw new Error("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
3304
+ }
3305
+ var wn = {
3306
+ messages: [],
3307
+ setMessages: () => [],
3308
+ // suggestions state
3309
+ suggestions: [],
3310
+ setSuggestions: () => []
3311
+ }, Sn = we.createContext(wn);
3312
+ function Ui() {
3313
+ const e = we.useContext(Sn);
3314
+ if (e === wn)
3315
+ throw new Error(
3316
+ "A messages consuming component was not wrapped with `<CopilotMessages> {...} </CopilotMessages>`"
3317
+ );
3318
+ return e;
3319
+ }
3320
+ var En = Vt(null);
3321
+ function Ki() {
3322
+ const e = Gt(En);
3323
+ if (!e)
3324
+ throw new Error("useMessagesTap must be used inside <MessagesTapProvider>");
3325
+ return e;
3326
+ }
3327
+ function zi({ children: e }) {
3328
+ const t = W([]), n = W({
3329
+ getMessagesFromTap: () => t.current,
3330
+ updateTapMessages: (r) => {
3331
+ t.current = r;
3332
+ }
3333
+ });
3334
+ return /* @__PURE__ */ c.jsx(En.Provider, { value: n.current, children: e });
3335
+ }
3336
+ function Vi({ children: e }) {
3337
+ const [t, n] = M([]), r = W(), i = W(), a = W(), { updateTapMessages: s } = Ki(), { threadId: l, agentSession: d, runtimeClient: o, showDevConsole: u, onError: g, copilotApiConfig: m } = ut(), { setBannerError: h } = yn(), f = I(
3338
+ (p, b) => ne(this, null, function* () {
3339
+ if (!(!g || !m.publicApiKey))
3340
+ try {
3341
+ const x = {
3342
+ type: "error",
3343
+ timestamp: Date.now(),
3344
+ context: {
3345
+ source: "ui",
3346
+ request: {
3347
+ operation: "loadAgentState",
3348
+ url: m.chatApiEndpoint,
3349
+ startTime: Date.now()
3350
+ },
3351
+ technical: {
3352
+ environment: "browser",
3353
+ userAgent: typeof navigator < "u" ? navigator.userAgent : void 0,
3354
+ stackTrace: b instanceof Error ? b.stack : void 0
3355
+ }
3356
+ },
3357
+ error: p
3358
+ };
3359
+ yield g(x);
3360
+ } catch (x) {
3361
+ console.error("Error in CopilotMessages onError handler:", x);
3362
+ }
3363
+ }),
3364
+ [g, m.publicApiKey, m.chatApiEndpoint]
3365
+ ), N = (p) => {
3366
+ const b = p.extensions, x = b == null ? void 0 : b.originalError;
3367
+ if (x != null && x.stack) {
3368
+ if (x.stack.includes("CopilotApiDiscoveryError"))
3369
+ return new be({ message: x.message });
3370
+ if (x.stack.includes("CopilotKitRemoteEndpointDiscoveryError"))
3371
+ return new at({ message: x.message });
3372
+ if (x.stack.includes("CopilotKitAgentDiscoveryError"))
3373
+ return new Ht({
3374
+ agentName: "",
3375
+ availableAgents: []
3376
+ });
3377
+ }
3378
+ const T = (x == null ? void 0 : x.message) || p.message, F = b == null ? void 0 : b.code;
3379
+ return F ? new P({ message: T, code: F }) : null;
3380
+ }, E = I(
3381
+ (p) => {
3382
+ var b;
3383
+ if ((b = p.graphQLErrors) != null && b.length) {
3384
+ const x = p.graphQLErrors, T = (F) => {
3385
+ const q = F.extensions, J = q == null ? void 0 : q.visibility;
3386
+ if (!se(u)) {
3387
+ console.error("CopilotKit Error (hidden in production):", F.message);
3388
+ return;
3389
+ }
3390
+ if (J === it.SILENT) {
3391
+ console.error("CopilotKit Silent Error:", F.message);
3392
+ return;
3393
+ }
3394
+ const me = N(F);
3395
+ if (me)
3396
+ h(me), f(me, F);
3397
+ else {
3398
+ const Ce = new P({
3399
+ message: F.message,
3400
+ code: te.UNKNOWN
3401
+ });
3402
+ h(Ce), f(Ce, F);
3403
+ }
3404
+ };
3405
+ x.forEach(T);
3406
+ } else if (!se(u))
3407
+ console.error("CopilotKit Error (hidden in production):", p);
3408
+ else {
3409
+ const T = new P({
3410
+ message: (p == null ? void 0 : p.message) || String(p),
3411
+ code: te.UNKNOWN
3412
+ });
3413
+ h(T), f(T, p);
3414
+ }
3415
+ },
3416
+ [h, u, f]
3417
+ );
3418
+ ee(() => {
3419
+ if (!l || l === r.current || l === r.current && (d == null ? void 0 : d.agentName) === i.current)
3420
+ return;
3421
+ ne(this, null, function* () {
3422
+ var b, x, T, F;
3423
+ if (!(d != null && d.agentName))
3424
+ return;
3425
+ const q = yield o.loadAgentState({
3426
+ threadId: l,
3427
+ agentName: d == null ? void 0 : d.agentName
3428
+ });
3429
+ if (q.error) {
3430
+ r.current = l, i.current = d == null ? void 0 : d.agentName, E(q.error);
3431
+ return;
3432
+ }
3433
+ const J = (x = (b = q.data) == null ? void 0 : b.loadAgentState) == null ? void 0 : x.messages;
3434
+ if (J !== a.current && (F = (T = q.data) == null ? void 0 : T.loadAgentState) != null && F.threadExists) {
3435
+ a.current = J, r.current = l, i.current = d == null ? void 0 : d.agentName;
3436
+ const ge = Si(JSON.parse(J || "[]"));
3437
+ n(ge);
3438
+ }
3439
+ });
3440
+ }, [l, d == null ? void 0 : d.agentName]), ee(() => {
3441
+ s(t);
3442
+ }, [t, s]);
3443
+ const O = ie(() => e, [e]), [A, R] = M([]);
3444
+ return /* @__PURE__ */ c.jsx(
3445
+ Sn.Provider,
3446
+ {
3447
+ value: {
3448
+ messages: t,
3449
+ setMessages: n,
3450
+ suggestions: A,
3451
+ setSuggestions: R
3452
+ },
3453
+ children: O
3454
+ }
3455
+ );
3456
+ }
3457
+ var Gi = () => /* @__PURE__ */ c.jsx(
3458
+ "svg",
3459
+ {
3460
+ width: "13.3967723px",
3461
+ height: "12px",
3462
+ viewBox: "0 0 13.3967723 12",
3463
+ version: "1.1",
3464
+ xmlns: "http://www.w3.org/2000/svg",
3465
+ children: /* @__PURE__ */ c.jsx("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ c.jsx("g", { id: "exclamation-triangle", fill: "#CD2121", children: /* @__PURE__ */ c.jsx(
3466
+ "path",
3467
+ {
3468
+ d: "M5.39935802,0.75 C5.97670802,-0.25 7.42007802,-0.25 7.99742802,0.75 L13.193588,9.75 C13.770888,10.75 13.049288,12 11.894588,12 L1.50223802,12 C0.34753802,12 -0.37414898,10.75 0.20319802,9.75 L5.39935802,0.75 Z M6.69838802,2.5 C7.11260802,2.5 7.44838802,2.83579 7.44838802,3.25 L7.44838802,6.25 C7.44838802,6.66421 7.11260802,7 6.69838802,7 C6.28417802,7 5.94838802,6.66421 5.94838802,6.25 L5.94838802,3.25 C5.94838802,2.83579 6.28417802,2.5 6.69838802,2.5 Z M6.69838802,10.5 C7.25067802,10.5 7.69838802,10.0523 7.69838802,9.5 C7.69838802,8.9477 7.25067802,8.5 6.69838802,8.5 C6.14610802,8.5 5.69838802,8.9477 5.69838802,9.5 C5.69838802,10.0523 6.14610802,10.5 6.69838802,10.5 Z",
3469
+ id: "Shape"
3470
+ }
3471
+ ) }) })
3472
+ }
3473
+ ), Wi = () => /* @__PURE__ */ c.jsx(
3474
+ "svg",
3475
+ {
3476
+ width: "14px",
3477
+ height: "14px",
3478
+ viewBox: "0 0 14 14",
3479
+ version: "1.1",
3480
+ xmlns: "http://www.w3.org/2000/svg",
3481
+ children: /* @__PURE__ */ c.jsx("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ c.jsx("g", { id: "Group-2", transform: "translate(-118, 0)", fill: "#1BC030", fillRule: "nonzero", children: /* @__PURE__ */ c.jsx("g", { id: "Group", transform: "translate(118, 0)", children: /* @__PURE__ */ c.jsx(
3482
+ "path",
3483
+ {
3484
+ d: "M0,7 C0,3.13384615 3.13384615,0 7,0 C10.8661538,0 14,3.13384615 14,7 C14,10.8661538 10.8661538,14 7,14 C3.13384615,14 0,10.8661538 0,7 Z M9.59179487,5.69764103 C9.70905818,5.54139023 9.73249341,5.33388318 9.65303227,5.15541491 C9.57357113,4.97694665 9.40367989,4.85551619 9.20909814,4.83811118 C9.01451638,4.82070616 8.82577109,4.91005717 8.71589744,5.07158974 L6.39261538,8.32389744 L5.22666667,7.15794872 C5.01450582,6.96025518 4.68389046,6.9660885 4.47883563,7.17114332 C4.27378081,7.37619815 4.26794748,7.70681351 4.46564103,7.91897436 L6.08102564,9.53435897 C6.19289944,9.64614839 6.3482622,9.70310251 6.50588106,9.69010587 C6.66349993,9.67710922 6.80743532,9.59547613 6.89948718,9.46687179 L9.59179487,5.69764103 L9.59179487,5.69764103 Z",
3485
+ id: "Shape"
3486
+ }
3487
+ ) }) }) })
3488
+ }
3489
+ ), Cn = () => /* @__PURE__ */ c.jsxs(
3490
+ "svg",
3491
+ {
3492
+ width: "33px",
3493
+ height: "35px",
3494
+ viewBox: "0 0 33 35",
3495
+ version: "1.1",
3496
+ xmlns: "http://www.w3.org/2000/svg",
3497
+ children: [
3498
+ /* @__PURE__ */ c.jsx("title", { children: "bd5c9079-929b-4d55-bdc9-16d1c8181b71" }),
3499
+ /* @__PURE__ */ c.jsx("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ c.jsx(
3500
+ "image",
3501
+ {
3502
+ x: "0",
3503
+ y: "0",
3504
+ width: "33",
3505
+ height: "35",
3506
+ xlinkHref: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAACXCAYAAAAoE9hYAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAjaADAAQAAAABAAAAlwAAAACI8Oz3AABAAElEQVR4Ae2dCYAlVXnvv6q79d7TMz37sIMgKKBCkLhkSKK4xJ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vvmRUBcac7mLNeBxqNlADJmTzlPwMYzXlcgv8yttBufdaeXBynhsIt8OEK3qupVyOcpnr9Dhruh1EOKnjztT2Ds1ja+q0yPm5fOp2uCwD1MKzesLnTyv6plHUuwDiH8FAu0CIoC6SFvZH837ar3ill4+5BV6/4ecfOLeBAw/HyryLiMwDmFdg3Min5aTS+Tz9zvXNps+H/s18fwQ7FcwDOayDosXAHWLIH54l0Nlrn4oRkLR1g9BX4t8I81iAbPW5VvgE5NbyMyf8zzKsySnL5NXMspd0w9v3cIvM+CMSr39s3G7d7MJbhwWUWIrt8hYeXAu9ndFGfZ2j9C8Lizv/Zb5ce5qEm7j2cibbT6cN/i+7qOMAxDzejA38hdiu6CKYDYBLVWolRQh9bMzZYOcdHtQqHErYEQHEmqgMWk3TeFgDzU5jKf9v3znv02X+guVVjEsFXH+A6kcdaD1Aub29v//VzChi1b49X4vdRhLr11vsHN1pz7Qj8bDKrLULpdyJzKocw1OwCKBm2zYKPCh1PiQ87sujILdnw1gKQrQiMDNmTj5nP0P2F714fHlStCp43M2kBT2t9EXjfBlBydEu37Pfn+J7/zXkIt50IxO3oK1rgKgEaU5YYAJhaUOCLawjufOW8i0Pnlm1/bo/7mAll9uO8/x9teQya14m6TgAAAABJRU5ErkJggg=="
3507
+ }
3508
+ ) })
3509
+ ]
3510
+ }
3511
+ );
3512
+ function Bi({ isOpen: e, onClose: t, hasApiKey: n }) {
3513
+ const r = ut(), i = Ui(), [a, s] = M("actions");
3514
+ if (ee(() => {
3515
+ const o = (u) => {
3516
+ u.key === "Escape" && t();
3517
+ };
3518
+ return e && (document.addEventListener("keydown", o), document.body.style.overflow = "hidden"), () => {
3519
+ document.removeEventListener("keydown", o), document.body.style.overflow = "unset";
3520
+ };
3521
+ }, [e, t]), !e)
3522
+ return null;
3523
+ const l = n ? r : {
3524
+ actions: {
3525
+ search_web: { name: "search_web", description: "Search the web for information" },
3526
+ send_email: { name: "send_email", description: "Send an email to a contact" },
3527
+ create_document: { name: "create_document", description: "Create a new document" },
3528
+ analyze_code: {
3529
+ name: "analyze_code",
3530
+ description: "Analyze code for issues and improvements"
3531
+ },
3532
+ generate_tests: {
3533
+ name: "generate_tests",
3534
+ description: "Generate unit tests for functions"
3535
+ }
3536
+ },
3537
+ getAllContext: () => [
3538
+ {
3539
+ content: "User preferences: dark mode enabled, TypeScript preferred",
3540
+ metadata: { source: "settings" }
3541
+ },
3542
+ {
3543
+ content: "Current project: Building a React application with CopilotKit",
3544
+ metadata: { source: "project" }
3545
+ },
3546
+ {
3547
+ content: "Recent activity: Implemented authentication system",
3548
+ metadata: { source: "activity" }
3549
+ },
3550
+ {
3551
+ content: "Development environment: VS Code, Node.js 18, React 18",
3552
+ metadata: { source: "environment" }
3553
+ }
3554
+ ],
3555
+ coagentStates: {
3556
+ "main-agent": { status: "active", lastUpdate: Date.now() },
3557
+ "code-assistant": { status: "active", lastUpdate: Date.now() - 15e3 },
3558
+ "search-agent": { status: "idle", lastUpdate: Date.now() - 6e4 }
3559
+ },
3560
+ getDocumentsContext: () => [
3561
+ {
3562
+ content: "README.md: Project setup and installation instructions",
3563
+ metadata: { type: "documentation" }
3564
+ },
3565
+ {
3566
+ content: "API Documentation: CopilotKit integration guide",
3567
+ metadata: { type: "documentation" }
3568
+ },
3569
+ {
3570
+ content: "package.json: Project dependencies and scripts",
3571
+ metadata: { type: "configuration" }
3572
+ }
3573
+ ]
3574
+ }, d = n ? i : {
3575
+ messages: [
3576
+ {
3577
+ id: "1",
3578
+ role: "user",
3579
+ content: "Help me implement a todo list with drag and drop functionality"
3580
+ },
3581
+ {
3582
+ id: "2",
3583
+ role: "assistant",
3584
+ content: "I'll help you create a todo list with drag and drop. Let me start by setting up the basic components and then add the drag and drop functionality using React DnD."
3585
+ },
3586
+ { id: "3", role: "user", content: "Can you also add priority levels and due dates?" },
3587
+ {
3588
+ id: "4",
3589
+ role: "assistant",
3590
+ content: "Absolutely! I'll enhance the todo items with priority levels (high, medium, low) and due date functionality. This will make your todo list much more powerful for task management."
3591
+ },
3592
+ { id: "5", role: "user", content: "Perfect! How about adding categories or tags?" }
3593
+ ]
3594
+ };
3595
+ return /* @__PURE__ */ c.jsx(
3596
+ "div",
3597
+ {
3598
+ style: {
3599
+ position: "fixed",
3600
+ top: 0,
3601
+ left: 0,
3602
+ right: 0,
3603
+ bottom: 0,
3604
+ zIndex: 9999,
3605
+ backgroundColor: "rgba(0, 0, 0, 0.3)",
3606
+ display: "flex",
3607
+ alignItems: "center",
3608
+ justifyContent: "center",
3609
+ padding: "16px"
3610
+ },
3611
+ onClick: t,
3612
+ children: /* @__PURE__ */ c.jsxs(
3613
+ "div",
3614
+ {
3615
+ style: {
3616
+ width: "1152px",
3617
+ maxWidth: "95vw",
3618
+ height: "80vh",
3619
+ backgroundColor: "white",
3620
+ borderRadius: "12px",
3621
+ boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
3622
+ display: "flex",
3623
+ flexDirection: "column",
3624
+ overflow: "hidden",
3625
+ position: "relative"
3626
+ },
3627
+ onClick: (o) => o.stopPropagation(),
3628
+ children: [
3629
+ /* @__PURE__ */ c.jsxs(
3630
+ "div",
3631
+ {
3632
+ style: {
3633
+ display: "flex",
3634
+ alignItems: "center",
3635
+ justifyContent: "space-between",
3636
+ padding: "24px",
3637
+ borderBottom: "1px solid #e5e7eb",
3638
+ minHeight: "73px",
3639
+ flexShrink: 0,
3640
+ filter: n ? "none" : "blur(0.3px)",
3641
+ opacity: n ? 1 : 0.95
3642
+ },
3643
+ children: [
3644
+ /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
3645
+ /* @__PURE__ */ c.jsx(Cn, {}),
3646
+ /* @__PURE__ */ c.jsx(
3647
+ "h1",
3648
+ {
3649
+ style: {
3650
+ fontWeight: "bold",
3651
+ fontSize: "20px",
3652
+ color: "#1f2937",
3653
+ margin: 0
3654
+ },
3655
+ children: "Developer Console"
3656
+ }
3657
+ ),
3658
+ /* @__PURE__ */ c.jsxs(
3659
+ "span",
3660
+ {
3661
+ style: {
3662
+ fontSize: "14px",
3663
+ color: "#6b7280",
3664
+ backgroundColor: "#f3f4f6",
3665
+ padding: "4px 8px",
3666
+ borderRadius: "4px"
3667
+ },
3668
+ children: [
3669
+ "v",
3670
+ xe
3671
+ ]
3672
+ }
3673
+ )
3674
+ ] }),
3675
+ /* @__PURE__ */ c.jsx(
3676
+ "button",
3677
+ {
3678
+ onClick: t,
3679
+ style: {
3680
+ color: "#9ca3af",
3681
+ fontSize: "24px",
3682
+ fontWeight: "300",
3683
+ border: "none",
3684
+ background: "none",
3685
+ cursor: "pointer",
3686
+ padding: "4px"
3687
+ },
3688
+ onMouseEnter: (o) => o.currentTarget.style.color = "#4b5563",
3689
+ onMouseLeave: (o) => o.currentTarget.style.color = "#9ca3af",
3690
+ children: "×"
3691
+ }
3692
+ )
3693
+ ]
3694
+ }
3695
+ ),
3696
+ /* @__PURE__ */ c.jsx(
3697
+ "div",
3698
+ {
3699
+ style: {
3700
+ display: "flex",
3701
+ borderBottom: "1px solid #e5e7eb",
3702
+ backgroundColor: "#f9fafb",
3703
+ minHeight: "50px",
3704
+ flexShrink: 0,
3705
+ filter: n ? "none" : "blur(0.3px)",
3706
+ opacity: n ? 1 : 0.9
3707
+ },
3708
+ children: [
3709
+ { id: "actions", label: "Actions", count: Object.keys(l.actions).length },
3710
+ { id: "readables", label: "Readables", count: l.getAllContext().length },
3711
+ {
3712
+ id: "agent",
3713
+ label: "Agent Status",
3714
+ count: Object.keys(l.coagentStates).length
3715
+ },
3716
+ { id: "messages", label: "Messages", count: d.messages.length },
3717
+ {
3718
+ id: "context",
3719
+ label: "Context",
3720
+ count: l.getDocumentsContext([]).length
3721
+ }
3722
+ ].map((o) => /* @__PURE__ */ c.jsxs(
3723
+ "button",
3724
+ {
3725
+ onClick: () => s(o.id),
3726
+ style: {
3727
+ padding: "12px 24px",
3728
+ fontSize: "14px",
3729
+ fontWeight: "500",
3730
+ border: "none",
3731
+ cursor: "pointer",
3732
+ backgroundColor: a === o.id ? "white" : "transparent",
3733
+ color: a === o.id ? "#2563eb" : "#6b7280",
3734
+ borderBottom: a === o.id ? "2px solid #2563eb" : "none",
3735
+ transition: "all 0.2s"
3736
+ },
3737
+ onMouseEnter: (u) => {
3738
+ a !== o.id && (u.currentTarget.style.color = "#1f2937", u.currentTarget.style.backgroundColor = "#f3f4f6");
3739
+ },
3740
+ onMouseLeave: (u) => {
3741
+ a !== o.id && (u.currentTarget.style.color = "#6b7280", u.currentTarget.style.backgroundColor = "transparent");
3742
+ },
3743
+ children: [
3744
+ o.label,
3745
+ o.count > 0 && /* @__PURE__ */ c.jsx(
3746
+ "span",
3747
+ {
3748
+ style: {
3749
+ marginLeft: "8px",
3750
+ backgroundColor: "#e5e7eb",
3751
+ color: "#374151",
3752
+ padding: "2px 8px",
3753
+ borderRadius: "9999px",
3754
+ fontSize: "12px"
3755
+ },
3756
+ children: o.count
3757
+ }
3758
+ )
3759
+ ]
3760
+ },
3761
+ o.id
3762
+ ))
3763
+ }
3764
+ ),
3765
+ /* @__PURE__ */ c.jsxs(
3766
+ "div",
3767
+ {
3768
+ style: {
3769
+ height: "calc(100% - 142px)",
3770
+ overflow: "auto",
3771
+ padding: "24px",
3772
+ backgroundColor: "#f9fafb",
3773
+ filter: n ? "none" : "blur(0.3px)",
3774
+ opacity: n ? 1 : 0.85
3775
+ },
3776
+ children: [
3777
+ a === "actions" && /* @__PURE__ */ c.jsx(qi, { context: l }),
3778
+ a === "readables" && /* @__PURE__ */ c.jsx(Yi, { context: l }),
3779
+ a === "agent" && /* @__PURE__ */ c.jsx(Qi, { context: l }),
3780
+ a === "messages" && /* @__PURE__ */ c.jsx(Xi, { messagesContext: d }),
3781
+ a === "context" && /* @__PURE__ */ c.jsx(Hi, { context: l })
3782
+ ]
3783
+ }
3784
+ ),
3785
+ /* @__PURE__ */ c.jsxs(
3786
+ "div",
3787
+ {
3788
+ style: {
3789
+ padding: "16px 24px",
3790
+ borderTop: "1px solid #e5e7eb",
3791
+ backgroundColor: "white",
3792
+ display: "flex",
3793
+ justifyContent: "space-between",
3794
+ alignItems: "center",
3795
+ minHeight: "57px",
3796
+ flexShrink: 0,
3797
+ filter: n ? "none" : "blur(0.3px)",
3798
+ opacity: n ? 1 : 0.9
3799
+ },
3800
+ children: [
3801
+ /* @__PURE__ */ c.jsx("div", { style: { fontSize: "14px", color: "#6b7280" }, children: /* @__PURE__ */ c.jsx(
3802
+ "a",
3803
+ {
3804
+ href: "https://github.com/CopilotKit/CopilotKit/issues",
3805
+ target: "_blank",
3806
+ rel: "noopener noreferrer",
3807
+ style: { color: "#2563eb", textDecoration: "none" },
3808
+ onMouseEnter: (o) => o.currentTarget.style.textDecoration = "underline",
3809
+ onMouseLeave: (o) => o.currentTarget.style.textDecoration = "none",
3810
+ children: "Report an issue"
3811
+ }
3812
+ ) }),
3813
+ /* @__PURE__ */ c.jsx("div", { style: { fontSize: "14px", color: "#6b7280" }, children: /* @__PURE__ */ c.jsx(
3814
+ "a",
3815
+ {
3816
+ href: "https://mcp.copilotkit.ai/",
3817
+ target: "_blank",
3818
+ rel: "noopener noreferrer",
3819
+ style: { color: "#2563eb", textDecoration: "none" },
3820
+ onMouseEnter: (o) => o.currentTarget.style.textDecoration = "underline",
3821
+ onMouseLeave: (o) => o.currentTarget.style.textDecoration = "none",
3822
+ children: "Add MCP Server →"
3823
+ }
3824
+ ) })
3825
+ ]
3826
+ }
3827
+ ),
3828
+ !n && /* @__PURE__ */ c.jsx(
3829
+ "div",
3830
+ {
3831
+ style: {
3832
+ position: "absolute",
3833
+ top: 0,
3834
+ left: 0,
3835
+ right: 0,
3836
+ bottom: 0,
3837
+ backgroundColor: "rgba(255, 255, 255, 0.2)",
3838
+ backdropFilter: "blur(2px)",
3839
+ WebkitBackdropFilter: "blur(2px)",
3840
+ display: "flex",
3841
+ alignItems: "center",
3842
+ justifyContent: "center",
3843
+ borderRadius: "12px",
3844
+ zIndex: 10
3845
+ },
3846
+ onClick: (o) => o.stopPropagation(),
3847
+ children: /* @__PURE__ */ c.jsxs(
3848
+ "button",
3849
+ {
3850
+ onClick: () => window.open("https://cloud.copilotkit.ai/sign-in", "_blank"),
3851
+ style: {
3852
+ // Following button system specifications
3853
+ height: "48px",
3854
+ padding: "12px 24px",
3855
+ backgroundColor: "#030507",
3856
+ // textPrimary token
3857
+ color: "#FFFFFF",
3858
+ borderRadius: "12px",
3859
+ // Medium radius token
3860
+ border: "none",
3861
+ cursor: "pointer",
3862
+ fontSize: "14px",
3863
+ // Medium Semi Bold typography
3864
+ fontWeight: "600",
3865
+ fontFamily: "'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif",
3866
+ lineHeight: "22px",
3867
+ boxShadow: "0 4px 16px rgba(3, 5, 7, 0.2), 0 1px 3px rgba(3, 5, 7, 0.1)",
3868
+ transition: "all 200ms ease",
3869
+ // 200ms ease as per specs
3870
+ display: "inline-flex",
3871
+ alignItems: "center",
3872
+ gap: "8px",
3873
+ textTransform: "uppercase",
3874
+ letterSpacing: "0.5px"
3875
+ },
3876
+ onMouseEnter: (o) => {
3877
+ o.currentTarget.style.backgroundColor = "#575758", o.currentTarget.style.transform = "translateY(-1px)", o.currentTarget.style.boxShadow = "0 6px 20px rgba(3, 5, 7, 0.25), 0 2px 4px rgba(3, 5, 7, 0.15)";
3878
+ },
3879
+ onMouseLeave: (o) => {
3880
+ o.currentTarget.style.backgroundColor = "#030507", o.currentTarget.style.transform = "translateY(0)", o.currentTarget.style.boxShadow = "0 4px 16px rgba(3, 5, 7, 0.2), 0 1px 3px rgba(3, 5, 7, 0.1)";
3881
+ },
3882
+ onMouseDown: (o) => {
3883
+ o.currentTarget.style.backgroundColor = "#858589", o.currentTarget.style.transform = "translateY(0)";
3884
+ },
3885
+ onMouseUp: (o) => {
3886
+ o.currentTarget.style.backgroundColor = "#575758", o.currentTarget.style.transform = "translateY(-1px)";
3887
+ },
3888
+ onFocus: (o) => {
3889
+ o.currentTarget.style.outline = "2px solid #BEC9FF", o.currentTarget.style.outlineOffset = "2px";
3890
+ },
3891
+ onBlur: (o) => {
3892
+ o.currentTarget.style.outline = "none";
3893
+ },
3894
+ children: [
3895
+ "Get API Key",
3896
+ /* @__PURE__ */ c.jsx("span", { style: { fontSize: "16px", marginLeft: "-4px" }, children: "→" })
3897
+ ]
3898
+ }
3899
+ )
3900
+ }
3901
+ )
3902
+ ]
3903
+ }
3904
+ )
3905
+ }
3906
+ );
3907
+ }
3908
+ function qi({ context: e }) {
3909
+ const t = Object.values(e.actions);
3910
+ return t.length === 0 ? /* @__PURE__ */ c.jsxs("div", { style: { textAlign: "center", padding: "48px 0", color: "#6b7280" }, children: [
3911
+ /* @__PURE__ */ c.jsx("p", { style: { fontSize: "18px", margin: "0 0 8px 0" }, children: "No actions available" }),
3912
+ /* @__PURE__ */ c.jsx("p", { style: { fontSize: "14px", margin: 0 }, children: "Actions will appear here when registered" })
3913
+ ] }) : /* @__PURE__ */ c.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: t.map((n, r) => /* @__PURE__ */ c.jsx(
3914
+ "div",
3915
+ {
3916
+ style: {
3917
+ backgroundColor: "white",
3918
+ padding: "16px",
3919
+ borderRadius: "8px",
3920
+ boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1)",
3921
+ border: "1px solid #e5e7eb"
3922
+ },
3923
+ children: /* @__PURE__ */ c.jsxs(
3924
+ "div",
3925
+ {
3926
+ style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" },
3927
+ children: [
3928
+ /* @__PURE__ */ c.jsxs("div", { style: { flex: 1 }, children: [
3929
+ /* @__PURE__ */ c.jsx("h3", { style: { fontWeight: "600", color: "#1f2937", margin: "0 0 4px 0" }, children: n.name }),
3930
+ n.description && /* @__PURE__ */ c.jsx("p", { style: { fontSize: "14px", color: "#4b5563", margin: "0 0 12px 0" }, children: n.description }),
3931
+ n.parameters && n.parameters.length > 0 && /* @__PURE__ */ c.jsxs("div", { style: { marginTop: "12px" }, children: [
3932
+ /* @__PURE__ */ c.jsx(
3933
+ "p",
3934
+ {
3935
+ style: {
3936
+ fontSize: "12px",
3937
+ fontWeight: "500",
3938
+ color: "#6b7280",
3939
+ textTransform: "uppercase",
3940
+ margin: "0 0 4px 0"
3941
+ },
3942
+ children: "Parameters:"
3943
+ }
3944
+ ),
3945
+ /* @__PURE__ */ c.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: n.parameters.map((i, a) => /* @__PURE__ */ c.jsxs("div", { style: { fontSize: "14px" }, children: [
3946
+ /* @__PURE__ */ c.jsx("span", { style: { fontFamily: "monospace", color: "#374151" }, children: i.name }),
3947
+ i.required && /* @__PURE__ */ c.jsx("span", { style: { marginLeft: "4px", fontSize: "12px", color: "#ef4444" }, children: "*required" }),
3948
+ i.type && /* @__PURE__ */ c.jsxs("span", { style: { marginLeft: "8px", fontSize: "12px", color: "#6b7280" }, children: [
3949
+ "(",
3950
+ i.type,
3951
+ ")"
3952
+ ] })
3953
+ ] }, a)) })
3954
+ ] })
3955
+ ] }),
3956
+ /* @__PURE__ */ c.jsx("div", { style: { marginLeft: "16px" }, children: n.status === "available" ? /* @__PURE__ */ c.jsx(Wi, {}) : /* @__PURE__ */ c.jsx(Gi, {}) })
3957
+ ]
3958
+ }
3959
+ )
3960
+ },
3961
+ r
3962
+ )) });
3963
+ }
3964
+ function Yi({ context: e }) {
3965
+ const t = e.getAllContext();
3966
+ return t.length === 0 ? /* @__PURE__ */ c.jsxs("div", { style: { textAlign: "center", padding: "48px 0", color: "#6b7280" }, children: [
3967
+ /* @__PURE__ */ c.jsx("p", { style: { fontSize: "18px", margin: "0 0 8px 0" }, children: "No readable context available" }),
3968
+ /* @__PURE__ */ c.jsx("p", { style: { fontSize: "14px", margin: 0 }, children: "Readable context will appear here when provided" })
3969
+ ] }) : /* @__PURE__ */ c.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: t.map((n, r) => /* @__PURE__ */ c.jsx(
3970
+ "div",
3971
+ {
3972
+ style: {
3973
+ backgroundColor: "white",
3974
+ padding: "16px",
3975
+ borderRadius: "8px",
3976
+ boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1)",
3977
+ border: "1px solid #e5e7eb"
3978
+ },
3979
+ children: /* @__PURE__ */ c.jsx(
3980
+ "div",
3981
+ {
3982
+ style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" },
3983
+ children: /* @__PURE__ */ c.jsxs("div", { style: { flex: 1 }, children: [
3984
+ /* @__PURE__ */ c.jsx("h3", { style: { fontWeight: "600", color: "#1f2937", margin: "0 0 4px 0" }, children: n.name || `Readable ${r + 1}` }),
3985
+ n.description && /* @__PURE__ */ c.jsx("p", { style: { fontSize: "14px", color: "#4b5563", margin: "0 0 12px 0" }, children: n.description }),
3986
+ n.value && /* @__PURE__ */ c.jsx(
3987
+ "pre",
3988
+ {
3989
+ style: {
3990
+ marginTop: "12px",
3991
+ padding: "8px",
3992
+ backgroundColor: "#f9fafb",
3993
+ borderRadius: "4px",
3994
+ fontSize: "12px",
3995
+ overflowX: "auto",
3996
+ margin: "12px 0 0 0"
3997
+ },
3998
+ children: JSON.stringify(n.value, null, 2)
3999
+ }
4000
+ )
4001
+ ] })
4002
+ }
4003
+ )
4004
+ },
4005
+ r
4006
+ )) });
4007
+ }
4008
+ function Qi({ context: e }) {
4009
+ const t = e.coagentStates || {}, n = Object.entries(t);
4010
+ return n.length === 0 ? /* @__PURE__ */ c.jsxs("div", { style: { textAlign: "center", padding: "48px 0", color: "#6b7280" }, children: [
4011
+ /* @__PURE__ */ c.jsx("p", { style: { fontSize: "18px", margin: "0 0 8px 0" }, children: "No agent states available" }),
4012
+ /* @__PURE__ */ c.jsx("p", { style: { fontSize: "14px", margin: 0 }, children: "Agent states will appear here when agents are active" })
4013
+ ] }) : /* @__PURE__ */ c.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "24px" }, children: n.map(([r, i]) => /* @__PURE__ */ c.jsxs(
4014
+ "div",
4015
+ {
4016
+ style: {
4017
+ backgroundColor: "white",
4018
+ padding: "24px",
4019
+ borderRadius: "8px",
4020
+ boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1)",
4021
+ border: "1px solid #e5e7eb"
4022
+ },
4023
+ children: [
4024
+ /* @__PURE__ */ c.jsxs(
4025
+ "div",
4026
+ {
4027
+ style: {
4028
+ display: "flex",
4029
+ alignItems: "center",
4030
+ justifyContent: "space-between",
4031
+ marginBottom: "16px"
4032
+ },
4033
+ children: [
4034
+ /* @__PURE__ */ c.jsx("h3", { style: { fontWeight: "600", fontSize: "18px", color: "#1f2937", margin: 0 }, children: r }),
4035
+ /* @__PURE__ */ c.jsx(
4036
+ "span",
4037
+ {
4038
+ style: {
4039
+ padding: "4px 12px",
4040
+ borderRadius: "9999px",
4041
+ fontSize: "12px",
4042
+ fontWeight: "500",
4043
+ backgroundColor: i.status === "running" ? "#dcfce7" : i.status === "complete" ? "#dbeafe" : "#f3f4f6",
4044
+ color: i.status === "running" ? "#166534" : i.status === "complete" ? "#1e40af" : "#1f2937"
4045
+ },
4046
+ children: i.status || "idle"
4047
+ }
4048
+ )
4049
+ ]
4050
+ }
4051
+ ),
4052
+ i.state && /* @__PURE__ */ c.jsxs("div", { style: { marginBottom: "12px" }, children: [
4053
+ /* @__PURE__ */ c.jsx(
4054
+ "p",
4055
+ {
4056
+ style: {
4057
+ fontSize: "12px",
4058
+ fontWeight: "500",
4059
+ color: "#6b7280",
4060
+ textTransform: "uppercase",
4061
+ margin: "0 0 4px 0"
4062
+ },
4063
+ children: "Current State:"
4064
+ }
4065
+ ),
4066
+ /* @__PURE__ */ c.jsx(
4067
+ "pre",
4068
+ {
4069
+ style: {
4070
+ padding: "12px",
4071
+ backgroundColor: "#f9fafb",
4072
+ borderRadius: "4px",
4073
+ fontSize: "12px",
4074
+ overflowX: "auto",
4075
+ margin: 0
4076
+ },
4077
+ children: JSON.stringify(i.state, null, 2)
4078
+ }
4079
+ )
4080
+ ] }),
4081
+ i.running && /* @__PURE__ */ c.jsxs(
4082
+ "div",
4083
+ {
4084
+ style: {
4085
+ marginTop: "16px",
4086
+ display: "flex",
4087
+ alignItems: "center",
4088
+ fontSize: "14px",
4089
+ color: "#4b5563"
4090
+ },
4091
+ children: [
4092
+ /* @__PURE__ */ c.jsx("div", { style: { marginRight: "8px" }, children: /* @__PURE__ */ c.jsxs(
4093
+ "svg",
4094
+ {
4095
+ width: "16",
4096
+ height: "16",
4097
+ viewBox: "0 0 16 16",
4098
+ style: { animation: "spin 1s linear infinite" },
4099
+ children: [
4100
+ /* @__PURE__ */ c.jsx("style", { children: "@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }" }),
4101
+ /* @__PURE__ */ c.jsx(
4102
+ "circle",
4103
+ {
4104
+ cx: "8",
4105
+ cy: "8",
4106
+ r: "6",
4107
+ fill: "none",
4108
+ stroke: "#4b5563",
4109
+ strokeWidth: "2",
4110
+ strokeDasharray: "9 3"
4111
+ }
4112
+ )
4113
+ ]
4114
+ }
4115
+ ) }),
4116
+ /* @__PURE__ */ c.jsx("span", { children: "Agent is currently running..." })
4117
+ ]
4118
+ }
4119
+ )
4120
+ ]
4121
+ },
4122
+ r
4123
+ )) });
4124
+ }
4125
+ function Xi({ messagesContext: e }) {
4126
+ const t = e.messages || [];
4127
+ return t.length === 0 ? /* @__PURE__ */ c.jsxs("div", { style: { textAlign: "center", padding: "48px 0", color: "#6b7280" }, children: [
4128
+ /* @__PURE__ */ c.jsx("p", { style: { fontSize: "18px", margin: "0 0 8px 0" }, children: "No messages yet" }),
4129
+ /* @__PURE__ */ c.jsx("p", { style: { fontSize: "14px", margin: 0 }, children: "Messages will appear here as the conversation progresses" })
4130
+ ] }) : /* @__PURE__ */ c.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: t.map((n, r) => /* @__PURE__ */ c.jsxs(
4131
+ "div",
4132
+ {
4133
+ style: {
4134
+ padding: "16px",
4135
+ borderRadius: "8px",
4136
+ backgroundColor: n.role === "user" ? "#eff6ff" : n.role === "assistant" ? "#f9fafb" : "#fefce8",
4137
+ border: `1px solid ${n.role === "user" ? "#c7d2fe" : n.role === "assistant" ? "#e5e7eb" : "#fde047"}`,
4138
+ marginLeft: n.role === "user" ? "48px" : "0",
4139
+ marginRight: n.role === "assistant" ? "48px" : "0"
4140
+ },
4141
+ children: [
4142
+ /* @__PURE__ */ c.jsxs(
4143
+ "div",
4144
+ {
4145
+ style: {
4146
+ display: "flex",
4147
+ alignItems: "flex-start",
4148
+ justifyContent: "space-between",
4149
+ marginBottom: "8px"
4150
+ },
4151
+ children: [
4152
+ /* @__PURE__ */ c.jsx(
4153
+ "span",
4154
+ {
4155
+ style: {
4156
+ fontWeight: "500",
4157
+ fontSize: "14px",
4158
+ color: "#374151",
4159
+ textTransform: "capitalize"
4160
+ },
4161
+ children: n.role || "system"
4162
+ }
4163
+ ),
4164
+ n.timestamp && /* @__PURE__ */ c.jsx("span", { style: { fontSize: "12px", color: "#6b7280" }, children: new Date(n.timestamp).toLocaleTimeString() })
4165
+ ]
4166
+ }
4167
+ ),
4168
+ /* @__PURE__ */ c.jsx("div", { style: { fontSize: "14px", color: "#1f2937", whiteSpace: "pre-wrap" }, children: n.content || "" })
4169
+ ]
4170
+ },
4171
+ r
4172
+ )) });
4173
+ }
4174
+ function Hi({ context: e }) {
4175
+ const t = e.getDocumentsContext([]);
4176
+ return t.length === 0 ? /* @__PURE__ */ c.jsxs("div", { style: { textAlign: "center", padding: "48px 0", color: "#6b7280" }, children: [
4177
+ /* @__PURE__ */ c.jsx("p", { style: { fontSize: "18px", margin: "0 0 8px 0" }, children: "No document context available" }),
4178
+ /* @__PURE__ */ c.jsx("p", { style: { fontSize: "14px", margin: 0 }, children: "Document context will appear here when provided" })
4179
+ ] }) : /* @__PURE__ */ c.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: t.map((n, r) => /* @__PURE__ */ c.jsxs(
4180
+ "div",
4181
+ {
4182
+ style: {
4183
+ backgroundColor: "white",
4184
+ padding: "16px",
4185
+ borderRadius: "8px",
4186
+ boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1)",
4187
+ border: "1px solid #e5e7eb"
4188
+ },
4189
+ children: [
4190
+ /* @__PURE__ */ c.jsx("h3", { style: { fontWeight: "600", color: "#1f2937", margin: "0 0 8px 0" }, children: n.name || `Document ${r + 1}` }),
4191
+ n.content && /* @__PURE__ */ c.jsx(
4192
+ "pre",
4193
+ {
4194
+ style: {
4195
+ padding: "12px",
4196
+ backgroundColor: "#f9fafb",
4197
+ borderRadius: "4px",
4198
+ fontSize: "12px",
4199
+ overflowX: "auto",
4200
+ margin: 0
4201
+ },
4202
+ children: n.content
4203
+ }
4204
+ )
4205
+ ]
4206
+ },
4207
+ r
4208
+ )) });
4209
+ }
4210
+ function Ji({ position: e = "bottom-right" }) {
4211
+ const n = !!ut().copilotApiConfig.publicApiKey, [r, i] = M(!1), [a, s] = M(!1), [l, d] = M(!1), [o, u] = M(null), [g, m] = M(!1), h = W(null), f = W(null);
4212
+ ee(() => {
4213
+ if (m(!0), typeof window < "u" && !o) {
4214
+ const A = {
4215
+ x: 24,
4216
+ y: window.innerHeight - 60 - 24
4217
+ };
4218
+ u(A);
4219
+ }
4220
+ }, [e]);
4221
+ const N = (E) => {
4222
+ E.preventDefault(), o && (h.current = {
4223
+ startX: E.clientX,
4224
+ startY: E.clientY,
4225
+ buttonX: o.x,
4226
+ buttonY: o.y
4227
+ }, d(!0));
4228
+ };
4229
+ return ee(() => {
4230
+ if (!l)
4231
+ return;
4232
+ const E = (A) => {
4233
+ if (A.preventDefault(), A.stopPropagation(), !h.current)
4234
+ return;
4235
+ const R = A.clientX - h.current.startX, p = A.clientY - h.current.startY;
4236
+ let b = h.current.buttonX + R, x = h.current.buttonY + p;
4237
+ b = Math.max(0, Math.min(b, window.innerWidth - 60)), x = Math.max(0, Math.min(x, window.innerHeight - 60)), u({ x: b, y: x });
4238
+ }, O = (A) => {
4239
+ A.preventDefault(), A.stopPropagation(), d(!1), h.current = null;
4240
+ };
4241
+ return document.addEventListener("mousemove", E, { capture: !0, passive: !1 }), document.addEventListener("mouseup", O, { capture: !0, passive: !1 }), () => {
4242
+ document.removeEventListener("mousemove", E, { capture: !0 }), document.removeEventListener("mouseup", O, { capture: !0 });
4243
+ };
4244
+ }, [l]), !g || !o ? null : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
4245
+ /* @__PURE__ */ c.jsxs(
4246
+ "button",
4247
+ {
4248
+ ref: f,
4249
+ onClick: () => {
4250
+ l || i(!0);
4251
+ },
4252
+ onMouseDown: N,
4253
+ onMouseEnter: () => s(!0),
4254
+ onMouseLeave: () => s(!1),
4255
+ style: {
4256
+ position: "fixed",
4257
+ left: `${o.x}px`,
4258
+ top: `${o.y}px`,
4259
+ zIndex: 2147483647,
4260
+ width: "60px",
4261
+ height: "60px",
4262
+ background: l ? "#000000" : a ? "#111111" : "#000000",
4263
+ color: "white",
4264
+ borderRadius: "50%",
4265
+ boxShadow: l ? "0 8px 32px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4)" : a ? "0 12px 40px rgba(0, 0, 0, 0.7), 0 6px 20px rgba(0, 0, 0, 0.5)" : "0 6px 20px rgba(0, 0, 0, 0.5), 0 3px 10px rgba(0, 0, 0, 0.3)",
4266
+ transition: l ? "none" : "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
4267
+ display: "flex",
4268
+ alignItems: "center",
4269
+ justifyContent: "center",
4270
+ border: "none",
4271
+ cursor: l ? "grabbing" : "grab",
4272
+ opacity: 1,
4273
+ userSelect: "none",
4274
+ transform: l ? "scale(1.05)" : a ? "scale(1.1)" : "scale(1)",
4275
+ backdropFilter: "blur(10px)",
4276
+ pointerEvents: "auto",
4277
+ isolation: "isolate"
4278
+ },
4279
+ title: n ? "Open Developer Console (Drag to move)" : "Developer Console (API Key Required, Drag to move)",
4280
+ children: [
4281
+ /* @__PURE__ */ c.jsx(
4282
+ "div",
4283
+ {
4284
+ style: {
4285
+ width: "28px",
4286
+ height: "28px",
4287
+ display: "flex",
4288
+ alignItems: "center",
4289
+ justifyContent: "center",
4290
+ filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"
4291
+ },
4292
+ children: /* @__PURE__ */ c.jsx(Cn, {})
4293
+ }
4294
+ ),
4295
+ !n && /* @__PURE__ */ c.jsx(
4296
+ "div",
4297
+ {
4298
+ style: {
4299
+ position: "absolute",
4300
+ top: "-2px",
4301
+ right: "-2px",
4302
+ width: "18px",
4303
+ height: "18px",
4304
+ background: "linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%)",
4305
+ borderRadius: "50%",
4306
+ display: "flex",
4307
+ alignItems: "center",
4308
+ justifyContent: "center",
4309
+ boxShadow: "0 2px 8px rgba(255, 107, 107, 0.4)",
4310
+ border: "2px solid white"
4311
+ },
4312
+ children: /* @__PURE__ */ c.jsx("span", { style: { fontSize: "10px", color: "white", fontWeight: "bold" }, children: "!" })
4313
+ }
4314
+ )
4315
+ ]
4316
+ }
4317
+ ),
4318
+ /* @__PURE__ */ c.jsx(
4319
+ Bi,
4320
+ {
4321
+ isOpen: r,
4322
+ onClose: () => i(!1),
4323
+ hasApiKey: n
4324
+ }
4325
+ )
4326
+ ] });
4327
+ }
4328
+ var Zi = () => {
4329
+ const [e, t] = Wt($i, /* @__PURE__ */ new Map()), n = I((a, s) => {
4330
+ const l = st();
4331
+ return t({
4332
+ type: "ADD_ELEMENT",
4333
+ value: a,
4334
+ id: l,
4335
+ categories: s
4336
+ }), l;
4337
+ }, []), r = I((a) => {
4338
+ t({ type: "REMOVE_ELEMENT", id: a });
4339
+ }, []), i = I(
4340
+ (a) => {
4341
+ const s = new Set(a), l = [];
4342
+ return e.forEach((d) => {
4343
+ ea(s, d.categories) && l.push(d.value);
4344
+ }), l;
4345
+ },
4346
+ [e]
4347
+ );
4348
+ return { addElement: n, removeElement: r, allElements: i };
4349
+ }, _i = Zi;
4350
+ function $i(e, t) {
4351
+ switch (t.type) {
4352
+ case "ADD_ELEMENT": {
4353
+ const { value: n, id: r, categories: i } = t, a = {
4354
+ id: r,
4355
+ value: n,
4356
+ categories: new Set(i)
4357
+ }, s = new Map(e);
4358
+ return s.set(r, a), s;
4359
+ }
4360
+ case "REMOVE_ELEMENT": {
4361
+ const n = new Map(e);
4362
+ return n.delete(t.id), n;
4363
+ }
4364
+ default:
4365
+ return e;
4366
+ }
4367
+ }
4368
+ function ea(e, t) {
4369
+ const [n, r] = e.size <= t.size ? [e, t] : [t, e];
4370
+ for (let i of n)
4371
+ if (r.has(i))
4372
+ return !0;
4373
+ return !1;
4374
+ }
4375
+ var On = (e, t) => e.reduce((n, r) => {
4376
+ if (r.id !== t) {
4377
+ const i = G(j({}, r), { children: On(r.children, t) });
4378
+ n.push(i);
4379
+ }
4380
+ return n;
4381
+ }, []), In = (e, t, n) => n ? e.map((r) => r.id === n ? G(j({}, r), { children: [...r.children, t] }) : r.children.length ? G(j({}, r), { children: In(r.children, t, n) }) : r) : [...e, t], Rn = (e, t) => t === 0 ? (e + 1).toString() : t === 1 ? String.fromCharCode(65 + e) : t === 2 ? String.fromCharCode(97 + e) : "-", Tn = (e, t = "", n = 0) => {
4382
+ const r = " ".repeat(3).repeat(n), i = t.length + r.length, a = " ".repeat(i), s = e.value.split(`
4383
+ `), l = `${r}${t}${s[0]}`, d = s.slice(1).map((g) => `${a}${g}`).join(`
4384
+ `);
4385
+ let o = `${l}
4386
+ `;
4387
+ d && (o += `${d}
4388
+ `);
4389
+ const u = " ".repeat(t.length);
4390
+ return e.children.forEach(
4391
+ (g, m) => o += Tn(
4392
+ g,
4393
+ `${u}${Rn(m, n + 1)}. `,
4394
+ n + 1
4395
+ )
4396
+ ), o;
4397
+ };
4398
+ function ta(e, t) {
4399
+ switch (t.type) {
4400
+ case "ADD_NODE": {
4401
+ const { value: n, parentId: r, id: i } = t, a = {
4402
+ id: i,
4403
+ value: n,
4404
+ children: [],
4405
+ categories: new Set(t.categories)
4406
+ };
4407
+ try {
4408
+ return In(e, a, r);
4409
+ } catch (s) {
4410
+ return console.error(`Error while adding node with id ${i}: ${s}`), e;
4411
+ }
4412
+ }
4413
+ case "REMOVE_NODE":
4414
+ return On(e, t.id);
4415
+ default:
4416
+ return e;
4417
+ }
4418
+ }
4419
+ var na = () => {
4420
+ const [e, t] = Wt(ta, []), n = I(
4421
+ (s, l, d) => {
4422
+ const o = st();
4423
+ return t({
4424
+ type: "ADD_NODE",
4425
+ value: s,
4426
+ parentId: d,
4427
+ id: o,
4428
+ categories: l
4429
+ }), o;
4430
+ },
4431
+ []
4432
+ ), r = I((s) => {
4433
+ t({ type: "REMOVE_NODE", id: s });
4434
+ }, []), i = I(() => e, [e]), a = I(
4435
+ (s) => {
4436
+ const l = new Set(s);
4437
+ let d = "";
4438
+ return e.forEach((o, u) => {
4439
+ ia(l, o.categories) && (u !== 0 && (d += `
4440
+ `), d += Tn(o, `${Rn(u, 0)}. `));
4441
+ }), d;
4442
+ },
4443
+ [e]
4444
+ );
4445
+ return { tree: e, addElement: n, printTree: a, removeElement: r, getAllElements: i };
4446
+ }, ra = na;
4447
+ function ia(e, t) {
4448
+ const [n, r] = e.size <= t.size ? [e, t] : [t, e];
4449
+ for (let i of n)
4450
+ if (r.has(i))
4451
+ return !0;
4452
+ return !1;
4453
+ }
4454
+ var aa = (e) => {
4455
+ const { setBannerError: t } = yn(), n = e, { showDevConsole: r, onError: i } = n, a = Ve(n, ["showDevConsole", "onError"]), s = W(null), l = (o, u) => ne(void 0, null, function* () {
4456
+ if (!(!i || !a.publicApiKey))
4457
+ try {
4458
+ const g = {
4459
+ type: "error",
4460
+ timestamp: Date.now(),
4461
+ context: {
4462
+ source: "ui",
4463
+ request: {
4464
+ operation: "runtimeClient",
4465
+ url: a.url,
4466
+ startTime: Date.now()
4467
+ },
4468
+ technical: {
4469
+ environment: "browser",
4470
+ userAgent: typeof navigator < "u" ? navigator.userAgent : void 0,
4471
+ stackTrace: u instanceof Error ? u.stack : void 0
4472
+ }
4473
+ },
4474
+ error: o
4475
+ };
4476
+ yield i(g);
4477
+ } catch (g) {
4478
+ console.error("Error in onError handler:", g);
4479
+ }
4480
+ });
4481
+ return ie(() => new rt(G(j({}, a), {
4482
+ handleGQLErrors: (o) => {
4483
+ var u;
4484
+ if ((u = o.graphQLErrors) != null && u.length) {
4485
+ const g = o.graphQLErrors, m = (h) => {
4486
+ const f = h.extensions, N = f == null ? void 0 : f.visibility, E = se(r ?? !1);
4487
+ if (N === it.SILENT) {
4488
+ console.error("CopilotKit Silent Error:", h.message);
4489
+ return;
4490
+ }
4491
+ if (!E) {
4492
+ console.error("CopilotKit Error (hidden in production):", h.message);
4493
+ return;
4494
+ }
4495
+ const O = Date.now(), A = h.message;
4496
+ if (s.current && s.current.message === A && O - s.current.timestamp < 150)
4497
+ return;
4498
+ s.current = { message: A, timestamp: O };
4499
+ const R = sa(h);
4500
+ if (R)
4501
+ t(R), l(R, h);
4502
+ else {
4503
+ const p = new P({
4504
+ message: h.message,
4505
+ code: te.UNKNOWN
4506
+ });
4507
+ t(p), l(p, h);
4508
+ }
4509
+ };
4510
+ g.forEach(m);
4511
+ } else if (!se(r ?? !1))
4512
+ console.error("CopilotKit Error (hidden in production):", o);
4513
+ else {
4514
+ const m = new P({
4515
+ message: (o == null ? void 0 : o.message) || String(o),
4516
+ code: te.UNKNOWN
4517
+ });
4518
+ t(m), l(m, o);
4519
+ }
4520
+ },
4521
+ handleGQLWarning: (o) => {
4522
+ console.warn(o);
4523
+ const u = new P({
4524
+ message: o,
4525
+ code: te.UNKNOWN
4526
+ });
4527
+ t(u);
4528
+ }
4529
+ })), [a, t, r, i]);
4530
+ };
4531
+ function sa(e) {
4532
+ var t, n, r;
4533
+ const i = e.extensions, a = i == null ? void 0 : i.originalError, s = (a == null ? void 0 : a.message) || e.message, l = i == null ? void 0 : i.code;
4534
+ return l ? new P({ message: s, code: l }) : (t = a == null ? void 0 : a.stack) != null && t.includes("CopilotApiDiscoveryError") ? new be({ message: s }) : (n = a == null ? void 0 : a.stack) != null && n.includes("CopilotKitRemoteEndpointDiscoveryError") ? new at({ message: s }) : (r = a == null ? void 0 : a.stack) != null && r.includes("CopilotKitAgentDiscoveryError") ? new Ht({
4535
+ agentName: "",
4536
+ availableAgents: []
4537
+ }) : null;
4538
+ }
4539
+ function ba(e) {
4540
+ var t = e, { children: n } = t, r = Ve(t, ["children"]);
4541
+ const i = se(r.showDevConsole), a = r.publicApiKey || r.publicLicenseKey;
4542
+ return /* @__PURE__ */ c.jsx(ji, { enabled: i, children: /* @__PURE__ */ c.jsx(Li, { publicApiKey: a, showUsageBanner: i, children: /* @__PURE__ */ c.jsx(oa, G(j({}, r), { children: n })) }) });
4543
+ }
4544
+ function oa(e) {
4545
+ const t = e, { children: n } = t, r = Ve(t, ["children"]);
4546
+ da(e);
4547
+ const i = r.publicLicenseKey || r.publicApiKey, a = r.runtimeUrl || Er, [s, l] = M({}), [d, o] = M({}), u = W({
4548
+ actions: {},
4549
+ coAgentStateRenders: {}
4550
+ }), { addElement: g, removeElement: m, printTree: h, getAllElements: f } = ra(), [N, E] = M(!1), [O, A] = M(""), [R, p] = M({}), [b, x] = M({}), [T, F] = M([]), {
4551
+ addElement: q,
4552
+ removeElement: J,
4553
+ allElements: ge
4554
+ } = _i(), me = I((k, w) => {
4555
+ l((S) => G(j({}, S), {
4556
+ [k]: w
4557
+ }));
4558
+ }, []), Ce = I((k) => {
4559
+ l((w) => {
4560
+ const S = j({}, w);
4561
+ return delete S[k], S;
4562
+ });
4563
+ }, []), Mn = I((k, w) => {
4564
+ o((S) => G(j({}, S), {
4565
+ [k]: w
4566
+ }));
4567
+ }, []), Fn = I((k) => {
4568
+ o((w) => {
4569
+ const S = j({}, w);
4570
+ return delete S[k], S;
4571
+ });
4572
+ }, []), Dn = I(
4573
+ (k, w) => {
4574
+ const S = k.map((Y) => `${Y.name} (${Y.sourceApplication}):
4575
+ ${Y.getContents()}`).join(`
4576
+
4577
+ `), oe = h(w);
4578
+ return `${S}
4579
+
4580
+ ${oe}`;
4581
+ },
4582
+ [h]
4583
+ ), jn = I(
4584
+ (k, w, S = zt) => g(k, S, w),
4585
+ [g]
4586
+ ), Ln = I(
4587
+ (k) => {
4588
+ m(k);
4589
+ },
4590
+ [m]
4591
+ ), Pn = I(() => f(), [f]), Un = I(
4592
+ (k) => la(Object.values(k || s)),
4593
+ [s]
4594
+ ), Kn = I(
4595
+ (k) => ge(k),
4596
+ [ge]
4597
+ ), zn = I(
4598
+ (k, w = zt) => q(k, w),
4599
+ [q]
4600
+ ), Vn = I(
4601
+ (k) => {
4602
+ J(k);
4603
+ },
4604
+ [J]
4605
+ ), Z = ie(() => {
4606
+ var k, w;
4607
+ let S;
4608
+ return i && (S = {
4609
+ guardrails: {
4610
+ input: {
4611
+ restrictToTopic: {
4612
+ enabled: !!r.guardrails_c,
4613
+ validTopics: ((k = r.guardrails_c) == null ? void 0 : k.validTopics) || [],
4614
+ invalidTopics: ((w = r.guardrails_c) == null ? void 0 : w.invalidTopics) || []
4615
+ }
4616
+ }
4617
+ }
4618
+ }), G(j({
4619
+ publicApiKey: i
4620
+ }, S ? { cloud: S } : {}), {
4621
+ chatApiEndpoint: a,
4622
+ headers: r.headers || {},
4623
+ properties: r.properties || {},
4624
+ transcribeAudioUrl: r.transcribeAudioUrl,
4625
+ textToSpeechUrl: r.textToSpeechUrl,
4626
+ credentials: r.credentials
4627
+ });
4628
+ }, [
4629
+ i,
4630
+ r.headers,
4631
+ r.properties,
4632
+ r.transcribeAudioUrl,
4633
+ r.textToSpeechUrl,
4634
+ r.credentials,
4635
+ r.cloudRestrictToTopic,
4636
+ r.guardrails_c
4637
+ ]), Gn = ie(() => {
4638
+ const k = Object.values(R || {}).reduce((w, S) => S.status === "authenticated" && S.authHeaders ? j(j({}, w), Object.entries(S.authHeaders).reduce(
4639
+ (oe, [Y, he]) => G(j({}, oe), {
4640
+ [Y.startsWith("X-Custom-") ? Y : `X-Custom-${Y}`]: he
4641
+ }),
4642
+ {}
4643
+ )) : w, {});
4644
+ return j(j(j({}, Z.headers || {}), Z.publicApiKey ? { [_t]: Z.publicApiKey } : {}), k);
4645
+ }, [Z.headers, Z.publicApiKey, R]), pt = aa({
4646
+ url: Z.chatApiEndpoint,
4647
+ publicApiKey: i,
4648
+ headers: Gn,
4649
+ credentials: Z.credentials,
4650
+ showDevConsole: se(r.showDevConsole),
4651
+ onError: r.onError
4652
+ }), [Wn, Oe] = M({}), Bn = I(
4653
+ (k, w) => {
4654
+ Oe((S) => G(j({}, S), { [k]: w }));
4655
+ },
4656
+ [Oe]
4657
+ ), qn = I(
4658
+ (k) => {
4659
+ Oe((w) => {
4660
+ const S = w, { [k]: oe } = S;
4661
+ return Ve(S, [Ri(k)]);
4662
+ });
4663
+ },
4664
+ [Oe]
4665
+ ), [Yn, Qn] = M([]), [Xn, ft] = M({}), We = W({}), Hn = I(
4666
+ (k) => {
4667
+ const w = typeof k == "function" ? k(We.current) : k;
4668
+ We.current = w, ft((S) => w);
4669
+ },
4670
+ []
4671
+ ), gt = W(!1);
4672
+ ee(() => {
4673
+ if (gt.current)
4674
+ return;
4675
+ ne(this, null, function* () {
4676
+ var w;
4677
+ const S = yield pt.availableAgents();
4678
+ (w = S.data) != null && w.availableAgents && Qn(S.data.availableAgents.agents), gt.current = !0;
4679
+ });
4680
+ }, []);
4681
+ let mt = null;
4682
+ r.agent && (mt = {
4683
+ agentName: r.agent
4684
+ });
4685
+ const [Jn, Be] = M(mt);
4686
+ ee(() => {
4687
+ r.agent ? Be({
4688
+ agentName: r.agent
4689
+ }) : Be(null);
4690
+ }, [r.agent]);
4691
+ const [Zn, vt] = M(r.threadId || wr()), _n = I(
4692
+ (k) => {
4693
+ if (r.threadId)
4694
+ throw new Error("Cannot call setThreadId() when threadId is provided via props.");
4695
+ vt(k);
4696
+ },
4697
+ [r.threadId]
4698
+ );
4699
+ ee(() => {
4700
+ r.threadId !== void 0 && vt(r.threadId);
4701
+ }, [r.threadId]);
4702
+ const [$n, er] = M(null), tr = W(null), qe = se(r.showDevConsole), [nr, rr] = M(null), ht = I((k) => {
4703
+ rr((w) => {
4704
+ if (w == null)
4705
+ return k;
4706
+ if (k == null)
4707
+ return null;
4708
+ let S = w.event;
4709
+ return k.event && (S = j(j({}, w.event), k.event)), G(j(j({}, w), k), { event: S });
4710
+ });
4711
+ }, []), ir = I(() => {
4712
+ ht(null);
4713
+ }, []), ar = ie(() => n, [n]), [ve, xt] = M(null), sr = ie(() => {
4714
+ var k;
4715
+ return (k = r.agent) != null ? k : null;
4716
+ }, [r.agent]), or = ie(
4717
+ () => {
4718
+ var k;
4719
+ return (k = r.forwardedParameters) != null ? k : {};
4720
+ },
4721
+ [r.forwardedParameters]
4722
+ ), lr = I(
4723
+ (k) => {
4724
+ x((w) => {
4725
+ const S = typeof k == "function" ? k(w) : k;
4726
+ return Object.keys(S).length === Object.keys(w).length && // @ts-ignore
4727
+ Object.entries(S).every(([he, Ye]) => w[he] === Ye) ? w : S;
4728
+ });
4729
+ },
4730
+ [x]
4731
+ ), cr = I(
4732
+ (k) => {
4733
+ p((w) => {
4734
+ const S = typeof k == "function" ? k(w) : k;
4735
+ return Object.keys(S).length === Object.keys(w).length && // @ts-ignore
4736
+ Object.entries(S).every(([he, Ye]) => w[he] === Ye) ? w : S;
4737
+ });
4738
+ },
4739
+ [p]
4740
+ );
4741
+ return /* @__PURE__ */ c.jsxs(
4742
+ An.Provider,
4743
+ {
4744
+ value: {
4745
+ actions: s,
4746
+ chatComponentsCache: u,
4747
+ getFunctionCallHandler: Un,
4748
+ setAction: me,
4749
+ removeAction: Ce,
4750
+ coAgentStateRenders: d,
4751
+ setCoAgentStateRender: Mn,
4752
+ removeCoAgentStateRender: Fn,
4753
+ getContextString: Dn,
4754
+ addContext: jn,
4755
+ removeContext: Ln,
4756
+ getAllContext: Pn,
4757
+ getDocumentsContext: Kn,
4758
+ addDocumentContext: zn,
4759
+ removeDocumentContext: Vn,
4760
+ copilotApiConfig: Z,
4761
+ isLoading: N,
4762
+ setIsLoading: E,
4763
+ chatSuggestionConfiguration: Wn,
4764
+ addChatSuggestionConfiguration: Bn,
4765
+ removeChatSuggestionConfiguration: qn,
4766
+ chatInstructions: O,
4767
+ setChatInstructions: A,
4768
+ additionalInstructions: T,
4769
+ setAdditionalInstructions: F,
4770
+ showDevConsole: qe,
4771
+ coagentStates: Xn,
4772
+ setCoagentStates: ft,
4773
+ coagentStatesRef: We,
4774
+ setCoagentStatesWithRef: Hn,
4775
+ agentSession: Jn,
4776
+ setAgentSession: Be,
4777
+ runtimeClient: pt,
4778
+ forwardedParameters: or,
4779
+ agentLock: sr,
4780
+ threadId: Zn,
4781
+ setThreadId: _n,
4782
+ runId: $n,
4783
+ setRunId: er,
4784
+ chatAbortControllerRef: tr,
4785
+ availableAgents: Yn,
4786
+ authConfig_c: r.authConfig_c,
4787
+ authStates_c: R,
4788
+ setAuthStates_c: cr,
4789
+ extensions: b,
4790
+ setExtensions: lr,
4791
+ langGraphInterruptAction: nr,
4792
+ setLangGraphInterruptAction: ht,
4793
+ removeLangGraphInterruptAction: ir,
4794
+ onError: r.onError,
4795
+ bannerError: ve,
4796
+ setBannerError: xt
4797
+ },
4798
+ children: [
4799
+ /* @__PURE__ */ c.jsx(zi, { children: /* @__PURE__ */ c.jsxs(Vi, { children: [
4800
+ ar,
4801
+ qe && /* @__PURE__ */ c.jsx(Ji, {})
4802
+ ] }) }),
4803
+ ve && qe && /* @__PURE__ */ c.jsx(
4804
+ bn,
4805
+ {
4806
+ severity: ve.severity,
4807
+ message: ve.message,
4808
+ onClose: () => xt(null),
4809
+ actions: kn(ve)
4810
+ }
4811
+ )
4812
+ ]
4813
+ }
4814
+ );
4815
+ }
4816
+ var zt = ["global"];
4817
+ function la(e) {
4818
+ return (t) => ne(this, [t], function* ({ name: n, args: r }) {
4819
+ let i = {};
4820
+ for (let l of e)
4821
+ i[l.name] = l;
4822
+ const a = i[n];
4823
+ let s;
4824
+ return a && (yield new Promise((l, d) => {
4825
+ dr(() => ne(this, null, function* () {
4826
+ var o;
4827
+ try {
4828
+ s = yield (o = a.handler) == null ? void 0 : o.call(a, r), l();
4829
+ } catch (u) {
4830
+ d(u);
4831
+ }
4832
+ }));
4833
+ }), yield new Promise((l) => setTimeout(l, 20))), s;
4834
+ });
4835
+ }
4836
+ function ca(e) {
4837
+ return e.replace(/_c$/, "").split("_").map((t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()).join(" ");
4838
+ }
4839
+ function da(e) {
4840
+ const t = Object.keys(e).filter((r) => r.endsWith("_c")), n = e.publicApiKey || e.publicLicenseKey;
4841
+ if (!e.runtimeUrl && !n)
4842
+ throw new Jt(
4843
+ "Missing required prop: 'runtimeUrl' or 'publicApiKey' or 'publicLicenseKey'"
4844
+ );
4845
+ if (t.length > 0 && !n)
4846
+ throw new kr(
4847
+ `Missing required prop: 'publicApiKey' or 'publicLicenseKey' to use cloud features: ${t.map(ca).join(", ")}`
4848
+ );
4849
+ }
4850
+ export {
4851
+ ba as C,
4852
+ va as R,
4853
+ en as T,
4854
+ _t as a,
4855
+ Cr as b,
4856
+ xa as c,
4857
+ ya as d,
4858
+ zt as e,
4859
+ ha as f,
4860
+ ma as i,
4861
+ ut as u
4862
+ };