UNPKG

@sheetxl/studio-vanilla

Version:

SheetXL Studio - Vanilla entry point for integrating SheetXL UI.

1,161 lines 200 kB
import { r as ee } from "./BTLmGxC1eZDXb9cY.js"; /** * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.27 * * (C) 2025-present SheetXL Inc. & Michael T. Ford * License: The license can be found at https://www.sheetxl.com/license. */ function Xr(e, t) { for (var n = e.length, r = 0; r < n; ++r) if (t(e[r], r)) return !0; return !1; } function to(e, t) { for (var n = e.length, r = 0; r < n; ++r) if (t(e[r], r)) return e[r]; return null; } function ci(e) { var t = e; if (t === void 0) { if (typeof navigator > "u" || !navigator) return ""; t = navigator.userAgent || ""; } return t.toLowerCase(); } function Er(e, t) { try { return new RegExp(e, "g").exec(t); } catch { return null; } } function Sr(e) { return e.replace(/_/g, "."); } function dn(e, t) { var n = null, r = "-1"; return Xr(e, function(i) { var o, a, s, u = Er("(" + i.test + ")((?:\\/|\\s|:)([0-9|\\.|_]+))?", t); return !(!u || i.brand || (n = i, r = u[3] || "-1", i.versionAlias ? r = i.versionAlias : i.versionTest && (o = i.versionTest.toLowerCase(), a = t, s = Er("(" + o + ")((?:\\/|\\s|:)([0-9|\\.|_]+))", a), r = (s ? s[3] : "") || r), r = Sr(r), 0)); }), { preset: n, version: r }; } function zn(e, t) { var n = { brand: "", version: "-1" }; return Xr(e, function(r) { var i = eo(t, r); return !!i && (n.brand = r.id, n.version = r.versionAlias || i.version, n.version !== "-1"); }), n; } function eo(e, t) { return to(e, function(n) { var r = n.brand; return Er("" + t.test, r.toLowerCase()); }); } var li = [{ test: "phantomjs", id: "phantomjs" }, { test: "whale", id: "whale" }, { test: "edgios|edge|edg", id: "edge" }, { test: "msie|trident|windows phone", id: "ie", versionTest: "iemobile|msie|rv" }, { test: "miuibrowser", id: "miui browser" }, { test: "samsungbrowser", id: "samsung internet" }, { test: "samsung", id: "samsung internet", versionTest: "version" }, { test: "chrome|crios", id: "chrome" }, { test: "firefox|fxios", id: "firefox" }, { test: "android", id: "android browser", versionTest: "version" }, { test: "safari|iphone|ipad|ipod", id: "safari", versionTest: "version" }], fi = [{ test: "(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)", id: "chrome", versionTest: "chrome" }, { test: "chromium", id: "chrome" }, { test: "whale", id: "chrome", versionAlias: "-1", brand: !0 }], sr = [{ test: "applewebkit", id: "webkit", versionTest: "applewebkit|safari" }], no = [{ test: "(?=(iphone|ipad))(?!(.*version))", id: "webview" }, { test: "(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))", id: "webview" }, { test: "webview", id: "webview" }], pi = [{ test: "windows phone", id: "windows phone" }, { test: "windows 2000", id: "window", versionAlias: "5.0" }, { test: "windows nt", id: "window" }, { test: "win32|windows", id: "window" }, { test: "iphone|ipad|ipod", id: "ios", versionTest: "iphone os|cpu os" }, { test: "macos|macintel|mac os x", id: "mac" }, { test: "android|linux armv81", id: "android" }, { test: "tizen", id: "tizen" }, { test: "webos|web0s", id: "webos" }]; function di(e) { return !!dn(no, e).preset; } function ca(e) { for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; return t.map(function(r) { return r.split(" ").map(function(i) { return i ? "" + e + i : ""; }).join(" "); }).join(" "); } function Ae(e, t) { return function(n) { n && (e[t] = n); }; } function ro(e, t, n) { return function(r) { r && (e[t][n] = r); }; } var Nr = "undefined", io = typeof window !== Nr, la = typeof document !== Nr && document, fa = [{ open: "(", close: ")" }, { open: '"', close: '"' }, { open: "'", close: "'" }, { open: '\\"', close: '\\"' }, { open: "\\'", close: "\\'" }], Ht = 1e-7, Gn = { cm: function(e) { return 96 * e / 2.54; }, mm: function(e) { return 96 * e / 254; }, in: function(e) { return 96 * e; }, pt: function(e) { return 96 * e / 72; }, pc: function(e) { return 96 * e / 6; }, "%": function(e, t) { return e * t / 100; }, vw: function(e, t) { return t === void 0 && (t = window.innerWidth), e / 100 * t; }, vh: function(e, t) { return t === void 0 && (t = window.innerHeight), e / 100 * t; }, vmax: function(e, t) { return t === void 0 && (t = Math.max(window.innerWidth, window.innerHeight)), e / 100 * t; }, vmin: function(e, t) { return t === void 0 && (t = Math.min(window.innerWidth, window.innerHeight)), e / 100 * t; } }; function hi(e, t, n, r) { return (e * r + t * n) / (n + r); } function Wr(e) { return typeof e === Nr; } function we(e) { return e && typeof e == "object"; } function ne(e) { return Array.isArray(e); } function nn(e) { return typeof e == "string"; } function Vn(e) { return typeof e == "number"; } function oo(e) { return typeof e == "function"; } function ao(e, t, n, r, i) { return Dr(e, t, n) ? n : (function(o, a, s, u, f) { for (var p, c = function(d) { var g = a[d].trim(); if (g === o.close && !Dr(o, a, d)) return { value: d }; var v = d, b = he(f, function(x) { return x.open === g; }); if (b && (v = ao(b, a, d, u, f)), v === -1) return p = d, "break"; p = d = v; }, l = s; l < u; ++l) { var h = c(l); if (l = p, typeof h == "object") return h.value; if (h === "break") break; } return -1; })(e, t, n + 1, r, i); } function Dr(e, t, n) { if (!e.ignore) return null; var r = t.slice(Math.max(n - 3, 0), n + 3).join(""); return new RegExp(e.ignore).exec(r); } function qr(e, t) { var n = nn(t) ? { separator: t } : t, r = n.separator, i = r === void 0 ? "," : r, o = n.isSeparateFirst, a = n.isSeparateOnlyOpenClose, s = n.isSeparateOpenClose, u = s === void 0 ? a : s, f = n.openCloseCharacters, p = f === void 0 ? fa : f, c = p.map(function(m) { var S = m.open, _ = m.close; return S === _ ? S : S + "|" + _; }).join("|"), l = new RegExp("(\\s*" + i + "\\s*|" + c + "|\\s+)", "g"), h = e.split(l).filter(function(m) { return m && m !== "undefined"; }), d = h.length, g = [], v = []; function b() { return !!v.length && (g.push(v.join("")), v = [], !0); } for (var x, y = function(m) { var S, _, k = h[m].trim(), F = m, O = he(p, function(R) { return R.open === k; }), w = he(p, function(R) { return R.close === k; }); if (O) { if ((F = ao(O, h, m, d, p)) !== -1 && u) return b() && o ? (x = m, "break") : (g.push(h.slice(m, F + 1).join("")), m = F, o ? (x = m, "break") : (x = m, "continue")); } else { if (w && !Dr(w, h, m)) { var D = (function() { for (var R = 0, P = 0, B = arguments.length; P < B; P++) R += arguments[P].length; var A = Array(R), z = 0; for (P = 0; P < B; P++) for (var G = arguments[P], I = 0, V = G.length; I < V; I++, z++) A[z] = G[I]; return A; })(p); return D.splice(p.indexOf(w), 1), { value: qr(e, { separator: i, isSeparateFirst: o, isSeparateOnlyOpenClose: a, isSeparateOpenClose: u, openCloseCharacters: D }) }; } if (S = k, _ = i, !((_ !== "" && _ != " " || S !== "" && S != " ") && S !== _ || a)) return b(), o ? (x = m, "break") : (x = m, "continue"); } F === -1 && (F = d - 1), v.push(h.slice(m, F + 1).join("")), x = m = F; }, E = 0; E < d; ++E) { var M = y(E); if (E = x, typeof M == "object") return M.value; if (M === "break") break; } return v.length && g.push(v.join("")), g; } function Mn(e) { return qr(e, ""); } function hn(e) { return qr(e, ","); } function nr(e) { var t = /^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(e); if (!t) return { prefix: "", unit: "", value: NaN }; var n = t[1], r = t[2]; return { prefix: n, unit: t[3], value: parseFloat(r) }; } function Zn() { return Date.now ? Date.now() : (/* @__PURE__ */ new Date()).getTime(); } function $e(e, t, n) { n === void 0 && (n = -1); for (var r = e.length, i = 0; i < r; ++i) if (t(e[i], i, e)) return i; return n; } function he(e, t, n) { var r = $e(e, t); return r > -1 ? e[r] : n; } var gi, vi, so = (gi = Zn(), (vi = io && (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame)) ? vi.bind(window) : function(e) { var t = Zn(); return setTimeout(function() { e(t - gi); }, 1e3 / 60); }), pa = (function() { var e = io && (window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame); return e ? e.bind(window) : function(t) { clearTimeout(t); }; })(); function wn(e) { return Object.keys(e); } function ae(e, t) { var n = nr(e), r = n.value, i = n.unit; if (we(t)) { var o = t[i]; if (o) { if (oo(o)) return o(r); if (Gn[i]) return Gn[i](r, o); } } else if (i === "%") return r * t / 100; return Gn[i] ? Gn[i](r) : r; } function Mr(e, t, n) { return Math.max(t, Math.min(e, n)); } function mi(e, t, n, r) { return r === void 0 && (r = e[0] / e[1]), [[kt(t[0], Ht), kt(t[0] / r, Ht)], [kt(t[1] * r, Ht), kt(t[1], Ht)]].filter(function(i) { return i.every(function(o, a) { var s = t[a], u = kt(s, Ht); return n ? o <= s || o <= u : o >= s || o >= u; }); })[0] || e; } function wr(e) { for (var t = e.length, n = 0, r = t - 1; r >= 0; --r) n += e[r]; return t ? n / t : 0; } function de(e, t) { var n = t[0] - e[0], r = t[1] - e[1], i = Math.atan2(r, n); return i >= 0 ? i : i + 2 * Math.PI; } function bi(e) { var t, n = (t = e, [0, 1].map(function(o) { return wr(t.map(function(a) { return a[o]; })); })), r = de(n, e[0]), i = de(n, e[1]); return r < i && i - r < Math.PI || r > i && i - r < -Math.PI ? 1 : -1; } function gn(e, t) { return Math.sqrt(Math.pow((t ? t[0] : 0) - e[0], 2) + Math.pow((t ? t[1] : 0) - e[1], 2)); } function kt(e, t) { if (!t) return e; var n = 1 / t; return Math.round(e / t) / n; } function xi(e, t) { return e.forEach(function(n, r) { e[r] = kt(e[r], t); }), e; } function Ee(e, t) { return e.classList ? e.classList.contains(t) : !!e.className.match(new RegExp("(\\s|^)" + t + "(\\s|$)")); } function uo(e, t) { e.classList ? e.classList.add(t) : e.className += " " + t; } function co(e, t) { if (e.classList) e.classList.remove(t); else { var n = new RegExp("(\\s|^)" + t + "(\\s|$)"); e.className = e.className.replace(n, " "); } } function Jt(e, t, n, r) { e.addEventListener(t, n, r); } function Ut(e, t, n, r) { e.removeEventListener(t, n, r); } function Lr(e) { return e?.ownerDocument || la; } function jr(e) { return Lr(e).documentElement; } function Be(e) { return Lr(e).body; } function Pe(e) { var t; return ((t = e?.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView) || window; } function lo(e) { return e && "postMessage" in e && "blur" in e && "self" in e; } function Hr(e) { return we(e) && e.nodeName && e.nodeType && "ownerDocument" in e; } function da(e, t, n, r, i, o) { for (var a = 0; a < i; ++a) { var s = n + a * i, u = r + a * i; e[s] += e[u] * o, t[s] += t[u] * o; } } function ha(e, t, n, r, i) { for (var o = 0; o < i; ++o) { var a = n + o * i, s = r + o * i, u = e[a], f = t[a]; e[a] = e[s], e[s] = u, t[a] = t[s], t[s] = f; } } function ga(e, t, n, r, i) { for (var o = 0; o < r; ++o) { var a = n + o * r; e[a] /= i, t[a] /= i; } } function ze(e, t) { t === void 0 && (t = Math.sqrt(e.length)); for (var n = e.slice(), r = It(t), i = 0; i < t; ++i) { var o = t * i + i; if (!kt(n[o], Ht)) { for (var a = i + 1; a < t; ++a) if (n[t * i + a]) { ha(n, r, i, a, t); break; } } if (!kt(n[o], Ht)) return []; for (ga(n, r, i, t, n[o]), a = 0; a < t; ++a) { var s = a, u = n[a + i * t]; kt(u, Ht) && i !== a && da(n, r, s, i, t, -u); } } return r; } function Pn(e, t) { for (var n = e.slice(), r = e.length; r < t - 1; ++r) n[r] = 0; return n[t - 1] = 1, n; } function Ge(e, t, n) { if (t === void 0 && (t = Math.sqrt(e.length)), t === n) return e; for (var r = It(n), i = Math.min(t, n), o = 0; o < i - 1; ++o) { for (var a = 0; a < i - 1; ++a) r[o * n + a] = e[o * t + a]; r[(o + 1) * n - 1] = e[(o + 1) * t - 1], r[(n - 1) * n + o] = e[(t - 1) * t + o]; } return r[n * n - 1] = e[t * t - 1], r; } function Kn(e) { for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; var r = It(e); return t.forEach(function(i) { r = Vt(r, i, e); }), r; } function Vt(e, t, n) { n === void 0 && (n = Math.sqrt(e.length)); var r = [], i = e.length / n, o = t.length / i; if (!i) return t; if (!o) return e; for (var a = 0; a < n; ++a) for (var s = 0; s < o; ++s) { r[s * n + a] = 0; for (var u = 0; u < i; ++u) r[s * n + a] += e[u * n + a] * t[s * i + u]; } return r; } function Wt(e, t) { for (var n = Math.min(e.length, t.length), r = e.slice(), i = 0; i < n; ++i) r[i] = r[i] + t[i]; return r; } function bt(e, t) { for (var n = Math.min(e.length, t.length), r = e.slice(), i = 0; i < n; ++i) r[i] = r[i] - t[i]; return r; } function va(e, t) { return t === void 0 && (t = e.length === 6), t ? [e[0], e[1], 0, e[2], e[3], 0, e[4], e[5], 1] : e; } function fo(e, t) { return t === void 0 && (t = e.length === 9), t ? [e[0], e[1], e[3], e[4], e[6], e[7]] : e; } function xe(e, t, n) { n === void 0 && (n = t.length); var r = Vt(e, t, n), i = r[n - 1]; return r.map(function(o) { return o / i; }); } function ma(e, t) { return Vt(e, [1, 0, 0, 0, 0, Math.cos(t), Math.sin(t), 0, 0, -Math.sin(t), Math.cos(t), 0, 0, 0, 0, 1], 4); } function ba(e, t) { return Vt(e, [Math.cos(t), 0, -Math.sin(t), 0, 0, 1, 0, 0, Math.sin(t), 0, Math.cos(t), 0, 0, 0, 0, 1], 4); } function xa(e, t) { return Vt(e, rr(t, 4)); } function In(e, t) { var n = t[0], r = n === void 0 ? 1 : n, i = t[1], o = i === void 0 ? 1 : i, a = t[2]; return Vt(e, [r, 0, 0, 0, 0, o, 0, 0, 0, 0, a === void 0 ? 1 : a, 0, 0, 0, 0, 1], 4); } function ur(e, t) { var n = t[0], r = n === void 0 ? 0 : n, i = t[1], o = i === void 0 ? 0 : i, a = t[2]; return Vt(e, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, r, o, a === void 0 ? 0 : a, 1], 4); } function yi(e, t) { return Vt(e, t, 4); } function rr(e, t) { var n = Math.cos(e), r = Math.sin(e), i = It(t); return i[0] = n, i[1] = r, i[t] = -r, i[t + 1] = n, i; } function It(e) { for (var t = e * e, n = [], r = 0; r < t; ++r) n[r] = r % (e + 1) ? 0 : 1; return n; } function po(e, t) { for (var n = It(t), r = Math.min(e.length, t - 1), i = 0; i < r; ++i) n[(t + 1) * i] = e[i]; return n; } function Ie(e, t) { for (var n = It(t), r = Math.min(e.length, t - 1), i = 0; i < r; ++i) n[t * (t - 1) + i] = e[i]; return n; } function ho(e, t, n, r, i, o, a, s) { var u = e[0], f = e[1], p = t[0], c = t[1], l = n[0], h = n[1], d = r[0], g = r[1], v = i[0], b = i[1], x = o[0], y = o[1], E = a[0], M = a[1], m = s[0], S = s[1], _ = ze([u, 0, p, 0, l, 0, d, 0, f, 0, c, 0, h, 0, g, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, u, 0, p, 0, l, 0, d, 0, f, 0, c, 0, h, 0, g, 0, 1, 0, 1, 0, 1, 0, 1, -v * u, -b * u, -x * p, -y * p, -E * l, -M * l, -m * d, -S * d, -v * f, -b * f, -x * c, -y * c, -E * h, -M * h, -m * g, -S * g], 8); if (!_.length) return []; var k = Vt(_, [v, b, x, y, E, M, m, S], 8); return k[8] = 1, Ge((function(F, O) { O === void 0 && (O = Math.sqrt(F.length)); for (var w = [], D = 0; D < O; ++D) for (var R = 0; R < O; ++R) w[R * O + D] = F[O * D + R]; return w; })(k), 3, 4); } var vn = function() { return vn = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); return e; }, vn.apply(this, arguments); }; function Vr(e, t) { return t === void 0 && (t = 0), We(Qe(e, t)); } function We(e) { var t = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; return e.forEach(function(n) { var r = n.matrixFunction, i = n.functionValue; r && (t = r(t, i)); }), t; } function Qe(e, t) { return t === void 0 && (t = 0), (ne(e) ? e : Mn(e)).map(function(n) { var r, i = !(r = /([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(n)) || r.length < 4 ? {} : { prefix: r[1], value: r[2], suffix: r[3] }, o = i.prefix, a = i.value, s = null, u = o, f = ""; if (o === "translate" || o === "translateX" || o === "translate3d") { var p = we(t) ? vn(vn({}, t), { "o%": t["%"] }) : { "%": t, "o%": t }, c = hn(a).map(function(k, F) { return p["%"] = F === 0 && "x%" in p ? t["x%"] : F === 1 && "y%" in p ? t["y%"] : t["o%"], ae(k, p); }), l = c[0], h = c[1], d = h === void 0 ? 0 : h, g = c[2]; s = ur, f = [l, d, g === void 0 ? 0 : g]; } else if (o === "translateY") s = ur, f = [0, d = ae(a, we(t) ? vn({ "%": t["y%"] }, t) : { "%": t }), 0]; else if (o === "translateZ") s = ur, f = [0, 0, parseFloat(a)]; else if (o === "scale" || o === "scale3d") { var v = hn(a).map(function(k) { return parseFloat(k); }), b = v[0], x = v[1], y = x === void 0 ? b : x, E = v[2]; s = In, f = [b, y, E === void 0 ? 1 : E]; } else if (o === "scaleX") s = In, f = [b = parseFloat(a), 1, 1]; else if (o === "scaleY") s = In, f = [1, y = parseFloat(a), 1]; else if (o === "scaleZ") s = In, f = [1, 1, parseFloat(a)]; else if (o === "rotate" || o === "rotateZ" || o === "rotateX" || o === "rotateY") { var M = nr(a), m = M.unit, S = M.value; o === "rotate" || o === "rotateZ" ? (u = "rotateZ", s = xa) : o === "rotateX" ? s = ma : o === "rotateY" && (s = ba), f = m === "rad" ? S : S * Math.PI / 180; } else if (o === "matrix3d") s = yi, f = hn(a).map(function(k) { return parseFloat(k); }); else if (o === "matrix") { var _ = hn(a).map(function(k) { return parseFloat(k); }); s = yi, f = [_[0], _[1], 0, 0, _[2], _[3], 0, 0, 0, 0, 1, 0, _[4], _[5], 0, 1]; } else u = ""; return { name: o, functionName: u, value: a, matrixFunction: s, functionValue: f }; }); } var ya = (function() { function e() { this.keys = [], this.values = []; } var t = e.prototype; return t.get = function(n) { return this.values[this.keys.indexOf(n)]; }, t.set = function(n, r) { var i = this.keys, o = this.values, a = i.indexOf(n), s = a === -1 ? i.length : a; i[s] = n, o[s] = r; }, e; })(), Ea = (function() { function e() { this.object = {}; } var t = e.prototype; return t.get = function(n) { return this.object[n]; }, t.set = function(n, r) { this.object[n] = r; }, e; })(), Sa = typeof Map == "function", Da = (function() { function e() { } var t = e.prototype; return t.connect = function(n, r) { this.prev = n, this.next = r, n && (n.next = this), r && (r.prev = this); }, t.disconnect = function() { var n = this.prev, r = this.next; n && (n.next = r), r && (r.prev = n); }, t.getIndex = function() { for (var n = this, r = -1; n; ) n = n.prev, ++r; return r; }, e; })(), Ma = (function() { function e(n, r, i, o, a, s, u, f) { this.prevList = n, this.list = r, this.added = i, this.removed = o, this.changed = a, this.maintained = s, this.changedBeforeAdded = u, this.fixed = f; } var t = e.prototype; return Object.defineProperty(t, "ordered", { get: function() { return this.cacheOrdered || this.caculateOrdered(), this.cacheOrdered; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "pureChanged", { get: function() { return this.cachePureChanged || this.caculateOrdered(), this.cachePureChanged; }, enumerable: !0, configurable: !0 }), t.caculateOrdered = function() { var n, r, i, o, a = (n = this.changedBeforeAdded, r = this.fixed, i = [], o = [], n.forEach(function(f) { var p = f[0], c = f[1], l = new Da(); i[p] = l, o[c] = l; }), i.forEach(function(f, p) { f.connect(i[p - 1]); }), n.filter(function(f, p) { return !r[p]; }).map(function(f, p) { var c = f[0], l = f[1]; if (c === l) return [0, 0]; var h = i[c], d = o[l - 1], g = h.getIndex(); return h.disconnect(), d ? h.connect(d, d.next) : h.connect(void 0, i[0]), [g, h.getIndex()]; })), s = this.changed, u = []; this.cacheOrdered = a.filter(function(f, p) { var c = f[0], l = f[1], h = s[p], d = h[0], g = h[1]; if (c !== l) return u.push([d, g]), !0; }), this.cachePureChanged = u; }, e; })(); function go(e, t, n) { var r = Sa ? Map : n ? Ea : ya, i = n || function(x) { return x; }, o = [], a = [], s = [], u = e.map(i), f = t.map(i), p = new r(), c = new r(), l = [], h = [], d = {}, g = [], v = 0, b = 0; return u.forEach(function(x, y) { p.set(x, y); }), f.forEach(function(x, y) { c.set(x, y); }), u.forEach(function(x, y) { var E = c.get(x); E === void 0 ? (++b, a.push(y)) : d[E] = b; }), f.forEach(function(x, y) { var E = p.get(x); E === void 0 ? (o.push(y), ++v) : (s.push([E, y]), b = d[y] || 0, l.push([E - b, y - v]), h.push(y === E), E !== y && g.push([E, y])); }), a.reverse(), new Ma(e, t, o, a, g, s, l, h); } var Ei, wa = (function() { function e(t, n) { t === void 0 && (t = []), this.findKeyCallback = n, this.list = [].slice.call(t); } return e.prototype.update = function(t) { var n = [].slice.call(t), r = go(this.list, n, this.findKeyCallback); return this.list = n, r; }, e; })(), vo = function(e, t) { return (vo = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) { n.__proto__ = r; } || function(n, r) { for (var i in r) r.hasOwnProperty(i) && (n[i] = r[i]); })(e, t); }, Ca = typeof Map == "function" ? void 0 : (Ei = 0, function(e) { return e.__DIFF_KEY__ || (e.__DIFF_KEY__ = ++Ei); }), mo = (function(e) { function t(n) { return n === void 0 && (n = []), e.call(this, n, Ca) || this; } return (function(n, r) { function i() { this.constructor = n; } vo(n, r), n.prototype = r === null ? Object.create(r) : (i.prototype = r.prototype, new i()); })(t, e), t; })(wa), Cr = function() { return Cr = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); return e; }, Cr.apply(this, arguments); }, bo = (function() { function e() { this._events = {}; } var t = e.prototype; return t.on = function(n, r) { if (we(n)) for (var i in n) this.on(i, n[i]); else this._addEvent(n, r, {}); return this; }, t.off = function(n, r) { if (n) if (we(n)) for (var i in n) this.off(i); else if (r) { var o = this._events[n]; if (o) { var a = $e(o, function(s) { return s.listener === r; }); a > -1 && o.splice(a, 1); } } else this._events[n] = []; else this._events = {}; return this; }, t.once = function(n, r) { var i = this; return r && this._addEvent(n, r, { once: !0 }), new Promise(function(o) { i._addEvent(n, o, { once: !0 }); }); }, t.emit = function(n, r) { var i = this; r === void 0 && (r = {}); var o = this._events[n]; if (!n || !o) return !0; var a = !1; return r.eventType = n, r.stop = function() { a = !0; }, r.currentTarget = this, (function() { for (var s = 0, u = 0, f = arguments.length; u < f; u++) s += arguments[u].length; var p = Array(s), c = 0; for (u = 0; u < f; u++) for (var l = arguments[u], h = 0, d = l.length; h < d; h++, c++) p[c] = l[h]; return p; })(o).forEach(function(s) { s.listener(r), s.once && i.off(n, s.listener); }), !a; }, t.trigger = function(n, r) { return r === void 0 && (r = {}), this.emit(n, r); }, t._addEvent = function(n, r, i) { var o = this._events; o[n] = o[n] || [], o[n].push(Cr({ listener: r }, i)); }, e; })(); function oe(e) { return kt(e, Ht); } function Si(e) { return e.length < 3 ? 0 : Math.abs((function(t) { for (var n = 0, r = t.length - 1; r >= 0; --r) n += t[r]; return n; })(e.map(function(t, n) { var r = e[n + 1] || e[0]; return t[0] * r[1] - r[0] * t[1]; }))) / 2; } function Di(e, t) { var n = t.width, r = t.height, i = t.left, o = t.top, a = Ve(e), s = a.minX, u = a.minY, f = a.maxX, p = a.maxY, c = n / (f - s), l = r / (p - u); return e.map(function(h) { return [i + (h[0] - s) * c, o + (h[1] - u) * l]; }); } function Ve(e) { var t = e.map(function(r) { return r[0]; }), n = e.map(function(r) { return r[1]; }); return { minX: Math.min.apply(Math, t), minY: Math.min.apply(Math, n), maxX: Math.max.apply(Math, t), maxY: Math.max.apply(Math, n) }; } function cr(e, t, n) { var r = e[0], i = e[1], o = Ve(t), a = o.minX, s = o.maxX, u = [[a, i], [s, i]], f = Jn(u[0], u[1]), p = _r(t), c = []; if (p.forEach(function(d) { var g, v = Jn(d[0], d[1]), b = d[0]; g = v, f.every(function(x, y) { return oe(x - g[y]) === 0; }) ? c.push({ pos: e, line: d, type: "line" }) : xo(Ur(f, v), [u, d]).forEach(function(x) { d.some(function(y) { return M = x, !oe((E = y)[0] - M[0]) && !oe(E[1] - M[1]); var E, M; }) ? c.push({ pos: x, line: d, type: "point" }) : oe(b[1] - i) !== 0 && c.push({ pos: x, line: d, type: "intersection" }); }); }), he(c, function(d) { return d[0] === r; })) return !0; var l = 0, h = {}; return c.forEach(function(d) { var g = d.pos, v = d.type, b = d.line; if (!(g[0] > r)) if (v === "intersection") ++l; else { if (v === "line") return; if (v === "point") { var x = he(b, function(M) { return M[1] !== i; }), y = h[g[0]], E = x[1] > i ? 1 : -1; y ? y !== E && ++l : h[g[0]] = E; } } }), l % 2 == 1; } function Jn(e, t) { var n = e[0], r = e[1], i = t[0] - n, o = t[1] - r; Math.abs(i) < Ht && (i = 0), Math.abs(o) < Ht && (o = 0); var a = 0, s = 0, u = 0; return i ? o ? (s = 1, u = -(a = -o / i) * n - r) : (s = 1, u = -r) : o && (a = -1, u = n), [a, s, u]; } function Ur(e, t) { var n = e[0], r = e[1], i = e[2], o = t[0], a = t[1], s = t[2], u = n === 0 && o === 0, f = r === 0 && a === 0, p = []; if (u && f) return []; if (u) { var c = -i / r; return c !== -s / a ? [] : [[-1 / 0, c], [1 / 0, c]]; } if (f) { var l = -i / n; return l !== -s / o ? [] : [[l, -1 / 0], [l, 1 / 0]]; } if (n === 0) p = [[h = -(a * (d = -i / r) + s) / o, d]]; else if (o === 0) p = [[h = -(r * (d = -s / a) + i) / n, d]]; else if (r === 0) p = [[h = -i / n, d = -(o * h + s) / a]]; else if (a === 0) p = [[h = -s / o, d = -(n * h + i) / r]]; else { var h, d; p = [[h = (r * s - a * i) / (a * n - r * o), d = -(n * h + i) / r]]; } return p.map(function(g) { return [g[0], g[1]]; }); } function xo(e, t) { var n = t.map(function(c) { return [0, 1].map(function(l) { return [Math.min(c[0][l], c[1][l]), Math.max(c[0][l], c[1][l])]; }); }), r = []; if (e.length === 2) { var i = e[0], o = i[0], a = i[1]; if (oe(o - e[1][0])) { if (!oe(a - e[1][1])) { var s = Math.max.apply(Math, n.map(function(c) { return c[0][0]; })), u = Math.min.apply(Math, n.map(function(c) { return c[0][1]; })); if (oe(s - u) > 0) return []; r = [[s, a], [u, a]]; } } else { var f = Math.max.apply(Math, n.map(function(c) { return c[1][0]; })), p = Math.min.apply(Math, n.map(function(c) { return c[1][1]; })); if (oe(f - p) > 0) return []; r = [[o, f], [o, p]]; } } return r.length || (r = e.filter(function(c) { var l = c[0], h = c[1]; return n.every(function(d) { return 0 <= oe(l - d[0][0]) && 0 <= oe(d[0][1] - l) && 0 <= oe(h - d[1][0]) && 0 <= oe(d[1][1] - h); }); })), r.map(function(c) { return [oe(c[0]), oe(c[1])]; }); } function _r(e) { return (function() { for (var t = 0, n = 0, r = arguments.length; n < r; n++) t += arguments[n].length; var i = Array(t), o = 0; for (n = 0; n < r; n++) for (var a = arguments[n], s = 0, u = a.length; s < u; s++, o++) i[o] = a[s]; return i; })(e.slice(1), [e[0]]).map(function(t, n) { return [e[n], t]; }); } var yo = function(e, t) { return (yo = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) { n.__proto__ = r; } || function(n, r) { for (var i in r) r.hasOwnProperty(i) && (n[i] = r[i]); })(e, t); }, jt = function() { return jt = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); return e; }, jt.apply(this, arguments); }; function lr(e) { return 180 * (t = [e[0].clientX, e[0].clientY], r = (n = [e[1].clientX, e[1].clientY])[0] - t[0], i = n[1] - t[1], ((o = Math.atan2(i, r)) >= 0 ? o : o + 2 * Math.PI) / Math.PI); var t, n, r, i, o; } function Yn(e) { return e ? e.touches ? (function(t) { for (var n = Math.min(t.length, 2), r = [], i = 0; i < n; ++i) r.push(wi(t[i])); return r; })(e.touches) : [wi(e)] : []; } function Mi(e, t, n) { var r = n.length, i = mn(e, r), o = i.clientX, a = i.clientY, s = i.originalClientX, u = i.originalClientY, f = mn(t, r), p = f.clientX, c = f.clientY, l = mn(n, r); return { clientX: s, clientY: u, deltaX: o - p, deltaY: a - c, distX: o - l.clientX, distY: a - l.clientY }; } function fr(e) { return Math.sqrt(Math.pow(e[0].clientX - e[1].clientX, 2) + Math.pow(e[0].clientY - e[1].clientY, 2)); } function wi(e) { return { clientX: e.clientX, clientY: e.clientY }; } function mn(e, t) { t === void 0 && (t = e.length); for (var n = { clientX: 0, clientY: 0, originalClientX: 0, originalClientY: 0 }, r = Math.min(e.length, t), i = 0; i < r; ++i) { var o = e[i]; n.originalClientX += "originalClientX" in o ? o.originalClientX : o.clientX, n.originalClientY += "originalClientY" in o ? o.originalClientY : o.clientY, n.clientX += o.clientX, n.clientY += o.clientY; } return t ? { clientX: n.clientX / t, clientY: n.clientY / t, originalClientX: n.originalClientX / t, originalClientY: n.originalClientY / t } : n; } var pr = (function() { function e(t) { this.prevClients = [], this.startClients = [], this.movement = 0, this.length = 0, this.startClients = t, this.prevClients = t, this.length = t.length; } return e.prototype.getAngle = function(t) { return t === void 0 && (t = this.prevClients), lr(t); }, e.prototype.getRotation = function(t) { return t === void 0 && (t = this.prevClients), lr(t) - lr(this.startClients); }, e.prototype.getPosition = function(t, n) { t === void 0 && (t = this.prevClients); var r = Mi(t || this.prevClients, this.prevClients, this.startClients), i = r.deltaX, o = r.deltaY; return this.movement += Math.sqrt(i * i + o * o), this.prevClients = t, r; }, e.prototype.getPositions = function(t) { t === void 0 && (t = this.prevClients); for (var n = this.prevClients, r = this.startClients, i = Math.min(this.length, n.length), o = [], a = 0; a < i; ++a) o[a] = Mi([t[a]], [n[a]], [r[a]]); return o; }, e.prototype.getMovement = function(t) { var n = this.movement; if (!t) return n; var r = mn(t, this.length), i = mn(this.prevClients, this.length), o = r.clientX - i.clientX, a = r.clientY - i.clientY; return Math.sqrt(o * o + a * a) + n; }, e.prototype.getDistance = function(t) { return t === void 0 && (t = this.prevClients), fr(t); }, e.prototype.getScale = function(t) { return t === void 0 && (t = this.prevClients), fr(t) / fr(this.startClients); }, e.prototype.move = function(t, n) { this.startClients.forEach(function(r) { r.clientX -= t, r.clientY -= n; }), this.prevClients.forEach(function(r) { r.clientX -= t, r.clientY -= n; }); }, e; })(), Ci = ["textarea", "input"], _a = (function(e) { function t(n, r) { r === void 0 && (r = {}); var i = e.call(this) || this; i.options = {}, i.flag = !1, i.pinchFlag = !1, i.data = {}, i.isDrag = !1, i.isPinch = !1, i.clientStores = [], i.targets = [], i.prevTime = 0, i.doubleFlag = !1, i._useMouse = !1, i._useTouch = !1, i._useDrag = !1, i._dragFlag = !1, i._isTrusted = !1, i._isMouseEvent = !1, i._isSecondaryButton = !1, i._preventMouseEvent = !1, i._prevInputEvent = null, i._isDragAPI = !1, i._isIdle = !0, i._preventMouseEventId = 0, i._window = window, i.onDragStart = function(l, h) { if (h === void 0 && (h = !0), i.flag || l.cancelable !== !1) { var d = l.type.indexOf("drag") >= -1; if (!i.flag || !d) { i._isDragAPI = !0; var g = i.options, v = g.container, b = g.pinchOutside, x = g.preventWheelClick, y = g.preventRightClick, E = g.preventDefault, M = g.checkInput, m = g.dragFocusedInput, S = g.preventClickEventOnDragStart, _ = g.preventClickEventOnDrag, k = g.preventClickEventByCondition, F = i._useTouch, O = !i.flag; if (i._isSecondaryButton = l.which === 3 || l.button === 2, x && (l.which === 2 || l.button === 1) || y && (l.which === 3 || l.button === 2)) return i.stop(), !1; if (O) { var w = i._window.document.activeElement, D = l.target; if (D) { var R = D.tagName.toLowerCase(), P = Ci.indexOf(R) > -1, B = D.isContentEditable; if (P || B) { if (M || !m && w === D) return !1; if (w && (w === D || B && w.isContentEditable && w.contains(D))) { if (!m) return !1; D.blur(); } } else if ((E || l.type === "touchstart") && w) { var A = w.tagName.toLowerCase(); (w.isContentEditable || Ci.indexOf(A) > -1) && w.blur(); } (S || _ || k) && Jt(i._window, "click", i._onClick, !0); } i.clientStores = [new pr(Yn(l))], i._isIdle = !1, i.flag = !0, i.isDrag = !1, i._isTrusted = h, i._dragFlag = !0, i._prevInputEvent = l, i.data = {}, i.doubleFlag = Zn() - i.prevTime < 200, i._isMouseEvent = (G = l) && (G.type.indexOf("mouse") > -1 || "button" in G), !i._isMouseEvent && i._preventMouseEvent && i._allowMouseEvent(), (i._preventMouseEvent || i.emit("dragStart", jt(jt({ data: i.data, datas: i.data, inputEvent: l, isMouseEvent: i._isMouseEvent, isSecondaryButton: i._isSecondaryButton, isTrusted: h, isDouble: i.doubleFlag }, i.getCurrentStore().getPosition()), { preventDefault: function() { l.preventDefault(); }, preventDrag: function() { i._dragFlag = !1; } }))) === !1 && i.stop(), i._isMouseEvent && i.flag && E && l.preventDefault(); } if (!i.flag) return !1; var z = 0; if (O ? (i._attchDragEvent(), F && b && (z = setTimeout(function() { Jt(v, "touchstart", i.onDragStart, { passive: !1 }); }))) : F && b && Ut(v, "touchstart", i.onDragStart), i.flag && (function(I) { return I.touches && I.touches.length >= 2; })(l)) { if (clearTimeout(z), O && l.touches.length !== l.changedTouches.length) return; i.pinchFlag || i.onPinchStart(l); } } } var G; }, i.onDrag = function(l, h) { if (i.flag) { var d = i.options.preventDefault; !i._isMouseEvent && d && l.preventDefault(), i._prevInputEvent = l; var g = Yn(l), v = i.moveClients(g, l, !1); if (i._dragFlag) { if ((i.pinchFlag || v.deltaX || v.deltaY) && (i._preventMouseEvent || i.emit("drag", jt(jt({}, v), { isScroll: !!h, inputEvent: l }))) === !1) return void i.stop(); i.pinchFlag && i.onPinch(l, g); } i.getCurrentStore().getPosition(g, !0); } }, i.onDragEnd = function(l) { if (i.flag) { var h = i.options, d = h.pinchOutside, g = h.container, v = h.preventClickEventOnDrag, b = h.preventClickEventOnDragStart, x = h.preventClickEventByCondition, y = i.isDrag; (v || b || x) && requestAnimationFrame(function() { i._allowClickEvent(); }), x || b || !v || y || i._allowClickEvent(), i._useTouch && d && Ut(g, "touchstart", i.onDragStart), i.pinchFlag && i.onPinchEnd(l); var E = l?.touches ? Yn(l) : []; E.length !== 0 && i.options.keepDragging ? i._addStore(new pr(E)) : i.flag = !1; var M = i._getPosition(), m = Zn(), S = !y && i.doubleFlag; i._prevInputEvent = null, i.prevTime = y || S ? 0 : m, i.flag || (i._dettachDragEvent(), i._preventMouseEvent || i.emit("dragEnd", jt({ data: i.data, datas: i.data, isDouble: S, isDrag: y, isClick: !y, isMouseEvent: i._isMouseEvent, isSecondaryButton: i._isSecondaryButton, inputEvent: l, isTrusted: i._isTrusted }, M)), i.clientStores = [], i._isMouseEvent || (i._preventMouseEvent = !0, clearTimeout(i._preventMouseEventId), i._preventMouseEventId = setTimeout(function() { i._preventMouseEvent = !1; }, 200)), i._isIdle = !0); } }, i.onBlur = function() { i.onDragEnd(); }, i._allowClickEvent = function() { Ut(i._window, "click", i._onClick, !0); }, i._onClick = function(l) { i._allowClickEvent(), i._allowMouseEvent(); var h = i.options.preventClickEventByCondition; h?.(l) || (l.stopPropagation(), l.preventDefault()); }, i._onContextMenu = function(l) { i.options.preventRightClick ? i.onDragEnd(l) : l.preventDefault(); }, i._passCallback = function() { }; var o = [].concat(n), a = o[0]; i._window = lo(a) ? a : Pe(a), i.options = jt({ checkInput: !1, container: a && !("document" in a) ? Pe(a) : a, preventRightClick: !0, preventWheelClick: !0, preventClickEventOnDragStart: !1, preventClickEventOnDrag: !1, preventClickEventByCondition: null, preventDefault: !0, checkWindowBlur: !1, keepDragging: !1, pinchThreshold: 0, events: ["touch", "mouse"] }, r); var s = i.options, u = s.container, f = s.events, p = s.checkWindowBlur; if (i._useDrag = f.indexOf("drag") > -1, i._useTouch = f.indexOf("touch") > -1, i._useMouse = f.indexOf("mouse") > -1, i.targets = o, i._useDrag && o.forEach(function(l) { Jt(l, "dragstart", i.onDragStart); }), i._useMouse && (o.forEach(function(l) { Jt(l, "mousedown", i.onDragStart), Jt(l, "mousemove", i._passCallback); }), Jt(u, "contextmenu", i._onContextMenu)), p && Jt(Pe(), "blur", i.onBlur), i._useTouch) { var c = { passive: !1 }; o.forEach(function(l) { Jt(l, "touchstart", i.onDragStart, c), Jt(l, "touchmove", i._passCallback, c); }); } return i; } return (function(n, r) { function i() { this.constructor = n; } yo(n, r), n.prototype = r === null ? Object.create(r) : (i.prototype = r.prototype, new i()); })(t, e), t.prototype.stop = function() { this.isDrag = !1, this.data = {}, this.clientStores = [], this.pinchFlag = !1, this.doubleFlag = !1, this.prevTime = 0, this.flag = !1, this._isIdle = !0, this._allowClickEvent(), this._dettachDragEvent(), this._isDragAPI = !1; }, t.prototype.getMovement = function(n) { return this.getCurrentStore().getMovement(n) + this.clientStores.slice(1).reduce(function(r, i) { return r + i.movement; }, 0); }, t.prototype.isDragging = function() { return this.isDrag; }, t.prototype.isIdle = function() { return this._isIdle; }, t.prototype.isFlag = function() { return this.flag; }, t.prototype.isPinchFlag = function() { return this.pinchFlag; }, t.prototype.isDoubleFlag = function() { return this.doubleFlag; }, t.prototype.isPinching = function() { return this.isPinch; }, t.prototype.scrollBy = function(n, r, i, o) { o === void 0 && (o = !0), this.flag && (this.clientStores[0].move(n, r), o && this.onDrag(i, !0)); }, t.prototype.move = function(n, r) { var i = n[0], o = n[1], a = this.getCurrentStore().prevClients; return this.moveClients(a.map(function(s) { var u = s.clientX, f = s.clientY; return { clientX: u + i, clientY: f + o, originalClientX: u, originalClientY: f }; }), r, !0); }, t.prototype.triggerDragStart = function(n) { this.onDragStart(n, !1); }, t.prototype.setEventData = function(n) { var r = this.data; for (var i in n) r[i] = n[i]; return this; }, t.prototype.setEventDatas = function(n) { return this.setEventData(n); }, t.prototype.getCurrentEvent = function(n) { return n === void 0 && (n = this._prevInputEvent), jt(jt({ data: this.data, datas: this.data }, this._getPosition()), { movement: this.getMovement(), isDrag: this.isDrag, isPinch: this.isPinch, isScroll: !1, inputEvent: n }); }, t.prototype.getEventData = function() { return this.data; }, t.prototype.getEventDatas = function() { return this.data; }, t.prototype.unset = function() { var n = this, r = this.targets, i = this.options.container; this.off(), Ut(this._window, "blur", this.onBlur), this._useDrag && r.forEach(function(o) { Ut(o, "dragstart", n.onDragStart); }), this._useMouse && (r.forEach(function(o) { Ut(o, "mousedown", n.onDragStart); }), Ut(i, "contextmenu", this._onContextMenu)), this._useTouch && (r.forEach(function(o) { Ut(o, "touchstart", n.onDragStart); }), Ut(i, "touchstart", this.onDragStart)), this._prevInputEvent = null, this._allowClickEvent(), this._dettachDragEvent(); }, t.prototype.onPinchStart = function(n) { var r = this, i = this.options.pinchThreshold; if (!(this.isDrag && this.getMovement() > i)) { var o = new pr(Yn(n)); this.pinchFlag = !0, this._addStore(o), this.emit("pinchStart", jt(jt({ data: this.data, datas: this.data, angle: o.getAngle(), touches: this.getCurrentStore().getPositions() }, o.getPosition()), { inputEvent: n, isTrusted: this._isTrusted, preventDefault: function() { n.preventDefault(); }, preventDrag: function() { r._dragFlag = !1; } })) === !1 && (this.pinchFlag = !1); } }, t.prototype.onPinch = function(n, r) { if (this.flag && this.pinchFlag && !(r.length < 2)) { var i = this.getCurrentStore(); this.isPinch = !0, this.emit("pinch", jt(jt({ data: this.data, datas: this.data, movement: this.getMovement(r), angle: i.getAngle(r), rotation: i.getRotation(r), touches: i.getPositions(r), scale: i.getScale(r), distance: i.getDistance(r) }, i.getPosition(r)), { inputEvent: n, isTrusted: this._isTrusted })); } }, t.prototype.onPinchEnd = function(n) { if (this.pinchFlag) { var r = this.isPinch; this.isPinch = !1, this.pinchFlag = !1; var i = this.getCurrentStore(); this.emit("pinchEnd", jt(jt({ data: this.data, datas: this.data, isPinch: r, touches: i.getPositions() }, i.getPosition()), { inputEvent: n })); } }, t.prototype.getCurrentStore = function() { return this.clientStores[0]; }, t.prototype.moveClients = function(n, r, i) { var o = this._getPosition(n, i), a = this.isDrag; (o.deltaX || o.deltaY) && (this.isDrag = !0); var s = !1; return !a && this.isDrag && (s = !0), jt(jt({ data: this.data, datas: this.data }, o), { movement: this.getMovement(n), isDrag: this.isDrag, isPinch: this.isPinch, isScroll: !1, isMouseEvent: this._isMouseEvent, isSecondaryButton: this._isSecondaryButton, inputEvent: r, isTrusted: this._isTrusted, isFirstDrag: s }); }, t.prototype._addStore = function(n) { this.clientStores.splice(0, 0, n); }, t.prototype._getPosition = function(n, r) { var i = this.getCurrentStore().getPosition(n, r), o = this.clientStores.slice(1).reduce(function(u, f) { var p = f.getPosition(); return u.distX += p.distX, u.distY += p.distY, u; }, i), a = o.distX, s = o.distY; return jt(jt({}, i), { distX: a, distY: s }); }, t.prototype._attchDragEvent = function() { var n = this._window, r = this.options.container, i = { passive: !1 }; this._isDragAPI && (Jt(r, "dragover", this.onDrag, i), Jt(n, "dragend", this.onDragEnd)), this._useMouse && (Jt(r, "mousemove", this.onDrag), Jt(n, "mouseup", this.onDragEnd)), this._useTouch && (Jt(r, "touchmove", this.onDrag, i), Jt(n, "touchend", this.onDragEnd, i), Jt(n, "touchcancel", this.onDragEnd, i)); }, t.prototype._dettachDragEvent = function() { var n = this._window, r = this.options.container; this._isDragAPI && (Ut(r, "dragover", this.onDrag), Ut(n, "dragend", this.onDragEnd)), this._useMouse && (Ut(r, "mousemove", this.onDrag), Ut(n, "mouseup", this.onDragEnd)), this._useTouch && (Ut(r, "touchstart", this.onDragStart), Ut(r, "touchmove", this.onDrag), Ut(n, "touchend", this.onDragEnd), Ut(n, "touchcancel", this.onDragEnd)); }, t.prototype._allowMouseEvent = function() { this._preventMouseEvent = !1, clearTimeout(this._preventMouseEventId); }, t; })(bo); function Ta(e) { var t = "rCS" + (function(n) { for (var r = 5381, i = n.length; i; ) r = 33 * r ^ n.charCodeAt(--i); return r >>> 0; })(e).toString(36); return { className: t, inject: function(n, r) { r === void 0 && (r = {}); var i = (function(s) { if (s && s.getRootNode) { var u = s.getRootNode(); if (u.nodeType === 11) return u; } })(n), o = (i || n.ownerDocument || document).querySelector('style[data-styled-id="'.concat(t, '"]')); if (o) { var a = parseFloat(o.getAttribute("data-styled-count")) || 0; o.setAttribute("data-styled-count", "".concat(a + 1)); } else o = (function(s, u, f, p, c) { var l, h, d = Lr(p), g = d.createElement("style"); return g.setAttribute("type", "text/css"), g.setAttribute("data-styled-id", s), g.setAttribute("data-styled-count", "1"), f.nonce && g.setAttribute("nonce", f.nonce), g.innerHTML = (l = s, h = u, f.original ? h : h.replace(/([^};{\s}][^};{]*|^\s*){/gm, function(v, b) { var x = b.trim(); return (x ? hn(x) : [""]).map(function(y) { var E = y.trim(); return E.indexOf("@") === 0 ? E : E.indexOf(":global") > -1 ? E.replace(/\:global/g, "") : E.indexOf(":host") > -1 ? "".concat(E.replace(/\:host/g, ".".concat(l))) : E ? ".".concat(l, " ").concat(E) : ".".concat(l); }).join(", ") + " {"; })), (c || d.head || d.body).appendChild(g), g; })(t, e, r, n, i); return { destroy: function() { var s, u = parseFloat(o.getAttribute("data-styled-count")) || 0; u <= 1 ? (o.remove ? o.remove() : (s = o.parentNode) === null || s === void 0 || s.removeChild(o), o = null) : o.setAttribute("data-styled-count", "".concat(u - 1)); } }; } }; } var Tr = function() { return Tr = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); return e; }, Tr.apply(this, arguments); }; function Eo(e, t) { var n = Ta(t), r = n.className; return ee.forwardRef(function(i, o) { var a = i.className, s = a === void 0 ? "" : a; i.cspNonce; var u = (function(p, c) { var l = {}; for (var h in p) Object.prototype.hasOwnProperty.call(p, h) && c.indexOf(h) < 0 && (l[h] = p[h]); if (p != null && typeof Object.getOwnPropertySymbols == "function") { var d = 0; for (h = Object.getOwnPropertySymbols(p); d < h.length; d++) c.indexOf(h[d]) < 0 && Object.prototype.propertyIsEnumerable.call(p, h[d]) && (l[h[d]] = p[h[d]]); } return l; })(i, ["className", "cspNonce"]), f = ee.useRef(); return ee.useImperativeHandle(o, function() { return f.current; }, []), ee.useEffect(function() { var p = n.inject(f.current, { nonce: i.cspNonce }); return function() { p.destroy(); }; }, []), ee.createElement(e, Tr({ ref: f, "data-styled-id": r, className: "".concat(s, " ").concat(r) }, u)); }); } var So = function(e, t) { return (So = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) { n.__proto__ = r; } || function(n, r) { for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]); })(e, t); }; function Rn(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); function n() { this.constructor = e; } So(e, t), e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); } var C = function() { return C = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); return e; }, C.apply(this, arguments); }; function T(e, t) { var n = typeof Symbol == "function" && e[Symbol.iterator]; if (!n) return e; var r, i, o = n.call(e), a = []; try { for (; (t === void 0 || t-- > 0) && !(r = o.next()).done; ) a.push(r.value); } catch (s) { i = { error: s }; } finally { try { r && !r.done && (n = o.return) && n.call(o); } finally { if (i) throw i.error; } } return a; } function K(e, t, n) { if (arguments.length === 2) for (var r, i = 0, o = t.length; i < o; i++) !r && i in t || (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]); return e.concat(r || Array.prototype.slice.call(t)); } function Cn(e, t) { return C({ events: [], props: [], name: e }, t); } var Oa, _i, Ti, Pa = ["n", "w", "s", "e"], Zr = ["n", "w", "s", "e", "nw", "ne", "sw", "se"], rn = (function() { if (typeof navigator > "u" || !navigator || !navigator.userAgentData) return !1; var e = navigator.userAgentData, t = e.brands || e.uaList; return !(!t || !t.length); })() ? (function() { var e = navigator.userAgentData, t = (e.uaList || e.brands).slice(), n = e.mobile ||