ant-design-x-vue 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.en.md +6 -0
  2. package/README.md +11 -0
  3. package/dist/index.umd.js +9 -43
  4. package/es/attachments/Attachments2.mjs +50 -51
  5. package/es/attachments/FileList/FileList2.mjs +712 -932
  6. package/es/attachments/PlaceholderUploader.mjs +30 -27
  7. package/es/attachments/SilentUploader.mjs +12 -9
  8. package/es/bubble/Bubble.mjs +36 -36
  9. package/es/sender/components/LoadingButton.mjs +5 -5
  10. package/es/theme/useToken.mjs +54 -310
  11. package/es/thought-chain/hooks/useCollapsible.mjs +25 -17
  12. package/es/use-x-agent/use-x-agent.mjs +41 -34
  13. package/es/use-x-chat/use-x-chat.mjs +98 -69
  14. package/es/x-provider/hooks/use-x-provider-context.mjs +11 -16
  15. package/es/x-request/x-request.mjs +55 -53
  16. package/lib/attachments/Attachments2.js +2 -2
  17. package/lib/attachments/FileList/FileList2.js +4 -4
  18. package/lib/attachments/PlaceholderUploader.js +1 -1
  19. package/lib/attachments/SilentUploader.js +1 -1
  20. package/lib/bubble/Bubble.js +1 -1
  21. package/lib/sender/components/LoadingButton.js +1 -1
  22. package/lib/theme/useToken.js +1 -35
  23. package/lib/thought-chain/hooks/useCollapsible.js +1 -1
  24. package/lib/use-x-agent/use-x-agent.js +1 -1
  25. package/lib/use-x-chat/use-x-chat.js +1 -1
  26. package/lib/x-provider/hooks/use-x-provider-context.js +1 -1
  27. package/lib/x-request/x-request.js +1 -1
  28. package/package.json +1 -1
  29. package/typings/attachments/PlaceholderUploader.vue.d.ts +1 -446
  30. package/typings/attachments/SilentUploader.vue.d.ts +1 -446
  31. package/typings/bubble/Bubble.vue.d.ts +2 -2
  32. package/typings/bubble/index.d.ts +4 -4
  33. package/typings/use-x-agent/use-x-agent.d.ts +3 -1
  34. package/typings/use-x-chat/use-x-chat.d.ts +15 -1
  35. package/typings/x-request/x-request.d.ts +4 -0
@@ -1,271 +1,15 @@
1
- import { u as X } from "../_util/cssinjs/hooks/useCacheToken.tsx2.mjs";
1
+ import { u as M } from "../_util/cssinjs/hooks/useCacheToken.tsx2.mjs";
2
2
  import "../_util/cssinjs/StyleContext.mjs";
3
- import y from "../_util/cssinjs/theme/createTheme.mjs";
3
+ import X from "../_util/cssinjs/theme/createTheme.mjs";
4
4
  import "../_util/warning.mjs";
5
5
  import "../_util/cssinjs/theme/ThemeCache.mjs";
6
- import { computed as x, unref as M } from "vue";
6
+ import { computed as e, unref as v } from "vue";
7
7
  import "../_util/cssinjs/transformers/legacyLogicalProperties.mjs";
