@shopware-ag/dive
Version:
Shopware Spatial Framework
1,512 lines • 147 kB
JavaScript
var _d = Object.defineProperty;
var dd = (d, g, o) => g in d ? _d(d, g, { enumerable: !0, configurable: !0, writable: !0, value: o }) : d[g] = o;
var fn = (d, g, o) => dd(d, typeof g != "symbol" ? g + "" : g, o);
import { g as pd } from "../../chunks/MathUtils-CFGjHuVF.mjs";
import { B as vd } from "../../chunks/OrbitController-BQ6SV1O_.mjs";
import "../../chunks/FileTypes-BawiSSTm.mjs";
import "three";
import { a as _o, i as wd } from "../../chunks/PovSchema-DWWvr_ED.mjs";
import { i as po } from "../../chunks/SelectTool-DxVRSIoF.mjs";
const vo = {};
function N(d, g) {
vo[d] = g;
}
function xd(d) {
return vo[d];
}
class U {
constructor(g, o) {
fn(this, "_payload");
fn(this, "_dependencies");
this._payload = g, this._dependencies = o;
}
/**
* Factory method to create a new Action class with the specified description and execution logic.
*
* @template P - The type of the payload (use void for actions without payload)
* @template D - The type of dependencies
* @template R - The return type of the action
* @param options - Configuration options for the action
* @param options.description - A description of what the action does
* @param options.execute - The function that implements the action's logic
* @returns A new Action class that can be instantiated with payload and dependencies
*/
static define({
description: g,
execute: o
}) {
return class extends U {
constructor(E, $) {
super(E, $);
fn(this, "_description", g);
fn(this, "_payload");
this._payload = E;
}
execute() {
return o(this._payload, this._dependencies);
}
};
}
}
const Ad = U.define({
description: "Launches AR mode in native capabilities. (iOS: AR Quick Look, Android: Google Scene Viewer)",
execute: async (d, { getARSystem: g }) => g().then((o) => {
o.launch(d.uri, d.options);
})
});
N("LAUNCH_AR", Ad);
const Ed = U.define({
description: "Calculates the camera position and target to view the whole scene. (experimental).",
execute: (d, { engine: g, controller: o }) => {
const S = new vd(g.scene.root, !1, 65280);
return o.computeEncompassingView(S);
}
});
N(
"COMPUTE_ENCOMPASSING_VIEW",
Ed
);
const md = U.define({
description: "Gets the current camera position and target.",
execute: (d, { controller: g }) => ({
position: g.object.position.clone(),
target: g.target.clone()
})
});
N(
"GET_CAMERA_TRANSFORM",
md
);
const Sd = U.define({
description: "Moves the camera to a new position and target.",
execute: async (d, { controller: g, registered: o, getAnimationSystem: S, engine: E }) => {
let $ = { x: 0, y: 0, z: 0 }, z = { x: 0, y: 0, z: 0 };
if ("id" in d) {
const Y = o.get(d.id);
if (!Y)
throw new Error(
`POV with id ${d.id} not registered. Registered: ${o}`
);
if (!_o(Y))
throw new Error(
`Object with id ${d.id} is not a POV. Object: ${Y}`
);
$ = Y.position, z = Y.target;
} else
$ = d.position, z = d.target;
const X = await S().then(
(Y) => {
E.clock.hasTicker(Y) || E.clock.addTicker(Y), g.enabled = !0;
const sr = Y.animate(
g.object.position,
$,
d.duration,
{
easing: Y.TWEEN.Easing.Quadratic.Out
}
).play(), ve = Y.animate(g.target, z, d.duration, {
easing: Y.TWEEN.Easing.Quadratic.Out,
onUpdate: () => {
g.object.lookAt(g.target);
},
onComplete: () => {
g.enabled = !d.locked;
}
}).play();
return [
sr,
ve
];
}
);
return {
stop: () => X.forEach((Y) => Y.stop())
};
}
});
N("MOVE_CAMERA", Sd);
const bd = U.define({
description: "Sets the camera layer to a certain layer.",
execute: (d, { controller: g }) => {
g.object.setCameraLayer(d.layer);
}
});
N("SET_CAMERA_LAYER", bd);
const Od = U.define({
description: "Sets the camera position and target.",
execute: (d, { controller: g }) => {
g.object.position.copy(d.position), g.target.copy(d.target), g.update();
}
});
N(
"SET_CAMERA_TRANSFORM",
Od
);
const Td = U.define({
description: "Zooms the camera in or out by a certain amount.",
execute: (d, { controller: g }) => {
d.direction === "IN" && g.zoomIn(d.by), d.direction === "OUT" && g.zoomOut(d.by);
}
});
N("ZOOM_CAMERA", Td);
const Id = U.define({
description: "Generates a screenshot, stores it in a Blob and returns a Promise of a valid URI.",
execute: async (d, { registered: g, getMediaCreator: o }) => {
const S = await o();
if ("id" in d) {
const E = g.get(d.id);
if (!E)
throw new Error(
`Object with id ${d.id} not registered. Registered: ${g}`
);
if (!_o(E))
throw new Error(
`Object with id ${d.id} is not a POV. Object: ${E}`
);
const { resolution: $ } = d, { position: z, target: X } = E;
return S.generateMedia({
position: z,
target: X,
resolution: $
});
}
return S.generateMedia(d);
}
});
N("GENERATE_MEDIA", Id);
const Cd = U.define({
description: "Adds an object to the scene.",
execute: (d, { engine: g, registered: o }) => {
o.get(d.id) || (d.parentId === void 0 && (d.parentId = null), o.set(d.id, d), g.scene.root.addSceneObject(d));
}
});
N("ADD_OBJECT", Cd);
var or = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, at = { exports: {} };
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var Rd = at.exports, ho;
function yd() {
return ho || (ho = 1, function(d, g) {
(function() {
var o, S = "4.17.21", E = 200, $ = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", z = "Expected a function", X = "Invalid `variable` option passed into `_.template`", Y = "__lodash_hash_undefined__", sr = 500, ve = "__lodash_placeholder__", kn = 1, Li = 2, we = 4, xe = 1, ht = 2, Cn = 1, Ae = 2, Mi = 4, Nn = 8, Ge = 16, Gn = 32, $e = 64, $n = 128, He = 256, cr = 512, xo = 30, Ao = "...", Eo = 800, mo = 16, Di = 1, So = 2, bo = 3, gt = 1 / 0, Ee = 9007199254740991, Oo = 17976931348623157e292, _t = NaN, Bn = 4294967295, To = Bn - 1, Io = Bn >>> 1, Co = [
["ary", $n],
["bind", Cn],
["bindKey", Ae],
["curry", Nn],
["curryRight", Ge],
["flip", cr],
["partial", Gn],
["partialRight", $e],
["rearg", He]
], me = "[object Arguments]", dt = "[object Array]", Ro = "[object AsyncFunction]", ze = "[object Boolean]", qe = "[object Date]", yo = "[object DOMException]", pt = "[object Error]", vt = "[object Function]", Pi = "[object GeneratorFunction]", Rn = "[object Map]", Ke = "[object Number]", Lo = "[object Null]", Hn = "[object Object]", Bi = "[object Promise]", Mo = "[object Proxy]", Ze = "[object RegExp]", yn = "[object Set]", Ye = "[object String]", wt = "[object Symbol]", Do = "[object Undefined]", Je = "[object WeakMap]", Po = "[object WeakSet]", Xe = "[object ArrayBuffer]", Se = "[object DataView]", lr = "[object Float32Array]", ar = "[object Float64Array]", hr = "[object Int8Array]", gr = "[object Int16Array]", _r = "[object Int32Array]", dr = "[object Uint8Array]", pr = "[object Uint8ClampedArray]", vr = "[object Uint16Array]", wr = "[object Uint32Array]", Bo = /\b__p \+= '';/g, Wo = /\b(__p \+=) '' \+/g, Uo = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Wi = /&(?:amp|lt|gt|quot|#39);/g, Ui = /[&<>"']/g, Fo = RegExp(Wi.source), No = RegExp(Ui.source), Go = /<%-([\s\S]+?)%>/g, $o = /<%([\s\S]+?)%>/g, Fi = /<%=([\s\S]+?)%>/g, Ho = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, zo = /^\w*$/, qo = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, xr = /[\\^$.*+?()[\]{}|]/g, Ko = RegExp(xr.source), Ar = /^\s+/, Zo = /\s/, Yo = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Jo = /\{\n\/\* \[wrapped with (.+)\] \*/, Xo = /,? & /, Qo = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Vo = /[()=,{}\[\]\/\s]/, ko = /\\(\\)?/g, jo = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Ni = /\w*$/, ns = /^[-+]0x[0-9a-f]+$/i, es = /^0b[01]+$/i, ts = /^\[object .+?Constructor\]$/, rs = /^0o[0-7]+$/i, is = /^(?:0|[1-9]\d*)$/, us = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, xt = /($^)/, fs = /['\n\r\u2028\u2029\\]/g, At = "\\ud800-\\udfff", os = "\\u0300-\\u036f", ss = "\\ufe20-\\ufe2f", cs = "\\u20d0-\\u20ff", Gi = os + ss + cs, $i = "\\u2700-\\u27bf", Hi = "a-z\\xdf-\\xf6\\xf8-\\xff", ls = "\\xac\\xb1\\xd7\\xf7", as = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", hs = "\\u2000-\\u206f", gs = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", zi = "A-Z\\xc0-\\xd6\\xd8-\\xde", qi = "\\ufe0e\\ufe0f", Ki = ls + as + hs + gs, Er = "['’]", _s = "[" + At + "]", Zi = "[" + Ki + "]", Et = "[" + Gi + "]", Yi = "\\d+", ds = "[" + $i + "]", Ji = "[" + Hi + "]", Xi = "[^" + At + Ki + Yi + $i + Hi + zi + "]", mr = "\\ud83c[\\udffb-\\udfff]", ps = "(?:" + Et + "|" + mr + ")", Qi = "[^" + At + "]", Sr = "(?:\\ud83c[\\udde6-\\uddff]){2}", br = "[\\ud800-\\udbff][\\udc00-\\udfff]", be = "[" + zi + "]", Vi = "\\u200d", ki = "(?:" + Ji + "|" + Xi + ")", vs = "(?:" + be + "|" + Xi + ")", ji = "(?:" + Er + "(?:d|ll|m|re|s|t|ve))?", nu = "(?:" + Er + "(?:D|LL|M|RE|S|T|VE))?", eu = ps + "?", tu = "[" + qi + "]?", ws = "(?:" + Vi + "(?:" + [Qi, Sr, br].join("|") + ")" + tu + eu + ")*", xs = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", As = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", ru = tu + eu + ws, Es = "(?:" + [ds, Sr, br].join("|") + ")" + ru, ms = "(?:" + [Qi + Et + "?", Et, Sr, br, _s].join("|") + ")", Ss = RegExp(Er, "g"), bs = RegExp(Et, "g"), Or = RegExp(mr + "(?=" + mr + ")|" + ms + ru, "g"), Os = RegExp([
be + "?" + Ji + "+" + ji + "(?=" + [Zi, be, "$"].join("|") + ")",
vs + "+" + nu + "(?=" + [Zi, be + ki, "$"].join("|") + ")",
be + "?" + ki + "+" + ji,
be + "+" + nu,
As,
xs,
Yi,
Es
].join("|"), "g"), Ts = RegExp("[" + Vi + At + Gi + qi + "]"), Is = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, Cs = [
"Array",
"Buffer",
"DataView",
"Date",
"Error",
"Float32Array",
"Float64Array",
"Function",
"Int8Array",
"Int16Array",
"Int32Array",
"Map",
"Math",
"Object",
"Promise",
"RegExp",
"Set",
"String",
"Symbol",
"TypeError",
"Uint8Array",
"Uint8ClampedArray",
"Uint16Array",
"Uint32Array",
"WeakMap",
"_",
"clearTimeout",
"isFinite",
"parseInt",
"setTimeout"
], Rs = -1, q = {};
q[lr] = q[ar] = q[hr] = q[gr] = q[_r] = q[dr] = q[pr] = q[vr] = q[wr] = !0, q[me] = q[dt] = q[Xe] = q[ze] = q[Se] = q[qe] = q[pt] = q[vt] = q[Rn] = q[Ke] = q[Hn] = q[Ze] = q[yn] = q[Ye] = q[Je] = !1;
var H = {};
H[me] = H[dt] = H[Xe] = H[Se] = H[ze] = H[qe] = H[lr] = H[ar] = H[hr] = H[gr] = H[_r] = H[Rn] = H[Ke] = H[Hn] = H[Ze] = H[yn] = H[Ye] = H[wt] = H[dr] = H[pr] = H[vr] = H[wr] = !0, H[pt] = H[vt] = H[Je] = !1;
var ys = {
// Latin-1 Supplement block.
À: "A",
Á: "A",
Â: "A",
Ã: "A",
Ä: "A",
Å: "A",
à: "a",
á: "a",
â: "a",
ã: "a",
ä: "a",
å: "a",
Ç: "C",
ç: "c",
Ð: "D",
ð: "d",
È: "E",
É: "E",
Ê: "E",
Ë: "E",
è: "e",
é: "e",
ê: "e",
ë: "e",
Ì: "I",
Í: "I",
Î: "I",
Ï: "I",
ì: "i",
í: "i",
î: "i",
ï: "i",
Ñ: "N",
ñ: "n",
Ò: "O",
Ó: "O",
Ô: "O",
Õ: "O",
Ö: "O",
Ø: "O",
ò: "o",
ó: "o",
ô: "o",
õ: "o",
ö: "o",
ø: "o",
Ù: "U",
Ú: "U",
Û: "U",
Ü: "U",
ù: "u",
ú: "u",
û: "u",
ü: "u",
Ý: "Y",
ý: "y",
ÿ: "y",
Æ: "Ae",
æ: "ae",
Þ: "Th",
þ: "th",
ß: "ss",
// Latin Extended-A block.
Ā: "A",
Ă: "A",
Ą: "A",
ā: "a",
ă: "a",
ą: "a",
Ć: "C",
Ĉ: "C",
Ċ: "C",
Č: "C",
ć: "c",
ĉ: "c",
ċ: "c",
č: "c",
Ď: "D",
Đ: "D",
ď: "d",
đ: "d",
Ē: "E",
Ĕ: "E",
Ė: "E",
Ę: "E",
Ě: "E",
ē: "e",
ĕ: "e",
ė: "e",
ę: "e",
ě: "e",
Ĝ: "G",
Ğ: "G",
Ġ: "G",
Ģ: "G",
ĝ: "g",
ğ: "g",
ġ: "g",
ģ: "g",
Ĥ: "H",
Ħ: "H",
ĥ: "h",
ħ: "h",
Ĩ: "I",
Ī: "I",
Ĭ: "I",
Į: "I",
İ: "I",
ĩ: "i",
ī: "i",
ĭ: "i",
į: "i",
ı: "i",
Ĵ: "J",
ĵ: "j",
Ķ: "K",
ķ: "k",
ĸ: "k",
Ĺ: "L",
Ļ: "L",
Ľ: "L",
Ŀ: "L",
Ł: "L",
ĺ: "l",
ļ: "l",
ľ: "l",
ŀ: "l",
ł: "l",
Ń: "N",
Ņ: "N",
Ň: "N",
Ŋ: "N",
ń: "n",
ņ: "n",
ň: "n",
ŋ: "n",
Ō: "O",
Ŏ: "O",
Ő: "O",
ō: "o",
ŏ: "o",
ő: "o",
Ŕ: "R",
Ŗ: "R",
Ř: "R",
ŕ: "r",
ŗ: "r",
ř: "r",
Ś: "S",
Ŝ: "S",
Ş: "S",
Š: "S",
ś: "s",
ŝ: "s",
ş: "s",
š: "s",
Ţ: "T",
Ť: "T",
Ŧ: "T",
ţ: "t",
ť: "t",
ŧ: "t",
Ũ: "U",
Ū: "U",
Ŭ: "U",
Ů: "U",
Ű: "U",
Ų: "U",
ũ: "u",
ū: "u",
ŭ: "u",
ů: "u",
ű: "u",
ų: "u",
Ŵ: "W",
ŵ: "w",
Ŷ: "Y",
ŷ: "y",
Ÿ: "Y",
Ź: "Z",
Ż: "Z",
Ž: "Z",
ź: "z",
ż: "z",
ž: "z",
IJ: "IJ",
ij: "ij",
Œ: "Oe",
œ: "oe",
ʼn: "'n",
ſ: "s"
}, Ls = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
}, Ms = {
"&": "&",
"<": "<",
">": ">",
""": '"',
"'": "'"
}, Ds = {
"\\": "\\",
"'": "'",
"\n": "n",
"\r": "r",
"\u2028": "u2028",
"\u2029": "u2029"
}, Ps = parseFloat, Bs = parseInt, iu = typeof or == "object" && or && or.Object === Object && or, Ws = typeof self == "object" && self && self.Object === Object && self, en = iu || Ws || Function("return this")(), Tr = g && !g.nodeType && g, se = Tr && !0 && d && !d.nodeType && d, uu = se && se.exports === Tr, Ir = uu && iu.process, An = function() {
try {
var l = se && se.require && se.require("util").types;
return l || Ir && Ir.binding && Ir.binding("util");
} catch {
}
}(), fu = An && An.isArrayBuffer, ou = An && An.isDate, su = An && An.isMap, cu = An && An.isRegExp, lu = An && An.isSet, au = An && An.isTypedArray;
function _n(l, _, h) {
switch (h.length) {
case 0:
return l.call(_);
case 1:
return l.call(_, h[0]);
case 2:
return l.call(_, h[0], h[1]);
case 3:
return l.call(_, h[0], h[1], h[2]);
}
return l.apply(_, h);
}
function Us(l, _, h, A) {
for (var I = -1, B = l == null ? 0 : l.length; ++I < B; ) {
var k = l[I];
_(A, k, h(k), l);
}
return A;
}
function En(l, _) {
for (var h = -1, A = l == null ? 0 : l.length; ++h < A && _(l[h], h, l) !== !1; )
;
return l;
}
function Fs(l, _) {
for (var h = l == null ? 0 : l.length; h-- && _(l[h], h, l) !== !1; )
;
return l;
}
function hu(l, _) {
for (var h = -1, A = l == null ? 0 : l.length; ++h < A; )
if (!_(l[h], h, l))
return !1;
return !0;
}
function jn(l, _) {
for (var h = -1, A = l == null ? 0 : l.length, I = 0, B = []; ++h < A; ) {
var k = l[h];
_(k, h, l) && (B[I++] = k);
}
return B;
}
function mt(l, _) {
var h = l == null ? 0 : l.length;
return !!h && Oe(l, _, 0) > -1;
}
function Cr(l, _, h) {
for (var A = -1, I = l == null ? 0 : l.length; ++A < I; )
if (h(_, l[A]))
return !0;
return !1;
}
function K(l, _) {
for (var h = -1, A = l == null ? 0 : l.length, I = Array(A); ++h < A; )
I[h] = _(l[h], h, l);
return I;
}
function ne(l, _) {
for (var h = -1, A = _.length, I = l.length; ++h < A; )
l[I + h] = _[h];
return l;
}
function Rr(l, _, h, A) {
var I = -1, B = l == null ? 0 : l.length;
for (A && B && (h = l[++I]); ++I < B; )
h = _(h, l[I], I, l);
return h;
}
function Ns(l, _, h, A) {
var I = l == null ? 0 : l.length;
for (A && I && (h = l[--I]); I--; )
h = _(h, l[I], I, l);
return h;
}
function yr(l, _) {
for (var h = -1, A = l == null ? 0 : l.length; ++h < A; )
if (_(l[h], h, l))
return !0;
return !1;
}
var Gs = Lr("length");
function $s(l) {
return l.split("");
}
function Hs(l) {
return l.match(Qo) || [];
}
function gu(l, _, h) {
var A;
return h(l, function(I, B, k) {
if (_(I, B, k))
return A = B, !1;
}), A;
}
function St(l, _, h, A) {
for (var I = l.length, B = h + (A ? 1 : -1); A ? B-- : ++B < I; )
if (_(l[B], B, l))
return B;
return -1;
}
function Oe(l, _, h) {
return _ === _ ? nc(l, _, h) : St(l, _u, h);
}
function zs(l, _, h, A) {
for (var I = h - 1, B = l.length; ++I < B; )
if (A(l[I], _))
return I;
return -1;
}
function _u(l) {
return l !== l;
}
function du(l, _) {
var h = l == null ? 0 : l.length;
return h ? Dr(l, _) / h : _t;
}
function Lr(l) {
return function(_) {
return _ == null ? o : _[l];
};
}
function Mr(l) {
return function(_) {
return l == null ? o : l[_];
};
}
function pu(l, _, h, A, I) {
return I(l, function(B, k, G) {
h = A ? (A = !1, B) : _(h, B, k, G);
}), h;
}
function qs(l, _) {
var h = l.length;
for (l.sort(_); h--; )
l[h] = l[h].value;
return l;
}
function Dr(l, _) {
for (var h, A = -1, I = l.length; ++A < I; ) {
var B = _(l[A]);
B !== o && (h = h === o ? B : h + B);
}
return h;
}
function Pr(l, _) {
for (var h = -1, A = Array(l); ++h < l; )
A[h] = _(h);
return A;
}
function Ks(l, _) {
return K(_, function(h) {
return [h, l[h]];
});
}
function vu(l) {
return l && l.slice(0, Eu(l) + 1).replace(Ar, "");
}
function dn(l) {
return function(_) {
return l(_);
};
}
function Br(l, _) {
return K(_, function(h) {
return l[h];
});
}
function Qe(l, _) {
return l.has(_);
}
function wu(l, _) {
for (var h = -1, A = l.length; ++h < A && Oe(_, l[h], 0) > -1; )
;
return h;
}
function xu(l, _) {
for (var h = l.length; h-- && Oe(_, l[h], 0) > -1; )
;
return h;
}
function Zs(l, _) {
for (var h = l.length, A = 0; h--; )
l[h] === _ && ++A;
return A;
}
var Ys = Mr(ys), Js = Mr(Ls);
function Xs(l) {
return "\\" + Ds[l];
}
function Qs(l, _) {
return l == null ? o : l[_];
}
function Te(l) {
return Ts.test(l);
}
function Vs(l) {
return Is.test(l);
}
function ks(l) {
for (var _, h = []; !(_ = l.next()).done; )
h.push(_.value);
return h;
}
function Wr(l) {
var _ = -1, h = Array(l.size);
return l.forEach(function(A, I) {
h[++_] = [I, A];
}), h;
}
function Au(l, _) {
return function(h) {
return l(_(h));
};
}
function ee(l, _) {
for (var h = -1, A = l.length, I = 0, B = []; ++h < A; ) {
var k = l[h];
(k === _ || k === ve) && (l[h] = ve, B[I++] = h);
}
return B;
}
function bt(l) {
var _ = -1, h = Array(l.size);
return l.forEach(function(A) {
h[++_] = A;
}), h;
}
function js(l) {
var _ = -1, h = Array(l.size);
return l.forEach(function(A) {
h[++_] = [A, A];
}), h;
}
function nc(l, _, h) {
for (var A = h - 1, I = l.length; ++A < I; )
if (l[A] === _)
return A;
return -1;
}
function ec(l, _, h) {
for (var A = h + 1; A--; )
if (l[A] === _)
return A;
return A;
}
function Ie(l) {
return Te(l) ? rc(l) : Gs(l);
}
function Ln(l) {
return Te(l) ? ic(l) : $s(l);
}
function Eu(l) {
for (var _ = l.length; _-- && Zo.test(l.charAt(_)); )
;
return _;
}
var tc = Mr(Ms);
function rc(l) {
for (var _ = Or.lastIndex = 0; Or.test(l); )
++_;
return _;
}
function ic(l) {
return l.match(Or) || [];
}
function uc(l) {
return l.match(Os) || [];
}
var fc = function l(_) {
_ = _ == null ? en : Ce.defaults(en.Object(), _, Ce.pick(en, Cs));
var h = _.Array, A = _.Date, I = _.Error, B = _.Function, k = _.Math, G = _.Object, Ur = _.RegExp, oc = _.String, mn = _.TypeError, Ot = h.prototype, sc = B.prototype, Re = G.prototype, Tt = _["__core-js_shared__"], It = sc.toString, F = Re.hasOwnProperty, cc = 0, mu = function() {
var n = /[^.]+$/.exec(Tt && Tt.keys && Tt.keys.IE_PROTO || "");
return n ? "Symbol(src)_1." + n : "";
}(), Ct = Re.toString, lc = It.call(G), ac = en._, hc = Ur(
"^" + It.call(F).replace(xr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
), Rt = uu ? _.Buffer : o, te = _.Symbol, yt = _.Uint8Array, Su = Rt ? Rt.allocUnsafe : o, Lt = Au(G.getPrototypeOf, G), bu = G.create, Ou = Re.propertyIsEnumerable, Mt = Ot.splice, Tu = te ? te.isConcatSpreadable : o, Ve = te ? te.iterator : o, ce = te ? te.toStringTag : o, Dt = function() {
try {
var n = _e(G, "defineProperty");
return n({}, "", {}), n;
} catch {
}
}(), gc = _.clearTimeout !== en.clearTimeout && _.clearTimeout, _c = A && A.now !== en.Date.now && A.now, dc = _.setTimeout !== en.setTimeout && _.setTimeout, Pt = k.ceil, Bt = k.floor, Fr = G.getOwnPropertySymbols, pc = Rt ? Rt.isBuffer : o, Iu = _.isFinite, vc = Ot.join, wc = Au(G.keys, G), j = k.max, rn = k.min, xc = A.now, Ac = _.parseInt, Cu = k.random, Ec = Ot.reverse, Nr = _e(_, "DataView"), ke = _e(_, "Map"), Gr = _e(_, "Promise"), ye = _e(_, "Set"), je = _e(_, "WeakMap"), nt = _e(G, "create"), Wt = je && new je(), Le = {}, mc = de(Nr), Sc = de(ke), bc = de(Gr), Oc = de(ye), Tc = de(je), Ut = te ? te.prototype : o, et = Ut ? Ut.valueOf : o, Ru = Ut ? Ut.toString : o;
function u(n) {
if (J(n) && !C(n) && !(n instanceof D)) {
if (n instanceof Sn)
return n;
if (F.call(n, "__wrapped__"))
return Lf(n);
}
return new Sn(n);
}
var Me = /* @__PURE__ */ function() {
function n() {
}
return function(e) {
if (!Z(e))
return {};
if (bu)
return bu(e);
n.prototype = e;
var t = new n();
return n.prototype = o, t;
};
}();
function Ft() {
}
function Sn(n, e) {
this.__wrapped__ = n, this.__actions__ = [], this.__chain__ = !!e, this.__index__ = 0, this.__values__ = o;
}
u.templateSettings = {
/**
* Used to detect `data` property values to be HTML-escaped.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
escape: Go,
/**
* Used to detect code to be evaluated.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
evaluate: $o,
/**
* Used to detect `data` property values to inject.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
interpolate: Fi,
/**
* Used to reference the data object in the template text.
*
* @memberOf _.templateSettings
* @type {string}
*/
variable: "",
/**
* Used to import variables into the compiled template.
*
* @memberOf _.templateSettings
* @type {Object}
*/
imports: {
/**
* A reference to the `lodash` function.
*
* @memberOf _.templateSettings.imports
* @type {Function}
*/
_: u
}
}, u.prototype = Ft.prototype, u.prototype.constructor = u, Sn.prototype = Me(Ft.prototype), Sn.prototype.constructor = Sn;
function D(n) {
this.__wrapped__ = n, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = Bn, this.__views__ = [];
}
function Ic() {
var n = new D(this.__wrapped__);
return n.__actions__ = ln(this.__actions__), n.__dir__ = this.__dir__, n.__filtered__ = this.__filtered__, n.__iteratees__ = ln(this.__iteratees__), n.__takeCount__ = this.__takeCount__, n.__views__ = ln(this.__views__), n;
}
function Cc() {
if (this.__filtered__) {
var n = new D(this);
n.__dir__ = -1, n.__filtered__ = !0;
} else
n = this.clone(), n.__dir__ *= -1;
return n;
}
function Rc() {
var n = this.__wrapped__.value(), e = this.__dir__, t = C(n), r = e < 0, i = t ? n.length : 0, f = $l(0, i, this.__views__), s = f.start, c = f.end, a = c - s, p = r ? c : s - 1, v = this.__iteratees__, w = v.length, x = 0, m = rn(a, this.__takeCount__);
if (!t || !r && i == a && m == a)
return ju(n, this.__actions__);
var O = [];
n:
for (; a-- && x < m; ) {
p += e;
for (var y = -1, T = n[p]; ++y < w; ) {
var M = v[y], P = M.iteratee, wn = M.type, cn = P(T);
if (wn == So)
T = cn;
else if (!cn) {
if (wn == Di)
continue n;
break n;
}
}
O[x++] = T;
}
return O;
}
D.prototype = Me(Ft.prototype), D.prototype.constructor = D;
function le(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.clear(); ++e < t; ) {
var r = n[e];
this.set(r[0], r[1]);
}
}
function yc() {
this.__data__ = nt ? nt(null) : {}, this.size = 0;
}
function Lc(n) {
var e = this.has(n) && delete this.__data__[n];
return this.size -= e ? 1 : 0, e;
}
function Mc(n) {
var e = this.__data__;
if (nt) {
var t = e[n];
return t === Y ? o : t;
}
return F.call(e, n) ? e[n] : o;
}
function Dc(n) {
var e = this.__data__;
return nt ? e[n] !== o : F.call(e, n);
}
function Pc(n, e) {
var t = this.__data__;
return this.size += this.has(n) ? 0 : 1, t[n] = nt && e === o ? Y : e, this;
}
le.prototype.clear = yc, le.prototype.delete = Lc, le.prototype.get = Mc, le.prototype.has = Dc, le.prototype.set = Pc;
function zn(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.clear(); ++e < t; ) {
var r = n[e];
this.set(r[0], r[1]);
}
}
function Bc() {
this.__data__ = [], this.size = 0;
}
function Wc(n) {
var e = this.__data__, t = Nt(e, n);
if (t < 0)
return !1;
var r = e.length - 1;
return t == r ? e.pop() : Mt.call(e, t, 1), --this.size, !0;
}
function Uc(n) {
var e = this.__data__, t = Nt(e, n);
return t < 0 ? o : e[t][1];
}
function Fc(n) {
return Nt(this.__data__, n) > -1;
}
function Nc(n, e) {
var t = this.__data__, r = Nt(t, n);
return r < 0 ? (++this.size, t.push([n, e])) : t[r][1] = e, this;
}
zn.prototype.clear = Bc, zn.prototype.delete = Wc, zn.prototype.get = Uc, zn.prototype.has = Fc, zn.prototype.set = Nc;
function qn(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.clear(); ++e < t; ) {
var r = n[e];
this.set(r[0], r[1]);
}
}
function Gc() {
this.size = 0, this.__data__ = {
hash: new le(),
map: new (ke || zn)(),
string: new le()
};
}
function $c(n) {
var e = Vt(this, n).delete(n);
return this.size -= e ? 1 : 0, e;
}
function Hc(n) {
return Vt(this, n).get(n);
}
function zc(n) {
return Vt(this, n).has(n);
}
function qc(n, e) {
var t = Vt(this, n), r = t.size;
return t.set(n, e), this.size += t.size == r ? 0 : 1, this;
}
qn.prototype.clear = Gc, qn.prototype.delete = $c, qn.prototype.get = Hc, qn.prototype.has = zc, qn.prototype.set = qc;
function ae(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.__data__ = new qn(); ++e < t; )
this.add(n[e]);
}
function Kc(n) {
return this.__data__.set(n, Y), this;
}
function Zc(n) {
return this.__data__.has(n);
}
ae.prototype.add = ae.prototype.push = Kc, ae.prototype.has = Zc;
function Mn(n) {
var e = this.__data__ = new zn(n);
this.size = e.size;
}
function Yc() {
this.__data__ = new zn(), this.size = 0;
}
function Jc(n) {
var e = this.__data__, t = e.delete(n);
return this.size = e.size, t;
}
function Xc(n) {
return this.__data__.get(n);
}
function Qc(n) {
return this.__data__.has(n);
}
function Vc(n, e) {
var t = this.__data__;
if (t instanceof zn) {
var r = t.__data__;
if (!ke || r.length < E - 1)
return r.push([n, e]), this.size = ++t.size, this;
t = this.__data__ = new qn(r);
}
return t.set(n, e), this.size = t.size, this;
}
Mn.prototype.clear = Yc, Mn.prototype.delete = Jc, Mn.prototype.get = Xc, Mn.prototype.has = Qc, Mn.prototype.set = Vc;
function yu(n, e) {
var t = C(n), r = !t && pe(n), i = !t && !r && oe(n), f = !t && !r && !i && We(n), s = t || r || i || f, c = s ? Pr(n.length, oc) : [], a = c.length;
for (var p in n)
(e || F.call(n, p)) && !(s && // Safari 9 has enumerable `arguments.length` in strict mode.
(p == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
i && (p == "offset" || p == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
f && (p == "buffer" || p == "byteLength" || p == "byteOffset") || // Skip index properties.
Jn(p, a))) && c.push(p);
return c;
}
function Lu(n) {
var e = n.length;
return e ? n[Vr(0, e - 1)] : o;
}
function kc(n, e) {
return kt(ln(n), he(e, 0, n.length));
}
function jc(n) {
return kt(ln(n));
}
function $r(n, e, t) {
(t !== o && !Dn(n[e], t) || t === o && !(e in n)) && Kn(n, e, t);
}
function tt(n, e, t) {
var r = n[e];
(!(F.call(n, e) && Dn(r, t)) || t === o && !(e in n)) && Kn(n, e, t);
}
function Nt(n, e) {
for (var t = n.length; t--; )
if (Dn(n[t][0], e))
return t;
return -1;
}
function nl(n, e, t, r) {
return re(n, function(i, f, s) {
e(r, i, t(i), s);
}), r;
}
function Mu(n, e) {
return n && Un(e, nn(e), n);
}
function el(n, e) {
return n && Un(e, hn(e), n);
}
function Kn(n, e, t) {
e == "__proto__" && Dt ? Dt(n, e, {
configurable: !0,
enumerable: !0,
value: t,
writable: !0
}) : n[e] = t;
}
function Hr(n, e) {
for (var t = -1, r = e.length, i = h(r), f = n == null; ++t < r; )
i[t] = f ? o : mi(n, e[t]);
return i;
}
function he(n, e, t) {
return n === n && (t !== o && (n = n <= t ? n : t), e !== o && (n = n >= e ? n : e)), n;
}
function bn(n, e, t, r, i, f) {
var s, c = e & kn, a = e & Li, p = e & we;
if (t && (s = i ? t(n, r, i, f) : t(n)), s !== o)
return s;
if (!Z(n))
return n;
var v = C(n);
if (v) {
if (s = zl(n), !c)
return ln(n, s);
} else {
var w = un(n), x = w == vt || w == Pi;
if (oe(n))
return tf(n, c);
if (w == Hn || w == me || x && !i) {
if (s = a || x ? {} : mf(n), !c)
return a ? Ml(n, el(s, n)) : Ll(n, Mu(s, n));
} else {
if (!H[w])
return i ? n : {};
s = ql(n, w, c);
}
}
f || (f = new Mn());
var m = f.get(n);
if (m)
return m;
f.set(n, s), Vf(n) ? n.forEach(function(T) {
s.add(bn(T, e, t, T, n, f));
}) : Xf(n) && n.forEach(function(T, M) {
s.set(M, bn(T, e, t, M, n, f));
});
var O = p ? a ? si : oi : a ? hn : nn, y = v ? o : O(n);
return En(y || n, function(T, M) {
y && (M = T, T = n[M]), tt(s, M, bn(T, e, t, M, n, f));
}), s;
}
function tl(n) {
var e = nn(n);
return function(t) {
return Du(t, n, e);
};
}
function Du(n, e, t) {
var r = t.length;
if (n == null)
return !r;
for (n = G(n); r--; ) {
var i = t[r], f = e[i], s = n[i];
if (s === o && !(i in n) || !f(s))
return !1;
}
return !0;
}
function Pu(n, e, t) {
if (typeof n != "function")
throw new mn(z);
return ct(function() {
n.apply(o, t);
}, e);
}
function rt(n, e, t, r) {
var i = -1, f = mt, s = !0, c = n.length, a = [], p = e.length;
if (!c)
return a;
t && (e = K(e, dn(t))), r ? (f = Cr, s = !1) : e.length >= E && (f = Qe, s = !1, e = new ae(e));
n:
for (; ++i < c; ) {
var v = n[i], w = t == null ? v : t(v);
if (v = r || v !== 0 ? v : 0, s && w === w) {
for (var x = p; x--; )
if (e[x] === w)
continue n;
a.push(v);
} else f(e, w, r) || a.push(v);
}
return a;
}
var re = sf(Wn), Bu = sf(qr, !0);
function rl(n, e) {
var t = !0;
return re(n, function(r, i, f) {
return t = !!e(r, i, f), t;
}), t;
}
function Gt(n, e, t) {
for (var r = -1, i = n.length; ++r < i; ) {
var f = n[r], s = e(f);
if (s != null && (c === o ? s === s && !vn(s) : t(s, c)))
var c = s, a = f;
}
return a;
}
function il(n, e, t, r) {
var i = n.length;
for (t = R(t), t < 0 && (t = -t > i ? 0 : i + t), r = r === o || r > i ? i : R(r), r < 0 && (r += i), r = t > r ? 0 : jf(r); t < r; )
n[t++] = e;
return n;
}
function Wu(n, e) {
var t = [];
return re(n, function(r, i, f) {
e(r, i, f) && t.push(r);
}), t;
}
function tn(n, e, t, r, i) {
var f = -1, s = n.length;
for (t || (t = Zl), i || (i = []); ++f < s; ) {
var c = n[f];
e > 0 && t(c) ? e > 1 ? tn(c, e - 1, t, r, i) : ne(i, c) : r || (i[i.length] = c);
}
return i;
}
var zr = cf(), Uu = cf(!0);
function Wn(n, e) {
return n && zr(n, e, nn);
}
function qr(n, e) {
return n && Uu(n, e, nn);
}
function $t(n, e) {
return jn(e, function(t) {
return Xn(n[t]);
});
}
function ge(n, e) {
e = ue(e, n);
for (var t = 0, r = e.length; n != null && t < r; )
n = n[Fn(e[t++])];
return t && t == r ? n : o;
}
function Fu(n, e, t) {
var r = e(n);
return C(n) ? r : ne(r, t(n));
}
function on(n) {
return n == null ? n === o ? Do : Lo : ce && ce in G(n) ? Gl(n) : jl(n);
}
function Kr(n, e) {
return n > e;
}
function ul(n, e) {
return n != null && F.call(n, e);
}
function fl(n, e) {
return n != null && e in G(n);
}
function ol(n, e, t) {
return n >= rn(e, t) && n < j(e, t);
}
function Zr(n, e, t) {
for (var r = t ? Cr : mt, i = n[0].length, f = n.length, s = f, c = h(f), a = 1 / 0, p = []; s--; ) {
var v = n[s];
s && e && (v = K(v, dn(e))), a = rn(v.length, a), c[s] = !t && (e || i >= 120 && v.length >= 120) ? new ae(s && v) : o;
}
v = n[0];
var w = -1, x = c[0];
n:
for (; ++w < i && p.length < a; ) {
var m = v[w], O = e ? e(m) : m;
if (m = t || m !== 0 ? m : 0, !(x ? Qe(x, O) : r(p, O, t))) {
for (s = f; --s; ) {
var y = c[s];
if (!(y ? Qe(y, O) : r(n[s], O, t)))
continue n;
}
x && x.push(O), p.push(m);
}
}
return p;
}
function sl(n, e, t, r) {
return Wn(n, function(i, f, s) {
e(r, t(i), f, s);
}), r;
}
function it(n, e, t) {
e = ue(e, n), n = Tf(n, e);
var r = n == null ? n : n[Fn(Tn(e))];
return r == null ? o : _n(r, n, t);
}
function Nu(n) {
return J(n) && on(n) == me;
}
function cl(n) {
return J(n) && on(n) == Xe;
}
function ll(n) {
return J(n) && on(n) == qe;
}
function ut(n, e, t, r, i) {
return n === e ? !0 : n == null || e == null || !J(n) && !J(e) ? n !== n && e !== e : al(n, e, t, r, ut, i);
}
function al(n, e, t, r, i, f) {
var s = C(n), c = C(e), a = s ? dt : un(n), p = c ? dt : un(e);
a = a == me ? Hn : a, p = p == me ? Hn : p;
var v = a == Hn, w = p == Hn, x = a == p;
if (x && oe(n)) {
if (!oe(e))
return !1;
s = !0, v = !1;
}
if (x && !v)
return f || (f = new Mn()), s || We(n) ? xf(n, e, t, r, i, f) : Fl(n, e, a, t, r, i, f);
if (!(t & xe)) {
var m = v && F.call(n, "__wrapped__"), O = w && F.call(e, "__wrapped__");
if (m || O) {
var y = m ? n.value() : n, T = O ? e.value() : e;
return f || (f = new Mn()), i(y, T, t, r, f);
}
}
return x ? (f || (f = new Mn()), Nl(n, e, t, r, i, f)) : !1;
}
function hl(n) {
return J(n) && un(n) == Rn;
}
function Yr(n, e, t, r) {
var i = t.length, f = i, s = !r;
if (n == null)
return !f;
for (n = G(n); i--; ) {
var c = t[i];
if (s && c[2] ? c[1] !== n[c[0]] : !(c[0] in n))
return !1;
}
for (; ++i < f; ) {
c = t[i];
var a = c[0], p = n[a], v = c[1];
if (s && c[2]) {
if (p === o && !(a in n))
return !1;
} else {
var w = new Mn();
if (r)
var x = r(p, v, a, n, e, w);
if (!(x === o ? ut(v, p, xe | ht, r, w) : x))
return !1;
}
}
return !0;
}
function Gu(n) {
if (!Z(n) || Jl(n))
return !1;
var e = Xn(n) ? hc : ts;
return e.test(de(n));
}
function gl(n) {
return J(n) && on(n) == Ze;
}
function _l(n) {
return J(n) && un(n) == yn;
}
function dl(n) {
return J(n) && ir(n.length) && !!q[on(n)];
}
function $u(n) {
return typeof n == "function" ? n : n == null ? gn : typeof n == "object" ? C(n) ? qu(n[0], n[1]) : zu(n) : lo(n);
}
function Jr(n) {
if (!st(n))
return wc(n);
var e = [];
for (var t in G(n))
F.call(n, t) && t != "constructor" && e.push(t);
return e;
}
function pl(n) {
if (!Z(n))
return kl(n);
var e = st(n), t = [];
for (var r in n)
r == "constructor" && (e || !F.call(n, r)) || t.push(r);
return t;
}
function Xr(n, e) {
return n < e;
}
function Hu(n, e) {
var t = -1, r = an(n) ? h(n.length) : [];
return re(n, function(i, f, s) {
r[++t] = e(i, f, s);
}), r;
}
function zu(n) {
var e = li(n);
return e.length == 1 && e[0][2] ? bf(e[0][0], e[0][1]) : function(t) {
return t === n || Yr(t, n, e);
};
}
function qu(n, e) {
return hi(n) && Sf(e) ? bf(Fn(n), e) : function(t) {
var r = mi(t, n);
return r === o && r === e ? Si(t, n) : ut(e, r, xe | ht);
};
}
function Ht(n, e, t, r, i) {
n !== e && zr(e, function(f, s) {
if (i || (i = new Mn()), Z(f))
vl(n, e, s, t, Ht, r, i);
else {
var c = r ? r(_i(n, s), f, s + "", n, e, i) : o;
c === o && (c = f), $r(n, s, c);
}
}, hn);
}
function vl(n, e, t, r, i, f, s) {
var c = _i(n, t), a = _i(e, t), p = s.get(a);
if (p) {
$r(n, t, p);
return;
}
var v = f ? f(c, a, t + "", n, e, s) : o, w = v === o;
if (w) {
var x = C(a), m = !x && oe(a), O = !x && !m && We(a);
v = a, x || m || O ? C(c) ? v = c : Q(c) ? v = ln(c) : m ? (w = !1, v = tf(a, !0)) : O ? (w = !1, v = rf(a, !0)) : v = [] : lt(a) || pe(a) ? (v = c, pe(c) ? v = no(c) : (!Z(c) || Xn(c)) && (v = mf(a))) : w = !1;
}
w && (s.set(a, v), i(v, a, r, f, s), s.delete(a)), $r(n, t, v);
}
function Ku(n, e) {
var t = n.length;
if (t)
return e += e < 0 ? t : 0, Jn(e, t) ? n[e] : o;
}
function Zu(n, e, t) {
e.length ? e = K(e, function(f) {
return C(f) ? function(s) {
return ge(s, f.length === 1 ? f[0] : f);
} : f;
}) : e = [gn];
var r = -1;
e = K(e, dn(b()));
var i = Hu(n, function(f, s, c) {
var a = K(e, function(p) {
return p(f);
});
return { criteria: a, index: ++r, value: f };
});
return qs(i, function(f, s) {
return yl(f, s, t);
});
}
function wl(n, e) {
return Yu(n, e, function(t, r) {
return Si(n, r);
});
}
function Yu(n, e, t) {
for (var r = -1, i = e.length, f = {}; ++r < i; ) {
var s = e[r], c = ge(n, s);
t(c, s) && ft(f, ue(s, n), c);
}
return f;
}
function xl(n) {
return function(e) {
return ge(e, n);
};
}
function Qr(n, e, t, r) {
var i = r ? zs : Oe, f = -1, s = e.length, c = n;
for (n === e && (e = ln(e)), t && (c = K(n, dn(t))); ++f < s; )
for (var a = 0, p = e[f], v = t ? t(p) : p; (a = i(c, v, a, r)) > -1; )
c !== n && Mt.call(c, a, 1), Mt.call(n, a, 1);
return n;
}
function Ju(n, e) {
for (var t = n ? e.length : 0, r = t - 1; t--; ) {
var i = e[t];
if (t == r || i !== f) {
var f = i;
Jn(i) ? Mt.call(n, i, 1) : ni(n, i);
}
}
return n;
}
function Vr(n, e) {
return n + Bt(Cu() * (e - n + 1));
}
function Al(n, e, t, r) {
for (var i = -1, f = j(Pt((e - n) / (t || 1)), 0), s = h(f); f--; )
s[r ? f : ++i] = n, n += t;
return s;
}
function kr(n, e) {
var t = "";
if (!n || e < 1 || e > Ee)
return t;
do
e % 2 && (t += n), e = Bt(e / 2), e && (n += n);
while (e);
return t;
}
function L(n, e) {
return di(Of(n, e, gn), n + "");
}
function El(n) {
return Lu(Ue(n));
}
function ml(n, e) {
var t = Ue(n);
return kt(t, he(e, 0, t.length));
}
function ft(n, e, t, r) {
if (!Z(n))
return n;
e = ue(e, n);
for (var i = -1, f = e.length, s = f - 1, c = n; c != null && ++i < f; ) {
var a = Fn(e[i]), p = t;
if (a === "__proto__" || a === "constructor" || a === "prototype")
return n;
if (i != s) {
var v = c[a];
p = r ? r(v, a, c) : o, p === o && (p = Z(v) ? v : Jn(e[i + 1]) ? [] : {});
}
tt(c, a, p), c = c[a];
}
return n;
}
var Xu = Wt ? function(n, e) {
return Wt.set(n, e), n;
} : gn, Sl = Dt ? function(n, e) {
return Dt(n, "toString", {
configurable: !0,
enumerable: !1,
value: Oi(e),
writable: !0
});
} : gn;
function bl(n) {
return kt(Ue(n));
}
function On(n, e, t) {
var r = -1, i = n.length;
e < 0 && (e = -e > i ? 0 : i + e), t = t > i ? i : t, t < 0 && (t += i), i = e > t ? 0 : t - e >>> 0, e >>>= 0;
for (var f = h(i); ++r < i; )
f[r] = n[r + e];
return f;
}
function Ol(n, e) {
var t;
return re(n, function(r, i, f) {
return t = e(r, i, f), !t;
}), !!t;
}
function zt(n, e, t) {
var r = 0, i = n == null ? r : n.length;
if (typeof e == "number" && e === e && i <= Io) {
for (; r < i; ) {
var f = r + i >>> 1, s = n[f];
s !== null && !vn(s) && (t ? s <= e : s < e) ? r = f + 1 : i = f;
}
return i;
}
return jr(n, e, gn, t);
}
function jr(n, e, t, r) {
var i = 0, f = n == null ? 0 : n.length;
if (f === 0)
return 0;
e = t(e);