@konnectio/core
Version:
Konnectio Core Frontend Integration.
1,250 lines • 402 kB
JavaScript
import { n as e } from "./chunk-BPfpcrXh.js";
import { $ as t, At as n, Ct as r, D as i, Dt as a, E as o, Et as s, F as c, H as l, I as u, L as d, M as f, O as p, Ot as m, P as h, St as g, T as _, Tt as v, V as y, Y as b, _ as x, _t as S, at as C, bt as w, d as T, dt as E, et as D, ft as O, g as k, h as A, ht as j, i as ee, j as M, k as N, kt as te, l as ne, lt as P, mt as re, n as F, nt as ie, o as ae, q as oe, rt as se, t as ce, u as le, vt as ue, wt as de, x as fe, xt as I, y as pe, yt as me } from "./mitt-Dp_pykgV.js";
//#region node_modules/@vueuse/shared/dist/index.js
function L(e, t) {
return j() ? (S(e, t), !0) : !1;
}
var he = typeof window < "u" && typeof document < "u";
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
var ge = (e) => e != null, _e = Object.prototype.toString, ve = (e) => _e.call(e) === "[object Object]", ye = () => {}, be = /* @__PURE__ */ xe();
function xe() {
var e, t;
return he && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
}
function Se(...e) {
if (e.length !== 1) return de(...e);
let t = e[0];
return typeof t == "function" ? me(re(() => ({
get: t,
set: ye
}))) : w(t);
}
function Ce(e, t) {
function n(...n) {
return new Promise((r, i) => {
Promise.resolve(e(() => t.apply(this, n), {
fn: t,
thisArg: this,
args: n
})).then(r).catch(i);
});
}
return n;
}
var we = (e) => e();
function Te(e = we, t = {}) {
let { initialState: n = "active" } = t, r = Se(n === "active");
function i() {
r.value = !1;
}
function a() {
r.value = !0;
}
return {
isActive: I(r),
pause: i,
resume: a,
eventFilter: (...t) => {
r.value && e(...t);
}
};
}
function Ee(e) {
let t;
function n() {
return t ||= e(), t;
}
return n.reset = async () => {
let e = t;
t = void 0, e && await e;
}, n;
}
function De(e) {
return Array.isArray(e) ? e : [e];
}
function Oe(e) {
return e || c();
}
function ke(e, t, n = {}) {
let { eventFilter: r = we, ...i } = n;
return P(e, Ce(r, t), i);
}
function Ae(e, t, n = {}) {
let { eventFilter: r, initialState: i = "active", ...a } = n, { eventFilter: o, pause: s, resume: c, isActive: l } = Te(r, { initialState: i });
return {
stop: ke(e, t, {
...a,
eventFilter: o
}),
pause: s,
resume: c,
isActive: l
};
}
function je(e, t = !0, n) {
Oe(n) ? oe(e, n) : t ? e() : l(e);
}
function Me(e, t, n = {}) {
let { immediate: r = !0, immediateCallback: i = !1 } = n, a = g(!1), o;
function s() {
o &&= (clearTimeout(o), void 0);
}
function c() {
a.value = !1, s();
}
function l(...n) {
i && e(), s(), a.value = !0, o = setTimeout(() => {
a.value = !1, o = void 0, e(...n);
}, v(t));
}
return r && (a.value = !0, he && l()), L(c), {
isPending: I(a),
start: l,
stop: c
};
}
function Ne(e, t, n) {
return P(e, t, {
...n,
immediate: !0
});
}
//#endregion
//#region node_modules/@vueuse/core/dist/index.js
var Pe = he ? window : void 0;
he && window.document;
var Fe = he ? window.navigator : void 0;
he && window.location;
function R(e) {
let t = v(e);
return t?.$el ?? t;
}
function Ie(...e) {
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = _(() => {
let t = De(v(e[0])).filter((e) => e != null);
return t.every((e) => typeof e != "string") ? t : void 0;
});
return Ne(() => [
n.value?.map((e) => R(e)) ?? [Pe].filter((e) => e != null),
De(v(n.value ? e[1] : e[0])),
De(s(n.value ? e[2] : e[1])),
v(n.value ? e[3] : e[2])
], ([e, n, r, i], a, o) => {
if (!e?.length || !n?.length || !r?.length) return;
let s = ve(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
o(() => {
c.forEach((e) => e());
});
}, { flush: "post" });
}
var Le = !1;
function Re(e, t, n = {}) {
let { window: r = Pe, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
if (!r) return s ? {
stop: ye,
cancel: ye,
trigger: ye
} : ye;
if (be && !Le) {
Le = !0;
let e = { passive: !0 };
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", ye, e)), r.document.documentElement.addEventListener("click", ye, e);
}
let c = !0, l = (e) => v(i).some((t) => {
if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
{
let n = R(t);
return n && (e.target === n || e.composedPath().includes(n));
}
});
function u(e) {
let t = v(e);
return t && t.$.subTree.shapeFlag === 16;
}
function d(e, t) {
let n = v(e), r = n.$.subTree && n.$.subTree.children;
return r == null || !Array.isArray(r) ? !1 : r.some((e) => e.el === t.target || t.composedPath().includes(e.el));
}
let f = (n) => {
let r = R(e);
if (n.target != null && !(!(r instanceof Element) && u(e) && d(e, n)) && !(!r || r === n.target || n.composedPath().includes(r))) {
if ("detail" in n && n.detail === 0 && (c = !l(n)), !c) {
c = !0;
return;
}
t(n);
}
}, p = !1, m = [
Ie(r, "click", (e) => {
p || (p = !0, setTimeout(() => {
p = !1;
}, 0), f(e));
}, {
passive: !0,
capture: a
}),
Ie(r, "pointerdown", (t) => {
let n = R(e);
c = !l(t) && !!(n && !t.composedPath().includes(n));
}, { passive: !0 }),
o && Ie(r, "blur", (n) => {
setTimeout(() => {
let i = R(e), a = r.document.activeElement;
for (; a?.shadowRoot;) a = a.shadowRoot.activeElement;
a?.tagName === "IFRAME" && !i?.contains(r.document.activeElement) && t(n);
}, 0);
}, { passive: !0 })
].filter(Boolean), h = () => m.forEach((e) => e());
return s ? {
stop: h,
cancel: () => {
c = !1;
},
trigger: (e) => {
c = !0, f(e), c = !1;
}
} : h;
}
function ze() {
let e = g(!1), t = c();
return t && oe(() => {
e.value = !0;
}, t), e;
}
/* @__NO_SIDE_EFFECTS__ */
function Be(e) {
let t = ze();
return _(() => (t.value, !!e()));
}
function Ve(e, t = {}) {
let { controls: n = !1, navigator: i = Fe } = t, a = /* @__PURE__ */ Be(() => i && "permissions" in i), o = g(), s = typeof e == "string" ? { name: e } : e, c = g(), l = () => {
c.value = o.value?.state ?? "prompt";
};
Ie(o, "change", l, { passive: !0 });
let u = Ee(async () => {
if (a.value) {
if (!o.value) try {
o.value = await i.permissions.query(s);
} catch {
o.value = void 0;
} finally {
l();
}
if (n) return r(o.value);
}
});
return u(), n ? {
state: c,
isSupported: a,
query: u
} : c;
}
function He(e = {}) {
let { navigator: t = Fe, read: n = !1, source: r, copiedDuring: i = 1500, legacy: a = !1 } = e, o = /* @__PURE__ */ Be(() => t && "clipboard" in t), s = Ve("clipboard-read"), c = Ve("clipboard-write"), l = _(() => o.value || a), u = g(""), d = g(!1), f = g(!1), p = Me(() => d.value = !1, i, { immediate: !1 }), m = 0;
async function h() {
let e = !(o.value && C(s.value));
if (!e) try {
u.value = await t.clipboard.readText();
} catch {
e = !0;
}
e && (u.value = S());
}
l.value && n && Ie(["copy", "cut"], h, { passive: !0 });
async function y(e) {
let n = e ?? v(r);
if (l.value && n != null) {
f.value = !0;
let e = !(o.value && C(c.value));
if (!e) try {
let e = b(n);
await t.clipboard.write([e]);
} catch {
e = !0;
}
if (e) if (typeof n == "string") u.value = n, x(n);
else {
let e = ++m, t = await n();
t != null && e === m && (u.value = t, x(t));
}
d.value = !0, p.start(), f.value = !1;
}
}
function b(e) {
return typeof e == "string" ? (u.value = e, new ClipboardItem({ "text/plain": e })) : new ClipboardItem({ "text/plain": e().then((e = "") => (u.value = e, new Blob([e], { type: "text/plain" }))) });
}
function x(e) {
let t = document.createElement("textarea");
t.value = e, t.style.position = "absolute", t.style.opacity = "0", t.setAttribute("readonly", ""), document.body.appendChild(t), t.select(), document.execCommand("copy"), t.remove();
}
function S() {
var e, t;
return ((e = document) == null || (t = e.getSelection) == null || (t = t.call(e)) == null ? void 0 : t.toString()) ?? "";
}
function C(e) {
return e === "granted" || e === "prompt";
}
return {
copyPending: I(f),
isSupported: l,
text: I(u),
copied: I(d),
copy: y
};
}
var Ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, We = "__vueuse_ssr_handlers__", Ge = /* @__PURE__ */ Ke();
function Ke() {
return We in Ue || (Ue[We] = Ue[We] || {}), Ue[We];
}
function qe(e, t) {
return Ge[e] || t;
}
function Je(e) {
return e == null ? "any" : e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof Date ? "date" : typeof e == "boolean" ? "boolean" : typeof e == "string" ? "string" : typeof e == "object" ? "object" : Number.isNaN(e) ? "any" : "number";
}
var z = {
boolean: {
read: (e) => e === "true",
write: (e) => String(e)
},
object: {
read: (e) => JSON.parse(e),
write: (e) => JSON.stringify(e)
},
number: {
read: (e) => Number.parseFloat(e),
write: (e) => String(e)
},
any: {
read: (e) => e,
write: (e) => String(e)
},
string: {
read: (e) => e,
write: (e) => String(e)
},
map: {
read: (e) => new Map(JSON.parse(e)),
write: (e) => JSON.stringify(Array.from(e.entries()))
},
set: {
read: (e) => new Set(JSON.parse(e)),
write: (e) => JSON.stringify(Array.from(e))
},
date: {
read: (e) => new Date(e),
write: (e) => e.toISOString()
}
}, Ye = "vueuse-storage";
function B(e, t, n, r = {}) {
let { flush: i = "pre", deep: a = !0, listenToStorageChanges: o = !0, writeDefaults: s = !0, mergeDefaults: c = !1, shallow: u, window: d = Pe, eventFilter: f, onError: p = (e) => {
console.error(e);
}, initOnMounted: m } = r, h = (u ? g : w)(typeof t == "function" ? t() : t), y = _(() => v(e));
if (!n) try {
n = qe("getDefaultStorage", () => Pe?.localStorage)();
} catch (e) {
p(e);
}
if (!n) return h;
let b = v(t), x = Je(b), S = r.serializer ?? z[x], { pause: C, resume: T } = Ae(h, (e) => O(e), {
flush: i,
deep: a,
eventFilter: f
});
P(y, () => A(), { flush: i });
let E = !1;
d && o && (n instanceof Storage ? Ie(d, "storage", (e) => {
m && !E || A(e);
}, { passive: !0 }) : Ie(d, Ye, (e) => {
m && !E || j(e);
})), m ? je(() => {
E = !0, A();
}) : A();
function D(e, t) {
if (d) {
let r = {
key: y.value,
oldValue: e,
newValue: t,
storageArea: n
};
d.dispatchEvent(n instanceof Storage ? new StorageEvent("storage", r) : new CustomEvent(Ye, { detail: r }));
}
}
function O(e) {
try {
let t = n.getItem(y.value);
if (e == null) D(t, null), n.removeItem(y.value);
else {
let r = S.write(e);
t !== r && (n.setItem(y.value, r), D(t, r));
}
} catch (e) {
p(e);
}
}
function k(e) {
let t = e ? e.newValue : n.getItem(y.value);
if (t == null) return s && b != null && n.setItem(y.value, S.write(b)), b;
if (!e && c) {
let e = S.read(t);
return typeof c == "function" ? c(e, b) : x === "object" && !Array.isArray(e) ? {
...b,
...e
} : e;
} else if (typeof t != "string") return t;
else return S.read(t);
}
function A(e) {
if (!(e && e.storageArea !== n)) {
if (e && e.key == null) {
h.value = b;
return;
}
if (!(e && e.key !== y.value)) {
C();
try {
let t = S.write(h.value);
(e === void 0 || e?.newValue !== t) && (h.value = k(e));
} catch (e) {
p(e);
} finally {
e ? l(T) : T();
}
}
}
}
function j(e) {
A(e.detail);
}
return h;
}
function Xe(e, t, n = {}) {
let { root: r, rootMargin: i, threshold: a = 0, window: o = Pe, immediate: s = !0 } = n, c = /* @__PURE__ */ Be(() => o && "IntersectionObserver" in o), l = _(() => De(v(e)).map(R).filter(ge)), u = ye, d = g(s), f = c.value ? P(() => [
l.value,
R(r),
v(i),
d.value
], ([e, n, r]) => {
if (u(), !d.value || !e.length) return;
let i = new IntersectionObserver(t, {
root: R(n),
rootMargin: r,
threshold: a
});
e.forEach((e) => e && i.observe(e)), u = () => {
i.disconnect(), u = ye;
};
}, {
immediate: s,
flush: "post"
}) : ye, p = () => {
u(), f(), d.value = !1;
};
return L(p), {
isSupported: c,
isActive: d,
pause() {
u(), d.value = !1;
},
resume() {
d.value = !0;
},
stop: p
};
}
function Ze(e, t = {}) {
let { threshold: n = 50, onSwipe: r, onSwipeEnd: i, onSwipeStart: a, passive: o = !0 } = t, s = ue({
x: 0,
y: 0
}), c = ue({
x: 0,
y: 0
}), l = _(() => s.x - c.x), u = _(() => s.y - c.y), { max: d, abs: f } = Math, p = _(() => d(f(l.value), f(u.value)) >= n), m = g(!1), h = _(() => p.value ? f(l.value) > f(u.value) ? l.value > 0 ? "left" : "right" : u.value > 0 ? "up" : "down" : "none"), v = (e) => [e.touches[0].clientX, e.touches[0].clientY], y = (e, t) => {
s.x = e, s.y = t;
}, b = (e, t) => {
c.x = e, c.y = t;
}, x = {
passive: o,
capture: !o
}, S = [
Ie(e, "touchstart", (e) => {
if (e.touches.length !== 1) return;
let [t, n] = v(e);
y(t, n), b(t, n), a?.(e);
}, x),
Ie(e, "touchmove", (e) => {
if (e.touches.length !== 1) return;
let [t, n] = v(e);
b(t, n), x.capture && !x.passive && Math.abs(l.value) > Math.abs(u.value) && e.preventDefault(), !m.value && p.value && (m.value = !0), m.value && r?.(e);
}, x),
Ie(e, ["touchend", "touchcancel"], (e) => {
m.value && i?.(e, h.value), m.value = !1;
}, x)
];
return {
isSwiping: m,
direction: h,
coordsStart: s,
coordsEnd: c,
lengthX: l,
lengthY: u,
stop: () => S.forEach((e) => e())
};
}
function Qe(e = "history", t = {}) {
let { initialValue: n = {}, removeNullishValues: r = !0, removeFalsyValues: i = !1, write: a = !0, writeMode: o = "replace", window: s = Pe, stringify: c = (e) => e.toString() } = t;
if (!s) return ue(n);
let u = ue({});
function d() {
if (e === "history") return s.location.search || "";
if (e === "hash") {
let e = s.location.hash || "", t = e.indexOf("?");
return t > 0 ? e.slice(t) : "";
} else return (s.location.hash || "").replace(/^#/, "");
}
function f(t) {
let n = c(t);
if (e === "history") return `${n ? `?${n}` : ""}${s.location.hash || ""}`;
if (e === "hash-params") return `${s.location.search || ""}${n ? `#${n}` : ""}`;
let r = s.location.hash || "#", i = r.indexOf("?");
return i > 0 ? `${s.location.search || ""}${r.slice(0, i)}${n ? `?${n}` : ""}` : `${s.location.search || ""}${r}${n ? `?${n}` : ""}`;
}
function p() {
return new URLSearchParams(d());
}
function m(e) {
let t = new Set(Object.keys(u));
for (let n of e.keys()) {
let r = e.getAll(n);
u[n] = r.length > 1 ? r : e.get(n) || "", t.delete(n);
}
Array.from(t).forEach((e) => delete u[e]);
}
let { pause: h, resume: g } = Ae(u, () => {
let e = new URLSearchParams("");
Object.keys(u).forEach((t) => {
let n = u[t];
Array.isArray(n) ? n.forEach((n) => e.append(t, n)) : r && n == null || i && !n ? e.delete(t) : e.set(t, n);
}), _(e, !1);
}, { deep: !0 });
function _(e, t, n = !0) {
h(), t && m(e), o === "replace" ? s.history.replaceState(s.history.state, s.document.title, s.location.pathname + f(e)) : n && s.history.pushState(s.history.state, s.document.title, s.location.pathname + f(e)), l(() => g());
}
function v() {
a && _(p(), !0, !1);
}
let y = { passive: !0 };
Ie(s, "popstate", v, y), e !== "history" && Ie(s, "hashchange", v, y);
let b = p();
return b.keys().next().value ? m(b) : Object.assign(u, n), u;
}
//#endregion
//#region node_modules/linkifyjs/dist/linkify.mjs
var $e = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", et = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", tt = "numeric", nt = "ascii", rt = "alpha", it = "asciinumeric", at = "alphanumeric", ot = "domain", st = "emoji", ct = "scheme", lt = "slashscheme", ut = "whitespace";
function dt(e, t) {
return e in t || (t[e] = []), t[e];
}
function ft(e, t, n) {
t[tt] && (t[it] = !0, t[at] = !0), t[nt] && (t[it] = !0, t[rt] = !0), t[it] && (t[at] = !0), t[rt] && (t[at] = !0), t[at] && (t[ot] = !0), t[st] && (t[ot] = !0);
for (let r in t) {
let t = dt(r, n);
t.indexOf(e) < 0 && t.push(e);
}
}
function pt(e, t) {
let n = {};
for (let r in t) t[r].indexOf(e) >= 0 && (n[r] = !0);
return n;
}
function mt(e = null) {
this.j = {}, this.jr = [], this.jd = null, this.t = e;
}
mt.groups = {}, mt.prototype = {
accepts() {
return !!this.t;
},
go(e) {
let t = this, n = t.j[e];
if (n) return n;
for (let n = 0; n < t.jr.length; n++) {
let r = t.jr[n][0], i = t.jr[n][1];
if (i && r.test(e)) return i;
}
return t.jd;
},
has(e, t = !1) {
return t ? e in this.j : !!this.go(e);
},
ta(e, t, n, r) {
for (let i = 0; i < e.length; i++) this.tt(e[i], t, n, r);
},
tr(e, t, n, r) {
r ||= mt.groups;
let i;
return t && t.j ? i = t : (i = new mt(t), n && r && ft(t, n, r)), this.jr.push([e, i]), i;
},
ts(e, t, n, r) {
let i = this, a = e.length;
if (!a) return i;
for (let t = 0; t < a - 1; t++) i = i.tt(e[t]);
return i.tt(e[a - 1], t, n, r);
},
tt(e, t, n, r) {
r ||= mt.groups;
let i = this;
if (t && t.j) return i.j[e] = t, t;
let a = t, o, s = i.go(e);
return s ? (o = new mt(), Object.assign(o.j, s.j), o.jr.push.apply(o.jr, s.jr), o.jd = s.jd, o.t = s.t) : o = new mt(), a && (r && (o.t && typeof o.t == "string" ? ft(a, Object.assign(pt(o.t, r), n), r) : n && ft(a, n, r)), o.t = a), i.j[e] = o, o;
}
};
var V = (e, t, n, r, i) => e.ta(t, n, r, i), H = (e, t, n, r, i) => e.tr(t, n, r, i), ht = (e, t, n, r, i) => e.ts(t, n, r, i), U = (e, t, n, r, i) => e.tt(t, n, r, i), gt = "WORD", _t = "UWORD", vt = "ASCIINUMERICAL", yt = "ALPHANUMERICAL", bt = "LOCALHOST", xt = "TLD", St = "UTLD", Ct = "SCHEME", wt = "SLASH_SCHEME", Tt = "NUM", Et = "WS", Dt = "NL", Ot = "OPENBRACE", kt = "CLOSEBRACE", At = "OPENBRACKET", jt = "CLOSEBRACKET", Mt = "OPENPAREN", Nt = "CLOSEPAREN", Pt = "OPENANGLEBRACKET", Ft = "CLOSEANGLEBRACKET", It = "FULLWIDTHLEFTPAREN", Lt = "FULLWIDTHRIGHTPAREN", Rt = "LEFTCORNERBRACKET", zt = "RIGHTCORNERBRACKET", Bt = "LEFTWHITECORNERBRACKET", Vt = "RIGHTWHITECORNERBRACKET", Ht = "FULLWIDTHLESSTHAN", Ut = "FULLWIDTHGREATERTHAN", Wt = "AMPERSAND", Gt = "APOSTROPHE", Kt = "ASTERISK", qt = "AT", Jt = "BACKSLASH", Yt = "BACKTICK", Xt = "CARET", Zt = "COLON", Qt = "COMMA", $t = "DOLLAR", en = "DOT", tn = "EQUALS", nn = "EXCLAMATION", rn = "HYPHEN", an = "PERCENT", on = "PIPE", sn = "PLUS", cn = "POUND", ln = "QUERY", un = "QUOTE", dn = "FULLWIDTHMIDDLEDOT", fn = "SEMI", pn = "SLASH", mn = "TILDE", hn = "UNDERSCORE", gn = "EMOJI", _n = "SYM", vn = /* @__PURE__ */ Object.freeze({
__proto__: null,
ALPHANUMERICAL: yt,
AMPERSAND: Wt,
APOSTROPHE: Gt,
ASCIINUMERICAL: vt,
ASTERISK: Kt,
AT: qt,
BACKSLASH: Jt,
BACKTICK: Yt,
CARET: Xt,
CLOSEANGLEBRACKET: Ft,
CLOSEBRACE: kt,
CLOSEBRACKET: jt,
CLOSEPAREN: Nt,
COLON: Zt,
COMMA: Qt,
DOLLAR: $t,
DOT: en,
EMOJI: gn,
EQUALS: tn,
EXCLAMATION: nn,
FULLWIDTHGREATERTHAN: Ut,
FULLWIDTHLEFTPAREN: It,
FULLWIDTHLESSTHAN: Ht,
FULLWIDTHMIDDLEDOT: dn,
FULLWIDTHRIGHTPAREN: Lt,
HYPHEN: rn,
LEFTCORNERBRACKET: Rt,
LEFTWHITECORNERBRACKET: Bt,
LOCALHOST: bt,
NL: Dt,
NUM: Tt,
OPENANGLEBRACKET: Pt,
OPENBRACE: Ot,
OPENBRACKET: At,
OPENPAREN: Mt,
PERCENT: an,
PIPE: on,
PLUS: sn,
POUND: cn,
QUERY: ln,
QUOTE: un,
RIGHTCORNERBRACKET: zt,
RIGHTWHITECORNERBRACKET: Vt,
SCHEME: Ct,
SEMI: fn,
SLASH: pn,
SLASH_SCHEME: wt,
SYM: _n,
TILDE: mn,
TLD: xt,
UNDERSCORE: hn,
UTLD: St,
UWORD: _t,
WORD: gt,
WS: Et
}), yn = /[a-z]/, bn = /\p{L}/u, xn = /\p{Emoji}/u, Sn = /\d/, Cn = /\s/, wn = "\r", Tn = "\n", En = "️", Dn = "", On = "", kn = null, An = null;
function jn(e = []) {
let t = {};
mt.groups = t;
let n = new mt();
kn ??= Fn($e), An ??= Fn(et), U(n, "'", Gt), U(n, "{", Ot), U(n, "}", kt), U(n, "[", At), U(n, "]", jt), U(n, "(", Mt), U(n, ")", Nt), U(n, "<", Pt), U(n, ">", Ft), U(n, "(", It), U(n, ")", Lt), U(n, "「", Rt), U(n, "」", zt), U(n, "『", Bt), U(n, "』", Vt), U(n, "<", Ht), U(n, ">", Ut), U(n, "&", Wt), U(n, "*", Kt), U(n, "@", qt), U(n, "`", Yt), U(n, "^", Xt), U(n, ":", Zt), U(n, ",", Qt), U(n, "$", $t), U(n, ".", en), U(n, "=", tn), U(n, "!", nn), U(n, "-", rn), U(n, "%", an), U(n, "|", on), U(n, "+", sn), U(n, "#", cn), U(n, "?", ln), U(n, "\"", un), U(n, "/", pn), U(n, ";", fn), U(n, "~", mn), U(n, "_", hn), U(n, "\\", Jt), U(n, "・", dn);
let r = H(n, Sn, Tt, { [tt]: !0 });
H(r, Sn, r);
let i = H(r, yn, vt, { [it]: !0 }), a = H(r, bn, yt, { [at]: !0 }), o = H(n, yn, gt, { [nt]: !0 });
H(o, Sn, i), H(o, yn, o), H(i, Sn, i), H(i, yn, i);
let s = H(n, bn, _t, { [rt]: !0 });
H(s, yn), H(s, Sn, a), H(s, bn, s), H(a, Sn, a), H(a, yn), H(a, bn, a);
let c = U(n, Tn, Dt, { [ut]: !0 }), l = U(n, wn, Et, { [ut]: !0 }), u = H(n, Cn, Et, { [ut]: !0 });
U(n, On, u), U(l, Tn, c), U(l, On, u), H(l, Cn, u), U(u, wn), U(u, Tn), H(u, Cn, u), U(u, On, u);
let d = H(n, xn, gn, { [st]: !0 });
U(d, "#"), H(d, xn, d), U(d, En, d);
let f = U(d, Dn);
U(f, "#"), H(f, xn, d);
let p = [[yn, o], [Sn, i]], m = [
[yn, null],
[bn, s],
[Sn, a]
];
for (let e = 0; e < kn.length; e++) Pn(n, kn[e], xt, gt, p);
for (let e = 0; e < An.length; e++) Pn(n, An[e], St, _t, m);
ft(xt, {
tld: !0,
ascii: !0
}, t), ft(St, {
utld: !0,
alpha: !0
}, t), Pn(n, "file", Ct, gt, p), Pn(n, "mailto", Ct, gt, p), Pn(n, "http", wt, gt, p), Pn(n, "https", wt, gt, p), Pn(n, "ftp", wt, gt, p), Pn(n, "ftps", wt, gt, p), ft(Ct, {
scheme: !0,
ascii: !0
}, t), ft(wt, {
slashscheme: !0,
ascii: !0
}, t), e = e.sort((e, t) => e[0] > t[0] ? 1 : -1);
for (let t = 0; t < e.length; t++) {
let r = e[t][0], i = e[t][1] ? { [ct]: !0 } : { [lt]: !0 };
r.indexOf("-") >= 0 ? i[ot] = !0 : yn.test(r) ? Sn.test(r) ? i[it] = !0 : i[nt] = !0 : i[tt] = !0, ht(n, r, r, i);
}
return ht(n, "localhost", bt, { ascii: !0 }), n.jd = new mt(_n), {
start: n,
tokens: Object.assign({ groups: t }, vn)
};
}
function Mn(e, t) {
let n = Nn(t.replace(/[A-Z]/g, (e) => e.toLowerCase())), r = n.length, i = [], a = 0, o = 0;
for (; o < r;) {
let s = e, c = null, l = 0, u = null, d = -1, f = -1;
for (; o < r && (c = s.go(n[o]));) s = c, s.accepts() ? (d = 0, f = 0, u = s) : d >= 0 && (d += n[o].length, f++), l += n[o].length, a += n[o].length, o++;
a -= d, o -= f, l -= d, i.push({
t: u.t,
v: t.slice(a - l, a),
s: a - l,
e: a
});
}
return i;
}
function Nn(e) {
let t = [], n = e.length, r = 0;
for (; r < n;) {
let i = e.charCodeAt(r), a, o = i < 55296 || i > 56319 || r + 1 === n || (a = e.charCodeAt(r + 1)) < 56320 || a > 57343 ? e[r] : e.slice(r, r + 2);
t.push(o), r += o.length;
}
return t;
}
function Pn(e, t, n, r, i) {
let a, o = t.length;
for (let n = 0; n < o - 1; n++) {
let o = t[n];
e.j[o] ? a = e.j[o] : (a = new mt(r), a.jr = i.slice(), e.j[o] = a), e = a;
}
return a = new mt(n), a.jr = i.slice(), e.j[t[o - 1]] = a, a;
}
function Fn(e) {
let t = [], n = [], r = 0;
for (; r < e.length;) {
let i = 0;
for (; "0123456789".indexOf(e[r + i]) >= 0;) i++;
if (i > 0) {
t.push(n.join(""));
for (let t = parseInt(e.substring(r, r + i), 10); t > 0; t--) n.pop();
r += i;
} else n.push(e[r]), r++;
}
return t;
}
var In = {
defaultProtocol: "http",
events: null,
format: Rn,
formatHref: Rn,
nl2br: !1,
tagName: "a",
target: null,
rel: null,
validate: !0,
truncate: Infinity,
className: null,
attributes: null,
ignoreTags: [],
render: null
};
function Ln(e, t = null) {
let n = Object.assign({}, In);
e && (n = Object.assign(n, e instanceof Ln ? e.o : e));
let r = n.ignoreTags, i = [];
for (let e = 0; e < r.length; e++) i.push(r[e].toUpperCase());
this.o = n, t && (this.defaultRender = t), this.ignoreTags = i;
}
Ln.prototype = {
o: In,
ignoreTags: [],
defaultRender(e) {
return e;
},
check(e) {
return this.get("validate", e.toString(), e);
},
get(e, t, n) {
let r = t != null, i = this.o[e];
return i && (typeof i == "object" ? (i = n.t in i ? i[n.t] : In[e], typeof i == "function" && r && (i = i(t, n))) : typeof i == "function" && r && (i = i(t, n.t, n)), i);
},
getObj(e, t, n) {
let r = this.o[e];
return typeof r == "function" && t != null && (r = r(t, n.t, n)), r;
},
render(e) {
let t = e.render(this);
return (this.get("render", null, e) || this.defaultRender)(t, e.t, e);
}
};
function Rn(e) {
return e;
}
function zn(e, t) {
this.t = "token", this.v = e, this.tk = t;
}
zn.prototype = {
isLink: !1,
toString() {
return this.v;
},
toHref(e) {
return this.toString();
},
toFormattedString(e) {
let t = this.toString(), n = e.get("truncate", t, this), r = e.get("format", t, this);
return n && r.length > n ? r.substring(0, n) + "…" : r;
},
toFormattedHref(e) {
return e.get("formatHref", this.toHref(e.get("defaultProtocol")), this);
},
startIndex() {
return this.tk[0].s;
},
endIndex() {
return this.tk[this.tk.length - 1].e;
},
toObject(e = In.defaultProtocol) {
return {
type: this.t,
value: this.toString(),
isLink: this.isLink,
href: this.toHref(e),
start: this.startIndex(),
end: this.endIndex()
};
},
toFormattedObject(e) {
return {
type: this.t,
value: this.toFormattedString(e),
isLink: this.isLink,
href: this.toFormattedHref(e),
start: this.startIndex(),
end: this.endIndex()
};
},
validate(e) {
return e.get("validate", this.toString(), this);
},
render(e) {
let t = this, n = this.toHref(e.get("defaultProtocol")), r = e.get("formatHref", n, this), i = e.get("tagName", n, t), a = this.toFormattedString(e), o = {}, s = e.get("className", n, t), c = e.get("target", n, t), l = e.get("rel", n, t), u = e.getObj("attributes", n, t), d = e.getObj("events", n, t);
return o.href = r, s && (o.class = s), c && (o.target = c), l && (o.rel = l), u && Object.assign(o, u), {
tagName: i,
attributes: o,
content: a,
eventListeners: d
};
}
};
function Bn(e, t) {
class n extends zn {
constructor(t, n) {
super(t, n), this.t = e;
}
}
for (let e in t) n.prototype[e] = t[e];
return n.t = e, n;
}
var Vn = Bn("email", {
isLink: !0,
toHref() {
return "mailto:" + this.toString();
}
}), Hn = Bn("text"), Un = Bn("nl"), Wn = Bn("url", {
isLink: !0,
toHref(e = In.defaultProtocol) {
return this.hasProtocol() ? this.v : `${e}://${this.v}`;
},
hasProtocol() {
let e = this.tk;
return e.length >= 2 && e[0].t !== bt && e[1].t === Zt;
}
}), Gn = (e) => new mt(e);
function Kn({ groups: e }) {
let t = e.domain.concat([
Wt,
Kt,
qt,
Jt,
Yt,
Xt,
$t,
tn,
rn,
Tt,
an,
on,
sn,
cn,
pn,
_n,
mn,
hn
]), n = [
Gt,
Zt,
Qt,
en,
nn,
an,
ln,
un,
fn,
Pt,
Ft,
Ot,
kt,
jt,
At,
Mt,
Nt,
It,
Lt,
Rt,
zt,
Bt,
Vt,
Ht,
Ut
], r = [
Wt,
Gt,
Kt,
Jt,
Yt,
Xt,
$t,
tn,
rn,
Ot,
kt,
an,
on,
sn,
cn,
ln,
pn,
_n,
mn,
hn
], i = Gn(), a = U(i, mn);
V(a, r, a), V(a, e.domain, a);
let o = Gn(), s = Gn(), c = Gn();
V(i, e.domain, o), V(i, e.scheme, s), V(i, e.slashscheme, c), V(o, r, a), V(o, e.domain, o);
let l = U(o, qt);
U(a, qt, l), U(s, qt, l), U(c, qt, l);
let u = U(a, en);
V(u, r, a), V(u, e.domain, a);
let d = Gn();
V(l, e.domain, d), V(d, e.domain, d);
let f = U(d, en);
V(f, e.domain, d);
let p = Gn(Vn);
V(f, e.tld, p), V(f, e.utld, p), U(l, bt, p);
let m = U(d, rn);
U(m, rn, m), V(m, e.domain, d), V(p, e.domain, d), U(p, en, f), U(p, rn, m);
let h = U(o, rn), g = U(o, en);
U(h, rn, h), V(h, e.domain, o), V(g, r, a), V(g, e.domain, o);
let _ = Gn(Wn);
V(g, e.tld, _), V(g, e.utld, _), V(_, e.domain, o), V(_, r, a), U(_, en, g), U(_, rn, h), U(_, qt, l);
let v = U(_, Zt), y = Gn(Wn);
V(v, e.numeric, y);
let b = Gn(Wn), x = Gn();
V(b, t, b), V(b, n, x), V(x, t, b), V(x, n, x), U(_, pn, b), U(y, pn, b);
let S = U(s, Zt), C = U(U(U(c, Zt), pn), pn);
V(s, e.domain, o), U(s, en, g), U(s, rn, h), V(c, e.domain, o), U(c, en, g), U(c, rn, h), V(S, e.domain, b), U(S, pn, b), U(S, ln, b), V(C, e.domain, b), V(C, t, b), U(C, pn, b);
let w = [
[Ot, kt],
[At, jt],
[Mt, Nt],
[Pt, Ft],
[It, Lt],
[Rt, zt],
[Bt, Vt],
[Ht, Ut]
];
for (let e = 0; e < w.length; e++) {
let [r, i] = w[e], a = U(b, r);
U(x, r, a);
let o = Gn(Wn);
V(a, t, o);
let s = Gn();
V(a, n, s), U(a, i, b), V(o, t, o), V(o, n, s), V(s, t, o), V(s, n, s), U(o, i, b), U(s, i, b);
}
return U(i, bt, _), U(i, Dt, Un), {
start: i,
tokens: vn
};
}
function qn(e, t, n) {
let r = n.length, i = 0, a = [], o = [];
for (; i < r;) {
let s = e, c = null, l = null, u = 0, d = null, f = -1;
for (; i < r && !(c = s.go(n[i].t));) o.push(n[i++]);
for (; i < r && (l = c || s.go(n[i].t));) c = null, s = l, s.accepts() ? (f = 0, d = s) : f >= 0 && f++, i++, u++;
if (f < 0) i -= u, i < r && (o.push(n[i]), i++);
else {
o.length > 0 && (a.push(Jn(Hn, t, o)), o = []), i -= f, u -= f;
let e = d.t, r = n.slice(i - u, i);
a.push(Jn(e, t, r));
}
}
return o.length > 0 && a.push(Jn(Hn, t, o)), a;
}
function Jn(e, t, n) {
let r = n[0].s, i = n[n.length - 1].e;
return new e(t.slice(r, i), n);
}
var Yn = {
scanner: null,
parser: null,
tokenQueue: [],
pluginQueue: [],
customSchemes: [],
initialized: !1
};
function Xn() {
Yn.scanner = jn(Yn.customSchemes);
for (let e = 0; e < Yn.tokenQueue.length; e++) Yn.tokenQueue[e][1]({ scanner: Yn.scanner });
Yn.parser = Kn(Yn.scanner.tokens);
for (let e = 0; e < Yn.pluginQueue.length; e++) Yn.pluginQueue[e][1]({
scanner: Yn.scanner,
parser: Yn.parser
});
return Yn.initialized = !0, Yn;
}
function Zn(e) {
return Yn.initialized || Xn(), qn(Yn.parser.start, e, Mn(Yn.scanner.start, e));
}
Zn.scan = Mn;
//#endregion
//#region node_modules/linkify-html/dist/linkify-html.mjs
var Qn = {
amp: "&",
gt: ">",
lt: "<",
nbsp: "\xA0",
quot: "\""
}, $n = /^#[xX]([A-Fa-f0-9]+)$/, er = /^#([0-9]+)$/, tr = /^([A-Za-z0-9]+)$/, nr = function() {
function e(e) {
this.named = e;
}
return e.prototype.parse = function(e) {
if (e) {
var t = e.match($n);
if (t) return String.fromCharCode(parseInt(t[1], 16));
if (t = e.match(er), t) return String.fromCharCode(parseInt(t[1], 10));
if (t = e.match(tr), t) return this.named[t[1]] || "&" + t[1] + ";";
}
}, e;
}(), rr = /[\t\n\f ]/, ir = /[A-Za-z]/, ar = /\r\n?/g;
function or(e) {
return rr.test(e);
}
function sr(e) {
return ir.test(e);
}
function cr(e) {
return e.replace(ar, "\n");
}
var lr = function() {
function e(e, t, n) {
n === void 0 && (n = "precompile"), this.delegate = e, this.entityParser = t, this.mode = n, this.state = "beforeData", this.line = -1, this.column = -1, this.input = "", this.index = -1, this.tagNameBuffer = "", this.states = {
beforeData: function() {
var e = this.peek();
if (e === "<" && !this.isIgnoredEndTag()) this.transitionTo("tagOpen"), this.markTagStart(), this.consume();
else {
if (this.mode === "precompile" && e === "\n") {
var t = this.tagNameBuffer.toLowerCase();
(t === "pre" || t === "textarea") && this.consume();
}
this.transitionTo("data"), this.delegate.beginData();
}
},
data: function() {
var e = this.peek(), t = this.tagNameBuffer;
e === "<" && !this.isIgnoredEndTag() ? (this.delegate.finishData(), this.transitionTo("tagOpen"), this.markTagStart(), this.consume()) : e === "&" && t !== "script" && t !== "style" ? (this.consume(), this.delegate.appendToData(this.consumeCharRef() || "&")) : (this.consume(), this.delegate.appendToData(e));
},
tagOpen: function() {
var e = this.consume();
e === "!" ? this.transitionTo("markupDeclarationOpen") : e === "/" ? this.transitionTo("endTagOpen") : (e === "@" || e === ":" || sr(e)) && (this.transitionTo("tagName"), this.tagNameBuffer = "", this.delegate.beginStartTag(), this.appendToTagName(e));
},
markupDeclarationOpen: function() {
var e = this.consume();
e === "-" && this.peek() === "-" ? (this.consume(), this.transitionTo("commentStart"), this.delegate.beginComment()) : e.toUpperCase() + this.input.substring(this.index, this.index + 6).toUpperCase() === "DOCTYPE" && (this.consume(), this.consume(), this.consume(), this.consume(), this.consume(), this.consume(), this.transitionTo("doctype"), this.delegate.beginDoctype && this.delegate.beginDoctype());
},
doctype: function() {
or(this.consume()) && this.transitionTo("beforeDoctypeName");
},
beforeDoctypeName: function() {
var e = this.consume();
or(e) || (this.transitionTo("doctypeName"), this.delegate.appendToDoctypeName && this.delegate.appendToDoctypeName(e.toLowerCase()));
},
doctypeName: function() {
var e = this.consume();
or(e) ? this.transitionTo("afterDoctypeName") : e === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypeName && this.delegate.appendToDoctypeName(e.toLowerCase());
},
afterDoctypeName: function() {
var e = this.consume();
if (!or(e)) if (e === ">") this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData");
else {
var t = e.toUpperCase() + this.input.substring(this.index, this.index + 5).toUpperCase(), n = t.toUpperCase() === "PUBLIC", r = t.toUpperCase() === "SYSTEM";
(n || r) && (this.consume(), this.consume(), this.consume(), this.consume(), this.consume(), this.consume()), n ? this.transitionTo("afterDoctypePublicKeyword") : r && this.transitionTo("afterDoctypeSystemKeyword");
}
},
afterDoctypePublicKeyword: function() {
var e = this.peek();
or(e) ? (this.transitionTo("beforeDoctypePublicIdentifier"), this.consume()) : e === "\"" ? (this.transitionTo("doctypePublicIdentifierDoubleQuoted"), this.consume()) : e === "'" ? (this.transitionTo("doctypePublicIdentifierSingleQuoted"), this.consume()) : e === ">" && (this.consume(), this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData"));
},
doctypePublicIdentifierDoubleQuoted: function() {
var e = this.consume();
e === "\"" ? this.transitionTo("afterDoctypePublicIdentifier") : e === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypePublicIdentifier && this.delegate.appendToDoctypePublicIdentifier(e);
},
doctypePublicIdentifierSingleQuoted: function() {
var e = this.consume();
e === "'" ? this.transitionTo("afterDoctypePublicIdentifier") : e === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypePublicIdentifier && this.delegate.appendToDoctypePublicIdentifier(e);
},
afterDoctypePublicIdentifier: function() {
var e = this.consume();
or(e) ? this.transitionTo("betweenDoctypePublicAndSystemIdentifiers") : e === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : e === "\"" ? this.transitionTo("doctypeSystemIdentifierDoubleQuoted") : e === "'" && this.transitionTo("doctypeSystemIdentifierSingleQuoted");
},
betweenDoctypePublicAndSystemIdentifiers: function() {
var e = this.consume();
or(e) || (e === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : e === "\"" ? this.transitionTo("doctypeSystemIdentifierDoubleQuoted") : e === "'" && this.transitionTo("doctypeSystemIdentifierSingleQuoted"));
},
doctypeSystemIdentifierDoubleQuoted: function() {
var e = this.consume();
e === "\"" ? this.transitionTo("afterDoctypeSystemIdentifier") : e === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypeSystemIdentifier && this.delegate.appendToDoctypeSystemIdentifier(e);
},
doctypeSystemIdentifierSingleQuoted: function() {
var e = this.consume();
e === "'" ? this.transitionTo("afterDoctypeSystemIdentifier") : e === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypeSystemIdentifier && this.delegate.appendToDoctypeSystemIdentifier(e);
},
afterDoctypeSystemIdentifier: function() {
var e = this.consume();
or(e) || e === ">" && (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData"));
},
commentStart: function() {
var e = this.consume();
e === "-" && this.peek() === "-" ? this.transitionTo("commentStartDash") : e === ">" ? (this.delegate.finishComment(), this.transitionTo("beforeData")) : (this.delegate.appendToCommentData(e), this.transitionTo("comment"));
},
commentStartDash: function() {
var e = this.consume();
e === "-" ? this.transitionTo("commentEnd") : e === ">" ? (this.delegate.finishComment(), this.transitionTo("beforeData")) : (this.delegate.appendToCommentData("-"), this.transitionTo("comment"));
},
comment: function() {
var e = this.consume();
e === "-" ? this.transitionTo("commentEndDash") : this.delegate.appendToCommentData(e);
},
commentEndDash: function() {
var e = this.consume();
e === "-" && this.peek() === "-" ? this.delegate.appendToCommentData(e) : e === "-" ? this.transitionTo("commentEnd") : (this.delegate.appendToCommentData("-" + e), this.transitionTo("comment"));
},
commentEnd: function() {
var e = this.consume();
e === ">" ? (this.delegate.finishComment(), this.transitionTo("beforeData")) : (this.delegate.appendToCommentData("--" + e), this.transitionTo("comment"));
},
tagName: function() {
var e = this.consume();
or(e) ? this.transitionTo("beforeAttributeName") : e === "/" ? this.transitionTo("selfClosingStartTag") : e === ">" ? (this.delegate.finishTag(), this.transitionTo("beforeData")) : this.appendToTagName(e);
},
endTagName: function() {
var e = this.consume();
or(e) ? (this.transitionTo("beforeAttributeName"), this.tagNameBuffer = "") : e === "/" ? (this.transitionTo("selfClosingStartTag"), this.tagNameBuffer = "") : e === ">" ? (this.delegate.finishTag(), this.transitionTo("beforeData"), this.tagNameBuffer = "") : this.appendToTagName(e);
},
beforeAttributeName: function() {
var e = this.peek();
if (or(e)) {
this.consume();
return;
} else e === "/" ? (this.transitionTo("selfClosingStartTag"), this.consume()) : e === ">" ? (this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : e === "=" ? (this.delegate.reportSyntaxError("attribute name cannot start with equals sign"), this.transitionTo("attributeName"), this.delegate.beginAttribute(), this.consume(), this.delegate.appendToAttributeName(e)) : (this.transitionTo("attributeName"), this.delegate.beginAttribute());
},
attributeName: function() {
var e = this.peek();
or(e) ? (this.transitionTo("afterAttributeName"), this.consume()) : e === "/" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("selfClosingStartTag")) : e === "=" ? (this.transitionTo("beforeAttributeValue"), this.consume()) : e === ">" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : e === "\"" || e === "'" || e === "<" ? (this.delegate.reportSyntaxError(e + " is not a valid character within attribute names"), this.consume(), this.delegate.appendToAttributeName(e)) : (this.consume(), this.delegate.appendToAttributeName(e));
},
afterAttributeName: function() {
var e = this.peek();
if (or(e)) {
this.consume();
return;
} else e === "/" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("selfClosingStartTag")) : e === "=" ? (this.consume(), this.transitionTo("beforeAttributeValue")) : e === ">" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.transitionTo("attributeName"), this.delegate.beginAttribute(), this.consume(), this.delegate.appendToAttributeName(e));
},
beforeAttributeValue: function() {
var e = this.peek();
or(e) ? this.consume() : e === "\"" ? (this.transitionTo("attributeValueDoubleQuoted"), this.delegate.beginAttributeValue(!0), this.consume()) : e === "'" ? (this.transitionTo("attributeValueSingleQuoted"), this.delegate.beginAttributeValue(!0), this.consume()) : e === ">" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : (this.transitionTo("attributeValueUnquoted"), this.delegate.beginAttributeValue(!1), this.consume(), this.delegate.appendToAttributeValue(e));
},
attributeValueDoubleQuoted: function() {
var e = this.consume();
e === "\"" ? (this.delegate.finishAttributeValue(), this.transitionTo("afterAttributeValueQuoted")) : e === "&" ? this.delegate.appendToAttributeValue(this.consumeCharRef() || "&") : this.delegate.appendToAttributeValue(e);
},
attributeValueSingleQuoted: function() {
var e = this.consume();
e === "'" ? (this.delegate.finishAttributeValue(), this.transitionTo("afterAttributeValueQuoted")) : e === "&" ? this.delegate.appendToAttributeValue(this.consumeCharRef() || "&") : this.delegate.appendToAttributeValue(e);
},
attributeValueUnquoted: function() {
var e = this.peek();
or(e) ? (this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("beforeAttributeName")) : e === "/" ? (this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("selfClosingStartTag")) : e === "&" ? (this.consume(), this.delegate.appendToAttributeValue(this.consumeCharRef() || "&")) : e === ">" ? (this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : (this.consume(), this.delegate.appendToAttributeValue(e));
},
afterAttributeValueQuoted: function() {
var e = this.peek();
or(e) ? (this.consume(), this.transitionTo("beforeAttributeName")) : e === "/" ? (this.consume(), this.transitionTo("selfClosingStartTag")) : e === ">" ? (this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : this.transitionTo("beforeAttributeName");
},
selfClosingStartTag: function() {
this.peek() === ">" ? (this.consume(), this.delegate.markTagAsSelfClosing(), this.delegate.finishTag(), this.transitionTo("beforeData")) : this.transitionTo("beforeAttributeName");
},
endTagOpen: function() {
var e = this.consume();
(e === "@" || e === ":" || sr(e)) && (this.transitionTo("endTagName"), this.tagNameBuffer = "", this.delegate.beginEndTag(), this.appendToTagName(e));
}
}, this.reset();
}
return e.prototype.reset = function() {
this.transitionTo("beforeData"), this.input = "", this.tagNameBuffer = "", this.index = 0, this.line = 1, this.column = 0, this.delegate.reset();
}, e.prototype.transitionTo = function(e) {
this.state = e;
}, e.prototype.tokenize = function(e) {
this.reset(), this.tokenizePart(e), this.tokenizeEOF();
}, e.prototype.tokenizePart = function(e) {
for (this.input += cr(e); this.index < this.input.length;) {
var t = this.states[this.state];
if (t !== void 0) t.call(this);
else throw Error("unhandled state " + this.state);
}
}, e.prototype.tokenizeEOF = function() {
this.flushData();
}, e.prototype.flushData = function() {
this.state === "data" && (this.delegate.finishData(), this.transitionTo("beforeData"));
}, e.prototype.peek = function() {
return this.input.charAt(this.index);
}, e.prototype.consume = function() {
var e = this.peek();
return this.index++, e === "\n" ? (this.line++, this.column = 0) : this.column++, e;
}, e.prototype.consumeCharRef = function() {
var e = this.input.indexOf(";", this.index);
if (e !== -1) {
var t = this.input.slice(this.index, e), n = this.entityParser.parse(t);
if (n) {
for (var r = t.length; r;) this.consume(), r--;
return this.consume(), n;
}
}
}, e.prototype.markTagStart = function() {
this.delegate.tagOpen();
}, e.prototype.appendToTagName = function(e) {
this.tagNameBuffer += e, this.delegate.appendToTagName(e);
}