@yqg/permission 1.2.0 → 1.3.0-alpha.0

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 (45) hide show
  1. package/README.md +50 -38
  2. package/dist/apply-modal-CpmDDWWV.js +12865 -0
  3. package/dist/category-selector-BQ0-kg3o.js +1275 -0
  4. package/dist/index-D_0ZQip-.js +2972 -0
  5. package/dist/index-wLkVeDMW.js +5040 -0
  6. package/dist/index.js +2 -2
  7. package/dist/permission-item-Df_aagL1.js +1266 -0
  8. package/dist/{yqg-permission-Bxzu3bMl.js → yqg-permission-BjVCs5lN.js} +3483 -3538
  9. package/dist/yqg-permission.umd.js +250 -0
  10. package/package.json +13 -3
  11. package/plugins/alioss.ts +237 -0
  12. package/src/App.vue +7 -8
  13. package/src/assets/category.png +0 -0
  14. package/src/axios/index.ts +6 -1
  15. package/src/components/apply-modal.vue +254 -157
  16. package/src/components/category-selector.vue +130 -0
  17. package/src/components/permission-item.vue +230 -0
  18. package/src/components/success-modal.vue +4 -4
  19. package/src/components/yqg-permission.vue +23 -110
  20. package/src/hooks/useAttributesCache.ts +21 -0
  21. package/src/hooks/useCategory.ts +21 -0
  22. package/src/hooks/useDragable.ts +9 -10
  23. package/src/hooks/useFormat.ts +50 -0
  24. package/src/hooks/useStatus.ts +82 -0
  25. package/src/i18n/zh-CH.ts +9 -2
  26. package/src/main.ts +2 -0
  27. package/src/typings/index.d.ts +40 -7
  28. package/src/utils/index.ts +9 -0
  29. package/src/yqg-permission/index.ts +13 -1
  30. package/vite.config.ts +18 -2
  31. package/dist/apply-modal-BBqMmKS2.js +0 -8742
  32. package/dist/checkbox-item-CFWhXmMU.js +0 -4991
  33. package/dist/index-BAGvIeoy.js +0 -6164
  34. package/dist/index.umd.cjs +0 -259
  35. package/dist_/345/211/257/346/234/254/apply-modal-Bgd3UWf-.js +0 -8739
  36. package/dist_/345/211/257/346/234/254/card.png +0 -0
  37. package/dist_/345/211/257/346/234/254/checkbox-item-DiIgFuBE.js +0 -4988
  38. package/dist_/345/211/257/346/234/254/dialog.png +0 -0
  39. package/dist_/345/211/257/346/234/254/image.png +0 -0
  40. package/dist_/345/211/257/346/234/254/index-CUS1Jydp.js +0 -6164
  41. package/dist_/345/211/257/346/234/254/index.js +0 -5
  42. package/dist_/345/211/257/346/234/254/index.umd.cjs +0 -259
  43. package/dist_/345/211/257/346/234/254/yqg-permission-ChMRXqi6.js +0 -14944
  44. package/src/assets/apply.png +0 -0
  45. package/src/components/checkbox-item.vue +0 -201
