@shopware-ag/dive
Version:
Shopware Spatial Framework
1,512 lines • 147 kB
JavaScript
var _p = Object.defineProperty;
var pp = (p, g, o) => g in p ? _p(p, g, { enumerable: !0, configurable: !0, writable: !0, value: o }) : p[g] = o;
var rn = (p, g, o) => pp(p, typeof g != "symbol" ? g + "" : g, o);
import { MathUtils as dp } from "three/webgpu";
import { B as vp } from "../../chunks/FileTypes-Ck6z0LqE.mjs";
import "three/examples/jsm/loaders/HDRLoader.js";
import "three/tsl";
import { a as vo, i as wp } from "../../chunks/PovSchema-DWWvr_ED.mjs";
const wo = {};
function N(p, g) {
wo[p] = g;
}
function xp(p) {
return wo[p];
}
class F {
constructor(g, o) {
rn(this, "_payload");
rn(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 F {
constructor(m, G) {
super(m, G);
rn(this, "_description", g);
rn(this, "_payload");
this._payload = m;
}
execute() {
return o(this._payload, this._dependencies);
}
};
}
}
const Ap = F.define({
description: "Launches AR mode in native capabilities. (iOS: AR Quick Look, Android: Google Scene Viewer)",
execute: async (p, { getARSystem: g }) => g().then((o) => {
o.launch(p.uri, p.options);
})
});
N("LAUNCH_AR", Ap);
const mp = F.define({
description: "Calculates the camera position and target to view the whole scene. (experimental).",
execute: (p, { engine: g, controller: o }) => {
const S = new vp(g.scene.root, !1, 65280);
return o.computeEncompassingView(S);
}
});
N(
"COMPUTE_ENCOMPASSING_VIEW",
mp
);
const Ep = F.define({
description: "Gets the current camera position and target.",
execute: (p, { controller: g }) => ({
position: g.object.position.clone(),
target: g.target.clone()
})
});
N(
"GET_CAMERA_TRANSFORM",
Ep
);
const Sp = F.define({
description: "Moves the camera to a new position and target.",
execute: async (p, { controller: g, registered: o, getAnimationSystem: S, engine: m }) => {
const G = await S();
let z = { x: 0, y: 0, z: 0 }, un = { x: 0, y: 0, z: 0 };
if ("id" in p) {
const Nn = o.get(p.id);
if (!Nn)
throw new Error(
`POV with id ${p.id} not registered. Registered: ${o}`
);
if (!vo(Nn))
throw new Error(
`Object with id ${p.id} is not a POV. Object: ${Nn}`
);
z = Nn.position, un = Nn.target;
} else
z = p.position, un = p.target;
m.clock.hasTicker(G) || m.clock.addTicker(G), g.enabled = !0;
const kn = await G.fromTargets(
[
{
object: g.object.position,
to: z
},
{
object: g.target,
to: un
}
],
p.duration,
{
easing: G.Easing.Quadratic.Out,
onUpdate: () => {
g.object.lookAt(g.target);
},
onComplete: () => {
g.enabled = !p.locked;
}
}
);
return kn.play(), {
stop: () => kn.stop()
};
}
});
N("MOVE_CAMERA", Sp);
const bp = F.define({
description: "Sets the camera layer to a certain layer.",
execute: (p, { controller: g }) => {
"setCameraLayer" in g.object && g.object.setCameraLayer(p.layer);
}
});
N("SET_CAMERA_LAYER", bp);
const Op = F.define({
description: "Sets the camera position and target.",
execute: (p, { controller: g }) => {
g.object.position.copy(p.position), g.target.copy(p.target), g.update();
}
});
N(
"SET_CAMERA_TRANSFORM",
Op
);
const Tp = F.define({
description: "Zooms the camera in or out by a certain amount.",
execute: (p, { controller: g }) => {
p.direction === "IN" && g.zoomIn(p.by), p.direction === "OUT" && g.zoomOut(p.by);
}
});
N("ZOOM_CAMERA", Tp);
const Ip = F.define({
description: "Generates a screenshot, stores it in a Blob and returns a Promise of a valid URI.",
execute: async (p, { registered: g, getMediaCreator: o }) => {
const S = await o();
if ("id" in p) {
const m = g.get(p.id);
if (!m)
throw new Error(
`Object with id ${p.id} not registered. Registered: ${g}`
);
if (!vo(m))
throw new Error(
`Object with id ${p.id} is not a POV. Object: ${m}`
);
const { resolution: G } = p, { position: z, target: un } = m;
return S.generateMedia({
position: z,
target: un,
resolution: G
});
}
return S.generateMedia(p);
}
});
N("GENERATE_MEDIA", Ip);
const Rp = F.define({
description: "Adds an object to the scene.",
execute: (p, { engine: g, registered: o }) => {
o.get(p.id) || (p.parentId === void 0 && (p.parentId = null), o.set(p.id, p), g.scene.root.addSceneObject(p));
}
});
N("ADD_OBJECT", Rp);
var fr = 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 Cp = at.exports, _o;
function yp() {
return _o || (_o = 1, function(p, g) {
(function() {
var o, S = "4.18.1", m = 200, G = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", z = "Expected a function", un = "Invalid `variable` option passed into `_.template`", kn = "Invalid `imports` option passed into `_.template`", Nn = "__lodash_hash_undefined__", Ao = 500, ht = "__lodash_placeholder__", jn = 1, Li = 2, Ae = 4, me = 1, gt = 2, In = 1, Ee = 2, Mi = 4, Gn = 8, Ge = 16, $n = 32, $e = 64, Hn = 128, He = 256, sr = 512, mo = 30, Eo = "...", So = 800, bo = 16, Di = 1, Oo = 2, To = 3, le = 1 / 0, ne = 9007199254740991, Io = 17976931348623157e292, _t = NaN, Bn = 4294967295, Ro = Bn - 1, Co = Bn >>> 1, yo = [
["ary", Hn],
["bind", In],
["bindKey", Ee],
["curry", Gn],
["curryRight", Ge],
["flip", sr],
["partial", $n],
["partialRight", $e],
["rearg", He]
], Se = "[object Arguments]", pt = "[object Array]", Lo = "[object AsyncFunction]", ze = "[object Boolean]", qe = "[object Date]", Mo = "[object DOMException]", dt = "[object Error]", vt = "[object Function]", Pi = "[object GeneratorFunction]", Rn = "[object Map]", Ke = "[object Number]", Do = "[object Null]", zn = "[object Object]", Bi = "[object Promise]", Po = "[object Proxy]", Ze = "[object RegExp]", Cn = "[object Set]", Ye = "[object String]", wt = "[object Symbol]", Bo = "[object Undefined]", Je = "[object WeakMap]", Uo = "[object WeakSet]", Xe = "[object ArrayBuffer]", be = "[object DataView]", cr = "[object Float32Array]", lr = "[object Float64Array]", ar = "[object Int8Array]", hr = "[object Int16Array]", gr = "[object Int32Array]", _r = "[object Uint8Array]", pr = "[object Uint8ClampedArray]", dr = "[object Uint16Array]", vr = "[object Uint32Array]", Wo = /\b__p \+= '';/g, Fo = /\b(__p \+=) '' \+/g, No = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Ui = /&(?:amp|lt|gt|quot|#39);/g, Wi = /[&<>"']/g, Go = RegExp(Ui.source), $o = RegExp(Wi.source), Ho = /<%-([\s\S]+?)%>/g, zo = /<%([\s\S]+?)%>/g, Fi = /<%=([\s\S]+?)%>/g, qo = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Ko = /^\w*$/, Zo = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, wr = /[\\^$.*+?()[\]{}|]/g, Yo = RegExp(wr.source), xr = /^\s+/, Jo = /\s/, Xo = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Qo = /\{\n\/\* \[wrapped with (.+)\] \*/, Vo = /,? & /, ko = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Ni = /[()=,{}\[\]\/\s]/, jo = /\\(\\)?/g, ns = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Gi = /\w*$/, es = /^[-+]0x[0-9a-f]+$/i, ts = /^0b[01]+$/i, rs = /^\[object .+?Constructor\]$/, is = /^0o[0-7]+$/i, us = /^(?:0|[1-9]\d*)$/, fs = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, xt = /($^)/, os = /['\n\r\u2028\u2029\\]/g, At = "\\ud800-\\udfff", ss = "\\u0300-\\u036f", cs = "\\ufe20-\\ufe2f", ls = "\\u20d0-\\u20ff", $i = ss + cs + ls, Hi = "\\u2700-\\u27bf", zi = "a-z\\xdf-\\xf6\\xf8-\\xff", as = "\\xac\\xb1\\xd7\\xf7", hs = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", gs = "\\u2000-\\u206f", _s = " \\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", qi = "A-Z\\xc0-\\xd6\\xd8-\\xde", Ki = "\\ufe0e\\ufe0f", Zi = as + hs + gs + _s, Ar = "['’]", ps = "[" + At + "]", Yi = "[" + Zi + "]", mt = "[" + $i + "]", Ji = "\\d+", ds = "[" + Hi + "]", Xi = "[" + zi + "]", Qi = "[^" + At + Zi + Ji + Hi + zi + qi + "]", mr = "\\ud83c[\\udffb-\\udfff]", vs = "(?:" + mt + "|" + mr + ")", Vi = "[^" + At + "]", Er = "(?:\\ud83c[\\udde6-\\uddff]){2}", Sr = "[\\ud800-\\udbff][\\udc00-\\udfff]", Oe = "[" + qi + "]", ki = "\\u200d", ji = "(?:" + Xi + "|" + Qi + ")", ws = "(?:" + Oe + "|" + Qi + ")", nu = "(?:" + Ar + "(?:d|ll|m|re|s|t|ve))?", eu = "(?:" + Ar + "(?:D|LL|M|RE|S|T|VE))?", tu = vs + "?", ru = "[" + Ki + "]?", xs = "(?:" + ki + "(?:" + [Vi, Er, Sr].join("|") + ")" + ru + tu + ")*", As = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", ms = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", iu = ru + tu + xs, Es = "(?:" + [ds, Er, Sr].join("|") + ")" + iu, Ss = "(?:" + [Vi + mt + "?", mt, Er, Sr, ps].join("|") + ")", bs = RegExp(Ar, "g"), Os = RegExp(mt, "g"), br = RegExp(mr + "(?=" + mr + ")|" + Ss + iu, "g"), Ts = RegExp([
Oe + "?" + Xi + "+" + nu + "(?=" + [Yi, Oe, "$"].join("|") + ")",
ws + "+" + eu + "(?=" + [Yi, Oe + ji, "$"].join("|") + ")",
Oe + "?" + ji + "+" + nu,
Oe + "+" + eu,
ms,
As,
Ji,
Es
].join("|"), "g"), Is = RegExp("[" + ki + At + $i + Ki + "]"), Rs = /[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"
], ys = -1, q = {};
q[cr] = q[lr] = q[ar] = q[hr] = q[gr] = q[_r] = q[pr] = q[dr] = q[vr] = !0, q[Se] = q[pt] = q[Xe] = q[ze] = q[be] = q[qe] = q[dt] = q[vt] = q[Rn] = q[Ke] = q[zn] = q[Ze] = q[Cn] = q[Ye] = q[Je] = !1;
var H = {};
H[Se] = H[pt] = H[Xe] = H[be] = H[ze] = H[qe] = H[cr] = H[lr] = H[ar] = H[hr] = H[gr] = H[Rn] = H[Ke] = H[zn] = H[Ze] = H[Cn] = H[Ye] = H[wt] = H[_r] = H[pr] = H[dr] = H[vr] = !0, H[dt] = H[vt] = H[Je] = !1;
var Ls = {
// 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"
}, Ms = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
}, Ds = {
"&": "&",
"<": "<",
">": ">",
""": '"',
"'": "'"
}, Ps = {
"\\": "\\",
"'": "'",
"\n": "n",
"\r": "r",
"\u2028": "u2028",
"\u2029": "u2029"
}, Bs = parseFloat, Us = parseInt, uu = typeof fr == "object" && fr && fr.Object === Object && fr, Ws = typeof self == "object" && self && self.Object === Object && self, j = uu || Ws || Function("return this")(), Or = g && !g.nodeType && g, ae = Or && !0 && p && !p.nodeType && p, fu = ae && ae.exports === Or, Tr = fu && uu.process, An = function() {
try {
var l = ae && ae.require && ae.require("util").types;
return l || Tr && Tr.binding && Tr.binding("util");
} catch {
}
}(), ou = An && An.isArrayBuffer, su = An && An.isDate, cu = An && An.isMap, lu = An && An.isRegExp, au = An && An.isSet, hu = An && An.isTypedArray;
function gn(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 Fs(l, _, h, A) {
for (var I = -1, B = l == null ? 0 : l.length; ++I < B; ) {
var Q = l[I];
_(A, Q, h(Q), l);
}
return A;
}
function _n(l, _) {
for (var h = -1, A = l == null ? 0 : l.length; ++h < A && _(l[h], h, l) !== !1; )
;
return l;
}
function Ns(l, _) {
for (var h = l == null ? 0 : l.length; h-- && _(l[h], h, l) !== !1; )
;
return l;
}
function gu(l, _) {
for (var h = -1, A = l == null ? 0 : l.length; ++h < A; )
if (!_(l[h], h, l))
return !1;
return !0;
}
function ee(l, _) {
for (var h = -1, A = l == null ? 0 : l.length, I = 0, B = []; ++h < A; ) {
var Q = l[h];
_(Q, h, l) && (B[I++] = Q);
}
return B;
}
function Et(l, _) {
var h = l == null ? 0 : l.length;
return !!h && Te(l, _, 0) > -1;
}
function Ir(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 te(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 Gs(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 Cr(l, _) {
for (var h = -1, A = l == null ? 0 : l.length; ++h < A; )
if (_(l[h], h, l))
return !0;
return !1;
}
var $s = yr("length");
function Hs(l) {
return l.split("");
}
function zs(l) {
return l.match(ko) || [];
}
function _u(l, _, h) {
var A;
return h(l, function(I, B, Q) {
if (_(I, B, Q))
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 Te(l, _, h) {
return _ === _ ? ec(l, _, h) : St(l, pu, h);
}
function qs(l, _, h, A) {
for (var I = h - 1, B = l.length; ++I < B; )
if (A(l[I], _))
return I;
return -1;
}
function pu(l) {
return l !== l;
}
function du(l, _) {
var h = l == null ? 0 : l.length;
return h ? Mr(l, _) / h : _t;
}
function yr(l) {
return function(_) {
return _ == null ? o : _[l];
};
}
function Lr(l) {
return function(_) {
return l == null ? o : l[_];
};
}
function vu(l, _, h, A, I) {
return I(l, function(B, Q, $) {
h = A ? (A = !1, B) : _(h, B, Q, $);
}), h;
}
function Ks(l, _) {
var h = l.length;
for (l.sort(_); h--; )
l[h] = l[h].value;
return l;
}
function Mr(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 Dr(l, _) {
for (var h = -1, A = Array(l); ++h < l; )
A[h] = _(h);
return A;
}
function Zs(l, _) {
return K(_, function(h) {
return [h, l[h]];
});
}
function wu(l) {
return l && l.slice(0, Eu(l) + 1).replace(xr, "");
}
function pn(l) {
return function(_) {
return l(_);
};
}
function Pr(l, _) {
return K(_, function(h) {
return l[h];
});
}
function Qe(l, _) {
return l.has(_);
}
function xu(l, _) {
for (var h = -1, A = l.length; ++h < A && Te(_, l[h], 0) > -1; )
;
return h;
}
function Au(l, _) {
for (var h = l.length; h-- && Te(_, l[h], 0) > -1; )
;
return h;
}
function Ys(l, _) {
for (var h = l.length, A = 0; h--; )
l[h] === _ && ++A;
return A;
}
var Js = Lr(Ls), Xs = Lr(Ms);
function Qs(l) {
return "\\" + Ps[l];
}
function Vs(l, _) {
return l == null ? o : l[_];
}
function Ie(l) {
return Is.test(l);
}
function ks(l) {
return Rs.test(l);
}
function js(l) {
for (var _, h = []; !(_ = l.next()).done; )
h.push(_.value);
return h;
}
function Br(l) {
var _ = -1, h = Array(l.size);
return l.forEach(function(A, I) {
h[++_] = [I, A];
}), h;
}
function mu(l, _) {
return function(h) {
return l(_(h));
};
}
function re(l, _) {
for (var h = -1, A = l.length, I = 0, B = []; ++h < A; ) {
var Q = l[h];
(Q === _ || Q === ht) && (l[h] = ht, B[I++] = h);
}
return B;
}
function bt(l) {
var _ = -1, h = Array(l.size);
return l.forEach(function(A) {
h[++_] = A;
}), h;
}
function nc(l) {
var _ = -1, h = Array(l.size);
return l.forEach(function(A) {
h[++_] = [A, A];
}), h;
}
function ec(l, _, h) {
for (var A = h - 1, I = l.length; ++A < I; )
if (l[A] === _)
return A;
return -1;
}
function tc(l, _, h) {
for (var A = h + 1; A--; )
if (l[A] === _)
return A;
return A;
}
function Re(l) {
return Ie(l) ? ic(l) : $s(l);
}
function yn(l) {
return Ie(l) ? uc(l) : Hs(l);
}
function Eu(l) {
for (var _ = l.length; _-- && Jo.test(l.charAt(_)); )
;
return _;
}
var rc = Lr(Ds);
function ic(l) {
for (var _ = br.lastIndex = 0; br.test(l); )
++_;
return _;
}
function uc(l) {
return l.match(br) || [];
}
function fc(l) {
return l.match(Ts) || [];
}
var oc = function l(_) {
_ = _ == null ? j : Ce.defaults(j.Object(), _, Ce.pick(j, Cs));
var h = _.Array, A = _.Date, I = _.Error, B = _.Function, Q = _.Math, $ = _.Object, Ur = _.RegExp, sc = _.String, mn = _.TypeError, Ot = h.prototype, cc = B.prototype, ye = $.prototype, Tt = _["__core-js_shared__"], It = cc.toString, U = ye.hasOwnProperty, lc = 0, Su = function() {
var n = /[^.]+$/.exec(Tt && Tt.keys && Tt.keys.IE_PROTO || "");
return n ? "Symbol(src)_1." + n : "";
}(), Rt = ye.toString, ac = It.call($), hc = j._, gc = Ur(
"^" + It.call(U).replace(wr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
), Ct = fu ? _.Buffer : o, ie = _.Symbol, yt = _.Uint8Array, bu = Ct ? Ct.allocUnsafe : o, Lt = mu($.getPrototypeOf, $), Ou = $.create, Tu = ye.propertyIsEnumerable, Mt = Ot.splice, Iu = ie ? ie.isConcatSpreadable : o, Ve = ie ? ie.iterator : o, he = ie ? ie.toStringTag : o, Dt = function() {
try {
var n = ve($, "defineProperty");
return n({}, "", {}), n;
} catch {
}
}(), _c = _.clearTimeout !== j.clearTimeout && _.clearTimeout, pc = A && A.now !== j.Date.now && A.now, dc = _.setTimeout !== j.setTimeout && _.setTimeout, Pt = Q.ceil, Bt = Q.floor, Wr = $.getOwnPropertySymbols, vc = Ct ? Ct.isBuffer : o, Ru = _.isFinite, wc = Ot.join, xc = mu($.keys, $), V = Q.max, en = Q.min, Ac = A.now, mc = _.parseInt, Cu = Q.random, Ec = Ot.reverse, Fr = ve(_, "DataView"), ke = ve(_, "Map"), Nr = ve(_, "Promise"), Le = ve(_, "Set"), je = ve(_, "WeakMap"), nt = ve($, "create"), Ut = je && new je(), Me = {}, Sc = we(Fr), bc = we(ke), Oc = we(Nr), Tc = we(Le), Ic = we(je), Wt = ie ? ie.prototype : o, et = Wt ? Wt.valueOf : o, yu = Wt ? Wt.toString : o;
function u(n) {
if (Y(n) && !R(n) && !(n instanceof D)) {
if (n instanceof En)
return n;
if (U.call(n, "__wrapped__"))
return Mf(n);
}
return new En(n);
}
var De = /* @__PURE__ */ function() {
function n() {
}
return function(e) {
if (!Z(e))
return {};
if (Ou)
return Ou(e);
n.prototype = e;
var t = new n();
return n.prototype = o, t;
};
}();
function Ft() {
}
function En(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: Ho,
/**
* Used to detect code to be evaluated.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
evaluate: zo,
/**
* 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, En.prototype = De(Ft.prototype), En.prototype.constructor = En;
function D(n) {
this.__wrapped__ = n, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = Bn, this.__views__ = [];
}
function Rc() {
var n = new D(this.__wrapped__);
return n.__actions__ = cn(this.__actions__), n.__dir__ = this.__dir__, n.__filtered__ = this.__filtered__, n.__iteratees__ = cn(this.__iteratees__), n.__takeCount__ = this.__takeCount__, n.__views__ = cn(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 yc() {
var n = this.__wrapped__.value(), e = this.__dir__, t = R(n), r = e < 0, i = t ? n.length : 0, f = Hl(0, i, this.__views__), s = f.start, c = f.end, a = c - s, d = r ? c : s - 1, v = this.__iteratees__, w = v.length, x = 0, E = en(a, this.__takeCount__);
if (!t || !r && i == a && E == a)
return nf(n, this.__actions__);
var T = [];
n:
for (; a-- && x < E; ) {
d += e;
for (var y = -1, b = n[d]; ++y < w; ) {
var M = v[y], P = M.iteratee, wn = M.type, sn = P(b);
if (wn == Oo)
b = sn;
else if (!sn) {
if (wn == Di)
continue n;
break n;
}
}
T[x++] = b;
}
return T;
}
D.prototype = De(Ft.prototype), D.prototype.constructor = D;
function ge(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 Lc() {
this.__data__ = nt ? nt(null) : {}, this.size = 0;
}
function Mc(n) {
var e = this.has(n) && delete this.__data__[n];
return this.size -= e ? 1 : 0, e;
}
function Dc(n) {
var e = this.__data__;
if (nt) {
var t = e[n];
return t === Nn ? o : t;
}
return U.call(e, n) ? e[n] : o;
}
function Pc(n) {
var e = this.__data__;
return nt ? e[n] !== o : U.call(e, n);
}
function Bc(n, e) {
var t = this.__data__;
return this.size += this.has(n) ? 0 : 1, t[n] = nt && e === o ? Nn : e, this;
}
ge.prototype.clear = Lc, ge.prototype.delete = Mc, ge.prototype.get = Dc, ge.prototype.has = Pc, ge.prototype.set = Bc;
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 Uc() {
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 Fc(n) {
var e = this.__data__, t = Nt(e, n);
return t < 0 ? o : e[t][1];
}
function Nc(n) {
return Nt(this.__data__, n) > -1;
}
function Gc(n, e) {
var t = this.__data__, r = Nt(t, n);
return r < 0 ? (++this.size, t.push([n, e])) : t[r][1] = e, this;
}
qn.prototype.clear = Uc, qn.prototype.delete = Wc, qn.prototype.get = Fc, qn.prototype.has = Nc, qn.prototype.set = Gc;
function Kn(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 $c() {
this.size = 0, this.__data__ = {
hash: new ge(),
map: new (ke || qn)(),
string: new ge()
};
}
function Hc(n) {
var e = Vt(this, n).delete(n);
return this.size -= e ? 1 : 0, e;
}
function zc(n) {
return Vt(this, n).get(n);
}
function qc(n) {
return Vt(this, n).has(n);
}
function Kc(n, e) {
var t = Vt(this, n), r = t.size;
return t.set(n, e), this.size += t.size == r ? 0 : 1, this;
}
Kn.prototype.clear = $c, Kn.prototype.delete = Hc, Kn.prototype.get = zc, Kn.prototype.has = qc, Kn.prototype.set = Kc;
function _e(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.__data__ = new Kn(); ++e < t; )
this.add(n[e]);
}
function Zc(n) {
return this.__data__.set(n, Nn), this;
}
function Yc(n) {
return this.__data__.has(n);
}
_e.prototype.add = _e.prototype.push = Zc, _e.prototype.has = Yc;
function Ln(n) {
var e = this.__data__ = new qn(n);
this.size = e.size;
}
function Jc() {
this.__data__ = new qn(), this.size = 0;
}
function Xc(n) {
var e = this.__data__, t = e.delete(n);
return this.size = e.size, t;
}
function Qc(n) {
return this.__data__.get(n);
}
function Vc(n) {
return this.__data__.has(n);
}
function kc(n, e) {
var t = this.__data__;
if (t instanceof qn) {
var r = t.__data__;
if (!ke || r.length < m - 1)
return r.push([n, e]), this.size = ++t.size, this;
t = this.__data__ = new Kn(r);
}
return t.set(n, e), this.size = t.size, this;
}
Ln.prototype.clear = Jc, Ln.prototype.delete = Xc, Ln.prototype.get = Qc, Ln.prototype.has = Vc, Ln.prototype.set = kc;
function Lu(n, e) {
var t = R(n), r = !t && xe(n), i = !t && !r && ce(n), f = !t && !r && !i && We(n), s = t || r || i || f, c = s ? Dr(n.length, sc) : [], a = c.length;
for (var d in n)
(e || U.call(n, d)) && !(s && // Safari 9 has enumerable `arguments.length` in strict mode.
(d == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
i && (d == "offset" || d == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
f && (d == "buffer" || d == "byteLength" || d == "byteOffset") || // Skip index properties.
Jn(d, a))) && c.push(d);
return c;
}
function Mu(n) {
var e = n.length;
return e ? n[Qr(0, e - 1)] : o;
}
function jc(n, e) {
return kt(cn(n), pe(e, 0, n.length));
}
function nl(n) {
return kt(cn(n));
}
function Gr(n, e, t) {
(t !== o && !Dn(n[e], t) || t === o && !(e in n)) && Un(n, e, t);
}
function tt(n, e, t) {
var r = n[e];
(!(U.call(n, e) && Dn(r, t)) || t === o && !(e in n)) && Un(n, e, t);
}
function Nt(n, e) {
for (var t = n.length; t--; )
if (Dn(n[t][0], e))
return t;
return -1;
}
function el(n, e, t, r) {
return ue(n, function(i, f, s) {
e(r, i, t(i), s);
}), r;
}
function Du(n, e) {
return n && Fn(e, k(e), n);
}
function tl(n, e) {
return n && Fn(e, an(e), n);
}
function Un(n, e, t) {
e == "__proto__" && Dt ? Dt(n, e, {
configurable: !0,
enumerable: !0,
value: t,
writable: !0
}) : n[e] = t;
}
function $r(n, e) {
for (var t = -1, r = e.length, i = h(r), f = n == null; ++t < r; )
i[t] = f ? o : Ei(n, e[t]);
return i;
}
function pe(n, e, t) {
return n === n && (t !== o && (n = n <= t ? n : t), e !== o && (n = n >= e ? n : e)), n;
}
function Sn(n, e, t, r, i, f) {
var s, c = e & jn, a = e & Li, d = e & Ae;
if (t && (s = i ? t(n, r, i, f) : t(n)), s !== o)
return s;
if (!Z(n))
return n;
var v = R(n);
if (v) {
if (s = ql(n), !c)
return cn(n, s);
} else {
var w = tn(n), x = w == vt || w == Pi;
if (ce(n))
return rf(n, c);
if (w == zn || w == Se || x && !i) {
if (s = a || x ? {} : Sf(n), !c)
return a ? Dl(n, tl(s, n)) : Ml(n, Du(s, n));
} else {
if (!H[w])
return i ? n : {};
s = Kl(n, w, c);
}
}
f || (f = new Ln());
var E = f.get(n);
if (E)
return E;
f.set(n, s), kf(n) ? n.forEach(function(b) {
s.add(Sn(b, e, t, b, n, f));
}) : Qf(n) && n.forEach(function(b, M) {
s.set(M, Sn(b, e, t, M, n, f));
});
var T = d ? a ? oi : fi : a ? an : k, y = v ? o : T(n);
return _n(y || n, function(b, M) {
y && (M = b, b = n[M]), tt(s, M, Sn(b, e, t, M, n, f));
}), s;
}
function rl(n) {
var e = k(n);
return function(t) {
return Pu(t, n, e);
};
}
function Pu(n, e, t) {
var r = t.length;
if (n == null)
return !r;
for (n = $(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 Bu(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 = Et, s = !0, c = n.length, a = [], d = e.length;
if (!c)
return a;
t && (e = K(e, pn(t))), r ? (f = Ir, s = !1) : e.length >= m && (f = Qe, s = !1, e = new _e(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 = d; x--; )
if (e[x] === w)
continue n;
a.push(v);
} else f(e, w, r) || a.push(v);
}
return a;
}
var ue = cf(Wn), Uu = cf(zr, !0);
function il(n, e) {
var t = !0;
return ue(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 ul(n, e, t, r) {
var i = n.length;
for (t = C(t), t < 0 && (t = -t > i ? 0 : i + t), r = r === o || r > i ? i : C(r), r < 0 && (r += i), r = t > r ? 0 : no(r); t < r; )
n[t++] = e;
return n;
}
function Wu(n, e) {
var t = [];
return ue(n, function(r, i, f) {
e(r, i, f) && t.push(r);
}), t;
}
function nn(n, e, t, r, i) {
var f = -1, s = n.length;
for (t || (t = Yl), i || (i = []); ++f < s; ) {
var c = n[f];
e > 0 && t(c) ? e > 1 ? nn(c, e - 1, t, r, i) : te(i, c) : r || (i[i.length] = c);
}
return i;
}
var Hr = lf(), Fu = lf(!0);
function Wn(n, e) {
return n && Hr(n, e, k);
}
function zr(n, e) {
return n && Fu(n, e, k);
}
function $t(n, e) {
return ee(e, function(t) {
return Xn(n[t]);
});
}
function de(n, e) {
e = oe(e, n);
for (var t = 0, r = e.length; n != null && t < r; )
n = n[Mn(e[t++])];
return t && t == r ? n : o;
}
function Nu(n, e, t) {
var r = e(n);
return R(n) ? r : te(r, t(n));
}
function fn(n) {
return n == null ? n === o ? Bo : Do : he && he in $(n) ? $l(n) : na(n);
}
function qr(n, e) {
return n > e;
}
function fl(n, e) {
return n != null && U.call(n, e);
}
function ol(n, e) {
return n != null && e in $(n);
}
function sl(n, e, t) {
return n >= en(e, t) && n < V(e, t);
}
function Kr(n, e, t) {
for (var r = t ? Ir : Et, i = n[0].length, f = n.length, s = f, c = h(f), a = 1 / 0, d = []; s--; ) {
var v = n[s];
s && e && (v = K(v, pn(e))), a = en(v.length, a), c[s] = !t && (e || i >= 120 && v.length >= 120) ? new _e(s && v) : o;
}
v = n[0];
var w = -1, x = c[0];
n:
for (; ++w < i && d.length < a; ) {
var E = v[w], T = e ? e(E) : E;
if (E = t || E !== 0 ? E : 0, !(x ? Qe(x, T) : r(d, T, t))) {
for (s = f; --s; ) {
var y = c[s];
if (!(y ? Qe(y, T) : r(n[s], T, t)))
continue n;
}
x && x.push(T), d.push(E);
}
}
return d;
}
function cl(n, e, t, r) {
return Wn(n, function(i, f, s) {
e(r, t(i), f, s);
}), r;
}
function it(n, e, t) {
e = oe(e, n), n = If(n, e);
var r = n == null ? n : n[Mn(On(e))];
return r == null ? o : gn(r, n, t);
}
function Gu(n) {
return Y(n) && fn(n) == Se;
}
function ll(n) {
return Y(n) && fn(n) == Xe;
}
function al(n) {
return Y(n) && fn(n) == qe;
}
function ut(n, e, t, r, i) {
return n === e ? !0 : n == null || e == null || !Y(n) && !Y(e) ? n !== n && e !== e : hl(n, e, t, r, ut, i);
}
function hl(n, e, t, r, i, f) {
var s = R(n), c = R(e), a = s ? pt : tn(n), d = c ? pt : tn(e);
a = a == Se ? zn : a, d = d == Se ? zn : d;
var v = a == zn, w = d == zn, x = a == d;
if (x && ce(n)) {
if (!ce(e))
return !1;
s = !0, v = !1;
}
if (x && !v)
return f || (f = new Ln()), s || We(n) ? Af(n, e, t, r, i, f) : Nl(n, e, a, t, r, i, f);
if (!(t & me)) {
var E = v && U.call(n, "__wrapped__"), T = w && U.call(e, "__wrapped__");
if (E || T) {
var y = E ? n.value() : n, b = T ? e.value() : e;
return f || (f = new Ln()), i(y, b, t, r, f);
}
}
return x ? (f || (f = new Ln()), Gl(n, e, t, r, i, f)) : !1;
}
function gl(n) {
return Y(n) && tn(n) == Rn;
}
function Zr(n, e, t, r) {
var i = t.length, f = i, s = !r;
if (n == null)
return !f;
for (n = $(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], d = n[a], v = c[1];
if (s && c[2]) {
if (d === o && !(a in n))
return !1;
} else {
var w = new Ln();
if (r)
var x = r(d, v, a, n, e, w);
if (!(x === o ? ut(v, d, me | gt, r, w) : x))
return !1;
}
}
return !0;
}
function $u(n) {
if (!Z(n) || Xl(n))
return !1;
var e = Xn(n) ? gc : rs;
return e.test(we(n));
}
function _l(n) {
return Y(n) && fn(n) == Ze;
}
function pl(n) {
return Y(n) && tn(n) == Cn;
}
function dl(n) {
return Y(n) && ir(n.length) && !!q[fn(n)];
}
function Hu(n) {
return typeof n == "function" ? n : n == null ? hn : typeof n == "object" ? R(n) ? Ku(n[0], n[1]) : qu(n) : ho(n);
}
function Yr(n) {
if (!st(n))
return xc(n);
var e = [];
for (var t in $(n))
U.call(n, t) && t != "constructor" && e.push(t);
return e;
}
function vl(n) {
if (!Z(n))
return jl(n);
var e = st(n), t = [];
for (var r in n)
r == "constructor" && (e || !U.call(n, r)) || t.push(r);
return t;
}
function Jr(n, e) {
return n < e;
}
function zu(n, e) {
var t = -1, r = ln(n) ? h(n.length) : [];
return ue(n, function(i, f, s) {
r[++t] = e(i, f, s);
}), r;
}
function qu(n) {
var e = ci(n);
return e.length == 1 && e[0][2] ? Of(e[0][0], e[0][1]) : function(t) {
return t === n || Zr(t, n, e);
};
}
function Ku(n, e) {
return ai(n) && bf(e) ? Of(Mn(n), e) : function(t) {
var r = Ei(t, n);
return r === o && r === e ? Si(t, n) : ut(e, r, me | gt);
};
}
function Ht(n, e, t, r, i) {
n !== e && Hr(e, function(f, s) {
if (i || (i = new Ln()), Z(f))
wl(n, e, s, t, Ht, r, i);
else {
var c = r ? r(gi(n, s), f, s + "", n, e, i) : o;
c === o && (c = f), Gr(n, s, c);
}
}, an);
}
function wl(n, e, t, r, i, f, s) {
var c = gi(n, t), a = gi(e, t), d = s.get(a);
if (d) {
Gr(n, t, d);
return;
}
var v = f ? f(c, a, t + "", n, e, s) : o, w = v === o;
if (w) {
var x = R(a), E = !x && ce(a), T = !x && !E && We(a);
v = a, x || E || T ? R(c) ? v = c : J(c) ? v = cn(c) : E ? (w = !1, v = rf(a, !0)) : T ? (w = !1, v = uf(a, !0)) : v = [] : lt(a) || xe(a) ? (v = c, xe(c) ? v = eo(c) : (!Z(c) || Xn(c)) && (v = Sf(a))) : w = !1;
}
w && (s.set(a, v), i(v, a, r, f, s), s.delete(a)), Gr(n, t, v);
}
function Zu(n, e) {
var t = n.length;
if (t)
return e += e < 0 ? t : 0, Jn(e, t) ? n[e] : o;
}
function Yu(n, e, t) {
e.length ? e = K(e, function(f) {
return R(f) ? function(s) {
return de(s, f.length === 1 ? f[0] : f);
} : f;
}) : e = [hn];
var r = -1;
e = K(e, pn(O()));
var i = zu(n, function(f, s, c) {
var a = K(e, function(d) {
return d(f);
});
return { criteria: a, index: ++r, value: f };
});
return Ks(i, function(f, s) {
return Ll(f, s, t);
});
}
function xl(n, e) {
return Ju(n, e, function(t, r) {
return Si(n, r);
});
}
function Ju(n, e, t) {
for (var r = -1, i = e.length, f = {}; ++r < i; ) {
var s = e[r], c = de(n, s);
t(c, s) && ft(f, oe(s, n), c);
}
return f;
}
function Al(n) {
return function(e) {
return de(e, n);
};
}
function Xr(n, e, t, r) {
var i = r ? qs : Te, f = -1, s = e.length, c = n;
for (n === e && (e = cn(e)), t && (c = K(n, pn(t))); ++f < s; )
for (var a = 0, d = e[f], v = t ? t(d) : d; (a = i(c, v, a, r)) > -1; )
c !== n && Mt.call(c, a, 1), Mt.call(n, a, 1);
return n;
}
function Xu(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) : jr(n, i);
}
}
return n;
}
function Qr(n, e) {
return n + Bt(Cu() * (e - n + 1));
}
function ml(n, e, t, r) {
for (var i = -1, f = V(Pt((e - n) / (t || 1)), 0), s = h(f); f--; )
s[r ? f : ++i] = n, n += t;
return s;
}
function Vr(n, e) {
var t = "";
if (!n || e < 1 || e > ne)
return t;
do
e % 2 && (t += n), e = Bt(e / 2), e && (n += n);
while (e);
return t;
}
function L(n, e) {
return _i(Tf(n, e, hn), n + "");
}
function El(n) {
return Mu(Fe(n));
}
function Sl(n, e) {
var t = Fe(n);
return kt(t, pe(e, 0, t.length));
}
function ft(n, e, t, r) {
if (!Z(n))
return n;
e = oe(e, n);
for (var i = -1, f = e.length, s = f - 1, c = n; c != null && ++i < f; ) {
var a = Mn(e[i]), d = t;
if (a === "__proto__" || a === "constructor" || a === "prototype")
return n;
if (i != s) {
var v = c[a];
d = r ? r(v, a, c) : o, d === o && (d = Z(v) ? v : Jn(e[i + 1]) ? [] : {});
}
tt(c, a, d), c = c[a];
}
return n;
}
var Qu = Ut ? function(n, e) {
return Ut.set(n, e), n;
} : hn, bl = Dt ? function(n, e) {
return Dt(n, "toString", {
configurable: !0,
enumerable: !1,
value: Oi(e),
writable: !0
});
} : hn;
function Ol(n) {
return kt(Fe(n));
}
function bn(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 Tl(n, e) {
var t;
return ue(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 <= Co) {
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 kr(n, e, hn, t);
}
function kr(n, e, t, r) {
var i = 0, f = n == null ? 0 : n.length;
if (f === 0)
return 0;
e = t(e);
for (var s = e !== e, c = e === null, a = vn(e), d = e === o; i < f; ) {
var v = Bt((i + f) / 2