marko 6.3.30 → 6.3.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cheatsheet.md +36 -18
- package/dist/common/helpers.d.ts +2 -0
- package/dist/debug/dom/catch.feat.js +38 -0
- package/dist/debug/dom/catch.feat.mjs +37 -0
- package/dist/debug/dom/controllable-input.feat.js +7 -0
- package/dist/debug/dom/controllable-input.feat.mjs +6 -0
- package/dist/debug/dom/controllable-open.feat.js +5 -0
- package/dist/debug/dom/controllable-open.feat.mjs +4 -0
- package/dist/debug/dom/controllable-select.feat.js +5 -0
- package/dist/debug/dom/controllable-select.feat.mjs +4 -0
- package/dist/debug/dom/controllable-textarea.feat.js +5 -0
- package/dist/debug/dom/controllable-textarea.feat.mjs +4 -0
- package/dist/debug/dom/controllable.feat.js +11 -0
- package/dist/debug/dom/controllable.feat.mjs +10 -0
- package/dist/debug/dom-BJ93mcSe.mjs +2016 -0
- package/dist/debug/dom-CiFITSPN.js +2814 -0
- package/dist/debug/dom.js +156 -2245
- package/dist/debug/dom.mjs +6 -2089
- package/dist/dom/catch.feat.d.ts +1 -0
- package/dist/dom/catch.feat.js +25 -0
- package/dist/dom/catch.feat.mjs +26 -0
- package/dist/dom/control-flow.d.ts +3 -3
- package/dist/dom/controllable-input.feat.d.ts +1 -0
- package/dist/dom/controllable-input.feat.js +3 -0
- package/dist/dom/controllable-input.feat.mjs +3 -0
- package/dist/dom/controllable-open.feat.d.ts +1 -0
- package/dist/dom/controllable-open.feat.js +4 -0
- package/dist/dom/controllable-open.feat.mjs +4 -0
- package/dist/dom/controllable-select.feat.d.ts +1 -0
- package/dist/dom/controllable-select.feat.js +4 -0
- package/dist/dom/controllable-select.feat.mjs +4 -0
- package/dist/dom/controllable-textarea.feat.d.ts +1 -0
- package/dist/dom/controllable-textarea.feat.js +4 -0
- package/dist/dom/controllable-textarea.feat.mjs +4 -0
- package/dist/dom/controllable.d.ts +3 -8
- package/dist/dom/controllable.feat.d.ts +3 -0
- package/dist/dom/controllable.feat.js +3 -0
- package/dist/dom/controllable.feat.mjs +6 -0
- package/dist/dom/queue.d.ts +2 -2
- package/dist/dom/resume.d.ts +0 -1
- package/dist/dom/walker.d.ts +0 -1
- package/dist/dom-CI-06TZb.js +1721 -0
- package/dist/dom-Cj4HQ7T_.mjs +1137 -0
- package/dist/dom.d.ts +2 -2
- package/dist/dom.js +36 -1221
- package/dist/dom.mjs +4 -1188
- package/dist/translator/index.js +628 -534
- package/dist/translator/util/constants/structure-kind.d.ts +7 -0
- package/dist/translator/util/get-tag-name.d.ts +2 -1
- package/dist/translator/util/import-reference.d.ts +3 -0
- package/dist/translator/util/runtime.d.ts +2 -0
- package/dist/translator/util/sections.d.ts +28 -1
- package/dist/translator/util/{walks.d.ts → structure.d.ts} +20 -9
- package/dist/translator/util/writer.d.ts +0 -8
- package/dist/translator/visitors/placeholder.d.ts +4 -3
- package/dist/translator/visitors/tag/native-tag.d.ts +9 -6
- package/dist/translator/visitors/text.d.ts +3 -7
- package/package.json +3 -3
|
@@ -0,0 +1,1137 @@
|
|
|
1
|
+
let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "\\3B " : "\\\\", toDelimitedString = function toDelimitedString(val, delimiter, stringify) {
|
|
2
|
+
let str = "", sep = "", part;
|
|
3
|
+
if (val) if (typeof val != "object") str += val;
|
|
4
|
+
else if (Array.isArray(val)) for (let v of val) part = toDelimitedString(v, delimiter, stringify), part && (str += sep + part, sep = delimiter);
|
|
5
|
+
else for (let name in val) part = stringify(name, val[name]), part && (str += sep + part, sep = delimiter);
|
|
6
|
+
return str;
|
|
7
|
+
}, decodeAccessor = (num) => (num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36), branchesEnabled, rendering, runId = 2, caughtError = /* @__PURE__ */ new WeakSet(), placeholderShown = /* @__PURE__ */ new WeakSet(), pendingEffects = [], pendingRenders = [], runEffects = ((effects) => {
|
|
8
|
+
for (let i = 0; i < effects.length;) effects[i++](effects[i++]);
|
|
9
|
+
}), runRender = (render) => {
|
|
10
|
+
(!branchesEnabled || render.b.F?.H !== 0) && render.c(render.b, render.d);
|
|
11
|
+
}, catchEnabled, delegate = (type, handler) => handler[type] ||= (document.addEventListener(type, handler, !0), 1), parsers = {}, nextScopeId = 1e6, collectingScopes, destroyNestedScopes = function destroyNestedScopes(scope) {
|
|
12
|
+
scope.H = 0, scope.D?.forEach(destroyNestedScopes), scope.B?.forEach(cleanupScope);
|
|
13
|
+
}, isScheduled, channel, _return = (scope, value) => scope.T?.(value), _var_change = (scope, value) => scope.U?.(value), tagIdsByGlobal = /* @__PURE__ */ new WeakMap(), currentNode, walkInternal = function walkInternal(currentWalkIndex, walkCodes, scope) {
|
|
14
|
+
let value, currentMultiplier, storedMultiplier = 0, currentScopeIndex = 0;
|
|
15
|
+
for (; currentWalkIndex < walkCodes.length;) if (value = walkCodes.charCodeAt(currentWalkIndex++), currentMultiplier = storedMultiplier, storedMultiplier = 0, value === 32) scope[decodeAccessor(currentScopeIndex++)] = currentNode;
|
|
16
|
+
else if (value === 37 || value === 49) currentNode.replaceWith(currentNode = scope[decodeAccessor(currentScopeIndex++)] = new Text()), value === 49 && (scope[decodeAccessor(currentScopeIndex++)] = skipScope());
|
|
17
|
+
else if (value === 38) return currentWalkIndex;
|
|
18
|
+
else if (value === 47 || value === 48) currentWalkIndex = walkInternal(currentWalkIndex, walkCodes, scope[decodeAccessor(currentScopeIndex++)] = createScope(scope.$, scope.F)), value === 48 && (scope[decodeAccessor(currentScopeIndex++)] = skipScope());
|
|
19
|
+
else if (value < 92) for (value = 25 * currentMultiplier + value - 67; value--;) walkNextNode();
|
|
20
|
+
else if (value < 107) for (value = 10 * currentMultiplier + value - 97; value--;) walkNextSibling();
|
|
21
|
+
else if (value < 117) {
|
|
22
|
+
for (value = 10 * currentMultiplier + value - 107; value--;) currentNode = currentNode.parentNode || currentNode;
|
|
23
|
+
walkNextSibling();
|
|
24
|
+
} else storedMultiplier = currentMultiplier * 10 + value - 117;
|
|
25
|
+
}, walkNextNode = () => {
|
|
26
|
+
if (currentNode.firstChild) return currentNode = currentNode.firstChild;
|
|
27
|
+
for (; !currentNode.nextSibling && currentNode.parentNode;) currentNode = currentNode.parentNode;
|
|
28
|
+
walkNextSibling();
|
|
29
|
+
}, walkNextSibling = () => currentNode = currentNode.nextSibling || currentNode, registeredValues = {}, curRenders, embedRenders, readyIds, isResuming, cloneCache = {}, R = /[^\p{L}\p{N}]/gu, inputType = "", controllableScripts = {}, controllableRenders = {}, _if = /*@__PURE__*/ withBranches((nodeAccessor, ...branchesArgs) => {
|
|
30
|
+
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
31
|
+
let branchAccessor = "D" + nodeAccessor, branches = [], i = 0;
|
|
32
|
+
for (; i < branchesArgs.length;) branches.push(_content("", branchesArgs[i++], branchesArgs[i++], branchesArgs[i++])());
|
|
33
|
+
return (scope, newBranch) => {
|
|
34
|
+
newBranch !== (scope[branchAccessor] ?? (scope["A" + nodeAccessor] && 0)) && setConditionalRenderer(scope, nodeAccessor, branches[scope[branchAccessor] = newBranch], createAndSetupBranch);
|
|
35
|
+
};
|
|
36
|
+
}), _show = /*@__PURE__*/ withBranches((nodeAccessor, startNodeAccessor, endNodeAccessor) => {
|
|
37
|
+
nodeAccessor = decodeAccessor(nodeAccessor), startNodeAccessor !== void 0 && (startNodeAccessor = decodeAccessor(startNodeAccessor)), endNodeAccessor !== void 0 && (endNodeAccessor = decodeAccessor(endNodeAccessor));
|
|
38
|
+
let rangeAccessor = "A" + nodeAccessor;
|
|
39
|
+
return (scope, display) => {
|
|
40
|
+
let referenceNode = scope[nodeAccessor], onlyChild = referenceNode.nodeType === 1, parentNode = onlyChild ? referenceNode : referenceNode.parentNode, range = scope[rangeAccessor];
|
|
41
|
+
range || (range = scope[rangeAccessor] = {}, range.S = onlyChild ? parentNode.firstChild : scope[startNodeAccessor], range.K = onlyChild ? parentNode.lastChild : endNodeAccessor === void 0 ? referenceNode.previousSibling : scope[endNodeAccessor]);
|
|
42
|
+
let startNode = range.S;
|
|
43
|
+
if (range.L && startNode === range.K && startNode.tagName === "T") {
|
|
44
|
+
let wrapper = startNode;
|
|
45
|
+
wrapper.firstChild || wrapper.appendChild(new Text()), range = scope[rangeAccessor] = {}, range.S = startNode = wrapper.firstChild, range.K = wrapper.lastChild, wrapper.replaceWith(...wrapper.childNodes);
|
|
46
|
+
}
|
|
47
|
+
let inDom = onlyChild ? !!parentNode.firstChild : startNode.parentNode === parentNode;
|
|
48
|
+
display ? inDom || insertBranchBefore(range, parentNode, onlyChild ? null : referenceNode) : inDom && (onlyChild && (range.S = parentNode.firstChild, range.K = parentNode.lastChild), tempDetachBranch(range));
|
|
49
|
+
};
|
|
50
|
+
}), _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagVar, inputIsArgs) => {
|
|
51
|
+
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
52
|
+
let childScopeAccessor = "A" + nodeAccessor, rendererAccessor = "D" + nodeAccessor;
|
|
53
|
+
return (scope, newRenderer, getInput) => {
|
|
54
|
+
let normalizedRenderer = normalizeDynamicRenderer(newRenderer);
|
|
55
|
+
if (scope[rendererAccessor] !== (scope[rendererAccessor] = normalizedRenderer?.a || normalizedRenderer) || getContent && !(normalizedRenderer || scope[childScopeAccessor])) if (setConditionalRenderer(scope, nodeAccessor, normalizedRenderer || (getContent ? getContent(scope) : void 0), createBranchWithTagNameOrRenderer), getTagVar && (scope[childScopeAccessor].T = (value) => getTagVar()(scope, value)), typeof normalizedRenderer == "string") {
|
|
56
|
+
if (getContent) {
|
|
57
|
+
let content = getContent(scope);
|
|
58
|
+
setConditionalRenderer(scope[childScopeAccessor], "a", content, createAndSetupBranch), content.f && subscribeToScopeSet(content.e, content.f, scope[childScopeAccessor].Aa);
|
|
59
|
+
}
|
|
60
|
+
} else normalizedRenderer?.f && subscribeToScopeSet(normalizedRenderer.e, normalizedRenderer.f, scope[childScopeAccessor]);
|
|
61
|
+
if (normalizedRenderer) {
|
|
62
|
+
let childScope = scope[childScopeAccessor], args = getInput?.();
|
|
63
|
+
if (typeof normalizedRenderer == "string") (getContent ? _attrs : _attrs_content)(childScope, "a", (inputIsArgs ? args[0] : args) || {}, controllableRenders[childScope.a.tagName]), (childScope.Ia || childScope.Ea) && queueEffect(childScope, dynamicTagScript);
|
|
64
|
+
else {
|
|
65
|
+
for (let accessor in normalizedRenderer.g) normalizedRenderer.g[accessor](childScope, normalizedRenderer.h[accessor]);
|
|
66
|
+
if (normalizedRenderer.d) if (inputIsArgs) normalizedRenderer.d(childScope, normalizedRenderer._ ? args[0] : args);
|
|
67
|
+
else {
|
|
68
|
+
let inputWithContent = getContent ? {
|
|
69
|
+
...args,
|
|
70
|
+
content: getContent(scope)
|
|
71
|
+
} : args || {};
|
|
72
|
+
normalizedRenderer.d(childScope, normalizedRenderer._ ? inputWithContent : [inputWithContent]);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}), _dynamic_tag_content = /*@__PURE__*/ withBranches((nodeAccessor) => {
|
|
78
|
+
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
79
|
+
let childScopeAccessor = "A" + nodeAccessor, rendererAccessor = "D" + nodeAccessor;
|
|
80
|
+
return (scope, renderer) => {
|
|
81
|
+
if (scope[rendererAccessor] !== (scope[rendererAccessor] = renderer?.a || renderer) && (setConditionalRenderer(scope, nodeAccessor, renderer, createAndSetupBranch), renderer?.f && subscribeToScopeSet(renderer.e, renderer.f, scope[childScopeAccessor])), renderer) for (let accessor in renderer.g) renderer.g[accessor](scope[childScopeAccessor], renderer.h[accessor]);
|
|
82
|
+
};
|
|
83
|
+
}), loop = /*@__PURE__*/ withBranches((forEach) => (nodeAccessor, template, walks, setup, params) => {
|
|
84
|
+
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
85
|
+
let scopesAccessor = "A" + nodeAccessor, keyedScopesAccessor = "O" + nodeAccessor, renderer = _content("", template, walks, setup)();
|
|
86
|
+
return (scope, value) => {
|
|
87
|
+
let referenceNode = scope[nodeAccessor], oldScopes = toArray(scope[scopesAccessor]), newScopes = scope[scopesAccessor] = [];
|
|
88
|
+
scope[keyedScopesAccessor] = null;
|
|
89
|
+
let oldLen = oldScopes.length, parentNode = referenceNode.nodeType > 1 ? referenceNode.parentNode || oldScopes[0]?.S.parentNode : referenceNode, oldScopesByKey, hasPotentialMoves, start = 0;
|
|
90
|
+
forEach(value, (key, args) => {
|
|
91
|
+
let i = newScopes.length, oldScope = oldScopes[i], branch = oldLen && (oldScopesByKey || key !== (oldScope?.M ?? i) ? (oldScopesByKey ||= oldScopes.reduce((map, scope, j) => j < i ? map : (scope.I = j, map.set(scope.M ?? j, scope)), /* @__PURE__ */ new Map())).get(key) : oldScope && (start++, oldScope));
|
|
92
|
+
branch ? (hasPotentialMoves = !0, oldScopesByKey?.delete(key)) : branch = createAndSetupBranch(scope.$, renderer, scope, parentNode), branch.M = key, newScopes.push(branch), params?.(branch, args);
|
|
93
|
+
});
|
|
94
|
+
let newLen = newScopes.length, hasSiblings = referenceNode !== parentNode, afterReference = null, oldEnd = oldLen - 1, newEnd = newLen - 1;
|
|
95
|
+
if (hasSiblings && (oldLen ? (afterReference = oldScopes[oldEnd].K.nextSibling, newLen || parentNode.insertBefore(referenceNode, afterReference)) : newLen && (afterReference = referenceNode.nextSibling, referenceNode.remove())), !hasPotentialMoves) {
|
|
96
|
+
oldLen && (oldScopes.forEach(hasSiblings ? removeAndDestroyBranch : destroyBranch), hasSiblings || (parentNode.textContent = ""));
|
|
97
|
+
for (let newScope of newScopes) insertBranchBefore(newScope, parentNode, afterReference);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (oldScopesByKey) oldScopesByKey.forEach(removeAndDestroyBranch);
|
|
101
|
+
else for (let i = newLen; i < oldLen; i++) removeAndDestroyBranch(oldScopes[i]);
|
|
102
|
+
for (; oldEnd >= start && newEnd >= start && oldScopes[oldEnd] === newScopes[newEnd];) oldEnd--, newEnd--;
|
|
103
|
+
if (oldEnd + 1 < oldLen && (afterReference = oldScopes[oldEnd + 1].S), start > oldEnd || start > newEnd) {
|
|
104
|
+
for (let i = start; i <= newEnd; i++) insertBranchBefore(newScopes[i], parentNode, afterReference);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
let diffLen = newEnd - start + 1, sources = Array(diffLen), pred = Array(diffLen), tails = [], tail = -1, lo, hi, mid;
|
|
108
|
+
for (let i = diffLen; i--;) sources[i] = newScopes[start + i].I ?? -1;
|
|
109
|
+
for (let i = 0; i < diffLen; i++) if (~sources[i]) if (tail < 0 || sources[tails[tail]] < sources[i]) ~tail && (pred[i] = tails[tail]), tails[++tail] = i;
|
|
110
|
+
else {
|
|
111
|
+
for (lo = 0, hi = tail; lo < hi;) mid = (lo + hi) / 2 | 0, sources[tails[mid]] < sources[i] ? lo = mid + 1 : hi = mid;
|
|
112
|
+
sources[i] < sources[tails[lo]] && (lo > 0 && (pred[i] = tails[lo - 1]), tails[lo] = i);
|
|
113
|
+
}
|
|
114
|
+
for (hi = tails[tail], lo = tail + 1; lo-- > 0;) tails[lo] = hi, hi = pred[hi];
|
|
115
|
+
for (let i = diffLen; i--;) ~tail && i === tails[tail] ? tail-- : insertBranchBefore(newScopes[start + i], parentNode, afterReference), afterReference = newScopes[start + i].S;
|
|
116
|
+
};
|
|
117
|
+
}), _for_of = /*@__PURE__*/ loop(([all, by = bySecondArg], cb) => {
|
|
118
|
+
typeof by == "string" ? forOf(all, (item, i) => cb(item[by], [item, i])) : forOf(all, (item, i) => cb(by(item, i), [item, i]));
|
|
119
|
+
}), _for_in = /*@__PURE__*/ loop(([obj, by = byFirstArg], cb) => forIn(obj, (key, value) => cb(by(key, value), [key, value]))), _for_to = /*@__PURE__*/ loop(([to, from, step, by = byFirstArg], cb) => forTo(to, from, step, (v) => cb(by(v), [v]))), _for_until = /*@__PURE__*/ loop(([until, from, step, by = byFirstArg], cb) => forUntil(until, from, step, (v) => cb(by(v), [v])));
|
|
120
|
+
//#region src/common/helpers.ts
|
|
121
|
+
function _call(fn, v) {
|
|
122
|
+
return fn(v), v;
|
|
123
|
+
}
|
|
124
|
+
function stringifyClassObject(name, value) {
|
|
125
|
+
return value ? name : "";
|
|
126
|
+
}
|
|
127
|
+
function stringifyStyleObject(name, value) {
|
|
128
|
+
return value || value === 0 ? escapeStyleAttr(name) + ":" + escapeStyleAttr(value + "") : "";
|
|
129
|
+
}
|
|
130
|
+
function escapeStyleAttr(str) {
|
|
131
|
+
return unsafeStyleAttrReg.test(str) ? str.replace(unsafeStyleAttrReg, replaceUnsafeStyleAttr) : str;
|
|
132
|
+
}
|
|
133
|
+
function escapeStyleValue(str) {
|
|
134
|
+
let closers = "", result = str.replace(/[\\"'{};<>]|\/(?=\*)/g, (c) => c === "<" ? "\\3C " : c === ";" ? "\\3B " : c === "{" ? "\\7B " : "\\" + c);
|
|
135
|
+
for (let c of result) c === "(" ? closers = ")" + closers : c === "[" ? closers = "]" + closers : c === closers[0] && (closers = closers.slice(1));
|
|
136
|
+
return result + closers;
|
|
137
|
+
}
|
|
138
|
+
function isEventHandler(name) {
|
|
139
|
+
return /^on[A-Z-]/.test(name);
|
|
140
|
+
}
|
|
141
|
+
function getEventHandlerName(name) {
|
|
142
|
+
return name[2] === "-" ? name.slice(3) : name.slice(2).toLowerCase();
|
|
143
|
+
}
|
|
144
|
+
function isNotVoid(value) {
|
|
145
|
+
return value != null && value !== !1;
|
|
146
|
+
}
|
|
147
|
+
function isPromise(value) {
|
|
148
|
+
return value != null && typeof value.then == "function";
|
|
149
|
+
}
|
|
150
|
+
function normalizeDynamicRenderer(value) {
|
|
151
|
+
if (value) {
|
|
152
|
+
if (typeof value == "string") return value;
|
|
153
|
+
let normalized = value.content || value.default || value;
|
|
154
|
+
if ("a" in normalized) return normalized;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function withBranches(runtime) {
|
|
158
|
+
return branchesEnabled = 1, runtime;
|
|
159
|
+
}
|
|
160
|
+
function _assert_hoist(value) {}
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region src/common/for.ts
|
|
163
|
+
function forIn(obj, cb) {
|
|
164
|
+
for (let key in obj) cb(key, obj[key]);
|
|
165
|
+
}
|
|
166
|
+
function forOf(list, cb) {
|
|
167
|
+
if (list) {
|
|
168
|
+
let i = 0;
|
|
169
|
+
for (let item of list) cb(item, i++);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function forTo(to, from, step, cb) {
|
|
173
|
+
let start = from || 0, delta = step || 1;
|
|
174
|
+
for (let steps = (to - start) / delta, i = 0; i <= steps; i++) cb(start + i * delta);
|
|
175
|
+
}
|
|
176
|
+
function forUntil(until, from, step, cb) {
|
|
177
|
+
let start = from || 0, delta = step || 1;
|
|
178
|
+
for (let steps = (until - start) / delta, i = 0; i < steps; i++) cb(start + i * delta);
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/dom/queue.ts
|
|
182
|
+
function queueRender(scope, signal, signalKey, value, scopeKey = scope.L) {
|
|
183
|
+
let render;
|
|
184
|
+
if (signalKey >= 0 && (render = scope[signalKey])) {
|
|
185
|
+
if (render.d = value, render.e === runId || catchEnabled && render.f) return;
|
|
186
|
+
render.e = runId;
|
|
187
|
+
} else render = {
|
|
188
|
+
a: scopeKey * 1e6 + signalKey,
|
|
189
|
+
b: scope,
|
|
190
|
+
c: signal,
|
|
191
|
+
d: value,
|
|
192
|
+
e: runId
|
|
193
|
+
}, signalKey >= 0 && (scope[signalKey] = render);
|
|
194
|
+
queuePendingRender(render);
|
|
195
|
+
}
|
|
196
|
+
function queuePendingRender(render) {
|
|
197
|
+
let i = pendingRenders.push(render) - 1;
|
|
198
|
+
for (; i;) {
|
|
199
|
+
let parentIndex = i - 1 >> 1, parent = pendingRenders[parentIndex];
|
|
200
|
+
if (render.a - parent.a >= 0) break;
|
|
201
|
+
pendingRenders[i] = parent, i = parentIndex;
|
|
202
|
+
}
|
|
203
|
+
pendingRenders[i] = render;
|
|
204
|
+
}
|
|
205
|
+
function queueEffect(scope, fn) {
|
|
206
|
+
pendingEffects.push(fn, scope);
|
|
207
|
+
}
|
|
208
|
+
function run() {
|
|
209
|
+
let effects = pendingEffects;
|
|
210
|
+
try {
|
|
211
|
+
rendering = 1, runRenders();
|
|
212
|
+
} finally {
|
|
213
|
+
runId++, rendering = 0, pendingRenders = [], pendingEffects = [];
|
|
214
|
+
}
|
|
215
|
+
runEffects(effects);
|
|
216
|
+
}
|
|
217
|
+
function queueAsyncRender(scope, signal, value) {
|
|
218
|
+
queueRender(scope, signal, -1, value), queueMicrotask(run);
|
|
219
|
+
}
|
|
220
|
+
function prepareEffects(fn) {
|
|
221
|
+
let prevRenders = pendingRenders, prevEffects = pendingEffects, preparedEffects = pendingEffects = [];
|
|
222
|
+
pendingRenders = [];
|
|
223
|
+
try {
|
|
224
|
+
rendering = 1, fn(), runRenders();
|
|
225
|
+
} finally {
|
|
226
|
+
runId++, rendering = 0, pendingRenders = prevRenders, pendingEffects = prevEffects;
|
|
227
|
+
}
|
|
228
|
+
return preparedEffects;
|
|
229
|
+
}
|
|
230
|
+
function installCatch(wrapEffects, wrapRender) {
|
|
231
|
+
catchEnabled = 1, withBranches(), runEffects = wrapEffects(runEffects), runRender = wrapRender(runRender);
|
|
232
|
+
}
|
|
233
|
+
function runRenders() {
|
|
234
|
+
for (; pendingRenders.length;) {
|
|
235
|
+
let render = pendingRenders[0], item = pendingRenders.pop();
|
|
236
|
+
if (render !== item) {
|
|
237
|
+
let i = 0, mid = pendingRenders.length >> 1, key = (pendingRenders[0] = item).a;
|
|
238
|
+
for (; i < mid;) {
|
|
239
|
+
let bestChild = (i << 1) + 1, right = bestChild + 1;
|
|
240
|
+
if (right < pendingRenders.length && pendingRenders[right].a - pendingRenders[bestChild].a < 0 && (bestChild = right), pendingRenders[bestChild].a - key >= 0) break;
|
|
241
|
+
pendingRenders[i] = pendingRenders[bestChild], i = bestChild;
|
|
242
|
+
}
|
|
243
|
+
pendingRenders[i] = item;
|
|
244
|
+
}
|
|
245
|
+
runRender(render);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/dom/abort-signal.ts
|
|
250
|
+
function $signalReset(scope, id) {
|
|
251
|
+
let ctrl = scope.A?.[id];
|
|
252
|
+
ctrl && (scope.A[id] = void 0, rendering ? queueEffect(ctrl, abort) : abort(ctrl));
|
|
253
|
+
}
|
|
254
|
+
function $signal(scope, id) {
|
|
255
|
+
return trackCleanup(scope), ((scope.A ||= {})[id] ||= new AbortController()).signal;
|
|
256
|
+
}
|
|
257
|
+
/** Enrols `scope` with its branch so destroying the branch cleans it up. */
|
|
258
|
+
function trackCleanup(scope, subscribers) {
|
|
259
|
+
let branch = scope.F;
|
|
260
|
+
branch && (branch.B ||= /* @__PURE__ */ new Set()).add(scope), subscribers && (scope.Z ||= []).push(subscribers);
|
|
261
|
+
}
|
|
262
|
+
function abort(ctrl) {
|
|
263
|
+
ctrl.abort();
|
|
264
|
+
}
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region src/common/opt.ts
|
|
267
|
+
function toArray(opt) {
|
|
268
|
+
return opt ? Array.isArray(opt) ? opt : [opt] : [];
|
|
269
|
+
}
|
|
270
|
+
function forEach(opt, cb) {
|
|
271
|
+
if (opt) if (Array.isArray(opt)) for (let item of opt) cb(item);
|
|
272
|
+
else cb(opt);
|
|
273
|
+
}
|
|
274
|
+
function push(opt, item) {
|
|
275
|
+
return opt ? Array.isArray(opt) ? (opt.push(item), opt) : [opt, item] : item;
|
|
276
|
+
}
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/dom/event.ts
|
|
279
|
+
function _on(element, type, handler) {
|
|
280
|
+
element["$" + type] === void 0 && delegate(type, handleDelegated), element["$" + type] = handler || null;
|
|
281
|
+
}
|
|
282
|
+
function handleDelegated(ev) {
|
|
283
|
+
let target = !rendering && ev.target;
|
|
284
|
+
for (; target;) target["$" + ev.type]?.(ev, target), target = ev.bubbles && !ev.cancelBubble && target.parentNode;
|
|
285
|
+
}
|
|
286
|
+
//#endregion
|
|
287
|
+
//#region src/dom/parse-html.ts
|
|
288
|
+
function parseHTML(html, ns) {
|
|
289
|
+
let parser = parsers[ns] ||= document.createElementNS(ns, "template");
|
|
290
|
+
return parser.innerHTML = html, parser.content || parser;
|
|
291
|
+
}
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region src/dom/scope.ts
|
|
294
|
+
function createScope($global, closestBranch) {
|
|
295
|
+
let scope = {
|
|
296
|
+
L: nextScopeId++,
|
|
297
|
+
H: runId,
|
|
298
|
+
F: closestBranch,
|
|
299
|
+
$: $global
|
|
300
|
+
};
|
|
301
|
+
return collectingScopes?.push(scope), scope;
|
|
302
|
+
}
|
|
303
|
+
function syncGen(scope) {
|
|
304
|
+
scope.H = runId;
|
|
305
|
+
}
|
|
306
|
+
function _assert_init(scope, accessor) {
|
|
307
|
+
return scope[accessor];
|
|
308
|
+
}
|
|
309
|
+
function collectScopes(fn) {
|
|
310
|
+
let prev = collectingScopes;
|
|
311
|
+
collectingScopes = [];
|
|
312
|
+
try {
|
|
313
|
+
return fn(), collectingScopes;
|
|
314
|
+
} finally {
|
|
315
|
+
collectingScopes = prev;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
function skipScope() {
|
|
319
|
+
return nextScopeId++;
|
|
320
|
+
}
|
|
321
|
+
function findBranchWithKey(scope, key) {
|
|
322
|
+
let branch = scope.F;
|
|
323
|
+
for (; branch && branch[key] == null;) branch = branch.N;
|
|
324
|
+
return branch;
|
|
325
|
+
}
|
|
326
|
+
function destroyBranch(branch) {
|
|
327
|
+
branch.N?.D?.delete(branch), destroyNestedScopes(branch);
|
|
328
|
+
}
|
|
329
|
+
function destroyScope(scope) {
|
|
330
|
+
scope.H && (destroyNestedScopes(scope), cleanupScope(scope));
|
|
331
|
+
}
|
|
332
|
+
function cleanupScope(scope) {
|
|
333
|
+
scope.Z?.forEach(unsubscribe, scope);
|
|
334
|
+
for (let id in scope.A) $signalReset(scope, id);
|
|
335
|
+
}
|
|
336
|
+
function unsubscribe(subscribers) {
|
|
337
|
+
subscribers.delete(this);
|
|
338
|
+
}
|
|
339
|
+
function removeAndDestroyBranch(branch) {
|
|
340
|
+
destroyBranch(branch), removeChildNodes(branch.S, branch.K);
|
|
341
|
+
}
|
|
342
|
+
function insertBranchBefore(branch, parentNode, nextSibling) {
|
|
343
|
+
insertChildNodes(parentNode, nextSibling, branch.S, branch.K);
|
|
344
|
+
}
|
|
345
|
+
function tempDetachBranch(branch) {
|
|
346
|
+
let fragment = new DocumentFragment();
|
|
347
|
+
fragment.namespaceURI = branch.S.parentNode.namespaceURI, insertChildNodes(fragment, null, branch.S, branch.K);
|
|
348
|
+
}
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region src/dom/schedule.ts
|
|
351
|
+
function schedule() {
|
|
352
|
+
isScheduled || (isScheduled = 1, queueMicrotask(flushAndWaitFrame));
|
|
353
|
+
}
|
|
354
|
+
function flushAndWaitFrame() {
|
|
355
|
+
requestAnimationFrame(triggerMacroTask), run();
|
|
356
|
+
}
|
|
357
|
+
function triggerMacroTask() {
|
|
358
|
+
channel || (channel = new MessageChannel(), channel.port1.onmessage = () => {
|
|
359
|
+
isScheduled = 0, run();
|
|
360
|
+
}), channel.port2.postMessage(0);
|
|
361
|
+
}
|
|
362
|
+
//#endregion
|
|
363
|
+
//#region src/dom/signals.ts
|
|
364
|
+
function _let(id, fn) {
|
|
365
|
+
let valueAccessor = decodeAccessor(id);
|
|
366
|
+
return (scope, value) => (rendering ? scope.H === runId && (scope[valueAccessor] = value, fn?.(scope)) : (scope[valueAccessor] !== value || !(valueAccessor in scope)) && (scope[valueAccessor] = value, fn) && (schedule(), queueRender(scope, fn, id)), value);
|
|
367
|
+
}
|
|
368
|
+
function _let_change(id, fn) {
|
|
369
|
+
let valueAccessor = decodeAccessor(id), valueChangeAccessor = decodeAccessor(id + 1), base = _let(id, fn);
|
|
370
|
+
return (scope, value, valueChange) => (rendering ? (scope[valueChangeAccessor] = valueChange) && (scope[valueAccessor] !== value || !(valueAccessor in scope)) ? (scope[valueAccessor] = value, fn?.(scope)) : base(scope, value) : scope[valueChangeAccessor] ? scope[valueChangeAccessor](value) : base(scope, value), value);
|
|
371
|
+
}
|
|
372
|
+
function _const(valueAccessor, fn) {
|
|
373
|
+
return valueAccessor = decodeAccessor(valueAccessor), ((scope, value) => {
|
|
374
|
+
(scope[valueAccessor] !== value || !(valueAccessor in scope)) && (scope[valueAccessor] = value, fn?.(scope));
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
function _or(id, fn, defaultPending = 1, scopeIdAccessor = "L") {
|
|
378
|
+
return scopeIdAccessor !== "L" && (scopeIdAccessor = decodeAccessor(scopeIdAccessor)), (scope) => {
|
|
379
|
+
scope.H === runId ? ~id in scope ? --scope[~id] || fn(scope) : scope[~id] = defaultPending : queueRender(scope, fn, id, 0, scope[scopeIdAccessor]);
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
function _for_closure(ownerLoopNodeAccessor, fn) {
|
|
383
|
+
ownerLoopNodeAccessor = decodeAccessor(ownerLoopNodeAccessor);
|
|
384
|
+
let scopeAccessor = "A" + ownerLoopNodeAccessor, ownerSignal = (ownerScope) => {
|
|
385
|
+
let scopes = toArray(ownerScope[scopeAccessor]);
|
|
386
|
+
scopes.length && queueRender(ownerScope, () => {
|
|
387
|
+
for (let scope of scopes) scope.H > 0 && scope.H < runId && fn(scope);
|
|
388
|
+
}, -1, 0, scopes[0].L);
|
|
389
|
+
};
|
|
390
|
+
return ownerSignal._ = fn, ownerSignal;
|
|
391
|
+
}
|
|
392
|
+
function _for_selector(ownerLoopNodeAccessor, ownerValueAccessor, keyValueAccessor, fn) {
|
|
393
|
+
ownerLoopNodeAccessor = decodeAccessor(ownerLoopNodeAccessor), ownerValueAccessor = decodeAccessor(ownerValueAccessor), keyValueAccessor !== "M" && (keyValueAccessor = decodeAccessor(keyValueAccessor));
|
|
394
|
+
let scopeAccessor = "A" + ownerLoopNodeAccessor, mapAccessor = "O" + ownerLoopNodeAccessor, prevKeyProp = `_${ownerValueAccessor}`, ownerSignal = (ownerScope) => {
|
|
395
|
+
let scopes = toArray(ownerScope[scopeAccessor]);
|
|
396
|
+
if (ownerScope.H < runId && scopes.length) {
|
|
397
|
+
let nextKey = ownerScope[ownerValueAccessor];
|
|
398
|
+
queueRender(ownerScope, () => {
|
|
399
|
+
let map = keyedScopes(ownerScope, scopeAccessor, mapAccessor, keyValueAccessor);
|
|
400
|
+
if (map && prevKeyProp in map) {
|
|
401
|
+
let prevScope = map.get(map[prevKeyProp]), nextScope = map.get(nextKey);
|
|
402
|
+
prevScope !== nextScope && (runLiveBranch(prevScope, fn), runLiveBranch(nextScope, fn));
|
|
403
|
+
} else for (let scope of toArray(ownerScope[scopeAccessor])) runLiveBranch(scope, fn);
|
|
404
|
+
map && (map[prevKeyProp] = nextKey);
|
|
405
|
+
}, -1, 0, scopes[0].L);
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
return ownerSignal._ = fn, ownerSignal;
|
|
409
|
+
}
|
|
410
|
+
function keyedScopes(ownerScope, scopeAccessor, mapAccessor, keyValueAccessor) {
|
|
411
|
+
let map = ownerScope[mapAccessor] ||= /* @__PURE__ */ new Map();
|
|
412
|
+
if (!map.size) for (let scope of toArray(ownerScope[scopeAccessor])) {
|
|
413
|
+
let key = scope.M ?? scope[keyValueAccessor];
|
|
414
|
+
if (key === void 0) return ownerScope[mapAccessor] = null;
|
|
415
|
+
scope.M = key, map.set(key, scope);
|
|
416
|
+
}
|
|
417
|
+
return map;
|
|
418
|
+
}
|
|
419
|
+
function runLiveBranch(scope, fn) {
|
|
420
|
+
scope && scope.H > 0 && scope.H < runId && fn(scope);
|
|
421
|
+
}
|
|
422
|
+
function _if_closure(ownerConditionalNodeAccessor, branch, fn) {
|
|
423
|
+
ownerConditionalNodeAccessor = decodeAccessor(ownerConditionalNodeAccessor);
|
|
424
|
+
let scopeAccessor = "A" + ownerConditionalNodeAccessor, branchAccessor = "D" + ownerConditionalNodeAccessor, ownerSignal = (scope) => {
|
|
425
|
+
let ifScope = scope[scopeAccessor];
|
|
426
|
+
ifScope && ifScope.H > 0 && ifScope.H < runId && (scope[branchAccessor] || 0) === branch && queueRender(ifScope, fn, -1);
|
|
427
|
+
};
|
|
428
|
+
return ownerSignal._ = fn, ownerSignal;
|
|
429
|
+
}
|
|
430
|
+
function subscribeToScopeSet(ownerScope, accessor, scope) {
|
|
431
|
+
let subscribers = ownerScope[accessor] ||= /* @__PURE__ */ new Set(), { size } = subscribers;
|
|
432
|
+
subscribers.add(scope).size !== size && trackCleanup(scope, subscribers);
|
|
433
|
+
}
|
|
434
|
+
function _closure(...closureSignals) {
|
|
435
|
+
let [firstSignal] = closureSignals, scopeInstances = firstSignal.a, signalIndex = firstSignal.b;
|
|
436
|
+
for (let i = closureSignals.length; i--;) closureSignals[i].c = i;
|
|
437
|
+
return (scope) => {
|
|
438
|
+
if (scope[scopeInstances]) for (let childScope of scope[scopeInstances]) childScope.H > 0 && childScope.H < runId && queueRender(childScope, closureSignals[childScope[signalIndex] || 0], -1);
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
function _closure_get(valueAccessor, fn, getOwnerScope, resumeId) {
|
|
442
|
+
valueAccessor = decodeAccessor(valueAccessor);
|
|
443
|
+
let closureSignal = ((scope) => {
|
|
444
|
+
scope[closureSignal.b] = closureSignal.c, fn(scope), subscribeToScopeSet(getOwnerScope ? getOwnerScope(scope) : scope._, closureSignal.a, scope);
|
|
445
|
+
});
|
|
446
|
+
return closureSignal.a = valueAccessor, closureSignal.b = "C" + valueAccessor, resumeId && _resume(resumeId, closureSignal), closureSignal;
|
|
447
|
+
}
|
|
448
|
+
function _child_setup(setup) {
|
|
449
|
+
return setup._ = (scope, owner) => {
|
|
450
|
+
scope._ = owner, queueRender(scope, setup, -1);
|
|
451
|
+
}, setup;
|
|
452
|
+
}
|
|
453
|
+
function _var(scope, childAccessor, signal) {
|
|
454
|
+
scope[decodeAccessor(childAccessor)].T = (value) => signal(scope, value);
|
|
455
|
+
}
|
|
456
|
+
function _return_change(scope, changeHandler) {
|
|
457
|
+
changeHandler && (scope.U = changeHandler);
|
|
458
|
+
}
|
|
459
|
+
function _id({ $: $global }) {
|
|
460
|
+
let id = tagIdsByGlobal.get($global) || 0;
|
|
461
|
+
return tagIdsByGlobal.set($global, id + 1), "c" + $global.runtimeId + $global.renderId + id.toString(36);
|
|
462
|
+
}
|
|
463
|
+
function _script(id, fn) {
|
|
464
|
+
return _resume(id, fn), (scope) => {
|
|
465
|
+
queueEffect(scope, fn);
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
function _el_read(value) {
|
|
469
|
+
return value;
|
|
470
|
+
}
|
|
471
|
+
function* traverse(scope, path, i = path.length - 1) {
|
|
472
|
+
if (scope) if (Symbol.iterator in scope) for (let childScope of scope.values()) yield* traverse(childScope, path, i);
|
|
473
|
+
else {
|
|
474
|
+
let item = scope[path[i]];
|
|
475
|
+
i ? yield* traverse(item, path, i - 1) : yield typeof item == "function" ? item() : item;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
function _hoist(...path) {
|
|
479
|
+
return path = path.map((p) => typeof p == "string" ? p : decodeAccessor(p)), (scope) => {
|
|
480
|
+
let fn = () => traverse(scope, path).next().value;
|
|
481
|
+
return fn[Symbol.iterator] = () => traverse(scope, path), fn;
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
function _hoist_resume(id, ...path) {
|
|
485
|
+
return _resume(id, _hoist(...path));
|
|
486
|
+
}
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region src/dom/walker.ts
|
|
489
|
+
/** Cloned templates are small, where a TreeWalker's per-step cost dominates. */
|
|
490
|
+
function walk(startNode, walkCodes, branch) {
|
|
491
|
+
currentNode = startNode, walkInternal(0, walkCodes, branch);
|
|
492
|
+
}
|
|
493
|
+
//#endregion
|
|
494
|
+
//#region src/dom/resume.ts
|
|
495
|
+
function ready(readyId) {
|
|
496
|
+
(readyIds ||= /* @__PURE__ */ new Set()).add(readyId);
|
|
497
|
+
for (let renderId in curRenders) runResumeEffects(curRenders[renderId]);
|
|
498
|
+
}
|
|
499
|
+
function initEmbedded(readyId, runtimeId) {
|
|
500
|
+
embedRenders || (embedRenders = /* @__PURE__ */ new Map(), new MutationObserver(() => {
|
|
501
|
+
for (let [anchor, [renderId, scopes]] of embedRenders) if (!anchor.isConnected) {
|
|
502
|
+
embedRenders.delete(anchor), delete curRenders[renderId];
|
|
503
|
+
for (let id in scopes) destroyScope(scopes[id]);
|
|
504
|
+
}
|
|
505
|
+
}).observe(document, {
|
|
506
|
+
childList: !0,
|
|
507
|
+
subtree: !0
|
|
508
|
+
})), ready(readyId), init(runtimeId);
|
|
509
|
+
}
|
|
510
|
+
function init(runtimeId = "M") {
|
|
511
|
+
if (curRenders) return;
|
|
512
|
+
let renders = self[runtimeId], defineRuntime = (desc) => Object.defineProperty(self, runtimeId, desc), initRuntime = (renders) => {
|
|
513
|
+
defineRuntime({ value: curRenders = ((renderId) => {
|
|
514
|
+
let render = curRenders[renderId] = renders[renderId] || renders(renderId), walk = render.w, scopeLookup = {}, getScope = (id) => scopeLookup[id] || (+id ? initScope(scopeLookup[id] = { L: +id }) : initGlobal()), initGlobal = () => scopeLookup[0] ||= {
|
|
515
|
+
runtimeId,
|
|
516
|
+
renderId
|
|
517
|
+
}, initScope = (scope) => (scope.H = 1, scope.$ = initGlobal(), branchesEnabled && scope.G && (scope.F = getScope(scope.G)), scope), applyScopes = (partials) => {
|
|
518
|
+
let scopeId = partials[0];
|
|
519
|
+
for (let i = 1; i < partials.length; i++) {
|
|
520
|
+
let partial = partials[i];
|
|
521
|
+
typeof partial == "number" ? scopeId += partial : (scopeId ? initScope(Object.assign(scopeLookup[scopeId] ||= (partial.L = scopeId, partial), partial)) : Object.assign(initGlobal(), partial), scopeId++);
|
|
522
|
+
}
|
|
523
|
+
}, serializeContext = ((data, registryId) => typeof data == "number" ? registryId ? registeredValues[registryId](getScope(data)) : getScope(data) : applyScopes(data)), createVisitBranches = (branchScopesStack = [], branchStarts = [], orphanBranches = [], deferredOwners = [], curBranchScopes) => (branchId, branch, endedBranches, accessor, singleNode, parent = visit.parentNode, startVisit = visit, i = orphanBranches.length, j = deferredOwners.length) => {
|
|
524
|
+
for (visitType !== "[" && (visitScope[nextToken()] = visitType === ")" || visitType === "}" ? parent : visit, accessor = "A" + lastToken, singleNode = visitType !== "]" && visitType !== ")", nextToken()); branchId = +lastToken;) {
|
|
525
|
+
if ((endedBranches ||= []).push(branch = getScope(branchId)), setParentBranch(branch, branch.F), (branch.O = render.p?.[branchId]) && (branch.O.m = render.m), singleNode) {
|
|
526
|
+
for (; startVisit.previousSibling && ~visits.indexOf(startVisit = startVisit.previousSibling););
|
|
527
|
+
branch._ ??= visitScope, branch.K = branch.S = startVisit, visitType === "'" && (branch.a = startVisit);
|
|
528
|
+
} else curBranchScopes = push(curBranchScopes, branch), accessor && (visitScope[accessor] = curBranchScopes, forEach(curBranchScopes, (scope) => scope._ ??= visitScope), curBranchScopes = branchScopesStack.pop()), startVisit = branchStarts.pop(), parent !== startVisit.parentNode && parent.prepend(startVisit), branch.S = startVisit, branch.K = visit.previousSibling === startVisit ? startVisit : parent.insertBefore(new Text(), visit);
|
|
529
|
+
for (; i && orphanBranches[i - 1].L > branchId;) i--, setParentBranch(orphanBranches.pop(), branch);
|
|
530
|
+
for (; j && deferredOwners[j - 1].L > branchId;) {
|
|
531
|
+
j--;
|
|
532
|
+
let owner = deferredOwners.pop();
|
|
533
|
+
owner.F !== owner && (owner.F = branch);
|
|
534
|
+
}
|
|
535
|
+
nextToken();
|
|
536
|
+
}
|
|
537
|
+
if (endedBranches) {
|
|
538
|
+
for (let ended of endedBranches) orphanBranches.push(ended);
|
|
539
|
+
singleNode && (visitScope[accessor] = endedBranches.length > 1 ? endedBranches.reverse() : endedBranches[0]);
|
|
540
|
+
}
|
|
541
|
+
visitType === "[" ? (endedBranches || (branchScopesStack.push(curBranchScopes), curBranchScopes = void 0), branchStarts.push(visit)) : deferredOwners.push(visitScope);
|
|
542
|
+
}, nextToken = () => lastToken = visitText.slice(lastTokenIndex, (lastTokenIndex = visitText.indexOf(" ", lastTokenIndex) + 1 || visitText.length + 1) - 1), processResumes = (resumes = [], effects) => {
|
|
543
|
+
let i = 0;
|
|
544
|
+
for (; i < resumes.length; i++) {
|
|
545
|
+
let serialized = resumes[i];
|
|
546
|
+
if (typeof serialized == "string") for (lastTokenIndex = 0, visitText = serialized; nextToken();) /\D/.test(lastToken) ? lastEffect = registeredValues[lastToken] : effects.push(lastEffect, getScope(lastToken));
|
|
547
|
+
else if (Array.isArray(serialized)) {
|
|
548
|
+
if (!(readyIds && serialized.every((dep) => readyIds.has(dep) && !render.b[dep].length))) break;
|
|
549
|
+
} else if (readyIds && typeof serialized == "number") break;
|
|
550
|
+
else {
|
|
551
|
+
let scopes = serialized(serializeContext);
|
|
552
|
+
Array.isArray(scopes) && applyScopes(scopes);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
return resumes.splice(0, i), i;
|
|
556
|
+
}, lastEffect, visits, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, visitBranches, embedAnchor;
|
|
557
|
+
return serializeContext._ = registeredValues, render.m = (effects) => {
|
|
558
|
+
if (processResumes(render.r, effects), readyIds && render.b) for (let progress = 1; progress;) {
|
|
559
|
+
progress = 0;
|
|
560
|
+
for (let readyId of readyIds) {
|
|
561
|
+
let resumes = render.b[readyId];
|
|
562
|
+
resumes && processResumes(resumes, effects) && (progress = 1);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
let retained = 0;
|
|
566
|
+
for (visit of visits = render.v) if (lastTokenIndex = render.i.length, visitText = visit.data, visitType = visitText[lastTokenIndex++], visitScope = getScope(nextToken()), visitType === "*") {
|
|
567
|
+
let prev = visit.previousSibling;
|
|
568
|
+
visitScope[nextToken()] = prev && (prev.nodeType < 8 || prev.data) ? prev : visit.parentNode.insertBefore(new Text(), visit);
|
|
569
|
+
} else branchesEnabled ? (visitBranches ||= createVisitBranches())() : render.b && (visits[retained++] = visit);
|
|
570
|
+
return embedRenders && !embedAnchor && visit && embedRenders.set(embedAnchor = visit.parentNode.insertBefore(new Text(), visit.nextSibling), [renderId, scopeLookup]), visits.length = retained, effects;
|
|
571
|
+
}, render.w = () => {
|
|
572
|
+
walk(), runResumeEffects(render);
|
|
573
|
+
}, render;
|
|
574
|
+
}) });
|
|
575
|
+
};
|
|
576
|
+
if (renders) {
|
|
577
|
+
initRuntime(renders);
|
|
578
|
+
for (let renderId in renders) runResumeEffects(curRenders(renderId));
|
|
579
|
+
} else defineRuntime({
|
|
580
|
+
configurable: !0,
|
|
581
|
+
set: initRuntime
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
function runResumeEffects(render) {
|
|
585
|
+
try {
|
|
586
|
+
isResuming = 1, runEffects(render.m([]), 1);
|
|
587
|
+
} finally {
|
|
588
|
+
isResuming = 0;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
function getRegisteredWithScope(id, scope) {
|
|
592
|
+
let val = registeredValues[id];
|
|
593
|
+
return scope ? val(scope) : val;
|
|
594
|
+
}
|
|
595
|
+
function _resume(id, obj) {
|
|
596
|
+
return registeredValues[id] = obj;
|
|
597
|
+
}
|
|
598
|
+
function _var_resume(id, signal) {
|
|
599
|
+
return _resume(id, (scope) => (value) => signal(scope, value)), signal;
|
|
600
|
+
}
|
|
601
|
+
function _el(id, accessor) {
|
|
602
|
+
return accessor = decodeAccessor(accessor), _resume(id, (scope) => () => scope[accessor]);
|
|
603
|
+
}
|
|
604
|
+
//#endregion
|
|
605
|
+
//#region src/dom/renderer.ts
|
|
606
|
+
function createBranch($global, renderer, parentScope, parentNode) {
|
|
607
|
+
let branch = createScope($global);
|
|
608
|
+
return branch._ = renderer.e || parentScope, setParentBranch(branch, parentScope?.F), renderer.b?.(branch, parentNode.namespaceURI), branch;
|
|
609
|
+
}
|
|
610
|
+
function setParentBranch(branch, parentBranch) {
|
|
611
|
+
parentBranch && (branch.N = parentBranch, (parentBranch.D ||= /* @__PURE__ */ new Set()).add(branch)), branch.F = branch;
|
|
612
|
+
}
|
|
613
|
+
function createAndSetupBranch($global, renderer, parentScope, parentNode) {
|
|
614
|
+
return setupBranch(renderer, createBranch($global, renderer, parentScope, parentNode));
|
|
615
|
+
}
|
|
616
|
+
function setupBranch(renderer, branch) {
|
|
617
|
+
return renderer.c && queueRender(branch, renderer.c, -1), branch;
|
|
618
|
+
}
|
|
619
|
+
function _content(id, template, walks, setup, params, dynamicScopesAccessor) {
|
|
620
|
+
walks = walks ? walks.replace(/[^\0-1]+$/, "") : "", setup = setup ? setup._ || setup : void 0, params ||= void 0;
|
|
621
|
+
let clone = template ? (branch, ns) => {
|
|
622
|
+
((cloneCache[ns] ||= {})[template] ||= createCloneableHTML(template, ns))(branch, walks);
|
|
623
|
+
} : (branch) => {
|
|
624
|
+
walk(branch.S = branch.K = new Text(), walks, branch);
|
|
625
|
+
};
|
|
626
|
+
return (owner) => ({
|
|
627
|
+
a: id,
|
|
628
|
+
b: clone,
|
|
629
|
+
e: owner,
|
|
630
|
+
c: setup,
|
|
631
|
+
d: params,
|
|
632
|
+
f: dynamicScopesAccessor
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
function _content_resume(id, template, walks, setup, params, dynamicScopesAccessor) {
|
|
636
|
+
return _resume(id, _content(id, template, walks, setup, params, dynamicScopesAccessor));
|
|
637
|
+
}
|
|
638
|
+
function _content_closures(renderer, closureFns) {
|
|
639
|
+
let closureSignals = {};
|
|
640
|
+
for (let key in closureFns) closureSignals[key] = _const(+key, closureFns[key]);
|
|
641
|
+
return (owner, closureValues) => {
|
|
642
|
+
let instance = renderer(owner);
|
|
643
|
+
return instance.g = closureSignals, instance.h = closureValues, instance;
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
function createCloneableHTML(html, ns) {
|
|
647
|
+
let { firstChild, lastChild } = parseHTML(html, ns), parent = document.createElementNS(ns, "t");
|
|
648
|
+
return insertChildNodes(parent, null, firstChild, lastChild), firstChild === lastChild && firstChild.nodeType < 8 ? (branch, walks) => {
|
|
649
|
+
walk(branch.S = branch.K = firstChild.cloneNode(!0), walks, branch);
|
|
650
|
+
} : (branch, walks) => {
|
|
651
|
+
let clone = parent.cloneNode(!0);
|
|
652
|
+
walk(clone.firstChild, walks, branch), branch.S = clone.firstChild, branch.K = clone.lastChild;
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
//#endregion
|
|
656
|
+
//#region src/dom/dom.ts
|
|
657
|
+
function _to_text(value) {
|
|
658
|
+
return value || value === 0 ? value + "" : "";
|
|
659
|
+
}
|
|
660
|
+
function _attr(element, name, value) {
|
|
661
|
+
setAttribute(element, name, normalizeAttrValue(value));
|
|
662
|
+
}
|
|
663
|
+
function setAttribute(element, name, value) {
|
|
664
|
+
element.getAttribute(name) != value && (value === void 0 ? element.removeAttribute(name) : element.setAttribute(name, value));
|
|
665
|
+
}
|
|
666
|
+
function _attr_class(element, value) {
|
|
667
|
+
setAttribute(element, "class", toDelimitedString(value, " ", stringifyClassObject) || void 0);
|
|
668
|
+
}
|
|
669
|
+
function _attr_class_items(element, items) {
|
|
670
|
+
for (let key in items) _attr_class_item(element, key, items[key]);
|
|
671
|
+
}
|
|
672
|
+
function _attr_class_item(element, name, value) {
|
|
673
|
+
element.classList.toggle(name, !!value);
|
|
674
|
+
}
|
|
675
|
+
function _attr_style(element, value) {
|
|
676
|
+
setAttribute(element, "style", toDelimitedString(value, ";", stringifyStyleObject) || void 0);
|
|
677
|
+
}
|
|
678
|
+
function _attr_style_items(element, items) {
|
|
679
|
+
for (let key in items) _attr_style_item(element, key, items[key]);
|
|
680
|
+
}
|
|
681
|
+
function _attr_style_item(element, name, value) {
|
|
682
|
+
element.style.setProperty(name, _to_text(value));
|
|
683
|
+
}
|
|
684
|
+
function _style_shell(scope, nodeAccessor) {
|
|
685
|
+
let element = scope[nodeAccessor], id = _id(scope);
|
|
686
|
+
_attr_nonce(scope, nodeAccessor), element.className = id, _text_content(element, "." + id + "~*{}");
|
|
687
|
+
}
|
|
688
|
+
function _style_rule_item(element, name, value) {
|
|
689
|
+
let text = element.textContent, decl = name + ":" + escapeStyleValue(_to_text(value)) + ";", start = text.indexOf("{" + name + ":");
|
|
690
|
+
~start || (start = text.indexOf(";" + name + ":")), _text_content(element, ~start ? text.slice(0, ++start) + decl + text.slice(text.indexOf(";", start) + 1) : text.slice(0, -1) + decl + "}");
|
|
691
|
+
}
|
|
692
|
+
function _attr_nonce(scope, nodeAccessor) {
|
|
693
|
+
_attr(scope[nodeAccessor], "nonce", scope.$.cspNonce);
|
|
694
|
+
}
|
|
695
|
+
function _text(node, value) {
|
|
696
|
+
let normalizedValue = _to_text(value);
|
|
697
|
+
node.data !== normalizedValue && (node.data = normalizedValue);
|
|
698
|
+
}
|
|
699
|
+
function _text_content(node, value) {
|
|
700
|
+
let normalizedValue = _to_text(value);
|
|
701
|
+
node.textContent !== normalizedValue && (node.textContent = normalizedValue);
|
|
702
|
+
}
|
|
703
|
+
function _attrs(scope, nodeAccessor, nextAttrs, controllable) {
|
|
704
|
+
let el = scope[nodeAccessor];
|
|
705
|
+
for (let i = el.attributes.length; i--;) {
|
|
706
|
+
let { name } = el.attributes.item(i);
|
|
707
|
+
nextAttrs && (name in nextAttrs || hasAttrAlias(el, name, nextAttrs)) || el.removeAttribute(name);
|
|
708
|
+
}
|
|
709
|
+
attrsInternal(scope, nodeAccessor, nextAttrs, controllable);
|
|
710
|
+
}
|
|
711
|
+
function _attrs_content(scope, nodeAccessor, nextAttrs, controllable) {
|
|
712
|
+
_attrs(scope, nodeAccessor, nextAttrs, controllable), _attr_content(scope, nodeAccessor, nextAttrs?.content);
|
|
713
|
+
}
|
|
714
|
+
function hasAttrAlias(element, attr, nextAttrs) {
|
|
715
|
+
return attr === "checked" && element.tagName === "INPUT" && "checkedValue" in nextAttrs;
|
|
716
|
+
}
|
|
717
|
+
function _attrs_partial(scope, nodeAccessor, nextAttrs, skip, controllable) {
|
|
718
|
+
let el = scope[nodeAccessor], partial = {};
|
|
719
|
+
for (let i = el.attributes.length; i--;) {
|
|
720
|
+
let { name } = el.attributes.item(i);
|
|
721
|
+
!skip[name] && !(nextAttrs && name in nextAttrs) && el.removeAttribute(name);
|
|
722
|
+
}
|
|
723
|
+
for (let name in nextAttrs) {
|
|
724
|
+
let key = isEventHandler(name) ? `on-${getEventHandlerName(name)}` : name;
|
|
725
|
+
skip[key] || (partial[key] = nextAttrs[name]);
|
|
726
|
+
}
|
|
727
|
+
attrsInternal(scope, nodeAccessor, partial, controllable);
|
|
728
|
+
}
|
|
729
|
+
function _attrs_partial_content(scope, nodeAccessor, nextAttrs, skip, controllable) {
|
|
730
|
+
_attrs_partial(scope, nodeAccessor, nextAttrs, skip, controllable), _attr_content(scope, nodeAccessor, nextAttrs?.content);
|
|
731
|
+
}
|
|
732
|
+
function attrsInternal(scope, nodeAccessor, nextAttrs, controllable) {
|
|
733
|
+
let el = scope[nodeAccessor], events = scope["I" + nodeAccessor], skip;
|
|
734
|
+
for (let name in events) events[name] = 0;
|
|
735
|
+
controllable && (scope["F" + nodeAccessor] = 5, scope["E" + nodeAccessor] = 0, nextAttrs && (skip = controllable(scope, nodeAccessor, nextAttrs)));
|
|
736
|
+
for (let name in nextAttrs) {
|
|
737
|
+
let value = nextAttrs[name];
|
|
738
|
+
switch (name) {
|
|
739
|
+
case "class":
|
|
740
|
+
_attr_class(el, value);
|
|
741
|
+
break;
|
|
742
|
+
case "style":
|
|
743
|
+
_attr_style(el, value);
|
|
744
|
+
break;
|
|
745
|
+
default:
|
|
746
|
+
isEventHandler(name) ? (events ||= scope["I" + nodeAccessor] = {})[getEventHandlerName(name)] = value : skip?.test(name) || name === "content" && el.tagName !== "META" || _attr(el, name, value);
|
|
747
|
+
break;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
function _attr_content(scope, nodeAccessor, value) {
|
|
752
|
+
let content = normalizeClientRender(value);
|
|
753
|
+
scope["D" + nodeAccessor] !== (scope["D" + nodeAccessor] = content?.a) && (setConditionalRenderer(scope, nodeAccessor, content, createAndSetupBranch), content?.f && subscribeToScopeSet(content.e, content.f, scope["A" + nodeAccessor]));
|
|
754
|
+
for (let accessor in content?.g) content.g[accessor](scope["A" + nodeAccessor], content.h[accessor]);
|
|
755
|
+
}
|
|
756
|
+
function _attrs_script(scope, nodeAccessor) {
|
|
757
|
+
let el = scope[nodeAccessor], events = scope["I" + nodeAccessor];
|
|
758
|
+
controllableScripts[scope["F" + nodeAccessor]]?.(scope, nodeAccessor);
|
|
759
|
+
for (let name in events) _on(el, name, events[name]);
|
|
760
|
+
}
|
|
761
|
+
function _html(scope, value, accessor) {
|
|
762
|
+
let firstChild = scope[accessor], parentNode = firstChild.parentNode, lastChild = scope["H" + accessor] || firstChild, newContent = parseHTML(_to_text(value), parentNode.namespaceURI);
|
|
763
|
+
insertChildNodes(parentNode, firstChild, scope[accessor] = newContent.firstChild || newContent.appendChild(new Text()), scope["H" + accessor] = newContent.lastChild), removeChildNodes(firstChild, lastChild);
|
|
764
|
+
}
|
|
765
|
+
function normalizeClientRender(value) {
|
|
766
|
+
let renderer = normalizeDynamicRenderer(value);
|
|
767
|
+
if (renderer && renderer.a) return renderer;
|
|
768
|
+
}
|
|
769
|
+
function normalizeAttrValue(value) {
|
|
770
|
+
if (isNotVoid(value)) return value === !0 ? "" : value + "";
|
|
771
|
+
}
|
|
772
|
+
function _lifecycle(scope, thisObj, index = 0) {
|
|
773
|
+
let accessor = "K" + index, instance = scope[accessor];
|
|
774
|
+
instance ? (Object.assign(instance, thisObj), instance.onUpdate?.()) : (scope[accessor] = thisObj, Object.assign(thisObj, thisObj.onMount?.()), $signal(scope, accessor).onabort = () => thisObj.onDestroy?.());
|
|
775
|
+
}
|
|
776
|
+
function removeChildNodes(startNode, endNode) {
|
|
777
|
+
let stop = endNode.nextSibling;
|
|
778
|
+
for (; startNode !== stop;) {
|
|
779
|
+
let next = startNode.nextSibling;
|
|
780
|
+
startNode.remove(), startNode = next;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
function insertChildNodes(parentNode, referenceNode, startNode, endNode) {
|
|
784
|
+
if (parentNode.isConnected) parentNode.insertBefore(toInsertNode(startNode, endNode), referenceNode);
|
|
785
|
+
else {
|
|
786
|
+
let stop = endNode.nextSibling;
|
|
787
|
+
for (; startNode !== stop;) {
|
|
788
|
+
let next = startNode.nextSibling;
|
|
789
|
+
parentNode.insertBefore(startNode, referenceNode), startNode = next;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
return parentNode;
|
|
793
|
+
}
|
|
794
|
+
function toInsertNode(startNode, endNode) {
|
|
795
|
+
return startNode === endNode ? startNode : insertChildNodes(new DocumentFragment(), null, startNode, endNode);
|
|
796
|
+
}
|
|
797
|
+
//#endregion
|
|
798
|
+
//#region src/dom/resolve-cursor-position.ts
|
|
799
|
+
function resolveCursorPosition(inputType, initialPosition, initialValue, updatedValue) {
|
|
800
|
+
if ((initialPosition || initialPosition === 0) && (initialPosition !== initialValue.length || /kw/.test(inputType))) {
|
|
801
|
+
let before = initialValue.slice(0, initialPosition), after = initialValue.slice(initialPosition);
|
|
802
|
+
if (updatedValue.startsWith(before)) return initialPosition;
|
|
803
|
+
if (updatedValue.endsWith(after)) return updatedValue.length - after.length;
|
|
804
|
+
let count = before.replace(R, "").length, pos = 0;
|
|
805
|
+
for (; count && updatedValue[pos];) updatedValue[pos++].replace(R, "") && count--;
|
|
806
|
+
return pos;
|
|
807
|
+
}
|
|
808
|
+
return -1;
|
|
809
|
+
}
|
|
810
|
+
//#endregion
|
|
811
|
+
//#region src/dom/controllable.ts
|
|
812
|
+
function _attr_input_checked_default(scope, nodeAccessor, checked) {
|
|
813
|
+
let el = scope[nodeAccessor], normalizedChecked = isNotVoid(checked);
|
|
814
|
+
if (el.defaultChecked !== normalizedChecked) {
|
|
815
|
+
let restoreValue = scope.H < runId ? el.checked : normalizedChecked;
|
|
816
|
+
el.defaultChecked = normalizedChecked, restoreValue !== normalizedChecked && (el.checked = restoreValue);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
/** Filled by the `controllable-*.feat` modules a compiled page imports, so a
|
|
820
|
+
* page carries only the control kinds its tags can be (`_attrs_script`
|
|
821
|
+
* resolves the kind at run time). */
|
|
822
|
+
/** The render pass equivalent, for a tag whose name is only known at run time;
|
|
823
|
+
* a statically named tag passes its claim to `_attrs` instead. */
|
|
824
|
+
function _attr_input_checked(scope, nodeAccessor, checked, checkedChange) {
|
|
825
|
+
let el = scope[nodeAccessor], normalizedChecked = isNotVoid(checked);
|
|
826
|
+
scope["E" + nodeAccessor] = checkedChange, scope["F" + nodeAccessor] = checkedChange ? 0 : 5, checkedChange && scope.H < runId ? el.checked = normalizedChecked : _attr_input_checked_default(scope, nodeAccessor, normalizedChecked);
|
|
827
|
+
}
|
|
828
|
+
function _attr_input_checked_script(scope, nodeAccessor) {
|
|
829
|
+
let el = scope[nodeAccessor];
|
|
830
|
+
syncControllableFormInput(el, hasCheckboxChanged, () => {
|
|
831
|
+
let checkedChange = scope["E" + nodeAccessor];
|
|
832
|
+
if (checkedChange) {
|
|
833
|
+
let newValue = el.checked;
|
|
834
|
+
el.checked = !newValue, checkedChange(newValue), run();
|
|
835
|
+
}
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
function _attr_input_checkedValue_default(scope, nodeAccessor, checkedValue, value) {
|
|
839
|
+
let multiple = Array.isArray(checkedValue), normalizedValue = normalizeStrProp(value), normalizedCheckedValue = multiple ? checkedValue.map(normalizeStrProp) : normalizeStrProp(checkedValue);
|
|
840
|
+
_attr(scope[nodeAccessor], "value", value), _attr_input_checked_default(scope, nodeAccessor, multiple ? normalizedCheckedValue.includes(normalizedValue) : normalizedValue === normalizedCheckedValue);
|
|
841
|
+
}
|
|
842
|
+
function _attr_input_checkedValue(scope, nodeAccessor, checkedValue, checkedValueChange, value) {
|
|
843
|
+
let el = scope[nodeAccessor], multiple = Array.isArray(checkedValue), normalizedCheckedValue = scope["G" + nodeAccessor] = multiple ? checkedValue.map(normalizeStrProp) : normalizeStrProp(checkedValue);
|
|
844
|
+
scope["E" + nodeAccessor] = checkedValueChange, scope["F" + nodeAccessor] = checkedValueChange ? 1 : 5, checkedValueChange && scope.H < runId ? (el.checked = multiple ? normalizedCheckedValue.includes(normalizeStrProp(value)) : normalizeStrProp(value) === normalizedCheckedValue, _attr(el, "value", value)) : _attr_input_checkedValue_default(scope, nodeAccessor, checkedValue, value);
|
|
845
|
+
}
|
|
846
|
+
function _attr_input_checkedValue_script(scope, nodeAccessor) {
|
|
847
|
+
let el = scope[nodeAccessor];
|
|
848
|
+
isResuming && el.defaultChecked && (scope["G" + nodeAccessor] ? scope["G" + nodeAccessor].push(el.value) : scope["G" + nodeAccessor] = el.value), syncControllableFormInput(el, hasCheckboxChanged, () => {
|
|
849
|
+
let checkedValueChange = scope["E" + nodeAccessor];
|
|
850
|
+
if (checkedValueChange) {
|
|
851
|
+
let controlledValueKey = "G" + nodeAccessor, oldValue = scope[controlledValueKey], newValue = Array.isArray(oldValue) ? updateList(oldValue, el.value, el.checked) : el.checked ? el.value : void 0;
|
|
852
|
+
if (el.name && el.type[0] === "r") for (let radio of document.querySelectorAll(`[type=radio][name=${CSS.escape(el.name)}]`)) radio.form === el.form && (newValue === void 0 && radio.defaultChecked && (newValue = radio.value), radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : controlledValueKey in scope ? oldValue === radio.value : radio.defaultChecked);
|
|
853
|
+
else el.checked = !el.checked;
|
|
854
|
+
checkedValueChange(newValue), run();
|
|
855
|
+
}
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
function _attr_input_value_default(scope, nodeAccessor, value) {
|
|
859
|
+
let el = scope[nodeAccessor], normalizedValue = normalizeAttrValue(value) || "";
|
|
860
|
+
if (el.defaultValue !== normalizedValue) {
|
|
861
|
+
let restoreValue = scope.H < runId ? el.value : normalizedValue;
|
|
862
|
+
el.defaultValue = normalizedValue, setInputValue(el, restoreValue);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
function _attr_input_value_dynamic_default(scope, nodeAccessor, value) {
|
|
866
|
+
let el = scope[nodeAccessor];
|
|
867
|
+
/i[ot]|e[cns]|^[bi]/.test(el.type) ? _attr(el, "value", value) : _attr_input_value_default(scope, nodeAccessor, value);
|
|
868
|
+
}
|
|
869
|
+
function _attr_input_value(scope, nodeAccessor, value, valueChange, setDefault = _attr_input_value_default) {
|
|
870
|
+
let el = scope[nodeAccessor], normalizedValue = normalizeAttrValue(value) || "";
|
|
871
|
+
scope["E" + nodeAccessor] = valueChange, scope["G" + nodeAccessor] = normalizedValue, scope["F" + nodeAccessor] = valueChange ? 2 : 5, valueChange && scope.H < runId ? setInputValue(el, normalizedValue) : setDefault(scope, nodeAccessor, normalizedValue);
|
|
872
|
+
}
|
|
873
|
+
function _attr_input_value_attribute_default(scope, nodeAccessor, value) {
|
|
874
|
+
_attr(scope[nodeAccessor], "value", value);
|
|
875
|
+
}
|
|
876
|
+
function _attr_input_value_script(scope, nodeAccessor) {
|
|
877
|
+
let el = scope[nodeAccessor];
|
|
878
|
+
isResuming && (scope["G" + nodeAccessor] = el.defaultValue), syncControllableFormInput(el, hasValueChanged, (ev) => {
|
|
879
|
+
let valueChange = scope["E" + nodeAccessor];
|
|
880
|
+
valueChange && (inputType = ev?.inputType, valueChange(el.value), run(), setInputValue(el, scope["G" + nodeAccessor]), inputType = "");
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
function setInputValue(el, value) {
|
|
884
|
+
if (el.value !== value) {
|
|
885
|
+
let updatedPosition = resolveCursorPosition(inputType, document.activeElement === el && el.selectionStart, el.value, el.value = value);
|
|
886
|
+
~updatedPosition && el.setSelectionRange(updatedPosition, updatedPosition);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
function _attr_select_value_default(scope, nodeAccessor, value) {
|
|
890
|
+
let restoreValue, el = scope[nodeAccessor], live = scope.H < runId, multiple = Array.isArray(value), normalizedValue = multiple ? value.map(normalizeStrProp) : normalizeStrProp(value);
|
|
891
|
+
pendingEffects.unshift(() => {
|
|
892
|
+
for (let opt of el.options) {
|
|
893
|
+
let selected = multiple ? normalizedValue.includes(opt.value) : opt.value === normalizedValue;
|
|
894
|
+
opt.defaultSelected !== selected && (live && (restoreValue ??= getSelectValue(el, multiple)), opt.defaultSelected = selected);
|
|
895
|
+
}
|
|
896
|
+
restoreValue !== void 0 && setSelectValue(el, restoreValue, multiple);
|
|
897
|
+
}, scope);
|
|
898
|
+
}
|
|
899
|
+
function _attr_select_value(scope, nodeAccessor, value, valueChange) {
|
|
900
|
+
let el = scope[nodeAccessor], existing = scope.H < runId, multiple = Array.isArray(value), normalizedValue = scope["G" + nodeAccessor] = multiple ? value.map(normalizeStrProp) : normalizeStrProp(value);
|
|
901
|
+
scope["E" + nodeAccessor] = valueChange, scope["F" + nodeAccessor] = valueChange ? 3 : 5, valueChange && existing ? pendingEffects.unshift(() => setSelectValue(el, normalizedValue, multiple), scope) : _attr_select_value_default(scope, nodeAccessor, normalizedValue);
|
|
902
|
+
}
|
|
903
|
+
function _attr_select_value_script(scope, nodeAccessor) {
|
|
904
|
+
let el = scope[nodeAccessor], onChange = () => {
|
|
905
|
+
let valueChange = scope["E" + nodeAccessor];
|
|
906
|
+
if (valueChange) {
|
|
907
|
+
let oldValue = scope["G" + nodeAccessor], multiple = Array.isArray(oldValue), newValue = getSelectValue(el, multiple);
|
|
908
|
+
setSelectValue(el, oldValue, multiple), valueChange(newValue), run();
|
|
909
|
+
}
|
|
910
|
+
};
|
|
911
|
+
if (isResuming) if (el.multiple) {
|
|
912
|
+
scope["G" + nodeAccessor] = [];
|
|
913
|
+
for (let opt of el.options) opt.defaultSelected && scope["G" + nodeAccessor].push(opt.value);
|
|
914
|
+
} else {
|
|
915
|
+
scope["G" + nodeAccessor] = "";
|
|
916
|
+
for (let opt of el.options) if (opt.defaultSelected) {
|
|
917
|
+
scope["G" + nodeAccessor] = opt.value;
|
|
918
|
+
break;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
syncControllableFormInput(el, hasSelectChanged, onChange), observeOnce(scope, nodeAccessor, {
|
|
922
|
+
childList: !0,
|
|
923
|
+
subtree: !0
|
|
924
|
+
}, () => {
|
|
925
|
+
let value = scope["G" + nodeAccessor];
|
|
926
|
+
(Array.isArray(value) ? value.length !== el.selectedOptions.length || value.some((_, i) => !value.includes(el.selectedOptions[i].value)) : el.value !== value) && onChange();
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
function setSelectValue(el, value, multiple) {
|
|
930
|
+
if (multiple) for (let opt of el.options) opt.selected = value.includes(opt.value);
|
|
931
|
+
else el.value = value;
|
|
932
|
+
}
|
|
933
|
+
function getSelectValue(el, multiple) {
|
|
934
|
+
return multiple ? Array.from(el.selectedOptions, (opt) => opt.value) : el.value;
|
|
935
|
+
}
|
|
936
|
+
function _attr_details_or_dialog_open_default(scope, nodeAccessor, open) {
|
|
937
|
+
scope.H === runId && (scope[nodeAccessor].open = isNotVoid(open));
|
|
938
|
+
}
|
|
939
|
+
function _attr_details_or_dialog_open(scope, nodeAccessor, open, openChange) {
|
|
940
|
+
let normalizedOpen = scope["G" + nodeAccessor] = isNotVoid(open);
|
|
941
|
+
scope["E" + nodeAccessor] = openChange, scope["F" + nodeAccessor] = openChange ? 4 : 5, openChange && scope.H < runId ? scope[nodeAccessor].open = normalizedOpen : _attr_details_or_dialog_open_default(scope, nodeAccessor, normalizedOpen);
|
|
942
|
+
}
|
|
943
|
+
function _attr_details_or_dialog_open_script(scope, nodeAccessor) {
|
|
944
|
+
let el = scope[nodeAccessor];
|
|
945
|
+
observeOnce(scope, nodeAccessor, {
|
|
946
|
+
attributes: !0,
|
|
947
|
+
attributeFilter: ["open"]
|
|
948
|
+
}, () => {
|
|
949
|
+
let openChange = scope["E" + nodeAccessor];
|
|
950
|
+
if (openChange && el.open === !scope["G" + nodeAccessor]) {
|
|
951
|
+
let newValue = el.open;
|
|
952
|
+
el.open = !newValue, openChange(newValue), run();
|
|
953
|
+
}
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
function observeOnce(scope, nodeAccessor, init, callback) {
|
|
957
|
+
(scope["N" + nodeAccessor] ||= new MutationObserver(callback)).observe(scope[nodeAccessor], init);
|
|
958
|
+
}
|
|
959
|
+
function syncControllableFormInput(el, hasChanged, onChange) {
|
|
960
|
+
el._ = onChange, delegate("input", handleChange), el.form && delegate("reset", handleFormReset), isResuming && hasChanged(el) && queueMicrotask(onChange);
|
|
961
|
+
}
|
|
962
|
+
function handleChange(ev) {
|
|
963
|
+
ev.target._?.(ev);
|
|
964
|
+
}
|
|
965
|
+
function handleFormReset(ev) {
|
|
966
|
+
let handlers = [];
|
|
967
|
+
for (let el of ev.target.elements) el._ && hasFormElementChanged(el) && handlers.push(el._);
|
|
968
|
+
requestAnimationFrame(() => {
|
|
969
|
+
if (!ev.defaultPrevented) for (let change of handlers) change();
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
function hasValueChanged(el) {
|
|
973
|
+
return el.value !== el.defaultValue;
|
|
974
|
+
}
|
|
975
|
+
function hasCheckboxChanged(el) {
|
|
976
|
+
return el.checked !== el.defaultChecked;
|
|
977
|
+
}
|
|
978
|
+
function hasSelectChanged(el) {
|
|
979
|
+
for (let opt of el.options) if (opt.selected !== opt.defaultSelected) return !0;
|
|
980
|
+
}
|
|
981
|
+
function hasFormElementChanged(el) {
|
|
982
|
+
return el.options ? hasSelectChanged(el) : hasValueChanged(el) || hasCheckboxChanged(el);
|
|
983
|
+
}
|
|
984
|
+
function normalizeStrProp(value) {
|
|
985
|
+
return normalizeAttrValue(value) || "";
|
|
986
|
+
}
|
|
987
|
+
function updateList(arr, val, push) {
|
|
988
|
+
let index = arr.indexOf(val);
|
|
989
|
+
return (push ? !~index && [...arr, val] : ~index && arr.slice(0, index).concat(arr.slice(index + 1))) || arr;
|
|
990
|
+
}
|
|
991
|
+
function _controllable_input(scope, nodeAccessor, nextAttrs) {
|
|
992
|
+
return "checked" in nextAttrs || "checkedChange" in nextAttrs ? (_attr_input_checked(scope, nodeAccessor, nextAttrs.checked, nextAttrs.checkedChange), /^checked(?:Value)?(?:Change)?$/) : "checkedValue" in nextAttrs || "checkedValueChange" in nextAttrs ? (_attr_input_checkedValue(scope, nodeAccessor, nextAttrs.checkedValue, nextAttrs.checkedValueChange, nextAttrs.value), /^(?:value|checked(?:Value)?)(?:Change)?$/) : _controllable_textarea(scope, nodeAccessor, nextAttrs, _attr_input_value_dynamic_default);
|
|
993
|
+
}
|
|
994
|
+
function _controllable_textarea(scope, nodeAccessor, nextAttrs, dynamicDefault) {
|
|
995
|
+
if ("value" in nextAttrs || "valueChange" in nextAttrs) return _attr_input_value(scope, nodeAccessor, nextAttrs.value, nextAttrs.valueChange, dynamicDefault), /^value(?:Change)?$/;
|
|
996
|
+
}
|
|
997
|
+
function _controllable_select(scope, nodeAccessor, nextAttrs) {
|
|
998
|
+
if ("value" in nextAttrs || "valueChange" in nextAttrs) return _attr_select_value(scope, nodeAccessor, nextAttrs.value, nextAttrs.valueChange), /^value(?:Change)?$/;
|
|
999
|
+
}
|
|
1000
|
+
function _controllable_open(scope, nodeAccessor, nextAttrs) {
|
|
1001
|
+
if ("open" in nextAttrs || "openChange" in nextAttrs) return _attr_details_or_dialog_open(scope, nodeAccessor, nextAttrs.open, nextAttrs.openChange), /^open(?:Change)?$/;
|
|
1002
|
+
}
|
|
1003
|
+
//#endregion
|
|
1004
|
+
//#region src/dom/control-flow.ts
|
|
1005
|
+
function _await_promise(nodeAccessor, params) {
|
|
1006
|
+
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
1007
|
+
let promiseAccessor = "L" + nodeAccessor, branchAccessor = "A" + nodeAccessor, resolveAwait = (scope, referenceNode, value) => {
|
|
1008
|
+
let awaitBranch = scope[branchAccessor];
|
|
1009
|
+
return awaitBranch.V && (awaitBranch.Y = awaitBranch.Y?.forEach(syncGen), setupBranch(awaitBranch.V, awaitBranch), awaitBranch.V = 0, insertBranchBefore(awaitBranch, scope[nodeAccessor].parentNode, scope[nodeAccessor]), referenceNode.remove()), params?.(awaitBranch, [value]), awaitBranch;
|
|
1010
|
+
}, awaitPromise = (scope, promise) => {
|
|
1011
|
+
!isPromise(promise) && scope[promiseAccessor] && (promise = Promise.resolve(promise));
|
|
1012
|
+
let awaitBranch = scope[branchAccessor], tryPlaceholder = findBranchWithKey(scope, "Q"), tryBranch = tryPlaceholder || awaitBranch;
|
|
1013
|
+
if (!(isPromise(promise) ? tryBranch : awaitBranch)) {
|
|
1014
|
+
scope[promiseAccessor] = () => awaitPromise(scope, promise);
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
if (!isPromise(promise)) {
|
|
1018
|
+
resolveAwait(scope, scope[nodeAccessor], promise);
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
let awaitCounter = tryBranch.O;
|
|
1022
|
+
placeholderShown.add(pendingEffects), !tryPlaceholder && !awaitCounter?.i && (awaitCounter = createAwaitCounter(tryBranch, () => {
|
|
1023
|
+
if (tryBranch === scope[branchAccessor]) {
|
|
1024
|
+
let anchor = scope[nodeAccessor];
|
|
1025
|
+
if (anchor.parentNode) {
|
|
1026
|
+
let detachedParent = scope[branchAccessor].S.parentNode;
|
|
1027
|
+
detachedParent === anchor.parentNode ? anchor.remove() : anchor.replaceWith(detachedParent);
|
|
1028
|
+
}
|
|
1029
|
+
} else dismissPlaceholder(tryBranch);
|
|
1030
|
+
})), scope[promiseAccessor] || (awaitBranch && (awaitBranch.W ||= []), tryPlaceholder ? awaitCounter = addAwaitCounter(scope, tryPlaceholder) : awaitCounter.i++ || requestAnimationFrame(() => awaitCounter.i && runEffects(prepareEffects(() => queueRender(scope, () => {
|
|
1031
|
+
awaitBranch.V || (awaitBranch.S.parentNode.insertBefore(scope[nodeAccessor], awaitBranch.S), tempDetachBranch(tryBranch));
|
|
1032
|
+
}, -1)))));
|
|
1033
|
+
let thisPromise = scope[promiseAccessor] = promise.then((data) => {
|
|
1034
|
+
if (thisPromise === scope[promiseAccessor]) {
|
|
1035
|
+
let referenceNode = scope[nodeAccessor];
|
|
1036
|
+
if (scope[promiseAccessor] = 0, scope.F?.H === 0) {
|
|
1037
|
+
awaitCounter.c(), run();
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
queueAsyncRender(scope, () => {
|
|
1041
|
+
awaitBranch = resolveAwait(scope, referenceNode, data);
|
|
1042
|
+
let pendingRenders = awaitBranch.W;
|
|
1043
|
+
if (awaitBranch.W = 0, pendingRenders?.forEach(queuePendingRender), placeholderShown.add(pendingEffects), awaitCounter.c(), awaitCounter.m) {
|
|
1044
|
+
let fnScopes = /* @__PURE__ */ new Map(), effects = awaitCounter.m([]);
|
|
1045
|
+
for (let i = 0; i < pendingEffects.length;) {
|
|
1046
|
+
let fn = pendingEffects[i++], scopes = fnScopes.get(fn);
|
|
1047
|
+
scopes || fnScopes.set(fn, scopes = /* @__PURE__ */ new Set()), scopes.add(pendingEffects[i++]);
|
|
1048
|
+
}
|
|
1049
|
+
for (let i = 0; i < effects.length;) {
|
|
1050
|
+
let fn = effects[i++], scope = effects[i++];
|
|
1051
|
+
fnScopes.get(fn)?.has(scope) || queueEffect(scope, fn);
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
});
|
|
1055
|
+
}
|
|
1056
|
+
}, (error) => {
|
|
1057
|
+
thisPromise === scope[promiseAccessor] && (scope[promiseAccessor] = 0, tryPlaceholder && !awaitCounter.m ? awaitCounter.c() : awaitCounter.i = 0, queueAsyncRender(scope, renderCatch, error));
|
|
1058
|
+
});
|
|
1059
|
+
};
|
|
1060
|
+
return awaitPromise;
|
|
1061
|
+
}
|
|
1062
|
+
function _await_content(nodeAccessor, template, walks, setup) {
|
|
1063
|
+
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
1064
|
+
let branchAccessor = "A" + nodeAccessor, promiseAccessor = "L" + nodeAccessor, renderer = _content("", template, walks, setup)();
|
|
1065
|
+
return (scope) => {
|
|
1066
|
+
let pendingScopes = collectScopes(() => (scope[branchAccessor] = createBranch(scope.$, renderer, scope, scope[nodeAccessor].parentNode)).V = renderer);
|
|
1067
|
+
scope[branchAccessor].Y = pendingScopes;
|
|
1068
|
+
let resolveSync = scope[promiseAccessor];
|
|
1069
|
+
typeof resolveSync == "function" && (scope[promiseAccessor] = 0, resolveSync());
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
function addAwaitCounter(scope, tryBranch = findBranchWithKey(scope, "Q")) {
|
|
1073
|
+
if (!tryBranch) return;
|
|
1074
|
+
let awaitCounter = tryBranch.O;
|
|
1075
|
+
return awaitCounter?.i || (awaitCounter = createAwaitCounter(tryBranch, () => dismissPlaceholder(tryBranch))), placeholderShown.add(pendingEffects), awaitCounter.i++ || requestAnimationFrame(() => awaitCounter.i && runEffects(prepareEffects(() => queueRender(tryBranch, () => {
|
|
1076
|
+
insertBranchBefore(tryBranch.P = createAndSetupBranch(tryBranch.$, tryBranch.Q, tryBranch._, tryBranch.S.parentNode), tryBranch.S.parentNode, tryBranch.S), tempDetachBranch(tryBranch);
|
|
1077
|
+
}, -1)))), awaitCounter;
|
|
1078
|
+
}
|
|
1079
|
+
function createAwaitCounter(tryBranch, done) {
|
|
1080
|
+
let awaitCounter = tryBranch.O = {
|
|
1081
|
+
i: 0,
|
|
1082
|
+
c() {
|
|
1083
|
+
if (--awaitCounter.i) return 1;
|
|
1084
|
+
done(), queueEffect(tryBranch, runPendingEffects);
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1087
|
+
return awaitCounter;
|
|
1088
|
+
}
|
|
1089
|
+
function runPendingEffects(scope) {
|
|
1090
|
+
let effects = scope.J;
|
|
1091
|
+
effects && (scope.J = [], runEffects(effects, 1));
|
|
1092
|
+
}
|
|
1093
|
+
function dismissPlaceholder(tryBranch) {
|
|
1094
|
+
let placeholderBranch = tryBranch.P;
|
|
1095
|
+
placeholderBranch && (tryBranch.P = 0, placeholderBranch.S.parentNode.insertBefore(tryBranch.S.parentNode, placeholderBranch.S), removeAndDestroyBranch(placeholderBranch));
|
|
1096
|
+
}
|
|
1097
|
+
function _try(nodeAccessor, template, walks, setup) {
|
|
1098
|
+
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
1099
|
+
let branchAccessor = "A" + nodeAccessor, renderer = _content("", template, walks, setup)();
|
|
1100
|
+
return (scope, input) => {
|
|
1101
|
+
scope[branchAccessor] || setConditionalRenderer(scope, nodeAccessor, renderer, createAndSetupBranch);
|
|
1102
|
+
let branch = scope[branchAccessor];
|
|
1103
|
+
branch && (branch.C = nodeAccessor, branch.E = input.catch && (normalizeDynamicRenderer(input.catch) || 0), branch.Q = normalizeDynamicRenderer(input.placeholder));
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
function renderCatch(scope, error) {
|
|
1107
|
+
let tryWithCatch = findBranchWithKey(scope, "E");
|
|
1108
|
+
if (tryWithCatch) {
|
|
1109
|
+
let owner = tryWithCatch._, placeholderBranch = tryWithCatch.P;
|
|
1110
|
+
placeholderBranch && (tryWithCatch.O && (tryWithCatch.O.i = 0), owner["A" + tryWithCatch.C] = placeholderBranch, destroyBranch(tryWithCatch)), caughtError.add(pendingEffects), setConditionalRenderer(owner, tryWithCatch.C, tryWithCatch.E, createAndSetupBranch), tryWithCatch.E?.d?.(owner["A" + tryWithCatch.C], [error]);
|
|
1111
|
+
} else throw error;
|
|
1112
|
+
}
|
|
1113
|
+
function patchDynamicTag(fn) {
|
|
1114
|
+
_dynamic_tag = fn(_dynamic_tag);
|
|
1115
|
+
}
|
|
1116
|
+
function _resume_dynamic_tag() {
|
|
1117
|
+
_resume("d", dynamicTagScript);
|
|
1118
|
+
}
|
|
1119
|
+
function dynamicTagScript(branch) {
|
|
1120
|
+
_attrs_script(branch, "a");
|
|
1121
|
+
}
|
|
1122
|
+
function setConditionalRenderer(scope, nodeAccessor, newRenderer, createBranch) {
|
|
1123
|
+
let referenceNode = scope[nodeAccessor], prevBranch = scope["A" + nodeAccessor], parentNode = referenceNode.nodeType > 1 ? (prevBranch?.S || referenceNode).parentNode : referenceNode, newBranch = scope["A" + nodeAccessor] = newRenderer && createBranch(scope.$, newRenderer, scope, parentNode);
|
|
1124
|
+
referenceNode === parentNode ? (prevBranch && (destroyBranch(prevBranch), referenceNode.textContent = ""), newBranch && insertBranchBefore(newBranch, parentNode, null)) : prevBranch ? (newBranch ? insertBranchBefore(newBranch, parentNode, prevBranch.S) : parentNode.insertBefore(referenceNode, prevBranch.S), removeAndDestroyBranch(prevBranch)) : newBranch && (insertBranchBefore(newBranch, parentNode, referenceNode), referenceNode.remove());
|
|
1125
|
+
}
|
|
1126
|
+
function createBranchWithTagNameOrRenderer($global, tagNameOrRenderer, parentScope, parentNode) {
|
|
1127
|
+
let branch = createBranch($global, tagNameOrRenderer, parentScope, parentNode);
|
|
1128
|
+
return typeof tagNameOrRenderer == "string" ? branch.a = branch.S = branch.K = document.createElementNS(tagNameOrRenderer === "svg" ? "http://www.w3.org/2000/svg" : tagNameOrRenderer === "math" ? "http://www.w3.org/1998/Math/MathML" : parentNode.namespaceURI, tagNameOrRenderer) : setupBranch(tagNameOrRenderer, branch), branch;
|
|
1129
|
+
}
|
|
1130
|
+
function bySecondArg(_item, index) {
|
|
1131
|
+
return index;
|
|
1132
|
+
}
|
|
1133
|
+
function byFirstArg(name) {
|
|
1134
|
+
return name;
|
|
1135
|
+
}
|
|
1136
|
+
//#endregion
|
|
1137
|
+
export { _html as $, queueEffect as $t, _attr_select_value as A, _id as At, _attr_class as B, _assert_init as Bt, _attr_input_checked_default as C, _closure_get as Ct, _attr_input_value_default as D, _for_selector as Dt, _attr_input_value_attribute_default as E, _for_closure as Et, _controllable_select as F, _return as Ft, _attr_style as G, _on as Gt, _attr_class_items as H, insertBranchBefore as Ht, _controllable_textarea as I, _return_change as It, _attrs as J, caughtError as Jt, _attr_style_item as K, $signal as Kt, controllableRenders as L, _script as Lt, _attr_select_value_script as M, _let as Mt, _controllable_input as N, _let_change as Nt, _attr_input_value_dynamic_default as O, _hoist as Ot, _controllable_open as P, _or as Pt, _attrs_script as Q, queueAsyncRender as Qt, controllableScripts as R, _var as Rt, _attr_input_checkedValue_script as S, _closure as St, _attr_input_value as T, _el_read as Tt, _attr_content as U, removeAndDestroyBranch as Ut, _attr_class_item as V, destroyBranch as Vt, _attr_nonce as W, syncGen as Wt, _attrs_partial as X, placeholderShown as Xt, _attrs_content as Y, installCatch as Yt, _attrs_partial_content as Z, prepareEffects as Zt, _attr_details_or_dialog_open_default as _, getRegisteredWithScope as _t, _for_in as a, forTo as an, _to_text as at, _attr_input_checkedValue as b, ready as bt, _for_until as c, _call as cn, _content as ct, _show as d, createAndSetupBranch as dt, run as en, _lifecycle as et, _try as f, createBranch as ft, _attr_details_or_dialog_open as g, _var_resume as gt, renderCatch as h, _resume as ht, _dynamic_tag_content as i, forOf as in, _text_content as it, _attr_select_value_default as j, _if_closure as jt, _attr_input_value_script as k, _hoist_resume as kt, _if as l, decodeAccessor as ln, _content_closures as lt, patchDynamicTag as m, _el as mt, _await_promise as n, runId as nn, _style_shell as nt, _for_of as o, forUntil as on, insertChildNodes as ot, addAwaitCounter as p, setupBranch as pt, _attr_style_items as q, $signalReset as qt, _dynamic_tag as r, forIn as rn, _text as rt, _for_to as s, _assert_hoist as sn, toInsertNode as st, _await_content as t, runEffects as tn, _style_rule_item as tt, _resume_dynamic_tag as u, _content_resume as ut, _attr_details_or_dialog_open_script as v, init as vt, _attr_input_checked_script as w, _const as wt, _attr_input_checkedValue_default as x, _child_setup as xt, _attr_input_checked as y, initEmbedded as yt, _attr as z, _var_change as zt };
|