@@ -0,0 +1,1266 @@
1
+ import { c as ge, Y as Ve, a as H, a1 as We, b as ot, _ as k, ae as Xe, aX as Me, aZ as _e, P as ae, $ as Fe, ar as it, as as st, aE as rt, aY as ct, a_ as ut, a0 as He, ak as Ce, aj as dt, am as vt, N as ft, R as mt, a$ as gt, b0 as pt, Q as ht, b1 as bt, b2 as yt, b3 as St, aq as Ct, aD as At, aP as W, aS as we, aQ as Ot } from "./yqg-permission-BjVCs5lN.js";
2
+ import { p as It, a as wt, d as pe, c as w, G as Tt, w as xe, E as Qe, q as ze, e as V, F as Be, s as de, b as Ne, y as ne, r as Re, K as J, P as Ae, L as Oe, M as Z, S as Pe, R as _, O as xt, u as B, U as ue, N as X, a0 as Nt, Y as Vt } from "./index-wLkVeDMW.js";
3
+ import { L as Pt, j as kt, p as Et, K as ee, d as Dt, F as Ft, e as Bt, f as Rt, Q as Lt } from "./apply-modal-CpmDDWWV.js";
4
+ import { u as $t, b as jt, T as Mt, i as Ee, c as _t, h as Ht, j as zt, k as Ut, t as Kt, B as Gt, e as Yt, f as Wt, g as Xt } from "./index-D_0ZQip-.js";
5
+ function Qt() {
6
+ return /(mac\sos|macintosh)/i.test(navigator.appVersion);
7
+ }
8
+ const qe = Symbol("SelectContextKey");
9
+ function qt(e) {
10
+ return It(qe, e);
11
+ }
12
+ function Jt() {
13
+ return wt(qe, {});
14
+ }
15
+ var Zt = function(e, m) {
16
+ var i = {};
17
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && m.indexOf(a) < 0 && (i[a] = e[a]);
18
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
19
+ m.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (i[a[t]] = e[a[t]]);
20
+ return i;
21
+ };
22
+ function Ue(e) {
23
+ return typeof e == "string" || typeof e == "number";
24
+ }
25
+ const el = pe({
26
+ compatConfig: {
27
+ MODE: 3
28
+ },
29
+ name: "OptionList",
30
+ inheritAttrs: !1,
31
+ setup(e, m) {
32
+ let {
33
+ expose: i,
34
+ slots: a
35
+ } = m;
36
+ const t = $t(), l = Jt(), d = w(() => `${t.prefixCls}-item`), f = jt(() => l.flattenOptions, [() => t.open, () => l.flattenOptions], (r) => r[0]), g = kt(), p = (r) => {
37
+ r.preventDefault();
38
+ }, s = (r) => {
39
+ g.current && g.current.scrollTo(typeof r == "number" ? {
40
+ index: r
41
+ } : r);
42
+ }, C = function(r) {
43
+ let T = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
44
+ const N = f.value.length;
45
+ for (let y = 0; y < N; y += 1) {
46
+ const D = (r + y * T + N) % N, {
47
+ group: z,
48
+ data: j
49
+ } = f.value[D];
50
+ if (!z && !j.disabled)
51
+ return D;
52
+ }
53
+ return -1;
54
+ }, b = Tt({
55
+ activeIndex: C(0)
56
+ }), A = function(r) {
57
+ let T = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
58
+ b.activeIndex = r;
59
+ const N = {
60
+ source: T ? "keyboard" : "mouse"
61
+ }, y = f.value[r];
62
+ if (!y) {
63
+ l.onActiveValue(null, -1, N);
64
+ return;
65
+ }
66
+ l.onActiveValue(y.value, r, N);
67
+ };
68
+ xe([() => f.value.length, () => t.searchValue], () => {
69
+ A(l.defaultActiveFirstOption !== !1 ? C(0) : -1);
70
+ }, {
71
+ immediate: !0
72
+ });
73
+ const v = (r) => l.rawValues.has(r) && t.mode !== "combobox";
74
+ xe([() => t.open, () => t.searchValue], () => {
75
+ if (!t.multiple && t.open && l.rawValues.size === 1) {
76
+ const r = Array.from(l.rawValues)[0], T = Qe(f.value).findIndex((N) => {
77
+ let {
78
+ data: y
79
+ } = N;
80
+ return y[l.fieldNames.value] === r;
81
+ });
82
+ T !== -1 && (A(T), ze(() => {
83
+ s(T);
84
+ }));
85
+ }
86
+ t.open && ze(() => {
87
+ var r;
88
+ (r = g.current) === null || r === void 0 || r.scrollTo(void 0);
89
+ });
90
+ }, {
91
+ immediate: !0,
92
+ flush: "post"
93
+ });
94
+ const S = (r) => {
95
+ r !== void 0 && l.onSelect(r, {
96
+ selected: !l.rawValues.has(r)
97
+ }), t.multiple || t.toggleOpen(!1);
98
+ }, x = (r) => typeof r.label == "function" ? r.label() : r.label;
99
+ function O(r) {
100
+ const T = f.value[r];
101
+ if (!T) return null;
102
+ const N = T.data || {}, {
103
+ value: y
104
+ } = N, {
105
+ group: D
106
+ } = T, z = Et(N, !0), j = x(T);
107
+ return T ? V("div", H(H({
108
+ "aria-label": typeof j == "string" && !D ? j : null
109
+ }, z), {}, {
110
+ key: r,
111
+ role: D ? "presentation" : "option",
112
+ id: `${t.id}_list_${r}`,
113
+ "aria-selected": v(y)
114
+ }), [y]) : null;
115
+ }
116
+ return i({
117
+ onKeydown: (r) => {
118
+ const {
119
+ which: T,
120
+ ctrlKey: N
121
+ } = r;
122
+ switch (T) {
123
+ case ee.N:
124
+ case ee.P:
125
+ case ee.UP:
126
+ case ee.DOWN: {
127
+ let y = 0;
128
+ if (T === ee.UP ? y = -1 : T === ee.DOWN ? y = 1 : Qt() && N && (T === ee.N ? y = 1 : T === ee.P && (y = -1)), y !== 0) {
129
+ const D = C(b.activeIndex + y, y);
130
+ s(D), A(D, !0);
131
+ }
132
+ break;
133
+ }
134
+ case ee.ENTER: {
135
+ const y = f.value[b.activeIndex];
136
+ y && !y.data.disabled ? S(y.value) : S(void 0), t.open && r.preventDefault();
137
+ break;
138
+ }
139
+ case ee.ESC:
140
+ t.toggleOpen(!1), t.open && r.stopPropagation();
141
+ }
142
+ },
143
+ onKeyup: () => {
144
+ },
145
+ scrollTo: (r) => {
146
+ s(r);
147
+ }
148
+ }), () => {
149
+ const {
150
+ id: r,
151
+ notFoundContent: T,
152
+ onPopupScroll: N
153
+ } = t, {
154
+ menuItemSelectedIcon: y,
155
+ fieldNames: D,
156
+ virtual: z,
157
+ listHeight: j,
158
+ listItemHeight: he
159
+ } = l, Q = a.option, {
160
+ activeIndex: U
161
+ } = b, be = Object.keys(D).map((M) => D[M]);
162
+ return f.value.length === 0 ? V("div", {
163
+ role: "listbox",
164
+ id: `${r}_list`,
165
+ class: `${d.value}-empty`,
166
+ onMousedown: p
167
+ }, [T]) : V(Be, null, [V("div", {
168
+ role: "listbox",
169
+ id: `${r}_list`,
170
+ style: {
171
+ height: 0,
172
+ width: 0,
173
+ overflow: "hidden"
174
+ }
175
+ }, [O(U - 1), O(U), O(U + 1)]), V(Pt, {
176
+ itemKey: "key",
177
+ ref: g,
178
+ data: f.value,
179
+ height: j,
180
+ itemHeight: he,
181
+ fullHeight: !1,
182
+ onMousedown: p,
183
+ onScroll: N,
184
+ virtual: z
185
+ }, {
186
+ default: (M, oe) => {
187
+ var ie;
188
+ const {
189
+ group: ye,
190
+ groupOption: ve,
191
+ data: K,
192
+ value: I
193
+ } = M, {
194
+ key: L
195
+ } = K, $ = typeof M.label == "function" ? M.label() : M.label;
196
+ if (ye) {
197
+ const ce = (ie = K.title) !== null && ie !== void 0 ? ie : Ue($) && $;
198
+ return V("div", {
199
+ class: ge(d.value, `${d.value}-group`),
200
+ title: ce
201
+ }, [Q ? Q(K) : $ !== void 0 ? $ : L]);
202
+ }
203
+ const {
204
+ disabled: q,
205
+ title: se,
206
+ children: re,
207
+ style: Se,
208
+ class: n,
209
+ className: o
210
+ } = K, c = Zt(K, ["disabled", "title", "children", "style", "class", "className"]), h = Ve(c, be), u = v(I), F = `${d.value}-option`, le = ge(d.value, F, n, o, {
211
+ [`${F}-grouped`]: ve,
212
+ [`${F}-active`]: U === oe && !q,
213
+ [`${F}-disabled`]: q,
214
+ [`${F}-selected`]: u
215
+ }), Y = x(M), fe = !y || typeof y == "function" || u, P = typeof Y == "number" ? Y : Y || I;
216
+ let Ie = Ue(P) ? P.toString() : void 0;
217
+ return se !== void 0 && (Ie = se), V("div", H(H({}, h), {}, {
218
+ "aria-selected": u,
219
+ class: le,
220
+ title: Ie,
221
+ onMousemove: (ce) => {
222
+ c.onMousemove && c.onMousemove(ce), !(U === oe || q) && A(oe);
223
+ },
224
+ onClick: (ce) => {
225
+ q || S(I), c.onClick && c.onClick(ce);
226
+ },
227
+ style: Se
228
+ }), [V("div", {
229
+ class: `${F}-content`
230
+ }, [Q ? Q(K) : P]), We(y) || u, fe && V(Mt, {
231
+ class: `${d.value}-option-state`,
232
+ customizeIcon: y,
233
+ customizeIconProps: {
234
+ isSelected: u
235
+ }
236
+ }, {
237
+ default: () => [u ? "✓" : null]
238
+ })]);
239
+ }
240
+ })]);
241
+ };
242
+ }
243
+ });
244
+ var tl = function(e, m) {
245
+ var i = {};
246
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && m.indexOf(a) < 0 && (i[a] = e[a]);
247
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
248
+ m.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (i[a[t]] = e[a[t]]);
249
+ return i;
250
+ };
251
+ function ll(e) {
252
+ const m = e, {
253
+ key: i,
254
+ children: a
255
+ } = m, t = m.props, {
256
+ value: l,
257
+ disabled: d
258
+ } = t, f = tl(t, ["value", "disabled"]), g = a == null ? void 0 : a.default;
259
+ return k({
260
+ key: i,
261
+ value: l !== void 0 ? l : i,
262
+ children: g,
263
+ disabled: d || d === ""
264
+ }, f);
265
+ }
266
+ function Je(e) {
267
+ let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
268
+ return ot(e).map((a, t) => {
269
+ var l;
270
+ if (!We(a) || !a.type)
271
+ return null;
272
+ const {
273
+ type: {
274
+ isSelectOptGroup: d
275
+ },
276
+ key: f,
277
+ children: g,
278
+ props: p
279
+ } = a;
280
+ if (m || !d)
281
+ return ll(a);
282
+ const s = g && g.default ? g.default() : void 0, C = (p == null ? void 0 : p.label) || ((l = g.label) === null || l === void 0 ? void 0 : l.call(g)) || f;
283
+ return k(k({
284
+ key: `__RC_SELECT_GRP__${f === null ? t : String(f)}__`
285
+ }, p), {
286
+ label: C,
287
+ options: Je(s || [])
288
+ });
289
+ }).filter((a) => a);
290
+ }
291
+ function nl(e, m, i) {
292
+ const a = de(), t = de(), l = de(), d = de([]);
293
+ return xe([e, m], () => {
294
+ e.value ? d.value = Qe(e.value).slice() : d.value = Je(m.value);
295
+ }, {
296
+ immediate: !0,
297
+ deep: !0
298
+ }), Ne(() => {
299
+ const f = d.value, g = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), s = i.value;
300
+ function C(b) {
301
+ let A = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
302
+ for (let v = 0; v < b.length; v += 1) {
303
+ const S = b[v];
304
+ !S[s.options] || A ? (g.set(S[s.value], S), p.set(S[s.label], S)) : C(S[s.options], !0);
305
+ }
306
+ }
307
+ C(f), a.value = f, t.value = g, l.value = p;
308
+ }), {
309
+ options: a,
310
+ valueOptions: t,
311
+ labelOptions: l
312
+ };
313
+ }
314
+ function Ze(e) {
315
+ return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
316
+ }
317
+ function ke(e, m) {
318
+ return Ze(e).join("").toUpperCase().includes(m);
319
+ }
320
+ const al = (e, m, i, a, t) => w(() => {
321
+ const l = i.value, d = t == null ? void 0 : t.value, f = a == null ? void 0 : a.value;
322
+ if (!l || f === !1)
323
+ return e.value;
324
+ const {
325
+ options: g,
326
+ label: p,
327
+ value: s
328
+ } = m.value, C = [], b = typeof f == "function", A = l.toUpperCase(), v = b ? f : (x, O) => d ? ke(O[d], A) : O[g] ? ke(O[p !== "children" ? p : "label"], A) : ke(O[s], A), S = b ? (x) => Ee(x) : (x) => x;
329
+ return e.value.forEach((x) => {
330
+ if (x[g]) {
331
+ if (v(l, S(x)))
332
+ C.push(x);
333
+ else {
334
+ const R = x[g].filter((G) => v(l, S(G)));
335
+ R.length && C.push(k(k({}, x), {
336
+ [g]: R
337
+ }));
338
+ }
339
+ return;
340
+ }
341
+ v(l, S(x)) && C.push(x);
342
+ }), C;
343
+ }), ol = (e, m) => {
344
+ const i = de({
345
+ values: /* @__PURE__ */ new Map(),
346
+ options: /* @__PURE__ */ new Map()
347
+ });
348
+ return [w(() => {
349
+ const {
350
+ values: l,
351
+ options: d
352
+ } = i.value, f = e.value.map((s) => {
353
+ var C;
354
+ return s.label === void 0 ? k(k({}, s), {
355
+ label: (C = l.get(s.value)) === null || C === void 0 ? void 0 : C.label
356
+ }) : s;
357
+ }), g = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
358
+ return f.forEach((s) => {
359
+ g.set(s.value, s), p.set(s.value, m.value.get(s.value) || d.get(s.value));
360
+ }), i.value.values = g, i.value.options = p, f;
361
+ }), (l) => m.value.get(l) || i.value.options.get(l)];
362
+ }, il = ["inputValue"];
363
+ function et() {
364
+ return k(k({}, Yt()), {
365
+ prefixCls: String,
366
+ id: String,
367
+ backfill: {
368
+ type: Boolean,
369
+ default: void 0
370
+ },
371
+ // >>> Field Names
372
+ fieldNames: Object,
373
+ // >>> Search
374
+ /** @deprecated Use `searchValue` instead */
375
+ inputValue: String,
376
+ searchValue: String,
377
+ onSearch: Function,
378
+ autoClearSearchValue: {
379
+ type: Boolean,
380
+ default: void 0
381
+ },
382
+ // >>> Select
383
+ onSelect: Function,
384
+ onDeselect: Function,
385
+ // >>> Options
386
+ /**
387
+ * In Select, `false` means do nothing.
388
+ * In TreeSelect, `false` will highlight match item.
389
+ * It's by design.
390
+ */
391
+ filterOption: {
392
+ type: [Boolean, Function],
393
+ default: void 0
394
+ },
395
+ filterSort: Function,
396
+ optionFilterProp: String,
397
+ optionLabelProp: String,
398
+ options: Array,
399
+ defaultActiveFirstOption: {
400
+ type: Boolean,
401
+ default: void 0
402
+ },
403
+ virtual: {
404
+ type: Boolean,
405
+ default: void 0
406
+ },
407
+ listHeight: Number,
408
+ listItemHeight: Number,
409
+ // >>> Icon
410
+ menuItemSelectedIcon: ae.any,
411
+ mode: String,
412
+ labelInValue: {
413
+ type: Boolean,
414
+ default: void 0
415
+ },
416
+ value: ae.any,
417
+ defaultValue: ae.any,
418
+ onChange: Function,
419
+ children: Array
420
+ });
421
+ }
422
+ function sl(e) {
423
+ return !e || typeof e != "object";
424
+ }
425
+ const rl = pe({
426
+ compatConfig: {
427
+ MODE: 3
428
+ },
429
+ name: "VcSelect",
430
+ inheritAttrs: !1,
431
+ props: Xe(et(), {
432
+ prefixCls: "vc-select",
433
+ autoClearSearchValue: !0,
434
+ listHeight: 200,
435
+ listItemHeight: 20,
436
+ dropdownMatchSelectWidth: !0
437
+ }),
438
+ setup(e, m) {
439
+ let {
440
+ expose: i,
441
+ attrs: a,
442
+ slots: t
443
+ } = m;
444
+ const l = _t(ne(e, "id")), d = w(() => Ht(e.mode)), f = w(() => !!(!e.options && e.children)), g = w(() => e.filterOption === void 0 && e.mode === "combobox" ? !1 : e.filterOption), p = w(() => zt(e.fieldNames, f.value)), [s, C] = Me("", {
445
+ value: w(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
446
+ postState: (n) => n || ""
447
+ }), b = nl(ne(e, "options"), ne(e, "children"), p), {
448
+ valueOptions: A,
449
+ labelOptions: v,
450
+ options: S
451
+ } = b, x = (n) => Ze(n).map((c) => {
452
+ var h, u;
453
+ let F, le, Y, fe;
454
+ sl(c) ? F = c : (Y = c.key, le = c.label, F = (h = c.value) !== null && h !== void 0 ? h : Y);
455
+ const P = A.value.get(F);
456
+ return P && (le === void 0 && (le = P == null ? void 0 : P[e.optionLabelProp || p.value.label]), Y === void 0 && (Y = (u = P == null ? void 0 : P.key) !== null && u !== void 0 ? u : F), fe = P == null ? void 0 : P.disabled), {
457
+ label: le,
458
+ value: F,
459
+ key: Y,
460
+ disabled: fe,
461
+ option: P
462
+ };
463
+ }), [O, R] = Me(e.defaultValue, {
464
+ value: ne(e, "value")
465
+ }), G = w(() => {
466
+ var n;
467
+ const o = x(O.value);
468
+ return e.mode === "combobox" && !(!((n = o[0]) === null || n === void 0) && n.value) ? [] : o;
469
+ }), [E, r] = ol(G, A), T = w(() => {
470
+ if (!e.mode && E.value.length === 1) {
471
+ const n = E.value[0];
472
+ if (n.value === null && (n.label === null || n.label === void 0))
473
+ return [];
474
+ }
475
+ return E.value.map((n) => {
476
+ var o;
477
+ return k(k({}, n), {
478
+ label: (o = typeof n.label == "function" ? n.label() : n.label) !== null && o !== void 0 ? o : n.value
479
+ });
480
+ });
481
+ }), N = w(() => new Set(E.value.map((n) => n.value)));
482
+ Ne(() => {
483
+ var n;
484
+ if (e.mode === "combobox") {
485
+ const o = (n = E.value[0]) === null || n === void 0 ? void 0 : n.value;
486
+ o != null && C(String(o));
487
+ }
488
+ }, {
489
+ flush: "post"
490
+ });
491
+ const y = (n, o) => {
492
+ const c = o ?? n;
493
+ return {
494
+ [p.value.value]: n,
495
+ [p.value.label]: c
496
+ };
497
+ }, D = de();
498
+ Ne(() => {
499
+ if (e.mode !== "tags") {
500
+ D.value = S.value;
501
+ return;
502
+ }
503
+ const n = S.value.slice(), o = (c) => A.value.has(c);
504
+ [...E.value].sort((c, h) => c.value < h.value ? -1 : 1).forEach((c) => {
505
+ const h = c.value;
506
+ o(h) || n.push(y(h, c.label));
507
+ }), D.value = n;
508
+ });
509
+ const z = al(D, p, s, g, ne(e, "optionFilterProp")), j = w(() => e.mode !== "tags" || !s.value || z.value.some((n) => n[e.optionFilterProp || "value"] === s.value) ? z.value : [y(s.value), ...z.value]), he = w(() => e.filterSort ? [...j.value].sort((n, o) => e.filterSort(n, o)) : j.value), Q = w(() => Ut(he.value, {
510
+ fieldNames: p.value,
511
+ childrenAsData: f.value
512
+ })), U = (n) => {
513
+ const o = x(n);
514
+ if (R(o), e.onChange && // Trigger event only when value changed
515
+ (o.length !== E.value.length || o.some((c, h) => {
516
+ var u;
517
+ return ((u = E.value[h]) === null || u === void 0 ? void 0 : u.value) !== (c == null ? void 0 : c.value);
518
+ }))) {
519
+ const c = e.labelInValue ? o.map((u) => k(k({}, u), {
520
+ originLabel: u.label,
521
+ label: typeof u.label == "function" ? u.label() : u.label
522
+ })) : o.map((u) => u.value), h = o.map((u) => Ee(r(u.value)));
523
+ e.onChange(
524
+ // Value
525
+ d.value ? c : c[0],
526
+ // Option
527
+ d.value ? h : h[0]
528
+ );
529
+ }
530
+ }, [be, M] = _e(null), [oe, ie] = _e(0), ye = w(() => e.defaultActiveFirstOption !== void 0 ? e.defaultActiveFirstOption : e.mode !== "combobox"), ve = function(n, o) {
531
+ let {
532
+ source: c = "keyboard"
533
+ } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
534
+ ie(o), e.backfill && e.mode === "combobox" && n !== null && c === "keyboard" && M(String(n));
535
+ }, K = (n, o) => {
536
+ const c = () => {
537
+ var h;
538
+ const u = r(n), F = u == null ? void 0 : u[p.value.label];
539
+ return [e.labelInValue ? {
540
+ label: typeof F == "function" ? F() : F,
541
+ originLabel: F,
542
+ value: n,
543
+ key: (h = u == null ? void 0 : u.key) !== null && h !== void 0 ? h : n
544
+ } : n, Ee(u)];
545
+ };
546
+ if (o && e.onSelect) {
547
+ const [h, u] = c();
548
+ e.onSelect(h, u);
549
+ } else if (!o && e.onDeselect) {
550
+ const [h, u] = c();
551
+ e.onDeselect(h, u);
552
+ }
553
+ }, I = (n, o) => {
554
+ let c;
555
+ const h = d.value ? o.selected : !0;
556
+ h ? c = d.value ? [...E.value, n] : [n] : c = E.value.filter((u) => u.value !== n), U(c), K(n, h), e.mode === "combobox" ? M("") : (!d.value || e.autoClearSearchValue) && (C(""), M(""));
557
+ }, L = (n, o) => {
558
+ U(n), (o.type === "remove" || o.type === "clear") && o.values.forEach((c) => {
559
+ K(c.value, !1);
560
+ });
561
+ }, $ = (n, o) => {
562
+ var c;
563
+ if (C(n), M(null), o.source === "submit") {
564
+ const h = (n || "").trim();
565
+ if (h) {
566
+ const u = Array.from(/* @__PURE__ */ new Set([...N.value, h]));
567
+ U(u), K(h, !0), C("");
568
+ }
569
+ return;
570
+ }
571
+ o.source !== "blur" && (e.mode === "combobox" && U(n), (c = e.onSearch) === null || c === void 0 || c.call(e, n));
572
+ }, q = (n) => {
573
+ let o = n;
574
+ e.mode !== "tags" && (o = n.map((h) => {
575
+ const u = v.value.get(h);
576
+ return u == null ? void 0 : u.value;
577
+ }).filter((h) => h !== void 0));
578
+ const c = Array.from(/* @__PURE__ */ new Set([...N.value, ...o]));
579
+ U(c), c.forEach((h) => {
580
+ K(h, !0);
581
+ });
582
+ }, se = w(() => e.virtual !== !1 && e.dropdownMatchSelectWidth !== !1);
583
+ qt(Kt(k(k({}, b), {
584
+ flattenOptions: Q,
585
+ onActiveValue: ve,
586
+ defaultActiveFirstOption: ye,
587
+ onSelect: I,
588
+ menuItemSelectedIcon: ne(e, "menuItemSelectedIcon"),
589
+ rawValues: N,
590
+ fieldNames: p,
591
+ virtual: se,
592
+ listHeight: ne(e, "listHeight"),
593
+ listItemHeight: ne(e, "listItemHeight"),
594
+ childrenAsData: f
595
+ })));
596
+ const re = Re();
597
+ i({
598
+ focus() {
599
+ var n;
600
+ (n = re.value) === null || n === void 0 || n.focus();
601
+ },
602
+ blur() {
603
+ var n;
604
+ (n = re.value) === null || n === void 0 || n.blur();
605
+ },
606
+ scrollTo(n) {
607
+ var o;
608
+ (o = re.value) === null || o === void 0 || o.scrollTo(n);
609
+ }
610
+ });
611
+ const Se = w(() => Ve(e, [
612
+ "id",
613
+ "mode",
614
+ "prefixCls",
615
+ "backfill",
616
+ "fieldNames",
617
+ // Search
618
+ "inputValue",
619
+ "searchValue",
620
+ "onSearch",
621
+ "autoClearSearchValue",
622
+ // Select
623
+ "onSelect",
624
+ "onDeselect",
625
+ "dropdownMatchSelectWidth",
626
+ // Options
627
+ "filterOption",
628
+ "filterSort",
629
+ "optionFilterProp",
630
+ "optionLabelProp",
631
+ "options",
632
+ "children",
633
+ "defaultActiveFirstOption",
634
+ "menuItemSelectedIcon",
635
+ "virtual",
636
+ "listHeight",
637
+ "listItemHeight",
638
+ // Value
639
+ "value",
640
+ "defaultValue",
641
+ "labelInValue",
642
+ "onChange"
643
+ ]));
644
+ return () => V(Gt, H(H(H({}, Se.value), a), {}, {
645
+ id: l,
646
+ prefixCls: e.prefixCls,
647
+ ref: re,
648
+ omitDomProps: il,
649
+ mode: e.mode,
650
+ displayValues: T.value,
651
+ onDisplayValuesChange: L,
652
+ searchValue: s.value,
653
+ onSearch: $,
654
+ onSearchSplit: q,
655
+ dropdownMatchSelectWidth: e.dropdownMatchSelectWidth,
656
+ OptionList: el,
657
+ emptyOptions: !Q.value.length,
658
+ activeValue: be.value,
659
+ activeDescendantId: `${l}_list_${oe.value}`
660
+ }), t);
661
+ }
662
+ }), Le = () => null;
663
+ Le.isSelectOption = !0;
664
+ Le.displayName = "ASelectOption";
665
+ const $e = () => null;
666
+ $e.isSelectOptGroup = !0;
667
+ $e.displayName = "ASelectOptGroup";
668
+ const cl = () => k(k({}, Ve(et(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
669
+ value: He([Array, Object, String, Number]),
670
+ defaultValue: He([Array, Object, String, Number]),
671
+ notFoundContent: ae.any,
672
+ suffixIcon: ae.any,
673
+ itemIcon: ae.any,
674
+ size: Ce(),
675
+ mode: Ce(),
676
+ bordered: dt(!0),
677
+ transitionName: String,
678
+ choiceTransitionName: Ce(""),
679
+ popupClassName: String,
680
+ /** @deprecated Please use `popupClassName` instead */
681
+ dropdownClassName: String,
682
+ placement: Ce(),
683
+ status: Ce(),
684
+ "onUpdate:value": vt()
685
+ }), Ke = "SECRET_COMBOBOX_MODE_DO_NOT_USE", te = pe({
686
+ compatConfig: {
687
+ MODE: 3
688
+ },
689
+ name: "ASelect",
690
+ Option: Le,
691
+ OptGroup: $e,
692
+ inheritAttrs: !1,
693
+ props: Xe(cl(), {
694
+ listHeight: 256,
695
+ listItemHeight: 24
696
+ }),
697
+ SECRET_COMBOBOX_MODE_DO_NOT_USE: Ke,
698
+ slots: Object,
699
+ setup(e, m) {
700
+ let {
701
+ attrs: i,
702
+ emit: a,
703
+ slots: t,
704
+ expose: l
705
+ } = m;
706
+ const d = Re(), f = Dt(), g = Ft.useInject(), p = w(() => Bt(g.status, e.status)), s = () => {
707
+ var I;
708
+ (I = d.value) === null || I === void 0 || I.focus();
709
+ }, C = () => {
710
+ var I;
711
+ (I = d.value) === null || I === void 0 || I.blur();
712
+ }, b = (I) => {
713
+ var L;
714
+ (L = d.value) === null || L === void 0 || L.scrollTo(I);
715
+ }, A = w(() => {
716
+ const {
717
+ mode: I
718
+ } = e;
719
+ if (I !== "combobox")
720
+ return I === Ke ? "combobox" : I;
721
+ }), {
722
+ prefixCls: v,
723
+ direction: S,
724
+ configProvider: x,
725
+ renderEmpty: O,
726
+ size: R,
727
+ getPrefixCls: G,
728
+ getPopupContainer: E,
729
+ disabled: r,
730
+ select: T
731
+ } = Fe("select", e), {
732
+ compactSize: N,
733
+ compactItemClassnames: y
734
+ } = it(v, S), D = w(() => N.value || R.value), z = st(), j = w(() => {
735
+ var I;
736
+ return (I = r.value) !== null && I !== void 0 ? I : z.value;
737
+ }), [he, Q] = Wt(v), U = w(() => G()), be = w(() => e.placement !== void 0 ? e.placement : S.value === "rtl" ? "bottomRight" : "bottomLeft"), M = w(() => rt(U.value, ct(be.value), e.transitionName)), oe = w(() => ge({
738
+ [`${v.value}-lg`]: D.value === "large",
739
+ [`${v.value}-sm`]: D.value === "small",
740
+ [`${v.value}-rtl`]: S.value === "rtl",
741
+ [`${v.value}-borderless`]: !e.bordered,
742
+ [`${v.value}-in-form-item`]: g.isFormItemInput
743
+ }, Rt(v.value, p.value, g.hasFeedback), y.value, Q.value)), ie = function() {
744
+ for (var I = arguments.length, L = new Array(I), $ = 0; $ < I; $++)
745
+ L[$] = arguments[$];
746
+ a("update:value", L[0]), a("change", ...L), f.onFieldChange();
747
+ }, ye = (I) => {
748
+ a("blur", I), f.onFieldBlur();
749
+ };
750
+ l({
751
+ blur: C,
752
+ focus: s,
753
+ scrollTo: b
754
+ });
755
+ const ve = w(() => A.value === "multiple" || A.value === "tags"), K = w(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !(ve.value || A.value === "combobox"));
756
+ return () => {
757
+ var I, L, $, q;
758
+ const {
759
+ notFoundContent: se,
760
+ listHeight: re = 256,
761
+ listItemHeight: Se = 24,
762
+ popupClassName: n,
763
+ dropdownClassName: o,
764
+ virtual: c,
765
+ dropdownMatchSelectWidth: h,
766
+ id: u = f.id.value,
767
+ placeholder: F = (I = t.placeholder) === null || I === void 0 ? void 0 : I.call(t),
768
+ showArrow: le
769
+ } = e, {
770
+ hasFeedback: Y,
771
+ feedbackIcon: fe
772
+ } = g;
773
+ let P;
774
+ se !== void 0 ? P = se : t.notFoundContent ? P = t.notFoundContent() : A.value === "combobox" ? P = null : P = (O == null ? void 0 : O("Select")) || V(ut, {
775
+ componentName: "Select"
776
+ }, null);
777
+ const {
778
+ suffixIcon: Ie,
779
+ itemIcon: ce,
780
+ removeIcon: lt,
781
+ clearIcon: nt
782
+ } = Xt(k(k({}, e), {
783
+ multiple: ve.value,
784
+ prefixCls: v.value,
785
+ hasFeedback: Y,
786
+ feedbackIcon: fe,
787
+ showArrow: K.value
788
+ }), t), je = Ve(e, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), at = ge(n || o, {
789
+ [`${v.value}-dropdown-${S.value}`]: S.value === "rtl"
790
+ }, Q.value);
791
+ return he(V(rl, H(H(H({
792
+ ref: d,
793
+ virtual: c,
794
+ dropdownMatchSelectWidth: h
795
+ }, je), i), {}, {
796
+ showSearch: (L = e.showSearch) !== null && L !== void 0 ? L : ($ = T == null ? void 0 : T.value) === null || $ === void 0 ? void 0 : $.showSearch,
797
+ placeholder: F,
798
+ listHeight: re,
799
+ listItemHeight: Se,
800
+ mode: A.value,
801
+ prefixCls: v.value,
802
+ direction: S.value,
803
+ inputIcon: Ie,
804
+ menuItemSelectedIcon: ce,
805
+ removeIcon: lt,
806
+ clearIcon: nt,
807
+ notFoundContent: P,
808
+ class: [oe.value, i.class],
809
+ getPopupContainer: E == null ? void 0 : E.value,
810
+ dropdownClassName: at,
811
+ onChange: ie,
812
+ onBlur: ye,
813
+ id: u,
814
+ dropdownRender: je.dropdownRender || t.dropdownRender,
815
+ transitionName: M.value,
816
+ children: (q = t.default) === null || q === void 0 ? void 0 : q.call(t),
817
+ tagRender: e.tagRender || t.tagRender,
818
+ optionLabelRender: t.optionLabel,
819
+ maxTagPlaceholder: e.maxTagPlaceholder || t.maxTagPlaceholder,
820
+ showArrow: Y || le,
821
+ disabled: j.value
822
+ }), {
823
+ option: t.option
824
+ }));
825
+ };
826
+ }
827
+ });
828
+ te.install = function(e) {
829
+ return e.component(te.name, te), e.component(te.Option.displayName, te.Option), e.component(te.OptGroup.displayName, te.OptGroup), e;
830
+ };
831
+ te.Option;
832
+ te.OptGroup;
833
+ const Te = (e, m, i) => {
834
+ const a = gt(i);
835
+ return {
836
+ [`${e.componentCls}-${m}`]: {
837
+ color: e[`color${i}`],
838
+ background: e[`color${a}Bg`],
839
+ borderColor: e[`color${a}Border`],
840
+ [`&${e.componentCls}-borderless`]: {
841
+ borderColor: "transparent"
842
+ }
843
+ }
844
+ };
845
+ }, ul = (e) => pt(e, (m, i) => {
846
+ let {
847
+ textColor: a,
848
+ lightBorderColor: t,
849
+ lightColor: l,
850
+ darkColor: d
851
+ } = i;
852
+ return {
853
+ [`${e.componentCls}-${m}`]: {
854
+ color: a,
855
+ background: l,
856
+ borderColor: t,
857
+ // Inverse color
858
+ "&-inverse": {
859
+ color: e.colorTextLightSolid,
860
+ background: d,
861
+ borderColor: d
862
+ },
863
+ [`&${e.componentCls}-borderless`]: {
864
+ borderColor: "transparent"
865
+ }
866
+ }
867
+ };
868
+ }), dl = (e) => {
869
+ const {
870
+ paddingXXS: m,
871
+ lineWidth: i,
872
+ tagPaddingHorizontal: a,
873
+ componentCls: t
874
+ } = e, l = a - i, d = m - i;
875
+ return {
876
+ // Result
877
+ [t]: k(k({}, ht(e)), {
878
+ display: "inline-block",
879
+ height: "auto",
880
+ marginInlineEnd: e.marginXS,
881
+ paddingInline: l,
882
+ fontSize: e.tagFontSize,
883
+ lineHeight: `${e.tagLineHeight}px`,
884
+ whiteSpace: "nowrap",
885
+ background: e.tagDefaultBg,
886
+ border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
887
+ borderRadius: e.borderRadiusSM,
888
+ opacity: 1,
889
+ transition: `all ${e.motionDurationMid}`,
890
+ textAlign: "start",
891
+ // RTL
892
+ [`&${t}-rtl`]: {
893
+ direction: "rtl"
894
+ },
895
+ "&, a, a:hover": {
896
+ color: e.tagDefaultColor
897
+ },
898
+ [`${t}-close-icon`]: {
899
+ marginInlineStart: d,
900
+ color: e.colorTextDescription,
901
+ fontSize: e.tagIconSize,
902
+ cursor: "pointer",
903
+ transition: `all ${e.motionDurationMid}`,
904
+ "&:hover": {
905
+ color: e.colorTextHeading
906
+ }
907
+ },
908
+ [`&${t}-has-color`]: {
909
+ borderColor: "transparent",
910
+ [`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
911
+ color: e.colorTextLightSolid
912
+ }
913
+ },
914
+ "&-checkable": {
915
+ backgroundColor: "transparent",
916
+ borderColor: "transparent",
917
+ cursor: "pointer",
918
+ [`&:not(${t}-checkable-checked):hover`]: {
919
+ color: e.colorPrimary,
920
+ backgroundColor: e.colorFillSecondary
921
+ },
922
+ "&:active, &-checked": {
923
+ color: e.colorTextLightSolid
924
+ },
925
+ "&-checked": {
926
+ backgroundColor: e.colorPrimary,
927
+ "&:hover": {
928
+ backgroundColor: e.colorPrimaryHover
929
+ }
930
+ },
931
+ "&:active": {
932
+ backgroundColor: e.colorPrimaryActive
933
+ }
934
+ },
935
+ "&-hidden": {
936
+ display: "none"
937
+ },
938
+ // To ensure that a space will be placed between character and `Icon`.
939
+ [`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
940
+ marginInlineStart: l
941
+ }
942
+ }),
943
+ [`${t}-borderless`]: {
944
+ borderColor: "transparent",
945
+ background: e.tagBorderlessBg
946
+ }
947
+ };
948
+ }, tt = ft("Tag", (e) => {
949
+ const {
950
+ fontSize: m,
951
+ lineHeight: i,
952
+ lineWidth: a,
953
+ fontSizeIcon: t
954
+ } = e, l = Math.round(m * i), d = e.fontSizeSM, f = l - a * 2, g = e.colorFillAlter, p = e.colorText, s = mt(e, {
955
+ tagFontSize: d,
956
+ tagLineHeight: f,
957
+ tagDefaultBg: g,
958
+ tagDefaultColor: p,
959
+ tagIconSize: t - 2 * a,
960
+ tagPaddingHorizontal: 8,
961
+ tagBorderlessBg: e.colorFillTertiary
962
+ });
963
+ return [dl(s), ul(s), Te(s, "success", "Success"), Te(s, "processing", "Info"), Te(s, "error", "Error"), Te(s, "warning", "Warning")];
964
+ }), vl = () => ({
965
+ prefixCls: String,
966
+ checked: {
967
+ type: Boolean,
968
+ default: void 0
969
+ },
970
+ onChange: {
971
+ type: Function
972
+ },
973
+ onClick: {
974
+ type: Function
975
+ },
976
+ "onUpdate:checked": Function
977
+ }), De = pe({
978
+ compatConfig: {
979
+ MODE: 3
980
+ },
981
+ name: "ACheckableTag",
982
+ inheritAttrs: !1,
983
+ props: vl(),
984
+ // emits: ['update:checked', 'change', 'click'],
985
+ setup(e, m) {
986
+ let {
987
+ slots: i,
988
+ emit: a,
989
+ attrs: t
990
+ } = m;
991
+ const {
992
+ prefixCls: l
993
+ } = Fe("tag", e), [d, f] = tt(l), g = (s) => {
994
+ const {
995
+ checked: C
996
+ } = e;
997
+ a("update:checked", !C), a("change", !C), a("click", s);
998
+ }, p = w(() => ge(l.value, f.value, {
999
+ [`${l.value}-checkable`]: !0,
1000
+ [`${l.value}-checkable-checked`]: e.checked
1001
+ }));
1002
+ return () => {
1003
+ var s;
1004
+ return d(V("span", H(H({}, t), {}, {
1005
+ class: [p.value, t.class],
1006
+ onClick: g
1007
+ }), [(s = i.default) === null || s === void 0 ? void 0 : s.call(i)]));
1008
+ };
1009
+ }
1010
+ }), fl = () => ({
1011
+ prefixCls: String,
1012
+ color: {
1013
+ type: String
1014
+ },
1015
+ closable: {
1016
+ type: Boolean,
1017
+ default: !1
1018
+ },
1019
+ closeIcon: ae.any,
1020
+ /** @deprecated `visible` will be removed in next major version. */
1021
+ visible: {
1022
+ type: Boolean,
1023
+ default: void 0
1024
+ },
1025
+ onClose: {
1026
+ type: Function
1027
+ },
1028
+ onClick: Ct(),
1029
+ "onUpdate:visible": Function,
1030
+ icon: ae.any,
1031
+ bordered: {
1032
+ type: Boolean,
1033
+ default: !0
1034
+ }
1035
+ }), me = pe({
1036
+ compatConfig: {
1037
+ MODE: 3
1038
+ },
1039
+ name: "ATag",
1040
+ inheritAttrs: !1,
1041
+ props: fl(),
1042
+ // emits: ['update:visible', 'close'],
1043
+ slots: Object,
1044
+ setup(e, m) {
1045
+ let {
1046
+ slots: i,
1047
+ emit: a,
1048
+ attrs: t
1049
+ } = m;
1050
+ const {
1051
+ prefixCls: l,
1052
+ direction: d
1053
+ } = Fe("tag", e), [f, g] = tt(l), p = de(!0);
1054
+ Ne(() => {
1055
+ e.visible !== void 0 && (p.value = e.visible);
1056
+ });
1057
+ const s = (v) => {
1058
+ v.stopPropagation(), a("update:visible", !1), a("close", v), !v.defaultPrevented && e.visible === void 0 && (p.value = !1);
1059
+ }, C = w(() => bt(e.color) || yt(e.color)), b = w(() => ge(l.value, g.value, {
1060
+ [`${l.value}-${e.color}`]: C.value,
1061
+ [`${l.value}-has-color`]: e.color && !C.value,
1062
+ [`${l.value}-hidden`]: !p.value,
1063
+ [`${l.value}-rtl`]: d.value === "rtl",
1064
+ [`${l.value}-borderless`]: !e.bordered
1065
+ })), A = (v) => {
1066
+ a("click", v);
1067
+ };
1068
+ return () => {
1069
+ var v, S, x;
1070
+ const {
1071
+ icon: O = (v = i.icon) === null || v === void 0 ? void 0 : v.call(i),
1072
+ color: R,
1073
+ closeIcon: G = (S = i.closeIcon) === null || S === void 0 ? void 0 : S.call(i),
1074
+ closable: E = !1
1075
+ } = e, r = () => E ? G ? V("span", {
1076
+ class: `${l.value}-close-icon`,
1077
+ onClick: s
1078
+ }, [G]) : V(At, {
1079
+ class: `${l.value}-close-icon`,
1080
+ onClick: s
1081
+ }, null) : null, T = {
1082
+ backgroundColor: R && !C.value ? R : void 0
1083
+ }, N = O || null, y = (x = i.default) === null || x === void 0 ? void 0 : x.call(i), D = N ? V(Be, null, [N, V("span", null, [y])]) : y, z = e.onClick !== void 0, j = V("span", H(H({}, t), {}, {
1084
+ onClick: A,
1085
+ class: [b.value, t.class],
1086
+ style: [T, t.style]
1087
+ }), [D, r()]);
1088
+ return f(z ? V(St, null, {
1089
+ default: () => [j]
1090
+ }) : j);
1091
+ };
1092
+ }
1093
+ });
1094
+ me.CheckableTag = De;
1095
+ me.install = function(e) {
1096
+ return e.component(me.name, me), e.component(De.name, De), e;
1097
+ };
1098
+ const ml = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGXSURBVHgBlVNLTgJBEK1qOrjtI4w34AhwAuQEZBJc4yyVBbCRxE2HrZoQT4CcAI7AEeYIbDUM5asGZYj0KJX0J1WvX9eXqUIm/qUpbNp6ZzHT+yzNY1iOGR796w2sc1w3B5Ujoc5D1ns/hzcxImb2OPJPqV3rwn0NYh/DR4mEJBGhxShLN7pEZAF1EsPbmAExr7C1kad9KGy6oF/RpR6R1FIGkzAvw4KPqqv4OC4jP3N1LpZ6R55aGiJd7JES4SF+CquK5JdHWnKE48o6YenjcCw8PtGTbMqtwGWSQ9/8X0p9ZY+M7DShLNKCOq9m2Cb7Ahy9P1N+m1eNgsrEz7AXJ7qQ7Cf/3IBLw71rxQzApIIkUUyAsgzDWyXSEhdcm2tY6N4xuqXxDTwrsCkGXT/VPtuyWSqHuaJtQ8cBuUkH2e0IgDcAmzEeteHD6SDr3eHMoHLKYT/IruuIF0PaR+UczjaIc4rLGpguRmfFTN1dUNncHAZyDEUoP0iclV0nxgLbz+joG32rxeGTJKKs6uFfXaw50XDK2C8hpcmbpfjHLAAAAABJRU5ErkJggg==", gl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGxSURBVHgB1VQ9TsNQDLYTKtYeIUeAjQXRboztESLoTDIGhqZLA1OSua3CEdqRidygPULYGDsipMTYLy9Sq/yIbuDqqe99tr989nMC8NcNu5xBmFiAeUIAF3zsGwBrItP1XDs7mVDICPOtEHFQKhgTD/hvj2RetpEabYRMFioyoqHn3Ksle8FEdVteKyHbSJR57iStANkLpltwMuG+w9c/mZCV7KRnQbgYVJjsBePSN215Z20OINPmXm0J8T2IlqmC9KVwmtOWZjaBfpj0TcivCOgDEYXE0guI6EWor2/Hn+nb5gvqlR3bc7x8KAh86OiTtozZ40d3Eh2CRz0M4tWUySJVFpGrllIFsR4ZsR0S2ihaEMN5uHAaCdUgE/ny5G8eXHkygrEvg2hdjgxmcvbcu1cgY6jOiFNpUYPCYlCqwZnv2oqIoFCBfDHJPFqF3FOrilZvCsFMWtODYlQjLKBQwT3IdxUmKlm1JLGPnLJcc3xQYKqzrQaFpeXQOxroJ3fis5KxEHMrhl0fBrH6HPJ7ynNXh/l3DvnNoY8g77cSGmBkIKOg5+03pmcuI31Z/8N+AJZHvSBz6IiBAAAAAElFTkSuQmCC", pl = { class: "crane-flex-center permission-item-wraper" }, hl = { style: { "flex-shrink": "0" } }, bl = { style: { "max-width": "400px" } }, yl = { class: "crane-text-overflow" }, Sl = { style: { "max-width": "400px" } }, Cl = { style: { "max-width": "400px" } }, Al = { class: "crane-flex-center crane-margin-left-4" }, Ol = ["src"], Il = { class: "crane-weak-color crane-margin-left-4" }, wl = ["src"], Tl = { style: { "max-width": "400px" } }, xl = { class: "crane-weak-color crane-margin-left-4 crane-text-overflow" }, Nl = {
1099
+ key: 6,
1100
+ class: "crane-weak-color crane-margin-left-12"
1101
+ }, Ge = "OWNER", Ye = "PENDING", Vl = /* @__PURE__ */ pe({
1102
+ __name: "permission-item",
1103
+ props: {
1104
+ checkedKeys: {
1105
+ type: Array,
1106
+ default: () => []
1107
+ },
1108
+ validTimeOptions: {
1109
+ type: Array,
1110
+ default: () => []
1111
+ },
1112
+ item: {
1113
+ type: Object,
1114
+ default: () => {
1115
+ }
1116
+ }
1117
+ },
1118
+ emits: ["onChangeTime", "updateTime"],
1119
+ setup(e, { emit: m }) {
1120
+ const i = [Ge, Ye], a = {
1121
+ L1: {
1122
+ color: "#1AA83B",
1123
+ text: W("levels.L1"),
1124
+ background: "#E3F9E9"
1125
+ },
1126
+ L2: {
1127
+ color: "#F37D1C",
1128
+ text: W("levels.L2"),
1129
+ background: "#FFE4BA"
1130
+ },
1131
+ L3: {
1132
+ color: "#F2494B",
1133
+ text: W("levels.L3"),
1134
+ background: "#FDCDC5"
1135
+ }
1136
+ };
1137
+ let t = m, l = e;
1138
+ const d = W("status"), f = Re(""), g = w(() => l.validTimeOptions.filter((b) => b.value !== "FOREVER")), p = (b) => {
1139
+ var O;
1140
+ if (Ge.includes(b.businessApplyType))
1141
+ return (O = b.virtualOwnState) == null ? void 0 : O.timeStatus;
1142
+ if (Ye.includes(b.businessApplyType))
1143
+ return b.pendingValidTime;
1144
+ const A = {
1145
+ L1: "SIXTY_DAYS",
1146
+ L2: "THIRTY_DAYS",
1147
+ L3: "SEVEN_DAYS"
1148
+ }, { relatedDepartmentIds: v = [], curDepartmentId: S = 0, securityLevel: x } = b;
1149
+ return v != null && v.includes(S) ? b.validTime = "NINETY_DAYS" : b.validTime = A[x], b.validTime;
1150
+ }, s = (b) => {
1151
+ var A, v;
1152
+ return `【${b.categoryName}】:${((v = (A = b.attributeValues) == null ? void 0 : A.map((S) => S.attributeName)) == null ? void 0 : v.join("、")) || W("empty")}`;
1153
+ };
1154
+ xe(() => l.checkedKeys, (b, A) => {
1155
+ A && !A.includes(l.item.feature) && b.includes(l.item.feature) && (f.value = p(l.item), l.item.validTime = p(l.item), t("updateTime", l.item));
1156
+ }, { immediate: !0 });
1157
+ const C = (b) => {
1158
+ l.item.validTime = b, t("updateTime", l.item), t("onChangeTime", l.item);
1159
+ };
1160
+ return (b, A) => {
1161
+ var v, S, x;
1162
+ return J(), Ae("div", pl, [
1163
+ e.item.securityLevel ? (J(), Oe(B(me), {
1164
+ key: 0,
1165
+ bordered: !1,
1166
+ style: xt({ color: a[e.item.securityLevel].color, background: a[e.item.securityLevel].background }),
1167
+ class: "crane-tag-position"
1168
+ }, {
1169
+ default: Z(() => [
1170
+ Pe(_(a[e.item.securityLevel].text), 1)
1171
+ ]),
1172
+ _: 1
1173
+ }, 8, ["style"])) : ue("", !0),
1174
+ X("div", hl, _(B(W)(`operationType.${e.item.operationType}`)) + "| ", 1),
1175
+ V(B(we), null, {
1176
+ content: Z(() => [
1177
+ X("div", bl, _(e.item.name), 1)
1178
+ ]),
1179
+ default: Z(() => [
1180
+ X("div", yl, _(e.item.shortName), 1)
1181
+ ]),
1182
+ _: 1
1183
+ }),
1184
+ e.item.businessApplyType ? (J(), Oe(B(me), {
1185
+ key: 1,
1186
+ bordered: !1,
1187
+ class: Nt(["crane-tag-position crane-margin-left-4 crane-margin-right-0", ["PENDING"].includes(e.item.businessApplyType) ? "" : "crane-disabled-color"])
1188
+ }, {
1189
+ default: Z(() => {
1190
+ var O, R, G, E;
1191
+ return [
1192
+ Pe(_(B(d)[e.item.businessApplyType]) + " " + _(e.item.businessApplyType === "TEMP_OWNER" ? `(${((R = (O = e.item) == null ? void 0 : O.ownStatusVO) == null ? void 0 : R.dayDiff) > 0 ? B(W)("lastDays", {
1193
+ count: (E = (G = e.item) == null ? void 0 : G.ownStatusVO) == null ? void 0 : E.dayDiff
1194
+ }) : B(W)("today")})` : ""), 1)
1195
+ ];
1196
+ }),
1197
+ _: 1
1198
+ }, 8, ["class"])) : ue("", !0),
1199
+ e.item.desc ? (J(), Oe(B(we), { key: 2 }, {
1200
+ content: Z(() => [
1201
+ X("div", Sl, _(e.item.desc), 1)
1202
+ ]),
1203
+ default: Z(() => [
1204
+ V(B(Lt), { class: "crane-weak-color crane-margin-left-4" })
1205
+ ]),
1206
+ _: 1
1207
+ })) : ue("", !0),
1208
+ (v = e.item.relatedCompleteNames) != null && v.length ? (J(), Oe(B(we), { key: 3 }, {
1209
+ content: Z(() => [
1210
+ X("div", Cl, _(B(W)("adaptDepartment")) + ":" + _(e.item.relatedCompleteNames.map((O) => O).join("、")), 1)
1211
+ ]),
1212
+ default: Z(() => [
1213
+ X("div", Al, [
1214
+ X("img", {
1215
+ src: B(ml),
1216
+ height: "14",
1217
+ width: "14"
1218
+ }, null, 8, Ol),
1219
+ X("span", Il, _(e.item.relatedCompleteNames.length), 1)
1220
+ ])
1221
+ ]),
1222
+ _: 1
1223
+ })) : ue("", !0),
1224
+ (S = e.item.categoryVOS) != null && S.length ? (J(), Ae("img", {
1225
+ key: 4,
1226
+ src: B(gl),
1227
+ height: "16",
1228
+ width: "16",
1229
+ class: "crane-margin-left-4"
1230
+ }, null, 8, wl)) : ue("", !0),
1231
+ (x = e.item.categoryVOS) != null && x.length ? (J(), Oe(B(we), { key: 5 }, {
1232
+ content: Z(() => [
1233
+ X("div", Tl, [
1234
+ X("div", null, _(B(W)("categoryTips")), 1),
1235
+ (J(!0), Ae(Be, null, Vt(e.item.categoryVOS, (O) => (J(), Ae("div", {
1236
+ key: O.id
1237
+ }, _(s(O)), 1))), 128))
1238
+ ])
1239
+ ]),
1240
+ default: Z(() => {
1241
+ var O;
1242
+ return [
1243
+ X("div", xl, _((O = e.item.categoryVOS) == null ? void 0 : O.map((R) => R.categoryName).join("、")) + "325kjfhkjdhfkdshfkjdshglkjshdfgkjkjdhfkdshfkjdshglkjshdfgkjkjdhfkdshfkjdshglkjshdfgkjkjdhfkdshfkjdshglkjshdfgkjsfd ", 1)
1244
+ ];
1245
+ }),
1246
+ _: 1
1247
+ })) : ue("", !0),
1248
+ e.checkedKeys.includes(e.item.feature) ? (J(), Ae("span", Nl, [
1249
+ Pe(_(B(W)("availableTime")) + ": ", 1),
1250
+ V(B(te), {
1251
+ value: f.value,
1252
+ "onUpdate:value": A[0] || (A[0] = (O) => f.value = O),
1253
+ style: { width: "100px" },
1254
+ disabled: i.includes(e.item.businessApplyType),
1255
+ options: i.includes(e.item.businessApplyType) ? e.validTimeOptions : g.value,
1256
+ onChange: C,
1257
+ size: "small"
1258
+ }, null, 8, ["value", "disabled", "options"])
1259
+ ])) : ue("", !0)
1260
+ ]);
1261
+ };
1262
+ }
1263
+ }), Fl = /* @__PURE__ */ Ot(Vl, [["__scopeId", "data-v-c5531cfd"]]);
1264
+ export {
1265
+ Fl as default
1266
+ };