playermap_graph
Version:
A React library for intuition visualization using force-directed graphs
1,308 lines (1,306 loc) • 5.12 MB
JavaScript
var N$ = Object.defineProperty;
var F$ = (r, e, n) => e in r ? N$(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n;
var Zp = (r, e, n) => F$(r, typeof e != "symbol" ? e + "" : e, n);
import ms, { useState as ar, useEffect as Xa, useRef as wa, forwardRef as O$, useMemo as U$, useCallback as uc, useImperativeHandle as k$, useLayoutEffect as z$ } from "react";
function F3(r) {
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
}
function O3(r) {
if (r.__esModule) return r;
var e = r.default;
if (typeof e == "function") {
var n = function i() {
return this instanceof i ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
};
n.prototype = e.prototype;
} else n = {};
return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(r).forEach(function(i) {
var s = Object.getOwnPropertyDescriptor(r, i);
Object.defineProperty(n, i, s.get ? s : {
enumerable: !0,
get: function() {
return r[i];
}
});
}), n;
}
var aT = { exports: {} }, Y0 = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var BL;
function G$() {
if (BL) return Y0;
BL = 1;
var r = ms, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, s = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
function l(u, c, d) {
var f, p = {}, g = null, m = null;
d !== void 0 && (g = "" + d), c.key !== void 0 && (g = "" + c.key), c.ref !== void 0 && (m = c.ref);
for (f in c) i.call(c, f) && !a.hasOwnProperty(f) && (p[f] = c[f]);
if (u && u.defaultProps) for (f in c = u.defaultProps, c) p[f] === void 0 && (p[f] = c[f]);
return { $$typeof: e, type: u, key: g, ref: m, props: p, _owner: s.current };
}
return Y0.Fragment = n, Y0.jsx = l, Y0.jsxs = l, Y0;
}
var J0 = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var DL;
function V$() {
return DL || (DL = 1, process.env.NODE_ENV !== "production" && function() {
var r = ms, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), u = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), y = Symbol.iterator, b = "@@iterator";
function v(et) {
if (et === null || typeof et != "object")
return null;
var Jt = y && et[y] || et[b];
return typeof Jt == "function" ? Jt : null;
}
var _ = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function S(et) {
{
for (var Jt = arguments.length, fn = new Array(Jt > 1 ? Jt - 1 : 0), Un = 1; Un < Jt; Un++)
fn[Un - 1] = arguments[Un];
C("error", et, fn);
}
}
function C(et, Jt, fn) {
{
var Un = _.ReactDebugCurrentFrame, Ei = Un.getStackAddendum();
Ei !== "" && (Jt += "%s", fn = fn.concat([Ei]));
var tr = fn.map(function(Si) {
return String(Si);
});
tr.unshift("Warning: " + Jt), Function.prototype.apply.call(console[et], console, tr);
}
}
var w = !1, T = !1, D = !1, I = !1, L = !1, P;
P = Symbol.for("react.module.reference");
function N(et) {
return !!(typeof et == "string" || typeof et == "function" || et === i || et === a || L || et === s || et === d || et === f || I || et === m || w || T || D || typeof et == "object" && et !== null && (et.$$typeof === g || et.$$typeof === p || et.$$typeof === l || et.$$typeof === u || et.$$typeof === c || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
et.$$typeof === P || et.getModuleId !== void 0));
}
function U(et, Jt, fn) {
var Un = et.displayName;
if (Un)
return Un;
var Ei = Jt.displayName || Jt.name || "";
return Ei !== "" ? fn + "(" + Ei + ")" : fn;
}
function X(et) {
return et.displayName || "Context";
}
function j(et) {
if (et == null)
return null;
if (typeof et.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof et == "function")
return et.displayName || et.name || null;
if (typeof et == "string")
return et;
switch (et) {
case i:
return "Fragment";
case n:
return "Portal";
case a:
return "Profiler";
case s:
return "StrictMode";
case d:
return "Suspense";
case f:
return "SuspenseList";
}
if (typeof et == "object")
switch (et.$$typeof) {
case u:
var Jt = et;
return X(Jt) + ".Consumer";
case l:
var fn = et;
return X(fn._context) + ".Provider";
case c:
return U(et, et.render, "ForwardRef");
case p:
var Un = et.displayName || null;
return Un !== null ? Un : j(et.type) || "Memo";
case g: {
var Ei = et, tr = Ei._payload, Si = Ei._init;
try {
return j(Si(tr));
} catch {
return null;
}
}
}
return null;
}
var z = Object.assign, W = 0, G, Q, k, te, K, oe, xe;
function Be() {
}
Be.__reactDisabledLog = !0;
function ye() {
{
if (W === 0) {
G = console.log, Q = console.info, k = console.warn, te = console.error, K = console.group, oe = console.groupCollapsed, xe = console.groupEnd;
var et = {
configurable: !0,
enumerable: !0,
value: Be,
writable: !0
};
Object.defineProperties(console, {
info: et,
log: et,
warn: et,
error: et,
group: et,
groupCollapsed: et,
groupEnd: et
});
}
W++;
}
}
function Ce() {
{
if (W--, W === 0) {
var et = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: z({}, et, {
value: G
}),
info: z({}, et, {
value: Q
}),
warn: z({}, et, {
value: k
}),
error: z({}, et, {
value: te
}),
group: z({}, et, {
value: K
}),
groupCollapsed: z({}, et, {
value: oe
}),
groupEnd: z({}, et, {
value: xe
})
});
}
W < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var $e = _.ReactCurrentDispatcher, qe;
function it(et, Jt, fn) {
{
if (qe === void 0)
try {
throw Error();
} catch (Ei) {
var Un = Ei.stack.trim().match(/\n( *(at )?)/);
qe = Un && Un[1] || "";
}
return `
` + qe + et;
}
}
var at = !1, pt;
{
var Pt = typeof WeakMap == "function" ? WeakMap : Map;
pt = new Pt();
}
function mt(et, Jt) {
if (!et || at)
return "";
{
var fn = pt.get(et);
if (fn !== void 0)
return fn;
}
var Un;
at = !0;
var Ei = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var tr;
tr = $e.current, $e.current = null, ye();
try {
if (Jt) {
var Si = function() {
throw Error();
};
if (Object.defineProperty(Si.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(Si, []);
} catch (ht) {
Un = ht;
}
Reflect.construct(et, [], Si);
} else {
try {
Si.call();
} catch (ht) {
Un = ht;
}
et.call(Si.prototype);
}
} else {
try {
throw Error();
} catch (ht) {
Un = ht;
}
et();
}
} catch (ht) {
if (ht && Un && typeof ht.stack == "string") {
for (var Li = ht.stack.split(`
`), Ne = Un.stack.split(`
`), ue = Li.length - 1, ve = Ne.length - 1; ue >= 1 && ve >= 0 && Li[ue] !== Ne[ve]; )
ve--;
for (; ue >= 1 && ve >= 0; ue--, ve--)
if (Li[ue] !== Ne[ve]) {
if (ue !== 1 || ve !== 1)
do
if (ue--, ve--, ve < 0 || Li[ue] !== Ne[ve]) {
var Oe = `
` + Li[ue].replace(" at new ", " at ");
return et.displayName && Oe.includes("<anonymous>") && (Oe = Oe.replace("<anonymous>", et.displayName)), typeof et == "function" && pt.set(et, Oe), Oe;
}
while (ue >= 1 && ve >= 0);
break;
}
}
} finally {
at = !1, $e.current = tr, Ce(), Error.prepareStackTrace = Ei;
}
var ze = et ? et.displayName || et.name : "", Ke = ze ? it(ze) : "";
return typeof et == "function" && pt.set(et, Ke), Ke;
}
function dn(et, Jt, fn) {
return mt(et, !1);
}
function Ze(et) {
var Jt = et.prototype;
return !!(Jt && Jt.isReactComponent);
}
function On(et, Jt, fn) {
if (et == null)
return "";
if (typeof et == "function")
return mt(et, Ze(et));
if (typeof et == "string")
return it(et);
switch (et) {
case d:
return it("Suspense");
case f:
return it("SuspenseList");
}
if (typeof et == "object")
switch (et.$$typeof) {
case c:
return dn(et.render);
case p:
return On(et.type, Jt, fn);
case g: {
var Un = et, Ei = Un._payload, tr = Un._init;
try {
return On(tr(Ei), Jt, fn);
} catch {
}
}
}
return "";
}
var en = Object.prototype.hasOwnProperty, yn = {}, bn = _.ReactDebugCurrentFrame;
function ti(et) {
if (et) {
var Jt = et._owner, fn = On(et.type, et._source, Jt ? Jt.type : null);
bn.setExtraStackFrame(fn);
} else
bn.setExtraStackFrame(null);
}
function Gn(et, Jt, fn, Un, Ei) {
{
var tr = Function.call.bind(en);
for (var Si in et)
if (tr(et, Si)) {
var Li = void 0;
try {
if (typeof et[Si] != "function") {
var Ne = Error((Un || "React class") + ": " + fn + " type `" + Si + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof et[Si] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw Ne.name = "Invariant Violation", Ne;
}
Li = et[Si](Jt, Si, Un, fn, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (ue) {
Li = ue;
}
Li && !(Li instanceof Error) && (ti(Ei), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", Un || "React class", fn, Si, typeof Li), ti(null)), Li instanceof Error && !(Li.message in yn) && (yn[Li.message] = !0, ti(Ei), S("Failed %s type: %s", fn, Li.message), ti(null));
}
}
}
var Qe = Array.isArray;
function Se(et) {
return Qe(et);
}
function At(et) {
{
var Jt = typeof Symbol == "function" && Symbol.toStringTag, fn = Jt && et[Symbol.toStringTag] || et.constructor.name || "Object";
return fn;
}
}
function Lt(et) {
try {
return Wt(et), !1;
} catch {
return !0;
}
}
function Wt(et) {
return "" + et;
}
function Ut(et) {
if (Lt(et))
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", At(et)), Wt(et);
}
var vn = _.ReactCurrentOwner, yt = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, me, we;
function Re(et) {
if (en.call(et, "ref")) {
var Jt = Object.getOwnPropertyDescriptor(et, "ref").get;
if (Jt && Jt.isReactWarning)
return !1;
}
return et.ref !== void 0;
}
function Te(et) {
if (en.call(et, "key")) {
var Jt = Object.getOwnPropertyDescriptor(et, "key").get;
if (Jt && Jt.isReactWarning)
return !1;
}
return et.key !== void 0;
}
function Fe(et, Jt) {
typeof et.ref == "string" && vn.current;
}
function Le(et, Jt) {
{
var fn = function() {
me || (me = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", Jt));
};
fn.isReactWarning = !0, Object.defineProperty(et, "key", {
get: fn,
configurable: !0
});
}
}
function ie(et, Jt) {
{
var fn = function() {
we || (we = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", Jt));
};
fn.isReactWarning = !0, Object.defineProperty(et, "ref", {
get: fn,
configurable: !0
});
}
}
var H = function(et, Jt, fn, Un, Ei, tr, Si) {
var Li = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: e,
// Built-in properties that belong on the element
type: et,
key: Jt,
ref: fn,
props: Si,
// Record the component responsible for creating this element.
_owner: tr
};
return Li._store = {}, Object.defineProperty(Li._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(Li, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: Un
}), Object.defineProperty(Li, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: Ei
}), Object.freeze && (Object.freeze(Li.props), Object.freeze(Li)), Li;
};
function $(et, Jt, fn, Un, Ei) {
{
var tr, Si = {}, Li = null, Ne = null;
fn !== void 0 && (Ut(fn), Li = "" + fn), Te(Jt) && (Ut(Jt.key), Li = "" + Jt.key), Re(Jt) && (Ne = Jt.ref, Fe(Jt, Ei));
for (tr in Jt)
en.call(Jt, tr) && !yt.hasOwnProperty(tr) && (Si[tr] = Jt[tr]);
if (et && et.defaultProps) {
var ue = et.defaultProps;
for (tr in ue)
Si[tr] === void 0 && (Si[tr] = ue[tr]);
}
if (Li || Ne) {
var ve = typeof et == "function" ? et.displayName || et.name || "Unknown" : et;
Li && Le(Si, ve), Ne && ie(Si, ve);
}
return H(et, Li, Ne, Ei, Un, vn.current, Si);
}
}
var fe = _.ReactCurrentOwner, ae = _.ReactDebugCurrentFrame;
function Ue(et) {
if (et) {
var Jt = et._owner, fn = On(et.type, et._source, Jt ? Jt.type : null);
ae.setExtraStackFrame(fn);
} else
ae.setExtraStackFrame(null);
}
var ke;
ke = !1;
function lt(et) {
return typeof et == "object" && et !== null && et.$$typeof === e;
}
function Tt() {
{
if (fe.current) {
var et = j(fe.current.type);
if (et)
return `
Check the render method of \`` + et + "`.";
}
return "";
}
}
function bt(et) {
return "";
}
var kt = {};
function un(et) {
{
var Jt = Tt();
if (!Jt) {
var fn = typeof et == "string" ? et : et.displayName || et.name;
fn && (Jt = `
Check the top-level render call using <` + fn + ">.");
}
return Jt;
}
}
function zi(et, Jt) {
{
if (!et._store || et._store.validated || et.key != null)
return;
et._store.validated = !0;
var fn = un(Jt);
if (kt[fn])
return;
kt[fn] = !0;
var Un = "";
et && et._owner && et._owner !== fe.current && (Un = " It was passed a child from " + j(et._owner.type) + "."), Ue(et), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', fn, Un), Ue(null);
}
}
function En(et, Jt) {
{
if (typeof et != "object")
return;
if (Se(et))
for (var fn = 0; fn < et.length; fn++) {
var Un = et[fn];
lt(Un) && zi(Un, Jt);
}
else if (lt(et))
et._store && (et._store.validated = !0);
else if (et) {
var Ei = v(et);
if (typeof Ei == "function" && Ei !== et.entries)
for (var tr = Ei.call(et), Si; !(Si = tr.next()).done; )
lt(Si.value) && zi(Si.value, Jt);
}
}
}
function er(et) {
{
var Jt = et.type;
if (Jt == null || typeof Jt == "string")
return;
var fn;
if (typeof Jt == "function")
fn = Jt.propTypes;
else if (typeof Jt == "object" && (Jt.$$typeof === c || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
Jt.$$typeof === p))
fn = Jt.propTypes;
else
return;
if (fn) {
var Un = j(Jt);
Gn(fn, et.props, "prop", Un, et);
} else if (Jt.PropTypes !== void 0 && !ke) {
ke = !0;
var Ei = j(Jt);
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Ei || "Unknown");
}
typeof Jt.getDefaultProps == "function" && !Jt.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function Oi(et) {
{
for (var Jt = Object.keys(et.props), fn = 0; fn < Jt.length; fn++) {
var Un = Jt[fn];
if (Un !== "children" && Un !== "key") {
Ue(et), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", Un), Ue(null);
break;
}
}
et.ref !== null && (Ue(et), S("Invalid attribute `ref` supplied to `React.Fragment`."), Ue(null));
}
}
var vr = {};
function Ds(et, Jt, fn, Un, Ei, tr) {
{
var Si = N(et);
if (!Si) {
var Li = "";
(et === void 0 || typeof et == "object" && et !== null && Object.keys(et).length === 0) && (Li += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var Ne = bt();
Ne ? Li += Ne : Li += Tt();
var ue;
et === null ? ue = "null" : Se(et) ? ue = "array" : et !== void 0 && et.$$typeof === e ? (ue = "<" + (j(et.type) || "Unknown") + " />", Li = " Did you accidentally export a JSX literal instead of a component?") : ue = typeof et, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ue, Li);
}
var ve = $(et, Jt, fn, Ei, tr);
if (ve == null)
return ve;
if (Si) {
var Oe = Jt.children;
if (Oe !== void 0)
if (Un)
if (Se(Oe)) {
for (var ze = 0; ze < Oe.length; ze++)
En(Oe[ze], et);
Object.freeze && Object.freeze(Oe);
} else
S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
En(Oe, et);
}
if (en.call(Jt, "key")) {
var Ke = j(et), ht = Object.keys(Jt).filter(function($t) {
return $t !== "key";
}), Mt = ht.length > 0 ? "{key: someKey, " + ht.join(": ..., ") + ": ...}" : "{key: someKey}";
if (!vr[Ke + Mt]) {
var jt = ht.length > 0 ? "{" + ht.join(": ..., ") + ": ...}" : "{}";
S(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`, Mt, Ke, jt, Ke), vr[Ke + Mt] = !0;
}
}
return et === i ? Oi(ve) : er(ve), ve;
}
}
function Er(et, Jt, fn) {
return Ds(et, Jt, fn, !0);
}
function zs(et, Jt, fn) {
return Ds(et, Jt, fn, !1);
}
var ns = zs, Cs = Er;
J0.Fragment = i, J0.jsx = ns, J0.jsxs = Cs;
}()), J0;
}
process.env.NODE_ENV === "production" ? aT.exports = G$() : aT.exports = V$();
var Ie = aT.exports;
const Fs = {
SUBJECT: "#FFB300",
// Jaune/orangé accessible
PREDICATE: "#1976D2",
// Bleu profond accessible
OBJECT: "#43A047"
// Vert foncé accessible
}, og = (r) => {
switch (r) {
case "subject":
return Fs.SUBJECT;
case "predicate":
return Fs.PREDICATE;
case "object":
return Fs.OBJECT;
default:
return "#444";
}
}, PL = () => /* @__PURE__ */ Ie.jsxs(
"div",
{
style: {
position: "absolute",
bottom: 80,
right: 30,
zIndex: 1e3,
background: "#18181b",
borderRadius: "10px",
border: "2px solid #ffd32a",
padding: "16px 24px",
boxShadow: "0 8px 30px rgba(0, 0, 0, 0.5)"
},
children: [
/* @__PURE__ */ Ie.jsx(
"h4",
{
style: {
margin: "0 0 16px 0",
fontSize: "18px",
color: "#ffd32a",
fontWeight: "bold",
letterSpacing: "0.5px"
},
children: "Graph Legend"
}
),
/* @__PURE__ */ Ie.jsxs(
"ul",
{
style: {
listStyle: "none",
padding: 0,
margin: 0,
display: "flex",
flexDirection: "column",
gap: "12px"
},
children: [
/* @__PURE__ */ Ie.jsxs(
"li",
{
style: {
display: "flex",
alignItems: "center",
gap: "12px",
color: "#fff"
},
children: [
/* @__PURE__ */ Ie.jsx(
"span",
{
style: {
width: "20px",
height: "20px",
backgroundColor: Fs.SUBJECT,
borderRadius: "50%",
display: "inline-block",
boxShadow: "0 2px 8px rgba(0,0,0,0.18)"
}
}
),
/* @__PURE__ */ Ie.jsx("span", { style: { fontSize: "15px" }, children: "Subject" })
]
}
),
/* @__PURE__ */ Ie.jsxs(
"li",
{
style: {
display: "flex",
alignItems: "center",
gap: "12px",
color: "#fff"
},
children: [
/* @__PURE__ */ Ie.jsx(
"span",
{
style: {
width: "20px",
height: "20px",
backgroundColor: Fs.OBJECT,
borderRadius: "4px",
display: "inline-block",
boxShadow: "0 2px 8px rgba(0,0,0,0.18)"
}
}
),
/* @__PURE__ */ Ie.jsx("span", { style: { fontSize: "15px" }, children: "Object" })
]
}
),
/* @__PURE__ */ Ie.jsxs(
"li",
{
style: {
display: "flex",
alignItems: "center",
gap: "12px",
color: "#fff"
},
children: [
/* @__PURE__ */ Ie.jsx(
"span",
{
style: {
width: "24px",
height: "12px",
backgroundColor: Fs.PREDICATE,
borderRadius: "4px",
display: "inline-block",
boxShadow: "0 2px 8px rgba(0,0,0,0.18)"
}
}
),
/* @__PURE__ */ Ie.jsx("span", { style: { fontSize: "15px" }, children: "Predicate" })
]
}
)
]
}
)
]
}
);
var H$ = { exports: {} };
(function(r, e) {
(function(i, s) {
r.exports = s();
})(self, () => (
/******/
(() => {
var n = {
/***/
"./node_modules/an-array/index.js": (
/*!****************************************!*\
!*** ./node_modules/an-array/index.js ***!
\****************************************/
/***/
(l) => {
var u = Object.prototype.toString;
l.exports = c;
function c(d) {
return d.BYTES_PER_ELEMENT && u.call(d.buffer) === "[object ArrayBuffer]" || Array.isArray(d);
}
}
),
/***/
"./node_modules/as-number/index.js": (
/*!*****************************************!*\
!*** ./node_modules/as-number/index.js ***!
\*****************************************/
/***/
(l) => {
l.exports = function(c, d) {
return typeof c == "number" ? c : typeof d == "number" ? d : 0;
};
}
),
/***/
"./node_modules/base64-js/index.js": (
/*!*****************************************!*\
!*** ./node_modules/base64-js/index.js ***!
\*****************************************/
/***/
(l, u) => {
u.byteLength = b, u.toByteArray = _, u.fromByteArray = w;
for (var c = [], d = [], f = typeof Uint8Array < "u" ? Uint8Array : Array, p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", g = 0, m = p.length; g < m; ++g)
c[g] = p[g], d[p.charCodeAt(g)] = g;
d[45] = 62, d[95] = 63;
function y(T) {
var D = T.length;
if (D % 4 > 0)
throw new Error("Invalid string. Length must be a multiple of 4");
var I = T.indexOf("=");
I === -1 && (I = D);
var L = I === D ? 0 : 4 - I % 4;
return [I, L];
}
function b(T) {
var D = y(T), I = D[0], L = D[1];
return (I + L) * 3 / 4 - L;
}
function v(T, D, I) {
return (D + I) * 3 / 4 - I;
}
function _(T) {
var D, I = y(T), L = I[0], P = I[1], N = new f(v(T, L, P)), U = 0, X = P > 0 ? L - 4 : L, j;
for (j = 0; j < X; j += 4)
D = d[T.charCodeAt(j)] << 18 | d[T.charCodeAt(j + 1)] << 12 | d[T.charCodeAt(j + 2)] << 6 | d[T.charCodeAt(j + 3)], N[U++] = D >> 16 & 255, N[U++] = D >> 8 & 255, N[U++] = D & 255;
return P === 2 && (D = d[T.charCodeAt(j)] << 2 | d[T.charCodeAt(j + 1)] >> 4, N[U++] = D & 255), P === 1 && (D = d[T.charCodeAt(j)] << 10 | d[T.charCodeAt(j + 1)] << 4 | d[T.charCodeAt(j + 2)] >> 2, N[U++] = D >> 8 & 255, N[U++] = D & 255), N;
}
function S(T) {
return c[T >> 18 & 63] + c[T >> 12 & 63] + c[T >> 6 & 63] + c[T & 63];
}
function C(T, D, I) {
for (var L, P = [], N = D; N < I; N += 3)
L = (T[N] << 16 & 16711680) + (T[N + 1] << 8 & 65280) + (T[N + 2] & 255), P.push(S(L));
return P.join("");
}
function w(T) {
for (var D, I = T.length, L = I % 3, P = [], N = 16383, U = 0, X = I - L; U < X; U += N)
P.push(C(T, U, U + N > X ? X : U + N));
return L === 1 ? (D = T[I - 1], P.push(c[D >> 2] + c[D << 4 & 63] + "==")) : L === 2 && (D = (T[I - 2] << 8) + T[I - 1], P.push(c[D >> 10] + c[D >> 4 & 63] + c[D << 2 & 63] + "=")), P.join("");
}
}
),
/***/
"./node_modules/buffer-equal/index.js": (
/*!********************************************!*\
!*** ./node_modules/buffer-equal/index.js ***!
\********************************************/
/***/
(l, u, c) => {
var d = c(
/*! buffer */
"./node_modules/buffer/index.js"
).Buffer;
l.exports = function(f, p) {
if (d.isBuffer(f) && d.isBuffer(p)) {
if (typeof f.equals == "function") return f.equals(p);
if (f.length !== p.length) return !1;
for (var g = 0; g < f.length; g++)
if (f[g] !== p[g]) return !1;
return !0;
}
};
}
),
/***/
"./node_modules/buffer/index.js": (
/*!**************************************!*\
!*** ./node_modules/buffer/index.js ***!
\**************************************/
/***/
(l, u, c) => {
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
const d = c(
/*! base64-js */
"./node_modules/base64-js/index.js"
), f = c(
/*! ieee754 */
"./node_modules/ieee754/index.js"
), p = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
u.Buffer = b, u.SlowBuffer = N, u.INSPECT_MAX_BYTES = 50;
const g = 2147483647;
u.kMaxLength = g, b.TYPED_ARRAY_SUPPORT = m(), !b.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
function m() {
try {
const ie = new Uint8Array(1), H = {
foo: function() {
return 42;
}
};
return Object.setPrototypeOf(H, Uint8Array.prototype), Object.setPrototypeOf(ie, H), ie.foo() === 42;
} catch {
return !1;
}
}
Object.defineProperty(b.prototype, "parent", {
enumerable: !0,
get: function() {
if (b.isBuffer(this))
return this.buffer;
}
}), Object.defineProperty(b.prototype, "offset", {
enumerable: !0,
get: function() {
if (b.isBuffer(this))
return this.byteOffset;
}
});
function y(ie) {
if (ie > g)
throw new RangeError('The value "' + ie + '" is invalid for option "size"');
const H = new Uint8Array(ie);
return Object.setPrototypeOf(H, b.prototype), H;
}
function b(ie, H, $) {
if (typeof ie == "number") {
if (typeof H == "string")
throw new TypeError('The "string" argument must be of type string. Received type number');
return C(ie);
}
return v(ie, H, $);
}
b.poolSize = 8192;
function v(ie, H, $) {
if (typeof ie == "string")
return w(ie, H);
if (ArrayBuffer.isView(ie))
return D(ie);
if (ie == null)
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof ie);
if (we(ie, ArrayBuffer) || ie && we(ie.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (we(ie, SharedArrayBuffer) || ie && we(ie.buffer, SharedArrayBuffer)))
return I(ie, H, $);
if (typeof ie == "number")
throw new TypeError('The "value" argument must not be of type number. Received type number');
const fe = ie.valueOf && ie.valueOf();
if (fe != null && fe !== ie)
return b.from(fe, H, $);
const ae = L(ie);
if (ae) return ae;
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof ie[Symbol.toPrimitive] == "function")
return b.from(ie[Symbol.toPrimitive]("string"), H, $);
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof ie);
}
b.from = function(ie, H, $) {
return v(ie, H, $);
}, Object.setPrototypeOf(b.prototype, Uint8Array.prototype), Object.setPrototypeOf(b, Uint8Array);
function _(ie) {
if (typeof ie != "number")
throw new TypeError('"size" argument must be of type number');
if (ie < 0)
throw new RangeError('The value "' + ie + '" is invalid for option "size"');
}
function S(ie, H, $) {
return _(ie), ie <= 0 ? y(ie) : H !== void 0 ? typeof $ == "string" ? y(ie).fill(H, $) : y(ie).fill(H) : y(ie);
}
b.alloc = function(ie, H, $) {
return S(ie, H, $);
};
function C(ie) {
return _(ie), y(ie < 0 ? 0 : P(ie) | 0);
}
b.allocUnsafe = function(ie) {
return C(ie);
}, b.allocUnsafeSlow = function(ie) {
return C(ie);
};
function w(ie, H) {
if ((typeof H != "string" || H === "") && (H = "utf8"), !b.isEncoding(H))
throw new TypeError("Unknown encoding: " + H);
const $ = U(ie, H) | 0;
let fe = y($);
const ae = fe.write(ie, H);
return ae !== $ && (fe = fe.slice(0, ae)), fe;
}
function T(ie) {
const H = ie.length < 0 ? 0 : P(ie.length) | 0, $ = y(H);
for (let fe = 0; fe < H; fe += 1)
$[fe] = ie[fe] & 255;
return $;
}
function D(ie) {
if (we(ie, Uint8Array)) {
const H = new Uint8Array(ie);
return I(H.buffer, H.byteOffset, H.byteLength);
}
return T(ie);
}
function I(ie, H, $) {
if (H < 0 || ie.byteLength < H)
throw new RangeError('"offset" is outside of buffer bounds');
if (ie.byteLength < H + ($ || 0))
throw new RangeError('"length" is outside of buffer bounds');
let fe;
return H === void 0 && $ === void 0 ? fe = new Uint8Array(ie) : $ === void 0 ? fe = new Uint8Array(ie, H) : fe = new Uint8Array(ie, H, $), Object.setPrototypeOf(fe, b.prototype), fe;
}
function L(ie) {
if (b.isBuffer(ie)) {
const H = P(ie.length) | 0, $ = y(H);
return $.length === 0 || ie.copy($, 0, 0, H), $;
}
if (ie.length !== void 0)
return typeof ie.length != "number" || Re(ie.length) ? y(0) : T(ie);
if (ie.type === "Buffer" && Array.isArray(ie.data))
return T(ie.data);
}
function P(ie) {
if (ie >= g)
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + g.toString(16) + " bytes");
return ie | 0;
}
function N(ie) {
return +ie != ie && (ie = 0), b.alloc(+ie);
}
b.isBuffer = function(H) {
return H != null && H._isBuffer === !0 && H !== b.prototype;
}, b.compare = function(H, $) {
if (we(H, Uint8Array) && (H = b.from(H, H.offset, H.byteLength)), we($, Uint8Array) && ($ = b.from($, $.offset, $.byteLength)), !b.isBuffer(H) || !b.isBuffer($))
throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
if (H === $) return 0;
let fe = H.length, ae = $.length;
for (let Ue = 0, ke = Math.min(fe, ae); Ue < ke; ++Ue)
if (H[Ue] !== $[Ue]) {
fe = H[Ue], ae = $[Ue];
break;
}
return fe < ae ? -1 : ae < fe ? 1 : 0;
}, b.isEncoding = function(H) {
switch (String(H).toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "latin1":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return !0;
default:
return !1;
}
}, b.concat = function(H, $) {
if (!Array.isArray(H))
throw new TypeError('"list" argument must be an Array of Buffers');
if (H.length === 0)
return b.alloc(0);
let fe;
if ($ === void 0)
for ($ = 0, fe = 0; fe < H.length; ++fe)
$ += H[fe].length;
const ae = b.allocUnsafe($);
let Ue = 0;
for (fe = 0; fe < H.length; ++fe) {
let ke = H[fe];
if (we(ke, Uint8Array))
Ue + ke.length > ae.length ? (b.isBuffer(ke) || (ke = b.from(ke)), ke.copy(ae, Ue)) : Uint8Array.prototype.set.call(ae, ke, Ue);
else if (b.isBuffer(ke))
ke.copy(ae, Ue);
else
throw new TypeError('"list" argument must be an Array of Buffers');
Ue += ke.length;
}
return ae;
};
function U(ie, H) {
if (b.isBuffer(ie))
return ie.length;
if (ArrayBuffer.isView(ie) || we(ie, ArrayBuffer))
return ie.byteLength;
if (typeof ie != "string")
throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof ie);
const $ = ie.length, fe = arguments.length > 2 && arguments[2] === !0;
if (!fe && $ === 0) return 0;
let ae = !1;
for (; ; )
switch (H) {
case "ascii":
case "latin1":
case "binary":
return $;
case "utf8":
case "utf-8":
return Wt(ie).length;
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return $ * 2;
case "hex":
return $ >>> 1;
case "base64":
return yt(ie).length;
default:
if (ae)
return fe ? -1 : Wt(ie).length;
H = ("" + H).toLowerCase(), ae = !0;
}
}
b.byteLength = U;
function X(ie, H, $) {
let fe = !1;
if ((H === void 0 || H < 0) && (H = 0), H > this.length || (($ === void 0 || $ > this.length) && ($ = this.length), $ <= 0) || ($ >>>= 0, H >>>= 0, $ <= H))
return "";
for (ie || (ie = "utf8"); ; )
switch (ie) {
case "hex":
return qe(this, H, $);
case "utf8":
case "utf-8":
return xe(this, H, $);
case "ascii":
return Ce(this, H, $);
case "latin1":
case "binary":
return $e(this, H, $);
case "base64":
return oe(this, H, $);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return it(this, H, $);
default:
if (fe) throw new TypeError("Unknown encoding: " + ie);
ie = (ie + "").toLowerCase(), fe = !0;
}
}
b.prototype._isBuffer = !0;
function j(ie, H, $) {
const fe = ie[H];
ie[H] = ie[$], ie[$] = fe;
}
b.prototype.swap16 = function() {
const H = this.length;
if (H % 2 !== 0)
throw new RangeError("Buffer size must be a multiple of 16-bits");
for (let $ = 0; $ < H; $ += 2)
j(this, $, $ + 1);
return this;
}, b.prototype.swap32 = function() {
const H = this.length;
if (H % 4 !== 0)
throw new RangeError("Buffer size must be a multiple of 32-bits");
for (let $ = 0; $ < H; $ += 4)
j(this, $, $ + 3), j(this, $ + 1, $ + 2);
return this;
}, b.prototype.swap64 = function() {
const H = this.length;
if (H % 8 !== 0)
throw new RangeError("Buffer size must be a multiple of 64-bits");
for (let $ = 0; $ < H; $ += 8)
j(this, $, $ + 7), j(this, $ + 1, $ + 6), j(this, $ + 2, $ + 5), j(this, $ + 3, $ + 4);
return this;
}, b.prototype.toString = function() {
const H = this.length;
return H === 0 ? "" : arguments.length === 0 ? xe(this, 0, H) : X.apply(this, arguments);
}, b.prototype.toLocaleString = b.prototype.toString, b.prototype.equals = function(H) {
if (!b.isBuffer(H)) throw new TypeError("Argument must be a Buffer");
return this === H ? !0 : b.compare(this, H) === 0;
}, b.prototype.inspect = function() {
let H = "";
const $ = u.INSPECT_MAX_BYTES;
return H = this.toString("hex", 0, $).replace(/(.{2})/g, "$1 ").trim(), this.length > $ && (H += " ... "), "<Buffer " + H + ">";
}, p && (b.prototype[p] = b.prototype.inspect), b.prototype.compare = function(H, $, fe, ae, Ue) {
if (we(H, Uint8Array) && (H = b.from(H, H.offset, H.byteLength)), !b.isBuffer(H))
throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof H);
if ($ === void 0 && ($ = 0), fe === void 0 && (fe = H ? H.length : 0), ae === void 0 && (ae = 0), Ue === void 0 && (Ue = this.length), $ < 0 || fe > H.length || ae < 0 || Ue > this.length)
throw new RangeError("out of range index");
if (ae >= Ue && $ >= fe)
return 0;
if (ae >= Ue)
return -1;
if ($ >= fe)
return 1;
if ($ >>>= 0, fe >>>= 0, ae >>>= 0, Ue >>>= 0, this === H) return 0;
let ke = Ue - ae, lt = fe - $;
const Tt = Math.min(ke, lt), bt = this.slice(ae, Ue), kt = H.slice($, fe);
for (let un = 0; un < Tt; ++un)
if (bt[un] !== kt[un]) {
ke = bt[un], lt = kt[un];
break;
}
return ke < lt ? -1 : lt < ke ? 1 : 0;
};
function z(ie, H, $, fe, ae) {
if (ie.length === 0) return -1;
if (typeof $ == "string" ? (fe = $, $ = 0) : $ > 2147483647 ? $ = 2147483647 : $ < -2147483648 && ($ = -2147483648), $ = +$, Re($) && ($ = ae ? 0 : ie.length - 1), $ < 0 && ($ = ie.length + $), $ >= ie.length) {
if (ae) return -1;
$ = ie.length - 1;
} else if ($ < 0)
if (ae) $ = 0;
else return -1;
if (typeof H == "string" && (H = b.from(H, fe)), b.isBuffer(H))
return H.length === 0 ? -1 : W(ie, H, $, fe, ae);
if (typeof H == "number")
return H = H & 255, typeof Uint8Array.prototype.indexOf == "function" ? ae ? Uint8Array.prototype.indexOf.call(ie, H, $) : Uint8Array.prototype.lastIndexOf.call(ie, H, $) : W(ie, [H], $, fe, ae);
throw new TypeError("val must be string, number or Buffer");
}
function W(ie, H, $, fe, ae) {
let Ue = 1, ke = ie.length, lt = H.length;
if (fe !== void 0 && (fe = String(fe).toLowerCase(), fe === "ucs2" || fe === "ucs-2" || fe === "utf16le" || fe === "utf-16le")) {
if (ie.length < 2 || H.length < 2)
return -1;
Ue = 2, ke /= 2, lt /= 2, $ /= 2;
}
function Tt(kt, un) {
return Ue === 1 ? kt[un] : kt.readUInt16BE(un * Ue);
}
let bt;
if (ae) {
let kt = -1;
for (bt = $; bt < ke; bt++)
if (Tt(ie, bt) === Tt(H, kt === -1 ? 0 : bt - kt)) {
if (kt === -1 && (kt = bt), bt - kt + 1 === lt) return kt * Ue;
} else
kt !== -1 && (bt -= bt - kt), kt = -1;
} else
for ($ + lt > ke && ($ = ke - lt), bt = $; bt >= 0; bt--) {
let kt = !0;
for (let un = 0; un < lt; un++)
if (Tt(ie, bt + un) !== Tt(H, un)) {
kt = !1;
break;
}
if (kt) return bt;
}
return -1;
}
b.prototype.includes = function(H, $, fe) {
return this.indexOf(H, $, fe) !== -1;
}, b.prototype.indexOf = function(H, $, fe) {
return z(this, H, $, fe, !0);
}, b.prototype.lastIndexOf = function(H, $, fe) {
return z(this, H, $, fe, !1);
};
function G(ie, H, $, fe) {
$ = Number($) || 0;
const ae = ie.length - $;
fe ? (fe = Number(fe), fe > ae && (fe = ae)) : fe = ae;
const Ue = H.length;
fe > Ue / 2 && (fe = Ue / 2);
let ke;
for (ke = 0; ke < fe; ++ke) {
const lt = parseInt(H.substr(ke * 2, 2), 16);
if (Re(lt)) return ke;
ie[$ + ke] = lt;
}
return ke;
}
function Q(ie, H, $, fe) {
return me(Wt(H, ie.length - $), ie, $, fe);
}
function k(ie, H, $, fe) {
return me(Ut(H), ie, $, fe);
}
function te(ie, H, $, fe) {
return me(yt(H), ie, $, fe);
}
function K(ie, H, $, fe) {
return me(vn(H, ie.length - $), ie, $, fe);
}
b.prototype.write = function(H, $, fe, ae) {
if ($ === void 0)
ae = "utf8", fe = this.length, $ = 0;
else if (fe ==