@glodon-aiot/agent-cli-ui 3.16.0-alpha.38 → 3.16.0-alpha.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,213 +1,201 @@
1
- var I = (L, P, g) => new Promise((c, N) => {
2
- var R = (h) => {
1
+ var L = (M, P, u) => new Promise((a, I) => {
2
+ var R = (f) => {
3
3
  try {
4
- C(g.next(h));
5
- } catch (S) {
6
- N(S);
4
+ C(u.next(f));
5
+ } catch (F) {
6
+ I(F);
7
7
  }
8
- }, A = (h) => {
8
+ }, w = (f) => {
9
9
  try {
10
- C(g.throw(h));
11
- } catch (S) {
12
- N(S);
10
+ C(u.throw(f));
11
+ } catch (F) {
12
+ I(F);
13
13
  }
14
- }, C = (h) => h.done ? c(h.value) : Promise.resolve(h.value).then(R, A);
15
- C((g = g.apply(L, P)).next());
14
+ }, C = (f) => f.done ? a(f.value) : Promise.resolve(f.value).then(R, w);
15
+ C((u = u.apply(M, P)).next());
16
16
  });
17
- import { jsx as r, Fragment as le, jsxs as b } from "react/jsx-runtime";
18
- import { Upload as W, Button as M, message as o, Badge as ue, Spin as fe, Popover as ge, Space as me } from "antd";
19
- import { forwardRef as he, useState as E, useRef as G, useContext as pe, useEffect as z, useImperativeHandle as xe } from "react";
20
- import { LoadingOutlined as ye, CloseCircleFilled as Ce, CloudUploadOutlined as be } from "@ant-design/icons";
21
- /* empty css */import Se from "lodash/debounce";
22
- import Ne from "./FileCard/index.mjs";
23
- import { IFileOrigin as we } from "@glodon-aiot/apis";
24
- import Fe from "./ClearModal/index.mjs";
25
- import j from "../../../../components/Iconfont/index.mjs";
26
- import ve from "../../../../context.mjs";
27
- import { isValidImageUrlWithAnyExtension as Ie, FILE_NAME_MAX_LENGTH as X, fileTypes as Ee } from "../../../../utils/index.mjs";
28
- import { MB as ze } from "../../../../constant.mjs";
29
- const Ae = he((L, P) => {
17
+ import { jsx as r, Fragment as fe, jsxs as g } from "react/jsx-runtime";
18
+ import { message as Z, Upload as q, Button as _, Badge as he, Spin as me, Popover as ge, Space as ye } from "antd";
19
+ import { forwardRef as xe, useState as A, useRef as J, useContext as Ce, useEffect as N, useImperativeHandle as Se } from "react";
20
+ import { LoadingOutlined as Fe, CloseCircleFilled as Ne, CloudUploadOutlined as Ie } from "@ant-design/icons";
21
+ /* empty css */import we from "lodash/debounce";
22
+ import Ee from "./FileCard/index.mjs";
23
+ import { IFileOrigin as be } from "@glodon-aiot/apis";
24
+ import ze from "./ClearModal/index.mjs";
25
+ import $ from "../../../../components/Iconfont/index.mjs";
26
+ import Le from "../../../../context.mjs";
27
+ import { FILE_NAME_MAX_LENGTH as Q, fileTypes as Ae, isValidImageUrlWithAnyExtension as Ue } from "../../../../utils/index.mjs";
28
+ import { MB as ke } from "../../../../constant.mjs";
29
+ const j = 50, U = 10, ve = xe((M, P) => {
30
30
  const {
31
- appId: g,
32
- sid: c,
33
- onStatusChange: N,
31
+ appId: u,
32
+ sid: a,
33
+ onStatusChange: I,
34
34
  createSession: R,
35
- disabled: A = !1,
35
+ disabled: w = !1,
36
36
  afterFileAdd: C,
37
- afterFileDelete: h,
38
- onFileListChange: S,
37
+ afterFileDelete: f,
38
+ onFileListChange: F,
39
39
  shouldContinue: D = !0,
40
40
  afterFilesClear: K,
41
- docViewerUrl: q,
42
- isFirstSession: J
43
- } = L, [d, m] = E([]), f = G(d), [Q, U] = E([]), [Y, T] = E(!1), [w, k] = E(""), F = G(D), [$, B] = E(!1), {
44
- Dragger: Z
45
- } = W, {
46
- service: a,
47
- popupContainer: t
48
- } = pe(ve);
49
- z(() => {
50
- F.current = D;
51
- }, [D]), xe(P, () => ({
52
- update: H,
53
- clear: _
54
- })), z(() => {
55
- J || (U([]), m([]), H());
56
- }, [c]);
57
- const H = () => c ? new Promise((e, i) => {
58
- a == null || a.getApplicationIdSessionKnowledgeFiles(g, c, {
41
+ docViewerUrl: Y,
42
+ isFirstSession: ee
43
+ } = M, [i, p] = A([]), c = J(i), [ne, k] = A([]), [te, O] = A(!1), [E, v] = A(""), b = J(D), [B, H] = A(!1), {
44
+ Dragger: se
45
+ } = q, {
46
+ service: o,
47
+ popupContainer: S
48
+ } = Ce(Le);
49
+ N(() => {
50
+ b.current = D;
51
+ }, [D]), Se(P, () => ({
52
+ update: V,
53
+ clear: X,
54
+ appendFiles: (e) => {
55
+ if (w)
56
+ return;
57
+ Array.from(e || []).forEach((n) => {
58
+ T(n);
59
+ });
60
+ }
61
+ })), N(() => {
62
+ ee || (k([]), p([]), V());
63
+ }, [a]);
64
+ const V = () => a ? new Promise((e, s) => {
65
+ o == null || o.getApplicationIdSessionKnowledgeFiles(u, a, {
59
66
  //1是未开启
60
67
  enabled: 1
61
- }).then((s) => {
62
- U(s), m(s), ee(s);
68
+ }).then((n) => {
69
+ k(n), p(n), re(n);
63
70
  }).finally(() => {
64
71
  e();
65
72
  });
66
- }) : Promise.resolve(), ee = (e) => I(void 0, null, function* () {
67
- c && (e == null || e.map((i) => I(void 0, null, function* () {
68
- var s;
73
+ }) : Promise.resolve(), re = (e) => L(void 0, null, function* () {
74
+ a && (e == null || e.map((s) => L(void 0, null, function* () {
75
+ var n;
69
76
  try {
70
- if (yield a == null ? void 0 : a.checkFileReady(g, c, i.id)) {
71
- const l = [...f.current], p = e.findIndex((u) => u.id === i.id);
72
- p !== -1 && (l[p].status = 2), m(l), C && C(i, c);
77
+ if (yield o == null ? void 0 : o.checkFileReady(u, a, s.id)) {
78
+ const l = [...c.current], h = e.findIndex((d) => d.id === s.id);
79
+ h !== -1 && (l[h].status = 2), p(l), C && C(s, a);
73
80
  }
74
- } catch (n) {
75
- if (((s = n.cause) == null ? void 0 : s.code) === -101) {
76
- const l = [...f.current], p = e.findIndex((u) => u.id === i.id);
77
- p !== -1 && (l[p].status = 3), m(l);
81
+ } catch (t) {
82
+ if (((n = t.cause) == null ? void 0 : n.code) === -101) {
83
+ const l = [...c.current], h = e.findIndex((d) => d.id === s.id);
84
+ h !== -1 && (l[h].status = 3), p(l);
78
85
  return;
79
86
  }
80
87
  }
81
88
  })));
82
89
  });
83
- z(() => {
84
- N && N(w);
85
- }, [w]);
86
- const O = (e) => I(void 0, null, function* () {
90
+ N(() => {
91
+ Z.config({
92
+ getContainer: () => (S == null ? void 0 : S.current) || document.body,
93
+ prefixCls: "gbot-message",
94
+ maxCount: 5
95
+ });
96
+ }, [S]), N(() => {
97
+ I && I(E);
98
+ }, [E]);
99
+ const y = (e, s) => {
100
+ Z.open({
101
+ type: e,
102
+ content: s
103
+ });
104
+ }, T = (e) => L(void 0, null, function* () {
87
105
  if (e.size <= 0)
88
- return o.config({
89
- getContainer: () => (t == null ? void 0 : t.current) || document.body,
90
- prefixCls: "gbot-message"
91
- }), o.error("该文件为空,请重新上传文档"), o.config({
92
- getContainer: void 0,
93
- prefixCls: "gbot-message"
94
- }), !1;
95
- if (e.name.length > X)
96
- return o.config({
97
- getContainer: () => (t == null ? void 0 : t.current) || document.body,
98
- prefixCls: "gbot-message"
99
- }), o.error(`文件名称不能超过${X}字符`), o.config({
100
- getContainer: void 0,
101
- prefixCls: "gbot-message"
102
- }), !1;
103
- if (e.size > 50 * ze)
104
- return o.config({
105
- getContainer: () => (t == null ? void 0 : t.current) || document.body,
106
- prefixCls: "gbot-message"
107
- }), o.error(`${e.name}文件大小不能超过 50M`), o.config({
108
- getContainer: void 0,
109
- prefixCls: "gbot-message"
110
- }), !1;
111
- if (Ee.some((n) => n === e.type)) {
112
- const n = e;
113
- n.status = 1, m((l) => l.length >= 10 ? l : [...l, n]);
106
+ return y("error", "该文件为空,请重新上传文档"), !1;
107
+ if (e.name.length > Q)
108
+ return y("error", `文件名称不能超过${Q}字符`), !1;
109
+ if (e.size > j * ke)
110
+ return y("error", `${e.name}文件大小不能超过 ${j}M`), !1;
111
+ if (Ae.some((t) => t === e.type)) {
112
+ const t = e;
113
+ t.status = 1, p((l) => l.length >= U ? (W(`文件最多上传${U}个`), l) : [...l, t]);
114
114
  } else
115
- oe("存在文件格式不正确的文件,已自动去除");
115
+ W("存在文件格式不正确的文件,已自动去除");
116
116
  return !1;
117
117
  });
118
- z(() => {
119
- if (d.length < 10 ? T(!1) : T(!0), !d.length) {
120
- k("");
118
+ N(() => {
119
+ if (i.length < U ? O(!1) : O(!0), !i.length) {
120
+ v("");
121
121
  return;
122
122
  }
123
- const e = d.find((n) => n.status === 1), i = d.find((n) => n.status === 3);
124
- d.every((n) => n.status === 2) ? k("successed") : e ? k("process") : i && k("failed"), S && S(d);
125
- }, [d]), z(() => {
126
- f.current = d;
127
- const e = d.filter((i) => !Q.includes(i));
128
- se(e), U(d);
129
- }, [d]);
130
- const te = (e, i, s) => I(void 0, null, function* () {
131
- var p;
132
- const n = [...f.current], l = f.current.findIndex((u) => u === s);
133
- l !== -1 && (n[l].id = i), m(n);
123
+ const e = i.find((t) => t.status === 1), s = i.find((t) => t.status === 3);
124
+ i.every((t) => t.status === 2) ? v("successed") : e ? v("process") : s && v("failed"), F && F(i);
125
+ }, [i]), N(() => {
126
+ c.current = i;
127
+ const e = i.filter((s) => !ne.includes(s));
128
+ ae(e), k(i);
129
+ }, [i]);
130
+ const oe = (e, s, n) => L(void 0, null, function* () {
131
+ var h;
132
+ const t = [...c.current], l = c.current.findIndex((d) => d === n);
133
+ l !== -1 && (t[l].id = s), p(t);
134
134
  try {
135
- const u = yield a == null ? void 0 : a.checkFileReady(g, e, i, () => F.current, void 0, (x) => {
136
- const y = [...f.current], v = f.current.findIndex((ce) => ce === s);
137
- y[v].url = x.url, m(y);
135
+ const d = yield o == null ? void 0 : o.checkFileReady(u, e, s, () => b.current, void 0, (m) => {
136
+ const x = [...c.current], z = c.current.findIndex((pe) => pe === n);
137
+ x[z].url = m.url, p(x);
138
138
  });
139
- if (u) {
140
- const x = [...f.current], y = f.current.findIndex((v) => v === s);
141
- y !== -1 && (x[y].status = 2, x[y].url = u.url), m(x), C && C(u, e);
139
+ if (d) {
140
+ const m = [...c.current], x = c.current.findIndex((z) => z === n);
141
+ x !== -1 && (m[x].status = 2, m[x].url = d.url), p(m), C && C(d, e);
142
142
  }
143
- } catch (u) {
144
- if (((p = u.cause) == null ? void 0 : p.code) === -101) {
145
- const x = [...f.current], y = f.current.findIndex((v) => v === s);
146
- y !== -1 && (x[y].status = 3), m(x);
143
+ } catch (d) {
144
+ if (((h = d.cause) == null ? void 0 : h.code) === -101) {
145
+ const m = [...c.current], x = c.current.findIndex((z) => z === n);
146
+ x !== -1 && (m[x].status = 3), p(m);
147
147
  return;
148
148
  }
149
149
  }
150
- }), ne = () => c ? Promise.resolve(c) : R(), se = (e) => {
151
- e.length && ne().then((i) => {
152
- e == null || e.forEach((s) => {
153
- var n;
154
- F.current = !0, (n = de(i, s)) == null || n.then((l) => {
155
- var u;
150
+ }), ie = () => a ? Promise.resolve(a) : R(), ae = (e) => {
151
+ e.length && ie().then((s) => {
152
+ e == null || e.forEach((n) => {
153
+ var t;
154
+ b.current = !0, (t = ue(s, n)) == null || t.then((l) => {
155
+ var d;
156
156
  if (!l)
157
157
  return;
158
- const p = {
158
+ const h = {
159
159
  url: l,
160
- name: s.name,
161
- size: s.size,
160
+ name: n.name,
161
+ size: n.size,
162
162
  type: 1,
163
- origin: we.AECPILOT
163
+ origin: be.AECPILOT
164
164
  };
165
- F.current && ((u = re(i, p)) == null || u.then((x) => te(i, x, s)));
165
+ b.current && ((d = le(s, h)) == null || d.then((m) => oe(s, m, n)));
166
166
  });
167
167
  });
168
168
  });
169
- }, re = (e, i) => a == null ? void 0 : a.postApplicationIdSessionKnowledgeSessionFile(g, e, i), oe = Se((e) => {
170
- o.config({
171
- getContainer: () => (t == null ? void 0 : t.current) || document.body,
172
- prefixCls: "gbot-message"
173
- }), o.error(e), o.config({
174
- getContainer: void 0,
175
- prefixCls: "gbot-message"
176
- });
177
- }, 300), ie = (e) => {
178
- c && e != null && e.id && (a == null || a.delApplicationIdSessionKnowledgeFileId(g, c, e.id).then((i) => {
179
- const s = d.filter((n) => n.id !== e.id);
180
- m(s), o.config({
181
- getContainer: () => (t == null ? void 0 : t.current) || document.body,
182
- prefixCls: "gbot-message"
183
- }), o.success("删除成功"), o.config({
184
- getContainer: void 0,
185
- prefixCls: "gbot-message"
186
- }), h && h(e.id);
169
+ }, le = (e, s) => o == null ? void 0 : o.postApplicationIdSessionKnowledgeSessionFile(u, e, s), W = we((e) => {
170
+ y("error", e);
171
+ }, 300), de = (e) => {
172
+ a && e != null && e.id && (o == null || o.delApplicationIdSessionKnowledgeFileId(u, a, e.id).then((s) => {
173
+ const n = i.filter((t) => t.id !== e.id);
174
+ p(n), y("success", "删除成功"), f && f(e.id);
187
175
  }));
188
- }, ae = /* @__PURE__ */ r(le, {
189
- children: /* @__PURE__ */ b("div", {
176
+ }, ce = /* @__PURE__ */ r(fe, {
177
+ children: /* @__PURE__ */ g("div", {
190
178
  className: "card-title",
191
179
  children: [/* @__PURE__ */ r("span", {
192
180
  className: "name",
193
181
  children: "上传列表"
194
- }), /* @__PURE__ */ b("div", {
182
+ }), /* @__PURE__ */ g("div", {
195
183
  className: "actions",
196
- children: [/* @__PURE__ */ r(W, {
184
+ children: [/* @__PURE__ */ r(q, {
197
185
  accept: ".doc, .docx, .pdf",
198
- beforeUpload: O,
186
+ beforeUpload: T,
199
187
  showUploadList: !1,
200
188
  style: {
201
189
  margin: 0
202
190
  },
203
191
  multiple: !0,
204
- children: /* @__PURE__ */ r(M, {
192
+ children: /* @__PURE__ */ r(_, {
205
193
  className: "action",
206
194
  type: "link",
207
- disabled: Y,
208
- children: /* @__PURE__ */ b("div", {
195
+ disabled: te,
196
+ children: /* @__PURE__ */ g("div", {
209
197
  className: "detail",
210
- children: [/* @__PURE__ */ r(j, {
198
+ children: [/* @__PURE__ */ r($, {
211
199
  type: "icon-tianjia",
212
200
  style: {
213
201
  fontSize: 16
@@ -217,16 +205,16 @@ const Ae = he((L, P) => {
217
205
  })]
218
206
  })
219
207
  })
220
- }), /* @__PURE__ */ r(M, {
208
+ }), /* @__PURE__ */ r(_, {
221
209
  className: "action",
222
210
  type: "link",
223
- disabled: !d.length,
211
+ disabled: !i.length,
224
212
  onClick: () => {
225
- B(!0);
213
+ H(!0);
226
214
  },
227
- children: /* @__PURE__ */ b("div", {
215
+ children: /* @__PURE__ */ g("div", {
228
216
  className: "detail",
229
- children: [/* @__PURE__ */ r(j, {
217
+ children: [/* @__PURE__ */ r($, {
230
218
  type: "icon-shanchu",
231
219
  style: {
232
220
  fontSize: 16
@@ -238,59 +226,53 @@ const Ae = he((L, P) => {
238
226
  })]
239
227
  })]
240
228
  })
241
- }), de = (e, i) => {
229
+ }), ue = (e, s) => {
242
230
  if (!e)
243
231
  throw Error("session is not exist.");
244
- return a == null ? void 0 : a.uploadFile(e, i).catch(() => (o.config({
245
- getContainer: () => (t == null ? void 0 : t.current) || document.body,
246
- prefixCls: "gbot-message"
247
- }), o.error("服务异常,请稍后再试"), o.config({
248
- getContainer: void 0,
249
- prefixCls: "gbot-message"
250
- }), ""));
251
- }, V = /* @__PURE__ */ r("div", {
252
- className: `upload-enter ${A ? "disabled" : ""}`,
253
- children: /* @__PURE__ */ r(ue, {
232
+ return o == null ? void 0 : o.uploadFile(e, s).catch(() => (y("error", "服务异常,请稍后再试"), ""));
233
+ }, G = /* @__PURE__ */ r("div", {
234
+ className: `upload-enter ${w ? "disabled" : ""}`,
235
+ children: /* @__PURE__ */ r(he, {
254
236
  size: "small",
255
237
  color: "#9C24F2",
256
- count: w === "successed" ? d.length : w === "process" ? /* @__PURE__ */ r(fe, {
238
+ count: E === "successed" ? i.length : E === "process" ? /* @__PURE__ */ r(me, {
257
239
  className: "file-action file-process",
258
- indicator: /* @__PURE__ */ r(ye, {
240
+ indicator: /* @__PURE__ */ r(Fe, {
259
241
  style: {
260
242
  fontSize: 14
261
243
  },
262
244
  spin: !0
263
245
  })
264
- }) : w === "failed" ? /* @__PURE__ */ r(Ce, {
246
+ }) : E === "failed" ? /* @__PURE__ */ r(Ne, {
265
247
  style: {
266
248
  color: "#dc4446",
267
249
  fontSize: 14
268
250
  }
269
251
  }) : 0,
270
- children: /* @__PURE__ */ r(j, {
252
+ children: /* @__PURE__ */ r($, {
271
253
  type: "icon-shangchuanwenjian",
272
254
  style: {
273
255
  fontSize: 24
274
256
  }
275
257
  })
276
258
  })
277
- }), _ = () => new Promise((e) => {
278
- const i = f.current;
279
- if (!c)
259
+ }), X = () => new Promise((e) => {
260
+ const s = c.current;
261
+ if (!a)
280
262
  return e();
281
- const s = [];
282
- i.filter((n) => n.id).forEach((n) => s.push({
283
- id: n.id,
284
- status: n.status
285
- })), a == null || a.delApplicationIdSessionKnowledgeFile(g, c, {
286
- files: s
263
+ const n = [];
264
+ s.filter((t) => t.id).forEach((t) => n.push({
265
+ id: t.id,
266
+ status: t.status
267
+ })), o == null || o.delApplicationIdSessionKnowledgeFile(u, a, {
268
+ files: n
287
269
  }).then(() => {
288
- U([]), m([]), f.current = [], K && K(), F.current = !1, e();
270
+ k([]), p([]), c.current = [], K && K(), b.current = !1, e();
289
271
  });
290
272
  });
291
- return /* @__PURE__ */ b("div", {
273
+ return /* @__PURE__ */ g("div", {
292
274
  className: "footer-upload",
293
- children: [A ? V : /* @__PURE__ */ r(ge, {
275
+ children: [w ? G : /* @__PURE__ */ r(ge, {
294
276
  overlayClassName: "upload-popover",
295
277
  overlayInnerStyle: {
296
278
  width: 264,
@@ -300,10 +282,10 @@ const Ae = he((L, P) => {
300
282
  zIndex: 1
301
283
  },
302
284
  placement: "topLeft",
303
- getPopupContainer: () => (t == null ? void 0 : t.current) || document.body,
285
+ getPopupContainer: () => (S == null ? void 0 : S.current) || document.body,
304
286
  content: /* @__PURE__ */ r("div", {
305
287
  className: "file-upload",
306
- children: d.length > 0 ? /* @__PURE__ */ r("div", {
288
+ children: i.length > 0 ? /* @__PURE__ */ r("div", {
307
289
  className: "upload-wrapper",
308
290
  children: /* @__PURE__ */ r("div", {
309
291
  className: "input-files",
@@ -311,103 +293,85 @@ const Ae = he((L, P) => {
311
293
  display: "flex",
312
294
  flexDirection: "column"
313
295
  },
314
- children: d == null ? void 0 : d.map((e, i) => /* @__PURE__ */ r(Ne, {
296
+ children: i == null ? void 0 : i.map((e, s) => /* @__PURE__ */ r(Ee, {
315
297
  file: e,
316
298
  actions: {
317
299
  preview: () => {
318
300
  if (!(e != null && e.url)) {
319
- o.config({
320
- getContainer: () => (t == null ? void 0 : t.current) || document.body,
321
- prefixCls: "gbot-message"
322
- }), o.error("正在上传中"), o.config({
323
- getContainer: void 0,
324
- prefixCls: "gbot-message"
325
- });
301
+ y("error", "正在上传中");
326
302
  return;
327
303
  }
328
- if (!Ie(e.url)) {
329
- o.config({
330
- getContainer: () => (t == null ? void 0 : t.current) || document.body,
331
- prefixCls: "gbot-message"
332
- }), o.error("链接格式不正确"), o.config({
333
- getContainer: void 0,
334
- prefixCls: "gbot-message"
335
- });
304
+ if (!Ue(e.url)) {
305
+ y("error", "链接格式不正确");
336
306
  return;
337
307
  }
338
- window.open(`${q}?url=${encodeURIComponent(e == null ? void 0 : e.url)}`);
308
+ window.open(`${Y}?url=${encodeURIComponent(e == null ? void 0 : e.url)}`);
339
309
  },
340
310
  remove: () => {
341
- ie(e);
311
+ de(e);
342
312
  },
343
313
  download: () => {
344
- c && (a == null || a.getApplicationIdSessionKnowledgeFileId(g, c, e.id).then((s) => {
345
- if (!(s != null && s.url)) {
346
- o.config({
347
- getContainer: () => (t == null ? void 0 : t.current) || document.body,
348
- prefixCls: "gbot-message"
349
- }), o.error("下载失败"), o.config({
350
- getContainer: void 0,
351
- prefixCls: "gbot-message"
352
- });
314
+ a && (o == null || o.getApplicationIdSessionKnowledgeFileId(u, a, e.id).then((n) => {
315
+ if (!(n != null && n.url)) {
316
+ y("error", "下载失败");
353
317
  return;
354
318
  }
355
- const n = document.createElement("a");
356
- n.href = s.url, n.download = s.name || "", n.click();
319
+ const t = document.createElement("a");
320
+ t.href = n.url, t.download = n.name || "", t.click();
357
321
  }));
358
322
  }
359
323
  }
360
- }, i))
324
+ }, s))
361
325
  })
362
- }) : /* @__PURE__ */ b(Z, {
326
+ }) : /* @__PURE__ */ g(se, {
363
327
  name: "file",
364
328
  showUploadList: !1,
365
329
  multiple: !0,
366
- beforeUpload: O,
330
+ beforeUpload: T,
367
331
  accept: ".pdf, .doc, .docx",
368
- maxCount: 10,
332
+ maxCount: U,
369
333
  listType: "picture",
370
334
  children: [/* @__PURE__ */ r("span", {
371
335
  className: "file-upload-icon",
372
- children: /* @__PURE__ */ r(be, {})
373
- }), /* @__PURE__ */ b(me, {
336
+ children: /* @__PURE__ */ r(Ie, {})
337
+ }), /* @__PURE__ */ g(ye, {
374
338
  className: "file-upload-action",
375
- children: ["拖拽文件至此,或者", /* @__PURE__ */ r(M, {
339
+ children: ["拖拽文件至此,或者", /* @__PURE__ */ r(_, {
376
340
  type: "link",
377
341
  style: {
378
342
  padding: 0
379
343
  },
380
344
  children: "上传文件"
381
345
  })]
382
- }), /* @__PURE__ */ b("div", {
346
+ }), /* @__PURE__ */ g("div", {
383
347
  className: "file-upload-desc",
384
348
  children: [/* @__PURE__ */ r("div", {
385
349
  className: "item-upload-desc",
386
350
  children: /* @__PURE__ */ r("span", {
387
351
  children: "1.支持 doc、pdf、docx 格式;"
388
352
  })
389
- }), /* @__PURE__ */ r("div", {
353
+ }), /* @__PURE__ */ g("div", {
390
354
  className: "item-upload-desc",
391
- children: "2.单个文件不超过 50 M;"
392
- }), /* @__PURE__ */ r("div", {
355
+ children: ["2.单个文件不超过 ", j, " M;"]
356
+ }), /* @__PURE__ */ g("div", {
393
357
  className: "item-upload-desc",
394
- children: "3.最多上传 10 个文件。"
358
+ children: ["3.最多上传 ", U, " 个文件。"]
395
359
  })]
396
360
  })]
397
361
  })
398
362
  }),
399
- title: ae,
363
+ title: ce,
400
364
  trigger: "click",
401
- children: V
402
- }), $ && /* @__PURE__ */ r(Fe, {
403
- isvisible: $,
365
+ children: G
366
+ }), B && /* @__PURE__ */ r(ze, {
367
+ isvisible: B,
404
368
  onClose: (e) => {
405
- e === "clear" && _(), B(!1);
369
+ e === "clear" && X(), H(!1);
406
370
  }
407
371
  })]
408
372
  });
409
373
  });
410
- Ae.displayName = "UploadFiles";
374
+ ve.displayName = "UploadFiles";
411
375
  export {
412
- Ae as default
376
+ ve as default
413
377
  };