@divkitframework/divkit
Version:
DivKit for the web
1,946 lines • 745 kB
JavaScript
var Wd = Object.defineProperty;
var Ud = (e, r, t) => r in e ? Wd(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
var Ar = (e, r, t) => Ud(e, typeof r != "symbol" ? r + "" : r, t);
/*!
DivKit v32.61.0
https://github.com/divkit/divkit
@licence Apache-2.0
*/
function M() {
}
const Ns = (e) => e;
function Fi(e, r) {
for (const t in r) e[t] = r[t];
return (
/** @type {T & S} */
e
);
}
function Ff(e) {
return e();
}
function ca() {
return /* @__PURE__ */ Object.create(null);
}
function en(e) {
e.forEach(Ff);
}
function Gr(e) {
return typeof e == "function";
}
function Gd(e, r) {
return e != e ? r == r : e !== r || e && typeof e == "object" || typeof e == "function";
}
let Yo;
function gi(e, r) {
return e === r ? !0 : (Yo || (Yo = document.createElement("a")), Yo.href = r, e === Yo.href);
}
function Rr(e, r) {
return e != e ? r == r : e !== r;
}
function Yd(e) {
return Object.keys(e).length === 0;
}
function U(e, ...r) {
if (e == null) {
for (const n of r)
n(void 0);
return M;
}
const t = e.subscribe(...r);
return t.unsubscribe ? () => t.unsubscribe() : t;
}
function cl(e) {
let r;
return U(e, (t) => r = t)(), r;
}
function wn(e, r, t) {
e.$$.on_destroy.push(U(r, t));
}
function zs(e, r, t, n) {
if (e) {
const i = Mf(e, r, t, n);
return e[0](i);
}
}
function Mf(e, r, t, n) {
return e[1] && n ? Fi(t.ctx.slice(), e[1](n(r))) : t.ctx;
}
function Os(e, r, t, n) {
if (e[2] && n) {
const i = e[2](n(t));
if (r.dirty === void 0)
return i;
if (typeof i == "object") {
const o = [], s = Math.max(r.dirty.length, i.length);
for (let a = 0; a < s; a += 1)
o[a] = r.dirty[a] | i[a];
return o;
}
return r.dirty | i;
}
return r.dirty;
}
function Ls(e, r, t, n, i, o) {
if (i) {
const s = Mf(r, t, n, o);
e.p(s, i);
}
}
function Rs(e) {
if (e.ctx.length > 32) {
const r = [], t = e.ctx.length / 32;
for (let n = 0; n < t; n++)
r[n] = -1;
return r;
}
return -1;
}
function Zs(e, r, t) {
return e.set(t), r;
}
function Bs(e) {
return e && Gr(e.destroy) ? e.destroy : M;
}
function fa(e) {
const r = typeof e == "string" && e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
return r ? [parseFloat(r[1]), r[2] || "px"] : [
/** @type {number} */
e,
"px"
];
}
const Pf = typeof window < "u";
let Ol = Pf ? () => window.performance.now() : () => Date.now(), Ll = Pf ? (e) => requestAnimationFrame(e) : M;
const go = /* @__PURE__ */ new Set();
function Nf(e) {
go.forEach((r) => {
r.c(e) || (go.delete(r), r.f());
}), go.size !== 0 && Ll(Nf);
}
function Rl(e) {
let r;
return go.size === 0 && Ll(Nf), {
promise: new Promise((t) => {
go.add(r = { c: e, f: t });
}),
abort() {
go.delete(r);
}
};
}
const Ci = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : (
// @ts-ignore Node typings have this
global
);
function Mt(e, r) {
e.appendChild(r);
}
function zf(e) {
if (!e) return document;
const r = e.getRootNode ? e.getRootNode() : e.ownerDocument;
return r && /** @type {ShadowRoot} */
r.host ? (
/** @type {ShadowRoot} */
r
) : e.ownerDocument;
}
function qd(e) {
const r = Pe("style");
return r.textContent = "/* empty */", Kd(zf(e), r), r.sheet;
}
function Kd(e, r) {
return Mt(
/** @type {Document} */
e.head || e,
r
), r.sheet;
}
function ee(e, r, t) {
e.insertBefore(r, t || null);
}
function $(e) {
e.parentNode && e.parentNode.removeChild(e);
}
function An(e, r) {
for (let t = 0; t < e.length; t += 1)
e[t] && e[t].d(r);
}
function Pe(e) {
return document.createElement(e);
}
function Sn(e) {
return document.createElementNS("http://www.w3.org/2000/svg", e);
}
function ci(e) {
return document.createTextNode(e);
}
function vr() {
return ci(" ");
}
function mr() {
return ci("");
}
function ze(e, r, t, n) {
return e.addEventListener(r, t, n), () => e.removeEventListener(r, t, n);
}
function y(e, r, t) {
t == null ? e.removeAttribute(r) : e.getAttribute(r) !== t && e.setAttribute(r, t);
}
const Jd = ["width", "height"];
function pi(e, r) {
const t = Object.getOwnPropertyDescriptors(e.__proto__);
for (const n in r)
r[n] == null ? e.removeAttribute(n) : n === "style" ? e.style.cssText = r[n] : n === "__value" ? e.value = e[n] = r[n] : t[n] && t[n].set && Jd.indexOf(n) === -1 ? e[n] = r[n] : y(e, n, r[n]);
}
function Xd(e, r) {
Object.keys(r).forEach((t) => {
Zd(e, t, r[t]);
});
}
function Zd(e, r, t) {
const n = r.toLowerCase();
n in e ? e[n] = typeof e[n] == "boolean" && t === "" ? !0 : t : r in e ? e[r] = typeof e[r] == "boolean" && t === "" ? !0 : t : y(e, r, t);
}
function da(e) {
return /-/.test(e) ? Xd : pi;
}
function Qd(e) {
return Array.from(e.childNodes);
}
function Mi(e, r) {
r = "" + r, e.data !== r && (e.data = /** @type {string} */
r);
}
function ha(e, r) {
e.value = r == null ? "" : r;
}
function Y(e, r, t, n) {
t == null ? e.style.removeProperty(r) : e.style.setProperty(r, t, "");
}
function _a(e, r, t) {
for (let n = 0; n < e.options.length; n += 1) {
const i = e.options[n];
if (i.__value === r) {
i.selected = !0;
return;
}
}
(!t || r !== void 0) && (e.selectedIndex = -1);
}
function xd(e) {
const r = e.querySelector(":checked");
return r && r.__value;
}
function Of(e, r, { bubbles: t = !1, cancelable: n = !1 } = {}) {
return new CustomEvent(e, { detail: r, bubbles: t, cancelable: n });
}
function ga(e, r) {
return new e(r);
}
const vs = /* @__PURE__ */ new Map();
let ks = 0;
function $d(e) {
let r = 5381, t = e.length;
for (; t--; ) r = (r << 5) - r ^ e.charCodeAt(t);
return r >>> 0;
}
function eh(e, r) {
const t = { stylesheet: qd(r), rules: {} };
return vs.set(e, t), t;
}
function Es(e, r, t, n, i, o, s, a = 0) {
const l = 16.666 / n;
let u = `{
`;
for (let v = 0; v <= 1; v += l) {
const E = r + (t - r) * o(v);
u += v * 100 + `%{${s(E, 1 - E)}}
`;
}
const c = u + `100% {${s(t, 1 - t)}}
}`, d = `__svelte_${$d(c)}_${a}`, _ = zf(e), { stylesheet: g, rules: m } = vs.get(_) || eh(_, e);
m[d] || (m[d] = !0, g.insertRule(`@keyframes ${d} ${c}`, g.cssRules.length));
const h = e.style.animation || "";
return e.style.animation = `${h ? `${h}, ` : ""}${d} ${n}ms linear ${i}ms 1 both`, ks += 1, d;
}
function As(e, r) {
const t = (e.style.animation || "").split(", "), n = t.filter(
r ? (o) => o.indexOf(r) < 0 : (o) => o.indexOf("__svelte") === -1
// remove all Svelte animations
), i = t.length - n.length;
i && (e.style.animation = n.join(", "), ks -= i, ks || th());
}
function th() {
Ll(() => {
ks || (vs.forEach((e) => {
const { ownerNode: r } = e.stylesheet;
r && $(r);
}), vs.clear());
});
}
let zo;
function Po(e) {
zo = e;
}
function Ao() {
if (!zo) throw new Error("Function called outside component initialization");
return zo;
}
function ti(e) {
Ao().$$.on_mount.push(e);
}
function Hs(e) {
Ao().$$.after_update.push(e);
}
function Cn(e) {
Ao().$$.on_destroy.push(e);
}
function rh() {
const e = Ao();
return (r, t, { cancelable: n = !1 } = {}) => {
const i = e.$$.callbacks[r];
if (i) {
const o = Of(
/** @type {string} */
r,
t,
{ cancelable: n }
);
return i.slice().forEach((s) => {
s.call(e, o);
}), !o.defaultPrevented;
}
return !0;
};
}
function Ii(e, r) {
return Ao().$$.context.set(e, r), r;
}
function Qr(e) {
return Ao().$$.context.get(e);
}
function zn(e, r) {
const t = e.$$.callbacks[r.type];
t && t.slice().forEach((n) => n.call(this, r));
}
const ho = [], Mr = [];
let po = [];
const pa = [], Lf = /* @__PURE__ */ Promise.resolve();
let fl = !1;
function Rf() {
fl || (fl = !0, Lf.then(Bf));
}
function Tn() {
return Rf(), Lf;
}
function Qn(e) {
po.push(e);
}
const Qs = /* @__PURE__ */ new Set();
let uo = 0;
function Bf() {
if (uo !== 0)
return;
const e = zo;
do {
try {
for (; uo < ho.length; ) {
const r = ho[uo];
uo++, Po(r), nh(r.$$);
}
} catch (r) {
throw ho.length = 0, uo = 0, r;
}
for (Po(null), ho.length = 0, uo = 0; Mr.length; ) Mr.pop()();
for (let r = 0; r < po.length; r += 1) {
const t = po[r];
Qs.has(t) || (Qs.add(t), t());
}
po.length = 0;
} while (ho.length);
for (; pa.length; )
pa.pop()();
fl = !1, Qs.clear(), Po(e);
}
function nh(e) {
if (e.fragment !== null) {
e.update(), en(e.before_update);
const r = e.dirty;
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, r), e.after_update.forEach(Qn);
}
}
function ih(e) {
const r = [], t = [];
po.forEach((n) => e.indexOf(n) === -1 ? r.push(n) : t.push(n)), t.forEach((n) => n()), po = r;
}
let To;
function Bl() {
return To || (To = Promise.resolve(), To.then(() => {
To = null;
})), To;
}
function Qi(e, r, t) {
e.dispatchEvent(Of(`${r ? "intro" : "outro"}${t}`));
}
const ns = /* @__PURE__ */ new Set();
let ki;
function kr() {
ki = {
r: 0,
c: [],
p: ki
// parent group
};
}
function Er() {
ki.r || en(ki.c), ki = ki.p;
}
function Z(e, r) {
e && e.i && (ns.delete(e), e.i(r));
}
function ie(e, r, t, n) {
if (e && e.o) {
if (ns.has(e)) return;
ns.add(e), ki.c.push(() => {
ns.delete(e), n && (t && e.d(1), n());
}), e.o(r);
} else n && n();
}
const Hl = { duration: 0 };
function Ws(e, r, t) {
const n = { direction: "in" };
let i = r(e, t, n), o = !1, s, a, l = 0;
function u() {
s && As(e, s);
}
function c() {
const {
delay: _ = 0,
duration: g = 300,
easing: m = Ns,
tick: h = M,
css: v
} = i || Hl;
v && (s = Es(e, 0, 1, g, _, m, v, l++)), h(0, 1);
const E = Ol() + _, q = E + g;
a && a.abort(), o = !0, Qn(() => Qi(e, !0, "start")), a = Rl((Q) => {
if (o) {
if (Q >= q)
return h(1, 0), Qi(e, !0, "end"), u(), o = !1;
if (Q >= E) {
const K = m((Q - E) / g);
h(K, 1 - K);
}
}
return o;
});
}
let d = !1;
return {
start() {
d || (d = !0, As(e), Gr(i) ? (i = i(n), Bl().then(c)) : c());
},
invalidate() {
d = !1;
},
end() {
o && (u(), o = !1);
}
};
}
function Hf(e, r, t) {
const n = { direction: "out" };
let i = r(e, t, n), o = !0, s;
const a = ki;
a.r += 1;
let l;
function u() {
const {
delay: c = 0,
duration: d = 300,
easing: _ = Ns,
tick: g = M,
css: m
} = i || Hl;
m && (s = Es(e, 1, 0, d, c, _, m));
const h = Ol() + c, v = h + d;
Qn(() => Qi(e, !1, "start")), "inert" in e && (l = /** @type {HTMLElement} */
e.inert, e.inert = !0), Rl((E) => {
if (o) {
if (E >= v)
return g(0, 1), Qi(e, !1, "end"), --a.r || en(a.c), !1;
if (E >= h) {
const q = _((E - h) / d);
g(1 - q, q);
}
}
return o;
});
}
return Gr(i) ? Bl().then(() => {
i = i(n), u();
}) : u(), {
end(c) {
c && "inert" in e && (e.inert = l), c && i.tick && i.tick(1, 0), o && (s && As(e, s), o = !1);
}
};
}
function ma(e, r, t, n) {
let o = r(e, t, { direction: "both" }), s = n ? 0 : 1, a = null, l = null, u = null, c;
function d() {
u && As(e, u);
}
function _(m, h) {
const v = (
/** @type {Program['d']} */
m.b - s
);
return h *= Math.abs(v), {
a: s,
b: m.b,
d: v,
duration: h,
start: m.start,
end: m.start + h,
group: m.group
};
}
function g(m) {
const {
delay: h = 0,
duration: v = 300,
easing: E = Ns,
tick: q = M,
css: Q
} = o || Hl, K = {
start: Ol() + h,
b: m
};
m || (K.group = ki, ki.r += 1), "inert" in e && (m ? c !== void 0 && (e.inert = c) : (c = /** @type {HTMLElement} */
e.inert, e.inert = !0)), a || l ? l = K : (Q && (d(), u = Es(e, s, m, v, h, E, Q)), m && q(0, 1), a = _(K, v), Qn(() => Qi(e, m, "start")), Rl((de) => {
if (l && de > l.start && (a = _(l, v), l = null, Qi(e, a.b, "start"), Q && (d(), u = Es(
e,
s,
a.b,
a.duration,
0,
E,
o.css
))), a) {
if (de >= a.end)
q(s = a.b, 1 - s), Qi(e, a.b, "end"), l || (a.b ? d() : --a.group.r || en(a.group.c)), a = null;
else if (de >= a.start) {
const se = de - a.start;
s = a.a + a.d * E(se / a.duration), q(s, 1 - s);
}
}
return !!(a || l);
}));
}
return {
run(m) {
Gr(o) ? Bl().then(() => {
o = o({ direction: m ? "in" : "out" }), g(m);
}) : g(m);
},
end() {
d(), a = l = null;
}
};
}
function pr(e) {
return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e);
}
function Wf(e, r) {
ie(e, 1, 1, () => {
r.delete(e.key);
});
}
function Uf(e, r, t, n, i, o, s, a, l, u, c, d) {
let _ = e.length, g = o.length, m = _;
const h = {};
for (; m--; ) h[e[m].key] = m;
const v = [], E = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map(), Q = [];
for (m = g; m--; ) {
const H = d(i, o, m), X = t(H);
let le = s.get(X);
le ? Q.push(() => le.p(H, r)) : (le = u(X, H), le.c()), E.set(X, v[m] = le), X in h && q.set(X, Math.abs(m - h[X]));
}
const K = /* @__PURE__ */ new Set(), de = /* @__PURE__ */ new Set();
function se(H) {
Z(H, 1), H.m(a, c), s.set(H.key, H), c = H.first, g--;
}
for (; _ && g; ) {
const H = v[g - 1], X = e[_ - 1], le = H.key, R = X.key;
H === X ? (c = H.first, _--, g--) : E.has(R) ? !s.has(le) || K.has(le) ? se(H) : de.has(R) ? _-- : q.get(le) > q.get(R) ? (de.add(le), se(H)) : (K.add(R), _--) : (l(X, s), _--);
}
for (; _--; ) {
const H = e[_];
E.has(H.key) || l(H, s);
}
for (; g; ) se(v[g - 1]);
return en(Q), v;
}
function Bi(e, r) {
const t = {}, n = {}, i = { $$scope: 1 };
let o = e.length;
for (; o--; ) {
const s = e[o], a = r[o];
if (a) {
for (const l in s)
l in a || (n[l] = 1);
for (const l in a)
i[l] || (t[l] = a[l], i[l] = 1);
e[o] = a;
} else
for (const l in s)
i[l] = 1;
}
for (const s in n)
s in t || (t[s] = void 0);
return t;
}
function Gf(e) {
return typeof e == "object" && e !== null ? e : {};
}
function or(e) {
e && e.c();
}
function tr(e, r, t) {
const { fragment: n, after_update: i } = e.$$;
n && n.m(r, t), Qn(() => {
const o = e.$$.on_mount.map(Ff).filter(Gr);
e.$$.on_destroy ? e.$$.on_destroy.push(...o) : en(o), e.$$.on_mount = [];
}), i.forEach(Qn);
}
function rr(e, r) {
const t = e.$$;
t.fragment !== null && (ih(t.after_update), en(t.on_destroy), t.fragment && t.fragment.d(r), t.on_destroy = t.fragment = null, t.ctx = []);
}
function oh(e, r) {
e.$$.dirty[0] === -1 && (ho.push(e), Rf(), e.$$.dirty.fill(0)), e.$$.dirty[r / 31 | 0] |= 1 << r % 31;
}
function tn(e, r, t, n, i, o, s = null, a = [-1]) {
const l = zo;
Po(e);
const u = e.$$ = {
fragment: null,
ctx: [],
// state
props: o,
update: M,
not_equal: i,
bound: ca(),
// lifecycle
on_mount: [],
on_destroy: [],
on_disconnect: [],
before_update: [],
after_update: [],
context: new Map(r.context || (l ? l.$$.context : [])),
// everything else
callbacks: ca(),
dirty: a,
skip_bound: !1,
root: r.target || l.$$.root
};
s && s(u.root);
let c = !1;
if (u.ctx = t ? t(e, r.props || {}, (d, _, ...g) => {
const m = g.length ? g[0] : _;
return u.ctx && i(u.ctx[d], u.ctx[d] = m) && (!u.skip_bound && u.bound[d] && u.bound[d](m), c && oh(e, d)), _;
}) : [], u.update(), c = !0, en(u.before_update), u.fragment = n ? n(u.ctx) : !1, r.target) {
if (r.hydrate) {
const d = Qd(r.target);
u.fragment && u.fragment.l(d), d.forEach($);
} else
u.fragment && u.fragment.c();
r.intro && Z(e.$$.fragment), tr(e, r.target, r.anchor), Bf();
}
Po(l);
}
class rn {
constructor() {
/**
* ### PRIVATE API
*
* Do not use, may change at any time
*
* @type {any}
*/
Ar(this, "$$");
/**
* ### PRIVATE API
*
* Do not use, may change at any time
*
* @type {any}
*/
Ar(this, "$$set");
}
/** @returns {void} */
$destroy() {
rr(this, 1), this.$destroy = M;
}
/**
* @template {Extract<keyof Events, string>} K
* @param {K} type
* @param {((e: Events[K]) => void) | null | undefined} callback
* @returns {() => void}
*/
$on(r, t) {
if (!Gr(t))
return M;
const n = this.$$.callbacks[r] || (this.$$.callbacks[r] = []);
return n.push(t), () => {
const i = n.indexOf(t);
i !== -1 && n.splice(i, 1);
};
}
/**
* @param {Partial<Props>} props
* @returns {void}
*/
$set(r) {
this.$$set && !Yd(r) && (this.$$.skip_bound = !0, this.$$set(r), this.$$.skip_bound = !1);
}
}
const sh = "4";
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(sh);
const co = [];
function lh(e, r) {
return {
subscribe: hi(e, r).subscribe
};
}
function hi(e, r = M) {
let t;
const n = /* @__PURE__ */ new Set();
function i(a) {
if (Gd(e, a) && (e = a, t)) {
const l = !co.length;
for (const u of n)
u[1](), co.push(u, e);
if (l) {
for (let u = 0; u < co.length; u += 2)
co[u][0](co[u + 1]);
co.length = 0;
}
}
}
function o(a) {
i(a(e));
}
function s(a, l = M) {
const u = [a, l];
return n.add(u), n.size === 1 && (t = r(i, o) || M), a(e), () => {
n.delete(u), n.size === 0 && t && (t(), t = null);
};
}
return { set: i, update: o, subscribe: s };
}
function io(e, r, t) {
const n = !Array.isArray(e), i = n ? [e] : e;
if (!i.every(Boolean))
throw new Error("derived() expects stores as input, got a falsy value");
const o = r.length < 2;
return lh(t, (s, a) => {
let l = !1;
const u = [];
let c = 0, d = M;
const _ = () => {
if (c)
return;
d();
const m = r(n ? u[0] : u, s, a);
o ? s(m) : d = Gr(m) ? m : M;
}, g = i.map(
(m, h) => U(
m,
(v) => {
u[h] = v, c &= ~(1 << h), l && _();
},
() => {
c |= 1 << h;
}
)
);
return l = !0, _(), function() {
en(g), d(), l = !1;
};
});
}
const ah = "divkit-6d515", uh = "divkit-27458", ch = "divkit-82db1", fh = "divkit-be734", dh = "divkit-9a652", yr = {
root_platform_desktop: ah,
root__clickable: uh,
"root__clickable-no-transition": "divkit-3bb57",
"root__any-actions": "divkit-ba614",
root: ch,
root__selectable: fh,
root__unselectable: dh,
"root__only-desktop": "divkit-316e7",
"root_restrict-scroll": "divkit-0a135",
"root_disabled-context-menu": "divkit-f5cb3"
}, vn = Symbol("root");
function B(e, r = {}) {
const t = e;
return t.level = r.level || "error", r.additional && (t.additional = r.additional), t;
}
const hh = "divkit-bf0ea", _h = "divkit-bab07", gh = "divkit-07f20", ph = "divkit-27458", mh = "divkit-90c49", bh = "divkit-b33bc", yh = "divkit-f6ff9", Cs = {
outer: hh,
outer_width_content: _h,
outer_height_content: gh,
root__clickable: ph,
"root__clickable-no-transition": "divkit-3bb57",
"outer_hide-on-transition-in": "divkit-c5f24",
"outer_halign-self_start": "divkit-002ec",
"outer_halign-self_center": "divkit-204f8",
"outer_halign-self_end": "divkit-bd7ba",
"outer_halign-self_stretch": "divkit-02d12",
"outer_valign-self_start": "divkit-fd8aa",
"outer_valign-self_center": "divkit-62df2",
"outer_valign-self_end": "divkit-819a0",
"outer_valign-self_stretch": "divkit-8a331",
"outer_parent-flex_vertical": "divkit-46b27",
"outer_parent-flex_horizontal": "divkit-be075",
"outer_valign-self_baseline": "divkit-2b876",
"outer_width-constrained": "divkit-5bdb7",
"outer_parent-grid": "divkit-47ef2",
"outer_height-constrained": "divkit-351c8",
"outer_parent-overlap": "divkit-747b0",
"outer_scroll-snap_start": "divkit-91fd4",
"outer_scroll-snap_center": "divkit-c525d",
"outer_scroll-snap_end": "divkit-67470",
outer__border: mh,
outer_visibility_invisible: bh,
outer_visibility_gone: yh,
"outer_has-action-animation": "divkit-4d4f3",
"outer_has-custom-focus": "divkit-b630e"
};
function Xt(e) {
if (!e)
return;
let r = "";
for (const t in e)
if (e.hasOwnProperty(t)) {
if (!e[t] && e[t] !== 0)
continue;
r && (r += ";"), r += t + ":" + String(e[t]);
}
return r || void 0;
}
function Re(e) {
if (typeof e != "number" && typeof e != "string" || !e)
return "0";
const r = Number(e);
return Number.isNaN(r) ? "0" : Math.ceil(r * 1e3) / 1e4 + "em";
}
function xr(e) {
let r = Re(e);
return r === "0" && (r += "em"), r;
}
function Yf(e, r) {
for (; e.length < r; )
e = "0" + e;
return e;
}
function Lr(e, r = 1, t = "transparent") {
if (e = (typeof e == "string" && e || "").toLowerCase(), e.charAt(0) !== "#")
return t;
const n = si(e);
return n ? (n.a *= r, Wl(n)) : t;
}
function wh(e, r, t = "transparent") {
if (e = (typeof e == "string" && e || "").toLowerCase(), e.charAt(0) !== "#")
return t;
const n = si(e);
return n ? (n.a = r, Wl(n)) : t;
}
function Wl(e) {
return e.a === 255 ? `#${[e.r, e.g, e.b].map((r) => Yf(Math.round(r).toString(16), 2)).join("")}` : `rgba(${e.r},${e.g},${e.b},${(e.a / 255).toFixed(2)})`;
}
function si(e) {
const r = (
// #AARRGGBB
e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i) || // #ARGB
e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i) || // #RRGGBB
e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i) || // #RGB
e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i)
);
if (r) {
if (r.length === 5) {
const [u, c, d, _, g] = r, m = d.length === 2 ? d : d + d, h = _.length === 2 ? _ : _ + _, v = g.length === 2 ? g : g + g, E = c.length === 2 ? c : c + c;
return {
a: parseInt(E, 16),
r: parseInt(m, 16),
g: parseInt(h, 16),
b: parseInt(v, 16)
};
}
const [t, n, i, o] = r, s = n.length === 2 ? n : n + n, a = i.length === 2 ? i : i + i, l = o.length === 2 ? o : o + o;
return {
a: 255,
r: parseInt(s, 16),
g: parseInt(a, 16),
b: parseInt(l, 16)
};
}
return null;
}
function dl(e) {
let r = String(e);
return r.indexOf("&") > -1 && (r = r.replace(/&/g, "&")), r.indexOf("<") > -1 && (r = r.replace(/</g, "<")), r.indexOf(">") > -1 && (r = r.replace(/>/g, ">")), r.indexOf('"') > -1 && (r = r.replace(/"/g, """)), r;
}
const ji = Boolean;
function Us(e, r) {
if (e.length === 1 && e[0].type === "solid")
return kh({
bg: e[0]
});
const t = e.map((n) => {
if (n.type === "solid")
return vh({
bg: n
});
if (n.type === "gradient")
return Eh({
bg: n
});
if (n.type === "image")
return jh({
bg: n,
direction: r
});
if (n.type === "radial_gradient")
return Ch({
bg: n
});
}).filter(ji).reverse().reduce(function(n, i) {
return n.image.push(i.image), n.size.push(i.size || "auto"), n.position.push(i.pos || "50% 50%"), n;
}, {
image: [],
size: [],
position: []
});
return {
image: t.image.join(","),
size: t.size.join(","),
position: t.position.join(",")
};
}
function vh(e) {
const r = Lr(e.bg.color || "transparent");
return {
size: void 0,
pos: void 0,
image: `linear-gradient(to bottom,${r},${r})`
};
}
function kh(e) {
return {
color: Lr(e.bg.color || "transparent"),
size: "auto",
position: "50% 50%"
};
}
function qf(e) {
return e.every((n) => n.color && typeof n.position == "number" && n.position >= 0 && n.position <= 1) ? e.sort((n, i) => Math.abs(n.position - i.position) < 1e-6 ? 0 : n.position - i.position).map((n) => `${Lr(n.color)} ${(n.position * 100).toFixed(2)}%`).join(",") : void 0;
}
function Eh(e) {
var n, i, o, s;
if (!Array.isArray((n = e.bg) == null ? void 0 : n.colors) && !Array.isArray((i = e.bg) == null ? void 0 : i.color_map))
return;
const r = (o = e.bg.colors) == null ? void 0 : o.filter(ji);
if (!(r != null && r.length) && !((s = e.bg) != null && s.color_map))
return;
let t;
if (e.bg.color_map) {
const a = qf(e.bg.color_map);
if (!a)
return;
t = "linear-gradient(" + (90 - Number(e.bg.angle || 0) + "deg") + "," + a + ")";
} else {
if (!r)
return;
t = "linear-gradient(" + (90 - Number(e.bg.angle || 0) + "deg") + "," + r.map((a) => Lr(a)).join(",") + ")";
}
return {
size: void 0,
pos: void 0,
image: t
};
}
const Ah = {
nearest_corner: "closest-corner",
farthest_corner: "farthest-corner",
nearest_side: "closest-side",
farthest_side: "farthest-side"
};
function ba(e) {
if (e && typeof e == "object" && "type" in e && e.value !== void 0) {
if (e.type === "fixed")
return xr(e.value);
if (e.type === "relative")
return `${Number(e.value) * 100}%`;
}
return "50%";
}
function Ch(e) {
var a, l, u, c;
if (!Array.isArray((a = e.bg) == null ? void 0 : a.colors) && !Array.isArray((l = e.bg) == null ? void 0 : l.color_map))
return;
const r = (u = e.bg.colors) == null ? void 0 : u.filter(ji);
if (!(r != null && r.length) && !((c = e.bg) != null && c.color_map))
return;
let t;
if (e.bg.color_map ? t = qf(e.bg.color_map) : r && (t = r.map((d) => Lr(d)).join(",")), !t)
return;
const n = e.bg.radius;
let i;
n && typeof n == "object" && "type" in n && n.value !== void 0 && (n.type === "fixed" ? i = xr(n.value) : n.type === "relative" && (i = Ah[n.value]));
const o = ba(e.bg.center_x), s = ba(e.bg.center_y);
return {
size: void 0,
pos: void 0,
image: `radial-gradient(circle ${i || "farthest-corner"} at ${o} ${s},` + t + ")"
};
}
function jh(e) {
var t;
const r = (t = e.bg) == null ? void 0 : t.image_url;
if (r)
return {
size: Kf(e.bg.scale),
pos: Jf(e.bg, e.direction),
image: 'url("' + dl(r) + '")'
};
}
function Kf(e) {
return e === "fit" ? "contain" : e === "stretch" ? "fill" : e === "no_scale" ? "none" : "cover";
}
function Sh(e) {
return e === "none" ? "auto" : e === "fill" ? "100% 100%" : e;
}
function Jf(e, r) {
let t, n;
return e.content_alignment_horizontal === "left" || r === "ltr" && e.content_alignment_horizontal === "start" || r === "rtl" && e.content_alignment_horizontal === "end" ? t = "0%" : e.content_alignment_horizontal === "right" || r === "ltr" && e.content_alignment_horizontal === "end" || r === "rtl" && e.content_alignment_horizontal === "start" ? t = "100%" : t = "50%", e.content_alignment_vertical === "top" ? n = "0%" : e.content_alignment_vertical === "bottom" ? n = "100%" : n = "50%", t + " " + n;
}
function on(e, r) {
const t = Number(e);
return Number.isNaN(t) || t < 0 ? r : t;
}
function ya(e, r, t) {
return typeof r == "number" && (e && r > 0 && r <= 100 || !e && r >= 0 && r < 100) ? r : t;
}
function Vh(e) {
return e.is_enabled !== 0 && e.is_enabled !== !1 && e.index !== void 0;
}
function Ih(e, {
visibilityActions: r,
disappearActions: t,
rootCtx: n,
componentContext: i
}) {
const o = [];
r && r.forEach((g) => {
o.push({
type: "visibility",
index: o.length,
action: g,
visible: !1,
count: 0,
finished: !1
});
}), t && t.forEach((g) => {
o.push({
type: "disappear",
index: o.length,
action: g,
// false, so disappear only works after the element becomes visible
visible: !1,
count: 0,
finished: !1
});
});
const s = o.map((g, m) => {
const h = g.type === "visibility";
return i.getDerivedFromVars({
index: m,
visibility_percentage: g.action.visibility_percentage,
visibility_duration: h ? g.action.visibility_duration : g.action.disappear_duration,
log_limit: g.action.log_limit,
is_enabled: g.action.is_enabled
}, void 0, !0);
});
let a;
const l = () => {
a && a.disconnect(), o.forEach((g) => {
g.timer && clearTimeout(g.timer);
});
}, u = io(s, (g) => g);
let c;
const d = (g) => {
const m = g.type === "visibility";
i.execAnyActions([g.action], {
logType: m ? "visible" : "disappear",
node: e,
processUrls: !1
});
}, _ = u.subscribe((g) => {
c = g.filter(Vh);
const m = {};
c.forEach((E) => {
m[E.index] = E;
}), l();
const h = [...new Set(c.map((E) => {
const q = o[E.index].type === "visibility";
return ya(
q,
E.visibility_percentage,
q ? 50 : 0
) / 100;
}))];
if (!h.length)
return;
const v = (E) => {
E.forEach((q) => {
c.forEach((Q) => {
const K = o[Q.index], de = K.type === "visibility", se = ya(
de,
Q.visibility_percentage,
de ? 50 : 0
);
let H;
se === 0 ? H = q.intersectionRatio >= 1e-12 : H = q.intersectionRatio >= se / 100, (de ? !K.visible && H : K.visible && !H) ? K.finished || (K.timer = setTimeout(() => {
++K.count;
const R = Q.log_limit === 0 ? 1 / 0 : Q.log_limit || 1;
K.count >= R && (K.finished = !0), d(K);
}, on(Q.visibility_duration, 800))) : (de ? !H : H) && K.timer && clearTimeout(K.timer), K.visible = H;
});
});
};
a = new IntersectionObserver(v, {
threshold: h
}), a.observe(e);
});
return {
destroy() {
c == null || c.forEach((g) => {
const m = o[g.index];
!m || m.type !== "disappear" || !m.visible || m.finished || n.registerTimeout(window.setTimeout(() => {
d(m);
}, g.visibility_duration));
}), l(), _();
}
};
}
function wa(e, r) {
r && e.push(r);
}
function St(e, r, t) {
const n = [];
wa(n, r[e]);
for (const i in t)
if (t.hasOwnProperty(i)) {
const o = t[i];
if (o) {
const s = `${e}_${i}` + (typeof o == "string" ? `_${o}` : "");
wa(n, r[s]);
}
}
return n.join(" ");
}
const Ul = Symbol("state");
function li(e, r) {
var s, a;
const t = e.top || 0, n = ((s = r === "ltr" ? e.end : e.start) != null ? s : e.right) || 0, i = e.bottom || 0, o = ((a = r === "ltr" ? e.start : e.end) != null ? a : e.left) || 0;
return t === 0 && n === 0 && i === 0 && o === 0 ? "" : Re(t) + " " + Re(n) + " " + Re(i) + " " + Re(o);
}
function Co(e) {
if (typeof e != "number" && typeof e != "string")
return !1;
const r = Number(e);
return !Number.isNaN(r);
}
function Wn(e) {
return Co(e) && e >= 0;
}
function js(e, r, t) {
var i, o;
if (!e)
return t;
const n = [
e.top,
(i = r === "ltr" ? e.end : e.start) != null ? i : e.right,
e.bottom,
(o = r === "ltr" ? e.start : e.end) != null ? o : e.left
];
for (let s = 0; s < n.length; ++s)
if (n[s] && !Wn(n[s]))
return t;
return li(e, r);
}
function Dh(e, r) {
return !Wn(e) || e === void 0 || e > 1 ? r : Number(e);
}
const Th = Object.prototype.hasOwnProperty;
function jo(e, r) {
if (Object.is(e, r))
return !0;
if (typeof e != "object" || e === null || typeof r != "object" || r === null)
return Object.is(e, r);
const t = Object.keys(e), n = Object.keys(r);
if (t.length !== n.length)
return !1;
for (let i = 0; i < t.length; i++) {
const o = t[i];
if (!Th.call(r, o) || !jo(e[o], r[o]))
return !1;
}
return !0;
}
function Li(e, r) {
return jo(e, r) ? r : e;
}
function Fh(e, r) {
return e === "visible" || e === "invisible" || e === "gone" ? e : r;
}
function Xf(e, r) {
return e === "linear" || e === "ease" || e === "ease_in_out" || e === "ease_in" || e === "ease_out" ? e : r;
}
function Ss(e, r) {
const t = Number(e);
return Number.isNaN(t) ? r : t;
}
function Oo(e) {
const r = [];
return e.name === "set" ? (e.items || []).forEach((t) => {
r.push(...Oo(t));
}) : r.push(e), r;
}
function oo(e, r) {
if (!e || typeof e != "object")
return r;
const t = [
"top",
"right",
"bottom",
"left"
];
for (let n = 0; n < t.length; ++n)
if (e[t[n]] && !Wn(e[t[n]]))
return r;
return e;
}
function Mh(e, r) {
if (!e && !r)
return {};
if (!r)
return e;
if (!e)
return r;
const t = {};
return [
"top",
"right",
"bottom",
"left",
"start",
"end"
].forEach((n) => {
const i = e[n];
i && (t[n] = i);
const o = r[n];
o && (t[n] = (t[n] || 0) + o);
}), t;
}
function Ph(e, r) {
const t = [
e["top-left"],
e["top-right"],
e["bottom-right"],
e["bottom-left"]
];
for (let n = 0; n < t.length; ++n)
if (t[n] && !Wn(t[n]))
return r;
return e;
}
function is(e, r = 0, t = 10) {
return [
e["top-left"],
e["top-right"],
e["bottom-right"],
e["bottom-left"]
].map((n) => Re((n || r) / t * 10)).join(" ");
}
function Nh(e) {
var r, t, n, i, o, s;
return Re(((t = (r = e.offset) == null ? void 0 : r.x) == null ? void 0 : t.value) || 0) + " " + Re(((i = (n = e.offset) == null ? void 0 : n.y) == null ? void 0 : i.value) || 0) + " " + Re((o = e.blur) != null ? o : 2) + " " + Lr(e.color || "#000000", (s = e.alpha) != null ? s : 0.19);
}
function zh(e, r) {
var t, n, i, o, s, a;
return "drop-shadow(" + Lr(e.color || "#000000", (t = e.alpha) != null ? t : 0.19) + " " + Re((((i = (n = e.offset) == null ? void 0 : n.x) == null ? void 0 : i.value) || 0) * 10 / r) + " " + Re((((s = (o = e.offset) == null ? void 0 : o.y) == null ? void 0 : s.value) || 0) * 10 / r) + " " + Re(((a = e.blur) != null ? a : 2) * 10 / r) + ")";
}
let xs;
function xi() {
return typeof matchMedia > "u" ? !1 : (xs || (xs = window.matchMedia("(prefers-reduced-motion)")), xs.matches);
}
const Oh = 8, Lh = (e, r, t, n) => {
let i;
return (t || n) && typeof ResizeObserver < "u" && (i = new ResizeObserver(async () => {
let o = 0;
const s = {}, a = (u, c) => {
if (u) {
const d = r.getVariable(u, "integer");
if (d) {
if (c = Math.round(c), s[u] || (s[u] = /* @__PURE__ */ new Set()), !s[u].has(c))
return d.setValue(c), s[u].add(c), !0;
} else {
const _ = new Error("Missing variable");
_.level = "error", _.additional = {
variableName: u
}, r.logError(_);
}
}
return !1;
}, l = () => {
if (!e)
return !1;
const u = e.getBoundingClientRect(), c = a(t, u.width), d = a(n, u.height);
return c || d;
};
for (; l(); ) {
if (++o > Oh) {
const u = new Error("Recursive layout in size_provider");
u.level = "warn", u.additional = {
widthVariableName: t,
heightVariableName: n
}, r.logError(u);
break;
}
await Tn();
}
}), i.observe(e)), i;
}, Gl = Symbol("enabled");
function On(e, r) {
return e === 1 || e === 0 || e === !1 || e === !0 ? !!e : r;
}
function bo(e) {
return [
e.state_description,
e.description,
e.hint
].filter(Boolean).join(", ");
}
const va = 1, Ri = 2;
function ka(e, r = 1) {
if (!(!e || typeof e.value != "number")) {
if (e.type === "translation-fixed")
return Re(e.value * r);
if (e.type === "translation-percentage")
return `${e.value * r}%`;
}
}
function qo(e, r = 1) {
if (!(!e || typeof e.value != "number")) {
if (e.type === "pivot-fixed")
return Re(e.value * r);
if (e.type === "pivot-percentage")
return `${e.value * r}%`;
}
}
function Rh(e) {
return e.map((r) => {
if (r.type === "rotation") {
if (typeof r.angle == "number") {
const t = qo(r.pivot_x) || "50%", n = qo(r.pivot_y) || "50%", i = qo(r.pivot_x, -1) || "-50%", o = qo(r.pivot_y, -1) || "-50%";
return `translate(${t}, ${n}) rotate(${r.angle}deg) translate(${i}, ${o})`;
}
} else if (r.type === "translation") {
const t = ka(r.x) || 0, n = ka(r.y) || 0;
return `translate(${t}, ${n})`;
}
}).filter(Boolean).join(" ");
}
const hl = Symbol("visibility"), Bh = "divkit-ee5cc", Ea = {
actionable__button: Bh
};
function Hh() {
}
const $i = Symbol("action");
function _l(e) {
if (e.startsWith("tel:"))
return "tel";
if (e.startsWith("/"))
return "https";
const r = /^([^/]+):\/\//.exec(e);
return r && r[1] || "";
}
function gl(e, r) {
return r.has(e);
}
function Wh(e) {
var d;
let r, t, n, i, o, s;
const a = (
/*#slots*/
e[30].default
), l = zs(
a,
e,
/*$$scope*/
e[29],
null
);
let u = [
{
class: t = /*cls*/
e[2] + " " + /*longTapActions*/
((d = e[1]) != null && d.length ? yr["root_disabled-context-menu"] : "") + " " + /*hasAnyActions*/
(e[13] ? yr["root__any-actions"] : "")
},
{ style: (
/*style*/
e[3]
) },
{ role: (
/*role*/
e[10]
) },
{ "aria-checked": (
/*isChecked*/
e[14]
) },
{
"aria-hidden": n = /*ariaHidden*/
e[11] || void 0
},
/*attrs*/
e[4]
], c = {};
for (let _ = 0; _ < u.length; _ += 1)
c = Fi(c, u[_]);
return {
c() {
r = Pe("span"), l && l.c(), pi(r, c);
},
m(_, g) {
ee(_, r, g), l && l.m(r, null), e[48](r), i = !0, o || (s = [
Bs(
/*use*/
e[5].call(null, r)
),
ze(
r,
"click",
/*click_handler_2*/
e[41]
),
ze(
r,
"keydown",
/*onKeydown*/
e[16]
),
ze(
r,
"focus",
/*focus_handler_2*/
e[42]
),
ze(
r,
"blur",
/*blur_handler_2*/
e[43]
),
ze(
r,
"pointerdown",
/*pointerdown_handler_2*/
e[44]
),
ze(
r,
"wheel",
/*wheel_handler_2*/
e[45]
)
], o = !0);
},
p(_, g) {
var m;
l && l.p && (!i || g[0] & /*$$scope*/
536870912) && Ls(
l,
a,
_,
/*$$scope*/
_[29],
i ? Os(
a,
/*$$scope*/
_[29],
g,
null
) : Rs(
/*$$scope*/
_[29]
),
null
), pi(r, c = Bi(u, [
(!i || g[0] & /*cls, longTapActions, hasAnyActions*/
8198 && t !== (t = /*cls*/
_[2] + " " + /*longTapActions*/
((m = _[1]) != null && m.length ? yr["root_disabled-context-menu"] : "") + " " + /*hasAnyActions*/
(_[13] ? yr["root__any-actions"] : ""))) && { class: t },
(!i || g[0] & /*style*/
8) && { style: (
/*style*/
_[3]
) },
(!i || g[0] & /*role*/
1024) && { role: (
/*role*/
_[10]
) },
(!i || g[0] & /*isChecked*/
16384) && { "aria-checked": (
/*isChecked*/
_[14]
) },
(!i || g[0] & /*ariaHidden*/
2048 && n !== (n = /*ariaHidden*/
_[11] || void 0)) && { "aria-hidden": n },
g[0] & /*attrs*/
16 && /*attrs*/
_[4]
]));
},
i(_) {
i || (Z(l, _), i = !0);
},
o(_) {
ie(l, _), i = !1;
},
d(_) {
_ && $(r), l && l.d(_), e[48](null), o = !1, en(s);
}
};
}
function Uh(e) {
var d;
let r, t, n, i, o, s;
const a = (
/*#slots*/
e[30].default
), l = zs(
a,
e,
/*$$scope*/
e[29],
null
);
let u = [
{
class: t = /*cls*/
e[2] + " " + Ea.actionable__button + " " + yr["root__any-actions"] + ` ${/*isNativeActionAnimation*/
e[6] ? yr.root__clickable : yr["root__clickable-no-transition"]} ${yr.root__unselectable} ` + /*longTapActions*/
((d = e[1]) != null && d.length ? yr["root_disabled-context-menu"] : "")
},
{ style: (
/*style*/
e[3]
) },
{ role: (
/*role*/
e[10]
) },
{ "aria-checked": (
/*isChecked*/
e[14]
) },
{ type: "button" },
{
tabindex: n = /*componentContext*/
e[0].fakeElement === Ri ? -1 : null
},
/*attrs*/
e[4]
], c = {};
for (let _ = 0; _ < u.length; _ += 1)
c = Fi(c, u[_]);
return {
c() {
r = Pe("button"), l && l.c(), pi(r, c);
},
m(_, g) {
ee(_, r, g), l && l.m(r, null), r.autofocus && r.focus(), e[47](r), i = !0, o || (s = [
Bs(
/*use*/
e[5].call(null, r)
),
ze(
r,
"click",
/*click_handler_1*/
e[36]
),
ze(
r,
"keydown",
/*onKeydown*/
e[16]
),
ze(
r,
"focus",
/*focus_handler_1*/
e[37]
),
ze(
r,
"blur",
/*blur_handler_1*/
e[38]
),
ze(
r,
"pointerdown",
/*pointerdown_handler_1*/
e[39]
),
ze(
r,
"wheel",
/*wheel_handler_1*/
e[40]
)
], o = !0);
},
p(_, g) {
var m;
l && l.p && (!i || g[0] & /*$$scope*/
536870912) && Ls(
l,
a,
_,
/*$$scope*/
_[29],
i ? Os(
a,
/*$$scope*/
_[29],
g,
null
) : Rs(
/*$$scope*/
_[29]
),
null
), pi(r, c = Bi(u, [
(!i || g[0] & /*cls, isNativeActionAnimation, longTapActions*/
70 && t !== (t = /*cls*/
_[2] + " " + Ea.actionable__button + " " + yr["root__any-actions"] + ` ${/*isNativeActionAnimation*/
_[6] ? yr.root__clickable : yr["root__clickable-no-transition"]} ${yr.root__unselectable} ` + /*longTapActions*/
((m = _[1]) != null && m.length ? yr["root_disabled-context-menu"] : ""))) && { class: t },
(!i || g[0] & /*style*/
8) && { style: (
/*style*/
_[3]
) },
(!i || g[0] & /*role*/
1024) && { role: (
/*role*/
_[10]
) },
(!i || g[0] & /*isChecked*/
16384) && { "aria-checked": (
/*isChecked*/
_[14]
) },
{ type: "button" },
(!i || g[0] & /*componentContext*/
1 && n !== (n = /*componentContext*/
_[0].fakeElement === Ri ? -1 : null)) && { tabindex: n },
g[0] & /*attrs*/
16 && /*attrs*/
_[4]
]));
},
i(_) {
i || (Z(l, _), i = !0);
},
o(_) {
ie(l, _), i = !1;
},
d(_) {
_ && $(r), l && l.d(_), e[47](null), o = !1, en(s);
}
};
}
function Gh(e) {
var d;
let r, t, n, i, o, s;
const a = (
/*#slots*/
e[30].default
), l = zs(
a,
e,
/*$$scope*/
e[29],
null
);
let u = [
{ href: (
/*href*/
e[8]
) },
{ target: (
/*target*/
e[12]
) },
{ style: (
/*style*/
e[3]
) },
{ role: (
/*role*/
e[10]
) },
{ "aria-checked": (
/*isChecked*/
e[14]
) },
{
class: t = /*cls*/
e[2] + " " + yr["root__any-actions"] + " " + /*isNativeActionAnimation*/
(e[6] ? yr.root__clickable : yr["root__clickable-no-transition"]) + " " + /*longTapActions*/
((d = e[1]) != null && d.length ? yr["root_disabled-context-menu"] : "")
},
{
tabindex: n = /*componentContext*/
e[0].fakeElement === Ri ? -1 : null
},
/*attrs*/
e[4]
], c = {};
for (let _ = 0; _ < u.length; _ += 1)
c = Fi(c, u[_]);
return {
c() {
r = Pe("a"), l && l.c(), pi(r, c);
},
m(_, g) {
ee(_, r, g), l && l.m(r, null), e[46](r), i = !0, o || (s = [
Bs(
/*use*/
e[5].call(null, r)
),
ze(
r,
"click",
/*click_handler*/
e[31]
),
ze(
r,
"keydown",
/*onKeydown*/
e[16]
),
ze(
r,
"focus",
/*focus_handler*/
e[32]
),
ze(
r,
"blur",
/*blur_handler*/
e[33]
),
ze(
r,
"pointerdown",
/*pointerdown_handler*/
e[34]
),
ze(
r,
"wheel",
/*wheel_handler*/
e[35]
)
], o = !0);
},
p(_, g) {
var m;
l && l.p && (!i || g[0] & /*$$scope*/
536870912) && Ls(
l,
a,
_,
/*$$scope*/
_[29],
i ? Os(
a,
/*$$scope*/
_[29],
g,
null
) : Rs(
/*$$scope*/
_[29]
),
null
), pi(r, c = Bi(u, [
(!i || g[0] & /*href*/
256) && { href: (
/*href*/
_[8]
) },
(!i || g[0] & /*target*/
4096) && { target: (
/*target*/
_[12]
) },
(!i || g[0] & /*style*/
8) && { style: (
/*style*/
_[3]
) },
(!i || g[0] & /*role*/
1024) && { role: (
/*role*/
_[10]
) },
(!i || g[0] & /*isChecked*/
16384) && { "aria-checked": (
/*isChecked*/
_[14]
) },
(!i || g[0] & /*cls, isNativeActionAnimation, longTapActions*/
70 && t !== (t = /*cls*/
_[2] + " " + yr["root__any-actions"] + " " + /*isNativeActionAnimation*/
(_[6] ? yr.root__clickable : yr["root__clickable-no-transition"]) + " " + /*longTapActions*/
((m = _[1]) != null && m.length ? yr["root_disabled-context-menu"] : ""))) && { class: t },
(!i || g[0] & /*componentContext*/
1 && n !== (n = /*componentContext*/
_[0].fakeElement === Ri ? -1 : null)) && { tabindex: n },
g[0] & /*attrs*/
16 && /*attrs*/
_[4]
]));
},
i(_) {
i || (Z(l, _), i = !0);
},
o(_) {
ie(l, _), i = !1;
},
d(_) {
_ && $(r), l && l.d(_), e[46](null), o = !1, en(s);
}
};
}
function Yh(e) {
let r, t, n, i;
const o = [Gh, Uh, Wh], s = [];
function a(l, u) {
return (
/*href*/
l[8] ? 0 : (
/*hasJSAction*/
l[9] ? 1 : 2
)
);
}
return r = a(e), t = s[r] = o[r](e), {
c() {
t.c(), n = mr();
},
m(l, u) {
s[r].m(l, u), ee(l, n, u), i = !0;
},
p(l, u) {
let c = r;
r = a(l), r === c ? s[r].p(l, u) : (kr(), ie(s[c], 1, 1, () => {
s[c] = null;
}), Er(), t = s[r], t ? t.p(l, u) : (t = s[r] = o[r](l), t.c()), Z(t, 1), t.m(n.parentNode, n));
},
i(l) {
i || (Z(t), i = !0);
},
o(l) {
ie(t), i = !1;
},
d(l) {
l && $(n), s[r].d(l);
}
};
}
const Aa = 8, Ca = 400, $s = 400, qh = /* @__PURE__ */ new Set(["button", "image", "checkbox", "radio", "header"]);
function ja(e) {
e.preventDefault();
}
function Kh(e, r, t) {
let n, i, o = M, s = () => (o(), o = U(n, (z) => t(28, i = z)), n);
e.$$.on_destroy.push(() => o());
let { $$slots: a = {}, $$scope: l } = r, { componentContext: u } = r, { id: c = "" } = r, { actions: d = void 0 } = r, { doubleTapActions: _ = void 0 } = r, { longTapActions: g = void 0 } = r, { pressStartActions: m = void 0 } = r, { pressEndActions: h = void 0 } = r, { hoverStartActions: v = void 0 } = r, { hoverEndActions: E = void 0 } = r, { cls: q = "" } = r, { style: Q = null } = r, { attrs: K = void 0 } = r, { use: de = Hh } = r, { customAction: se = null } = r, { isNativeActionAnimation: H = !0 } = r, { hasInnerFocusable: X = !1 } = r, { customAccessibility: le = void 0 } = r, { captureFocusOnAction: R = !0 } = r;
const N = Qr(vn), T = Qr($i);
Ii($i, {
hasAction() {
return !!(T.hasAction() || d != null && d.length || (le == null ? void 0 : le.mode) === "exclude");
}
});
let L, Ee = "", $e, We = -1, Ue = -1, be = null, Ce = !1, Be = !1, _t = !1, xe, ye, Xe, Pt, ge = !1;
function Ne() {
return (i == null ? void 0 : i.some((z) => {
if (z != null && z.typed)
return !0;
const Oe = z == null ? void 0 : z.url;
if (!Oe)
return !1;
const wt = _l(Oe);
return wt && !gl(wt, N.getBuiltinProtocols());
})) || !1;
}
async function ve(z, Oe) {
d && (z && Ne() && z.preventDefault(), u.execAnyActions(d, { node: L, processUrls: Oe }));
}
async function te(z) {
if (T.hasAction() || z.button !== void 0 && z.button !== 0)
return;
const Oe = Date.now();
if (We > 0 && Oe > We + Ca) {
z.preventDefault();
return;
}
if (_ != null && _.length && Ue > 0 && Oe - Ue < $s) {
z.preventDefault(), u.execAnyActions(_, { processUrls: !0, node: L }), Ue = -1;
return;
}
if (Ue = Oe, _ != null && _.length && We > 0 && Oe < We + $s) {
z.preventDefault(), clearTimeout(ye), ye = window.setTimeout(
() => {
ve(void 0, !0);
},
$s
);
return;
}
(se == null ? void 0 : se(z)) === !1 ? z.preventDefault() : ve(z, !1);
}
function Ge(z) {
T.hasAction() || (be = { x: z.clientX, y: z.clientY }, Ce = !1, We = Date.now(), xe && clearTimeout(xe), clearTimeout(ye), u.execAnyActions(m, { node: L }));
}
function st(z) {
be && (Math.abs(be.x - z.clientX) > Aa || Math.abs(be.y - z.clientY) > Aa) && (Ce = !0);
}
function Se(z) {
T.hasAction() || !be || We < 0 || (!Ce && Date.now() - We >=