UNPKG

@divkitframework/divkit

Version:
2,010 lines (2,009 loc) 717 kB
var Hd = Object.defineProperty; var Wd = (t, r, e) => r in t ? Hd(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e; var fr = (t, r, e) => Wd(t, typeof r != "symbol" ? r + "" : r, e); /*! DivKit v31.12.0 https://github.com/divkit/divkit @licence Apache-2.0 */ function D() { } const Hs = (t) => t; function lo(t, r) { for (const e in r) t[e] = r[e]; return ( /** @type {T & S} */ t ); } function Af(t) { return t(); } function _a() { return /* @__PURE__ */ Object.create(null); } function tn(t) { t.forEach(Af); } function Nr(t) { return typeof t == "function"; } function Ud(t, r) { return t != t ? r == r : t !== r || t && typeof t == "object" || typeof t == "function"; } let Qo; function Xn(t, r) { return t === r ? !0 : (Qo || (Qo = document.createElement("a")), Qo.href = r, t === Qo.href); } function Fr(t, r) { return t != t ? r == r : t !== r; } function Gd(t) { return Object.keys(t).length === 0; } function z(t, ...r) { if (t == null) { for (const n of r) n(void 0); return D; } const e = t.subscribe(...r); return e.unsubscribe ? () => e.unsubscribe() : e; } function qd(t) { let r; return z(t, (e) => r = e)(), r; } function pn(t, r, e) { t.$$.on_destroy.push(z(r, e)); } function Ws(t, r, e, n) { if (t) { const i = jf(t, r, e, n); return t[0](i); } } function jf(t, r, e, n) { return t[1] && n ? lo(e.ctx.slice(), t[1](n(r))) : e.ctx; } function Us(t, r, e, n) { if (t[2] && n) { const i = t[2](n(e)); 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 Gs(t, r, e, n, i, o) { if (i) { const s = jf(r, e, n, o); t.p(s, i); } } function qs(t) { if (t.ctx.length > 32) { const r = [], e = t.ctx.length / 32; for (let n = 0; n < e; n++) r[n] = -1; return r; } return -1; } function ll(t, r, e) { return t.set(e), r; } function Ys(t) { return t && Nr(t.destroy) ? t.destroy : D; } function ga(t) { const r = typeof t == "string" && t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/); return r ? [parseFloat(r[1]), r[2] || "px"] : [ /** @type {number} */ t, "px" ]; } const Cf = typeof window < "u"; let Wl = Cf ? () => window.performance.now() : () => Date.now(), Ul = Cf ? (t) => requestAnimationFrame(t) : D; const vo = /* @__PURE__ */ new Set(); function Sf(t) { vo.forEach((r) => { r.c(t) || (vo.delete(r), r.f()); }), vo.size !== 0 && Ul(Sf); } function Gl(t) { let r; return vo.size === 0 && Ul(Sf), { promise: new Promise((e) => { vo.add(r = { c: t, f: e }); }), abort() { vo.delete(r); } }; } const Pi = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : ( // @ts-ignore Node typings have this global ); let Js = !1; function Yd() { Js = !0; } function Jd() { Js = !1; } function Kd(t, r, e, n) { for (; t < r; ) { const i = t + (r - t >> 1); e(i) <= n ? t = i + 1 : r = i; } return t; } function Xd(t) { if (t.hydrate_init) return; t.hydrate_init = !0; let r = ( /** @type {ArrayLike<NodeEx2>} */ t.childNodes ); if (t.nodeName === "HEAD") { const l = []; for (let c = 0; c < r.length; c++) { const u = r[c]; u.claim_order !== void 0 && l.push(u); } r = l; } const e = new Int32Array(r.length + 1), n = new Int32Array(r.length); e[0] = -1; let i = 0; for (let l = 0; l < r.length; l++) { const c = r[l].claim_order, u = (i > 0 && r[e[i]].claim_order <= c ? i + 1 : Kd(1, i, (h) => r[e[h]].claim_order, c)) - 1; n[l] = e[u] + 1; const f = u + 1; e[f] = l, i = Math.max(f, i); } const o = [], s = []; let a = r.length - 1; for (let l = e[i] + 1; l != 0; l = n[l - 1]) { for (o.push(r[l - 1]); a >= l; a--) s.push(r[a]); a--; } for (; a >= 0; a--) s.push(r[a]); o.reverse(), s.sort((l, c) => l.claim_order - c.claim_order); for (let l = 0, c = 0; l < s.length; l++) { for (; c < o.length && s[l].claim_order >= o[c].claim_order; ) c++; const u = c < o.length ? o[c] : null; t.insertBefore(s[l], u); } } function Zd(t, r) { t.appendChild(r); } function Vf(t) { if (!t) return document; const r = t.getRootNode ? t.getRootNode() : t.ownerDocument; return r && /** @type {ShadowRoot} */ r.host ? ( /** @type {ShadowRoot} */ r ) : t.ownerDocument; } function Qd(t) { const r = Ve("style"); return r.textContent = "/* empty */", xd(Vf(t), r), r.sheet; } function xd(t, r) { return Zd( /** @type {Document} */ t.head || t, r ), r.sheet; } function Dt(t, r) { if (Js) { for (Xd(t), (t.actual_end_child === void 0 || t.actual_end_child !== null && t.actual_end_child.parentNode !== t) && (t.actual_end_child = t.firstChild); t.actual_end_child !== null && t.actual_end_child.claim_order === void 0; ) t.actual_end_child = t.actual_end_child.nextSibling; r !== t.actual_end_child ? (r.claim_order !== void 0 || r.parentNode !== t) && t.insertBefore(r, t.actual_end_child) : t.actual_end_child = r.nextSibling; } else (r.parentNode !== t || r.nextSibling !== null) && t.appendChild(r); } function $d(t, r, e) { t.insertBefore(r, e || null); } function ee(t, r, e) { Js && !e ? Dt(t, r) : (r.parentNode !== t || r.nextSibling != e) && t.insertBefore(r, e || null); } function A(t) { t.parentNode && t.parentNode.removeChild(t); } function gn(t, r) { for (let e = 0; e < t.length; e += 1) t[e] && t[e].d(r); } function Ve(t) { return document.createElement(t); } function cn(t) { return document.createElementNS("http://www.w3.org/2000/svg", t); } function Zn(t) { return document.createTextNode(t); } function wr() { return Zn(" "); } function Le() { return Zn(""); } function qe(t, r, e, n) { return t.addEventListener(r, e, n), () => t.removeEventListener(r, e, n); } function m(t, r, e) { e == null ? t.removeAttribute(r) : t.getAttribute(r) !== e && t.setAttribute(r, e); } const eh = ["width", "height"]; function fi(t, r) { const e = Object.getOwnPropertyDescriptors(t.__proto__); for (const n in r) r[n] == null ? t.removeAttribute(n) : n === "style" ? t.style.cssText = r[n] : n === "__value" ? t.value = t[n] = r[n] : e[n] && e[n].set && eh.indexOf(n) === -1 ? t[n] = r[n] : m(t, n, r[n]); } function th(t, r) { Object.keys(r).forEach((e) => { rh(t, e, r[e]); }); } function rh(t, r, e) { const n = r.toLowerCase(); n in t ? t[n] = typeof t[n] == "boolean" && e === "" ? !0 : e : r in t ? t[r] = typeof t[r] == "boolean" && e === "" ? !0 : e : m(t, r, e); } function pa(t) { return /-/.test(t) ? th : fi; } function ye(t) { return Array.from(t.childNodes); } function If(t) { t.claim_info === void 0 && (t.claim_info = { last_index: 0, total_claimed: 0 }); } function Df(t, r, e, n, i = !1) { If(t); const o = (() => { for (let s = t.claim_info.last_index; s < t.length; s++) { const a = t[s]; if (r(a)) { const l = e(a); return l === void 0 ? t.splice(s, 1) : t[s] = l, i || (t.claim_info.last_index = s), a; } } for (let s = t.claim_info.last_index - 1; s >= 0; s--) { const a = t[s]; if (r(a)) { const l = e(a); return l === void 0 ? t.splice(s, 1) : t[s] = l, i ? l === void 0 && t.claim_info.last_index-- : t.claim_info.last_index = s, a; } } return n(); })(); return o.claim_order = t.claim_info.total_claimed, t.claim_info.total_claimed += 1, o; } function Tf(t, r, e, n) { return Df( t, /** @returns {node is Element | SVGElement} */ (i) => i.nodeName === r, /** @param {Element} node */ (i) => { const o = []; for (let s = 0; s < i.attributes.length; s++) { const a = i.attributes[s]; e[a.name] || o.push(a.name); } o.forEach((s) => i.removeAttribute(s)); }, () => n(r) ); } function Fe(t, r, e) { return Tf(t, r, e, Ve); } function bn(t, r, e) { return Tf(t, r, e, cn); } function hi(t, r) { return Df( t, /** @returns {node is Text} */ (e) => e.nodeType === 3, /** @param {Text} node */ (e) => { const n = "" + r; if (e.data.startsWith(n)) { if (e.data.length !== n.length) return e.splitText(n.length); } else e.data = n; }, () => Zn(r), !0 // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements ); } function kr(t) { return hi(t, " "); } function ma(t, r, e) { for (let n = e; n < t.length; n += 1) { const i = t[n]; if (i.nodeType === 8 && i.textContent.trim() === r) return n; } return -1; } function ql(t, r) { const e = ma(t, "HTML_TAG_START", 0), n = ma(t, "HTML_TAG_END", e + 1); if (e === -1 || n === -1) return new wo(r); If(t); const i = t.splice(e, n - e + 1); A(i[0]), A(i[i.length - 1]); const o = i.slice(1, i.length - 1); if (o.length === 0) return new wo(r); for (const s of o) s.claim_order = t.claim_info.total_claimed, t.claim_info.total_claimed += 1; return new wo(r, o); } function Mi(t, r) { r = "" + r, t.data !== r && (t.data = /** @type {string} */ r); } function ba(t, r) { t.value = r == null ? "" : r; } function G(t, r, e, n) { e == null ? t.style.removeProperty(r) : t.style.setProperty(r, e, ""); } function ya(t, r, e) { for (let n = 0; n < t.options.length; n += 1) { const i = t.options[n]; if (i.__value === r) { i.selected = !0; return; } } (!e || r !== void 0) && (t.selectedIndex = -1); } function nh(t) { const r = t.querySelector(":checked"); return r && r.__value; } function Ff(t, r, { bubbles: e = !1, cancelable: n = !1 } = {}) { return new CustomEvent(t, { detail: r, bubbles: e, cancelable: n }); } class ih { constructor(r = !1) { /** * @private * @default false */ fr(this, "is_svg", !1); /** parent for creating node */ fr(this, "e"); /** html tag nodes */ fr(this, "n"); /** target */ fr(this, "t"); /** anchor */ fr(this, "a"); this.is_svg = r, this.e = this.n = null; } /** * @param {string} html * @returns {void} */ c(r) { this.h(r); } /** * @param {string} html * @param {HTMLElement | SVGElement} target * @param {HTMLElement | SVGElement} anchor * @returns {void} */ m(r, e, n = null) { this.e || (this.is_svg ? this.e = cn( /** @type {keyof SVGElementTagNameMap} */ e.nodeName ) : this.e = Ve( /** @type {keyof HTMLElementTagNameMap} */ e.nodeType === 11 ? "TEMPLATE" : e.nodeName ), this.t = e.tagName !== "TEMPLATE" ? e : ( /** @type {HTMLTemplateElement} */ e.content ), this.c(r)), this.i(n); } /** * @param {string} html * @returns {void} */ h(r) { this.e.innerHTML = r, this.n = Array.from( this.e.nodeName === "TEMPLATE" ? this.e.content.childNodes : this.e.childNodes ); } /** * @returns {void} */ i(r) { for (let e = 0; e < this.n.length; e += 1) $d(this.t, this.n[e], r); } /** * @param {string} html * @returns {void} */ p(r) { this.d(), this.h(r), this.i(this.a); } /** * @returns {void} */ d() { this.n.forEach(A); } } class wo extends ih { constructor(e = !1, n) { super(e); /** @type {Element[]} hydration claimed nodes */ fr(this, "l"); this.e = this.n = null, this.l = n; } /** * @param {string} html * @returns {void} */ c(e) { this.l ? this.n = this.l : super.c(e); } /** * @returns {void} */ i(e) { for (let n = 0; n < this.n.length; n += 1) ee(this.t, this.n[n], e); } } function va(t, r) { return new t(r); } const Vs = /* @__PURE__ */ new Map(); let Is = 0; function oh(t) { let r = 5381, e = t.length; for (; e--; ) r = (r << 5) - r ^ t.charCodeAt(e); return r >>> 0; } function sh(t, r) { const e = { stylesheet: Qd(r), rules: {} }; return Vs.set(t, e), e; } function Ds(t, r, e, n, i, o, s, a = 0) { const l = 16.666 / n; let c = `{ `; for (let E = 0; E <= 1; E += l) { const w = r + (e - r) * o(E); c += E * 100 + `%{${s(w, 1 - w)}} `; } const u = c + `100% {${s(e, 1 - e)}} }`, f = `__svelte_${oh(u)}_${a}`, h = Vf(t), { stylesheet: b, rules: y } = Vs.get(h) || sh(h, t); y[f] || (y[f] = !0, b.insertRule(`@keyframes ${f} ${u}`, b.cssRules.length)); const _ = t.style.animation || ""; return t.style.animation = `${_ ? `${_}, ` : ""}${f} ${n}ms linear ${i}ms 1 both`, Is += 1, f; } function Ts(t, r) { const e = (t.style.animation || "").split(", "), n = e.filter( r ? (o) => o.indexOf(r) < 0 : (o) => o.indexOf("__svelte") === -1 // remove all Svelte animations ), i = e.length - n.length; i && (t.style.animation = n.join(", "), Is -= i, Is || lh()); } function lh() { Ul(() => { Is || (Vs.forEach((t) => { const { ownerNode: r } = t.stylesheet; r && A(r); }), Vs.clear()); }); } let Ho; function Bo(t) { Ho = t; } function So() { if (!Ho) throw new Error("Function called outside component initialization"); return Ho; } function qn(t) { So().$$.on_mount.push(t); } function Ks(t) { So().$$.after_update.push(t); } function mn(t) { So().$$.on_destroy.push(t); } function ah() { const t = So(); return (r, e, { cancelable: n = !1 } = {}) => { const i = t.$$.callbacks[r]; if (i) { const o = Ff( /** @type {string} */ r, e, { cancelable: n } ); return i.slice().forEach((s) => { s.call(t, o); }), !o.defaultPrevented; } return !0; }; } function Zi(t, r) { return So().$$.context.set(t, r), r; } function Jr(t) { return So().$$.context.get(t); } function Si(t, r) { const e = t.$$.callbacks[r.type]; e && e.slice().forEach((n) => n.call(this, r)); } const mo = [], Or = []; let ko = []; const wa = [], Pf = /* @__PURE__ */ Promise.resolve(); let yl = !1; function Mf() { yl || (yl = !0, Pf.then(Nf)); } function Cn() { return Mf(), Pf; } function Un(t) { ko.push(t); } const al = /* @__PURE__ */ new Set(); let _o = 0; function Nf() { if (_o !== 0) return; const t = Ho; do { try { for (; _o < mo.length; ) { const r = mo[_o]; _o++, Bo(r), ch(r.$$); } } catch (r) { throw mo.length = 0, _o = 0, r; } for (Bo(null), mo.length = 0, _o = 0; Or.length; ) Or.pop()(); for (let r = 0; r < ko.length; r += 1) { const e = ko[r]; al.has(e) || (al.add(e), e()); } ko.length = 0; } while (mo.length); for (; wa.length; ) wa.pop()(); yl = !1, al.clear(), Bo(t); } function ch(t) { if (t.fragment !== null) { t.update(), tn(t.before_update); const r = t.dirty; t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, r), t.after_update.forEach(Un); } } function uh(t) { const r = [], e = []; ko.forEach((n) => t.indexOf(n) === -1 ? r.push(n) : e.push(n)), e.forEach((n) => n()), ko = r; } let zo; function Yl() { return zo || (zo = Promise.resolve(), zo.then(() => { zo = null; })), zo; } function $i(t, r, e) { t.dispatchEvent(Ff(`${r ? "intro" : "outro"}${e}`)); } const as = /* @__PURE__ */ new Set(); let yi; function gr() { yi = { r: 0, c: [], p: yi // parent group }; } function pr() { yi.r || tn(yi.c), yi = yi.p; } function Y(t, r) { t && t.i && (as.delete(t), t.i(r)); } function se(t, r, e, n) { if (t && t.o) { if (as.has(t)) return; as.add(t), yi.c.push(() => { as.delete(t), n && (e && t.d(1), n()); }), t.o(r); } else n && n(); } const Jl = { duration: 0 }; function Xs(t, r, e) { const n = { direction: "in" }; let i = r(t, e, n), o = !1, s, a, l = 0; function c() { s && Ts(t, s); } function u() { const { delay: h = 0, duration: b = 300, easing: y = Hs, tick: _ = D, css: E } = i || Jl; E && (s = Ds(t, 0, 1, b, h, y, E, l++)), _(0, 1); const w = Wl() + h, N = w + b; a && a.abort(), o = !0, Un(() => $i(t, !0, "start")), a = Gl((K) => { if (o) { if (K >= N) return _(1, 0), $i(t, !0, "end"), c(), o = !1; if (K >= w) { const J = y((K - w) / b); _(J, 1 - J); } } return o; }); } let f = !1; return { start() { f || (f = !0, Ts(t), Nr(i) ? (i = i(n), Yl().then(u)) : u()); }, invalidate() { f = !1; }, end() { o && (c(), o = !1); } }; } function Of(t, r, e) { const n = { direction: "out" }; let i = r(t, e, n), o = !0, s; const a = yi; a.r += 1; let l; function c() { const { delay: u = 0, duration: f = 300, easing: h = Hs, tick: b = D, css: y } = i || Jl; y && (s = Ds(t, 1, 0, f, u, h, y)); const _ = Wl() + u, E = _ + f; Un(() => $i(t, !1, "start")), "inert" in t && (l = /** @type {HTMLElement} */ t.inert, t.inert = !0), Gl((w) => { if (o) { if (w >= E) return b(0, 1), $i(t, !1, "end"), --a.r || tn(a.c), !1; if (w >= _) { const N = h((w - _) / f); b(1 - N, N); } } return o; }); } return Nr(i) ? Yl().then(() => { i = i(n), c(); }) : c(), { end(u) { u && "inert" in t && (t.inert = l), u && i.tick && i.tick(1, 0), o && (s && Ts(t, s), o = !1); } }; } function ka(t, r, e, n) { let o = r(t, e, { direction: "both" }), s = n ? 0 : 1, a = null, l = null, c = null, u; function f() { c && Ts(t, c); } function h(y, _) { const E = ( /** @type {Program['d']} */ y.b - s ); return _ *= Math.abs(E), { a: s, b: y.b, d: E, duration: _, start: y.start, end: y.start + _, group: y.group }; } function b(y) { const { delay: _ = 0, duration: E = 300, easing: w = Hs, tick: N = D, css: K } = o || Jl, J = { start: Wl() + _, b: y }; y || (J.group = yi, yi.r += 1), "inert" in t && (y ? u !== void 0 && (t.inert = u) : (u = /** @type {HTMLElement} */ t.inert, t.inert = !0)), a || l ? l = J : (K && (f(), c = Ds(t, s, y, E, _, w, K)), y && N(0, 1), a = h(J, E), Un(() => $i(t, y, "start")), Gl((Z) => { if (l && Z > l.start && (a = h(l, E), l = null, $i(t, a.b, "start"), K && (f(), c = Ds( t, s, a.b, a.duration, 0, w, o.css ))), a) { if (Z >= a.end) N(s = a.b, 1 - s), $i(t, a.b, "end"), l || (a.b ? f() : --a.group.r || tn(a.group.c)), a = null; else if (Z >= a.start) { const le = Z - a.start; s = a.a + a.d * w(le / a.duration), N(s, 1 - s); } } return !!(a || l); })); } return { run(y) { Nr(o) ? Yl().then(() => { o = o({ direction: y ? "in" : "out" }), b(y); }) : b(y); }, end() { f(), a = l = null; } }; } function ur(t) { return (t == null ? void 0 : t.length) !== void 0 ? t : Array.from(t); } function zf(t, r) { se(t, 1, 1, () => { r.delete(t.key); }); } function Lf(t, r, e, n, i, o, s, a, l, c, u, f) { let h = t.length, b = o.length, y = h; const _ = {}; for (; y--; ) _[t[y].key] = y; const E = [], w = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), K = []; for (y = b; y--; ) { const U = f(i, o, y), L = e(U); let H = s.get(L); H ? K.push(() => H.p(U, r)) : (H = c(L, U), H.c()), w.set(L, E[y] = H), L in _ && N.set(L, Math.abs(y - _[L])); } const J = /* @__PURE__ */ new Set(), Z = /* @__PURE__ */ new Set(); function le(U) { Y(U, 1), U.m(a, u), s.set(U.key, U), u = U.first, b--; } for (; h && b; ) { const U = E[b - 1], L = t[h - 1], H = U.key, S = L.key; U === L ? (u = U.first, h--, b--) : w.has(S) ? !s.has(H) || J.has(H) ? le(U) : Z.has(S) ? h-- : N.get(H) > N.get(S) ? (Z.add(H), le(U)) : (J.add(S), h--) : (l(L, s), h--); } for (; h--; ) { const U = t[h]; w.has(U.key) || l(U, s); } for (; b; ) le(E[b - 1]); return tn(K), E; } function Vo(t, r) { const e = {}, n = {}, i = { $$scope: 1 }; let o = t.length; for (; o--; ) { const s = t[o], a = r[o]; if (a) { for (const l in s) l in a || (n[l] = 1); for (const l in a) i[l] || (e[l] = a[l], i[l] = 1); t[o] = a; } else for (const l in s) i[l] = 1; } for (const s in n) s in e || (e[s] = void 0); return e; } function rr(t) { t && t.c(); } function or(t, r) { t && t.l(r); } function Qt(t, r, e) { const { fragment: n, after_update: i } = t.$$; n && n.m(r, e), Un(() => { const o = t.$$.on_mount.map(Af).filter(Nr); t.$$.on_destroy ? t.$$.on_destroy.push(...o) : tn(o), t.$$.on_mount = []; }), i.forEach(Un); } function xt(t, r) { const e = t.$$; e.fragment !== null && (uh(e.after_update), tn(e.on_destroy), e.fragment && e.fragment.d(r), e.on_destroy = e.fragment = null, e.ctx = []); } function fh(t, r) { t.$$.dirty[0] === -1 && (mo.push(t), Mf(), t.$$.dirty.fill(0)), t.$$.dirty[r / 31 | 0] |= 1 << r % 31; } function Kr(t, r, e, n, i, o, s = null, a = [-1]) { const l = Ho; Bo(t); const c = t.$$ = { fragment: null, ctx: [], // state props: o, update: D, not_equal: i, bound: _a(), // lifecycle on_mount: [], on_destroy: [], on_disconnect: [], before_update: [], after_update: [], context: new Map(r.context || (l ? l.$$.context : [])), // everything else callbacks: _a(), dirty: a, skip_bound: !1, root: r.target || l.$$.root }; s && s(c.root); let u = !1; if (c.ctx = e ? e(t, r.props || {}, (f, h, ...b) => { const y = b.length ? b[0] : h; return c.ctx && i(c.ctx[f], c.ctx[f] = y) && (!c.skip_bound && c.bound[f] && c.bound[f](y), u && fh(t, f)), h; }) : [], c.update(), u = !0, tn(c.before_update), c.fragment = n ? n(c.ctx) : !1, r.target) { if (r.hydrate) { Yd(); const f = ye(r.target); c.fragment && c.fragment.l(f), f.forEach(A); } else c.fragment && c.fragment.c(); r.intro && Y(t.$$.fragment), Qt(t, r.target, r.anchor), Jd(), Nf(); } Bo(l); } class Xr { constructor() { /** * ### PRIVATE API * * Do not use, may change at any time * * @type {any} */ fr(this, "$$"); /** * ### PRIVATE API * * Do not use, may change at any time * * @type {any} */ fr(this, "$$set"); } /** @returns {void} */ $destroy() { xt(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, e) { if (!Nr(e)) return D; const n = this.$$.callbacks[r] || (this.$$.callbacks[r] = []); return n.push(e), () => { const i = n.indexOf(e); i !== -1 && n.splice(i, 1); }; } /** * @param {Partial<Props>} props * @returns {void} */ $set(r) { this.$$set && !Gd(r) && (this.$$.skip_bound = !0, this.$$set(r), this.$$.skip_bound = !1); } } const dh = "4"; typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(dh); const go = []; function hh(t, r) { return { subscribe: Di(t, r).subscribe }; } function Di(t, r = D) { let e; const n = /* @__PURE__ */ new Set(); function i(a) { if (Ud(t, a) && (t = a, e)) { const l = !go.length; for (const c of n) c[1](), go.push(c, t); if (l) { for (let c = 0; c < go.length; c += 2) go[c][0](go[c + 1]); go.length = 0; } } } function o(a) { i(a(t)); } function s(a, l = D) { const c = [a, l]; return n.add(c), n.size === 1 && (e = r(i, o) || D), a(t), () => { n.delete(c), n.size === 0 && e && (e(), e = null); }; } return { set: i, update: o, subscribe: s }; } function to(t, r, e) { const n = !Array.isArray(t), i = n ? [t] : t; if (!i.every(Boolean)) throw new Error("derived() expects stores as input, got a falsy value"); const o = r.length < 2; return hh(e, (s, a) => { let l = !1; const c = []; let u = 0, f = D; const h = () => { if (u) return; f(); const y = r(n ? c[0] : c, s, a); o ? s(y) : f = Nr(y) ? y : D; }, b = i.map( (y, _) => z( y, (E) => { c[_] = E, u &= ~(1 << _), l && h(); }, () => { u |= 1 << _; } ) ); return l = !0, h(), function() { tn(b), f(), l = !1; }; }); } const _h = "divkit-6d515", gh = "divkit-27458", ph = "divkit-82db1", mh = "divkit-be734", bh = "divkit-9a652", dr = { root_platform_desktop: _h, root__clickable: gh, "root__clickable-no-transition": "divkit-3bb57", "root__any-actions": "divkit-ba614", root: ph, root__selectable: mh, root__unselectable: bh, "root__only-desktop": "divkit-316e7", "root_restrict-scroll": "divkit-0a135", "root_disabled-context-menu": "divkit-f5cb3" }, un = Symbol("root"); function Q(t, r = {}) { const e = t; return e.level = r.level || "error", r.additional && (e.additional = r.additional), e; } const yh = "divkit-bf0ea", vh = "divkit-27458", wh = "divkit-05991", kh = "divkit-80cac", Eh = "divkit-90c49", Ah = "divkit-b33bc", jh = "divkit-f6ff9", Fs = { outer: yh, root__clickable: vh, "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_content: wh, outer_height_content: kh, "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: Eh, outer_visibility_invisible: Ah, outer_visibility_gone: jh, "outer_has-action-animation": "divkit-4d4f3", "outer_has-custom-focus": "divkit-b630e" }; function Lt(t) { if (!t) return; let r = ""; for (const e in t) if (t.hasOwnProperty(e)) { if (!t[e] && t[e] !== 0) continue; r && (r += ";"), r += e + ":" + String(t[e]); } return r || void 0; } function Se(t) { if (typeof t != "number" && typeof t != "string" || !t) return "0"; const r = Number(t); return Number.isNaN(r) ? "0" : Math.ceil(r * 1e3) / 1e4 + "em"; } function dn(t) { let r = Se(t); return r === "0" && (r += "em"), r; } function Rf(t, r) { for (; t.length < r; ) t = "0" + t; return t; } function Tr(t, r = 1, e = "transparent") { if (t = (typeof t == "string" && t || "").toLowerCase(), t.charAt(0) !== "#") return e; const n = vi(t); return n ? (n.a *= r, Kl(n)) : e; } function Ch(t, r, e = "transparent") { if (t = (typeof t == "string" && t || "").toLowerCase(), t.charAt(0) !== "#") return e; const n = vi(t); return n ? (n.a = r, Kl(n)) : e; } function Kl(t) { return t.a === 255 ? `#${[t.r, t.g, t.b].map((r) => Rf(Math.round(r).toString(16), 2)).join("")}` : `rgba(${t.r},${t.g},${t.b},${(t.a / 255).toFixed(2)})`; } function vi(t) { const r = ( // #AARRGGBB t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i) || // #ARGB t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i) || // #RRGGBB t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i) || // #RGB t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i) ); if (r) { if (r.length === 5) { const [c, u, f, h, b] = r, y = f.length === 2 ? f : f + f, _ = h.length === 2 ? h : h + h, E = b.length === 2 ? b : b + b, w = u.length === 2 ? u : u + u; return { a: parseInt(w, 16), r: parseInt(y, 16), g: parseInt(_, 16), b: parseInt(E, 16) }; } const [e, 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 vl(t) { let r = String(t); return r.indexOf("&") > -1 && (r = r.replace(/&/g, "&amp;")), r.indexOf("<") > -1 && (r = r.replace(/</g, "&lt;")), r.indexOf(">") > -1 && (r = r.replace(/>/g, "&gt;")), r.indexOf('"') > -1 && (r = r.replace(/"/g, "&quot;")), r; } const Ei = Boolean; function Zs(t) { if (t.length === 1 && t[0].type === "solid") return Vh({ bg: t[0] }); const r = t.map((e) => { if (e.type === "solid") return Sh({ bg: e }); if (e.type === "gradient") return Ih({ bg: e }); if (e.type === "image") return Fh({ bg: e }); if (e.type === "radial_gradient") return Th({ bg: e }); }).filter(Ei).reverse().reduce(function(e, n) { return e.image.push(n.image), e.size.push(n.size || "auto"), e.position.push(n.pos || "50% 50%"), e; }, { image: [], size: [], position: [] }); return { image: r.image.join(","), size: r.size.join(","), position: r.position.join(",") }; } function Sh(t) { const r = Tr(t.bg.color || "transparent"); return { size: void 0, pos: void 0, image: `linear-gradient(to bottom,${r},${r})` }; } function Vh(t) { return { color: Tr(t.bg.color || "transparent"), size: "auto", position: "50% 50%" }; } function Bf(t) { return t.every((n) => n.color && typeof n.position == "number" && n.position >= 0 && n.position <= 1) ? t.sort((n, i) => Math.abs(n.position - i.position) < 1e-6 ? 0 : n.position - i.position).map((n) => `${Tr(n.color)} ${(n.position * 100).toFixed(2)}%`).join(",") : void 0; } function Ih(t) { var n, i, o, s; if (!Array.isArray((n = t.bg) == null ? void 0 : n.colors) && !Array.isArray((i = t.bg) == null ? void 0 : i.color_map)) return; const r = (o = t.bg.colors) == null ? void 0 : o.filter(Ei); if (!(r != null && r.length) && !((s = t.bg) != null && s.color_map)) return; let e; if (t.bg.color_map) { const a = Bf(t.bg.color_map); if (!a) return; e = "linear-gradient(" + (90 - Number(t.bg.angle || 0) + "deg") + "," + a + ")"; } else { if (!r) return; e = "linear-gradient(" + (90 - Number(t.bg.angle || 0) + "deg") + "," + r.map((a) => Tr(a)).join(",") + ")"; } return { size: void 0, pos: void 0, image: e }; } const Dh = { nearest_corner: "closest-corner", farthest_corner: "farthest-corner", nearest_side: "closest-side", farthest_side: "farthest-side" }; function Ea(t) { if (t && typeof t == "object" && "type" in t && t.value !== void 0) { if (t.type === "fixed") return dn(t.value); if (t.type === "relative") return `${Number(t.value) * 100}%`; } return "50%"; } function Th(t) { var a, l, c, u; if (!Array.isArray((a = t.bg) == null ? void 0 : a.colors) && !Array.isArray((l = t.bg) == null ? void 0 : l.color_map)) return; const r = (c = t.bg.colors) == null ? void 0 : c.filter(Ei); if (!(r != null && r.length) && !((u = t.bg) != null && u.color_map)) return; let e; if (t.bg.color_map ? e = Bf(t.bg.color_map) : r && (e = r.map((f) => Tr(f)).join(",")), !e) return; const n = t.bg.radius; let i; n && typeof n == "object" && "type" in n && n.value !== void 0 && (n.type === "fixed" ? i = dn(n.value) : n.type === "relative" && (i = Dh[n.value])); const o = Ea(t.bg.center_x), s = Ea(t.bg.center_y); return { size: void 0, pos: void 0, image: `radial-gradient(circle ${i || "farthest-corner"} at ${o} ${s},` + e + ")" }; } function Fh(t) { var e; const r = (e = t.bg) == null ? void 0 : e.image_url; if (r) return { size: Hf(t.bg.scale), pos: Wf(t.bg), image: 'url("' + vl(r) + '")' }; } function Hf(t) { return t === "fit" ? "contain" : t === "stretch" ? "fill" : t === "no_scale" ? "none" : "cover"; } function Wf(t) { let r, e; return t.content_alignment_horizontal === "left" ? r = "0%" : t.content_alignment_horizontal === "right" ? r = "100%" : r = "50%", t.content_alignment_vertical === "top" ? e = "0%" : t.content_alignment_vertical === "bottom" ? e = "100%" : e = "50%", r + " " + e; } function nn(t, r) { const e = Number(t); return Number.isNaN(e) || e < 0 ? r : e; } function Aa(t, r, e) { return typeof r == "number" && (t && r > 0 && r <= 100 || !t && r >= 0 && r < 100) ? r : e; } function Ph(t) { return t.is_enabled !== 0 && t.is_enabled !== !1 && t.index !== void 0; } function Mh(t, { visibilityActions: r, disappearActions: e, rootCtx: n, componentContext: i }) { const o = []; r && r.forEach((b) => { o.push({ type: "visibility", index: o.length, action: b, visible: !1, count: 0, finished: !1 }); }), e && e.forEach((b) => { o.push({ type: "disappear", index: o.length, action: b, // false, so disappear only works after the element becomes visible visible: !1, count: 0, finished: !1 }); }); const s = o.map((b, y) => { const _ = b.type === "visibility"; return i.getDerivedFromVars({ index: y, visibility_percentage: b.action.visibility_percentage, visibility_duration: _ ? b.action.visibility_duration : b.action.disappear_duration, log_limit: b.action.log_limit, is_enabled: b.action.is_enabled }, void 0, !0); }); let a; const l = () => { a && a.disconnect(), o.forEach((b) => { b.timer && clearTimeout(b.timer); }); }, c = to(s, (b) => b); let u; const f = (b) => { const y = b.type === "visibility", _ = i.getJsonWithVars(b.action); i.execAnyActions([_], { logType: y ? "visible" : "disappear", node: t, processUrls: !1 }); }, h = c.subscribe((b) => { u = b.filter(Ph); const y = {}; u.forEach((w) => { y[w.index] = w; }), l(); const _ = [...new Set(u.map((w) => { const N = o[w.index].type === "visibility"; return Aa( N, w.visibility_percentage, N ? 50 : 0 ) / 100; }))]; if (!_.length) return; const E = (w) => { w.forEach((N) => { u.forEach((K) => { const J = o[K.index], Z = J.type === "visibility", le = Aa( Z, K.visibility_percentage, Z ? 50 : 0 ); let U; le === 0 ? U = N.intersectionRatio >= 1e-12 : U = N.intersectionRatio >= le / 100, (Z ? !J.visible && U : J.visible && !U) ? J.finished || (J.timer = setTimeout(() => { ++J.count; const S = K.log_limit === 0 ? 1 / 0 : K.log_limit || 1; J.count >= S && (J.finished = !0), f(J); }, nn(K.visibility_duration, 800))) : (Z ? !U : U) && J.timer && clearTimeout(J.timer), J.visible = U; }); }); }; a = new IntersectionObserver(E, { threshold: _ }), a.observe(t); }); return { destroy() { u == null || u.forEach((b) => { const y = o[b.index]; !y || y.type !== "disappear" || !y.visible || y.finished || n.registerTimeout(window.setTimeout(() => { f(y); }, b.visibility_duration)); }), l(), h(); } }; } function ja(t, r) { r && t.push(r); } function yt(t, r, e) { const n = []; ja(n, r[t]); for (const i in e) if (e.hasOwnProperty(i)) { const o = e[i]; if (o) { const s = `${t}_${i}` + (typeof o == "string" ? `_${o}` : ""); ja(n, r[s]); } } return n.join(" "); } const Xl = Symbol("state"); function di(t, r) { var s, a; const e = t.top || 0, n = ((s = r === "ltr" ? t.end : t.start) != null ? s : t.right) || 0, i = t.bottom || 0, o = ((a = r === "ltr" ? t.start : t.end) != null ? a : t.left) || 0; return e === 0 && n === 0 && i === 0 && o === 0 ? "" : Se(e) + " " + Se(n) + " " + Se(i) + " " + Se(o); } function Qs(t) { if (typeof t != "number" && typeof t != "string") return !1; const r = Number(t); return !Number.isNaN(r); } function Tn(t) { return Qs(t) && t >= 0; } function Ps(t, r, e) { var i, o; if (!t) return e; const n = [ t.top, (i = r === "ltr" ? t.end : t.start) != null ? i : t.right, t.bottom, (o = r === "ltr" ? t.start : t.end) != null ? o : t.left ]; for (let s = 0; s < n.length; ++s) if (n[s] && !Tn(n[s])) return e; return di(t, r); } function Nh(t, r) { return !Tn(t) || t === void 0 || t > 1 ? r : Number(t); } const Oh = Object.prototype.hasOwnProperty; function Zl(t, r) { if (Object.is(t, r)) return !0; if (typeof t != "object" || t === null || typeof r != "object" || r === null) return Object.is(t, r); const e = Object.keys(t), n = Object.keys(r); if (e.length !== n.length) return !1; for (let i = 0; i < e.length; i++) { const o = e[i]; if (!Oh.call(r, o) || !Zl(t[o], r[o])) return !1; } return !0; } function Hi(t, r) { return Zl(t, r) ? r : t; } function zh(t, r) { return t === "visible" || t === "invisible" || t === "gone" ? t : r; } function Uf(t, r) { return t === "linear" || t === "ease" || t === "ease_in_out" || t === "ease_in" || t === "ease_out" ? t : r; } function yo(t, r) { const e = Number(t); return Number.isNaN(e) ? r : e; } function Ql(t) { const r = []; return t.name === "set" ? (t.items || []).forEach((e) => { r.push(...Ql(e)); }) : r.push(t), r; } function Io(t, r) { if (!t || typeof t != "object") return r; const e = [ "top", "right", "bottom", "left" ]; for (let n = 0; n < e.length; ++n) if (t[e[n]] && !Tn(t[e[n]])) return r; return t; } function Lh(t, r) { if (!t && !r) return {}; if (!r) return t; if (!t) return r; const e = {}; return [ "top", "right", "bottom", "left", "start", "end" ].forEach((n) => { const i = t[n]; i && (e[n] = i); const o = r[n]; o && (e[n] = (e[n] || 0) + o); }), e; } function Rh(t, r) { const e = [ t["top-left"], t["top-right"], t["bottom-right"], t["bottom-left"] ]; for (let n = 0; n < e.length; ++n) if (e[n] && !Tn(e[n])) return r; return t; } function cs(t, r = 0, e = 10) { return [ t["top-left"], t["top-right"], t["bottom-right"], t["bottom-left"] ].map((n) => Se((n || r) / e * 10)).join(" "); } function Bh(t) { var r, e, n, i, o, s; return Se(((e = (r = t.offset) == null ? void 0 : r.x) == null ? void 0 : e.value) || 0) + " " + Se(((i = (n = t.offset) == null ? void 0 : n.y) == null ? void 0 : i.value) || 0) + " " + Se((o = t.blur) != null ? o : 2) + " " + Tr(t.color || "#000000", (s = t.alpha) != null ? s : 0.19); } function Hh(t, r) { var e, n, i, o, s, a; return "drop-shadow(" + Tr(t.color || "#000000", (e = t.alpha) != null ? e : 0.19) + " " + Se((((i = (n = t.offset) == null ? void 0 : n.x) == null ? void 0 : i.value) || 0) * 10 / r) + " " + Se((((s = (o = t.offset) == null ? void 0 : o.y) == null ? void 0 : s.value) || 0) * 10 / r) + " " + Se(((a = t.blur) != null ? a : 2) * 10 / r) + ")"; } function Ln(t) { return t.is_enabled !== 0 && t.is_enabled !== !1; } let cl; function xs() { return typeof matchMedia > "u" ? !1 : (cl || (cl = window.matchMedia("(prefers-reduced-motion)")), cl.matches); } const Wh = 8, Uh = (t, r, e, n) => { let i; return (e || n) && typeof ResizeObserver < "u" && (i = new ResizeObserver(async () => { let o = 0; const s = {}, a = (c, u) => { if (c) { const f = r.getVariable(c, "integer"); if (f) { if (u = Math.round(u), s[c] || (s[c] = /* @__PURE__ */ new Set()), !s[c].has(u)) return f.setValue(u), s[c].add(u), !0; } else { const h = new Error("Missing variable"); h.level = "error", h.additional = { variableName: c }, r.logError(h); } } return !1; }, l = () => { if (!t) return !1; const c = t.getBoundingClientRect(), u = a(e, c.width), f = a(n, c.height); return u || f; }; for (; l(); ) { if (++o > Wh) { const c = new Error("Recursive layout in size_provider"); c.level = "warn", c.additional = { widthVariableName: e, heightVariableName: n }, r.logError(c); break; } await Cn(); } }), i.observe(t)), i; }, xl = Symbol("enabled"); function Dn(t, r) { return t === 1 || t === 0 || t === !1 || t === !0 ? !!t : r; } function Ao(t) { return [ t.state_description, t.description, t.hint ].filter(Boolean).join(", "); } const Gh = "divkit-ee5cc", Ca = { actionable__button: Gh }; function qh() { } const ro = Symbol("action"); function wl(t) { if (t.startsWith("tel:")) return "tel"; const r = /^([^/]+):\/\//.exec(t); return r && r[1] || ""; } function kl(t, r) { return r.has(t); } function Yh(t) { var f; let r, e, n, i, o, s; const a = ( /*#slots*/ t[28].default ), l = Ws( a, t, /*$$scope*/ t[27], null ); let c = [ { class: e = /*cls*/ t[1] + " " + /*longTapActions*/ ((f = t[0]) != null && f.length ? dr["root_disabled-context-menu"] : "") + " " + /*hasAnyActions*/ (t[12] ? dr["root__any-actions"] : "") }, { style: ( /*style*/ t[2] ) }, { role: ( /*role*/ t[9] ) }, { "aria-checked": ( /*isChecked*/ t[13] ) }, { "aria-hidden": n = /*ariaHidden*/ t[10] || void 0 }, /*attrs*/ t[3] ], u = {}; for (let h = 0; h < c.length; h += 1) u = lo(u, c[h]); return { c() { r = Ve("span"), l && l.c(), this.h(); }, l(h) { r = Fe(h, "SPAN", { class: !0, style: !0, role: !0, "aria-checked": !0, "aria-hidden": !0 }); var b = ye(r); l && l.l(b), b.forEach(A), this.h(); }, h() { fi(r, u); }, m(h, b) { ee(h, r, b), l && l.m(r, null), t[40](r), i = !0, o || (s = [ Ys( /*use*/ t[4].call(null, r) ), qe( r, "click", /*click_handler_2*/ t[35] ), qe( r, "keydown", /*onKeydown*/ t[14] ), qe( r, "focus", /*focus_handler_2*/ t[36] ), qe( r, "blur", /*blur_handler_2*/ t[37] ) ], o = !0); }, p(h, b) { var y; l && l.p && (!i || b[0] & /*$$scope*/ 134217728) && Gs( l, a, h, /*$$scope*/ h[27], i ? Us( a, /*$$scope*/ h[27], b, null ) : qs( /*$$scope*/ h[27] ), null ), fi(r, u = Vo(c, [ (!i || b[0] & /*cls, longTapActions, hasAnyActions*/ 4099 && e !== (e = /*cls*/ h[1] + " " + /*longTapActions*/ ((y = h[0]) != null && y.length ? dr["root_disabled-context-menu"] : "") + " " + /*hasAnyActions*/ (h[12] ? dr["root__any-actions"] : ""))) && { class: e }, (!i || b[0] & /*style*/ 4) && { style: ( /*style*/ h[2] ) }, (!i || b[0] & /*role*/ 512) && { role: ( /*role*/ h[9] ) }, (!i || b[0] & /*isChecked*/ 8192) && { "aria-checked": ( /*isChecked*/ h[13] ) }, (!i || b[0] & /*ariaHidden*/ 1024 && n !== (n = /*ariaHidden*/ h[10] || void 0)) && { "aria-hidden": n }, b[0] & /*attrs*/ 8 && /*attrs*/ h[3] ])); }, i(h) { i || (Y(l, h), i = !0); }, o(h) { se(l, h), i = !1; }, d(h) { h && A(r), l && l.d(h), t[40](null), o = !1, tn(s); } }; } function Jh(t) { var u; let r, e, n, i, o; const s = ( /*#slots*/ t[28].default ), a = Ws( s, t, /*$$scope*/ t[27], null ); let l = [ { class: e = /*cls*/ t[1] + " " + Ca.actionable__button + " " + dr["root__any-actions"] + ` ${/*isNativeActionAnimation*/ t[5] ? dr.root__clickable : dr["root__clickable-no-transition"]} ${dr.root__unselectable} ` + /*longTapActions*/ ((u = t[0]) != null && u.length ? dr["root_disabled-context-menu"] : "") }, { style: ( /*style*/ t[2] ) }, { role: ( /*role*/ t[9] ) }, { "aria-checked": ( /*isChecked*/ t[13] ) }, { type: "button" }, /*attrs*/ t[3] ], c = {}; for (let f = 0; f < l.length; f += 1) c = lo(c, l[f]); return { c() { r = Ve("button"), a && a.c(), this.h(); }, l(f) { r = Fe(f, "BUTTON", { class: !0, style: !0, role: !0, "aria-checked": !0, type: !0 }); var h = ye(r); a && a.l(h), h.forEach(A), this.h(); }, h() { fi(r, c); }, m(f, h) { ee(f, r, h), a && a.m(r, null), r.autofocus && r.focus(), t[39](r), n = !0, i || (o = [ Ys( /*use*/ t[4].call(null, r) ), qe( r, "click", /*click_handler_1*/ t[32] ), qe( r, "keydown", /*onKeydown*/ t[14] ), qe( r, "focus", /*focus_handler_1*/ t[33] ), qe( r, "blur", /*blur_handler_1*/ t[34] ) ], i = !0); }, p(f, h) { var b; a && a.p && (!n || h[0] & /*$$scope*/ 134217728) && Gs( a, s, f, /*$$scope*/ f[27], n ? Us( s, /*$$scope*/ f[27], h, null ) : qs( /*$$scope*/ f[27] ), null ), fi(r, c = Vo(l, [ (!n || h[0] & /*cls, isNativeActionAnimation, longTapActions*/ 35 && e !== (e = /*cls*/ f[1] + " " + Ca.actionable__button + " " + dr["root__any-actions"] + ` ${/*isNativeActionAnimation*/ f[5] ? dr.root__clickable : dr["root__clickable-no-transition"]} ${dr.root__unselectable} ` + /*longTapActions*/ ((b = f[0]) != null && b.length ? dr["root_disabled-context-menu"] : ""))) && { class: e }, (!n || h[0] & /*style*/ 4) && { style: ( /*style*/ f[2] ) }, (!n || h[0] & /*role*/ 512) && { role: ( /*role*/ f[9] ) }, (!n || h[0] & /*isChecked*/ 8192) && { "aria-checked": ( /*isChecked*/ f[13] ) }, { type: "button" }, h[0] & /*attrs*/ 8 && /*attrs*/ f[3] ])); }, i(f) { n || (Y(a, f), n = !0); }, o(f) { se(a, f), n = !1; }, d(f) { f && A(r), a && a.d(f), t[39](null), i = !1, tn(o); } }; } function Kh(t) { var u; let r, e, n, i, o; const s = ( /*#slots*/ t[28].default ), a = Ws( s, t, /*$$scope*/ t[27], null ); let l = [ { href: ( /*href*/ t[7] ) }, { target: ( /*target*/ t[11] ) }, { style: ( /*style*/ t[2] ) }, { role: ( /*role*/ t[9] ) }, { "aria-checked": ( /*isChecked*/ t[13] ) }, { class: e = /*cls*/ t[1] + " " + dr["root__any-actions"] + " " + /*isNativeActionAnimation*/ (t[5] ? dr.root__clickable : dr["root__clickable-no-transition"]) + " " + /*longTapActions*/ ((u = t[0]) != null && u.length ? dr["root_disabled-context-menu"] : "") }, /*attrs*/ t[3] ], c = {}; for (let f = 0; f < l.length; f += 1) c = lo(c, l[f]); return { c() { r = Ve("a"), a && a.c(), this.h(); }, l(f) { r = Fe(f, "A", { href: !0, target: !0, style: !0, role: !0, "aria-checked": !0, class: !0 }); var h = ye(r); a && a.l(h), h.forEach(A), this.h(); }, h() { fi(r, c); }, m(f, h) { ee(f, r, h), a && a.m(r, null), t[38](r), n = !0, i || (o = [ Ys( /*use*/ t[4].call(null, r) ), qe( r, "click", /*click_handler*/ t[29] ), qe( r, "keydown", /*onKeydown*/ t[14] ), qe( r, "focus", /*focus_handler*/ t[30] ), qe( r, "blur", /*blur_handler*/ t[31] ) ], i = !0); }, p(f, h) { var b; a && a.p && (!n || h[0] & /*$$scope*/ 134217728) && Gs( a, s, f, /*$$scope*/ f[27], n ? Us( s, /*$$scope*/ f[27], h, null ) : qs( /*$$scope*/ f[27]