@divkitframework/divkit
Version:
DivKit for the web
1,946 lines • 731 kB
JavaScript
var Md = Object.defineProperty;
var Pd = (e, r, t) => r in e ? Md(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
var kr = (e, r, t) => Pd(e, typeof r != "symbol" ? r + "" : r, t);
/*!
DivKit v32.51.0
https://github.com/divkit/divkit
@licence Apache-2.0
*/
function D() {
}
const Ss = (e) => e;
function Ti(e, r) {
for (const t in r) e[t] = r[t];
return (
/** @type {T & S} */
e
);
}
function Ef(e) {
return e();
}
function ia() {
return /* @__PURE__ */ Object.create(null);
}
function en(e) {
e.forEach(Ef);
}
function Wr(e) {
return typeof e == "function";
}
function Nd(e, r) {
return e != e ? r == r : e !== r || e && typeof e == "object" || typeof e == "function";
}
let Oo;
function di(e, r) {
return e === r ? !0 : (Oo || (Oo = document.createElement("a")), Oo.href = r, e === Oo.href);
}
function Br(e, r) {
return e != e ? r == r : e !== r;
}
function zd(e) {
return Object.keys(e).length === 0;
}
function B(e, ...r) {
if (e == null) {
for (const n of r)
n(void 0);
return D;
}
const t = e.subscribe(...r);
return t.unsubscribe ? () => t.unsubscribe() : t;
}
function il(e) {
let r;
return B(e, (t) => r = t)(), r;
}
function hn(e, r, t) {
e.$$.on_destroy.push(B(r, t));
}
function Vs(e, r, t, n) {
if (e) {
const i = Af(e, r, t, n);
return e[0](i);
}
}
function Af(e, r, t, n) {
return e[1] && n ? Ti(t.ctx.slice(), e[1](n(r))) : t.ctx;
}
function Is(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 Ds(e, r, t, n, i, o) {
if (i) {
const s = Af(r, t, n, o);
e.p(s, i);
}
}
function Fs(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 Ys(e, r, t) {
return e.set(t), r;
}
function Ts(e) {
return e && Wr(e.destroy) ? e.destroy : D;
}
function oa(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 Cf = typeof window < "u";
let Fl = Cf ? () => window.performance.now() : () => Date.now(), Tl = Cf ? (e) => requestAnimationFrame(e) : D;
const ao = /* @__PURE__ */ new Set();
function jf(e) {
ao.forEach((r) => {
r.c(e) || (ao.delete(r), r.f());
}), ao.size !== 0 && Tl(jf);
}
function Ml(e) {
let r;
return ao.size === 0 && Tl(jf), {
promise: new Promise((t) => {
ao.add(r = { c: e, f: t });
}),
abort() {
ao.delete(r);
}
};
}
const ki = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : (
// @ts-ignore Node typings have this
global
);
function Lt(e, r) {
e.appendChild(r);
}
function Sf(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 Od(e) {
const r = Pe("style");
return r.textContent = "/* empty */", Ld(Sf(e), r), r.sheet;
}
function Ld(e, r) {
return Lt(
/** @type {Document} */
e.head || e,
r
), r.sheet;
}
function x(e, r, t) {
e.insertBefore(r, t || null);
}
function Q(e) {
e.parentNode && e.parentNode.removeChild(e);
}
function yn(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 kn(e) {
return document.createElementNS("http://www.w3.org/2000/svg", e);
}
function li(e) {
return document.createTextNode(e);
}
function Ar() {
return li(" ");
}
function hr() {
return li("");
}
function ze(e, r, t, n) {
return e.addEventListener(r, t, n), () => e.removeEventListener(r, t, n);
}
function b(e, r, t) {
t == null ? e.removeAttribute(r) : e.getAttribute(r) !== t && e.setAttribute(r, t);
}
const Rd = ["width", "height"];
function hi(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 && Rd.indexOf(n) === -1 ? e[n] = r[n] : b(e, n, r[n]);
}
function Bd(e, r) {
Object.keys(r).forEach((t) => {
Hd(e, t, r[t]);
});
}
function Hd(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 : b(e, r, t);
}
function sa(e) {
return /-/.test(e) ? Bd : hi;
}
function Wd(e) {
return Array.from(e.childNodes);
}
function Mi(e, r) {
r = "" + r, e.data !== r && (e.data = /** @type {string} */
r);
}
function la(e, r) {
e.value = r == null ? "" : r;
}
function H(e, r, t, n) {
t == null ? e.style.removeProperty(r) : e.style.setProperty(r, t, "");
}
function aa(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 Ud(e) {
const r = e.querySelector(":checked");
return r && r.__value;
}
function Vf(e, r, { bubbles: t = !1, cancelable: n = !1 } = {}) {
return new CustomEvent(e, { detail: r, bubbles: t, cancelable: n });
}
function ua(e, r) {
return new e(r);
}
const hs = /* @__PURE__ */ new Map();
let _s = 0;
function Gd(e) {
let r = 5381, t = e.length;
for (; t--; ) r = (r << 5) - r ^ e.charCodeAt(t);
return r >>> 0;
}
function Yd(e, r) {
const t = { stylesheet: Od(r), rules: {} };
return hs.set(e, t), t;
}
function gs(e, r, t, n, i, o, s, a = 0) {
const l = 16.666 / n;
let u = `{
`;
for (let w = 0; w <= 1; w += l) {
const v = r + (t - r) * o(w);
u += w * 100 + `%{${s(v, 1 - v)}}
`;
}
const c = u + `100% {${s(t, 1 - t)}}
}`, d = `__svelte_${Gd(c)}_${a}`, _ = Sf(e), { stylesheet: g, rules: m } = hs.get(_) || Yd(_, 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`, _s += 1, d;
}
function ps(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(", "), _s -= i, _s || qd());
}
function qd() {
Tl(() => {
_s || (hs.forEach((e) => {
const { ownerNode: r } = e.stylesheet;
r && Q(r);
}), hs.clear());
});
}
let Do;
function Vo(e) {
Do = e;
}
function bo() {
if (!Do) throw new Error("Function called outside component initialization");
return Do;
}
function $n(e) {
bo().$$.on_mount.push(e);
}
function Ms(e) {
bo().$$.after_update.push(e);
}
function wn(e) {
bo().$$.on_destroy.push(e);
}
function Kd() {
const e = bo();
return (r, t, { cancelable: n = !1 } = {}) => {
const i = e.$$.callbacks[r];
if (i) {
const o = Vf(
/** @type {string} */
r,
t,
{ cancelable: n }
);
return i.slice().forEach((s) => {
s.call(e, o);
}), !o.defaultPrevented;
}
return !0;
};
}
function Ii(e, r) {
return bo().$$.context.set(e, r), r;
}
function Jr(e) {
return bo().$$.context.get(e);
}
function Pn(e, r) {
const t = e.$$.callbacks[r.type];
t && t.slice().forEach((n) => n.call(this, r));
}
const so = [], Pr = [];
let uo = [];
const ca = [], If = /* @__PURE__ */ Promise.resolve();
let ol = !1;
function Df() {
ol || (ol = !0, If.then(Ff));
}
function Vn() {
return Df(), If;
}
function Xn(e) {
uo.push(e);
}
const qs = /* @__PURE__ */ new Set();
let no = 0;
function Ff() {
if (no !== 0)
return;
const e = Do;
do {
try {
for (; no < so.length; ) {
const r = so[no];
no++, Vo(r), Jd(r.$$);
}
} catch (r) {
throw so.length = 0, no = 0, r;
}
for (Vo(null), so.length = 0, no = 0; Pr.length; ) Pr.pop()();
for (let r = 0; r < uo.length; r += 1) {
const t = uo[r];
qs.has(t) || (qs.add(t), t());
}
uo.length = 0;
} while (so.length);
for (; ca.length; )
ca.pop()();
ol = !1, qs.clear(), Vo(e);
}
function Jd(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(Xn);
}
}
function Xd(e) {
const r = [], t = [];
uo.forEach((n) => e.indexOf(n) === -1 ? r.push(n) : t.push(n)), t.forEach((n) => n()), uo = r;
}
let Co;
function Pl() {
return Co || (Co = Promise.resolve(), Co.then(() => {
Co = null;
})), Co;
}
function Ji(e, r, t) {
e.dispatchEvent(Vf(`${r ? "intro" : "outro"}${t}`));
}
const Xo = /* @__PURE__ */ new Set();
let bi;
function br() {
bi = {
r: 0,
c: [],
p: bi
// parent group
};
}
function yr() {
bi.r || en(bi.c), bi = bi.p;
}
function q(e, r) {
e && e.i && (Xo.delete(e), e.i(r));
}
function se(e, r, t, n) {
if (e && e.o) {
if (Xo.has(e)) return;
Xo.add(e), bi.c.push(() => {
Xo.delete(e), n && (t && e.d(1), n());
}), e.o(r);
} else n && n();
}
const Nl = { duration: 0 };
function Ps(e, r, t) {
const n = { direction: "in" };
let i = r(e, t, n), o = !1, s, a, l = 0;
function u() {
s && ps(e, s);
}
function c() {
const {
delay: _ = 0,
duration: g = 300,
easing: m = Ss,
tick: h = D,
css: w
} = i || Nl;
w && (s = gs(e, 0, 1, g, _, m, w, l++)), h(0, 1);
const v = Fl() + _, K = v + g;
a && a.abort(), o = !0, Xn(() => Ji(e, !0, "start")), a = Ml((X) => {
if (o) {
if (X >= K)
return h(1, 0), Ji(e, !0, "end"), u(), o = !1;
if (X >= v) {
const R = m((X - v) / g);
h(R, 1 - R);
}
}
return o;
});
}
let d = !1;
return {
start() {
d || (d = !0, ps(e), Wr(i) ? (i = i(n), Pl().then(c)) : c());
},
invalidate() {
d = !1;
},
end() {
o && (u(), o = !1);
}
};
}
function Tf(e, r, t) {
const n = { direction: "out" };
let i = r(e, t, n), o = !0, s;
const a = bi;
a.r += 1;
let l;
function u() {
const {
delay: c = 0,
duration: d = 300,
easing: _ = Ss,
tick: g = D,
css: m
} = i || Nl;
m && (s = gs(e, 1, 0, d, c, _, m));
const h = Fl() + c, w = h + d;
Xn(() => Ji(e, !1, "start")), "inert" in e && (l = /** @type {HTMLElement} */
e.inert, e.inert = !0), Ml((v) => {
if (o) {
if (v >= w)
return g(0, 1), Ji(e, !1, "end"), --a.r || en(a.c), !1;
if (v >= h) {
const K = _((v - h) / d);
g(1 - K, K);
}
}
return o;
});
}
return Wr(i) ? Pl().then(() => {
i = i(n), u();
}) : u(), {
end(c) {
c && "inert" in e && (e.inert = l), c && i.tick && i.tick(1, 0), o && (s && ps(e, s), o = !1);
}
};
}
function fa(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 && ps(e, u);
}
function _(m, h) {
const w = (
/** @type {Program['d']} */
m.b - s
);
return h *= Math.abs(w), {
a: s,
b: m.b,
d: w,
duration: h,
start: m.start,
end: m.start + h,
group: m.group
};
}
function g(m) {
const {
delay: h = 0,
duration: w = 300,
easing: v = Ss,
tick: K = D,
css: X
} = o || Nl, R = {
start: Fl() + h,
b: m
};
m || (R.group = bi, bi.r += 1), "inert" in e && (m ? c !== void 0 && (e.inert = c) : (c = /** @type {HTMLElement} */
e.inert, e.inert = !0)), a || l ? l = R : (X && (d(), u = gs(e, s, m, w, h, v, X)), m && K(0, 1), a = _(R, w), Xn(() => Ji(e, m, "start")), Ml((te) => {
if (l && te > l.start && (a = _(l, w), l = null, Ji(e, a.b, "start"), X && (d(), u = gs(
e,
s,
a.b,
a.duration,
0,
v,
o.css
))), a) {
if (te >= a.end)
K(s = a.b, 1 - s), Ji(e, a.b, "end"), l || (a.b ? d() : --a.group.r || en(a.group.c)), a = null;
else if (te >= a.start) {
const ge = te - a.start;
s = a.a + a.d * v(ge / a.duration), K(s, 1 - s);
}
}
return !!(a || l);
}));
}
return {
run(m) {
Wr(o) ? Pl().then(() => {
o = o({ direction: m ? "in" : "out" }), g(m);
}) : g(m);
},
end() {
d(), a = l = null;
}
};
}
function dr(e) {
return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e);
}
function Mf(e, r) {
se(e, 1, 1, () => {
r.delete(e.key);
});
}
function Pf(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 w = [], v = /* @__PURE__ */ new Map(), K = /* @__PURE__ */ new Map(), X = [];
for (m = g; m--; ) {
const G = d(i, o, m), Z = t(G);
let oe = s.get(Z);
oe ? X.push(() => oe.p(G, r)) : (oe = u(Z, G), oe.c()), v.set(Z, w[m] = oe), Z in h && K.set(Z, Math.abs(m - h[Z]));
}
const R = /* @__PURE__ */ new Set(), te = /* @__PURE__ */ new Set();
function ge(G) {
q(G, 1), G.m(a, c), s.set(G.key, G), c = G.first, g--;
}
for (; _ && g; ) {
const G = w[g - 1], Z = e[_ - 1], oe = G.key, T = Z.key;
G === Z ? (c = G.first, _--, g--) : v.has(T) ? !s.has(oe) || R.has(oe) ? ge(G) : te.has(T) ? _-- : K.get(oe) > K.get(T) ? (te.add(oe), ge(G)) : (R.add(T), _--) : (l(Z, s), _--);
}
for (; _--; ) {
const G = e[_];
v.has(G.key) || l(G, s);
}
for (; g; ) ge(w[g - 1]);
return en(X), w;
}
function Ri(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 Nf(e) {
return typeof e == "object" && e !== null ? e : {};
}
function lr(e) {
e && e.c();
}
function nr(e, r, t) {
const { fragment: n, after_update: i } = e.$$;
n && n.m(r, t), Xn(() => {
const o = e.$$.on_mount.map(Ef).filter(Wr);
e.$$.on_destroy ? e.$$.on_destroy.push(...o) : en(o), e.$$.on_mount = [];
}), i.forEach(Xn);
}
function ir(e, r) {
const t = e.$$;
t.fragment !== null && (Xd(t.after_update), en(t.on_destroy), t.fragment && t.fragment.d(r), t.on_destroy = t.fragment = null, t.ctx = []);
}
function Zd(e, r) {
e.$$.dirty[0] === -1 && (so.push(e), Df(), 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 = Do;
Vo(e);
const u = e.$$ = {
fragment: null,
ctx: [],
// state
props: o,
update: D,
not_equal: i,
bound: ia(),
// lifecycle
on_mount: [],
on_destroy: [],
on_disconnect: [],
before_update: [],
after_update: [],
context: new Map(r.context || (l ? l.$$.context : [])),
// everything else
callbacks: ia(),
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 && Zd(e, d)), _;
}) : [], u.update(), c = !0, en(u.before_update), u.fragment = n ? n(u.ctx) : !1, r.target) {
if (r.hydrate) {
const d = Wd(r.target);
u.fragment && u.fragment.l(d), d.forEach(Q);
} else
u.fragment && u.fragment.c();
r.intro && q(e.$$.fragment), nr(e, r.target, r.anchor), Ff();
}
Vo(l);
}
class rn {
constructor() {
/**
* ### PRIVATE API
*
* Do not use, may change at any time
*
* @type {any}
*/
kr(this, "$$");
/**
* ### PRIVATE API
*
* Do not use, may change at any time
*
* @type {any}
*/
kr(this, "$$set");
}
/** @returns {void} */
$destroy() {
ir(this, 1), this.$destroy = D;
}
/**
* @template {Extract<keyof Events, string>} K
* @param {K} type
* @param {((e: Events[K]) => void) | null | undefined} callback
* @returns {() => void}
*/
$on(r, t) {
if (!Wr(t))
return D;
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 && !zd(r) && (this.$$.skip_bound = !0, this.$$set(r), this.$$.skip_bound = !1);
}
}
const Qd = "4";
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Qd);
const io = [];
function xd(e, r) {
return {
subscribe: ci(e, r).subscribe
};
}
function ci(e, r = D) {
let t;
const n = /* @__PURE__ */ new Set();
function i(a) {
if (Nd(e, a) && (e = a, t)) {
const l = !io.length;
for (const u of n)
u[1](), io.push(u, e);
if (l) {
for (let u = 0; u < io.length; u += 2)
io[u][0](io[u + 1]);
io.length = 0;
}
}
}
function o(a) {
i(a(e));
}
function s(a, l = D) {
const u = [a, l];
return n.add(u), n.size === 1 && (t = r(i, o) || D), a(e), () => {
n.delete(u), n.size === 0 && t && (t(), t = null);
};
}
return { set: i, update: o, subscribe: s };
}
function yo(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 xd(t, (s, a) => {
let l = !1;
const u = [];
let c = 0, d = D;
const _ = () => {
if (c)
return;
d();
const m = r(n ? u[0] : u, s, a);
o ? s(m) : d = Wr(m) ? m : D;
}, g = i.map(
(m, h) => B(
m,
(w) => {
u[h] = w, c &= ~(1 << h), l && _();
},
() => {
c |= 1 << h;
}
)
);
return l = !0, _(), function() {
en(g), d(), l = !1;
};
});
}
const $d = "divkit-6d515", eh = "divkit-27458", th = "divkit-82db1", rh = "divkit-be734", nh = "divkit-9a652", pr = {
root_platform_desktop: $d,
root__clickable: eh,
"root__clickable-no-transition": "divkit-3bb57",
"root__any-actions": "divkit-ba614",
root: th,
root__selectable: rh,
root__unselectable: nh,
"root__only-desktop": "divkit-316e7",
"root_restrict-scroll": "divkit-0a135",
"root_disabled-context-menu": "divkit-f5cb3"
}, _n = Symbol("root");
function O(e, r = {}) {
const t = e;
return t.level = r.level || "error", r.additional && (t.additional = r.additional), t;
}
const ih = "divkit-bf0ea", oh = "divkit-bab07", sh = "divkit-07f20", lh = "divkit-27458", ah = "divkit-90c49", uh = "divkit-b33bc", ch = "divkit-f6ff9", ms = {
outer: ih,
outer_width_content: oh,
outer_height_content: sh,
root__clickable: lh,
"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: ah,
outer_visibility_invisible: uh,
outer_visibility_gone: ch,
"outer_has-action-animation": "divkit-4d4f3",
"outer_has-custom-focus": "divkit-b630e"
};
function Qt(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 He(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 cn(e) {
let r = He(e);
return r === "0" && (r += "em"), r;
}
function zf(e, r) {
for (; e.length < r; )
e = "0" + e;
return e;
}
function Rr(e, r = 1, t = "transparent") {
if (e = (typeof e == "string" && e || "").toLowerCase(), e.charAt(0) !== "#")
return t;
const n = ii(e);
return n ? (n.a *= r, zl(n)) : t;
}
function fh(e, r, t = "transparent") {
if (e = (typeof e == "string" && e || "").toLowerCase(), e.charAt(0) !== "#")
return t;
const n = ii(e);
return n ? (n.a = r, zl(n)) : t;
}
function zl(e) {
return e.a === 255 ? `#${[e.r, e.g, e.b].map((r) => zf(Math.round(r).toString(16), 2)).join("")}` : `rgba(${e.r},${e.g},${e.b},${(e.a / 255).toFixed(2)})`;
}
function ii(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 ? _ : _ + _, w = g.length === 2 ? g : g + g, v = c.length === 2 ? c : c + c;
return {
a: parseInt(v, 16),
r: parseInt(m, 16),
g: parseInt(h, 16),
b: parseInt(w, 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 sl(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 Ei = Boolean;
function Ns(e, r) {
if (e.length === 1 && e[0].type === "solid")
return hh({
bg: e[0]
});
const t = e.map((n) => {
if (n.type === "solid")
return dh({
bg: n
});
if (n.type === "gradient")
return _h({
bg: n
});
if (n.type === "image")
return mh({
bg: n,
direction: r
});
if (n.type === "radial_gradient")
return ph({
bg: n
});
}).filter(Ei).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 dh(e) {
const r = Rr(e.bg.color || "transparent");
return {
size: void 0,
pos: void 0,
image: `linear-gradient(to bottom,${r},${r})`
};
}
function hh(e) {
return {
color: Rr(e.bg.color || "transparent"),
size: "auto",
position: "50% 50%"
};
}
function Of(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) => `${Rr(n.color)} ${(n.position * 100).toFixed(2)}%`).join(",") : void 0;
}
function _h(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(Ei);
if (!(r != null && r.length) && !((s = e.bg) != null && s.color_map))
return;
let t;
if (e.bg.color_map) {
const a = Of(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) => Rr(a)).join(",") + ")";
}
return {
size: void 0,
pos: void 0,
image: t
};
}
const gh = {
nearest_corner: "closest-corner",
farthest_corner: "farthest-corner",
nearest_side: "closest-side",
farthest_side: "farthest-side"
};
function da(e) {
if (e && typeof e == "object" && "type" in e && e.value !== void 0) {
if (e.type === "fixed")
return cn(e.value);
if (e.type === "relative")
return `${Number(e.value) * 100}%`;
}
return "50%";
}
function ph(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(Ei);
if (!(r != null && r.length) && !((c = e.bg) != null && c.color_map))
return;
let t;
if (e.bg.color_map ? t = Of(e.bg.color_map) : r && (t = r.map((d) => Rr(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 = cn(n.value) : n.type === "relative" && (i = gh[n.value]));
const o = da(e.bg.center_x), s = da(e.bg.center_y);
return {
size: void 0,
pos: void 0,
image: `radial-gradient(circle ${i || "farthest-corner"} at ${o} ${s},` + t + ")"
};
}
function mh(e) {
var t;
const r = (t = e.bg) == null ? void 0 : t.image_url;
if (r)
return {
size: Lf(e.bg.scale),
pos: Rf(e.bg, e.direction),
image: 'url("' + sl(r) + '")'
};
}
function Lf(e) {
return e === "fit" ? "contain" : e === "stretch" ? "fill" : e === "no_scale" ? "none" : "cover";
}
function bh(e) {
return e === "none" ? "auto" : e === "fill" ? "100% 100%" : e;
}
function Rf(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 ln(e, r) {
const t = Number(e);
return Number.isNaN(t) || t < 0 ? r : t;
}
function ha(e, r, t) {
return typeof r == "number" && (e && r > 0 && r <= 100 || !e && r >= 0 && r < 100) ? r : t;
}
function yh(e) {
return e.is_enabled !== 0 && e.is_enabled !== !1 && e.index !== void 0;
}
function wh(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 = yo(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(yh);
const m = {};
c.forEach((v) => {
m[v.index] = v;
}), l();
const h = [...new Set(c.map((v) => {
const K = o[v.index].type === "visibility";
return ha(
K,
v.visibility_percentage,
K ? 50 : 0
) / 100;
}))];
if (!h.length)
return;
const w = (v) => {
v.forEach((K) => {
c.forEach((X) => {
const R = o[X.index], te = R.type === "visibility", ge = ha(
te,
X.visibility_percentage,
te ? 50 : 0
);
let G;
ge === 0 ? G = K.intersectionRatio >= 1e-12 : G = K.intersectionRatio >= ge / 100, (te ? !R.visible && G : R.visible && !G) ? R.finished || (R.timer = setTimeout(() => {
++R.count;
const T = X.log_limit === 0 ? 1 / 0 : X.log_limit || 1;
R.count >= T && (R.finished = !0), d(R);
}, ln(X.visibility_duration, 800))) : (te ? !G : G) && R.timer && clearTimeout(R.timer), R.visible = G;
});
});
};
a = new IntersectionObserver(w, {
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 _a(e, r) {
r && e.push(r);
}
function It(e, r, t) {
const n = [];
_a(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}` : "");
_a(n, r[s]);
}
}
return n.join(" ");
}
const Ol = Symbol("state");
function _i(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 ? "" : He(t) + " " + He(n) + " " + He(i) + " " + He(o);
}
function wo(e) {
if (typeof e != "number" && typeof e != "string")
return !1;
const r = Number(e);
return !Number.isNaN(r);
}
function Hn(e) {
return wo(e) && e >= 0;
}
function bs(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] && !Hn(n[s]))
return t;
return _i(e, r);
}
function vh(e, r) {
return !Hn(e) || e === void 0 || e > 1 ? r : Number(e);
}
const kh = Object.prototype.hasOwnProperty;
function vo(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 (!kh.call(r, o) || !vo(e[o], r[o]))
return !1;
}
return !0;
}
function Oi(e, r) {
return vo(e, r) ? r : e;
}
function Eh(e, r) {
return e === "visible" || e === "invisible" || e === "gone" ? e : r;
}
function Bf(e, r) {
return e === "linear" || e === "ease" || e === "ease_in_out" || e === "ease_in" || e === "ease_out" ? e : r;
}
function ys(e, r) {
const t = Number(e);
return Number.isNaN(t) ? r : t;
}
function Fo(e) {
const r = [];
return e.name === "set" ? (e.items || []).forEach((t) => {
r.push(...Fo(t));
}) : r.push(e), r;
}
function ko(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]] && !Hn(e[t[n]]))
return r;
return e;
}
function Ah(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 Ch(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] && !Hn(t[n]))
return r;
return e;
}
function Zo(e, r = 0, t = 10) {
return [
e["top-left"],
e["top-right"],
e["bottom-right"],
e["bottom-left"]
].map((n) => He((n || r) / t * 10)).join(" ");
}
function jh(e) {
var r, t, n, i, o, s;
return He(((t = (r = e.offset) == null ? void 0 : r.x) == null ? void 0 : t.value) || 0) + " " + He(((i = (n = e.offset) == null ? void 0 : n.y) == null ? void 0 : i.value) || 0) + " " + He((o = e.blur) != null ? o : 2) + " " + Rr(e.color || "#000000", (s = e.alpha) != null ? s : 0.19);
}
function Sh(e, r) {
var t, n, i, o, s, a;
return "drop-shadow(" + Rr(e.color || "#000000", (t = e.alpha) != null ? t : 0.19) + " " + He((((i = (n = e.offset) == null ? void 0 : n.x) == null ? void 0 : i.value) || 0) * 10 / r) + " " + He((((s = (o = e.offset) == null ? void 0 : o.y) == null ? void 0 : s.value) || 0) * 10 / r) + " " + He(((a = e.blur) != null ? a : 2) * 10 / r) + ")";
}
let Ks;
function fo() {
return typeof matchMedia > "u" ? !1 : (Ks || (Ks = window.matchMedia("(prefers-reduced-motion)")), Ks.matches);
}
const Vh = 8, Ih = (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 > Vh) {
const u = new Error("Recursive layout in size_provider");
u.level = "warn", u.additional = {
widthVariableName: t,
heightVariableName: n
}, r.logError(u);
break;
}
await Vn();
}
}), i.observe(e)), i;
}, Ll = Symbol("enabled");
function Nn(e, r) {
return e === 1 || e === 0 || e === !1 || e === !0 ? !!e : r;
}
function ho(e) {
return [
e.state_description,
e.description,
e.hint
].filter(Boolean).join(", ");
}
const ga = 1, Li = 2;
function pa(e, r = 1) {
if (!(!e || typeof e.value != "number")) {
if (e.type === "translation-fixed")
return He(e.value * r);
if (e.type === "translation-percentage")
return `${e.value * r}%`;
}
}
function Lo(e, r = 1) {
if (!(!e || typeof e.value != "number")) {
if (e.type === "pivot-fixed")
return He(e.value * r);
if (e.type === "pivot-percentage")
return `${e.value * r}%`;
}
}
function Dh(e) {
return e.map((r) => {
if (r.type === "rotation") {
if (typeof r.angle == "number") {
const t = Lo(r.pivot_x) || "50%", n = Lo(r.pivot_y) || "50%", i = Lo(r.pivot_x, -1) || "-50%", o = Lo(r.pivot_y, -1) || "-50%";
return `translate(${t}, ${n}) rotate(${r.angle}deg) translate(${i}, ${o})`;
}
} else if (r.type === "translation") {
const t = pa(r.x) || 0, n = pa(r.y) || 0;
return `translate(${t}, ${n})`;
}
}).filter(Boolean).join(" ");
}
const ll = Symbol("visibility"), Fh = "divkit-ee5cc", ma = {
actionable__button: Fh
};
function Th() {
}
const Xi = Symbol("action");
function al(e) {
if (e.startsWith("tel:"))
return "tel";
if (e.startsWith("/"))
return "https";
const r = /^([^/]+):\/\//.exec(e);
return r && r[1] || "";
}
function ul(e, r) {
return r.has(e);
}
function Mh(e) {
var d;
let r, t, n, i, o, s;
const a = (
/*#slots*/
e[30].default
), l = Vs(
a,
e,
/*$$scope*/
e[29],
null
);
let u = [
{
class: t = /*cls*/
e[2] + " " + /*longTapActions*/
((d = e[1]) != null && d.length ? pr["root_disabled-context-menu"] : "") + " " + /*hasAnyActions*/
(e[13] ? pr["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 = Ti(c, u[_]);
return {
c() {
r = Pe("span"), l && l.c(), hi(r, c);
},
m(_, g) {
x(_, r, g), l && l.m(r, null), e[48](r), i = !0, o || (s = [
Ts(
/*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) && Ds(
l,
a,
_,
/*$$scope*/
_[29],
i ? Is(
a,
/*$$scope*/
_[29],
g,
null
) : Fs(
/*$$scope*/
_[29]
),
null
), hi(r, c = Ri(u, [
(!i || g[0] & /*cls, longTapActions, hasAnyActions*/
8198 && t !== (t = /*cls*/
_[2] + " " + /*longTapActions*/
((m = _[1]) != null && m.length ? pr["root_disabled-context-menu"] : "") + " " + /*hasAnyActions*/
(_[13] ? pr["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 || (q(l, _), i = !0);
},
o(_) {
se(l, _), i = !1;
},
d(_) {
_ && Q(r), l && l.d(_), e[48](null), o = !1, en(s);
}
};
}
function Ph(e) {
var d;
let r, t, n, i, o, s;
const a = (
/*#slots*/
e[30].default
), l = Vs(
a,
e,
/*$$scope*/
e[29],
null
);
let u = [
{
class: t = /*cls*/
e[2] + " " + ma.actionable__button + " " + pr["root__any-actions"] + ` ${/*isNativeActionAnimation*/
e[6] ? pr.root__clickable : pr["root__clickable-no-transition"]} ${pr.root__unselectable} ` + /*longTapActions*/
((d = e[1]) != null && d.length ? pr["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 === Li ? -1 : null
},
/*attrs*/
e[4]
], c = {};
for (let _ = 0; _ < u.length; _ += 1)
c = Ti(c, u[_]);
return {
c() {
r = Pe("button"), l && l.c(), hi(r, c);
},
m(_, g) {
x(_, r, g), l && l.m(r, null), r.autofocus && r.focus(), e[47](r), i = !0, o || (s = [
Ts(
/*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) && Ds(
l,
a,
_,
/*$$scope*/
_[29],
i ? Is(
a,
/*$$scope*/
_[29],
g,
null
) : Fs(
/*$$scope*/
_[29]
),
null
), hi(r, c = Ri(u, [
(!i || g[0] & /*cls, isNativeActionAnimation, longTapActions*/
70 && t !== (t = /*cls*/
_[2] + " " + ma.actionable__button + " " + pr["root__any-actions"] + ` ${/*isNativeActionAnimation*/
_[6] ? pr.root__clickable : pr["root__clickable-no-transition"]} ${pr.root__unselectable} ` + /*longTapActions*/
((m = _[1]) != null && m.length ? pr["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 === Li ? -1 : null)) && { tabindex: n },
g[0] & /*attrs*/
16 && /*attrs*/
_[4]
]));
},
i(_) {
i || (q(l, _), i = !0);
},
o(_) {
se(l, _), i = !1;
},
d(_) {
_ && Q(r), l && l.d(_), e[47](null), o = !1, en(s);
}
};
}
function Nh(e) {
var d;
let r, t, n, i, o, s;
const a = (
/*#slots*/
e[30].default
), l = Vs(
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] + " " + pr["root__any-actions"] + " " + /*isNativeActionAnimation*/
(e[6] ? pr.root__clickable : pr["root__clickable-no-transition"]) + " " + /*longTapActions*/
((d = e[1]) != null && d.length ? pr["root_disabled-context-menu"] : "")
},
{
tabindex: n = /*componentContext*/
e[0].fakeElement === Li ? -1 : null
},
/*attrs*/
e[4]
], c = {};
for (let _ = 0; _ < u.length; _ += 1)
c = Ti(c, u[_]);
return {
c() {
r = Pe("a"), l && l.c(), hi(r, c);
},
m(_, g) {
x(_, r, g), l && l.m(r, null), e[46](r), i = !0, o || (s = [
Ts(
/*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) && Ds(
l,
a,
_,
/*$$scope*/
_[29],
i ? Is(
a,
/*$$scope*/
_[29],
g,
null
) : Fs(
/*$$scope*/
_[29]
),
null
), hi(r, c = Ri(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] + " " + pr["root__any-actions"] + " " + /*isNativeActionAnimation*/
(_[6] ? pr.root__clickable : pr["root__clickable-no-transition"]) + " " + /*longTapActions*/
((m = _[1]) != null && m.length ? pr["root_disabled-context-menu"] : ""))) && { class: t },
(!i || g[0] & /*componentContext*/
1 && n !== (n = /*componentContext*/
_[0].fakeElement === Li ? -1 : null)) && { tabindex: n },
g[0] & /*attrs*/
16 && /*attrs*/
_[4]
]));
},
i(_) {
i || (q(l, _), i = !0);
},
o(_) {
se(l, _), i = !1;
},
d(_) {
_ && Q(r), l && l.d(_), e[46](null), o = !1, en(s);
}
};
}
function zh(e) {
let r, t, n, i;
const o = [Nh, Ph, Mh], 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 = hr();
},
m(l, u) {
s[r].m(l, u), x(l, n, u), i = !0;
},
p(l, u) {
let c = r;
r = a(l), r === c ? s[r].p(l, u) : (br(), se(s[c], 1, 1, () => {
s[c] = null;
}), yr(), t = s[r], t ? t.p(l, u) : (t = s[r] = o[r](l), t.c()), q(t, 1), t.m(n.parentNode, n));
},
i(l) {
i || (q(t), i = !0);
},
o(l) {
se(t), i = !1;
},
d(l) {
l && Q(n), s[r].d(l);
}
};
}
const ba = 8, ya = 400, Js = 400, Oh = /* @__PURE__ */ new Set(["button", "image", "checkbox", "radio", "header"]);
function wa(e) {
e.preventDefault();
}
function Lh(e, r, t) {
let n, i, o = D, s = () => (o(), o = B(n, (I) => t(28, i = I)), 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: w = void 0 } = r, { hoverEndActions: v = void 0 } = r, { cls: K = "" } = r, { style: X = null } = r, { attrs: R = void 0 } = r, { use: te = Th } = r, { customAction: ge = null } = r, { isNativeActionAnimation: G = !0 } = r, { hasInnerFocusable: Z = !1 } = r, { customAccessibility: oe = void 0 } = r, { captureFocusOnAction: T = !0 } = r;
const V = Jr(_n), P = Jr(Xi);
Ii(Xi, {
hasAction() {
return !!(P.hasAction() || d != null && d.length || (oe == null ? void 0 : oe.mode) === "exclude");
}
});
let L, we = "", tt, qe = -1, Te = -1, le = null, Ye = !1, Oe = !1, gt = !1, Qe, ot, me, Mt, ke = !1;
function Ve() {
return (i == null ? void 0 : i.some((I) => {
if (I != null && I.typed)
return !0;
const Ue = I == null ? void 0 : I.url;
if (!Ue)
return !1;
const Kt = al(Ue);
return Kt && !ul(Kt, V.getBuiltinProtocols());
})) || !1;
}
async function ve(I, Ue) {
d && (I && Ve() && I.preventDefault(), u.execAnyActions(d, { node: L, processUrls: Ue }));
}
async function re(I) {
if (P.hasAction() || I.button !== void 0 && I.button !== 0)
return;
const Ue = Date.now();
if (qe > 0 && Ue > qe + ya) {
I.preventDefault();
return;
}
if (_ != null && _.length && Te > 0 && Ue - Te < Js) {
I.preventDefault(), u.execAnyActions(_, { processUrls: !0, node: L }), Te = -1;
return;
}
if (Te = Ue, _ != null && _.length && qe > 0 && Ue < qe + Js) {
I.preventDefault(), clearTimeout(ot), ot = window.setTimeout(
() => {
ve(void 0, !0);
},
Js
);
return;
}
(ge == null ? void 0 : ge(I)) === !1 ? I.preventDefault() : ve(I, !1);
}
function Je(I) {
P.hasAction() || (le = { x: I.clientX, y: I.clientY }, Ye = !1, qe = Date.now(), Qe && clearTimeout(Qe), clearTimeout(ot), u.execAnyActions(m, { node: L }));
}
function et(I) {
le && (Math.abs(le.x - I.clientX) > ba || Math.abs(le.y - I.clientY) > ba) && (Ye = !0);
}
function Le(I) {
P.hasAction() || !le || qe < 0 || (!Ye && Date.now() - qe >= ya &&