@yqg/permission 1.0.0-beta.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.
@@ -0,0 +1,4688 @@
1
+ import { d as ue, c as R, f as ve, k as y, i as jn, v as Qt, e as We, p as qe, b as Jt, s as G, w as ie, h as Me, o as Oe, P as we, F as Be, j as je, W as Un, r as Ae, I as Yn, G as pt, y as _e, a as Gn, z as Ce, K as Le, R as Xn, N as be, O as Ee, L as Ge, u as pe, Q as ge, M as Xe, _ as kn, m as qn, A as Qn } from "./index-Cquyab03.js";
2
+ import { _ as S, Q as Jn, P as A, G as Y, F as se, ba as Zn, aE as eo, aw as Zt, bb as vt, aP as K, E as gt, R as ze, an as en, bc as xe, bd as Ie, aD as Qe, be as to, bf as ye, bg as Vt, bh as Lt, bi as Ht, I as no, a6 as oo, a7 as lo, bj as io, au as ao, C as tn, K as ce, Y as ht, bk as dt, L as $e, bl as nn, J as ro, bm as so, ai as uo, a2 as co, aG as fo, bn as mo, N as po, aH as vo, am as go, aV as ho, bo, aL as yo, bp as So, O as _t, ae as He, ad as wo, ag as Io, b4 as Se, bq as Co, b7 as it, b5 as xo } from "./yqg-permission-CnUnm_PT.js";
3
+ import { p as bt, S as Oo, T as Bt, C as $o, Q as To } from "./apply-modal-Ce5S_Tci.js";
4
+ function zt(e, n) {
5
+ const {
6
+ key: o
7
+ } = e;
8
+ let t;
9
+ return "value" in e && ({
10
+ value: t
11
+ } = e), o ?? (t !== void 0 ? t : `rc-index-key-${n}`);
12
+ }
13
+ function on(e, n) {
14
+ const {
15
+ label: o,
16
+ value: t,
17
+ options: l
18
+ } = e || {};
19
+ return {
20
+ label: o || (n ? "children" : "label"),
21
+ value: t || "value",
22
+ options: l || "options"
23
+ };
24
+ }
25
+ function Eo(e) {
26
+ let {
27
+ fieldNames: n,
28
+ childrenAsData: o
29
+ } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
30
+ const t = [], {
31
+ label: l,
32
+ value: i,
33
+ options: u
34
+ } = on(n, !1);
35
+ function a(f, r) {
36
+ f.forEach((s) => {
37
+ const m = s[l];
38
+ if (r || !(u in s)) {
39
+ const p = s[i];
40
+ t.push({
41
+ key: zt(s, t.length),
42
+ groupOption: r,
43
+ data: s,
44
+ label: m,
45
+ value: p
46
+ });
47
+ } else {
48
+ let p = m;
49
+ p === void 0 && o && (p = s.label), t.push({
50
+ key: zt(s, t.length),
51
+ group: !0,
52
+ data: s,
53
+ label: p
54
+ }), a(s[u], !0);
55
+ }
56
+ });
57
+ }
58
+ return a(e, !1), t;
59
+ }
60
+ function ft(e) {
61
+ const n = S({}, e);
62
+ return "props" in n || Object.defineProperty(n, "props", {
63
+ get() {
64
+ return Jn(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), n;
65
+ }
66
+ }), n;
67
+ }
68
+ function Mo(e, n) {
69
+ if (!n || !n.length)
70
+ return null;
71
+ let o = !1;
72
+ function t(i, u) {
73
+ let [a, ...f] = u;
74
+ if (!a)
75
+ return [i];
76
+ const r = i.split(a);
77
+ return o = o || r.length > 1, r.reduce((s, m) => [...s, ...t(m, f)], []).filter((s) => s);
78
+ }
79
+ const l = t(e, n);
80
+ return o ? l : null;
81
+ }
82
+ var Po = function(e, n) {
83
+ var o = {};
84
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
85
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
86
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
87
+ return o;
88
+ };
89
+ const Ro = (e) => {
90
+ const n = e === !0 ? 0 : 1;
91
+ return {
92
+ bottomLeft: {
93
+ points: ["tl", "bl"],
94
+ offset: [0, 4],
95
+ overflow: {
96
+ adjustX: n,
97
+ adjustY: 1
98
+ }
99
+ },
100
+ bottomRight: {
101
+ points: ["tr", "br"],
102
+ offset: [0, 4],
103
+ overflow: {
104
+ adjustX: n,
105
+ adjustY: 1
106
+ }
107
+ },
108
+ topLeft: {
109
+ points: ["bl", "tl"],
110
+ offset: [0, -4],
111
+ overflow: {
112
+ adjustX: n,
113
+ adjustY: 1
114
+ }
115
+ },
116
+ topRight: {
117
+ points: ["br", "tr"],
118
+ offset: [0, -4],
119
+ overflow: {
120
+ adjustX: n,
121
+ adjustY: 1
122
+ }
123
+ }
124
+ };
125
+ }, Do = ue({
126
+ name: "SelectTrigger",
127
+ inheritAttrs: !1,
128
+ props: {
129
+ dropdownAlign: Object,
130
+ visible: {
131
+ type: Boolean,
132
+ default: void 0
133
+ },
134
+ disabled: {
135
+ type: Boolean,
136
+ default: void 0
137
+ },
138
+ dropdownClassName: String,
139
+ dropdownStyle: A.object,
140
+ placement: String,
141
+ empty: {
142
+ type: Boolean,
143
+ default: void 0
144
+ },
145
+ prefixCls: String,
146
+ popupClassName: String,
147
+ animation: String,
148
+ transitionName: String,
149
+ getPopupContainer: Function,
150
+ dropdownRender: Function,
151
+ containerWidth: Number,
152
+ dropdownMatchSelectWidth: A.oneOfType([Number, Boolean]).def(!0),
153
+ popupElement: A.any,
154
+ direction: String,
155
+ getTriggerDOMNode: Function,
156
+ onPopupVisibleChange: Function,
157
+ onPopupMouseEnter: Function,
158
+ onPopupFocusin: Function,
159
+ onPopupFocusout: Function
160
+ },
161
+ setup(e, n) {
162
+ let {
163
+ slots: o,
164
+ attrs: t,
165
+ expose: l
166
+ } = n;
167
+ const i = R(() => {
168
+ const {
169
+ dropdownMatchSelectWidth: a
170
+ } = e;
171
+ return Ro(a);
172
+ }), u = ve();
173
+ return l({
174
+ getPopupElement: () => u.value
175
+ }), () => {
176
+ const a = S(S({}, e), t), {
177
+ empty: f = !1
178
+ } = a, r = Po(a, ["empty"]), {
179
+ visible: s,
180
+ dropdownAlign: m,
181
+ prefixCls: p,
182
+ popupElement: w,
183
+ dropdownClassName: b,
184
+ dropdownStyle: x,
185
+ direction: O = "ltr",
186
+ placement: I,
187
+ dropdownMatchSelectWidth: P,
188
+ containerWidth: D,
189
+ dropdownRender: C,
190
+ animation: v,
191
+ transitionName: T,
192
+ getPopupContainer: $,
193
+ getTriggerDOMNode: N,
194
+ onPopupVisibleChange: V,
195
+ onPopupMouseEnter: j,
196
+ onPopupFocusin: z,
197
+ onPopupFocusout: Q
198
+ } = r, X = `${p}-dropdown`;
199
+ let U = w;
200
+ C && (U = C({
201
+ menuNode: w,
202
+ props: e
203
+ }));
204
+ const M = v ? `${X}-${v}` : T, L = S({
205
+ minWidth: `${D}px`
206
+ }, x);
207
+ return typeof P == "number" ? L.width = `${P}px` : P && (L.width = `${D}px`), y(Zn, Y(Y({}, e), {}, {
208
+ showAction: V ? ["click"] : [],
209
+ hideAction: V ? ["click"] : [],
210
+ popupPlacement: I || (O === "rtl" ? "bottomRight" : "bottomLeft"),
211
+ builtinPlacements: i.value,
212
+ prefixCls: X,
213
+ popupTransitionName: M,
214
+ popupAlign: m,
215
+ popupVisible: s,
216
+ getPopupContainer: $,
217
+ popupClassName: se(b, {
218
+ [`${X}-empty`]: f
219
+ }),
220
+ popupStyle: L,
221
+ getTriggerDOMNode: N,
222
+ onPopupVisibleChange: V
223
+ }), {
224
+ default: o.default,
225
+ popup: () => y("div", {
226
+ ref: u,
227
+ onMouseenter: j,
228
+ onFocusin: z,
229
+ onFocusout: Q
230
+ }, [U])
231
+ });
232
+ };
233
+ }
234
+ }), Pe = (e, n) => {
235
+ let {
236
+ slots: o
237
+ } = n;
238
+ var t;
239
+ const {
240
+ class: l,
241
+ customizeIcon: i,
242
+ customizeIconProps: u,
243
+ onMousedown: a,
244
+ onClick: f
245
+ } = e;
246
+ let r;
247
+ return typeof i == "function" ? r = i(u) : r = jn(i) ? Qt(i) : i, y("span", {
248
+ class: l,
249
+ onMousedown: (s) => {
250
+ s.preventDefault(), a && a(s);
251
+ },
252
+ style: {
253
+ userSelect: "none",
254
+ WebkitUserSelect: "none"
255
+ },
256
+ unselectable: "on",
257
+ onClick: f,
258
+ "aria-hidden": !0
259
+ }, [r !== void 0 ? r : y("span", {
260
+ class: l.split(/\s+/).map((s) => `${s}-icon`)
261
+ }, [(t = o.default) === null || t === void 0 ? void 0 : t.call(o)])]);
262
+ };
263
+ Pe.inheritAttrs = !1;
264
+ Pe.displayName = "TransBtn";
265
+ Pe.props = {
266
+ class: String,
267
+ customizeIcon: A.any,
268
+ customizeIconProps: A.any,
269
+ onMousedown: Function,
270
+ onClick: Function
271
+ };
272
+ const Fo = {
273
+ inputRef: A.any,
274
+ prefixCls: String,
275
+ id: String,
276
+ inputElement: A.VueNode,
277
+ disabled: {
278
+ type: Boolean,
279
+ default: void 0
280
+ },
281
+ autofocus: {
282
+ type: Boolean,
283
+ default: void 0
284
+ },
285
+ autocomplete: String,
286
+ editable: {
287
+ type: Boolean,
288
+ default: void 0
289
+ },
290
+ activeDescendantId: String,
291
+ value: String,
292
+ open: {
293
+ type: Boolean,
294
+ default: void 0
295
+ },
296
+ tabindex: A.oneOfType([A.number, A.string]),
297
+ /** Pass accessibility props to input */
298
+ attrs: A.object,
299
+ onKeydown: {
300
+ type: Function
301
+ },
302
+ onMousedown: {
303
+ type: Function
304
+ },
305
+ onChange: {
306
+ type: Function
307
+ },
308
+ onPaste: {
309
+ type: Function
310
+ },
311
+ onCompositionstart: {
312
+ type: Function
313
+ },
314
+ onCompositionend: {
315
+ type: Function
316
+ },
317
+ onFocus: {
318
+ type: Function
319
+ },
320
+ onBlur: {
321
+ type: Function
322
+ }
323
+ }, ln = ue({
324
+ compatConfig: {
325
+ MODE: 3
326
+ },
327
+ name: "SelectInput",
328
+ inheritAttrs: !1,
329
+ props: Fo,
330
+ setup(e) {
331
+ let n = null;
332
+ const o = We("VCSelectContainerEvent");
333
+ return () => {
334
+ var t;
335
+ const {
336
+ prefixCls: l,
337
+ id: i,
338
+ inputElement: u,
339
+ disabled: a,
340
+ tabindex: f,
341
+ autofocus: r,
342
+ autocomplete: s,
343
+ editable: m,
344
+ activeDescendantId: p,
345
+ value: w,
346
+ onKeydown: b,
347
+ onMousedown: x,
348
+ onChange: O,
349
+ onPaste: I,
350
+ onCompositionstart: P,
351
+ onCompositionend: D,
352
+ onFocus: C,
353
+ onBlur: v,
354
+ open: T,
355
+ inputRef: $,
356
+ attrs: N
357
+ } = e;
358
+ let V = u || y(eo, null, null);
359
+ const j = V.props || {}, {
360
+ onKeydown: z,
361
+ onInput: Q,
362
+ onFocus: X,
363
+ onBlur: U,
364
+ onMousedown: M,
365
+ onCompositionstart: L,
366
+ onCompositionend: k,
367
+ style: ee
368
+ } = j;
369
+ return V = Zt(V, S(S(S(S(S({
370
+ type: "search"
371
+ }, j), {
372
+ id: i,
373
+ ref: $,
374
+ disabled: a,
375
+ tabindex: f,
376
+ lazy: !1,
377
+ autocomplete: s || "off",
378
+ autofocus: r,
379
+ class: se(`${l}-selection-search-input`, (t = V == null ? void 0 : V.props) === null || t === void 0 ? void 0 : t.class),
380
+ role: "combobox",
381
+ "aria-expanded": T,
382
+ "aria-haspopup": "listbox",
383
+ "aria-owns": `${i}_list`,
384
+ "aria-autocomplete": "list",
385
+ "aria-controls": `${i}_list`,
386
+ "aria-activedescendant": p
387
+ }), N), {
388
+ value: m ? w : "",
389
+ readonly: !m,
390
+ unselectable: m ? null : "on",
391
+ style: S(S({}, ee), {
392
+ opacity: m ? null : 0
393
+ }),
394
+ onKeydown: (g) => {
395
+ b(g), z && z(g);
396
+ },
397
+ onMousedown: (g) => {
398
+ x(g), M && M(g);
399
+ },
400
+ onInput: (g) => {
401
+ O(g), Q && Q(g);
402
+ },
403
+ onCompositionstart(g) {
404
+ P(g), L && L(g);
405
+ },
406
+ onCompositionend(g) {
407
+ D(g), k && k(g);
408
+ },
409
+ onPaste: I,
410
+ onFocus: function() {
411
+ clearTimeout(n), X && X(arguments.length <= 0 ? void 0 : arguments[0]), C && C(arguments.length <= 0 ? void 0 : arguments[0]), o == null || o.focus(arguments.length <= 0 ? void 0 : arguments[0]);
412
+ },
413
+ onBlur: function() {
414
+ for (var g = arguments.length, H = new Array(g), W = 0; W < g; W++)
415
+ H[W] = arguments[W];
416
+ n = setTimeout(() => {
417
+ U && U(H[0]), v && v(H[0]), o == null || o.blur(H[0]);
418
+ }, 100);
419
+ }
420
+ }), V.type === "textarea" ? {} : {
421
+ type: "search"
422
+ }), !0, !0), V;
423
+ };
424
+ }
425
+ }), an = Symbol("OverflowContextProviderKey"), mt = ue({
426
+ compatConfig: {
427
+ MODE: 3
428
+ },
429
+ name: "OverflowContextProvider",
430
+ inheritAttrs: !1,
431
+ props: {
432
+ value: {
433
+ type: Object
434
+ }
435
+ },
436
+ setup(e, n) {
437
+ let {
438
+ slots: o
439
+ } = n;
440
+ return qe(an, R(() => e.value)), () => {
441
+ var t;
442
+ return (t = o.default) === null || t === void 0 ? void 0 : t.call(o);
443
+ };
444
+ }
445
+ }), No = () => We(an, R(() => null));
446
+ var Ao = function(e, n) {
447
+ var o = {};
448
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
449
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
450
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
451
+ return o;
452
+ };
453
+ const Fe = void 0, ke = ue({
454
+ compatConfig: {
455
+ MODE: 3
456
+ },
457
+ name: "Item",
458
+ props: {
459
+ prefixCls: String,
460
+ item: A.any,
461
+ renderItem: Function,
462
+ responsive: Boolean,
463
+ itemKey: {
464
+ type: [String, Number]
465
+ },
466
+ registerSize: Function,
467
+ display: Boolean,
468
+ order: Number,
469
+ component: A.any,
470
+ invalidate: Boolean
471
+ },
472
+ setup(e, n) {
473
+ let {
474
+ slots: o,
475
+ expose: t
476
+ } = n;
477
+ const l = R(() => e.responsive && !e.display), i = ve();
478
+ t({
479
+ itemNodeRef: i
480
+ });
481
+ function u(a) {
482
+ e.registerSize(e.itemKey, a);
483
+ }
484
+ return Jt(() => {
485
+ u(null);
486
+ }), () => {
487
+ var a;
488
+ const {
489
+ prefixCls: f,
490
+ invalidate: r,
491
+ item: s,
492
+ renderItem: m,
493
+ responsive: p,
494
+ registerSize: w,
495
+ itemKey: b,
496
+ display: x,
497
+ order: O,
498
+ component: I = "div"
499
+ } = e, P = Ao(e, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), D = (a = o.default) === null || a === void 0 ? void 0 : a.call(o), C = m && s !== Fe ? m(s) : D;
500
+ let v;
501
+ r || (v = {
502
+ opacity: l.value ? 0 : 1,
503
+ height: l.value ? 0 : Fe,
504
+ overflowY: l.value ? "hidden" : Fe,
505
+ order: p ? O : Fe,
506
+ pointerEvents: l.value ? "none" : Fe,
507
+ position: l.value ? "absolute" : Fe
508
+ });
509
+ const T = {};
510
+ return l.value && (T["aria-hidden"] = !0), y(vt, {
511
+ disabled: !p,
512
+ onResize: ($) => {
513
+ let {
514
+ offsetWidth: N
515
+ } = $;
516
+ u(N);
517
+ }
518
+ }, {
519
+ default: () => y(I, Y(Y(Y({
520
+ class: se(!r && f),
521
+ style: v
522
+ }, T), P), {}, {
523
+ ref: i
524
+ }), {
525
+ default: () => [C]
526
+ })
527
+ });
528
+ };
529
+ }
530
+ });
531
+ var at = function(e, n) {
532
+ var o = {};
533
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
534
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
535
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
536
+ return o;
537
+ };
538
+ const Vo = ue({
539
+ compatConfig: {
540
+ MODE: 3
541
+ },
542
+ name: "RawItem",
543
+ inheritAttrs: !1,
544
+ props: {
545
+ component: A.any,
546
+ title: A.any,
547
+ id: String,
548
+ onMouseenter: {
549
+ type: Function
550
+ },
551
+ onMouseleave: {
552
+ type: Function
553
+ },
554
+ onClick: {
555
+ type: Function
556
+ },
557
+ onKeydown: {
558
+ type: Function
559
+ },
560
+ onFocus: {
561
+ type: Function
562
+ },
563
+ role: String,
564
+ tabindex: Number
565
+ },
566
+ setup(e, n) {
567
+ let {
568
+ slots: o,
569
+ attrs: t
570
+ } = n;
571
+ const l = No();
572
+ return () => {
573
+ var i;
574
+ if (!l.value) {
575
+ const {
576
+ component: m = "div"
577
+ } = e, p = at(e, ["component"]);
578
+ return y(m, Y(Y({}, p), t), {
579
+ default: () => [(i = o.default) === null || i === void 0 ? void 0 : i.call(o)]
580
+ });
581
+ }
582
+ const u = l.value, {
583
+ className: a
584
+ } = u, f = at(u, ["className"]), {
585
+ class: r
586
+ } = t, s = at(t, ["class"]);
587
+ return y(mt, {
588
+ value: null
589
+ }, {
590
+ default: () => [y(ke, Y(Y(Y({
591
+ class: se(a, r)
592
+ }, f), s), e), o)]
593
+ });
594
+ };
595
+ }
596
+ });
597
+ var Lo = function(e, n) {
598
+ var o = {};
599
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
600
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
601
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
602
+ return o;
603
+ };
604
+ const rn = "responsive", sn = "invalidate";
605
+ function Ho(e) {
606
+ return `+ ${e.length} ...`;
607
+ }
608
+ const _o = () => ({
609
+ id: String,
610
+ prefixCls: String,
611
+ data: Array,
612
+ itemKey: [String, Number, Function],
613
+ /** Used for `responsive`. It will limit render node to avoid perf issue */
614
+ itemWidth: {
615
+ type: Number,
616
+ default: 10
617
+ },
618
+ renderItem: Function,
619
+ /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
620
+ renderRawItem: Function,
621
+ maxCount: [Number, String],
622
+ renderRest: Function,
623
+ /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
624
+ renderRawRest: Function,
625
+ suffix: A.any,
626
+ component: String,
627
+ itemComponent: A.any,
628
+ /** @private This API may be refactor since not well design */
629
+ onVisibleChange: Function,
630
+ /** When set to `full`, ssr will render full items by default and remove at client side */
631
+ ssr: String,
632
+ onMousedown: Function,
633
+ role: String
634
+ }), Je = ue({
635
+ name: "Overflow",
636
+ inheritAttrs: !1,
637
+ props: _o(),
638
+ emits: ["visibleChange"],
639
+ setup(e, n) {
640
+ let {
641
+ attrs: o,
642
+ emit: t,
643
+ slots: l
644
+ } = n;
645
+ const i = R(() => e.ssr === "full"), u = G(null), a = R(() => u.value || 0), f = G(/* @__PURE__ */ new Map()), r = G(0), s = G(0), m = G(0), p = G(null), w = G(null), b = R(() => w.value === null && i.value ? Number.MAX_SAFE_INTEGER : w.value || 0), x = G(!1), O = R(() => `${e.prefixCls}-item`), I = R(() => Math.max(r.value, s.value)), P = R(() => !!(e.data.length && e.maxCount === rn)), D = R(() => e.maxCount === sn), C = R(() => P.value || typeof e.maxCount == "number" && e.data.length > e.maxCount), v = R(() => {
646
+ let M = e.data;
647
+ return P.value ? u.value === null && i.value ? M = e.data : M = e.data.slice(0, Math.min(e.data.length, a.value / e.itemWidth)) : typeof e.maxCount == "number" && (M = e.data.slice(0, e.maxCount)), M;
648
+ }), T = R(() => P.value ? e.data.slice(b.value + 1) : e.data.slice(v.value.length)), $ = (M, L) => {
649
+ var k;
650
+ return typeof e.itemKey == "function" ? e.itemKey(M) : (k = e.itemKey && (M == null ? void 0 : M[e.itemKey])) !== null && k !== void 0 ? k : L;
651
+ }, N = R(() => e.renderItem || ((M) => M)), V = (M, L) => {
652
+ w.value = M, L || (x.value = M < e.data.length - 1, t("visibleChange", M));
653
+ }, j = (M, L) => {
654
+ u.value = L.clientWidth;
655
+ }, z = (M, L) => {
656
+ const k = new Map(f.value);
657
+ L === null ? k.delete(M) : k.set(M, L), f.value = k;
658
+ }, Q = (M, L) => {
659
+ r.value = s.value, s.value = L;
660
+ }, X = (M, L) => {
661
+ m.value = L;
662
+ }, U = (M) => f.value.get($(v.value[M], M));
663
+ return ie([a, f, s, m, () => e.itemKey, v], () => {
664
+ if (a.value && I.value && v.value) {
665
+ let M = m.value;
666
+ const L = v.value.length, k = L - 1;
667
+ if (!L) {
668
+ V(0), p.value = null;
669
+ return;
670
+ }
671
+ for (let ee = 0; ee < L; ee += 1) {
672
+ const g = U(ee);
673
+ if (g === void 0) {
674
+ V(ee - 1, !0);
675
+ break;
676
+ }
677
+ if (M += g, // Only one means `totalWidth` is the final width
678
+ k === 0 && M <= a.value || // Last two width will be the final width
679
+ ee === k - 1 && M + U(k) <= a.value) {
680
+ V(k), p.value = null;
681
+ break;
682
+ } else if (M + I.value > a.value) {
683
+ V(ee - 1), p.value = M - g - m.value + s.value;
684
+ break;
685
+ }
686
+ }
687
+ e.suffix && U(0) + m.value > a.value && (p.value = null);
688
+ }
689
+ }), () => {
690
+ const M = x.value && !!T.value.length, {
691
+ itemComponent: L,
692
+ renderRawItem: k,
693
+ renderRawRest: ee,
694
+ renderRest: g,
695
+ prefixCls: H = "rc-overflow",
696
+ suffix: W,
697
+ component: _ = "div",
698
+ id: te,
699
+ onMousedown: oe
700
+ } = e, {
701
+ class: ae,
702
+ style: ne
703
+ } = o, fe = Lo(o, ["class", "style"]);
704
+ let me = {};
705
+ p.value !== null && P.value && (me = {
706
+ position: "absolute",
707
+ left: `${p.value}px`,
708
+ top: 0
709
+ });
710
+ const h = {
711
+ prefixCls: O.value,
712
+ responsive: P.value,
713
+ component: L,
714
+ invalidate: D.value
715
+ }, c = k ? (B, q) => {
716
+ const J = $(B, q);
717
+ return y(mt, {
718
+ key: J,
719
+ value: S(S({}, h), {
720
+ order: q,
721
+ item: B,
722
+ itemKey: J,
723
+ registerSize: z,
724
+ display: q <= b.value
725
+ })
726
+ }, {
727
+ default: () => [k(B, q)]
728
+ });
729
+ } : (B, q) => {
730
+ const J = $(B, q);
731
+ return y(ke, Y(Y({}, h), {}, {
732
+ order: q,
733
+ key: J,
734
+ item: B,
735
+ renderItem: N.value,
736
+ itemKey: J,
737
+ registerSize: z,
738
+ display: q <= b.value
739
+ }), null);
740
+ };
741
+ let d = () => null;
742
+ const F = {
743
+ order: M ? b.value : Number.MAX_SAFE_INTEGER,
744
+ className: `${O.value} ${O.value}-rest`,
745
+ registerSize: Q,
746
+ display: M
747
+ };
748
+ if (ee)
749
+ ee && (d = () => y(mt, {
750
+ value: S(S({}, h), F)
751
+ }, {
752
+ default: () => [ee(T.value)]
753
+ }));
754
+ else {
755
+ const B = g || Ho;
756
+ d = () => y(ke, Y(Y({}, h), F), {
757
+ default: () => typeof B == "function" ? B(T.value) : B
758
+ });
759
+ }
760
+ const E = () => {
761
+ var B;
762
+ return y(_, Y({
763
+ id: te,
764
+ class: se(!D.value && H, ae),
765
+ style: ne,
766
+ onMousedown: oe,
767
+ role: e.role
768
+ }, fe), {
769
+ default: () => [v.value.map(c), C.value ? d() : null, W && y(ke, Y(Y({}, h), {}, {
770
+ order: b.value,
771
+ class: `${O.value}-suffix`,
772
+ registerSize: X,
773
+ display: !0,
774
+ style: me
775
+ }), {
776
+ default: () => W
777
+ }), (B = l.default) === null || B === void 0 ? void 0 : B.call(l)]
778
+ });
779
+ };
780
+ return y(vt, {
781
+ disabled: !P.value,
782
+ onResize: j
783
+ }, {
784
+ default: E
785
+ });
786
+ };
787
+ }
788
+ });
789
+ Je.Item = Vo;
790
+ Je.RESPONSIVE = rn;
791
+ Je.INVALIDATE = sn;
792
+ const Bo = Symbol("TreeSelectLegacyContextPropsKey");
793
+ function yt() {
794
+ return We(Bo, {});
795
+ }
796
+ const zo = {
797
+ id: String,
798
+ prefixCls: String,
799
+ values: A.array,
800
+ open: {
801
+ type: Boolean,
802
+ default: void 0
803
+ },
804
+ searchValue: String,
805
+ inputRef: A.any,
806
+ placeholder: A.any,
807
+ disabled: {
808
+ type: Boolean,
809
+ default: void 0
810
+ },
811
+ mode: String,
812
+ showSearch: {
813
+ type: Boolean,
814
+ default: void 0
815
+ },
816
+ autofocus: {
817
+ type: Boolean,
818
+ default: void 0
819
+ },
820
+ autocomplete: String,
821
+ activeDescendantId: String,
822
+ tabindex: A.oneOfType([A.number, A.string]),
823
+ compositionStatus: Boolean,
824
+ removeIcon: A.any,
825
+ choiceTransitionName: String,
826
+ maxTagCount: A.oneOfType([A.number, A.string]),
827
+ maxTagTextLength: Number,
828
+ maxTagPlaceholder: A.any.def(() => (e) => `+ ${e.length} ...`),
829
+ tagRender: Function,
830
+ onToggleOpen: {
831
+ type: Function
832
+ },
833
+ onRemove: Function,
834
+ onInputChange: Function,
835
+ onInputPaste: Function,
836
+ onInputKeyDown: Function,
837
+ onInputMouseDown: Function,
838
+ onInputCompositionStart: Function,
839
+ onInputCompositionEnd: Function
840
+ }, Kt = (e) => {
841
+ e.preventDefault(), e.stopPropagation();
842
+ }, Ko = ue({
843
+ name: "MultipleSelectSelector",
844
+ inheritAttrs: !1,
845
+ props: zo,
846
+ setup(e) {
847
+ const n = G(), o = G(0), t = G(!1), l = yt(), i = R(() => `${e.prefixCls}-selection`), u = R(() => e.open || e.mode === "tags" ? e.searchValue : ""), a = R(() => e.mode === "tags" || e.showSearch && (e.open || t.value)), f = ve("");
848
+ Me(() => {
849
+ f.value = u.value;
850
+ }), Oe(() => {
851
+ ie(f, () => {
852
+ o.value = n.value.scrollWidth;
853
+ }, {
854
+ flush: "post",
855
+ immediate: !0
856
+ });
857
+ });
858
+ function r(b, x, O, I, P) {
859
+ return y("span", {
860
+ class: se(`${i.value}-item`, {
861
+ [`${i.value}-item-disabled`]: O
862
+ }),
863
+ title: typeof b == "string" || typeof b == "number" ? b.toString() : void 0
864
+ }, [y("span", {
865
+ class: `${i.value}-item-content`
866
+ }, [x]), I && y(Pe, {
867
+ class: `${i.value}-item-remove`,
868
+ onMousedown: Kt,
869
+ onClick: P,
870
+ customizeIcon: e.removeIcon
871
+ }, {
872
+ default: () => [we("×")]
873
+ })]);
874
+ }
875
+ function s(b, x, O, I, P, D) {
876
+ var C;
877
+ const v = ($) => {
878
+ Kt($), e.onToggleOpen(!open);
879
+ };
880
+ let T = D;
881
+ return l.keyEntities && (T = ((C = l.keyEntities[b]) === null || C === void 0 ? void 0 : C.node) || {}), y("span", {
882
+ key: b,
883
+ onMousedown: v
884
+ }, [e.tagRender({
885
+ label: x,
886
+ value: b,
887
+ disabled: O,
888
+ closable: I,
889
+ onClose: P,
890
+ option: T
891
+ })]);
892
+ }
893
+ function m(b) {
894
+ const {
895
+ disabled: x,
896
+ label: O,
897
+ value: I,
898
+ option: P
899
+ } = b, D = !e.disabled && !x;
900
+ let C = O;
901
+ if (typeof e.maxTagTextLength == "number" && (typeof O == "string" || typeof O == "number")) {
902
+ const T = String(C);
903
+ T.length > e.maxTagTextLength && (C = `${T.slice(0, e.maxTagTextLength)}...`);
904
+ }
905
+ const v = (T) => {
906
+ var $;
907
+ T && T.stopPropagation(), ($ = e.onRemove) === null || $ === void 0 || $.call(e, b);
908
+ };
909
+ return typeof e.tagRender == "function" ? s(I, C, x, D, v, P) : r(O, C, x, D, v);
910
+ }
911
+ function p(b) {
912
+ const {
913
+ maxTagPlaceholder: x = (I) => `+ ${I.length} ...`
914
+ } = e, O = typeof x == "function" ? x(b) : x;
915
+ return r(O, O, !1);
916
+ }
917
+ const w = (b) => {
918
+ const x = b.target.composing;
919
+ f.value = b.target.value, x || e.onInputChange(b);
920
+ };
921
+ return () => {
922
+ const {
923
+ id: b,
924
+ prefixCls: x,
925
+ values: O,
926
+ open: I,
927
+ inputRef: P,
928
+ placeholder: D,
929
+ disabled: C,
930
+ autofocus: v,
931
+ autocomplete: T,
932
+ activeDescendantId: $,
933
+ tabindex: N,
934
+ compositionStatus: V,
935
+ onInputPaste: j,
936
+ onInputKeyDown: z,
937
+ onInputMouseDown: Q,
938
+ onInputCompositionStart: X,
939
+ onInputCompositionEnd: U
940
+ } = e, M = y("div", {
941
+ class: `${i.value}-search`,
942
+ style: {
943
+ width: o.value + "px"
944
+ },
945
+ key: "input"
946
+ }, [y(ln, {
947
+ inputRef: P,
948
+ open: I,
949
+ prefixCls: x,
950
+ id: b,
951
+ inputElement: null,
952
+ disabled: C,
953
+ autofocus: v,
954
+ autocomplete: T,
955
+ editable: a.value,
956
+ activeDescendantId: $,
957
+ value: f.value,
958
+ onKeydown: z,
959
+ onMousedown: Q,
960
+ onChange: w,
961
+ onPaste: j,
962
+ onCompositionstart: X,
963
+ onCompositionend: U,
964
+ tabindex: N,
965
+ attrs: bt(e, !0),
966
+ onFocus: () => t.value = !0,
967
+ onBlur: () => t.value = !1
968
+ }, null), y("span", {
969
+ ref: n,
970
+ class: `${i.value}-search-mirror`,
971
+ "aria-hidden": !0
972
+ }, [f.value, we(" ")])]), L = y(Je, {
973
+ prefixCls: `${i.value}-overflow`,
974
+ data: O,
975
+ renderItem: m,
976
+ renderRest: p,
977
+ suffix: M,
978
+ itemKey: "key",
979
+ maxCount: e.maxTagCount,
980
+ key: "overflow"
981
+ }, null);
982
+ return y(Be, null, [L, !O.length && !u.value && !V && y("span", {
983
+ class: `${i.value}-placeholder`
984
+ }, [D])]);
985
+ };
986
+ }
987
+ }), Wo = {
988
+ inputElement: A.any,
989
+ id: String,
990
+ prefixCls: String,
991
+ values: A.array,
992
+ open: {
993
+ type: Boolean,
994
+ default: void 0
995
+ },
996
+ searchValue: String,
997
+ inputRef: A.any,
998
+ placeholder: A.any,
999
+ compositionStatus: {
1000
+ type: Boolean,
1001
+ default: void 0
1002
+ },
1003
+ disabled: {
1004
+ type: Boolean,
1005
+ default: void 0
1006
+ },
1007
+ mode: String,
1008
+ showSearch: {
1009
+ type: Boolean,
1010
+ default: void 0
1011
+ },
1012
+ autofocus: {
1013
+ type: Boolean,
1014
+ default: void 0
1015
+ },
1016
+ autocomplete: String,
1017
+ activeDescendantId: String,
1018
+ tabindex: A.oneOfType([A.number, A.string]),
1019
+ activeValue: String,
1020
+ backfill: {
1021
+ type: Boolean,
1022
+ default: void 0
1023
+ },
1024
+ optionLabelRender: Function,
1025
+ onInputChange: Function,
1026
+ onInputPaste: Function,
1027
+ onInputKeyDown: Function,
1028
+ onInputMouseDown: Function,
1029
+ onInputCompositionStart: Function,
1030
+ onInputCompositionEnd: Function
1031
+ }, St = ue({
1032
+ name: "SingleSelector",
1033
+ setup(e) {
1034
+ const n = G(!1), o = R(() => e.mode === "combobox"), t = R(() => o.value || e.showSearch), l = R(() => {
1035
+ let s = e.searchValue || "";
1036
+ return o.value && e.activeValue && !n.value && (s = e.activeValue), s;
1037
+ }), i = yt();
1038
+ ie([o, () => e.activeValue], () => {
1039
+ o.value && (n.value = !1);
1040
+ }, {
1041
+ immediate: !0
1042
+ });
1043
+ const u = R(() => e.mode !== "combobox" && !e.open && !e.showSearch ? !1 : !!l.value || e.compositionStatus), a = R(() => {
1044
+ const s = e.values[0];
1045
+ return s && (typeof s.label == "string" || typeof s.label == "number") ? s.label.toString() : void 0;
1046
+ }), f = () => {
1047
+ if (e.values[0])
1048
+ return null;
1049
+ const s = u.value ? {
1050
+ visibility: "hidden"
1051
+ } : void 0;
1052
+ return y("span", {
1053
+ class: `${e.prefixCls}-selection-placeholder`,
1054
+ style: s
1055
+ }, [e.placeholder]);
1056
+ }, r = (s) => {
1057
+ s.target.composing || (n.value = !0, e.onInputChange(s));
1058
+ };
1059
+ return () => {
1060
+ var s, m, p, w;
1061
+ const {
1062
+ inputElement: b,
1063
+ prefixCls: x,
1064
+ id: O,
1065
+ values: I,
1066
+ inputRef: P,
1067
+ disabled: D,
1068
+ autofocus: C,
1069
+ autocomplete: v,
1070
+ activeDescendantId: T,
1071
+ open: $,
1072
+ tabindex: N,
1073
+ optionLabelRender: V,
1074
+ onInputKeyDown: j,
1075
+ onInputMouseDown: z,
1076
+ onInputPaste: Q,
1077
+ onInputCompositionStart: X,
1078
+ onInputCompositionEnd: U
1079
+ } = e, M = I[0];
1080
+ let L = null;
1081
+ if (M && i.customSlots) {
1082
+ const k = (s = M.key) !== null && s !== void 0 ? s : M.value, ee = ((m = i.keyEntities[k]) === null || m === void 0 ? void 0 : m.node) || {};
1083
+ L = i.customSlots[(p = ee.slots) === null || p === void 0 ? void 0 : p.title] || i.customSlots.title || M.label, typeof L == "function" && (L = L(ee));
1084
+ } else
1085
+ L = V && M ? V(M.option) : M == null ? void 0 : M.label;
1086
+ return y(Be, null, [y("span", {
1087
+ class: `${x}-selection-search`
1088
+ }, [y(ln, {
1089
+ inputRef: P,
1090
+ prefixCls: x,
1091
+ id: O,
1092
+ open: $,
1093
+ inputElement: b,
1094
+ disabled: D,
1095
+ autofocus: C,
1096
+ autocomplete: v,
1097
+ editable: t.value,
1098
+ activeDescendantId: T,
1099
+ value: l.value,
1100
+ onKeydown: j,
1101
+ onMousedown: z,
1102
+ onChange: r,
1103
+ onPaste: Q,
1104
+ onCompositionstart: X,
1105
+ onCompositionend: U,
1106
+ tabindex: N,
1107
+ attrs: bt(e, !0)
1108
+ }, null)]), !o.value && M && !u.value && y("span", {
1109
+ class: `${x}-selection-item`,
1110
+ title: a.value
1111
+ }, [y(Be, {
1112
+ key: (w = M.key) !== null && w !== void 0 ? w : M.value
1113
+ }, [L])]), f()]);
1114
+ };
1115
+ }
1116
+ });
1117
+ St.props = Wo;
1118
+ St.inheritAttrs = !1;
1119
+ function jo(e) {
1120
+ return ![
1121
+ // System function button
1122
+ K.ESC,
1123
+ K.SHIFT,
1124
+ K.BACKSPACE,
1125
+ K.TAB,
1126
+ K.WIN_KEY,
1127
+ K.ALT,
1128
+ K.META,
1129
+ K.WIN_KEY_RIGHT,
1130
+ K.CTRL,
1131
+ K.SEMICOLON,
1132
+ K.EQUALS,
1133
+ K.CAPS_LOCK,
1134
+ K.CONTEXT_MENU,
1135
+ // F1-F12
1136
+ K.F1,
1137
+ K.F2,
1138
+ K.F3,
1139
+ K.F4,
1140
+ K.F5,
1141
+ K.F6,
1142
+ K.F7,
1143
+ K.F8,
1144
+ K.F9,
1145
+ K.F10,
1146
+ K.F11,
1147
+ K.F12
1148
+ ].includes(e);
1149
+ }
1150
+ function un() {
1151
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, n = null, o;
1152
+ je(() => {
1153
+ clearTimeout(o);
1154
+ });
1155
+ function t(l) {
1156
+ (l || n === null) && (n = l), clearTimeout(o), o = setTimeout(() => {
1157
+ n = null;
1158
+ }, e);
1159
+ }
1160
+ return [() => n, t];
1161
+ }
1162
+ function Ke() {
1163
+ const e = (n) => {
1164
+ e.current = n;
1165
+ };
1166
+ return e;
1167
+ }
1168
+ const Uo = ue({
1169
+ name: "Selector",
1170
+ inheritAttrs: !1,
1171
+ props: {
1172
+ id: String,
1173
+ prefixCls: String,
1174
+ showSearch: {
1175
+ type: Boolean,
1176
+ default: void 0
1177
+ },
1178
+ open: {
1179
+ type: Boolean,
1180
+ default: void 0
1181
+ },
1182
+ /** Display in the Selector value, it's not same as `value` prop */
1183
+ values: A.array,
1184
+ multiple: {
1185
+ type: Boolean,
1186
+ default: void 0
1187
+ },
1188
+ mode: String,
1189
+ searchValue: String,
1190
+ activeValue: String,
1191
+ inputElement: A.any,
1192
+ autofocus: {
1193
+ type: Boolean,
1194
+ default: void 0
1195
+ },
1196
+ activeDescendantId: String,
1197
+ tabindex: A.oneOfType([A.number, A.string]),
1198
+ disabled: {
1199
+ type: Boolean,
1200
+ default: void 0
1201
+ },
1202
+ placeholder: A.any,
1203
+ removeIcon: A.any,
1204
+ // Tags
1205
+ maxTagCount: A.oneOfType([A.number, A.string]),
1206
+ maxTagTextLength: Number,
1207
+ maxTagPlaceholder: A.any,
1208
+ tagRender: Function,
1209
+ optionLabelRender: Function,
1210
+ /** Check if `tokenSeparators` contains `\n` or `\r\n` */
1211
+ tokenWithEnter: {
1212
+ type: Boolean,
1213
+ default: void 0
1214
+ },
1215
+ // Motion
1216
+ choiceTransitionName: String,
1217
+ onToggleOpen: {
1218
+ type: Function
1219
+ },
1220
+ /** `onSearch` returns go next step boolean to check if need do toggle open */
1221
+ onSearch: Function,
1222
+ onSearchSubmit: Function,
1223
+ onRemove: Function,
1224
+ onInputKeyDown: {
1225
+ type: Function
1226
+ },
1227
+ /**
1228
+ * @private get real dom for trigger align.
1229
+ * This may be removed after React provides replacement of `findDOMNode`
1230
+ */
1231
+ domRef: Function
1232
+ },
1233
+ setup(e, n) {
1234
+ let {
1235
+ expose: o
1236
+ } = n;
1237
+ const t = Ke(), l = ve(!1), [i, u] = un(0), a = (I) => {
1238
+ const {
1239
+ which: P
1240
+ } = I;
1241
+ (P === K.UP || P === K.DOWN) && I.preventDefault(), e.onInputKeyDown && e.onInputKeyDown(I), P === K.ENTER && e.mode === "tags" && !l.value && !e.open && e.onSearchSubmit(I.target.value), jo(P) && e.onToggleOpen(!0);
1242
+ }, f = () => {
1243
+ u(!0);
1244
+ };
1245
+ let r = null;
1246
+ const s = (I) => {
1247
+ e.onSearch(I, !0, l.value) !== !1 && e.onToggleOpen(!0);
1248
+ }, m = () => {
1249
+ l.value = !0;
1250
+ }, p = (I) => {
1251
+ l.value = !1, e.mode !== "combobox" && s(I.target.value);
1252
+ }, w = (I) => {
1253
+ let {
1254
+ target: {
1255
+ value: P
1256
+ }
1257
+ } = I;
1258
+ if (e.tokenWithEnter && r && /[\r\n]/.test(r)) {
1259
+ const D = r.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
1260
+ P = P.replace(D, r);
1261
+ }
1262
+ r = null, s(P);
1263
+ }, b = (I) => {
1264
+ const {
1265
+ clipboardData: P
1266
+ } = I;
1267
+ r = P.getData("text");
1268
+ }, x = (I) => {
1269
+ let {
1270
+ target: P
1271
+ } = I;
1272
+ P !== t.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
1273
+ t.current.focus();
1274
+ }) : t.current.focus());
1275
+ }, O = (I) => {
1276
+ const P = i();
1277
+ I.target !== t.current && !P && I.preventDefault(), (e.mode !== "combobox" && (!e.showSearch || !P) || !e.open) && (e.open && e.onSearch("", !0, !1), e.onToggleOpen());
1278
+ };
1279
+ return o({
1280
+ focus: () => {
1281
+ t.current.focus();
1282
+ },
1283
+ blur: () => {
1284
+ t.current.blur();
1285
+ }
1286
+ }), () => {
1287
+ const {
1288
+ prefixCls: I,
1289
+ domRef: P,
1290
+ mode: D
1291
+ } = e, C = {
1292
+ inputRef: t,
1293
+ onInputKeyDown: a,
1294
+ onInputMouseDown: f,
1295
+ onInputChange: w,
1296
+ onInputPaste: b,
1297
+ compositionStatus: l.value,
1298
+ onInputCompositionStart: m,
1299
+ onInputCompositionEnd: p
1300
+ }, v = D === "multiple" || D === "tags" ? y(Ko, Y(Y({}, e), C), null) : y(St, Y(Y({}, e), C), null);
1301
+ return y("div", {
1302
+ ref: P,
1303
+ class: `${I}-selector`,
1304
+ onClick: x,
1305
+ onMousedown: O
1306
+ }, [v]);
1307
+ };
1308
+ }
1309
+ });
1310
+ function Yo(e, n, o) {
1311
+ function t(l) {
1312
+ var i, u, a;
1313
+ let f = l.target;
1314
+ f.shadowRoot && l.composed && (f = l.composedPath()[0] || f);
1315
+ const r = [(i = e[0]) === null || i === void 0 ? void 0 : i.value, (a = (u = e[1]) === null || u === void 0 ? void 0 : u.value) === null || a === void 0 ? void 0 : a.getPopupElement()];
1316
+ n.value && r.every((s) => s && !s.contains(f) && s !== f) && o(!1);
1317
+ }
1318
+ Oe(() => {
1319
+ window.addEventListener("mousedown", t);
1320
+ }), je(() => {
1321
+ window.removeEventListener("mousedown", t);
1322
+ });
1323
+ }
1324
+ function Go() {
1325
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
1326
+ const n = G(!1);
1327
+ let o;
1328
+ const t = () => {
1329
+ clearTimeout(o);
1330
+ };
1331
+ return Oe(() => {
1332
+ t();
1333
+ }), [n, (i, u) => {
1334
+ t(), o = setTimeout(() => {
1335
+ n.value = i, u && u();
1336
+ }, e);
1337
+ }, t];
1338
+ }
1339
+ const cn = Symbol("BaseSelectContextKey");
1340
+ function Xo(e) {
1341
+ return qe(cn, e);
1342
+ }
1343
+ function ko() {
1344
+ return We(cn, {});
1345
+ }
1346
+ const qo = () => {
1347
+ if (typeof navigator > "u" || typeof window > "u")
1348
+ return !1;
1349
+ const e = navigator.userAgent || navigator.vendor || window.opera;
1350
+ return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e == null ? void 0 : e.substring(0, 4));
1351
+ };
1352
+ function dn(e) {
1353
+ if (!Un(e)) return Ae(e);
1354
+ const n = new Proxy({}, {
1355
+ get(o, t, l) {
1356
+ return Reflect.get(e.value, t, l);
1357
+ },
1358
+ set(o, t, l) {
1359
+ return e.value[t] = l, !0;
1360
+ },
1361
+ deleteProperty(o, t) {
1362
+ return Reflect.deleteProperty(e.value, t);
1363
+ },
1364
+ has(o, t) {
1365
+ return Reflect.has(e.value, t);
1366
+ },
1367
+ ownKeys() {
1368
+ return Object.keys(e.value);
1369
+ },
1370
+ getOwnPropertyDescriptor() {
1371
+ return {
1372
+ enumerable: !0,
1373
+ configurable: !0
1374
+ };
1375
+ }
1376
+ });
1377
+ return Ae(n);
1378
+ }
1379
+ var Qo = function(e, n) {
1380
+ var o = {};
1381
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
1382
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
1383
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
1384
+ return o;
1385
+ };
1386
+ const Jo = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], Zo = () => ({
1387
+ prefixCls: String,
1388
+ id: String,
1389
+ omitDomProps: Array,
1390
+ // >>> Value
1391
+ displayValues: Array,
1392
+ onDisplayValuesChange: Function,
1393
+ // >>> Active
1394
+ /** Current dropdown list active item string value */
1395
+ activeValue: String,
1396
+ /** Link search input with target element */
1397
+ activeDescendantId: String,
1398
+ onActiveValueChange: Function,
1399
+ // >>> Search
1400
+ searchValue: String,
1401
+ /** Trigger onSearch, return false to prevent trigger open event */
1402
+ onSearch: Function,
1403
+ /** Trigger when search text match the `tokenSeparators`. Will provide split content */
1404
+ onSearchSplit: Function,
1405
+ maxLength: Number,
1406
+ OptionList: A.any,
1407
+ /** Tell if provided `options` is empty */
1408
+ emptyOptions: Boolean
1409
+ }), fn = () => ({
1410
+ showSearch: {
1411
+ type: Boolean,
1412
+ default: void 0
1413
+ },
1414
+ tagRender: {
1415
+ type: Function
1416
+ },
1417
+ optionLabelRender: {
1418
+ type: Function
1419
+ },
1420
+ direction: {
1421
+ type: String
1422
+ },
1423
+ // MISC
1424
+ tabindex: Number,
1425
+ autofocus: Boolean,
1426
+ notFoundContent: A.any,
1427
+ placeholder: A.any,
1428
+ onClear: Function,
1429
+ choiceTransitionName: String,
1430
+ // >>> Mode
1431
+ mode: String,
1432
+ // >>> Status
1433
+ disabled: {
1434
+ type: Boolean,
1435
+ default: void 0
1436
+ },
1437
+ loading: {
1438
+ type: Boolean,
1439
+ default: void 0
1440
+ },
1441
+ // >>> Open
1442
+ open: {
1443
+ type: Boolean,
1444
+ default: void 0
1445
+ },
1446
+ defaultOpen: {
1447
+ type: Boolean,
1448
+ default: void 0
1449
+ },
1450
+ onDropdownVisibleChange: {
1451
+ type: Function
1452
+ },
1453
+ // >>> Customize Input
1454
+ /** @private Internal usage. Do not use in your production. */
1455
+ getInputElement: {
1456
+ type: Function
1457
+ },
1458
+ /** @private Internal usage. Do not use in your production. */
1459
+ getRawInputElement: {
1460
+ type: Function
1461
+ },
1462
+ // >>> Selector
1463
+ maxTagTextLength: Number,
1464
+ maxTagCount: {
1465
+ type: [String, Number]
1466
+ },
1467
+ maxTagPlaceholder: A.any,
1468
+ // >>> Search
1469
+ tokenSeparators: {
1470
+ type: Array
1471
+ },
1472
+ // >>> Icons
1473
+ allowClear: {
1474
+ type: Boolean,
1475
+ default: void 0
1476
+ },
1477
+ showArrow: {
1478
+ type: Boolean,
1479
+ default: void 0
1480
+ },
1481
+ inputIcon: A.any,
1482
+ /** Clear all icon */
1483
+ clearIcon: A.any,
1484
+ /** Selector remove icon */
1485
+ removeIcon: A.any,
1486
+ // >>> Dropdown
1487
+ animation: String,
1488
+ transitionName: String,
1489
+ dropdownStyle: {
1490
+ type: Object
1491
+ },
1492
+ dropdownClassName: String,
1493
+ dropdownMatchSelectWidth: {
1494
+ type: [Boolean, Number],
1495
+ default: void 0
1496
+ },
1497
+ dropdownRender: {
1498
+ type: Function
1499
+ },
1500
+ dropdownAlign: Object,
1501
+ placement: {
1502
+ type: String
1503
+ },
1504
+ getPopupContainer: {
1505
+ type: Function
1506
+ },
1507
+ // >>> Focus
1508
+ showAction: {
1509
+ type: Array
1510
+ },
1511
+ onBlur: {
1512
+ type: Function
1513
+ },
1514
+ onFocus: {
1515
+ type: Function
1516
+ },
1517
+ // >>> Rest Events
1518
+ onKeyup: Function,
1519
+ onKeydown: Function,
1520
+ onMousedown: Function,
1521
+ onPopupScroll: Function,
1522
+ onInputKeyDown: Function,
1523
+ onMouseenter: Function,
1524
+ onMouseleave: Function,
1525
+ onClick: Function
1526
+ }), el = () => S(S({}, Zo()), fn());
1527
+ function wt(e) {
1528
+ return e === "tags" || e === "multiple";
1529
+ }
1530
+ const tl = ue({
1531
+ compatConfig: {
1532
+ MODE: 3
1533
+ },
1534
+ name: "BaseSelect",
1535
+ inheritAttrs: !1,
1536
+ props: gt(el(), {
1537
+ showAction: [],
1538
+ notFoundContent: "Not Found"
1539
+ }),
1540
+ setup(e, n) {
1541
+ let {
1542
+ attrs: o,
1543
+ expose: t,
1544
+ slots: l
1545
+ } = n;
1546
+ const i = R(() => wt(e.mode)), u = R(() => e.showSearch !== void 0 ? e.showSearch : i.value || e.mode === "combobox"), a = G(!1);
1547
+ Oe(() => {
1548
+ a.value = qo();
1549
+ });
1550
+ const f = yt(), r = G(null), s = Ke(), m = G(null), p = G(null), w = G(null), b = ve(!1), [x, O, I] = Go();
1551
+ t({
1552
+ focus: () => {
1553
+ var c;
1554
+ (c = p.value) === null || c === void 0 || c.focus();
1555
+ },
1556
+ blur: () => {
1557
+ var c;
1558
+ (c = p.value) === null || c === void 0 || c.blur();
1559
+ },
1560
+ scrollTo: (c) => {
1561
+ var d;
1562
+ return (d = w.value) === null || d === void 0 ? void 0 : d.scrollTo(c);
1563
+ }
1564
+ });
1565
+ const C = R(() => {
1566
+ var c;
1567
+ if (e.mode !== "combobox")
1568
+ return e.searchValue;
1569
+ const d = (c = e.displayValues[0]) === null || c === void 0 ? void 0 : c.value;
1570
+ return typeof d == "string" || typeof d == "number" ? String(d) : "";
1571
+ }), v = e.open !== void 0 ? e.open : e.defaultOpen, T = G(v), $ = G(v), N = (c) => {
1572
+ T.value = e.open !== void 0 ? e.open : c, $.value = T.value;
1573
+ };
1574
+ ie(() => e.open, () => {
1575
+ N(e.open);
1576
+ });
1577
+ const V = R(() => !e.notFoundContent && e.emptyOptions);
1578
+ Me(() => {
1579
+ $.value = T.value, (e.disabled || V.value && $.value && e.mode === "combobox") && ($.value = !1);
1580
+ });
1581
+ const j = R(() => V.value ? !1 : $.value), z = (c) => {
1582
+ const d = c !== void 0 ? c : !$.value;
1583
+ $.value !== d && !e.disabled && (N(d), e.onDropdownVisibleChange && e.onDropdownVisibleChange(d));
1584
+ }, Q = R(() => (e.tokenSeparators || []).some((c) => [`
1585
+ `, `\r
1586
+ `].includes(c))), X = (c, d, F) => {
1587
+ var E, B;
1588
+ let q = !0, J = c;
1589
+ (E = e.onActiveValueChange) === null || E === void 0 || E.call(e, null);
1590
+ const le = F ? null : Mo(c, e.tokenSeparators);
1591
+ return e.mode !== "combobox" && le && (J = "", (B = e.onSearchSplit) === null || B === void 0 || B.call(e, le), z(!1), q = !1), e.onSearch && C.value !== J && e.onSearch(J, {
1592
+ source: d ? "typing" : "effect"
1593
+ }), q;
1594
+ }, U = (c) => {
1595
+ var d;
1596
+ !c || !c.trim() || (d = e.onSearch) === null || d === void 0 || d.call(e, c, {
1597
+ source: "submit"
1598
+ });
1599
+ };
1600
+ ie($, () => {
1601
+ !$.value && !i.value && e.mode !== "combobox" && X("", !1, !1);
1602
+ }, {
1603
+ immediate: !0,
1604
+ flush: "post"
1605
+ }), ie(() => e.disabled, () => {
1606
+ T.value && e.disabled && N(!1), e.disabled && !b.value && O(!1);
1607
+ }, {
1608
+ immediate: !0
1609
+ });
1610
+ const [M, L] = un(), k = function(c) {
1611
+ var d;
1612
+ const F = M(), {
1613
+ which: E
1614
+ } = c;
1615
+ if (E === K.ENTER && (e.mode !== "combobox" && c.preventDefault(), $.value || z(!0)), L(!!C.value), E === K.BACKSPACE && !F && i.value && !C.value && e.displayValues.length) {
1616
+ const le = [...e.displayValues];
1617
+ let Z = null;
1618
+ for (let re = le.length - 1; re >= 0; re -= 1) {
1619
+ const de = le[re];
1620
+ if (!de.disabled) {
1621
+ le.splice(re, 1), Z = de;
1622
+ break;
1623
+ }
1624
+ }
1625
+ Z && e.onDisplayValuesChange(le, {
1626
+ type: "remove",
1627
+ values: [Z]
1628
+ });
1629
+ }
1630
+ for (var B = arguments.length, q = new Array(B > 1 ? B - 1 : 0), J = 1; J < B; J++)
1631
+ q[J - 1] = arguments[J];
1632
+ $.value && w.value && w.value.onKeydown(c, ...q), (d = e.onKeydown) === null || d === void 0 || d.call(e, c, ...q);
1633
+ }, ee = function(c) {
1634
+ for (var d = arguments.length, F = new Array(d > 1 ? d - 1 : 0), E = 1; E < d; E++)
1635
+ F[E - 1] = arguments[E];
1636
+ $.value && w.value && w.value.onKeyup(c, ...F), e.onKeyup && e.onKeyup(c, ...F);
1637
+ }, g = (c) => {
1638
+ const d = e.displayValues.filter((F) => F !== c);
1639
+ e.onDisplayValuesChange(d, {
1640
+ type: "remove",
1641
+ values: [c]
1642
+ });
1643
+ }, H = G(!1), W = function() {
1644
+ O(!0), e.disabled || (e.onFocus && !H.value && e.onFocus(...arguments), e.showAction && e.showAction.includes("focus") && z(!0)), H.value = !0;
1645
+ }, _ = ve(!1), te = function() {
1646
+ if (_.value || (b.value = !0, O(!1, () => {
1647
+ H.value = !1, b.value = !1, z(!1);
1648
+ }), e.disabled))
1649
+ return;
1650
+ const c = C.value;
1651
+ c && (e.mode === "tags" ? e.onSearch(c, {
1652
+ source: "submit"
1653
+ }) : e.mode === "multiple" && e.onSearch("", {
1654
+ source: "blur"
1655
+ })), e.onBlur && e.onBlur(...arguments);
1656
+ }, oe = () => {
1657
+ _.value = !0;
1658
+ }, ae = () => {
1659
+ _.value = !1;
1660
+ };
1661
+ qe("VCSelectContainerEvent", {
1662
+ focus: W,
1663
+ blur: te
1664
+ });
1665
+ const ne = [];
1666
+ Oe(() => {
1667
+ ne.forEach((c) => clearTimeout(c)), ne.splice(0, ne.length);
1668
+ }), je(() => {
1669
+ ne.forEach((c) => clearTimeout(c)), ne.splice(0, ne.length);
1670
+ });
1671
+ const fe = function(c) {
1672
+ var d, F;
1673
+ const {
1674
+ target: E
1675
+ } = c, B = (d = m.value) === null || d === void 0 ? void 0 : d.getPopupElement();
1676
+ if (B && B.contains(E)) {
1677
+ const Z = setTimeout(() => {
1678
+ var re;
1679
+ const de = ne.indexOf(Z);
1680
+ de !== -1 && ne.splice(de, 1), I(), !a.value && !B.contains(document.activeElement) && ((re = p.value) === null || re === void 0 || re.focus());
1681
+ });
1682
+ ne.push(Z);
1683
+ }
1684
+ for (var q = arguments.length, J = new Array(q > 1 ? q - 1 : 0), le = 1; le < q; le++)
1685
+ J[le - 1] = arguments[le];
1686
+ (F = e.onMousedown) === null || F === void 0 || F.call(e, c, ...J);
1687
+ }, me = G(null), h = () => {
1688
+ };
1689
+ return Oe(() => {
1690
+ ie(j, () => {
1691
+ var c;
1692
+ if (j.value) {
1693
+ const d = Math.ceil((c = r.value) === null || c === void 0 ? void 0 : c.offsetWidth);
1694
+ me.value !== d && !Number.isNaN(d) && (me.value = d);
1695
+ }
1696
+ }, {
1697
+ immediate: !0,
1698
+ flush: "post"
1699
+ });
1700
+ }), Yo([r, m], j, z), Xo(dn(S(S({}, Yn(e)), {
1701
+ open: $,
1702
+ triggerOpen: j,
1703
+ showSearch: u,
1704
+ multiple: i,
1705
+ toggleOpen: z
1706
+ }))), () => {
1707
+ const c = S(S({}, e), o), {
1708
+ prefixCls: d,
1709
+ id: F,
1710
+ open: E,
1711
+ defaultOpen: B,
1712
+ mode: q,
1713
+ // Search related
1714
+ showSearch: J,
1715
+ searchValue: le,
1716
+ onSearch: Z,
1717
+ // Icons
1718
+ allowClear: re,
1719
+ clearIcon: de,
1720
+ showArrow: Ue,
1721
+ inputIcon: et,
1722
+ // Others
1723
+ disabled: Re,
1724
+ loading: De,
1725
+ getInputElement: Tt,
1726
+ getPopupContainer: In,
1727
+ placement: Cn,
1728
+ // Dropdown
1729
+ animation: xn,
1730
+ transitionName: On,
1731
+ dropdownStyle: $n,
1732
+ dropdownClassName: Tn,
1733
+ dropdownMatchSelectWidth: En,
1734
+ dropdownRender: Mn,
1735
+ dropdownAlign: Pn,
1736
+ showAction: gi,
1737
+ direction: Rn,
1738
+ // Tags
1739
+ tokenSeparators: hi,
1740
+ tagRender: Dn,
1741
+ optionLabelRender: Fn,
1742
+ // Events
1743
+ onPopupScroll: bi,
1744
+ onDropdownVisibleChange: yi,
1745
+ onFocus: Si,
1746
+ onBlur: wi,
1747
+ onKeyup: Ii,
1748
+ onKeydown: Ci,
1749
+ onMousedown: xi,
1750
+ onClear: tt,
1751
+ omitDomProps: nt,
1752
+ getRawInputElement: Et,
1753
+ displayValues: Ye,
1754
+ onDisplayValuesChange: Nn,
1755
+ emptyOptions: An,
1756
+ activeDescendantId: Vn,
1757
+ activeValue: Ln,
1758
+ OptionList: Hn
1759
+ } = c, _n = Qo(c, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]), Mt = q === "combobox" && Tt && Tt() || null, Ve = typeof Et == "function" && Et(), ot = S({}, _n);
1760
+ let Pt;
1761
+ Ve && (Pt = (Te) => {
1762
+ z(Te);
1763
+ }), Jo.forEach((Te) => {
1764
+ delete ot[Te];
1765
+ }), nt == null || nt.forEach((Te) => {
1766
+ delete ot[Te];
1767
+ });
1768
+ const Rt = Ue !== void 0 ? Ue : De || !i.value && q !== "combobox";
1769
+ let Dt;
1770
+ Rt && (Dt = y(Pe, {
1771
+ class: se(`${d}-arrow`, {
1772
+ [`${d}-arrow-loading`]: De
1773
+ }),
1774
+ customizeIcon: et,
1775
+ customizeIconProps: {
1776
+ loading: De,
1777
+ searchValue: C.value,
1778
+ open: $.value,
1779
+ focused: x.value,
1780
+ showSearch: u.value
1781
+ }
1782
+ }, null));
1783
+ let Ft;
1784
+ const Bn = () => {
1785
+ tt == null || tt(), Nn([], {
1786
+ type: "clear",
1787
+ values: Ye
1788
+ }), X("", !1, !1);
1789
+ };
1790
+ !Re && re && (Ye.length || C.value) && (Ft = y(Pe, {
1791
+ class: `${d}-clear`,
1792
+ onMousedown: Bn,
1793
+ customizeIcon: de
1794
+ }, {
1795
+ default: () => [we("×")]
1796
+ }));
1797
+ const zn = y(Hn, {
1798
+ ref: w
1799
+ }, S(S({}, f.customSlots), {
1800
+ option: l.option
1801
+ })), Kn = se(d, o.class, {
1802
+ [`${d}-focused`]: x.value,
1803
+ [`${d}-multiple`]: i.value,
1804
+ [`${d}-single`]: !i.value,
1805
+ [`${d}-allow-clear`]: re,
1806
+ [`${d}-show-arrow`]: Rt,
1807
+ [`${d}-disabled`]: Re,
1808
+ [`${d}-loading`]: De,
1809
+ [`${d}-open`]: $.value,
1810
+ [`${d}-customize-input`]: Mt,
1811
+ [`${d}-show-search`]: u.value
1812
+ }), Nt = y(Do, {
1813
+ ref: m,
1814
+ disabled: Re,
1815
+ prefixCls: d,
1816
+ visible: j.value,
1817
+ popupElement: zn,
1818
+ containerWidth: me.value,
1819
+ animation: xn,
1820
+ transitionName: On,
1821
+ dropdownStyle: $n,
1822
+ dropdownClassName: Tn,
1823
+ direction: Rn,
1824
+ dropdownMatchSelectWidth: En,
1825
+ dropdownRender: Mn,
1826
+ dropdownAlign: Pn,
1827
+ placement: Cn,
1828
+ getPopupContainer: In,
1829
+ empty: An,
1830
+ getTriggerDOMNode: () => s.current,
1831
+ onPopupVisibleChange: Pt,
1832
+ onPopupMouseEnter: h,
1833
+ onPopupFocusin: oe,
1834
+ onPopupFocusout: ae
1835
+ }, {
1836
+ default: () => Ve ? ze(Ve) && Zt(Ve, {
1837
+ ref: s
1838
+ }, !1, !0) : y(Uo, Y(Y({}, e), {}, {
1839
+ domRef: s,
1840
+ prefixCls: d,
1841
+ inputElement: Mt,
1842
+ ref: p,
1843
+ id: F,
1844
+ showSearch: u.value,
1845
+ mode: q,
1846
+ activeDescendantId: Vn,
1847
+ tagRender: Dn,
1848
+ optionLabelRender: Fn,
1849
+ values: Ye,
1850
+ open: $.value,
1851
+ onToggleOpen: z,
1852
+ activeValue: Ln,
1853
+ searchValue: C.value,
1854
+ onSearch: X,
1855
+ onSearchSubmit: U,
1856
+ onRemove: g,
1857
+ tokenWithEnter: Q.value
1858
+ }), null)
1859
+ });
1860
+ let lt;
1861
+ return Ve ? lt = Nt : lt = y("div", Y(Y({}, ot), {}, {
1862
+ class: Kn,
1863
+ ref: r,
1864
+ onMousedown: fe,
1865
+ onKeydown: k,
1866
+ onKeyup: ee
1867
+ }), [x.value && !$.value && y("span", {
1868
+ style: {
1869
+ width: 0,
1870
+ height: 0,
1871
+ position: "absolute",
1872
+ overflow: "hidden",
1873
+ opacity: 0
1874
+ },
1875
+ "aria-live": "polite"
1876
+ }, [`${Ye.map((Te) => {
1877
+ let {
1878
+ label: At,
1879
+ value: Wn
1880
+ } = Te;
1881
+ return ["number", "string"].includes(typeof At) ? At : Wn;
1882
+ }).join(", ")}`]), Nt, Dt, Ft]), lt;
1883
+ };
1884
+ }
1885
+ }), Ze = (e, n) => {
1886
+ let {
1887
+ height: o,
1888
+ offset: t,
1889
+ prefixCls: l,
1890
+ onInnerResize: i
1891
+ } = e, {
1892
+ slots: u
1893
+ } = n;
1894
+ var a;
1895
+ let f = {}, r = {
1896
+ display: "flex",
1897
+ flexDirection: "column"
1898
+ };
1899
+ return t !== void 0 && (f = {
1900
+ height: `${o}px`,
1901
+ position: "relative",
1902
+ overflow: "hidden"
1903
+ }, r = S(S({}, r), {
1904
+ transform: `translateY(${t}px)`,
1905
+ position: "absolute",
1906
+ left: 0,
1907
+ right: 0,
1908
+ top: 0
1909
+ })), y("div", {
1910
+ style: f
1911
+ }, [y(vt, {
1912
+ onResize: (s) => {
1913
+ let {
1914
+ offsetHeight: m
1915
+ } = s;
1916
+ m && i && i();
1917
+ }
1918
+ }, {
1919
+ default: () => [y("div", {
1920
+ style: r,
1921
+ class: se({
1922
+ [`${l}-holder-inner`]: l
1923
+ })
1924
+ }, [(a = u.default) === null || a === void 0 ? void 0 : a.call(u)])]
1925
+ })]);
1926
+ };
1927
+ Ze.displayName = "Filter";
1928
+ Ze.inheritAttrs = !1;
1929
+ Ze.props = {
1930
+ prefixCls: String,
1931
+ /** Virtual filler height. Should be `count * itemMinHeight` */
1932
+ height: Number,
1933
+ /** Set offset of visible items. Should be the top of start item position */
1934
+ offset: Number,
1935
+ onInnerResize: Function
1936
+ };
1937
+ const mn = (e, n) => {
1938
+ let {
1939
+ setRef: o
1940
+ } = e, {
1941
+ slots: t
1942
+ } = n;
1943
+ var l;
1944
+ const i = en((l = t.default) === null || l === void 0 ? void 0 : l.call(t));
1945
+ return i && i.length ? Qt(i[0], {
1946
+ ref: o
1947
+ }) : i;
1948
+ };
1949
+ mn.props = {
1950
+ setRef: {
1951
+ type: Function,
1952
+ default: () => {
1953
+ }
1954
+ }
1955
+ };
1956
+ const nl = 20;
1957
+ function Wt(e) {
1958
+ return "touches" in e ? e.touches[0].pageY : e.pageY;
1959
+ }
1960
+ const ol = ue({
1961
+ compatConfig: {
1962
+ MODE: 3
1963
+ },
1964
+ name: "ScrollBar",
1965
+ inheritAttrs: !1,
1966
+ props: {
1967
+ prefixCls: String,
1968
+ scrollTop: Number,
1969
+ scrollHeight: Number,
1970
+ height: Number,
1971
+ count: Number,
1972
+ onScroll: {
1973
+ type: Function
1974
+ },
1975
+ onStartMove: {
1976
+ type: Function
1977
+ },
1978
+ onStopMove: {
1979
+ type: Function
1980
+ }
1981
+ },
1982
+ setup() {
1983
+ return {
1984
+ moveRaf: null,
1985
+ scrollbarRef: Ke(),
1986
+ thumbRef: Ke(),
1987
+ visibleTimeout: null,
1988
+ state: Ae({
1989
+ dragging: !1,
1990
+ pageY: null,
1991
+ startTop: null,
1992
+ visible: !1
1993
+ })
1994
+ };
1995
+ },
1996
+ watch: {
1997
+ scrollTop: {
1998
+ handler() {
1999
+ this.delayHidden();
2000
+ },
2001
+ flush: "post"
2002
+ }
2003
+ },
2004
+ mounted() {
2005
+ var e, n;
2006
+ (e = this.scrollbarRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onScrollbarTouchStart, xe ? {
2007
+ passive: !1
2008
+ } : !1), (n = this.thumbRef.current) === null || n === void 0 || n.addEventListener("touchstart", this.onMouseDown, xe ? {
2009
+ passive: !1
2010
+ } : !1);
2011
+ },
2012
+ beforeUnmount() {
2013
+ this.removeEvents(), clearTimeout(this.visibleTimeout);
2014
+ },
2015
+ methods: {
2016
+ delayHidden() {
2017
+ clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
2018
+ this.state.visible = !1;
2019
+ }, 2e3);
2020
+ },
2021
+ onScrollbarTouchStart(e) {
2022
+ e.preventDefault();
2023
+ },
2024
+ onContainerMouseDown(e) {
2025
+ e.stopPropagation(), e.preventDefault();
2026
+ },
2027
+ // ======================= Clean =======================
2028
+ patchEvents() {
2029
+ window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, xe ? {
2030
+ passive: !1
2031
+ } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
2032
+ },
2033
+ removeEvents() {
2034
+ window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, xe ? {
2035
+ passive: !1
2036
+ } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, xe ? {
2037
+ passive: !1
2038
+ } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, xe ? {
2039
+ passive: !1
2040
+ } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), Ie.cancel(this.moveRaf);
2041
+ },
2042
+ // ======================= Thumb =======================
2043
+ onMouseDown(e) {
2044
+ const {
2045
+ onStartMove: n
2046
+ } = this.$props;
2047
+ S(this.state, {
2048
+ dragging: !0,
2049
+ pageY: Wt(e),
2050
+ startTop: this.getTop()
2051
+ }), n(), this.patchEvents(), e.stopPropagation(), e.preventDefault();
2052
+ },
2053
+ onMouseMove(e) {
2054
+ const {
2055
+ dragging: n,
2056
+ pageY: o,
2057
+ startTop: t
2058
+ } = this.state, {
2059
+ onScroll: l
2060
+ } = this.$props;
2061
+ if (Ie.cancel(this.moveRaf), n) {
2062
+ const i = Wt(e) - o, u = t + i, a = this.getEnableScrollRange(), f = this.getEnableHeightRange(), r = f ? u / f : 0, s = Math.ceil(r * a);
2063
+ this.moveRaf = Ie(() => {
2064
+ l(s);
2065
+ });
2066
+ }
2067
+ },
2068
+ onMouseUp() {
2069
+ const {
2070
+ onStopMove: e
2071
+ } = this.$props;
2072
+ this.state.dragging = !1, e(), this.removeEvents();
2073
+ },
2074
+ // ===================== Calculate =====================
2075
+ getSpinHeight() {
2076
+ const {
2077
+ height: e,
2078
+ scrollHeight: n
2079
+ } = this.$props;
2080
+ let o = e / n * 100;
2081
+ return o = Math.max(o, nl), o = Math.min(o, e / 2), Math.floor(o);
2082
+ },
2083
+ getEnableScrollRange() {
2084
+ const {
2085
+ scrollHeight: e,
2086
+ height: n
2087
+ } = this.$props;
2088
+ return e - n || 0;
2089
+ },
2090
+ getEnableHeightRange() {
2091
+ const {
2092
+ height: e
2093
+ } = this.$props, n = this.getSpinHeight();
2094
+ return e - n || 0;
2095
+ },
2096
+ getTop() {
2097
+ const {
2098
+ scrollTop: e
2099
+ } = this.$props, n = this.getEnableScrollRange(), o = this.getEnableHeightRange();
2100
+ return e === 0 || n === 0 ? 0 : e / n * o;
2101
+ },
2102
+ // Not show scrollbar when height is large than scrollHeight
2103
+ showScroll() {
2104
+ const {
2105
+ height: e,
2106
+ scrollHeight: n
2107
+ } = this.$props;
2108
+ return n > e;
2109
+ }
2110
+ },
2111
+ render() {
2112
+ const {
2113
+ dragging: e,
2114
+ visible: n
2115
+ } = this.state, {
2116
+ prefixCls: o
2117
+ } = this.$props, t = this.getSpinHeight() + "px", l = this.getTop() + "px", i = this.showScroll(), u = i && n;
2118
+ return y("div", {
2119
+ ref: this.scrollbarRef,
2120
+ class: se(`${o}-scrollbar`, {
2121
+ [`${o}-scrollbar-show`]: i
2122
+ }),
2123
+ style: {
2124
+ width: "8px",
2125
+ top: 0,
2126
+ bottom: 0,
2127
+ right: 0,
2128
+ position: "absolute",
2129
+ display: u ? void 0 : "none"
2130
+ },
2131
+ onMousedown: this.onContainerMouseDown,
2132
+ onMousemove: this.delayHidden
2133
+ }, [y("div", {
2134
+ ref: this.thumbRef,
2135
+ class: se(`${o}-scrollbar-thumb`, {
2136
+ [`${o}-scrollbar-thumb-moving`]: e
2137
+ }),
2138
+ style: {
2139
+ width: "100%",
2140
+ height: t,
2141
+ top: l,
2142
+ left: 0,
2143
+ position: "absolute",
2144
+ background: "rgba(0, 0, 0, 0.5)",
2145
+ borderRadius: "99px",
2146
+ cursor: "pointer",
2147
+ userSelect: "none"
2148
+ },
2149
+ onMousedown: this.onMouseDown
2150
+ }, null)]);
2151
+ }
2152
+ });
2153
+ function ll(e, n, o, t) {
2154
+ const l = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), u = ve(Symbol("update"));
2155
+ ie(e, () => {
2156
+ u.value = Symbol("update");
2157
+ });
2158
+ let a;
2159
+ function f() {
2160
+ Ie.cancel(a);
2161
+ }
2162
+ function r() {
2163
+ f(), a = Ie(() => {
2164
+ l.forEach((m, p) => {
2165
+ if (m && m.offsetParent) {
2166
+ const {
2167
+ offsetHeight: w
2168
+ } = m;
2169
+ i.get(p) !== w && (u.value = Symbol("update"), i.set(p, m.offsetHeight));
2170
+ }
2171
+ });
2172
+ });
2173
+ }
2174
+ function s(m, p) {
2175
+ const w = n(m);
2176
+ l.get(w), p ? (l.set(w, p.$el || p), r()) : l.delete(w);
2177
+ }
2178
+ return Jt(() => {
2179
+ f();
2180
+ }), [s, r, i, u];
2181
+ }
2182
+ function il(e, n, o, t, l, i, u, a) {
2183
+ let f;
2184
+ return (r) => {
2185
+ if (r == null) {
2186
+ a();
2187
+ return;
2188
+ }
2189
+ Ie.cancel(f);
2190
+ const s = n.value, m = t.itemHeight;
2191
+ if (typeof r == "number")
2192
+ u(r);
2193
+ else if (r && typeof r == "object") {
2194
+ let p;
2195
+ const {
2196
+ align: w
2197
+ } = r;
2198
+ "index" in r ? {
2199
+ index: p
2200
+ } = r : p = s.findIndex((O) => l(O) === r.key);
2201
+ const {
2202
+ offset: b = 0
2203
+ } = r, x = (O, I) => {
2204
+ if (O < 0 || !e.value) return;
2205
+ const P = e.value.clientHeight;
2206
+ let D = !1, C = I;
2207
+ if (P) {
2208
+ const v = I || w;
2209
+ let T = 0, $ = 0, N = 0;
2210
+ const V = Math.min(s.length, p);
2211
+ for (let Q = 0; Q <= V; Q += 1) {
2212
+ const X = l(s[Q]);
2213
+ $ = T;
2214
+ const U = o.get(X);
2215
+ N = $ + (U === void 0 ? m : U), T = N, Q === p && U === void 0 && (D = !0);
2216
+ }
2217
+ const j = e.value.scrollTop;
2218
+ let z = null;
2219
+ switch (v) {
2220
+ case "top":
2221
+ z = $ - b;
2222
+ break;
2223
+ case "bottom":
2224
+ z = N - P + b;
2225
+ break;
2226
+ default: {
2227
+ const Q = j + P;
2228
+ $ < j ? C = "top" : N > Q && (C = "bottom");
2229
+ }
2230
+ }
2231
+ z !== null && z !== j && u(z);
2232
+ }
2233
+ f = Ie(() => {
2234
+ D && i(), x(O - 1, C);
2235
+ }, 2);
2236
+ };
2237
+ x(5);
2238
+ }
2239
+ };
2240
+ }
2241
+ const al = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), pn = (e, n) => {
2242
+ let o = !1, t = null;
2243
+ function l() {
2244
+ clearTimeout(t), o = !0, t = setTimeout(() => {
2245
+ o = !1;
2246
+ }, 50);
2247
+ }
2248
+ return function(i) {
2249
+ let u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2250
+ const a = (
2251
+ // Pass origin wheel when on the top
2252
+ i < 0 && e.value || // Pass origin wheel when on the bottom
2253
+ i > 0 && n.value
2254
+ );
2255
+ return u && a ? (clearTimeout(t), o = !1) : (!a || o) && l(), !o && a;
2256
+ };
2257
+ };
2258
+ function rl(e, n, o, t) {
2259
+ let l = 0, i = null, u = null, a = !1;
2260
+ const f = pn(n, o);
2261
+ function r(m) {
2262
+ if (!e.value) return;
2263
+ Ie.cancel(i);
2264
+ const {
2265
+ deltaY: p
2266
+ } = m;
2267
+ l += p, u = p, !f(p) && (al || m.preventDefault(), i = Ie(() => {
2268
+ t(l * (a ? 10 : 1)), l = 0;
2269
+ }));
2270
+ }
2271
+ function s(m) {
2272
+ e.value && (a = m.detail === u);
2273
+ }
2274
+ return [r, s];
2275
+ }
2276
+ const sl = 14 / 15;
2277
+ function ul(e, n, o) {
2278
+ let t = !1, l = 0, i = null, u = null;
2279
+ const a = () => {
2280
+ i && (i.removeEventListener("touchmove", f), i.removeEventListener("touchend", r));
2281
+ }, f = (p) => {
2282
+ if (t) {
2283
+ const w = Math.ceil(p.touches[0].pageY);
2284
+ let b = l - w;
2285
+ l = w, o(b) && p.preventDefault(), clearInterval(u), u = setInterval(() => {
2286
+ b *= sl, (!o(b, !0) || Math.abs(b) <= 0.1) && clearInterval(u);
2287
+ }, 16);
2288
+ }
2289
+ }, r = () => {
2290
+ t = !1, a();
2291
+ }, s = (p) => {
2292
+ a(), p.touches.length === 1 && !t && (t = !0, l = Math.ceil(p.touches[0].pageY), i = p.target, i.addEventListener("touchmove", f, {
2293
+ passive: !1
2294
+ }), i.addEventListener("touchend", r));
2295
+ }, m = () => {
2296
+ };
2297
+ Oe(() => {
2298
+ document.addEventListener("touchmove", m, {
2299
+ passive: !1
2300
+ }), ie(e, (p) => {
2301
+ n.value.removeEventListener("touchstart", s), a(), clearInterval(u), p && n.value.addEventListener("touchstart", s, {
2302
+ passive: !1
2303
+ });
2304
+ }, {
2305
+ immediate: !0
2306
+ });
2307
+ }), je(() => {
2308
+ document.removeEventListener("touchmove", m);
2309
+ });
2310
+ }
2311
+ var cl = function(e, n) {
2312
+ var o = {};
2313
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
2314
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
2315
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
2316
+ return o;
2317
+ };
2318
+ const dl = [], fl = {
2319
+ overflowY: "auto",
2320
+ overflowAnchor: "none"
2321
+ };
2322
+ function ml(e, n, o, t, l, i) {
2323
+ let {
2324
+ getKey: u
2325
+ } = i;
2326
+ return e.slice(n, o + 1).map((a, f) => {
2327
+ const r = n + f, s = l(a, r, {
2328
+ // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
2329
+ }), m = u(a);
2330
+ return y(mn, {
2331
+ key: m,
2332
+ setRef: (p) => t(a, p)
2333
+ }, {
2334
+ default: () => [s]
2335
+ });
2336
+ });
2337
+ }
2338
+ const pl = ue({
2339
+ compatConfig: {
2340
+ MODE: 3
2341
+ },
2342
+ name: "List",
2343
+ inheritAttrs: !1,
2344
+ props: {
2345
+ prefixCls: String,
2346
+ data: A.array,
2347
+ height: Number,
2348
+ itemHeight: Number,
2349
+ /** If not match virtual scroll condition, Set List still use height of container. */
2350
+ fullHeight: {
2351
+ type: Boolean,
2352
+ default: void 0
2353
+ },
2354
+ itemKey: {
2355
+ type: [String, Number, Function],
2356
+ required: !0
2357
+ },
2358
+ component: {
2359
+ type: [String, Object]
2360
+ },
2361
+ /** Set `false` will always use real scroll instead of virtual one */
2362
+ virtual: {
2363
+ type: Boolean,
2364
+ default: void 0
2365
+ },
2366
+ children: Function,
2367
+ onScroll: Function,
2368
+ onMousedown: Function,
2369
+ onMouseenter: Function,
2370
+ onVisibleChange: Function
2371
+ },
2372
+ setup(e, n) {
2373
+ let {
2374
+ expose: o
2375
+ } = n;
2376
+ const t = R(() => {
2377
+ const {
2378
+ height: g,
2379
+ itemHeight: H,
2380
+ virtual: W
2381
+ } = e;
2382
+ return !!(W !== !1 && g && H);
2383
+ }), l = R(() => {
2384
+ const {
2385
+ height: g,
2386
+ itemHeight: H,
2387
+ data: W
2388
+ } = e;
2389
+ return t.value && W && H * W.length > g;
2390
+ }), i = Ae({
2391
+ scrollTop: 0,
2392
+ scrollMoving: !1
2393
+ }), u = R(() => e.data || dl), a = G([]);
2394
+ ie(u, () => {
2395
+ a.value = pt(u.value).slice();
2396
+ }, {
2397
+ immediate: !0
2398
+ });
2399
+ const f = G((g) => {
2400
+ });
2401
+ ie(() => e.itemKey, (g) => {
2402
+ typeof g == "function" ? f.value = g : f.value = (H) => H == null ? void 0 : H[g];
2403
+ }, {
2404
+ immediate: !0
2405
+ });
2406
+ const r = G(), s = G(), m = G(), p = (g) => f.value(g), w = {
2407
+ getKey: p
2408
+ };
2409
+ function b(g) {
2410
+ let H;
2411
+ typeof g == "function" ? H = g(i.scrollTop) : H = g;
2412
+ const W = T(H);
2413
+ r.value && (r.value.scrollTop = W), i.scrollTop = W;
2414
+ }
2415
+ const [x, O, I, P] = ll(a, p), D = Ae({
2416
+ scrollHeight: void 0,
2417
+ start: 0,
2418
+ end: 0,
2419
+ offset: void 0
2420
+ }), C = G(0);
2421
+ Oe(() => {
2422
+ _e(() => {
2423
+ var g;
2424
+ C.value = ((g = s.value) === null || g === void 0 ? void 0 : g.offsetHeight) || 0;
2425
+ });
2426
+ }), Gn(() => {
2427
+ _e(() => {
2428
+ var g;
2429
+ C.value = ((g = s.value) === null || g === void 0 ? void 0 : g.offsetHeight) || 0;
2430
+ });
2431
+ }), ie([t, a], () => {
2432
+ t.value || S(D, {
2433
+ scrollHeight: void 0,
2434
+ start: 0,
2435
+ end: a.value.length - 1,
2436
+ offset: void 0
2437
+ });
2438
+ }, {
2439
+ immediate: !0
2440
+ }), ie([t, a, C, l], () => {
2441
+ t.value && !l.value && S(D, {
2442
+ scrollHeight: C.value,
2443
+ start: 0,
2444
+ end: a.value.length - 1,
2445
+ offset: void 0
2446
+ }), r.value && (i.scrollTop = r.value.scrollTop);
2447
+ }, {
2448
+ immediate: !0
2449
+ }), ie([l, t, () => i.scrollTop, a, P, () => e.height, C], () => {
2450
+ if (!t.value || !l.value)
2451
+ return;
2452
+ let g = 0, H, W, _;
2453
+ const te = a.value.length, oe = a.value, ae = i.scrollTop, {
2454
+ itemHeight: ne,
2455
+ height: fe
2456
+ } = e, me = ae + fe;
2457
+ for (let h = 0; h < te; h += 1) {
2458
+ const c = oe[h], d = p(c);
2459
+ let F = I.get(d);
2460
+ F === void 0 && (F = ne);
2461
+ const E = g + F;
2462
+ H === void 0 && E >= ae && (H = h, W = g), _ === void 0 && E > me && (_ = h), g = E;
2463
+ }
2464
+ H === void 0 && (H = 0, W = 0, _ = Math.ceil(fe / ne)), _ === void 0 && (_ = te - 1), _ = Math.min(_ + 1, te), S(D, {
2465
+ scrollHeight: g,
2466
+ start: H,
2467
+ end: _,
2468
+ offset: W
2469
+ });
2470
+ }, {
2471
+ immediate: !0
2472
+ });
2473
+ const v = R(() => D.scrollHeight - e.height);
2474
+ function T(g) {
2475
+ let H = g;
2476
+ return Number.isNaN(v.value) || (H = Math.min(H, v.value)), H = Math.max(H, 0), H;
2477
+ }
2478
+ const $ = R(() => i.scrollTop <= 0), N = R(() => i.scrollTop >= v.value), V = pn($, N);
2479
+ function j(g) {
2480
+ b(g);
2481
+ }
2482
+ function z(g) {
2483
+ var H;
2484
+ const {
2485
+ scrollTop: W
2486
+ } = g.currentTarget;
2487
+ W !== i.scrollTop && b(W), (H = e.onScroll) === null || H === void 0 || H.call(e, g);
2488
+ }
2489
+ const [Q, X] = rl(t, $, N, (g) => {
2490
+ b((H) => H + g);
2491
+ });
2492
+ ul(t, r, (g, H) => V(g, H) ? !1 : (Q({
2493
+ preventDefault() {
2494
+ },
2495
+ deltaY: g
2496
+ }), !0));
2497
+ function U(g) {
2498
+ t.value && g.preventDefault();
2499
+ }
2500
+ const M = () => {
2501
+ r.value && (r.value.removeEventListener("wheel", Q, xe ? {
2502
+ passive: !1
2503
+ } : !1), r.value.removeEventListener("DOMMouseScroll", X), r.value.removeEventListener("MozMousePixelScroll", U));
2504
+ };
2505
+ Me(() => {
2506
+ _e(() => {
2507
+ r.value && (M(), r.value.addEventListener("wheel", Q, xe ? {
2508
+ passive: !1
2509
+ } : !1), r.value.addEventListener("DOMMouseScroll", X), r.value.addEventListener("MozMousePixelScroll", U));
2510
+ });
2511
+ }), je(() => {
2512
+ M();
2513
+ });
2514
+ const L = il(r, a, I, e, p, O, b, () => {
2515
+ var g;
2516
+ (g = m.value) === null || g === void 0 || g.delayHidden();
2517
+ });
2518
+ o({
2519
+ scrollTo: L
2520
+ });
2521
+ const k = R(() => {
2522
+ let g = null;
2523
+ return e.height && (g = S({
2524
+ [e.fullHeight ? "height" : "maxHeight"]: e.height + "px"
2525
+ }, fl), t.value && (g.overflowY = "hidden", i.scrollMoving && (g.pointerEvents = "none"))), g;
2526
+ });
2527
+ return ie([() => D.start, () => D.end, a], () => {
2528
+ if (e.onVisibleChange) {
2529
+ const g = a.value.slice(D.start, D.end + 1);
2530
+ e.onVisibleChange(g, a.value);
2531
+ }
2532
+ }, {
2533
+ flush: "post"
2534
+ }), {
2535
+ state: i,
2536
+ mergedData: a,
2537
+ componentStyle: k,
2538
+ onFallbackScroll: z,
2539
+ onScrollBar: j,
2540
+ componentRef: r,
2541
+ useVirtual: t,
2542
+ calRes: D,
2543
+ collectHeight: O,
2544
+ setInstance: x,
2545
+ sharedConfig: w,
2546
+ scrollBarRef: m,
2547
+ fillerInnerRef: s,
2548
+ delayHideScrollBar: () => {
2549
+ var g;
2550
+ (g = m.value) === null || g === void 0 || g.delayHidden();
2551
+ }
2552
+ };
2553
+ },
2554
+ render() {
2555
+ const e = S(S({}, this.$props), this.$attrs), {
2556
+ prefixCls: n = "rc-virtual-list",
2557
+ height: o,
2558
+ itemHeight: t,
2559
+ // eslint-disable-next-line no-unused-vars
2560
+ fullHeight: l,
2561
+ data: i,
2562
+ itemKey: u,
2563
+ virtual: a,
2564
+ component: f = "div",
2565
+ onScroll: r,
2566
+ children: s = this.$slots.default,
2567
+ style: m,
2568
+ class: p
2569
+ } = e, w = cl(e, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), b = se(n, p), {
2570
+ scrollTop: x
2571
+ } = this.state, {
2572
+ scrollHeight: O,
2573
+ offset: I,
2574
+ start: P,
2575
+ end: D
2576
+ } = this.calRes, {
2577
+ componentStyle: C,
2578
+ onFallbackScroll: v,
2579
+ onScrollBar: T,
2580
+ useVirtual: $,
2581
+ collectHeight: N,
2582
+ sharedConfig: V,
2583
+ setInstance: j,
2584
+ mergedData: z,
2585
+ delayHideScrollBar: Q
2586
+ } = this;
2587
+ return y("div", Y({
2588
+ style: S(S({}, m), {
2589
+ position: "relative"
2590
+ }),
2591
+ class: b
2592
+ }, w), [y(f, {
2593
+ class: `${n}-holder`,
2594
+ style: C,
2595
+ ref: "componentRef",
2596
+ onScroll: v,
2597
+ onMouseenter: Q
2598
+ }, {
2599
+ default: () => [y(Ze, {
2600
+ prefixCls: n,
2601
+ height: O,
2602
+ offset: I,
2603
+ onInnerResize: N,
2604
+ ref: "fillerInnerRef"
2605
+ }, {
2606
+ default: () => ml(z, P, D, j, s, V)
2607
+ })]
2608
+ }), $ && y(ol, {
2609
+ ref: "scrollBarRef",
2610
+ prefixCls: n,
2611
+ scrollTop: x,
2612
+ height: o,
2613
+ scrollHeight: O,
2614
+ count: z.length,
2615
+ onScroll: T,
2616
+ onStartMove: () => {
2617
+ this.state.scrollMoving = !0;
2618
+ },
2619
+ onStopMove: () => {
2620
+ this.state.scrollMoving = !1;
2621
+ }
2622
+ }, null)]);
2623
+ }
2624
+ });
2625
+ function vl(e, n, o) {
2626
+ const t = ve(e());
2627
+ return ie(n, (l, i) => {
2628
+ o ? o(l, i) && (t.value = e()) : t.value = e();
2629
+ }), t;
2630
+ }
2631
+ function gl() {
2632
+ return /(mac\sos|macintosh)/i.test(navigator.appVersion);
2633
+ }
2634
+ const vn = Symbol("SelectContextKey");
2635
+ function hl(e) {
2636
+ return qe(vn, e);
2637
+ }
2638
+ function bl() {
2639
+ return We(vn, {});
2640
+ }
2641
+ var yl = function(e, n) {
2642
+ var o = {};
2643
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
2644
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
2645
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
2646
+ return o;
2647
+ };
2648
+ function jt(e) {
2649
+ return typeof e == "string" || typeof e == "number";
2650
+ }
2651
+ const Sl = ue({
2652
+ compatConfig: {
2653
+ MODE: 3
2654
+ },
2655
+ name: "OptionList",
2656
+ inheritAttrs: !1,
2657
+ setup(e, n) {
2658
+ let {
2659
+ expose: o,
2660
+ slots: t
2661
+ } = n;
2662
+ const l = ko(), i = bl(), u = R(() => `${l.prefixCls}-item`), a = vl(() => i.flattenOptions, [() => l.open, () => i.flattenOptions], (v) => v[0]), f = Ke(), r = (v) => {
2663
+ v.preventDefault();
2664
+ }, s = (v) => {
2665
+ f.current && f.current.scrollTo(typeof v == "number" ? {
2666
+ index: v
2667
+ } : v);
2668
+ }, m = function(v) {
2669
+ let T = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
2670
+ const $ = a.value.length;
2671
+ for (let N = 0; N < $; N += 1) {
2672
+ const V = (v + N * T + $) % $, {
2673
+ group: j,
2674
+ data: z
2675
+ } = a.value[V];
2676
+ if (!j && !z.disabled)
2677
+ return V;
2678
+ }
2679
+ return -1;
2680
+ }, p = Ae({
2681
+ activeIndex: m(0)
2682
+ }), w = function(v) {
2683
+ let T = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2684
+ p.activeIndex = v;
2685
+ const $ = {
2686
+ source: T ? "keyboard" : "mouse"
2687
+ }, N = a.value[v];
2688
+ if (!N) {
2689
+ i.onActiveValue(null, -1, $);
2690
+ return;
2691
+ }
2692
+ i.onActiveValue(N.value, v, $);
2693
+ };
2694
+ ie([() => a.value.length, () => l.searchValue], () => {
2695
+ w(i.defaultActiveFirstOption !== !1 ? m(0) : -1);
2696
+ }, {
2697
+ immediate: !0
2698
+ });
2699
+ const b = (v) => i.rawValues.has(v) && l.mode !== "combobox";
2700
+ ie([() => l.open, () => l.searchValue], () => {
2701
+ if (!l.multiple && l.open && i.rawValues.size === 1) {
2702
+ const v = Array.from(i.rawValues)[0], T = pt(a.value).findIndex(($) => {
2703
+ let {
2704
+ data: N
2705
+ } = $;
2706
+ return N[i.fieldNames.value] === v;
2707
+ });
2708
+ T !== -1 && (w(T), _e(() => {
2709
+ s(T);
2710
+ }));
2711
+ }
2712
+ l.open && _e(() => {
2713
+ var v;
2714
+ (v = f.current) === null || v === void 0 || v.scrollTo(void 0);
2715
+ });
2716
+ }, {
2717
+ immediate: !0,
2718
+ flush: "post"
2719
+ });
2720
+ const x = (v) => {
2721
+ v !== void 0 && i.onSelect(v, {
2722
+ selected: !i.rawValues.has(v)
2723
+ }), l.multiple || l.toggleOpen(!1);
2724
+ }, O = (v) => typeof v.label == "function" ? v.label() : v.label;
2725
+ function I(v) {
2726
+ const T = a.value[v];
2727
+ if (!T) return null;
2728
+ const $ = T.data || {}, {
2729
+ value: N
2730
+ } = $, {
2731
+ group: V
2732
+ } = T, j = bt($, !0), z = O(T);
2733
+ return T ? y("div", Y(Y({
2734
+ "aria-label": typeof z == "string" && !V ? z : null
2735
+ }, j), {}, {
2736
+ key: v,
2737
+ role: V ? "presentation" : "option",
2738
+ id: `${l.id}_list_${v}`,
2739
+ "aria-selected": b(N)
2740
+ }), [N]) : null;
2741
+ }
2742
+ return o({
2743
+ onKeydown: (v) => {
2744
+ const {
2745
+ which: T,
2746
+ ctrlKey: $
2747
+ } = v;
2748
+ switch (T) {
2749
+ case K.N:
2750
+ case K.P:
2751
+ case K.UP:
2752
+ case K.DOWN: {
2753
+ let N = 0;
2754
+ if (T === K.UP ? N = -1 : T === K.DOWN ? N = 1 : gl() && $ && (T === K.N ? N = 1 : T === K.P && (N = -1)), N !== 0) {
2755
+ const V = m(p.activeIndex + N, N);
2756
+ s(V), w(V, !0);
2757
+ }
2758
+ break;
2759
+ }
2760
+ case K.ENTER: {
2761
+ const N = a.value[p.activeIndex];
2762
+ N && !N.data.disabled ? x(N.value) : x(void 0), l.open && v.preventDefault();
2763
+ break;
2764
+ }
2765
+ case K.ESC:
2766
+ l.toggleOpen(!1), l.open && v.stopPropagation();
2767
+ }
2768
+ },
2769
+ onKeyup: () => {
2770
+ },
2771
+ scrollTo: (v) => {
2772
+ s(v);
2773
+ }
2774
+ }), () => {
2775
+ const {
2776
+ id: v,
2777
+ notFoundContent: T,
2778
+ onPopupScroll: $
2779
+ } = l, {
2780
+ menuItemSelectedIcon: N,
2781
+ fieldNames: V,
2782
+ virtual: j,
2783
+ listHeight: z,
2784
+ listItemHeight: Q
2785
+ } = i, X = t.option, {
2786
+ activeIndex: U
2787
+ } = p, M = Object.keys(V).map((L) => V[L]);
2788
+ return a.value.length === 0 ? y("div", {
2789
+ role: "listbox",
2790
+ id: `${v}_list`,
2791
+ class: `${u.value}-empty`,
2792
+ onMousedown: r
2793
+ }, [T]) : y(Be, null, [y("div", {
2794
+ role: "listbox",
2795
+ id: `${v}_list`,
2796
+ style: {
2797
+ height: 0,
2798
+ width: 0,
2799
+ overflow: "hidden"
2800
+ }
2801
+ }, [I(U - 1), I(U), I(U + 1)]), y(pl, {
2802
+ itemKey: "key",
2803
+ ref: f,
2804
+ data: a.value,
2805
+ height: z,
2806
+ itemHeight: Q,
2807
+ fullHeight: !1,
2808
+ onMousedown: r,
2809
+ onScroll: $,
2810
+ virtual: j
2811
+ }, {
2812
+ default: (L, k) => {
2813
+ var ee;
2814
+ const {
2815
+ group: g,
2816
+ groupOption: H,
2817
+ data: W,
2818
+ value: _
2819
+ } = L, {
2820
+ key: te
2821
+ } = W, oe = typeof L.label == "function" ? L.label() : L.label;
2822
+ if (g) {
2823
+ const de = (ee = W.title) !== null && ee !== void 0 ? ee : jt(oe) && oe;
2824
+ return y("div", {
2825
+ class: se(u.value, `${u.value}-group`),
2826
+ title: de
2827
+ }, [X ? X(W) : oe !== void 0 ? oe : te]);
2828
+ }
2829
+ const {
2830
+ disabled: ae,
2831
+ title: ne,
2832
+ children: fe,
2833
+ style: me,
2834
+ class: h,
2835
+ className: c
2836
+ } = W, d = yl(W, ["disabled", "title", "children", "style", "class", "className"]), F = Qe(d, M), E = b(_), B = `${u.value}-option`, q = se(u.value, B, h, c, {
2837
+ [`${B}-grouped`]: H,
2838
+ [`${B}-active`]: U === k && !ae,
2839
+ [`${B}-disabled`]: ae,
2840
+ [`${B}-selected`]: E
2841
+ }), J = O(L), le = !N || typeof N == "function" || E, Z = typeof J == "number" ? J : J || _;
2842
+ let re = jt(Z) ? Z.toString() : void 0;
2843
+ return ne !== void 0 && (re = ne), y("div", Y(Y({}, F), {}, {
2844
+ "aria-selected": E,
2845
+ class: q,
2846
+ title: re,
2847
+ onMousemove: (de) => {
2848
+ d.onMousemove && d.onMousemove(de), !(U === k || ae) && w(k);
2849
+ },
2850
+ onClick: (de) => {
2851
+ ae || x(_), d.onClick && d.onClick(de);
2852
+ },
2853
+ style: me
2854
+ }), [y("div", {
2855
+ class: `${B}-content`
2856
+ }, [X ? X(W) : Z]), ze(N) || E, le && y(Pe, {
2857
+ class: `${u.value}-option-state`,
2858
+ customizeIcon: N,
2859
+ customizeIconProps: {
2860
+ isSelected: E
2861
+ }
2862
+ }, {
2863
+ default: () => [E ? "✓" : null]
2864
+ })]);
2865
+ }
2866
+ })]);
2867
+ };
2868
+ }
2869
+ });
2870
+ var wl = function(e, n) {
2871
+ var o = {};
2872
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
2873
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
2874
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
2875
+ return o;
2876
+ };
2877
+ function Il(e) {
2878
+ const n = e, {
2879
+ key: o,
2880
+ children: t
2881
+ } = n, l = n.props, {
2882
+ value: i,
2883
+ disabled: u
2884
+ } = l, a = wl(l, ["value", "disabled"]), f = t == null ? void 0 : t.default;
2885
+ return S({
2886
+ key: o,
2887
+ value: i !== void 0 ? i : o,
2888
+ children: f,
2889
+ disabled: u || u === ""
2890
+ }, a);
2891
+ }
2892
+ function It(e) {
2893
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2894
+ return en(e).map((t, l) => {
2895
+ var i;
2896
+ if (!ze(t) || !t.type)
2897
+ return null;
2898
+ const {
2899
+ type: {
2900
+ isSelectOptGroup: u
2901
+ },
2902
+ key: a,
2903
+ children: f,
2904
+ props: r
2905
+ } = t;
2906
+ if (n || !u)
2907
+ return Il(t);
2908
+ const s = f && f.default ? f.default() : void 0, m = (r == null ? void 0 : r.label) || ((i = f.label) === null || i === void 0 ? void 0 : i.call(f)) || a;
2909
+ return S(S({
2910
+ key: `__RC_SELECT_GRP__${a === null ? l : String(a)}__`
2911
+ }, r), {
2912
+ label: m,
2913
+ options: It(s || [])
2914
+ });
2915
+ }).filter((t) => t);
2916
+ }
2917
+ function Cl(e, n, o) {
2918
+ const t = G(), l = G(), i = G(), u = G([]);
2919
+ return ie([e, n], () => {
2920
+ e.value ? u.value = pt(e.value).slice() : u.value = It(n.value);
2921
+ }, {
2922
+ immediate: !0,
2923
+ deep: !0
2924
+ }), Me(() => {
2925
+ const a = u.value, f = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), s = o.value;
2926
+ function m(p) {
2927
+ let w = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2928
+ for (let b = 0; b < p.length; b += 1) {
2929
+ const x = p[b];
2930
+ !x[s.options] || w ? (f.set(x[s.value], x), r.set(x[s.label], x)) : m(x[s.options], !0);
2931
+ }
2932
+ }
2933
+ m(a), t.value = a, l.value = f, i.value = r;
2934
+ }), {
2935
+ options: t,
2936
+ valueOptions: l,
2937
+ labelOptions: i
2938
+ };
2939
+ }
2940
+ let Ut = 0;
2941
+ const xl = process.env.NODE_ENV !== "test" && to();
2942
+ function Ol() {
2943
+ let e;
2944
+ return xl ? (e = Ut, Ut += 1) : e = "TEST_OR_SSR", e;
2945
+ }
2946
+ function $l() {
2947
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ve("");
2948
+ const n = `rc_select_${Ol()}`;
2949
+ return e.value || n;
2950
+ }
2951
+ function Ct(e) {
2952
+ return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
2953
+ }
2954
+ const Tl = typeof window < "u" && window.document && window.document.documentElement;
2955
+ process.env.NODE_ENV;
2956
+ function El(e) {
2957
+ const {
2958
+ mode: n,
2959
+ options: o,
2960
+ children: t,
2961
+ backfill: l,
2962
+ allowClear: i,
2963
+ placeholder: u,
2964
+ getInputElement: a,
2965
+ showSearch: f,
2966
+ onSearch: r,
2967
+ defaultOpen: s,
2968
+ autofocus: m,
2969
+ labelInValue: p,
2970
+ value: w,
2971
+ inputValue: b,
2972
+ optionLabelProp: x
2973
+ } = e, O = wt(n), I = f !== void 0 ? f : O || n === "combobox", P = o || It(t);
2974
+ if (ye(n !== "tags" || P.every((D) => !D.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), ye(n !== "combobox" || !x, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), ye(n === "combobox" || !l, "`backfill` only works with `combobox` mode."), ye(n === "combobox" || !a, "`getInputElement` only work with `combobox` mode."), Vt(n !== "combobox" || !a || !i || !u, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), r && !I && n !== "combobox" && n !== "tags" && ye(!1, "`onSearch` should work with `showSearch` instead of use alone."), Vt(!s || m, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."), w != null) {
2975
+ const D = Ct(w);
2976
+ ye(!p || D.every((C) => typeof C == "object" && ("key" in C || "value" in C)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), ye(!O || Array.isArray(w), "`value` should be array when `mode` is `multiple` or `tags`");
2977
+ }
2978
+ if (t) {
2979
+ let D = null;
2980
+ t.some((C) => {
2981
+ var v;
2982
+ if (!ze(C) || !C.type)
2983
+ return !1;
2984
+ const {
2985
+ type: T
2986
+ } = C;
2987
+ return T.isSelectOption ? !1 : T.isSelectOptGroup ? !(((v = C.children) === null || v === void 0 ? void 0 : v.default()) || []).every((V) => !ze(V) || !C.type || V.type.isSelectOption ? !0 : (D = V.type, !1)) : (D = T, !0);
2988
+ }), D && ye(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${D.displayName || D.name || D}\`.`), ye(b === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
2989
+ }
2990
+ }
2991
+ function rt(e, n) {
2992
+ return Ct(e).join("").toUpperCase().includes(n);
2993
+ }
2994
+ const Ml = (e, n, o, t, l) => R(() => {
2995
+ const i = o.value, u = l == null ? void 0 : l.value, a = t == null ? void 0 : t.value;
2996
+ if (!i || a === !1)
2997
+ return e.value;
2998
+ const {
2999
+ options: f,
3000
+ label: r,
3001
+ value: s
3002
+ } = n.value, m = [], p = typeof a == "function", w = i.toUpperCase(), b = p ? a : (O, I) => u ? rt(I[u], w) : I[f] ? rt(I[r !== "children" ? r : "label"], w) : rt(I[s], w), x = p ? (O) => ft(O) : (O) => O;
3003
+ return e.value.forEach((O) => {
3004
+ if (O[f]) {
3005
+ if (b(i, x(O)))
3006
+ m.push(O);
3007
+ else {
3008
+ const P = O[f].filter((D) => b(i, x(D)));
3009
+ P.length && m.push(S(S({}, O), {
3010
+ [f]: P
3011
+ }));
3012
+ }
3013
+ return;
3014
+ }
3015
+ b(i, x(O)) && m.push(O);
3016
+ }), m;
3017
+ }), Pl = (e, n) => {
3018
+ const o = G({
3019
+ values: /* @__PURE__ */ new Map(),
3020
+ options: /* @__PURE__ */ new Map()
3021
+ });
3022
+ return [R(() => {
3023
+ const {
3024
+ values: i,
3025
+ options: u
3026
+ } = o.value, a = e.value.map((s) => {
3027
+ var m;
3028
+ return s.label === void 0 ? S(S({}, s), {
3029
+ label: (m = i.get(s.value)) === null || m === void 0 ? void 0 : m.label
3030
+ }) : s;
3031
+ }), f = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
3032
+ return a.forEach((s) => {
3033
+ f.set(s.value, s), r.set(s.value, n.value.get(s.value) || u.get(s.value));
3034
+ }), o.value.values = f, o.value.options = r, a;
3035
+ }), (i) => n.value.get(i) || o.value.options.get(i)];
3036
+ }, Rl = ["inputValue"];
3037
+ function gn() {
3038
+ return S(S({}, fn()), {
3039
+ prefixCls: String,
3040
+ id: String,
3041
+ backfill: {
3042
+ type: Boolean,
3043
+ default: void 0
3044
+ },
3045
+ // >>> Field Names
3046
+ fieldNames: Object,
3047
+ // >>> Search
3048
+ /** @deprecated Use `searchValue` instead */
3049
+ inputValue: String,
3050
+ searchValue: String,
3051
+ onSearch: Function,
3052
+ autoClearSearchValue: {
3053
+ type: Boolean,
3054
+ default: void 0
3055
+ },
3056
+ // >>> Select
3057
+ onSelect: Function,
3058
+ onDeselect: Function,
3059
+ // >>> Options
3060
+ /**
3061
+ * In Select, `false` means do nothing.
3062
+ * In TreeSelect, `false` will highlight match item.
3063
+ * It's by design.
3064
+ */
3065
+ filterOption: {
3066
+ type: [Boolean, Function],
3067
+ default: void 0
3068
+ },
3069
+ filterSort: Function,
3070
+ optionFilterProp: String,
3071
+ optionLabelProp: String,
3072
+ options: Array,
3073
+ defaultActiveFirstOption: {
3074
+ type: Boolean,
3075
+ default: void 0
3076
+ },
3077
+ virtual: {
3078
+ type: Boolean,
3079
+ default: void 0
3080
+ },
3081
+ listHeight: Number,
3082
+ listItemHeight: Number,
3083
+ // >>> Icon
3084
+ menuItemSelectedIcon: A.any,
3085
+ mode: String,
3086
+ labelInValue: {
3087
+ type: Boolean,
3088
+ default: void 0
3089
+ },
3090
+ value: A.any,
3091
+ defaultValue: A.any,
3092
+ onChange: Function,
3093
+ children: Array
3094
+ });
3095
+ }
3096
+ function Dl(e) {
3097
+ return !e || typeof e != "object";
3098
+ }
3099
+ const Fl = ue({
3100
+ compatConfig: {
3101
+ MODE: 3
3102
+ },
3103
+ name: "VcSelect",
3104
+ inheritAttrs: !1,
3105
+ props: gt(gn(), {
3106
+ prefixCls: "vc-select",
3107
+ autoClearSearchValue: !0,
3108
+ listHeight: 200,
3109
+ listItemHeight: 20,
3110
+ dropdownMatchSelectWidth: !0
3111
+ }),
3112
+ setup(e, n) {
3113
+ let {
3114
+ expose: o,
3115
+ attrs: t,
3116
+ slots: l
3117
+ } = n;
3118
+ const i = $l(Ce(e, "id")), u = R(() => wt(e.mode)), a = R(() => !!(!e.options && e.children)), f = R(() => e.filterOption === void 0 && e.mode === "combobox" ? !1 : e.filterOption), r = R(() => on(e.fieldNames, a.value)), [s, m] = Lt("", {
3119
+ value: R(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
3120
+ postState: (h) => h || ""
3121
+ }), p = Cl(Ce(e, "options"), Ce(e, "children"), r), {
3122
+ valueOptions: w,
3123
+ labelOptions: b,
3124
+ options: x
3125
+ } = p, O = (h) => Ct(h).map((d) => {
3126
+ var F, E;
3127
+ let B, q, J, le;
3128
+ Dl(d) ? B = d : (J = d.key, q = d.label, B = (F = d.value) !== null && F !== void 0 ? F : J);
3129
+ const Z = w.value.get(B);
3130
+ return Z && (q === void 0 && (q = Z == null ? void 0 : Z[e.optionLabelProp || r.value.label]), J === void 0 && (J = (E = Z == null ? void 0 : Z.key) !== null && E !== void 0 ? E : B), le = Z == null ? void 0 : Z.disabled), {
3131
+ label: q,
3132
+ value: B,
3133
+ key: J,
3134
+ disabled: le,
3135
+ option: Z
3136
+ };
3137
+ }), [I, P] = Lt(e.defaultValue, {
3138
+ value: Ce(e, "value")
3139
+ }), D = R(() => {
3140
+ var h;
3141
+ const c = O(I.value);
3142
+ return e.mode === "combobox" && !(!((h = c[0]) === null || h === void 0) && h.value) ? [] : c;
3143
+ }), [C, v] = Pl(D, w), T = R(() => {
3144
+ if (!e.mode && C.value.length === 1) {
3145
+ const h = C.value[0];
3146
+ if (h.value === null && (h.label === null || h.label === void 0))
3147
+ return [];
3148
+ }
3149
+ return C.value.map((h) => {
3150
+ var c;
3151
+ return S(S({}, h), {
3152
+ label: (c = typeof h.label == "function" ? h.label() : h.label) !== null && c !== void 0 ? c : h.value
3153
+ });
3154
+ });
3155
+ }), $ = R(() => new Set(C.value.map((h) => h.value)));
3156
+ Me(() => {
3157
+ var h;
3158
+ if (e.mode === "combobox") {
3159
+ const c = (h = C.value[0]) === null || h === void 0 ? void 0 : h.value;
3160
+ c != null && m(String(c));
3161
+ }
3162
+ }, {
3163
+ flush: "post"
3164
+ });
3165
+ const N = (h, c) => {
3166
+ const d = c ?? h;
3167
+ return {
3168
+ [r.value.value]: h,
3169
+ [r.value.label]: d
3170
+ };
3171
+ }, V = G();
3172
+ Me(() => {
3173
+ if (e.mode !== "tags") {
3174
+ V.value = x.value;
3175
+ return;
3176
+ }
3177
+ const h = x.value.slice(), c = (d) => w.value.has(d);
3178
+ [...C.value].sort((d, F) => d.value < F.value ? -1 : 1).forEach((d) => {
3179
+ const F = d.value;
3180
+ c(F) || h.push(N(F, d.label));
3181
+ }), V.value = h;
3182
+ });
3183
+ const j = Ml(V, r, s, f, Ce(e, "optionFilterProp")), z = R(() => e.mode !== "tags" || !s.value || j.value.some((h) => h[e.optionFilterProp || "value"] === s.value) ? j.value : [N(s.value), ...j.value]), Q = R(() => e.filterSort ? [...z.value].sort((h, c) => e.filterSort(h, c)) : z.value), X = R(() => Eo(Q.value, {
3184
+ fieldNames: r.value,
3185
+ childrenAsData: a.value
3186
+ })), U = (h) => {
3187
+ const c = O(h);
3188
+ if (P(c), e.onChange && // Trigger event only when value changed
3189
+ (c.length !== C.value.length || c.some((d, F) => {
3190
+ var E;
3191
+ return ((E = C.value[F]) === null || E === void 0 ? void 0 : E.value) !== (d == null ? void 0 : d.value);
3192
+ }))) {
3193
+ const d = e.labelInValue ? c.map((E) => S(S({}, E), {
3194
+ originLabel: E.label,
3195
+ label: typeof E.label == "function" ? E.label() : E.label
3196
+ })) : c.map((E) => E.value), F = c.map((E) => ft(v(E.value)));
3197
+ e.onChange(
3198
+ // Value
3199
+ u.value ? d : d[0],
3200
+ // Option
3201
+ u.value ? F : F[0]
3202
+ );
3203
+ }
3204
+ }, [M, L] = Ht(null), [k, ee] = Ht(0), g = R(() => e.defaultActiveFirstOption !== void 0 ? e.defaultActiveFirstOption : e.mode !== "combobox"), H = function(h, c) {
3205
+ let {
3206
+ source: d = "keyboard"
3207
+ } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3208
+ ee(c), e.backfill && e.mode === "combobox" && h !== null && d === "keyboard" && L(String(h));
3209
+ }, W = (h, c) => {
3210
+ const d = () => {
3211
+ var F;
3212
+ const E = v(h), B = E == null ? void 0 : E[r.value.label];
3213
+ return [e.labelInValue ? {
3214
+ label: typeof B == "function" ? B() : B,
3215
+ originLabel: B,
3216
+ value: h,
3217
+ key: (F = E == null ? void 0 : E.key) !== null && F !== void 0 ? F : h
3218
+ } : h, ft(E)];
3219
+ };
3220
+ if (c && e.onSelect) {
3221
+ const [F, E] = d();
3222
+ e.onSelect(F, E);
3223
+ } else if (!c && e.onDeselect) {
3224
+ const [F, E] = d();
3225
+ e.onDeselect(F, E);
3226
+ }
3227
+ }, _ = (h, c) => {
3228
+ let d;
3229
+ const F = u.value ? c.selected : !0;
3230
+ F ? d = u.value ? [...C.value, h] : [h] : d = C.value.filter((E) => E.value !== h), U(d), W(h, F), e.mode === "combobox" ? L("") : (!u.value || e.autoClearSearchValue) && (m(""), L(""));
3231
+ }, te = (h, c) => {
3232
+ U(h), (c.type === "remove" || c.type === "clear") && c.values.forEach((d) => {
3233
+ W(d.value, !1);
3234
+ });
3235
+ }, oe = (h, c) => {
3236
+ var d;
3237
+ if (m(h), L(null), c.source === "submit") {
3238
+ const F = (h || "").trim();
3239
+ if (F) {
3240
+ const E = Array.from(/* @__PURE__ */ new Set([...$.value, F]));
3241
+ U(E), W(F, !0), m("");
3242
+ }
3243
+ return;
3244
+ }
3245
+ c.source !== "blur" && (e.mode === "combobox" && U(h), (d = e.onSearch) === null || d === void 0 || d.call(e, h));
3246
+ }, ae = (h) => {
3247
+ let c = h;
3248
+ e.mode !== "tags" && (c = h.map((F) => {
3249
+ const E = b.value.get(F);
3250
+ return E == null ? void 0 : E.value;
3251
+ }).filter((F) => F !== void 0));
3252
+ const d = Array.from(/* @__PURE__ */ new Set([...$.value, ...c]));
3253
+ U(d), d.forEach((F) => {
3254
+ W(F, !0);
3255
+ });
3256
+ }, ne = R(() => e.virtual !== !1 && e.dropdownMatchSelectWidth !== !1);
3257
+ hl(dn(S(S({}, p), {
3258
+ flattenOptions: X,
3259
+ onActiveValue: H,
3260
+ defaultActiveFirstOption: g,
3261
+ onSelect: _,
3262
+ menuItemSelectedIcon: Ce(e, "menuItemSelectedIcon"),
3263
+ rawValues: $,
3264
+ fieldNames: r,
3265
+ virtual: ne,
3266
+ listHeight: Ce(e, "listHeight"),
3267
+ listItemHeight: Ce(e, "listItemHeight"),
3268
+ childrenAsData: a
3269
+ }))), process.env.NODE_ENV !== "production" && Me(() => {
3270
+ El(e);
3271
+ }, {
3272
+ flush: "post"
3273
+ });
3274
+ const fe = ve();
3275
+ o({
3276
+ focus() {
3277
+ var h;
3278
+ (h = fe.value) === null || h === void 0 || h.focus();
3279
+ },
3280
+ blur() {
3281
+ var h;
3282
+ (h = fe.value) === null || h === void 0 || h.blur();
3283
+ },
3284
+ scrollTo(h) {
3285
+ var c;
3286
+ (c = fe.value) === null || c === void 0 || c.scrollTo(h);
3287
+ }
3288
+ });
3289
+ const me = R(() => Qe(e, [
3290
+ "id",
3291
+ "mode",
3292
+ "prefixCls",
3293
+ "backfill",
3294
+ "fieldNames",
3295
+ // Search
3296
+ "inputValue",
3297
+ "searchValue",
3298
+ "onSearch",
3299
+ "autoClearSearchValue",
3300
+ // Select
3301
+ "onSelect",
3302
+ "onDeselect",
3303
+ "dropdownMatchSelectWidth",
3304
+ // Options
3305
+ "filterOption",
3306
+ "filterSort",
3307
+ "optionFilterProp",
3308
+ "optionLabelProp",
3309
+ "options",
3310
+ "children",
3311
+ "defaultActiveFirstOption",
3312
+ "menuItemSelectedIcon",
3313
+ "virtual",
3314
+ "listHeight",
3315
+ "listItemHeight",
3316
+ // Value
3317
+ "value",
3318
+ "defaultValue",
3319
+ "labelInValue",
3320
+ "onChange"
3321
+ ]));
3322
+ return () => y(tl, Y(Y(Y({}, me.value), t), {}, {
3323
+ id: i,
3324
+ prefixCls: e.prefixCls,
3325
+ ref: fe,
3326
+ omitDomProps: Rl,
3327
+ mode: e.mode,
3328
+ displayValues: T.value,
3329
+ onDisplayValuesChange: te,
3330
+ searchValue: s.value,
3331
+ onSearch: oe,
3332
+ onSearchSplit: ae,
3333
+ dropdownMatchSelectWidth: e.dropdownMatchSelectWidth,
3334
+ OptionList: Sl,
3335
+ emptyOptions: !X.value.length,
3336
+ activeValue: M.value,
3337
+ activeDescendantId: `${i}_list_${k.value}`
3338
+ }), l);
3339
+ }
3340
+ }), xt = () => null;
3341
+ xt.isSelectOption = !0;
3342
+ xt.displayName = "ASelectOption";
3343
+ const Ot = () => null;
3344
+ Ot.isSelectOptGroup = !0;
3345
+ Ot.displayName = "ASelectOptGroup";
3346
+ var Nl = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, name: "down", theme: "outlined" };
3347
+ function Yt(e) {
3348
+ for (var n = 1; n < arguments.length; n++) {
3349
+ var o = arguments[n] != null ? Object(arguments[n]) : {}, t = Object.keys(o);
3350
+ typeof Object.getOwnPropertySymbols == "function" && (t = t.concat(Object.getOwnPropertySymbols(o).filter(function(l) {
3351
+ return Object.getOwnPropertyDescriptor(o, l).enumerable;
3352
+ }))), t.forEach(function(l) {
3353
+ Al(e, l, o[l]);
3354
+ });
3355
+ }
3356
+ return e;
3357
+ }
3358
+ function Al(e, n, o) {
3359
+ return n in e ? Object.defineProperty(e, n, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = o, e;
3360
+ }
3361
+ var $t = function(n, o) {
3362
+ var t = Yt({}, n, o.attrs);
3363
+ return y(no, Yt({}, t, {
3364
+ icon: Nl
3365
+ }), null);
3366
+ };
3367
+ $t.displayName = "DownOutlined";
3368
+ $t.inheritAttrs = !1;
3369
+ function Vl(e) {
3370
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3371
+ const {
3372
+ loading: o,
3373
+ multiple: t,
3374
+ prefixCls: l,
3375
+ hasFeedback: i,
3376
+ feedbackIcon: u,
3377
+ showArrow: a
3378
+ } = e, f = e.suffixIcon || n.suffixIcon && n.suffixIcon(), r = e.clearIcon || n.clearIcon && n.clearIcon(), s = e.menuItemSelectedIcon || n.menuItemSelectedIcon && n.menuItemSelectedIcon(), m = e.removeIcon || n.removeIcon && n.removeIcon(), p = r ?? y(oo, null, null), w = (I) => y(Be, null, [a !== !1 && I, i && u]);
3379
+ let b = null;
3380
+ if (f !== void 0)
3381
+ b = w(f);
3382
+ else if (o)
3383
+ b = w(y(lo, {
3384
+ spin: !0
3385
+ }, null));
3386
+ else {
3387
+ const I = `${l}-suffix`;
3388
+ b = (P) => {
3389
+ let {
3390
+ open: D,
3391
+ showSearch: C
3392
+ } = P;
3393
+ return w(D && C ? y(Oo, {
3394
+ class: I
3395
+ }, null) : y($t, {
3396
+ class: I
3397
+ }, null));
3398
+ };
3399
+ }
3400
+ let x = null;
3401
+ s !== void 0 ? x = s : t ? x = y(io, null, null) : x = null;
3402
+ let O = null;
3403
+ return m !== void 0 ? O = m : O = y(ao, null, null), {
3404
+ clearIcon: p,
3405
+ suffixIcon: b,
3406
+ itemIcon: x,
3407
+ removeIcon: O
3408
+ };
3409
+ }
3410
+ const Ll = new ce("antMoveDownIn", {
3411
+ "0%": {
3412
+ transform: "translate3d(0, 100%, 0)",
3413
+ transformOrigin: "0 0",
3414
+ opacity: 0
3415
+ },
3416
+ "100%": {
3417
+ transform: "translate3d(0, 0, 0)",
3418
+ transformOrigin: "0 0",
3419
+ opacity: 1
3420
+ }
3421
+ }), Hl = new ce("antMoveDownOut", {
3422
+ "0%": {
3423
+ transform: "translate3d(0, 0, 0)",
3424
+ transformOrigin: "0 0",
3425
+ opacity: 1
3426
+ },
3427
+ "100%": {
3428
+ transform: "translate3d(0, 100%, 0)",
3429
+ transformOrigin: "0 0",
3430
+ opacity: 0
3431
+ }
3432
+ }), _l = new ce("antMoveLeftIn", {
3433
+ "0%": {
3434
+ transform: "translate3d(-100%, 0, 0)",
3435
+ transformOrigin: "0 0",
3436
+ opacity: 0
3437
+ },
3438
+ "100%": {
3439
+ transform: "translate3d(0, 0, 0)",
3440
+ transformOrigin: "0 0",
3441
+ opacity: 1
3442
+ }
3443
+ }), Bl = new ce("antMoveLeftOut", {
3444
+ "0%": {
3445
+ transform: "translate3d(0, 0, 0)",
3446
+ transformOrigin: "0 0",
3447
+ opacity: 1
3448
+ },
3449
+ "100%": {
3450
+ transform: "translate3d(-100%, 0, 0)",
3451
+ transformOrigin: "0 0",
3452
+ opacity: 0
3453
+ }
3454
+ }), zl = new ce("antMoveRightIn", {
3455
+ "0%": {
3456
+ transform: "translate3d(100%, 0, 0)",
3457
+ transformOrigin: "0 0",
3458
+ opacity: 0
3459
+ },
3460
+ "100%": {
3461
+ transform: "translate3d(0, 0, 0)",
3462
+ transformOrigin: "0 0",
3463
+ opacity: 1
3464
+ }
3465
+ }), Kl = new ce("antMoveRightOut", {
3466
+ "0%": {
3467
+ transform: "translate3d(0, 0, 0)",
3468
+ transformOrigin: "0 0",
3469
+ opacity: 1
3470
+ },
3471
+ "100%": {
3472
+ transform: "translate3d(100%, 0, 0)",
3473
+ transformOrigin: "0 0",
3474
+ opacity: 0
3475
+ }
3476
+ }), Wl = new ce("antMoveUpIn", {
3477
+ "0%": {
3478
+ transform: "translate3d(0, -100%, 0)",
3479
+ transformOrigin: "0 0",
3480
+ opacity: 0
3481
+ },
3482
+ "100%": {
3483
+ transform: "translate3d(0, 0, 0)",
3484
+ transformOrigin: "0 0",
3485
+ opacity: 1
3486
+ }
3487
+ }), jl = new ce("antMoveUpOut", {
3488
+ "0%": {
3489
+ transform: "translate3d(0, 0, 0)",
3490
+ transformOrigin: "0 0",
3491
+ opacity: 1
3492
+ },
3493
+ "100%": {
3494
+ transform: "translate3d(0, -100%, 0)",
3495
+ transformOrigin: "0 0",
3496
+ opacity: 0
3497
+ }
3498
+ }), Ul = {
3499
+ "move-up": {
3500
+ inKeyframes: Wl,
3501
+ outKeyframes: jl
3502
+ },
3503
+ "move-down": {
3504
+ inKeyframes: Ll,
3505
+ outKeyframes: Hl
3506
+ },
3507
+ "move-left": {
3508
+ inKeyframes: _l,
3509
+ outKeyframes: Bl
3510
+ },
3511
+ "move-right": {
3512
+ inKeyframes: zl,
3513
+ outKeyframes: Kl
3514
+ }
3515
+ }, Gt = (e, n) => {
3516
+ const {
3517
+ antCls: o
3518
+ } = e, t = `${o}-${n}`, {
3519
+ inKeyframes: l,
3520
+ outKeyframes: i
3521
+ } = Ul[n];
3522
+ return [tn(t, l, i, e.motionDurationMid), {
3523
+ [`
3524
+ ${t}-enter,
3525
+ ${t}-appear
3526
+ `]: {
3527
+ opacity: 0,
3528
+ animationTimingFunction: e.motionEaseOutCirc
3529
+ },
3530
+ [`${t}-leave`]: {
3531
+ animationTimingFunction: e.motionEaseInOutCirc
3532
+ }
3533
+ }];
3534
+ }, hn = new ce("antSlideUpIn", {
3535
+ "0%": {
3536
+ transform: "scaleY(0.8)",
3537
+ transformOrigin: "0% 0%",
3538
+ opacity: 0
3539
+ },
3540
+ "100%": {
3541
+ transform: "scaleY(1)",
3542
+ transformOrigin: "0% 0%",
3543
+ opacity: 1
3544
+ }
3545
+ }), bn = new ce("antSlideUpOut", {
3546
+ "0%": {
3547
+ transform: "scaleY(1)",
3548
+ transformOrigin: "0% 0%",
3549
+ opacity: 1
3550
+ },
3551
+ "100%": {
3552
+ transform: "scaleY(0.8)",
3553
+ transformOrigin: "0% 0%",
3554
+ opacity: 0
3555
+ }
3556
+ }), yn = new ce("antSlideDownIn", {
3557
+ "0%": {
3558
+ transform: "scaleY(0.8)",
3559
+ transformOrigin: "100% 100%",
3560
+ opacity: 0
3561
+ },
3562
+ "100%": {
3563
+ transform: "scaleY(1)",
3564
+ transformOrigin: "100% 100%",
3565
+ opacity: 1
3566
+ }
3567
+ }), Sn = new ce("antSlideDownOut", {
3568
+ "0%": {
3569
+ transform: "scaleY(1)",
3570
+ transformOrigin: "100% 100%",
3571
+ opacity: 1
3572
+ },
3573
+ "100%": {
3574
+ transform: "scaleY(0.8)",
3575
+ transformOrigin: "100% 100%",
3576
+ opacity: 0
3577
+ }
3578
+ }), Yl = new ce("antSlideLeftIn", {
3579
+ "0%": {
3580
+ transform: "scaleX(0.8)",
3581
+ transformOrigin: "0% 0%",
3582
+ opacity: 0
3583
+ },
3584
+ "100%": {
3585
+ transform: "scaleX(1)",
3586
+ transformOrigin: "0% 0%",
3587
+ opacity: 1
3588
+ }
3589
+ }), Gl = new ce("antSlideLeftOut", {
3590
+ "0%": {
3591
+ transform: "scaleX(1)",
3592
+ transformOrigin: "0% 0%",
3593
+ opacity: 1
3594
+ },
3595
+ "100%": {
3596
+ transform: "scaleX(0.8)",
3597
+ transformOrigin: "0% 0%",
3598
+ opacity: 0
3599
+ }
3600
+ }), Xl = new ce("antSlideRightIn", {
3601
+ "0%": {
3602
+ transform: "scaleX(0.8)",
3603
+ transformOrigin: "100% 0%",
3604
+ opacity: 0
3605
+ },
3606
+ "100%": {
3607
+ transform: "scaleX(1)",
3608
+ transformOrigin: "100% 0%",
3609
+ opacity: 1
3610
+ }
3611
+ }), kl = new ce("antSlideRightOut", {
3612
+ "0%": {
3613
+ transform: "scaleX(1)",
3614
+ transformOrigin: "100% 0%",
3615
+ opacity: 1
3616
+ },
3617
+ "100%": {
3618
+ transform: "scaleX(0.8)",
3619
+ transformOrigin: "100% 0%",
3620
+ opacity: 0
3621
+ }
3622
+ }), ql = {
3623
+ "slide-up": {
3624
+ inKeyframes: hn,
3625
+ outKeyframes: bn
3626
+ },
3627
+ "slide-down": {
3628
+ inKeyframes: yn,
3629
+ outKeyframes: Sn
3630
+ },
3631
+ "slide-left": {
3632
+ inKeyframes: Yl,
3633
+ outKeyframes: Gl
3634
+ },
3635
+ "slide-right": {
3636
+ inKeyframes: Xl,
3637
+ outKeyframes: kl
3638
+ }
3639
+ }, Xt = (e, n) => {
3640
+ const {
3641
+ antCls: o
3642
+ } = e, t = `${o}-${n}`, {
3643
+ inKeyframes: l,
3644
+ outKeyframes: i
3645
+ } = ql[n];
3646
+ return [tn(t, l, i, e.motionDurationMid), {
3647
+ [`
3648
+ ${t}-enter,
3649
+ ${t}-appear
3650
+ `]: {
3651
+ transform: "scale(0)",
3652
+ transformOrigin: "0% 0%",
3653
+ opacity: 0,
3654
+ animationTimingFunction: e.motionEaseOutQuint
3655
+ },
3656
+ [`${t}-leave`]: {
3657
+ animationTimingFunction: e.motionEaseInQuint
3658
+ }
3659
+ }];
3660
+ }, kt = (e) => {
3661
+ const {
3662
+ controlPaddingHorizontal: n
3663
+ } = e;
3664
+ return {
3665
+ position: "relative",
3666
+ display: "block",
3667
+ minHeight: e.controlHeight,
3668
+ padding: `${(e.controlHeight - e.fontSize * e.lineHeight) / 2}px ${n}px`,
3669
+ color: e.colorText,
3670
+ fontWeight: "normal",
3671
+ fontSize: e.fontSize,
3672
+ lineHeight: e.lineHeight,
3673
+ boxSizing: "border-box"
3674
+ };
3675
+ }, Ql = (e) => {
3676
+ const {
3677
+ antCls: n,
3678
+ componentCls: o
3679
+ } = e, t = `${o}-item`;
3680
+ return [
3681
+ {
3682
+ [`${o}-dropdown`]: S(S({}, ht(e)), {
3683
+ position: "absolute",
3684
+ top: -9999,
3685
+ zIndex: e.zIndexPopup,
3686
+ boxSizing: "border-box",
3687
+ padding: e.paddingXXS,
3688
+ overflow: "hidden",
3689
+ fontSize: e.fontSize,
3690
+ // Fix select render lag of long text in chrome
3691
+ // https://github.com/ant-design/ant-design/issues/11456
3692
+ // https://github.com/ant-design/ant-design/issues/11843
3693
+ fontVariant: "initial",
3694
+ backgroundColor: e.colorBgElevated,
3695
+ borderRadius: e.borderRadiusLG,
3696
+ outline: "none",
3697
+ boxShadow: e.boxShadowSecondary,
3698
+ [`
3699
+ &${n}-slide-up-enter${n}-slide-up-enter-active${o}-dropdown-placement-bottomLeft,
3700
+ &${n}-slide-up-appear${n}-slide-up-appear-active${o}-dropdown-placement-bottomLeft
3701
+ `]: {
3702
+ animationName: hn
3703
+ },
3704
+ [`
3705
+ &${n}-slide-up-enter${n}-slide-up-enter-active${o}-dropdown-placement-topLeft,
3706
+ &${n}-slide-up-appear${n}-slide-up-appear-active${o}-dropdown-placement-topLeft
3707
+ `]: {
3708
+ animationName: yn
3709
+ },
3710
+ [`&${n}-slide-up-leave${n}-slide-up-leave-active${o}-dropdown-placement-bottomLeft`]: {
3711
+ animationName: bn
3712
+ },
3713
+ [`&${n}-slide-up-leave${n}-slide-up-leave-active${o}-dropdown-placement-topLeft`]: {
3714
+ animationName: Sn
3715
+ },
3716
+ "&-hidden": {
3717
+ display: "none"
3718
+ },
3719
+ "&-empty": {
3720
+ color: e.colorTextDisabled
3721
+ },
3722
+ // ========================= Options =========================
3723
+ [`${t}-empty`]: S(S({}, kt(e)), {
3724
+ color: e.colorTextDisabled
3725
+ }),
3726
+ [`${t}`]: S(S({}, kt(e)), {
3727
+ cursor: "pointer",
3728
+ transition: `background ${e.motionDurationSlow} ease`,
3729
+ borderRadius: e.borderRadiusSM,
3730
+ // =========== Group ============
3731
+ "&-group": {
3732
+ color: e.colorTextDescription,
3733
+ fontSize: e.fontSizeSM,
3734
+ cursor: "default"
3735
+ },
3736
+ // =========== Option ===========
3737
+ "&-option": {
3738
+ display: "flex",
3739
+ "&-content": S({
3740
+ flex: "auto"
3741
+ }, dt),
3742
+ "&-state": {
3743
+ flex: "none"
3744
+ },
3745
+ [`&-active:not(${t}-option-disabled)`]: {
3746
+ backgroundColor: e.controlItemBgHover
3747
+ },
3748
+ [`&-selected:not(${t}-option-disabled)`]: {
3749
+ color: e.colorText,
3750
+ fontWeight: e.fontWeightStrong,
3751
+ backgroundColor: e.controlItemBgActive,
3752
+ [`${t}-option-state`]: {
3753
+ color: e.colorPrimary
3754
+ }
3755
+ },
3756
+ "&-disabled": {
3757
+ [`&${t}-option-selected`]: {
3758
+ backgroundColor: e.colorBgContainerDisabled
3759
+ },
3760
+ color: e.colorTextDisabled,
3761
+ cursor: "not-allowed"
3762
+ },
3763
+ "&-grouped": {
3764
+ paddingInlineStart: e.controlPaddingHorizontal * 2
3765
+ }
3766
+ }
3767
+ }),
3768
+ // =========================== RTL ===========================
3769
+ "&-rtl": {
3770
+ direction: "rtl"
3771
+ }
3772
+ })
3773
+ },
3774
+ // Follow code may reuse in other components
3775
+ Xt(e, "slide-up"),
3776
+ Xt(e, "slide-down"),
3777
+ Gt(e, "move-up"),
3778
+ Gt(e, "move-down")
3779
+ ];
3780
+ }, Ne = 2;
3781
+ function wn(e) {
3782
+ let {
3783
+ controlHeightSM: n,
3784
+ controlHeight: o,
3785
+ lineWidth: t
3786
+ } = e;
3787
+ const l = (o - n) / 2 - t, i = Math.ceil(l / 2);
3788
+ return [l, i];
3789
+ }
3790
+ function st(e, n) {
3791
+ const {
3792
+ componentCls: o,
3793
+ iconCls: t
3794
+ } = e, l = `${o}-selection-overflow`, i = e.controlHeightSM, [u] = wn(e), a = n ? `${o}-${n}` : "";
3795
+ return {
3796
+ [`${o}-multiple${a}`]: {
3797
+ fontSize: e.fontSize,
3798
+ /**
3799
+ * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
3800
+ * may update to redesign with its align logic.
3801
+ */
3802
+ // =========================== Overflow ===========================
3803
+ [l]: {
3804
+ position: "relative",
3805
+ display: "flex",
3806
+ flex: "auto",
3807
+ flexWrap: "wrap",
3808
+ maxWidth: "100%",
3809
+ "&-item": {
3810
+ flex: "none",
3811
+ alignSelf: "center",
3812
+ maxWidth: "100%",
3813
+ display: "inline-flex"
3814
+ }
3815
+ },
3816
+ // ========================= Selector =========================
3817
+ [`${o}-selector`]: {
3818
+ display: "flex",
3819
+ flexWrap: "wrap",
3820
+ alignItems: "center",
3821
+ // Multiple is little different that horizontal is follow the vertical
3822
+ padding: `${u - Ne}px ${Ne * 2}px`,
3823
+ borderRadius: e.borderRadius,
3824
+ [`${o}-show-search&`]: {
3825
+ cursor: "text"
3826
+ },
3827
+ [`${o}-disabled&`]: {
3828
+ background: e.colorBgContainerDisabled,
3829
+ cursor: "not-allowed"
3830
+ },
3831
+ "&:after": {
3832
+ display: "inline-block",
3833
+ width: 0,
3834
+ margin: `${Ne}px 0`,
3835
+ lineHeight: `${i}px`,
3836
+ content: '"\\a0"'
3837
+ }
3838
+ },
3839
+ [`
3840
+ &${o}-show-arrow ${o}-selector,
3841
+ &${o}-allow-clear ${o}-selector
3842
+ `]: {
3843
+ paddingInlineEnd: e.fontSizeIcon + e.controlPaddingHorizontal
3844
+ },
3845
+ // ======================== Selections ========================
3846
+ [`${o}-selection-item`]: {
3847
+ position: "relative",
3848
+ display: "flex",
3849
+ flex: "none",
3850
+ boxSizing: "border-box",
3851
+ maxWidth: "100%",
3852
+ height: i,
3853
+ marginTop: Ne,
3854
+ marginBottom: Ne,
3855
+ lineHeight: `${i - e.lineWidth * 2}px`,
3856
+ background: e.colorFillSecondary,
3857
+ border: `${e.lineWidth}px solid ${e.colorSplit}`,
3858
+ borderRadius: e.borderRadiusSM,
3859
+ cursor: "default",
3860
+ transition: `font-size ${e.motionDurationSlow}, line-height ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,
3861
+ userSelect: "none",
3862
+ marginInlineEnd: Ne * 2,
3863
+ paddingInlineStart: e.paddingXS,
3864
+ paddingInlineEnd: e.paddingXS / 2,
3865
+ [`${o}-disabled&`]: {
3866
+ color: e.colorTextDisabled,
3867
+ borderColor: e.colorBorder,
3868
+ cursor: "not-allowed"
3869
+ },
3870
+ // It's ok not to do this, but 24px makes bottom narrow in view should adjust
3871
+ "&-content": {
3872
+ display: "inline-block",
3873
+ marginInlineEnd: e.paddingXS / 2,
3874
+ overflow: "hidden",
3875
+ whiteSpace: "pre",
3876
+ textOverflow: "ellipsis"
3877
+ },
3878
+ "&-remove": S(S({}, nn()), {
3879
+ display: "inline-block",
3880
+ color: e.colorIcon,
3881
+ fontWeight: "bold",
3882
+ fontSize: 10,
3883
+ lineHeight: "inherit",
3884
+ cursor: "pointer",
3885
+ [`> ${t}`]: {
3886
+ verticalAlign: "-0.2em"
3887
+ },
3888
+ "&:hover": {
3889
+ color: e.colorIconHover
3890
+ }
3891
+ })
3892
+ },
3893
+ // ========================== Input ==========================
3894
+ [`${l}-item + ${l}-item`]: {
3895
+ [`${o}-selection-search`]: {
3896
+ marginInlineStart: 0
3897
+ }
3898
+ },
3899
+ [`${o}-selection-search`]: {
3900
+ display: "inline-flex",
3901
+ position: "relative",
3902
+ maxWidth: "100%",
3903
+ marginInlineStart: e.inputPaddingHorizontalBase - u,
3904
+ "\n &-input,\n &-mirror\n ": {
3905
+ height: i,
3906
+ fontFamily: e.fontFamily,
3907
+ lineHeight: `${i}px`,
3908
+ transition: `all ${e.motionDurationSlow}`
3909
+ },
3910
+ "&-input": {
3911
+ width: "100%",
3912
+ minWidth: 4.1
3913
+ // fix search cursor missing
3914
+ },
3915
+ "&-mirror": {
3916
+ position: "absolute",
3917
+ top: 0,
3918
+ insetInlineStart: 0,
3919
+ insetInlineEnd: "auto",
3920
+ zIndex: 999,
3921
+ whiteSpace: "pre",
3922
+ visibility: "hidden"
3923
+ }
3924
+ },
3925
+ // ======================= Placeholder =======================
3926
+ [`${o}-selection-placeholder `]: {
3927
+ position: "absolute",
3928
+ top: "50%",
3929
+ insetInlineStart: e.inputPaddingHorizontalBase,
3930
+ insetInlineEnd: e.inputPaddingHorizontalBase,
3931
+ transform: "translateY(-50%)",
3932
+ transition: `all ${e.motionDurationSlow}`
3933
+ }
3934
+ }
3935
+ };
3936
+ }
3937
+ function Jl(e) {
3938
+ const {
3939
+ componentCls: n
3940
+ } = e, o = $e(e, {
3941
+ controlHeight: e.controlHeightSM,
3942
+ controlHeightSM: e.controlHeightXS,
3943
+ borderRadius: e.borderRadiusSM,
3944
+ borderRadiusSM: e.borderRadiusXS
3945
+ }), [, t] = wn(e);
3946
+ return [
3947
+ st(e),
3948
+ // ======================== Small ========================
3949
+ // Shared
3950
+ st(o, "sm"),
3951
+ // Padding
3952
+ {
3953
+ [`${n}-multiple${n}-sm`]: {
3954
+ [`${n}-selection-placeholder`]: {
3955
+ insetInlineStart: e.controlPaddingHorizontalSM - e.lineWidth,
3956
+ insetInlineEnd: "auto"
3957
+ },
3958
+ // https://github.com/ant-design/ant-design/issues/29559
3959
+ [`${n}-selection-search`]: {
3960
+ marginInlineStart: t
3961
+ }
3962
+ }
3963
+ },
3964
+ // ======================== Large ========================
3965
+ // Shared
3966
+ st($e(e, {
3967
+ fontSize: e.fontSizeLG,
3968
+ controlHeight: e.controlHeightLG,
3969
+ controlHeightSM: e.controlHeight,
3970
+ borderRadius: e.borderRadiusLG,
3971
+ borderRadiusSM: e.borderRadius
3972
+ }), "lg")
3973
+ ];
3974
+ }
3975
+ function ut(e, n) {
3976
+ const {
3977
+ componentCls: o,
3978
+ inputPaddingHorizontalBase: t,
3979
+ borderRadius: l
3980
+ } = e, i = e.controlHeight - e.lineWidth * 2, u = Math.ceil(e.fontSize * 1.25), a = n ? `${o}-${n}` : "";
3981
+ return {
3982
+ [`${o}-single${a}`]: {
3983
+ fontSize: e.fontSize,
3984
+ // ========================= Selector =========================
3985
+ [`${o}-selector`]: S(S({}, ht(e)), {
3986
+ display: "flex",
3987
+ borderRadius: l,
3988
+ [`${o}-selection-search`]: {
3989
+ position: "absolute",
3990
+ top: 0,
3991
+ insetInlineStart: t,
3992
+ insetInlineEnd: t,
3993
+ bottom: 0,
3994
+ "&-input": {
3995
+ width: "100%"
3996
+ }
3997
+ },
3998
+ [`
3999
+ ${o}-selection-item,
4000
+ ${o}-selection-placeholder
4001
+ `]: {
4002
+ padding: 0,
4003
+ lineHeight: `${i}px`,
4004
+ transition: `all ${e.motionDurationSlow}`,
4005
+ // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
4006
+ "@supports (-moz-appearance: meterbar)": {
4007
+ lineHeight: `${i}px`
4008
+ }
4009
+ },
4010
+ [`${o}-selection-item`]: {
4011
+ position: "relative",
4012
+ userSelect: "none"
4013
+ },
4014
+ [`${o}-selection-placeholder`]: {
4015
+ transition: "none",
4016
+ pointerEvents: "none"
4017
+ },
4018
+ // For common baseline align
4019
+ [[
4020
+ "&:after",
4021
+ /* For '' value baseline align */
4022
+ `${o}-selection-item:after`,
4023
+ /* For undefined value baseline align */
4024
+ `${o}-selection-placeholder:after`
4025
+ ].join(",")]: {
4026
+ display: "inline-block",
4027
+ width: 0,
4028
+ visibility: "hidden",
4029
+ content: '"\\a0"'
4030
+ }
4031
+ }),
4032
+ [`
4033
+ &${o}-show-arrow ${o}-selection-item,
4034
+ &${o}-show-arrow ${o}-selection-placeholder
4035
+ `]: {
4036
+ paddingInlineEnd: u
4037
+ },
4038
+ // Opacity selection if open
4039
+ [`&${o}-open ${o}-selection-item`]: {
4040
+ color: e.colorTextPlaceholder
4041
+ },
4042
+ // ========================== Input ==========================
4043
+ // We only change the style of non-customize input which is only support by `combobox` mode.
4044
+ // Not customize
4045
+ [`&:not(${o}-customize-input)`]: {
4046
+ [`${o}-selector`]: {
4047
+ width: "100%",
4048
+ height: e.controlHeight,
4049
+ padding: `0 ${t}px`,
4050
+ [`${o}-selection-search-input`]: {
4051
+ height: i
4052
+ },
4053
+ "&:after": {
4054
+ lineHeight: `${i}px`
4055
+ }
4056
+ }
4057
+ },
4058
+ [`&${o}-customize-input`]: {
4059
+ [`${o}-selector`]: {
4060
+ "&:after": {
4061
+ display: "none"
4062
+ },
4063
+ [`${o}-selection-search`]: {
4064
+ position: "static",
4065
+ width: "100%"
4066
+ },
4067
+ [`${o}-selection-placeholder`]: {
4068
+ position: "absolute",
4069
+ insetInlineStart: 0,
4070
+ insetInlineEnd: 0,
4071
+ padding: `0 ${t}px`,
4072
+ "&:after": {
4073
+ display: "none"
4074
+ }
4075
+ }
4076
+ }
4077
+ }
4078
+ }
4079
+ };
4080
+ }
4081
+ function Zl(e) {
4082
+ const {
4083
+ componentCls: n
4084
+ } = e, o = e.controlPaddingHorizontalSM - e.lineWidth;
4085
+ return [
4086
+ ut(e),
4087
+ // ======================== Small ========================
4088
+ // Shared
4089
+ ut($e(e, {
4090
+ controlHeight: e.controlHeightSM,
4091
+ borderRadius: e.borderRadiusSM
4092
+ }), "sm"),
4093
+ // padding
4094
+ {
4095
+ [`${n}-single${n}-sm`]: {
4096
+ [`&:not(${n}-customize-input)`]: {
4097
+ [`${n}-selection-search`]: {
4098
+ insetInlineStart: o,
4099
+ insetInlineEnd: o
4100
+ },
4101
+ [`${n}-selector`]: {
4102
+ padding: `0 ${o}px`
4103
+ },
4104
+ // With arrow should provides `padding-right` to show the arrow
4105
+ [`&${n}-show-arrow ${n}-selection-search`]: {
4106
+ insetInlineEnd: o + e.fontSize * 1.5
4107
+ },
4108
+ [`
4109
+ &${n}-show-arrow ${n}-selection-item,
4110
+ &${n}-show-arrow ${n}-selection-placeholder
4111
+ `]: {
4112
+ paddingInlineEnd: e.fontSize * 1.5
4113
+ }
4114
+ }
4115
+ }
4116
+ },
4117
+ // ======================== Large ========================
4118
+ // Shared
4119
+ ut($e(e, {
4120
+ controlHeight: e.controlHeightLG,
4121
+ fontSize: e.fontSizeLG,
4122
+ borderRadius: e.borderRadiusLG
4123
+ }), "lg")
4124
+ ];
4125
+ }
4126
+ const ei = (e) => {
4127
+ const {
4128
+ componentCls: n
4129
+ } = e;
4130
+ return {
4131
+ position: "relative",
4132
+ backgroundColor: e.colorBgContainer,
4133
+ border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
4134
+ transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
4135
+ input: {
4136
+ cursor: "pointer"
4137
+ },
4138
+ [`${n}-show-search&`]: {
4139
+ cursor: "text",
4140
+ input: {
4141
+ cursor: "auto",
4142
+ color: "inherit"
4143
+ }
4144
+ },
4145
+ [`${n}-disabled&`]: {
4146
+ color: e.colorTextDisabled,
4147
+ background: e.colorBgContainerDisabled,
4148
+ cursor: "not-allowed",
4149
+ [`${n}-multiple&`]: {
4150
+ background: e.colorBgContainerDisabled
4151
+ },
4152
+ input: {
4153
+ cursor: "not-allowed"
4154
+ }
4155
+ }
4156
+ };
4157
+ }, ct = function(e, n) {
4158
+ let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
4159
+ const {
4160
+ componentCls: t,
4161
+ borderHoverColor: l,
4162
+ outlineColor: i,
4163
+ antCls: u
4164
+ } = n, a = o ? {
4165
+ [`${t}-selector`]: {
4166
+ borderColor: l
4167
+ }
4168
+ } : {};
4169
+ return {
4170
+ [e]: {
4171
+ [`&:not(${t}-disabled):not(${t}-customize-input):not(${u}-pagination-size-changer)`]: S(S({}, a), {
4172
+ [`${t}-focused& ${t}-selector`]: {
4173
+ borderColor: l,
4174
+ boxShadow: `0 0 0 ${n.controlOutlineWidth}px ${i}`,
4175
+ borderInlineEndWidth: `${n.controlLineWidth}px !important`,
4176
+ outline: 0
4177
+ },
4178
+ [`&:hover ${t}-selector`]: {
4179
+ borderColor: l,
4180
+ borderInlineEndWidth: `${n.controlLineWidth}px !important`
4181
+ }
4182
+ })
4183
+ }
4184
+ };
4185
+ }, ti = (e) => {
4186
+ const {
4187
+ componentCls: n
4188
+ } = e;
4189
+ return {
4190
+ [`${n}-selection-search-input`]: {
4191
+ margin: 0,
4192
+ padding: 0,
4193
+ background: "transparent",
4194
+ border: "none",
4195
+ outline: "none",
4196
+ appearance: "none",
4197
+ "&::-webkit-search-cancel-button": {
4198
+ display: "none",
4199
+ "-webkit-appearance": "none"
4200
+ }
4201
+ }
4202
+ };
4203
+ }, ni = (e) => {
4204
+ const {
4205
+ componentCls: n,
4206
+ inputPaddingHorizontalBase: o,
4207
+ iconCls: t
4208
+ } = e;
4209
+ return {
4210
+ [n]: S(S({}, ht(e)), {
4211
+ position: "relative",
4212
+ display: "inline-block",
4213
+ cursor: "pointer",
4214
+ [`&:not(${n}-customize-input) ${n}-selector`]: S(S({}, ei(e)), ti(e)),
4215
+ // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
4216
+ // ...genHoverStyle(token),
4217
+ // },
4218
+ // ======================== Selection ========================
4219
+ [`${n}-selection-item`]: S({
4220
+ flex: 1,
4221
+ fontWeight: "normal"
4222
+ }, dt),
4223
+ // ======================= Placeholder =======================
4224
+ [`${n}-selection-placeholder`]: S(S({}, dt), {
4225
+ flex: 1,
4226
+ color: e.colorTextPlaceholder,
4227
+ pointerEvents: "none"
4228
+ }),
4229
+ // ========================== Arrow ==========================
4230
+ [`${n}-arrow`]: S(S({}, nn()), {
4231
+ position: "absolute",
4232
+ top: "50%",
4233
+ insetInlineStart: "auto",
4234
+ insetInlineEnd: o,
4235
+ height: e.fontSizeIcon,
4236
+ marginTop: -e.fontSizeIcon / 2,
4237
+ color: e.colorTextQuaternary,
4238
+ fontSize: e.fontSizeIcon,
4239
+ lineHeight: 1,
4240
+ textAlign: "center",
4241
+ pointerEvents: "none",
4242
+ display: "flex",
4243
+ alignItems: "center",
4244
+ [t]: {
4245
+ verticalAlign: "top",
4246
+ transition: `transform ${e.motionDurationSlow}`,
4247
+ "> svg": {
4248
+ verticalAlign: "top"
4249
+ },
4250
+ [`&:not(${n}-suffix)`]: {
4251
+ pointerEvents: "auto"
4252
+ }
4253
+ },
4254
+ [`${n}-disabled &`]: {
4255
+ cursor: "not-allowed"
4256
+ },
4257
+ "> *:not(:last-child)": {
4258
+ marginInlineEnd: 8
4259
+ // FIXME: magic
4260
+ }
4261
+ }),
4262
+ // ========================== Clear ==========================
4263
+ [`${n}-clear`]: {
4264
+ position: "absolute",
4265
+ top: "50%",
4266
+ insetInlineStart: "auto",
4267
+ insetInlineEnd: o,
4268
+ zIndex: 1,
4269
+ display: "inline-block",
4270
+ width: e.fontSizeIcon,
4271
+ height: e.fontSizeIcon,
4272
+ marginTop: -e.fontSizeIcon / 2,
4273
+ color: e.colorTextQuaternary,
4274
+ fontSize: e.fontSizeIcon,
4275
+ fontStyle: "normal",
4276
+ lineHeight: 1,
4277
+ textAlign: "center",
4278
+ textTransform: "none",
4279
+ background: e.colorBgContainer,
4280
+ cursor: "pointer",
4281
+ opacity: 0,
4282
+ transition: `color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,
4283
+ textRendering: "auto",
4284
+ "&:before": {
4285
+ display: "block"
4286
+ },
4287
+ "&:hover": {
4288
+ color: e.colorTextTertiary
4289
+ }
4290
+ },
4291
+ "&:hover": {
4292
+ [`${n}-clear`]: {
4293
+ opacity: 1
4294
+ }
4295
+ }
4296
+ }),
4297
+ // ========================= Feedback ==========================
4298
+ [`${n}-has-feedback`]: {
4299
+ [`${n}-clear`]: {
4300
+ insetInlineEnd: o + e.fontSize + e.paddingXXS
4301
+ }
4302
+ }
4303
+ };
4304
+ }, oi = (e) => {
4305
+ const {
4306
+ componentCls: n
4307
+ } = e;
4308
+ return [
4309
+ {
4310
+ [n]: {
4311
+ // ==================== BorderLess ====================
4312
+ [`&-borderless ${n}-selector`]: {
4313
+ backgroundColor: "transparent !important",
4314
+ borderColor: "transparent !important",
4315
+ boxShadow: "none !important"
4316
+ },
4317
+ // ==================== In Form ====================
4318
+ [`&${n}-in-form-item`]: {
4319
+ width: "100%"
4320
+ }
4321
+ }
4322
+ },
4323
+ // =====================================================
4324
+ // == LTR ==
4325
+ // =====================================================
4326
+ // Base
4327
+ ni(e),
4328
+ // Single
4329
+ Zl(e),
4330
+ // Multiple
4331
+ Jl(e),
4332
+ // Dropdown
4333
+ Ql(e),
4334
+ // =====================================================
4335
+ // == RTL ==
4336
+ // =====================================================
4337
+ {
4338
+ [`${n}-rtl`]: {
4339
+ direction: "rtl"
4340
+ }
4341
+ },
4342
+ // =====================================================
4343
+ // == Status ==
4344
+ // =====================================================
4345
+ ct(n, $e(e, {
4346
+ borderHoverColor: e.colorPrimaryHover,
4347
+ outlineColor: e.controlOutline
4348
+ })),
4349
+ ct(`${n}-status-error`, $e(e, {
4350
+ borderHoverColor: e.colorErrorHover,
4351
+ outlineColor: e.colorErrorOutline
4352
+ }), !0),
4353
+ ct(`${n}-status-warning`, $e(e, {
4354
+ borderHoverColor: e.colorWarningHover,
4355
+ outlineColor: e.colorWarningOutline
4356
+ }), !0),
4357
+ // =====================================================
4358
+ // == Space Compact ==
4359
+ // =====================================================
4360
+ so(e, {
4361
+ borderElCls: `${n}-selector`,
4362
+ focusElCls: `${n}-focused`
4363
+ })
4364
+ ];
4365
+ }, li = ro("Select", (e, n) => {
4366
+ let {
4367
+ rootPrefixCls: o
4368
+ } = n;
4369
+ const t = $e(e, {
4370
+ rootPrefixCls: o,
4371
+ inputPaddingHorizontalBase: e.paddingSM - 1
4372
+ });
4373
+ return [oi(t)];
4374
+ }, (e) => ({
4375
+ zIndexPopup: e.zIndexPopupBase + 50
4376
+ })), ii = () => S(S({}, Qe(gn(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
4377
+ value: _t([Array, Object, String, Number]),
4378
+ defaultValue: _t([Array, Object, String, Number]),
4379
+ notFoundContent: A.any,
4380
+ suffixIcon: A.any,
4381
+ itemIcon: A.any,
4382
+ size: He(),
4383
+ mode: He(),
4384
+ bordered: wo(!0),
4385
+ transitionName: String,
4386
+ choiceTransitionName: He(""),
4387
+ popupClassName: String,
4388
+ /** @deprecated Please use `popupClassName` instead */
4389
+ dropdownClassName: String,
4390
+ placement: He(),
4391
+ status: He(),
4392
+ "onUpdate:value": Io()
4393
+ }), qt = "SECRET_COMBOBOX_MODE_DO_NOT_USE", he = ue({
4394
+ compatConfig: {
4395
+ MODE: 3
4396
+ },
4397
+ name: "ASelect",
4398
+ Option: xt,
4399
+ OptGroup: Ot,
4400
+ inheritAttrs: !1,
4401
+ props: gt(ii(), {
4402
+ listHeight: 256,
4403
+ listItemHeight: 24
4404
+ }),
4405
+ SECRET_COMBOBOX_MODE_DO_NOT_USE: qt,
4406
+ slots: Object,
4407
+ setup(e, n) {
4408
+ let {
4409
+ attrs: o,
4410
+ emit: t,
4411
+ slots: l,
4412
+ expose: i
4413
+ } = n;
4414
+ const u = ve(), a = uo(), f = co.useInject(), r = R(() => fo(f.status, e.status)), s = () => {
4415
+ var _;
4416
+ (_ = u.value) === null || _ === void 0 || _.focus();
4417
+ }, m = () => {
4418
+ var _;
4419
+ (_ = u.value) === null || _ === void 0 || _.blur();
4420
+ }, p = (_) => {
4421
+ var te;
4422
+ (te = u.value) === null || te === void 0 || te.scrollTo(_);
4423
+ }, w = R(() => {
4424
+ const {
4425
+ mode: _
4426
+ } = e;
4427
+ if (_ !== "combobox")
4428
+ return _ === qt ? "combobox" : _;
4429
+ });
4430
+ process.env.NODE_ENV !== "production" && mo(!e.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
4431
+ const {
4432
+ prefixCls: b,
4433
+ direction: x,
4434
+ configProvider: O,
4435
+ renderEmpty: I,
4436
+ size: P,
4437
+ getPrefixCls: D,
4438
+ getPopupContainer: C,
4439
+ disabled: v,
4440
+ select: T
4441
+ } = po("select", e), {
4442
+ compactSize: $,
4443
+ compactItemClassnames: N
4444
+ } = vo(b, x), V = R(() => $.value || P.value), j = go(), z = R(() => {
4445
+ var _;
4446
+ return (_ = v.value) !== null && _ !== void 0 ? _ : j.value;
4447
+ }), [Q, X] = li(b), U = R(() => D()), M = R(() => e.placement !== void 0 ? e.placement : x.value === "rtl" ? "bottomRight" : "bottomLeft"), L = R(() => ho(U.value, bo(M.value), e.transitionName)), k = R(() => se({
4448
+ [`${b.value}-lg`]: V.value === "large",
4449
+ [`${b.value}-sm`]: V.value === "small",
4450
+ [`${b.value}-rtl`]: x.value === "rtl",
4451
+ [`${b.value}-borderless`]: !e.bordered,
4452
+ [`${b.value}-in-form-item`]: f.isFormItemInput
4453
+ }, yo(b.value, r.value, f.hasFeedback), N.value, X.value)), ee = function() {
4454
+ for (var _ = arguments.length, te = new Array(_), oe = 0; oe < _; oe++)
4455
+ te[oe] = arguments[oe];
4456
+ t("update:value", te[0]), t("change", ...te), a.onFieldChange();
4457
+ }, g = (_) => {
4458
+ t("blur", _), a.onFieldBlur();
4459
+ };
4460
+ i({
4461
+ blur: m,
4462
+ focus: s,
4463
+ scrollTo: p
4464
+ });
4465
+ const H = R(() => w.value === "multiple" || w.value === "tags"), W = R(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !(H.value || w.value === "combobox"));
4466
+ return () => {
4467
+ var _, te, oe, ae;
4468
+ const {
4469
+ notFoundContent: ne,
4470
+ listHeight: fe = 256,
4471
+ listItemHeight: me = 24,
4472
+ popupClassName: h,
4473
+ dropdownClassName: c,
4474
+ virtual: d,
4475
+ dropdownMatchSelectWidth: F,
4476
+ id: E = a.id.value,
4477
+ placeholder: B = (_ = l.placeholder) === null || _ === void 0 ? void 0 : _.call(l),
4478
+ showArrow: q
4479
+ } = e, {
4480
+ hasFeedback: J,
4481
+ feedbackIcon: le
4482
+ } = f;
4483
+ let Z;
4484
+ ne !== void 0 ? Z = ne : l.notFoundContent ? Z = l.notFoundContent() : w.value === "combobox" ? Z = null : Z = (I == null ? void 0 : I("Select")) || y(So, {
4485
+ componentName: "Select"
4486
+ }, null);
4487
+ const {
4488
+ suffixIcon: re,
4489
+ itemIcon: de,
4490
+ removeIcon: Ue,
4491
+ clearIcon: et
4492
+ } = Vl(S(S({}, e), {
4493
+ multiple: H.value,
4494
+ prefixCls: b.value,
4495
+ hasFeedback: J,
4496
+ feedbackIcon: le,
4497
+ showArrow: W.value
4498
+ }), l), Re = Qe(e, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), De = se(h || c, {
4499
+ [`${b.value}-dropdown-${x.value}`]: x.value === "rtl"
4500
+ }, X.value);
4501
+ return Q(y(Fl, Y(Y(Y({
4502
+ ref: u,
4503
+ virtual: d,
4504
+ dropdownMatchSelectWidth: F
4505
+ }, Re), o), {}, {
4506
+ showSearch: (te = e.showSearch) !== null && te !== void 0 ? te : (oe = T == null ? void 0 : T.value) === null || oe === void 0 ? void 0 : oe.showSearch,
4507
+ placeholder: B,
4508
+ listHeight: fe,
4509
+ listItemHeight: me,
4510
+ mode: w.value,
4511
+ prefixCls: b.value,
4512
+ direction: x.value,
4513
+ inputIcon: re,
4514
+ menuItemSelectedIcon: de,
4515
+ removeIcon: Ue,
4516
+ clearIcon: et,
4517
+ notFoundContent: Z,
4518
+ class: [k.value, o.class],
4519
+ getPopupContainer: C == null ? void 0 : C.value,
4520
+ dropdownClassName: De,
4521
+ onChange: ee,
4522
+ onBlur: g,
4523
+ id: E,
4524
+ dropdownRender: Re.dropdownRender || l.dropdownRender,
4525
+ transitionName: L.value,
4526
+ children: (ae = l.default) === null || ae === void 0 ? void 0 : ae.call(l),
4527
+ tagRender: e.tagRender || l.tagRender,
4528
+ optionLabelRender: l.optionLabel,
4529
+ maxTagPlaceholder: e.maxTagPlaceholder || l.maxTagPlaceholder,
4530
+ showArrow: J || q,
4531
+ disabled: z.value
4532
+ }), {
4533
+ option: l.option
4534
+ }));
4535
+ };
4536
+ }
4537
+ });
4538
+ he.install = function(e) {
4539
+ return e.component(he.name, he), e.component(he.Option.displayName, he.Option), e.component(he.OptGroup.displayName, he.OptGroup), e;
4540
+ };
4541
+ he.Option;
4542
+ he.OptGroup;
4543
+ const ai = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGXSURBVHgBlVNLTgJBEK1qOrjtI4w34AhwAuQEZBJc4yyVBbCRxE2HrZoQT4CcAI7AEeYIbDUM5asGZYj0KJX0J1WvX9eXqUIm/qUpbNp6ZzHT+yzNY1iOGR796w2sc1w3B5Ujoc5D1ns/hzcxImb2OPJPqV3rwn0NYh/DR4mEJBGhxShLN7pEZAF1EsPbmAExr7C1kad9KGy6oF/RpR6R1FIGkzAvw4KPqqv4OC4jP3N1LpZ6R55aGiJd7JES4SF+CquK5JdHWnKE48o6YenjcCw8PtGTbMqtwGWSQ9/8X0p9ZY+M7DShLNKCOq9m2Cb7Ahy9P1N+m1eNgsrEz7AXJ7qQ7Cf/3IBLw71rxQzApIIkUUyAsgzDWyXSEhdcm2tY6N4xuqXxDTwrsCkGXT/VPtuyWSqHuaJtQ8cBuUkH2e0IgDcAmzEeteHD6SDr3eHMoHLKYT/IruuIF0PaR+UczjaIc4rLGpguRmfFTN1dUNncHAZyDEUoP0iclV0nxgLbz+joG32rxeGTJKKs6uFfXaw50XDK2C8hpcmbpfjHLAAAAABJRU5ErkJggg==", ri = { class: "crane-checkbox-line" }, si = { class: "crane-flex-center crane-checkbox-label" }, ui = { class: "crane-text-overflow" }, ci = { class: "crane-flex-center crane-margin-left-4" }, di = ["src"], fi = { class: "crane-week-color crane-margin-left-4" }, mi = { class: "crane-week-color crane-margin-left-12" }, pi = "PENDING", vi = /* @__PURE__ */ ue({
4544
+ __name: "checkbox-item",
4545
+ props: {
4546
+ item: {
4547
+ type: Object,
4548
+ default: () => {
4549
+ }
4550
+ },
4551
+ checkedIds: {
4552
+ type: Array,
4553
+ default: []
4554
+ },
4555
+ onChangeTime: {
4556
+ type: Function,
4557
+ default: () => {
4558
+ }
4559
+ }
4560
+ },
4561
+ setup(e) {
4562
+ const n = {
4563
+ L1: {
4564
+ color: "green",
4565
+ text: Se("levels.L1")
4566
+ },
4567
+ L2: {
4568
+ color: "orange",
4569
+ text: Se("levels.L2")
4570
+ },
4571
+ L3: {
4572
+ color: "red",
4573
+ text: Se("levels.L3")
4574
+ }
4575
+ }, o = {
4576
+ PENDING: {
4577
+ color: "orange",
4578
+ text: Se("status.PENDING")
4579
+ },
4580
+ OWNER: {
4581
+ color: "green",
4582
+ text: Se("status.OWNER")
4583
+ },
4584
+ NO: {
4585
+ color: "red",
4586
+ text: Se("status.NO")
4587
+ }
4588
+ };
4589
+ let t = e;
4590
+ const l = Co("availiables"), i = ve(""), u = (r) => {
4591
+ const s = {
4592
+ L1: "SIXTY_DAYS",
4593
+ L2: "THIRTY_DAYS",
4594
+ L3: "SEVEN_DAYS"
4595
+ }, { relatedDepartmentIds: m = [], curDepartmentId: p = 0, securityLevel: w } = r;
4596
+ return m.includes(p) ? r.validTime = "NINETY_DAYS" : r.validTime = s[w], r.validTime;
4597
+ }, a = (r) => {
4598
+ t.item.validTime = r, t.onChangeTime();
4599
+ }, f = (r) => {
4600
+ r.target.checked && (i.value = u(t.item));
4601
+ };
4602
+ return (r, s) => (Le(), Xn("div", ri, [
4603
+ y(pe($o), {
4604
+ value: e.item.roleId,
4605
+ disabled: !!e.item.businessApplyType,
4606
+ onChange: f
4607
+ }, {
4608
+ default: be(() => [
4609
+ Ee("div", si, [
4610
+ e.item.securityLevel ? (Le(), Ge(pe(Bt), {
4611
+ key: 0,
4612
+ bordered: !1,
4613
+ color: n[e.item.securityLevel].color,
4614
+ class: "crane-tag-position"
4615
+ }, {
4616
+ default: be(() => [
4617
+ we(ge(n[e.item.securityLevel].text), 1)
4618
+ ]),
4619
+ _: 1
4620
+ }, 8, ["color"])) : Xe("", !0),
4621
+ Ee("span", null, ge(pe(Se)(`operationType.${e.item.operationType}`)) + "| ", 1),
4622
+ y(pe(it), null, {
4623
+ content: be(() => [
4624
+ we(ge(e.item.name), 1)
4625
+ ]),
4626
+ default: be(() => [
4627
+ Ee("span", ui, ge(e.item.name), 1)
4628
+ ]),
4629
+ _: 1
4630
+ }),
4631
+ e.item.businessApplyType ? (Le(), Ge(pe(Bt), {
4632
+ key: 1,
4633
+ bordered: !1,
4634
+ class: kn(["crane-tag-position crane-margin-left-4 crane-margin-right-0", e.item.businessApplyType !== pi ? "crane-disabled-color" : ""])
4635
+ }, {
4636
+ default: be(() => [
4637
+ we(ge(o[e.item.businessApplyType].text), 1)
4638
+ ]),
4639
+ _: 1
4640
+ }, 8, ["class"])) : Xe("", !0)
4641
+ ])
4642
+ ]),
4643
+ _: 1
4644
+ }, 8, ["value", "disabled"]),
4645
+ e.item.desc ? (Le(), Ge(pe(it), { key: 0 }, {
4646
+ content: be(() => [
4647
+ we(ge(e.item.desc), 1)
4648
+ ]),
4649
+ default: be(() => [
4650
+ y(pe(To), { class: "crane-week-color" })
4651
+ ]),
4652
+ _: 1
4653
+ })) : Xe("", !0),
4654
+ e.item.relatedDepartments ? (Le(), Ge(pe(it), { key: 1 }, {
4655
+ content: be(() => [
4656
+ we(ge(pe(Se)("adaptDepartment")) + ":" + ge(e.item.relatedDepartments.map((m) => m.name).join(",")), 1)
4657
+ ]),
4658
+ default: be(() => [
4659
+ Ee("span", ci, [
4660
+ Ee("img", {
4661
+ src: pe(ai),
4662
+ height: "14",
4663
+ width: "14"
4664
+ }, null, 8, di),
4665
+ Ee("span", fi, ge(e.item.relatedDepartments.length), 1)
4666
+ ])
4667
+ ]),
4668
+ _: 1
4669
+ })) : Xe("", !0),
4670
+ qn(Ee("span", mi, [
4671
+ we(ge(pe(Se)("availableTime")) + ": ", 1),
4672
+ y(pe(he), {
4673
+ value: i.value,
4674
+ "onUpdate:value": s[0] || (s[0] = (m) => i.value = m),
4675
+ style: { width: "100px" },
4676
+ options: pe(l),
4677
+ onChange: a,
4678
+ size: "small"
4679
+ }, null, 8, ["value", "options"])
4680
+ ], 512), [
4681
+ [Qn, e.checkedIds.includes(e.item.roleId)]
4682
+ ])
4683
+ ]));
4684
+ }
4685
+ }), Ei = /* @__PURE__ */ xo(vi, [["__scopeId", "data-v-da0d7c0c"]]);
4686
+ export {
4687
+ Ei as default
4688
+ };