@glodon-aiot/dataset-annotation 3.22.2-alpha.4 → 3.23.0-alpha.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.
@@ -1,86 +1,87 @@
1
- var Ht = Object.defineProperty, qt = Object.defineProperties;
2
- var Ut = Object.getOwnPropertyDescriptors;
3
- var nt = Object.getOwnPropertySymbols;
4
- var Kt = Object.prototype.hasOwnProperty, Wt = Object.prototype.propertyIsEnumerable;
5
- var it = (L, g, a) => g in L ? Ht(L, g, { enumerable: !0, configurable: !0, writable: !0, value: a }) : L[g] = a, b = (L, g) => {
6
- for (var a in g || (g = {}))
7
- Kt.call(g, a) && it(L, a, g[a]);
8
- if (nt)
9
- for (var a of nt(g))
10
- Wt.call(g, a) && it(L, a, g[a]);
1
+ var Wt = Object.defineProperty, $t = Object.defineProperties;
2
+ var jt = Object.getOwnPropertyDescriptors;
3
+ var it = Object.getOwnPropertySymbols;
4
+ var Gt = Object.prototype.hasOwnProperty, Zt = Object.prototype.propertyIsEnumerable;
5
+ var rt = (L, g, c) => g in L ? Wt(L, g, { enumerable: !0, configurable: !0, writable: !0, value: c }) : L[g] = c, b = (L, g) => {
6
+ for (var c in g || (g = {}))
7
+ Gt.call(g, c) && rt(L, c, g[c]);
8
+ if (it)
9
+ for (var c of it(g))
10
+ Zt.call(g, c) && rt(L, c, g[c]);
11
11
  return L;
12
- }, y = (L, g) => qt(L, Ut(g));
13
- var Me = (L, g, a) => new Promise((X, me) => {
12
+ }, y = (L, g) => $t(L, jt(g));
13
+ var Be = (L, g, c) => new Promise((J, me) => {
14
14
  var be = (I) => {
15
15
  try {
16
- ie(a.next(I));
17
- } catch (re) {
18
- me(re);
16
+ oe(c.next(I));
17
+ } catch (le) {
18
+ me(le);
19
19
  }
20
20
  }, N = (I) => {
21
21
  try {
22
- ie(a.throw(I));
23
- } catch (re) {
24
- me(re);
22
+ oe(c.throw(I));
23
+ } catch (le) {
24
+ me(le);
25
25
  }
26
- }, ie = (I) => I.done ? X(I.value) : Promise.resolve(I.value).then(be, N);
27
- ie((a = a.apply(L, g)).next());
26
+ }, oe = (I) => I.done ? J(I.value) : Promise.resolve(I.value).then(be, N);
27
+ oe((c = c.apply(L, g)).next());
28
28
  });
29
- import { jsx as c, jsxs as m, Fragment as rt } from "react/jsx-runtime";
30
- import { useRef as $, useState as p, useLayoutEffect as $t, useEffect as C } from "react";
31
- import { message as D, ConfigProvider as jt, Space as pe, Select as Gt, Button as te, Dropdown as ot, Tabs as Zt, Checkbox as lt, Col as _t, Tooltip as Xt, Empty as Jt, Spin as Qt, Modal as xe } from "antd";
32
- import Yt from "rc-virtual-list";
33
- import { UploadZipsStatus as ne, PreLabelTaskStatus as en } from "@glodon-aiot/apis";
34
- import tn from "antd/es/locale/zh_CN";
35
- import nn from "../../DatasetContext/index.mjs";
36
- import rn from "./icon_item_empty.svg.mjs";
29
+ import { jsx as a, jsxs as m, Fragment as ot } from "react/jsx-runtime";
30
+ import { useRef as $, useState as p, useLayoutEffect as _t, useEffect as C, useCallback as Xt } from "react";
31
+ import { message as D, ConfigProvider as Jt, Space as pe, Select as Qt, Button as ie, Dropdown as lt, Tabs as Yt, Checkbox as st, Col as en, Tooltip as tn, Empty as nn, Spin as rn, Modal as ke } from "antd";
32
+ import on from "rc-virtual-list";
33
+ import { UploadZipsStatus as re, PreLabelTaskStatus as ln } from "@glodon-aiot/apis";
34
+ import sn from "antd/es/locale/zh_CN";
35
+ import an from "../../DatasetContext/index.mjs";
36
+ import cn from "./icon_item_empty.svg.mjs";
37
37
  import "./style.less.mjs";
38
- import { tagColors as st } from "../../utils/index.mjs";
39
- import on from "./components/Labels/index.mjs";
40
- import { useKeyPress as ln } from "ahooks";
38
+ import { tagColors as at } from "../../utils/index.mjs";
39
+ import dn from "./components/Labels/index.mjs";
40
+ import { useKeyPress as fn } from "ahooks";
41
41
  import ct from "./components/DisabledTooltip/index.mjs";
42
- import sn from "./PreSamplesPage/index.mjs";
43
- import { DownOutlined as at, SearchOutlined as cn } from "@ant-design/icons";
44
- import an from "../../Common/Page/index.mjs";
45
- import dn from "../PicZipImportModal/index.mjs";
46
- import fn from "../PageNav/index.mjs";
47
- import hn from "../Thumbnail/index.mjs";
48
- import un from "../CompositionInput/index.mjs";
49
- import { Prompt as gn } from "../hooks/Prompt.mjs";
50
- import pn from "../PreLabelOCR/index.mjs";
51
- import mn from "lodash/merge";
52
- import { DEFAULT_FILTER_SWITCH as bn } from "../../constant.mjs";
53
- import vn from "../DetectionStatus/index.mjs";
54
- import yn from "./components/ImageModal/index.mjs";
55
- var Sn = /* @__PURE__ */ ((L) => (L.Next = "NEXT", L.Prev = "PREV", L.Confirm = "CONFIRM", L.Save = "Save", L))(Sn || {});
56
- const Xn = (L) => {
42
+ import hn from "./PreSamplesPage/index.mjs";
43
+ import { DownOutlined as dt, SearchOutlined as un } from "@ant-design/icons";
44
+ import gn from "../../Common/Page/index.mjs";
45
+ import pn from "../PicZipImportModal/index.mjs";
46
+ import mn from "../PageNav/index.mjs";
47
+ import bn from "../Thumbnail/index.mjs";
48
+ import vn from "../CompositionInput/index.mjs";
49
+ import { Prompt as yn } from "../hooks/Prompt.mjs";
50
+ import Sn from "../PreLabelOCR/index.mjs";
51
+ import Cn from "lodash/merge";
52
+ import { DEFAULT_FILTER_SWITCH as In } from "../../constant.mjs";
53
+ import xn from "../DetectionStatus/index.mjs";
54
+ import kn from "./components/ImageModal/index.mjs";
55
+ import Ln from "./hooks/useSamplePreload.mjs";
56
+ var wn = /* @__PURE__ */ ((L) => (L.Next = "NEXT", L.Prev = "PREV", L.Confirm = "CONFIRM", L.Save = "Save", L))(wn || {});
57
+ const ii = (L) => {
57
58
  const {
58
59
  services: g,
59
- datasetId: a,
60
- versionId: X,
60
+ datasetId: c,
61
+ versionId: J,
61
62
  backTo: me,
62
63
  labelManager: be = !1,
63
64
  datasetManager: N = !1,
64
- annotation: ie,
65
+ annotation: oe,
65
66
  header: I = {
66
67
  versionSelect: !1
67
68
  },
68
- exampleSrcRoot: re
69
- } = L, oe = b({}, bn);
70
- mn(oe, L.filterSwitch);
71
- const le = $(null), ke = $(null), [dt, ft] = p(0), [x, Be] = p(), [o, se] = p(), [ve, ht] = p([]), [Fe, Oe] = p(!1), [ce, He] = p(0), [ae, qe] = p(0), [f, Le] = p(""), [J, Ue] = p(0), [ut, gt] = p(), [Ke, we] = p(!1), [We, pt] = p(!1), [$e, mt] = p(!0), [bt, vt] = p(!1), [F, je] = p([]), [v, q] = p([]), [de, fe] = p(!1), [he, ue] = p(!1), [O, z] = p(-1), [u, R] = p(), [h, E] = p(), [l, T] = p({
69
+ exampleSrcRoot: le
70
+ } = L, se = b({}, In);
71
+ Cn(se, L.filterSwitch);
72
+ const ae = $(null), Le = $(null), [ft, ht] = p(0), [x, Me] = p(), [o, ce] = p(), [ve, ut] = p([]), [Fe, Oe] = p(!1), [de, He] = p(0), [fe, Ue] = p(0), [h, we] = p(""), [Q, qe] = p(0), [gt, pt] = p(), [Ke, De] = p(!1), [We, mt] = p(!1), [$e, bt] = p(!0), [vt, yt] = p(!1), [O, je] = p([]), [v, U] = p([]), [he, j] = p(!1), [Y, ue] = p(!1), [M, V] = p(-1), [u, R] = p(), [St, Ge] = p(), [d, z] = p(), [l, T] = p({
72
73
  current: 0,
73
74
  pageSize: 100
74
- }), [K, De] = p([]), [j, yt] = p(""), [St, Ct] = p(!1), [Ge, Ze] = p(), [ye, Ne] = p(null), [H, _e] = p(!1), [It, xt] = p(!1), [Cn, kt] = p(0), [In, Re] = p(""), [Q, Lt] = p(""), ge = $({}), Te = $(!1), Se = $(0), Ce = $(0), G = $(0), [V, Ve] = p(/* @__PURE__ */ new Set()), [wt, Ie] = p(!1), Xe = $(-1);
75
- $t(() => {
76
- const e = le.current;
75
+ }), [W, Ne] = p([]), [G, Ct] = p(""), [It, xt] = p(!1), [Ze, _e] = p(), [ye, Re] = p(null), [H, Xe] = p(!1), [kt, Lt] = p(!1), [Dn, wt] = p(0), [Nn, Te] = p(""), [ee, Dt] = p(""), ge = $({}), Pe = $(!1), Se = $(0), Ce = $(0), Z = $(0), [P, Ve] = p(/* @__PURE__ */ new Set()), [Nt, Ie] = p(!1), Je = $(-1);
76
+ _t(() => {
77
+ const e = ae.current;
77
78
  if (!e)
78
79
  return;
79
80
  let t = 0;
80
81
  const n = () => {
81
82
  cancelAnimationFrame(t), t = requestAnimationFrame(() => {
82
- const s = e.clientHeight, d = Math.max(1, Math.round(s));
83
- d !== Xe.current && (Xe.current = d, ft(d));
83
+ const s = e.clientHeight, f = Math.max(1, Math.round(s));
84
+ f !== Je.current && (Je.current = f, ht(f));
84
85
  });
85
86
  };
86
87
  n();
@@ -91,170 +92,179 @@ const Xn = (L) => {
91
92
  cancelAnimationFrame(t), i == null || i.disconnect(), r == null || r.removeEventListener("resize", n), window.removeEventListener("resize", n);
92
93
  };
93
94
  }, [x]);
94
- const Y = () => {
95
- R(void 0), E(void 0), z(-1), fe(!1), W(), setTimeout(() => {
95
+ const te = () => {
96
+ R(void 0), z(void 0), V(-1), j(!1), q(), setTimeout(() => {
96
97
  T((e) => y(b({}, e), {
97
98
  current: 1,
98
99
  type: void 0
99
100
  }));
100
101
  }, 10);
101
102
  };
102
- ln("Esc", Y), C(() => {
103
- a && g.cvforceDatahub.getS3Iam(a).then((e) => {
104
- gt(e);
103
+ fn("Esc", te), C(() => {
104
+ c && g.cvforceDatahub.getS3Iam(c).then((e) => {
105
+ pt(e);
105
106
  });
106
- }, [a]), C(() => {
107
+ }, [c]), C(() => {
107
108
  w();
108
109
  }, [o == null ? void 0 : o.id]), C(() => {
109
- a && (Oe(!0), Promise.all([
110
+ c && (Oe(!0), Promise.all([
110
111
  // 数据集
111
- g.cvforceDatahub.getDatasetsId(a).then((e) => {
112
- Be(e);
112
+ g.cvforceDatahub.getDatasetsId(c).then((e) => {
113
+ Me(e);
113
114
  }),
114
115
  // 版本列表
115
- g.cvforceDatahub.getDatasetsIdVersions(a, 1, 1e3).then((e) => {
116
- ht(e.recordList), se(X ? e.recordList.find((t) => t.id === X) : e.recordList[0]);
116
+ g.cvforceDatahub.getDatasetsIdVersions(c, 1, 1e3).then((e) => {
117
+ ut(e.recordList), ce(J ? e.recordList.find((t) => t.id === J) : e.recordList[0]);
117
118
  })
118
119
  ]).finally(() => Oe(!1)));
119
- }, [a, X]);
120
- const Je = () => {
121
- !a || !o || g.cvforceDatahub.getDatasetsIdVersionsVid(a, o.id).then((e) => {
122
- se(e), yt(e.versionAsyncTask.state);
120
+ }, [c, J]);
121
+ const Qe = () => {
122
+ !c || !o || g.cvforceDatahub.getDatasetsIdVersionsVid(c, o.id).then((e) => {
123
+ ce(e), Ct(e.versionAsyncTask.state);
123
124
  });
124
125
  };
125
126
  C(() => {
126
- j !== ne.Pending && j !== ne.Started || D.warning("文件导入中,请刷新页面再试");
127
- }, [j]), C(() => {
128
- se(void 0), T(y(b({}, l), {
127
+ G !== re.Pending && G !== re.Started || D.warning("文件导入中,请刷新页面再试");
128
+ }, [G]), C(() => {
129
+ ce(void 0), T(y(b({}, l), {
129
130
  current: 1
130
- })), q([]), Je();
131
- }, [a, X]), C(() => {
132
- a && g.cvforceDatahub.getDatasetsId(a).then((e) => {
133
- Be(e);
131
+ })), U([]), Qe();
132
+ }, [c, J]), C(() => {
133
+ c && g.cvforceDatahub.getDatasetsId(c).then((e) => {
134
+ Me(e);
134
135
  });
135
- }, [a]), C(() => {
136
- Se.current++, Ce.current++, G.current++;
137
- }, [x == null ? void 0 : x.id, o == null ? void 0 : o.id, f, K, Q]), C(() => {
138
- W();
139
- }, [K, o, f]), C(() => {
140
- !o || !x || P(y(b({}, l), {
136
+ }, [c]), C(() => {
137
+ Se.current++, Ce.current++, Z.current++;
138
+ }, [x == null ? void 0 : x.id, o == null ? void 0 : o.id, h, W, ee]), C(() => {
139
+ q();
140
+ }, [W, o, h]), C(() => {
141
+ !o || !x || A(y(b({}, l), {
141
142
  current: 1
142
143
  })).then((e) => {
143
144
  });
144
- }, [x == null ? void 0 : x.id, o == null ? void 0 : o.id, K]), C(() => {
145
- if (Te.current) {
146
- Te.current = !1, w();
145
+ }, [x == null ? void 0 : x.id, o == null ? void 0 : o.id, W]), C(() => {
146
+ if (Pe.current) {
147
+ Pe.current = !1, w();
147
148
  return;
148
149
  }
149
- P().then((e) => {
150
+ A().then((e) => {
150
151
  }), w();
151
152
  }, [l.current]), C(() => {
152
153
  H && w();
153
- }, [Ge]), C(() => {
154
- const e = ge.current[f];
154
+ }, [Ze]), C(() => {
155
+ const e = ge.current[h];
155
156
  let t;
156
- e && e.page > 1 ? t = P(y(b({}, l), {
157
+ e && e.page > 1 ? t = A(y(b({}, l), {
157
158
  current: 1,
158
159
  pageSize: e.page * 100,
159
160
  // 假设默认pageSize为100
160
161
  total: void 0
161
- })).then((n) => (Te.current = !0, T((i) => y(b({}, i), {
162
+ })).then((n) => (Pe.current = !0, T((i) => y(b({}, i), {
162
163
  current: e.page,
163
164
  pageSize: 100
164
- })), n)) : t = P(y(b({}, l), {
165
+ })), n)) : t = A(y(b({}, l), {
165
166
  current: 1,
166
167
  total: void 0
167
168
  })), t.then((n) => {
168
- if (n && !(!u && !he))
169
+ if (n && !(!u && !Y))
169
170
  if (Array.isArray(n) && n.length) {
170
- const i = ge.current[f], r = i == null ? void 0 : i.index, s = r !== void 0 && r >= 0 && r < n.length ? r : 0;
171
- z(s), R(n[s]), E(void 0);
171
+ const i = ge.current[h], r = i == null ? void 0 : i.index, s = r !== void 0 && r >= 0 && r < n.length ? r : 0;
172
+ V(s), R(n[s]), z(void 0);
172
173
  } else
173
- R(void 0), E(void 0), z(-1), W(), setTimeout(() => {
174
+ R(void 0), z(void 0), V(-1), q(), setTimeout(() => {
174
175
  T((i) => y(b({}, i), {
175
176
  current: 1,
176
177
  type: void 0
177
178
  }));
178
179
  }, 10);
179
180
  });
180
- }, [f]), C(() => {
181
+ }, [h]), C(() => {
181
182
  var t;
182
183
  let e;
183
- if (!he) {
184
- const n = u !== void 0, i = u == null ? void 0 : u.id, r = O;
185
- R(void 0), E(void 0), fe(!1), z(-1), W(), n && ((t = ke.current) == null || t.fetchLabels()), w(), i !== void 0 && (e = requestAnimationFrame(() => {
186
- var B, _;
187
- const s = (B = le.current) == null ? void 0 : B.getElementsByClassName("rc-virtual-list-holder")[0];
184
+ if (!Y) {
185
+ const n = u !== void 0, i = u == null ? void 0 : u.id, r = M;
186
+ R(void 0), z(void 0), j(!1), V(-1), Ge(void 0), q(), n && ((t = Le.current) == null || t.fetchLabels()), w(), i !== void 0 && (e = requestAnimationFrame(() => {
187
+ var F, X;
188
+ const s = (F = ae.current) == null ? void 0 : F.getElementsByClassName("rc-virtual-list-holder")[0];
188
189
  if (!s)
189
190
  return;
190
- const d = Array.from(s.querySelectorAll("[data-sample-id]")), S = (_ = d.find((M) => M.dataset.sampleId === String(i))) != null ? _ : r >= 0 ? d[r] : void 0;
191
+ const f = Array.from(s.querySelectorAll("[data-sample-id]")), S = (X = f.find((B) => B.dataset.sampleId === String(i))) != null ? X : r >= 0 ? f[r] : void 0;
191
192
  if (!S)
192
193
  return;
193
- const k = s.getBoundingClientRect(), A = S.getBoundingClientRect(), U = s.scrollTop + A.top - k.top - Math.max(0, (s.clientHeight - A.height) / 2);
194
+ const k = s.getBoundingClientRect(), E = S.getBoundingClientRect(), K = s.scrollTop + E.top - k.top - Math.max(0, (s.clientHeight - E.height) / 2);
194
195
  s.scrollTo({
195
- top: Math.max(0, U)
196
+ top: Math.max(0, K)
196
197
  });
197
198
  }));
198
199
  }
199
200
  return () => {
200
201
  e !== void 0 && cancelAnimationFrame(e);
201
202
  };
202
- }, [he]), C(() => {
203
- vt(!$e && We);
203
+ }, [Y]);
204
+ const Rt = Xt((e, t) => {
205
+ Ge(e ? void 0 : t);
206
+ }, []);
207
+ Ln({
208
+ samples: v,
209
+ currentIndex: M,
210
+ active: Y,
211
+ loadedImageUrl: St
212
+ }), C(() => {
213
+ yt(!$e && We);
204
214
  }, [$e, We]), C(() => {
205
- if (!a) {
206
- ye && (clearTimeout(ye), Ne(null)), Ze(void 0);
215
+ if (!c) {
216
+ ye && (clearTimeout(ye), Re(null)), _e(void 0);
207
217
  return;
208
218
  }
209
- Pe();
210
- }, [a, o == null ? void 0 : o.id]), C(() => {
211
- Pe();
212
- }, [St]), C(() => {
219
+ Ae();
220
+ }, [c, o == null ? void 0 : o.id]), C(() => {
221
+ Ae();
222
+ }, [It]), C(() => {
213
223
  ze();
214
- }, [H, a, o]), C(() => {
215
- P(y(b({}, l), {
224
+ }, [H, c, o]), C(() => {
225
+ A(y(b({}, l), {
216
226
  current: 1
217
227
  })), w();
218
- }, [Q]), C(() => {
219
- Re("");
228
+ }, [ee]), C(() => {
229
+ Te("");
220
230
  }, [u]), C(() => {
221
231
  if (v.length === 0) {
222
232
  Ie(!1);
223
233
  return;
224
234
  }
225
- const e = v.every((t) => V.has(t.id));
235
+ const e = v.every((t) => P.has(t.id));
226
236
  Ie(e);
227
- }, [v, V]);
237
+ }, [v, P]);
228
238
  const ze = () => {
229
- o && g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, o.id, {
239
+ o && g.cvforceDatahub.getDatasetsIdVersionsVidSamples(c, o.id, {
230
240
  pageNo: 1,
231
241
  pageSize: 1e3,
232
242
  confirmStatus: 1
233
243
  }).then((e) => {
234
- kt(e.recordList.length);
244
+ wt(e.recordList.length);
235
245
  });
236
- }, Pe = () => {
237
- !a || !o || g.cvforceDatahub.getPreLabelTask(a, o.id).then((e) => {
246
+ }, Ae = () => {
247
+ !c || !o || g.cvforceDatahub.getPreLabelTask(c, o.id).then((e) => {
238
248
  const t = e[0];
239
- if (Ze(t), ye && (clearTimeout(ye), Ne(null)), !(t != null && t.state) || t.state !== en.Started) {
240
- _e(!1), w();
249
+ if (_e(t), ye && (clearTimeout(ye), Re(null)), !(t != null && t.state) || t.state !== ln.Started) {
250
+ Xe(!1), w();
241
251
  return;
242
252
  } else
243
- _e(!0);
244
- Ne(setTimeout(() => {
245
- Pe();
253
+ Xe(!0);
254
+ Re(setTimeout(() => {
255
+ Ae();
246
256
  }, 1e4));
247
257
  });
248
258
  };
249
259
  C(() => {
250
260
  x && x.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
251
261
  }, [x]);
252
- const P = (e, t) => {
262
+ const A = (e, t) => {
253
263
  const n = (e == null ? void 0 : e.current) || l.current, i = (e == null ? void 0 : e.pageSize) || l.pageSize;
254
- if (!a || !o || !n)
264
+ if (!c || !o || !n)
255
265
  return Promise.resolve(!1);
256
- const r = Se.current, s = K.map((k) => k.label), d = () => {
257
- switch (f) {
266
+ const r = Se.current, s = W.map((k) => k.label), f = () => {
267
+ switch (h) {
258
268
  case "nocode":
259
269
  return "nocode";
260
270
  case "pending":
@@ -265,7 +275,7 @@ const Xn = (L) => {
265
275
  return s.length ? s : void 0;
266
276
  }
267
277
  }, S = () => {
268
- switch (f) {
278
+ switch (h) {
269
279
  case "nocode":
270
280
  case "hascode":
271
281
  return 0;
@@ -275,179 +285,179 @@ const Xn = (L) => {
275
285
  return 2;
276
286
  }
277
287
  };
278
- return n === 1 && Pt(), T(y(b({}, l), {
288
+ return n === 1 && Mt(), T(y(b({}, l), {
279
289
  current: n,
280
290
  pageSize: i
281
- })), g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, o.id, {
291
+ })), g.cvforceDatahub.getDatasetsIdVersionsVidSamples(c, o.id, {
282
292
  pageNo: n,
283
293
  pageSize: i,
284
- labels: d(),
294
+ labels: f(),
285
295
  confirmStatus: S(),
286
- searchName: Q
296
+ searchName: ee
287
297
  }).then((k) => {
288
298
  if (r !== Se.current)
289
299
  return !1;
290
- const A = k.recordList || [], U = n === 1 ? A : [...t || v, ...A];
291
- if (q(U), T(y(b({}, l), {
300
+ const E = k.recordList || [], K = n === 1 ? E : [...t || v, ...E];
301
+ if (U(K), T(y(b({}, l), {
292
302
  current: n,
293
303
  pageSize: i,
294
304
  total: k.totalResults
295
- })), l.type === "next" && A.length) {
296
- z(0);
297
- const B = k.recordList[0];
298
- R(B);
305
+ })), l.type === "next" && E.length) {
306
+ V(0);
307
+ const F = k.recordList[0];
308
+ R(F);
299
309
  }
300
- if (l.type === "prev" && A.length) {
301
- z(l.pageSize - 1);
302
- const B = k.recordList[l.pageSize - 1];
303
- R(B);
310
+ if (l.type === "prev" && E.length) {
311
+ V(l.pageSize - 1);
312
+ const F = k.recordList[l.pageSize - 1];
313
+ R(F);
304
314
  }
305
- return de && O < 0 && (z(0), R(A[0]), ue(!0)), U;
315
+ return he && M < 0 && (V(0), R(E[0]), ue(!0)), K;
306
316
  }).catch(() => !1);
307
317
  };
308
318
  C(() => {
309
- T(f === "nocode" ? y(b({}, l), {
310
- total: ce
311
- }) : f === "" ? y(b({}, l), {
312
- total: J
313
- }) : f === "pending" ? y(b({}, l), {
314
- total: ae
319
+ T(h === "nocode" ? y(b({}, l), {
320
+ total: de
321
+ }) : h === "" ? y(b({}, l), {
322
+ total: Q
323
+ }) : h === "pending" ? y(b({}, l), {
324
+ total: fe
315
325
  }) : y(b({}, l), {
316
- total: J - ce - ae
326
+ total: Q - de - fe
317
327
  }));
318
- }, [ce, J, ae]);
328
+ }, [de, Q, fe]);
319
329
  const w = () => {
320
- !a || !o || g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
330
+ !c || !o || g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(c, o.id, {
321
331
  label: "allcode",
322
332
  confirmStatus: 2,
323
- searchName: Q
333
+ searchName: ee
324
334
  }).then((e) => {
325
335
  const t = e.find((r) => r.id === "allcodeid"), n = e.find((r) => r.id === "nocodeid"), i = e.find((r) => r.id === "pendingid");
326
- Ue(t ? t.count : 0), He(n ? n.count : 0), qe(i ? i.count : 0);
336
+ qe(t ? t.count : 0), He(n ? n.count : 0), Ue(i ? i.count : 0);
327
337
  });
328
- }, W = () => {
329
- if (!a || !(o != null && o.id))
338
+ }, q = () => {
339
+ if (!c || !(o != null && o.id))
330
340
  return;
331
341
  const e = Ce.current;
332
342
  let t = 2;
333
- return f === "pending" ? t = 1 : f === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
343
+ return h === "pending" ? t = 1 : h === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(c, o.id, {
334
344
  confirmStatus: t
335
345
  }).then((n) => {
336
346
  if (e !== Ce.current)
337
347
  return;
338
- const r = (n || []).filter((s) => s.label !== "nocode").map((s, d) => ({
348
+ const r = (n || []).filter((s) => s.label !== "nocode").map((s, f) => ({
339
349
  label: s.label,
340
350
  count: s.count,
341
351
  id: s.id,
342
- color: st[d % 40]
352
+ color: at[f % 40]
343
353
  }));
344
354
  return je(r), n;
345
355
  });
346
- }, Dt = (e) => {
356
+ }, Tt = (e) => {
347
357
  if (!v)
348
358
  return;
349
- fe(!1), z(e);
359
+ j(!1), V(e);
350
360
  const t = v[e];
351
- R(t), E(void 0), ue(!0), f !== void 0 && (ge.current[f] = {
361
+ R(t), z(void 0), ue(!0), h !== void 0 && (ge.current[h] = {
352
362
  index: e,
353
363
  page: l.current || 1
354
364
  });
355
365
  };
356
366
  C(() => {
357
- l.type || P();
367
+ l.type || A();
358
368
  }, [l.type]), C(() => {
359
- if (!h)
369
+ if (!d)
360
370
  return;
361
371
  const e = [];
362
- h == null || h.labels.forEach((t) => {
363
- F != null && F.find((n) => n.id === t.id) && e.push(t);
364
- }), e.length !== h.labels.length && E(y(b({}, h), {
372
+ d == null || d.labels.forEach((t) => {
373
+ O != null && O.find((n) => n.id === t.id) && e.push(t);
374
+ }), e.length !== d.labels.length && z(y(b({}, d), {
365
375
  labels: e
366
376
  }));
367
- }, [F]);
368
- const Z = (e, t, n, i) => {
377
+ }, [O]);
378
+ const _ = (e, t, n, i) => {
369
379
  setTimeout(() => {
370
- i === G.current && (z(t), R(e[t]), E(void 0), f !== void 0 && (ge.current[f] = {
380
+ i === Z.current && (V(t), R(e[t]), z(void 0), h !== void 0 && (ge.current[h] = {
371
381
  index: t,
372
382
  page: n
373
383
  }));
374
384
  }, 0);
375
- }, Qe = (e, t) => {
385
+ }, Ye = (e, t) => {
376
386
  if (!v)
377
387
  return;
378
- const n = ++G.current;
379
- if (!de) {
380
- q((i) => {
388
+ const n = ++Z.current;
389
+ if (!he) {
390
+ U((i) => {
381
391
  var S;
382
392
  if (!Array.isArray(i) || !i.length)
383
- return Y(), i;
384
- const r = O + 1, d = !!K.length ? i.length : (S = l.total) != null ? S : i.length;
385
- return r >= i.length ? r >= d ? D.error("已经是最后一个了") : P({
393
+ return te(), i;
394
+ const r = M + 1, f = !!W.length ? i.length : (S = l.total) != null ? S : i.length;
395
+ return r >= i.length ? r >= f ? D.error("已经是最后一个了") : A({
386
396
  current: l.current + 1,
387
397
  pageSize: l.pageSize,
388
398
  type: "next"
389
399
  }, i).then((k) => {
390
- Array.isArray(k) && Z(k, r, l.current + 1, n);
391
- }) : Z(i, r, l.current || 1, n), i;
400
+ Array.isArray(k) && _(k, r, l.current + 1, n);
401
+ }) : _(i, r, l.current || 1, n), i;
392
402
  });
393
403
  return;
394
404
  }
395
- return Ae(e, t).then((i) => (i && n === G.current && (console.log("action", t, "changedSample", h), w(), q((r) => {
396
- var d, S;
405
+ return xe(e, t).then((i) => (i && n === Z.current && (console.log("action", t, "changedSample", d), w(), U((r) => {
406
+ var f, S;
397
407
  let s;
398
408
  if (Array.isArray(r)) {
399
409
  if (!r.length)
400
- return Y(), r;
401
- const k = f === "", A = (!((d = h == null ? void 0 : h.labels) != null && d.length) || !h) && f === "nocode", U = t !== "CONFIRM" && f === "pending", B = (((S = h == null ? void 0 : h.labels) == null ? void 0 : S.length) || !h) && f === "hascode", _ = k || U || B || A ? O + 1 : O;
402
- if (h) {
403
- if (h.labels.length && f === "nocode" || !h.labels.length && f === "hascode" || t === "CONFIRM" && f === "pending") {
404
- const M = r.findIndex((Ee) => Ee.id === h.id);
405
- M > -1 && (r.splice(M, 1), s = [...r], l.total && (l.total = l.total - 1));
410
+ return te(), r;
411
+ const k = h === "", E = (!((f = d == null ? void 0 : d.labels) != null && f.length) || !d) && h === "nocode", K = t !== "CONFIRM" && h === "pending", F = (((S = d == null ? void 0 : d.labels) == null ? void 0 : S.length) || !d) && h === "hascode", X = k || K || F || E ? M + 1 : M;
412
+ if (d) {
413
+ if (d.labels.length && h === "nocode" || !d.labels.length && h === "hascode" || t === "CONFIRM" && h === "pending") {
414
+ const B = r.findIndex((Ee) => Ee.id === d.id);
415
+ B > -1 && (r.splice(B, 1), s = [...r], l.total && (l.total = l.total - 1));
406
416
  }
407
- } else if (t === "CONFIRM" && f === "pending") {
408
- const M = r.findIndex((Ee) => Ee.id === (u == null ? void 0 : u.id));
409
- M > -1 && (r.splice(M, 1), s = [...r], l.total && (l.total = l.total - 1));
417
+ } else if (t === "CONFIRM" && h === "pending") {
418
+ const B = r.findIndex((Ee) => Ee.id === (u == null ? void 0 : u.id));
419
+ B > -1 && (r.splice(B, 1), s = [...r], l.total && (l.total = l.total - 1));
410
420
  }
411
- if (_ >= r.length)
412
- if (l.total && _ >= l.total) {
421
+ if (X >= r.length)
422
+ if (l.total && X >= l.total) {
413
423
  if (r.length > 0) {
414
- const M = r.length - 1;
415
- Z(r, M, l.current || 1, n);
424
+ const B = r.length - 1;
425
+ _(r, B, l.current || 1, n);
416
426
  }
417
427
  D.error("已经是最后一个了");
418
428
  } else
419
- P({
429
+ A({
420
430
  current: l.current + 1,
421
431
  pageSize: l.pageSize,
422
432
  type: "next"
423
- }, r).then((M) => {
424
- Array.isArray(M) && Z(M, _, l.current + 1, n);
433
+ }, r).then((B) => {
434
+ Array.isArray(B) && _(B, X, l.current + 1, n);
425
435
  });
426
436
  else
427
- Z(r, _, l.current || 1, n);
437
+ _(r, X, l.current || 1, n);
428
438
  }
429
439
  return s || r;
430
440
  })), i));
431
- }, Nt = (e) => {
441
+ }, Pt = (e) => {
432
442
  if (!v)
433
443
  return;
434
- const t = ++G.current;
435
- if (!de) {
436
- q((n) => {
444
+ const t = ++Z.current;
445
+ if (!he) {
446
+ U((n) => {
437
447
  if (!Array.isArray(n) || !n.length)
438
- return Y(), n;
439
- const i = O - 1;
440
- return i < 0 ? D.error("已经是第一个了") : Z(n, i, l.current || 1, t), n;
448
+ return te(), n;
449
+ const i = M - 1;
450
+ return i < 0 ? D.error("已经是第一个了") : _(n, i, l.current || 1, t), n;
441
451
  });
442
452
  return;
443
453
  }
444
- Ae(e).then((n) => {
445
- n && t === G.current && (w(), q((i) => {
454
+ xe(e).then((n) => {
455
+ n && t === Z.current && (w(), U((i) => {
446
456
  let r;
447
457
  if (Array.isArray(i)) {
448
458
  if (!i.length)
449
- return Y(), i;
450
- const s = O - 1;
459
+ return te(), i;
460
+ const s = M - 1;
451
461
  if (s < 0)
452
462
  s < 0 ? D.error("已经是第一个了") : T({
453
463
  current: l.current - 1,
@@ -455,79 +465,91 @@ const Xn = (L) => {
455
465
  type: "prev"
456
466
  });
457
467
  else {
458
- if (h && (h.labels.length && f === "nocode" || !h.labels.length && f === "hascode")) {
459
- const d = i.findIndex((S) => S.id === h.id);
460
- d > -1 && (i.splice(d, 1), r = [...i], l.total && (l.total = l.total - 1));
468
+ if (d && (d.labels.length && h === "nocode" || !d.labels.length && h === "hascode")) {
469
+ const f = i.findIndex((S) => S.id === d.id);
470
+ f > -1 && (i.splice(f, 1), r = [...i], l.total && (l.total = l.total - 1));
461
471
  }
462
- Z(i, s, l.current || 1, t);
472
+ _(i, s, l.current || 1, t);
463
473
  }
464
474
  }
465
475
  return r || i;
466
476
  }));
467
477
  });
468
- }, Rt = (e) => {
478
+ }, Vt = (e) => {
469
479
  const t = Object.keys(e.labels.reduce((n, i) => (n[i.label] ? ++n[i.label] : n[i.label] = 1, n), {})).length;
470
480
  return t >= 2 ? `+${t - 1}` : null;
471
- }, Tt = (e) => {
472
- var k, A;
481
+ }, zt = (e) => {
482
+ var k, E;
473
483
  const {
474
484
  scrollTop: t,
475
485
  scrollHeight: n,
476
486
  clientHeight: i
477
- } = e.currentTarget, r = n - t - i, s = 3, d = (k = l.pageSize) != null ? k : 100, S = (A = l.current) != null ? A : 0;
478
- S >= 1 && v.length > 0 && v.length < S * d || (!l.total || l.total > v.length) && r <= s && T((U) => {
479
- var B;
480
- return y(b({}, U), {
481
- current: ((B = U.current) != null ? B : 0) + 1
487
+ } = e.currentTarget, r = n - t - i, s = 3, f = (k = l.pageSize) != null ? k : 100, S = (E = l.current) != null ? E : 0;
488
+ S >= 1 && v.length > 0 && v.length < S * f || (!l.total || l.total > v.length) && r <= s && T((K) => {
489
+ var F;
490
+ return y(b({}, K), {
491
+ current: ((F = K.current) != null ? F : 0) + 1
482
492
  });
483
493
  });
484
- }, Ae = (e, t) => {
494
+ }, xe = (e, t) => {
485
495
  var n, i;
486
496
  if (!o)
487
497
  return Promise.resolve(!1);
488
- if (h && !H) {
489
- const r = y(b({}, h), {
490
- labels: h.labels ? [...h.labels] : []
498
+ if (d && !H) {
499
+ const r = y(b({}, d), {
500
+ labels: d.labels ? [...d.labels] : []
491
501
  });
492
- return r.labels && (r.labels = r.labels.filter((s) => !!s.id)), e !== void 0 && (r.confirmStatus = e, r.isLabeled = ((n = r.labels) == null ? void 0 : n.length) > 0), g.cvforceDatahub.updateSamples(a, o.id, [r], e).then(() => {
502
+ return r.labels && (r.labels = r.labels.filter((s) => !!s.id)), e !== void 0 && (r.confirmStatus = e, r.isLabeled = ((n = r.labels) == null ? void 0 : n.length) > 0), g.cvforceDatahub.updateSamples(c, o.id, [r], e).then(() => {
493
503
  D.success({
494
504
  content: "保存成功"
495
505
  });
496
506
  const s = y(b({}, r), {
497
507
  labels: r.labels ? [...r.labels] : []
498
508
  });
499
- return q((d) => {
500
- const S = d.findIndex((k) => k.id === (s == null ? void 0 : s.id));
509
+ return U((f) => {
510
+ const S = f.findIndex((k) => k.id === (s == null ? void 0 : s.id));
501
511
  if (S > -1) {
502
- const k = [...d];
512
+ const k = [...f];
503
513
  return k[S] = s, k;
504
514
  }
505
- return d;
506
- }), R(s), E(s), !0;
515
+ return f;
516
+ }), R(s), z(s), !0;
507
517
  }).catch(() => !1);
508
518
  } else
509
- return !h && !H && u ? t !== "CONFIRM" && f === "pending" || f === "nocode" || f === "hascode" || f === "" && (u.confirmStatus !== 1 || t !== "CONFIRM") ? Promise.resolve(!0) : (u.labels && (u.labels = u.labels.filter((r) => !!r.id)), e !== void 0 && (u.confirmStatus = e, u.isLabeled = ((i = u.labels) == null ? void 0 : i.length) > 0), g.cvforceDatahub.updateSamples(a, o.id, [u], e).then(() => (D.success({
519
+ return !d && !H && u ? t !== "CONFIRM" && h === "pending" || h === "nocode" || h === "hascode" || h === "" && (u.confirmStatus !== 1 || t !== "CONFIRM") ? Promise.resolve(!0) : (u.labels && (u.labels = u.labels.filter((r) => !!r.id)), e !== void 0 && (u.confirmStatus = e, u.isLabeled = ((i = u.labels) == null ? void 0 : i.length) > 0), g.cvforceDatahub.updateSamples(c, o.id, [u], e).then(() => (D.success({
510
520
  content: "保存成功"
511
- }), q((r) => {
512
- const s = r.findIndex((d) => d.id === (u == null ? void 0 : u.id));
521
+ }), U((r) => {
522
+ const s = r.findIndex((f) => f.id === (u == null ? void 0 : u.id));
513
523
  return s > -1 && (r[s] = u), [...r];
514
524
  }), R(b({}, u)), !0)).catch(() => !1)) : Promise.resolve(!0);
515
- }, Vt = (e, t) => {
516
- if (h && h.labels.some((n) => !n.id))
525
+ }, At = (e, t) => {
526
+ if (d && d.labels.some((n) => !n.id))
517
527
  return D.error("所有标注需设置标签"), Promise.resolve(!1);
518
- Qe(e, t);
519
- }, zt = () => {
520
- xe.confirm({
528
+ Ye(e, t);
529
+ }, Et = (e) => {
530
+ if (d && d.labels.some((t) => !t.id)) {
531
+ D.error("所有标注需设置标签");
532
+ return;
533
+ }
534
+ if (!d) {
535
+ j(!1);
536
+ return;
537
+ }
538
+ xe(e).then((t) => {
539
+ t && (z(void 0), j(!1), w(), q());
540
+ });
541
+ }, Bt = () => {
542
+ ke.confirm({
521
543
  title: "确认要删除当前数据吗?",
522
544
  content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
523
545
  onOk: () => {
524
- !u || !o || g.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(a, o.id, u.id).then(() => {
546
+ !u || !o || g.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(c, o.id, u.id).then(() => {
525
547
  const e = v.findIndex((n) => n.id === u.id);
526
548
  v.splice(e, 1);
527
549
  const t = v.length;
528
- q([...v]), T(y(b({}, l), {
550
+ U([...v]), T(y(b({}, l), {
529
551
  total: l.total ? l.total - 1 : 0
530
- })), e <= v.length - 1 ? R(v[e]) : (R(v[e - 1]), z(e - 1)), w(), E(void 0), (t === 0 || l.total && l.total - 1 === 0) && (R(void 0), E(void 0), z(-1), de || ue(!1), setTimeout(() => {
552
+ })), e <= v.length - 1 ? R(v[e]) : (R(v[e - 1]), V(e - 1)), w(), z(void 0), (t === 0 || l.total && l.total - 1 === 0) && (R(void 0), z(void 0), V(-1), he || ue(!1), setTimeout(() => {
531
553
  T((n) => y(b({}, n), {
532
554
  current: 1,
533
555
  type: void 0
@@ -536,67 +558,67 @@ const Xn = (L) => {
536
558
  });
537
559
  }
538
560
  });
539
- }, Ye = [{
561
+ }, et = [{
540
562
  key: "",
541
- label: `全部(${J})`,
563
+ label: `全部(${Q})`,
542
564
  children: null
543
565
  }, {
544
566
  key: "nocode",
545
- label: `未标注(${ce})`,
567
+ label: `未标注(${de})`,
546
568
  children: null
547
569
  }, {
548
570
  key: "pending",
549
- label: `待确认(${ae})`,
571
+ label: `待确认(${fe})`,
550
572
  children: null
551
573
  }, {
552
574
  key: "hascode",
553
- label: `已标注(${J - ce - ae})`,
575
+ label: `已标注(${Q - de - fe})`,
554
576
  children: null
555
- }], Pt = () => {
577
+ }], Mt = () => {
556
578
  var e, t;
557
- (t = (e = le.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
579
+ (t = (e = ae.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
558
580
  top: 0
559
581
  });
560
- }, At = (e) => {
561
- Lt(e), ee();
562
- }, et = (e) => {
563
- Se.current++, Ce.current++, G.current++, O >= 0 && f !== void 0 && f !== null && (ge.current[f] = {
564
- index: O,
582
+ }, Ft = (e) => {
583
+ Dt(e), ne();
584
+ }, tt = (e) => {
585
+ Se.current++, Ce.current++, Z.current++, M >= 0 && h !== void 0 && h !== null && (ge.current[h] = {
586
+ index: M,
565
587
  page: l.current || 1
566
- }), ee(), h ? Ae(h == null ? void 0 : h.confirmStatus).then((t) => {
567
- t ? (Le(e), w()) : D.error("保存失败");
588
+ }), ne(), d ? xe(d == null ? void 0 : d.confirmStatus).then((t) => {
589
+ t ? (we(e), w()) : D.error("保存失败");
568
590
  }) : (T(y(b({}, l), {
569
591
  current: 1,
570
592
  total: void 0
571
- })), Le(e)), e === "nocode" && De([]);
572
- }, Et = () => {
593
+ })), we(e)), e === "nocode" && Ne([]);
594
+ }, Ot = () => {
573
595
  if (console.log("一键确认", g, o), !(g != null && g.cvforceDatahub) || !(o != null && o.id))
574
596
  return Promise.resolve(!1);
575
- xe.confirm({
597
+ ke.confirm({
576
598
  title: "一键保存所有标注?",
577
599
  content: "待确认的所有带预标注信息的图片将保存至已标注页签下",
578
600
  onOk: () => {
579
- g.cvforceDatahub.getAllConfirmSamples(a, o.id).then((e) => {
580
- D.success("保存成功"), P(y(b({}, l), {
601
+ g.cvforceDatahub.getAllConfirmSamples(c, o.id).then((e) => {
602
+ D.success("保存成功"), A(y(b({}, l), {
581
603
  current: 1
582
604
  })), w();
583
605
  });
584
606
  }
585
607
  });
586
- }, Mt = (e, t) => {
587
- const n = new Set(V);
608
+ }, Ht = (e, t) => {
609
+ const n = new Set(P);
588
610
  t ? n.add(e) : n.delete(e), Ve(n);
589
- }, Bt = (e) => {
590
- const t = new Set(V);
611
+ }, Ut = (e) => {
612
+ const t = new Set(P);
591
613
  e ? v.forEach((n) => {
592
614
  t.add(n.id);
593
615
  }) : v.forEach((n) => {
594
616
  t.delete(n.id);
595
617
  }), Ve(t), Ie(e);
596
- }, ee = () => {
618
+ }, ne = () => {
597
619
  Ve(/* @__PURE__ */ new Set()), Ie(!1);
598
- }, tt = () => {
599
- const e = v.filter((n) => V.has(n.id)), t = {
620
+ }, nt = () => {
621
+ const e = v.filter((n) => P.has(n.id)), t = {
600
622
  nocode: 0,
601
623
  pending: 0,
602
624
  hascode: 0
@@ -604,13 +626,13 @@ const Xn = (L) => {
604
626
  return e.forEach((n) => {
605
627
  n.confirmStatus === 1 ? t.pending++ : !n.labels || n.labels.length === 0 ? t.nocode++ : t.hascode++;
606
628
  }), t;
607
- }, Ft = () => {
608
- if (V.size === 0) {
629
+ }, qt = () => {
630
+ if (P.size === 0) {
609
631
  D.warning("请先选择要删除的图片");
610
632
  return;
611
633
  }
612
- const e = tt(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ m("div", {
613
- children: [/* @__PURE__ */ c("p", {
634
+ const e = nt(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ m("div", {
635
+ children: [/* @__PURE__ */ a("p", {
614
636
  style: {
615
637
  marginBottom: 16
616
638
  },
@@ -625,7 +647,7 @@ const Xn = (L) => {
625
647
  alignItems: "center",
626
648
  marginBottom: 4
627
649
  },
628
- children: [/* @__PURE__ */ c("span", {
650
+ children: [/* @__PURE__ */ a("span", {
629
651
  style: {
630
652
  display: "inline-block",
631
653
  padding: "2px 8px",
@@ -645,7 +667,7 @@ const Xn = (L) => {
645
667
  alignItems: "center",
646
668
  marginBottom: 4
647
669
  },
648
- children: [/* @__PURE__ */ c("span", {
670
+ children: [/* @__PURE__ */ a("span", {
649
671
  style: {
650
672
  display: "inline-block",
651
673
  padding: "2px 8px",
@@ -665,7 +687,7 @@ const Xn = (L) => {
665
687
  alignItems: "center",
666
688
  marginBottom: 4
667
689
  },
668
- children: [/* @__PURE__ */ c("span", {
690
+ children: [/* @__PURE__ */ a("span", {
669
691
  style: {
670
692
  display: "inline-block",
671
693
  padding: "2px 8px",
@@ -680,43 +702,43 @@ const Xn = (L) => {
680
702
  children: [e.hascode, "张"]
681
703
  })]
682
704
  })]
683
- }), /* @__PURE__ */ c("p", {
705
+ }), /* @__PURE__ */ a("p", {
684
706
  style: {
685
707
  color: "red"
686
708
  },
687
709
  children: "彻底移除选中的图片文件及其关联的所有标注坐标、标签信息。数据不可恢复。"
688
710
  })]
689
711
  });
690
- xe.confirm({
712
+ ke.confirm({
691
713
  title: "删除操作确认",
692
714
  content: r,
693
715
  okText: "确定",
694
716
  cancelText: "取消",
695
717
  width: 500,
696
- onOk: () => Me(void 0, null, function* () {
718
+ onOk: () => Be(void 0, null, function* () {
697
719
  if (!o)
698
720
  return;
699
- const s = Array.from(V);
721
+ const s = Array.from(P);
700
722
  if (s.length === 0) {
701
723
  D.warning("没有选中的图片");
702
724
  return;
703
725
  }
704
726
  try {
705
- yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, o.id, s), D.success("删除成功"), ee(), P(y(b({}, l), {
727
+ yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(c, o.id, s), D.success("删除成功"), ne(), A(y(b({}, l), {
706
728
  current: 1
707
- })), w(), W();
708
- } catch (d) {
729
+ })), w(), q();
730
+ } catch (f) {
709
731
  D.error("删除失败");
710
732
  }
711
733
  })
712
734
  });
713
- }, Ot = () => {
714
- if (V.size === 0) {
735
+ }, Kt = () => {
736
+ if (P.size === 0) {
715
737
  D.warning("请先选择要清除标注的图片");
716
738
  return;
717
739
  }
718
- const e = tt(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ m("div", {
719
- children: [/* @__PURE__ */ c("p", {
740
+ const e = nt(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ m("div", {
741
+ children: [/* @__PURE__ */ a("p", {
720
742
  style: {
721
743
  marginBottom: 16
722
744
  },
@@ -731,7 +753,7 @@ const Xn = (L) => {
731
753
  alignItems: "center",
732
754
  marginBottom: 4
733
755
  },
734
- children: [/* @__PURE__ */ c("span", {
756
+ children: [/* @__PURE__ */ a("span", {
735
757
  style: {
736
758
  display: "inline-block",
737
759
  padding: "2px 8px",
@@ -751,7 +773,7 @@ const Xn = (L) => {
751
773
  alignItems: "center",
752
774
  marginBottom: 4
753
775
  },
754
- children: [/* @__PURE__ */ c("span", {
776
+ children: [/* @__PURE__ */ a("span", {
755
777
  style: {
756
778
  display: "inline-block",
757
779
  padding: "2px 8px",
@@ -771,7 +793,7 @@ const Xn = (L) => {
771
793
  alignItems: "center",
772
794
  marginBottom: 4
773
795
  },
774
- children: [/* @__PURE__ */ c("span", {
796
+ children: [/* @__PURE__ */ a("span", {
775
797
  style: {
776
798
  display: "inline-block",
777
799
  padding: "2px 8px",
@@ -786,44 +808,44 @@ const Xn = (L) => {
786
808
  children: [e.hascode, "张"]
787
809
  })]
788
810
  })]
789
- }), /* @__PURE__ */ c("p", {
811
+ }), /* @__PURE__ */ a("p", {
790
812
  children: '保留图片文件,仅删除其内部的标注框(含 AI 预标注)。删除后图片状态变更为"未标注"。'
791
813
  })]
792
814
  });
793
- xe.confirm({
815
+ ke.confirm({
794
816
  title: "删除操作确认",
795
817
  content: r,
796
818
  okText: "确定",
797
819
  cancelText: "取消",
798
820
  width: 500,
799
- onOk: () => Me(void 0, null, function* () {
821
+ onOk: () => Be(void 0, null, function* () {
800
822
  if (!o)
801
823
  return;
802
- const s = v.filter((d) => V.has(d.id));
824
+ const s = v.filter((f) => P.has(f.id));
803
825
  if (s.length === 0) {
804
826
  D.warning("没有选中的图片");
805
827
  return;
806
828
  }
807
829
  try {
808
- const d = s.map((S) => y(b({}, S), {
830
+ const f = s.map((S) => y(b({}, S), {
809
831
  labels: [],
810
832
  confirmStatus: 0,
811
833
  isLabeled: !1
812
834
  }));
813
- yield g.cvforceDatahub.updateSamples(a, o.id, d, 0), D.success("清除标注成功"), ee(), P(y(b({}, l), {
835
+ yield g.cvforceDatahub.updateSamples(c, o.id, f, 0), D.success("清除标注成功"), ne(), A(y(b({}, l), {
814
836
  current: 1
815
- })), w(), W();
816
- } catch (d) {
837
+ })), w(), q();
838
+ } catch (f) {
817
839
  D.error("清除标注失败");
818
840
  }
819
841
  })
820
842
  });
821
843
  };
822
- return /* @__PURE__ */ c(jt, {
823
- locale: tn,
824
- children: /* @__PURE__ */ c(nn.Provider, {
844
+ return /* @__PURE__ */ a(Jt, {
845
+ locale: sn,
846
+ children: /* @__PURE__ */ a(an.Provider, {
825
847
  value: {
826
- datasetId: a,
848
+ datasetId: c,
827
849
  versionId: (o == null ? void 0 : o.id) || "",
828
850
  no: (o == null ? void 0 : o.no) || "",
829
851
  loading: Fe,
@@ -835,37 +857,37 @@ const Xn = (L) => {
835
857
  featuresConfig: {
836
858
  labelManager: be,
837
859
  datasetManager: N,
838
- annotation: ie,
839
- filterSwitch: oe,
860
+ annotation: oe,
861
+ filterSwitch: se,
840
862
  header: I,
841
- exampleSrcRoot: re
863
+ exampleSrcRoot: le
842
864
  }
843
865
  },
844
- children: x ? x.markType === "detection" ? /* @__PURE__ */ c("div", {
866
+ children: x ? x.markType === "detection" ? /* @__PURE__ */ a("div", {
845
867
  className: "detection-version-detail",
846
- children: It ? o != null && o.id && N && N.preLabel ? /* @__PURE__ */ c(sn, {
847
- datasetId: a,
868
+ children: kt ? o != null && o.id && N && N.preLabel ? /* @__PURE__ */ a(hn, {
869
+ datasetId: c,
848
870
  versionId: o.id,
849
871
  onClose: () => {
850
- xt(!1), ze(), W(), w(), P();
872
+ Lt(!1), ze(), q(), w(), A();
851
873
  },
852
874
  samples: v,
853
- labels: F,
875
+ labels: O,
854
876
  fetchLength: ze
855
- }) : null : /* @__PURE__ */ m(an, {
877
+ }) : null : /* @__PURE__ */ m(gn, {
856
878
  className: "product-details-page",
857
- header: I === !1 ? void 0 : /* @__PURE__ */ c(fn, {
879
+ header: I === !1 ? void 0 : /* @__PURE__ */ a(mn, {
858
880
  backTo: me,
859
881
  onBackClick: I != null && I.onBackClick ? () => {
860
- u && Y(), I.onBackClick && I.onBackClick();
882
+ u && te(), I.onBackClick && I.onBackClick();
861
883
  } : void 0,
862
884
  left: !Fe && /* @__PURE__ */ m(pe, {
863
- children: [/* @__PURE__ */ c("span", {
885
+ children: [/* @__PURE__ */ a("span", {
864
886
  style: {
865
887
  fontWeight: "bold"
866
888
  },
867
889
  children: x == null ? void 0 : x.name
868
- }), /* @__PURE__ */ c(Gt, {
890
+ }), /* @__PURE__ */ a(Qt, {
869
891
  disabled: (I == null ? void 0 : I.versionSelect) === !1,
870
892
  value: o == null ? void 0 : o.id,
871
893
  style: {
@@ -880,32 +902,32 @@ const Xn = (L) => {
880
902
  if (!x || !t)
881
903
  return;
882
904
  const n = ve.find((i) => i.id === t.id);
883
- se(n), ee(), I != null && I.onVersionChange && I.onVersionChange(n);
905
+ ce(n), ne(), I != null && I.onVersionChange && I.onVersionChange(n);
884
906
  }
885
907
  })]
886
908
  }),
887
909
  right: /* @__PURE__ */ m(pe, {
888
- children: [!u && N && N.add && /* @__PURE__ */ c(ct, {
910
+ children: [!u && N && N.add && /* @__PURE__ */ a(ct, {
889
911
  isPreLabel: H,
890
912
  placement: "bottom",
891
- children: /* @__PURE__ */ c(te, {
913
+ children: /* @__PURE__ */ a(ie, {
892
914
  type: "default",
893
- onClick: () => we(!0),
894
- disabled: j === ne.Pending || j === ne.Started || H,
915
+ onClick: () => De(!0),
916
+ disabled: G === re.Pending || G === re.Started || H,
895
917
  children: "导入数据"
896
918
  }, "del")
897
- }), /* @__PURE__ */ c(ot, {
919
+ }), /* @__PURE__ */ a(lt, {
898
920
  menu: {
899
921
  items: [{
900
922
  key: "manual",
901
- label: /* @__PURE__ */ c(ct, {
923
+ label: /* @__PURE__ */ a(ct, {
902
924
  isPreLabel: H,
903
- children: /* @__PURE__ */ c(pe, {
904
- children: N && N.label && /* @__PURE__ */ c(te, {
925
+ children: /* @__PURE__ */ a(pe, {
926
+ children: N && N.label && /* @__PURE__ */ a(ie, {
905
927
  type: "text",
906
928
  disabled: H,
907
929
  onClick: () => {
908
- u || Le("nocode"), fe(!0), z(-1), f === "nocode" && (z(0), R(v[0])), ue(!0);
930
+ u || we("nocode"), j(!0), V(-1), h === "nocode" && (V(0), R(v[0])), ue(!0);
909
931
  },
910
932
  children: "人工标注"
911
933
  })
@@ -913,47 +935,47 @@ const Xn = (L) => {
913
935
  })
914
936
  }, !u && N && N.preLabel && (o != null && o.id) ? {
915
937
  key: "auto",
916
- label: /* @__PURE__ */ c(pn, {
938
+ label: /* @__PURE__ */ a(Sn, {
917
939
  buttonType: "text",
918
- datasetId: a,
940
+ datasetId: c,
919
941
  versionId: o.id,
920
942
  disabled: !v.length,
921
- setIsTaskChange: Ct,
943
+ setIsTaskChange: xt,
922
944
  datasetType: "detection",
923
- preLabelTask: Ge
945
+ preLabelTask: Ze
924
946
  })
925
947
  } : null]
926
948
  },
927
949
  placement: "bottom",
928
- children: /* @__PURE__ */ m(te, {
950
+ children: /* @__PURE__ */ m(ie, {
929
951
  type: "primary",
930
- children: ["开始标注", /* @__PURE__ */ c(at, {})]
952
+ children: ["开始标注", /* @__PURE__ */ a(dt, {})]
931
953
  })
932
- }), /* @__PURE__ */ c(gn, {
933
- when: bt,
954
+ }), /* @__PURE__ */ a(yn, {
955
+ when: vt,
934
956
  content: "确认要离开此页面吗?",
935
957
  subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
936
- }), Ke && /* @__PURE__ */ c(dn, {
937
- datasetIam: ut,
938
- datasetId: a,
958
+ }), Ke && /* @__PURE__ */ a(pn, {
959
+ datasetIam: gt,
960
+ datasetId: c,
939
961
  currentVersion: o,
940
962
  tenCode: x == null ? void 0 : x.tenantCode,
941
963
  isVisible: Ke,
942
- setIsVisible: we,
964
+ setIsVisible: De,
943
965
  getVersionListRequest: w,
944
- setIsConfirm: mt,
966
+ setIsConfirm: bt,
945
967
  onUploadStatusChange: (e) => {
946
- pt(e);
968
+ mt(e);
947
969
  },
948
970
  tableReload: () => {
949
971
  var e, t, n;
950
- o != null && o.id && ((t = (e = le.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
972
+ o != null && o.id && ((t = (e = ae.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
951
973
  top: 0
952
- }), P(y(b({}, l), {
974
+ }), A(y(b({}, l), {
953
975
  current: 1
954
- })), (n = ke.current) == null || n.fetchLabels());
976
+ })), (n = Le.current) == null || n.fetchLabels());
955
977
  },
956
- loadVersionData: Je,
978
+ loadVersionData: Qe,
957
979
  markType: x.markType
958
980
  })]
959
981
  })
@@ -961,55 +983,55 @@ const Xn = (L) => {
961
983
  children: [/* @__PURE__ */ m("div", {
962
984
  className: "detection-header",
963
985
  children: [/* @__PURE__ */ m(pe, {
964
- children: [oe.tabs && /* @__PURE__ */ c(Zt, {
986
+ children: [se.tabs && /* @__PURE__ */ a(Yt, {
965
987
  className: "header-tab",
966
- activeKey: f,
967
- items: Ye,
968
- onChange: et
969
- }), !u && oe.search && /* @__PURE__ */ c(un, {
988
+ activeKey: h,
989
+ items: et,
990
+ onChange: tt
991
+ }), !u && se.search && /* @__PURE__ */ a(vn, {
970
992
  placeholder: "请输入图片名称搜索",
971
993
  style: {
972
994
  width: 200
973
995
  },
974
- suffix: /* @__PURE__ */ c(cn, {}),
975
- value: Q,
976
- onChange: At,
996
+ suffix: /* @__PURE__ */ a(un, {}),
997
+ value: ee,
998
+ onChange: Ft,
977
999
  allowClear: !0
978
- }), !u && /* @__PURE__ */ c(ot, {
1000
+ }), !u && /* @__PURE__ */ a(lt, {
979
1001
  menu: {
980
1002
  items: [{
981
1003
  key: "deleteWithAnnotations",
982
1004
  label: "删除所选图片(含标注)",
983
- onClick: Ft
1005
+ onClick: qt
984
1006
  }, {
985
1007
  key: "clearAnnotations",
986
1008
  label: "仅清除所选图片内的标注",
987
- onClick: Ot
1009
+ onClick: Kt
988
1010
  }]
989
1011
  },
990
- disabled: V.size === 0,
991
- children: /* @__PURE__ */ m(te, {
1012
+ disabled: P.size === 0,
1013
+ children: /* @__PURE__ */ m(ie, {
992
1014
  size: "middle",
993
- disabled: V.size === 0,
994
- children: ["删除", /* @__PURE__ */ c(at, {})]
1015
+ disabled: P.size === 0,
1016
+ children: ["删除", /* @__PURE__ */ a(dt, {})]
995
1017
  })
996
- }), !u && /* @__PURE__ */ m(rt, {
997
- children: [/* @__PURE__ */ c(lt, {
998
- checked: wt,
999
- onChange: (e) => Bt(e.target.checked),
1018
+ }), !u && /* @__PURE__ */ m(ot, {
1019
+ children: [/* @__PURE__ */ a(st, {
1020
+ checked: Nt,
1021
+ onChange: (e) => Ut(e.target.checked),
1000
1022
  children: "选择当前页"
1001
- }), V.size > 0 && /* @__PURE__ */ m("span", {
1023
+ }), P.size > 0 && /* @__PURE__ */ m("span", {
1002
1024
  style: {
1003
1025
  color: "#666"
1004
1026
  },
1005
- children: ["已选中", V.size, "张,共", l.total || 0, "张"]
1027
+ children: ["已选中", P.size, "张,共", l.total || 0, "张"]
1006
1028
  })]
1007
1029
  })]
1008
- }), /* @__PURE__ */ c(pe, {
1009
- children: f === "pending" && /* @__PURE__ */ c(te, {
1030
+ }), /* @__PURE__ */ a(pe, {
1031
+ children: h === "pending" && /* @__PURE__ */ a(ie, {
1010
1032
  type: "primary",
1011
1033
  className: "pending-confirm-button",
1012
- onClick: Et,
1034
+ onClick: Ot,
1013
1035
  children: "一键确认"
1014
1036
  })
1015
1037
  })]
@@ -1017,97 +1039,99 @@ const Xn = (L) => {
1017
1039
  className: "d-row",
1018
1040
  children: [/* @__PURE__ */ m("div", {
1019
1041
  className: "d-right",
1020
- ref: le,
1021
- children: [he && /* @__PURE__ */ c(yn, {
1022
- datasetId: a,
1023
- isImageDetailVisible: he,
1042
+ ref: ae,
1043
+ children: [Y && /* @__PURE__ */ a(kn, {
1044
+ datasetId: c,
1045
+ isImageDetailVisible: Y,
1024
1046
  setIsImageDetailVisible: ue,
1025
- currentSample: h != null ? h : u,
1026
- labels: F,
1027
- previewMode: !de,
1028
- filterItems: Ye,
1029
- filterMode: f,
1030
- onFilterChange: et,
1031
- onChange: E,
1032
- onNextClick: (e) => Qe(e),
1033
- onPrevClick: (e) => Nt(e),
1034
- onSave: (e, t) => Vt(e, t),
1035
- onDeleteSample: () => zt(),
1047
+ currentSample: d != null ? d : u,
1048
+ labels: O,
1049
+ previewMode: !he,
1050
+ filterItems: et,
1051
+ filterMode: h,
1052
+ onFilterChange: tt,
1053
+ onChange: z,
1054
+ onNextClick: (e) => Ye(e),
1055
+ onPrevClick: (e) => Pt(e),
1056
+ onSave: (e, t) => At(e, t),
1057
+ onDeleteSample: () => Bt(),
1036
1058
  onEnterEdit: () => {
1037
- fe(!0);
1059
+ j(!0);
1038
1060
  },
1061
+ onBackToDetail: (e) => Et(e),
1062
+ onLoadingChange: Rt,
1039
1063
  onRefresh: () => {
1040
1064
  var e;
1041
- (e = W()) == null || e.then((t) => {
1065
+ (e = q()) == null || e.then((t) => {
1042
1066
  var n, i;
1043
- if (h) {
1067
+ if (d) {
1044
1068
  const r = [];
1045
- (n = h.labels) == null || n.forEach((s) => {
1046
- t != null && t.find((d) => d.id === s.id) && r.push(s);
1047
- }), h.labels = r, E(b({}, h));
1069
+ (n = d.labels) == null || n.forEach((s) => {
1070
+ t != null && t.find((f) => f.id === s.id) && r.push(s);
1071
+ }), d.labels = r, z(b({}, d));
1048
1072
  }
1049
1073
  if (u) {
1050
1074
  const r = [];
1051
1075
  (i = u.labels) == null || i.forEach((s) => {
1052
- t != null && t.find((d) => d.id === s.id) && r.push(s);
1076
+ t != null && t.find((f) => f.id === s.id) && r.push(s);
1053
1077
  }), u.labels = r, R(b({}, u));
1054
1078
  }
1055
1079
  }), w();
1056
1080
  },
1057
1081
  isPreLabel: H,
1058
1082
  imgCount: {
1059
- total: J,
1060
- index: O + 1
1083
+ total: Q,
1084
+ index: M + 1
1061
1085
  },
1062
1086
  settingHide: !be,
1063
1087
  canLabel: !!(N && N.label),
1064
1088
  canDelete: !!(N && N.delete)
1065
- }), l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ c(rt, {
1066
- children: /* @__PURE__ */ c(Yt, {
1089
+ }), l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ a(ot, {
1090
+ children: /* @__PURE__ */ a(on, {
1067
1091
  innerProps: {
1068
1092
  className: "d-right-row"
1069
1093
  },
1070
1094
  data: v,
1071
1095
  itemKey: "id",
1072
- height: Math.max(dt, 1),
1073
- onScroll: Tt,
1096
+ height: Math.max(ft, 1),
1097
+ onScroll: zt,
1074
1098
  children: (e, t) => {
1075
1099
  var n;
1076
- return /* @__PURE__ */ c(_t, {
1100
+ return /* @__PURE__ */ a(en, {
1077
1101
  className: "d-right-col",
1078
1102
  "data-sample-id": e.id,
1079
1103
  children: /* @__PURE__ */ m("div", {
1080
1104
  className: "right-col-wrapper",
1081
- onMouseEnter: () => Re(e.id),
1082
- onMouseLeave: () => Re(""),
1083
- children: [/* @__PURE__ */ c("div", {
1105
+ onMouseEnter: () => Te(e.id),
1106
+ onMouseLeave: () => Te(""),
1107
+ children: [/* @__PURE__ */ a("div", {
1084
1108
  className: "detection-status-wrapper",
1085
- children: /* @__PURE__ */ c(vn, {
1109
+ children: /* @__PURE__ */ a(xn, {
1086
1110
  sample: e
1087
1111
  })
1088
- }), /* @__PURE__ */ c("div", {
1112
+ }), /* @__PURE__ */ a("div", {
1089
1113
  className: "sample-checkbox-wrapper",
1090
- children: /* @__PURE__ */ c(lt, {
1091
- checked: V.has(e.id),
1114
+ children: /* @__PURE__ */ a(st, {
1115
+ checked: P.has(e.id),
1092
1116
  onChange: (i) => {
1093
- i.stopPropagation(), Mt(e.id, i.target.checked);
1117
+ i.stopPropagation(), Ht(e.id, i.target.checked);
1094
1118
  },
1095
1119
  onClick: (i) => i.stopPropagation()
1096
1120
  })
1097
- }), /* @__PURE__ */ c("div", {
1121
+ }), /* @__PURE__ */ a("div", {
1098
1122
  className: "right-col-img",
1099
- onClick: () => Dt(t),
1100
- children: /* @__PURE__ */ c(hn, {
1123
+ onClick: () => Tt(t),
1124
+ children: /* @__PURE__ */ a(bn, {
1101
1125
  fileKey: e.fileKey,
1102
1126
  width: 124,
1103
1127
  thumbnailUrl: e.thumbnailUrl
1104
1128
  })
1105
1129
  }), /* @__PURE__ */ m("div", {
1106
1130
  className: "right-col-text",
1107
- children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ c(Xt, {
1131
+ children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ a(tn, {
1108
1132
  placement: "top",
1109
- title: /* @__PURE__ */ c("div", {
1110
- children: Object.keys(e.labels.reduce((i, r) => (i[r.label] ? ++i[r.label] : i[r.label] = 1, i), {})).map((i) => /* @__PURE__ */ c("div", {
1133
+ title: /* @__PURE__ */ a("div", {
1134
+ children: Object.keys(e.labels.reduce((i, r) => (i[r.label] ? ++i[r.label] : i[r.label] = 1, i), {})).map((i) => /* @__PURE__ */ a("div", {
1111
1135
  children: i
1112
1136
  }, i))
1113
1137
  }),
@@ -1116,7 +1140,7 @@ const Xn = (L) => {
1116
1140
  width: "100%",
1117
1141
  display: "flex"
1118
1142
  },
1119
- children: [/* @__PURE__ */ c("span", {
1143
+ children: [/* @__PURE__ */ a("span", {
1120
1144
  style: {
1121
1145
  display: "inline-block",
1122
1146
  maxWidth: "calc(100% - 25px)",
@@ -1125,21 +1149,21 @@ const Xn = (L) => {
1125
1149
  whiteSpace: "nowrap"
1126
1150
  },
1127
1151
  children: e.labels[0].label
1128
- }), e.labels.length > 1 ? /* @__PURE__ */ c("span", {
1152
+ }), e.labels.length > 1 ? /* @__PURE__ */ a("span", {
1129
1153
  style: {
1130
1154
  color: "rgba(0,0,0,0.45)",
1131
1155
  marginLeft: 5
1132
1156
  },
1133
- children: Rt(e)
1157
+ children: Vt(e)
1134
1158
  }) : null]
1135
1159
  })
1136
- }) : /* @__PURE__ */ c("span", {
1160
+ }) : /* @__PURE__ */ a("span", {
1137
1161
  style: {
1138
1162
  color: "rgba(0,0,0,0.45)",
1139
1163
  width: "100%"
1140
1164
  },
1141
1165
  children: "无标签"
1142
- }), /* @__PURE__ */ c("div", {
1166
+ }), /* @__PURE__ */ a("div", {
1143
1167
  children: t + 1
1144
1168
  })]
1145
1169
  })]
@@ -1147,21 +1171,21 @@ const Xn = (L) => {
1147
1171
  }, e.id);
1148
1172
  }
1149
1173
  })
1150
- }) : /* @__PURE__ */ c("div", {
1174
+ }) : /* @__PURE__ */ a("div", {
1151
1175
  className: "empty",
1152
- children: l.total === 0 ? /* @__PURE__ */ c(Jt, {
1153
- image: rn,
1176
+ children: l.total === 0 ? /* @__PURE__ */ a(nn, {
1177
+ image: cn,
1154
1178
  description: /* @__PURE__ */ m("span", {
1155
- children: ["暂无数据", f !== "hascode" && !Q && /* @__PURE__ */ c("span", {
1156
- children: N && N.add && /* @__PURE__ */ m(te, {
1179
+ children: ["暂无数据", h !== "hascode" && !ee && /* @__PURE__ */ a("span", {
1180
+ children: N && N.add && /* @__PURE__ */ m(ie, {
1157
1181
  type: "link",
1158
1182
  size: "small",
1159
1183
  style: {
1160
1184
  padding: 0
1161
1185
  },
1162
- onClick: () => we(!0),
1163
- disabled: j === ne.Pending || j === ne.Started,
1164
- children: [/* @__PURE__ */ c("span", {
1186
+ onClick: () => De(!0),
1187
+ disabled: G === re.Pending || G === re.Started,
1188
+ children: [/* @__PURE__ */ a("span", {
1165
1189
  style: {
1166
1190
  color: "black"
1167
1191
  },
@@ -1170,32 +1194,32 @@ const Xn = (L) => {
1170
1194
  })
1171
1195
  })]
1172
1196
  })
1173
- }) : /* @__PURE__ */ c(Qt, {})
1197
+ }) : /* @__PURE__ */ a(rn, {})
1174
1198
  })]
1175
- }), f !== "nocode" && oe.labels && /* @__PURE__ */ c("div", {
1199
+ }), h !== "nocode" && se.labels && /* @__PURE__ */ a("div", {
1176
1200
  className: "d-sider",
1177
- children: /* @__PURE__ */ c(on, {
1178
- ref: ke,
1179
- datasetId: a,
1180
- data: F || [],
1181
- selected: K,
1201
+ children: /* @__PURE__ */ a(dn, {
1202
+ ref: Le,
1203
+ datasetId: c,
1204
+ data: O || [],
1205
+ selected: W,
1182
1206
  onSelectedChange: (e) => {
1183
- ee(), De((F == null ? void 0 : F.filter((t) => e.find((n) => n.label === t.label))) || []);
1207
+ ne(), Ne((O == null ? void 0 : O.filter((t) => e.find((n) => n.label === t.label))) || []);
1184
1208
  },
1185
1209
  onListChange: (e) => {
1186
1210
  if (!o)
1187
1211
  return;
1188
1212
  let t = 2;
1189
- f === "pending" ? t = 1 : f === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
1213
+ h === "pending" ? t = 1 : h === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(c, o.id, {
1190
1214
  confirmStatus: t
1191
1215
  }).then((n) => {
1192
- const r = (n || []).filter((d) => d.label !== "nocode").map((d, S) => ({
1193
- label: d.label,
1194
- count: d.count,
1195
- id: d.id,
1196
- color: st[S % 40]
1197
- })), s = K.filter((d) => r.some((S) => S.id === d.id));
1198
- je(r), K.length !== s.length && De(s);
1216
+ const r = (n || []).filter((f) => f.label !== "nocode").map((f, S) => ({
1217
+ label: f.label,
1218
+ count: f.count,
1219
+ id: f.id,
1220
+ color: at[S % 40]
1221
+ })), s = W.filter((f) => r.some((S) => S.id === f.id));
1222
+ je(r), W.length !== s.length && Ne(s);
1199
1223
  }), w();
1200
1224
  },
1201
1225
  isPreLabel: H
@@ -1203,7 +1227,7 @@ const Xn = (L) => {
1203
1227
  })]
1204
1228
  })]
1205
1229
  })
1206
- }) : /* @__PURE__ */ c("div", {
1230
+ }) : /* @__PURE__ */ a("div", {
1207
1231
  style: {
1208
1232
  color: "red",
1209
1233
  textAlign: "center"
@@ -1214,6 +1238,6 @@ const Xn = (L) => {
1214
1238
  });
1215
1239
  };
1216
1240
  export {
1217
- Sn as ISampleActionType,
1218
- Xn as default
1241
+ wn as ISampleActionType,
1242
+ ii as default
1219
1243
  };