prlg-ui 1.8.205 → 1.8.207
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.
- package/dist/{QuestionIcon-oOIbs4ZL.js → QuestionIcon-5HbOuLvT.js} +31 -63
- package/dist/{QuestionIcon-CvTptO5S.cjs → QuestionIcon-BD9h7qtF.cjs} +1 -1
- package/dist/{WarningIcon-DXh-8r--.cjs → WarningIcon-BG0GZsNi.cjs} +1 -1
- package/dist/{WarningIcon-BGqL0ZOS.js → WarningIcon-BppFTRjH.js} +69 -37
- package/dist/blocks.d.ts +1 -1
- package/dist/icons/index.cjs.js +1 -1
- package/dist/icons/index.es.js +18 -18
- package/dist/icons.d.ts +1 -1
- package/dist/index-BPJT-DOc.js +3018 -0
- package/dist/index-vFxzmPvm.cjs +22 -0
- package/dist/index.d.ts +1 -1
- package/dist/prlg-ui.cjs.js +1 -22
- package/dist/prlg-ui.css +1 -1
- package/dist/prlg-ui.es.js +2818 -4585
- package/dist/reka-ui/index.cjs.js +4 -4
- package/dist/reka-ui/index.es.js +5142 -4861
- package/dist/rekaUI.d.ts +272 -214
- package/dist/types.d.ts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/floating-ui.vue-CNBcQL7G.js +0 -1248
- package/dist/floating-ui.vue-CW3NrUkY.cjs +0 -1
|
@@ -0,0 +1,3018 @@
|
|
|
1
|
+
import { computed as J, ref as le, shallowRef as St, watch as xe, getCurrentScope as Bt, onScopeDispose as Nt, shallowReadonly as re, unref as Ct, defineComponent as kt, isRef as qt, watchEffect as jt, h as bt } from "vue";
|
|
2
|
+
const Wt = ["top", "right", "bottom", "left"], Z = Math.min, E = Math.max, ye = Math.round, we = Math.floor, k = (e) => ({
|
|
3
|
+
x: e,
|
|
4
|
+
y: e
|
|
5
|
+
}), Ut = {
|
|
6
|
+
left: "right",
|
|
7
|
+
right: "left",
|
|
8
|
+
bottom: "top",
|
|
9
|
+
top: "bottom"
|
|
10
|
+
}, Xt = {
|
|
11
|
+
start: "end",
|
|
12
|
+
end: "start"
|
|
13
|
+
};
|
|
14
|
+
function Be(e, n, t) {
|
|
15
|
+
return E(e, Z(n, t));
|
|
16
|
+
}
|
|
17
|
+
function U(e, n) {
|
|
18
|
+
return typeof e == "function" ? e(n) : e;
|
|
19
|
+
}
|
|
20
|
+
function X(e) {
|
|
21
|
+
return e.split("-")[0];
|
|
22
|
+
}
|
|
23
|
+
function ge(e) {
|
|
24
|
+
return e.split("-")[1];
|
|
25
|
+
}
|
|
26
|
+
function Ke(e) {
|
|
27
|
+
return e === "x" ? "y" : "x";
|
|
28
|
+
}
|
|
29
|
+
function Ye(e) {
|
|
30
|
+
return e === "y" ? "height" : "width";
|
|
31
|
+
}
|
|
32
|
+
const Kt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
33
|
+
function N(e) {
|
|
34
|
+
return Kt.has(X(e)) ? "y" : "x";
|
|
35
|
+
}
|
|
36
|
+
function Je(e) {
|
|
37
|
+
return Ke(N(e));
|
|
38
|
+
}
|
|
39
|
+
function Yt(e, n, t) {
|
|
40
|
+
t === void 0 && (t = !1);
|
|
41
|
+
const o = ge(e), i = Je(e), r = Ye(i);
|
|
42
|
+
let l = i === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
43
|
+
return n.reference[r] > n.floating[r] && (l = _e(l)), [l, _e(l)];
|
|
44
|
+
}
|
|
45
|
+
function Jt(e) {
|
|
46
|
+
const n = _e(e);
|
|
47
|
+
return [Ne(e), n, Ne(n)];
|
|
48
|
+
}
|
|
49
|
+
function Ne(e) {
|
|
50
|
+
return e.replace(/start|end/g, (n) => Xt[n]);
|
|
51
|
+
}
|
|
52
|
+
const rt = ["left", "right"], lt = ["right", "left"], Qt = ["top", "bottom"], Zt = ["bottom", "top"];
|
|
53
|
+
function en(e, n, t) {
|
|
54
|
+
switch (e) {
|
|
55
|
+
case "top":
|
|
56
|
+
case "bottom":
|
|
57
|
+
return t ? n ? lt : rt : n ? rt : lt;
|
|
58
|
+
case "left":
|
|
59
|
+
case "right":
|
|
60
|
+
return n ? Qt : Zt;
|
|
61
|
+
default:
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function tn(e, n, t, o) {
|
|
66
|
+
const i = ge(e);
|
|
67
|
+
let r = en(X(e), t === "start", o);
|
|
68
|
+
return i && (r = r.map((l) => l + "-" + i), n && (r = r.concat(r.map(Ne)))), r;
|
|
69
|
+
}
|
|
70
|
+
function _e(e) {
|
|
71
|
+
return e.replace(/left|right|bottom|top/g, (n) => Ut[n]);
|
|
72
|
+
}
|
|
73
|
+
function nn(e) {
|
|
74
|
+
return {
|
|
75
|
+
top: 0,
|
|
76
|
+
right: 0,
|
|
77
|
+
bottom: 0,
|
|
78
|
+
left: 0,
|
|
79
|
+
...e
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function vt(e) {
|
|
83
|
+
return typeof e != "number" ? nn(e) : {
|
|
84
|
+
top: e,
|
|
85
|
+
right: e,
|
|
86
|
+
bottom: e,
|
|
87
|
+
left: e
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function Fe(e) {
|
|
91
|
+
const {
|
|
92
|
+
x: n,
|
|
93
|
+
y: t,
|
|
94
|
+
width: o,
|
|
95
|
+
height: i
|
|
96
|
+
} = e;
|
|
97
|
+
return {
|
|
98
|
+
width: o,
|
|
99
|
+
height: i,
|
|
100
|
+
top: t,
|
|
101
|
+
left: n,
|
|
102
|
+
right: n + o,
|
|
103
|
+
bottom: t + i,
|
|
104
|
+
x: n,
|
|
105
|
+
y: t
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function st(e, n, t) {
|
|
109
|
+
let {
|
|
110
|
+
reference: o,
|
|
111
|
+
floating: i
|
|
112
|
+
} = e;
|
|
113
|
+
const r = N(n), l = Je(n), s = Ye(l), u = X(n), g = r === "y", c = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, d = o[s] / 2 - i[s] / 2;
|
|
114
|
+
let a;
|
|
115
|
+
switch (u) {
|
|
116
|
+
case "top":
|
|
117
|
+
a = {
|
|
118
|
+
x: c,
|
|
119
|
+
y: o.y - i.height
|
|
120
|
+
};
|
|
121
|
+
break;
|
|
122
|
+
case "bottom":
|
|
123
|
+
a = {
|
|
124
|
+
x: c,
|
|
125
|
+
y: o.y + o.height
|
|
126
|
+
};
|
|
127
|
+
break;
|
|
128
|
+
case "right":
|
|
129
|
+
a = {
|
|
130
|
+
x: o.x + o.width,
|
|
131
|
+
y: f
|
|
132
|
+
};
|
|
133
|
+
break;
|
|
134
|
+
case "left":
|
|
135
|
+
a = {
|
|
136
|
+
x: o.x - i.width,
|
|
137
|
+
y: f
|
|
138
|
+
};
|
|
139
|
+
break;
|
|
140
|
+
default:
|
|
141
|
+
a = {
|
|
142
|
+
x: o.x,
|
|
143
|
+
y: o.y
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
switch (ge(n)) {
|
|
147
|
+
case "start":
|
|
148
|
+
a[l] -= d * (t && g ? -1 : 1);
|
|
149
|
+
break;
|
|
150
|
+
case "end":
|
|
151
|
+
a[l] += d * (t && g ? -1 : 1);
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
return a;
|
|
155
|
+
}
|
|
156
|
+
const on = async (e, n, t) => {
|
|
157
|
+
const {
|
|
158
|
+
placement: o = "bottom",
|
|
159
|
+
strategy: i = "absolute",
|
|
160
|
+
middleware: r = [],
|
|
161
|
+
platform: l
|
|
162
|
+
} = t, s = r.filter(Boolean), u = await (l.isRTL == null ? void 0 : l.isRTL(n));
|
|
163
|
+
let g = await l.getElementRects({
|
|
164
|
+
reference: e,
|
|
165
|
+
floating: n,
|
|
166
|
+
strategy: i
|
|
167
|
+
}), {
|
|
168
|
+
x: c,
|
|
169
|
+
y: f
|
|
170
|
+
} = st(g, o, u), d = o, a = {}, p = 0;
|
|
171
|
+
for (let m = 0; m < s.length; m++) {
|
|
172
|
+
const {
|
|
173
|
+
name: w,
|
|
174
|
+
fn: h
|
|
175
|
+
} = s[m], {
|
|
176
|
+
x: C,
|
|
177
|
+
y: S,
|
|
178
|
+
data: x,
|
|
179
|
+
reset: y
|
|
180
|
+
} = await h({
|
|
181
|
+
x: c,
|
|
182
|
+
y: f,
|
|
183
|
+
initialPlacement: o,
|
|
184
|
+
placement: d,
|
|
185
|
+
strategy: i,
|
|
186
|
+
middlewareData: a,
|
|
187
|
+
rects: g,
|
|
188
|
+
platform: l,
|
|
189
|
+
elements: {
|
|
190
|
+
reference: e,
|
|
191
|
+
floating: n
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
c = C ?? c, f = S ?? f, a = {
|
|
195
|
+
...a,
|
|
196
|
+
[w]: {
|
|
197
|
+
...a[w],
|
|
198
|
+
...x
|
|
199
|
+
}
|
|
200
|
+
}, y && p <= 50 && (p++, typeof y == "object" && (y.placement && (d = y.placement), y.rects && (g = y.rects === !0 ? await l.getElementRects({
|
|
201
|
+
reference: e,
|
|
202
|
+
floating: n,
|
|
203
|
+
strategy: i
|
|
204
|
+
}) : y.rects), {
|
|
205
|
+
x: c,
|
|
206
|
+
y: f
|
|
207
|
+
} = st(g, d, u)), m = -1);
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
x: c,
|
|
211
|
+
y: f,
|
|
212
|
+
placement: d,
|
|
213
|
+
strategy: i,
|
|
214
|
+
middlewareData: a
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
async function pe(e, n) {
|
|
218
|
+
var t;
|
|
219
|
+
n === void 0 && (n = {});
|
|
220
|
+
const {
|
|
221
|
+
x: o,
|
|
222
|
+
y: i,
|
|
223
|
+
platform: r,
|
|
224
|
+
rects: l,
|
|
225
|
+
elements: s,
|
|
226
|
+
strategy: u
|
|
227
|
+
} = e, {
|
|
228
|
+
boundary: g = "clippingAncestors",
|
|
229
|
+
rootBoundary: c = "viewport",
|
|
230
|
+
elementContext: f = "floating",
|
|
231
|
+
altBoundary: d = !1,
|
|
232
|
+
padding: a = 0
|
|
233
|
+
} = U(n, e), p = vt(a), w = s[d ? f === "floating" ? "reference" : "floating" : f], h = Fe(await r.getClippingRect({
|
|
234
|
+
element: (t = await (r.isElement == null ? void 0 : r.isElement(w))) == null || t ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(s.floating)),
|
|
235
|
+
boundary: g,
|
|
236
|
+
rootBoundary: c,
|
|
237
|
+
strategy: u
|
|
238
|
+
})), C = f === "floating" ? {
|
|
239
|
+
x: o,
|
|
240
|
+
y: i,
|
|
241
|
+
width: l.floating.width,
|
|
242
|
+
height: l.floating.height
|
|
243
|
+
} : l.reference, S = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(s.floating)), x = await (r.isElement == null ? void 0 : r.isElement(S)) ? await (r.getScale == null ? void 0 : r.getScale(S)) || {
|
|
244
|
+
x: 1,
|
|
245
|
+
y: 1
|
|
246
|
+
} : {
|
|
247
|
+
x: 1,
|
|
248
|
+
y: 1
|
|
249
|
+
}, y = Fe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
250
|
+
elements: s,
|
|
251
|
+
rect: C,
|
|
252
|
+
offsetParent: S,
|
|
253
|
+
strategy: u
|
|
254
|
+
}) : C);
|
|
255
|
+
return {
|
|
256
|
+
top: (h.top - y.top + p.top) / x.y,
|
|
257
|
+
bottom: (y.bottom - h.bottom + p.bottom) / x.y,
|
|
258
|
+
left: (h.left - y.left + p.left) / x.x,
|
|
259
|
+
right: (y.right - h.right + p.right) / x.x
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
const rn = (e) => ({
|
|
263
|
+
name: "arrow",
|
|
264
|
+
options: e,
|
|
265
|
+
async fn(n) {
|
|
266
|
+
const {
|
|
267
|
+
x: t,
|
|
268
|
+
y: o,
|
|
269
|
+
placement: i,
|
|
270
|
+
rects: r,
|
|
271
|
+
platform: l,
|
|
272
|
+
elements: s,
|
|
273
|
+
middlewareData: u
|
|
274
|
+
} = n, {
|
|
275
|
+
element: g,
|
|
276
|
+
padding: c = 0
|
|
277
|
+
} = U(e, n) || {};
|
|
278
|
+
if (g == null)
|
|
279
|
+
return {};
|
|
280
|
+
const f = vt(c), d = {
|
|
281
|
+
x: t,
|
|
282
|
+
y: o
|
|
283
|
+
}, a = Je(i), p = Ye(a), m = await l.getDimensions(g), w = a === "y", h = w ? "top" : "left", C = w ? "bottom" : "right", S = w ? "clientHeight" : "clientWidth", x = r.reference[p] + r.reference[a] - d[a] - r.floating[p], y = d[a] - r.reference[a], $ = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(g));
|
|
284
|
+
let _ = $ ? $[S] : 0;
|
|
285
|
+
(!_ || !await (l.isElement == null ? void 0 : l.isElement($))) && (_ = s.floating[S] || r.floating[p]);
|
|
286
|
+
const F = x / 2 - y / 2, M = _ / 2 - m[p] / 2 - 1, A = Z(f[h], M), L = Z(f[C], M), B = A, K = _ - m[p] - L, V = _ / 2 - m[p] / 2 + F, ne = Be(B, V, K), b = !u.arrow && ge(i) != null && V !== ne && r.reference[p] / 2 - (V < B ? A : L) - m[p] / 2 < 0, O = b ? V < B ? V - B : V - K : 0;
|
|
287
|
+
return {
|
|
288
|
+
[a]: d[a] + O,
|
|
289
|
+
data: {
|
|
290
|
+
[a]: ne,
|
|
291
|
+
centerOffset: V - ne - O,
|
|
292
|
+
...b && {
|
|
293
|
+
alignmentOffset: O
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
reset: b
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
}), ln = function(e) {
|
|
300
|
+
return e === void 0 && (e = {}), {
|
|
301
|
+
name: "flip",
|
|
302
|
+
options: e,
|
|
303
|
+
async fn(n) {
|
|
304
|
+
var t, o;
|
|
305
|
+
const {
|
|
306
|
+
placement: i,
|
|
307
|
+
middlewareData: r,
|
|
308
|
+
rects: l,
|
|
309
|
+
initialPlacement: s,
|
|
310
|
+
platform: u,
|
|
311
|
+
elements: g
|
|
312
|
+
} = n, {
|
|
313
|
+
mainAxis: c = !0,
|
|
314
|
+
crossAxis: f = !0,
|
|
315
|
+
fallbackPlacements: d,
|
|
316
|
+
fallbackStrategy: a = "bestFit",
|
|
317
|
+
fallbackAxisSideDirection: p = "none",
|
|
318
|
+
flipAlignment: m = !0,
|
|
319
|
+
...w
|
|
320
|
+
} = U(e, n);
|
|
321
|
+
if ((t = r.arrow) != null && t.alignmentOffset)
|
|
322
|
+
return {};
|
|
323
|
+
const h = X(i), C = N(s), S = X(s) === s, x = await (u.isRTL == null ? void 0 : u.isRTL(g.floating)), y = d || (S || !m ? [_e(s)] : Jt(s)), $ = p !== "none";
|
|
324
|
+
!d && $ && y.push(...tn(s, m, p, x));
|
|
325
|
+
const _ = [s, ...y], F = await pe(n, w), M = [];
|
|
326
|
+
let A = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
327
|
+
if (c && M.push(F[h]), f) {
|
|
328
|
+
const V = Yt(i, l, x);
|
|
329
|
+
M.push(F[V[0]], F[V[1]]);
|
|
330
|
+
}
|
|
331
|
+
if (A = [...A, {
|
|
332
|
+
placement: i,
|
|
333
|
+
overflows: M
|
|
334
|
+
}], !M.every((V) => V <= 0)) {
|
|
335
|
+
var L, B;
|
|
336
|
+
const V = (((L = r.flip) == null ? void 0 : L.index) || 0) + 1, ne = _[V];
|
|
337
|
+
if (ne && (!(f === "alignment" ? C !== N(ne) : !1) || // We leave the current main axis only if every placement on that axis
|
|
338
|
+
// overflows the main axis.
|
|
339
|
+
A.every((H) => N(H.placement) === C ? H.overflows[0] > 0 : !0)))
|
|
340
|
+
return {
|
|
341
|
+
data: {
|
|
342
|
+
index: V,
|
|
343
|
+
overflows: A
|
|
344
|
+
},
|
|
345
|
+
reset: {
|
|
346
|
+
placement: ne
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
let b = (B = A.filter((O) => O.overflows[0] <= 0).sort((O, H) => O.overflows[1] - H.overflows[1])[0]) == null ? void 0 : B.placement;
|
|
350
|
+
if (!b)
|
|
351
|
+
switch (a) {
|
|
352
|
+
case "bestFit": {
|
|
353
|
+
var K;
|
|
354
|
+
const O = (K = A.filter((H) => {
|
|
355
|
+
if ($) {
|
|
356
|
+
const Y = N(H.placement);
|
|
357
|
+
return Y === C || // Create a bias to the `y` side axis due to horizontal
|
|
358
|
+
// reading directions favoring greater width.
|
|
359
|
+
Y === "y";
|
|
360
|
+
}
|
|
361
|
+
return !0;
|
|
362
|
+
}).map((H) => [H.placement, H.overflows.filter((Y) => Y > 0).reduce((Y, Tt) => Y + Tt, 0)]).sort((H, Y) => H[1] - Y[1])[0]) == null ? void 0 : K[0];
|
|
363
|
+
O && (b = O);
|
|
364
|
+
break;
|
|
365
|
+
}
|
|
366
|
+
case "initialPlacement":
|
|
367
|
+
b = s;
|
|
368
|
+
break;
|
|
369
|
+
}
|
|
370
|
+
if (i !== b)
|
|
371
|
+
return {
|
|
372
|
+
reset: {
|
|
373
|
+
placement: b
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
return {};
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
function ut(e, n) {
|
|
382
|
+
return {
|
|
383
|
+
top: e.top - n.height,
|
|
384
|
+
right: e.right - n.width,
|
|
385
|
+
bottom: e.bottom - n.height,
|
|
386
|
+
left: e.left - n.width
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
function at(e) {
|
|
390
|
+
return Wt.some((n) => e[n] >= 0);
|
|
391
|
+
}
|
|
392
|
+
const sn = function(e) {
|
|
393
|
+
return e === void 0 && (e = {}), {
|
|
394
|
+
name: "hide",
|
|
395
|
+
options: e,
|
|
396
|
+
async fn(n) {
|
|
397
|
+
const {
|
|
398
|
+
rects: t
|
|
399
|
+
} = n, {
|
|
400
|
+
strategy: o = "referenceHidden",
|
|
401
|
+
...i
|
|
402
|
+
} = U(e, n);
|
|
403
|
+
switch (o) {
|
|
404
|
+
case "referenceHidden": {
|
|
405
|
+
const r = await pe(n, {
|
|
406
|
+
...i,
|
|
407
|
+
elementContext: "reference"
|
|
408
|
+
}), l = ut(r, t.reference);
|
|
409
|
+
return {
|
|
410
|
+
data: {
|
|
411
|
+
referenceHiddenOffsets: l,
|
|
412
|
+
referenceHidden: at(l)
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
case "escaped": {
|
|
417
|
+
const r = await pe(n, {
|
|
418
|
+
...i,
|
|
419
|
+
altBoundary: !0
|
|
420
|
+
}), l = ut(r, t.floating);
|
|
421
|
+
return {
|
|
422
|
+
data: {
|
|
423
|
+
escapedOffsets: l,
|
|
424
|
+
escaped: at(l)
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
default:
|
|
429
|
+
return {};
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
}, Rt = /* @__PURE__ */ new Set(["left", "top"]);
|
|
434
|
+
async function un(e, n) {
|
|
435
|
+
const {
|
|
436
|
+
placement: t,
|
|
437
|
+
platform: o,
|
|
438
|
+
elements: i
|
|
439
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), l = X(t), s = ge(t), u = N(t) === "y", g = Rt.has(l) ? -1 : 1, c = r && u ? -1 : 1, f = U(n, e);
|
|
440
|
+
let {
|
|
441
|
+
mainAxis: d,
|
|
442
|
+
crossAxis: a,
|
|
443
|
+
alignmentAxis: p
|
|
444
|
+
} = typeof f == "number" ? {
|
|
445
|
+
mainAxis: f,
|
|
446
|
+
crossAxis: 0,
|
|
447
|
+
alignmentAxis: null
|
|
448
|
+
} : {
|
|
449
|
+
mainAxis: f.mainAxis || 0,
|
|
450
|
+
crossAxis: f.crossAxis || 0,
|
|
451
|
+
alignmentAxis: f.alignmentAxis
|
|
452
|
+
};
|
|
453
|
+
return s && typeof p == "number" && (a = s === "end" ? p * -1 : p), u ? {
|
|
454
|
+
x: a * c,
|
|
455
|
+
y: d * g
|
|
456
|
+
} : {
|
|
457
|
+
x: d * g,
|
|
458
|
+
y: a * c
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
const an = function(e) {
|
|
462
|
+
return e === void 0 && (e = 0), {
|
|
463
|
+
name: "offset",
|
|
464
|
+
options: e,
|
|
465
|
+
async fn(n) {
|
|
466
|
+
var t, o;
|
|
467
|
+
const {
|
|
468
|
+
x: i,
|
|
469
|
+
y: r,
|
|
470
|
+
placement: l,
|
|
471
|
+
middlewareData: s
|
|
472
|
+
} = n, u = await un(n, e);
|
|
473
|
+
return l === ((t = s.offset) == null ? void 0 : t.placement) && (o = s.arrow) != null && o.alignmentOffset ? {} : {
|
|
474
|
+
x: i + u.x,
|
|
475
|
+
y: r + u.y,
|
|
476
|
+
data: {
|
|
477
|
+
...u,
|
|
478
|
+
placement: l
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
}, gn = function(e) {
|
|
484
|
+
return e === void 0 && (e = {}), {
|
|
485
|
+
name: "shift",
|
|
486
|
+
options: e,
|
|
487
|
+
async fn(n) {
|
|
488
|
+
const {
|
|
489
|
+
x: t,
|
|
490
|
+
y: o,
|
|
491
|
+
placement: i
|
|
492
|
+
} = n, {
|
|
493
|
+
mainAxis: r = !0,
|
|
494
|
+
crossAxis: l = !1,
|
|
495
|
+
limiter: s = {
|
|
496
|
+
fn: (w) => {
|
|
497
|
+
let {
|
|
498
|
+
x: h,
|
|
499
|
+
y: C
|
|
500
|
+
} = w;
|
|
501
|
+
return {
|
|
502
|
+
x: h,
|
|
503
|
+
y: C
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
...u
|
|
508
|
+
} = U(e, n), g = {
|
|
509
|
+
x: t,
|
|
510
|
+
y: o
|
|
511
|
+
}, c = await pe(n, u), f = N(X(i)), d = Ke(f);
|
|
512
|
+
let a = g[d], p = g[f];
|
|
513
|
+
if (r) {
|
|
514
|
+
const w = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", C = a + c[w], S = a - c[h];
|
|
515
|
+
a = Be(C, a, S);
|
|
516
|
+
}
|
|
517
|
+
if (l) {
|
|
518
|
+
const w = f === "y" ? "top" : "left", h = f === "y" ? "bottom" : "right", C = p + c[w], S = p - c[h];
|
|
519
|
+
p = Be(C, p, S);
|
|
520
|
+
}
|
|
521
|
+
const m = s.fn({
|
|
522
|
+
...n,
|
|
523
|
+
[d]: a,
|
|
524
|
+
[f]: p
|
|
525
|
+
});
|
|
526
|
+
return {
|
|
527
|
+
...m,
|
|
528
|
+
data: {
|
|
529
|
+
x: m.x - t,
|
|
530
|
+
y: m.y - o,
|
|
531
|
+
enabled: {
|
|
532
|
+
[d]: r,
|
|
533
|
+
[f]: l
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
}, cn = function(e) {
|
|
540
|
+
return e === void 0 && (e = {}), {
|
|
541
|
+
options: e,
|
|
542
|
+
fn(n) {
|
|
543
|
+
const {
|
|
544
|
+
x: t,
|
|
545
|
+
y: o,
|
|
546
|
+
placement: i,
|
|
547
|
+
rects: r,
|
|
548
|
+
middlewareData: l
|
|
549
|
+
} = n, {
|
|
550
|
+
offset: s = 0,
|
|
551
|
+
mainAxis: u = !0,
|
|
552
|
+
crossAxis: g = !0
|
|
553
|
+
} = U(e, n), c = {
|
|
554
|
+
x: t,
|
|
555
|
+
y: o
|
|
556
|
+
}, f = N(i), d = Ke(f);
|
|
557
|
+
let a = c[d], p = c[f];
|
|
558
|
+
const m = U(s, n), w = typeof m == "number" ? {
|
|
559
|
+
mainAxis: m,
|
|
560
|
+
crossAxis: 0
|
|
561
|
+
} : {
|
|
562
|
+
mainAxis: 0,
|
|
563
|
+
crossAxis: 0,
|
|
564
|
+
...m
|
|
565
|
+
};
|
|
566
|
+
if (u) {
|
|
567
|
+
const S = d === "y" ? "height" : "width", x = r.reference[d] - r.floating[S] + w.mainAxis, y = r.reference[d] + r.reference[S] - w.mainAxis;
|
|
568
|
+
a < x ? a = x : a > y && (a = y);
|
|
569
|
+
}
|
|
570
|
+
if (g) {
|
|
571
|
+
var h, C;
|
|
572
|
+
const S = d === "y" ? "width" : "height", x = Rt.has(X(i)), y = r.reference[f] - r.floating[S] + (x && ((h = l.offset) == null ? void 0 : h[f]) || 0) + (x ? 0 : w.crossAxis), $ = r.reference[f] + r.reference[S] + (x ? 0 : ((C = l.offset) == null ? void 0 : C[f]) || 0) - (x ? w.crossAxis : 0);
|
|
573
|
+
p < y ? p = y : p > $ && (p = $);
|
|
574
|
+
}
|
|
575
|
+
return {
|
|
576
|
+
[d]: a,
|
|
577
|
+
[f]: p
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
}, dn = function(e) {
|
|
582
|
+
return e === void 0 && (e = {}), {
|
|
583
|
+
name: "size",
|
|
584
|
+
options: e,
|
|
585
|
+
async fn(n) {
|
|
586
|
+
var t, o;
|
|
587
|
+
const {
|
|
588
|
+
placement: i,
|
|
589
|
+
rects: r,
|
|
590
|
+
platform: l,
|
|
591
|
+
elements: s
|
|
592
|
+
} = n, {
|
|
593
|
+
apply: u = () => {
|
|
594
|
+
},
|
|
595
|
+
...g
|
|
596
|
+
} = U(e, n), c = await pe(n, g), f = X(i), d = ge(i), a = N(i) === "y", {
|
|
597
|
+
width: p,
|
|
598
|
+
height: m
|
|
599
|
+
} = r.floating;
|
|
600
|
+
let w, h;
|
|
601
|
+
f === "top" || f === "bottom" ? (w = f, h = d === (await (l.isRTL == null ? void 0 : l.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (h = f, w = d === "end" ? "top" : "bottom");
|
|
602
|
+
const C = m - c.top - c.bottom, S = p - c.left - c.right, x = Z(m - c[w], C), y = Z(p - c[h], S), $ = !n.middlewareData.shift;
|
|
603
|
+
let _ = x, F = y;
|
|
604
|
+
if ((t = n.middlewareData.shift) != null && t.enabled.x && (F = S), (o = n.middlewareData.shift) != null && o.enabled.y && (_ = C), $ && !d) {
|
|
605
|
+
const A = E(c.left, 0), L = E(c.right, 0), B = E(c.top, 0), K = E(c.bottom, 0);
|
|
606
|
+
a ? F = p - 2 * (A !== 0 || L !== 0 ? A + L : E(c.left, c.right)) : _ = m - 2 * (B !== 0 || K !== 0 ? B + K : E(c.top, c.bottom));
|
|
607
|
+
}
|
|
608
|
+
await u({
|
|
609
|
+
...n,
|
|
610
|
+
availableWidth: F,
|
|
611
|
+
availableHeight: _
|
|
612
|
+
});
|
|
613
|
+
const M = await l.getDimensions(s.floating);
|
|
614
|
+
return p !== M.width || m !== M.height ? {
|
|
615
|
+
reset: {
|
|
616
|
+
rects: !0
|
|
617
|
+
}
|
|
618
|
+
} : {};
|
|
619
|
+
}
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
function $e() {
|
|
623
|
+
return typeof window < "u";
|
|
624
|
+
}
|
|
625
|
+
function ie(e) {
|
|
626
|
+
return Qe(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
627
|
+
}
|
|
628
|
+
function I(e) {
|
|
629
|
+
var n;
|
|
630
|
+
return (e == null || (n = e.ownerDocument) == null ? void 0 : n.defaultView) || window;
|
|
631
|
+
}
|
|
632
|
+
function j(e) {
|
|
633
|
+
var n;
|
|
634
|
+
return (n = (Qe(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
|
|
635
|
+
}
|
|
636
|
+
function Qe(e) {
|
|
637
|
+
return $e() ? e instanceof Node || e instanceof I(e).Node : !1;
|
|
638
|
+
}
|
|
639
|
+
function z(e) {
|
|
640
|
+
return $e() ? e instanceof Element || e instanceof I(e).Element : !1;
|
|
641
|
+
}
|
|
642
|
+
function q(e) {
|
|
643
|
+
return $e() ? e instanceof HTMLElement || e instanceof I(e).HTMLElement : !1;
|
|
644
|
+
}
|
|
645
|
+
function gt(e) {
|
|
646
|
+
return !$e() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof I(e).ShadowRoot;
|
|
647
|
+
}
|
|
648
|
+
const fn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
649
|
+
function he(e) {
|
|
650
|
+
const {
|
|
651
|
+
overflow: n,
|
|
652
|
+
overflowX: t,
|
|
653
|
+
overflowY: o,
|
|
654
|
+
display: i
|
|
655
|
+
} = T(e);
|
|
656
|
+
return /auto|scroll|overlay|hidden|clip/.test(n + o + t) && !fn.has(i);
|
|
657
|
+
}
|
|
658
|
+
const pn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
659
|
+
function mn(e) {
|
|
660
|
+
return pn.has(ie(e));
|
|
661
|
+
}
|
|
662
|
+
const hn = [":popover-open", ":modal"];
|
|
663
|
+
function Pe(e) {
|
|
664
|
+
return hn.some((n) => {
|
|
665
|
+
try {
|
|
666
|
+
return e.matches(n);
|
|
667
|
+
} catch {
|
|
668
|
+
return !1;
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
const wn = ["transform", "translate", "scale", "rotate", "perspective"], Sn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Cn = ["paint", "layout", "strict", "content"];
|
|
673
|
+
function Ze(e) {
|
|
674
|
+
const n = et(), t = z(e) ? T(e) : e;
|
|
675
|
+
return wn.some((o) => t[o] ? t[o] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !n && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !n && (t.filter ? t.filter !== "none" : !1) || Sn.some((o) => (t.willChange || "").includes(o)) || Cn.some((o) => (t.contain || "").includes(o));
|
|
676
|
+
}
|
|
677
|
+
function vn(e) {
|
|
678
|
+
let n = ee(e);
|
|
679
|
+
for (; q(n) && !ae(n); ) {
|
|
680
|
+
if (Ze(n))
|
|
681
|
+
return n;
|
|
682
|
+
if (Pe(n))
|
|
683
|
+
return null;
|
|
684
|
+
n = ee(n);
|
|
685
|
+
}
|
|
686
|
+
return null;
|
|
687
|
+
}
|
|
688
|
+
function et() {
|
|
689
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
690
|
+
}
|
|
691
|
+
const Rn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
692
|
+
function ae(e) {
|
|
693
|
+
return Rn.has(ie(e));
|
|
694
|
+
}
|
|
695
|
+
function T(e) {
|
|
696
|
+
return I(e).getComputedStyle(e);
|
|
697
|
+
}
|
|
698
|
+
function Me(e) {
|
|
699
|
+
return z(e) ? {
|
|
700
|
+
scrollLeft: e.scrollLeft,
|
|
701
|
+
scrollTop: e.scrollTop
|
|
702
|
+
} : {
|
|
703
|
+
scrollLeft: e.scrollX,
|
|
704
|
+
scrollTop: e.scrollY
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
function ee(e) {
|
|
708
|
+
if (ie(e) === "html")
|
|
709
|
+
return e;
|
|
710
|
+
const n = (
|
|
711
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
712
|
+
e.assignedSlot || // DOM Element detected.
|
|
713
|
+
e.parentNode || // ShadowRoot detected.
|
|
714
|
+
gt(e) && e.host || // Fallback.
|
|
715
|
+
j(e)
|
|
716
|
+
);
|
|
717
|
+
return gt(n) ? n.host : n;
|
|
718
|
+
}
|
|
719
|
+
function xt(e) {
|
|
720
|
+
const n = ee(e);
|
|
721
|
+
return ae(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : q(n) && he(n) ? n : xt(n);
|
|
722
|
+
}
|
|
723
|
+
function me(e, n, t) {
|
|
724
|
+
var o;
|
|
725
|
+
n === void 0 && (n = []), t === void 0 && (t = !0);
|
|
726
|
+
const i = xt(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), l = I(i);
|
|
727
|
+
if (r) {
|
|
728
|
+
const s = ke(l);
|
|
729
|
+
return n.concat(l, l.visualViewport || [], he(i) ? i : [], s && t ? me(s) : []);
|
|
730
|
+
}
|
|
731
|
+
return n.concat(i, me(i, [], t));
|
|
732
|
+
}
|
|
733
|
+
function ke(e) {
|
|
734
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
735
|
+
}
|
|
736
|
+
function yt(e) {
|
|
737
|
+
const n = T(e);
|
|
738
|
+
let t = parseFloat(n.width) || 0, o = parseFloat(n.height) || 0;
|
|
739
|
+
const i = q(e), r = i ? e.offsetWidth : t, l = i ? e.offsetHeight : o, s = ye(t) !== r || ye(o) !== l;
|
|
740
|
+
return s && (t = r, o = l), {
|
|
741
|
+
width: t,
|
|
742
|
+
height: o,
|
|
743
|
+
$: s
|
|
744
|
+
};
|
|
745
|
+
}
|
|
746
|
+
function tt(e) {
|
|
747
|
+
return z(e) ? e : e.contextElement;
|
|
748
|
+
}
|
|
749
|
+
function ue(e) {
|
|
750
|
+
const n = tt(e);
|
|
751
|
+
if (!q(n))
|
|
752
|
+
return k(1);
|
|
753
|
+
const t = n.getBoundingClientRect(), {
|
|
754
|
+
width: o,
|
|
755
|
+
height: i,
|
|
756
|
+
$: r
|
|
757
|
+
} = yt(n);
|
|
758
|
+
let l = (r ? ye(t.width) : t.width) / o, s = (r ? ye(t.height) : t.height) / i;
|
|
759
|
+
return (!l || !Number.isFinite(l)) && (l = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
760
|
+
x: l,
|
|
761
|
+
y: s
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
const xn = /* @__PURE__ */ k(0);
|
|
765
|
+
function _t(e) {
|
|
766
|
+
const n = I(e);
|
|
767
|
+
return !et() || !n.visualViewport ? xn : {
|
|
768
|
+
x: n.visualViewport.offsetLeft,
|
|
769
|
+
y: n.visualViewport.offsetTop
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
function yn(e, n, t) {
|
|
773
|
+
return n === void 0 && (n = !1), !t || n && t !== I(e) ? !1 : n;
|
|
774
|
+
}
|
|
775
|
+
function oe(e, n, t, o) {
|
|
776
|
+
n === void 0 && (n = !1), t === void 0 && (t = !1);
|
|
777
|
+
const i = e.getBoundingClientRect(), r = tt(e);
|
|
778
|
+
let l = k(1);
|
|
779
|
+
n && (o ? z(o) && (l = ue(o)) : l = ue(e));
|
|
780
|
+
const s = yn(r, t, o) ? _t(r) : k(0);
|
|
781
|
+
let u = (i.left + s.x) / l.x, g = (i.top + s.y) / l.y, c = i.width / l.x, f = i.height / l.y;
|
|
782
|
+
if (r) {
|
|
783
|
+
const d = I(r), a = o && z(o) ? I(o) : o;
|
|
784
|
+
let p = d, m = ke(p);
|
|
785
|
+
for (; m && o && a !== p; ) {
|
|
786
|
+
const w = ue(m), h = m.getBoundingClientRect(), C = T(m), S = h.left + (m.clientLeft + parseFloat(C.paddingLeft)) * w.x, x = h.top + (m.clientTop + parseFloat(C.paddingTop)) * w.y;
|
|
787
|
+
u *= w.x, g *= w.y, c *= w.x, f *= w.y, u += S, g += x, p = I(m), m = ke(p);
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
return Fe({
|
|
791
|
+
width: c,
|
|
792
|
+
height: f,
|
|
793
|
+
x: u,
|
|
794
|
+
y: g
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
function Ve(e, n) {
|
|
798
|
+
const t = Me(e).scrollLeft;
|
|
799
|
+
return n ? n.left + t : oe(j(e)).left + t;
|
|
800
|
+
}
|
|
801
|
+
function Ft(e, n) {
|
|
802
|
+
const t = e.getBoundingClientRect(), o = t.left + n.scrollLeft - Ve(e, t), i = t.top + n.scrollTop;
|
|
803
|
+
return {
|
|
804
|
+
x: o,
|
|
805
|
+
y: i
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
function _n(e) {
|
|
809
|
+
let {
|
|
810
|
+
elements: n,
|
|
811
|
+
rect: t,
|
|
812
|
+
offsetParent: o,
|
|
813
|
+
strategy: i
|
|
814
|
+
} = e;
|
|
815
|
+
const r = i === "fixed", l = j(o), s = n ? Pe(n.floating) : !1;
|
|
816
|
+
if (o === l || s && r)
|
|
817
|
+
return t;
|
|
818
|
+
let u = {
|
|
819
|
+
scrollLeft: 0,
|
|
820
|
+
scrollTop: 0
|
|
821
|
+
}, g = k(1);
|
|
822
|
+
const c = k(0), f = q(o);
|
|
823
|
+
if ((f || !f && !r) && ((ie(o) !== "body" || he(l)) && (u = Me(o)), q(o))) {
|
|
824
|
+
const a = oe(o);
|
|
825
|
+
g = ue(o), c.x = a.x + o.clientLeft, c.y = a.y + o.clientTop;
|
|
826
|
+
}
|
|
827
|
+
const d = l && !f && !r ? Ft(l, u) : k(0);
|
|
828
|
+
return {
|
|
829
|
+
width: t.width * g.x,
|
|
830
|
+
height: t.height * g.y,
|
|
831
|
+
x: t.x * g.x - u.scrollLeft * g.x + c.x + d.x,
|
|
832
|
+
y: t.y * g.y - u.scrollTop * g.y + c.y + d.y
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
function Fn(e) {
|
|
836
|
+
return Array.from(e.getClientRects());
|
|
837
|
+
}
|
|
838
|
+
function $n(e) {
|
|
839
|
+
const n = j(e), t = Me(e), o = e.ownerDocument.body, i = E(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth), r = E(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight);
|
|
840
|
+
let l = -t.scrollLeft + Ve(e);
|
|
841
|
+
const s = -t.scrollTop;
|
|
842
|
+
return T(o).direction === "rtl" && (l += E(n.clientWidth, o.clientWidth) - i), {
|
|
843
|
+
width: i,
|
|
844
|
+
height: r,
|
|
845
|
+
x: l,
|
|
846
|
+
y: s
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
const ct = 25;
|
|
850
|
+
function Pn(e, n) {
|
|
851
|
+
const t = I(e), o = j(e), i = t.visualViewport;
|
|
852
|
+
let r = o.clientWidth, l = o.clientHeight, s = 0, u = 0;
|
|
853
|
+
if (i) {
|
|
854
|
+
r = i.width, l = i.height;
|
|
855
|
+
const c = et();
|
|
856
|
+
(!c || c && n === "fixed") && (s = i.offsetLeft, u = i.offsetTop);
|
|
857
|
+
}
|
|
858
|
+
const g = Ve(o);
|
|
859
|
+
if (g <= 0) {
|
|
860
|
+
const c = o.ownerDocument, f = c.body, d = getComputedStyle(f), a = c.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, p = Math.abs(o.clientWidth - f.clientWidth - a);
|
|
861
|
+
p <= ct && (r -= p);
|
|
862
|
+
} else g <= ct && (r += g);
|
|
863
|
+
return {
|
|
864
|
+
width: r,
|
|
865
|
+
height: l,
|
|
866
|
+
x: s,
|
|
867
|
+
y: u
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
const Mn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
871
|
+
function Vn(e, n) {
|
|
872
|
+
const t = oe(e, !0, n === "fixed"), o = t.top + e.clientTop, i = t.left + e.clientLeft, r = q(e) ? ue(e) : k(1), l = e.clientWidth * r.x, s = e.clientHeight * r.y, u = i * r.x, g = o * r.y;
|
|
873
|
+
return {
|
|
874
|
+
width: l,
|
|
875
|
+
height: s,
|
|
876
|
+
x: u,
|
|
877
|
+
y: g
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
function dt(e, n, t) {
|
|
881
|
+
let o;
|
|
882
|
+
if (n === "viewport")
|
|
883
|
+
o = Pn(e, t);
|
|
884
|
+
else if (n === "document")
|
|
885
|
+
o = $n(j(e));
|
|
886
|
+
else if (z(n))
|
|
887
|
+
o = Vn(n, t);
|
|
888
|
+
else {
|
|
889
|
+
const i = _t(e);
|
|
890
|
+
o = {
|
|
891
|
+
x: n.x - i.x,
|
|
892
|
+
y: n.y - i.y,
|
|
893
|
+
width: n.width,
|
|
894
|
+
height: n.height
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
return Fe(o);
|
|
898
|
+
}
|
|
899
|
+
function $t(e, n) {
|
|
900
|
+
const t = ee(e);
|
|
901
|
+
return t === n || !z(t) || ae(t) ? !1 : T(t).position === "fixed" || $t(t, n);
|
|
902
|
+
}
|
|
903
|
+
function An(e, n) {
|
|
904
|
+
const t = n.get(e);
|
|
905
|
+
if (t)
|
|
906
|
+
return t;
|
|
907
|
+
let o = me(e, [], !1).filter((s) => z(s) && ie(s) !== "body"), i = null;
|
|
908
|
+
const r = T(e).position === "fixed";
|
|
909
|
+
let l = r ? ee(e) : e;
|
|
910
|
+
for (; z(l) && !ae(l); ) {
|
|
911
|
+
const s = T(l), u = Ze(l);
|
|
912
|
+
!u && s.position === "fixed" && (i = null), (r ? !u && !i : !u && s.position === "static" && !!i && Mn.has(i.position) || he(l) && !u && $t(e, l)) ? o = o.filter((c) => c !== l) : i = s, l = ee(l);
|
|
913
|
+
}
|
|
914
|
+
return n.set(e, o), o;
|
|
915
|
+
}
|
|
916
|
+
function En(e) {
|
|
917
|
+
let {
|
|
918
|
+
element: n,
|
|
919
|
+
boundary: t,
|
|
920
|
+
rootBoundary: o,
|
|
921
|
+
strategy: i
|
|
922
|
+
} = e;
|
|
923
|
+
const l = [...t === "clippingAncestors" ? Pe(n) ? [] : An(n, this._c) : [].concat(t), o], s = l[0], u = l.reduce((g, c) => {
|
|
924
|
+
const f = dt(n, c, i);
|
|
925
|
+
return g.top = E(f.top, g.top), g.right = Z(f.right, g.right), g.bottom = Z(f.bottom, g.bottom), g.left = E(f.left, g.left), g;
|
|
926
|
+
}, dt(n, s, i));
|
|
927
|
+
return {
|
|
928
|
+
width: u.right - u.left,
|
|
929
|
+
height: u.bottom - u.top,
|
|
930
|
+
x: u.left,
|
|
931
|
+
y: u.top
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
function In(e) {
|
|
935
|
+
const {
|
|
936
|
+
width: n,
|
|
937
|
+
height: t
|
|
938
|
+
} = yt(e);
|
|
939
|
+
return {
|
|
940
|
+
width: n,
|
|
941
|
+
height: t
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
function Dn(e, n, t) {
|
|
945
|
+
const o = q(n), i = j(n), r = t === "fixed", l = oe(e, !0, r, n);
|
|
946
|
+
let s = {
|
|
947
|
+
scrollLeft: 0,
|
|
948
|
+
scrollTop: 0
|
|
949
|
+
};
|
|
950
|
+
const u = k(0);
|
|
951
|
+
function g() {
|
|
952
|
+
u.x = Ve(i);
|
|
953
|
+
}
|
|
954
|
+
if (o || !o && !r)
|
|
955
|
+
if ((ie(n) !== "body" || he(i)) && (s = Me(n)), o) {
|
|
956
|
+
const a = oe(n, !0, r, n);
|
|
957
|
+
u.x = a.x + n.clientLeft, u.y = a.y + n.clientTop;
|
|
958
|
+
} else i && g();
|
|
959
|
+
r && !o && i && g();
|
|
960
|
+
const c = i && !o && !r ? Ft(i, s) : k(0), f = l.left + s.scrollLeft - u.x - c.x, d = l.top + s.scrollTop - u.y - c.y;
|
|
961
|
+
return {
|
|
962
|
+
x: f,
|
|
963
|
+
y: d,
|
|
964
|
+
width: l.width,
|
|
965
|
+
height: l.height
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
function Ee(e) {
|
|
969
|
+
return T(e).position === "static";
|
|
970
|
+
}
|
|
971
|
+
function ft(e, n) {
|
|
972
|
+
if (!q(e) || T(e).position === "fixed")
|
|
973
|
+
return null;
|
|
974
|
+
if (n)
|
|
975
|
+
return n(e);
|
|
976
|
+
let t = e.offsetParent;
|
|
977
|
+
return j(e) === t && (t = t.ownerDocument.body), t;
|
|
978
|
+
}
|
|
979
|
+
function Pt(e, n) {
|
|
980
|
+
const t = I(e);
|
|
981
|
+
if (Pe(e))
|
|
982
|
+
return t;
|
|
983
|
+
if (!q(e)) {
|
|
984
|
+
let i = ee(e);
|
|
985
|
+
for (; i && !ae(i); ) {
|
|
986
|
+
if (z(i) && !Ee(i))
|
|
987
|
+
return i;
|
|
988
|
+
i = ee(i);
|
|
989
|
+
}
|
|
990
|
+
return t;
|
|
991
|
+
}
|
|
992
|
+
let o = ft(e, n);
|
|
993
|
+
for (; o && mn(o) && Ee(o); )
|
|
994
|
+
o = ft(o, n);
|
|
995
|
+
return o && ae(o) && Ee(o) && !Ze(o) ? t : o || vn(e) || t;
|
|
996
|
+
}
|
|
997
|
+
const Ln = async function(e) {
|
|
998
|
+
const n = this.getOffsetParent || Pt, t = this.getDimensions, o = await t(e.floating);
|
|
999
|
+
return {
|
|
1000
|
+
reference: Dn(e.reference, await n(e.floating), e.strategy),
|
|
1001
|
+
floating: {
|
|
1002
|
+
x: 0,
|
|
1003
|
+
y: 0,
|
|
1004
|
+
width: o.width,
|
|
1005
|
+
height: o.height
|
|
1006
|
+
}
|
|
1007
|
+
};
|
|
1008
|
+
};
|
|
1009
|
+
function On(e) {
|
|
1010
|
+
return T(e).direction === "rtl";
|
|
1011
|
+
}
|
|
1012
|
+
const Hn = {
|
|
1013
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: _n,
|
|
1014
|
+
getDocumentElement: j,
|
|
1015
|
+
getClippingRect: En,
|
|
1016
|
+
getOffsetParent: Pt,
|
|
1017
|
+
getElementRects: Ln,
|
|
1018
|
+
getClientRects: Fn,
|
|
1019
|
+
getDimensions: In,
|
|
1020
|
+
getScale: ue,
|
|
1021
|
+
isElement: z,
|
|
1022
|
+
isRTL: On
|
|
1023
|
+
};
|
|
1024
|
+
function Mt(e, n) {
|
|
1025
|
+
return e.x === n.x && e.y === n.y && e.width === n.width && e.height === n.height;
|
|
1026
|
+
}
|
|
1027
|
+
function Gn(e, n) {
|
|
1028
|
+
let t = null, o;
|
|
1029
|
+
const i = j(e);
|
|
1030
|
+
function r() {
|
|
1031
|
+
var s;
|
|
1032
|
+
clearTimeout(o), (s = t) == null || s.disconnect(), t = null;
|
|
1033
|
+
}
|
|
1034
|
+
function l(s, u) {
|
|
1035
|
+
s === void 0 && (s = !1), u === void 0 && (u = 1), r();
|
|
1036
|
+
const g = e.getBoundingClientRect(), {
|
|
1037
|
+
left: c,
|
|
1038
|
+
top: f,
|
|
1039
|
+
width: d,
|
|
1040
|
+
height: a
|
|
1041
|
+
} = g;
|
|
1042
|
+
if (s || n(), !d || !a)
|
|
1043
|
+
return;
|
|
1044
|
+
const p = we(f), m = we(i.clientWidth - (c + d)), w = we(i.clientHeight - (f + a)), h = we(c), S = {
|
|
1045
|
+
rootMargin: -p + "px " + -m + "px " + -w + "px " + -h + "px",
|
|
1046
|
+
threshold: E(0, Z(1, u)) || 1
|
|
1047
|
+
};
|
|
1048
|
+
let x = !0;
|
|
1049
|
+
function y($) {
|
|
1050
|
+
const _ = $[0].intersectionRatio;
|
|
1051
|
+
if (_ !== u) {
|
|
1052
|
+
if (!x)
|
|
1053
|
+
return l();
|
|
1054
|
+
_ ? l(!1, _) : o = setTimeout(() => {
|
|
1055
|
+
l(!1, 1e-7);
|
|
1056
|
+
}, 1e3);
|
|
1057
|
+
}
|
|
1058
|
+
_ === 1 && !Mt(g, e.getBoundingClientRect()) && l(), x = !1;
|
|
1059
|
+
}
|
|
1060
|
+
try {
|
|
1061
|
+
t = new IntersectionObserver(y, {
|
|
1062
|
+
...S,
|
|
1063
|
+
// Handle <iframe>s
|
|
1064
|
+
root: i.ownerDocument
|
|
1065
|
+
});
|
|
1066
|
+
} catch {
|
|
1067
|
+
t = new IntersectionObserver(y, S);
|
|
1068
|
+
}
|
|
1069
|
+
t.observe(e);
|
|
1070
|
+
}
|
|
1071
|
+
return l(!0), r;
|
|
1072
|
+
}
|
|
1073
|
+
function Eo(e, n, t, o) {
|
|
1074
|
+
o === void 0 && (o = {});
|
|
1075
|
+
const {
|
|
1076
|
+
ancestorScroll: i = !0,
|
|
1077
|
+
ancestorResize: r = !0,
|
|
1078
|
+
elementResize: l = typeof ResizeObserver == "function",
|
|
1079
|
+
layoutShift: s = typeof IntersectionObserver == "function",
|
|
1080
|
+
animationFrame: u = !1
|
|
1081
|
+
} = o, g = tt(e), c = i || r ? [...g ? me(g) : [], ...me(n)] : [];
|
|
1082
|
+
c.forEach((h) => {
|
|
1083
|
+
i && h.addEventListener("scroll", t, {
|
|
1084
|
+
passive: !0
|
|
1085
|
+
}), r && h.addEventListener("resize", t);
|
|
1086
|
+
});
|
|
1087
|
+
const f = g && s ? Gn(g, t) : null;
|
|
1088
|
+
let d = -1, a = null;
|
|
1089
|
+
l && (a = new ResizeObserver((h) => {
|
|
1090
|
+
let [C] = h;
|
|
1091
|
+
C && C.target === g && a && (a.unobserve(n), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1092
|
+
var S;
|
|
1093
|
+
(S = a) == null || S.observe(n);
|
|
1094
|
+
})), t();
|
|
1095
|
+
}), g && !u && a.observe(g), a.observe(n));
|
|
1096
|
+
let p, m = u ? oe(e) : null;
|
|
1097
|
+
u && w();
|
|
1098
|
+
function w() {
|
|
1099
|
+
const h = oe(e);
|
|
1100
|
+
m && !Mt(m, h) && t(), m = h, p = requestAnimationFrame(w);
|
|
1101
|
+
}
|
|
1102
|
+
return t(), () => {
|
|
1103
|
+
var h;
|
|
1104
|
+
c.forEach((C) => {
|
|
1105
|
+
i && C.removeEventListener("scroll", t), r && C.removeEventListener("resize", t);
|
|
1106
|
+
}), f?.(), (h = a) == null || h.disconnect(), a = null, u && cancelAnimationFrame(p);
|
|
1107
|
+
};
|
|
1108
|
+
}
|
|
1109
|
+
const Io = an, Do = gn, Lo = ln, Oo = dn, Ho = sn, zn = rn, Go = cn, Tn = (e, n, t) => {
|
|
1110
|
+
const o = /* @__PURE__ */ new Map(), i = {
|
|
1111
|
+
platform: Hn,
|
|
1112
|
+
...t
|
|
1113
|
+
}, r = {
|
|
1114
|
+
...i.platform,
|
|
1115
|
+
_c: o
|
|
1116
|
+
};
|
|
1117
|
+
return on(e, n, {
|
|
1118
|
+
...i,
|
|
1119
|
+
platform: r
|
|
1120
|
+
});
|
|
1121
|
+
};
|
|
1122
|
+
function Bn(e) {
|
|
1123
|
+
return e != null && typeof e == "object" && "$el" in e;
|
|
1124
|
+
}
|
|
1125
|
+
function qe(e) {
|
|
1126
|
+
if (Bn(e)) {
|
|
1127
|
+
const n = e.$el;
|
|
1128
|
+
return Qe(n) && ie(n) === "#comment" ? null : n;
|
|
1129
|
+
}
|
|
1130
|
+
return e;
|
|
1131
|
+
}
|
|
1132
|
+
function se(e) {
|
|
1133
|
+
return typeof e == "function" ? e() : Ct(e);
|
|
1134
|
+
}
|
|
1135
|
+
function zo(e) {
|
|
1136
|
+
return {
|
|
1137
|
+
name: "arrow",
|
|
1138
|
+
options: e,
|
|
1139
|
+
fn(n) {
|
|
1140
|
+
const t = qe(se(e.element));
|
|
1141
|
+
return t == null ? {} : zn({
|
|
1142
|
+
element: t,
|
|
1143
|
+
padding: e.padding
|
|
1144
|
+
}).fn(n);
|
|
1145
|
+
}
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1148
|
+
function Vt(e) {
|
|
1149
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1150
|
+
}
|
|
1151
|
+
function pt(e, n) {
|
|
1152
|
+
const t = Vt(e);
|
|
1153
|
+
return Math.round(n * t) / t;
|
|
1154
|
+
}
|
|
1155
|
+
function To(e, n, t) {
|
|
1156
|
+
t === void 0 && (t = {});
|
|
1157
|
+
const o = t.whileElementsMounted, i = J(() => {
|
|
1158
|
+
var _;
|
|
1159
|
+
return (_ = se(t.open)) != null ? _ : !0;
|
|
1160
|
+
}), r = J(() => se(t.middleware)), l = J(() => {
|
|
1161
|
+
var _;
|
|
1162
|
+
return (_ = se(t.placement)) != null ? _ : "bottom";
|
|
1163
|
+
}), s = J(() => {
|
|
1164
|
+
var _;
|
|
1165
|
+
return (_ = se(t.strategy)) != null ? _ : "absolute";
|
|
1166
|
+
}), u = J(() => {
|
|
1167
|
+
var _;
|
|
1168
|
+
return (_ = se(t.transform)) != null ? _ : !0;
|
|
1169
|
+
}), g = J(() => qe(e.value)), c = J(() => qe(n.value)), f = le(0), d = le(0), a = le(s.value), p = le(l.value), m = St({}), w = le(!1), h = J(() => {
|
|
1170
|
+
const _ = {
|
|
1171
|
+
position: a.value,
|
|
1172
|
+
left: "0",
|
|
1173
|
+
top: "0"
|
|
1174
|
+
};
|
|
1175
|
+
if (!c.value)
|
|
1176
|
+
return _;
|
|
1177
|
+
const F = pt(c.value, f.value), M = pt(c.value, d.value);
|
|
1178
|
+
return u.value ? {
|
|
1179
|
+
..._,
|
|
1180
|
+
transform: "translate(" + F + "px, " + M + "px)",
|
|
1181
|
+
...Vt(c.value) >= 1.5 && {
|
|
1182
|
+
willChange: "transform"
|
|
1183
|
+
}
|
|
1184
|
+
} : {
|
|
1185
|
+
position: a.value,
|
|
1186
|
+
left: F + "px",
|
|
1187
|
+
top: M + "px"
|
|
1188
|
+
};
|
|
1189
|
+
});
|
|
1190
|
+
let C;
|
|
1191
|
+
function S() {
|
|
1192
|
+
if (g.value == null || c.value == null)
|
|
1193
|
+
return;
|
|
1194
|
+
const _ = i.value;
|
|
1195
|
+
Tn(g.value, c.value, {
|
|
1196
|
+
middleware: r.value,
|
|
1197
|
+
placement: l.value,
|
|
1198
|
+
strategy: s.value
|
|
1199
|
+
}).then((F) => {
|
|
1200
|
+
f.value = F.x, d.value = F.y, a.value = F.strategy, p.value = F.placement, m.value = F.middlewareData, w.value = _ !== !1;
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
function x() {
|
|
1204
|
+
typeof C == "function" && (C(), C = void 0);
|
|
1205
|
+
}
|
|
1206
|
+
function y() {
|
|
1207
|
+
if (x(), o === void 0) {
|
|
1208
|
+
S();
|
|
1209
|
+
return;
|
|
1210
|
+
}
|
|
1211
|
+
if (g.value != null && c.value != null) {
|
|
1212
|
+
C = o(g.value, c.value, S);
|
|
1213
|
+
return;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
function $() {
|
|
1217
|
+
i.value || (w.value = !1);
|
|
1218
|
+
}
|
|
1219
|
+
return xe([r, l, s, i], S, {
|
|
1220
|
+
flush: "sync"
|
|
1221
|
+
}), xe([g, c], y, {
|
|
1222
|
+
flush: "sync"
|
|
1223
|
+
}), xe(i, $, {
|
|
1224
|
+
flush: "sync"
|
|
1225
|
+
}), Bt() && Nt(x), {
|
|
1226
|
+
x: re(f),
|
|
1227
|
+
y: re(d),
|
|
1228
|
+
strategy: re(a),
|
|
1229
|
+
placement: re(p),
|
|
1230
|
+
middlewareData: re(m),
|
|
1231
|
+
isPositioned: re(w),
|
|
1232
|
+
floatingStyles: h,
|
|
1233
|
+
update: S
|
|
1234
|
+
};
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* table-core
|
|
1238
|
+
*
|
|
1239
|
+
* Copyright (c) TanStack
|
|
1240
|
+
*
|
|
1241
|
+
* This source code is licensed under the MIT license found in the
|
|
1242
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
1243
|
+
*
|
|
1244
|
+
* @license MIT
|
|
1245
|
+
*/
|
|
1246
|
+
function Bo() {
|
|
1247
|
+
return {
|
|
1248
|
+
accessor: (e, n) => typeof e == "function" ? {
|
|
1249
|
+
...n,
|
|
1250
|
+
accessorFn: e
|
|
1251
|
+
} : {
|
|
1252
|
+
...n,
|
|
1253
|
+
accessorKey: e
|
|
1254
|
+
},
|
|
1255
|
+
display: (e) => e,
|
|
1256
|
+
group: (e) => e
|
|
1257
|
+
};
|
|
1258
|
+
}
|
|
1259
|
+
function Q(e, n) {
|
|
1260
|
+
return typeof e == "function" ? e(n) : e;
|
|
1261
|
+
}
|
|
1262
|
+
function D(e, n) {
|
|
1263
|
+
return (t) => {
|
|
1264
|
+
n.setState((o) => ({
|
|
1265
|
+
...o,
|
|
1266
|
+
[e]: Q(t, o[e])
|
|
1267
|
+
}));
|
|
1268
|
+
};
|
|
1269
|
+
}
|
|
1270
|
+
function Ae(e) {
|
|
1271
|
+
return e instanceof Function;
|
|
1272
|
+
}
|
|
1273
|
+
function Nn(e) {
|
|
1274
|
+
return Array.isArray(e) && e.every((n) => typeof n == "number");
|
|
1275
|
+
}
|
|
1276
|
+
function kn(e, n) {
|
|
1277
|
+
const t = [], o = (i) => {
|
|
1278
|
+
i.forEach((r) => {
|
|
1279
|
+
t.push(r);
|
|
1280
|
+
const l = n(r);
|
|
1281
|
+
l != null && l.length && o(l);
|
|
1282
|
+
});
|
|
1283
|
+
};
|
|
1284
|
+
return o(e), t;
|
|
1285
|
+
}
|
|
1286
|
+
function v(e, n, t) {
|
|
1287
|
+
let o = [], i;
|
|
1288
|
+
return (r) => {
|
|
1289
|
+
let l;
|
|
1290
|
+
t.key && t.debug && (l = Date.now());
|
|
1291
|
+
const s = e(r);
|
|
1292
|
+
if (!(s.length !== o.length || s.some((c, f) => o[f] !== c)))
|
|
1293
|
+
return i;
|
|
1294
|
+
o = s;
|
|
1295
|
+
let g;
|
|
1296
|
+
if (t.key && t.debug && (g = Date.now()), i = n(...s), t == null || t.onChange == null || t.onChange(i), t.key && t.debug && t != null && t.debug()) {
|
|
1297
|
+
const c = Math.round((Date.now() - l) * 100) / 100, f = Math.round((Date.now() - g) * 100) / 100, d = f / 16, a = (p, m) => {
|
|
1298
|
+
for (p = String(p); p.length < m; )
|
|
1299
|
+
p = " " + p;
|
|
1300
|
+
return p;
|
|
1301
|
+
};
|
|
1302
|
+
console.info(`%c⏱ ${a(f, 5)} /${a(c, 5)} ms`, `
|
|
1303
|
+
font-size: .6rem;
|
|
1304
|
+
font-weight: bold;
|
|
1305
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t?.key);
|
|
1306
|
+
}
|
|
1307
|
+
return i;
|
|
1308
|
+
};
|
|
1309
|
+
}
|
|
1310
|
+
function R(e, n, t, o) {
|
|
1311
|
+
return {
|
|
1312
|
+
debug: () => {
|
|
1313
|
+
var i;
|
|
1314
|
+
return (i = e?.debugAll) != null ? i : e[n];
|
|
1315
|
+
},
|
|
1316
|
+
key: process.env.NODE_ENV === "development" && t,
|
|
1317
|
+
onChange: o
|
|
1318
|
+
};
|
|
1319
|
+
}
|
|
1320
|
+
function qn(e, n, t, o) {
|
|
1321
|
+
const i = () => {
|
|
1322
|
+
var l;
|
|
1323
|
+
return (l = r.getValue()) != null ? l : e.options.renderFallbackValue;
|
|
1324
|
+
}, r = {
|
|
1325
|
+
id: `${n.id}_${t.id}`,
|
|
1326
|
+
row: n,
|
|
1327
|
+
column: t,
|
|
1328
|
+
getValue: () => n.getValue(o),
|
|
1329
|
+
renderValue: i,
|
|
1330
|
+
getContext: v(() => [e, t, n, r], (l, s, u, g) => ({
|
|
1331
|
+
table: l,
|
|
1332
|
+
column: s,
|
|
1333
|
+
row: u,
|
|
1334
|
+
cell: g,
|
|
1335
|
+
getValue: g.getValue,
|
|
1336
|
+
renderValue: g.renderValue
|
|
1337
|
+
}), R(e.options, "debugCells", "cell.getContext"))
|
|
1338
|
+
};
|
|
1339
|
+
return e._features.forEach((l) => {
|
|
1340
|
+
l.createCell == null || l.createCell(r, t, n, e);
|
|
1341
|
+
}, {}), r;
|
|
1342
|
+
}
|
|
1343
|
+
function jn(e, n, t, o) {
|
|
1344
|
+
var i, r;
|
|
1345
|
+
const s = {
|
|
1346
|
+
...e._getDefaultColumnDef(),
|
|
1347
|
+
...n
|
|
1348
|
+
}, u = s.accessorKey;
|
|
1349
|
+
let g = (i = (r = s.id) != null ? r : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? i : typeof s.header == "string" ? s.header : void 0, c;
|
|
1350
|
+
if (s.accessorFn ? c = s.accessorFn : u && (u.includes(".") ? c = (d) => {
|
|
1351
|
+
let a = d;
|
|
1352
|
+
for (const m of u.split(".")) {
|
|
1353
|
+
var p;
|
|
1354
|
+
a = (p = a) == null ? void 0 : p[m], process.env.NODE_ENV !== "production" && a === void 0 && console.warn(`"${m}" in deeply nested key "${u}" returned undefined.`);
|
|
1355
|
+
}
|
|
1356
|
+
return a;
|
|
1357
|
+
} : c = (d) => d[s.accessorKey]), !g)
|
|
1358
|
+
throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
1359
|
+
let f = {
|
|
1360
|
+
id: `${String(g)}`,
|
|
1361
|
+
accessorFn: c,
|
|
1362
|
+
parent: o,
|
|
1363
|
+
depth: t,
|
|
1364
|
+
columnDef: s,
|
|
1365
|
+
columns: [],
|
|
1366
|
+
getFlatColumns: v(() => [!0], () => {
|
|
1367
|
+
var d;
|
|
1368
|
+
return [f, ...(d = f.columns) == null ? void 0 : d.flatMap((a) => a.getFlatColumns())];
|
|
1369
|
+
}, R(e.options, "debugColumns", "column.getFlatColumns")),
|
|
1370
|
+
getLeafColumns: v(() => [e._getOrderColumnsFn()], (d) => {
|
|
1371
|
+
var a;
|
|
1372
|
+
if ((a = f.columns) != null && a.length) {
|
|
1373
|
+
let p = f.columns.flatMap((m) => m.getLeafColumns());
|
|
1374
|
+
return d(p);
|
|
1375
|
+
}
|
|
1376
|
+
return [f];
|
|
1377
|
+
}, R(e.options, "debugColumns", "column.getLeafColumns"))
|
|
1378
|
+
};
|
|
1379
|
+
for (const d of e._features)
|
|
1380
|
+
d.createColumn == null || d.createColumn(f, e);
|
|
1381
|
+
return f;
|
|
1382
|
+
}
|
|
1383
|
+
const P = "debugHeaders";
|
|
1384
|
+
function mt(e, n, t) {
|
|
1385
|
+
var o;
|
|
1386
|
+
let r = {
|
|
1387
|
+
id: (o = t.id) != null ? o : n.id,
|
|
1388
|
+
column: n,
|
|
1389
|
+
index: t.index,
|
|
1390
|
+
isPlaceholder: !!t.isPlaceholder,
|
|
1391
|
+
placeholderId: t.placeholderId,
|
|
1392
|
+
depth: t.depth,
|
|
1393
|
+
subHeaders: [],
|
|
1394
|
+
colSpan: 0,
|
|
1395
|
+
rowSpan: 0,
|
|
1396
|
+
headerGroup: null,
|
|
1397
|
+
getLeafHeaders: () => {
|
|
1398
|
+
const l = [], s = (u) => {
|
|
1399
|
+
u.subHeaders && u.subHeaders.length && u.subHeaders.map(s), l.push(u);
|
|
1400
|
+
};
|
|
1401
|
+
return s(r), l;
|
|
1402
|
+
},
|
|
1403
|
+
getContext: () => ({
|
|
1404
|
+
table: e,
|
|
1405
|
+
header: r,
|
|
1406
|
+
column: n
|
|
1407
|
+
})
|
|
1408
|
+
};
|
|
1409
|
+
return e._features.forEach((l) => {
|
|
1410
|
+
l.createHeader == null || l.createHeader(r, e);
|
|
1411
|
+
}), r;
|
|
1412
|
+
}
|
|
1413
|
+
const bn = {
|
|
1414
|
+
createTable: (e) => {
|
|
1415
|
+
e.getHeaderGroups = v(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, i) => {
|
|
1416
|
+
var r, l;
|
|
1417
|
+
const s = (r = o?.map((f) => t.find((d) => d.id === f)).filter(Boolean)) != null ? r : [], u = (l = i?.map((f) => t.find((d) => d.id === f)).filter(Boolean)) != null ? l : [], g = t.filter((f) => !(o != null && o.includes(f.id)) && !(i != null && i.includes(f.id)));
|
|
1418
|
+
return Se(n, [...s, ...g, ...u], e);
|
|
1419
|
+
}, R(e.options, P, "getHeaderGroups")), e.getCenterHeaderGroups = v(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, i) => (t = t.filter((r) => !(o != null && o.includes(r.id)) && !(i != null && i.includes(r.id))), Se(n, t, e, "center")), R(e.options, P, "getCenterHeaderGroups")), e.getLeftHeaderGroups = v(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, o) => {
|
|
1420
|
+
var i;
|
|
1421
|
+
const r = (i = o?.map((l) => t.find((s) => s.id === l)).filter(Boolean)) != null ? i : [];
|
|
1422
|
+
return Se(n, r, e, "left");
|
|
1423
|
+
}, R(e.options, P, "getLeftHeaderGroups")), e.getRightHeaderGroups = v(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (n, t, o) => {
|
|
1424
|
+
var i;
|
|
1425
|
+
const r = (i = o?.map((l) => t.find((s) => s.id === l)).filter(Boolean)) != null ? i : [];
|
|
1426
|
+
return Se(n, r, e, "right");
|
|
1427
|
+
}, R(e.options, P, "getRightHeaderGroups")), e.getFooterGroups = v(() => [e.getHeaderGroups()], (n) => [...n].reverse(), R(e.options, P, "getFooterGroups")), e.getLeftFooterGroups = v(() => [e.getLeftHeaderGroups()], (n) => [...n].reverse(), R(e.options, P, "getLeftFooterGroups")), e.getCenterFooterGroups = v(() => [e.getCenterHeaderGroups()], (n) => [...n].reverse(), R(e.options, P, "getCenterFooterGroups")), e.getRightFooterGroups = v(() => [e.getRightHeaderGroups()], (n) => [...n].reverse(), R(e.options, P, "getRightFooterGroups")), e.getFlatHeaders = v(() => [e.getHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, P, "getFlatHeaders")), e.getLeftFlatHeaders = v(() => [e.getLeftHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, P, "getLeftFlatHeaders")), e.getCenterFlatHeaders = v(() => [e.getCenterHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, P, "getCenterFlatHeaders")), e.getRightFlatHeaders = v(() => [e.getRightHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, P, "getRightFlatHeaders")), e.getCenterLeafHeaders = v(() => [e.getCenterFlatHeaders()], (n) => n.filter((t) => {
|
|
1428
|
+
var o;
|
|
1429
|
+
return !((o = t.subHeaders) != null && o.length);
|
|
1430
|
+
}), R(e.options, P, "getCenterLeafHeaders")), e.getLeftLeafHeaders = v(() => [e.getLeftFlatHeaders()], (n) => n.filter((t) => {
|
|
1431
|
+
var o;
|
|
1432
|
+
return !((o = t.subHeaders) != null && o.length);
|
|
1433
|
+
}), R(e.options, P, "getLeftLeafHeaders")), e.getRightLeafHeaders = v(() => [e.getRightFlatHeaders()], (n) => n.filter((t) => {
|
|
1434
|
+
var o;
|
|
1435
|
+
return !((o = t.subHeaders) != null && o.length);
|
|
1436
|
+
}), R(e.options, P, "getRightLeafHeaders")), e.getLeafHeaders = v(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, o) => {
|
|
1437
|
+
var i, r, l, s, u, g;
|
|
1438
|
+
return [...(i = (r = n[0]) == null ? void 0 : r.headers) != null ? i : [], ...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [], ...(u = (g = o[0]) == null ? void 0 : g.headers) != null ? u : []].map((c) => c.getLeafHeaders()).flat();
|
|
1439
|
+
}, R(e.options, P, "getLeafHeaders"));
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1442
|
+
function Se(e, n, t, o) {
|
|
1443
|
+
var i, r;
|
|
1444
|
+
let l = 0;
|
|
1445
|
+
const s = function(d, a) {
|
|
1446
|
+
a === void 0 && (a = 1), l = Math.max(l, a), d.filter((p) => p.getIsVisible()).forEach((p) => {
|
|
1447
|
+
var m;
|
|
1448
|
+
(m = p.columns) != null && m.length && s(p.columns, a + 1);
|
|
1449
|
+
}, 0);
|
|
1450
|
+
};
|
|
1451
|
+
s(e);
|
|
1452
|
+
let u = [];
|
|
1453
|
+
const g = (d, a) => {
|
|
1454
|
+
const p = {
|
|
1455
|
+
depth: a,
|
|
1456
|
+
id: [o, `${a}`].filter(Boolean).join("_"),
|
|
1457
|
+
headers: []
|
|
1458
|
+
}, m = [];
|
|
1459
|
+
d.forEach((w) => {
|
|
1460
|
+
const h = [...m].reverse()[0], C = w.column.depth === p.depth;
|
|
1461
|
+
let S, x = !1;
|
|
1462
|
+
if (C && w.column.parent ? S = w.column.parent : (S = w.column, x = !0), h && h?.column === S)
|
|
1463
|
+
h.subHeaders.push(w);
|
|
1464
|
+
else {
|
|
1465
|
+
const y = mt(t, S, {
|
|
1466
|
+
id: [o, a, S.id, w?.id].filter(Boolean).join("_"),
|
|
1467
|
+
isPlaceholder: x,
|
|
1468
|
+
placeholderId: x ? `${m.filter(($) => $.column === S).length}` : void 0,
|
|
1469
|
+
depth: a,
|
|
1470
|
+
index: m.length
|
|
1471
|
+
});
|
|
1472
|
+
y.subHeaders.push(w), m.push(y);
|
|
1473
|
+
}
|
|
1474
|
+
p.headers.push(w), w.headerGroup = p;
|
|
1475
|
+
}), u.push(p), a > 0 && g(m, a - 1);
|
|
1476
|
+
}, c = n.map((d, a) => mt(t, d, {
|
|
1477
|
+
depth: l,
|
|
1478
|
+
index: a
|
|
1479
|
+
}));
|
|
1480
|
+
g(c, l - 1), u.reverse();
|
|
1481
|
+
const f = (d) => d.filter((p) => p.column.getIsVisible()).map((p) => {
|
|
1482
|
+
let m = 0, w = 0, h = [0];
|
|
1483
|
+
p.subHeaders && p.subHeaders.length ? (h = [], f(p.subHeaders).forEach((S) => {
|
|
1484
|
+
let {
|
|
1485
|
+
colSpan: x,
|
|
1486
|
+
rowSpan: y
|
|
1487
|
+
} = S;
|
|
1488
|
+
m += x, h.push(y);
|
|
1489
|
+
})) : m = 1;
|
|
1490
|
+
const C = Math.min(...h);
|
|
1491
|
+
return w = w + C, p.colSpan = m, p.rowSpan = w, {
|
|
1492
|
+
colSpan: m,
|
|
1493
|
+
rowSpan: w
|
|
1494
|
+
};
|
|
1495
|
+
});
|
|
1496
|
+
return f((i = (r = u[0]) == null ? void 0 : r.headers) != null ? i : []), u;
|
|
1497
|
+
}
|
|
1498
|
+
const Wn = (e, n, t, o, i, r, l) => {
|
|
1499
|
+
let s = {
|
|
1500
|
+
id: n,
|
|
1501
|
+
index: o,
|
|
1502
|
+
original: t,
|
|
1503
|
+
depth: i,
|
|
1504
|
+
parentId: l,
|
|
1505
|
+
_valuesCache: {},
|
|
1506
|
+
_uniqueValuesCache: {},
|
|
1507
|
+
getValue: (u) => {
|
|
1508
|
+
if (s._valuesCache.hasOwnProperty(u))
|
|
1509
|
+
return s._valuesCache[u];
|
|
1510
|
+
const g = e.getColumn(u);
|
|
1511
|
+
if (g != null && g.accessorFn)
|
|
1512
|
+
return s._valuesCache[u] = g.accessorFn(s.original, o), s._valuesCache[u];
|
|
1513
|
+
},
|
|
1514
|
+
getUniqueValues: (u) => {
|
|
1515
|
+
if (s._uniqueValuesCache.hasOwnProperty(u))
|
|
1516
|
+
return s._uniqueValuesCache[u];
|
|
1517
|
+
const g = e.getColumn(u);
|
|
1518
|
+
if (g != null && g.accessorFn)
|
|
1519
|
+
return g.columnDef.getUniqueValues ? (s._uniqueValuesCache[u] = g.columnDef.getUniqueValues(s.original, o), s._uniqueValuesCache[u]) : (s._uniqueValuesCache[u] = [s.getValue(u)], s._uniqueValuesCache[u]);
|
|
1520
|
+
},
|
|
1521
|
+
renderValue: (u) => {
|
|
1522
|
+
var g;
|
|
1523
|
+
return (g = s.getValue(u)) != null ? g : e.options.renderFallbackValue;
|
|
1524
|
+
},
|
|
1525
|
+
subRows: [],
|
|
1526
|
+
getLeafRows: () => kn(s.subRows, (u) => u.subRows),
|
|
1527
|
+
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
1528
|
+
getParentRows: () => {
|
|
1529
|
+
let u = [], g = s;
|
|
1530
|
+
for (; ; ) {
|
|
1531
|
+
const c = g.getParentRow();
|
|
1532
|
+
if (!c) break;
|
|
1533
|
+
u.push(c), g = c;
|
|
1534
|
+
}
|
|
1535
|
+
return u.reverse();
|
|
1536
|
+
},
|
|
1537
|
+
getAllCells: v(() => [e.getAllLeafColumns()], (u) => u.map((g) => qn(e, s, g, g.id)), R(e.options, "debugRows", "getAllCells")),
|
|
1538
|
+
_getAllCellsByColumnId: v(() => [s.getAllCells()], (u) => u.reduce((g, c) => (g[c.column.id] = c, g), {}), R(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
1539
|
+
};
|
|
1540
|
+
for (let u = 0; u < e._features.length; u++) {
|
|
1541
|
+
const g = e._features[u];
|
|
1542
|
+
g == null || g.createRow == null || g.createRow(s, e);
|
|
1543
|
+
}
|
|
1544
|
+
return s;
|
|
1545
|
+
}, Un = {
|
|
1546
|
+
createColumn: (e, n) => {
|
|
1547
|
+
e._getFacetedRowModel = n.options.getFacetedRowModel && n.options.getFacetedRowModel(n, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : n.getPreFilteredRowModel(), e._getFacetedUniqueValues = n.options.getFacetedUniqueValues && n.options.getFacetedUniqueValues(n, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = n.options.getFacetedMinMaxValues && n.options.getFacetedMinMaxValues(n, e.id), e.getFacetedMinMaxValues = () => {
|
|
1548
|
+
if (e._getFacetedMinMaxValues)
|
|
1549
|
+
return e._getFacetedMinMaxValues();
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
}, At = (e, n, t) => {
|
|
1553
|
+
var o, i;
|
|
1554
|
+
const r = t == null || (o = t.toString()) == null ? void 0 : o.toLowerCase();
|
|
1555
|
+
return !!(!((i = e.getValue(n)) == null || (i = i.toString()) == null || (i = i.toLowerCase()) == null) && i.includes(r));
|
|
1556
|
+
};
|
|
1557
|
+
At.autoRemove = (e) => G(e);
|
|
1558
|
+
const Et = (e, n, t) => {
|
|
1559
|
+
var o;
|
|
1560
|
+
return !!(!((o = e.getValue(n)) == null || (o = o.toString()) == null) && o.includes(t));
|
|
1561
|
+
};
|
|
1562
|
+
Et.autoRemove = (e) => G(e);
|
|
1563
|
+
const It = (e, n, t) => {
|
|
1564
|
+
var o;
|
|
1565
|
+
return ((o = e.getValue(n)) == null || (o = o.toString()) == null ? void 0 : o.toLowerCase()) === t?.toLowerCase();
|
|
1566
|
+
};
|
|
1567
|
+
It.autoRemove = (e) => G(e);
|
|
1568
|
+
const Dt = (e, n, t) => {
|
|
1569
|
+
var o;
|
|
1570
|
+
return (o = e.getValue(n)) == null ? void 0 : o.includes(t);
|
|
1571
|
+
};
|
|
1572
|
+
Dt.autoRemove = (e) => G(e);
|
|
1573
|
+
const Lt = (e, n, t) => !t.some((o) => {
|
|
1574
|
+
var i;
|
|
1575
|
+
return !((i = e.getValue(n)) != null && i.includes(o));
|
|
1576
|
+
});
|
|
1577
|
+
Lt.autoRemove = (e) => G(e) || !(e != null && e.length);
|
|
1578
|
+
const Ot = (e, n, t) => t.some((o) => {
|
|
1579
|
+
var i;
|
|
1580
|
+
return (i = e.getValue(n)) == null ? void 0 : i.includes(o);
|
|
1581
|
+
});
|
|
1582
|
+
Ot.autoRemove = (e) => G(e) || !(e != null && e.length);
|
|
1583
|
+
const Ht = (e, n, t) => e.getValue(n) === t;
|
|
1584
|
+
Ht.autoRemove = (e) => G(e);
|
|
1585
|
+
const Gt = (e, n, t) => e.getValue(n) == t;
|
|
1586
|
+
Gt.autoRemove = (e) => G(e);
|
|
1587
|
+
const nt = (e, n, t) => {
|
|
1588
|
+
let [o, i] = t;
|
|
1589
|
+
const r = e.getValue(n);
|
|
1590
|
+
return r >= o && r <= i;
|
|
1591
|
+
};
|
|
1592
|
+
nt.resolveFilterValue = (e) => {
|
|
1593
|
+
let [n, t] = e, o = typeof n != "number" ? parseFloat(n) : n, i = typeof t != "number" ? parseFloat(t) : t, r = n === null || Number.isNaN(o) ? -1 / 0 : o, l = t === null || Number.isNaN(i) ? 1 / 0 : i;
|
|
1594
|
+
if (r > l) {
|
|
1595
|
+
const s = r;
|
|
1596
|
+
r = l, l = s;
|
|
1597
|
+
}
|
|
1598
|
+
return [r, l];
|
|
1599
|
+
};
|
|
1600
|
+
nt.autoRemove = (e) => G(e) || G(e[0]) && G(e[1]);
|
|
1601
|
+
const W = {
|
|
1602
|
+
includesString: At,
|
|
1603
|
+
includesStringSensitive: Et,
|
|
1604
|
+
equalsString: It,
|
|
1605
|
+
arrIncludes: Dt,
|
|
1606
|
+
arrIncludesAll: Lt,
|
|
1607
|
+
arrIncludesSome: Ot,
|
|
1608
|
+
equals: Ht,
|
|
1609
|
+
weakEquals: Gt,
|
|
1610
|
+
inNumberRange: nt
|
|
1611
|
+
};
|
|
1612
|
+
function G(e) {
|
|
1613
|
+
return e == null || e === "";
|
|
1614
|
+
}
|
|
1615
|
+
const Xn = {
|
|
1616
|
+
getDefaultColumnDef: () => ({
|
|
1617
|
+
filterFn: "auto"
|
|
1618
|
+
}),
|
|
1619
|
+
getInitialState: (e) => ({
|
|
1620
|
+
columnFilters: [],
|
|
1621
|
+
...e
|
|
1622
|
+
}),
|
|
1623
|
+
getDefaultOptions: (e) => ({
|
|
1624
|
+
onColumnFiltersChange: D("columnFilters", e),
|
|
1625
|
+
filterFromLeafRows: !1,
|
|
1626
|
+
maxLeafRowFilterDepth: 100
|
|
1627
|
+
}),
|
|
1628
|
+
createColumn: (e, n) => {
|
|
1629
|
+
e.getAutoFilterFn = () => {
|
|
1630
|
+
const t = n.getCoreRowModel().flatRows[0], o = t?.getValue(e.id);
|
|
1631
|
+
return typeof o == "string" ? W.includesString : typeof o == "number" ? W.inNumberRange : typeof o == "boolean" || o !== null && typeof o == "object" ? W.equals : Array.isArray(o) ? W.arrIncludes : W.weakEquals;
|
|
1632
|
+
}, e.getFilterFn = () => {
|
|
1633
|
+
var t, o;
|
|
1634
|
+
return Ae(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
1635
|
+
// @ts-ignore
|
|
1636
|
+
(t = (o = n.options.filterFns) == null ? void 0 : o[e.columnDef.filterFn]) != null ? t : W[e.columnDef.filterFn]
|
|
1637
|
+
);
|
|
1638
|
+
}, e.getCanFilter = () => {
|
|
1639
|
+
var t, o, i;
|
|
1640
|
+
return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((o = n.options.enableColumnFilters) != null ? o : !0) && ((i = n.options.enableFilters) != null ? i : !0) && !!e.accessorFn;
|
|
1641
|
+
}, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
|
|
1642
|
+
var t;
|
|
1643
|
+
return (t = n.getState().columnFilters) == null || (t = t.find((o) => o.id === e.id)) == null ? void 0 : t.value;
|
|
1644
|
+
}, e.getFilterIndex = () => {
|
|
1645
|
+
var t, o;
|
|
1646
|
+
return (t = (o = n.getState().columnFilters) == null ? void 0 : o.findIndex((i) => i.id === e.id)) != null ? t : -1;
|
|
1647
|
+
}, e.setFilterValue = (t) => {
|
|
1648
|
+
n.setColumnFilters((o) => {
|
|
1649
|
+
const i = e.getFilterFn(), r = o?.find((c) => c.id === e.id), l = Q(t, r ? r.value : void 0);
|
|
1650
|
+
if (ht(i, l, e)) {
|
|
1651
|
+
var s;
|
|
1652
|
+
return (s = o?.filter((c) => c.id !== e.id)) != null ? s : [];
|
|
1653
|
+
}
|
|
1654
|
+
const u = {
|
|
1655
|
+
id: e.id,
|
|
1656
|
+
value: l
|
|
1657
|
+
};
|
|
1658
|
+
if (r) {
|
|
1659
|
+
var g;
|
|
1660
|
+
return (g = o?.map((c) => c.id === e.id ? u : c)) != null ? g : [];
|
|
1661
|
+
}
|
|
1662
|
+
return o != null && o.length ? [...o, u] : [u];
|
|
1663
|
+
});
|
|
1664
|
+
};
|
|
1665
|
+
},
|
|
1666
|
+
createRow: (e, n) => {
|
|
1667
|
+
e.columnFilters = {}, e.columnFiltersMeta = {};
|
|
1668
|
+
},
|
|
1669
|
+
createTable: (e) => {
|
|
1670
|
+
e.setColumnFilters = (n) => {
|
|
1671
|
+
const t = e.getAllLeafColumns(), o = (i) => {
|
|
1672
|
+
var r;
|
|
1673
|
+
return (r = Q(n, i)) == null ? void 0 : r.filter((l) => {
|
|
1674
|
+
const s = t.find((u) => u.id === l.id);
|
|
1675
|
+
if (s) {
|
|
1676
|
+
const u = s.getFilterFn();
|
|
1677
|
+
if (ht(u, l.value, s))
|
|
1678
|
+
return !1;
|
|
1679
|
+
}
|
|
1680
|
+
return !0;
|
|
1681
|
+
});
|
|
1682
|
+
};
|
|
1683
|
+
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange(o);
|
|
1684
|
+
}, e.resetColumnFilters = (n) => {
|
|
1685
|
+
var t, o;
|
|
1686
|
+
e.setColumnFilters(n ? [] : (t = (o = e.initialState) == null ? void 0 : o.columnFilters) != null ? t : []);
|
|
1687
|
+
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
|
|
1688
|
+
}
|
|
1689
|
+
};
|
|
1690
|
+
function ht(e, n, t) {
|
|
1691
|
+
return (e && e.autoRemove ? e.autoRemove(n, t) : !1) || typeof n > "u" || typeof n == "string" && !n;
|
|
1692
|
+
}
|
|
1693
|
+
const Kn = (e, n, t) => t.reduce((o, i) => {
|
|
1694
|
+
const r = i.getValue(e);
|
|
1695
|
+
return o + (typeof r == "number" ? r : 0);
|
|
1696
|
+
}, 0), Yn = (e, n, t) => {
|
|
1697
|
+
let o;
|
|
1698
|
+
return t.forEach((i) => {
|
|
1699
|
+
const r = i.getValue(e);
|
|
1700
|
+
r != null && (o > r || o === void 0 && r >= r) && (o = r);
|
|
1701
|
+
}), o;
|
|
1702
|
+
}, Jn = (e, n, t) => {
|
|
1703
|
+
let o;
|
|
1704
|
+
return t.forEach((i) => {
|
|
1705
|
+
const r = i.getValue(e);
|
|
1706
|
+
r != null && (o < r || o === void 0 && r >= r) && (o = r);
|
|
1707
|
+
}), o;
|
|
1708
|
+
}, Qn = (e, n, t) => {
|
|
1709
|
+
let o, i;
|
|
1710
|
+
return t.forEach((r) => {
|
|
1711
|
+
const l = r.getValue(e);
|
|
1712
|
+
l != null && (o === void 0 ? l >= l && (o = i = l) : (o > l && (o = l), i < l && (i = l)));
|
|
1713
|
+
}), [o, i];
|
|
1714
|
+
}, Zn = (e, n) => {
|
|
1715
|
+
let t = 0, o = 0;
|
|
1716
|
+
if (n.forEach((i) => {
|
|
1717
|
+
let r = i.getValue(e);
|
|
1718
|
+
r != null && (r = +r) >= r && (++t, o += r);
|
|
1719
|
+
}), t) return o / t;
|
|
1720
|
+
}, eo = (e, n) => {
|
|
1721
|
+
if (!n.length)
|
|
1722
|
+
return;
|
|
1723
|
+
const t = n.map((r) => r.getValue(e));
|
|
1724
|
+
if (!Nn(t))
|
|
1725
|
+
return;
|
|
1726
|
+
if (t.length === 1)
|
|
1727
|
+
return t[0];
|
|
1728
|
+
const o = Math.floor(t.length / 2), i = t.sort((r, l) => r - l);
|
|
1729
|
+
return t.length % 2 !== 0 ? i[o] : (i[o - 1] + i[o]) / 2;
|
|
1730
|
+
}, to = (e, n) => Array.from(new Set(n.map((t) => t.getValue(e))).values()), no = (e, n) => new Set(n.map((t) => t.getValue(e))).size, oo = (e, n) => n.length, Ie = {
|
|
1731
|
+
sum: Kn,
|
|
1732
|
+
min: Yn,
|
|
1733
|
+
max: Jn,
|
|
1734
|
+
extent: Qn,
|
|
1735
|
+
mean: Zn,
|
|
1736
|
+
median: eo,
|
|
1737
|
+
unique: to,
|
|
1738
|
+
uniqueCount: no,
|
|
1739
|
+
count: oo
|
|
1740
|
+
}, io = {
|
|
1741
|
+
getDefaultColumnDef: () => ({
|
|
1742
|
+
aggregatedCell: (e) => {
|
|
1743
|
+
var n, t;
|
|
1744
|
+
return (n = (t = e.getValue()) == null || t.toString == null ? void 0 : t.toString()) != null ? n : null;
|
|
1745
|
+
},
|
|
1746
|
+
aggregationFn: "auto"
|
|
1747
|
+
}),
|
|
1748
|
+
getInitialState: (e) => ({
|
|
1749
|
+
grouping: [],
|
|
1750
|
+
...e
|
|
1751
|
+
}),
|
|
1752
|
+
getDefaultOptions: (e) => ({
|
|
1753
|
+
onGroupingChange: D("grouping", e),
|
|
1754
|
+
groupedColumnMode: "reorder"
|
|
1755
|
+
}),
|
|
1756
|
+
createColumn: (e, n) => {
|
|
1757
|
+
e.toggleGrouping = () => {
|
|
1758
|
+
n.setGrouping((t) => t != null && t.includes(e.id) ? t.filter((o) => o !== e.id) : [...t ?? [], e.id]);
|
|
1759
|
+
}, e.getCanGroup = () => {
|
|
1760
|
+
var t, o;
|
|
1761
|
+
return ((t = e.columnDef.enableGrouping) != null ? t : !0) && ((o = n.options.enableGrouping) != null ? o : !0) && (!!e.accessorFn || !!e.columnDef.getGroupingValue);
|
|
1762
|
+
}, e.getIsGrouped = () => {
|
|
1763
|
+
var t;
|
|
1764
|
+
return (t = n.getState().grouping) == null ? void 0 : t.includes(e.id);
|
|
1765
|
+
}, e.getGroupedIndex = () => {
|
|
1766
|
+
var t;
|
|
1767
|
+
return (t = n.getState().grouping) == null ? void 0 : t.indexOf(e.id);
|
|
1768
|
+
}, e.getToggleGroupingHandler = () => {
|
|
1769
|
+
const t = e.getCanGroup();
|
|
1770
|
+
return () => {
|
|
1771
|
+
t && e.toggleGrouping();
|
|
1772
|
+
};
|
|
1773
|
+
}, e.getAutoAggregationFn = () => {
|
|
1774
|
+
const t = n.getCoreRowModel().flatRows[0], o = t?.getValue(e.id);
|
|
1775
|
+
if (typeof o == "number")
|
|
1776
|
+
return Ie.sum;
|
|
1777
|
+
if (Object.prototype.toString.call(o) === "[object Date]")
|
|
1778
|
+
return Ie.extent;
|
|
1779
|
+
}, e.getAggregationFn = () => {
|
|
1780
|
+
var t, o;
|
|
1781
|
+
if (!e)
|
|
1782
|
+
throw new Error();
|
|
1783
|
+
return Ae(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (o = n.options.aggregationFns) == null ? void 0 : o[e.columnDef.aggregationFn]) != null ? t : Ie[e.columnDef.aggregationFn];
|
|
1784
|
+
};
|
|
1785
|
+
},
|
|
1786
|
+
createTable: (e) => {
|
|
1787
|
+
e.setGrouping = (n) => e.options.onGroupingChange == null ? void 0 : e.options.onGroupingChange(n), e.resetGrouping = (n) => {
|
|
1788
|
+
var t, o;
|
|
1789
|
+
e.setGrouping(n ? [] : (t = (o = e.initialState) == null ? void 0 : o.grouping) != null ? t : []);
|
|
1790
|
+
}, e.getPreGroupedRowModel = () => e.getFilteredRowModel(), e.getGroupedRowModel = () => (!e._getGroupedRowModel && e.options.getGroupedRowModel && (e._getGroupedRowModel = e.options.getGroupedRowModel(e)), e.options.manualGrouping || !e._getGroupedRowModel ? e.getPreGroupedRowModel() : e._getGroupedRowModel());
|
|
1791
|
+
},
|
|
1792
|
+
createRow: (e, n) => {
|
|
1793
|
+
e.getIsGrouped = () => !!e.groupingColumnId, e.getGroupingValue = (t) => {
|
|
1794
|
+
if (e._groupingValuesCache.hasOwnProperty(t))
|
|
1795
|
+
return e._groupingValuesCache[t];
|
|
1796
|
+
const o = n.getColumn(t);
|
|
1797
|
+
return o != null && o.columnDef.getGroupingValue ? (e._groupingValuesCache[t] = o.columnDef.getGroupingValue(e.original), e._groupingValuesCache[t]) : e.getValue(t);
|
|
1798
|
+
}, e._groupingValuesCache = {};
|
|
1799
|
+
},
|
|
1800
|
+
createCell: (e, n, t, o) => {
|
|
1801
|
+
e.getIsGrouped = () => n.getIsGrouped() && n.id === t.groupingColumnId, e.getIsPlaceholder = () => !e.getIsGrouped() && n.getIsGrouped(), e.getIsAggregated = () => {
|
|
1802
|
+
var i;
|
|
1803
|
+
return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((i = t.subRows) != null && i.length);
|
|
1804
|
+
};
|
|
1805
|
+
}
|
|
1806
|
+
};
|
|
1807
|
+
function ro(e, n, t) {
|
|
1808
|
+
if (!(n != null && n.length) || !t)
|
|
1809
|
+
return e;
|
|
1810
|
+
const o = e.filter((r) => !n.includes(r.id));
|
|
1811
|
+
return t === "remove" ? o : [...n.map((r) => e.find((l) => l.id === r)).filter(Boolean), ...o];
|
|
1812
|
+
}
|
|
1813
|
+
const lo = {
|
|
1814
|
+
getInitialState: (e) => ({
|
|
1815
|
+
columnOrder: [],
|
|
1816
|
+
...e
|
|
1817
|
+
}),
|
|
1818
|
+
getDefaultOptions: (e) => ({
|
|
1819
|
+
onColumnOrderChange: D("columnOrder", e)
|
|
1820
|
+
}),
|
|
1821
|
+
createColumn: (e, n) => {
|
|
1822
|
+
e.getIndex = v((t) => [fe(n, t)], (t) => t.findIndex((o) => o.id === e.id), R(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
1823
|
+
var o;
|
|
1824
|
+
return ((o = fe(n, t)[0]) == null ? void 0 : o.id) === e.id;
|
|
1825
|
+
}, e.getIsLastColumn = (t) => {
|
|
1826
|
+
var o;
|
|
1827
|
+
const i = fe(n, t);
|
|
1828
|
+
return ((o = i[i.length - 1]) == null ? void 0 : o.id) === e.id;
|
|
1829
|
+
};
|
|
1830
|
+
},
|
|
1831
|
+
createTable: (e) => {
|
|
1832
|
+
e.setColumnOrder = (n) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(n), e.resetColumnOrder = (n) => {
|
|
1833
|
+
var t;
|
|
1834
|
+
e.setColumnOrder(n ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
|
1835
|
+
}, e._getOrderColumnsFn = v(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (n, t, o) => (i) => {
|
|
1836
|
+
let r = [];
|
|
1837
|
+
if (!(n != null && n.length))
|
|
1838
|
+
r = i;
|
|
1839
|
+
else {
|
|
1840
|
+
const l = [...n], s = [...i];
|
|
1841
|
+
for (; s.length && l.length; ) {
|
|
1842
|
+
const u = l.shift(), g = s.findIndex((c) => c.id === u);
|
|
1843
|
+
g > -1 && r.push(s.splice(g, 1)[0]);
|
|
1844
|
+
}
|
|
1845
|
+
r = [...r, ...s];
|
|
1846
|
+
}
|
|
1847
|
+
return ro(r, t, o);
|
|
1848
|
+
}, R(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
1849
|
+
}
|
|
1850
|
+
}, De = () => ({
|
|
1851
|
+
left: [],
|
|
1852
|
+
right: []
|
|
1853
|
+
}), so = {
|
|
1854
|
+
getInitialState: (e) => ({
|
|
1855
|
+
columnPinning: De(),
|
|
1856
|
+
...e
|
|
1857
|
+
}),
|
|
1858
|
+
getDefaultOptions: (e) => ({
|
|
1859
|
+
onColumnPinningChange: D("columnPinning", e)
|
|
1860
|
+
}),
|
|
1861
|
+
createColumn: (e, n) => {
|
|
1862
|
+
e.pin = (t) => {
|
|
1863
|
+
const o = e.getLeafColumns().map((i) => i.id).filter(Boolean);
|
|
1864
|
+
n.setColumnPinning((i) => {
|
|
1865
|
+
var r, l;
|
|
1866
|
+
if (t === "right") {
|
|
1867
|
+
var s, u;
|
|
1868
|
+
return {
|
|
1869
|
+
left: ((s = i?.left) != null ? s : []).filter((f) => !(o != null && o.includes(f))),
|
|
1870
|
+
right: [...((u = i?.right) != null ? u : []).filter((f) => !(o != null && o.includes(f))), ...o]
|
|
1871
|
+
};
|
|
1872
|
+
}
|
|
1873
|
+
if (t === "left") {
|
|
1874
|
+
var g, c;
|
|
1875
|
+
return {
|
|
1876
|
+
left: [...((g = i?.left) != null ? g : []).filter((f) => !(o != null && o.includes(f))), ...o],
|
|
1877
|
+
right: ((c = i?.right) != null ? c : []).filter((f) => !(o != null && o.includes(f)))
|
|
1878
|
+
};
|
|
1879
|
+
}
|
|
1880
|
+
return {
|
|
1881
|
+
left: ((r = i?.left) != null ? r : []).filter((f) => !(o != null && o.includes(f))),
|
|
1882
|
+
right: ((l = i?.right) != null ? l : []).filter((f) => !(o != null && o.includes(f)))
|
|
1883
|
+
};
|
|
1884
|
+
});
|
|
1885
|
+
}, e.getCanPin = () => e.getLeafColumns().some((o) => {
|
|
1886
|
+
var i, r, l;
|
|
1887
|
+
return ((i = o.columnDef.enablePinning) != null ? i : !0) && ((r = (l = n.options.enableColumnPinning) != null ? l : n.options.enablePinning) != null ? r : !0);
|
|
1888
|
+
}), e.getIsPinned = () => {
|
|
1889
|
+
const t = e.getLeafColumns().map((s) => s.id), {
|
|
1890
|
+
left: o,
|
|
1891
|
+
right: i
|
|
1892
|
+
} = n.getState().columnPinning, r = t.some((s) => o?.includes(s)), l = t.some((s) => i?.includes(s));
|
|
1893
|
+
return r ? "left" : l ? "right" : !1;
|
|
1894
|
+
}, e.getPinnedIndex = () => {
|
|
1895
|
+
var t, o;
|
|
1896
|
+
const i = e.getIsPinned();
|
|
1897
|
+
return i ? (t = (o = n.getState().columnPinning) == null || (o = o[i]) == null ? void 0 : o.indexOf(e.id)) != null ? t : -1 : 0;
|
|
1898
|
+
};
|
|
1899
|
+
},
|
|
1900
|
+
createRow: (e, n) => {
|
|
1901
|
+
e.getCenterVisibleCells = v(() => [e._getAllVisibleCells(), n.getState().columnPinning.left, n.getState().columnPinning.right], (t, o, i) => {
|
|
1902
|
+
const r = [...o ?? [], ...i ?? []];
|
|
1903
|
+
return t.filter((l) => !r.includes(l.column.id));
|
|
1904
|
+
}, R(n.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = v(() => [e._getAllVisibleCells(), n.getState().columnPinning.left], (t, o) => (o ?? []).map((r) => t.find((l) => l.column.id === r)).filter(Boolean).map((r) => ({
|
|
1905
|
+
...r,
|
|
1906
|
+
position: "left"
|
|
1907
|
+
})), R(n.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = v(() => [e._getAllVisibleCells(), n.getState().columnPinning.right], (t, o) => (o ?? []).map((r) => t.find((l) => l.column.id === r)).filter(Boolean).map((r) => ({
|
|
1908
|
+
...r,
|
|
1909
|
+
position: "right"
|
|
1910
|
+
})), R(n.options, "debugRows", "getRightVisibleCells"));
|
|
1911
|
+
},
|
|
1912
|
+
createTable: (e) => {
|
|
1913
|
+
e.setColumnPinning = (n) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(n), e.resetColumnPinning = (n) => {
|
|
1914
|
+
var t, o;
|
|
1915
|
+
return e.setColumnPinning(n ? De() : (t = (o = e.initialState) == null ? void 0 : o.columnPinning) != null ? t : De());
|
|
1916
|
+
}, e.getIsSomeColumnsPinned = (n) => {
|
|
1917
|
+
var t;
|
|
1918
|
+
const o = e.getState().columnPinning;
|
|
1919
|
+
if (!n) {
|
|
1920
|
+
var i, r;
|
|
1921
|
+
return !!((i = o.left) != null && i.length || (r = o.right) != null && r.length);
|
|
1922
|
+
}
|
|
1923
|
+
return !!((t = o[n]) != null && t.length);
|
|
1924
|
+
}, e.getLeftLeafColumns = v(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (n, t) => (t ?? []).map((o) => n.find((i) => i.id === o)).filter(Boolean), R(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = v(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (n, t) => (t ?? []).map((o) => n.find((i) => i.id === o)).filter(Boolean), R(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = v(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o) => {
|
|
1925
|
+
const i = [...t ?? [], ...o ?? []];
|
|
1926
|
+
return n.filter((r) => !i.includes(r.id));
|
|
1927
|
+
}, R(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
1928
|
+
}
|
|
1929
|
+
};
|
|
1930
|
+
function uo(e) {
|
|
1931
|
+
return e || (typeof document < "u" ? document : null);
|
|
1932
|
+
}
|
|
1933
|
+
const Ce = {
|
|
1934
|
+
size: 150,
|
|
1935
|
+
minSize: 20,
|
|
1936
|
+
maxSize: Number.MAX_SAFE_INTEGER
|
|
1937
|
+
}, Le = () => ({
|
|
1938
|
+
startOffset: null,
|
|
1939
|
+
startSize: null,
|
|
1940
|
+
deltaOffset: null,
|
|
1941
|
+
deltaPercentage: null,
|
|
1942
|
+
isResizingColumn: !1,
|
|
1943
|
+
columnSizingStart: []
|
|
1944
|
+
}), ao = {
|
|
1945
|
+
getDefaultColumnDef: () => Ce,
|
|
1946
|
+
getInitialState: (e) => ({
|
|
1947
|
+
columnSizing: {},
|
|
1948
|
+
columnSizingInfo: Le(),
|
|
1949
|
+
...e
|
|
1950
|
+
}),
|
|
1951
|
+
getDefaultOptions: (e) => ({
|
|
1952
|
+
columnResizeMode: "onEnd",
|
|
1953
|
+
columnResizeDirection: "ltr",
|
|
1954
|
+
onColumnSizingChange: D("columnSizing", e),
|
|
1955
|
+
onColumnSizingInfoChange: D("columnSizingInfo", e)
|
|
1956
|
+
}),
|
|
1957
|
+
createColumn: (e, n) => {
|
|
1958
|
+
e.getSize = () => {
|
|
1959
|
+
var t, o, i;
|
|
1960
|
+
const r = n.getState().columnSizing[e.id];
|
|
1961
|
+
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : Ce.minSize, (o = r ?? e.columnDef.size) != null ? o : Ce.size), (i = e.columnDef.maxSize) != null ? i : Ce.maxSize);
|
|
1962
|
+
}, e.getStart = v((t) => [t, fe(n, t), n.getState().columnSizing], (t, o) => o.slice(0, e.getIndex(t)).reduce((i, r) => i + r.getSize(), 0), R(n.options, "debugColumns", "getStart")), e.getAfter = v((t) => [t, fe(n, t), n.getState().columnSizing], (t, o) => o.slice(e.getIndex(t) + 1).reduce((i, r) => i + r.getSize(), 0), R(n.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
1963
|
+
n.setColumnSizing((t) => {
|
|
1964
|
+
let {
|
|
1965
|
+
[e.id]: o,
|
|
1966
|
+
...i
|
|
1967
|
+
} = t;
|
|
1968
|
+
return i;
|
|
1969
|
+
});
|
|
1970
|
+
}, e.getCanResize = () => {
|
|
1971
|
+
var t, o;
|
|
1972
|
+
return ((t = e.columnDef.enableResizing) != null ? t : !0) && ((o = n.options.enableColumnResizing) != null ? o : !0);
|
|
1973
|
+
}, e.getIsResizing = () => n.getState().columnSizingInfo.isResizingColumn === e.id;
|
|
1974
|
+
},
|
|
1975
|
+
createHeader: (e, n) => {
|
|
1976
|
+
e.getSize = () => {
|
|
1977
|
+
let t = 0;
|
|
1978
|
+
const o = (i) => {
|
|
1979
|
+
if (i.subHeaders.length)
|
|
1980
|
+
i.subHeaders.forEach(o);
|
|
1981
|
+
else {
|
|
1982
|
+
var r;
|
|
1983
|
+
t += (r = i.column.getSize()) != null ? r : 0;
|
|
1984
|
+
}
|
|
1985
|
+
};
|
|
1986
|
+
return o(e), t;
|
|
1987
|
+
}, e.getStart = () => {
|
|
1988
|
+
if (e.index > 0) {
|
|
1989
|
+
const t = e.headerGroup.headers[e.index - 1];
|
|
1990
|
+
return t.getStart() + t.getSize();
|
|
1991
|
+
}
|
|
1992
|
+
return 0;
|
|
1993
|
+
}, e.getResizeHandler = (t) => {
|
|
1994
|
+
const o = n.getColumn(e.column.id), i = o?.getCanResize();
|
|
1995
|
+
return (r) => {
|
|
1996
|
+
if (!o || !i || (r.persist == null || r.persist(), Oe(r) && r.touches && r.touches.length > 1))
|
|
1997
|
+
return;
|
|
1998
|
+
const l = e.getSize(), s = e ? e.getLeafHeaders().map((h) => [h.column.id, h.column.getSize()]) : [[o.id, o.getSize()]], u = Oe(r) ? Math.round(r.touches[0].clientX) : r.clientX, g = {}, c = (h, C) => {
|
|
1999
|
+
typeof C == "number" && (n.setColumnSizingInfo((S) => {
|
|
2000
|
+
var x, y;
|
|
2001
|
+
const $ = n.options.columnResizeDirection === "rtl" ? -1 : 1, _ = (C - ((x = S?.startOffset) != null ? x : 0)) * $, F = Math.max(_ / ((y = S?.startSize) != null ? y : 0), -0.999999);
|
|
2002
|
+
return S.columnSizingStart.forEach((M) => {
|
|
2003
|
+
let [A, L] = M;
|
|
2004
|
+
g[A] = Math.round(Math.max(L + L * F, 0) * 100) / 100;
|
|
2005
|
+
}), {
|
|
2006
|
+
...S,
|
|
2007
|
+
deltaOffset: _,
|
|
2008
|
+
deltaPercentage: F
|
|
2009
|
+
};
|
|
2010
|
+
}), (n.options.columnResizeMode === "onChange" || h === "end") && n.setColumnSizing((S) => ({
|
|
2011
|
+
...S,
|
|
2012
|
+
...g
|
|
2013
|
+
})));
|
|
2014
|
+
}, f = (h) => c("move", h), d = (h) => {
|
|
2015
|
+
c("end", h), n.setColumnSizingInfo((C) => ({
|
|
2016
|
+
...C,
|
|
2017
|
+
isResizingColumn: !1,
|
|
2018
|
+
startOffset: null,
|
|
2019
|
+
startSize: null,
|
|
2020
|
+
deltaOffset: null,
|
|
2021
|
+
deltaPercentage: null,
|
|
2022
|
+
columnSizingStart: []
|
|
2023
|
+
}));
|
|
2024
|
+
}, a = uo(t), p = {
|
|
2025
|
+
moveHandler: (h) => f(h.clientX),
|
|
2026
|
+
upHandler: (h) => {
|
|
2027
|
+
a?.removeEventListener("mousemove", p.moveHandler), a?.removeEventListener("mouseup", p.upHandler), d(h.clientX);
|
|
2028
|
+
}
|
|
2029
|
+
}, m = {
|
|
2030
|
+
moveHandler: (h) => (h.cancelable && (h.preventDefault(), h.stopPropagation()), f(h.touches[0].clientX), !1),
|
|
2031
|
+
upHandler: (h) => {
|
|
2032
|
+
var C;
|
|
2033
|
+
a?.removeEventListener("touchmove", m.moveHandler), a?.removeEventListener("touchend", m.upHandler), h.cancelable && (h.preventDefault(), h.stopPropagation()), d((C = h.touches[0]) == null ? void 0 : C.clientX);
|
|
2034
|
+
}
|
|
2035
|
+
}, w = go() ? {
|
|
2036
|
+
passive: !1
|
|
2037
|
+
} : !1;
|
|
2038
|
+
Oe(r) ? (a?.addEventListener("touchmove", m.moveHandler, w), a?.addEventListener("touchend", m.upHandler, w)) : (a?.addEventListener("mousemove", p.moveHandler, w), a?.addEventListener("mouseup", p.upHandler, w)), n.setColumnSizingInfo((h) => ({
|
|
2039
|
+
...h,
|
|
2040
|
+
startOffset: u,
|
|
2041
|
+
startSize: l,
|
|
2042
|
+
deltaOffset: 0,
|
|
2043
|
+
deltaPercentage: 0,
|
|
2044
|
+
columnSizingStart: s,
|
|
2045
|
+
isResizingColumn: o.id
|
|
2046
|
+
}));
|
|
2047
|
+
};
|
|
2048
|
+
};
|
|
2049
|
+
},
|
|
2050
|
+
createTable: (e) => {
|
|
2051
|
+
e.setColumnSizing = (n) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(n), e.setColumnSizingInfo = (n) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(n), e.resetColumnSizing = (n) => {
|
|
2052
|
+
var t;
|
|
2053
|
+
e.setColumnSizing(n ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
|
2054
|
+
}, e.resetHeaderSizeInfo = (n) => {
|
|
2055
|
+
var t;
|
|
2056
|
+
e.setColumnSizingInfo(n ? Le() : (t = e.initialState.columnSizingInfo) != null ? t : Le());
|
|
2057
|
+
}, e.getTotalSize = () => {
|
|
2058
|
+
var n, t;
|
|
2059
|
+
return (n = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((o, i) => o + i.getSize(), 0)) != null ? n : 0;
|
|
2060
|
+
}, e.getLeftTotalSize = () => {
|
|
2061
|
+
var n, t;
|
|
2062
|
+
return (n = (t = e.getLeftHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((o, i) => o + i.getSize(), 0)) != null ? n : 0;
|
|
2063
|
+
}, e.getCenterTotalSize = () => {
|
|
2064
|
+
var n, t;
|
|
2065
|
+
return (n = (t = e.getCenterHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((o, i) => o + i.getSize(), 0)) != null ? n : 0;
|
|
2066
|
+
}, e.getRightTotalSize = () => {
|
|
2067
|
+
var n, t;
|
|
2068
|
+
return (n = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((o, i) => o + i.getSize(), 0)) != null ? n : 0;
|
|
2069
|
+
};
|
|
2070
|
+
}
|
|
2071
|
+
};
|
|
2072
|
+
let ve = null;
|
|
2073
|
+
function go() {
|
|
2074
|
+
if (typeof ve == "boolean") return ve;
|
|
2075
|
+
let e = !1;
|
|
2076
|
+
try {
|
|
2077
|
+
const n = {
|
|
2078
|
+
get passive() {
|
|
2079
|
+
return e = !0, !1;
|
|
2080
|
+
}
|
|
2081
|
+
}, t = () => {
|
|
2082
|
+
};
|
|
2083
|
+
window.addEventListener("test", t, n), window.removeEventListener("test", t);
|
|
2084
|
+
} catch {
|
|
2085
|
+
e = !1;
|
|
2086
|
+
}
|
|
2087
|
+
return ve = e, ve;
|
|
2088
|
+
}
|
|
2089
|
+
function Oe(e) {
|
|
2090
|
+
return e.type === "touchstart";
|
|
2091
|
+
}
|
|
2092
|
+
const co = {
|
|
2093
|
+
getInitialState: (e) => ({
|
|
2094
|
+
columnVisibility: {},
|
|
2095
|
+
...e
|
|
2096
|
+
}),
|
|
2097
|
+
getDefaultOptions: (e) => ({
|
|
2098
|
+
onColumnVisibilityChange: D("columnVisibility", e)
|
|
2099
|
+
}),
|
|
2100
|
+
createColumn: (e, n) => {
|
|
2101
|
+
e.toggleVisibility = (t) => {
|
|
2102
|
+
e.getCanHide() && n.setColumnVisibility((o) => ({
|
|
2103
|
+
...o,
|
|
2104
|
+
[e.id]: t ?? !e.getIsVisible()
|
|
2105
|
+
}));
|
|
2106
|
+
}, e.getIsVisible = () => {
|
|
2107
|
+
var t, o;
|
|
2108
|
+
const i = e.columns;
|
|
2109
|
+
return (t = i.length ? i.some((r) => r.getIsVisible()) : (o = n.getState().columnVisibility) == null ? void 0 : o[e.id]) != null ? t : !0;
|
|
2110
|
+
}, e.getCanHide = () => {
|
|
2111
|
+
var t, o;
|
|
2112
|
+
return ((t = e.columnDef.enableHiding) != null ? t : !0) && ((o = n.options.enableHiding) != null ? o : !0);
|
|
2113
|
+
}, e.getToggleVisibilityHandler = () => (t) => {
|
|
2114
|
+
e.toggleVisibility == null || e.toggleVisibility(t.target.checked);
|
|
2115
|
+
};
|
|
2116
|
+
},
|
|
2117
|
+
createRow: (e, n) => {
|
|
2118
|
+
e._getAllVisibleCells = v(() => [e.getAllCells(), n.getState().columnVisibility], (t) => t.filter((o) => o.column.getIsVisible()), R(n.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = v(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, o, i) => [...t, ...o, ...i], R(n.options, "debugRows", "getVisibleCells"));
|
|
2119
|
+
},
|
|
2120
|
+
createTable: (e) => {
|
|
2121
|
+
const n = (t, o) => v(() => [o(), o().filter((i) => i.getIsVisible()).map((i) => i.id).join("_")], (i) => i.filter((r) => r.getIsVisible == null ? void 0 : r.getIsVisible()), R(e.options, "debugColumns", t));
|
|
2122
|
+
e.getVisibleFlatColumns = n("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = n("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = n("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = n("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = n("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
|
|
2123
|
+
var o;
|
|
2124
|
+
e.setColumnVisibility(t ? {} : (o = e.initialState.columnVisibility) != null ? o : {});
|
|
2125
|
+
}, e.toggleAllColumnsVisible = (t) => {
|
|
2126
|
+
var o;
|
|
2127
|
+
t = (o = t) != null ? o : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((i, r) => ({
|
|
2128
|
+
...i,
|
|
2129
|
+
[r.id]: t || !(r.getCanHide != null && r.getCanHide())
|
|
2130
|
+
}), {}));
|
|
2131
|
+
}, e.getIsAllColumnsVisible = () => !e.getAllLeafColumns().some((t) => !(t.getIsVisible != null && t.getIsVisible())), e.getIsSomeColumnsVisible = () => e.getAllLeafColumns().some((t) => t.getIsVisible == null ? void 0 : t.getIsVisible()), e.getToggleAllColumnsVisibilityHandler = () => (t) => {
|
|
2132
|
+
var o;
|
|
2133
|
+
e.toggleAllColumnsVisible((o = t.target) == null ? void 0 : o.checked);
|
|
2134
|
+
};
|
|
2135
|
+
}
|
|
2136
|
+
};
|
|
2137
|
+
function fe(e, n) {
|
|
2138
|
+
return n ? n === "center" ? e.getCenterVisibleLeafColumns() : n === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
2139
|
+
}
|
|
2140
|
+
const fo = {
|
|
2141
|
+
createTable: (e) => {
|
|
2142
|
+
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
|
|
2143
|
+
if (e._getGlobalFacetedMinMaxValues)
|
|
2144
|
+
return e._getGlobalFacetedMinMaxValues();
|
|
2145
|
+
};
|
|
2146
|
+
}
|
|
2147
|
+
}, po = {
|
|
2148
|
+
getInitialState: (e) => ({
|
|
2149
|
+
globalFilter: void 0,
|
|
2150
|
+
...e
|
|
2151
|
+
}),
|
|
2152
|
+
getDefaultOptions: (e) => ({
|
|
2153
|
+
onGlobalFilterChange: D("globalFilter", e),
|
|
2154
|
+
globalFilterFn: "auto",
|
|
2155
|
+
getColumnCanGlobalFilter: (n) => {
|
|
2156
|
+
var t;
|
|
2157
|
+
const o = (t = e.getCoreRowModel().flatRows[0]) == null || (t = t._getAllCellsByColumnId()[n.id]) == null ? void 0 : t.getValue();
|
|
2158
|
+
return typeof o == "string" || typeof o == "number";
|
|
2159
|
+
}
|
|
2160
|
+
}),
|
|
2161
|
+
createColumn: (e, n) => {
|
|
2162
|
+
e.getCanGlobalFilter = () => {
|
|
2163
|
+
var t, o, i, r;
|
|
2164
|
+
return ((t = e.columnDef.enableGlobalFilter) != null ? t : !0) && ((o = n.options.enableGlobalFilter) != null ? o : !0) && ((i = n.options.enableFilters) != null ? i : !0) && ((r = n.options.getColumnCanGlobalFilter == null ? void 0 : n.options.getColumnCanGlobalFilter(e)) != null ? r : !0) && !!e.accessorFn;
|
|
2165
|
+
};
|
|
2166
|
+
},
|
|
2167
|
+
createTable: (e) => {
|
|
2168
|
+
e.getGlobalAutoFilterFn = () => W.includesString, e.getGlobalFilterFn = () => {
|
|
2169
|
+
var n, t;
|
|
2170
|
+
const {
|
|
2171
|
+
globalFilterFn: o
|
|
2172
|
+
} = e.options;
|
|
2173
|
+
return Ae(o) ? o : o === "auto" ? e.getGlobalAutoFilterFn() : (n = (t = e.options.filterFns) == null ? void 0 : t[o]) != null ? n : W[o];
|
|
2174
|
+
}, e.setGlobalFilter = (n) => {
|
|
2175
|
+
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(n);
|
|
2176
|
+
}, e.resetGlobalFilter = (n) => {
|
|
2177
|
+
e.setGlobalFilter(n ? void 0 : e.initialState.globalFilter);
|
|
2178
|
+
};
|
|
2179
|
+
}
|
|
2180
|
+
}, mo = {
|
|
2181
|
+
getInitialState: (e) => ({
|
|
2182
|
+
expanded: {},
|
|
2183
|
+
...e
|
|
2184
|
+
}),
|
|
2185
|
+
getDefaultOptions: (e) => ({
|
|
2186
|
+
onExpandedChange: D("expanded", e),
|
|
2187
|
+
paginateExpandedRows: !0
|
|
2188
|
+
}),
|
|
2189
|
+
createTable: (e) => {
|
|
2190
|
+
let n = !1, t = !1;
|
|
2191
|
+
e._autoResetExpanded = () => {
|
|
2192
|
+
var o, i;
|
|
2193
|
+
if (!n) {
|
|
2194
|
+
e._queue(() => {
|
|
2195
|
+
n = !0;
|
|
2196
|
+
});
|
|
2197
|
+
return;
|
|
2198
|
+
}
|
|
2199
|
+
if ((o = (i = e.options.autoResetAll) != null ? i : e.options.autoResetExpanded) != null ? o : !e.options.manualExpanding) {
|
|
2200
|
+
if (t) return;
|
|
2201
|
+
t = !0, e._queue(() => {
|
|
2202
|
+
e.resetExpanded(), t = !1;
|
|
2203
|
+
});
|
|
2204
|
+
}
|
|
2205
|
+
}, e.setExpanded = (o) => e.options.onExpandedChange == null ? void 0 : e.options.onExpandedChange(o), e.toggleAllRowsExpanded = (o) => {
|
|
2206
|
+
o ?? !e.getIsAllRowsExpanded() ? e.setExpanded(!0) : e.setExpanded({});
|
|
2207
|
+
}, e.resetExpanded = (o) => {
|
|
2208
|
+
var i, r;
|
|
2209
|
+
e.setExpanded(o ? {} : (i = (r = e.initialState) == null ? void 0 : r.expanded) != null ? i : {});
|
|
2210
|
+
}, e.getCanSomeRowsExpand = () => e.getPrePaginationRowModel().flatRows.some((o) => o.getCanExpand()), e.getToggleAllRowsExpandedHandler = () => (o) => {
|
|
2211
|
+
o.persist == null || o.persist(), e.toggleAllRowsExpanded();
|
|
2212
|
+
}, e.getIsSomeRowsExpanded = () => {
|
|
2213
|
+
const o = e.getState().expanded;
|
|
2214
|
+
return o === !0 || Object.values(o).some(Boolean);
|
|
2215
|
+
}, e.getIsAllRowsExpanded = () => {
|
|
2216
|
+
const o = e.getState().expanded;
|
|
2217
|
+
return typeof o == "boolean" ? o === !0 : !(!Object.keys(o).length || e.getRowModel().flatRows.some((i) => !i.getIsExpanded()));
|
|
2218
|
+
}, e.getExpandedDepth = () => {
|
|
2219
|
+
let o = 0;
|
|
2220
|
+
return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((r) => {
|
|
2221
|
+
const l = r.split(".");
|
|
2222
|
+
o = Math.max(o, l.length);
|
|
2223
|
+
}), o;
|
|
2224
|
+
}, e.getPreExpandedRowModel = () => e.getSortedRowModel(), e.getExpandedRowModel = () => (!e._getExpandedRowModel && e.options.getExpandedRowModel && (e._getExpandedRowModel = e.options.getExpandedRowModel(e)), e.options.manualExpanding || !e._getExpandedRowModel ? e.getPreExpandedRowModel() : e._getExpandedRowModel());
|
|
2225
|
+
},
|
|
2226
|
+
createRow: (e, n) => {
|
|
2227
|
+
e.toggleExpanded = (t) => {
|
|
2228
|
+
n.setExpanded((o) => {
|
|
2229
|
+
var i;
|
|
2230
|
+
const r = o === !0 ? !0 : !!(o != null && o[e.id]);
|
|
2231
|
+
let l = {};
|
|
2232
|
+
if (o === !0 ? Object.keys(n.getRowModel().rowsById).forEach((s) => {
|
|
2233
|
+
l[s] = !0;
|
|
2234
|
+
}) : l = o, t = (i = t) != null ? i : !r, !r && t)
|
|
2235
|
+
return {
|
|
2236
|
+
...l,
|
|
2237
|
+
[e.id]: !0
|
|
2238
|
+
};
|
|
2239
|
+
if (r && !t) {
|
|
2240
|
+
const {
|
|
2241
|
+
[e.id]: s,
|
|
2242
|
+
...u
|
|
2243
|
+
} = l;
|
|
2244
|
+
return u;
|
|
2245
|
+
}
|
|
2246
|
+
return o;
|
|
2247
|
+
});
|
|
2248
|
+
}, e.getIsExpanded = () => {
|
|
2249
|
+
var t;
|
|
2250
|
+
const o = n.getState().expanded;
|
|
2251
|
+
return !!((t = n.options.getIsRowExpanded == null ? void 0 : n.options.getIsRowExpanded(e)) != null ? t : o === !0 || o?.[e.id]);
|
|
2252
|
+
}, e.getCanExpand = () => {
|
|
2253
|
+
var t, o, i;
|
|
2254
|
+
return (t = n.options.getRowCanExpand == null ? void 0 : n.options.getRowCanExpand(e)) != null ? t : ((o = n.options.enableExpanding) != null ? o : !0) && !!((i = e.subRows) != null && i.length);
|
|
2255
|
+
}, e.getIsAllParentsExpanded = () => {
|
|
2256
|
+
let t = !0, o = e;
|
|
2257
|
+
for (; t && o.parentId; )
|
|
2258
|
+
o = n.getRow(o.parentId, !0), t = o.getIsExpanded();
|
|
2259
|
+
return t;
|
|
2260
|
+
}, e.getToggleExpandedHandler = () => {
|
|
2261
|
+
const t = e.getCanExpand();
|
|
2262
|
+
return () => {
|
|
2263
|
+
t && e.toggleExpanded();
|
|
2264
|
+
};
|
|
2265
|
+
};
|
|
2266
|
+
}
|
|
2267
|
+
}, je = 0, be = 10, He = () => ({
|
|
2268
|
+
pageIndex: je,
|
|
2269
|
+
pageSize: be
|
|
2270
|
+
}), ho = {
|
|
2271
|
+
getInitialState: (e) => ({
|
|
2272
|
+
...e,
|
|
2273
|
+
pagination: {
|
|
2274
|
+
...He(),
|
|
2275
|
+
...e?.pagination
|
|
2276
|
+
}
|
|
2277
|
+
}),
|
|
2278
|
+
getDefaultOptions: (e) => ({
|
|
2279
|
+
onPaginationChange: D("pagination", e)
|
|
2280
|
+
}),
|
|
2281
|
+
createTable: (e) => {
|
|
2282
|
+
let n = !1, t = !1;
|
|
2283
|
+
e._autoResetPageIndex = () => {
|
|
2284
|
+
var o, i;
|
|
2285
|
+
if (!n) {
|
|
2286
|
+
e._queue(() => {
|
|
2287
|
+
n = !0;
|
|
2288
|
+
});
|
|
2289
|
+
return;
|
|
2290
|
+
}
|
|
2291
|
+
if ((o = (i = e.options.autoResetAll) != null ? i : e.options.autoResetPageIndex) != null ? o : !e.options.manualPagination) {
|
|
2292
|
+
if (t) return;
|
|
2293
|
+
t = !0, e._queue(() => {
|
|
2294
|
+
e.resetPageIndex(), t = !1;
|
|
2295
|
+
});
|
|
2296
|
+
}
|
|
2297
|
+
}, e.setPagination = (o) => {
|
|
2298
|
+
const i = (r) => Q(o, r);
|
|
2299
|
+
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(i);
|
|
2300
|
+
}, e.resetPagination = (o) => {
|
|
2301
|
+
var i;
|
|
2302
|
+
e.setPagination(o ? He() : (i = e.initialState.pagination) != null ? i : He());
|
|
2303
|
+
}, e.setPageIndex = (o) => {
|
|
2304
|
+
e.setPagination((i) => {
|
|
2305
|
+
let r = Q(o, i.pageIndex);
|
|
2306
|
+
const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
2307
|
+
return r = Math.max(0, Math.min(r, l)), {
|
|
2308
|
+
...i,
|
|
2309
|
+
pageIndex: r
|
|
2310
|
+
};
|
|
2311
|
+
});
|
|
2312
|
+
}, e.resetPageIndex = (o) => {
|
|
2313
|
+
var i, r;
|
|
2314
|
+
e.setPageIndex(o ? je : (i = (r = e.initialState) == null || (r = r.pagination) == null ? void 0 : r.pageIndex) != null ? i : je);
|
|
2315
|
+
}, e.resetPageSize = (o) => {
|
|
2316
|
+
var i, r;
|
|
2317
|
+
e.setPageSize(o ? be : (i = (r = e.initialState) == null || (r = r.pagination) == null ? void 0 : r.pageSize) != null ? i : be);
|
|
2318
|
+
}, e.setPageSize = (o) => {
|
|
2319
|
+
e.setPagination((i) => {
|
|
2320
|
+
const r = Math.max(1, Q(o, i.pageSize)), l = i.pageSize * i.pageIndex, s = Math.floor(l / r);
|
|
2321
|
+
return {
|
|
2322
|
+
...i,
|
|
2323
|
+
pageIndex: s,
|
|
2324
|
+
pageSize: r
|
|
2325
|
+
};
|
|
2326
|
+
});
|
|
2327
|
+
}, e.setPageCount = (o) => e.setPagination((i) => {
|
|
2328
|
+
var r;
|
|
2329
|
+
let l = Q(o, (r = e.options.pageCount) != null ? r : -1);
|
|
2330
|
+
return typeof l == "number" && (l = Math.max(-1, l)), {
|
|
2331
|
+
...i,
|
|
2332
|
+
pageCount: l
|
|
2333
|
+
};
|
|
2334
|
+
}), e.getPageOptions = v(() => [e.getPageCount()], (o) => {
|
|
2335
|
+
let i = [];
|
|
2336
|
+
return o && o > 0 && (i = [...new Array(o)].fill(null).map((r, l) => l)), i;
|
|
2337
|
+
}, R(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
2338
|
+
const {
|
|
2339
|
+
pageIndex: o
|
|
2340
|
+
} = e.getState().pagination, i = e.getPageCount();
|
|
2341
|
+
return i === -1 ? !0 : i === 0 ? !1 : o < i - 1;
|
|
2342
|
+
}, e.previousPage = () => e.setPageIndex((o) => o - 1), e.nextPage = () => e.setPageIndex((o) => o + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => {
|
|
2343
|
+
var o;
|
|
2344
|
+
return (o = e.options.pageCount) != null ? o : Math.ceil(e.getRowCount() / e.getState().pagination.pageSize);
|
|
2345
|
+
}, e.getRowCount = () => {
|
|
2346
|
+
var o;
|
|
2347
|
+
return (o = e.options.rowCount) != null ? o : e.getPrePaginationRowModel().rows.length;
|
|
2348
|
+
};
|
|
2349
|
+
}
|
|
2350
|
+
}, Ge = () => ({
|
|
2351
|
+
top: [],
|
|
2352
|
+
bottom: []
|
|
2353
|
+
}), wo = {
|
|
2354
|
+
getInitialState: (e) => ({
|
|
2355
|
+
rowPinning: Ge(),
|
|
2356
|
+
...e
|
|
2357
|
+
}),
|
|
2358
|
+
getDefaultOptions: (e) => ({
|
|
2359
|
+
onRowPinningChange: D("rowPinning", e)
|
|
2360
|
+
}),
|
|
2361
|
+
createRow: (e, n) => {
|
|
2362
|
+
e.pin = (t, o, i) => {
|
|
2363
|
+
const r = o ? e.getLeafRows().map((u) => {
|
|
2364
|
+
let {
|
|
2365
|
+
id: g
|
|
2366
|
+
} = u;
|
|
2367
|
+
return g;
|
|
2368
|
+
}) : [], l = i ? e.getParentRows().map((u) => {
|
|
2369
|
+
let {
|
|
2370
|
+
id: g
|
|
2371
|
+
} = u;
|
|
2372
|
+
return g;
|
|
2373
|
+
}) : [], s = /* @__PURE__ */ new Set([...l, e.id, ...r]);
|
|
2374
|
+
n.setRowPinning((u) => {
|
|
2375
|
+
var g, c;
|
|
2376
|
+
if (t === "bottom") {
|
|
2377
|
+
var f, d;
|
|
2378
|
+
return {
|
|
2379
|
+
top: ((f = u?.top) != null ? f : []).filter((m) => !(s != null && s.has(m))),
|
|
2380
|
+
bottom: [...((d = u?.bottom) != null ? d : []).filter((m) => !(s != null && s.has(m))), ...Array.from(s)]
|
|
2381
|
+
};
|
|
2382
|
+
}
|
|
2383
|
+
if (t === "top") {
|
|
2384
|
+
var a, p;
|
|
2385
|
+
return {
|
|
2386
|
+
top: [...((a = u?.top) != null ? a : []).filter((m) => !(s != null && s.has(m))), ...Array.from(s)],
|
|
2387
|
+
bottom: ((p = u?.bottom) != null ? p : []).filter((m) => !(s != null && s.has(m)))
|
|
2388
|
+
};
|
|
2389
|
+
}
|
|
2390
|
+
return {
|
|
2391
|
+
top: ((g = u?.top) != null ? g : []).filter((m) => !(s != null && s.has(m))),
|
|
2392
|
+
bottom: ((c = u?.bottom) != null ? c : []).filter((m) => !(s != null && s.has(m)))
|
|
2393
|
+
};
|
|
2394
|
+
});
|
|
2395
|
+
}, e.getCanPin = () => {
|
|
2396
|
+
var t;
|
|
2397
|
+
const {
|
|
2398
|
+
enableRowPinning: o,
|
|
2399
|
+
enablePinning: i
|
|
2400
|
+
} = n.options;
|
|
2401
|
+
return typeof o == "function" ? o(e) : (t = o ?? i) != null ? t : !0;
|
|
2402
|
+
}, e.getIsPinned = () => {
|
|
2403
|
+
const t = [e.id], {
|
|
2404
|
+
top: o,
|
|
2405
|
+
bottom: i
|
|
2406
|
+
} = n.getState().rowPinning, r = t.some((s) => o?.includes(s)), l = t.some((s) => i?.includes(s));
|
|
2407
|
+
return r ? "top" : l ? "bottom" : !1;
|
|
2408
|
+
}, e.getPinnedIndex = () => {
|
|
2409
|
+
var t, o;
|
|
2410
|
+
const i = e.getIsPinned();
|
|
2411
|
+
if (!i) return -1;
|
|
2412
|
+
const r = (t = i === "top" ? n.getTopRows() : n.getBottomRows()) == null ? void 0 : t.map((l) => {
|
|
2413
|
+
let {
|
|
2414
|
+
id: s
|
|
2415
|
+
} = l;
|
|
2416
|
+
return s;
|
|
2417
|
+
});
|
|
2418
|
+
return (o = r?.indexOf(e.id)) != null ? o : -1;
|
|
2419
|
+
};
|
|
2420
|
+
},
|
|
2421
|
+
createTable: (e) => {
|
|
2422
|
+
e.setRowPinning = (n) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(n), e.resetRowPinning = (n) => {
|
|
2423
|
+
var t, o;
|
|
2424
|
+
return e.setRowPinning(n ? Ge() : (t = (o = e.initialState) == null ? void 0 : o.rowPinning) != null ? t : Ge());
|
|
2425
|
+
}, e.getIsSomeRowsPinned = (n) => {
|
|
2426
|
+
var t;
|
|
2427
|
+
const o = e.getState().rowPinning;
|
|
2428
|
+
if (!n) {
|
|
2429
|
+
var i, r;
|
|
2430
|
+
return !!((i = o.top) != null && i.length || (r = o.bottom) != null && r.length);
|
|
2431
|
+
}
|
|
2432
|
+
return !!((t = o[n]) != null && t.length);
|
|
2433
|
+
}, e._getPinnedRows = (n, t, o) => {
|
|
2434
|
+
var i;
|
|
2435
|
+
return ((i = e.options.keepPinnedRows) == null || i ? (
|
|
2436
|
+
//get all rows that are pinned even if they would not be otherwise visible
|
|
2437
|
+
//account for expanded parent rows, but not pagination or filtering
|
|
2438
|
+
(t ?? []).map((l) => {
|
|
2439
|
+
const s = e.getRow(l, !0);
|
|
2440
|
+
return s.getIsAllParentsExpanded() ? s : null;
|
|
2441
|
+
})
|
|
2442
|
+
) : (
|
|
2443
|
+
//else get only visible rows that are pinned
|
|
2444
|
+
(t ?? []).map((l) => n.find((s) => s.id === l))
|
|
2445
|
+
)).filter(Boolean).map((l) => ({
|
|
2446
|
+
...l,
|
|
2447
|
+
position: o
|
|
2448
|
+
}));
|
|
2449
|
+
}, e.getTopRows = v(() => [e.getRowModel().rows, e.getState().rowPinning.top], (n, t) => e._getPinnedRows(n, t, "top"), R(e.options, "debugRows", "getTopRows")), e.getBottomRows = v(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (n, t) => e._getPinnedRows(n, t, "bottom"), R(e.options, "debugRows", "getBottomRows")), e.getCenterRows = v(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (n, t, o) => {
|
|
2450
|
+
const i = /* @__PURE__ */ new Set([...t ?? [], ...o ?? []]);
|
|
2451
|
+
return n.filter((r) => !i.has(r.id));
|
|
2452
|
+
}, R(e.options, "debugRows", "getCenterRows"));
|
|
2453
|
+
}
|
|
2454
|
+
}, So = {
|
|
2455
|
+
getInitialState: (e) => ({
|
|
2456
|
+
rowSelection: {},
|
|
2457
|
+
...e
|
|
2458
|
+
}),
|
|
2459
|
+
getDefaultOptions: (e) => ({
|
|
2460
|
+
onRowSelectionChange: D("rowSelection", e),
|
|
2461
|
+
enableRowSelection: !0,
|
|
2462
|
+
enableMultiRowSelection: !0,
|
|
2463
|
+
enableSubRowSelection: !0
|
|
2464
|
+
// enableGroupingRowSelection: false,
|
|
2465
|
+
// isAdditiveSelectEvent: (e: unknown) => !!e.metaKey,
|
|
2466
|
+
// isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,
|
|
2467
|
+
}),
|
|
2468
|
+
createTable: (e) => {
|
|
2469
|
+
e.setRowSelection = (n) => e.options.onRowSelectionChange == null ? void 0 : e.options.onRowSelectionChange(n), e.resetRowSelection = (n) => {
|
|
2470
|
+
var t;
|
|
2471
|
+
return e.setRowSelection(n ? {} : (t = e.initialState.rowSelection) != null ? t : {});
|
|
2472
|
+
}, e.toggleAllRowsSelected = (n) => {
|
|
2473
|
+
e.setRowSelection((t) => {
|
|
2474
|
+
n = typeof n < "u" ? n : !e.getIsAllRowsSelected();
|
|
2475
|
+
const o = {
|
|
2476
|
+
...t
|
|
2477
|
+
}, i = e.getPreGroupedRowModel().flatRows;
|
|
2478
|
+
return n ? i.forEach((r) => {
|
|
2479
|
+
r.getCanSelect() && (o[r.id] = !0);
|
|
2480
|
+
}) : i.forEach((r) => {
|
|
2481
|
+
delete o[r.id];
|
|
2482
|
+
}), o;
|
|
2483
|
+
});
|
|
2484
|
+
}, e.toggleAllPageRowsSelected = (n) => e.setRowSelection((t) => {
|
|
2485
|
+
const o = typeof n < "u" ? n : !e.getIsAllPageRowsSelected(), i = {
|
|
2486
|
+
...t
|
|
2487
|
+
};
|
|
2488
|
+
return e.getRowModel().rows.forEach((r) => {
|
|
2489
|
+
We(i, r.id, o, !0, e);
|
|
2490
|
+
}), i;
|
|
2491
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = v(() => [e.getState().rowSelection, e.getCoreRowModel()], (n, t) => Object.keys(n).length ? ze(e, t) : {
|
|
2492
|
+
rows: [],
|
|
2493
|
+
flatRows: [],
|
|
2494
|
+
rowsById: {}
|
|
2495
|
+
}, R(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = v(() => [e.getState().rowSelection, e.getFilteredRowModel()], (n, t) => Object.keys(n).length ? ze(e, t) : {
|
|
2496
|
+
rows: [],
|
|
2497
|
+
flatRows: [],
|
|
2498
|
+
rowsById: {}
|
|
2499
|
+
}, R(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = v(() => [e.getState().rowSelection, e.getSortedRowModel()], (n, t) => Object.keys(n).length ? ze(e, t) : {
|
|
2500
|
+
rows: [],
|
|
2501
|
+
flatRows: [],
|
|
2502
|
+
rowsById: {}
|
|
2503
|
+
}, R(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
|
|
2504
|
+
const n = e.getFilteredRowModel().flatRows, {
|
|
2505
|
+
rowSelection: t
|
|
2506
|
+
} = e.getState();
|
|
2507
|
+
let o = !!(n.length && Object.keys(t).length);
|
|
2508
|
+
return o && n.some((i) => i.getCanSelect() && !t[i.id]) && (o = !1), o;
|
|
2509
|
+
}, e.getIsAllPageRowsSelected = () => {
|
|
2510
|
+
const n = e.getPaginationRowModel().flatRows.filter((i) => i.getCanSelect()), {
|
|
2511
|
+
rowSelection: t
|
|
2512
|
+
} = e.getState();
|
|
2513
|
+
let o = !!n.length;
|
|
2514
|
+
return o && n.some((i) => !t[i.id]) && (o = !1), o;
|
|
2515
|
+
}, e.getIsSomeRowsSelected = () => {
|
|
2516
|
+
var n;
|
|
2517
|
+
const t = Object.keys((n = e.getState().rowSelection) != null ? n : {}).length;
|
|
2518
|
+
return t > 0 && t < e.getFilteredRowModel().flatRows.length;
|
|
2519
|
+
}, e.getIsSomePageRowsSelected = () => {
|
|
2520
|
+
const n = e.getPaginationRowModel().flatRows;
|
|
2521
|
+
return e.getIsAllPageRowsSelected() ? !1 : n.filter((t) => t.getCanSelect()).some((t) => t.getIsSelected() || t.getIsSomeSelected());
|
|
2522
|
+
}, e.getToggleAllRowsSelectedHandler = () => (n) => {
|
|
2523
|
+
e.toggleAllRowsSelected(n.target.checked);
|
|
2524
|
+
}, e.getToggleAllPageRowsSelectedHandler = () => (n) => {
|
|
2525
|
+
e.toggleAllPageRowsSelected(n.target.checked);
|
|
2526
|
+
};
|
|
2527
|
+
},
|
|
2528
|
+
createRow: (e, n) => {
|
|
2529
|
+
e.toggleSelected = (t, o) => {
|
|
2530
|
+
const i = e.getIsSelected();
|
|
2531
|
+
n.setRowSelection((r) => {
|
|
2532
|
+
var l;
|
|
2533
|
+
if (t = typeof t < "u" ? t : !i, e.getCanSelect() && i === t)
|
|
2534
|
+
return r;
|
|
2535
|
+
const s = {
|
|
2536
|
+
...r
|
|
2537
|
+
};
|
|
2538
|
+
return We(s, e.id, t, (l = o?.selectChildren) != null ? l : !0, n), s;
|
|
2539
|
+
});
|
|
2540
|
+
}, e.getIsSelected = () => {
|
|
2541
|
+
const {
|
|
2542
|
+
rowSelection: t
|
|
2543
|
+
} = n.getState();
|
|
2544
|
+
return ot(e, t);
|
|
2545
|
+
}, e.getIsSomeSelected = () => {
|
|
2546
|
+
const {
|
|
2547
|
+
rowSelection: t
|
|
2548
|
+
} = n.getState();
|
|
2549
|
+
return Ue(e, t) === "some";
|
|
2550
|
+
}, e.getIsAllSubRowsSelected = () => {
|
|
2551
|
+
const {
|
|
2552
|
+
rowSelection: t
|
|
2553
|
+
} = n.getState();
|
|
2554
|
+
return Ue(e, t) === "all";
|
|
2555
|
+
}, e.getCanSelect = () => {
|
|
2556
|
+
var t;
|
|
2557
|
+
return typeof n.options.enableRowSelection == "function" ? n.options.enableRowSelection(e) : (t = n.options.enableRowSelection) != null ? t : !0;
|
|
2558
|
+
}, e.getCanSelectSubRows = () => {
|
|
2559
|
+
var t;
|
|
2560
|
+
return typeof n.options.enableSubRowSelection == "function" ? n.options.enableSubRowSelection(e) : (t = n.options.enableSubRowSelection) != null ? t : !0;
|
|
2561
|
+
}, e.getCanMultiSelect = () => {
|
|
2562
|
+
var t;
|
|
2563
|
+
return typeof n.options.enableMultiRowSelection == "function" ? n.options.enableMultiRowSelection(e) : (t = n.options.enableMultiRowSelection) != null ? t : !0;
|
|
2564
|
+
}, e.getToggleSelectedHandler = () => {
|
|
2565
|
+
const t = e.getCanSelect();
|
|
2566
|
+
return (o) => {
|
|
2567
|
+
var i;
|
|
2568
|
+
t && e.toggleSelected((i = o.target) == null ? void 0 : i.checked);
|
|
2569
|
+
};
|
|
2570
|
+
};
|
|
2571
|
+
}
|
|
2572
|
+
}, We = (e, n, t, o, i) => {
|
|
2573
|
+
var r;
|
|
2574
|
+
const l = i.getRow(n, !0);
|
|
2575
|
+
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), l.getCanSelect() && (e[n] = !0)) : delete e[n], o && (r = l.subRows) != null && r.length && l.getCanSelectSubRows() && l.subRows.forEach((s) => We(e, s.id, t, o, i));
|
|
2576
|
+
};
|
|
2577
|
+
function ze(e, n) {
|
|
2578
|
+
const t = e.getState().rowSelection, o = [], i = {}, r = function(l, s) {
|
|
2579
|
+
return l.map((u) => {
|
|
2580
|
+
var g;
|
|
2581
|
+
const c = ot(u, t);
|
|
2582
|
+
if (c && (o.push(u), i[u.id] = u), (g = u.subRows) != null && g.length && (u = {
|
|
2583
|
+
...u,
|
|
2584
|
+
subRows: r(u.subRows)
|
|
2585
|
+
}), c)
|
|
2586
|
+
return u;
|
|
2587
|
+
}).filter(Boolean);
|
|
2588
|
+
};
|
|
2589
|
+
return {
|
|
2590
|
+
rows: r(n.rows),
|
|
2591
|
+
flatRows: o,
|
|
2592
|
+
rowsById: i
|
|
2593
|
+
};
|
|
2594
|
+
}
|
|
2595
|
+
function ot(e, n) {
|
|
2596
|
+
var t;
|
|
2597
|
+
return (t = n[e.id]) != null ? t : !1;
|
|
2598
|
+
}
|
|
2599
|
+
function Ue(e, n, t) {
|
|
2600
|
+
var o;
|
|
2601
|
+
if (!((o = e.subRows) != null && o.length)) return !1;
|
|
2602
|
+
let i = !0, r = !1;
|
|
2603
|
+
return e.subRows.forEach((l) => {
|
|
2604
|
+
if (!(r && !i) && (l.getCanSelect() && (ot(l, n) ? r = !0 : i = !1), l.subRows && l.subRows.length)) {
|
|
2605
|
+
const s = Ue(l, n);
|
|
2606
|
+
s === "all" ? r = !0 : (s === "some" && (r = !0), i = !1);
|
|
2607
|
+
}
|
|
2608
|
+
}), i ? "all" : r ? "some" : !1;
|
|
2609
|
+
}
|
|
2610
|
+
const Xe = /([0-9]+)/gm, Co = (e, n, t) => zt(te(e.getValue(t)).toLowerCase(), te(n.getValue(t)).toLowerCase()), vo = (e, n, t) => zt(te(e.getValue(t)), te(n.getValue(t))), Ro = (e, n, t) => it(te(e.getValue(t)).toLowerCase(), te(n.getValue(t)).toLowerCase()), xo = (e, n, t) => it(te(e.getValue(t)), te(n.getValue(t))), yo = (e, n, t) => {
|
|
2611
|
+
const o = e.getValue(t), i = n.getValue(t);
|
|
2612
|
+
return o > i ? 1 : o < i ? -1 : 0;
|
|
2613
|
+
}, _o = (e, n, t) => it(e.getValue(t), n.getValue(t));
|
|
2614
|
+
function it(e, n) {
|
|
2615
|
+
return e === n ? 0 : e > n ? 1 : -1;
|
|
2616
|
+
}
|
|
2617
|
+
function te(e) {
|
|
2618
|
+
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
2619
|
+
}
|
|
2620
|
+
function zt(e, n) {
|
|
2621
|
+
const t = e.split(Xe).filter(Boolean), o = n.split(Xe).filter(Boolean);
|
|
2622
|
+
for (; t.length && o.length; ) {
|
|
2623
|
+
const i = t.shift(), r = o.shift(), l = parseInt(i, 10), s = parseInt(r, 10), u = [l, s].sort();
|
|
2624
|
+
if (isNaN(u[0])) {
|
|
2625
|
+
if (i > r)
|
|
2626
|
+
return 1;
|
|
2627
|
+
if (r > i)
|
|
2628
|
+
return -1;
|
|
2629
|
+
continue;
|
|
2630
|
+
}
|
|
2631
|
+
if (isNaN(u[1]))
|
|
2632
|
+
return isNaN(l) ? -1 : 1;
|
|
2633
|
+
if (l > s)
|
|
2634
|
+
return 1;
|
|
2635
|
+
if (s > l)
|
|
2636
|
+
return -1;
|
|
2637
|
+
}
|
|
2638
|
+
return t.length - o.length;
|
|
2639
|
+
}
|
|
2640
|
+
const ce = {
|
|
2641
|
+
alphanumeric: Co,
|
|
2642
|
+
alphanumericCaseSensitive: vo,
|
|
2643
|
+
text: Ro,
|
|
2644
|
+
textCaseSensitive: xo,
|
|
2645
|
+
datetime: yo,
|
|
2646
|
+
basic: _o
|
|
2647
|
+
}, Fo = {
|
|
2648
|
+
getInitialState: (e) => ({
|
|
2649
|
+
sorting: [],
|
|
2650
|
+
...e
|
|
2651
|
+
}),
|
|
2652
|
+
getDefaultColumnDef: () => ({
|
|
2653
|
+
sortingFn: "auto",
|
|
2654
|
+
sortUndefined: 1
|
|
2655
|
+
}),
|
|
2656
|
+
getDefaultOptions: (e) => ({
|
|
2657
|
+
onSortingChange: D("sorting", e),
|
|
2658
|
+
isMultiSortEvent: (n) => n.shiftKey
|
|
2659
|
+
}),
|
|
2660
|
+
createColumn: (e, n) => {
|
|
2661
|
+
e.getAutoSortingFn = () => {
|
|
2662
|
+
const t = n.getFilteredRowModel().flatRows.slice(10);
|
|
2663
|
+
let o = !1;
|
|
2664
|
+
for (const i of t) {
|
|
2665
|
+
const r = i?.getValue(e.id);
|
|
2666
|
+
if (Object.prototype.toString.call(r) === "[object Date]")
|
|
2667
|
+
return ce.datetime;
|
|
2668
|
+
if (typeof r == "string" && (o = !0, r.split(Xe).length > 1))
|
|
2669
|
+
return ce.alphanumeric;
|
|
2670
|
+
}
|
|
2671
|
+
return o ? ce.text : ce.basic;
|
|
2672
|
+
}, e.getAutoSortDir = () => {
|
|
2673
|
+
const t = n.getFilteredRowModel().flatRows[0];
|
|
2674
|
+
return typeof t?.getValue(e.id) == "string" ? "asc" : "desc";
|
|
2675
|
+
}, e.getSortingFn = () => {
|
|
2676
|
+
var t, o;
|
|
2677
|
+
if (!e)
|
|
2678
|
+
throw new Error();
|
|
2679
|
+
return Ae(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (o = n.options.sortingFns) == null ? void 0 : o[e.columnDef.sortingFn]) != null ? t : ce[e.columnDef.sortingFn];
|
|
2680
|
+
}, e.toggleSorting = (t, o) => {
|
|
2681
|
+
const i = e.getNextSortingOrder(), r = typeof t < "u" && t !== null;
|
|
2682
|
+
n.setSorting((l) => {
|
|
2683
|
+
const s = l?.find((a) => a.id === e.id), u = l?.findIndex((a) => a.id === e.id);
|
|
2684
|
+
let g = [], c, f = r ? t : i === "desc";
|
|
2685
|
+
if (l != null && l.length && e.getCanMultiSort() && o ? s ? c = "toggle" : c = "add" : l != null && l.length && u !== l.length - 1 ? c = "replace" : s ? c = "toggle" : c = "replace", c === "toggle" && (r || i || (c = "remove")), c === "add") {
|
|
2686
|
+
var d;
|
|
2687
|
+
g = [...l, {
|
|
2688
|
+
id: e.id,
|
|
2689
|
+
desc: f
|
|
2690
|
+
}], g.splice(0, g.length - ((d = n.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
|
|
2691
|
+
} else c === "toggle" ? g = l.map((a) => a.id === e.id ? {
|
|
2692
|
+
...a,
|
|
2693
|
+
desc: f
|
|
2694
|
+
} : a) : c === "remove" ? g = l.filter((a) => a.id !== e.id) : g = [{
|
|
2695
|
+
id: e.id,
|
|
2696
|
+
desc: f
|
|
2697
|
+
}];
|
|
2698
|
+
return g;
|
|
2699
|
+
});
|
|
2700
|
+
}, e.getFirstSortDir = () => {
|
|
2701
|
+
var t, o;
|
|
2702
|
+
return ((t = (o = e.columnDef.sortDescFirst) != null ? o : n.options.sortDescFirst) != null ? t : e.getAutoSortDir() === "desc") ? "desc" : "asc";
|
|
2703
|
+
}, e.getNextSortingOrder = (t) => {
|
|
2704
|
+
var o, i;
|
|
2705
|
+
const r = e.getFirstSortDir(), l = e.getIsSorted();
|
|
2706
|
+
return l ? l !== r && ((o = n.options.enableSortingRemoval) == null || o) && // If enableSortRemove, enable in general
|
|
2707
|
+
(!(t && (i = n.options.enableMultiRemove) != null) || i) ? !1 : l === "desc" ? "asc" : "desc" : r;
|
|
2708
|
+
}, e.getCanSort = () => {
|
|
2709
|
+
var t, o;
|
|
2710
|
+
return ((t = e.columnDef.enableSorting) != null ? t : !0) && ((o = n.options.enableSorting) != null ? o : !0) && !!e.accessorFn;
|
|
2711
|
+
}, e.getCanMultiSort = () => {
|
|
2712
|
+
var t, o;
|
|
2713
|
+
return (t = (o = e.columnDef.enableMultiSort) != null ? o : n.options.enableMultiSort) != null ? t : !!e.accessorFn;
|
|
2714
|
+
}, e.getIsSorted = () => {
|
|
2715
|
+
var t;
|
|
2716
|
+
const o = (t = n.getState().sorting) == null ? void 0 : t.find((i) => i.id === e.id);
|
|
2717
|
+
return o ? o.desc ? "desc" : "asc" : !1;
|
|
2718
|
+
}, e.getSortIndex = () => {
|
|
2719
|
+
var t, o;
|
|
2720
|
+
return (t = (o = n.getState().sorting) == null ? void 0 : o.findIndex((i) => i.id === e.id)) != null ? t : -1;
|
|
2721
|
+
}, e.clearSorting = () => {
|
|
2722
|
+
n.setSorting((t) => t != null && t.length ? t.filter((o) => o.id !== e.id) : []);
|
|
2723
|
+
}, e.getToggleSortingHandler = () => {
|
|
2724
|
+
const t = e.getCanSort();
|
|
2725
|
+
return (o) => {
|
|
2726
|
+
t && (o.persist == null || o.persist(), e.toggleSorting == null || e.toggleSorting(void 0, e.getCanMultiSort() ? n.options.isMultiSortEvent == null ? void 0 : n.options.isMultiSortEvent(o) : !1));
|
|
2727
|
+
};
|
|
2728
|
+
};
|
|
2729
|
+
},
|
|
2730
|
+
createTable: (e) => {
|
|
2731
|
+
e.setSorting = (n) => e.options.onSortingChange == null ? void 0 : e.options.onSortingChange(n), e.resetSorting = (n) => {
|
|
2732
|
+
var t, o;
|
|
2733
|
+
e.setSorting(n ? [] : (t = (o = e.initialState) == null ? void 0 : o.sorting) != null ? t : []);
|
|
2734
|
+
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
|
|
2735
|
+
}
|
|
2736
|
+
}, $o = [
|
|
2737
|
+
bn,
|
|
2738
|
+
co,
|
|
2739
|
+
lo,
|
|
2740
|
+
so,
|
|
2741
|
+
Un,
|
|
2742
|
+
Xn,
|
|
2743
|
+
fo,
|
|
2744
|
+
//depends on ColumnFaceting
|
|
2745
|
+
po,
|
|
2746
|
+
//depends on ColumnFiltering
|
|
2747
|
+
Fo,
|
|
2748
|
+
io,
|
|
2749
|
+
//depends on RowSorting
|
|
2750
|
+
mo,
|
|
2751
|
+
ho,
|
|
2752
|
+
wo,
|
|
2753
|
+
So,
|
|
2754
|
+
ao
|
|
2755
|
+
];
|
|
2756
|
+
function Po(e) {
|
|
2757
|
+
var n, t;
|
|
2758
|
+
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
2759
|
+
const o = [...$o, ...(n = e._features) != null ? n : []];
|
|
2760
|
+
let i = {
|
|
2761
|
+
_features: o
|
|
2762
|
+
};
|
|
2763
|
+
const r = i._features.reduce((d, a) => Object.assign(d, a.getDefaultOptions == null ? void 0 : a.getDefaultOptions(i)), {}), l = (d) => i.options.mergeOptions ? i.options.mergeOptions(r, d) : {
|
|
2764
|
+
...r,
|
|
2765
|
+
...d
|
|
2766
|
+
};
|
|
2767
|
+
let u = {
|
|
2768
|
+
...{},
|
|
2769
|
+
...(t = e.initialState) != null ? t : {}
|
|
2770
|
+
};
|
|
2771
|
+
i._features.forEach((d) => {
|
|
2772
|
+
var a;
|
|
2773
|
+
u = (a = d.getInitialState == null ? void 0 : d.getInitialState(u)) != null ? a : u;
|
|
2774
|
+
});
|
|
2775
|
+
const g = [];
|
|
2776
|
+
let c = !1;
|
|
2777
|
+
const f = {
|
|
2778
|
+
_features: o,
|
|
2779
|
+
options: {
|
|
2780
|
+
...r,
|
|
2781
|
+
...e
|
|
2782
|
+
},
|
|
2783
|
+
initialState: u,
|
|
2784
|
+
_queue: (d) => {
|
|
2785
|
+
g.push(d), c || (c = !0, Promise.resolve().then(() => {
|
|
2786
|
+
for (; g.length; )
|
|
2787
|
+
g.shift()();
|
|
2788
|
+
c = !1;
|
|
2789
|
+
}).catch((a) => setTimeout(() => {
|
|
2790
|
+
throw a;
|
|
2791
|
+
})));
|
|
2792
|
+
},
|
|
2793
|
+
reset: () => {
|
|
2794
|
+
i.setState(i.initialState);
|
|
2795
|
+
},
|
|
2796
|
+
setOptions: (d) => {
|
|
2797
|
+
const a = Q(d, i.options);
|
|
2798
|
+
i.options = l(a);
|
|
2799
|
+
},
|
|
2800
|
+
getState: () => i.options.state,
|
|
2801
|
+
setState: (d) => {
|
|
2802
|
+
i.options.onStateChange == null || i.options.onStateChange(d);
|
|
2803
|
+
},
|
|
2804
|
+
_getRowId: (d, a, p) => {
|
|
2805
|
+
var m;
|
|
2806
|
+
return (m = i.options.getRowId == null ? void 0 : i.options.getRowId(d, a, p)) != null ? m : `${p ? [p.id, a].join(".") : a}`;
|
|
2807
|
+
},
|
|
2808
|
+
getCoreRowModel: () => (i._getCoreRowModel || (i._getCoreRowModel = i.options.getCoreRowModel(i)), i._getCoreRowModel()),
|
|
2809
|
+
// The final calls start at the bottom of the model,
|
|
2810
|
+
// expanded rows, which then work their way up
|
|
2811
|
+
getRowModel: () => i.getPaginationRowModel(),
|
|
2812
|
+
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
2813
|
+
getRow: (d, a) => {
|
|
2814
|
+
let p = (a ? i.getPrePaginationRowModel() : i.getRowModel()).rowsById[d];
|
|
2815
|
+
if (!p && (p = i.getCoreRowModel().rowsById[d], !p))
|
|
2816
|
+
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
|
|
2817
|
+
return p;
|
|
2818
|
+
},
|
|
2819
|
+
_getDefaultColumnDef: v(() => [i.options.defaultColumn], (d) => {
|
|
2820
|
+
var a;
|
|
2821
|
+
return d = (a = d) != null ? a : {}, {
|
|
2822
|
+
header: (p) => {
|
|
2823
|
+
const m = p.header.column.columnDef;
|
|
2824
|
+
return m.accessorKey ? m.accessorKey : m.accessorFn ? m.id : null;
|
|
2825
|
+
},
|
|
2826
|
+
// footer: props => props.header.column.id,
|
|
2827
|
+
cell: (p) => {
|
|
2828
|
+
var m, w;
|
|
2829
|
+
return (m = (w = p.renderValue()) == null || w.toString == null ? void 0 : w.toString()) != null ? m : null;
|
|
2830
|
+
},
|
|
2831
|
+
...i._features.reduce((p, m) => Object.assign(p, m.getDefaultColumnDef == null ? void 0 : m.getDefaultColumnDef()), {}),
|
|
2832
|
+
...d
|
|
2833
|
+
};
|
|
2834
|
+
}, R(e, "debugColumns", "_getDefaultColumnDef")),
|
|
2835
|
+
_getColumnDefs: () => i.options.columns,
|
|
2836
|
+
getAllColumns: v(() => [i._getColumnDefs()], (d) => {
|
|
2837
|
+
const a = function(p, m, w) {
|
|
2838
|
+
return w === void 0 && (w = 0), p.map((h) => {
|
|
2839
|
+
const C = jn(i, h, w, m), S = h;
|
|
2840
|
+
return C.columns = S.columns ? a(S.columns, C, w + 1) : [], C;
|
|
2841
|
+
});
|
|
2842
|
+
};
|
|
2843
|
+
return a(d);
|
|
2844
|
+
}, R(e, "debugColumns", "getAllColumns")),
|
|
2845
|
+
getAllFlatColumns: v(() => [i.getAllColumns()], (d) => d.flatMap((a) => a.getFlatColumns()), R(e, "debugColumns", "getAllFlatColumns")),
|
|
2846
|
+
_getAllFlatColumnsById: v(() => [i.getAllFlatColumns()], (d) => d.reduce((a, p) => (a[p.id] = p, a), {}), R(e, "debugColumns", "getAllFlatColumnsById")),
|
|
2847
|
+
getAllLeafColumns: v(() => [i.getAllColumns(), i._getOrderColumnsFn()], (d, a) => {
|
|
2848
|
+
let p = d.flatMap((m) => m.getLeafColumns());
|
|
2849
|
+
return a(p);
|
|
2850
|
+
}, R(e, "debugColumns", "getAllLeafColumns")),
|
|
2851
|
+
getColumn: (d) => {
|
|
2852
|
+
const a = i._getAllFlatColumnsById()[d];
|
|
2853
|
+
return process.env.NODE_ENV !== "production" && !a && console.error(`[Table] Column with id '${d}' does not exist.`), a;
|
|
2854
|
+
}
|
|
2855
|
+
};
|
|
2856
|
+
Object.assign(i, f);
|
|
2857
|
+
for (let d = 0; d < i._features.length; d++) {
|
|
2858
|
+
const a = i._features[d];
|
|
2859
|
+
a == null || a.createTable == null || a.createTable(i);
|
|
2860
|
+
}
|
|
2861
|
+
return i;
|
|
2862
|
+
}
|
|
2863
|
+
function No() {
|
|
2864
|
+
return (e) => v(() => [e.options.data], (n) => {
|
|
2865
|
+
const t = {
|
|
2866
|
+
rows: [],
|
|
2867
|
+
flatRows: [],
|
|
2868
|
+
rowsById: {}
|
|
2869
|
+
}, o = function(i, r, l) {
|
|
2870
|
+
r === void 0 && (r = 0);
|
|
2871
|
+
const s = [];
|
|
2872
|
+
for (let g = 0; g < i.length; g++) {
|
|
2873
|
+
const c = Wn(e, e._getRowId(i[g], g, l), i[g], g, r, void 0, l?.id);
|
|
2874
|
+
if (t.flatRows.push(c), t.rowsById[c.id] = c, s.push(c), e.options.getSubRows) {
|
|
2875
|
+
var u;
|
|
2876
|
+
c.originalSubRows = e.options.getSubRows(i[g], g), (u = c.originalSubRows) != null && u.length && (c.subRows = o(c.originalSubRows, r + 1, c));
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
return s;
|
|
2880
|
+
};
|
|
2881
|
+
return t.rows = o(n), t;
|
|
2882
|
+
}, R(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
2883
|
+
}
|
|
2884
|
+
/**
|
|
2885
|
+
* vue-table
|
|
2886
|
+
*
|
|
2887
|
+
* Copyright (c) TanStack
|
|
2888
|
+
*
|
|
2889
|
+
* This source code is licensed under the MIT license found in the
|
|
2890
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
2891
|
+
*
|
|
2892
|
+
* @license MIT
|
|
2893
|
+
*/
|
|
2894
|
+
function Re() {
|
|
2895
|
+
return !0;
|
|
2896
|
+
}
|
|
2897
|
+
const Mo = Symbol("merge-proxy"), Vo = {
|
|
2898
|
+
get(e, n, t) {
|
|
2899
|
+
return n === Mo ? t : e.get(n);
|
|
2900
|
+
},
|
|
2901
|
+
has(e, n) {
|
|
2902
|
+
return e.has(n);
|
|
2903
|
+
},
|
|
2904
|
+
set: Re,
|
|
2905
|
+
deleteProperty: Re,
|
|
2906
|
+
getOwnPropertyDescriptor(e, n) {
|
|
2907
|
+
return {
|
|
2908
|
+
configurable: !0,
|
|
2909
|
+
enumerable: !0,
|
|
2910
|
+
get() {
|
|
2911
|
+
return e.get(n);
|
|
2912
|
+
},
|
|
2913
|
+
set: Re,
|
|
2914
|
+
deleteProperty: Re
|
|
2915
|
+
};
|
|
2916
|
+
},
|
|
2917
|
+
ownKeys(e) {
|
|
2918
|
+
return e.keys();
|
|
2919
|
+
}
|
|
2920
|
+
};
|
|
2921
|
+
function Te(e) {
|
|
2922
|
+
return "value" in e ? e.value : e;
|
|
2923
|
+
}
|
|
2924
|
+
function de() {
|
|
2925
|
+
for (var e = arguments.length, n = new Array(e), t = 0; t < e; t++)
|
|
2926
|
+
n[t] = arguments[t];
|
|
2927
|
+
return new Proxy({
|
|
2928
|
+
get(o) {
|
|
2929
|
+
for (let i = n.length - 1; i >= 0; i--) {
|
|
2930
|
+
const r = Te(n[i])[o];
|
|
2931
|
+
if (r !== void 0) return r;
|
|
2932
|
+
}
|
|
2933
|
+
},
|
|
2934
|
+
has(o) {
|
|
2935
|
+
for (let i = n.length - 1; i >= 0; i--)
|
|
2936
|
+
if (o in Te(n[i])) return !0;
|
|
2937
|
+
return !1;
|
|
2938
|
+
},
|
|
2939
|
+
keys() {
|
|
2940
|
+
const o = [];
|
|
2941
|
+
for (let i = 0; i < n.length; i++) o.push(...Object.keys(Te(n[i])));
|
|
2942
|
+
return [...Array.from(new Set(o))];
|
|
2943
|
+
}
|
|
2944
|
+
}, Vo);
|
|
2945
|
+
}
|
|
2946
|
+
const ko = kt({
|
|
2947
|
+
props: ["render", "props"],
|
|
2948
|
+
setup: (e) => () => typeof e.render == "function" || typeof e.render == "object" ? bt(e.render, e.props) : e.render
|
|
2949
|
+
});
|
|
2950
|
+
function wt(e) {
|
|
2951
|
+
return de(e, {
|
|
2952
|
+
data: Ct(e.data)
|
|
2953
|
+
});
|
|
2954
|
+
}
|
|
2955
|
+
function qo(e) {
|
|
2956
|
+
const n = qt(e.data), t = de({
|
|
2957
|
+
state: {},
|
|
2958
|
+
// Dummy state
|
|
2959
|
+
onStateChange: () => {
|
|
2960
|
+
},
|
|
2961
|
+
// noop
|
|
2962
|
+
renderFallbackValue: null,
|
|
2963
|
+
mergeOptions(r, l) {
|
|
2964
|
+
return n ? {
|
|
2965
|
+
...r,
|
|
2966
|
+
...l
|
|
2967
|
+
} : de(r, l);
|
|
2968
|
+
}
|
|
2969
|
+
}, n ? wt(e) : e), o = Po(t);
|
|
2970
|
+
if (n) {
|
|
2971
|
+
const r = St(e.data);
|
|
2972
|
+
xe(r, () => {
|
|
2973
|
+
o.setState((l) => ({
|
|
2974
|
+
...l,
|
|
2975
|
+
data: r.value
|
|
2976
|
+
}));
|
|
2977
|
+
}, {
|
|
2978
|
+
immediate: !0
|
|
2979
|
+
});
|
|
2980
|
+
}
|
|
2981
|
+
const i = le(o.initialState);
|
|
2982
|
+
return jt(() => {
|
|
2983
|
+
o.setOptions((r) => {
|
|
2984
|
+
var l;
|
|
2985
|
+
const s = new Proxy({}, {
|
|
2986
|
+
get: (u, g) => i.value[g]
|
|
2987
|
+
});
|
|
2988
|
+
return de(r, n ? wt(e) : e, {
|
|
2989
|
+
// merge the initialState and `options.state`
|
|
2990
|
+
// create a new proxy on each `setOptions` call
|
|
2991
|
+
// and get the value from state on each property access
|
|
2992
|
+
state: de(s, (l = e.state) != null ? l : {}),
|
|
2993
|
+
// Similarly, we'll maintain both our internal state and any user-provided
|
|
2994
|
+
// state.
|
|
2995
|
+
onStateChange: (u) => {
|
|
2996
|
+
u instanceof Function ? i.value = u(i.value) : i.value = u, e.onStateChange == null || e.onStateChange(u);
|
|
2997
|
+
}
|
|
2998
|
+
});
|
|
2999
|
+
});
|
|
3000
|
+
}), o;
|
|
3001
|
+
}
|
|
3002
|
+
export {
|
|
3003
|
+
ko as F,
|
|
3004
|
+
zo as a,
|
|
3005
|
+
qo as b,
|
|
3006
|
+
Bo as c,
|
|
3007
|
+
Eo as d,
|
|
3008
|
+
Tn as e,
|
|
3009
|
+
Lo as f,
|
|
3010
|
+
No as g,
|
|
3011
|
+
Ho as h,
|
|
3012
|
+
zn as i,
|
|
3013
|
+
Oo as j,
|
|
3014
|
+
Go as l,
|
|
3015
|
+
Io as o,
|
|
3016
|
+
Do as s,
|
|
3017
|
+
To as u
|
|
3018
|
+
};
|