@sheetxl/studio-vanilla 0.4.11 → 0.4.12
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/browser/cjs/{BlSFY6zLlebuejdV.cjs → B35OZ0mE8aINQPP9.cjs} +2 -2
- package/browser/cjs/{DiBy6-IxLscyMW2y.cjs → BPzEQNENF-gEBkg9.cjs} +2 -2
- package/browser/cjs/{C7EZCTczsC-gkRcq.cjs → BUokV6yuzE-_8MyK.cjs} +2 -2
- package/browser/cjs/{T4SHYo66xDT3l9JN.cjs → BeZHmOKfa37mFNAu.cjs} +2 -2
- package/browser/cjs/{BplA5pDzOJpfTZuA.cjs → BflJ_0gT9lQtDvY_.cjs} +2 -2
- package/browser/cjs/{DFspSkki779xN-Ey.cjs → BwN8vKi5o3-PbIMo.cjs} +2 -2
- package/browser/cjs/{D3iOk-Q2tRdUeTcn.cjs → C3OizZPVuxO2fjSG.cjs} +1 -1
- package/browser/cjs/{BshvMtUxTJHj3JQN.cjs → CBL6KkiWI2RPflEN.cjs} +2 -2
- package/browser/cjs/CN6-6xpZMpFqSS8M.cjs +7 -0
- package/browser/cjs/{vfUix5Di0Ro8tEID.cjs → CTrEV_UpxC0W6cZZ.cjs} +2 -2
- package/browser/cjs/{CFcjX5-nVsgzdZ4F.cjs → CU30GVjjFXl44vEU.cjs} +1 -1
- package/browser/cjs/{DgBn3aW39yjgm0X_.cjs → CZWBxvUXzfpn_zmc.cjs} +2 -2
- package/browser/cjs/{DrlS1oz9Nea8Pm3j.cjs → Ccs2ouvlLekaLGH0.cjs} +2 -2
- package/browser/cjs/{B0rdyyttE2Aibsag.cjs → Ce-8L4Viq3I_6j0i.cjs} +2 -2
- package/browser/cjs/{SzxJv7OUs5ojl8gx.cjs → CtNjLzIHB8WX63Bl.cjs} +2 -2
- package/browser/cjs/{Dx-jp_LJxWbAScyA.cjs → DAHpsyykuPBkoh-Z.cjs} +1 -1
- package/browser/cjs/{B2e7dDI-zKoqXpIW.cjs → DJbKKxeeTEHHA1gR.cjs} +20 -20
- package/browser/cjs/{CjZbhk41S1qO_74G.cjs → D_VQzwC1zzTJyKtG.cjs} +1 -1
- package/browser/cjs/{Db_Ew1r6yOMYylvA.cjs → GrsZZ_mEdsM5dEMA.cjs} +2 -2
- package/browser/cjs/{BPTHTRDvNOVkUJGa.cjs → JKEGlXjMwGnXk_Gv.cjs} +2 -2
- package/browser/cjs/{C5FXOMLhAu_KTjVe.cjs → L1iE_VcelYZIy0wI.cjs} +1 -1
- package/browser/cjs/{DFtyXc7YFh9dIp74.cjs → Q_VvA-yUQx3xFKiJ.cjs} +1 -1
- package/browser/cjs/{BAyEOOtO-9sHQQRW.cjs → fTGpiXzFm3K_u2Fm.cjs} +2 -2
- package/browser/cjs/{CuTW2Pt-L5n-hNxV.cjs → hwDUzorB6aCvH1eL.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{BuWtGFX0HiBezGjw.cjs → no5c2H18QD2qmOH6.cjs} +2 -2
- package/browser/esm/{BALnKy2Fp7fyk-lc.mjs → B4Mm5gczpI_k2zzN.mjs} +2 -2
- package/browser/esm/{BXUGsC1Mo3FP8vnW.mjs → B8ISUdOxsJMYWzNN.mjs} +2 -2
- package/browser/esm/{BGpv6Kq7eBlJy43T.mjs → BnJiF38TGudjoHzT.mjs} +1 -1
- package/browser/esm/Bts4nCgfCAUpTfxz.mjs +7 -0
- package/browser/esm/{DtmE60AvstK9u0Ta.mjs → C3cyAbIH8Qc8MIFN.mjs} +20 -20
- package/browser/esm/C4jlaVv8bELgiHyE.mjs +7 -0
- package/browser/esm/{CFFC0SNc24a0Dxnh.mjs → CYIhGb86r-kKOrP5.mjs} +2 -2
- package/browser/esm/{B905wKzTtod-jbsD.mjs → CcpskguvlvemArQn.mjs} +2 -2
- package/browser/esm/CeRfALx1iU5fqOUg.mjs +7 -0
- package/browser/esm/CfYWmP_Hots5f0f6.mjs +7 -0
- package/browser/esm/CkarbqNx_lhlBnw7.mjs +7 -0
- package/browser/esm/D2PlWNQjrTgf6GuR.mjs +7 -0
- package/browser/esm/{Cc_VWd0wF5-39LsI.mjs → D3KNxvnrwR6_fTJE.mjs} +1 -1
- package/browser/esm/{Bo_ZPRrOQrqOVHAF.mjs → DIJyH94oCzUnlcNZ.mjs} +2 -2
- package/browser/esm/{De6RPxc4p_jXLlT5.mjs → DVAG1NxFe3cMjLE1.mjs} +1 -1
- package/browser/esm/DVqga7g7j0FUiM6p.mjs +7 -0
- package/browser/esm/{PS0cqYnlMVEGOQpI.mjs → DcX8yGEBX6qi9RCe.mjs} +2 -2
- package/browser/esm/{BUSR_OK5Qi6hRPfw.mjs → DeXfOSxGE_Ez7DZq.mjs} +1 -1
- package/browser/esm/{Cq8D_M0jeHLcnRjg.mjs → DzgM_rkwyIHsCb6I.mjs} +1 -1
- package/browser/esm/{BDVJ7eOPpW5FnEAP.mjs → M4hZ25330e96seUM.mjs} +1 -1
- package/browser/esm/Qp2Toeh_EbJH_f_6.mjs +7 -0
- package/browser/esm/SAyRTPVprOHZ8Up8.mjs +7 -0
- package/browser/esm/_ft7JYO6QdDbIu3d.mjs +7 -0
- package/browser/esm/{BlGoi1_x9rUMpWMd.mjs → dpdy0BU4GGI5lZrX.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{tFhROdVSw9KLQfUN.mjs → oLCocGFRAwsVsOSE.mjs} +2 -2
- package/cdn/assets/7_O6nILzn1fSVvkO.js +13449 -0
- package/cdn/assets/B3kbBB6oxKBErwzn.js +27 -0
- package/cdn/assets/BB66NDz7S3ocEfRB.js +150 -0
- package/cdn/assets/BCK7yhx9JfzU2rF0.js +22 -0
- package/cdn/assets/BSAH88RG1oubICau.js +84 -0
- package/cdn/assets/BT5EcMEFBsphczwC.js +1469 -0
- package/cdn/assets/BcWoqhD_sX85c7Mh.js +1701 -0
- package/cdn/assets/BoOefjrM4kZ-YXxa.js +90 -0
- package/cdn/assets/BtweFYnoj_aEfydW.js +1371 -0
- package/cdn/assets/Bv0Xb6DdcQbPYJKo.js +24 -0
- package/cdn/assets/CC-S4NMYhLg3WgqO.js +3875 -0
- package/cdn/assets/CJhyHcQcrhbtC33r.js +50 -0
- package/cdn/assets/CUc6gRjjRGTFWSHD.js +50 -0
- package/cdn/assets/CfObTzh8pGdd8D23.js +2183 -0
- package/cdn/assets/CiY3HumGDc_5bMtR.js +58 -0
- package/cdn/assets/CpPLN0-hDsTIFHZV.js +46 -0
- package/cdn/assets/Cq94woVmlxhjWVRI.js +21 -0
- package/cdn/assets/CsjftXmSYQRHNKdq.js +41 -0
- package/cdn/assets/DBL4jY0AVc53RGNm.js +637 -0
- package/cdn/assets/DDW1WJ2IM_9ZUfKm.js +36 -0
- package/cdn/assets/DJQOS9qxVAlpgDMt.js +1704 -0
- package/cdn/assets/DWJE3K3jMKMTCi3o.js +393 -0
- package/cdn/assets/D_5RgqgwXsoqLJDR.js +241 -0
- package/cdn/assets/DfmaL8DmDaFAv8M_.js +6481 -0
- package/cdn/assets/DgLPO_EQ9DYoGgec.js +423 -0
- package/cdn/assets/DkS6quwH1okWaho6.js +46 -0
- package/cdn/assets/DxMu6URURFWj9aXM.js +2373 -0
- package/cdn/assets/Jhm2DAcrfAqiM-Y-.js +26490 -0
- package/cdn/assets/MRBi3juXAW0lA_mj.js +1358 -0
- package/cdn/assets/dk2teWHDODYNarJY.js +27 -0
- package/cdn/assets/phYz0vGgqIEQ2hco.js +12 -0
- package/cdn/assets/qA23x9VVBL9R4qxN.js +43 -0
- package/cdn/index.js +41 -37
- package/cdn/loader.js +1 -1
- package/package.json +3 -3
- package/browser/esm/B5kkStdEkTczERyM.mjs +0 -7
- package/browser/esm/BuURCm92KsyGHG9e.mjs +0 -7
- package/browser/esm/CGZ5MX7afzMxDkCe.mjs +0 -7
- package/browser/esm/CzmNwV9tfFYUp_gS.mjs +0 -7
- package/browser/esm/DlVZFM9ZR5jGyG0_.mjs +0 -7
- package/browser/esm/DqXxZP6yKF4U1YfY.mjs +0 -7
- package/browser/esm/Dz2OVgq3kxi1TkfX.mjs +0 -7
- package/browser/esm/QBGUD1XS5_pysBLL.mjs +0 -7
- package/browser/esm/uGDCdtqxjqRCo4Xn.mjs +0 -7
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.12
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
function S(t) {
|
|
8
|
+
return Array.isArray ? Array.isArray(t) : ne(t) === "[object Array]";
|
|
9
|
+
}
|
|
10
|
+
function v(t) {
|
|
11
|
+
return typeof t == "string";
|
|
12
|
+
}
|
|
13
|
+
function te(t) {
|
|
14
|
+
return typeof t == "number";
|
|
15
|
+
}
|
|
16
|
+
function ae(t) {
|
|
17
|
+
return t === !0 || t === !1 || function(e) {
|
|
18
|
+
return ie(e) && e !== null;
|
|
19
|
+
}(t) && ne(t) == "[object Boolean]";
|
|
20
|
+
}
|
|
21
|
+
function ie(t) {
|
|
22
|
+
return typeof t == "object";
|
|
23
|
+
}
|
|
24
|
+
function E(t) {
|
|
25
|
+
return t != null;
|
|
26
|
+
}
|
|
27
|
+
function K(t) {
|
|
28
|
+
return !t.trim().length;
|
|
29
|
+
}
|
|
30
|
+
function ne(t) {
|
|
31
|
+
return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
|
|
32
|
+
}
|
|
33
|
+
const H = Object.prototype.hasOwnProperty;
|
|
34
|
+
class le {
|
|
35
|
+
constructor(e) {
|
|
36
|
+
this._keys = [], this._keyMap = {};
|
|
37
|
+
let i = 0;
|
|
38
|
+
e.forEach((s) => {
|
|
39
|
+
let n = se(s);
|
|
40
|
+
this._keys.push(n), this._keyMap[n.id] = n, i += n.weight;
|
|
41
|
+
}), this._keys.forEach((s) => {
|
|
42
|
+
s.weight /= i;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
get(e) {
|
|
46
|
+
return this._keyMap[e];
|
|
47
|
+
}
|
|
48
|
+
keys() {
|
|
49
|
+
return this._keys;
|
|
50
|
+
}
|
|
51
|
+
toJSON() {
|
|
52
|
+
return JSON.stringify(this._keys);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function se(t) {
|
|
56
|
+
let e = null, i = null, s = null, n = 1, u = null;
|
|
57
|
+
if (v(t) || S(t)) s = t, e = T(t), i = q(t);
|
|
58
|
+
else {
|
|
59
|
+
if (!H.call(t, "name")) throw new Error("Missing name property in key");
|
|
60
|
+
const c = t.name;
|
|
61
|
+
if (s = c, H.call(t, "weight") && (n = t.weight, n <= 0)) throw new Error(((o) => `Property 'weight' in key '${o}' must be a positive integer`)(c));
|
|
62
|
+
e = T(c), i = q(c), u = t.getFn;
|
|
63
|
+
}
|
|
64
|
+
return { path: e, id: i, weight: n, src: s, getFn: u };
|
|
65
|
+
}
|
|
66
|
+
function T(t) {
|
|
67
|
+
return S(t) ? t : t.split(".");
|
|
68
|
+
}
|
|
69
|
+
function q(t) {
|
|
70
|
+
return S(t) ? t.join(".") : t;
|
|
71
|
+
}
|
|
72
|
+
var l = { isCaseSensitive: !1, ignoreDiacritics: !1, includeScore: !1, keys: [], shouldSort: !0, sortFn: (t, e) => t.score === e.score ? t.idx < e.idx ? -1 : 1 : t.score < e.score ? -1 : 1, includeMatches: !1, findAllMatches: !1, minMatchCharLength: 1, location: 0, threshold: 0.6, distance: 100, useExtendedSearch: !1, getFn: function(t, e) {
|
|
73
|
+
let i = [], s = !1;
|
|
74
|
+
const n = (u, c, o) => {
|
|
75
|
+
if (E(u)) if (c[o]) {
|
|
76
|
+
const r = u[c[o]];
|
|
77
|
+
if (!E(r)) return;
|
|
78
|
+
if (o === c.length - 1 && (v(r) || te(r) || ae(r))) i.push(function(a) {
|
|
79
|
+
return a == null ? "" : function(h) {
|
|
80
|
+
if (typeof h == "string") return h;
|
|
81
|
+
let d = h + "";
|
|
82
|
+
return d == "0" && 1 / h == -1 / 0 ? "-0" : d;
|
|
83
|
+
}(a);
|
|
84
|
+
}(r));
|
|
85
|
+
else if (S(r)) {
|
|
86
|
+
s = !0;
|
|
87
|
+
for (let a = 0, h = r.length; a < h; a += 1) n(r[a], c, o + 1);
|
|
88
|
+
} else c.length && n(r, c, o + 1);
|
|
89
|
+
} else i.push(u);
|
|
90
|
+
};
|
|
91
|
+
return n(t, v(e) ? e.split(".") : e, 0), s ? i : i[0];
|
|
92
|
+
}, ignoreLocation: !1, ignoreFieldNorm: !1, fieldNormWeight: 1 };
|
|
93
|
+
const de = /[^ ]+/g;
|
|
94
|
+
class U {
|
|
95
|
+
constructor({ getFn: e = l.getFn, fieldNormWeight: i = l.fieldNormWeight } = {}) {
|
|
96
|
+
this.norm = function(s = 1, n = 3) {
|
|
97
|
+
const u = /* @__PURE__ */ new Map(), c = Math.pow(10, n);
|
|
98
|
+
return { get(o) {
|
|
99
|
+
const r = o.match(de).length;
|
|
100
|
+
if (u.has(r)) return u.get(r);
|
|
101
|
+
const a = 1 / Math.pow(r, 0.5 * s), h = parseFloat(Math.round(a * c) / c);
|
|
102
|
+
return u.set(r, h), h;
|
|
103
|
+
}, clear() {
|
|
104
|
+
u.clear();
|
|
105
|
+
} };
|
|
106
|
+
}(i, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
|
|
107
|
+
}
|
|
108
|
+
setSources(e = []) {
|
|
109
|
+
this.docs = e;
|
|
110
|
+
}
|
|
111
|
+
setIndexRecords(e = []) {
|
|
112
|
+
this.records = e;
|
|
113
|
+
}
|
|
114
|
+
setKeys(e = []) {
|
|
115
|
+
this.keys = e, this._keysMap = {}, e.forEach((i, s) => {
|
|
116
|
+
this._keysMap[i.id] = s;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
create() {
|
|
120
|
+
!this.isCreated && this.docs.length && (this.isCreated = !0, v(this.docs[0]) ? this.docs.forEach((e, i) => {
|
|
121
|
+
this._addString(e, i);
|
|
122
|
+
}) : this.docs.forEach((e, i) => {
|
|
123
|
+
this._addObject(e, i);
|
|
124
|
+
}), this.norm.clear());
|
|
125
|
+
}
|
|
126
|
+
add(e) {
|
|
127
|
+
const i = this.size();
|
|
128
|
+
v(e) ? this._addString(e, i) : this._addObject(e, i);
|
|
129
|
+
}
|
|
130
|
+
removeAt(e) {
|
|
131
|
+
this.records.splice(e, 1);
|
|
132
|
+
for (let i = e, s = this.size(); i < s; i += 1) this.records[i].i -= 1;
|
|
133
|
+
}
|
|
134
|
+
getValueForItemAtKeyId(e, i) {
|
|
135
|
+
return e[this._keysMap[i]];
|
|
136
|
+
}
|
|
137
|
+
size() {
|
|
138
|
+
return this.records.length;
|
|
139
|
+
}
|
|
140
|
+
_addString(e, i) {
|
|
141
|
+
if (!E(e) || K(e)) return;
|
|
142
|
+
let s = { v: e, i, n: this.norm.get(e) };
|
|
143
|
+
this.records.push(s);
|
|
144
|
+
}
|
|
145
|
+
_addObject(e, i) {
|
|
146
|
+
let s = { i, $: {} };
|
|
147
|
+
this.keys.forEach((n, u) => {
|
|
148
|
+
let c = n.getFn ? n.getFn(e) : this.getFn(e, n.path);
|
|
149
|
+
if (E(c)) {
|
|
150
|
+
if (S(c)) {
|
|
151
|
+
let o = [];
|
|
152
|
+
const r = [{ nestedArrIndex: -1, value: c }];
|
|
153
|
+
for (; r.length; ) {
|
|
154
|
+
const { nestedArrIndex: a, value: h } = r.pop();
|
|
155
|
+
if (E(h)) if (v(h) && !K(h)) {
|
|
156
|
+
let d = { v: h, i: a, n: this.norm.get(h) };
|
|
157
|
+
o.push(d);
|
|
158
|
+
} else S(h) && h.forEach((d, f) => {
|
|
159
|
+
r.push({ nestedArrIndex: f, value: d });
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
s.$[u] = o;
|
|
163
|
+
} else if (v(c) && !K(c)) {
|
|
164
|
+
let o = { v: c, n: this.norm.get(c) };
|
|
165
|
+
s.$[u] = o;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}), this.records.push(s);
|
|
169
|
+
}
|
|
170
|
+
toJSON() {
|
|
171
|
+
return { keys: this.keys, records: this.records };
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function re(t, e, { getFn: i = l.getFn, fieldNormWeight: s = l.fieldNormWeight } = {}) {
|
|
175
|
+
const n = new U({ getFn: i, fieldNormWeight: s });
|
|
176
|
+
return n.setKeys(t.map(se)), n.setSources(e), n.create(), n;
|
|
177
|
+
}
|
|
178
|
+
function j(t, { errors: e = 0, currentLocation: i = 0, expectedLocation: s = 0, distance: n = l.distance, ignoreLocation: u = l.ignoreLocation } = {}) {
|
|
179
|
+
const c = e / t.length;
|
|
180
|
+
if (u) return c;
|
|
181
|
+
const o = Math.abs(s - i);
|
|
182
|
+
return n ? c + o / n : o ? 1 : c;
|
|
183
|
+
}
|
|
184
|
+
const N = 32;
|
|
185
|
+
function ge(t, e, i, { location: s = l.location, distance: n = l.distance, threshold: u = l.threshold, findAllMatches: c = l.findAllMatches, minMatchCharLength: o = l.minMatchCharLength, includeMatches: r = l.includeMatches, ignoreLocation: a = l.ignoreLocation } = {}) {
|
|
186
|
+
if (e.length > N) throw new Error("Pattern length exceeds max of 32.");
|
|
187
|
+
const h = e.length, d = t.length, f = Math.max(0, Math.min(s, d));
|
|
188
|
+
let g = u, A = f;
|
|
189
|
+
const p = o > 1 || r, m = p ? Array(d) : [];
|
|
190
|
+
let F;
|
|
191
|
+
for (; (F = t.indexOf(e, A)) > -1; ) {
|
|
192
|
+
let y = j(e, { currentLocation: F, expectedLocation: f, distance: n, ignoreLocation: a });
|
|
193
|
+
if (g = Math.min(y, g), A = F + h, p) {
|
|
194
|
+
let B = 0;
|
|
195
|
+
for (; B < h; ) m[F + B] = 1, B += 1;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
A = -1;
|
|
199
|
+
let L = [], D = 1, M = h + d;
|
|
200
|
+
const w = 1 << h - 1;
|
|
201
|
+
for (let y = 0; y < h; y += 1) {
|
|
202
|
+
let B = 0, k = M;
|
|
203
|
+
for (; B < k; ) j(e, { errors: y, currentLocation: f + k, expectedLocation: f, distance: n, ignoreLocation: a }) <= g ? B = k : M = k, k = Math.floor((M - B) / 2 + B);
|
|
204
|
+
M = k;
|
|
205
|
+
let $ = Math.max(1, f - k + 1), x = c ? d : Math.min(f + k, d) + h, _ = Array(x + 2);
|
|
206
|
+
_[x + 1] = (1 << y) - 1;
|
|
207
|
+
for (let C = x; C >= $; C -= 1) {
|
|
208
|
+
let b = C - 1, R = i[t.charAt(b)];
|
|
209
|
+
if (p && (m[b] = +!!R), _[C] = (_[C + 1] << 1 | 1) & R, y && (_[C] |= (L[C + 1] | L[C]) << 1 | 1 | L[C + 1]), _[C] & w && (D = j(e, { errors: y, currentLocation: b, expectedLocation: f, distance: n, ignoreLocation: a }), D <= g)) {
|
|
210
|
+
if (g = D, A = b, A <= f) break;
|
|
211
|
+
$ = Math.max(1, 2 * f - A);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (j(e, { errors: y + 1, currentLocation: f, expectedLocation: f, distance: n, ignoreLocation: a }) > g) break;
|
|
215
|
+
L = _;
|
|
216
|
+
}
|
|
217
|
+
const z = { isMatch: A >= 0, score: Math.max(1e-3, D) };
|
|
218
|
+
if (p) {
|
|
219
|
+
const y = function(B = [], k = l.minMatchCharLength) {
|
|
220
|
+
let $ = [], x = -1, _ = -1, C = 0;
|
|
221
|
+
for (let b = B.length; C < b; C += 1) {
|
|
222
|
+
let R = B[C];
|
|
223
|
+
R && x === -1 ? x = C : R || x === -1 || (_ = C - 1, _ - x + 1 >= k && $.push([x, _]), x = -1);
|
|
224
|
+
}
|
|
225
|
+
return B[C - 1] && C - x >= k && $.push([x, C - 1]), $;
|
|
226
|
+
}(m, o);
|
|
227
|
+
y.length ? r && (z.indices = y) : z.isMatch = !1;
|
|
228
|
+
}
|
|
229
|
+
return z;
|
|
230
|
+
}
|
|
231
|
+
function fe(t) {
|
|
232
|
+
let e = {};
|
|
233
|
+
for (let i = 0, s = t.length; i < s; i += 1) {
|
|
234
|
+
const n = t.charAt(i);
|
|
235
|
+
e[n] = (e[n] || 0) | 1 << s - i - 1;
|
|
236
|
+
}
|
|
237
|
+
return e;
|
|
238
|
+
}
|
|
239
|
+
const W = String.prototype.normalize ? (t) => t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "") : (t) => t;
|
|
240
|
+
class ue {
|
|
241
|
+
constructor(e, { location: i = l.location, threshold: s = l.threshold, distance: n = l.distance, includeMatches: u = l.includeMatches, findAllMatches: c = l.findAllMatches, minMatchCharLength: o = l.minMatchCharLength, isCaseSensitive: r = l.isCaseSensitive, ignoreDiacritics: a = l.ignoreDiacritics, ignoreLocation: h = l.ignoreLocation } = {}) {
|
|
242
|
+
if (this.options = { location: i, threshold: s, distance: n, includeMatches: u, findAllMatches: c, minMatchCharLength: o, isCaseSensitive: r, ignoreDiacritics: a, ignoreLocation: h }, e = r ? e : e.toLowerCase(), e = a ? W(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length) return;
|
|
243
|
+
const d = (g, A) => {
|
|
244
|
+
this.chunks.push({ pattern: g, alphabet: fe(g), startIndex: A });
|
|
245
|
+
}, f = this.pattern.length;
|
|
246
|
+
if (f > N) {
|
|
247
|
+
let g = 0;
|
|
248
|
+
const A = f % N, p = f - A;
|
|
249
|
+
for (; g < p; ) d(this.pattern.substr(g, N), g), g += N;
|
|
250
|
+
if (A) {
|
|
251
|
+
const m = f - N;
|
|
252
|
+
d(this.pattern.substr(m), m);
|
|
253
|
+
}
|
|
254
|
+
} else d(this.pattern, 0);
|
|
255
|
+
}
|
|
256
|
+
searchIn(e) {
|
|
257
|
+
const { isCaseSensitive: i, ignoreDiacritics: s, includeMatches: n } = this.options;
|
|
258
|
+
if (e = i ? e : e.toLowerCase(), e = s ? W(e) : e, this.pattern === e) {
|
|
259
|
+
let p = { isMatch: !0, score: 0 };
|
|
260
|
+
return n && (p.indices = [[0, e.length - 1]]), p;
|
|
261
|
+
}
|
|
262
|
+
const { location: u, distance: c, threshold: o, findAllMatches: r, minMatchCharLength: a, ignoreLocation: h } = this.options;
|
|
263
|
+
let d = [], f = 0, g = !1;
|
|
264
|
+
this.chunks.forEach(({ pattern: p, alphabet: m, startIndex: F }) => {
|
|
265
|
+
const { isMatch: L, score: D, indices: M } = ge(e, p, m, { location: u + F, distance: c, threshold: o, findAllMatches: r, minMatchCharLength: a, includeMatches: n, ignoreLocation: h });
|
|
266
|
+
L && (g = !0), f += D, L && M && (d = [...d, ...M]);
|
|
267
|
+
});
|
|
268
|
+
let A = { isMatch: g, score: g ? f / this.chunks.length : 1 };
|
|
269
|
+
return g && n && (A.indices = d), A;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
class I {
|
|
273
|
+
constructor(e) {
|
|
274
|
+
this.pattern = e;
|
|
275
|
+
}
|
|
276
|
+
static isMultiMatch(e) {
|
|
277
|
+
return X(e, this.multiRegex);
|
|
278
|
+
}
|
|
279
|
+
static isSingleMatch(e) {
|
|
280
|
+
return X(e, this.singleRegex);
|
|
281
|
+
}
|
|
282
|
+
search() {
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
function X(t, e) {
|
|
286
|
+
const i = t.match(e);
|
|
287
|
+
return i ? i[1] : null;
|
|
288
|
+
}
|
|
289
|
+
class ce extends I {
|
|
290
|
+
constructor(e, { location: i = l.location, threshold: s = l.threshold, distance: n = l.distance, includeMatches: u = l.includeMatches, findAllMatches: c = l.findAllMatches, minMatchCharLength: o = l.minMatchCharLength, isCaseSensitive: r = l.isCaseSensitive, ignoreDiacritics: a = l.ignoreDiacritics, ignoreLocation: h = l.ignoreLocation } = {}) {
|
|
291
|
+
super(e), this._bitapSearch = new ue(e, { location: i, threshold: s, distance: n, includeMatches: u, findAllMatches: c, minMatchCharLength: o, isCaseSensitive: r, ignoreDiacritics: a, ignoreLocation: h });
|
|
292
|
+
}
|
|
293
|
+
static get type() {
|
|
294
|
+
return "fuzzy";
|
|
295
|
+
}
|
|
296
|
+
static get multiRegex() {
|
|
297
|
+
return /^"(.*)"$/;
|
|
298
|
+
}
|
|
299
|
+
static get singleRegex() {
|
|
300
|
+
return /^(.*)$/;
|
|
301
|
+
}
|
|
302
|
+
search(e) {
|
|
303
|
+
return this._bitapSearch.searchIn(e);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
class oe extends I {
|
|
307
|
+
constructor(e) {
|
|
308
|
+
super(e);
|
|
309
|
+
}
|
|
310
|
+
static get type() {
|
|
311
|
+
return "include";
|
|
312
|
+
}
|
|
313
|
+
static get multiRegex() {
|
|
314
|
+
return /^'"(.*)"$/;
|
|
315
|
+
}
|
|
316
|
+
static get singleRegex() {
|
|
317
|
+
return /^'(.*)$/;
|
|
318
|
+
}
|
|
319
|
+
search(e) {
|
|
320
|
+
let i, s = 0;
|
|
321
|
+
const n = [], u = this.pattern.length;
|
|
322
|
+
for (; (i = e.indexOf(this.pattern, s)) > -1; ) s = i + u, n.push([i, s - 1]);
|
|
323
|
+
const c = !!n.length;
|
|
324
|
+
return { isMatch: c, score: c ? 0 : 1, indices: n };
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
const J = [class extends I {
|
|
328
|
+
constructor(t) {
|
|
329
|
+
super(t);
|
|
330
|
+
}
|
|
331
|
+
static get type() {
|
|
332
|
+
return "exact";
|
|
333
|
+
}
|
|
334
|
+
static get multiRegex() {
|
|
335
|
+
return /^="(.*)"$/;
|
|
336
|
+
}
|
|
337
|
+
static get singleRegex() {
|
|
338
|
+
return /^=(.*)$/;
|
|
339
|
+
}
|
|
340
|
+
search(t) {
|
|
341
|
+
const e = t === this.pattern;
|
|
342
|
+
return { isMatch: e, score: e ? 0 : 1, indices: [0, this.pattern.length - 1] };
|
|
343
|
+
}
|
|
344
|
+
}, oe, class extends I {
|
|
345
|
+
constructor(t) {
|
|
346
|
+
super(t);
|
|
347
|
+
}
|
|
348
|
+
static get type() {
|
|
349
|
+
return "prefix-exact";
|
|
350
|
+
}
|
|
351
|
+
static get multiRegex() {
|
|
352
|
+
return /^\^"(.*)"$/;
|
|
353
|
+
}
|
|
354
|
+
static get singleRegex() {
|
|
355
|
+
return /^\^(.*)$/;
|
|
356
|
+
}
|
|
357
|
+
search(t) {
|
|
358
|
+
const e = t.startsWith(this.pattern);
|
|
359
|
+
return { isMatch: e, score: e ? 0 : 1, indices: [0, this.pattern.length - 1] };
|
|
360
|
+
}
|
|
361
|
+
}, class extends I {
|
|
362
|
+
constructor(t) {
|
|
363
|
+
super(t);
|
|
364
|
+
}
|
|
365
|
+
static get type() {
|
|
366
|
+
return "inverse-prefix-exact";
|
|
367
|
+
}
|
|
368
|
+
static get multiRegex() {
|
|
369
|
+
return /^!\^"(.*)"$/;
|
|
370
|
+
}
|
|
371
|
+
static get singleRegex() {
|
|
372
|
+
return /^!\^(.*)$/;
|
|
373
|
+
}
|
|
374
|
+
search(t) {
|
|
375
|
+
const e = !t.startsWith(this.pattern);
|
|
376
|
+
return { isMatch: e, score: e ? 0 : 1, indices: [0, t.length - 1] };
|
|
377
|
+
}
|
|
378
|
+
}, class extends I {
|
|
379
|
+
constructor(t) {
|
|
380
|
+
super(t);
|
|
381
|
+
}
|
|
382
|
+
static get type() {
|
|
383
|
+
return "inverse-suffix-exact";
|
|
384
|
+
}
|
|
385
|
+
static get multiRegex() {
|
|
386
|
+
return /^!"(.*)"\$$/;
|
|
387
|
+
}
|
|
388
|
+
static get singleRegex() {
|
|
389
|
+
return /^!(.*)\$$/;
|
|
390
|
+
}
|
|
391
|
+
search(t) {
|
|
392
|
+
const e = !t.endsWith(this.pattern);
|
|
393
|
+
return { isMatch: e, score: e ? 0 : 1, indices: [0, t.length - 1] };
|
|
394
|
+
}
|
|
395
|
+
}, class extends I {
|
|
396
|
+
constructor(t) {
|
|
397
|
+
super(t);
|
|
398
|
+
}
|
|
399
|
+
static get type() {
|
|
400
|
+
return "suffix-exact";
|
|
401
|
+
}
|
|
402
|
+
static get multiRegex() {
|
|
403
|
+
return /^"(.*)"\$$/;
|
|
404
|
+
}
|
|
405
|
+
static get singleRegex() {
|
|
406
|
+
return /^(.*)\$$/;
|
|
407
|
+
}
|
|
408
|
+
search(t) {
|
|
409
|
+
const e = t.endsWith(this.pattern);
|
|
410
|
+
return { isMatch: e, score: e ? 0 : 1, indices: [t.length - this.pattern.length, t.length - 1] };
|
|
411
|
+
}
|
|
412
|
+
}, class extends I {
|
|
413
|
+
constructor(t) {
|
|
414
|
+
super(t);
|
|
415
|
+
}
|
|
416
|
+
static get type() {
|
|
417
|
+
return "inverse-exact";
|
|
418
|
+
}
|
|
419
|
+
static get multiRegex() {
|
|
420
|
+
return /^!"(.*)"$/;
|
|
421
|
+
}
|
|
422
|
+
static get singleRegex() {
|
|
423
|
+
return /^!(.*)$/;
|
|
424
|
+
}
|
|
425
|
+
search(t) {
|
|
426
|
+
const e = t.indexOf(this.pattern) === -1;
|
|
427
|
+
return { isMatch: e, score: e ? 0 : 1, indices: [0, t.length - 1] };
|
|
428
|
+
}
|
|
429
|
+
}, ce], Y = J.length, Ae = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, pe = /* @__PURE__ */ new Set([ce.type, oe.type]), V = [];
|
|
430
|
+
function Q(t, e) {
|
|
431
|
+
for (let i = 0, s = V.length; i < s; i += 1) {
|
|
432
|
+
let n = V[i];
|
|
433
|
+
if (n.condition(t, e)) return new n(t, e);
|
|
434
|
+
}
|
|
435
|
+
return new ue(t, e);
|
|
436
|
+
}
|
|
437
|
+
const G = "$and", Z = "$path", P = (t) => !(!t[G] && !t.$or), ee = (t) => ({ [G]: Object.keys(t).map((e) => ({ [e]: t[e] })) });
|
|
438
|
+
function he(t, e, { auto: i = !0 } = {}) {
|
|
439
|
+
const s = (n) => {
|
|
440
|
+
let u = Object.keys(n);
|
|
441
|
+
const c = ((r) => !!r[Z])(n);
|
|
442
|
+
if (!c && u.length > 1 && !P(n)) return s(ee(n));
|
|
443
|
+
if (((r) => !S(r) && ie(r) && !P(r))(n)) {
|
|
444
|
+
const r = c ? n[Z] : u[0], a = c ? n.$val : n[r];
|
|
445
|
+
if (!v(a)) throw new Error(((d) => `Invalid value for key ${d}`)(r));
|
|
446
|
+
const h = { keyId: q(r), pattern: a };
|
|
447
|
+
return i && (h.searcher = Q(a, e)), h;
|
|
448
|
+
}
|
|
449
|
+
let o = { children: [], operator: u[0] };
|
|
450
|
+
return u.forEach((r) => {
|
|
451
|
+
const a = n[r];
|
|
452
|
+
S(a) && a.forEach((h) => {
|
|
453
|
+
o.children.push(s(h));
|
|
454
|
+
});
|
|
455
|
+
}), o;
|
|
456
|
+
};
|
|
457
|
+
return P(t) || (t = ee(t)), s(t);
|
|
458
|
+
}
|
|
459
|
+
function Ce(t, e) {
|
|
460
|
+
const i = t.matches;
|
|
461
|
+
e.matches = [], E(i) && i.forEach((s) => {
|
|
462
|
+
if (!E(s.indices) || !s.indices.length) return;
|
|
463
|
+
const { indices: n, value: u } = s;
|
|
464
|
+
let c = { indices: n, value: u };
|
|
465
|
+
s.key && (c.key = s.key.src), s.idx > -1 && (c.refIndex = s.idx), e.matches.push(c);
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
function me(t, e) {
|
|
469
|
+
e.score = t.score;
|
|
470
|
+
}
|
|
471
|
+
class O {
|
|
472
|
+
constructor(e, i = {}, s) {
|
|
473
|
+
this.options = { ...l, ...i }, this.options.useExtendedSearch, this._keyStore = new le(this.options.keys), this.setCollection(e, s);
|
|
474
|
+
}
|
|
475
|
+
setCollection(e, i) {
|
|
476
|
+
if (this._docs = e, i && !(i instanceof U)) throw new Error("Incorrect 'index' type");
|
|
477
|
+
this._myIndex = i || re(this.options.keys, this._docs, { getFn: this.options.getFn, fieldNormWeight: this.options.fieldNormWeight });
|
|
478
|
+
}
|
|
479
|
+
add(e) {
|
|
480
|
+
E(e) && (this._docs.push(e), this._myIndex.add(e));
|
|
481
|
+
}
|
|
482
|
+
remove(e = () => !1) {
|
|
483
|
+
const i = [];
|
|
484
|
+
for (let s = 0, n = this._docs.length; s < n; s += 1) {
|
|
485
|
+
const u = this._docs[s];
|
|
486
|
+
e(u, s) && (this.removeAt(s), s -= 1, n -= 1, i.push(u));
|
|
487
|
+
}
|
|
488
|
+
return i;
|
|
489
|
+
}
|
|
490
|
+
removeAt(e) {
|
|
491
|
+
this._docs.splice(e, 1), this._myIndex.removeAt(e);
|
|
492
|
+
}
|
|
493
|
+
getIndex() {
|
|
494
|
+
return this._myIndex;
|
|
495
|
+
}
|
|
496
|
+
search(e, { limit: i = -1 } = {}) {
|
|
497
|
+
const { includeMatches: s, includeScore: n, shouldSort: u, sortFn: c, ignoreFieldNorm: o } = this.options;
|
|
498
|
+
let r = v(e) ? v(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
|
|
499
|
+
return function(a, { ignoreFieldNorm: h = l.ignoreFieldNorm }) {
|
|
500
|
+
a.forEach((d) => {
|
|
501
|
+
let f = 1;
|
|
502
|
+
d.matches.forEach(({ key: g, norm: A, score: p }) => {
|
|
503
|
+
const m = g ? g.weight : null;
|
|
504
|
+
f *= Math.pow(p === 0 && m ? Number.EPSILON : p, (m || 1) * (h ? 1 : A));
|
|
505
|
+
}), d.score = f;
|
|
506
|
+
});
|
|
507
|
+
}(r, { ignoreFieldNorm: o }), u && r.sort(c), te(i) && i > -1 && (r = r.slice(0, i)), function(a, h, { includeMatches: d = l.includeMatches, includeScore: f = l.includeScore } = {}) {
|
|
508
|
+
const g = [];
|
|
509
|
+
return d && g.push(Ce), f && g.push(me), a.map((A) => {
|
|
510
|
+
const { idx: p } = A, m = { item: h[p], refIndex: p };
|
|
511
|
+
return g.length && g.forEach((F) => {
|
|
512
|
+
F(A, m);
|
|
513
|
+
}), m;
|
|
514
|
+
});
|
|
515
|
+
}(r, this._docs, { includeMatches: s, includeScore: n });
|
|
516
|
+
}
|
|
517
|
+
_searchStringList(e) {
|
|
518
|
+
const i = Q(e, this.options), { records: s } = this._myIndex, n = [];
|
|
519
|
+
return s.forEach(({ v: u, i: c, n: o }) => {
|
|
520
|
+
if (!E(u)) return;
|
|
521
|
+
const { isMatch: r, score: a, indices: h } = i.searchIn(u);
|
|
522
|
+
r && n.push({ item: u, idx: c, matches: [{ score: a, value: u, norm: o, indices: h }] });
|
|
523
|
+
}), n;
|
|
524
|
+
}
|
|
525
|
+
_searchLogical(e) {
|
|
526
|
+
const i = he(e, this.options), s = (o, r, a) => {
|
|
527
|
+
if (!o.children) {
|
|
528
|
+
const { keyId: d, searcher: f } = o, g = this._findMatches({ key: this._keyStore.get(d), value: this._myIndex.getValueForItemAtKeyId(r, d), searcher: f });
|
|
529
|
+
return g && g.length ? [{ idx: a, item: r, matches: g }] : [];
|
|
530
|
+
}
|
|
531
|
+
const h = [];
|
|
532
|
+
for (let d = 0, f = o.children.length; d < f; d += 1) {
|
|
533
|
+
const g = o.children[d], A = s(g, r, a);
|
|
534
|
+
if (A.length) h.push(...A);
|
|
535
|
+
else if (o.operator === G) return [];
|
|
536
|
+
}
|
|
537
|
+
return h;
|
|
538
|
+
}, n = this._myIndex.records, u = {}, c = [];
|
|
539
|
+
return n.forEach(({ $: o, i: r }) => {
|
|
540
|
+
if (E(o)) {
|
|
541
|
+
let a = s(i, o, r);
|
|
542
|
+
a.length && (u[r] || (u[r] = { idx: r, item: o, matches: [] }, c.push(u[r])), a.forEach(({ matches: h }) => {
|
|
543
|
+
u[r].matches.push(...h);
|
|
544
|
+
}));
|
|
545
|
+
}
|
|
546
|
+
}), c;
|
|
547
|
+
}
|
|
548
|
+
_searchObjectList(e) {
|
|
549
|
+
const i = Q(e, this.options), { keys: s, records: n } = this._myIndex, u = [];
|
|
550
|
+
return n.forEach(({ $: c, i: o }) => {
|
|
551
|
+
if (!E(c)) return;
|
|
552
|
+
let r = [];
|
|
553
|
+
s.forEach((a, h) => {
|
|
554
|
+
r.push(...this._findMatches({ key: a, value: c[h], searcher: i }));
|
|
555
|
+
}), r.length && u.push({ idx: o, item: c, matches: r });
|
|
556
|
+
}), u;
|
|
557
|
+
}
|
|
558
|
+
_findMatches({ key: e, value: i, searcher: s }) {
|
|
559
|
+
if (!E(i)) return [];
|
|
560
|
+
let n = [];
|
|
561
|
+
if (S(i)) i.forEach(({ v: u, i: c, n: o }) => {
|
|
562
|
+
if (!E(u)) return;
|
|
563
|
+
const { isMatch: r, score: a, indices: h } = s.searchIn(u);
|
|
564
|
+
r && n.push({ score: a, key: e, value: u, idx: c, norm: o, indices: h });
|
|
565
|
+
});
|
|
566
|
+
else {
|
|
567
|
+
const { v: u, n: c } = i, { isMatch: o, score: r, indices: a } = s.searchIn(u);
|
|
568
|
+
o && n.push({ score: r, key: e, value: u, norm: c, indices: a });
|
|
569
|
+
}
|
|
570
|
+
return n;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
O.version = "7.1.0", O.createIndex = re, O.parseIndex = function(t, { getFn: e = l.getFn, fieldNormWeight: i = l.fieldNormWeight } = {}) {
|
|
574
|
+
const { keys: s, records: n } = t, u = new U({ getFn: e, fieldNormWeight: i });
|
|
575
|
+
return u.setKeys(s), u.setIndexRecords(n), u;
|
|
576
|
+
}, O.config = l, O.parseQuery = he, function(...t) {
|
|
577
|
+
V.push(...t);
|
|
578
|
+
}(class {
|
|
579
|
+
constructor(t, { isCaseSensitive: e = l.isCaseSensitive, ignoreDiacritics: i = l.ignoreDiacritics, includeMatches: s = l.includeMatches, minMatchCharLength: n = l.minMatchCharLength, ignoreLocation: u = l.ignoreLocation, findAllMatches: c = l.findAllMatches, location: o = l.location, threshold: r = l.threshold, distance: a = l.distance } = {}) {
|
|
580
|
+
this.query = null, this.options = { isCaseSensitive: e, ignoreDiacritics: i, includeMatches: s, minMatchCharLength: n, findAllMatches: c, ignoreLocation: u, location: o, threshold: r, distance: a }, t = e ? t : t.toLowerCase(), t = i ? W(t) : t, this.pattern = t, this.query = function(h, d = {}) {
|
|
581
|
+
return h.split("|").map((f) => {
|
|
582
|
+
let g = f.trim().split(Ae).filter((p) => p && !!p.trim()), A = [];
|
|
583
|
+
for (let p = 0, m = g.length; p < m; p += 1) {
|
|
584
|
+
const F = g[p];
|
|
585
|
+
let L = !1, D = -1;
|
|
586
|
+
for (; !L && ++D < Y; ) {
|
|
587
|
+
const M = J[D];
|
|
588
|
+
let w = M.isMultiMatch(F);
|
|
589
|
+
w && (A.push(new M(w, d)), L = !0);
|
|
590
|
+
}
|
|
591
|
+
if (!L) for (D = -1; ++D < Y; ) {
|
|
592
|
+
const M = J[D];
|
|
593
|
+
let w = M.isSingleMatch(F);
|
|
594
|
+
if (w) {
|
|
595
|
+
A.push(new M(w, d));
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
return A;
|
|
601
|
+
});
|
|
602
|
+
}(this.pattern, this.options);
|
|
603
|
+
}
|
|
604
|
+
static condition(t, e) {
|
|
605
|
+
return e.useExtendedSearch;
|
|
606
|
+
}
|
|
607
|
+
searchIn(t) {
|
|
608
|
+
const e = this.query;
|
|
609
|
+
if (!e) return { isMatch: !1, score: 1 };
|
|
610
|
+
const { includeMatches: i, isCaseSensitive: s, ignoreDiacritics: n } = this.options;
|
|
611
|
+
t = s ? t : t.toLowerCase(), t = n ? W(t) : t;
|
|
612
|
+
let u = 0, c = [], o = 0;
|
|
613
|
+
for (let r = 0, a = e.length; r < a; r += 1) {
|
|
614
|
+
const h = e[r];
|
|
615
|
+
c.length = 0, u = 0;
|
|
616
|
+
for (let d = 0, f = h.length; d < f; d += 1) {
|
|
617
|
+
const g = h[d], { isMatch: A, indices: p, score: m } = g.search(t);
|
|
618
|
+
if (!A) {
|
|
619
|
+
o = 0, u = 0, c.length = 0;
|
|
620
|
+
break;
|
|
621
|
+
}
|
|
622
|
+
if (u += 1, o += m, i) {
|
|
623
|
+
const F = g.constructor.type;
|
|
624
|
+
pe.has(F) ? c = [...c, ...p] : c.push(p);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
if (u) {
|
|
628
|
+
let d = { isMatch: !0, score: o / u };
|
|
629
|
+
return i && (d.indices = c), d;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
return { isMatch: !1, score: 1 };
|
|
633
|
+
}
|
|
634
|
+
});
|
|
635
|
+
export {
|
|
636
|
+
O as default
|
|
637
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { g as c } from "./phYz0vGgqIEQ2hco.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.12
|
|
4
|
+
*
|
|
5
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
7
|
+
*/
|
|
8
|
+
function g(o, i) {
|
|
9
|
+
for (var n = 0; n < i.length; n++) {
|
|
10
|
+
const t = i[n];
|
|
11
|
+
if (typeof t != "string" && !Array.isArray(t)) {
|
|
12
|
+
for (const e in t) if (e !== "default" && !(e in o)) {
|
|
13
|
+
const r = Object.getOwnPropertyDescriptor(t, e);
|
|
14
|
+
r && Object.defineProperty(o, e, r.get ? r : { enumerable: !0, get: () => t[e] });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return Object.freeze(Object.defineProperty(o, Symbol.toStringTag, { value: "Module" }));
|
|
19
|
+
}
|
|
20
|
+
var l, y, p = { exports: {} }, f = {}, u = (y || (y = 1, p.exports = function() {
|
|
21
|
+
if (l) return f;
|
|
22
|
+
l = 1;
|
|
23
|
+
var o = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
|
|
24
|
+
function n(t, e, r) {
|
|
25
|
+
var a = null;
|
|
26
|
+
if (r !== void 0 && (a = "" + r), e.key !== void 0 && (a = "" + e.key), "key" in e) for (var s in r = {}, e) s !== "key" && (r[s] = e[s]);
|
|
27
|
+
else r = e;
|
|
28
|
+
return e = r.ref, { $$typeof: o, type: t, key: a, ref: e !== void 0 ? e : null, props: r };
|
|
29
|
+
}
|
|
30
|
+
return f.Fragment = i, f.jsx = n, f.jsxs = n, f;
|
|
31
|
+
}()), p.exports);
|
|
32
|
+
const m = g({ __proto__: null, default: c(u) }, [u]);
|
|
33
|
+
export {
|
|
34
|
+
u as a,
|
|
35
|
+
m as j
|
|
36
|
+
};
|