2023-09-05 09:25:47 +02:00
|
|
|
//deka-dom-el library is available via global namespace `dde`
|
|
|
|
(()=> {
|
|
|
|
// src/helpers.js
|
2023-09-08 10:52:45 +02:00
|
|
|
function m(e) {
|
2023-09-05 09:25:47 +02:00
|
|
|
let t = typeof e;
|
|
|
|
return t !== "object" ? t : e === null ? "null" : Object.prototype.toString.call(e);
|
|
|
|
}
|
|
|
|
|
|
|
|
// src/signals-common.js
|
2023-09-07 17:35:23 +02:00
|
|
|
var b = {
|
2023-09-05 09:25:47 +02:00
|
|
|
isReactiveAtrribute(e, t) {
|
|
|
|
return !1;
|
|
|
|
},
|
|
|
|
isTextContent(e) {
|
2023-09-08 10:52:45 +02:00
|
|
|
return m(e) !== "[object Object]";
|
2023-09-05 09:25:47 +02:00
|
|
|
},
|
2023-09-08 10:52:45 +02:00
|
|
|
processReactiveAttribute(e, t, r, n) {
|
2023-09-05 09:25:47 +02:00
|
|
|
return !1;
|
|
|
|
},
|
|
|
|
reactiveElement(e, ...t) {
|
2023-09-07 13:52:09 +02:00
|
|
|
return null;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
|
|
|
};
|
2023-09-08 10:52:45 +02:00
|
|
|
function L(e, t = !0) {
|
2023-09-07 17:35:23 +02:00
|
|
|
return t ? Object.assign(b, e) : (Object.setPrototypeOf(e, b), e);
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-07 13:52:09 +02:00
|
|
|
function j(e) {
|
2023-09-07 17:35:23 +02:00
|
|
|
return b.isPrototypeOf(e) && e !== b ? e : b;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// src/dom.js
|
2023-09-08 10:52:45 +02:00
|
|
|
var w = "html";
|
|
|
|
function ee(e) {
|
|
|
|
return w = e === "svg" ? "http://www.w3.org/2000/svg" : e, {
|
2023-09-05 09:25:47 +02:00
|
|
|
append(t) {
|
2023-09-08 10:52:45 +02:00
|
|
|
return w = "html", t;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function te(e, t, ...r) {
|
|
|
|
let n = j(this), o;
|
2023-09-05 09:25:47 +02:00
|
|
|
if (e === "<>") {
|
2023-09-08 10:52:45 +02:00
|
|
|
if (n.isReactiveAtrribute(t))
|
|
|
|
return n.reactiveElement(t, ...r);
|
2023-09-05 09:25:47 +02:00
|
|
|
o = document.createDocumentFragment();
|
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
switch (n.isTextContent(t) && (t = { textContent: t }), !0) {
|
2023-09-05 09:25:47 +02:00
|
|
|
case typeof e == "function":
|
|
|
|
o = e(t || void 0);
|
|
|
|
break;
|
|
|
|
case e === "#text":
|
2023-09-07 13:52:09 +02:00
|
|
|
o = A(document.createTextNode(""), t);
|
2023-09-05 09:25:47 +02:00
|
|
|
break;
|
2023-09-08 10:52:45 +02:00
|
|
|
case w !== "html":
|
|
|
|
o = A(document.createElementNS(w, e), t);
|
2023-09-05 09:25:47 +02:00
|
|
|
break;
|
2023-09-06 14:54:28 +02:00
|
|
|
case !o:
|
2023-09-07 13:52:09 +02:00
|
|
|
o = A(document.createElement(e), t);
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
return r.forEach((a) => a(o)), o;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-07 13:52:09 +02:00
|
|
|
var x = new Map(JSON.parse('[["#text,textContent",true],["HTMLElement,textContent",true],["HTMLElement,className",true]]'));
|
|
|
|
function A(e, ...t) {
|
2023-09-08 10:52:45 +02:00
|
|
|
let r = j(this);
|
2023-09-05 09:25:47 +02:00
|
|
|
if (!t.length)
|
|
|
|
return e;
|
2023-09-08 10:52:45 +02:00
|
|
|
let n = e instanceof SVGElement, o = (n ? q : P).bind(null, e, "Attribute");
|
2023-09-08 15:57:51 +02:00
|
|
|
return Object.entries(Object.assign({}, ...t)).forEach(function a([i, s]) {
|
|
|
|
r.isReactiveAtrribute(s, i) && (s = r.processReactiveAttribute(e, i, s, a));
|
|
|
|
let [h] = i;
|
2023-09-08 10:52:45 +02:00
|
|
|
if (h === "=")
|
2023-09-08 15:57:51 +02:00
|
|
|
return o(i.slice(1), s);
|
2023-09-08 10:52:45 +02:00
|
|
|
if (h === ".")
|
2023-09-08 15:57:51 +02:00
|
|
|
return N(e, i.slice(1), s);
|
2023-09-08 10:52:45 +02:00
|
|
|
if (typeof s == "object")
|
2023-09-08 15:57:51 +02:00
|
|
|
switch (i) {
|
2023-09-05 09:25:47 +02:00
|
|
|
case "style":
|
2023-09-08 10:52:45 +02:00
|
|
|
return y(s, P.bind(null, e.style, "Property"));
|
2023-09-05 09:25:47 +02:00
|
|
|
case "dataset":
|
2023-09-08 10:52:45 +02:00
|
|
|
return y(s, N.bind(null, e.dataset));
|
2023-09-05 09:25:47 +02:00
|
|
|
case "ariaset":
|
2023-09-08 10:52:45 +02:00
|
|
|
return y(s, (E, v) => o("aria-" + E, v));
|
2023-09-05 09:25:47 +02:00
|
|
|
case "classList":
|
2023-09-08 15:57:51 +02:00
|
|
|
return $(e, s);
|
2023-09-05 09:25:47 +02:00
|
|
|
default:
|
2023-09-08 15:57:51 +02:00
|
|
|
return Reflect.set(e, i, s);
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 15:57:51 +02:00
|
|
|
if (/(aria|data)([A-Z])/.test(i))
|
|
|
|
return i = i.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), o(i, s);
|
|
|
|
switch (i) {
|
|
|
|
case "href":
|
|
|
|
return o(i, s);
|
2023-09-05 09:25:47 +02:00
|
|
|
case "xlink:href":
|
2023-09-08 15:57:51 +02:00
|
|
|
return o(i, s, "http://www.w3.org/1999/xlink");
|
2023-09-05 09:25:47 +02:00
|
|
|
case "textContent":
|
2023-09-08 10:52:45 +02:00
|
|
|
if (!n)
|
2023-09-05 09:25:47 +02:00
|
|
|
break;
|
2023-09-08 10:52:45 +02:00
|
|
|
return e.appendChild(document.createTextNode(s));
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 15:57:51 +02:00
|
|
|
return k(e, i) ? N(e, i, s) : o(i, s);
|
2023-09-05 09:25:47 +02:00
|
|
|
}), e;
|
|
|
|
}
|
2023-09-08 15:57:51 +02:00
|
|
|
function $(e, t) {
|
2023-09-07 17:35:23 +02:00
|
|
|
return typeof t != "object" || y(
|
2023-09-05 09:25:47 +02:00
|
|
|
t,
|
2023-09-08 10:52:45 +02:00
|
|
|
(r, n) => e.classList.toggle(r, n === -1 ? void 0 : !!n)
|
2023-09-05 09:25:47 +02:00
|
|
|
), e;
|
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function ne(e) {
|
2023-09-05 09:25:47 +02:00
|
|
|
return Array.from(e.children).forEach((t) => t.remove()), e;
|
|
|
|
}
|
2023-09-08 15:57:51 +02:00
|
|
|
function k(e, t) {
|
2023-09-08 10:52:45 +02:00
|
|
|
let r = "HTMLElement," + t;
|
|
|
|
if (e instanceof HTMLElement && x.has(r))
|
2023-09-07 13:52:09 +02:00
|
|
|
return x.get(r);
|
2023-09-08 10:52:45 +02:00
|
|
|
let n = e.nodeName + "," + t;
|
|
|
|
if (x.has(n))
|
|
|
|
return x.get(n);
|
2023-09-08 15:57:51 +02:00
|
|
|
let [o, a, i] = T(e, t), s = !_(o.set);
|
|
|
|
return (!s || a) && x.set(i === HTMLElement.prototype ? r : n, s), s;
|
2023-09-06 14:54:28 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function T(e, t, r = 0) {
|
2023-09-06 14:54:28 +02:00
|
|
|
if (e = Object.getPrototypeOf(e), !e)
|
2023-09-08 10:52:45 +02:00
|
|
|
return [{}, r, e];
|
|
|
|
let n = Object.getOwnPropertyDescriptor(e, t);
|
|
|
|
return n ? [n, r, e] : T(e, t, r + 1);
|
2023-09-06 14:54:28 +02:00
|
|
|
}
|
2023-09-07 17:35:23 +02:00
|
|
|
function y(e, t) {
|
2023-09-08 10:52:45 +02:00
|
|
|
return Object.entries(e).forEach(([r, n]) => t(r, n));
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function _(e) {
|
2023-09-05 09:25:47 +02:00
|
|
|
return typeof e > "u";
|
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function P(e, t, r, n) {
|
|
|
|
return e[(_(n) ? "remove" : "set") + t](r, n);
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function q(e, t, r, n, o = null) {
|
|
|
|
return e[(_(n) ? "remove" : "set") + t + "NS"](o, r, n);
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function N(e, t, r) {
|
|
|
|
return Reflect.set(e, t, r);
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// src/events.js
|
2023-09-08 10:52:45 +02:00
|
|
|
function M(e, t, r) {
|
|
|
|
return (n) => (n.addEventListener(e, t, r), n);
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
var O = W();
|
|
|
|
M.connected = function(e, t) {
|
|
|
|
return function(n) {
|
|
|
|
O.onConnected(n, e), t && t.signal && t.signal.addEventListener("abort", () => O.offConnected(n, e));
|
2023-09-05 09:25:47 +02:00
|
|
|
};
|
|
|
|
};
|
2023-09-08 10:52:45 +02:00
|
|
|
M.disconnected = function(e, t) {
|
|
|
|
return function(n) {
|
|
|
|
O.onDisconnected(n, e), t && t.signal && t.signal.addEventListener("abort", () => O.offDisconnected(n, e));
|
2023-09-05 09:25:47 +02:00
|
|
|
};
|
|
|
|
};
|
2023-09-08 10:52:45 +02:00
|
|
|
function W() {
|
|
|
|
let e = /* @__PURE__ */ new Map(), t = !1, r = new MutationObserver(function(c) {
|
2023-09-08 15:57:51 +02:00
|
|
|
for (let f of c)
|
|
|
|
if (f.type === "childList") {
|
|
|
|
if (E(f.addedNodes, !0)) {
|
|
|
|
i();
|
2023-09-05 09:25:47 +02:00
|
|
|
continue;
|
|
|
|
}
|
2023-09-08 15:57:51 +02:00
|
|
|
v(f.removedNodes, !0) && i();
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
return {
|
2023-09-08 15:57:51 +02:00
|
|
|
onConnected(c, f) {
|
|
|
|
a(), o(c).connected.push(f);
|
2023-09-05 09:25:47 +02:00
|
|
|
},
|
2023-09-08 15:57:51 +02:00
|
|
|
offConnected(c, f) {
|
2023-09-05 09:25:47 +02:00
|
|
|
if (!e.has(c))
|
|
|
|
return;
|
2023-09-08 10:52:45 +02:00
|
|
|
let u = e.get(c), l = u.connected;
|
2023-09-08 15:57:51 +02:00
|
|
|
l.splice(l.indexOf(f), 1), n(c, u);
|
2023-09-05 09:25:47 +02:00
|
|
|
},
|
2023-09-08 15:57:51 +02:00
|
|
|
onDisconnected(c, f) {
|
|
|
|
a(), o(c).disconnected.push(f);
|
2023-09-05 09:25:47 +02:00
|
|
|
},
|
2023-09-08 15:57:51 +02:00
|
|
|
offDisconnected(c, f) {
|
2023-09-05 09:25:47 +02:00
|
|
|
if (!e.has(c))
|
|
|
|
return;
|
2023-09-08 10:52:45 +02:00
|
|
|
let u = e.get(c), l = u.disconnected;
|
2023-09-08 15:57:51 +02:00
|
|
|
l.splice(l.indexOf(f), 1), n(c, u);
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
|
|
|
};
|
2023-09-08 15:57:51 +02:00
|
|
|
function n(c, f) {
|
|
|
|
f.connected.length || f.disconnect.length || (e.delete(c), i());
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
|
|
|
function o(c) {
|
|
|
|
if (e.has(c))
|
|
|
|
return e.get(c);
|
2023-09-08 15:57:51 +02:00
|
|
|
let f = { connected: [], disconnected: [] };
|
|
|
|
return e.set(c, f), f;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-07 13:52:09 +02:00
|
|
|
function a() {
|
2023-09-08 10:52:45 +02:00
|
|
|
t || (t = !0, r.observe(document.body, { childList: !0, subtree: !0 }));
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 15:57:51 +02:00
|
|
|
function i() {
|
2023-09-08 10:52:45 +02:00
|
|
|
!t || e.size || (t = !1, r.disconnect());
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function s() {
|
2023-09-05 09:25:47 +02:00
|
|
|
return new Promise(function(c) {
|
|
|
|
(requestIdleCallback || requestAnimationFrame)(c);
|
|
|
|
});
|
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
async function h(c) {
|
|
|
|
e.size > 30 && await s();
|
2023-09-08 15:57:51 +02:00
|
|
|
let f = [];
|
2023-09-05 09:25:47 +02:00
|
|
|
if (!(c instanceof Node))
|
2023-09-08 15:57:51 +02:00
|
|
|
return f;
|
2023-09-07 17:35:23 +02:00
|
|
|
for (let u of e.keys())
|
2023-09-08 15:57:51 +02:00
|
|
|
u === c || !(u instanceof Node) || c.contains(u) && f.push(u);
|
|
|
|
return f;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 15:57:51 +02:00
|
|
|
function E(c, f) {
|
2023-09-07 17:35:23 +02:00
|
|
|
for (let u of c) {
|
2023-09-08 15:57:51 +02:00
|
|
|
if (f && h(u).then(E), !e.has(u))
|
2023-09-05 09:25:47 +02:00
|
|
|
return !1;
|
2023-09-08 10:52:45 +02:00
|
|
|
let l = e.get(u);
|
|
|
|
return l.connected.forEach((C) => C(u)), l.connected.length = 0, l.disconnected.length || e.delete(u), !0;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
|
|
|
}
|
2023-09-08 15:57:51 +02:00
|
|
|
function v(c, f) {
|
2023-09-07 17:35:23 +02:00
|
|
|
for (let u of c) {
|
2023-09-08 15:57:51 +02:00
|
|
|
if (f && h(u).then(v), !e.has(u))
|
2023-09-05 09:25:47 +02:00
|
|
|
return !1;
|
2023-09-08 10:52:45 +02:00
|
|
|
let l = e.get(u);
|
|
|
|
return l.disconnected.forEach((C) => C(u)), l.connected.length = 0, l.disconnected.length = 0, e.delete(u), !0;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// index.js
|
|
|
|
[HTMLElement, DocumentFragment].forEach((e) => {
|
|
|
|
let { append: t } = e.prototype;
|
2023-09-08 10:52:45 +02:00
|
|
|
e.prototype.append = function(...r) {
|
|
|
|
return t.apply(this, r), this;
|
2023-09-05 09:25:47 +02:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
// src/signals-lib.js
|
2023-09-08 10:52:45 +02:00
|
|
|
var d = Symbol.for("Signal");
|
2023-09-07 17:35:23 +02:00
|
|
|
function R(e) {
|
2023-09-05 09:25:47 +02:00
|
|
|
try {
|
2023-09-08 10:52:45 +02:00
|
|
|
return Reflect.has(e, d);
|
2023-09-05 09:25:47 +02:00
|
|
|
} catch {
|
|
|
|
return !1;
|
|
|
|
}
|
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
var p = /* @__PURE__ */ new WeakMap();
|
|
|
|
function g(e, t) {
|
2023-09-05 09:25:47 +02:00
|
|
|
if (typeof e != "function")
|
2023-09-08 10:52:45 +02:00
|
|
|
return H(e, t);
|
2023-09-07 17:35:23 +02:00
|
|
|
if (R(e))
|
2023-09-05 09:25:47 +02:00
|
|
|
return e;
|
2023-09-08 10:52:45 +02:00
|
|
|
let r = H(""), n = () => r(e());
|
|
|
|
return p.set(n, /* @__PURE__ */ new Set([r])), B(n), r;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
g.action = function(e, t, ...r) {
|
|
|
|
let n = e[d], { actions: o } = n;
|
2023-09-05 09:25:47 +02:00
|
|
|
if (!o || !Reflect.has(o, t))
|
|
|
|
throw new Error(`'${e}' has no action with name '${t}'!`);
|
2023-09-08 10:52:45 +02:00
|
|
|
if (o[t].apply(n, r), n.skip)
|
|
|
|
return Reflect.deleteProperty(n, "skip");
|
|
|
|
n.listeners.forEach((a) => a(n.value));
|
2023-09-05 09:25:47 +02:00
|
|
|
};
|
2023-09-08 10:52:45 +02:00
|
|
|
g.on = function e(t, r, n = {}) {
|
|
|
|
let { signal: o } = n;
|
2023-09-07 17:35:23 +02:00
|
|
|
if (!(o && o.aborted)) {
|
|
|
|
if (Array.isArray(t))
|
2023-09-08 10:52:45 +02:00
|
|
|
return t.forEach((a) => e(a, r, n));
|
2023-09-08 15:57:51 +02:00
|
|
|
D(t, r), o && o.addEventListener("abort", () => F(t, r));
|
2023-09-07 17:35:23 +02:00
|
|
|
}
|
|
|
|
};
|
2023-09-08 10:52:45 +02:00
|
|
|
g.symbols = {
|
|
|
|
signal: d,
|
2023-09-07 17:35:23 +02:00
|
|
|
onclear: Symbol.for("Signal.onclear")
|
2023-09-05 09:25:47 +02:00
|
|
|
};
|
2023-09-08 10:52:45 +02:00
|
|
|
g.clear = function(...e) {
|
|
|
|
for (let r of e) {
|
|
|
|
let n = r[d], { onclear: o } = g.symbols;
|
|
|
|
n.actions && n.actions[o] && n.actions[o].call(n), t(r, n), Reflect.deleteProperty(r, d);
|
|
|
|
}
|
|
|
|
function t(r, n) {
|
|
|
|
n.listeners.forEach((o) => {
|
|
|
|
if (n.listeners.delete(o), !p.has(o))
|
|
|
|
return;
|
|
|
|
let a = p.get(o);
|
|
|
|
a.delete(r), !(a.size > 1) && (g.clear(...a), p.delete(o));
|
|
|
|
});
|
2023-09-07 17:35:23 +02:00
|
|
|
}
|
2023-09-05 09:25:47 +02:00
|
|
|
};
|
2023-09-08 15:57:51 +02:00
|
|
|
var z = {
|
2023-09-05 09:25:47 +02:00
|
|
|
isReactiveAtrribute(e, t) {
|
2023-09-07 17:35:23 +02:00
|
|
|
return R(e);
|
2023-09-05 09:25:47 +02:00
|
|
|
},
|
|
|
|
isTextContent(e) {
|
2023-09-08 10:52:45 +02:00
|
|
|
return m(e) === "string" || R(e) && m(V(e)) === "string";
|
2023-09-05 09:25:47 +02:00
|
|
|
},
|
2023-09-08 10:52:45 +02:00
|
|
|
processReactiveAttribute(e, t, r, n) {
|
|
|
|
return D(r, (o) => n([t, o])), r();
|
2023-09-05 09:25:47 +02:00
|
|
|
},
|
|
|
|
reactiveElement(e, t) {
|
2023-09-08 10:52:45 +02:00
|
|
|
let r = document.createComment("<#reactive>"), n = document.createComment("</#reactive>"), o = document.createDocumentFragment();
|
|
|
|
o.append(r, n);
|
2023-09-08 15:57:51 +02:00
|
|
|
let a = (i) => {
|
2023-09-08 10:52:45 +02:00
|
|
|
if (!r.parentNode || !n.parentNode)
|
2023-09-08 15:57:51 +02:00
|
|
|
return F(e, a);
|
|
|
|
let s = t(i);
|
2023-09-08 10:52:45 +02:00
|
|
|
Array.isArray(s) || (s = [s]);
|
|
|
|
let h = r;
|
|
|
|
for (; (h = r.nextSibling) !== n; )
|
|
|
|
h.remove();
|
|
|
|
r.after(...s);
|
2023-09-05 09:25:47 +02:00
|
|
|
};
|
2023-09-08 10:52:45 +02:00
|
|
|
return D(e, a), a(e()), o;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
|
|
|
};
|
2023-09-08 10:52:45 +02:00
|
|
|
function H(e, t) {
|
|
|
|
let r = (...n) => n.length ? U(r, n[0]) : J(r);
|
|
|
|
return Z(r, e, t);
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
var I = Object.assign(/* @__PURE__ */ Object.create(null), {
|
2023-09-05 09:25:47 +02:00
|
|
|
stopPropagation() {
|
|
|
|
this.skip = !0;
|
|
|
|
}
|
|
|
|
});
|
2023-09-08 10:52:45 +02:00
|
|
|
function Z(e, t, r) {
|
|
|
|
return m(r) !== "[object Object]" && (r = {}), e[d] = {
|
2023-09-05 09:25:47 +02:00
|
|
|
value: t,
|
2023-09-08 10:52:45 +02:00
|
|
|
actions: r,
|
2023-09-05 09:25:47 +02:00
|
|
|
listeners: /* @__PURE__ */ new Set()
|
2023-09-08 10:52:45 +02:00
|
|
|
}, Object.setPrototypeOf(e[d], I), e;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
var S = [];
|
|
|
|
function B(e) {
|
2023-09-05 09:25:47 +02:00
|
|
|
let t = function() {
|
2023-09-08 10:52:45 +02:00
|
|
|
S.push(t), e(), S.pop();
|
2023-09-05 09:25:47 +02:00
|
|
|
};
|
2023-09-08 10:52:45 +02:00
|
|
|
p.has(e) && (p.set(t, p.get(e)), p.delete(e)), t();
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function G() {
|
|
|
|
return S[S.length - 1];
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function J(e) {
|
|
|
|
if (!e[d])
|
2023-09-05 09:25:47 +02:00
|
|
|
return;
|
2023-09-08 10:52:45 +02:00
|
|
|
let { value: t, listeners: r } = e[d], n = G();
|
|
|
|
return n && r.add(n), p.has(n) && p.get(n).add(e), t;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function U(e, t) {
|
|
|
|
if (!e[d])
|
2023-09-05 09:25:47 +02:00
|
|
|
return;
|
2023-09-08 10:52:45 +02:00
|
|
|
let r = e[d];
|
|
|
|
if (r.value !== t)
|
|
|
|
return r.value = t, r.listeners.forEach((n) => n(t)), t;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function V(e) {
|
|
|
|
return e[d].value;
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 10:52:45 +02:00
|
|
|
function D(e, t) {
|
|
|
|
return e[d].listeners.add(t);
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
2023-09-08 15:57:51 +02:00
|
|
|
function F(e, t) {
|
2023-09-08 10:52:45 +02:00
|
|
|
return e[d].listeners.delete(t);
|
2023-09-05 09:25:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// src/signals.js
|
2023-09-08 15:57:51 +02:00
|
|
|
L(z);
|
2023-09-05 09:25:47 +02:00
|
|
|
|
|
|
|
globalThis.dde= {
|
2023-09-08 10:52:45 +02:00
|
|
|
S: g,
|
2023-09-07 13:52:09 +02:00
|
|
|
assign: A,
|
2023-09-08 15:57:51 +02:00
|
|
|
classListDeclarative: $,
|
2023-09-08 10:52:45 +02:00
|
|
|
createElement: te,
|
|
|
|
el: te,
|
|
|
|
empty: ne,
|
2023-09-07 17:35:23 +02:00
|
|
|
isSignal: R,
|
2023-09-08 10:52:45 +02:00
|
|
|
namespace: ee,
|
|
|
|
on: M,
|
|
|
|
registerReactivity: L
|
2023-09-05 09:25:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
})();
|