vue-efko-data-view 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/README.md +160 -0
  2. package/dist/data-view.cjs.js +36 -0
  3. package/dist/data-view.cjs.js.map +1 -0
  4. package/dist/data-view.es.js +2985 -0
  5. package/dist/data-view.es.js.map +1 -0
  6. package/dist/dataview/DataView.d.ts +2 -0
  7. package/dist/dataview/DataView.vue.d.ts +112 -0
  8. package/dist/dataview/card/CardFiltersDrawer.vue.d.ts +22 -0
  9. package/dist/dataview/card/CardFiltersModal.vue.d.ts +22 -0
  10. package/dist/dataview/card/CardGrid.vue.d.ts +57 -0
  11. package/dist/dataview/card/FilterInput.vue.d.ts +14 -0
  12. package/dist/dataview/card/TheCard.d.ts +5 -0
  13. package/dist/dataview/card/TheCard.vue.d.ts +43 -0
  14. package/dist/dataview/card/ui/CardCellActions.vue.d.ts +19 -0
  15. package/dist/dataview/lazyload/LazyLoadContainer.vue.d.ts +31 -0
  16. package/dist/dataview/lazyload/LazyLoadTrigger.vue.d.ts +13 -0
  17. package/dist/dataview/table/TheTable.vue.d.ts +69 -0
  18. package/dist/dataview/table/enum/table.d.ts +37 -0
  19. package/dist/dataview/table/interface/table.d.ts +33 -0
  20. package/dist/dataview/table/ui/ColumnSettingsDrawer.d.ts +8 -0
  21. package/dist/dataview/table/ui/ColumnSettingsDrawer.vue.d.ts +23 -0
  22. package/dist/dataview/table/ui/filter/FilterDropdown.vue.d.ts +15 -0
  23. package/dist/dataview/table/ui/filter/FilterTagCloud.vue.d.ts +14 -0
  24. package/dist/dataview/table/ui/table-cell/TableCellActions.vue.d.ts +20 -0
  25. package/dist/dataview/table/ui/table-cell/TableCellStatus.vue.d.ts +5 -0
  26. package/dist/dataview/ui/TheSelect.vue.d.ts +21 -0
  27. package/dist/index.d.ts +15 -0
  28. package/dist/style.css +1 -0
  29. package/package.json +41 -0
