@synnaxlabs/pluto 0.32.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Animated-C_WGrQwR.cjs → Animated-BGm8tACN.cjs} +1 -1
- package/dist/{Animated-NyYe8Svx.js → Animated-Cg0ftviS.js} +2 -2
- package/dist/{Item-CcXMlZIY.js → Item-B8JWj3fN.js} +5 -5
- package/dist/{Item-DGKnKb6c.cjs → Item-C89uBEra.cjs} +1 -1
- package/dist/{Keyboard-87LPq07J.cjs → Keyboard-B1757gtH.cjs} +1 -1
- package/dist/{Keyboard-i5fqTDMP.js → Keyboard-BAU1UuVp.js} +2 -2
- package/dist/{LinePlot-CCzgiKg5.js → LinePlot-CgkhTRJT.js} +3531 -3360
- package/dist/LinePlot-oIHuM9Jz.cjs +66 -0
- package/dist/Link-BGZki0c9.cjs +1 -0
- package/dist/Link-Du1lxpym.js +14 -0
- package/dist/{List-BjRQA8wb.js → List-KmtaD0qw.js} +2 -2
- package/dist/{List-B3WCj8GQ.cjs → List-e1hOSGSX.cjs} +1 -1
- package/dist/{Pack-BrxYNh7B.js → Pack-CxtceW7N.js} +1 -1
- package/dist/{Pack-C_SrDA3a.cjs → Pack-uflj5a28.cjs} +1 -1
- package/dist/{Text-MNWCdS6X.js → Text-D1VocrR6.js} +5 -5
- package/dist/{Text-XcCNQVZj.cjs → Text-DWBEhfiF.cjs} +1 -1
- package/dist/{Toggle-C1k6Tnpo.js → Toggle-B96EPQ2x.js} +14463 -14342
- package/dist/Toggle-C5E2dVg4.cjs +143 -0
- package/dist/{Video-DR3tjTFZ.cjs → Video-DKosAU7v.cjs} +1 -1
- package/dist/{Video-DdIv_1Yq.js → Video-o34bcpwh.js} +1 -1
- package/dist/{aggregator-f5OfPmNc.js → aggregator-B36SA-20.js} +5061 -4512
- package/dist/aggregator-CU9VgdUJ.cjs +67 -0
- package/dist/align.cjs +1 -1
- package/dist/align.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/css-4MXuPP5v.cjs +1 -0
- package/dist/css-C8qHWSpT.js +1085 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +53 -51
- package/dist/{external-DLa89w3J.cjs → external-BHkFTefx.cjs} +1 -1
- package/dist/{external-CSyZPKK4.cjs → external-BRdQZoOL.cjs} +1 -1
- package/dist/external-BSHY-kgQ.cjs +1 -0
- package/dist/{external-CIvyZ-Hc.js → external-BSqwgq7l.js} +2 -2
- package/dist/external-BdZ8kC55.cjs +1 -0
- package/dist/{external-CDGv7k3p.js → external-BpIfVU6K.js} +12 -12
- package/dist/{external-DAQPXD3z.cjs → external-C-PNFpoV.cjs} +1 -1
- package/dist/{external-DmJZ_zIB.js → external-C2PoeTKJ.js} +2 -2
- package/dist/{external-Cl_evqYY.cjs → external-CPTY4-IY.cjs} +1 -1
- package/dist/{external-n_t7VfzS.js → external-Cc1Bqjmm.js} +1 -1
- package/dist/{external-FeE2ijEU.js → external-Ckdd7teZ.js} +14 -14
- package/dist/{external-BryXmBqR.js → external-CvTy-Tj3.js} +4 -4
- package/dist/external-CxatFj2t.js +1191 -0
- package/dist/{external-DfIxCAg2.js → external-CzrKYxlg.js} +2 -2
- package/dist/{external-DE4i3A2z.cjs → external-DDwIRENP.cjs} +1 -1
- package/dist/{external-BI9DOL9G.js → external-DWm3_4ZA.js} +28 -28
- package/dist/{external-CNrnZ1L5.js → external-DZhjjzue.js} +73 -73
- package/dist/{external-CmbBTupJ.js → external-Dk66psus.js} +20 -20
- package/dist/{external-i13duWIn.cjs → external-GtPAaR7c.cjs} +1 -1
- package/dist/external-Icf6LMl2.cjs +1 -0
- package/dist/{external-C2Ri5xWS.cjs → external-LyF1vgNR.cjs} +1 -1
- package/dist/{external-BUjAebk2.cjs → external-T318T5Xe.cjs} +1 -1
- package/dist/{external-CbjdO9a0.js → external-uvD747pL.js} +31 -31
- package/dist/{external-DjE3je-g.cjs → external-w5-jxIYn.cjs} +1 -1
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2261 -2166
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/src/aether/main.d.ts +1 -0
- package/dist/src/aether/main.d.ts.map +1 -1
- package/dist/src/button/Button.d.ts +8 -2
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/button/Link.d.ts +2 -1
- package/dist/src/button/Link.d.ts.map +1 -1
- package/dist/src/button/Toggle.d.ts +1 -1
- package/dist/src/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/src/form/Form.d.ts +2 -2
- package/dist/src/form/Form.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Numeric.d.ts.map +1 -1
- package/dist/src/input/types.d.ts +1 -1
- package/dist/src/input/types.d.ts.map +1 -1
- package/dist/src/memo/proxyMemo.d.ts +1 -1
- package/dist/src/memo/proxyMemo.d.ts.map +1 -1
- package/dist/src/modal/Modal.d.ts.map +1 -1
- package/dist/src/override/factory.d.ts +3 -0
- package/dist/src/override/factory.d.ts.map +1 -0
- package/dist/src/override/index.d.ts +2 -0
- package/dist/src/override/index.d.ts.map +1 -0
- package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
- package/dist/src/select/Button.d.ts +1 -1
- package/dist/src/select/Button.d.ts.map +1 -1
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/select/Single.d.ts.map +1 -1
- package/dist/src/status/Aggregator.d.ts +2 -6
- package/dist/src/status/Aggregator.d.ts.map +1 -1
- package/dist/src/status/Circle.d.ts.map +1 -1
- package/dist/src/status/aether/aggregator.d.ts.map +1 -1
- package/dist/src/status/aether/types.d.ts.map +1 -1
- package/dist/src/tabs/Tabs.d.ts +8 -8
- package/dist/src/tabs/Tabs.d.ts.map +1 -1
- package/dist/src/telem/aether/convertSeries.d.ts +2 -2
- package/dist/src/telem/aether/convertSeries.d.ts.map +1 -1
- package/dist/src/telem/aether/noop.d.ts +2 -1
- package/dist/src/telem/aether/noop.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/static.d.ts +2 -2
- package/dist/src/telem/client/cache/cache.d.ts +1 -1
- package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
- package/dist/src/telem/client/cache/dynamic.d.ts +3 -3
- package/dist/src/telem/client/cache/dynamic.d.ts.map +1 -1
- package/dist/src/telem/client/cache/static.d.ts +1 -1
- package/dist/src/telem/client/cache/static.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
- package/dist/src/theming/Provider.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts +5846 -3
- package/dist/src/theming/aether/provider.d.ts.map +1 -1
- package/dist/src/theming/core/fontString.d.ts +1 -1
- package/dist/src/theming/core/fontString.d.ts.map +1 -1
- package/dist/src/theming/core/theme.d.ts +9 -0
- package/dist/src/theming/core/theme.d.ts.map +1 -1
- package/dist/src/theming/css.d.ts.map +1 -1
- package/dist/src/triggers/hooks.d.ts +2 -1
- package/dist/src/triggers/hooks.d.ts.map +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts +0 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/draw2d/index.d.ts +2 -1
- package/dist/src/vis/draw2d/index.d.ts.map +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +3 -1
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
- package/dist/src/vis/log/Log.d.ts +12 -0
- package/dist/src/vis/log/Log.d.ts.map +1 -0
- package/dist/src/vis/log/aether/Log.d.ts +556 -0
- package/dist/src/vis/log/aether/Log.d.ts.map +1 -0
- package/dist/src/vis/log/aether/index.d.ts +2 -0
- package/dist/src/vis/log/aether/index.d.ts.map +1 -0
- package/dist/src/vis/log/index.d.ts +2 -0
- package/dist/src/vis/log/index.d.ts.map +1 -0
- package/dist/src/vis/render/context.d.ts +3 -1
- package/dist/src/vis/render/context.d.ts.map +1 -1
- package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts +2 -2
- package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
- package/dist/src/vis/schematic/registry.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts +1 -0
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/{units-CnA_yWxx.js → units-CmWU_YzJ.js} +1 -1
- package/dist/{units-CMXTKjnN.cjs → units-DbfWaeE2.cjs} +1 -1
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +20 -22
- package/dist/LinePlot-BcVyfdeK.cjs +0 -66
- package/dist/Link-B83uKMKM.cjs +0 -1
- package/dist/Link-DlC5z0Wm.js +0 -10
- package/dist/Toggle-CIXrEiVA.cjs +0 -143
- package/dist/aggregator-q0CY7-QS.cjs +0 -67
- package/dist/css-B8RwzK24.js +0 -1042
- package/dist/css-LxkguM_s.cjs +0 -1
- package/dist/external-CDChKvhl.cjs +0 -1
- package/dist/external-CN-OhewX.cjs +0 -1
- package/dist/external-cIvhYaqB.cjs +0 -1
- package/dist/external-kSaQF2Vi.js +0 -1169
|
@@ -0,0 +1,1191 @@
|
|
|
1
|
+
import { a1 as fe, au as Pe, ak as ke, ab as ve, av as Te, a5 as Ce, l as Fe, aa as Ne, aw as $e, ax as je, a6 as De, ay as Ke, az as Ye, aA as We, aB as ze, aC as He, ac as Be, aD as Ve, aE as Ue, a0 as Ge, aF as Je, aG as Qe, aH as Xe } from "./Toggle-B96EPQ2x.js";
|
|
2
|
+
import { j as Ze } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
+
import { useCallback as qe } from "react";
|
|
4
|
+
import { w as et, k as tt } from "./aggregator-B36SA-20.js";
|
|
5
|
+
import "./css-C8qHWSpT.js";
|
|
6
|
+
import "./Pack-CxtceW7N.js";
|
|
7
|
+
import { L as st } from "./List-KmtaD0qw.js";
|
|
8
|
+
const de = Symbol(), q = Symbol(), v = "a", N = "w";
|
|
9
|
+
let rt = (t, e) => new Proxy(t, e);
|
|
10
|
+
const H = Object.getPrototypeOf, ne = /* @__PURE__ */ new WeakMap(), ee = (t) => t && (ne.has(t) ? ne.get(t) : H(t) === Object.prototype || H(t) === Array.prototype), ie = (t) => typeof t == "object" && t !== null, ce = /* @__PURE__ */ new WeakMap(), ge = (t) => t[q] || t, pe = (t, e, s) => {
|
|
11
|
+
if (!ee(t)) return t;
|
|
12
|
+
const r = ge(t), i = ((c) => Object.isFrozen(c) || Object.values(Object.getOwnPropertyDescriptors(c)).some((o) => !o.writable))(r);
|
|
13
|
+
let n = s && s.get(r);
|
|
14
|
+
return n && n[1].f === i || (n = ((c, o) => {
|
|
15
|
+
const a = { f: o };
|
|
16
|
+
let h = !1;
|
|
17
|
+
const l = (f, g) => {
|
|
18
|
+
if (!h) {
|
|
19
|
+
let p = a[v].get(c);
|
|
20
|
+
if (p || (p = {}, a[v].set(c, p)), f === N) p[N] = !0;
|
|
21
|
+
else {
|
|
22
|
+
let m = p[f];
|
|
23
|
+
m || (m = /* @__PURE__ */ new Set(), p[f] = m), m.add(g);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, u = { get: (f, g) => g === q ? c : (l("k", g), pe(Reflect.get(f, g), a[v], a.c)), has: (f, g) => g === de ? (h = !0, a[v].delete(c), !0) : (l("h", g), Reflect.has(f, g)), getOwnPropertyDescriptor: (f, g) => (l("o", g), Reflect.getOwnPropertyDescriptor(f, g)), ownKeys: (f) => (l(N), Reflect.ownKeys(f)) };
|
|
27
|
+
return o && (u.set = u.deleteProperty = () => !1), [u, a];
|
|
28
|
+
})(r, i), n[1].p = rt(i ? ((c) => {
|
|
29
|
+
let o = ce.get(c);
|
|
30
|
+
if (!o) {
|
|
31
|
+
if (Array.isArray(c)) o = Array.from(c);
|
|
32
|
+
else {
|
|
33
|
+
const a = Object.getOwnPropertyDescriptors(c);
|
|
34
|
+
Object.values(a).forEach((h) => {
|
|
35
|
+
h.configurable = !0;
|
|
36
|
+
}), o = Object.create(H(c), a);
|
|
37
|
+
}
|
|
38
|
+
ce.set(c, o);
|
|
39
|
+
}
|
|
40
|
+
return o;
|
|
41
|
+
})(r) : r, n[0]), s && s.set(r, n)), n[1][v] = e, n[1].c = s, n[1].p;
|
|
42
|
+
}, me = (t, e, s, r) => {
|
|
43
|
+
if (Object.is(t, e)) return !1;
|
|
44
|
+
if (!ie(t) || !ie(e)) return !0;
|
|
45
|
+
const i = s.get(ge(t));
|
|
46
|
+
if (!i) return !0;
|
|
47
|
+
if (r) {
|
|
48
|
+
const c = r.get(t);
|
|
49
|
+
if (c && c.n === e) return c.g;
|
|
50
|
+
r.set(t, { n: e, g: !1 });
|
|
51
|
+
}
|
|
52
|
+
let n = null;
|
|
53
|
+
try {
|
|
54
|
+
for (const c of i.h || []) if (n = Reflect.has(t, c) !== Reflect.has(e, c), n) return n;
|
|
55
|
+
if (i[N] === !0) {
|
|
56
|
+
if (n = ((c, o) => {
|
|
57
|
+
const a = Reflect.ownKeys(c), h = Reflect.ownKeys(o);
|
|
58
|
+
return a.length !== h.length || a.some((l, u) => l !== h[u]);
|
|
59
|
+
})(t, e), n) return n;
|
|
60
|
+
} else for (const c of i.o || []) if (n = !!Reflect.getOwnPropertyDescriptor(t, c) != !!Reflect.getOwnPropertyDescriptor(e, c), n) return n;
|
|
61
|
+
for (const c of i.k || []) if (n = me(t[c], e[c], s, r), n) return n;
|
|
62
|
+
return n === null && (n = !0), n;
|
|
63
|
+
} finally {
|
|
64
|
+
r && r.set(t, { n: e, g: n });
|
|
65
|
+
}
|
|
66
|
+
}, nt = (t) => !!ee(t) && de in t, ye = (t) => ee(t) && t[q] || null, it = "h", ct = "w", ot = "o", at = "k", B = (t) => typeof t == "object" && t !== null, Me = (t, e) => {
|
|
67
|
+
if (!B(t)) return t;
|
|
68
|
+
const s = ye(t);
|
|
69
|
+
return s !== null ? (nt(t), s) : (e.has(t) || (e.add(t), Object.entries(t).forEach(([r, i]) => {
|
|
70
|
+
const n = Me(i, e);
|
|
71
|
+
Object.is(n, i) || (t[r] = n);
|
|
72
|
+
})), t);
|
|
73
|
+
}, V = (t, e, s) => {
|
|
74
|
+
var r, i, n;
|
|
75
|
+
if (!B(t) || !B(e)) return;
|
|
76
|
+
const c = s.get(ye(e) || e);
|
|
77
|
+
c && ((r = c[it]) == null || r.forEach((o) => {
|
|
78
|
+
Reflect.has(t, o);
|
|
79
|
+
}), c[ct] === !0 && Reflect.ownKeys(t), (i = c[ot]) == null || i.forEach((o) => {
|
|
80
|
+
Reflect.getOwnPropertyDescriptor(t, o);
|
|
81
|
+
}), (n = c[at]) == null || n.forEach((o) => {
|
|
82
|
+
V(t[o], e[o], s);
|
|
83
|
+
}));
|
|
84
|
+
}, K = "o", Y = "r", W = "a";
|
|
85
|
+
function lt(t, e) {
|
|
86
|
+
var s;
|
|
87
|
+
let r = 0;
|
|
88
|
+
const i = (s = e == null ? void 0 : e.size) != null ? s : 1, n = [], c = e != null && e.noWeakMap ? null : /* @__PURE__ */ new WeakMap();
|
|
89
|
+
return (a) => {
|
|
90
|
+
const h = c == null ? void 0 : c.get(a);
|
|
91
|
+
if (h)
|
|
92
|
+
return h[Y];
|
|
93
|
+
for (let p = 0; p < i; p += 1) {
|
|
94
|
+
const m = n[(r + p) % i];
|
|
95
|
+
if (!m) break;
|
|
96
|
+
if (!me(m[K], a, m[W], /* @__PURE__ */ new WeakMap()))
|
|
97
|
+
return V(a, m[K], m[W]), c == null || c.set(a, m), m[Y];
|
|
98
|
+
}
|
|
99
|
+
const l = /* @__PURE__ */ new WeakMap(), u = pe(a, l), f = Me(t(u), /* @__PURE__ */ new Set());
|
|
100
|
+
V(a, a, l);
|
|
101
|
+
const g = {
|
|
102
|
+
[K]: a,
|
|
103
|
+
[Y]: f,
|
|
104
|
+
[W]: l
|
|
105
|
+
};
|
|
106
|
+
return r = (r - 1 + i) % i, n[r] = g, c == null || c.set(a, g), f;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
const ht = (t, e) => et.RUNTIME === "browser" ? lt(t, e) : t;
|
|
110
|
+
function x(t) {
|
|
111
|
+
return Array.isArray ? Array.isArray(t) : Se(t) === "[object Array]";
|
|
112
|
+
}
|
|
113
|
+
const ut = 1 / 0;
|
|
114
|
+
function ft(t) {
|
|
115
|
+
if (typeof t == "string")
|
|
116
|
+
return t;
|
|
117
|
+
let e = t + "";
|
|
118
|
+
return e == "0" && 1 / t == -ut ? "-0" : e;
|
|
119
|
+
}
|
|
120
|
+
function dt(t) {
|
|
121
|
+
return t == null ? "" : ft(t);
|
|
122
|
+
}
|
|
123
|
+
function _(t) {
|
|
124
|
+
return typeof t == "string";
|
|
125
|
+
}
|
|
126
|
+
function Ee(t) {
|
|
127
|
+
return typeof t == "number";
|
|
128
|
+
}
|
|
129
|
+
function gt(t) {
|
|
130
|
+
return t === !0 || t === !1 || pt(t) && Se(t) == "[object Boolean]";
|
|
131
|
+
}
|
|
132
|
+
function _e(t) {
|
|
133
|
+
return typeof t == "object";
|
|
134
|
+
}
|
|
135
|
+
function pt(t) {
|
|
136
|
+
return _e(t) && t !== null;
|
|
137
|
+
}
|
|
138
|
+
function y(t) {
|
|
139
|
+
return t != null;
|
|
140
|
+
}
|
|
141
|
+
function z(t) {
|
|
142
|
+
return !t.trim().length;
|
|
143
|
+
}
|
|
144
|
+
function Se(t) {
|
|
145
|
+
return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
|
|
146
|
+
}
|
|
147
|
+
const mt = "Incorrect 'index' type", yt = (t) => `Invalid value for key ${t}`, Mt = (t) => `Pattern length exceeds max of ${t}.`, Et = (t) => `Missing ${t} property in key`, _t = (t) => `Property 'weight' in key '${t}' must be a positive integer`, oe = Object.prototype.hasOwnProperty;
|
|
148
|
+
class St {
|
|
149
|
+
constructor(e) {
|
|
150
|
+
this._keys = [], this._keyMap = {};
|
|
151
|
+
let s = 0;
|
|
152
|
+
e.forEach((r) => {
|
|
153
|
+
let i = xe(r);
|
|
154
|
+
this._keys.push(i), this._keyMap[i.id] = i, s += i.weight;
|
|
155
|
+
}), this._keys.forEach((r) => {
|
|
156
|
+
r.weight /= s;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
get(e) {
|
|
160
|
+
return this._keyMap[e];
|
|
161
|
+
}
|
|
162
|
+
keys() {
|
|
163
|
+
return this._keys;
|
|
164
|
+
}
|
|
165
|
+
toJSON() {
|
|
166
|
+
return JSON.stringify(this._keys);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function xe(t) {
|
|
170
|
+
let e = null, s = null, r = null, i = 1, n = null;
|
|
171
|
+
if (_(t) || x(t))
|
|
172
|
+
r = t, e = ae(t), s = U(t);
|
|
173
|
+
else {
|
|
174
|
+
if (!oe.call(t, "name"))
|
|
175
|
+
throw new Error(Et("name"));
|
|
176
|
+
const c = t.name;
|
|
177
|
+
if (r = c, oe.call(t, "weight") && (i = t.weight, i <= 0))
|
|
178
|
+
throw new Error(_t(c));
|
|
179
|
+
e = ae(c), s = U(c), n = t.getFn;
|
|
180
|
+
}
|
|
181
|
+
return { path: e, id: s, weight: i, src: r, getFn: n };
|
|
182
|
+
}
|
|
183
|
+
function ae(t) {
|
|
184
|
+
return x(t) ? t : t.split(".");
|
|
185
|
+
}
|
|
186
|
+
function U(t) {
|
|
187
|
+
return x(t) ? t.join(".") : t;
|
|
188
|
+
}
|
|
189
|
+
function xt(t, e) {
|
|
190
|
+
let s = [], r = !1;
|
|
191
|
+
const i = (n, c, o) => {
|
|
192
|
+
if (y(n))
|
|
193
|
+
if (!c[o])
|
|
194
|
+
s.push(n);
|
|
195
|
+
else {
|
|
196
|
+
let a = c[o];
|
|
197
|
+
const h = n[a];
|
|
198
|
+
if (!y(h))
|
|
199
|
+
return;
|
|
200
|
+
if (o === c.length - 1 && (_(h) || Ee(h) || gt(h)))
|
|
201
|
+
s.push(dt(h));
|
|
202
|
+
else if (x(h)) {
|
|
203
|
+
r = !0;
|
|
204
|
+
for (let l = 0, u = h.length; l < u; l += 1)
|
|
205
|
+
i(h[l], c, o + 1);
|
|
206
|
+
} else c.length && i(h, c, o + 1);
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
return i(t, _(e) ? e.split(".") : e, 0), r ? s : s[0];
|
|
210
|
+
}
|
|
211
|
+
const Rt = {
|
|
212
|
+
// Whether the matches should be included in the result set. When `true`, each record in the result
|
|
213
|
+
// set will include the indices of the matched characters.
|
|
214
|
+
// These can consequently be used for highlighting purposes.
|
|
215
|
+
includeMatches: !1,
|
|
216
|
+
// When `true`, the matching function will continue to the end of a search pattern even if
|
|
217
|
+
// a perfect match has already been located in the string.
|
|
218
|
+
findAllMatches: !1,
|
|
219
|
+
// Minimum number of characters that must be matched before a result is considered a match
|
|
220
|
+
minMatchCharLength: 1
|
|
221
|
+
}, wt = {
|
|
222
|
+
// When `true`, the algorithm continues searching to the end of the input even if a perfect
|
|
223
|
+
// match is found before the end of the same input.
|
|
224
|
+
isCaseSensitive: !1,
|
|
225
|
+
// When true, the matching function will continue to the end of a search pattern even if
|
|
226
|
+
includeScore: !1,
|
|
227
|
+
// List of properties that will be searched. This also supports nested properties.
|
|
228
|
+
keys: [],
|
|
229
|
+
// Whether to sort the result list, by score
|
|
230
|
+
shouldSort: !0,
|
|
231
|
+
// Default sort function: sort by ascending score, ascending index
|
|
232
|
+
sortFn: (t, e) => t.score === e.score ? t.idx < e.idx ? -1 : 1 : t.score < e.score ? -1 : 1
|
|
233
|
+
}, Ot = {
|
|
234
|
+
// Approximately where in the text is the pattern expected to be found?
|
|
235
|
+
location: 0,
|
|
236
|
+
// At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match
|
|
237
|
+
// (of both letters and location), a threshold of '1.0' would match anything.
|
|
238
|
+
threshold: 0.6,
|
|
239
|
+
// Determines how close the match must be to the fuzzy location (specified above).
|
|
240
|
+
// An exact letter match which is 'distance' characters away from the fuzzy location
|
|
241
|
+
// would score as a complete mismatch. A distance of '0' requires the match be at
|
|
242
|
+
// the exact location specified, a threshold of '1000' would require a perfect match
|
|
243
|
+
// to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
|
|
244
|
+
distance: 100
|
|
245
|
+
}, At = {
|
|
246
|
+
// When `true`, it enables the use of unix-like search commands
|
|
247
|
+
useExtendedSearch: !1,
|
|
248
|
+
// The get function to use when fetching an object's properties.
|
|
249
|
+
// The default will search nested paths *ie foo.bar.baz*
|
|
250
|
+
getFn: xt,
|
|
251
|
+
// When `true`, search will ignore `location` and `distance`, so it won't matter
|
|
252
|
+
// where in the string the pattern appears.
|
|
253
|
+
// More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score
|
|
254
|
+
ignoreLocation: !1,
|
|
255
|
+
// When `true`, the calculation for the relevance score (used for sorting) will
|
|
256
|
+
// ignore the field-length norm.
|
|
257
|
+
// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
|
|
258
|
+
ignoreFieldNorm: !1,
|
|
259
|
+
// The weight to determine how much field length norm effects scoring.
|
|
260
|
+
fieldNormWeight: 1
|
|
261
|
+
};
|
|
262
|
+
var d = {
|
|
263
|
+
...wt,
|
|
264
|
+
...Rt,
|
|
265
|
+
...Ot,
|
|
266
|
+
...At
|
|
267
|
+
};
|
|
268
|
+
const It = /[^ ]+/g;
|
|
269
|
+
function bt(t = 1, e = 3) {
|
|
270
|
+
const s = /* @__PURE__ */ new Map(), r = Math.pow(10, e);
|
|
271
|
+
return {
|
|
272
|
+
get(i) {
|
|
273
|
+
const n = i.match(It).length;
|
|
274
|
+
if (s.has(n))
|
|
275
|
+
return s.get(n);
|
|
276
|
+
const c = 1 / Math.pow(n, 0.5 * t), o = parseFloat(Math.round(c * r) / r);
|
|
277
|
+
return s.set(n, o), o;
|
|
278
|
+
},
|
|
279
|
+
clear() {
|
|
280
|
+
s.clear();
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
class te {
|
|
285
|
+
constructor({
|
|
286
|
+
getFn: e = d.getFn,
|
|
287
|
+
fieldNormWeight: s = d.fieldNormWeight
|
|
288
|
+
} = {}) {
|
|
289
|
+
this.norm = bt(s, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
|
|
290
|
+
}
|
|
291
|
+
setSources(e = []) {
|
|
292
|
+
this.docs = e;
|
|
293
|
+
}
|
|
294
|
+
setIndexRecords(e = []) {
|
|
295
|
+
this.records = e;
|
|
296
|
+
}
|
|
297
|
+
setKeys(e = []) {
|
|
298
|
+
this.keys = e, this._keysMap = {}, e.forEach((s, r) => {
|
|
299
|
+
this._keysMap[s.id] = r;
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
create() {
|
|
303
|
+
this.isCreated || !this.docs.length || (this.isCreated = !0, _(this.docs[0]) ? this.docs.forEach((e, s) => {
|
|
304
|
+
this._addString(e, s);
|
|
305
|
+
}) : this.docs.forEach((e, s) => {
|
|
306
|
+
this._addObject(e, s);
|
|
307
|
+
}), this.norm.clear());
|
|
308
|
+
}
|
|
309
|
+
// Adds a doc to the end of the index
|
|
310
|
+
add(e) {
|
|
311
|
+
const s = this.size();
|
|
312
|
+
_(e) ? this._addString(e, s) : this._addObject(e, s);
|
|
313
|
+
}
|
|
314
|
+
// Removes the doc at the specified index of the index
|
|
315
|
+
removeAt(e) {
|
|
316
|
+
this.records.splice(e, 1);
|
|
317
|
+
for (let s = e, r = this.size(); s < r; s += 1)
|
|
318
|
+
this.records[s].i -= 1;
|
|
319
|
+
}
|
|
320
|
+
getValueForItemAtKeyId(e, s) {
|
|
321
|
+
return e[this._keysMap[s]];
|
|
322
|
+
}
|
|
323
|
+
size() {
|
|
324
|
+
return this.records.length;
|
|
325
|
+
}
|
|
326
|
+
_addString(e, s) {
|
|
327
|
+
if (!y(e) || z(e))
|
|
328
|
+
return;
|
|
329
|
+
let r = {
|
|
330
|
+
v: e,
|
|
331
|
+
i: s,
|
|
332
|
+
n: this.norm.get(e)
|
|
333
|
+
};
|
|
334
|
+
this.records.push(r);
|
|
335
|
+
}
|
|
336
|
+
_addObject(e, s) {
|
|
337
|
+
let r = { i: s, $: {} };
|
|
338
|
+
this.keys.forEach((i, n) => {
|
|
339
|
+
let c = i.getFn ? i.getFn(e) : this.getFn(e, i.path);
|
|
340
|
+
if (y(c)) {
|
|
341
|
+
if (x(c)) {
|
|
342
|
+
let o = [];
|
|
343
|
+
const a = [{ nestedArrIndex: -1, value: c }];
|
|
344
|
+
for (; a.length; ) {
|
|
345
|
+
const { nestedArrIndex: h, value: l } = a.pop();
|
|
346
|
+
if (y(l))
|
|
347
|
+
if (_(l) && !z(l)) {
|
|
348
|
+
let u = {
|
|
349
|
+
v: l,
|
|
350
|
+
i: h,
|
|
351
|
+
n: this.norm.get(l)
|
|
352
|
+
};
|
|
353
|
+
o.push(u);
|
|
354
|
+
} else x(l) && l.forEach((u, f) => {
|
|
355
|
+
a.push({
|
|
356
|
+
nestedArrIndex: f,
|
|
357
|
+
value: u
|
|
358
|
+
});
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
r.$[n] = o;
|
|
362
|
+
} else if (_(c) && !z(c)) {
|
|
363
|
+
let o = {
|
|
364
|
+
v: c,
|
|
365
|
+
n: this.norm.get(c)
|
|
366
|
+
};
|
|
367
|
+
r.$[n] = o;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}), this.records.push(r);
|
|
371
|
+
}
|
|
372
|
+
toJSON() {
|
|
373
|
+
return {
|
|
374
|
+
keys: this.keys,
|
|
375
|
+
records: this.records
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
function Re(t, e, { getFn: s = d.getFn, fieldNormWeight: r = d.fieldNormWeight } = {}) {
|
|
380
|
+
const i = new te({ getFn: s, fieldNormWeight: r });
|
|
381
|
+
return i.setKeys(t.map(xe)), i.setSources(e), i.create(), i;
|
|
382
|
+
}
|
|
383
|
+
function Lt(t, { getFn: e = d.getFn, fieldNormWeight: s = d.fieldNormWeight } = {}) {
|
|
384
|
+
const { keys: r, records: i } = t, n = new te({ getFn: e, fieldNormWeight: s });
|
|
385
|
+
return n.setKeys(r), n.setIndexRecords(i), n;
|
|
386
|
+
}
|
|
387
|
+
function F(t, {
|
|
388
|
+
errors: e = 0,
|
|
389
|
+
currentLocation: s = 0,
|
|
390
|
+
expectedLocation: r = 0,
|
|
391
|
+
distance: i = d.distance,
|
|
392
|
+
ignoreLocation: n = d.ignoreLocation
|
|
393
|
+
} = {}) {
|
|
394
|
+
const c = e / t.length;
|
|
395
|
+
if (n)
|
|
396
|
+
return c;
|
|
397
|
+
const o = Math.abs(r - s);
|
|
398
|
+
return i ? c + o / i : o ? 1 : c;
|
|
399
|
+
}
|
|
400
|
+
function Pt(t = [], e = d.minMatchCharLength) {
|
|
401
|
+
let s = [], r = -1, i = -1, n = 0;
|
|
402
|
+
for (let c = t.length; n < c; n += 1) {
|
|
403
|
+
let o = t[n];
|
|
404
|
+
o && r === -1 ? r = n : !o && r !== -1 && (i = n - 1, i - r + 1 >= e && s.push([r, i]), r = -1);
|
|
405
|
+
}
|
|
406
|
+
return t[n - 1] && n - r >= e && s.push([r, n - 1]), s;
|
|
407
|
+
}
|
|
408
|
+
const b = 32;
|
|
409
|
+
function kt(t, e, s, {
|
|
410
|
+
location: r = d.location,
|
|
411
|
+
distance: i = d.distance,
|
|
412
|
+
threshold: n = d.threshold,
|
|
413
|
+
findAllMatches: c = d.findAllMatches,
|
|
414
|
+
minMatchCharLength: o = d.minMatchCharLength,
|
|
415
|
+
includeMatches: a = d.includeMatches,
|
|
416
|
+
ignoreLocation: h = d.ignoreLocation
|
|
417
|
+
} = {}) {
|
|
418
|
+
if (e.length > b)
|
|
419
|
+
throw new Error(Mt(b));
|
|
420
|
+
const l = e.length, u = t.length, f = Math.max(0, Math.min(r, u));
|
|
421
|
+
let g = n, p = f;
|
|
422
|
+
const m = o > 1 || a, A = m ? Array(u) : [];
|
|
423
|
+
let S;
|
|
424
|
+
for (; (S = t.indexOf(e, p)) > -1; ) {
|
|
425
|
+
let M = F(e, {
|
|
426
|
+
currentLocation: S,
|
|
427
|
+
expectedLocation: f,
|
|
428
|
+
distance: i,
|
|
429
|
+
ignoreLocation: h
|
|
430
|
+
});
|
|
431
|
+
if (g = Math.min(M, g), p = S + l, m) {
|
|
432
|
+
let R = 0;
|
|
433
|
+
for (; R < l; )
|
|
434
|
+
A[S + R] = 1, R += 1;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
p = -1;
|
|
438
|
+
let L = [], I = 1, T = l + u;
|
|
439
|
+
const Le = 1 << l - 1;
|
|
440
|
+
for (let M = 0; M < l; M += 1) {
|
|
441
|
+
let R = 0, w = T;
|
|
442
|
+
for (; R < w; )
|
|
443
|
+
F(e, {
|
|
444
|
+
errors: M,
|
|
445
|
+
currentLocation: f + w,
|
|
446
|
+
expectedLocation: f,
|
|
447
|
+
distance: i,
|
|
448
|
+
ignoreLocation: h
|
|
449
|
+
}) <= g ? R = w : T = w, w = Math.floor((T - R) / 2 + R);
|
|
450
|
+
T = w;
|
|
451
|
+
let se = Math.max(1, f - w + 1), D = c ? u : Math.min(f + w, u) + l, P = Array(D + 2);
|
|
452
|
+
P[D + 1] = (1 << M) - 1;
|
|
453
|
+
for (let E = D; E >= se; E -= 1) {
|
|
454
|
+
let C = E - 1, re = s[t.charAt(C)];
|
|
455
|
+
if (m && (A[C] = +!!re), P[E] = (P[E + 1] << 1 | 1) & re, M && (P[E] |= (L[E + 1] | L[E]) << 1 | 1 | L[E + 1]), P[E] & Le && (I = F(e, {
|
|
456
|
+
errors: M,
|
|
457
|
+
currentLocation: C,
|
|
458
|
+
expectedLocation: f,
|
|
459
|
+
distance: i,
|
|
460
|
+
ignoreLocation: h
|
|
461
|
+
}), I <= g)) {
|
|
462
|
+
if (g = I, p = C, p <= f)
|
|
463
|
+
break;
|
|
464
|
+
se = Math.max(1, 2 * f - p);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
if (F(e, {
|
|
468
|
+
errors: M + 1,
|
|
469
|
+
currentLocation: f,
|
|
470
|
+
expectedLocation: f,
|
|
471
|
+
distance: i,
|
|
472
|
+
ignoreLocation: h
|
|
473
|
+
}) > g)
|
|
474
|
+
break;
|
|
475
|
+
L = P;
|
|
476
|
+
}
|
|
477
|
+
const j = {
|
|
478
|
+
isMatch: p >= 0,
|
|
479
|
+
// Count exact matches (those with a score of 0) to be "almost" exact
|
|
480
|
+
score: Math.max(1e-3, I)
|
|
481
|
+
};
|
|
482
|
+
if (m) {
|
|
483
|
+
const M = Pt(A, o);
|
|
484
|
+
M.length ? a && (j.indices = M) : j.isMatch = !1;
|
|
485
|
+
}
|
|
486
|
+
return j;
|
|
487
|
+
}
|
|
488
|
+
function vt(t) {
|
|
489
|
+
let e = {};
|
|
490
|
+
for (let s = 0, r = t.length; s < r; s += 1) {
|
|
491
|
+
const i = t.charAt(s);
|
|
492
|
+
e[i] = (e[i] || 0) | 1 << r - s - 1;
|
|
493
|
+
}
|
|
494
|
+
return e;
|
|
495
|
+
}
|
|
496
|
+
class we {
|
|
497
|
+
constructor(e, {
|
|
498
|
+
location: s = d.location,
|
|
499
|
+
threshold: r = d.threshold,
|
|
500
|
+
distance: i = d.distance,
|
|
501
|
+
includeMatches: n = d.includeMatches,
|
|
502
|
+
findAllMatches: c = d.findAllMatches,
|
|
503
|
+
minMatchCharLength: o = d.minMatchCharLength,
|
|
504
|
+
isCaseSensitive: a = d.isCaseSensitive,
|
|
505
|
+
ignoreLocation: h = d.ignoreLocation
|
|
506
|
+
} = {}) {
|
|
507
|
+
if (this.options = {
|
|
508
|
+
location: s,
|
|
509
|
+
threshold: r,
|
|
510
|
+
distance: i,
|
|
511
|
+
includeMatches: n,
|
|
512
|
+
findAllMatches: c,
|
|
513
|
+
minMatchCharLength: o,
|
|
514
|
+
isCaseSensitive: a,
|
|
515
|
+
ignoreLocation: h
|
|
516
|
+
}, this.pattern = a ? e : e.toLowerCase(), this.chunks = [], !this.pattern.length)
|
|
517
|
+
return;
|
|
518
|
+
const l = (f, g) => {
|
|
519
|
+
this.chunks.push({
|
|
520
|
+
pattern: f,
|
|
521
|
+
alphabet: vt(f),
|
|
522
|
+
startIndex: g
|
|
523
|
+
});
|
|
524
|
+
}, u = this.pattern.length;
|
|
525
|
+
if (u > b) {
|
|
526
|
+
let f = 0;
|
|
527
|
+
const g = u % b, p = u - g;
|
|
528
|
+
for (; f < p; )
|
|
529
|
+
l(this.pattern.substr(f, b), f), f += b;
|
|
530
|
+
if (g) {
|
|
531
|
+
const m = u - b;
|
|
532
|
+
l(this.pattern.substr(m), m);
|
|
533
|
+
}
|
|
534
|
+
} else
|
|
535
|
+
l(this.pattern, 0);
|
|
536
|
+
}
|
|
537
|
+
searchIn(e) {
|
|
538
|
+
const { isCaseSensitive: s, includeMatches: r } = this.options;
|
|
539
|
+
if (s || (e = e.toLowerCase()), this.pattern === e) {
|
|
540
|
+
let p = {
|
|
541
|
+
isMatch: !0,
|
|
542
|
+
score: 0
|
|
543
|
+
};
|
|
544
|
+
return r && (p.indices = [[0, e.length - 1]]), p;
|
|
545
|
+
}
|
|
546
|
+
const {
|
|
547
|
+
location: i,
|
|
548
|
+
distance: n,
|
|
549
|
+
threshold: c,
|
|
550
|
+
findAllMatches: o,
|
|
551
|
+
minMatchCharLength: a,
|
|
552
|
+
ignoreLocation: h
|
|
553
|
+
} = this.options;
|
|
554
|
+
let l = [], u = 0, f = !1;
|
|
555
|
+
this.chunks.forEach(({ pattern: p, alphabet: m, startIndex: A }) => {
|
|
556
|
+
const { isMatch: S, score: L, indices: I } = kt(e, p, m, {
|
|
557
|
+
location: i + A,
|
|
558
|
+
distance: n,
|
|
559
|
+
threshold: c,
|
|
560
|
+
findAllMatches: o,
|
|
561
|
+
minMatchCharLength: a,
|
|
562
|
+
includeMatches: r,
|
|
563
|
+
ignoreLocation: h
|
|
564
|
+
});
|
|
565
|
+
S && (f = !0), u += L, S && I && (l = [...l, ...I]);
|
|
566
|
+
});
|
|
567
|
+
let g = {
|
|
568
|
+
isMatch: f,
|
|
569
|
+
score: f ? u / this.chunks.length : 1
|
|
570
|
+
};
|
|
571
|
+
return f && r && (g.indices = l), g;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
class O {
|
|
575
|
+
constructor(e) {
|
|
576
|
+
this.pattern = e;
|
|
577
|
+
}
|
|
578
|
+
static isMultiMatch(e) {
|
|
579
|
+
return le(e, this.multiRegex);
|
|
580
|
+
}
|
|
581
|
+
static isSingleMatch(e) {
|
|
582
|
+
return le(e, this.singleRegex);
|
|
583
|
+
}
|
|
584
|
+
search() {
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
function le(t, e) {
|
|
588
|
+
const s = t.match(e);
|
|
589
|
+
return s ? s[1] : null;
|
|
590
|
+
}
|
|
591
|
+
class Tt extends O {
|
|
592
|
+
constructor(e) {
|
|
593
|
+
super(e);
|
|
594
|
+
}
|
|
595
|
+
static get type() {
|
|
596
|
+
return "exact";
|
|
597
|
+
}
|
|
598
|
+
static get multiRegex() {
|
|
599
|
+
return /^="(.*)"$/;
|
|
600
|
+
}
|
|
601
|
+
static get singleRegex() {
|
|
602
|
+
return /^=(.*)$/;
|
|
603
|
+
}
|
|
604
|
+
search(e) {
|
|
605
|
+
const s = e === this.pattern;
|
|
606
|
+
return {
|
|
607
|
+
isMatch: s,
|
|
608
|
+
score: s ? 0 : 1,
|
|
609
|
+
indices: [0, this.pattern.length - 1]
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
class Ct extends O {
|
|
614
|
+
constructor(e) {
|
|
615
|
+
super(e);
|
|
616
|
+
}
|
|
617
|
+
static get type() {
|
|
618
|
+
return "inverse-exact";
|
|
619
|
+
}
|
|
620
|
+
static get multiRegex() {
|
|
621
|
+
return /^!"(.*)"$/;
|
|
622
|
+
}
|
|
623
|
+
static get singleRegex() {
|
|
624
|
+
return /^!(.*)$/;
|
|
625
|
+
}
|
|
626
|
+
search(e) {
|
|
627
|
+
const r = e.indexOf(this.pattern) === -1;
|
|
628
|
+
return {
|
|
629
|
+
isMatch: r,
|
|
630
|
+
score: r ? 0 : 1,
|
|
631
|
+
indices: [0, e.length - 1]
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
class Ft extends O {
|
|
636
|
+
constructor(e) {
|
|
637
|
+
super(e);
|
|
638
|
+
}
|
|
639
|
+
static get type() {
|
|
640
|
+
return "prefix-exact";
|
|
641
|
+
}
|
|
642
|
+
static get multiRegex() {
|
|
643
|
+
return /^\^"(.*)"$/;
|
|
644
|
+
}
|
|
645
|
+
static get singleRegex() {
|
|
646
|
+
return /^\^(.*)$/;
|
|
647
|
+
}
|
|
648
|
+
search(e) {
|
|
649
|
+
const s = e.startsWith(this.pattern);
|
|
650
|
+
return {
|
|
651
|
+
isMatch: s,
|
|
652
|
+
score: s ? 0 : 1,
|
|
653
|
+
indices: [0, this.pattern.length - 1]
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
class Nt extends O {
|
|
658
|
+
constructor(e) {
|
|
659
|
+
super(e);
|
|
660
|
+
}
|
|
661
|
+
static get type() {
|
|
662
|
+
return "inverse-prefix-exact";
|
|
663
|
+
}
|
|
664
|
+
static get multiRegex() {
|
|
665
|
+
return /^!\^"(.*)"$/;
|
|
666
|
+
}
|
|
667
|
+
static get singleRegex() {
|
|
668
|
+
return /^!\^(.*)$/;
|
|
669
|
+
}
|
|
670
|
+
search(e) {
|
|
671
|
+
const s = !e.startsWith(this.pattern);
|
|
672
|
+
return {
|
|
673
|
+
isMatch: s,
|
|
674
|
+
score: s ? 0 : 1,
|
|
675
|
+
indices: [0, e.length - 1]
|
|
676
|
+
};
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
class $t extends O {
|
|
680
|
+
constructor(e) {
|
|
681
|
+
super(e);
|
|
682
|
+
}
|
|
683
|
+
static get type() {
|
|
684
|
+
return "suffix-exact";
|
|
685
|
+
}
|
|
686
|
+
static get multiRegex() {
|
|
687
|
+
return /^"(.*)"\$$/;
|
|
688
|
+
}
|
|
689
|
+
static get singleRegex() {
|
|
690
|
+
return /^(.*)\$$/;
|
|
691
|
+
}
|
|
692
|
+
search(e) {
|
|
693
|
+
const s = e.endsWith(this.pattern);
|
|
694
|
+
return {
|
|
695
|
+
isMatch: s,
|
|
696
|
+
score: s ? 0 : 1,
|
|
697
|
+
indices: [e.length - this.pattern.length, e.length - 1]
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
class jt extends O {
|
|
702
|
+
constructor(e) {
|
|
703
|
+
super(e);
|
|
704
|
+
}
|
|
705
|
+
static get type() {
|
|
706
|
+
return "inverse-suffix-exact";
|
|
707
|
+
}
|
|
708
|
+
static get multiRegex() {
|
|
709
|
+
return /^!"(.*)"\$$/;
|
|
710
|
+
}
|
|
711
|
+
static get singleRegex() {
|
|
712
|
+
return /^!(.*)\$$/;
|
|
713
|
+
}
|
|
714
|
+
search(e) {
|
|
715
|
+
const s = !e.endsWith(this.pattern);
|
|
716
|
+
return {
|
|
717
|
+
isMatch: s,
|
|
718
|
+
score: s ? 0 : 1,
|
|
719
|
+
indices: [0, e.length - 1]
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
class Oe extends O {
|
|
724
|
+
constructor(e, {
|
|
725
|
+
location: s = d.location,
|
|
726
|
+
threshold: r = d.threshold,
|
|
727
|
+
distance: i = d.distance,
|
|
728
|
+
includeMatches: n = d.includeMatches,
|
|
729
|
+
findAllMatches: c = d.findAllMatches,
|
|
730
|
+
minMatchCharLength: o = d.minMatchCharLength,
|
|
731
|
+
isCaseSensitive: a = d.isCaseSensitive,
|
|
732
|
+
ignoreLocation: h = d.ignoreLocation
|
|
733
|
+
} = {}) {
|
|
734
|
+
super(e), this._bitapSearch = new we(e, {
|
|
735
|
+
location: s,
|
|
736
|
+
threshold: r,
|
|
737
|
+
distance: i,
|
|
738
|
+
includeMatches: n,
|
|
739
|
+
findAllMatches: c,
|
|
740
|
+
minMatchCharLength: o,
|
|
741
|
+
isCaseSensitive: a,
|
|
742
|
+
ignoreLocation: h
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
static get type() {
|
|
746
|
+
return "fuzzy";
|
|
747
|
+
}
|
|
748
|
+
static get multiRegex() {
|
|
749
|
+
return /^"(.*)"$/;
|
|
750
|
+
}
|
|
751
|
+
static get singleRegex() {
|
|
752
|
+
return /^(.*)$/;
|
|
753
|
+
}
|
|
754
|
+
search(e) {
|
|
755
|
+
return this._bitapSearch.searchIn(e);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
class Ae extends O {
|
|
759
|
+
constructor(e) {
|
|
760
|
+
super(e);
|
|
761
|
+
}
|
|
762
|
+
static get type() {
|
|
763
|
+
return "include";
|
|
764
|
+
}
|
|
765
|
+
static get multiRegex() {
|
|
766
|
+
return /^'"(.*)"$/;
|
|
767
|
+
}
|
|
768
|
+
static get singleRegex() {
|
|
769
|
+
return /^'(.*)$/;
|
|
770
|
+
}
|
|
771
|
+
search(e) {
|
|
772
|
+
let s = 0, r;
|
|
773
|
+
const i = [], n = this.pattern.length;
|
|
774
|
+
for (; (r = e.indexOf(this.pattern, s)) > -1; )
|
|
775
|
+
s = r + n, i.push([r, s - 1]);
|
|
776
|
+
const c = !!i.length;
|
|
777
|
+
return {
|
|
778
|
+
isMatch: c,
|
|
779
|
+
score: c ? 0 : 1,
|
|
780
|
+
indices: i
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
const G = [
|
|
785
|
+
Tt,
|
|
786
|
+
Ae,
|
|
787
|
+
Ft,
|
|
788
|
+
Nt,
|
|
789
|
+
jt,
|
|
790
|
+
$t,
|
|
791
|
+
Ct,
|
|
792
|
+
Oe
|
|
793
|
+
], he = G.length, Dt = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Kt = "|";
|
|
794
|
+
function Yt(t, e = {}) {
|
|
795
|
+
return t.split(Kt).map((s) => {
|
|
796
|
+
let r = s.trim().split(Dt).filter((n) => n && !!n.trim()), i = [];
|
|
797
|
+
for (let n = 0, c = r.length; n < c; n += 1) {
|
|
798
|
+
const o = r[n];
|
|
799
|
+
let a = !1, h = -1;
|
|
800
|
+
for (; !a && ++h < he; ) {
|
|
801
|
+
const l = G[h];
|
|
802
|
+
let u = l.isMultiMatch(o);
|
|
803
|
+
u && (i.push(new l(u, e)), a = !0);
|
|
804
|
+
}
|
|
805
|
+
if (!a)
|
|
806
|
+
for (h = -1; ++h < he; ) {
|
|
807
|
+
const l = G[h];
|
|
808
|
+
let u = l.isSingleMatch(o);
|
|
809
|
+
if (u) {
|
|
810
|
+
i.push(new l(u, e));
|
|
811
|
+
break;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
return i;
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
const Wt = /* @__PURE__ */ new Set([Oe.type, Ae.type]);
|
|
819
|
+
class zt {
|
|
820
|
+
constructor(e, {
|
|
821
|
+
isCaseSensitive: s = d.isCaseSensitive,
|
|
822
|
+
includeMatches: r = d.includeMatches,
|
|
823
|
+
minMatchCharLength: i = d.minMatchCharLength,
|
|
824
|
+
ignoreLocation: n = d.ignoreLocation,
|
|
825
|
+
findAllMatches: c = d.findAllMatches,
|
|
826
|
+
location: o = d.location,
|
|
827
|
+
threshold: a = d.threshold,
|
|
828
|
+
distance: h = d.distance
|
|
829
|
+
} = {}) {
|
|
830
|
+
this.query = null, this.options = {
|
|
831
|
+
isCaseSensitive: s,
|
|
832
|
+
includeMatches: r,
|
|
833
|
+
minMatchCharLength: i,
|
|
834
|
+
findAllMatches: c,
|
|
835
|
+
ignoreLocation: n,
|
|
836
|
+
location: o,
|
|
837
|
+
threshold: a,
|
|
838
|
+
distance: h
|
|
839
|
+
}, this.pattern = s ? e : e.toLowerCase(), this.query = Yt(this.pattern, this.options);
|
|
840
|
+
}
|
|
841
|
+
static condition(e, s) {
|
|
842
|
+
return s.useExtendedSearch;
|
|
843
|
+
}
|
|
844
|
+
searchIn(e) {
|
|
845
|
+
const s = this.query;
|
|
846
|
+
if (!s)
|
|
847
|
+
return {
|
|
848
|
+
isMatch: !1,
|
|
849
|
+
score: 1
|
|
850
|
+
};
|
|
851
|
+
const { includeMatches: r, isCaseSensitive: i } = this.options;
|
|
852
|
+
e = i ? e : e.toLowerCase();
|
|
853
|
+
let n = 0, c = [], o = 0;
|
|
854
|
+
for (let a = 0, h = s.length; a < h; a += 1) {
|
|
855
|
+
const l = s[a];
|
|
856
|
+
c.length = 0, n = 0;
|
|
857
|
+
for (let u = 0, f = l.length; u < f; u += 1) {
|
|
858
|
+
const g = l[u], { isMatch: p, indices: m, score: A } = g.search(e);
|
|
859
|
+
if (p) {
|
|
860
|
+
if (n += 1, o += A, r) {
|
|
861
|
+
const S = g.constructor.type;
|
|
862
|
+
Wt.has(S) ? c = [...c, ...m] : c.push(m);
|
|
863
|
+
}
|
|
864
|
+
} else {
|
|
865
|
+
o = 0, n = 0, c.length = 0;
|
|
866
|
+
break;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
if (n) {
|
|
870
|
+
let u = {
|
|
871
|
+
isMatch: !0,
|
|
872
|
+
score: o / n
|
|
873
|
+
};
|
|
874
|
+
return r && (u.indices = c), u;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
return {
|
|
878
|
+
isMatch: !1,
|
|
879
|
+
score: 1
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
const J = [];
|
|
884
|
+
function Ht(...t) {
|
|
885
|
+
J.push(...t);
|
|
886
|
+
}
|
|
887
|
+
function Q(t, e) {
|
|
888
|
+
for (let s = 0, r = J.length; s < r; s += 1) {
|
|
889
|
+
let i = J[s];
|
|
890
|
+
if (i.condition(t, e))
|
|
891
|
+
return new i(t, e);
|
|
892
|
+
}
|
|
893
|
+
return new we(t, e);
|
|
894
|
+
}
|
|
895
|
+
const $ = {
|
|
896
|
+
AND: "$and",
|
|
897
|
+
OR: "$or"
|
|
898
|
+
}, X = {
|
|
899
|
+
PATH: "$path",
|
|
900
|
+
PATTERN: "$val"
|
|
901
|
+
}, Z = (t) => !!(t[$.AND] || t[$.OR]), Bt = (t) => !!t[X.PATH], Vt = (t) => !x(t) && _e(t) && !Z(t), ue = (t) => ({
|
|
902
|
+
[$.AND]: Object.keys(t).map((e) => ({
|
|
903
|
+
[e]: t[e]
|
|
904
|
+
}))
|
|
905
|
+
});
|
|
906
|
+
function Ie(t, e, { auto: s = !0 } = {}) {
|
|
907
|
+
const r = (i) => {
|
|
908
|
+
let n = Object.keys(i);
|
|
909
|
+
const c = Bt(i);
|
|
910
|
+
if (!c && n.length > 1 && !Z(i))
|
|
911
|
+
return r(ue(i));
|
|
912
|
+
if (Vt(i)) {
|
|
913
|
+
const a = c ? i[X.PATH] : n[0], h = c ? i[X.PATTERN] : i[a];
|
|
914
|
+
if (!_(h))
|
|
915
|
+
throw new Error(yt(a));
|
|
916
|
+
const l = {
|
|
917
|
+
keyId: U(a),
|
|
918
|
+
pattern: h
|
|
919
|
+
};
|
|
920
|
+
return s && (l.searcher = Q(h, e)), l;
|
|
921
|
+
}
|
|
922
|
+
let o = {
|
|
923
|
+
children: [],
|
|
924
|
+
operator: n[0]
|
|
925
|
+
};
|
|
926
|
+
return n.forEach((a) => {
|
|
927
|
+
const h = i[a];
|
|
928
|
+
x(h) && h.forEach((l) => {
|
|
929
|
+
o.children.push(r(l));
|
|
930
|
+
});
|
|
931
|
+
}), o;
|
|
932
|
+
};
|
|
933
|
+
return Z(t) || (t = ue(t)), r(t);
|
|
934
|
+
}
|
|
935
|
+
function Ut(t, { ignoreFieldNorm: e = d.ignoreFieldNorm }) {
|
|
936
|
+
t.forEach((s) => {
|
|
937
|
+
let r = 1;
|
|
938
|
+
s.matches.forEach(({ key: i, norm: n, score: c }) => {
|
|
939
|
+
const o = i ? i.weight : null;
|
|
940
|
+
r *= Math.pow(
|
|
941
|
+
c === 0 && o ? Number.EPSILON : c,
|
|
942
|
+
(o || 1) * (e ? 1 : n)
|
|
943
|
+
);
|
|
944
|
+
}), s.score = r;
|
|
945
|
+
});
|
|
946
|
+
}
|
|
947
|
+
function Gt(t, e) {
|
|
948
|
+
const s = t.matches;
|
|
949
|
+
e.matches = [], y(s) && s.forEach((r) => {
|
|
950
|
+
if (!y(r.indices) || !r.indices.length)
|
|
951
|
+
return;
|
|
952
|
+
const { indices: i, value: n } = r;
|
|
953
|
+
let c = {
|
|
954
|
+
indices: i,
|
|
955
|
+
value: n
|
|
956
|
+
};
|
|
957
|
+
r.key && (c.key = r.key.src), r.idx > -1 && (c.refIndex = r.idx), e.matches.push(c);
|
|
958
|
+
});
|
|
959
|
+
}
|
|
960
|
+
function Jt(t, e) {
|
|
961
|
+
e.score = t.score;
|
|
962
|
+
}
|
|
963
|
+
function Qt(t, e, {
|
|
964
|
+
includeMatches: s = d.includeMatches,
|
|
965
|
+
includeScore: r = d.includeScore
|
|
966
|
+
} = {}) {
|
|
967
|
+
const i = [];
|
|
968
|
+
return s && i.push(Gt), r && i.push(Jt), t.map((n) => {
|
|
969
|
+
const { idx: c } = n, o = {
|
|
970
|
+
item: e[c],
|
|
971
|
+
refIndex: c
|
|
972
|
+
};
|
|
973
|
+
return i.length && i.forEach((a) => {
|
|
974
|
+
a(n, o);
|
|
975
|
+
}), o;
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
class k {
|
|
979
|
+
constructor(e, s = {}, r) {
|
|
980
|
+
this.options = { ...d, ...s }, this.options.useExtendedSearch, this._keyStore = new St(this.options.keys), this.setCollection(e, r);
|
|
981
|
+
}
|
|
982
|
+
setCollection(e, s) {
|
|
983
|
+
if (this._docs = e, s && !(s instanceof te))
|
|
984
|
+
throw new Error(mt);
|
|
985
|
+
this._myIndex = s || Re(this.options.keys, this._docs, {
|
|
986
|
+
getFn: this.options.getFn,
|
|
987
|
+
fieldNormWeight: this.options.fieldNormWeight
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
add(e) {
|
|
991
|
+
y(e) && (this._docs.push(e), this._myIndex.add(e));
|
|
992
|
+
}
|
|
993
|
+
remove(e = () => !1) {
|
|
994
|
+
const s = [];
|
|
995
|
+
for (let r = 0, i = this._docs.length; r < i; r += 1) {
|
|
996
|
+
const n = this._docs[r];
|
|
997
|
+
e(n, r) && (this.removeAt(r), r -= 1, i -= 1, s.push(n));
|
|
998
|
+
}
|
|
999
|
+
return s;
|
|
1000
|
+
}
|
|
1001
|
+
removeAt(e) {
|
|
1002
|
+
this._docs.splice(e, 1), this._myIndex.removeAt(e);
|
|
1003
|
+
}
|
|
1004
|
+
getIndex() {
|
|
1005
|
+
return this._myIndex;
|
|
1006
|
+
}
|
|
1007
|
+
search(e, { limit: s = -1 } = {}) {
|
|
1008
|
+
const {
|
|
1009
|
+
includeMatches: r,
|
|
1010
|
+
includeScore: i,
|
|
1011
|
+
shouldSort: n,
|
|
1012
|
+
sortFn: c,
|
|
1013
|
+
ignoreFieldNorm: o
|
|
1014
|
+
} = this.options;
|
|
1015
|
+
let a = _(e) ? _(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
|
|
1016
|
+
return Ut(a, { ignoreFieldNorm: o }), n && a.sort(c), Ee(s) && s > -1 && (a = a.slice(0, s)), Qt(a, this._docs, {
|
|
1017
|
+
includeMatches: r,
|
|
1018
|
+
includeScore: i
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
_searchStringList(e) {
|
|
1022
|
+
const s = Q(e, this.options), { records: r } = this._myIndex, i = [];
|
|
1023
|
+
return r.forEach(({ v: n, i: c, n: o }) => {
|
|
1024
|
+
if (!y(n))
|
|
1025
|
+
return;
|
|
1026
|
+
const { isMatch: a, score: h, indices: l } = s.searchIn(n);
|
|
1027
|
+
a && i.push({
|
|
1028
|
+
item: n,
|
|
1029
|
+
idx: c,
|
|
1030
|
+
matches: [{ score: h, value: n, norm: o, indices: l }]
|
|
1031
|
+
});
|
|
1032
|
+
}), i;
|
|
1033
|
+
}
|
|
1034
|
+
_searchLogical(e) {
|
|
1035
|
+
const s = Ie(e, this.options), r = (o, a, h) => {
|
|
1036
|
+
if (!o.children) {
|
|
1037
|
+
const { keyId: u, searcher: f } = o, g = this._findMatches({
|
|
1038
|
+
key: this._keyStore.get(u),
|
|
1039
|
+
value: this._myIndex.getValueForItemAtKeyId(a, u),
|
|
1040
|
+
searcher: f
|
|
1041
|
+
});
|
|
1042
|
+
return g && g.length ? [
|
|
1043
|
+
{
|
|
1044
|
+
idx: h,
|
|
1045
|
+
item: a,
|
|
1046
|
+
matches: g
|
|
1047
|
+
}
|
|
1048
|
+
] : [];
|
|
1049
|
+
}
|
|
1050
|
+
const l = [];
|
|
1051
|
+
for (let u = 0, f = o.children.length; u < f; u += 1) {
|
|
1052
|
+
const g = o.children[u], p = r(g, a, h);
|
|
1053
|
+
if (p.length)
|
|
1054
|
+
l.push(...p);
|
|
1055
|
+
else if (o.operator === $.AND)
|
|
1056
|
+
return [];
|
|
1057
|
+
}
|
|
1058
|
+
return l;
|
|
1059
|
+
}, i = this._myIndex.records, n = {}, c = [];
|
|
1060
|
+
return i.forEach(({ $: o, i: a }) => {
|
|
1061
|
+
if (y(o)) {
|
|
1062
|
+
let h = r(s, o, a);
|
|
1063
|
+
h.length && (n[a] || (n[a] = { idx: a, item: o, matches: [] }, c.push(n[a])), h.forEach(({ matches: l }) => {
|
|
1064
|
+
n[a].matches.push(...l);
|
|
1065
|
+
}));
|
|
1066
|
+
}
|
|
1067
|
+
}), c;
|
|
1068
|
+
}
|
|
1069
|
+
_searchObjectList(e) {
|
|
1070
|
+
const s = Q(e, this.options), { keys: r, records: i } = this._myIndex, n = [];
|
|
1071
|
+
return i.forEach(({ $: c, i: o }) => {
|
|
1072
|
+
if (!y(c))
|
|
1073
|
+
return;
|
|
1074
|
+
let a = [];
|
|
1075
|
+
r.forEach((h, l) => {
|
|
1076
|
+
a.push(
|
|
1077
|
+
...this._findMatches({
|
|
1078
|
+
key: h,
|
|
1079
|
+
value: c[l],
|
|
1080
|
+
searcher: s
|
|
1081
|
+
})
|
|
1082
|
+
);
|
|
1083
|
+
}), a.length && n.push({
|
|
1084
|
+
idx: o,
|
|
1085
|
+
item: c,
|
|
1086
|
+
matches: a
|
|
1087
|
+
});
|
|
1088
|
+
}), n;
|
|
1089
|
+
}
|
|
1090
|
+
_findMatches({ key: e, value: s, searcher: r }) {
|
|
1091
|
+
if (!y(s))
|
|
1092
|
+
return [];
|
|
1093
|
+
let i = [];
|
|
1094
|
+
if (x(s))
|
|
1095
|
+
s.forEach(({ v: n, i: c, n: o }) => {
|
|
1096
|
+
if (!y(n))
|
|
1097
|
+
return;
|
|
1098
|
+
const { isMatch: a, score: h, indices: l } = r.searchIn(n);
|
|
1099
|
+
a && i.push({
|
|
1100
|
+
score: h,
|
|
1101
|
+
key: e,
|
|
1102
|
+
value: n,
|
|
1103
|
+
idx: c,
|
|
1104
|
+
norm: o,
|
|
1105
|
+
indices: l
|
|
1106
|
+
});
|
|
1107
|
+
});
|
|
1108
|
+
else {
|
|
1109
|
+
const { v: n, n: c } = s, { isMatch: o, score: a, indices: h } = r.searchIn(n);
|
|
1110
|
+
o && i.push({ score: a, key: e, value: n, norm: c, indices: h });
|
|
1111
|
+
}
|
|
1112
|
+
return i;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
k.version = "7.0.0";
|
|
1116
|
+
k.createIndex = Re;
|
|
1117
|
+
k.parseIndex = Lt;
|
|
1118
|
+
k.config = d;
|
|
1119
|
+
k.parseQuery = Ie;
|
|
1120
|
+
Ht(zt);
|
|
1121
|
+
const Xt = {
|
|
1122
|
+
threshold: 0.3
|
|
1123
|
+
}, Zt = (t) => (e) => {
|
|
1124
|
+
const s = new k(e, {
|
|
1125
|
+
keys: Object.keys(e[0]),
|
|
1126
|
+
...Xt,
|
|
1127
|
+
...t
|
|
1128
|
+
});
|
|
1129
|
+
return {
|
|
1130
|
+
type: "fuse",
|
|
1131
|
+
page: (r, i) => e.slice(r * i, (r + 1) * i),
|
|
1132
|
+
search: (r) => s.search(r).map(({ item: i }) => i),
|
|
1133
|
+
retrieve: (r) => e.filter((i) => r.includes(i.key))
|
|
1134
|
+
};
|
|
1135
|
+
}, qt = Zt(), es = ({
|
|
1136
|
+
term: t,
|
|
1137
|
+
searcher: e = qt
|
|
1138
|
+
}) => ht(({ data: s }) => typeof e == "function" ? t.length === 0 || (s == null ? void 0 : s.length) === 0 ? { data: s, transformed: !1 } : { data: e(s).search(t), transformed: !0 } : { data: e.search(t), transformed: !0 }), be = ({
|
|
1139
|
+
debounce: t = 250,
|
|
1140
|
+
value: e,
|
|
1141
|
+
onChange: s,
|
|
1142
|
+
transformBefore: r
|
|
1143
|
+
}) => {
|
|
1144
|
+
const [i, n] = tt({
|
|
1145
|
+
onChange: s,
|
|
1146
|
+
value: e,
|
|
1147
|
+
initial: ""
|
|
1148
|
+
}), { setTransform: c, deleteTransform: o } = fe(), a = Pe(c, t, []), h = qe(
|
|
1149
|
+
(l) => {
|
|
1150
|
+
n(l), l.length === 0 ? o("filter") : (r != null && (l = r(l)), a("filter", es({ term: l })));
|
|
1151
|
+
},
|
|
1152
|
+
[n, r]
|
|
1153
|
+
);
|
|
1154
|
+
return { value: i, onChange: h };
|
|
1155
|
+
}, ts = ({
|
|
1156
|
+
children: t = (s) => /* @__PURE__ */ Ze.jsx(ke, { placeholder: "Filter", ...s }),
|
|
1157
|
+
...e
|
|
1158
|
+
}) => t(be(e)), hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1159
|
+
__proto__: null,
|
|
1160
|
+
Column: ve,
|
|
1161
|
+
ColumnContext: Te,
|
|
1162
|
+
Core: Ce,
|
|
1163
|
+
DataProvider: Fe,
|
|
1164
|
+
Filter: ts,
|
|
1165
|
+
Hover: Ne,
|
|
1166
|
+
ItemFrame: $e,
|
|
1167
|
+
List: st,
|
|
1168
|
+
Search: je,
|
|
1169
|
+
Selector: De,
|
|
1170
|
+
selectValueIsZero: Ke,
|
|
1171
|
+
useDataContext: Ye,
|
|
1172
|
+
useDataUtilContext: fe,
|
|
1173
|
+
useFilter: be,
|
|
1174
|
+
useGetTransformedData: We,
|
|
1175
|
+
useHoverContext: ze,
|
|
1176
|
+
useSearch: He,
|
|
1177
|
+
useSelect: Be,
|
|
1178
|
+
useSelection: Ve,
|
|
1179
|
+
useSelectionContext: Ue,
|
|
1180
|
+
useSelectionUtils: Ge,
|
|
1181
|
+
useSetSourceData: Je,
|
|
1182
|
+
useSourceData: Qe,
|
|
1183
|
+
useTransformedData: Xe
|
|
1184
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1185
|
+
export {
|
|
1186
|
+
ts as F,
|
|
1187
|
+
es as c,
|
|
1188
|
+
hs as e,
|
|
1189
|
+
Zt as f,
|
|
1190
|
+
ht as p
|
|
1191
|
+
};
|