8
- import { theme as h } from "ant-design-vue";
9
- import { ignore as z, unitless as L } from "./patch-antd.mjs";
10
- import { T as u } from "../attachments/FileList/FileList2.mjs";
11
- import k from "../version/version.mjs";
12
- function d() {
13
- return d = Object.assign ? Object.assign.bind() : function(r) {
14
- for (var i = 1; i < arguments.length; i++) {
15
- var t = arguments[i];
16
- for (var o in t) ({}).hasOwnProperty.call(t, o) && (r[o] = t[o]);
17
- }
18
- return r;
19
- }, d.apply(null, arguments);
20
- }
21
- function f(r) {
22
- return r >= 0 && r <= 255;
23
- }
24
- function m(r, i) {
25
- const {
26
- r: t,
27
- g: o,
28
- b: e,
29
- a: c
30
- } = new u(r).toRgb();
31
- if (c < 1)
32
- return r;
33
- const {
34
- r: a,
35
- g: s,
36
- b: p
37
- } = new u(i).toRgb();
38
- for (let n = 0.01; n <= 1; n += 0.01) {
39
- const l = Math.round((t - a * (1 - n)) / n), g = Math.round((o - s * (1 - n)) / n), b = Math.round((e - p * (1 - n)) / n);
40
- if (f(l) && f(g) && f(b))
41
- return new u({
42
- r: l,
43
- g,
44
- b,
45
- a: Math.round(n * 100) / 100
46
- }).toRgbString();
47
- }
48
- return new u({
49
- r: t,
50
- g: o,
51
- b: e,
52
- a: 1
53
- }).toRgbString();
54
- }
55
- const w = {
56
- blue: "#1677ff",
57
- purple: "#722ED1",
58
- cyan: "#13C2C2",
59
- green: "#52C41A",
60
- magenta: "#EB2F96",
61
- pink: "#eb2f96",
62
- red: "#F5222D",
63
- orange: "#FA8C16",
64
- yellow: "#FADB14",
65
- volcano: "#FA541C",
66
- geekblue: "#2F54EB",
67
- gold: "#FAAD14",
68
- lime: "#A0D911"
69
- }, B = d(d({}, w), {
70
- // Color
71
- colorPrimary: "#1677ff",
72
- colorSuccess: "#52c41a",
73
- colorWarning: "#faad14",
74
- colorError: "#ff4d4f",
75
- colorInfo: "#1677ff",
76
- colorTextBase: "",
77
- colorBgBase: "",
78
- // Font
79
- fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
80
- 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
81
- 'Noto Color Emoji'`,
82
- fontSize: 14,
83
- // Line
84
- lineWidth: 1,
85
- lineType: "solid",
86
- // Motion
87
- motionUnit: 0.1,
88
- motionBase: 0,
89
- motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
90
- motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
91
- motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
92
- motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
93
- motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
94
- motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
95
- motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
96
- motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
97
- // Radius
98
- borderRadius: 6,
99
- // Size
100
- sizeUnit: 4,
101
- sizeStep: 4,
102
- sizePopupArrow: 16,
103
- // Control Base
104
- controlHeight: 32,
105
- // zIndex
106
- zIndexBase: 0,
107
- zIndexPopupBase: 1e3,
108
- // Image
109
- opacityImage: 1,
110
- // Wireframe
111
- wireframe: !1
112
- });
113
- var C = function(r, i) {
114
- var t = {};
115
- for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && i.indexOf(o) < 0 && (t[o] = r[o]);
116
- if (r != null && typeof Object.getOwnPropertySymbols == "function") for (var e = 0, o = Object.getOwnPropertySymbols(r); e < o.length; e++)
117
- i.indexOf(o[e]) < 0 && Object.prototype.propertyIsEnumerable.call(r, o[e]) && (t[o[e]] = r[o[e]]);
118
- return t;
119
- };
120
- function D(r) {
121
- const {
122
- override: i
123
- } = r, t = C(r, ["override"]), o = d({}, i);
124
- Object.keys(B).forEach((S) => {
125
- delete o[S];
126
- });
127
- const e = d(d({}, t), o), c = 480, a = 576, s = 768, p = 992, n = 1200, l = 1600, g = 2e3;
128
- return d(d(d({}, e), {
129
- colorLink: e.colorInfoText,
130
- colorLinkHover: e.colorInfoHover,
131
- colorLinkActive: e.colorInfoActive,
132
- // ============== Background ============== //
133
- colorFillContent: e.colorFillSecondary,
134
- colorFillContentHover: e.colorFill,
135
- colorFillAlter: e.colorFillQuaternary,
136
- colorBgContainerDisabled: e.colorFillTertiary,
137
- // ============== Split ============== //
138
- colorBorderBg: e.colorBgContainer,
139
- colorSplit: m(e.colorBorderSecondary, e.colorBgContainer),
140
- // ============== Text ============== //
141
- colorTextPlaceholder: e.colorTextQuaternary,
142
- colorTextDisabled: e.colorTextQuaternary,
143
- colorTextHeading: e.colorText,
144
- colorTextLabel: e.colorTextSecondary,
145
- colorTextDescription: e.colorTextTertiary,
146
- colorTextLightSolid: e.colorWhite,
147
- colorHighlight: e.colorError,
148
- colorBgTextHover: e.colorFillSecondary,
149
- colorBgTextActive: e.colorFill,
150
- colorIcon: e.colorTextTertiary,
151
- colorIconHover: e.colorText,
152
- colorErrorOutline: m(e.colorErrorBg, e.colorBgContainer),
153
- colorWarningOutline: m(e.colorWarningBg, e.colorBgContainer),
154
- // Font
155
- fontSizeIcon: e.fontSizeSM,
156
- // Control
157
- lineWidth: e.lineWidth,
158
- controlOutlineWidth: e.lineWidth * 2,
159
- // Checkbox size and expand icon size
160
- controlInteractiveSize: e.controlHeight / 2,
161
- controlItemBgHover: e.colorFillTertiary,
162
- controlItemBgActive: e.colorPrimaryBg,
163
- controlItemBgActiveHover: e.colorPrimaryBgHover,
164
- controlItemBgActiveDisabled: e.colorFill,
165
- controlTmpOutline: e.colorFillQuaternary,
166
- controlOutline: m(e.colorPrimaryBg, e.colorBgContainer),
167
- lineType: e.lineType,
168
- borderRadius: e.borderRadius,
169
- borderRadiusXS: e.borderRadiusXS,
170
- borderRadiusSM: e.borderRadiusSM,
171
- borderRadiusLG: e.borderRadiusLG,
172
- fontWeightStrong: 600,
173
- opacityLoading: 0.65,
174
- linkDecoration: "none",
175
- linkHoverDecoration: "none",
176
- linkFocusDecoration: "none",
177
- controlPaddingHorizontal: 12,
178
- controlPaddingHorizontalSM: 8,
179
- paddingXXS: e.sizeXXS,
180
- paddingXS: e.sizeXS,
181
- paddingSM: e.sizeSM,
182
- padding: e.size,
183
- paddingMD: e.sizeMD,
184
- paddingLG: e.sizeLG,
185
- paddingXL: e.sizeXL,
186
- paddingContentHorizontalLG: e.sizeLG,
187
- paddingContentVerticalLG: e.sizeMS,
188
- paddingContentHorizontal: e.sizeMS,
189
- paddingContentVertical: e.sizeSM,
190
- paddingContentHorizontalSM: e.size,
191
- paddingContentVerticalSM: e.sizeXS,
192
- marginXXS: e.sizeXXS,
193
- marginXS: e.sizeXS,
194
- marginSM: e.sizeSM,
195
- margin: e.size,
196
- marginMD: e.sizeMD,
197
- marginLG: e.sizeLG,
198
- marginXL: e.sizeXL,
199
- marginXXL: e.sizeXXL,
200
- boxShadow: `
201
- 0 1px 2px 0 rgba(0, 0, 0, 0.03),
202
- 0 1px 6px -1px rgba(0, 0, 0, 0.02),
203
- 0 2px 4px 0 rgba(0, 0, 0, 0.02)
204
- `,
205
- boxShadowSecondary: `
206
- 0 6px 16px 0 rgba(0, 0, 0, 0.08),
207
- 0 3px 6px -4px rgba(0, 0, 0, 0.12),
208
- 0 9px 28px 8px rgba(0, 0, 0, 0.05)
209
- `,
210
- boxShadowTertiary: `
211
- 0 1px 2px 0 rgba(0, 0, 0, 0.03),
212
- 0 1px 6px -1px rgba(0, 0, 0, 0.02),
213
- 0 2px 4px 0 rgba(0, 0, 0, 0.02)
214
- `,
215
- screenXS: c,
216
- screenXSMin: c,
217
- screenXSMax: a - 1,
218
- screenSM: a,
219
- screenSMMin: a,
220
- screenSMMax: s - 1,
221
- screenMD: s,
222
- screenMDMin: s,
223
- screenMDMax: p - 1,
224
- screenLG: p,
225
- screenLGMin: p,
226
- screenLGMax: n - 1,
227
- screenXL: n,
228
- screenXLMin: n,
229
- screenXLMax: l - 1,
230
- screenXXL: l,
231
- screenXXLMin: l,
232
- screenXXLMax: g - 1,
233
- screenXXXL: g,
234
- screenXXXLMin: g,
235
- // FIXME: component box-shadow, should be removed
236
- boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
237
- boxShadowCard: `
238
- 0 1px 2px -2px ${new u("rgba(0, 0, 0, 0.16)").toRgbString()},
239
- 0 3px 6px 0 ${new u("rgba(0, 0, 0, 0.12)").toRgbString()},
240
- 0 5px 12px 4px ${new u("rgba(0, 0, 0, 0.09)").toRgbString()}
241
- `,
242
- boxShadowDrawerRight: `
243
- -6px 0 16px 0 rgba(0, 0, 0, 0.08),
244
- -3px 0 6px -4px rgba(0, 0, 0, 0.12),
245
- -9px 0 28px 8px rgba(0, 0, 0, 0.05)
246
- `,
247
- boxShadowDrawerLeft: `
248
- 6px 0 16px 0 rgba(0, 0, 0, 0.08),
249
- 3px 0 6px -4px rgba(0, 0, 0, 0.12),
250
- 9px 0 28px 8px rgba(0, 0, 0, 0.05)
251
- `,
252
- boxShadowDrawerUp: `
253
- 0 6px 16px 0 rgba(0, 0, 0, 0.08),
254
- 0 3px 6px -4px rgba(0, 0, 0, 0.12),
255
- 0 9px 28px 8px rgba(0, 0, 0, 0.05)
256
- `,
257
- boxShadowDrawerDown: `
258
- 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
259
- 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
260
- 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
261
- `,
262
- boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
263
- boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
264
- boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
265
- boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
266
- }), o);
267
- }
268
- const O = y(h.defaultAlgorithm), I = {
8
+ import { theme as l } from "ant-design-vue";
9
+ import { ignore as g, unitless as x } from "./patch-antd.mjs";
10
+ import L from "ant-design-vue/es/theme/util/alias";
11
+ import S from "../version/version.mjs";
12
+ const D = X(l.defaultAlgorithm), y = {
269
13
  screenXS: !0,
270
14
  screenXSMin: !0,
271
15
  screenXSMax: !0,
@@ -283,69 +27,69 @@ const O = y(h.defaultAlgorithm), I = {
283
27
  screenXLMax: !0,
284
28
  screenXXL: !0,
285
29
  screenXXLMin: !0
286
- }, T = (r, i, t) => {
287
- const o = t.getDerivativeToken(r), { override: e, ...c } = i;
288
- let a = {
289
- ...o,
290
- override: e
30
+ }, d = (s, c, u) => {
31
+ const n = u.getDerivativeToken(s), { override: h, ...t } = c;
32
+ let r = {
33
+ ...n,
34
+ override: h
291
35
  };
292
- return a = D(a), c && Object.entries(c).forEach(([s, p]) => {
293
- const { theme: n, ...l } = p;
294
- let g = l;
295
- n && (g = T(
36
+ return r = L(r), t && Object.entries(t).forEach(([a, m]) => {
37
+ const { theme: o, ...i } = m;
38
+ let k = i;
39
+ o && (k = d(
296
40
  {
297
- ...a,
298
- ...l
41
+ ...r,
42
+ ...i
299
43
  },
300
44
  {
301
- override: l
45
+ override: i
302
46
  },
303
- n
304
- )), a[s] = g;
305
- }), a;
47
+ o
48
+ )), r[a] = k;
49
+ }), r;
306
50
  };
307
- function A() {
308
- const { token: r, hashId: i, theme: t } = h.useToken(), o = x(() => ({
309
- token: r.value,
310
- hashed: i.value,
311
- theme: t.value
51
+ function I() {
52
+ const { token: s, hashId: c, theme: u } = l.useToken(), n = e(() => ({
53
+ token: s.value,
54
+ hashed: c.value,
55
+ theme: u.value
312
56
  })), {
313
57
  // @ts-expect-error
314
- override: e,
58
+ override: h,
315
59
  // @ts-expect-error
316
- cssVar: c
317
- } = M(o), a = x(() => o.value.token), s = x(() => o.value.hashed), p = x(() => o.value.theme ?? O), n = X(
60
+ cssVar: t
61
+ } = v(n), r = e(() => n.value.token), a = e(() => n.value.hashed), m = e(() => n.value.theme ?? D), o = M(
318
62
  // @ts-expect-error
319
- x(() => p.value),
320
- x(() => [h.defaultSeed, a.value]),
321
- x(() => ({
322
- salt: `${k}-${s.value || ""}`,
323
- override: e,
324
- getComputedToken: T,
325
- cssVar: c && {
326
- prefix: c.prefix,
327
- key: c.key,
328
- unitless: L,
329
- ignore: z,
330
- preserve: I
63
+ e(() => m.value),
64
+ e(() => [l.defaultSeed, r.value]),
65
+ e(() => ({
66
+ salt: `${S}-${a.value || ""}`,
67
+ override: h,
68
+ getComputedToken: d,
69
+ cssVar: t && {
70
+ prefix: t.prefix,
71
+ key: t.key,
72
+ unitless: x,
73
+ ignore: g,
74
+ preserve: y
331
75
  }
332
76
  }))
333
77
  ), [
334
- l,
78
+ i,
335
79
  // token
336
- g,
80
+ k,
337
81
  // hashId
338
82
  // @ts-expect-error
339
- b
340
- ] = M(n), S = x(() => n.value[0]), v = x(() => s.value ? n.value[1] : "");
341
- return [p, b, v, S, c];
83
+ p
84
+ ] = v(o), f = e(() => o.value[0]), T = e(() => a.value ? o.value[1] : "");
85
+ return [m, p, T, f, t];
342
86
  }
343
- function $() {
344
- const [r, i, t] = A();
345
- return { theme: r, token: i, hashId: t };
87
+ function q() {
88
+ const [s, c, u] = I();
89
+ return { theme: s, token: c, hashId: u };
346
90
  }
347
91
  export {
348
- $ as default,
349
- T as getComputedToken,
350
- A as useInternalToken
92
+ q as default,
93
+ d as getComputedToken,
94
+ I as useInternalToken
351
95
  };
@@ -1,33 +1,41 @@
1
1
  import r from "../../_util/hooks/use-state.mjs";
2
- import { computed as t, toValue as x } from "vue";
3
- const b = (d, c, m) => {
4
- const n = t(() => {
5
- const a = x(d);
6
- let e = {
2
+ import { computed as p, toValue as u, watch as c } from "vue";
3
+ const b = (t, f, m) => {
4
+ const n = p(() => {
5
+ const e = u(t);
6
+ let a = {
7
7
  expandedKeys: [],
8
8
  onExpand: () => {
9
9
  }
10
10
  };
11
- return a ? (typeof a == "object" && (e = { ...e, ...a }), {
11
+ return e ? (typeof e == "object" && (a = { ...a, ...e }), {
12
12
  enableCollapse: !0,
13
- customizeExpandedKeys: e.expandedKeys,
14
- customizeOnExpand: e.onExpand
13
+ customizeExpandedKeys: a.expandedKeys,
14
+ customizeOnExpand: a.onExpand
15
15
  }) : {
16
16
  enableCollapse: !1,
17
- customizeExpandedKeys: e.expandedKeys,
18
- customizeOnExpand: e.onExpand
17
+ customizeExpandedKeys: a.expandedKeys,
18
+ customizeOnExpand: a.onExpand
19
19
  };
20
- }), [s, p] = r(n.value.customizeExpandedKeys), u = (a) => {
21
- var l, o;
20
+ }), [s, o] = r(n.value.customizeExpandedKeys), i = (e) => {
21
+ var l, d;
22
22
  if (!n.value.enableCollapse)
23
23
  return;
24
- const e = s.value.includes(a) ? s.value.filter((i) => i !== a) : [...s.value, a];
25
- (o = (l = n.value).customizeOnExpand) == null || o.call(l, e), p(e);
24
+ const a = s.value.includes(e) ? s.value.filter((x) => x !== e) : [...s.value, e];
25
+ (d = (l = n.value).customizeOnExpand) == null || d.call(l, a), typeof u(t) != "object" && o(a);
26
26
  };
27
- return [
28
- t(() => n.value.enableCollapse),
27
+ return c(
28
+ n,
29
+ (e) => {
30
+ o(e.customizeExpandedKeys);
31
+ },
32
+ {
33
+ deep: 1
34
+ }
35
+ ), [
36
+ p(() => n.value.enableCollapse),
29
37
  s,
30
- u
38
+ i
31
39
  // collapseMotion,
32
40
  ];
33
41
  };
@@ -1,49 +1,56 @@
1
- import h from "../x-request/x-request.mjs";
2
- import { computed as p } from "vue";
3
- let u = 0;
4
- class q {
5
- constructor(s) {
6
- this.requestingMap = {}, this.request = (e, o) => {
7
- const { request: n } = this.config, { onUpdate: a, onSuccess: c, onError: g } = o, t = u;
8
- u += 1, this.requestingMap[t] = !0, n == null || n(e, {
9
- // Status should be unique.
10
- // One get success or error should not get more message
11
- onUpdate: (i) => {
12
- this.requestingMap[t] && a(i);
1
+ import p from "../x-request/x-request.mjs";
2
+ import { computed as f, ref as q } from "vue";
3
+ let a = 0;
4
+ class d {
5
+ constructor(i) {
6
+ this.requestingMap = q({}), this.request = (s, o, g) => {
7
+ const { request: n } = this.config, { onUpdate: c, onSuccess: h, onError: l, onStream: u } = o, e = a;
8
+ a += 1, this.requestingMap.value[e] = !0, n == null || n(
9
+ s,
10
+ {
11
+ onStream: (t) => {
12
+ this.requestingMap.value[e] && (u == null || u(t));
13
+ },
14
+ // Status should be unique.
15
+ // One get success or error should not get more message
16
+ onUpdate: (t) => {
17
+ this.requestingMap.value[e] && c(t);
18
+ },
19
+ onSuccess: (t) => {
20
+ this.requestingMap.value[e] && (h(t), this.finishRequest(e));
21
+ },
22
+ onError: (t) => {
23
+ this.requestingMap.value[e] && (l(t), this.finishRequest(e));
24
+ }
13
25
  },
14
- onSuccess: (i) => {
15
- this.requestingMap[t] && (c(i), this.finishRequest(t));
16
- },
17
- onError: (i) => {
18
- this.requestingMap[t] && (g(i), this.finishRequest(t));
19
- }
20
- });
21
- }, this.config = s;
26
+ g
27
+ );
28
+ }, this.config = i;
22
29
  }
23
- finishRequest(s) {
24
- delete this.requestingMap[s];
30
+ finishRequest(i) {
31
+ delete this.requestingMap.value[i];
25
32
  }
26
33
  isRequesting() {
27
- return Object.keys(this.requestingMap).length > 0;
34
+ return Object.keys(this.requestingMap.value).length > 0;
28
35
  }
29
36
  }
30
- function l(r) {
31
- const { request: s, ...e } = r;
37
+ function v(r) {
38
+ const { request: i, ...s } = r;
32
39
  return [
33
- p(
34
- () => new q({
40
+ f(
41
+ () => new d({
35
42
  // @ts-expect-error
36
- request: s || h({
37
- baseURL: e.baseURL,
38
- model: e.model,
39
- dangerouslyApiKey: e.dangerouslyApiKey
43
+ request: i || p({
44
+ baseURL: s.baseURL,
45
+ model: s.model,
46
+ dangerouslyApiKey: s.dangerouslyApiKey
40
47
  }).create,
41
- ...e
48
+ ...s
42
49
  })
43
50
  )
44
51
  ];
45
52
  }
46
53
  export {
47
- q as XAgent,
48
- l as default
54
+ d as XAgent,
55
+ v as default
49
56
  };