@seontechnologies/seon-id-verification
Version:
An advanced SDK featuring web components for natural person identification through document scanning, facial recognition, hand gesture, and face turning detection, designed for secure and efficient user verification.
1,147 lines • 187 kB
JavaScript
var Fa = Object.defineProperty;
var Ia = (t, e, r) => e in t ? Fa(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
var Vt = (t, e, r) => Ia(t, typeof e != "symbol" ? e + "" : e, r);
import { j as g, a as xn, L as Ra, b as Li } from "./index-oGnhSncZ.mjs";
import * as xt from "react";
import { useRef as it, useMemo as Oa, useCallback as Sn, useEffect as bs } from "react";
const Da = ({ outline: t, dimension: e }) => g.jsx(g.Fragment, { children: g.jsx("svg", { className: `tw-h-photo-frame ${e == null ? void 0 : e.aspectRatio} tw-text-photo-frame dark:tw-text-photo-frame-dark tw-absolute`, viewBox: e == null ? void 0 : e.viewBox, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: g.jsx("path", { className: "path", d: e == null ? void 0 : e.pathDM, stroke: "currentColor", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeDasharray: t == null ? void 0 : t.strokeDasharray }) }) }), Na = (t) => /* @__PURE__ */ xt.createElement("svg", { width: 81, height: 81, viewBox: "0 0 81 81", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ xt.createElement("g", { id: "Illustration / Photo Success" }, /* @__PURE__ */ xt.createElement("path", { id: "Icon", d: "M40.5586 70.0156C29.7773 70.0156 19.9336 64.3906 14.543 55.0156C9.15234 45.7578 9.15234 34.3906 14.543 25.0156C19.9336 15.7578 29.7773 10.0156 40.5586 10.0156C51.2227 10.0156 61.0664 15.7578 66.457 25.0156C71.8477 34.3906 71.8477 45.7578 66.457 55.0156C61.0664 64.3906 51.2227 70.0156 40.5586 70.0156ZM53.8008 34.5078H53.6836C54.8555 33.4531 54.8555 31.6953 53.6836 30.5234C52.6289 29.4688 50.8711 29.4688 49.8164 30.5234L36.8086 43.6484L31.3008 38.1406C30.1289 36.9688 28.3711 36.9688 27.3164 38.1406C26.1445 39.1953 26.1445 40.9531 27.3164 42.0078L34.8164 49.5078C35.8711 50.6797 37.6289 50.6797 38.8008 49.5078L53.8008 34.5078Z", fill: "currentColor" }))), xi = ({ outline: t, animationStart: e, dimension: r, isSuccessful: s, onlySuccessFulStage: n }) => {
const i = it(null), o = it(null), a = it(0), h = it(0), c = Oa(() => ({
pathD: (r == null ? void 0 : r.aspectRatio) === "tw-aspect-8/9" ? "M 136.5,302.5 h -57.34 a 67.44,67.44 0 0 1 -67.44,-67.44 v -156.64 a 67.44,67.44 0 0 1 67.44,-67.44 h 126.88 a 67.44,67.44 0 0 1 67.44,67.44 v 156.64 a 67.44,67.44 0 0 1 -67.44,67.44 h -57.34 Z" : "M 129 314.44 H 79.75 a68 68 0 0 1 -68 -68 V 83 a68 68 0 0 1 68 -68 H 178.25 a68 68 0 0 1 68 68 v 163.44 a68 68 0 0 1 -68 68 H 129",
viewBox: (r == null ? void 0 : r.aspectRatio) === "tw-aspect-8/9" ? "0 0 284.44 314" : "0 0 258 330"
}), [r == null ? void 0 : r.aspectRatio]), u = Sn(() => {
if (i.current && o.current) {
a.current = i.current.getTotalLength(), h.current = o.current.getTotalLength(), i.current.style.strokeDasharray = `${a.current}`, i.current.style.strokeDashoffset = `${a.current}`, o.current.style.strokeDasharray = "0", o.current.style.strokeDashoffset = "0", i.current.style.visibility = "visible";
const y = setTimeout(() => {
i.current && o.current && (i.current.style.strokeDashoffset = "0", o.current.style.strokeDashoffset = `${h.current}`, i.current.style.transition = `stroke-dashoffset ${xn.config.promptLength}s linear`, o.current.style.transition = `stroke-dashoffset ${xn.config.promptLength}s linear`);
}, 100);
return () => clearTimeout(y);
}
}, []), w = Sn(() => {
i.current && o.current && (i.current.style.visibility = "hidden", i.current.style.transition = "none", o.current.style.transition = "none", i.current.style.strokeDashoffset = `${a.current}`, o.current.style.strokeDashoffset = `${h.current}`);
}, []);
return bs(() => {
s || (e ? u() : w());
}, [
e,
w,
u,
s
]), g.jsxs(g.Fragment, { children: [g.jsx("div", { className: `path tw-w-full tw-h-full tw-absolute ${s ? "tw-shadow-photo-overlay-inset" : ""}` }), g.jsx("svg", { className: `tw-h-photo-frame ${r == null ? void 0 : r.aspectRatio} ${n ? "tw-text-positive dark:tw-text-positive-dark" : "tw-text-photo-frame dark:tw-text-photo-frame-dark"} tw-absolute`, viewBox: c == null ? void 0 : c.viewBox, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: g.jsx("path", { ref: o, className: "path", d: c == null ? void 0 : c.pathD, stroke: "currentColor", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeDasharray: t == null ? void 0 : t.strokeDasharray }) }), g.jsx("svg", { className: `tw-h-photo-frame tw-transition-all tw-duration-300 ${r == null ? void 0 : r.aspectRatio} ${s ? "tw-text-positive dark:tw-text-positive-dark" : "tw-text-accent dark:tw-text-accent-dark"} tw-absolute`, viewBox: c.viewBox, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: g.jsx("path", { ref: i, className: "path", style: { visibility: "hidden" }, d: c.pathD, stroke: "currentColor", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeDasharray: t == null ? void 0 : t.strokeDasharray }) }), g.jsx(Na, { width: 64, height: 64, className: `tw-text-positive dark:tw-text-positive-dark tw-absolute tw-transition-all tw-duration-300 ${s ? "tw-opacity-100" : "tw-opacity-0"}` })] });
}, Ua = ({ outline: t, dimension: e, animateTo: r }) => {
const s = it(null);
return bs(() => {
const n = setTimeout(() => {
r != null && r.startAnimationTo && s.current && (s.current.style.strokeDasharray = r.strokeDasharray || (t == null ? void 0 : t.strokeDasharray) || "4", s.current.style.strokeWidth = r.strokeWidth || (t == null ? void 0 : t.strokeWidth) || "4");
}, (r == null ? void 0 : r.delay) || 0);
return () => clearTimeout(n);
}, [r, t == null ? void 0 : t.strokeDasharray, t == null ? void 0 : t.strokeWidth]), g.jsx(g.Fragment, { children: g.jsx("svg", { className: `tw-h-photo-frame ${e == null ? void 0 : e.aspectRatio} tw-text-photo-frame dark:tw-text-photo-frame-dark tw-absolute`, viewBox: e == null ? void 0 : e.viewBox, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: g.jsx("path", { ref: s, className: "path tw-transition-all tw-duration-100", d: e == null ? void 0 : e.pathDM, stroke: "currentColor", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeDasharray: t == null ? void 0 : t.strokeDasharray }) }) });
}, Gt = 30, Ye = (t, e, r) => {
const s = Math.round(t / 10) * 10;
if (e.current && r.current) {
const n = e.current.getTotalLength(), i = s >= 30 ? (s - 30) / 70 : 0, o = n * (1 - i * 0.5);
e.current.style.strokeDasharray = `${n}`, e.current.style.strokeDashoffset = `${o}`, r.current.style.strokeDasharray = `${n}`, r.current.style.strokeDashoffset = `${o}`;
}
}, Ba = ({ outline: t, dimension: e, isSuccessful: r, faceRotationSetting: s }) => {
const n = it(null), i = it(null), o = it(null), a = it(null), h = it(null), c = it(null), u = it(null), w = it(null), { direction: y, percentage: R = 1 } = s || {};
return bs(() => {
const _t = R === 0 ? 1 : R;
n.current && o.current && h.current && u.current && (y === "LEFT" ? Ye(_t, n, i) : y === "RIGHT" ? Ye(_t, o, a) : y === "UP" ? Ye(_t, h, c) : y === "DOWN" && Ye(_t, u, w));
}, [y, R]), g.jsxs(g.Fragment, { children: [g.jsx("div", { className: "path tw-w-full tw-h-full tw-absolute" }), r ? g.jsx(xi, { dimension: e, outline: t, animationStart: !0, isSuccessful: r, onlySuccessFulStage: !0 }) : g.jsxs("div", { className: `tw-h-[80%] ${e == null ? void 0 : e.aspectRatio} tw-absolute`, style: {
scale: "1.13"
}, children: [g.jsxs("svg", { className: `tw-transition-all tw-duration-300 ${e == null ? void 0 : e.aspectRatio} ${y === "LEFT" ? "tw-opacity-100 tw-text-accent dark:tw-text-accent-dark" : "tw-opacity-30 tw-text-photo-frame dark:tw-text-photo-frame-dark"} tw-absolute tw-left-0 tw-h-[74%] tw-my-auto tw-top-0 tw-bottom-0`, width: "14", height: "280", viewBox: "0 0 14 280", fill: "none", preserveAspectRatio: "none", xmlns: "http://www.w3.org/2000/svg", children: [g.jsxs("g", { clipPath: "url(#clip0_1970_3799)", children: [g.jsx("path", { d: "M11.5 3C11.5 3 3 15.5 3 34V246C3 264.5 11.5 277 11.5 277", stroke: "white", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round" }), g.jsx("path", { ref: n, d: "M11.5 3C11.5 3 3 15.5 3 34V246C3 264.5 11.5 277 11.5 277", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round", stroke: "currentColor", className: `${R <= Gt ? "tw-opacity-0" : "tw-transition-all tw-duration-300"}` }), g.jsx("path", { ref: i, d: "M11.5 277C11.5 277 3 264.5 3 246V34C3 15.5 11.5 3 11.5 3", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round", stroke: "currentColor", className: `${R <= Gt ? "tw-opacity-0" : "tw-transition-all tw-duration-300"}` })] }), g.jsx("defs", { children: g.jsx("clipPath", { id: "clip0_1970_3799", children: g.jsx("rect", { width: "14", height: "280", fill: "white" }) }) })] }), g.jsxs("svg", { className: `tw-transition-all tw-duration-300 ${e == null ? void 0 : e.aspectRatio} ${y === "UP" ? "tw-opacity-100 tw-text-accent dark:tw-text-accent-dark" : "tw-opacity-30 tw-text-photo-frame dark:tw-text-photo-frame-dark"} tw-absolute tw-top-0 tw-w-[74%] tw-mx-auto tw-left-0 tw-right-0`, width: "244", height: "14", viewBox: "0 0 244 14", fill: "none", preserveAspectRatio: "none", xmlns: "http://www.w3.org/2000/svg", children: [g.jsx("path", { d: "M3 11.5C3 11.5 15.5 3 34 3C52.5 3 191.5 3 210 3C228.5 3 241 11.5 241 11.5", stroke: "white", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round" }), g.jsx("path", { ref: h, d: "M3 11.5C3 11.5 15.5 3 34 3C52.5 3 191.5 3 210 3C228.5 3 241 11.5 241 11.5", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round", stroke: "currentColor", className: `${R <= Gt ? "tw-opacity-0" : ""} tw-transition-all tw-duration-300` }), g.jsx("path", { ref: c, d: "M241 11.5C241 11.5 228.5 3 210 3C191.5 3 52.5 3 34 3C15.5 3 3 11.5 3 11.5", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round", stroke: "currentColor", className: `${R <= Gt ? "tw-opacity-0" : ""} tw-transition-all tw-duration-300` })] }), g.jsxs("svg", { className: `tw-transition-all tw-duration-300 ${e == null ? void 0 : e.aspectRatio} ${y === "RIGHT" ? "tw-opacity-100 tw-text-accent dark:tw-text-accent-dark" : "tw-opacity-30 tw-text-photo-frame dark:tw-text-photo-frame-dark"} tw-absolute tw-right-0 tw-h-[74%] tw-my-auto tw-top-0 tw-bottom-0`, width: "14", height: "280", viewBox: "0 0 14 280", fill: "none", preserveAspectRatio: "none", xmlns: "http://www.w3.org/2000/svg", children: [g.jsx("path", { d: "M3.00001 3C3.00001 3 11.5 15.5 11.5 34L11.5 246C11.5 264.5 3 277 3 277", stroke: "white", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round" }), g.jsx("path", { ref: o, d: "M3.00001 3C3.00001 3 11.5 15.5 11.5 34L11.5 246C11.5 264.5 3 277 3 277", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round", stroke: "currentColor", className: `${R <= Gt ? "tw-opacity-0" : ""} tw-transition-all tw-duration-300` }), g.jsx("path", { ref: a, d: "M3 277C3 277 11.5 264.5 11.5 246L11.5 34C11.5 15.5 3 3 3 3", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round", stroke: "currentColor", className: `${R <= Gt ? "tw-opacity-0" : ""} tw-transition-all tw-duration-300` })] }), g.jsxs("svg", { className: `tw-transition-all tw-duration-300 ${e == null ? void 0 : e.aspectRatio} ${y === "DOWN" ? "tw-opacity-100 tw-text-accent dark:tw-text-accent-dark" : "tw-opacity-30 tw-text-photo-frame dark:tw-text-photo-frame-dark"} tw-absolute tw-bottom-0 tw-w-[74%] tw-mx-auto tw-left-0 tw-right-0`, width: "244", height: "14", viewBox: "0 0 244 14", fill: "none", preserveAspectRatio: "none", xmlns: "http://www.w3.org/2000/svg", children: [g.jsxs("g", { clipPath: "url(#clip0_1970_3802)", children: [g.jsx("path", { d: "M3 3C3 3 15.5 11.5 34 11.5C52.5 11.5 191.5 11.5 210 11.5C228.5 11.5 241 3 241 3", stroke: "white", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round" }), g.jsx("path", { ref: u, d: "M3 3C3 3 15.5 11.5 34 11.5C52.5 11.5 191.5 11.5 210 11.5C228.5 11.5 241 3 241 3", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round", stroke: "currentColor", className: `${R <= Gt ? "tw-opacity-0" : ""} tw-transition-all tw-duration-300` }), g.jsx("path", { ref: w, d: "M241 3C241 3 228.5 11.5 210 11.5C191.5 11.5 52.5 11.5 34 11.5C15.5 11.5 3 3 3 3", strokeWidth: (t == null ? void 0 : t.strokeWidth) || 1, strokeLinecap: "round", stroke: "currentColor", className: `${R <= Gt ? "tw-opacity-0" : ""} tw-transition-all tw-duration-300` })] }), g.jsx("defs", { children: g.jsx("clipPath", { id: "clip0_1970_3802", children: g.jsx("rect", { width: "244", height: "14", fill: "white" }) }) })] })] })] });
}, qe = {
idle: {
strokeDasharray: "4",
color: "tw-text-photo-frame dark:tw-text-photo-frame-dark",
strokeWidth: "2"
},
contentLock: {
strokeDasharray: "0",
color: "tw-text-accent dark:tw-text-accent-dark",
strokeWidth: "4.8"
},
countdown: {
strokeDasharray: "0",
color: "tw-text-accent dark:tw-text-accent-dark",
strokeWidth: "4.8"
},
indicator: {
strokeDasharray: "0",
color: "tw-text-accent dark:tw-text-accent-dark",
strokeWidth: "4.8"
},
success: {}
}, ae = {
"interactive-face": {
viewBox: "0 0 284.44 314",
pathDM: "M11,78.5 a68,68 0 0 1 68,-68 h126.44 a68,68 0 0 1 68,68 v156.64 a68,68 0 0 1 -68,68 h-126.44 a68,68 0 0 1 -68,-68 z",
aspectRatio: "tw-aspect-8/9"
},
"face-only": {
viewBox: "0 0 257 328",
pathDM: "M11.5,83 a68,68 0 0 1 68,-68 h98 a68,68 0 0 1 68,68 v163.44 a68,68 0 0 1 -68,68 h-98 a68,68 0 0 1 -68,-68 z",
aspectRatio: "tw-aspect-7/9"
}
}, V1 = ({ children: t, dimension: e, outline: r, startAnimation: s, isSuccessful: n, animateTo: i, faceRotationSetting: o }) => g.jsxs("div", { className: "tw-w-full tw-relative tw-flex tw-justify-center tw-items-center tw-h-[60%] tw-overflow-hidden", children: [t, g.jsxs("div", { className: "tw-w-full tw-h-full tw-overflow-hidden tw-absolute tw-flex tw-justify-center tw-items-center", children: [g.jsx("div", { className: `idverif-rounded-photo-frame ${n ? "" : "tw-shadow-photo-overlay"} tw-h-photo-frame-inner ${ae[e].aspectRatio}` }), g.jsx("div", { className: `tw-absolute tw-z-[1000] tw-rounded-photo-frame tw-transition-all tw-duration-300 ${n ? "tw-shadow-photo-overlay-positive " : "tw-shadow-transparent"} tw-h-photo-frame-inner ${ae[e].aspectRatio}` }), r === "idle" && g.jsx(Ua, { dimension: ae[e], outline: qe[r], animateTo: i }), r === "contentLock" && g.jsx(Da, { dimension: ae[e], outline: qe[r] }), r === "countdown" && g.jsx(xi, { dimension: ae[e], outline: qe[r], animationStart: s, isSuccessful: n }), r === "indicator" && g.jsx(Ba, { dimension: ae[e], outline: qe[r], animationStart: s, isSuccessful: n, faceRotationSetting: o })] })] }), G1 = ({ isUploading: t }) => g.jsx("div", { className: `tw-absolute tw-transition-all tw-duration-150 ${t ? "tw-opacity-100" : "tw-opacity-0"} tw-top-1/2`, children: g.jsx(Ra, {}) }), W1 = (t) => /* @__PURE__ */ xt.createElement("svg", { width: 56, height: 56, viewBox: "0 0 56 56", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ xt.createElement("path", { d: "M45.8653 53.42H37.5313C37.1393 53.42 36.8213 53.102 36.8213 52.71C36.8213 52.318 37.1393 52 37.5313 52H45.8653C49.4943 52 52.4473 49.114 52.4473 45.567V37.402C52.4473 37.01 52.7653 36.692 53.1573 36.692C53.5493 36.692 53.8673 37.01 53.8673 37.402V45.567C53.8673 49.897 50.2773 53.42 45.8653 53.42ZM10.4483 53.42C5.96127 53.42 2.44727 49.971 2.44727 45.567V37.402C2.44727 37.01 2.76527 36.692 3.15727 36.692C3.54927 36.692 3.86727 37.01 3.86727 37.402V45.567C3.86727 49.174 6.75827 52 10.4493 52H18.7833C19.1753 52 19.4933 52.318 19.4933 52.71C19.4933 53.102 19.1753 53.42 18.7833 53.42H10.4483ZM53.1573 18.727C52.7653 18.727 52.4473 18.409 52.4473 18.017V9.853C52.4473 6.366 49.4333 3.42 45.8653 3.42H37.5313C37.1393 3.42 36.8213 3.102 36.8213 2.71C36.8213 2.318 37.1393 2 37.5313 2H45.8653C50.2773 2 53.8673 5.523 53.8673 9.853V18.017C53.8673 18.409 53.5493 18.727 53.1573 18.727ZM3.15727 18.727C2.76527 18.727 2.44727 18.409 2.44727 18.017V9.853C2.44727 5.523 6.03627 2 10.4483 2H18.7823C19.1743 2 19.4923 2.318 19.4923 2.71C19.4923 3.102 19.1743 3.42 18.7823 3.42H10.4483C6.82027 3.42 3.86727 6.306 3.86727 9.853V18.017C3.86727 18.409 3.54927 18.727 3.15727 18.727Z", fill: "currentColor" }), /* @__PURE__ */ xt.createElement("path", { d: "M28.5213 9.953C35.1663 9.953 40.5733 15.359 40.5733 22.005V30.13C40.5733 36.827 34.5523 45.467 28.1573 45.467C21.7623 45.467 15.7413 36.827 15.7413 30.13V22.005C15.7413 15.36 21.1473 9.953 27.7933 9.953H28.5223M28.5213 8.533H27.7923C20.3523 8.533 14.3203 14.564 14.3203 22.005V30.13C14.3203 37.57 20.9003 46.887 28.1563 46.887C35.4123 46.887 41.9923 37.57 41.9923 30.13V22.005C41.9923 14.565 35.9623 8.533 28.5213 8.533Z", fill: "currentColor" }), /* @__PURE__ */ xt.createElement("path", { d: "M28.1583 38.139C26.0943 38.139 24.7183 37.205 24.6603 37.166C24.3373 36.943 24.2563 36.501 24.4793 36.178C24.7023 35.856 25.1423 35.776 25.4643 35.995C25.4753 36.002 26.5563 36.719 28.1583 36.719C29.7603 36.719 30.8423 36.002 30.8523 35.995C31.1763 35.776 31.6173 35.86 31.8373 36.182C32.0573 36.505 31.9773 36.944 31.6553 37.166C31.5973 37.206 30.2223 38.139 28.1573 38.139H28.1583Z", fill: "currentColor" }), /* @__PURE__ */ xt.createElement("path", { d: "M28.1583 31.506C27.7663 31.506 27.4483 31.188 27.4483 30.796V26.923C27.4483 26.531 27.7663 26.213 28.1583 26.213C28.5503 26.213 28.8683 26.531 28.8683 26.923V30.796C28.8683 31.188 28.5503 31.506 28.1583 31.506Z", fill: "currentColor" }), /* @__PURE__ */ xt.createElement("path", { d: "M22.4473 26C21.8959 26 21.4473 25.5513 21.4473 25C21.4473 24.4487 21.8959 24 22.4473 24C22.9986 24 23.4473 24.4487 23.4473 25C23.4473 25.5513 22.9986 26 22.4473 26Z", fill: "currentColor" }), /* @__PURE__ */ xt.createElement("path", { d: "M33.9473 26C33.3959 26 32.9473 25.5513 32.9473 25C32.9473 24.4487 33.3959 24 33.9473 24C34.4986 24 34.9473 24.4487 34.9473 25C34.9473 25.5513 34.4986 26 33.9473 26Z", fill: "currentColor" }));
var je = typeof self < "u" ? self : {};
function Si(t) {
t: {
for (var e = ["CLOSURE_FLAGS"], r = je, s = 0; s < e.length; s++) if ((r = r[e[s]]) == null) {
e = null;
break t;
}
e = r;
}
return (t = e && e[t]) != null && t;
}
function te() {
throw Error("Invalid UTF8");
}
function Cn(t, e) {
return e = String.fromCharCode.apply(null, e), t == null ? e : t + e;
}
let Ze, zr;
const ja = typeof TextDecoder < "u";
let Va;
const Ga = typeof TextEncoder < "u";
function Ci(t) {
if (Ga) t = (Va || (Va = new TextEncoder())).encode(t);
else {
let r = 0;
const s = new Uint8Array(3 * t.length);
for (let n = 0; n < t.length; n++) {
var e = t.charCodeAt(n);
if (128 > e) s[r++] = e;
else {
if (2048 > e) s[r++] = e >> 6 | 192;
else {
if (55296 <= e && 57343 >= e) {
if (56319 >= e && n < t.length) {
const i = t.charCodeAt(++n);
if (56320 <= i && 57343 >= i) {
e = 1024 * (e - 55296) + i - 56320 + 65536, s[r++] = e >> 18 | 240, s[r++] = e >> 12 & 63 | 128, s[r++] = e >> 6 & 63 | 128, s[r++] = 63 & e | 128;
continue;
}
n--;
}
e = 65533;
}
s[r++] = e >> 12 | 224, s[r++] = e >> 6 & 63 | 128;
}
s[r++] = 63 & e | 128;
}
}
t = r === s.length ? s : s.subarray(0, r);
}
return t;
}
var Ne, Mi = Si(610401301), Wa = Si(188588736);
const Mn = je.navigator;
function ss(t) {
return !!Mi && !!Ne && Ne.brands.some(({ brand: e }) => e && e.indexOf(t) != -1);
}
function dt(t) {
var e;
return (e = je.navigator) && (e = e.userAgent) || (e = ""), e.indexOf(t) != -1;
}
function Ht() {
return !!Mi && !!Ne && 0 < Ne.brands.length;
}
function Kr() {
return Ht() ? ss("Chromium") : (dt("Chrome") || dt("CriOS")) && !(!Ht() && dt("Edge")) || dt("Silk");
}
function Ts(t) {
return Ts[" "](t), t;
}
Ne = Mn && Mn.userAgentData || null, Ts[" "] = function() {
};
var Ha = !Ht() && (dt("Trident") || dt("MSIE"));
!dt("Android") || Kr(), Kr(), dt("Safari") && (Kr() || !Ht() && dt("Coast") || !Ht() && dt("Opera") || !Ht() && dt("Edge") || (Ht() ? ss("Microsoft Edge") : dt("Edg/")) || Ht() && ss("Opera"));
var Pi = {}, Me = null;
function $a(t) {
var e = t.length, r = 3 * e / 4;
r % 3 ? r = Math.floor(r) : "=.".indexOf(t[e - 1]) != -1 && (r = "=.".indexOf(t[e - 2]) != -1 ? r - 2 : r - 1);
var s = new Uint8Array(r), n = 0;
return function(i, o) {
function a(R) {
for (; h < i.length; ) {
var _t = i.charAt(h++), Qt = Me[_t];
if (Qt != null) return Qt;
if (!/^[\s\xa0]*$/.test(_t)) throw Error("Unknown base64 encoding at char: " + _t);
}
return R;
}
Fi();
for (var h = 0; ; ) {
var c = a(-1), u = a(0), w = a(64), y = a(64);
if (y === 64 && c === -1) break;
o(c << 2 | u >> 4), w != 64 && (o(u << 4 & 240 | w >> 2), y != 64 && o(w << 6 & 192 | y));
}
}(t, function(i) {
s[n++] = i;
}), n !== r ? s.subarray(0, n) : s;
}
function Fi() {
if (!Me) {
Me = {};
for (var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), e = ["+/=", "+/", "-_=", "-_.", "-_"], r = 0; 5 > r; r++) {
var s = t.concat(e[r].split(""));
Pi[r] = s;
for (var n = 0; n < s.length; n++) {
var i = s[n];
Me[i] === void 0 && (Me[i] = n);
}
}
}
}
var Ii = typeof Uint8Array < "u", Ri = !Ha && typeof btoa == "function";
function Pn(t) {
if (!Ri) {
var e;
e === void 0 && (e = 0), Fi(), e = Pi[e];
var r = Array(Math.floor(t.length / 3)), s = e[64] || "";
let h = 0, c = 0;
for (; h < t.length - 2; h += 3) {
var n = t[h], i = t[h + 1], o = t[h + 2], a = e[n >> 2];
n = e[(3 & n) << 4 | i >> 4], i = e[(15 & i) << 2 | o >> 6], o = e[63 & o], r[c++] = a + n + i + o;
}
switch (a = 0, o = s, t.length - h) {
case 2:
o = e[(15 & (a = t[h + 1])) << 2] || s;
case 1:
t = t[h], r[c] = e[t >> 2] + e[(3 & t) << 4 | a >> 4] + o + s;
}
return r.join("");
}
for (e = "", r = 0, s = t.length - 10240; r < s; ) e += String.fromCharCode.apply(null, t.subarray(r, r += 10240));
return e += String.fromCharCode.apply(null, r ? t.subarray(r) : t), btoa(e);
}
const Fn = /[-_.]/g, za = { "-": "+", _: "/", ".": "=" };
function Ka(t) {
return za[t] || "";
}
function Oi(t) {
if (!Ri) return $a(t);
Fn.test(t) && (t = t.replace(Fn, Ka)), t = atob(t);
const e = new Uint8Array(t.length);
for (let r = 0; r < t.length; r++) e[r] = t.charCodeAt(r);
return e;
}
function Ve(t) {
return Ii && t != null && t instanceof Uint8Array;
}
let Xa;
function kr() {
return Xa || (Xa = new Uint8Array(0));
}
var de = {};
let Ya;
function Di(t) {
if (t !== de) throw Error("illegal external caller");
}
function ie() {
return Ya || (Ya = new Nt(null, de));
}
function Ls(t) {
Di(de);
var e = t.g;
return (e = e == null || Ve(e) ? e : typeof e == "string" ? Oi(e) : null) == null ? e : t.g = e;
}
var Nt = class {
constructor(t, e) {
if (Di(e), this.g = t, t != null && t.length === 0) throw Error("ByteString should be constructed with non-empty values");
}
h() {
const t = Ls(this);
return t ? new Uint8Array(t) : kr();
}
};
function Ni(t, e) {
return Error(`Invalid wire type: ${t} (at position ${e})`);
}
function xs() {
return Error("Failed to read varint, encoding is invalid.");
}
function Ui(t, e) {
return Error(`Tried to read past the end of the data ${e} > ${t}`);
}
function Ss(t) {
if (typeof t == "string") return { buffer: Oi(t), P: !1 };
if (Array.isArray(t)) return { buffer: new Uint8Array(t), P: !1 };
if (t.constructor === Uint8Array) return { buffer: t, P: !1 };
if (t.constructor === ArrayBuffer) return { buffer: new Uint8Array(t), P: !1 };
if (t.constructor === Nt) return { buffer: Ls(t) || kr(), P: !0 };
if (t instanceof Uint8Array) return { buffer: new Uint8Array(t.buffer, t.byteOffset, t.byteLength), P: !1 };
throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers");
}
function Cs() {
return typeof BigInt == "function";
}
const qa = typeof Uint8Array.prototype.slice == "function";
let Bi, S = 0, G = 0;
function ee(t) {
const e = 0 > t;
let r = (t = Math.abs(t)) >>> 0;
if (t = Math.floor((t - r) / 4294967296), e) {
const [s, n] = Fs(r, t);
t = n, r = s;
}
S = r >>> 0, G = t >>> 0;
}
function Ms(t) {
const e = Bi || (Bi = new DataView(new ArrayBuffer(8)));
e.setFloat32(0, +t, !0), G = 0, S = e.getUint32(0, !0);
}
function ns(t, e) {
return 4294967296 * e + (t >>> 0);
}
function Ps(t, e) {
const r = 2147483648 & e;
return r && (e = ~e >>> 0, (t = 1 + ~t >>> 0) == 0 && (e = e + 1 >>> 0)), t = ns(t, e), r ? -t : t;
}
function ur(t, e) {
if (t >>>= 0, 2097151 >= (e >>>= 0)) var r = "" + (4294967296 * e + t);
else Cs() ? r = "" + (BigInt(e) << BigInt(32) | BigInt(t)) : (t = (16777215 & t) + 6777216 * (r = 16777215 & (t >>> 24 | e << 8)) + 6710656 * (e = e >> 16 & 65535), r += 8147497 * e, e *= 2, 1e7 <= t && (r += Math.floor(t / 1e7), t %= 1e7), 1e7 <= r && (e += Math.floor(r / 1e7), r %= 1e7), r = e + In(r) + In(t));
return r;
}
function In(t) {
return t = String(t), "0000000".slice(t.length) + t;
}
function ji() {
var t = S, e = G;
if (2147483648 & e) if (Cs()) t = "" + (BigInt(0 | e) << BigInt(32) | BigInt(t >>> 0));
else {
const [r, s] = Fs(t, e);
t = "-" + ur(r, s);
}
else t = ur(t, e);
return t;
}
function Er(t) {
if (16 > t.length) ee(Number(t));
else if (Cs()) t = BigInt(t), S = Number(t & BigInt(4294967295)) >>> 0, G = Number(t >> BigInt(32) & BigInt(4294967295));
else {
const e = +(t[0] === "-");
G = S = 0;
const r = t.length;
for (let s = e, n = (r - e) % 6 + e; n <= r; s = n, n += 6) {
const i = Number(t.slice(s, n));
G *= 1e6, S = 1e6 * S + i, 4294967296 <= S && (G += Math.trunc(S / 4294967296), G >>>= 0, S >>>= 0);
}
if (e) {
const [s, n] = Fs(S, G);
S = s, G = n;
}
}
}
function Fs(t, e) {
return e = ~e, t ? t = 1 + ~t : e += 1, [t, e];
}
function Is(t, e) {
let r, s = 0, n = 0, i = 0;
const o = t.h;
let a = t.g;
do
r = o[a++], s |= (127 & r) << i, i += 7;
while (32 > i && 128 & r);
for (32 < i && (n |= (127 & r) >> 4), i = 3; 32 > i && 128 & r; i += 7) r = o[a++], n |= (127 & r) << i;
if (re(t, a), 128 > r) return e(s >>> 0, n >>> 0);
throw xs();
}
function Rs(t) {
let e = 0, r = t.g;
const s = r + 10, n = t.h;
for (; r < s; ) {
const i = n[r++];
if (e |= i, (128 & i) == 0) return re(t, r), !!(127 & e);
}
throw xs();
}
function zt(t) {
const e = t.h;
let r = t.g, s = e[r++], n = 127 & s;
if (128 & s && (s = e[r++], n |= (127 & s) << 7, 128 & s && (s = e[r++], n |= (127 & s) << 14, 128 & s && (s = e[r++], n |= (127 & s) << 21, 128 & s && (s = e[r++], n |= s << 28, 128 & s && 128 & e[r++] && 128 & e[r++] && 128 & e[r++] && 128 & e[r++] && 128 & e[r++]))))) throw xs();
return re(t, r), n;
}
function Kt(t) {
return zt(t) >>> 0;
}
function is(t) {
var e = t.h;
const r = t.g, s = e[r], n = e[r + 1], i = e[r + 2];
return e = e[r + 3], re(t, t.g + 4), (s << 0 | n << 8 | i << 16 | e << 24) >>> 0;
}
function os(t) {
var e = is(t);
t = 2 * (e >> 31) + 1;
const r = e >>> 23 & 255;
return e &= 8388607, r == 255 ? e ? NaN : 1 / 0 * t : r == 0 ? t * Math.pow(2, -149) * e : t * Math.pow(2, r - 150) * (e + Math.pow(2, 23));
}
function Za(t) {
return zt(t);
}
function Xr(t, e, { ca: r = !1 } = {}) {
t.ca = r, e && (e = Ss(e), t.h = e.buffer, t.m = e.P, t.j = 0, t.l = t.h.length, t.g = t.j);
}
function re(t, e) {
if (t.g = e, e > t.l) throw Ui(t.l, e);
}
function Vi(t, e) {
if (0 > e) throw Error(`Tried to read a negative byte length: ${e}`);
const r = t.g, s = r + e;
if (s > t.l) throw Ui(e, t.l - r);
return t.g = s, r;
}
function Gi(t, e) {
if (e == 0) return ie();
var r = Vi(t, e);
return t.ca && t.m ? r = t.h.subarray(r, r + e) : (t = t.h, r = r === (e = r + e) ? kr() : qa ? t.slice(r, e) : new Uint8Array(t.subarray(r, e))), r.length == 0 ? ie() : new Nt(r, de);
}
var Rn = [];
function Wi(t) {
var e = t.g;
if (e.g == e.l) return !1;
t.l = t.g.g;
var r = Kt(t.g);
if (e = r >>> 3, !(0 <= (r &= 7) && 5 >= r)) throw Ni(r, t.l);
if (1 > e) throw Error(`Invalid field number: ${e} (at position ${t.l})`);
return t.m = e, t.h = r, !0;
}
function rr(t) {
switch (t.h) {
case 0:
t.h != 0 ? rr(t) : Rs(t.g);
break;
case 1:
re(t = t.g, t.g + 8);
break;
case 2:
if (t.h != 2) rr(t);
else {
var e = Kt(t.g);
re(t = t.g, t.g + e);
}
break;
case 5:
re(t = t.g, t.g + 4);
break;
case 3:
for (e = t.m; ; ) {
if (!Wi(t)) throw Error("Unmatched start-group tag: stream EOF");
if (t.h == 4) {
if (t.m != e) throw Error("Unmatched end-group tag");
break;
}
rr(t);
}
break;
default:
throw Ni(t.h, t.l);
}
}
function Ge(t, e, r) {
const s = t.g.l, n = Kt(t.g), i = t.g.g + n;
let o = i - s;
if (0 >= o && (t.g.l = i, r(e, t, void 0, void 0, void 0), o = i - t.g.g), o) throw Error(`Message parsing ended unexpectedly. Expected to read ${n} bytes, instead read ${n - o} bytes, either the data ended unexpectedly or the message misreported its own length`);
return t.g.g = i, t.g.l = s, e;
}
function Os(t) {
var e = Kt(t.g), r = Vi(t = t.g, e);
if (t = t.h, ja) {
var s, n = t;
(s = zr) || (s = zr = new TextDecoder("utf-8", { fatal: !0 })), e = r + e, n = r === 0 && e === n.length ? n : n.subarray(r, e);
try {
var i = s.decode(n);
} catch (a) {
if (Ze === void 0) {
try {
s.decode(new Uint8Array([128]));
} catch {
}
try {
s.decode(new Uint8Array([97])), Ze = !0;
} catch {
Ze = !1;
}
}
throw !Ze && (zr = void 0), a;
}
} else {
e = (i = r) + e, r = [];
let a, h = null;
for (; i < e; ) {
var o = t[i++];
128 > o ? r.push(o) : 224 > o ? i >= e ? te() : (a = t[i++], 194 > o || (192 & a) != 128 ? (i--, te()) : r.push((31 & o) << 6 | 63 & a)) : 240 > o ? i >= e - 1 ? te() : (a = t[i++], (192 & a) != 128 || o === 224 && 160 > a || o === 237 && 160 <= a || (192 & (s = t[i++])) != 128 ? (i--, te()) : r.push((15 & o) << 12 | (63 & a) << 6 | 63 & s)) : 244 >= o ? i >= e - 2 ? te() : (a = t[i++], (192 & a) != 128 || a - 144 + (o << 28) >> 30 || (192 & (s = t[i++])) != 128 || (192 & (n = t[i++])) != 128 ? (i--, te()) : (o = (7 & o) << 18 | (63 & a) << 12 | (63 & s) << 6 | 63 & n, o -= 65536, r.push(55296 + (o >> 10 & 1023), 56320 + (1023 & o)))) : te(), 8192 <= r.length && (h = Cn(h, r), r.length = 0);
}
i = Cn(h, r);
}
return i;
}
function Hi(t) {
const e = Kt(t.g);
return Gi(t.g, e);
}
function Ar(t, e, r) {
var s = Kt(t.g);
for (s = t.g.g + s; t.g.g < s; ) r.push(e(t.g));
}
var Je = [];
function On(t) {
return t ? /^\d+$/.test(t) ? (Er(t), new Dn(S, G)) : null : Ja || (Ja = new Dn(0, 0));
}
var Dn = class {
constructor(t, e) {
this.h = t >>> 0, this.g = e >>> 0;
}
};
let Ja;
function Nn(t) {
return t ? /^-?\d+$/.test(t) ? (Er(t), new Un(S, G)) : null : Qa || (Qa = new Un(0, 0));
}
var Un = class {
constructor(t, e) {
this.h = t >>> 0, this.g = e >>> 0;
}
};
let Qa;
function lr(t, e, r) {
for (; 0 < r || 127 < e; ) t.g.push(127 & e | 128), e = (e >>> 7 | r << 25) >>> 0, r >>>= 7;
t.g.push(e);
}
function We(t, e) {
for (; 127 < e; ) t.g.push(127 & e | 128), e >>>= 7;
t.g.push(e);
}
function br(t, e) {
if (0 <= e) We(t, e);
else {
for (let r = 0; 9 > r; r++) t.g.push(127 & e | 128), e >>= 7;
t.g.push(1);
}
}
function Ue(t, e) {
t.g.push(e >>> 0 & 255), t.g.push(e >>> 8 & 255), t.g.push(e >>> 16 & 255), t.g.push(e >>> 24 & 255);
}
function pe(t, e) {
e.length !== 0 && (t.l.push(e), t.h += e.length);
}
function mt(t, e, r) {
We(t.g, 8 * e + r);
}
function Ds(t, e) {
return mt(t, e, 2), e = t.g.end(), pe(t, e), e.push(t.h), e;
}
function Ns(t, e) {
var r = e.pop();
for (r = t.h + t.g.length() - r; 127 < r; ) e.push(127 & r | 128), r >>>= 7, t.h++;
e.push(r), t.h++;
}
function Tr(t, e, r) {
mt(t, e, 2), We(t.g, r.length), pe(t, t.g.end()), pe(t, r);
}
function as(t, e, r, s) {
r != null && (e = Ds(t, e), s(r, t), Ns(t, e));
}
class Ee {
constructor(e, r, s, n) {
this.g = e, this.h = r, this.l = s, this.pa = n;
}
}
function ot(t) {
return Array.prototype.slice.call(t);
}
function Us(t) {
return typeof Symbol == "function" && typeof Symbol() == "symbol" ? Symbol() : t;
}
var Ct = Us(), Bn = Us("0di"), Yr = Us("2ex"), Bs = Ct ? (t, e) => {
t[Ct] |= e;
} : (t, e) => {
t.g !== void 0 ? t.g |= e : Object.defineProperties(t, { g: { value: e, configurable: !0, writable: !0, enumerable: !1 } });
}, fr = Ct ? (t, e) => {
t[Ct] &= ~e;
} : (t, e) => {
t.g !== void 0 && (t.g &= ~e);
};
function K(t, e, r) {
return r ? t | e : t & ~e;
}
var N = Ct ? (t) => 0 | t[Ct] : (t) => 0 | t.g, A = Ct ? (t) => t[Ct] : (t) => t.g, D = Ct ? (t, e) => (t[Ct] = e, t) : (t, e) => (t.g !== void 0 ? t.g = e : Object.defineProperties(t, { g: { value: e, configurable: !0, writable: !0, enumerable: !1 } }), t);
function Ae(t) {
return Bs(t, 34), t;
}
function t2(t, e) {
D(e, -14591 & (0 | t));
}
function hs(t, e) {
D(e, -14557 & (34 | t));
}
function $i(t) {
return (t = t >> 14 & 1023) === 0 ? 536870912 : t;
}
var js, He = {}, zi = {};
function jn(t) {
return !(!t || typeof t != "object" || t.Ja !== zi);
}
function Vs(t) {
return t !== null && typeof t == "object" && !Array.isArray(t) && t.constructor === Object;
}
function Gs(t, e, r) {
if (t != null) {
if (typeof t == "string") t = t ? new Nt(t, de) : ie();
else if (t.constructor !== Nt) if (Ve(t)) t = t.length ? new Nt(r ? t : new Uint8Array(t), de) : ie();
else {
if (!e) throw Error();
t = void 0;
}
}
return t;
}
function dr(t, e, r) {
if (!Array.isArray(t) || t.length) return !1;
const s = N(t);
return !!(1 & s) || !(!e || !(Array.isArray(e) ? e.includes(r) : e.has(r))) && (D(t, 1 | s), !0);
}
const Vn = [];
function It(t) {
if (2 & t) throw Error();
}
D(Vn, 55), js = Object.freeze(Vn);
class pr {
constructor(e, r, s) {
this.l = 0, this.g = e, this.h = r, this.m = s;
}
next() {
if (this.l < this.g.length) {
const e = this.g[this.l++];
return { done: !1, value: this.h ? this.h.call(this.m, e) : e };
}
return { done: !0, value: void 0 };
}
[Symbol.iterator]() {
return new pr(this.g, this.h, this.m);
}
}
let $t, e2, r2;
function Ki(t, e) {
(e = $t ? e[$t] : void 0) && (t[$t] = ot(e));
}
function Xi(t, e) {
t.__closure__error__context__984382 || (t.__closure__error__context__984382 = {}), t.__closure__error__context__984382.severity = e;
}
function s2() {
const t = Error();
Xi(t, "incident"), function(e) {
je.setTimeout(() => {
throw e;
}, 0);
}(t);
}
function cs(t) {
return Xi(t = Error(t), "warning"), t;
}
function Zt(t) {
return t == null || typeof t == "number" ? t : t === "NaN" || t === "Infinity" || t === "-Infinity" ? Number(t) : void 0;
}
function Yi(t) {
return t == null || typeof t == "boolean" ? t : typeof t == "number" ? !!t : void 0;
}
Object.freeze(new class {
}()), Object.freeze(new class {
}());
const n2 = /^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;
function Lr(t) {
const e = typeof t;
return e === "number" ? Number.isFinite(t) : e === "string" && n2.test(t);
}
function be(t) {
if (t == null) return t;
if (typeof t == "string") {
if (!t) return;
t = +t;
}
return typeof t == "number" && Number.isFinite(t) ? 0 | t : void 0;
}
function i2(t) {
if (t == null) return t;
if (typeof t == "string") {
if (!t) return;
t = +t;
}
return typeof t == "number" && Number.isFinite(t) ? t >>> 0 : void 0;
}
function Gn(t) {
return t[0] !== "-" && (20 > t.length || t.length === 20 && 184467 > Number(t.substring(0, 6)));
}
function qi(t) {
return t[0] === "-" ? 20 > t.length || t.length === 20 && -922337 < Number(t.substring(0, 7)) : 19 > t.length || t.length === 19 && 922337 > Number(t.substring(0, 6));
}
function Ws(t) {
return t = Math.trunc(t), Number.isSafeInteger(t) || (ee(t), t = Ps(S, G)), t;
}
function Hs(t) {
var e = Math.trunc(Number(t));
return Number.isSafeInteger(e) ? String(e) : ((e = t.indexOf(".")) !== -1 && (t = t.substring(0, e)), qi(t) || (Er(t), t = ji()), t);
}
function gr(t) {
return t == null ? t : Lr(t) ? typeof t == "number" ? Ws(t) : Hs(t) : void 0;
}
function $e(t) {
if (typeof t != "string") throw Error();
return t;
}
function Te(t) {
if (t != null && typeof t != "string") throw Error();
return t;
}
function se(t) {
return t == null || typeof t == "string" ? t : void 0;
}
function $s(t, e, r, s) {
if (t != null && typeof t == "object" && t.X === He) return t;
if (!Array.isArray(t)) return r ? 2 & s ? (t = e[Bn]) ? e = t : (Ae((t = new e()).s), e = e[Bn] = t) : e = new e() : e = void 0, e;
let n = r = N(t);
return n === 0 && (n |= 32 & s), n |= 2 & s, n !== r && D(t, n), new e(t);
}
function o2(t, e, r) {
if (e) {
var s = !!s;
if (!Lr(e = t)) throw cs("int64");
typeof e == "string" ? s = Hs(e) : s ? (s = Math.trunc(e), Number.isSafeInteger(s) ? s = String(s) : qi(e = String(s)) ? s = e : (ee(s), s = ji())) : s = Ws(e);
} else s = gr(t);
return typeof (r = (t = s) == null ? r ? 0 : void 0 : t) == "string" && (s = +r, Number.isSafeInteger(s)) ? s : r;
}
let mr, zs, a2;
function yr(t) {
switch (typeof t) {
case "boolean":
return zs || (zs = [0, void 0, !0]);
case "number":
return 0 < t ? void 0 : t === 0 ? a2 || (a2 = [0, void 0]) : [-t, void 0];
case "string":
return [0, t];
case "object":
return t;
}
}
function ne(t, e) {
return Zi(t, e[0], e[1]);
}
function Zi(t, e, r) {
if (t == null && (t = mr), mr = void 0, t == null) {
var s = 96;
r ? (t = [r], s |= 512) : t = [], e && (s = -16760833 & s | (1023 & e) << 14);
} else {
if (!Array.isArray(t)) throw Error("narr");
if (2048 & (s = N(t))) throw Error("farr");
if (64 & s) return t;
if (s |= 64, r && (s |= 512, r !== t[0])) throw Error("mid");
t: {
const n = (r = t).length;
if (n) {
const i = n - 1;
if (Vs(r[i])) {
if (1024 <= (e = i - (+!!(512 & (s |= 256)) - 1))) throw Error("pvtlmt");
s = -16760833 & s | (1023 & e) << 14;
break t;
}
}
if (e) {
if (1024 < (e = Math.max(e, n - (+!!(512 & s) - 1)))) throw Error("spvt");
s = -16760833 & s | (1023 & e) << 14;
}
}
}
return D(t, s), t;
}
const h2 = {};
let c2 = function() {
try {
return Ts(new class extends Map {
constructor() {
super();
}
}()), !1;
} catch {
return !0;
}
}();
class qr {
constructor() {
this.g = /* @__PURE__ */ new Map();
}
get(e) {
return this.g.get(e);
}
set(e, r) {
return this.g.set(e, r), this.size = this.g.size, this;
}
delete(e) {
return e = this.g.delete(e), this.size = this.g.size, e;
}
clear() {
this.g.clear(), this.size = this.g.size;
}
has(e) {
return this.g.has(e);
}
entries() {
return this.g.entries();
}
keys() {
return this.g.keys();
}
values() {
return this.g.values();
}
forEach(e, r) {
return this.g.forEach(e, r);
}
[Symbol.iterator]() {
return this.entries();
}
}
const u2 = c2 ? (Object.setPrototypeOf(qr.prototype, Map.prototype), Object.defineProperties(qr.prototype, { size: { value: 0, configurable: !0, enumerable: !0, writable: !0 } }), qr) : class extends Map {
constructor() {
super();
}
};
function Wn(t) {
return t;
}
function Zr(t) {
if (2 & t.N) throw Error("Cannot mutate an immutable Map");
}
var gt = class extends u2 {
constructor(t, e, r = Wn, s = Wn) {
super();
let n = N(t);
n |= 64, D(t, n), this.N = n, this.U = e, this.S = r, this.Z = this.U ? l2 : s;
for (let i = 0; i < t.length; i++) {
const o = t[i], a = r(o[0], !1, !0);
let h = o[1];
e ? h === void 0 && (h = null) : h = s(o[1], !1, !0, void 0, void 0, n), super.set(a, h);
}
}
oa(t = Hn) {
if (this.size !== 0) return this.Y(t);
}
Y(t = Hn) {
const e = [], r = super.entries();
for (var s; !(s = r.next()).done; ) (s = s.value)[0] = t(s[0]), s[1] = t(s[1]), e.push(s);
return e;
}
clear() {
Zr(this), super.clear();
}
delete(t) {
return Zr(this), super.delete(this.S(t, !0, !1));
}
entries() {
var t = this.na();
return new pr(t, f2, this);
}
keys() {
return this.Ia();
}
values() {
var t = this.na();
return new pr(t, gt.prototype.get, this);
}
forEach(t, e) {
super.forEach((r, s) => {
t.call(e, this.get(s), s, this);
});
}
set(t, e) {
return Zr(this), (t = this.S(t, !0, !1)) == null ? this : e == null ? (super.delete(t), this) : super.set(t, this.Z(e, !0, !0, this.U, !1, this.N));
}
Oa(t) {
const e = this.S(t[0], !1, !0);
t = t[1], t = this.U ? t === void 0 ? null : t : this.Z(t, !1, !0, void 0, !1, this.N), super.set(e, t);
}
has(t) {
return super.has(this.S(t, !1, !1));
}
get(t) {
t = this.S(t, !1, !1);
const e = super.get(t);
if (e !== void 0) {
var r = this.U;
return r ? ((r = this.Z(e, !1, !0, r, this.ta, this.N)) !== e && super.set(t, r), r) : e;
}
}
na() {
return Array.from(super.keys());
}
Ia() {
return super.keys();
}
[Symbol.iterator]() {
return this.entries();
}
};
function l2(t, e, r, s, n, i) {
return t = $s(t, s, r, i), n && (t = Sr(t)), t;
}
function Hn(t) {
return t;
}
function f2(t) {
return [t, this.get(t)];
}
let d2;
function $n() {
return d2 || (d2 = new gt(Ae([]), void 0, void 0, void 0, h2));
}
function Ks(t, e, r, s, n) {
if (t != null) {
if (Array.isArray(t)) t = dr(t, void 0, 0) ? void 0 : n && 2 & N(t) ? t : xr(t, e, r, s !== void 0, n);
else if (Vs(t)) {
const i = {};
for (let o in t) i[o] = Ks(t[o], e, r, s, n);
t = i;
} else t = e(t, s);
return t;
}
}
function xr(t, e, r, s, n) {
const i = s || r ? N(t) : 0;
s = s ? !!(32 & i) : void 0;
const o = ot(t);
for (let a = 0; a < o.length; a++) o[a] = Ks(o[a], e, r, s, n);
return r && (Ki(o, t), r(i, o)), o;
}
function p2(t) {
return Ks(t, Xs, void 0, void 0, !1);
}
function Xs(t) {
return t.X === He ? t.toJSON() : t instanceof gt ? t.oa(p2) : function(e) {
switch (typeof e) {
case "number":
return isFinite(e) ? e : String(e);
case "boolean":
return e ? 1 : 0;
case "object":
if (e) if (Array.isArray(e)) {
if (dr(e, void 0, 0)) return;
} else {
if (Ve(e)) return Pn(e);
if (e instanceof Nt) {
const r = e.g;
return r == null ? "" : typeof r == "string" ? r : e.g = Pn(r);
}
if (e instanceof gt) return e.oa();
}
}
return e;
}(t);
}
function us(t, e, r = hs) {
if (t != null) {
if (Ii && t instanceof Uint8Array) return e ? t : new Uint8Array(t);
if (Array.isArray(t)) {
var s = N(t);
return 2 & s || (e && (e = s === 0 || !!(32 & s) && !(64 & s || !(16 & s))), t = e ? D(t, -12293 & (34 | s)) : xr(t, us, 4 & s ? hs : r, !0, !0)), t;
}
return t.X === He ? (r = t.s, t = 2 & (s = A(r)) ? t : Ys(t, r, s, !0)) : t instanceof gt && !(2 & t.N) && (r = Ae(t.Y(us)), t = new gt(r, t.U, t.S, t.Z)), t;
}
}
function Ys(t, e, r, s) {
return t = t.constructor, mr = e = Ji(e, r, s), e = new t(e), mr = void 0, e;
}
function Ji(t, e, r) {
const s = r || 2 & e ? hs : t2, n = !!(32 & e);
return t = function(i, o, a) {
const h = ot(i);
var c = h.length;
const u = 256 & o ? h[c - 1] : void 0;
for (c += u ? -1 : 0, o = 512 & o ? 1 : 0; o < c; o++) h[o] = a(h[o]);
if (u) {
o = h[o] = {};
for (const w in u) o[w] = a(u[w]);
}
return Ki(h, i), h;
}(t, e, (i) => us(i, n, s)), Bs(t, 32 | (r ? 2 : 0)), t;
}
function Sr(t) {
const e = t.s, r = A(e);
return 2 & r ? Ys(t, e, r, !1) : t;
}
function Qi(t, e, r, s) {
return !(4 & e) || r != null;
}
function Xt(t, e) {
return Rt(t = t.s, A(t), e);
}
function zn(t, e, r, s) {
if (!(0 > (e = s + (+!!(512 & e) - 1)) || e >= t.length || e >= r)) return t[e];
}
function Rt(t, e, r, s) {
if (r === -1) return null;
const n = $i(e);
if (!(r >= n)) {
var i = t.length;
return s && 256 & e && (s = t[i - 1][r]) != null ? (zn(t, e, n, r) && Yr != null && (4 <= (e = (t = r2 ?? (r2 = {}))[Yr] || 0) || (t[Yr] = e + 1, s2())), s) : zn(t, e, n, r);
}
return 256 & e ? t[t.length - 1][r] : void 0;
}
function L(t, e, r, s) {
const n = t.s;
let i = A(n);
return It(i), C(n, i, e, r, s), t;
}
function C(t, e, r, s, n) {
const i = $i(e);
if (r >= i || n) {
let o = e;
if (256 & e) n = t[t.length - 1];
else {
if (s == null) return o;
n = t[i + (+!!(512 & e) - 1)] = {}, o |= 256;
}
return n[r] = s, r < i && (t[r + (+!!(512 & e) - 1)] = void 0), o !== e && D(t, o), o;
}
return t[r + (+!!(512 & e) - 1)] = s, 256 & e && r in (t = t[t.length - 1]) && delete t[r], e;
}
function Le(t, e, r, s, n) {
var i = 2 & e;
let o = Rt(t, e, r, n);
Array.isArray(o) || (o = js);
const a = !(2 & s);
s = !(1 & s);
const h = !!(32 & e);
let c = N(o);
return c !== 0 || !h || i || a ? 1 & c || (c |= 1, D(o, c)) : (c |= 33, D(o, c)), i ? (t = !1, 2 & c || (Ae(o), t = !!(4 & c)), (s || t) && Object.freeze(o)) : (i = !!(2 & c) || !!(2048 & c), s && i ? (o = ot(o), s = 1, h && !a && (s |= 32), D(o, s), C(t, e, r, o, n)) : a && 32 & c && !i && fr(o, 32)), o;
}
function sr(t, e) {
t = t.s;
let r = A(t);
const s = Rt(t, r, e), n = Zt(s);
return n != null && n !== s && C(t, r, e, n), n;
}
function to(t) {
t = t.s;
let e = A(t);
const r = Rt(t, e, 1), s = Gs(r, !0, !!(34 & e));
return s != null && s !== r && C(t, e, 1, s), s;
}
function le(t, e, r) {
const s = t.s;
let n = A(s);
const i = 2 & n ? 1 : 2;
let o = eo(s, n, e);
var a = N(o);
if (Qi(t, a, void 0)) {
(4 & a || Object.isFrozen(o)) && (o = ot(o), a = oe(a, n), n = C(s, n, e, o));
let h = t = 0;
for (; t < o.length; t++) {
const c = r(o[t]);
c != null && (o[h++] = c);
}
h < t && (o.length = h), a = K(a = ro(a, n), 20, !0), a = K(a, 4096, !1), a = K(a, 8192, !1), D(o, a), 2 & a && Object.freeze(o);
}
return Fe(a) || (r = a, (a = (t = i === 1 || i === 4 && !!(32 & a)) ? K(a, 2, !0) : ge(a, n, !1)) !== r && D(o, a), t && Object.freeze(o)), i === 2 && Fe(a) && (o = ot(o), a = ge(a = oe(a, n), n, !1), D(o, a), C(s, n, e, o)), o;
}
function eo(t, e, r) {
return t = Rt(t, e, r), Array.isArray(t) ? t : js;
}
function ro(t, e) {
return t === 0 && (t = oe(t, e)), K(t, 1, !0);
}
function Fe(t) {
return !!(2 & t) && !!(4 & t) || !!(2048 & t);
}
function so(t) {
t = ot(t);
for (let e = 0; e < t.length; e++) {
const r = t[e] = ot(t[e]);
Array.isArray(r[1]) && (r[1] = Ae(r[1]));
}
return t;
}
function wr(t, e, r) {
{
const a = t.s;
let h = A(a);
if (It(h), r == null) C(a, h, e);
else {
var s, n = N(r), i = n, o = !!(2 & n) || Object.isFrozen(r);
if ((s = !o) && (s = !1), Qi(t, n)) for (n = 21, o && (r = ot(r), i = 0, n = ge(n = oe(n, h), h, !0)), t = 0; t < r.length; t++) r[t] = $e(r[t]);
s && (r = ot(r), i = 0, n = ge(n = oe(n, h), h, !0)), n !== i && D(r, n), C(a, h, e, r);
}
}
}
function ls(t, e, r, s) {
t = t.s;
let n = A(t);
It(n), C(t, n, e, (s === "0" ? Number(r) === 0 : r === s) ? void 0 : r);
}
function ze(t, e, r, s) {
const n = A(t);
It(n), t = Le(t, n, e, 2), s = r(s, !!(4 & (e = N(t))) && !!(4096 & e)), t.push(s);
}
function g2(t) {
return t;
}
function Jr(t, e) {
return qs(t = t.s, A(t), Go) === e ? e : -1;
}
function qs(t, e, r) {
let s = 0;
for (let n = 0; n < r.length; n++) {
const i = r[n];
Rt(t, e, i) != null && (s !== 0 && (e = C(t, e, s)), s = i);
}
return s;
}
function Zs(t, e, r, s) {
let n = A(t);
It(n);
const i = Rt(t, n, r, s);
let o;
if (i != null && i.X === He) return (e = Sr(i)) !== i && C(t, n, r, e, s), e.s;
if (Array.isArray(i)) {
const a = N(i);
o = 2 & a ? Ji(i, a, !1) : i, o = ne(o, e);
} else o = ne(void 0, e);
return o !== i && C(t, n, r, o, s), o;
}
function no(t, e, r, s) {
t = t.s;
let n = A(t);
const i = Rt(t, n, r, s);
return (e = $s(i, e, !1, n)) !== i && e != null && C(t, n, r, e, s), e;
}
function k(t, e, r, s = !1) {
if ((e = no(t, e, r, s)) == null) return e;
t = t.s;
let n = A(t);
if (!(2 & n)) {
const i = Sr(e);
i !== e && C(t, n, r, e = i, s);
}
return e;
}
function io(t, e, r, s, n, i) {
var o = 2, a = !!(2 & e);
o = a ? 1 : o, n = !!n, i && (i = !a), a = eo(t, e, s);
var h = N(a);
const c = !!(4 & h);
if (!c) {
var u = a, w = e;
const y = !!(2 & (h = ro(h, e)));
y && (w = K(w, 2, !0));
let R = !y, _t = !0, Qt = 0, Hr = 0;
for (; Qt < u.length; Qt++) {
const $r = $s(u[Qt], r, !1, w);
if ($r instanceof r) {
if (!y) {
const Ln = !!(2 & N($r.s));
R && (R = !Ln), _t && (_t = Ln);
}
u[Hr++] = $r;
}
}
Hr < Qt && (u.length = Hr), h = K(h, 4, !0), h = K(h, 16, _t), h = K(h, 8, R), D(u, h), y && Object.freeze(u);
}
if (i && !(8 & h || !a.length && (o === 1 || o === 4 &&