@storybook/core
Version:
Storybook framework-agnostic API
1,628 lines (1,605 loc) • 413 kB
JavaScript
var Nd = Object.create;
var tn = Object.defineProperty;
var Rd = Object.getOwnPropertyDescriptor;
var Fd = Object.getOwnPropertyNames;
var Hd = Object.getPrototypeOf, Bd = Object.prototype.hasOwnProperty;
var a = (e, t) => tn(e, "name", { value: t, configurable: !0 }), ro = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy <
"u" ? new Proxy(e, {
get: (t, o) => (typeof require < "u" ? require : t)[o]
}) : e)(function(e) {
if (typeof require < "u") return require.apply(this, arguments);
throw Error('Dynamic require of "' + e + '" is not supported');
});
var Ee = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
var zd = (e, t, o, i) => {
if (t && typeof t == "object" || typeof t == "function")
for (let n of Fd(t))
!Bd.call(e, n) && n !== o && tn(e, n, { get: () => t[n], enumerable: !(i = Rd(t, n)) || i.enumerable });
return e;
};
var ze = (e, t, o) => (o = e != null ? Nd(Hd(e)) : {}, zd(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
t || !e || !e.__esModule ? tn(o, "default", { value: e, enumerable: !0 }) : o,
e
));
// ../node_modules/prop-types/lib/ReactPropTypesSecret.js
var ya = Ee((gw, ga) => {
"use strict";
var jd = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
ga.exports = jd;
});
// ../node_modules/prop-types/factoryWithThrowingShims.js
var Sa = Ee((yw, xa) => {
"use strict";
var Vd = ya();
function ba() {
}
a(ba, "emptyFunction");
function va() {
}
a(va, "emptyFunctionWithReset");
va.resetWarningCache = ba;
xa.exports = function() {
function e(i, n, r, l, u, c) {
if (c !== Vd) {
var p = new Error(
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. \
Read more at http://fb.me/use-check-prop-types"
);
throw p.name = "Invariant Violation", p;
}
}
a(e, "shim"), e.isRequired = e;
function t() {
return e;
}
a(t, "getShim");
var o = {
array: e,
bigint: e,
bool: e,
func: e,
number: e,
object: e,
string: e,
symbol: e,
any: e,
arrayOf: t,
element: e,
elementType: e,
instanceOf: t,
node: e,
objectOf: t,
oneOf: t,
oneOfType: t,
shape: t,
exact: t,
checkPropTypes: va,
resetWarningCache: ba
};
return o.PropTypes = o, o;
};
});
// ../node_modules/prop-types/index.js
var pn = Ee((Sw, Ia) => {
Ia.exports = Sa()();
var vw, xw;
});
// ../node_modules/react-fast-compare/index.js
var _a = Ee((Iw, Ea) => {
var Kd = typeof Element < "u", $d = typeof Map == "function", Ud = typeof Set == "function", Gd = typeof ArrayBuffer == "function" && !!ArrayBuffer.
isView;
function jo(e, t) {
if (e === t) return !0;
if (e && t && typeof e == "object" && typeof t == "object") {
if (e.constructor !== t.constructor) return !1;
var o, i, n;
if (Array.isArray(e)) {
if (o = e.length, o != t.length) return !1;
for (i = o; i-- !== 0; )
if (!jo(e[i], t[i])) return !1;
return !0;
}
var r;
if ($d && e instanceof Map && t instanceof Map) {
if (e.size !== t.size) return !1;
for (r = e.entries(); !(i = r.next()).done; )
if (!t.has(i.value[0])) return !1;
for (r = e.entries(); !(i = r.next()).done; )
if (!jo(i.value[1], t.get(i.value[0]))) return !1;
return !0;
}
if (Ud && e instanceof Set && t instanceof Set) {
if (e.size !== t.size) return !1;
for (r = e.entries(); !(i = r.next()).done; )
if (!t.has(i.value[0])) return !1;
return !0;
}
if (Gd && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
if (o = e.length, o != t.length) return !1;
for (i = o; i-- !== 0; )
if (e[i] !== t[i]) return !1;
return !0;
}
if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof t.valueOf == "function") return e.valueOf() ===
t.valueOf();
if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof t.toString == "function") return e.toString() ===
t.toString();
if (n = Object.keys(e), o = n.length, o !== Object.keys(t).length) return !1;
for (i = o; i-- !== 0; )
if (!Object.prototype.hasOwnProperty.call(t, n[i])) return !1;
if (Kd && e instanceof Element) return !1;
for (i = o; i-- !== 0; )
if (!((n[i] === "_owner" || n[i] === "__v" || n[i] === "__o") && e.$$typeof) && !jo(e[n[i]], t[n[i]]))
return !1;
return !0;
}
return e !== e && t !== t;
}
a(jo, "equal");
Ea.exports = /* @__PURE__ */ a(function(t, o) {
try {
return jo(t, o);
} catch (i) {
if ((i.message || "").match(/stack|recursion/i))
return console.warn("react-fast-compare cannot handle circular refs"), !1;
throw i;
}
}, "isEqual");
});
// ../node_modules/invariant/browser.js
var Ta = Ee((_w, wa) => {
"use strict";
var Yd = /* @__PURE__ */ a(function(e, t, o, i, n, r, l, u) {
if (!e) {
var c;
if (t === void 0)
c = new Error(
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
);
else {
var p = [o, i, n, r, l, u], d = 0;
c = new Error(
t.replace(/%s/g, function() {
return p[d++];
})
), c.name = "Invariant Violation";
}
throw c.framesToPop = 1, c;
}
}, "invariant");
wa.exports = Yd;
});
// ../node_modules/shallowequal/index.js
var ka = Ee((Tw, Ca) => {
Ca.exports = /* @__PURE__ */ a(function(t, o, i, n) {
var r = i ? i.call(n, t, o) : void 0;
if (r !== void 0)
return !!r;
if (t === o)
return !0;
if (typeof t != "object" || !t || typeof o != "object" || !o)
return !1;
var l = Object.keys(t), u = Object.keys(o);
if (l.length !== u.length)
return !1;
for (var c = Object.prototype.hasOwnProperty.bind(o), p = 0; p < l.length; p++) {
var d = l[p];
if (!c(d))
return !1;
var g = t[d], h = o[d];
if (r = i ? i.call(n, g, h, d) : void 0, r === !1 || r === void 0 && g !== h)
return !1;
}
return !0;
}, "shallowEqual");
});
// ../node_modules/memoizerific/memoizerific.js
var zn = Ee((El, Bn) => {
(function(e) {
if (typeof El == "object" && typeof Bn < "u")
Bn.exports = e();
else if (typeof define == "function" && define.amd)
define([], e);
else {
var t;
typeof window < "u" ? t = window : typeof global < "u" ? t = global : typeof self < "u" ? t = self : t = this, t.memoizerific = e();
}
})(function() {
var e, t, o;
return (/* @__PURE__ */ a(function i(n, r, l) {
function u(d, g) {
if (!r[d]) {
if (!n[d]) {
var h = typeof ro == "function" && ro;
if (!g && h) return h(d, !0);
if (c) return c(d, !0);
var y = new Error("Cannot find module '" + d + "'");
throw y.code = "MODULE_NOT_FOUND", y;
}
var f = r[d] = { exports: {} };
n[d][0].call(f.exports, function(b) {
var I = n[d][1][b];
return u(I || b);
}, f, f.exports, i, n, r, l);
}
return r[d].exports;
}
a(u, "s");
for (var c = typeof ro == "function" && ro, p = 0; p < l.length; p++) u(l[p]);
return u;
}, "e"))({ 1: [function(i, n, r) {
n.exports = function(l) {
if (typeof Map != "function" || l) {
var u = i("./similar");
return new u();
} else
return /* @__PURE__ */ new Map();
};
}, { "./similar": 2 }], 2: [function(i, n, r) {
function l() {
return this.list = [], this.lastItem = void 0, this.size = 0, this;
}
a(l, "Similar"), l.prototype.get = function(u) {
var c;
if (this.lastItem && this.isEqual(this.lastItem.key, u))
return this.lastItem.val;
if (c = this.indexOf(u), c >= 0)
return this.lastItem = this.list[c], this.list[c].val;
}, l.prototype.set = function(u, c) {
var p;
return this.lastItem && this.isEqual(this.lastItem.key, u) ? (this.lastItem.val = c, this) : (p = this.indexOf(u), p >= 0 ? (this.lastItem =
this.list[p], this.list[p].val = c, this) : (this.lastItem = { key: u, val: c }, this.list.push(this.lastItem), this.size++, this));
}, l.prototype.delete = function(u) {
var c;
if (this.lastItem && this.isEqual(this.lastItem.key, u) && (this.lastItem = void 0), c = this.indexOf(u), c >= 0)
return this.size--, this.list.splice(c, 1)[0];
}, l.prototype.has = function(u) {
var c;
return this.lastItem && this.isEqual(this.lastItem.key, u) ? !0 : (c = this.indexOf(u), c >= 0 ? (this.lastItem = this.list[c], !0) :
!1);
}, l.prototype.forEach = function(u, c) {
var p;
for (p = 0; p < this.size; p++)
u.call(c || this, this.list[p].val, this.list[p].key, this);
}, l.prototype.indexOf = function(u) {
var c;
for (c = 0; c < this.size; c++)
if (this.isEqual(this.list[c].key, u))
return c;
return -1;
}, l.prototype.isEqual = function(u, c) {
return u === c || u !== u && c !== c;
}, n.exports = l;
}, {}], 3: [function(i, n, r) {
var l = i("map-or-similar");
n.exports = function(d) {
var g = new l(!1), h = [];
return function(y) {
var f = /* @__PURE__ */ a(function() {
var b = g, I, _, m = arguments.length - 1, v = Array(m + 1), S = !0, E;
if ((f.numArgs || f.numArgs === 0) && f.numArgs !== m + 1)
throw new Error("Memoizerific functions should always be called with the same number of arguments");
for (E = 0; E < m; E++) {
if (v[E] = {
cacheItem: b,
arg: arguments[E]
}, b.has(arguments[E])) {
b = b.get(arguments[E]);
continue;
}
S = !1, I = new l(!1), b.set(arguments[E], I), b = I;
}
return S && (b.has(arguments[m]) ? _ = b.get(arguments[m]) : S = !1), S || (_ = y.apply(null, arguments), b.set(arguments[m], _)),
d > 0 && (v[m] = {
cacheItem: b,
arg: arguments[m]
}, S ? u(h, v) : h.push(v), h.length > d && c(h.shift())), f.wasMemoized = S, f.numArgs = m + 1, _;
}, "memoizerific");
return f.limit = d, f.wasMemoized = !1, f.cache = g, f.lru = h, f;
};
};
function u(d, g) {
var h = d.length, y = g.length, f, b, I;
for (b = 0; b < h; b++) {
for (f = !0, I = 0; I < y; I++)
if (!p(d[b][I].arg, g[I].arg)) {
f = !1;
break;
}
if (f)
break;
}
d.push(d.splice(b, 1)[0]);
}
a(u, "moveToMostRecentLru");
function c(d) {
var g = d.length, h = d[g - 1], y, f;
for (h.cacheItem.delete(h.arg), f = g - 2; f >= 0 && (h = d[f], y = h.cacheItem.get(h.arg), !y || !y.size); f--)
h.cacheItem.delete(h.arg);
}
a(c, "removeCachedResult");
function p(d, g) {
return d === g || d !== d && g !== g;
}
a(p, "isEqual");
}, { "map-or-similar": 1 }] }, {}, [3])(3);
});
});
// ../node_modules/picoquery/lib/string-util.js
var jn = Ee((Wn) => {
"use strict";
Object.defineProperty(Wn, "__esModule", { value: !0 });
Wn.encodeString = xm;
var rt = Array.from({ length: 256 }, (e, t) => "%" + ((t < 16 ? "0" : "") + t.toString(16)).toUpperCase()), vm = new Int8Array([
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
1,
0
]);
function xm(e) {
let t = e.length;
if (t === 0)
return "";
let o = "", i = 0, n = 0;
e: for (; n < t; n++) {
let r = e.charCodeAt(n);
for (; r < 128; ) {
if (vm[r] !== 1 && (i < n && (o += e.slice(i, n)), i = n + 1, o += rt[r]), ++n === t)
break e;
r = e.charCodeAt(n);
}
if (i < n && (o += e.slice(i, n)), r < 2048) {
i = n + 1, o += rt[192 | r >> 6] + rt[128 | r & 63];
continue;
}
if (r < 55296 || r >= 57344) {
i = n + 1, o += rt[224 | r >> 12] + rt[128 | r >> 6 & 63] + rt[128 | r & 63];
continue;
}
if (++n, n >= t)
throw new Error("URI malformed");
let l = e.charCodeAt(n) & 1023;
i = n + 1, r = 65536 + ((r & 1023) << 10 | l), o += rt[240 | r >> 18] + rt[128 | r >> 12 & 63] + rt[128 | r >> 6 & 63] + rt[128 | r & 63];
}
return i === 0 ? e : i < t ? o + e.slice(i) : o;
}
a(xm, "encodeString");
});
// ../node_modules/picoquery/lib/shared.js
var ur = Ee((nt) => {
"use strict";
Object.defineProperty(nt, "__esModule", { value: !0 });
nt.defaultOptions = nt.defaultShouldSerializeObject = nt.defaultValueSerializer = void 0;
var Vn = jn(), Sm = /* @__PURE__ */ a((e) => {
switch (typeof e) {
case "string":
return (0, Vn.encodeString)(e);
case "bigint":
case "boolean":
return "" + e;
case "number":
if (Number.isFinite(e))
return e < 1e21 ? "" + e : (0, Vn.encodeString)("" + e);
break;
}
return e instanceof Date ? (0, Vn.encodeString)(e.toISOString()) : "";
}, "defaultValueSerializer");
nt.defaultValueSerializer = Sm;
var Im = /* @__PURE__ */ a((e) => e instanceof Date, "defaultShouldSerializeObject");
nt.defaultShouldSerializeObject = Im;
var wl = /* @__PURE__ */ a((e) => e, "identityFunc");
nt.defaultOptions = {
nesting: !0,
nestingSyntax: "dot",
arrayRepeat: !1,
arrayRepeatSyntax: "repeat",
delimiter: 38,
valueDeserializer: wl,
valueSerializer: nt.defaultValueSerializer,
keyDeserializer: wl,
shouldSerializeObject: nt.defaultShouldSerializeObject
};
});
// ../node_modules/picoquery/lib/object-util.js
var Kn = Ee((cr) => {
"use strict";
Object.defineProperty(cr, "__esModule", { value: !0 });
cr.getDeepObject = wm;
cr.stringifyObject = Tl;
var Ot = ur(), Em = jn();
function _m(e) {
return e === "__proto__" || e === "constructor" || e === "prototype";
}
a(_m, "isPrototypeKey");
function wm(e, t, o, i, n) {
if (_m(t))
return e;
let r = e[t];
return typeof r == "object" && r !== null ? r : !i && (n || typeof o == "number" || typeof o == "string" && o * 0 === 0 && o.indexOf(".") ===
-1) ? e[t] = [] : e[t] = {};
}
a(wm, "getDeepObject");
var Tm = 20, Cm = "[]", km = "[", Om = "]", Pm = ".";
function Tl(e, t, o = 0, i, n) {
let { nestingSyntax: r = Ot.defaultOptions.nestingSyntax, arrayRepeat: l = Ot.defaultOptions.arrayRepeat, arrayRepeatSyntax: u = Ot.defaultOptions.
arrayRepeatSyntax, nesting: c = Ot.defaultOptions.nesting, delimiter: p = Ot.defaultOptions.delimiter, valueSerializer: d = Ot.defaultOptions.
valueSerializer, shouldSerializeObject: g = Ot.defaultOptions.shouldSerializeObject } = t, h = typeof p == "number" ? String.fromCharCode(
p) : p, y = n === !0 && l, f = r === "dot" || r === "js" && !n;
if (o > Tm)
return "";
let b = "", I = !0, _ = !1;
for (let m in e) {
let v = e[m], S;
i ? (S = i, y ? u === "bracket" && (S += Cm) : f ? (S += Pm, S += m) : (S += km, S += m, S += Om)) : S = m, I || (b += h), typeof v ==
"object" && v !== null && !g(v) ? (_ = v.pop !== void 0, (c || l && _) && (b += Tl(v, t, o + 1, S, _))) : (b += (0, Em.encodeString)(S),
b += "=", b += d(v, m)), I && (I = !1);
}
return b;
}
a(Tl, "stringifyObject");
});
// ../node_modules/fast-decode-uri-component/index.js
var Pl = Ee((ZO, Ol) => {
"use strict";
var Cl = 12, Am = 0, $n = [
// The first part of the table maps bytes to character to a transition.
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
7,
7,
10,
9,
9,
9,
11,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
// The second part of the table maps a state to a new state when adding a
// transition.
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
12,
0,
0,
0,
0,
24,
36,
48,
60,
72,
84,
96,
0,
12,
12,
12,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
24,
0,
0,
0,
0,
0,
0,
0,
0,
0,
24,
24,
24,
0,
0,
0,
0,
0,
0,
0,
0,
0,
24,
24,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
48,
48,
48,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
48,
48,
0,
0,
0,
0,
0,
0,
0,
0,
0,
48,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
// The third part maps the current transition to a mask that needs to apply
// to the byte.
127,
63,
63,
63,
0,
31,
15,
15,
15,
7,
7,
7
];
function Dm(e) {
var t = e.indexOf("%");
if (t === -1) return e;
for (var o = e.length, i = "", n = 0, r = 0, l = t, u = Cl; t > -1 && t < o; ) {
var c = kl(e[t + 1], 4), p = kl(e[t + 2], 0), d = c | p, g = $n[d];
if (u = $n[256 + u + g], r = r << 6 | d & $n[364 + g], u === Cl)
i += e.slice(n, l), i += r <= 65535 ? String.fromCharCode(r) : String.fromCharCode(
55232 + (r >> 10),
56320 + (r & 1023)
), r = 0, n = t + 3, t = l = e.indexOf("%", n);
else {
if (u === Am)
return null;
if (t += 3, t < o && e.charCodeAt(t) === 37) continue;
return null;
}
}
return i + e.slice(n);
}
a(Dm, "decodeURIComponent");
var Mm = {
0: 0,
1: 1,
2: 2,
3: 3,
4: 4,
5: 5,
6: 6,
7: 7,
8: 8,
9: 9,
a: 10,
A: 10,
b: 11,
B: 11,
c: 12,
C: 12,
d: 13,
D: 13,
e: 14,
E: 14,
f: 15,
F: 15
};
function kl(e, t) {
var o = Mm[e];
return o === void 0 ? 255 : o << t;
}
a(kl, "hexCodeToInt");
Ol.exports = Dm;
});
// ../node_modules/picoquery/lib/parse.js
var Ll = Ee((ct) => {
"use strict";
var Lm = ct && ct.__importDefault || function(e) {
return e && e.__esModule ? e : { default: e };
};
Object.defineProperty(ct, "__esModule", { value: !0 });
ct.numberValueDeserializer = ct.numberKeyDeserializer = void 0;
ct.parse = Fm;
var pr = Kn(), Pt = ur(), Al = Lm(Pl()), Nm = /* @__PURE__ */ a((e) => {
let t = Number(e);
return Number.isNaN(t) ? e : t;
}, "numberKeyDeserializer");
ct.numberKeyDeserializer = Nm;
var Rm = /* @__PURE__ */ a((e) => {
let t = Number(e);
return Number.isNaN(t) ? e : t;
}, "numberValueDeserializer");
ct.numberValueDeserializer = Rm;
var Dl = /\+/g, Ml = /* @__PURE__ */ a(function() {
}, "Empty");
Ml.prototype = /* @__PURE__ */ Object.create(null);
function dr(e, t, o, i, n) {
let r = e.substring(t, o);
return i && (r = r.replace(Dl, " ")), n && (r = (0, Al.default)(r) || r), r;
}
a(dr, "computeKeySlice");
function Fm(e, t) {
let { valueDeserializer: o = Pt.defaultOptions.valueDeserializer, keyDeserializer: i = Pt.defaultOptions.keyDeserializer, arrayRepeatSyntax: n = Pt.
defaultOptions.arrayRepeatSyntax, nesting: r = Pt.defaultOptions.nesting, arrayRepeat: l = Pt.defaultOptions.arrayRepeat, nestingSyntax: u = Pt.
defaultOptions.nestingSyntax, delimiter: c = Pt.defaultOptions.delimiter } = t ?? {}, p = typeof c == "string" ? c.charCodeAt(0) : c, d = u ===
"js", g = new Ml();
if (typeof e != "string")
return g;
let h = e.length, y = "", f = -1, b = -1, I = -1, _ = g, m, v = "", S = "", E = !1, T = !1, C = !1, k = !1, w = !1, O = !1, P = !1, D = 0,
M = -1, N = -1, Q = -1;
for (let V = 0; V < h + 1; V++) {
if (D = V !== h ? e.charCodeAt(V) : p, D === p) {
if (P = b > f, P || (b = V), I !== b - 1 && (S = dr(e, I + 1, M > -1 ? M : b, C, E), v = i(S), m !== void 0 && (_ = (0, pr.getDeepObject)(
_, m, v, d && w, d && O))), P || v !== "") {
P && (y = e.slice(b + 1, V), k && (y = y.replace(Dl, " ")), T && (y = (0, Al.default)(y) || y));
let X = o(y, v);
if (l) {
let H = _[v];
H === void 0 ? M > -1 ? _[v] = [X] : _[v] = X : H.pop ? H.push(X) : _[v] = [H, X];
} else
_[v] = X;
}
y = "", f = V, b = V, E = !1, T = !1, C = !1, k = !1, w = !1, O = !1, M = -1, I = V, _ = g, m = void 0, v = "";
} else D === 93 ? (l && n === "bracket" && Q === 91 && (M = N), r && (u === "index" || d) && b <= f && (I !== N && (S = dr(e, I + 1, V,
C, E), v = i(S), m !== void 0 && (_ = (0, pr.getDeepObject)(_, m, v, void 0, d)), m = v, C = !1, E = !1), I = V, O = !0, w = !1)) : D ===
46 ? r && (u === "dot" || d) && b <= f && (I !== N && (S = dr(e, I + 1, V, C, E), v = i(S), m !== void 0 && (_ = (0, pr.getDeepObject)(
_, m, v, d)), m = v, C = !1, E = !1), w = !0, O = !1, I = V) : D === 91 ? r && (u === "index" || d) && b <= f && (I !== N && (S = dr(e,
I + 1, V, C, E), v = i(S), d && m !== void 0 && (_ = (0, pr.getDeepObject)(_, m, v, d)), m = v, C = !1, E = !1, w = !1, O = !0), I = V) :
D === 61 ? b <= f ? b = V : T = !0 : D === 43 ? b > f ? k = !0 : C = !0 : D === 37 && (b > f ? T = !0 : E = !0);
N = V, Q = D;
}
return g;
}
a(Fm, "parse");
});
// ../node_modules/picoquery/lib/stringify.js
var Nl = Ee((Un) => {
"use strict";
Object.defineProperty(Un, "__esModule", { value: !0 });
Un.stringify = Bm;
var Hm = Kn();
function Bm(e, t) {
if (e === null || typeof e != "object")
return "";
let o = t ?? {};
return (0, Hm.stringifyObject)(e, o);
}
a(Bm, "stringify");
});
// ../node_modules/picoquery/lib/main.js
var Rl = Ee((Ze) => {
"use strict";
var zm = Ze && Ze.__createBinding || (Object.create ? function(e, t, o, i) {
i === void 0 && (i = o);
var n = Object.getOwnPropertyDescriptor(t, o);
(!n || ("get" in n ? !t.__esModule : n.writable || n.configurable)) && (n = { enumerable: !0, get: /* @__PURE__ */ a(function() {
return t[o];
}, "get") }), Object.defineProperty(e, i, n);
} : function(e, t, o, i) {
i === void 0 && (i = o), e[i] = t[o];
}), Wm = Ze && Ze.__exportStar || function(e, t) {
for (var o in e) o !== "default" && !Object.prototype.hasOwnProperty.call(t, o) && zm(t, e, o);
};
Object.defineProperty(Ze, "__esModule", { value: !0 });
Ze.stringify = Ze.parse = void 0;
var jm = Ll();
Object.defineProperty(Ze, "parse", { enumerable: !0, get: /* @__PURE__ */ a(function() {
return jm.parse;
}, "get") });
var Vm = Nl();
Object.defineProperty(Ze, "stringify", { enumerable: !0, get: /* @__PURE__ */ a(function() {
return Vm.stringify;
}, "get") });
Wm(ur(), Ze);
});
// ../node_modules/toggle-selection/index.js
var jl = Ee((IP, Wl) => {
Wl.exports = function() {
var e = document.getSelection();
if (!e.rangeCount)
return function() {
};
for (var t = document.activeElement, o = [], i = 0; i < e.rangeCount; i++)
o.push(e.getRangeAt(i));
switch (t.tagName.toUpperCase()) {
// .toUpperCase handles XHTML
case "INPUT":
case "TEXTAREA":
t.blur();
break;
default:
t = null;
break;
}
return e.removeAllRanges(), function() {
e.type === "Caret" && e.removeAllRanges(), e.rangeCount || o.forEach(function(n) {
e.addRange(n);
}), t && t.focus();
};
};
});
// ../node_modules/copy-to-clipboard/index.js
var $l = Ee((EP, Kl) => {
"use strict";
var qm = jl(), Vl = {
"text/plain": "Text",
"text/html": "Url",
default: "Text"
}, Qm = "Copy to clipboard: #{key}, Enter";
function Xm(e) {
var t = (/mac os x/i.test(navigator.userAgent) ? "\u2318" : "Ctrl") + "+C";
return e.replace(/#{\s*key\s*}/g, t);
}
a(Xm, "format");
function Zm(e, t) {
var o, i, n, r, l, u, c = !1;
t || (t = {}), o = t.debug || !1;
try {
n = qm(), r = document.createRange(), l = document.getSelection(), u = document.createElement("span"), u.textContent = e, u.ariaHidden =
"true", u.style.all = "unset", u.style.position = "fixed", u.style.top = 0, u.style.clip = "rect(0, 0, 0, 0)", u.style.whiteSpace = "p\
re", u.style.webkitUserSelect = "text", u.style.MozUserSelect = "text", u.style.msUserSelect = "text", u.style.userSelect = "text", u.addEventListener(
"copy", function(d) {
if (d.stopPropagation(), t.format)
if (d.preventDefault(), typeof d.clipboardData > "u") {
o && console.warn("unable to use e.clipboardData"), o && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
var g = Vl[t.format] || Vl.default;
window.clipboardData.setData(g, e);
} else
d.clipboardData.clearData(), d.clipboardData.setData(t.format, e);
t.onCopy && (d.preventDefault(), t.onCopy(d.clipboardData));
}), document.body.appendChild(u), r.selectNodeContents(u), l.addRange(r);
var p = document.execCommand("copy");
if (!p)
throw new Error("copy command was unsuccessful");
c = !0;
} catch (d) {
o && console.error("unable to copy using execCommand: ", d), o && console.warn("trying IE specific stuff");
try {
window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), c = !0;
} catch (g) {
o && console.error("unable to copy using clipboardData: ", g), o && console.error("falling back to prompt"), i = Xm("message" in t ?
t.message : Qm), window.prompt(i, e);
}
} finally {
l && (typeof l.removeRange == "function" ? l.removeRange(r) : l.removeAllRanges()), u && document.body.removeChild(u), n();
}
return c;
}
a(Zm, "copy");
Kl.exports = Zm;
});
// ../node_modules/downshift/node_modules/react-is/cjs/react-is.production.min.js
var Uc = Ee((pe) => {
"use strict";
var ni = Symbol.for("react.element"), ii = Symbol.for("react.portal"), Tr = Symbol.for("react.fragment"), Cr = Symbol.for("react.strict_mo\
de"), kr = Symbol.for("react.profiler"), Or = Symbol.for("react.provider"), Pr = Symbol.for("react.context"), Xg = Symbol.for("react.server_\
context"), Ar = Symbol.for("react.forward_ref"), Dr = Symbol.for("react.suspense"), Mr = Symbol.for("react.suspense_list"), Lr = Symbol.for(
"react.memo"), Nr = Symbol.for("react.lazy"), Zg = Symbol.for("react.offscreen"), $c;
$c = Symbol.for("react.module.reference");
function Ke(e) {
if (typeof e == "object" && e !== null) {
var t = e.$$typeof;
switch (t) {
case ni:
switch (e = e.type, e) {
case Tr:
case kr:
case Cr:
case Dr:
case Mr:
return e;
default:
switch (e = e && e.$$typeof, e) {
case Xg:
case Pr:
case Ar:
case Nr:
case Lr:
case Or:
return e;
default:
return t;
}
}
case ii:
return t;
}
}
}
a(Ke, "v");
pe.ContextConsumer = Pr;
pe.ContextProvider = Or;
pe.Element = ni;
pe.ForwardRef = Ar;
pe.Fragment = Tr;
pe.Lazy = Nr;
pe.Memo = Lr;
pe.Portal = ii;
pe.Profiler = kr;
pe.StrictMode = Cr;
pe.Suspense = Dr;
pe.SuspenseList = Mr;
pe.isAsyncMode = function() {
return !1;
};
pe.isConcurrentMode = function() {
return !1;
};
pe.isContextConsumer = function(e) {
return Ke(e) === Pr;
};
pe.isContextProvider = function(e) {
return Ke(e) === Or;
};
pe.isElement = function(e) {
return typeof e == "object" && e !== null && e.$$typeof === ni;
};
pe.isForwardRef = function(e) {
return Ke(e) === Ar;
};
pe.isFragment = function(e) {
return Ke(e) === Tr;
};
pe.isLazy = function(e) {
return Ke(e) === Nr;
};
pe.isMemo = function(e) {
return Ke(e) === Lr;
};
pe.isPortal = function(e) {
return Ke(e) === ii;
};
pe.isProfiler = function(e) {
return Ke(e) === kr;
};
pe.isStrictMode = function(e) {
return Ke(e) === Cr;
};
pe.isSuspense = function(e) {
return Ke(e) === Dr;
};
pe.isSuspenseList = function(e) {
return Ke(e) === Mr;
};
pe.isValidElementType = function(e) {
return typeof e == "string" || typeof e == "function" || e === Tr || e === kr || e === Cr || e === Dr || e === Mr || e === Zg || typeof e ==
"object" && e !== null && (e.$$typeof === Nr || e.$$typeof === Lr || e.$$typeof === Or || e.$$typeof === Pr || e.$$typeof === Ar || e.$$typeof ===
$c || e.getModuleId !== void 0);
};
pe.typeOf = Ke;
});
// ../node_modules/downshift/node_modules/react-is/index.js
var Yc = Ee((tR, Gc) => {
"use strict";
Gc.exports = Uc();
});
// ../node_modules/fuse.js/dist/fuse.js
var od = Ee((wo, Qi) => {
(function(e, t) {
typeof wo == "object" && typeof Qi == "object" ? Qi.exports = t() : typeof define == "function" && define.amd ? define("Fuse", [], t) : typeof wo ==
"object" ? wo.Fuse = t() : e.Fuse = t();
})(wo, function() {
return function(e) {
var t = {};
function o(i) {
if (t[i]) return t[i].exports;
var n = t[i] = { i, l: !1, exports: {} };
return e[i].call(n.exports, n, n.exports, o), n.l = !0, n.exports;
}
return a(o, "r"), o.m = e, o.c = t, o.d = function(i, n, r) {
o.o(i, n) || Object.defineProperty(i, n, { enumerable: !0, get: r });
}, o.r = function(i) {
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(i, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(
i, "__esModule", { value: !0 });
}, o.t = function(i, n) {
if (1 & n && (i = o(i)), 8 & n || 4 & n && typeof i == "object" && i && i.__esModule) return i;
var r = /* @__PURE__ */ Object.create(null);
if (o.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: i }), 2 & n && typeof i != "string") for (var l in i) o.d(r,
l, (function(u) {
return i[u];
}).bind(null, l));
return r;
}, o.n = function(i) {
var n = i && i.__esModule ? function() {
return i.default;
} : function() {
return i;
};
return o.d(n, "a", n), n;
}, o.o = function(i, n) {
return Object.prototype.hasOwnProperty.call(i, n);
}, o.p = "", o(o.s = 0);
}([function(e, t, o) {
function i(d) {
return (i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(g) {
return typeof g;
} : function(g) {
return g && typeof Symbol == "function" && g.constructor === Symbol && g !== Symbol.prototype ? "symbol" : typeof g;
})(d);
}
a(i, "n");
function n(d, g) {
for (var h = 0; h < g.length; h++) {
var y = g[h];
y.enumerable = y.enumerable || !1, y.configurable = !0, "value" in y && (y.writable = !0), Object.defineProperty(d, y.key, y);
}
}
a(n, "o");
var r = o(1), l = o(7), u = l.get, c = (l.deepValue, l.isArray), p = function() {
function d(f, b) {
var I = b.location, _ = I === void 0 ? 0 : I, m = b.distance, v = m === void 0 ? 100 : m, S = b.threshold, E = S === void 0 ? 0.6 :
S, T = b.maxPatternLength, C = T === void 0 ? 32 : T, k = b.caseSensitive, w = k !== void 0 && k, O = b.tokenSeparator, P = O === void 0 ?
/ +/g : O, D = b.findAllMatches, M = D !== void 0 && D, N = b.minMatchCharLength, Q = N === void 0 ? 1 : N, V = b.id, X = V === void 0 ?
null : V, H = b.keys, U = H === void 0 ? [] : H, z = b.shouldSort, re = z === void 0 || z, R = b.getFn, F = R === void 0 ? u : R, L = b.
sortFn, W = L === void 0 ? function(fe, Ie) {
return fe.score - Ie.score;
} : L, J = b.tokenize, ie = J !== void 0 && J, ee = b.matchAllTokens, de = ee !== void 0 && ee, ae = b.includeMatches, ce = ae !==
void 0 && ae, ue = b.includeScore, Se = ue !== void 0 && ue, ye = b.verbose, Oe = ye !== void 0 && ye;
(function(fe, Ie) {
if (!(fe instanceof Ie)) throw new TypeError("Cannot call a class as a function");
})(this, d), this.options = { location: _, distance: v, threshold: E, maxPatternLength: C, isCaseSensitive: w, tokenSeparator: P, findAllMatches: M,
minMatchCharLength: Q, id: X, keys: U, includeMatches: ce, includeScore: Se, shouldSort: re, getFn: F, sortFn: W, verbose: Oe, tokenize: ie,
matchAllTokens: de }, this.setCollection(f), this._processKeys(U);
}
a(d, "e");
var g, h, y;
return g = d, (h = [{ key: "setCollection", value: /* @__PURE__ */ a(function(f) {
return this.list = f, f;
}, "value") }, { key: "_processKeys", value: /* @__PURE__ */ a(function(f) {
if (this._keyWeights = {}, this._keyNames = [], f.length && typeof f[0] == "string") for (var b = 0, I = f.length; b < I; b += 1) {
var _ = f[b];
this._keyWeights[_] = 1, this._keyNames.push(_);
}
else {
for (var m = null, v = null, S = 0, E = 0, T = f.length; E < T; E += 1) {
var C = f[E];
if (!C.hasOwnProperty("name")) throw new Error('Missing "name" property in key object');
var k = C.name;
if (this._keyNames.push(k), !C.hasOwnProperty("weight")) throw new Error('Missing "weight" property in key object');
var w = C.weight;
if (w < 0 || w > 1) throw new Error('"weight" property in key must bein the range of [0, 1)');
v = v == null ? w : Math.max(v, w), m = m == null ? w : Math.min(m, w), this._keyWeights[k] = w, S += w;
}
if (S > 1) throw new Error("Total of weights cannot exceed 1");
}
}, "value") }, { key: "search", value: /* @__PURE__ */ a(function(f) {
var b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { limit: !1 };
this._log(`---------
Search pattern: "`.concat(f, '"'));
var I = this._prepareSearchers(f), _ = I.tokenSearchers, m = I.fullSearcher, v = this._search(_, m);
return this._computeScore(v), this.options.shouldSort && this._sort(v), b.limit && typeof b.limit == "number" && (v = v.slice(0, b.
limit)), this._format(v);
}, "value") }, { key: "_prepareSearchers", value: /* @__PURE__ */ a(function() {
var f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", b = [];
if (this.options.tokenize) for (var I = f.split(this.options.tokenSeparator), _ = 0, m = I.length; _ < m; _ += 1) b.push(new r(I[_],
this.options));
return { tokenSearchers: b, fullSearcher: new r(f, this.options) };
}, "value") }, { key: "_search", value: /* @__PURE__ */ a(function() {
var f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], b = arguments.length > 1 ? arguments[1] : void 0, I = this.
list, _ = {}, m = [];
if (typeof I[0] == "string") {
for (var v = 0, S = I.length; v < S; v += 1) this._analyze({ key: "", value: I[v], record: v, index: v }, { resultMap: _, results: m,
tokenSearchers: f, fullSearcher: b });
return m;
}
for (var E = 0, T = I.length; E < T; E += 1) for (var C = I[E], k = 0, w = this._keyNames.length; k < w; k += 1) {
var O = this._keyNames[k];
this._analyze({ key: O, value: this.options.getFn(C, O), record: C, index: E }, { resultMap: _, results: m, tokenSearchers: f, fullSearcher: b });
}
return m;
}, "value") }, { key: "_analyze", value: /* @__PURE__ */ a(function(f, b) {
var I = this, _ = f.key, m = f.arrayIndex, v = m === void 0 ? -1 : m, S = f.value, E = f.record, T = f.index, C = b.tokenSearchers,
k = C === void 0 ? [] : C, w = b.fullSearcher, O = b.resultMap, P = O === void 0 ? {} : O, D = b.results, M = D === void 0 ? [] : D;
(/* @__PURE__ */ a(function N(Q, V, X, H) {
if (V != null) {
if (typeof V == "string") {
var U = !1, z = -1, re = 0;
I._log(`
Key: `.concat(_ === "" ? "--" : _));
var R = w.search(V);
if (I._log('Full text: "'.concat(V, '", score: ').concat(R.score)), I.options.tokenize) {
for (var F = V.split(I.options.tokenSeparator), L = F.length, W = [], J = 0, ie = k.length; J < ie; J += 1) {
var ee = k[J];
I._log(`
Pattern: "`.concat(ee.pattern, '"'));
for (var de = !1, ae = 0; ae < L; ae += 1) {
var ce = F[ae], ue = ee.search(ce), Se = {};
ue.isMatch ? (Se[ce] = ue.score, U = !0, de = !0, W.push(ue.score)) : (Se[ce] = 1, I.options.matchAllTokens || W.push(
1)), I._log('Token: "'.concat(ce, '", score: ').concat(Se[ce]));
}
de && (re += 1);
}
z = W[0];
for (var ye = W.length, Oe = 1; Oe < ye; Oe += 1) z += W[Oe];
z /= ye, I._log("Token score average:", z);
}
var fe = R.score;
z > -1 && (fe = (fe + z) / 2), I._log("Score average:", fe);
var Ie = !I.options.tokenize || !I.options.matchAllTokens || re >= k.length;
if (I._log(`
Check Matches: `.concat(Ie)), (U || R.isMatch) && Ie) {
var Ce = { key: _, arrayIndex: Q, value: V, score: fe };
I.options.includeMatches && (Ce.matchedIndices = R.matchedIndices);
var Le = P[H];
Le ? Le.output.push(Ce) : (P[H] = { item: X, output: [Ce] }, M.push(P[H]));
}
} else if (c(V)) for (var tt = 0, De = V.length; tt < De; tt += 1) N(tt, V[tt], X, H);
}
}, "e"))(v, S, E, T);
}, "value") }, { key: "_computeScore", value: /* @__PURE__ */ a(function(f) {
this._log(`
Computing score:
`);
for (var b = this._keyWeights, I = !!Object.keys(b).length, _ = 0, m = f.length; _ < m; _ += 1) {
for (var v = f[_], S = v.output, E = S.length, T = 1, C = 0; C < E; C += 1) {
var k = S[C], w = k.key, O = I ? b[w] : 1, P = k.score === 0 && b && b[w] > 0 ? Number.EPSILON : k.score;
T *= Math.pow(P, O);
}
v.score = T, this._log(v);
}
}, "value") }, { key: "_sort", value: /* @__PURE__ */ a(function(f) {
this._log(`
Sorting....`), f.sort(this.options.sortFn);
}, "value") }, { key: "_format", value: /* @__PURE__ */ a(function(f) {
var b = [];
if (this.options.verbose) {
var I = [];
this._log(`
Output:
`, JSON.stringify(f, function(k, w) {
if (i(w) === "object" && w !== null) {
if (I.indexOf(w) !== -1) return;
I.push(w);
}
return w;
}, 2)), I = null;
}
var _ = [];
this.options.includeMatches && _.push(function(k, w) {
var O = k.output;
w.matches = [];
for (var P = 0, D = O.length; P < D; P += 1) {
var M = O[P];
if (M.matchedIndices.length !== 0) {
var N = { indices: M.matchedIndices, value: M.value };
M.key && (N.key = M.key), M.hasOwnProperty("arrayIndex") && M.arrayIndex > -1 && (N.arrayIndex = M.arrayIndex), w.matches.push(
N);
}
}
}), this.options.includeScore && _.push(function(k, w) {
w.score = k.score;
});
for (var m = 0, v = f.length; m < v; m += 1) {
var S = f[m];
if (this.options.id && (S.item = this.options.getFn(S.item, this.options.id)[0]), _.length) {
for (var E = { item: S.item }, T = 0, C = _.length; T < C; T += 1) _[T](S, E);
b.push(E);
} else b.push(S.item);
}
return b;
}, "value") }, { key: "_log", value: /* @__PURE__ */ a(function() {
var f;
this.options.verbose && (f = console).log.apply(f, arguments);
}, "value") }]) && n(g.prototype, h), y && n(g, y), d;
}();
e.exports = p;
}, function(e, t, o) {
function i(c, p) {
for (var d = 0; d < p.length; d++) {
var g = p[d];
g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(c, g.key, g);
}
}
a(i, "n");
var n = o(2), r = o(3), l = o(6), u = function() {
function c(h, y) {
var f = y.location, b = f === void 0 ? 0 : f, I = y.distance, _ = I === void 0 ? 100 : I, m = y.threshold, v = m === void 0 ? 0.6 :
m, S = y.maxPatternLength, E = S === void 0 ? 32 : S, T = y.isCaseSensitive, C = T !== void 0 && T, k = y.tokenSeparator, w = k ===
void 0 ? / +/g : k, O = y.findAllMatches, P = O !== void 0 && O, D = y.minMatchCharLength, M = D === void 0 ? 1 : D, N = y.includeMatches,
Q = N !== void 0 && N;
(function(V, X) {
if (!(V instanceof X)) throw new TypeError("Cannot call a class as a function");
})(this, c), this.options = { location: b, distance: _, threshold: v, maxPatternLength: E, isCaseSensitive: C, tokenSeparator: w, findAllMatches: P,
includeMatches: Q, minMatchCharLength: M }, this.pattern = C ? h : h.toLowerCase(), this.pattern.length <= E && (this.patternAlphabet =
l(this.pattern));
}
a(c, "e");
var p, d, g;
return p = c, (d = [{ key: "search", value: /* @__PURE__ */ a(function(h) {
var y = this.options, f = y.isCaseSensitive, b = y.includeMatches;
if (f || (h = h.toLowerCase()), this.pattern === h) {
var I = { isMatch: !0, score: 0 };
return b && (I.matchedIndices = [[0, h.length - 1]]), I;
}
var _ = this.options, m = _.maxPatternLength, v = _.tokenSeparator;
if (this.pattern.length > m) return n(h, this.pattern, v);
var S = this.options, E = S.location, T = S.distance, C = S.threshold, k = S.findAllMatches, w = S.minMatchCharLength;
return r(h, this.pattern, this.patternAlphabet, { location: E, distance: T, threshold: C, findAllMatches: k, minMatchCharLength: w,
includeMatches: b });
}, "value") }]) && i(p.prototype, d), g && i(p, g), c;
}();
e.exports = u;
}, function(e, t) {
var o = /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;
e.exports = function(i, n) {
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : / +/g, l = new RegExp(n.replace(o, "\\$&").replace(r, "|")),
u = i.match(l), c = !!u, p = [];
if (c) for (var d = 0, g = u.length; d < g; d += 1) {
var h = u[d];
p.push([i.indexOf(h), h.length - 1]);
}
return { score: c ? 0.5 : 1, isMatch: c, matchedIndices: p };
};
}, function(e, t, o) {
var i = o(4), n = o(5);
e.exports = function(r, l, u, c) {
for (var p = c.location, d = p === void 0 ? 0 : p, g = c.distance, h = g === void 0 ? 100 : g, y = c.threshold, f = y === void 0 ? 0.6 :
y, b = c.findAllMatches, I = b !== void 0 && b, _ = c.minMatchCharLength, m = _ === void 0 ? 1 : _, v = c.includeMatches, S = v !== void 0 &&
v, E = d, T = r.length, C = f, k = r.indexOf(l, E), w = l.length, O = [], P = 0; P < T; P += 1) O[P] = 0;
if (k !== -1) {
var D = i(l, { errors: 0, currentLocation: k, expectedLocation: E, distance: h });
if (C = Math.min(D, C), (k = r.lastIndexOf(l, E + w)) !== -1) {
var M = i(l, { errors: 0, currentLocation: k, expectedLocation: E, distance: h });
C = Math.min(M, C);
}
}
k = -1;
for (var N = [], Q = 1, V = w + T, X = 1 << (w <= 31 ? w - 1 : 30), H = 0; H < w; H += 1) {
for (var U = 0, z = V; U < z; )
i(l, { errors: H, currentLocation: E + z, expectedLocation: E, distance: h }) <= C ? U = z : V = z, z = Math.floor((V - U) / 2 +
U);
V = z;
var re = Math.max(1, E - z + 1), R = I ? T : Math.min(E + z, T) + w, F = Array(R + 2);
F[R + 1] = (1 << H) - 1;
for (var L = R; L >= re; L -= 1) {
var W = L - 1, J = u[r.charAt(W)];
if (J && (O[W] = 1), F[L] = (F[L + 1] << 1 | 1) & J, H !== 0 && (F[L] |= (N[L + 1] | N[L]) << 1 | 1 | N[L + 1]), F[L] & X && (Q =
i(l, { errors: H, currentLocation: W, expectedLocation: E, distance: h })) <= C) {
if (C = Q, (k = W) <= E) break;
re = Math.max(1, 2 * E - k);
}
}
if (i(l, { errors: H + 1, currentLocation: E, expectedLocation: E, distance: h }) > C) break;
N = F;
}
var ie = { isMatch: k >= 0, score: Q === 0 ? 1e-3 : Q };
return S && (ie.matchedIndices = n(O, m)), ie;
};
}, function(e, t) {
e.exports = function(o, i) {
var n = i.errors, r = n === void 0 ? 0 : n, l = i.currentLocation, u = l === void 0 ? 0 : l, c = i.expectedLocation, p = c === void 0 ?
0 : c, d = i.distance, g = d === void 0 ? 100 : d, h = r / o.length, y = Math.abs(p - u);
return g ? h + y / g : y ? 1 : h;
};
}, function(e, t) {
e.exports = function() {
for (var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], i = arguments.length > 1 && arguments[1] !== void 0 ?
arguments[1] : 1, n = [], r = -1, l = -1, u = 0, c = o.length; u < c; u += 1) {
var p = o[u];
p && r === -1 ? r = u : p || r === -1 || ((l = u - 1) - r + 1 >= i && n.push([r, l]), r = -1);
}
return o[u - 1] && u - r >= i && n.push([r, u - 1]), n;
};
}, function(e, t) {
e.exports = function(o) {
for (var i = {}, n = o.length, r = 0; r < n; r += 1) i[o.charAt(r)] = 0;
for (var l = 0; l < n; l += 1) i[o.charAt(l)] |= 1 << n - l - 1;
return i;
};
}, function(e, t) {
var o = /* @__PURE__ */ a(function(l) {
return Array.isArray ? Array.isArray(l) : Object.prototype.toString.call(l) === "[object Array]";
}, "r"), i = /