@@ -0,0 +1,2985 @@
1
+ import { inject as ht, shallowRef as fe, getCurrentInstance as Lt, defineComponent as z, watch as B, unref as $, provide as vt, watchEffect as Ot, onBeforeUnmount as Ue, ref as V, computed as E, triggerRef as zt, resolveComponent as T, createElementBlock as S, openBlock as g, createElementVNode as L, createBlock as I, createCommentVNode as j, Fragment as D, renderList as G, normalizeStyle as Ve, withCtx as C, createTextVNode as _, toDisplayString as P, createVNode as A, h as oe, createSlots as we, renderSlot as R, onMounted as re, normalizeClass as Pt, mergeProps as Xe, resolveDynamicComponent as mt, reactive as Ge, normalizeProps as se, guardReactiveProps as ce } from "vue";
2
+ import { isEqual as pe } from "lodash";
3
+ import We from "@formkit/auto-animate";
4
+ import { CheckCircleTwoTone as tt, EyeOutlined as bt, EditOutlined as yt, RedoOutlined as xt, DeleteOutlined as St, AppstoreOutlined as Nt, PicCenterOutlined as jt } from "@ant-design/icons-vue";
5
+ import Ut from "@vueform/multiselect";
6
+ import { Empty as Xt } from "efko-ui-library";
7
+ function M() {
8
+ return M = Object.assign ? Object.assign.bind() : function(e) {
9
+ for (var n = 1; n < arguments.length; n++) {
10
+ var t = arguments[n];
11
+ for (var o in t) ({}).hasOwnProperty.call(t, o) && (e[o] = t[o]);
12
+ }
13
+ return e;
14
+ }, M.apply(null, arguments);
15
+ }
16
+ function Ct(e) {
17
+ for (var n = 0, t, o = 0, r = e.length; r >= 4; ++o, r -= 4)
18
+ t = e.charCodeAt(o) & 255 | (e.charCodeAt(++o) & 255) << 8 | (e.charCodeAt(++o) & 255) << 16 | (e.charCodeAt(++o) & 255) << 24, t = /* Math.imul(k, m): */
19
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), t ^= /* k >>> r: */
20
+ t >>> 24, n = /* Math.imul(k, m): */
21
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
22
+ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16);
23
+ switch (r) {
24
+ case 3:
25
+ n ^= (e.charCodeAt(o + 2) & 255) << 16;
26
+ case 2:
27
+ n ^= (e.charCodeAt(o + 1) & 255) << 8;
28
+ case 1:
29
+ n ^= e.charCodeAt(o) & 255, n = /* Math.imul(h, m): */
30
+ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16);
31
+ }
32
+ return n ^= n >>> 13, n = /* Math.imul(h, m): */
33
+ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), ((n ^ n >>> 15) >>> 0).toString(36);
34
+ }
35
+ const nt = "%";
36
+ class Gt {
37
+ constructor(n) {
38
+ this.cache = /* @__PURE__ */ new Map(), this.instanceId = n;
39
+ }
40
+ get(n) {
41
+ return this.cache.get(Array.isArray(n) ? n.join(nt) : n) || null;
42
+ }
43
+ update(n, t) {
44
+ const o = Array.isArray(n) ? n.join(nt) : n, r = this.cache.get(o), a = t(r);
45
+ a === null ? this.cache.delete(o) : this.cache.set(o, a);
46
+ }
47
+ }
48
+ const Wt = (e) => {
49
+ const n = e;
50
+ return n.install = function(t) {
51
+ t.component(n.displayName || n.name, e);
52
+ }, e;
53
+ };
54
+ function At(e) {
55
+ return {
56
+ type: Object,
57
+ default: e
58
+ };
59
+ }
60
+ function ke(e) {
61
+ return {
62
+ type: Boolean,
63
+ default: e
64
+ };
65
+ }
66
+ function qt(e, n) {
67
+ const t = {
68
+ validator: () => !0,
69
+ default: e
70
+ };
71
+ return t;
72
+ }
73
+ function ot(e) {
74
+ return {
75
+ type: Array,
76
+ default: e
77
+ };
78
+ }
79
+ function rt(e) {
80
+ return {
81
+ type: String,
82
+ default: e
83
+ };
84
+ }
85
+ function Kt(e, n) {
86
+ return e ? {
87
+ type: e,
88
+ default: n
89
+ } : qt(n);
90
+ }
91
+ const Zt = "data-token-hash", Me = "data-css-hash", de = "__cssinjs_instance__";
92
+ function ge() {
93
+ const e = Math.random().toString(12).slice(2);
94
+ if (typeof document < "u" && document.head && document.body) {
95
+ const n = document.body.querySelectorAll(`style[${Me}]`) || [], {
96
+ firstChild: t
97
+ } = document.head;
98
+ Array.from(n).forEach((r) => {
99
+ r[de] = r[de] || e, r[de] === e && document.head.insertBefore(r, t);
100
+ });
101
+ const o = {};
102
+ Array.from(document.querySelectorAll(`style[${Me}]`)).forEach((r) => {
103
+ var a;
104
+ const l = r.getAttribute(Me);
105
+ o[l] ? r[de] === e && ((a = r.parentNode) === null || a === void 0 || a.removeChild(r)) : o[l] = !0;
106
+ });
107
+ }
108
+ return new Gt(e);
109
+ }
110
+ const wt = Symbol("StyleContextKey"), Qt = () => {
111
+ var e, n, t;
112
+ const o = Lt();
113
+ let r;
114
+ if (o && o.appContext) {
115
+ const a = (t = (n = (e = o.appContext) === null || e === void 0 ? void 0 : e.config) === null || n === void 0 ? void 0 : n.globalProperties) === null || t === void 0 ? void 0 : t.__ANTDV_CSSINJS_CACHE__;
116
+ a ? r = a : (r = ge(), o.appContext.config.globalProperties && (o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = r));
117
+ } else
118
+ r = ge();
119
+ return r;
120
+ }, kt = {
121
+ cache: ge(),
122
+ defaultCache: !0,
123
+ hashPriority: "low"
124
+ }, qe = () => {
125
+ const e = Qt();
126
+ return ht(wt, fe(M(M({}, kt), {
127
+ cache: e
128
+ })));
129
+ }, Jt = (e) => {
130
+ const n = qe(), t = fe(M(M({}, kt), {
131
+ cache: ge()
132
+ }));
133
+ return B([() => $(e), n], () => {
134
+ const o = M({}, n.value), r = $(e);
135
+ Object.keys(r).forEach((l) => {
136
+ const s = r[l];
137
+ r[l] !== void 0 && (o[l] = s);
138
+ });
139
+ const {
140
+ cache: a
141
+ } = r;
142
+ o.cache = o.cache || ge(), o.defaultCache = !a && n.value.defaultCache, t.value = o;
143
+ }, {
144
+ immediate: !0
145
+ }), vt(wt, t), t;
146
+ }, Yt = () => ({
147
+ autoClear: ke(),
148
+ /** @private Test only. Not work in production. */
149
+ mock: rt(),
150
+ /**
151
+ * Only set when you need ssr to extract style on you own.
152
+ * If not provided, it will auto create <style /> on the end of Provider in server side.
153
+ */
154
+ cache: At(),
155
+ /** Tell children that this context is default generated context */
156
+ defaultCache: ke(),
157
+ /** Use `:where` selector to reduce hashId css selector priority */
158
+ hashPriority: rt(),
159
+ /** Tell cssinjs where to inject style in */
160
+ container: Kt(),
161
+ /** Component wil render inline `<style />` for fallback in SSR. Not recommend. */
162
+ ssrInline: ke(),
163
+ /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
164
+ transformers: ot(),
165
+ /**
166
+ * Linters to lint css before inject in document.
167
+ * Styles will be linted after transforming.
168
+ * Please note that `linters` do not support dynamic update.
169
+ */
170
+ linters: ot()
171
+ });
172
+ Wt(z({
173
+ name: "AStyleProvider",
174
+ inheritAttrs: !1,
175
+ props: Yt(),
176
+ setup(e, {
177
+ slots: n
178
+ }) {
179
+ return Jt(e), () => {
180
+ var t;
181
+ return (t = n.default) === null || t === void 0 ? void 0 : t.call(n);
182
+ };
183
+ }
184
+ }));
185
+ function en() {
186
+ return !1;
187
+ }
188
+ let _e = !1;
189
+ function tn() {
190
+ return _e;
191
+ }
192
+ const nn = process.env.NODE_ENV === "production" ? en : tn;
193
+ if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && module.hot && typeof window < "u") {
194
+ const e = window;
195
+ if (typeof e.webpackHotUpdate == "function") {
196
+ const n = e.webpackHotUpdate;
197
+ e.webpackHotUpdate = (...t) => (_e = !0, setTimeout(() => {
198
+ _e = !1;
199
+ }, 0), n(...t));
200
+ }
201
+ }
202
+ function on(e, n, t, o) {
203
+ const r = qe(), a = fe(""), l = fe();
204
+ Ot(() => {
205
+ a.value = [e, ...n.value].join("%");
206
+ });
207
+ const s = nn(), h = (m) => {
208
+ r.value.cache.update(m, (u) => {
209
+ const [p = 0, x] = u || [];
210
+ return p - 1 === 0 ? (o == null || o(x, !1), null) : [p - 1, x];
211
+ });
212
+ };
213
+ return B(a, (m, u) => {
214
+ u && h(u), r.value.cache.update(m, (p) => {
215
+ const [x = 0, v] = p || [];
216
+ let i = v;
217
+ process.env.NODE_ENV !== "production" && v && s && (o == null || o(i, s), i = null);
218
+ const b = i || t();
219
+ return [x + 1, b];
220
+ }), l.value = r.value.cache.get(a.value)[1];
221
+ }, {
222
+ immediate: !0
223
+ }), Ue(() => {
224
+ h(a.value);
225
+ }), l;
226
+ }
227
+ function rn(e, n) {
228
+ if (e.length !== n.length)
229
+ return !1;
230
+ for (let t = 0; t < e.length; t++)
231
+ if (e[t] !== n[t])
232
+ return !1;
233
+ return !0;
234
+ }
235
+ class ae {
236
+ constructor() {
237
+ this.cache = /* @__PURE__ */ new Map(), this.keys = [], this.cacheCallTimes = 0;
238
+ }
239
+ size() {
240
+ return this.keys.length;
241
+ }
242
+ internalGet(n, t = !1) {
243
+ let o = {
244
+ map: this.cache
245
+ };
246
+ return n.forEach((r) => {
247
+ var a;
248
+ o ? o = (a = o == null ? void 0 : o.map) === null || a === void 0 ? void 0 : a.get(r) : o = void 0;
249
+ }), o != null && o.value && t && (o.value[1] = this.cacheCallTimes++), o == null ? void 0 : o.value;
250
+ }
251
+ get(n) {
252
+ var t;
253
+ return (t = this.internalGet(n, !0)) === null || t === void 0 ? void 0 : t[0];
254
+ }
255
+ has(n) {
256
+ return !!this.internalGet(n);
257
+ }
258
+ set(n, t) {
259
+ if (!this.has(n)) {
260
+ if (this.size() + 1 > ae.MAX_CACHE_SIZE + ae.MAX_CACHE_OFFSET) {
261
+ const [r] = this.keys.reduce((a, l) => {
262
+ const [, s] = a;
263
+ return this.internalGet(l)[1] < s ? [l, this.internalGet(l)[1]] : a;
264
+ }, [this.keys[0], this.cacheCallTimes]);
265
+ this.delete(r);
266
+ }
267
+ this.keys.push(n);
268
+ }
269
+ let o = this.cache;
270
+ n.forEach((r, a) => {
271
+ if (a === n.length - 1)
272
+ o.set(r, {
273
+ value: [t, this.cacheCallTimes++]
274
+ });
275
+ else {
276
+ const l = o.get(r);
277
+ l ? l.map || (l.map = /* @__PURE__ */ new Map()) : o.set(r, {
278
+ map: /* @__PURE__ */ new Map()
279
+ }), o = o.get(r).map;
280
+ }
281
+ });
282
+ }
283
+ deleteByPath(n, t) {
284
+ var o;
285
+ const r = n.get(t[0]);
286
+ if (t.length === 1)
287
+ return r.map ? n.set(t[0], {
288
+ map: r.map
289
+ }) : n.delete(t[0]), (o = r.value) === null || o === void 0 ? void 0 : o[0];
290
+ const a = this.deleteByPath(r.map, t.slice(1));
291
+ return (!r.map || r.map.size === 0) && !r.value && n.delete(t[0]), a;
292
+ }
293
+ delete(n) {
294
+ if (this.has(n))
295
+ return this.keys = this.keys.filter((t) => !rn(t, n)), this.deleteByPath(this.cache, n);
296
+ }
297
+ }
298
+ ae.MAX_CACHE_SIZE = 20;
299
+ ae.MAX_CACHE_OFFSET = 5;
300
+ let Re = {};
301
+ function an(e, n) {
302
+ process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${n}`);
303
+ }
304
+ function ln() {
305
+ Re = {};
306
+ }
307
+ function sn(e, n, t) {
308
+ !n && !Re[t] && (e(!1, t), Re[t] = !0);
309
+ }
310
+ function cn(e, n) {
311
+ sn(an, e, n);
312
+ }
313
+ function un() {
314
+ }
315
+ let Mt = un;
316
+ process.env.NODE_ENV !== "production" && (Mt = (e, n, t) => {
317
+ cn(e, `[ant-design-vue: ${n}] ${t}`), process.env.NODE_ENV === "test" && ln();
318
+ });
319
+ let at = 0;
320
+ class Et {
321
+ constructor(n) {
322
+ this.derivatives = Array.isArray(n) ? n : [n], this.id = at, n.length === 0 && Mt(n.length > 0, "[Efko дизайн Vue CSS-in-JS] Theme should have at least one derivative function."), at += 1;
323
+ }
324
+ getDerivativeToken(n) {
325
+ return this.derivatives.reduce((t, o) => o(n, t), void 0);
326
+ }
327
+ }
328
+ const Ee = new ae();
329
+ function dn(e) {
330
+ const n = Array.isArray(e) ? e : [e];
331
+ return Ee.has(n) || Ee.set(n, new Et(n)), Ee.get(n);
332
+ }
333
+ const it = /* @__PURE__ */ new WeakMap();
334
+ function Se(e) {
335
+ let n = it.get(e) || "";
336
+ return n || (Object.keys(e).forEach((t) => {
337
+ const o = e[t];
338
+ n += t, o instanceof Et ? n += o.id : o && typeof o == "object" ? n += Se(o) : n += o;
339
+ }), it.set(e, n)), n;
340
+ }
341
+ function fn(e, n) {
342
+ return Ct(`${n}_${Se(e)}`);
343
+ }
344
+ const lt = {}, pn = process.env.NODE_ENV === "production", gn = process.env.NODE_ENV === "prerender", hn = !pn && !gn ? "css-dev-only-do-not-override" : "css", Y = /* @__PURE__ */ new Map();
345
+ function vn(e) {
346
+ Y.set(e, (Y.get(e) || 0) + 1);
347
+ }
348
+ function mn(e, n) {
349
+ typeof document < "u" && document.querySelectorAll(`style[${Zt}="${e}"]`).forEach((o) => {
350
+ var r;
351
+ o[de] === n && ((r = o.parentNode) === null || r === void 0 || r.removeChild(o));
352
+ });
353
+ }
354
+ const bn = 0;
355
+ function yn(e, n) {
356
+ Y.set(e, (Y.get(e) || 0) - 1);
357
+ const t = Array.from(Y.keys()), o = t.filter((r) => (Y.get(r) || 0) <= 0);
358
+ t.length - o.length > bn && o.forEach((r) => {
359
+ mn(r, n), Y.delete(r);
360
+ });
361
+ }
362
+ const xn = (e, n, t, o) => {
363
+ const r = t.getDerivativeToken(e);
364
+ let a = M(M({}, r), n);
365
+ return o && (a = o(a)), a;
366
+ };
367
+ function Sn(e, n, t = V({})) {
368
+ const o = qe(), r = E(() => M({}, ...n.value)), a = E(() => Se(r.value)), l = E(() => Se(t.value.override || lt));
369
+ return on("token", E(() => [t.value.salt || "", e.value.id, a.value, l.value]), () => {
370
+ const {
371
+ salt: h = "",
372
+ override: m = lt,
373
+ formatToken: u,
374
+ getComputedToken: p
375
+ } = t.value, x = p ? p(r.value, m, e.value) : xn(r.value, m, e.value, u), v = fn(x, h);
376
+ x._tokenKey = v, vn(v);
377
+ const i = `${hn}-${Ct(v)}`;
378
+ return x._hashId = i, [x, i];
379
+ }, (h) => {
380
+ var m;
381
+ yn(h[0]._tokenKey, (m = o.value) === null || m === void 0 ? void 0 : m.cache.instanceId);
382
+ });
383
+ }
384
+ const Cn = "1.7.0";
385
+ function N(e, n) {
386
+ An(e) && (e = "100%");
387
+ var t = wn(e);
388
+ return e = n === 360 ? e : Math.min(n, Math.max(0, parseFloat(e))), t && (e = parseInt(String(e * n), 10) / 100), Math.abs(e - n) < 1e-6 ? 1 : (n === 360 ? e = (e < 0 ? e % n + n : e % n) / parseFloat(String(n)) : e = e % n / parseFloat(String(n)), e);
389
+ }
390
+ function ve(e) {
391
+ return Math.min(1, Math.max(0, e));
392
+ }
393
+ function An(e) {
394
+ return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
395
+ }
396
+ function wn(e) {
397
+ return typeof e == "string" && e.indexOf("%") !== -1;
398
+ }
399
+ function Tt(e) {
400
+ return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
401
+ }
402
+ function me(e) {
403
+ return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
404
+ }
405
+ function ee(e) {
406
+ return e.length === 1 ? "0" + e : String(e);
407
+ }
408
+ function kn(e, n, t) {
409
+ return {
410
+ r: N(e, 255) * 255,
411
+ g: N(n, 255) * 255,
412
+ b: N(t, 255) * 255
413
+ };
414
+ }
415
+ function st(e, n, t) {
416
+ e = N(e, 255), n = N(n, 255), t = N(t, 255);
417
+ var o = Math.max(e, n, t), r = Math.min(e, n, t), a = 0, l = 0, s = (o + r) / 2;
418
+ if (o === r)
419
+ l = 0, a = 0;
420
+ else {
421
+ var h = o - r;
422
+ switch (l = s > 0.5 ? h / (2 - o - r) : h / (o + r), o) {
423
+ case e:
424
+ a = (n - t) / h + (n < t ? 6 : 0);
425
+ break;
426
+ case n:
427
+ a = (t - e) / h + 2;
428
+ break;
429
+ case t:
430
+ a = (e - n) / h + 4;
431
+ break;
432
+ }
433
+ a /= 6;
434
+ }
435
+ return { h: a, s: l, l: s };
436
+ }
437
+ function Te(e, n, t) {
438
+ return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? e + (n - e) * (6 * t) : t < 1 / 2 ? n : t < 2 / 3 ? e + (n - e) * (2 / 3 - t) * 6 : e;
439
+ }
440
+ function Mn(e, n, t) {
441
+ var o, r, a;
442
+ if (e = N(e, 360), n = N(n, 100), t = N(t, 100), n === 0)
443
+ r = t, a = t, o = t;
444
+ else {
445
+ var l = t < 0.5 ? t * (1 + n) : t + n - t * n, s = 2 * t - l;
446
+ o = Te(s, l, e + 1 / 3), r = Te(s, l, e), a = Te(s, l, e - 1 / 3);
447
+ }
448
+ return { r: o * 255, g: r * 255, b: a * 255 };
449
+ }
450
+ function Le(e, n, t) {
451
+ e = N(e, 255), n = N(n, 255), t = N(t, 255);
452
+ var o = Math.max(e, n, t), r = Math.min(e, n, t), a = 0, l = o, s = o - r, h = o === 0 ? 0 : s / o;
453
+ if (o === r)
454
+ a = 0;
455
+ else {
456
+ switch (o) {
457
+ case e:
458
+ a = (n - t) / s + (n < t ? 6 : 0);
459
+ break;
460
+ case n:
461
+ a = (t - e) / s + 2;
462
+ break;
463
+ case t:
464
+ a = (e - n) / s + 4;
465
+ break;
466
+ }
467
+ a /= 6;
468
+ }
469
+ return { h: a, s: h, v: l };
470
+ }
471
+ function En(e, n, t) {
472
+ e = N(e, 360) * 6, n = N(n, 100), t = N(t, 100);
473
+ var o = Math.floor(e), r = e - o, a = t * (1 - n), l = t * (1 - r * n), s = t * (1 - (1 - r) * n), h = o % 6, m = [t, l, a, a, s, t][h], u = [s, t, t, l, a, a][h], p = [a, a, s, t, t, l][h];
474
+ return { r: m * 255, g: u * 255, b: p * 255 };
475
+ }
476
+ function Oe(e, n, t, o) {
477
+ var r = [
478
+ ee(Math.round(e).toString(16)),
479
+ ee(Math.round(n).toString(16)),
480
+ ee(Math.round(t).toString(16))
481
+ ];
482
+ return o && r[0].startsWith(r[0].charAt(1)) && r[1].startsWith(r[1].charAt(1)) && r[2].startsWith(r[2].charAt(1)) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) : r.join("");
483
+ }
484
+ function Tn(e, n, t, o, r) {
485
+ var a = [
486
+ ee(Math.round(e).toString(16)),
487
+ ee(Math.round(n).toString(16)),
488
+ ee(Math.round(t).toString(16)),
489
+ ee(In(o))
490
+ ];
491
+ return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
492
+ }
493
+ function In(e) {
494
+ return Math.round(parseFloat(e) * 255).toString(16);
495
+ }
496
+ function ct(e) {
497
+ return U(e) / 255;
498
+ }
499
+ function U(e) {
500
+ return parseInt(e, 16);
501
+ }
502
+ function Hn(e) {
503
+ return {
504
+ r: e >> 16,
505
+ g: (e & 65280) >> 8,
506
+ b: e & 255
507
+ };
508
+ }
509
+ var ze = {
510
+ aliceblue: "#f0f8ff",
511
+ antiquewhite: "#faebd7",
512
+ aqua: "#00ffff",
513
+ aquamarine: "#7fffd4",
514
+ azure: "#f0ffff",
515
+ beige: "#f5f5dc",
516
+ bisque: "#ffe4c4",
517
+ black: "#000000",
518
+ blanchedalmond: "#ffebcd",
519
+ blue: "#0000ff",
520
+ blueviolet: "#8a2be2",
521
+ brown: "#a52a2a",
522
+ burlywood: "#deb887",
523
+ cadetblue: "#5f9ea0",
524
+ chartreuse: "#7fff00",
525
+ chocolate: "#d2691e",
526
+ coral: "#ff7f50",
527
+ cornflowerblue: "#6495ed",
528
+ cornsilk: "#fff8dc",
529
+ crimson: "#dc143c",
530
+ cyan: "#00ffff",
531
+ darkblue: "#00008b",
532
+ darkcyan: "#008b8b",
533
+ darkgoldenrod: "#b8860b",
534
+ darkgray: "#a9a9a9",
535
+ darkgreen: "#006400",
536
+ darkgrey: "#a9a9a9",
537
+ darkkhaki: "#bdb76b",
538
+ darkmagenta: "#8b008b",
539
+ darkolivegreen: "#556b2f",
540
+ darkorange: "#ff8c00",
541
+ darkorchid: "#9932cc",
542
+ darkred: "#8b0000",
543
+ darksalmon: "#e9967a",
544
+ darkseagreen: "#8fbc8f",
545
+ darkslateblue: "#483d8b",
546
+ darkslategray: "#2f4f4f",
547
+ darkslategrey: "#2f4f4f",
548
+ darkturquoise: "#00ced1",
549
+ darkviolet: "#9400d3",
550
+ deeppink: "#ff1493",
551
+ deepskyblue: "#00bfff",
552
+ dimgray: "#696969",
553
+ dimgrey: "#696969",
554
+ dodgerblue: "#1e90ff",
555
+ firebrick: "#b22222",
556
+ floralwhite: "#fffaf0",
557
+ forestgreen: "#228b22",
558
+ fuchsia: "#ff00ff",
559
+ gainsboro: "#dcdcdc",
560
+ ghostwhite: "#f8f8ff",
561
+ goldenrod: "#daa520",
562
+ gold: "#ffd700",
563
+ gray: "#808080",
564
+ green: "#008000",
565
+ greenyellow: "#adff2f",
566
+ grey: "#808080",
567
+ honeydew: "#f0fff0",
568
+ hotpink: "#ff69b4",
569
+ indianred: "#cd5c5c",
570
+ indigo: "#4b0082",
571
+ ivory: "#fffff0",
572
+ khaki: "#f0e68c",
573
+ lavenderblush: "#fff0f5",
574
+ lavender: "#e6e6fa",
575
+ lawngreen: "#7cfc00",
576
+ lemonchiffon: "#fffacd",
577
+ lightblue: "#add8e6",
578
+ lightcoral: "#f08080",
579
+ lightcyan: "#e0ffff",
580
+ lightgoldenrodyellow: "#fafad2",
581
+ lightgray: "#d3d3d3",
582
+ lightgreen: "#90ee90",
583
+ lightgrey: "#d3d3d3",
584
+ lightpink: "#ffb6c1",
585
+ lightsalmon: "#ffa07a",
586
+ lightseagreen: "#20b2aa",
587
+ lightskyblue: "#87cefa",
588
+ lightslategray: "#778899",
589
+ lightslategrey: "#778899",
590
+ lightsteelblue: "#b0c4de",
591
+ lightyellow: "#ffffe0",
592
+ lime: "#00ff00",
593
+ limegreen: "#32cd32",
594
+ linen: "#faf0e6",
595
+ magenta: "#ff00ff",
596
+ maroon: "#800000",
597
+ mediumaquamarine: "#66cdaa",
598
+ mediumblue: "#0000cd",
599
+ mediumorchid: "#ba55d3",
600
+ mediumpurple: "#9370db",
601
+ mediumseagreen: "#3cb371",
602
+ mediumslateblue: "#7b68ee",
603
+ mediumspringgreen: "#00fa9a",
604
+ mediumturquoise: "#48d1cc",
605
+ mediumvioletred: "#c71585",
606
+ midnightblue: "#191970",
607
+ mintcream: "#f5fffa",
608
+ mistyrose: "#ffe4e1",
609
+ moccasin: "#ffe4b5",
610
+ navajowhite: "#ffdead",
611
+ navy: "#000080",
612
+ oldlace: "#fdf5e6",
613
+ olive: "#808000",
614
+ olivedrab: "#6b8e23",
615
+ orange: "#ffa500",
616
+ orangered: "#ff4500",
617
+ orchid: "#da70d6",
618
+ palegoldenrod: "#eee8aa",
619
+ palegreen: "#98fb98",
620
+ paleturquoise: "#afeeee",
621
+ palevioletred: "#db7093",
622
+ papayawhip: "#ffefd5",
623
+ peachpuff: "#ffdab9",
624
+ peru: "#cd853f",
625
+ pink: "#ffc0cb",
626
+ plum: "#dda0dd",
627
+ powderblue: "#b0e0e6",
628
+ purple: "#800080",
629
+ rebeccapurple: "#663399",
630
+ red: "#ff0000",
631
+ rosybrown: "#bc8f8f",
632
+ royalblue: "#4169e1",
633
+ saddlebrown: "#8b4513",
634
+ salmon: "#fa8072",
635
+ sandybrown: "#f4a460",
636
+ seagreen: "#2e8b57",
637
+ seashell: "#fff5ee",
638
+ sienna: "#a0522d",
639
+ silver: "#c0c0c0",
640
+ skyblue: "#87ceeb",
641
+ slateblue: "#6a5acd",
642
+ slategray: "#708090",
643
+ slategrey: "#708090",
644
+ snow: "#fffafa",
645
+ springgreen: "#00ff7f",
646
+ steelblue: "#4682b4",
647
+ tan: "#d2b48c",
648
+ teal: "#008080",
649
+ thistle: "#d8bfd8",
650
+ tomato: "#ff6347",
651
+ turquoise: "#40e0d0",
652
+ violet: "#ee82ee",
653
+ wheat: "#f5deb3",
654
+ white: "#ffffff",
655
+ whitesmoke: "#f5f5f5",
656
+ yellow: "#ffff00",
657
+ yellowgreen: "#9acd32"
658
+ };
659
+ function ne(e) {
660
+ var n = { r: 0, g: 0, b: 0 }, t = 1, o = null, r = null, a = null, l = !1, s = !1;
661
+ return typeof e == "string" && (e = $n(e)), typeof e == "object" && (Z(e.r) && Z(e.g) && Z(e.b) ? (n = kn(e.r, e.g, e.b), l = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Z(e.h) && Z(e.s) && Z(e.v) ? (o = me(e.s), r = me(e.v), n = En(e.h, o, r), l = !0, s = "hsv") : Z(e.h) && Z(e.s) && Z(e.l) && (o = me(e.s), a = me(e.l), n = Mn(e.h, o, a), l = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (t = e.a)), t = Tt(t), {
662
+ ok: l,
663
+ format: e.format || s,
664
+ r: Math.min(255, Math.max(n.r, 0)),
665
+ g: Math.min(255, Math.max(n.g, 0)),
666
+ b: Math.min(255, Math.max(n.b, 0)),
667
+ a: t
668
+ };
669
+ }
670
+ var Bn = "[-\\+]?\\d+%?", Dn = "[-\\+]?\\d*\\.\\d+%?", J = "(?:".concat(Dn, ")|(?:").concat(Bn, ")"), Ie = "[\\s|\\(]+(".concat(J, ")[,|\\s]+(").concat(J, ")[,|\\s]+(").concat(J, ")\\s*\\)?"), He = "[\\s|\\(]+(".concat(J, ")[,|\\s]+(").concat(J, ")[,|\\s]+(").concat(J, ")[,|\\s]+(").concat(J, ")\\s*\\)?"), W = {
671
+ CSS_UNIT: new RegExp(J),
672
+ rgb: new RegExp("rgb" + Ie),
673
+ rgba: new RegExp("rgba" + He),
674
+ hsl: new RegExp("hsl" + Ie),
675
+ hsla: new RegExp("hsla" + He),
676
+ hsv: new RegExp("hsv" + Ie),
677
+ hsva: new RegExp("hsva" + He),
678
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
679
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
680
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
681
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
682
+ };
683
+ function $n(e) {
684
+ if (e = e.trim().toLowerCase(), e.length === 0)
685
+ return !1;
686
+ var n = !1;
687
+ if (ze[e])
688
+ e = ze[e], n = !0;
689
+ else if (e === "transparent")
690
+ return { r: 0, g: 0, b: 0, a: 0, format: "name" };
691
+ var t = W.rgb.exec(e);
692
+ return t ? { r: t[1], g: t[2], b: t[3] } : (t = W.rgba.exec(e), t ? { r: t[1], g: t[2], b: t[3], a: t[4] } : (t = W.hsl.exec(e), t ? { h: t[1], s: t[2], l: t[3] } : (t = W.hsla.exec(e), t ? { h: t[1], s: t[2], l: t[3], a: t[4] } : (t = W.hsv.exec(e), t ? { h: t[1], s: t[2], v: t[3] } : (t = W.hsva.exec(e), t ? { h: t[1], s: t[2], v: t[3], a: t[4] } : (t = W.hex8.exec(e), t ? {
693
+ r: U(t[1]),
694
+ g: U(t[2]),
695
+ b: U(t[3]),
696
+ a: ct(t[4]),
697
+ format: n ? "name" : "hex8"
698
+ } : (t = W.hex6.exec(e), t ? {
699
+ r: U(t[1]),
700
+ g: U(t[2]),
701
+ b: U(t[3]),
702
+ format: n ? "name" : "hex"
703
+ } : (t = W.hex4.exec(e), t ? {
704
+ r: U(t[1] + t[1]),
705
+ g: U(t[2] + t[2]),
706
+ b: U(t[3] + t[3]),
707
+ a: ct(t[4] + t[4]),
708
+ format: n ? "name" : "hex8"
709
+ } : (t = W.hex3.exec(e), t ? {
710
+ r: U(t[1] + t[1]),
711
+ g: U(t[2] + t[2]),
712
+ b: U(t[3] + t[3]),
713
+ format: n ? "name" : "hex"
714
+ } : !1)))))))));
715
+ }
716
+ function Z(e) {
717
+ return !!W.CSS_UNIT.exec(String(e));
718
+ }
719
+ var q = (
720
+ /** @class */
721
+ function() {
722
+ function e(n, t) {
723
+ n === void 0 && (n = ""), t === void 0 && (t = {});
724
+ var o;
725
+ if (n instanceof e)
726
+ return n;
727
+ typeof n == "number" && (n = Hn(n)), this.originalInput = n;
728
+ var r = ne(n);
729
+ this.originalInput = n, this.r = r.r, this.g = r.g, this.b = r.b, this.a = r.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (o = t.format) !== null && o !== void 0 ? o : r.format, this.gradientType = t.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = r.ok;
730
+ }
731
+ return e.prototype.isDark = function() {
732
+ return this.getBrightness() < 128;
733
+ }, e.prototype.isLight = function() {
734
+ return !this.isDark();
735
+ }, e.prototype.getBrightness = function() {
736
+ var n = this.toRgb();
737
+ return (n.r * 299 + n.g * 587 + n.b * 114) / 1e3;
738
+ }, e.prototype.getLuminance = function() {
739
+ var n = this.toRgb(), t, o, r, a = n.r / 255, l = n.g / 255, s = n.b / 255;
740
+ return a <= 0.03928 ? t = a / 12.92 : t = Math.pow((a + 0.055) / 1.055, 2.4), l <= 0.03928 ? o = l / 12.92 : o = Math.pow((l + 0.055) / 1.055, 2.4), s <= 0.03928 ? r = s / 12.92 : r = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * t + 0.7152 * o + 0.0722 * r;
741
+ }, e.prototype.getAlpha = function() {
742
+ return this.a;
743
+ }, e.prototype.setAlpha = function(n) {
744
+ return this.a = Tt(n), this.roundA = Math.round(100 * this.a) / 100, this;
745
+ }, e.prototype.isMonochrome = function() {
746
+ var n = this.toHsl().s;
747
+ return n === 0;
748
+ }, e.prototype.toHsv = function() {
749
+ var n = Le(this.r, this.g, this.b);
750
+ return { h: n.h * 360, s: n.s, v: n.v, a: this.a };
751
+ }, e.prototype.toHsvString = function() {
752
+ var n = Le(this.r, this.g, this.b), t = Math.round(n.h * 360), o = Math.round(n.s * 100), r = Math.round(n.v * 100);
753
+ return this.a === 1 ? "hsv(".concat(t, ", ").concat(o, "%, ").concat(r, "%)") : "hsva(".concat(t, ", ").concat(o, "%, ").concat(r, "%, ").concat(this.roundA, ")");
754
+ }, e.prototype.toHsl = function() {
755
+ var n = st(this.r, this.g, this.b);
756
+ return { h: n.h * 360, s: n.s, l: n.l, a: this.a };
757
+ }, e.prototype.toHslString = function() {
758
+ var n = st(this.r, this.g, this.b), t = Math.round(n.h * 360), o = Math.round(n.s * 100), r = Math.round(n.l * 100);
759
+ return this.a === 1 ? "hsl(".concat(t, ", ").concat(o, "%, ").concat(r, "%)") : "hsla(".concat(t, ", ").concat(o, "%, ").concat(r, "%, ").concat(this.roundA, ")");
760
+ }, e.prototype.toHex = function(n) {
761
+ return n === void 0 && (n = !1), Oe(this.r, this.g, this.b, n);
762
+ }, e.prototype.toHexString = function(n) {
763
+ return n === void 0 && (n = !1), "#" + this.toHex(n);
764
+ }, e.prototype.toHex8 = function(n) {
765
+ return n === void 0 && (n = !1), Tn(this.r, this.g, this.b, this.a, n);
766
+ }, e.prototype.toHex8String = function(n) {
767
+ return n === void 0 && (n = !1), "#" + this.toHex8(n);
768
+ }, e.prototype.toHexShortString = function(n) {
769
+ return n === void 0 && (n = !1), this.a === 1 ? this.toHexString(n) : this.toHex8String(n);
770
+ }, e.prototype.toRgb = function() {
771
+ return {
772
+ r: Math.round(this.r),
773
+ g: Math.round(this.g),
774
+ b: Math.round(this.b),
775
+ a: this.a
776
+ };
777
+ }, e.prototype.toRgbString = function() {
778
+ var n = Math.round(this.r), t = Math.round(this.g), o = Math.round(this.b);
779
+ return this.a === 1 ? "rgb(".concat(n, ", ").concat(t, ", ").concat(o, ")") : "rgba(".concat(n, ", ").concat(t, ", ").concat(o, ", ").concat(this.roundA, ")");
780
+ }, e.prototype.toPercentageRgb = function() {
781
+ var n = function(t) {
782
+ return "".concat(Math.round(N(t, 255) * 100), "%");
783
+ };
784
+ return {
785
+ r: n(this.r),
786
+ g: n(this.g),
787
+ b: n(this.b),
788
+ a: this.a
789
+ };
790
+ }, e.prototype.toPercentageRgbString = function() {
791
+ var n = function(t) {
792
+ return Math.round(N(t, 255) * 100);
793
+ };
794
+ return this.a === 1 ? "rgb(".concat(n(this.r), "%, ").concat(n(this.g), "%, ").concat(n(this.b), "%)") : "rgba(".concat(n(this.r), "%, ").concat(n(this.g), "%, ").concat(n(this.b), "%, ").concat(this.roundA, ")");
795
+ }, e.prototype.toName = function() {
796
+ if (this.a === 0)
797
+ return "transparent";
798
+ if (this.a < 1)
799
+ return !1;
800
+ for (var n = "#" + Oe(this.r, this.g, this.b, !1), t = 0, o = Object.entries(ze); t < o.length; t++) {
801
+ var r = o[t], a = r[0], l = r[1];
802
+ if (n === l)
803
+ return a;
804
+ }
805
+ return !1;
806
+ }, e.prototype.toString = function(n) {
807
+ var t = !!n;
808
+ n = n ?? this.format;
809
+ var o = !1, r = this.a < 1 && this.a >= 0, a = !t && r && (n.startsWith("hex") || n === "name");
810
+ return a ? n === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (n === "rgb" && (o = this.toRgbString()), n === "prgb" && (o = this.toPercentageRgbString()), (n === "hex" || n === "hex6") && (o = this.toHexString()), n === "hex3" && (o = this.toHexString(!0)), n === "hex4" && (o = this.toHex8String(!0)), n === "hex8" && (o = this.toHex8String()), n === "name" && (o = this.toName()), n === "hsl" && (o = this.toHslString()), n === "hsv" && (o = this.toHsvString()), o || this.toHexString());
811
+ }, e.prototype.toNumber = function() {
812
+ return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
813
+ }, e.prototype.clone = function() {
814
+ return new e(this.toString());
815
+ }, e.prototype.lighten = function(n) {
816
+ n === void 0 && (n = 10);
817
+ var t = this.toHsl();
818
+ return t.l += n / 100, t.l = ve(t.l), new e(t);
819
+ }, e.prototype.brighten = function(n) {
820
+ n === void 0 && (n = 10);
821
+ var t = this.toRgb();
822
+ return t.r = Math.max(0, Math.min(255, t.r - Math.round(255 * -(n / 100)))), t.g = Math.max(0, Math.min(255, t.g - Math.round(255 * -(n / 100)))), t.b = Math.max(0, Math.min(255, t.b - Math.round(255 * -(n / 100)))), new e(t);
823
+ }, e.prototype.darken = function(n) {
824
+ n === void 0 && (n = 10);
825
+ var t = this.toHsl();
826
+ return t.l -= n / 100, t.l = ve(t.l), new e(t);
827
+ }, e.prototype.tint = function(n) {
828
+ return n === void 0 && (n = 10), this.mix("white", n);
829
+ }, e.prototype.shade = function(n) {
830
+ return n === void 0 && (n = 10), this.mix("black", n);
831
+ }, e.prototype.desaturate = function(n) {
832
+ n === void 0 && (n = 10);
833
+ var t = this.toHsl();
834
+ return t.s -= n / 100, t.s = ve(t.s), new e(t);
835
+ }, e.prototype.saturate = function(n) {
836
+ n === void 0 && (n = 10);
837
+ var t = this.toHsl();
838
+ return t.s += n / 100, t.s = ve(t.s), new e(t);
839
+ }, e.prototype.greyscale = function() {
840
+ return this.desaturate(100);
841
+ }, e.prototype.spin = function(n) {
842
+ var t = this.toHsl(), o = (t.h + n) % 360;
843
+ return t.h = o < 0 ? 360 + o : o, new e(t);
844
+ }, e.prototype.mix = function(n, t) {
845
+ t === void 0 && (t = 50);
846
+ var o = this.toRgb(), r = new e(n).toRgb(), a = t / 100, l = {
847
+ r: (r.r - o.r) * a + o.r,
848
+ g: (r.g - o.g) * a + o.g,
849
+ b: (r.b - o.b) * a + o.b,
850
+ a: (r.a - o.a) * a + o.a
851
+ };
852
+ return new e(l);
853
+ }, e.prototype.analogous = function(n, t) {
854
+ n === void 0 && (n = 6), t === void 0 && (t = 30);
855
+ var o = this.toHsl(), r = 360 / t, a = [this];
856
+ for (o.h = (o.h - (r * n >> 1) + 720) % 360; --n; )
857
+ o.h = (o.h + r) % 360, a.push(new e(o));
858
+ return a;
859
+ }, e.prototype.complement = function() {
860
+ var n = this.toHsl();
861
+ return n.h = (n.h + 180) % 360, new e(n);
862
+ }, e.prototype.monochromatic = function(n) {
863
+ n === void 0 && (n = 6);
864
+ for (var t = this.toHsv(), o = t.h, r = t.s, a = t.v, l = [], s = 1 / n; n--; )
865
+ l.push(new e({ h: o, s: r, v: a })), a = (a + s) % 1;
866
+ return l;
867
+ }, e.prototype.splitcomplement = function() {
868
+ var n = this.toHsl(), t = n.h;
869
+ return [
870
+ this,
871
+ new e({ h: (t + 72) % 360, s: n.s, l: n.l }),
872
+ new e({ h: (t + 216) % 360, s: n.s, l: n.l })
873
+ ];
874
+ }, e.prototype.onBackground = function(n) {
875
+ var t = this.toRgb(), o = new e(n).toRgb(), r = t.a + o.a * (1 - t.a);
876
+ return new e({
877
+ r: (t.r * t.a + o.r * o.a * (1 - t.a)) / r,
878
+ g: (t.g * t.a + o.g * o.a * (1 - t.a)) / r,
879
+ b: (t.b * t.a + o.b * o.a * (1 - t.a)) / r,
880
+ a: r
881
+ });
882
+ }, e.prototype.triad = function() {
883
+ return this.polyad(3);
884
+ }, e.prototype.tetrad = function() {
885
+ return this.polyad(4);
886
+ }, e.prototype.polyad = function(n) {
887
+ for (var t = this.toHsl(), o = t.h, r = [this], a = 360 / n, l = 1; l < n; l++)
888
+ r.push(new e({ h: (o + l * a) % 360, s: t.s, l: t.l }));
889
+ return r;
890
+ }, e.prototype.equals = function(n) {
891
+ return this.toRgbString() === new e(n).toRgbString();
892
+ }, e;
893
+ }()
894
+ ), be = 2, ut = 0.16, Fn = 0.05, Vn = 0.05, _n = 0.15, It = 5, Ht = 4, Rn = [{
895
+ index: 7,
896
+ opacity: 0.15
897
+ }, {
898
+ index: 6,
899
+ opacity: 0.25
900
+ }, {
901
+ index: 5,
902
+ opacity: 0.3
903
+ }, {
904
+ index: 5,
905
+ opacity: 0.45
906
+ }, {
907
+ index: 5,
908
+ opacity: 0.65
909
+ }, {
910
+ index: 5,
911
+ opacity: 0.85
912
+ }, {
913
+ index: 4,
914
+ opacity: 0.9
915
+ }, {
916
+ index: 3,
917
+ opacity: 0.95
918
+ }, {
919
+ index: 2,
920
+ opacity: 0.97
921
+ }, {
922
+ index: 1,
923
+ opacity: 0.98
924
+ }];
925
+ function dt(e) {
926
+ var n = e.r, t = e.g, o = e.b, r = Le(n, t, o);
927
+ return {
928
+ h: r.h * 360,
929
+ s: r.s,
930
+ v: r.v
931
+ };
932
+ }
933
+ function ye(e) {
934
+ var n = e.r, t = e.g, o = e.b;
935
+ return "#".concat(Oe(n, t, o, !1));
936
+ }
937
+ function Ln(e, n, t) {
938
+ var o = t / 100, r = {
939
+ r: (n.r - e.r) * o + e.r,
940
+ g: (n.g - e.g) * o + e.g,
941
+ b: (n.b - e.b) * o + e.b
942
+ };
943
+ return r;
944
+ }
945
+ function ft(e, n, t) {
946
+ var o;
947
+ return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? o = t ? Math.round(e.h) - be * n : Math.round(e.h) + be * n : o = t ? Math.round(e.h) + be * n : Math.round(e.h) - be * n, o < 0 ? o += 360 : o >= 360 && (o -= 360), o;
948
+ }
949
+ function pt(e, n, t) {
950
+ if (e.h === 0 && e.s === 0)
951
+ return e.s;
952
+ var o;
953
+ return t ? o = e.s - ut * n : n === Ht ? o = e.s + ut : o = e.s + Fn * n, o > 1 && (o = 1), t && n === It && o > 0.1 && (o = 0.1), o < 0.06 && (o = 0.06), Number(o.toFixed(2));
954
+ }
955
+ function gt(e, n, t) {
956
+ var o;
957
+ return t ? o = e.v + Vn * n : o = e.v - _n * n, o > 1 && (o = 1), Number(o.toFixed(2));
958
+ }
959
+ function Ce(e) {
960
+ for (var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = [], o = ne(e), r = It; r > 0; r -= 1) {
961
+ var a = dt(o), l = ye(ne({
962
+ h: ft(a, r, !0),
963
+ s: pt(a, r, !0),
964
+ v: gt(a, r, !0)
965
+ }));
966
+ t.push(l);
967
+ }
968
+ t.push(ye(o));
969
+ for (var s = 1; s <= Ht; s += 1) {
970
+ var h = dt(o), m = ye(ne({
971
+ h: ft(h, s),
972
+ s: pt(h, s),
973
+ v: gt(h, s)
974
+ }));
975
+ t.push(m);
976
+ }
977
+ return n.theme === "dark" ? Rn.map(function(u) {
978
+ var p = u.index, x = u.opacity, v = ye(Ln(ne(n.backgroundColor || "#141414"), ne(t[p]), x * 100));
979
+ return v;
980
+ }) : t;
981
+ }
982
+ var Be = {
983
+ red: "#F5222D",
984
+ volcano: "#FA541C",
985
+ orange: "#FA8C16",
986
+ gold: "#FAAD14",
987
+ yellow: "#FADB14",
988
+ lime: "#A0D911",
989
+ green: "#52C41A",
990
+ cyan: "#13C2C2",
991
+ blue: "#1890FF",
992
+ geekblue: "#2F54EB",
993
+ purple: "#722ED1",
994
+ magenta: "#EB2F96",
995
+ grey: "#666666"
996
+ }, De = {}, $e = {};
997
+ Object.keys(Be).forEach(function(e) {
998
+ De[e] = Ce(Be[e]), De[e].primary = De[e][5], $e[e] = Ce(Be[e], {
999
+ theme: "dark",
1000
+ backgroundColor: "#141414"
1001
+ }), $e[e].primary = $e[e][5];
1002
+ });
1003
+ const On = (e) => {
1004
+ const {
1005
+ controlHeight: n
1006
+ } = e;
1007
+ return {
1008
+ controlHeightSM: n * 0.75,
1009
+ controlHeightXS: n * 0.5,
1010
+ controlHeightLG: n * 1.25
1011
+ };
1012
+ };
1013
+ function zn(e) {
1014
+ const {
1015
+ sizeUnit: n,
1016
+ sizeStep: t
1017
+ } = e;
1018
+ return {
1019
+ sizeXXL: n * (t + 8),
1020
+ // 48
1021
+ sizeXL: n * (t + 4),
1022
+ // 32
1023
+ sizeLG: n * (t + 2),
1024
+ // 24
1025
+ sizeMD: n * (t + 1),
1026
+ // 20
1027
+ sizeMS: n * t,
1028
+ // 16
1029
+ size: n * t,
1030
+ // 16
1031
+ sizeSM: n * (t - 1),
1032
+ // 12
1033
+ sizeXS: n * (t - 2),
1034
+ // 8
1035
+ sizeXXS: n * (t - 3)
1036
+ // 4
1037
+ };
1038
+ }
1039
+ const Bt = {
1040
+ blue: "#1677ff",
1041
+ purple: "#722ED1",
1042
+ cyan: "#13C2C2",
1043
+ green: "#52C41A",
1044
+ magenta: "#EB2F96",
1045
+ pink: "#eb2f96",
1046
+ red: "#F5222D",
1047
+ orange: "#FA8C16",
1048
+ yellow: "#FADB14",
1049
+ volcano: "#FA541C",
1050
+ geekblue: "#2F54EB",
1051
+ gold: "#FAAD14",
1052
+ lime: "#A0D911"
1053
+ }, Ke = M(M({}, Bt), {
1054
+ // Color
1055
+ colorPrimary: "#1677ff",
1056
+ colorSuccess: "#52c41a",
1057
+ colorWarning: "#faad14",
1058
+ colorError: "#ff4d4f",
1059
+ colorInfo: "#1677ff",
1060
+ colorTextBase: "",
1061
+ colorBgBase: "",
1062
+ // Font
1063
+ fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
1064
+ 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
1065
+ 'Noto Color Emoji'`,
1066
+ fontSize: 14,
1067
+ // Line
1068
+ lineWidth: 1,
1069
+ lineType: "solid",
1070
+ // Motion
1071
+ motionUnit: 0.1,
1072
+ motionBase: 0,
1073
+ motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
1074
+ motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
1075
+ motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
1076
+ motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
1077
+ motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
1078
+ motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
1079
+ motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
1080
+ motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
1081
+ // Radius
1082
+ borderRadius: 6,
1083
+ // Size
1084
+ sizeUnit: 4,
1085
+ sizeStep: 4,
1086
+ sizePopupArrow: 16,
1087
+ // Control Base
1088
+ controlHeight: 32,
1089
+ // zIndex
1090
+ zIndexBase: 0,
1091
+ zIndexPopupBase: 1e3,
1092
+ // Image
1093
+ opacityImage: 1,
1094
+ // Wireframe
1095
+ wireframe: !1
1096
+ });
1097
+ function Pn(e, {
1098
+ generateColorPalettes: n,
1099
+ generateNeutralColorPalettes: t
1100
+ }) {
1101
+ const {
1102
+ colorSuccess: o,
1103
+ colorWarning: r,
1104
+ colorError: a,
1105
+ colorInfo: l,
1106
+ colorPrimary: s,
1107
+ colorBgBase: h,
1108
+ colorTextBase: m
1109
+ } = e, u = n(s), p = n(o), x = n(r), v = n(a), i = n(l), b = t(h, m);
1110
+ return M(M({}, b), {
1111
+ colorPrimaryBg: u[1],
1112
+ colorPrimaryBgHover: u[2],
1113
+ colorPrimaryBorder: u[3],
1114
+ colorPrimaryBorderHover: u[4],
1115
+ colorPrimaryHover: u[5],
1116
+ colorPrimary: u[6],
1117
+ colorPrimaryActive: u[7],
1118
+ colorPrimaryTextHover: u[8],
1119
+ colorPrimaryText: u[9],
1120
+ colorPrimaryTextActive: u[10],
1121
+ colorSuccessBg: p[1],
1122
+ colorSuccessBgHover: p[2],
1123
+ colorSuccessBorder: p[3],
1124
+ colorSuccessBorderHover: p[4],
1125
+ colorSuccessHover: p[4],
1126
+ colorSuccess: p[6],
1127
+ colorSuccessActive: p[7],
1128
+ colorSuccessTextHover: p[8],
1129
+ colorSuccessText: p[9],
1130
+ colorSuccessTextActive: p[10],
1131
+ colorErrorBg: v[1],
1132
+ colorErrorBgHover: v[2],
1133
+ colorErrorBorder: v[3],
1134
+ colorErrorBorderHover: v[4],
1135
+ colorErrorHover: v[5],
1136
+ colorError: v[6],
1137
+ colorErrorActive: v[7],
1138
+ colorErrorTextHover: v[8],
1139
+ colorErrorText: v[9],
1140
+ colorErrorTextActive: v[10],
1141
+ colorWarningBg: x[1],
1142
+ colorWarningBgHover: x[2],
1143
+ colorWarningBorder: x[3],
1144
+ colorWarningBorderHover: x[4],
1145
+ colorWarningHover: x[4],
1146
+ colorWarning: x[6],
1147
+ colorWarningActive: x[7],
1148
+ colorWarningTextHover: x[8],
1149
+ colorWarningText: x[9],
1150
+ colorWarningTextActive: x[10],
1151
+ colorInfoBg: i[1],
1152
+ colorInfoBgHover: i[2],
1153
+ colorInfoBorder: i[3],
1154
+ colorInfoBorderHover: i[4],
1155
+ colorInfoHover: i[4],
1156
+ colorInfo: i[6],
1157
+ colorInfoActive: i[7],
1158
+ colorInfoTextHover: i[8],
1159
+ colorInfoText: i[9],
1160
+ colorInfoTextActive: i[10],
1161
+ colorBgMask: new q("#000").setAlpha(0.45).toRgbString(),
1162
+ colorWhite: "#fff"
1163
+ });
1164
+ }
1165
+ const Nn = (e) => {
1166
+ let n = e, t = e, o = e, r = e;
1167
+ return e < 6 && e >= 5 ? n = e + 1 : e < 16 && e >= 6 ? n = e + 2 : e >= 16 && (n = 16), e < 7 && e >= 5 ? t = 4 : e < 8 && e >= 7 ? t = 5 : e < 14 && e >= 8 ? t = 6 : e < 16 && e >= 14 ? t = 7 : e >= 16 && (t = 8), e < 6 && e >= 2 ? o = 1 : e >= 6 && (o = 2), e > 4 && e < 8 ? r = 4 : e >= 8 && (r = 6), {
1168
+ borderRadius: e > 16 ? 16 : e,
1169
+ borderRadiusXS: o,
1170
+ borderRadiusSM: t,
1171
+ borderRadiusLG: n,
1172
+ borderRadiusOuter: r
1173
+ };
1174
+ };
1175
+ function jn(e) {
1176
+ const {
1177
+ motionUnit: n,
1178
+ motionBase: t,
1179
+ borderRadius: o,
1180
+ lineWidth: r
1181
+ } = e;
1182
+ return M({
1183
+ // motion
1184
+ motionDurationFast: `${(t + n).toFixed(1)}s`,
1185
+ motionDurationMid: `${(t + n * 2).toFixed(1)}s`,
1186
+ motionDurationSlow: `${(t + n * 3).toFixed(1)}s`,
1187
+ // line
1188
+ lineWidthBold: r + 1
1189
+ }, Nn(o));
1190
+ }
1191
+ const Q = (e, n) => new q(e).setAlpha(n).toRgbString(), ue = (e, n) => new q(e).darken(n).toHexString(), Un = (e) => {
1192
+ const n = Ce(e);
1193
+ return {
1194
+ 1: n[0],
1195
+ 2: n[1],
1196
+ 3: n[2],
1197
+ 4: n[3],
1198
+ 5: n[4],
1199
+ 6: n[5],
1200
+ 7: n[6],
1201
+ 8: n[4],
1202
+ 9: n[5],
1203
+ 10: n[6]
1204
+ // 8: colors[7],
1205
+ // 9: colors[8],
1206
+ // 10: colors[9],
1207
+ };
1208
+ }, Xn = (e, n) => {
1209
+ const t = e || "#fff", o = n || "#000";
1210
+ return {
1211
+ colorBgBase: t,
1212
+ colorTextBase: o,
1213
+ colorText: Q(o, 0.88),
1214
+ colorTextSecondary: Q(o, 0.65),
1215
+ colorTextTertiary: Q(o, 0.45),
1216
+ colorTextQuaternary: Q(o, 0.25),
1217
+ colorFill: Q(o, 0.15),
1218
+ colorFillSecondary: Q(o, 0.06),
1219
+ colorFillTertiary: Q(o, 0.04),
1220
+ colorFillQuaternary: Q(o, 0.02),
1221
+ colorBgLayout: ue(t, 4),
1222
+ colorBgContainer: ue(t, 0),
1223
+ colorBgElevated: ue(t, 0),
1224
+ colorBgSpotlight: Q(o, 0.85),
1225
+ colorBorder: ue(t, 15),
1226
+ colorBorderSecondary: ue(t, 6)
1227
+ };
1228
+ };
1229
+ function Gn(e) {
1230
+ const n = new Array(10).fill(null).map((t, o) => {
1231
+ const r = o - 1, a = e * Math.pow(2.71828, r / 5), l = o > 1 ? Math.floor(a) : Math.ceil(a);
1232
+ return Math.floor(l / 2) * 2;
1233
+ });
1234
+ return n[1] = e, n.map((t) => {
1235
+ const o = t + 8;
1236
+ return {
1237
+ size: t,
1238
+ lineHeight: o / t
1239
+ };
1240
+ });
1241
+ }
1242
+ const Wn = (e) => {
1243
+ const n = Gn(e), t = n.map((r) => r.size), o = n.map((r) => r.lineHeight);
1244
+ return {
1245
+ fontSizeSM: t[0],
1246
+ fontSize: t[1],
1247
+ fontSizeLG: t[2],
1248
+ fontSizeXL: t[3],
1249
+ fontSizeHeading1: t[6],
1250
+ fontSizeHeading2: t[5],
1251
+ fontSizeHeading3: t[4],
1252
+ fontSizeHeading4: t[3],
1253
+ fontSizeHeading5: t[2],
1254
+ lineHeight: o[1],
1255
+ lineHeightLG: o[2],
1256
+ lineHeightSM: o[0],
1257
+ lineHeightHeading1: o[6],
1258
+ lineHeightHeading2: o[5],
1259
+ lineHeightHeading3: o[4],
1260
+ lineHeightHeading4: o[3],
1261
+ lineHeightHeading5: o[2]
1262
+ };
1263
+ };
1264
+ function qn(e) {
1265
+ const n = Object.keys(Bt).map((t) => {
1266
+ const o = Ce(e[t]);
1267
+ return new Array(10).fill(1).reduce((r, a, l) => (r[`${t}-${l + 1}`] = o[l], r), {});
1268
+ }).reduce((t, o) => (t = M(M({}, t), o), t), {});
1269
+ return M(M(M(M(M(M(M({}, e), n), Pn(e, {
1270
+ generateColorPalettes: Un,
1271
+ generateNeutralColorPalettes: Xn
1272
+ })), Wn(e.fontSize)), zn(e)), On(e)), jn(e));
1273
+ }
1274
+ function Fe(e) {
1275
+ return e >= 0 && e <= 255;
1276
+ }
1277
+ function xe(e, n) {
1278
+ const {
1279
+ r: t,
1280
+ g: o,
1281
+ b: r,
1282
+ a
1283
+ } = new q(e).toRgb();
1284
+ if (a < 1)
1285
+ return e;
1286
+ const {
1287
+ r: l,
1288
+ g: s,
1289
+ b: h
1290
+ } = new q(n).toRgb();
1291
+ for (let m = 0.01; m <= 1; m += 0.01) {
1292
+ const u = Math.round((t - l * (1 - m)) / m), p = Math.round((o - s * (1 - m)) / m), x = Math.round((r - h * (1 - m)) / m);
1293
+ if (Fe(u) && Fe(p) && Fe(x))
1294
+ return new q({
1295
+ r: u,
1296
+ g: p,
1297
+ b: x,
1298
+ a: Math.round(m * 100) / 100
1299
+ }).toRgbString();
1300
+ }
1301
+ return new q({
1302
+ r: t,
1303
+ g: o,
1304
+ b: r,
1305
+ a: 1
1306
+ }).toRgbString();
1307
+ }
1308
+ var Kn = function(e, n) {
1309
+ var t = {};
1310
+ for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
1311
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
1312
+ n.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (t[o[r]] = e[o[r]]);
1313
+ return t;
1314
+ };
1315
+ function Zn(e) {
1316
+ const {
1317
+ override: n
1318
+ } = e, t = Kn(e, ["override"]), o = M({}, n);
1319
+ Object.keys(Ke).forEach((v) => {
1320
+ delete o[v];
1321
+ });
1322
+ const r = M(M({}, t), o), a = 480, l = 576, s = 768, h = 992, m = 1200, u = 1600, p = 2e3;
1323
+ return M(M(M({}, r), {
1324
+ colorLink: r.colorInfoText,
1325
+ colorLinkHover: r.colorInfoHover,
1326
+ colorLinkActive: r.colorInfoActive,
1327
+ // ============== Background ============== //
1328
+ colorFillContent: r.colorFillSecondary,
1329
+ colorFillContentHover: r.colorFill,
1330
+ colorFillAlter: r.colorFillQuaternary,
1331
+ colorBgContainerDisabled: r.colorFillTertiary,
1332
+ // ============== Split ============== //
1333
+ colorBorderBg: r.colorBgContainer,
1334
+ colorSplit: xe(r.colorBorderSecondary, r.colorBgContainer),
1335
+ // ============== Text ============== //
1336
+ colorTextPlaceholder: r.colorTextQuaternary,
1337
+ colorTextDisabled: r.colorTextQuaternary,
1338
+ colorTextHeading: r.colorText,
1339
+ colorTextLabel: r.colorTextSecondary,
1340
+ colorTextDescription: r.colorTextTertiary,
1341
+ colorTextLightSolid: r.colorWhite,
1342
+ colorHighlight: r.colorError,
1343
+ colorBgTextHover: r.colorFillSecondary,
1344
+ colorBgTextActive: r.colorFill,
1345
+ colorIcon: r.colorTextTertiary,
1346
+ colorIconHover: r.colorText,
1347
+ colorErrorOutline: xe(r.colorErrorBg, r.colorBgContainer),
1348
+ colorWarningOutline: xe(r.colorWarningBg, r.colorBgContainer),
1349
+ /** Custom colors (efko) */
1350
+ colorLogo: r.colorLogo,
1351
+ colorSelectedMenu: r.colorSelectedMenu,
1352
+ mainBgColor: r.mainBgColor,
1353
+ // Font
1354
+ fontSizeIcon: r.fontSizeSM,
1355
+ // Control
1356
+ lineWidth: r.lineWidth,
1357
+ controlOutlineWidth: r.lineWidth * 2,
1358
+ // Checkbox size and expand icon size
1359
+ controlInteractiveSize: r.controlHeight / 2,
1360
+ controlItemBgHover: r.colorFillTertiary,
1361
+ controlItemBgActive: r.colorPrimaryBg,
1362
+ controlItemBgActiveHover: r.colorPrimaryBgHover,
1363
+ controlItemBgActiveDisabled: r.colorFill,
1364
+ controlTmpOutline: r.colorFillQuaternary,
1365
+ controlOutline: xe(r.colorPrimaryBg, r.colorBgContainer),
1366
+ lineType: r.lineType,
1367
+ borderRadius: r.borderRadius,
1368
+ borderRadiusXS: r.borderRadiusXS,
1369
+ borderRadiusSM: r.borderRadiusSM,
1370
+ borderRadiusLG: r.borderRadiusLG,
1371
+ fontWeightStrong: 600,
1372
+ opacityLoading: 0.65,
1373
+ linkDecoration: "none",
1374
+ linkHoverDecoration: "none",
1375
+ linkFocusDecoration: "none",
1376
+ controlPaddingHorizontal: 12,
1377
+ controlPaddingHorizontalSM: 8,
1378
+ paddingXXS: r.sizeXXS,
1379
+ paddingXS: r.sizeXS,
1380
+ paddingSM: r.sizeSM,
1381
+ padding: r.size,
1382
+ paddingMD: r.sizeMD,
1383
+ paddingLG: r.sizeLG,
1384
+ paddingXL: r.sizeXL,
1385
+ paddingContentHorizontalLG: r.sizeLG,
1386
+ paddingContentVerticalLG: r.sizeMS,
1387
+ paddingContentHorizontal: r.sizeMS,
1388
+ paddingContentVertical: r.sizeSM,
1389
+ paddingContentHorizontalSM: r.size,
1390
+ paddingContentVerticalSM: r.sizeXS,
1391
+ marginXXS: r.sizeXXS,
1392
+ marginXS: r.sizeXS,
1393
+ marginSM: r.sizeSM,
1394
+ margin: r.size,
1395
+ marginMD: r.sizeMD,
1396
+ marginLG: r.sizeLG,
1397
+ marginXL: r.sizeXL,
1398
+ marginXXL: r.sizeXXL,
1399
+ boxShadow: `
1400
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
1401
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
1402
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
1403
+ `,
1404
+ boxShadowSecondary: `
1405
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
1406
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
1407
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
1408
+ `,
1409
+ boxShadowTertiary: `
1410
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
1411
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
1412
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
1413
+ `,
1414
+ screenXS: a,
1415
+ screenXSMin: a,
1416
+ screenXSMax: l - 1,
1417
+ screenSM: l,
1418
+ screenSMMin: l,
1419
+ screenSMMax: s - 1,
1420
+ screenMD: s,
1421
+ screenMDMin: s,
1422
+ screenMDMax: h - 1,
1423
+ screenLG: h,
1424
+ screenLGMin: h,
1425
+ screenLGMax: m - 1,
1426
+ screenXL: m,
1427
+ screenXLMin: m,
1428
+ screenXLMax: u - 1,
1429
+ screenXXL: u,
1430
+ screenXXLMin: u,
1431
+ screenXXLMax: p - 1,
1432
+ screenXXXL: p,
1433
+ screenXXXLMin: p,
1434
+ // FIXME: component box-shadow, should be removed
1435
+ boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
1436
+ boxShadowCard: `
1437
+ 0 1px 2px -2px ${new q("rgba(0, 0, 0, 0.16)").toRgbString()},
1438
+ 0 3px 6px 0 ${new q("rgba(0, 0, 0, 0.12)").toRgbString()},
1439
+ 0 5px 12px 4px ${new q("rgba(0, 0, 0, 0.09)").toRgbString()}
1440
+ `,
1441
+ boxShadowDrawerRight: `
1442
+ -6px 0 16px 0 rgba(0, 0, 0, 0.08),
1443
+ -3px 0 6px -4px rgba(0, 0, 0, 0.12),
1444
+ -9px 0 28px 8px rgba(0, 0, 0, 0.05)
1445
+ `,
1446
+ boxShadowDrawerLeft: `
1447
+ 6px 0 16px 0 rgba(0, 0, 0, 0.08),
1448
+ 3px 0 6px -4px rgba(0, 0, 0, 0.12),
1449
+ 9px 0 28px 8px rgba(0, 0, 0, 0.05)
1450
+ `,
1451
+ boxShadowDrawerUp: `
1452
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
1453
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
1454
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
1455
+ `,
1456
+ boxShadowDrawerDown: `
1457
+ 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
1458
+ 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
1459
+ 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
1460
+ `,
1461
+ boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
1462
+ boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
1463
+ boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
1464
+ boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
1465
+ }), o);
1466
+ }
1467
+ const Qn = dn(qn), Jn = {
1468
+ token: Ke,
1469
+ hashed: !0
1470
+ }, Dt = Symbol("DesignTokenContext"), Pe = fe(), Yn = (e) => {
1471
+ vt(Dt, e), B(e, () => {
1472
+ Pe.value = $(e), zt(Pe);
1473
+ }, {
1474
+ immediate: !0,
1475
+ deep: !0
1476
+ });
1477
+ };
1478
+ z({
1479
+ props: {
1480
+ value: At()
1481
+ },
1482
+ setup(e, {
1483
+ slots: n
1484
+ }) {
1485
+ return Yn(E(() => e.value)), () => {
1486
+ var t;
1487
+ return (t = n.default) === null || t === void 0 ? void 0 : t.call(n);
1488
+ };
1489
+ }
1490
+ });
1491
+ function $t() {
1492
+ const e = ht(Dt, E(() => Pe.value || Jn)), n = E(() => `${Cn}-${e.value.hashed || ""}`), t = E(() => e.value.theme || Qn), o = Sn(t, E(() => [Ke, e.value.token]), E(() => ({
1493
+ salt: n.value,
1494
+ override: M({
1495
+ override: e.value.token
1496
+ }, e.value.components),
1497
+ formatToken: Zn
1498
+ })));
1499
+ return [t, E(() => o.value[0]), E(() => e.value.hashed ? o.value[1] : "")];
1500
+ }
1501
+ const eo = { class: "d-flex flex-wrap tag-cloud" }, to = { class: "d-flex flex-wrap" }, no = /* @__PURE__ */ z({
1502
+ __name: "FilterTagCloud",
1503
+ props: {
1504
+ filters: {}
1505
+ },
1506
+ emits: ["update:filters", "remove", "clear"],
1507
+ setup(e, { emit: n }) {
1508
+ const t = e, o = n, [, r] = $t(), a = E(() => ({
1509
+ color: r.value.colorSelectedMenu,
1510
+ borderColor: r.value.colorBorderSecondary,
1511
+ backgroundColor: r.value.mainBgColor || r.value.colorPrimaryBg
1512
+ })), l = (i) => i == null ? !1 : Array.isArray(i) ? i.length > 0 : !!i, s = E(() => Object.values(t.filters).some(l));
1513
+ function h(i) {
1514
+ return typeof i == "object" && i !== null && "name" in i && typeof i.name == "string";
1515
+ }
1516
+ const m = (i) => {
1517
+ if (typeof i == "string")
1518
+ return {
1519
+ key: i,
1520
+ label: i,
1521
+ original: i
1522
+ };
1523
+ if (Array.isArray(i)) {
1524
+ if (i.length === 2 && typeof i[0] == "string" && typeof i[1] == "string") {
1525
+ const c = `${i[0]} - ${i[1]}`;
1526
+ return {
1527
+ key: c,
1528
+ label: c,
1529
+ original: i
1530
+ };
1531
+ }
1532
+ const k = i.join(", ");
1533
+ return {
1534
+ key: k,
1535
+ label: k,
1536
+ original: i
1537
+ };
1538
+ }
1539
+ if (h(i)) {
1540
+ const k = i.name;
1541
+ return {
1542
+ key: k,
1543
+ label: k,
1544
+ original: i
1545
+ };
1546
+ }
1547
+ const b = JSON.stringify(i);
1548
+ return {
1549
+ key: b,
1550
+ label: b,
1551
+ original: i
1552
+ };
1553
+ }, u = (i) => i == null ? [] : Array.isArray(i) ? i.map((b) => m(b)) : [
1554
+ m(i)
1555
+ ], p = (i, b) => typeof i == "string" || typeof b == "string" ? i === b : JSON.stringify(i) === JSON.stringify(b), x = (i, b, k) => {
1556
+ if (Array.isArray(b)) {
1557
+ const c = b.filter(
1558
+ (f) => !p(f, k)
1559
+ );
1560
+ o("update:filters", {
1561
+ ...t.filters,
1562
+ [i]: c
1563
+ });
1564
+ } else
1565
+ o("update:filters", {
1566
+ ...t.filters,
1567
+ [i]: null
1568
+ });
1569
+ o("remove", i, b, k);
1570
+ }, v = () => {
1571
+ o("update:filters", {}), o("clear");
1572
+ };
1573
+ return (i, b) => {
1574
+ const k = T("a-tag"), c = T("a-button");
1575
+ return g(), S("div", eo, [
1576
+ L("div", to, [
1577
+ (g(!0), S(D, null, G(Object.entries(e.filters), ([f, d]) => (g(), S(D, { key: f }, [
1578
+ (g(!0), S(D, null, G(u(d), (H) => (g(), I(k, {
1579
+ key: H.key,
1580
+ class: "filter-tag",
1581
+ closable: !0,
1582
+ style: Ve(a.value),
1583
+ onClose: () => x(f, d, H.original)
1584
+ }, {
1585
+ default: C(() => [
1586
+ _(P(H.label), 1)
1587
+ ]),
1588
+ _: 2
1589
+ }, 1032, ["style", "onClose"]))), 128))
1590
+ ], 64))), 128))
1591
+ ]),
1592
+ s.value ? (g(), I(c, {
1593
+ key: 0,
1594
+ type: "link",
1595
+ onClick: v
1596
+ }, {
1597
+ default: C(() => [...b[0] || (b[0] = [
1598
+ _(" Очистить все ", -1)
1599
+ ])]),
1600
+ _: 1
1601
+ })) : j("", !0)
1602
+ ]);
1603
+ };
1604
+ }
1605
+ }), ie = (e, n) => {
1606
+ const t = e.__vccOpts || e;
1607
+ for (const [o, r] of n)
1608
+ t[o] = r;
1609
+ return t;
1610
+ }, oo = /* @__PURE__ */ ie(no, [["__scopeId", "data-v-0e8e5dd7"]]), ro = { class: "d-flex align-items-center justify-content-center fs-5" }, Ae = /* @__PURE__ */ z({
1611
+ __name: "TableCellStatus",
1612
+ props: {
1613
+ value: {}
1614
+ },
1615
+ setup(e) {
1616
+ return (n, t) => (g(), S("div", ro, [
1617
+ e.value ? (g(), I($(tt), {
1618
+ key: 1,
1619
+ "two-tone-color": "#bfbfbf"
1620
+ })) : (g(), I($(tt), {
1621
+ key: 0,
1622
+ "two-tone-color": "#4ade80"
1623
+ }))
1624
+ ]));
1625
+ }
1626
+ }), ao = { class: "flex items-center justify-center gap-2" }, io = /* @__PURE__ */ z({
1627
+ __name: "CardCellActions",
1628
+ props: {
1629
+ record: {},
1630
+ canEdit: { type: Boolean },
1631
+ editAction: { type: Boolean }
1632
+ },
1633
+ emits: ["edit", "delete", "restore"],
1634
+ setup(e, { emit: n }) {
1635
+ const t = e, o = n, r = t.canEdit ?? !0, a = t.editAction ?? !0, l = (m) => o("delete", m), s = (m) => o("restore", m), h = (m) => o("edit", m);
1636
+ return (m, u) => {
1637
+ const p = T("a-button"), x = T("a-tooltip");
1638
+ return g(), S("div", ao, [
1639
+ $(r) === !1 ? (g(), I(x, {
1640
+ key: 0,
1641
+ title: "Смотреть"
1642
+ }, {
1643
+ default: C(() => [
1644
+ A(p, {
1645
+ icon: oe($(bt)),
1646
+ onClick: u[0] || (u[0] = (v) => h(e.record))
1647
+ }, null, 8, ["icon"])
1648
+ ]),
1649
+ _: 1
1650
+ })) : j("", !0),
1651
+ $(r) !== !1 ? (g(), S(D, { key: 1 }, [
1652
+ $(a) !== !1 ? (g(), I(x, {
1653
+ key: 0,
1654
+ title: "Редактировать"
1655
+ }, {
1656
+ default: C(() => [
1657
+ A(p, {
1658
+ icon: oe($(yt)),
1659
+ onClick: u[1] || (u[1] = (v) => h(e.record))
1660
+ }, null, 8, ["icon"])
1661
+ ]),
1662
+ _: 1
1663
+ })) : j("", !0),
1664
+ A(x, {
1665
+ title: e.record.deletedAt ? "Восстановить" : "Удалить"
1666
+ }, {
1667
+ default: C(() => [
1668
+ A(p, {
1669
+ icon: oe(e.record.deletedAt ? $(xt) : $(St)),
1670
+ onClick: u[2] || (u[2] = (v) => e.record.deletedAt ? s(e.record) : l(e.record))
1671
+ }, null, 8, ["icon"])
1672
+ ]),
1673
+ _: 1
1674
+ }, 8, ["title"])
1675
+ ], 64)) : j("", !0)
1676
+ ]);
1677
+ };
1678
+ }
1679
+ }), lo = { class: "data-card__header" }, so = { class: "data-card__body" }, co = { class: "data-card__label" }, uo = { class: "data-card__value" }, fo = { key: 0 }, po = { key: 2 }, go = { key: 3 }, ho = { key: 4 }, vo = { key: 5 }, mo = {
1680
+ key: 0,
1681
+ class: "data-card__footer"
1682
+ }, bo = /* @__PURE__ */ z({
1683
+ __name: "TheCard",
1684
+ props: {
1685
+ loading: { type: Boolean },
1686
+ record: {},
1687
+ columns: {},
1688
+ canEdit: { type: Boolean },
1689
+ editAction: { type: Boolean },
1690
+ showActionsColumn: { type: Boolean }
1691
+ },
1692
+ emits: ["delete", "restore", "edit"],
1693
+ setup(e, { emit: n }) {
1694
+ const t = e, o = (v) => t.record[String(v.dataIndex)], r = (v) => {
1695
+ const i = o(v);
1696
+ return Array.isArray(i) ? i : [];
1697
+ }, a = (v) => {
1698
+ if (v === null || typeof v != "object")
1699
+ return "";
1700
+ if ("name" in v) {
1701
+ const i = v.name;
1702
+ return typeof i == "string" ? i : "";
1703
+ }
1704
+ return "";
1705
+ }, l = n, s = t.canEdit ?? !0, h = t.editAction ?? !0, m = t.showActionsColumn ?? !0, u = (v) => l("delete", v), p = (v) => l("restore", v), x = (v) => l("edit", v);
1706
+ return (v, i) => {
1707
+ const b = T("a-tag"), k = T("a-card");
1708
+ return g(), I(k, {
1709
+ loading: e.loading,
1710
+ bordered: !1,
1711
+ class: "data-card bg-white rounded-3 shadow-sm"
1712
+ }, we({
1713
+ title: C(() => [
1714
+ L("div", lo, [
1715
+ R(v.$slots, "title", {}, void 0, !0)
1716
+ ])
1717
+ ]),
1718
+ default: C(() => [
1719
+ L("div", so, [
1720
+ R(v.$slots, "body", {
1721
+ record: e.record,
1722
+ columns: e.columns
1723
+ }, () => [
1724
+ (g(!0), S(D, null, G(e.columns, (c) => (g(), S("div", {
1725
+ key: c.dataIndex,
1726
+ class: "data-card__row"
1727
+ }, [
1728
+ L("span", co, P(c.title) + ": ", 1),
1729
+ L("span", uo, [
1730
+ c.dataIndex === "deletedAt" ? (g(), S("span", fo, [
1731
+ A(Ae, {
1732
+ value: e.record.deletedAt
1733
+ }, null, 8, ["value"])
1734
+ ])) : Array.isArray(o(c)) ? (g(), S(D, { key: 1 }, [
1735
+ c.tag === !0 ? (g(!0), S(D, { key: 0 }, G(r(c), (f, d) => (g(), I(b, {
1736
+ key: d,
1737
+ class: "me-1 mb-1"
1738
+ }, {
1739
+ default: C(() => [
1740
+ _(P(typeof f == "object" ? a(f) : f), 1)
1741
+ ]),
1742
+ _: 2
1743
+ }, 1024))), 128)) : (g(!0), S(D, { key: 1 }, G(r(c), (f, d) => (g(), S("span", { key: d }, [
1744
+ typeof f == "object" ? (g(), S(D, { key: 0 }, [
1745
+ _(P(a(f)), 1)
1746
+ ], 64)) : (g(), S(D, { key: 1 }, [
1747
+ _(P(f), 1)
1748
+ ], 64)),
1749
+ d < r(c).length - 1 ? (g(), S(D, { key: 2 }, [
1750
+ _(" , ")
1751
+ ], 64)) : j("", !0)
1752
+ ]))), 128))
1753
+ ], 64)) : typeof o(c) == "boolean" ? (g(), S("span", po, [
1754
+ A(Ae, {
1755
+ value: !o(c)
1756
+ }, null, 8, ["value"])
1757
+ ])) : o(c) !== null && typeof o(c) == "object" ? (g(), S("span", go, P(a(o(c))), 1)) : c.tag === !0 ? (g(), S("span", ho, [
1758
+ A(b, null, {
1759
+ default: C(() => [
1760
+ _(P(o(c)), 1)
1761
+ ]),
1762
+ _: 2
1763
+ }, 1024)
1764
+ ])) : (g(), S("span", vo, P(o(c)), 1))
1765
+ ])
1766
+ ]))), 128))
1767
+ ], !0)
1768
+ ]),
1769
+ v.$slots.footer ? (g(), S("div", mo, [
1770
+ R(v.$slots, "footer", {
1771
+ record: e.record,
1772
+ columns: e.columns
1773
+ }, void 0, !0)
1774
+ ])) : j("", !0)
1775
+ ]),
1776
+ _: 2
1777
+ }, [
1778
+ $(m) ? {
1779
+ name: "actions",
1780
+ fn: C(() => [
1781
+ A(io, {
1782
+ record: e.record,
1783
+ "can-edit": $(s),
1784
+ "edit-action": $(h),
1785
+ onEdit: x,
1786
+ onDelete: u,
1787
+ onRestore: p
1788
+ }, null, 8, ["record", "can-edit", "edit-action"])
1789
+ ]),
1790
+ key: "0"
1791
+ } : void 0
1792
+ ]), 1032, ["loading"]);
1793
+ };
1794
+ }
1795
+ }), yo = /* @__PURE__ */ ie(bo, [["__scopeId", "data-v-65504714"]]), xo = /* @__PURE__ */ z({
1796
+ __name: "LazyLoadTrigger",
1797
+ props: {
1798
+ onIntersect: {},
1799
+ threshold: { default: 0.1 },
1800
+ once: { type: Boolean, default: !1 },
1801
+ loading: { type: Boolean }
1802
+ },
1803
+ setup(e) {
1804
+ const n = e, t = V(null);
1805
+ let o = null;
1806
+ const r = (a) => {
1807
+ var s;
1808
+ a[0].isIntersecting && ((s = n.onIntersect) == null || s.call(n), n.once && o && o.disconnect());
1809
+ };
1810
+ return re(() => {
1811
+ o = new IntersectionObserver(r, {
1812
+ threshold: n.threshold
1813
+ }), t.value && o.observe(t.value);
1814
+ }), Ue(() => {
1815
+ o && o.disconnect();
1816
+ }), (a, l) => {
1817
+ const s = T("a-spin");
1818
+ return g(), S("div", {
1819
+ ref_key: "container",
1820
+ ref: t,
1821
+ style: { height: "1px" },
1822
+ class: "d-flex align-items-center justify-content-center pb-5 pt-5"
1823
+ }, [
1824
+ A(s, { spinning: e.loading }, null, 8, ["spinning"])
1825
+ ], 512);
1826
+ };
1827
+ }
1828
+ }), So = { class: "d-flex flex-column gap-4" }, Co = /* @__PURE__ */ z({
1829
+ __name: "CardGrid",
1830
+ props: {
1831
+ loading: { type: Boolean },
1832
+ columns: {},
1833
+ dataSource: {},
1834
+ cardLayout: {},
1835
+ canEdit: { type: Boolean },
1836
+ editAction: { type: Boolean },
1837
+ showActionsColumn: { type: Boolean },
1838
+ pagination: { type: Boolean },
1839
+ meta: {}
1840
+ },
1841
+ emits: ["delete", "restore", "edit", "pageChange", "sizeChange"],
1842
+ setup(e, { emit: n }) {
1843
+ const t = e, o = n;
1844
+ re(() => {
1845
+ const u = document.querySelector(".card-grid");
1846
+ u !== null && We(u);
1847
+ });
1848
+ const r = E(
1849
+ () => t.cardLayout === "row" ? "card-grid card-grid--row" : "card-grid card-grid--grid"
1850
+ ), a = E(() => t.columns), l = V([]), s = () => {
1851
+ var x;
1852
+ if (((x = t.meta) == null ? void 0 : x.currentPage) === 1) {
1853
+ l.value = [
1854
+ ...t.dataSource
1855
+ ];
1856
+ return;
1857
+ }
1858
+ const u = new Set(l.value.map((v) => v.id)), p = t.dataSource.filter((v) => !u.has(v.id));
1859
+ l.value.push(...p);
1860
+ };
1861
+ s(), B(() => {
1862
+ var u;
1863
+ return [
1864
+ t.dataSource,
1865
+ (u = t.meta) == null ? void 0 : u.currentPage
1866
+ ];
1867
+ }, s, {
1868
+ deep: !0
1869
+ });
1870
+ const h = E(() => t.meta === void 0 ? !0 : t.meta.currentPage * t.meta.pageSize >= t.meta.total), m = () => {
1871
+ t.loading || h.value || !t.meta || o("pageChange", t.meta.currentPage + 1);
1872
+ };
1873
+ return (u, p) => (g(), S("div", So, [
1874
+ L("div", {
1875
+ class: Pt(r.value)
1876
+ }, [
1877
+ (g(!0), S(D, null, G(l.value, (x, v) => (g(), I(yo, {
1878
+ key: String(x.id ?? `card-${v}`),
1879
+ loading: e.loading,
1880
+ record: x,
1881
+ columns: a.value,
1882
+ "can-edit": e.canEdit,
1883
+ "edit-action": e.editAction,
1884
+ "show-actions-column": e.showActionsColumn,
1885
+ onEdit: p[0] || (p[0] = (i) => o("edit", i)),
1886
+ onDelete: p[1] || (p[1] = (i) => o("delete", i)),
1887
+ onRestore: p[2] || (p[2] = (i) => o("restore", i))
1888
+ }, we({ _: 2 }, [
1889
+ u.$slots.titleCard ? {
1890
+ name: "title",
1891
+ fn: C(() => [
1892
+ R(u.$slots, "titleCard", {
1893
+ record: x,
1894
+ columns: a.value
1895
+ }, void 0, !0)
1896
+ ]),
1897
+ key: "0"
1898
+ } : void 0,
1899
+ u.$slots.bodyCard ? {
1900
+ name: "body",
1901
+ fn: C(({ record: i, columns: b }) => [
1902
+ R(u.$slots, "bodyCard", {
1903
+ record: i,
1904
+ columns: b
1905
+ }, void 0, !0)
1906
+ ]),
1907
+ key: "1"
1908
+ } : void 0,
1909
+ u.$slots.footerCard ? {
1910
+ name: "footer",
1911
+ fn: C(({ record: i, columns: b }) => [
1912
+ R(u.$slots, "footerCard", {
1913
+ record: i,
1914
+ columns: b
1915
+ }, void 0, !0)
1916
+ ]),
1917
+ key: "2"
1918
+ } : void 0
1919
+ ]), 1032, ["loading", "record", "columns", "can-edit", "edit-action", "show-actions-column"]))), 128))
1920
+ ], 2),
1921
+ e.pagination && !h.value ? (g(), I(xo, {
1922
+ key: 0,
1923
+ loading: e.loading,
1924
+ once: !1,
1925
+ "on-intersect": m
1926
+ }, null, 8, ["loading"])) : j("", !0)
1927
+ ]));
1928
+ }
1929
+ }), Ao = /* @__PURE__ */ ie(Co, [["__scopeId", "data-v-07cfb68f"]]), wo = "10", sr = "20", cr = "50", ur = "100", dr = "1000", fr = 1, pr = wo;
1930
+ var te = /* @__PURE__ */ ((e) => (e.SEARCH = "search", e.SELECT = "select", e.DATE = "date", e))(te || {}), ko = /* @__PURE__ */ ((e) => (e.SMALL = "10", e.MEDIUM = "20", e.LARGE = "50", e.EXTRA_LARGE = "100", e.ULTRA = "1000", e))(ko || {});
1931
+ const gr = [
1932
+ "10",
1933
+ "20",
1934
+ "50",
1935
+ "100"
1936
+ /* EXTRA_LARGE */
1937
+ ];
1938
+ var Mo = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.SMALL = 10] = "SMALL", e[e.MEDIUM = 20] = "MEDIUM", e[e.LARGE = 50] = "LARGE", e))(Mo || {}), Eo = /* @__PURE__ */ ((e) => (e[e.DEFAULT_CURRENT_PAGE = 1] = "DEFAULT_CURRENT_PAGE", e))(Eo || {}), Ne = /* @__PURE__ */ ((e) => (e.ASCEND = "ascend", e.DESCEND = "descend", e))(Ne || {}), To = /* @__PURE__ */ ((e) => (e.ASC = "asc", e.DESC = "desc", e))(To || {});
1939
+ const Io = z({
1940
+ name: "MultiselectWrapper",
1941
+ components: { VueMultiselect: Ut },
1942
+ props: {
1943
+ modelValue: {
1944
+ type: [Array, String, Number, Object, Boolean, null],
1945
+ default: null
1946
+ }
1947
+ },
1948
+ emits: ["update:modelValue"],
1949
+ data() {
1950
+ return { simpleImage: Xt.PRESENTED_IMAGE_SIMPLE };
1951
+ }
1952
+ });
1953
+ function Ho(e, n, t, o, r, a) {
1954
+ const l = T("a-empty"), s = T("VueMultiselect");
1955
+ return g(), I(s, Xe(e.$attrs, {
1956
+ class: "filter-select",
1957
+ modelValue: e.modelValue,
1958
+ "onUpdate:modelValue": n[0] || (n[0] = (h) => e.$emit("update:modelValue", h)),
1959
+ label: "name",
1960
+ "value-prop": "id"
1961
+ }), {
1962
+ nooptions: C(() => [
1963
+ A(l, { image: e.simpleImage }, null, 8, ["image"])
1964
+ ]),
1965
+ _: 1
1966
+ }, 16, ["modelValue"]);
1967
+ }
1968
+ const Ft = /* @__PURE__ */ ie(Io, [["render", Ho], ["__scopeId", "data-v-cfb3f123"]]), Bo = { class: "d-flex align-items-center gap-2 p-2" }, Do = /* @__PURE__ */ z({
1969
+ __name: "FilterDropdown",
1970
+ props: {
1971
+ placeholder: {},
1972
+ filterMode: {},
1973
+ componentProps: {}
1974
+ },
1975
+ emits: ["update:modelValue", "apply"],
1976
+ setup(e, { emit: n }) {
1977
+ const t = e, o = n, r = E(() => t.filterMode === te.SEARCH ? "a-input" : t.filterMode === te.SELECT ? Ft : t.filterMode === te.DATE ? "a-range-picker" : null), a = V(null), l = () => {
1978
+ o("update:modelValue", a.value), o("apply");
1979
+ };
1980
+ return (s, h) => {
1981
+ const m = T("a-button");
1982
+ return g(), S("div", Bo, [
1983
+ (g(), I(mt(r.value), Xe(e.componentProps, {
1984
+ value: a.value,
1985
+ "onUpdate:value": h[0] || (h[0] = (u) => a.value = u),
1986
+ modelValue: a.value,
1987
+ "onUpdate:modelValue": h[1] || (h[1] = (u) => a.value = u),
1988
+ placeholder: e.placeholder,
1989
+ style: { "min-width": "240px", "max-width": "300px", "font-size": "14px" },
1990
+ object: ""
1991
+ }), null, 16, ["value", "modelValue", "placeholder"])),
1992
+ A(m, {
1993
+ type: "primary",
1994
+ size: "small",
1995
+ onClick: l
1996
+ }, {
1997
+ default: C(() => [...h[2] || (h[2] = [
1998
+ _(" Добавить ", -1)
1999
+ ])]),
2000
+ _: 1
2001
+ })
2002
+ ]);
2003
+ };
2004
+ }
2005
+ }), $o = { class: "d-flex align-items-center justify-content-center gap-2" }, Fo = /* @__PURE__ */ z({
2006
+ __name: "TableCellActions",
2007
+ props: {
2008
+ record: {},
2009
+ canEdit: { type: Boolean },
2010
+ editAction: { type: Boolean },
2011
+ deleteAction: { type: Boolean }
2012
+ },
2013
+ emits: ["edit", "delete", "restore"],
2014
+ setup(e, { emit: n }) {
2015
+ const t = e, o = n, r = (s) => {
2016
+ o("delete", s);
2017
+ }, a = (s) => {
2018
+ o("restore", s);
2019
+ }, l = (s) => {
2020
+ o("edit", s);
2021
+ };
2022
+ return (s, h) => {
2023
+ const m = T("a-button"), u = T("a-tooltip");
2024
+ return g(), S("div", $o, [
2025
+ t.canEdit === !1 ? (g(), I(u, {
2026
+ key: 0,
2027
+ title: "Смотреть"
2028
+ }, {
2029
+ default: C(() => [
2030
+ A(m, {
2031
+ icon: oe($(bt)),
2032
+ onClick: h[0] || (h[0] = (p) => l(e.record))
2033
+ }, null, 8, ["icon"])
2034
+ ]),
2035
+ _: 1
2036
+ })) : j("", !0),
2037
+ e.canEdit !== !1 ? (g(), S(D, { key: 1 }, [
2038
+ t.editAction !== !1 ? (g(), I(u, {
2039
+ key: 0,
2040
+ title: "Редактировать"
2041
+ }, {
2042
+ default: C(() => [
2043
+ A(m, {
2044
+ icon: oe($(yt)),
2045
+ onClick: h[1] || (h[1] = (p) => l(e.record))
2046
+ }, null, 8, ["icon"])
2047
+ ]),
2048
+ _: 1
2049
+ })) : j("", !0),
2050
+ e.deleteAction !== !1 ? (g(), I(u, {
2051
+ key: 1,
2052
+ title: e.record.isDeleted ? "Восстановить" : "Удалить"
2053
+ }, {
2054
+ default: C(() => [
2055
+ A(m, {
2056
+ icon: oe(e.record.isDeleted ? $(xt) : $(St)),
2057
+ onClick: h[2] || (h[2] = (p) => e.record.isDeleted ? a(e.record) : r(e.record))
2058
+ }, null, 8, ["icon"])
2059
+ ]),
2060
+ _: 1
2061
+ }, 8, ["title"])) : j("", !0)
2062
+ ], 64)) : j("", !0)
2063
+ ]);
2064
+ };
2065
+ }
2066
+ }), Vo = { class: "d-flex align-items-center justify-content-between" }, _o = { class: "d-flex align-items-center gap-2" }, Ro = { key: 0 }, Lo = { key: 1 }, Oo = { key: 2 }, zo = { key: 3 }, Po = { key: 4 }, No = { key: 5 }, jo = /* @__PURE__ */ z({
2067
+ __name: "TheTable",
2068
+ props: {
2069
+ loading: { type: Boolean },
2070
+ pagination: { type: Boolean },
2071
+ columns: {},
2072
+ dataSource: {},
2073
+ filterValues: {},
2074
+ meta: {},
2075
+ canEdit: { type: Boolean },
2076
+ editAction: { type: Boolean },
2077
+ deleteAction: { type: Boolean },
2078
+ showActionsColumn: { type: Boolean },
2079
+ columnsVisibility: {},
2080
+ disableColumnFilterDropdowns: { type: Boolean },
2081
+ showFilterButton: { type: Boolean }
2082
+ },
2083
+ emits: ["update:filterValues", "filterApply", "restore", "edit", "delete", "sortChange", "pageChange", "sizeChange", "openColumnDrawer", "openFilterDrawer"],
2084
+ setup(e, { emit: n }) {
2085
+ const [, t] = $t(), o = e, r = n, a = E(() => o.showFilterButton === !0), l = V(
2086
+ o.filterValues || {}
2087
+ ), s = V([
2088
+ ...o.columns
2089
+ ]), h = V({}), m = E(() => o.disableColumnFilterDropdowns === !0 ? [] : s.value.filter(
2090
+ (c) => c.filterable
2091
+ )), u = E(() => {
2092
+ const f = s.value.filter((d) => {
2093
+ if (d.filterOnly)
2094
+ return !1;
2095
+ const H = d.key || String(d.dataIndex);
2096
+ return o.columnsVisibility[H] !== !1;
2097
+ }).map((d) => {
2098
+ const { headerAlign: H, cellAlign: F, ...X } = d;
2099
+ return {
2100
+ ...X,
2101
+ sorter: !!X.sortable,
2102
+ sortDirections: X.sortable ? [
2103
+ Ne.ASCEND,
2104
+ Ne.DESCEND
2105
+ ] : void 0,
2106
+ customHeaderCell: () => H ? {
2107
+ style: {
2108
+ textAlign: H
2109
+ }
2110
+ } : void 0,
2111
+ customCell: () => F ? {
2112
+ style: {
2113
+ textAlign: F
2114
+ }
2115
+ } : void 0,
2116
+ customFilterDropdown: !!X.filterable,
2117
+ slots: X.filterable ? {
2118
+ filterDropdown: `filter${String(X.dataIndex)}Dropdown`
2119
+ } : void 0
2120
+ };
2121
+ });
2122
+ return o.showActionsColumn !== !1 && o.columnsVisibility.actions !== !1 && f.push({
2123
+ title: "Действия",
2124
+ key: "actions",
2125
+ dataIndex: "actions",
2126
+ width: 100,
2127
+ slots: {
2128
+ customRender: "actionColumn"
2129
+ }
2130
+ }), f;
2131
+ }), p = E(
2132
+ () => Object.keys(o.columnsVisibility).filter(
2133
+ (c) => o.columnsVisibility[c] === !1
2134
+ ).length
2135
+ ), x = E(() => ({
2136
+ color: t.value.colorSelectedMenu,
2137
+ borderColor: t.value.colorBorderSecondary,
2138
+ backgroundColor: t.value.mainBgColor || t.value.colorPrimaryBg
2139
+ })), v = (c, f) => {
2140
+ const d = l.value[c];
2141
+ if (f === null) {
2142
+ const F = { ...l.value, [c]: null };
2143
+ h.value[c] = null, r("filterApply", { key: c, value: [] }), r("update:filterValues", F), l.value = F;
2144
+ return;
2145
+ }
2146
+ if (pe(d, f)) {
2147
+ h.value[c] = null;
2148
+ return;
2149
+ }
2150
+ const H = { ...l.value, [c]: f };
2151
+ r("filterApply", { key: c, value: [f] }), r("update:filterValues", H), l.value = H, h.value[c] = null;
2152
+ }, i = (c) => c.isGroup ? "parent-row" : "", b = (c, f, d) => {
2153
+ r("sortChange", {
2154
+ columnKey: d.columnKey || "",
2155
+ order: d.order || null
2156
+ });
2157
+ }, k = (c, f) => {
2158
+ const d = f.key || String(f.dataIndex), H = s.value.findIndex(
2159
+ (F) => (F.key || String(F.dataIndex)) === d
2160
+ );
2161
+ H !== -1 && s.value.splice(H, 1, {
2162
+ ...f,
2163
+ width: c
2164
+ });
2165
+ };
2166
+ return B(
2167
+ () => o.filterValues,
2168
+ (c) => {
2169
+ l.value = c || {};
2170
+ }
2171
+ ), B(
2172
+ () => o.columns,
2173
+ (c) => {
2174
+ s.value = [
2175
+ ...c
2176
+ ];
2177
+ },
2178
+ {
2179
+ immediate: !0
2180
+ }
2181
+ ), re(() => {
2182
+ const c = document.querySelector(".the-table tbody");
2183
+ c !== null && We(c);
2184
+ }), (c, f) => {
2185
+ var Ze, Qe, Je, Ye;
2186
+ const d = T("Icon"), H = T("a-button"), F = T("a-badge"), X = T("a-skeleton"), y = T("a-tag"), le = T("a-table"), Rt = T("a-pagination");
2187
+ return g(), S("div", null, [
2188
+ A(le, {
2189
+ bordered: "",
2190
+ "table-layout": "fixed",
2191
+ class: "the-table",
2192
+ loading: e.loading,
2193
+ columns: u.value,
2194
+ "data-source": e.dataSource,
2195
+ "row-key": (w) => w.id,
2196
+ pagination: !1,
2197
+ scroll: { x: "max-content" },
2198
+ "row-class-name": i,
2199
+ onChange: b,
2200
+ onResizeColumn: k
2201
+ }, we({
2202
+ title: C(() => [
2203
+ L("div", Vo, [
2204
+ L("div", _o, [
2205
+ A(F, {
2206
+ dot: "",
2207
+ count: p.value
2208
+ }, {
2209
+ default: C(() => [
2210
+ A(H, {
2211
+ class: "d-flex align-items-center justify-content-center p-2",
2212
+ onClick: f[0] || (f[0] = (w) => c.$emit("openColumnDrawer"))
2213
+ }, {
2214
+ default: C(() => [
2215
+ A(d, {
2216
+ name: "solar:settings-outline",
2217
+ class: "fs-5"
2218
+ })
2219
+ ]),
2220
+ _: 1
2221
+ })
2222
+ ]),
2223
+ _: 1
2224
+ }, 8, ["count"]),
2225
+ a.value ? (g(), I(H, {
2226
+ key: 0,
2227
+ class: "d-flex align-items-center justify-content-center p-2",
2228
+ onClick: f[1] || (f[1] = (w) => c.$emit("openFilterDrawer"))
2229
+ }, {
2230
+ default: C(() => [
2231
+ A(d, {
2232
+ name: "ant-design:filter-outlined",
2233
+ class: "fs-5"
2234
+ })
2235
+ ]),
2236
+ _: 1
2237
+ })) : j("", !0)
2238
+ ]),
2239
+ R(c.$slots, "title")
2240
+ ])
2241
+ ]),
2242
+ bodyCell: C(({ column: w, record: O }) => [
2243
+ R(c.$slots, "bodyCell", {
2244
+ column: w,
2245
+ record: O
2246
+ }, () => {
2247
+ var et;
2248
+ return [
2249
+ e.loading ? (g(), I(X, {
2250
+ key: 0,
2251
+ active: !0,
2252
+ loading: !0,
2253
+ title: !1,
2254
+ paragraph: { rows: 1 }
2255
+ })) : (g(), S(D, { key: 1 }, [
2256
+ w.dataIndex === "isDeleted" ? (g(), S("span", Ro, [
2257
+ A(Ae, {
2258
+ value: O.isDeleted
2259
+ }, null, 8, ["value"])
2260
+ ])) : Array.isArray(O[w.dataIndex]) ? (g(), S("span", Lo, [
2261
+ w.tag === !0 ? (g(!0), S(D, { key: 0 }, G(O[w.dataIndex], (K, he) => (g(), I(y, {
2262
+ key: he,
2263
+ style: Ve(x.value),
2264
+ class: "me-1 mb-1"
2265
+ }, {
2266
+ default: C(() => [
2267
+ _(P(typeof K == "object" ? (K == null ? void 0 : K.name) || "" : K), 1)
2268
+ ]),
2269
+ _: 2
2270
+ }, 1032, ["style"]))), 128)) : (g(!0), S(D, { key: 1 }, G(O[w.dataIndex], (K, he) => (g(), S("span", { key: he }, [
2271
+ typeof K == "object" ? (g(), S(D, { key: 0 }, [
2272
+ _(P(K.name), 1)
2273
+ ], 64)) : (g(), S(D, { key: 1 }, [
2274
+ _(P(K), 1)
2275
+ ], 64)),
2276
+ he < O[w.dataIndex].length - 1 ? (g(), S(D, { key: 2 }, [
2277
+ _(" , ")
2278
+ ], 64)) : j("", !0)
2279
+ ]))), 128))
2280
+ ])) : typeof O[w.dataIndex] == "boolean" ? (g(), S("span", Oo, [
2281
+ A(Ae, {
2282
+ value: !O[w.dataIndex]
2283
+ }, null, 8, ["value"])
2284
+ ])) : typeof O[w.dataIndex] == "object" ? (g(), S("span", zo, P(((et = O[w.dataIndex]) == null ? void 0 : et.name) || ""), 1)) : w.tag === !0 ? (g(), S("span", Po, [
2285
+ A(y, {
2286
+ style: Ve(x.value)
2287
+ }, {
2288
+ default: C(() => [
2289
+ _(P(O[w.dataIndex]), 1)
2290
+ ]),
2291
+ _: 2
2292
+ }, 1032, ["style"])
2293
+ ])) : (g(), S("span", No, P(O[w.dataIndex]), 1))
2294
+ ], 64))
2295
+ ];
2296
+ })
2297
+ ]),
2298
+ actionColumn: C(({ record: w }) => [
2299
+ R(c.$slots, "actionColumn", { record: w }, () => [
2300
+ A(Fo, {
2301
+ "edit-action": e.editAction,
2302
+ "delete-action": e.deleteAction,
2303
+ "can-edit": e.canEdit,
2304
+ record: w,
2305
+ onEdit: () => c.$emit("edit", w),
2306
+ onDelete: () => c.$emit("delete", w),
2307
+ onRestore: () => c.$emit("restore", w)
2308
+ }, null, 8, ["edit-action", "delete-action", "can-edit", "record", "onEdit", "onDelete", "onRestore"])
2309
+ ])
2310
+ ]),
2311
+ _: 2
2312
+ }, [
2313
+ G(m.value, (w) => ({
2314
+ name: `filter${String(w.dataIndex)}Dropdown`,
2315
+ fn: C(() => [
2316
+ A(Do, {
2317
+ modelValue: h.value[w.dataIndex],
2318
+ "onUpdate:modelValue": [(O) => h.value[w.dataIndex] = O, (O) => v(w.dataIndex, O)],
2319
+ "filter-mode": w.filterMode,
2320
+ "component-props": w.componentProps,
2321
+ placeholder: w.title
2322
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "filter-mode", "component-props", "placeholder"])
2323
+ ])
2324
+ }))
2325
+ ]), 1032, ["loading", "columns", "data-source", "row-key"]),
2326
+ e.pagination ? (g(), I(Rt, {
2327
+ key: 0,
2328
+ class: "mt-4 text-end",
2329
+ current: (Ze = e.meta) == null ? void 0 : Ze.currentPage,
2330
+ "page-size": (Qe = e.meta) == null ? void 0 : Qe.pageSize,
2331
+ total: (Je = e.meta) == null ? void 0 : Je.total,
2332
+ "show-total": (w) => `Всего ${w} элементов`,
2333
+ "page-size-options": (Ye = e.meta) == null ? void 0 : Ye.pageSizeOptions,
2334
+ "show-size-changer": !0,
2335
+ onChange: f[2] || (f[2] = (w) => c.$emit("pageChange", w)),
2336
+ onShowSizeChange: f[3] || (f[3] = (w, O) => c.$emit("sizeChange", w, O))
2337
+ }, null, 8, ["current", "page-size", "total", "show-total", "page-size-options"])) : j("", !0)
2338
+ ]);
2339
+ };
2340
+ }
2341
+ }), Uo = { class: "mb-4" }, Xo = { class: "d-flex flex-column gap-1" }, Go = /* @__PURE__ */ z({
2342
+ __name: "ColumnSettingsDrawer",
2343
+ props: {
2344
+ visible: { type: Boolean },
2345
+ columns: {},
2346
+ modelValue: {},
2347
+ showActionsColumn: { type: Boolean },
2348
+ disableViewMode: { type: Boolean },
2349
+ viewMode: {},
2350
+ cardLayout: {}
2351
+ },
2352
+ emits: ["update:visible", "update:modelValue", "update:viewMode", "update:cardLayout"],
2353
+ setup(e, { emit: n }) {
2354
+ const t = e, o = n, r = V(t.visible), a = V(t.viewMode), l = V(t.cardLayout), s = Ge({
2355
+ ...t.modelValue
2356
+ }), h = E(() => a.value === "grid"), m = t.disableViewMode || !1;
2357
+ return B(
2358
+ () => t.visible,
2359
+ (u) => {
2360
+ r.value = u;
2361
+ }
2362
+ ), B(r, (u) => {
2363
+ o("update:visible", u);
2364
+ }), B(
2365
+ () => t.viewMode,
2366
+ (u) => {
2367
+ a.value = u;
2368
+ }
2369
+ ), B(a, (u) => {
2370
+ o("update:viewMode", u);
2371
+ }), B(
2372
+ () => t.cardLayout,
2373
+ (u) => {
2374
+ l.value = u;
2375
+ }
2376
+ ), B(l, (u) => {
2377
+ o("update:cardLayout", u);
2378
+ }), B(
2379
+ () => t.modelValue,
2380
+ (u) => Object.assign(s, u),
2381
+ {
2382
+ deep: !0
2383
+ }
2384
+ ), B(s, (u) => o("update:modelValue", {
2385
+ ...u
2386
+ }), {
2387
+ deep: !0
2388
+ }), t.showActionsColumn && s.actions === void 0 && (s.actions = !0), (u, p) => {
2389
+ const x = T("a-checkbox"), v = T("a-radio"), i = T("a-radio-group"), b = T("a-radio-button"), k = T("a-drawer");
2390
+ return g(), I(k, {
2391
+ open: r.value,
2392
+ "onUpdate:open": p[2] || (p[2] = (c) => r.value = c),
2393
+ title: "Настройки представления",
2394
+ placement: "right"
2395
+ }, {
2396
+ default: C(() => [
2397
+ L("section", Uo, [
2398
+ p[3] || (p[3] = L("h3", { class: "fw-bold fs-6 mb-2" }, "Отображение колонок", -1)),
2399
+ L("div", Xo, [
2400
+ (g(!0), S(D, null, G(e.columns, (c) => (g(), S("div", {
2401
+ key: c.key ?? c.dataIndex
2402
+ }, [
2403
+ A(x, {
2404
+ checked: s[c.key ?? c.dataIndex],
2405
+ "onUpdate:checked": (f) => s[c.key ?? c.dataIndex] = f,
2406
+ disabled: h.value,
2407
+ class: "d-flex"
2408
+ }, {
2409
+ default: C(() => [
2410
+ _(P(c.title), 1)
2411
+ ]),
2412
+ _: 2
2413
+ }, 1032, ["checked", "onUpdate:checked", "disabled"])
2414
+ ]))), 128))
2415
+ ])
2416
+ ]),
2417
+ L("section", null, [
2418
+ p[8] || (p[8] = L("h3", { class: "fw-bold fs-6 mb-2" }, "Вид", -1)),
2419
+ A(i, {
2420
+ value: a.value,
2421
+ "onUpdate:value": p[0] || (p[0] = (c) => a.value = c),
2422
+ "button-style": "solid",
2423
+ class: "mb-3",
2424
+ disabled: $(m)
2425
+ }, {
2426
+ default: C(() => [
2427
+ A(v, { value: "table" }, {
2428
+ default: C(() => [...p[4] || (p[4] = [
2429
+ _("Таблица", -1)
2430
+ ])]),
2431
+ _: 1
2432
+ }),
2433
+ A(v, { value: "grid" }, {
2434
+ default: C(() => [...p[5] || (p[5] = [
2435
+ _("Карточки", -1)
2436
+ ])]),
2437
+ _: 1
2438
+ })
2439
+ ]),
2440
+ _: 1
2441
+ }, 8, ["value", "disabled"]),
2442
+ A(i, {
2443
+ value: l.value,
2444
+ "onUpdate:value": p[1] || (p[1] = (c) => l.value = c),
2445
+ "button-style": "solid",
2446
+ disabled: !h.value
2447
+ }, {
2448
+ default: C(() => [
2449
+ A(b, { value: "grid" }, {
2450
+ default: C(() => [
2451
+ A($(Nt), { class: "me-2" }),
2452
+ p[6] || (p[6] = _("Сетка ", -1))
2453
+ ]),
2454
+ _: 1
2455
+ }),
2456
+ A(b, { value: "row" }, {
2457
+ default: C(() => [
2458
+ A($(jt), { class: "me-2" }),
2459
+ p[7] || (p[7] = _("Строка ", -1))
2460
+ ]),
2461
+ _: 1
2462
+ })
2463
+ ]),
2464
+ _: 1
2465
+ }, 8, ["value", "disabled"])
2466
+ ])
2467
+ ]),
2468
+ _: 1
2469
+ }, 8, ["open"]);
2470
+ };
2471
+ }
2472
+ }), Vt = /* @__PURE__ */ z({
2473
+ __name: "FilterInput",
2474
+ props: {
2475
+ modelValue: { type: [String, Number, Boolean, Object, Array, null] },
2476
+ filterMode: {},
2477
+ componentProps: {},
2478
+ placeholder: {}
2479
+ },
2480
+ emits: ["update:modelValue"],
2481
+ setup(e, { emit: n }) {
2482
+ const t = e, o = n, r = E(() => t.filterMode === te.SEARCH ? "a-input" : t.filterMode === te.SELECT ? Ft : t.filterMode === te.DATE ? "a-range-picker" : "a-input"), a = V(t.modelValue);
2483
+ return B(() => t.modelValue, (l) => {
2484
+ a.value = l;
2485
+ }), B(a, (l) => o("update:modelValue", l)), (l, s) => (g(), I(mt(r.value), Xe(e.componentProps, {
2486
+ value: a.value,
2487
+ "onUpdate:value": s[0] || (s[0] = (h) => a.value = h),
2488
+ modelValue: a.value,
2489
+ "onUpdate:modelValue": s[1] || (s[1] = (h) => a.value = h),
2490
+ placeholder: e.placeholder,
2491
+ class: "w-100 small"
2492
+ }), null, 16, ["value", "modelValue", "placeholder"]));
2493
+ }
2494
+ }), Wo = { class: "small fw-medium" }, qo = { class: "d-flex flex-column gap-2 mt-2" }, Ko = /* @__PURE__ */ z({
2495
+ __name: "CardFiltersDrawer",
2496
+ props: {
2497
+ visible: { type: Boolean },
2498
+ columns: {},
2499
+ filterValues: {}
2500
+ },
2501
+ emits: ["update:visible", "update:filterValues", "filterApply"],
2502
+ setup(e, { emit: n }) {
2503
+ const t = e, o = n, r = V(t.visible), a = Ge({
2504
+ ...t.filterValues
2505
+ }), l = (i) => i.key ?? String(i.dataIndex), s = (i) => Array.isArray(i) ? i : i != null ? [i] : [], h = (i) => i == null ? !0 : Array.isArray(i) ? i.length === 0 : typeof i == "string" ? i.trim() === "" : !1, m = E(() => t.columns.filter((i) => i.filterable)), u = E(() => Object.keys(a).some(
2506
+ (i) => !pe(a[i], t.filterValues[i])
2507
+ )), p = (i) => {
2508
+ Object.keys(a).forEach((b) => {
2509
+ delete a[b];
2510
+ }), Object.assign(a, i);
2511
+ };
2512
+ B(
2513
+ () => t.visible,
2514
+ (i) => {
2515
+ r.value = i, i && p(t.filterValues);
2516
+ }
2517
+ ), B(r, (i) => {
2518
+ o("update:visible", i);
2519
+ }), B(
2520
+ () => t.filterValues,
2521
+ (i) => {
2522
+ p(i);
2523
+ },
2524
+ {
2525
+ deep: !0
2526
+ }
2527
+ );
2528
+ const x = () => {
2529
+ const i = {
2530
+ ...t.filterValues
2531
+ };
2532
+ Object.entries(a).forEach(([b, k]) => {
2533
+ if (h(k)) {
2534
+ i[b] = null, o("filterApply", {
2535
+ key: b,
2536
+ value: []
2537
+ });
2538
+ return;
2539
+ }
2540
+ i[b] = k, o("filterApply", {
2541
+ key: b,
2542
+ value: s(k)
2543
+ });
2544
+ }), o("update:filterValues", i), r.value = !1;
2545
+ }, v = () => {
2546
+ Object.keys(a).forEach((b) => {
2547
+ delete a[b];
2548
+ }), o("update:filterValues", {});
2549
+ };
2550
+ return (i, b) => {
2551
+ const k = T("a-button"), c = T("a-drawer");
2552
+ return g(), I(c, {
2553
+ open: r.value,
2554
+ "onUpdate:open": b[0] || (b[0] = (f) => r.value = f),
2555
+ placement: "right",
2556
+ width: "360",
2557
+ title: "Фильтры",
2558
+ "body-style": "padding: 24px"
2559
+ }, {
2560
+ default: C(() => [
2561
+ (g(!0), S(D, null, G(m.value, (f) => (g(), S("section", {
2562
+ key: l(f),
2563
+ class: "mb-4 d-flex flex-column gap-2"
2564
+ }, [
2565
+ L("span", Wo, P(f.title), 1),
2566
+ A(Vt, {
2567
+ modelValue: a[l(f)],
2568
+ "onUpdate:modelValue": (d) => a[l(f)] = d,
2569
+ "filter-mode": f.filterMode,
2570
+ "component-props": f.componentProps,
2571
+ placeholder: f.title
2572
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "filter-mode", "component-props", "placeholder"])
2573
+ ]))), 128)),
2574
+ L("div", qo, [
2575
+ A(k, {
2576
+ block: "",
2577
+ onClick: v
2578
+ }, {
2579
+ default: C(() => [...b[1] || (b[1] = [
2580
+ _(" Сбросить ", -1)
2581
+ ])]),
2582
+ _: 1
2583
+ }),
2584
+ A(k, {
2585
+ type: "primary",
2586
+ block: "",
2587
+ disabled: !u.value,
2588
+ onClick: x
2589
+ }, {
2590
+ default: C(() => [...b[2] || (b[2] = [
2591
+ _(" Применить ", -1)
2592
+ ])]),
2593
+ _: 1
2594
+ }, 8, ["disabled"])
2595
+ ])
2596
+ ]),
2597
+ _: 1
2598
+ }, 8, ["open"]);
2599
+ };
2600
+ }
2601
+ }), Zo = /* @__PURE__ */ ie(Ko, [["__scopeId", "data-v-35036cad"]]), Qo = { class: "small fw-medium" }, Jo = /* @__PURE__ */ z({
2602
+ __name: "CardFiltersModal",
2603
+ props: {
2604
+ visible: { type: Boolean },
2605
+ columns: {},
2606
+ filterValues: {}
2607
+ },
2608
+ emits: ["update:visible", "update:filterValues", "filterApply"],
2609
+ setup(e, { emit: n }) {
2610
+ const t = e, o = n, r = V(t.visible), a = Ge({
2611
+ ...t.filterValues
2612
+ }), l = (i) => i.key ?? String(i.dataIndex), s = (i) => Array.isArray(i) ? i : i != null ? [i] : [], h = (i) => i == null ? !0 : Array.isArray(i) ? i.length === 0 : typeof i == "string" ? i.trim() === "" : !1, m = E(
2613
+ () => t.columns.filter((i) => i.filterable)
2614
+ ), u = E(() => Object.keys(a).some(
2615
+ (i) => !pe(a[i], t.filterValues[i])
2616
+ )), p = (i) => {
2617
+ Object.keys(a).forEach((b) => {
2618
+ delete a[b];
2619
+ }), Object.assign(a, i);
2620
+ };
2621
+ B(
2622
+ () => t.visible,
2623
+ (i) => {
2624
+ r.value = i, i && p(t.filterValues);
2625
+ }
2626
+ ), B(r, (i) => {
2627
+ o("update:visible", i);
2628
+ }), B(
2629
+ () => t.filterValues,
2630
+ (i) => {
2631
+ p(i);
2632
+ },
2633
+ {
2634
+ deep: !0
2635
+ }
2636
+ );
2637
+ const x = () => {
2638
+ const i = {
2639
+ ...t.filterValues
2640
+ };
2641
+ Object.entries(a).forEach(([b, k]) => {
2642
+ if (h(k)) {
2643
+ i[b] = null, o("filterApply", {
2644
+ key: b,
2645
+ value: []
2646
+ });
2647
+ return;
2648
+ }
2649
+ i[b] = k, o("filterApply", {
2650
+ key: b,
2651
+ value: s(k)
2652
+ });
2653
+ }), o("update:filterValues", i), r.value = !1;
2654
+ }, v = () => {
2655
+ r.value = !1;
2656
+ };
2657
+ return (i, b) => {
2658
+ const k = T("a-modal");
2659
+ return g(), I(k, {
2660
+ visible: r.value,
2661
+ "onUpdate:visible": b[0] || (b[0] = (c) => r.value = c),
2662
+ title: "Фильтры",
2663
+ "destroy-on-close": "",
2664
+ "ok-text": "Применить",
2665
+ "cancel-text": "Сбросить",
2666
+ "ok-button-props": { disabled: !u.value },
2667
+ onOk: x,
2668
+ onCancel: v
2669
+ }, {
2670
+ default: C(() => [
2671
+ (g(!0), S(D, null, G(m.value, (c) => (g(), S("section", {
2672
+ key: l(c),
2673
+ class: "mb-4 d-flex flex-column gap-2"
2674
+ }, [
2675
+ L("span", Qo, P(c.title), 1),
2676
+ A(Vt, {
2677
+ modelValue: a[l(c)],
2678
+ "onUpdate:modelValue": (f) => a[l(c)] = f,
2679
+ "filter-mode": c.filterMode,
2680
+ "component-props": c.componentProps,
2681
+ placeholder: c.title
2682
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "filter-mode", "component-props", "placeholder"])
2683
+ ]))), 128))
2684
+ ]),
2685
+ _: 1
2686
+ }, 8, ["visible", "ok-button-props"]);
2687
+ };
2688
+ }
2689
+ }), Yo = /* @__PURE__ */ ie(Jo, [["__scopeId", "data-v-454326bc"]]);
2690
+ var je = /* @__PURE__ */ ((e) => (e.Table = "table", e.Grid = "grid", e))(je || {}), _t = /* @__PURE__ */ ((e) => (e.Grid = "grid", e.Row = "row", e))(_t || {});
2691
+ const er = { class: "d-flex justify-content-between align-items-center gap-2 mb-2" }, tr = { class: "d-flex align-items-center gap-1" }, hr = /* @__PURE__ */ z({
2692
+ __name: "DataView",
2693
+ props: {
2694
+ viewMode: {},
2695
+ loading: { type: Boolean },
2696
+ pagination: { type: Boolean, default: !1 },
2697
+ columns: {},
2698
+ dataSource: {},
2699
+ filterValues: {},
2700
+ meta: {},
2701
+ canEdit: { type: Boolean, default: !0 },
2702
+ editAction: { type: Boolean, default: !0 },
2703
+ deleteAction: { type: Boolean, default: !0 },
2704
+ showActionsColumn: { type: Boolean, default: !0 },
2705
+ disableViewMode: { type: Boolean, default: !1 },
2706
+ enableTableFilterDrawer: { type: Boolean, default: !1 },
2707
+ disableColumnFilterDropdowns: { type: Boolean, default: !1 },
2708
+ useFilterModal: { type: Boolean, default: !1 }
2709
+ },
2710
+ emits: ["update:viewMode", "update:filterValues", "filterApply", "edit", "delete", "restore", "sortChange", "pageChange", "sizeChange"],
2711
+ setup(e, { emit: n }) {
2712
+ const t = e, o = n, r = V(t.viewMode || je.Table), a = E(() => (r == null ? void 0 : r.value) === je.Grid), l = V(_t.Grid), s = V(
2713
+ t.filterValues || {}
2714
+ ), h = V(null), m = (f) => {
2715
+ s.value = f, o("update:filterValues", f);
2716
+ }, u = (f, d, H) => {
2717
+ const F = {
2718
+ ...s.value
2719
+ };
2720
+ if (d === void 0) {
2721
+ m(F);
2722
+ return;
2723
+ }
2724
+ if (Array.isArray(d)) {
2725
+ F[f] = d.filter((X) => !pe(X, H)), m(F);
2726
+ return;
2727
+ }
2728
+ if (pe(d, H)) {
2729
+ F[f] = [], m(F);
2730
+ return;
2731
+ }
2732
+ F[f] = [
2733
+ d
2734
+ ], m(F);
2735
+ }, p = () => m({}), x = (f) => {
2736
+ o("filterApply", f);
2737
+ }, v = V(!1), i = V(!1), b = V({}), k = E(() => r.value === "table" ? Object.keys(b.value).filter(
2738
+ (f) => b.value[f] === !1
2739
+ ).length : 0), c = (f) => {
2740
+ f.forEach((d) => {
2741
+ const H = d.key ?? String(d.dataIndex);
2742
+ b.value[H] === void 0 && (b.value[H] = !0);
2743
+ }), t.showActionsColumn && b.value.actions === void 0 && (b.value.actions = !0);
2744
+ };
2745
+ return B(
2746
+ () => t.filterValues,
2747
+ (f) => {
2748
+ s.value = f || {};
2749
+ }
2750
+ ), B(
2751
+ () => t.viewMode,
2752
+ (f) => {
2753
+ f !== void 0 && (r.value = f);
2754
+ }
2755
+ ), B(() => t.columns, c), B(r, (f) => o("update:viewMode", f)), re(() => c(t.columns)), re(() => {
2756
+ h.value && We(h.value);
2757
+ }), (f, d) => {
2758
+ const H = T("Icon"), F = T("a-button"), X = T("a-badge");
2759
+ return g(), S(D, null, [
2760
+ L("div", {
2761
+ ref_key: "tagCloudContainer",
2762
+ ref: h
2763
+ }, [
2764
+ A(oo, {
2765
+ filters: s.value,
2766
+ "onUpdate:filters": m,
2767
+ onRemove: u,
2768
+ onClear: p
2769
+ }, null, 8, ["filters"])
2770
+ ], 512),
2771
+ a.value ? (g(), S(D, { key: 0 }, [
2772
+ L("div", er, [
2773
+ L("div", tr, [
2774
+ A(X, {
2775
+ dot: "",
2776
+ count: k.value
2777
+ }, {
2778
+ default: C(() => [
2779
+ A(F, {
2780
+ class: "d-flex align-items-center justify-content-center p-2",
2781
+ onClick: d[0] || (d[0] = (y) => i.value = !0)
2782
+ }, {
2783
+ default: C(() => [
2784
+ A(H, {
2785
+ name: "solar:settings-outline",
2786
+ class: "fs-5"
2787
+ })
2788
+ ]),
2789
+ _: 1
2790
+ })
2791
+ ]),
2792
+ _: 1
2793
+ }, 8, ["count"]),
2794
+ A(F, {
2795
+ class: "d-flex align-items-center justify-content-center p-2",
2796
+ onClick: d[1] || (d[1] = (y) => v.value = !0)
2797
+ }, {
2798
+ default: C(() => [
2799
+ A(H, {
2800
+ name: "ant-design:filter-outlined",
2801
+ class: "fs-5"
2802
+ })
2803
+ ]),
2804
+ _: 1
2805
+ })
2806
+ ]),
2807
+ R(f.$slots, "headerCardContainer"),
2808
+ R(f.$slots, "title")
2809
+ ]),
2810
+ a.value ? (g(), I(Ao, {
2811
+ key: 0,
2812
+ loading: e.loading,
2813
+ columns: e.columns,
2814
+ "data-source": e.dataSource,
2815
+ "card-layout": l.value,
2816
+ "can-edit": e.canEdit,
2817
+ "edit-action": e.editAction,
2818
+ "show-actions-column": e.showActionsColumn,
2819
+ pagination: e.pagination,
2820
+ meta: e.meta,
2821
+ onRestore: d[2] || (d[2] = (y) => o("restore", y)),
2822
+ onEdit: d[3] || (d[3] = (y) => o("edit", y)),
2823
+ onDelete: d[4] || (d[4] = (y) => o("delete", y)),
2824
+ onPageChange: d[5] || (d[5] = (y) => o("pageChange", y)),
2825
+ onSizeChange: d[6] || (d[6] = (y, le) => o("sizeChange", y, le))
2826
+ }, we({ _: 2 }, [
2827
+ f.$slots.titleCard ? {
2828
+ name: "titleCard",
2829
+ fn: C((y) => [
2830
+ R(f.$slots, "titleCard", se(ce(y)))
2831
+ ]),
2832
+ key: "0"
2833
+ } : void 0,
2834
+ f.$slots.body ? {
2835
+ name: "bodyCard",
2836
+ fn: C((y) => [
2837
+ R(f.$slots, "body", se(ce(y)))
2838
+ ]),
2839
+ key: "1"
2840
+ } : void 0,
2841
+ f.$slots.footer ? {
2842
+ name: "footerCard",
2843
+ fn: C((y) => [
2844
+ R(f.$slots, "footer", se(ce(y)))
2845
+ ]),
2846
+ key: "2"
2847
+ } : void 0
2848
+ ]), 1032, ["loading", "columns", "data-source", "card-layout", "can-edit", "edit-action", "show-actions-column", "pagination", "meta"])) : j("", !0)
2849
+ ], 64)) : (g(), I(jo, {
2850
+ key: 1,
2851
+ loading: e.loading,
2852
+ pagination: e.pagination,
2853
+ columns: e.columns,
2854
+ "data-source": e.dataSource,
2855
+ "filter-values": s.value,
2856
+ meta: e.meta,
2857
+ "can-edit": e.canEdit,
2858
+ "edit-action": e.editAction,
2859
+ "delete-action": e.deleteAction,
2860
+ "show-actions-column": e.showActionsColumn,
2861
+ "columns-visibility": b.value,
2862
+ "disable-column-filter-dropdowns": t.disableColumnFilterDropdowns === !0,
2863
+ "show-filter-button": t.enableTableFilterDrawer === !0,
2864
+ onOpenColumnDrawer: d[7] || (d[7] = (y) => i.value = !0),
2865
+ onOpenFilterDrawer: d[8] || (d[8] = (y) => v.value = !0),
2866
+ "onUpdate:filterValues": m,
2867
+ onFilterApply: d[9] || (d[9] = (y) => o("filterApply", y)),
2868
+ onRestore: d[10] || (d[10] = (y) => o("restore", y)),
2869
+ onEdit: d[11] || (d[11] = (y) => o("edit", y)),
2870
+ onDelete: d[12] || (d[12] = (y) => o("delete", y)),
2871
+ onSortChange: d[13] || (d[13] = (y) => o("sortChange", y)),
2872
+ onPageChange: d[14] || (d[14] = (y) => o("pageChange", y)),
2873
+ onSizeChange: d[15] || (d[15] = (y, le) => o("sizeChange", y, le))
2874
+ }, {
2875
+ title: C(() => [
2876
+ R(f.$slots, "title")
2877
+ ]),
2878
+ bodyCell: C((y) => [
2879
+ R(f.$slots, "bodyCell", se(ce(y)))
2880
+ ]),
2881
+ actionColumn: C((y) => [
2882
+ R(f.$slots, "actionColumn", se(ce(y)))
2883
+ ]),
2884
+ _: 3
2885
+ }, 8, ["loading", "pagination", "columns", "data-source", "filter-values", "meta", "can-edit", "edit-action", "delete-action", "show-actions-column", "columns-visibility", "disable-column-filter-dropdowns", "show-filter-button"])),
2886
+ R(f.$slots, "filtersDrawer", {
2887
+ visible: v.value,
2888
+ setVisible: (y) => {
2889
+ v.value = y;
2890
+ },
2891
+ filters: s.value,
2892
+ updateFilters: m,
2893
+ emitFilterApply: x
2894
+ }, () => [
2895
+ t.useFilterModal === !0 ? (g(), I(Yo, {
2896
+ key: 0,
2897
+ visible: v.value,
2898
+ "onUpdate:visible": d[16] || (d[16] = (y) => v.value = y),
2899
+ columns: e.columns,
2900
+ "filter-values": s.value,
2901
+ "onUpdate:filterValues": m,
2902
+ onFilterApply: d[17] || (d[17] = (y) => o("filterApply", y))
2903
+ }, null, 8, ["visible", "columns", "filter-values"])) : (g(), I(Zo, {
2904
+ key: 1,
2905
+ visible: v.value,
2906
+ "onUpdate:visible": d[18] || (d[18] = (y) => v.value = y),
2907
+ columns: e.columns,
2908
+ "filter-values": s.value,
2909
+ "onUpdate:filterValues": m,
2910
+ onFilterApply: d[19] || (d[19] = (y) => o("filterApply", y))
2911
+ }, null, 8, ["visible", "columns", "filter-values"]))
2912
+ ]),
2913
+ A(Go, {
2914
+ visible: i.value,
2915
+ "onUpdate:visible": d[20] || (d[20] = (y) => i.value = y),
2916
+ "model-value": b.value,
2917
+ "onUpdate:modelValue": d[21] || (d[21] = (y) => b.value = y),
2918
+ "view-mode": r.value,
2919
+ "onUpdate:viewMode": d[22] || (d[22] = (y) => r.value = y),
2920
+ "card-layout": l.value,
2921
+ "onUpdate:cardLayout": d[23] || (d[23] = (y) => l.value = y),
2922
+ columns: e.columns,
2923
+ "show-actions-column": e.showActionsColumn,
2924
+ "disable-view-mode": e.disableViewMode
2925
+ }, null, 8, ["visible", "model-value", "view-mode", "card-layout", "columns", "show-actions-column", "disable-view-mode"])
2926
+ ], 64);
2927
+ };
2928
+ }
2929
+ }), vr = /* @__PURE__ */ z({
2930
+ __name: "LazyLoadContainer",
2931
+ props: {
2932
+ onIntersect: {},
2933
+ threshold: { default: 0.1 },
2934
+ once: { type: Boolean, default: !1 },
2935
+ rootMargin: { default: "0px" }
2936
+ },
2937
+ setup(e) {
2938
+ const n = e, t = V(null);
2939
+ let o = null;
2940
+ const r = (a) => {
2941
+ a[0].isIntersecting && n.onIntersect && (n.onIntersect(), n.once && o && o.disconnect());
2942
+ };
2943
+ return re(() => {
2944
+ o = new IntersectionObserver(r, {
2945
+ threshold: n.threshold,
2946
+ rootMargin: n.rootMargin
2947
+ }), t.value && o.observe(t.value);
2948
+ }), Ue(() => {
2949
+ o == null || o.disconnect();
2950
+ }), (a, l) => (g(), S("div", {
2951
+ ref_key: "container",
2952
+ ref: t
2953
+ }, [
2954
+ R(a.$slots, "default")
2955
+ ], 512));
2956
+ }
2957
+ });
2958
+ export {
2959
+ Zo as CardFiltersDrawer,
2960
+ Yo as CardFiltersModal,
2961
+ Ao as CardGrid,
2962
+ _t as CardLayout,
2963
+ Go as ColumnSettingsDrawer,
2964
+ fr as DEFAULT_PAGE_NUMBER,
2965
+ pr as DEFAULT_PAGE_SIZE,
2966
+ jo as DataTable,
2967
+ hr as DataView,
2968
+ te as FilterMode,
2969
+ vr as LazyLoadContainer,
2970
+ xo as LazyLoadTrigger,
2971
+ ur as PAGE_SIZE_EXTRA_LARGE,
2972
+ cr as PAGE_SIZE_LARGE,
2973
+ sr as PAGE_SIZE_MEDIUM,
2974
+ gr as PAGE_SIZE_OPTIONS,
2975
+ wo as PAGE_SIZE_SMALL,
2976
+ dr as PAGE_SIZE_ULTRA,
2977
+ ko as PageSizes,
2978
+ Mo as SkipSizes,
2979
+ To as SortOrder,
2980
+ Eo as TableDefaults,
2981
+ Ne as TableSortOrder,
2982
+ je as ViewMode,
2983
+ hr as default
2984
+ };
2985
+ //# sourceMappingURL=data-view.es.js.map