marko 6.0.101 → 6.0.103

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/dist/dom.mjs CHANGED
@@ -76,10 +76,11 @@ function normalizeDynamicRenderer(value) {
76
76
  if (value) {
77
77
  if (typeof value == "string") return value;
78
78
  let normalized = value.content || value.default || value;
79
- if (/* @__KEY__ */ "l" in normalized)
79
+ if (/* @__KEY__ */ "f" in normalized)
80
80
  return normalized;
81
81
  }
82
82
  }
83
+ var decodeAccessor = (num) => (num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36);
83
84
 
84
85
  // src/dom/event.ts
85
86
  var defaultDelegator = createDelegator();
@@ -129,10 +130,10 @@ function stripSpacesAndPunctuation(str) {
129
130
  var nextScopeId = 1e6;
130
131
  function createScope($global, closestBranch) {
131
132
  let scope = {
132
- l: nextScopeId++,
133
- n: 1,
134
- k: closestBranch,
135
- $global
133
+ M: nextScopeId++,
134
+ I: 1,
135
+ G: closestBranch,
136
+ $: $global
136
137
  };
137
138
  return pendingScopes.push(scope), scope;
138
139
  }
@@ -140,34 +141,44 @@ function skipScope() {
140
141
  return nextScopeId++;
141
142
  }
142
143
  function findBranchWithKey(scope, key) {
143
- let branch = scope.k;
144
+ let branch = scope.G;
144
145
  for (; branch && !branch[key]; )
145
- branch = branch.x;
146
+ branch = branch.N;
146
147
  return branch;
147
148
  }
148
149
  function destroyBranch(branch) {
149
- branch.x?.y?.delete(branch), destroyNestedBranches(branch);
150
+ branch.N?.E?.delete(
151
+ branch
152
+ ), destroyNestedBranches(branch);
150
153
  }
151
154
  function destroyNestedBranches(branch) {
152
- branch.z = 1, branch.y?.forEach(destroyNestedBranches), branch.I?.forEach((scope) => {
155
+ branch.J = 1, branch.E?.forEach(destroyNestedBranches), branch.B?.forEach((scope) => {
153
156
  for (let id in scope.A)
154
157
  $signalReset(scope, id);
155
158
  });
156
159
  }
157
160
  function removeAndDestroyBranch(branch) {
158
- destroyBranch(branch), removeChildNodes(branch.h, branch.j);
161
+ destroyBranch(branch), removeChildNodes(
162
+ branch.S,
163
+ branch.L
164
+ );
159
165
  }
160
166
  function insertBranchBefore(branch, parentNode, nextSibling) {
161
167
  insertChildNodes(
162
168
  parentNode,
163
169
  nextSibling,
164
- branch.h,
165
- branch.j
170
+ branch.S,
171
+ branch.L
166
172
  );
167
173
  }
168
174
  function tempDetachBranch(branch) {
169
175
  let fragment = new DocumentFragment();
170
- fragment.namespaceURI = branch.h.parentNode.namespaceURI, insertChildNodes(fragment, null, branch.h, branch.j);
176
+ fragment.namespaceURI = branch.S.parentNode.namespaceURI, insertChildNodes(
177
+ fragment,
178
+ null,
179
+ branch.S,
180
+ branch.L
181
+ );
171
182
  }
172
183
 
173
184
  // src/dom/walker.ts
@@ -176,15 +187,15 @@ function walk(startNode, walkCodes, branch) {
176
187
  walker.currentNode = startNode, walkInternal(0, walkCodes, branch);
177
188
  }
178
189
  function walkInternal(currentWalkIndex, walkCodes, scope) {
179
- let value, storedMultiplier = 0, currentMultiplier = 0, currentScopeIndex = 0;
190
+ let value, id, storedMultiplier = 0, currentMultiplier = 0, currentScopeIndex = 0;
180
191
  for (; currentWalkIndex < walkCodes.length; )
181
192
  if (value = walkCodes.charCodeAt(currentWalkIndex++), currentMultiplier = storedMultiplier, storedMultiplier = 0, value === 32 /* Get */) {
182
193
  let node = walker.currentNode;
183
- scope[currentScopeIndex] = node, scope["j" /* Getter */ + currentScopeIndex++] = () => node;
194
+ scope[id = decodeAccessor(currentScopeIndex++)] = node, scope["J" /* Getter */ + id] = () => node;
184
195
  } else if (value === 37 /* Replace */ || value === 49 /* DynamicTagWithVar */)
185
196
  walker.currentNode.replaceWith(
186
- walker.currentNode = scope[currentScopeIndex++] = new Text()
187
- ), value === 49 /* DynamicTagWithVar */ && (scope[currentScopeIndex++] = skipScope());
197
+ walker.currentNode = scope[decodeAccessor(currentScopeIndex++)] = new Text()
198
+ ), value === 49 /* DynamicTagWithVar */ && (scope[decodeAccessor(currentScopeIndex++)] = skipScope());
188
199
  else {
189
200
  if (value === 38 /* EndChild */)
190
201
  return currentWalkIndex;
@@ -192,8 +203,11 @@ function walkInternal(currentWalkIndex, walkCodes, scope) {
192
203
  currentWalkIndex = walkInternal(
193
204
  currentWalkIndex,
194
205
  walkCodes,
195
- scope[currentScopeIndex++] = createScope(scope.$global, scope.k)
196
- ), value === 48 /* BeginChildWithVar */ && (scope[currentScopeIndex++] = skipScope());
206
+ scope[decodeAccessor(currentScopeIndex++)] = createScope(
207
+ scope.$,
208
+ scope.G
209
+ )
210
+ ), value === 48 /* BeginChildWithVar */ && (scope[decodeAccessor(currentScopeIndex++)] = skipScope());
197
211
  else if (value < 92)
198
212
  for (value = 20 /* Next */ * currentMultiplier + value - 67 /* Next */; value--; )
199
213
  walker.nextNode();
@@ -228,9 +242,9 @@ function init(runtimeId = "M") {
228
242
  for (; startVisit.previousSibling && ~visits.indexOf(
229
243
  startVisit = startVisit.previousSibling
230
244
  ); ) ;
231
- branch.j = branch.h = startVisit, visitType === "'" /* BranchEndNativeTag */ && (branch[0] = startVisit);
245
+ branch.L = branch.S = startVisit, visitType === "'" /* BranchEndNativeTag */ && (branch.a = startVisit);
232
246
  } else
233
- startVisit = branchStarts.pop(), parent !== startVisit.parentNode && parent.prepend(startVisit), branch.h = startVisit, branch.j = visit.previousSibling === startVisit ? startVisit : parent.insertBefore(new Text(), visit);
247
+ startVisit = branchStarts.pop(), parent !== startVisit.parentNode && parent.prepend(startVisit), branch.S = startVisit, branch.L = visit.previousSibling === startVisit ? startVisit : parent.insertBefore(new Text(), visit);
234
248
  for (; i-- && orphanBranches[i] > branchId; )
235
249
  branchParents.set(orphanBranches[i], branchId), claimed++;
236
250
  orphanBranches.push(branchId), branchParents.set(branchId, 0), nextToken();
@@ -238,9 +252,9 @@ function init(runtimeId = "M") {
238
252
  orphanBranches.splice(i, claimed);
239
253
  };
240
254
  return {
241
- J() {
255
+ n() {
242
256
  visitType === "[" /* BranchStart */ ? (endBranch(), branchStarts.push(visit)) : (visitScope[
243
- "j" /* Getter */ + nextToken()
257
+ "J" /* Getter */ + nextToken()
244
258
  /* read accessor */
245
259
  ] = /* @__PURE__ */ ((node) => () => node)(
246
260
  visitScope[lastToken] = visitType === ")" /* BranchEndOnlyChildInParent */ || visitType === "}" /* BranchEndSingleNodeOnlyChildInParent */ ? visit.parentNode : visit
@@ -248,8 +262,8 @@ function init(runtimeId = "M") {
248
262
  visitType !== "]" /* BranchEnd */ && visitType !== ")" /* BranchEndOnlyChildInParent */
249
263
  ));
250
264
  },
251
- q(scope) {
252
- scope.k = scopeLookup[scope.g || branchParents.get(scopeId)], branchParents.has(scopeId) && (scope.k && ((scope.x = scope.k).y ||= /* @__PURE__ */ new Set()).add(scope), scope.k = scope);
265
+ c(scope) {
266
+ scope.G = scopeLookup[scope.H || branchParents.get(scopeId)], branchParents.has(scopeId) && (scope.G && ((scope.N = scope.G).E ||= /* @__PURE__ */ new Set()).add(scope), scope.G = scope);
253
267
  }
254
268
  };
255
269
  })(), $global, lastScopeId = 0, lastEffect, visits, resumes, scopeId, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, nextToken = () => lastToken = visitText.slice(
@@ -262,23 +276,23 @@ function init(runtimeId = "M") {
262
276
  walk2(), isResuming = 1;
263
277
  for (visit of visits = render.v)
264
278
  lastTokenIndex = render.i.length, visitText = visit.data, visitType = visitText[lastTokenIndex++], (scopeId = +nextToken()) && (visitScope = scopeLookup[scopeId] ||= {
265
- l: scopeId
266
- }), visitType === "*" /* Node */ ? visitScope["j" /* Getter */ + nextToken()] = /* @__PURE__ */ ((node) => () => node)(visitScope[lastToken] = visit.previousSibling) : branchesEnabled && branches.J();
279
+ M: scopeId
280
+ }), visitType === "*" /* Node */ ? visitScope["J" /* Getter */ + nextToken()] = /* @__PURE__ */ ((node) => () => node)(visitScope[lastToken] = visit.previousSibling) : branchesEnabled && branches.n();
267
281
  for (let serialized of resumes = render.r || [])
268
282
  if (typeof serialized == "string")
269
283
  lastEffect = serialized;
270
284
  else if (typeof serialized == "number")
271
285
  registeredValues[lastEffect](
272
286
  scopeLookup[serialized] ||= {
273
- l: scopeId
287
+ M: scopeId
274
288
  }
275
289
  );
276
290
  else
277
291
  for (let scope of serialized(serializeContext))
278
- $global ? typeof scope == "number" ? lastScopeId += scope : (scopeId = ++lastScopeId, scope.$global = $global, scope.l = scopeId, scopeLookup[scopeId] !== scope && (scopeLookup[scopeId] = Object.assign(
292
+ $global ? typeof scope == "number" ? lastScopeId += scope : (scopeId = ++lastScopeId, scope.$ = $global, scope.M = scopeId, scopeLookup[scopeId] !== scope && (scopeLookup[scopeId] = Object.assign(
279
293
  scope,
280
294
  scopeLookup[scopeId]
281
- )), branchesEnabled && branches.q(scope)) : ($global = scope || {}, $global.runtimeId = runtimeId, $global.renderId = renderId);
295
+ )), branchesEnabled && branches.c(scope)) : ($global = scope || {}, $global.runtimeId = runtimeId, $global.renderId = renderId);
282
296
  } finally {
283
297
  isResuming = visits.length = resumes.length = 0;
284
298
  }
@@ -297,18 +311,19 @@ function init(runtimeId = "M") {
297
311
  });
298
312
  }
299
313
  var isResuming;
300
- function _resume(id, obj) {
301
- return registeredValues[id] = obj, obj;
302
- }
303
- function _var_resume(id, signal) {
304
- return registeredValues[id] = (scope) => (value) => signal(scope, value), signal;
305
- }
306
314
  function getRegisteredWithScope(id, scope) {
307
315
  let val = registeredValues[id];
308
316
  return scope ? val(scope) : val;
309
317
  }
310
- function _el(id, key) {
311
- return _resume(id, (scope) => () => scope[key]());
318
+ function _resume(id, obj) {
319
+ return registeredValues[id] = obj;
320
+ }
321
+ function _var_resume(id, signal) {
322
+ return _resume(id, (scope) => (value) => signal(scope, value)), signal;
323
+ }
324
+ function _el(id, accessor) {
325
+ let getterAccessor = "J" /* Getter */ + decodeAccessor(accessor);
326
+ return _resume(id, (scope) => () => scope[getterAccessor]());
312
327
  }
313
328
 
314
329
  // src/dom/controllable.ts
@@ -324,7 +339,7 @@ function _attr_input_checked(scope, nodeAccessor, checked, checkedChange) {
324
339
  function _attr_input_checked_script(scope, nodeAccessor) {
325
340
  let el = scope[nodeAccessor];
326
341
  syncControllable(el, "input", hasCheckboxChanged, () => {
327
- let checkedChange = scope["e" /* ControlledHandler */ + nodeAccessor];
342
+ let checkedChange = scope["E" /* ControlledHandler */ + nodeAccessor];
328
343
  if (checkedChange) {
329
344
  let newValue = el.checked;
330
345
  el.checked = !newValue, checkedChange(newValue), run();
@@ -332,7 +347,7 @@ function _attr_input_checked_script(scope, nodeAccessor) {
332
347
  });
333
348
  }
334
349
  function _attr_input_checkedValue(scope, nodeAccessor, checkedValue, checkedValueChange, value) {
335
- scope["g" /* ControlledValue */ + nodeAccessor] = checkedValue, _attr(scope[nodeAccessor], "value", value), setCheckboxValue(
350
+ scope["G" /* ControlledValue */ + nodeAccessor] = checkedValue, _attr(scope[nodeAccessor], "value", value), setCheckboxValue(
336
351
  scope,
337
352
  nodeAccessor,
338
353
  1 /* InputCheckedValue */,
@@ -343,9 +358,9 @@ function _attr_input_checkedValue(scope, nodeAccessor, checkedValue, checkedValu
343
358
  function _attr_input_checkedValue_script(scope, nodeAccessor) {
344
359
  let el = scope[nodeAccessor];
345
360
  syncControllable(el, "input", hasCheckboxChanged, () => {
346
- let checkedValueChange = scope["e" /* ControlledHandler */ + nodeAccessor];
361
+ let checkedValueChange = scope["E" /* ControlledHandler */ + nodeAccessor];
347
362
  if (checkedValueChange) {
348
- let oldValue = scope["g" /* ControlledValue */ + nodeAccessor], newValue = Array.isArray(oldValue) ? updateList(oldValue, el.value, el.checked) : el.checked ? el.value : void 0;
363
+ let oldValue = scope["G" /* ControlledValue */ + nodeAccessor], newValue = Array.isArray(oldValue) ? updateList(oldValue, el.value, el.checked) : el.checked ? el.value : void 0;
349
364
  if (el.name && el.type[0] === "r")
350
365
  for (let radio of el.getRootNode().querySelectorAll(
351
366
  `[type=radio][name=${CSS.escape(el.name)}]`
@@ -359,20 +374,20 @@ function _attr_input_checkedValue_script(scope, nodeAccessor) {
359
374
  }
360
375
  function _attr_input_value(scope, nodeAccessor, value, valueChange) {
361
376
  let el = scope[nodeAccessor], normalizedValue = normalizeStrProp(value);
362
- scope["e" /* ControlledHandler */ + nodeAccessor] = valueChange, valueChange ? (scope["f" /* ControlledType */ + nodeAccessor] = 0 /* InputChecked */, scope["g" /* ControlledValue */ + nodeAccessor] = value, el.isConnected ? setValueAndUpdateSelection(el, normalizedValue) : el.defaultValue = normalizedValue) : (scope["f" /* ControlledType */ + nodeAccessor] = 5 /* None */, el.defaultValue = normalizedValue);
377
+ scope["E" /* ControlledHandler */ + nodeAccessor] = valueChange, valueChange ? (scope["F" /* ControlledType */ + nodeAccessor] = 0 /* InputChecked */, scope["G" /* ControlledValue */ + nodeAccessor] = value, el.isConnected ? setValueAndUpdateSelection(el, normalizedValue) : el.defaultValue = normalizedValue) : (scope["F" /* ControlledType */ + nodeAccessor] = 5 /* None */, el.defaultValue = normalizedValue);
363
378
  }
364
379
  function _attr_input_value_script(scope, nodeAccessor) {
365
380
  let el = scope[nodeAccessor];
366
- isResuming && (scope["g" /* ControlledValue */ + nodeAccessor] = el.defaultValue), syncControllable(el, "input", hasValueChanged, (ev) => {
367
- let valueChange = scope["e" /* ControlledHandler */ + nodeAccessor];
381
+ isResuming && (scope["G" /* ControlledValue */ + nodeAccessor] = el.defaultValue), syncControllable(el, "input", hasValueChanged, (ev) => {
382
+ let valueChange = scope["E" /* ControlledHandler */ + nodeAccessor];
368
383
  valueChange && (inputType = ev?.inputType, valueChange(el.value), run(), setValueAndUpdateSelection(
369
384
  el,
370
- scope["g" /* ControlledValue */ + nodeAccessor]
385
+ scope["G" /* ControlledValue */ + nodeAccessor]
371
386
  ), inputType = "");
372
387
  });
373
388
  }
374
389
  function _attr_select_value(scope, nodeAccessor, value, valueChange) {
375
- scope["e" /* ControlledHandler */ + nodeAccessor] = valueChange, valueChange ? (scope["f" /* ControlledType */ + nodeAccessor] = 3 /* SelectValue */, scope["g" /* ControlledValue */ + nodeAccessor] = value) : scope["f" /* ControlledType */ + nodeAccessor] = 5 /* None */, pendingEffects.unshift(
390
+ scope["E" /* ControlledHandler */ + nodeAccessor] = valueChange, valueChange ? (scope["F" /* ControlledType */ + nodeAccessor] = 3 /* SelectValue */, scope["G" /* ControlledValue */ + nodeAccessor] = value) : scope["F" /* ControlledType */ + nodeAccessor] = 5 /* None */, pendingEffects.unshift(
376
391
  () => setSelectOptions(
377
392
  scope[nodeAccessor],
378
393
  value,
@@ -383,20 +398,20 @@ function _attr_select_value(scope, nodeAccessor, value, valueChange) {
383
398
  }
384
399
  function _attr_select_value_script(scope, nodeAccessor) {
385
400
  let el = scope[nodeAccessor], onChange = () => {
386
- let valueChange = scope["e" /* ControlledHandler */ + nodeAccessor];
401
+ let valueChange = scope["E" /* ControlledHandler */ + nodeAccessor];
387
402
  if (valueChange) {
388
403
  let newValue = Array.isArray(
389
- scope["g" /* ControlledValue */ + nodeAccessor]
404
+ scope["G" /* ControlledValue */ + nodeAccessor]
390
405
  ) ? Array.from(el.selectedOptions, toValueProp) : el.value;
391
406
  setSelectOptions(
392
407
  el,
393
- scope["g" /* ControlledValue */ + nodeAccessor],
408
+ scope["G" /* ControlledValue */ + nodeAccessor],
394
409
  valueChange
395
410
  ), valueChange(newValue), run();
396
411
  }
397
412
  };
398
413
  el._ || new MutationObserver(() => {
399
- let value = scope["g" /* ControlledValue */ + nodeAccessor];
414
+ let value = scope["G" /* ControlledValue */ + nodeAccessor];
400
415
  (Array.isArray(value) ? value.length !== el.selectedOptions.length || value.some((value2, i) => value2 != el.selectedOptions[i].value) : el.value != value) && onChange();
401
416
  }).observe(el, {
402
417
  childList: !0,
@@ -419,16 +434,16 @@ function setSelectOptions(el, value, valueChange) {
419
434
  }
420
435
  }
421
436
  function _attr_details_or_dialog_open(scope, nodeAccessor, open, openChange) {
422
- scope["e" /* ControlledHandler */ + nodeAccessor] = openChange, openChange ? scope["f" /* ControlledType */ + nodeAccessor] = 4 /* DetailsOrDialogOpen */ : scope["f" /* ControlledType */ + nodeAccessor] = 5 /* None */, scope[nodeAccessor].open = scope["g" /* ControlledValue */ + nodeAccessor] = normalizeBoolProp(open);
437
+ scope["E" /* ControlledHandler */ + nodeAccessor] = openChange, openChange ? scope["F" /* ControlledType */ + nodeAccessor] = 4 /* DetailsOrDialogOpen */ : scope["F" /* ControlledType */ + nodeAccessor] = 5 /* None */, scope[nodeAccessor].open = scope["G" /* ControlledValue */ + nodeAccessor] = normalizeBoolProp(open);
423
438
  }
424
439
  function _attr_details_or_dialog_open_script(scope, nodeAccessor) {
425
- let el = scope[nodeAccessor], hasChanged = () => el.open !== scope["g" /* ControlledValue */ + nodeAccessor];
440
+ let el = scope[nodeAccessor], hasChanged = () => el.open !== scope["G" /* ControlledValue */ + nodeAccessor];
426
441
  syncControllable(
427
442
  el,
428
443
  el.tagName === "DIALOG" ? "close" : "toggle",
429
444
  hasChanged,
430
445
  () => {
431
- let openChange = scope["e" /* ControlledHandler */ + nodeAccessor];
446
+ let openChange = scope["E" /* ControlledHandler */ + nodeAccessor];
432
447
  if (openChange && hasChanged()) {
433
448
  let newValue = el.open;
434
449
  el.open = !newValue, openChange(newValue), run();
@@ -449,7 +464,7 @@ function setValueAndUpdateSelection(el, value) {
449
464
  }
450
465
  }
451
466
  function setCheckboxValue(scope, nodeAccessor, type, checked, checkedChange) {
452
- scope["e" /* ControlledHandler */ + nodeAccessor] = checkedChange, checkedChange ? (scope["f" /* ControlledType */ + nodeAccessor] = type, scope[nodeAccessor].checked = checked) : (scope["f" /* ControlledType */ + nodeAccessor] = 5 /* None */, scope[nodeAccessor].defaultChecked = checked);
467
+ scope["E" /* ControlledHandler */ + nodeAccessor] = checkedChange, checkedChange ? (scope["F" /* ControlledType */ + nodeAccessor] = type, scope[nodeAccessor].checked = checked) : (scope["F" /* ControlledType */ + nodeAccessor] = 5 /* None */, scope[nodeAccessor].defaultChecked = checked);
453
468
  }
454
469
  var controllableDelegate = createDelegator();
455
470
  function syncControllable(el, event, hasChanged, onChange) {
@@ -518,43 +533,44 @@ function triggerMacroTask() {
518
533
  }
519
534
 
520
535
  // src/dom/signals.ts
521
- function _let(valueAccessor, fn) {
522
- if (0)
523
- var id;
524
- let valueChangeAccessor = "o" /* TagVariableChange */ + valueAccessor;
525
- return (scope, value, valueChange) => (rendering ? ((scope[valueChangeAccessor] = valueChange) && scope[valueAccessor] !== value || scope.n) && (scope[valueAccessor] = value, fn && fn(scope)) : scope[valueChangeAccessor] ? scope[valueChangeAccessor](value) : scope[valueAccessor] !== (scope[valueAccessor] = value) && fn && (schedule(), queueRender(scope, fn, valueAccessor)), value);
526
- }
527
- function _const(valueAccessor, fn = () => {
528
- }) {
529
- return (scope, value) => {
530
- (!(valueAccessor in scope) || scope[valueAccessor] !== value) && (scope[valueAccessor] = value, fn(scope));
536
+ function _let(id, fn) {
537
+ let valueAccessor = decodeAccessor(id), valueChangeAccessor = "O" /* TagVariableChange */ + valueAccessor;
538
+ return (scope, value, valueChange) => (rendering ? ((scope[valueChangeAccessor] = valueChange) && scope[valueAccessor] !== value || scope.I) && (scope[valueAccessor] = value, fn?.(scope)) : scope[valueChangeAccessor] ? scope[valueChangeAccessor](value) : scope[valueAccessor] !== (scope[valueAccessor] = value) && fn && (schedule(), queueRender(scope, fn, id)), value);
539
+ }
540
+ function _const(valueAccessor, fn) {
541
+ return valueAccessor = decodeAccessor(valueAccessor), (scope, value) => {
542
+ (!(valueAccessor in scope) || scope[valueAccessor] !== value) && (scope[valueAccessor] = value, fn?.(scope));
531
543
  };
532
544
  }
533
- function _or(id, fn, defaultPending = 1, scopeIdAccessor = /* @__KEY__ */ "l") {
545
+ function _or(id, fn, defaultPending = 1, scopeIdAccessor = "M" /* Id */) {
534
546
  return (scope) => {
535
- scope.n ? scope[id] === void 0 ? scope[id] = defaultPending : --scope[id] || fn(scope) : queueRender(scope, fn, id, 0, scope[scopeIdAccessor]);
547
+ scope.I ? id in scope ? --scope[id] || fn(scope) : scope[id] = defaultPending : queueRender(scope, fn, id, 0, scope[scopeIdAccessor]);
536
548
  };
537
549
  }
538
550
  function _for_closure(ownerLoopNodeAccessor, fn) {
539
- let loopScopeAccessor = "l" /* LoopScopeArray */ + ownerLoopNodeAccessor, loopScopeMapAccessor = "m" /* LoopScopeMap */ + ownerLoopNodeAccessor, ownerSignal = (ownerScope) => {
551
+ ownerLoopNodeAccessor = decodeAccessor(ownerLoopNodeAccessor);
552
+ let loopScopeAccessor = "L" /* LoopScopeArray */ + ownerLoopNodeAccessor, loopScopeMapAccessor = "M" /* LoopScopeMap */ + ownerLoopNodeAccessor, ownerSignal = (ownerScope) => {
540
553
  let scopes = ownerScope[loopScopeAccessor] ||= ownerScope[loopScopeMapAccessor] ? [...ownerScope[loopScopeMapAccessor].values()] : [], [firstScope] = scopes;
541
554
  firstScope && queueRender(
542
555
  ownerScope,
543
556
  () => {
544
557
  for (let scope of scopes)
545
- !scope.n && !scope.z && fn(scope);
558
+ !scope.I && !scope.J && fn(scope);
546
559
  },
547
560
  -1,
548
561
  0,
549
- firstScope.l
562
+ firstScope.M
550
563
  );
551
564
  };
552
565
  return ownerSignal._ = fn, ownerSignal;
553
566
  }
554
567
  function _if_closure(ownerConditionalNodeAccessor, branch, fn) {
555
- let scopeAccessor = "d" /* ConditionalScope */ + ownerConditionalNodeAccessor, branchAccessor = "c" /* ConditionalRenderer */ + ownerConditionalNodeAccessor, ownerSignal = (scope) => {
568
+ ownerConditionalNodeAccessor = decodeAccessor(
569
+ ownerConditionalNodeAccessor
570
+ );
571
+ let scopeAccessor = "D" /* ConditionalScope */ + ownerConditionalNodeAccessor, branchAccessor = "C" /* ConditionalRenderer */ + ownerConditionalNodeAccessor, ownerSignal = (scope) => {
556
572
  let ifScope = scope[scopeAccessor];
557
- ifScope && !ifScope.n && (scope[branchAccessor] || 0) === branch && queueRender(ifScope, fn, -1);
573
+ ifScope && !ifScope.I && (scope[branchAccessor] || 0) === branch && queueRender(ifScope, fn, -1);
558
574
  };
559
575
  return ownerSignal._ = fn, ownerSignal;
560
576
  }
@@ -566,13 +582,13 @@ function subscribeToScopeSet(ownerScope, accessor, scope) {
566
582
  ));
567
583
  }
568
584
  function _closure(...closureSignals) {
569
- let [{ D: ___scopeInstancesAccessor, E: ___signalIndexAccessor }] = closureSignals;
585
+ let [{ j: ___scopeInstancesAccessor, k: ___signalIndexAccessor }] = closureSignals;
570
586
  for (let i = closureSignals.length; i--; )
571
- closureSignals[i].K = i;
587
+ closureSignals[i].o = i;
572
588
  return (scope) => {
573
589
  if (scope[___scopeInstancesAccessor])
574
590
  for (let childScope of scope[___scopeInstancesAccessor])
575
- childScope.n || queueRender(
591
+ childScope.I || queueRender(
576
592
  childScope,
577
593
  closureSignals[childScope[___signalIndexAccessor]],
578
594
  -1
@@ -580,14 +596,15 @@ function _closure(...closureSignals) {
580
596
  };
581
597
  }
582
598
  function _closure_get(valueAccessor, fn, getOwnerScope) {
599
+ valueAccessor = decodeAccessor(valueAccessor);
583
600
  let closureSignal = ((scope) => {
584
- scope[closureSignal.E] = closureSignal.K, fn(scope), subscribeToScopeSet(
601
+ scope[closureSignal.k] = closureSignal.o, fn(scope), subscribeToScopeSet(
585
602
  getOwnerScope ? getOwnerScope(scope) : scope._,
586
- closureSignal.D,
603
+ closureSignal.j,
587
604
  scope
588
605
  );
589
606
  });
590
- return closureSignal.D = "a" /* ClosureScopes */ + valueAccessor, closureSignal.E = "b" /* ClosureSignalIndex */ + valueAccessor, closureSignal;
607
+ return closureSignal.j = "A" /* ClosureScopes */ + valueAccessor, closureSignal.k = "B" /* ClosureSignalIndex */ + valueAccessor, closureSignal;
591
608
  }
592
609
  function _child_setup(setup) {
593
610
  return setup._ = (scope, owner) => {
@@ -595,14 +612,14 @@ function _child_setup(setup) {
595
612
  }, setup;
596
613
  }
597
614
  function _var(scope, childAccessor, signal) {
598
- scope[childAccessor].e = (value) => signal(scope, value);
615
+ scope[decodeAccessor(childAccessor)].T = (value) => signal(scope, value);
599
616
  }
600
- var _return = (scope, value) => scope.e?.(value);
617
+ var _return = (scope, value) => scope.T?.(value);
601
618
  function _return_change(scope, changeHandler) {
602
- changeHandler && (scope.f = changeHandler);
619
+ changeHandler && (scope.U = changeHandler);
603
620
  }
604
- var _var_change = (scope, value) => scope.f?.(value), tagIdsByGlobal = /* @__PURE__ */ new WeakMap();
605
- function _id({ $global }) {
621
+ var _var_change = (scope, value) => scope.U?.(value), tagIdsByGlobal = /* @__PURE__ */ new WeakMap();
622
+ function _id({ ["$" /* Global */]: $global }) {
606
623
  let id = tagIdsByGlobal.get($global) || 0;
607
624
  return tagIdsByGlobal.set($global, id + 1), "c" + $global.runtimeId + $global.renderId + id.toString(36);
608
625
  }
@@ -622,7 +639,7 @@ function* traverseAllHoisted(scope, path, curIndex = path.length - 1) {
622
639
  else curIndex ? yield* traverseAllHoisted(scope[path[curIndex]], path, curIndex - 1) : yield scope[path[0]];
623
640
  }
624
641
  function _hoist(...path) {
625
- return (scope) => {
642
+ return path = path.map((p) => typeof p == "string" ? p : decodeAccessor(p)), (scope) => {
626
643
  let getOne = (...args) => iterator().next().value?.(...args), iterator = getOne[Symbol.iterator] = () => traverseAllHoisted(scope, path);
627
644
  return getOne;
628
645
  };
@@ -630,8 +647,8 @@ function _hoist(...path) {
630
647
 
631
648
  // src/dom/renderer.ts
632
649
  function createBranch($global, renderer, parentScope, parentNode) {
633
- let branch = createScope($global), parentBranch = parentScope?.k;
634
- return branch._ = renderer.t || parentScope, branch.k = branch, parentBranch && (branch.x = parentBranch, (parentBranch.y ||= /* @__PURE__ */ new Set()).add(branch)), renderer.B?.(
650
+ let branch = createScope($global), parentBranch = parentScope?.G;
651
+ return branch._ = renderer.d || parentScope, branch.G = branch, parentBranch && (branch.N = parentBranch, (parentBranch.E ||= /* @__PURE__ */ new Set()).add(branch)), renderer.g?.(
635
652
  branch,
636
653
  parentNode.namespaceURI
637
654
  ), branch;
@@ -643,7 +660,7 @@ function createAndSetupBranch($global, renderer, parentScope, parentNode) {
643
660
  );
644
661
  }
645
662
  function setupBranch(renderer, branch) {
646
- return renderer.C && queueRender(branch, renderer.C, -1), branch;
663
+ return renderer.h && queueRender(branch, renderer.h, -1), branch;
647
664
  }
648
665
  function _content(id, template, walks, setup, params, dynamicScopesAccessor) {
649
666
  walks = walks ? walks.replace(/[^\0-1]+$/, "") : "", setup = setup ? setup._ || setup : void 0, params ||= void 0;
@@ -654,18 +671,18 @@ function _content(id, template, walks, setup, params, dynamicScopesAccessor) {
654
671
  ))(branch, walks);
655
672
  } : (branch) => {
656
673
  walk(
657
- branch.h = branch.j = new Text(),
674
+ branch.S = branch.L = new Text(),
658
675
  walks,
659
676
  branch
660
677
  );
661
678
  };
662
679
  return (owner) => ({
663
- l: id,
664
- B: clone,
665
- t: owner,
666
- C: setup,
667
- m: params,
668
- o: dynamicScopesAccessor
680
+ f: id,
681
+ g: clone,
682
+ d: owner,
683
+ h: setup,
684
+ a: params,
685
+ b: dynamicScopesAccessor
669
686
  });
670
687
  }
671
688
  function _content_resume(id, template, walks, setup, params, dynamicScopesAccessor) {
@@ -677,10 +694,10 @@ function _content_resume(id, template, walks, setup, params, dynamicScopesAccess
677
694
  function _content_closures(renderer, closureFns) {
678
695
  let closureSignals = {};
679
696
  for (let key in closureFns)
680
- closureSignals[key] = _const(key, closureFns[key]);
697
+ closureSignals[key] = _const(+key, closureFns[key]);
681
698
  return (owner, closureValues) => {
682
699
  let instance = renderer(owner);
683
- return instance.F = closureSignals, instance.L = closureValues, instance;
700
+ return instance.l = closureSignals, instance.p = closureValues, instance;
684
701
  };
685
702
  }
686
703
  function _content_branch(template, walks, setup, params) {
@@ -691,13 +708,13 @@ function createCloneableHTML(html, ns) {
691
708
  let { firstChild, lastChild } = parseHTML(html, ns), parent = document.createElementNS(ns, "t");
692
709
  return insertChildNodes(parent, null, firstChild, lastChild), firstChild === lastChild && firstChild.nodeType < 8 /* Comment */ ? (branch, walks) => {
693
710
  walk(
694
- branch.h = branch.j = firstChild.cloneNode(!0),
711
+ branch.S = branch.L = firstChild.cloneNode(!0),
695
712
  walks,
696
713
  branch
697
714
  );
698
715
  } : (branch, walks) => {
699
716
  let clone = parent.cloneNode(!0);
700
- walk(clone.firstChild, walks, branch), branch.h = clone.firstChild, branch.j = clone.lastChild;
717
+ walk(clone.firstChild, walks, branch), branch.S = clone.firstChild, branch.L = clone.lastChild;
701
718
  };
702
719
  }
703
720
 
@@ -829,23 +846,23 @@ function attrsInternal(scope, nodeAccessor, nextAttrs) {
829
846
  _attr_style(el, value);
830
847
  break;
831
848
  default: {
832
- isEventHandler(name) ? (events ||= scope["i" /* EventAttributes */ + nodeAccessor] = {})[getEventHandlerName(name)] = value : skip?.test(name) || name === "content" && el.tagName !== "META" || _attr(el, name, value);
849
+ isEventHandler(name) ? (events ||= scope["I" /* EventAttributes */ + nodeAccessor] = {})[getEventHandlerName(name)] = value : skip?.test(name) || name === "content" && el.tagName !== "META" || _attr(el, name, value);
833
850
  break;
834
851
  }
835
852
  }
836
853
  }
837
854
  }
838
855
  function _attr_content(scope, nodeAccessor, value) {
839
- let content = normalizeClientRender(value), rendererAccessor = "c" /* ConditionalRenderer */ + nodeAccessor;
840
- scope[rendererAccessor] !== (scope[rendererAccessor] = content?.l) && (setConditionalRenderer(scope, nodeAccessor, content, createAndSetupBranch), content?.o && subscribeToScopeSet(
841
- content.t,
842
- content.o,
843
- scope["d" /* ConditionalScope */ + nodeAccessor]
856
+ let content = normalizeClientRender(value), rendererAccessor = "C" /* ConditionalRenderer */ + nodeAccessor;
857
+ scope[rendererAccessor] !== (scope[rendererAccessor] = content?.f) && (setConditionalRenderer(scope, nodeAccessor, content, createAndSetupBranch), content?.b && subscribeToScopeSet(
858
+ content.d,
859
+ content.b,
860
+ scope["D" /* ConditionalScope */ + nodeAccessor]
844
861
  ));
845
862
  }
846
863
  function _attrs_script(scope, nodeAccessor) {
847
- let el = scope[nodeAccessor], events = scope["i" /* EventAttributes */ + nodeAccessor];
848
- switch (scope["f" /* ControlledType */ + nodeAccessor]) {
864
+ let el = scope[nodeAccessor], events = scope["I" /* EventAttributes */ + nodeAccessor];
865
+ switch (scope["F" /* ControlledType */ + nodeAccessor]) {
849
866
  case 0 /* InputChecked */:
850
867
  _attr_input_checked_script(scope, nodeAccessor);
851
868
  break;
@@ -866,7 +883,7 @@ function _attrs_script(scope, nodeAccessor) {
866
883
  _on(el, name, events[name]);
867
884
  }
868
885
  function _html(scope, value, accessor) {
869
- let firstChild = scope[accessor], parentNode = firstChild.parentNode, lastChild = scope["h" /* DynamicPlaceholderLastChild */ + accessor] || firstChild, newContent = parseHTML(
886
+ let firstChild = scope[accessor], parentNode = firstChild.parentNode, lastChild = scope["H" /* DynamicPlaceholderLastChild */ + accessor] || firstChild, newContent = parseHTML(
870
887
  value || value === 0 ? value + "" : "",
871
888
  parentNode.namespaceURI
872
889
  );
@@ -874,12 +891,12 @@ function _html(scope, value, accessor) {
874
891
  parentNode,
875
892
  firstChild,
876
893
  scope[accessor] = newContent.firstChild || newContent.appendChild(new Text()),
877
- scope["h" /* DynamicPlaceholderLastChild */ + accessor] = newContent.lastChild
894
+ scope["H" /* DynamicPlaceholderLastChild */ + accessor] = newContent.lastChild
878
895
  ), removeChildNodes(firstChild, lastChild);
879
896
  }
880
897
  function normalizeClientRender(value) {
881
898
  let renderer = normalizeDynamicRenderer(value);
882
- if (renderer && renderer.l)
899
+ if (renderer && renderer.f)
883
900
  return renderer;
884
901
  }
885
902
  function normalizeAttrValue(value) {
@@ -891,7 +908,7 @@ function normalizeString(value) {
891
908
  }
892
909
  function _lifecycle(scope, index, thisObj) {
893
910
  let instance = scope[index];
894
- instance ? (Object.assign(instance, thisObj), instance.onUpdate?.()) : (scope[index] = thisObj, thisObj.onMount?.(), $signal(scope, "k" /* LifecycleAbortController */ + index).onabort = () => thisObj.onDestroy?.());
911
+ instance ? (Object.assign(instance, thisObj), instance.onUpdate?.()) : (scope[index] = thisObj, thisObj.onMount?.(), $signal(scope, "K" /* LifecycleAbortController */ + index).onabort = () => thisObj.onDestroy?.());
895
912
  }
896
913
  function removeChildNodes(startNode, endNode) {
897
914
  let stop = endNode.nextSibling, current = startNode;
@@ -931,7 +948,7 @@ function reconcile(parent, oldBranches, newBranches, afterReference) {
931
948
  }
932
949
  if (oldStart > oldEnd) {
933
950
  if (newStart <= newEnd) {
934
- k = newEnd + 1, nextSibling = k < newBranches.length ? newBranches[k].h : afterReference;
951
+ k = newEnd + 1, nextSibling = k < newBranches.length ? newBranches[k].S : afterReference;
935
952
  do
936
953
  insertBranchBefore(newBranches[newStart++], parent, nextSibling);
937
954
  while (newStart <= newEnd);
@@ -960,10 +977,10 @@ function reconcile(parent, oldBranches, newBranches, afterReference) {
960
977
  if (pos === WRONG_POS) {
961
978
  let seq = longestIncreasingSubsequence(sources);
962
979
  for (j = seq.length - 1, k = newBranches.length, i = newLength - 1; i >= 0; --i)
963
- sources[i] === -1 ? (pos = i + newStart, newBranch = newBranches[pos++], nextSibling = pos < k ? newBranches[pos].h : afterReference, insertBranchBefore(newBranch, parent, nextSibling)) : j < 0 || i !== seq[j] ? (pos = i + newStart, newBranch = newBranches[pos++], nextSibling = pos < k ? newBranches[pos].h : afterReference, insertBranchBefore(newBranch, parent, nextSibling)) : --j;
980
+ sources[i] === -1 ? (pos = i + newStart, newBranch = newBranches[pos++], nextSibling = pos < k ? newBranches[pos].S : afterReference, insertBranchBefore(newBranch, parent, nextSibling)) : j < 0 || i !== seq[j] ? (pos = i + newStart, newBranch = newBranches[pos++], nextSibling = pos < k ? newBranches[pos].S : afterReference, insertBranchBefore(newBranch, parent, nextSibling)) : --j;
964
981
  } else if (synced !== newLength)
965
982
  for (k = newBranches.length, i = newLength - 1; i >= 0; --i)
966
- sources[i] === -1 && (pos = i + newStart, newBranch = newBranches[pos++], nextSibling = pos < k ? newBranches[pos].h : afterReference, insertBranchBefore(newBranch, parent, nextSibling));
983
+ sources[i] === -1 && (pos = i + newStart, newBranch = newBranches[pos++], nextSibling = pos < k ? newBranches[pos].S : afterReference, insertBranchBefore(newBranch, parent, nextSibling));
967
984
  }
968
985
  }
969
986
  }
@@ -990,36 +1007,37 @@ function longestIncreasingSubsequence(a) {
990
1007
 
991
1008
  // src/dom/control-flow.ts
992
1009
  function _await(nodeAccessor, renderer) {
993
- let promiseAccessor = "n" /* Promise */ + nodeAccessor, branchAccessor = "d" /* ConditionalScope */ + nodeAccessor;
1010
+ nodeAccessor = decodeAccessor(nodeAccessor);
1011
+ let promiseAccessor = "N" /* Promise */ + nodeAccessor, branchAccessor = "D" /* ConditionalScope */ + nodeAccessor;
994
1012
  return enableBranches(), (scope, promise) => {
995
1013
  let referenceNode = scope[nodeAccessor], tryWithPlaceholder = findBranchWithKey(
996
1014
  scope,
997
- "d" /* PlaceholderContent */
1015
+ "Q" /* PlaceholderContent */
998
1016
  ), awaitBranch = scope[branchAccessor];
999
- tryWithPlaceholder ? (placeholderShown.add(pendingEffects), !scope[promiseAccessor] && (tryWithPlaceholder.p = (tryWithPlaceholder.p || 0) + 1) === 1 && requestAnimationFrame(
1000
- () => tryWithPlaceholder.p && runEffects(
1017
+ tryWithPlaceholder ? (placeholderShown.add(pendingEffects), !scope[promiseAccessor] && (tryWithPlaceholder.O = (tryWithPlaceholder.O || 0) + 1) === 1 && requestAnimationFrame(
1018
+ () => tryWithPlaceholder.O && runEffects(
1001
1019
  prepareEffects(
1002
1020
  () => queueRender(
1003
1021
  tryWithPlaceholder,
1004
1022
  () => {
1005
1023
  insertBranchBefore(
1006
- tryWithPlaceholder.c = createAndSetupBranch(
1007
- scope.$global,
1008
- tryWithPlaceholder.d,
1024
+ tryWithPlaceholder.P = createAndSetupBranch(
1025
+ scope.$,
1026
+ tryWithPlaceholder.Q,
1009
1027
  tryWithPlaceholder._,
1010
- tryWithPlaceholder.h.parentNode
1028
+ tryWithPlaceholder.S.parentNode
1011
1029
  ),
1012
- tryWithPlaceholder.h.parentNode,
1013
- tryWithPlaceholder.h
1030
+ tryWithPlaceholder.S.parentNode,
1031
+ tryWithPlaceholder.S
1014
1032
  ), tempDetachBranch(tryWithPlaceholder);
1015
1033
  },
1016
1034
  -1
1017
1035
  )
1018
1036
  )
1019
1037
  )
1020
- )) : awaitBranch && !scope[promiseAccessor] && (awaitBranch.h.parentNode.insertBefore(
1038
+ )) : awaitBranch && !scope[promiseAccessor] && (awaitBranch.S.parentNode.insertBefore(
1021
1039
  referenceNode,
1022
- awaitBranch.h
1040
+ awaitBranch.S
1023
1041
  ), tempDetachBranch(awaitBranch));
1024
1042
  let thisPromise = scope[promiseAccessor] = promise.then(
1025
1043
  (data) => {
@@ -1027,24 +1045,24 @@ function _await(nodeAccessor, renderer) {
1027
1045
  scope,
1028
1046
  () => {
1029
1047
  if (awaitBranch ? tryWithPlaceholder || referenceNode.replaceWith(
1030
- awaitBranch.h.parentNode
1048
+ awaitBranch.S.parentNode
1031
1049
  ) : (insertBranchBefore(
1032
1050
  awaitBranch = scope[branchAccessor] = createAndSetupBranch(
1033
- scope.$global,
1051
+ scope.$,
1034
1052
  renderer,
1035
1053
  scope,
1036
1054
  referenceNode.parentNode
1037
1055
  ),
1038
1056
  referenceNode.parentNode,
1039
1057
  referenceNode
1040
- ), referenceNode.remove()), renderer.m?.(awaitBranch, [data]), tryWithPlaceholder && (placeholderShown.add(pendingEffects), !--tryWithPlaceholder.p)) {
1041
- let placeholderBranch = tryWithPlaceholder.c;
1042
- tryWithPlaceholder.c = 0, placeholderBranch && (placeholderBranch.h.parentNode.insertBefore(
1043
- tryWithPlaceholder.h.parentNode,
1044
- placeholderBranch.h
1058
+ ), referenceNode.remove()), renderer.a?.(awaitBranch, [data]), tryWithPlaceholder && (placeholderShown.add(pendingEffects), !--tryWithPlaceholder.O)) {
1059
+ let placeholderBranch = tryWithPlaceholder.P;
1060
+ tryWithPlaceholder.P = 0, placeholderBranch && (placeholderBranch.S.parentNode.insertBefore(
1061
+ tryWithPlaceholder.S.parentNode,
1062
+ placeholderBranch.S
1045
1063
  ), removeAndDestroyBranch(placeholderBranch)), queueEffect(tryWithPlaceholder, (scope2) => {
1046
- let pendingEffects2 = scope2.G;
1047
- pendingEffects2 && (scope2.G = [], runEffects(pendingEffects2, !0));
1064
+ let pendingEffects2 = scope2.K;
1065
+ pendingEffects2 && (scope2.K = [], runEffects(pendingEffects2, !0));
1048
1066
  });
1049
1067
  }
1050
1068
  },
@@ -1052,13 +1070,14 @@ function _await(nodeAccessor, renderer) {
1052
1070
  ));
1053
1071
  },
1054
1072
  (error) => {
1055
- thisPromise === scope[promiseAccessor] && (tryWithPlaceholder && (tryWithPlaceholder.p = 0), scope[promiseAccessor] = 0, schedule(), queueRender(scope, renderCatch, -1, error));
1073
+ thisPromise === scope[promiseAccessor] && (tryWithPlaceholder && (tryWithPlaceholder.O = 0), scope[promiseAccessor] = 0, schedule(), queueRender(scope, renderCatch, -1, error));
1056
1074
  }
1057
1075
  );
1058
1076
  };
1059
1077
  }
1060
1078
  function _try(nodeAccessor, content) {
1061
- let branchAccessor = "d" /* ConditionalScope */ + nodeAccessor;
1079
+ nodeAccessor = decodeAccessor(nodeAccessor);
1080
+ let branchAccessor = "D" /* ConditionalScope */ + nodeAccessor;
1062
1081
  return (scope, input) => {
1063
1082
  scope[branchAccessor] || setConditionalRenderer(
1064
1083
  scope,
@@ -1067,29 +1086,30 @@ function _try(nodeAccessor, content) {
1067
1086
  createAndSetupBranch
1068
1087
  );
1069
1088
  let branch = scope[branchAccessor];
1070
- branch && (branch.a = nodeAccessor, branch.b = normalizeDynamicRenderer(input.catch), branch.d = normalizeDynamicRenderer(
1089
+ branch && (branch.D = nodeAccessor, branch.F = normalizeDynamicRenderer(input.catch), branch.Q = normalizeDynamicRenderer(
1071
1090
  input.placeholder
1072
1091
  ));
1073
1092
  };
1074
1093
  }
1075
1094
  function renderCatch(scope, error) {
1076
- let tryWithCatch = findBranchWithKey(scope, "b" /* CatchContent */);
1095
+ let tryWithCatch = findBranchWithKey(scope, "F" /* CatchContent */);
1077
1096
  if (tryWithCatch) {
1078
- let owner = tryWithCatch._, placeholderBranch = tryWithCatch.c;
1079
- placeholderBranch && (tryWithCatch.p = 0, owner["d" /* ConditionalScope */ + tryWithCatch.a] = placeholderBranch, destroyBranch(tryWithCatch)), caughtError.add(pendingEffects), setConditionalRenderer(
1097
+ let owner = tryWithCatch._, placeholderBranch = tryWithCatch.P;
1098
+ placeholderBranch && (tryWithCatch.O = 0, owner["D" /* ConditionalScope */ + tryWithCatch.D] = placeholderBranch, destroyBranch(tryWithCatch)), caughtError.add(pendingEffects), setConditionalRenderer(
1080
1099
  owner,
1081
- tryWithCatch.a,
1082
- tryWithCatch.b,
1100
+ tryWithCatch.D,
1101
+ tryWithCatch.F,
1083
1102
  createAndSetupBranch
1084
- ), tryWithCatch.b.m?.(
1085
- owner["d" /* ConditionalScope */ + tryWithCatch.a],
1103
+ ), tryWithCatch.F.a?.(
1104
+ owner["D" /* ConditionalScope */ + tryWithCatch.D],
1086
1105
  [error]
1087
1106
  );
1088
1107
  } else
1089
1108
  throw error;
1090
1109
  }
1091
1110
  function _if(nodeAccessor, ...branches) {
1092
- let branchAccessor = "c" /* ConditionalRenderer */ + nodeAccessor;
1111
+ nodeAccessor = decodeAccessor(nodeAccessor);
1112
+ let branchAccessor = "C" /* ConditionalRenderer */ + nodeAccessor;
1093
1113
  return enableBranches(), (scope, newBranch) => {
1094
1114
  newBranch !== scope[branchAccessor] && setConditionalRenderer(
1095
1115
  scope,
@@ -1103,32 +1123,33 @@ function patchDynamicTag(fn) {
1103
1123
  _dynamic_tag = fn(_dynamic_tag);
1104
1124
  }
1105
1125
  var _dynamic_tag = function(nodeAccessor, getContent, getTagVar, inputIsArgs) {
1106
- let childScopeAccessor = "d" /* ConditionalScope */ + nodeAccessor, rendererAccessor = "c" /* ConditionalRenderer */ + nodeAccessor;
1126
+ nodeAccessor = decodeAccessor(nodeAccessor);
1127
+ let childScopeAccessor = "D" /* ConditionalScope */ + nodeAccessor, rendererAccessor = "C" /* ConditionalRenderer */ + nodeAccessor;
1107
1128
  return enableBranches(), (scope, newRenderer, getInput) => {
1108
1129
  let normalizedRenderer = normalizeDynamicRenderer(newRenderer);
1109
- if (scope[rendererAccessor] !== (scope[rendererAccessor] = normalizedRenderer?.l || normalizedRenderer) || getContent && !(normalizedRenderer || scope[childScopeAccessor]))
1130
+ if (scope[rendererAccessor] !== (scope[rendererAccessor] = normalizedRenderer?.f || normalizedRenderer) || getContent && !(normalizedRenderer || scope[childScopeAccessor]))
1110
1131
  if (setConditionalRenderer(
1111
1132
  scope,
1112
1133
  nodeAccessor,
1113
1134
  normalizedRenderer || (getContent ? getContent(scope) : void 0),
1114
1135
  createBranchWithTagNameOrRenderer
1115
- ), getTagVar && _var(scope, childScopeAccessor, getTagVar()), typeof normalizedRenderer == "string") {
1136
+ ), getTagVar && (scope[childScopeAccessor].T = (value) => getTagVar()(scope, value)), typeof normalizedRenderer == "string") {
1116
1137
  if (getContent) {
1117
1138
  let content = getContent(scope);
1118
1139
  setConditionalRenderer(
1119
1140
  scope[childScopeAccessor],
1120
- 0,
1141
+ "a",
1121
1142
  content,
1122
1143
  createAndSetupBranch
1123
- ), content.o && subscribeToScopeSet(
1124
- content.t,
1125
- content.o,
1126
- scope[childScopeAccessor]["d" /* ConditionalScope */ + 0]
1144
+ ), content.b && subscribeToScopeSet(
1145
+ content.d,
1146
+ content.b,
1147
+ scope[childScopeAccessor]["Da"]
1127
1148
  );
1128
1149
  }
1129
- } else normalizedRenderer?.o && subscribeToScopeSet(
1130
- normalizedRenderer.t,
1131
- normalizedRenderer.o,
1150
+ } else normalizedRenderer?.b && subscribeToScopeSet(
1151
+ normalizedRenderer.d,
1152
+ normalizedRenderer.b,
1132
1153
  scope[childScopeAccessor]
1133
1154
  );
1134
1155
  if (normalizedRenderer) {
@@ -1136,24 +1157,24 @@ var _dynamic_tag = function(nodeAccessor, getContent, getTagVar, inputIsArgs) {
1136
1157
  if (typeof normalizedRenderer == "string")
1137
1158
  (getContent ? _attrs : _attrs_content)(
1138
1159
  childScope,
1139
- 0,
1160
+ "a",
1140
1161
  (inputIsArgs ? args[0] : args) || {}
1141
- );
1162
+ ), (childScope["Ia"] || childScope["Ea"]) && queueEffect(childScope, dynamicTagScript);
1142
1163
  else {
1143
- for (let accessor in normalizedRenderer.F)
1144
- normalizedRenderer.F[accessor](
1164
+ for (let accessor in normalizedRenderer.l)
1165
+ normalizedRenderer.l[accessor](
1145
1166
  childScope,
1146
- normalizedRenderer.L[accessor]
1167
+ normalizedRenderer.p[accessor]
1147
1168
  );
1148
- if (normalizedRenderer.m)
1169
+ if (normalizedRenderer.a)
1149
1170
  if (inputIsArgs)
1150
- normalizedRenderer.m(
1171
+ normalizedRenderer.a(
1151
1172
  childScope,
1152
1173
  normalizedRenderer._ ? args[0] : args
1153
1174
  );
1154
1175
  else {
1155
1176
  let inputWithContent = getContent ? { ...args, content: getContent(scope) } : args || {};
1156
- normalizedRenderer.m(
1177
+ normalizedRenderer.a(
1157
1178
  childScope,
1158
1179
  normalizedRenderer._ ? inputWithContent : [inputWithContent]
1159
1180
  );
@@ -1162,9 +1183,25 @@ var _dynamic_tag = function(nodeAccessor, getContent, getTagVar, inputIsArgs) {
1162
1183
  }
1163
1184
  };
1164
1185
  };
1186
+ function _resume_dynamic_tag() {
1187
+ _resume("d", dynamicTagScript);
1188
+ }
1189
+ function dynamicTagScript(branch) {
1190
+ _attrs_script(
1191
+ branch,
1192
+ "a"
1193
+ );
1194
+ }
1165
1195
  function setConditionalRenderer(scope, nodeAccessor, newRenderer, createBranch2) {
1166
- let referenceNode = scope[nodeAccessor], prevBranch = scope["d" /* ConditionalScope */ + nodeAccessor], parentNode = referenceNode.nodeType > 1 /* Element */ ? (prevBranch?.h || referenceNode).parentNode : referenceNode, newBranch = scope["d" /* ConditionalScope */ + nodeAccessor] = newRenderer && createBranch2(scope.$global, newRenderer, scope, parentNode);
1167
- referenceNode === parentNode ? (prevBranch && (destroyBranch(prevBranch), referenceNode.textContent = ""), newBranch && insertBranchBefore(newBranch, parentNode, null)) : prevBranch ? (newBranch ? insertBranchBefore(newBranch, parentNode, prevBranch.h) : parentNode.insertBefore(referenceNode, prevBranch.h), removeAndDestroyBranch(prevBranch)) : newBranch && (insertBranchBefore(newBranch, parentNode, referenceNode), referenceNode.remove());
1196
+ let referenceNode = scope[nodeAccessor], prevBranch = scope["D" /* ConditionalScope */ + nodeAccessor], parentNode = referenceNode.nodeType > 1 /* Element */ ? (prevBranch?.S || referenceNode).parentNode : referenceNode, newBranch = scope["D" /* ConditionalScope */ + nodeAccessor] = newRenderer && createBranch2(scope.$, newRenderer, scope, parentNode);
1197
+ referenceNode === parentNode ? (prevBranch && (destroyBranch(prevBranch), referenceNode.textContent = ""), newBranch && insertBranchBefore(newBranch, parentNode, null)) : prevBranch ? (newBranch ? insertBranchBefore(
1198
+ newBranch,
1199
+ parentNode,
1200
+ prevBranch.S
1201
+ ) : parentNode.insertBefore(
1202
+ referenceNode,
1203
+ prevBranch.S
1204
+ ), removeAndDestroyBranch(prevBranch)) : newBranch && (insertBranchBefore(newBranch, parentNode, referenceNode), referenceNode.remove());
1168
1205
  }
1169
1206
  function _for_of(nodeAccessor, renderer) {
1170
1207
  return loop(
@@ -1200,17 +1237,22 @@ function _for_until(nodeAccessor, renderer) {
1200
1237
  );
1201
1238
  }
1202
1239
  function loop(nodeAccessor, renderer, forEach) {
1203
- let params = renderer.m;
1204
- return enableBranches(), (scope, value) => {
1205
- let referenceNode = scope[nodeAccessor], oldMap = scope["m" /* LoopScopeMap */ + nodeAccessor], oldArray = oldMap ? scope["l" /* LoopScopeArray */ + nodeAccessor] || [
1240
+ let params = renderer.a;
1241
+ return nodeAccessor = decodeAccessor(nodeAccessor), enableBranches(), (scope, value) => {
1242
+ let referenceNode = scope[nodeAccessor], oldMap = scope["M" /* LoopScopeMap */ + nodeAccessor], oldArray = oldMap ? scope["L" /* LoopScopeArray */ + nodeAccessor] || [
1206
1243
  ...oldMap.values()
1207
- ] : [], parentNode = referenceNode.nodeType > 1 /* Element */ ? referenceNode.parentNode || oldArray[0].h.parentNode : referenceNode, newMap = scope["m" /* LoopScopeMap */ + nodeAccessor] = /* @__PURE__ */ new Map(), newArray = scope["l" /* LoopScopeArray */ + nodeAccessor] = [];
1244
+ ] : [], parentNode = referenceNode.nodeType > 1 /* Element */ ? referenceNode.parentNode || oldArray[0].S.parentNode : referenceNode, newMap = scope["M" /* LoopScopeMap */ + nodeAccessor] = /* @__PURE__ */ new Map(), newArray = scope["L" /* LoopScopeArray */ + nodeAccessor] = [];
1208
1245
  forEach(value, (key, args) => {
1209
- let branch = oldMap?.get(key) || createAndSetupBranch(scope.$global, renderer, scope, parentNode);
1246
+ let branch = oldMap?.get(key) || createAndSetupBranch(
1247
+ scope.$,
1248
+ renderer,
1249
+ scope,
1250
+ parentNode
1251
+ );
1210
1252
  params?.(branch, args), newMap.set(key, branch), newArray.push(branch);
1211
1253
  });
1212
1254
  let afterReference = null;
1213
- referenceNode !== parentNode && (oldArray.length ? (afterReference = oldArray[oldArray.length - 1].j.nextSibling, newArray.length || parentNode.insertBefore(referenceNode, afterReference)) : newArray.length && (afterReference = referenceNode.nextSibling, referenceNode.remove())), reconcile(parentNode, oldArray, newArray, afterReference);
1255
+ referenceNode !== parentNode && (oldArray.length ? (afterReference = oldArray[oldArray.length - 1].L.nextSibling, newArray.length || parentNode.insertBefore(referenceNode, afterReference)) : newArray.length && (afterReference = referenceNode.nextSibling, referenceNode.remove())), reconcile(parentNode, oldArray, newArray, afterReference);
1214
1256
  };
1215
1257
  }
1216
1258
  function createBranchWithTagNameOrRenderer($global, tagNameOrRenderer, parentScope, parentNode) {
@@ -1220,7 +1262,7 @@ function createBranchWithTagNameOrRenderer($global, tagNameOrRenderer, parentSco
1220
1262
  parentScope,
1221
1263
  parentNode
1222
1264
  );
1223
- return typeof tagNameOrRenderer == "string" ? branch[0] = branch.h = branch.j = document.createElementNS(
1265
+ return typeof tagNameOrRenderer == "string" ? branch.a = branch.S = branch.L = document.createElementNS(
1224
1266
  tagNameOrRenderer === "svg" ? "http://www.w3.org/2000/svg" : tagNameOrRenderer === "math" ? "http://www.w3.org/1998/Math/MathML" : parentNode.namespaceURI,
1225
1267
  tagNameOrRenderer
1226
1268
  ) : setupBranch(tagNameOrRenderer, branch), branch;
@@ -1234,20 +1276,20 @@ function byFirstArg(name) {
1234
1276
 
1235
1277
  // src/dom/queue.ts
1236
1278
  var pendingRenders = [], pendingRendersLookup = /* @__PURE__ */ new Map(), caughtError = /* @__PURE__ */ new WeakSet(), placeholderShown = /* @__PURE__ */ new WeakSet(), pendingEffects = [], pendingScopes = [], rendering, scopeKeyOffset = 1e3;
1237
- function queueRender(scope, signal, signalKey, value, scopeKey = scope.l) {
1279
+ function queueRender(scope, signal, signalKey, value, scopeKey = scope.M) {
1238
1280
  let key = scopeKey * scopeKeyOffset + signalKey, existingRender = signalKey >= 0 && pendingRendersLookup.get(key);
1239
1281
  if (existingRender)
1240
- existingRender.H = value;
1282
+ existingRender.m = value;
1241
1283
  else {
1242
1284
  let render = {
1243
- u: key,
1244
- q: scope,
1245
- M: signal,
1246
- H: value
1285
+ e: key,
1286
+ c: scope,
1287
+ q: signal,
1288
+ m: value
1247
1289
  }, i = pendingRenders.push(render) - 1;
1248
1290
  for (; i; ) {
1249
1291
  let parentIndex = i - 1 >> 1, parent = pendingRenders[parentIndex];
1250
- if (key - parent.u >= 0) break;
1292
+ if (key - parent.e >= 0) break;
1251
1293
  pendingRenders[i] = parent, i = parentIndex;
1252
1294
  }
1253
1295
  signalKey >= 0 && pendingRendersLookup.set(key, render), pendingRenders[i] = render;
@@ -1283,43 +1325,43 @@ function runRenders() {
1283
1325
  for (; pendingRenders.length; ) {
1284
1326
  let render = pendingRenders[0], item = pendingRenders.pop();
1285
1327
  if (render !== item) {
1286
- let i = 0, mid = pendingRenders.length >> 1, key = (pendingRenders[0] = item).u;
1328
+ let i = 0, mid = pendingRenders.length >> 1, key = (pendingRenders[0] = item).e;
1287
1329
  for (; i < mid; ) {
1288
1330
  let bestChild = (i << 1) + 1, right = bestChild + 1;
1289
- if (right < pendingRenders.length && pendingRenders[right].u - pendingRenders[bestChild].u < 0 && (bestChild = right), pendingRenders[bestChild].u - key >= 0)
1331
+ if (right < pendingRenders.length && pendingRenders[right].e - pendingRenders[bestChild].e < 0 && (bestChild = right), pendingRenders[bestChild].e - key >= 0)
1290
1332
  break;
1291
1333
  pendingRenders[i] = pendingRenders[bestChild], i = bestChild;
1292
1334
  }
1293
1335
  pendingRenders[i] = item;
1294
1336
  }
1295
- render.q.k?.z || runRender(render);
1337
+ render.c.G?.J || runRender(render);
1296
1338
  }
1297
1339
  for (let scope of pendingScopes)
1298
- scope.n = 0;
1340
+ scope.I = 0;
1299
1341
  pendingScopes = [];
1300
1342
  }
1301
- var runRender = (render) => render.M(render.q, render.H), _enable_catch = () => {
1343
+ var runRender = (render) => render.q(render.c, render.m), _enable_catch = () => {
1302
1344
  _enable_catch = () => {
1303
1345
  }, enableBranches();
1304
1346
  let handlePendingTry = (fn, scope, branch) => {
1305
1347
  for (; branch; ) {
1306
- if (branch.p)
1307
- return (branch.G ||= []).push(fn, scope);
1308
- branch = branch.x;
1348
+ if (branch.O)
1349
+ return (branch.K ||= []).push(fn, scope);
1350
+ branch = branch.N;
1309
1351
  }
1310
1352
  };
1311
1353
  runEffects = /* @__PURE__ */ ((runEffects2) => (effects, checkPending = placeholderShown.has(effects)) => {
1312
1354
  if (checkPending || caughtError.has(effects)) {
1313
1355
  let i = 0, fn, scope, branch;
1314
1356
  for (; i < effects.length; )
1315
- fn = effects[i++], scope = effects[i++], branch = scope.k, !branch?.z && !(checkPending && handlePendingTry(fn, scope, branch)) && fn(scope);
1357
+ fn = effects[i++], scope = effects[i++], branch = scope.G, !branch?.J && !(checkPending && handlePendingTry(fn, scope, branch)) && fn(scope);
1316
1358
  } else
1317
1359
  runEffects2(effects);
1318
1360
  })(runEffects), runRender = /* @__PURE__ */ ((runRender2) => (render) => {
1319
1361
  try {
1320
1362
  runRender2(render);
1321
1363
  } catch (error) {
1322
- renderCatch(render.q, error);
1364
+ renderCatch(render.c, error);
1323
1365
  }
1324
1366
  })(runRender);
1325
1367
  };
@@ -1330,7 +1372,7 @@ function $signalReset(scope, id) {
1330
1372
  ctrl && (queueEffect(ctrl, abort), scope.A[id] = void 0);
1331
1373
  }
1332
1374
  function $signal(scope, id) {
1333
- return scope.k && (scope.k.I ||= /* @__PURE__ */ new Set()).add(scope), ((scope.A ||= {})[id] ||= new AbortController()).signal;
1375
+ return scope.G && (scope.G.B ||= /* @__PURE__ */ new Set()).add(scope), ((scope.A ||= {})[id] ||= new AbortController()).signal;
1334
1376
  }
1335
1377
  function abort(ctrl) {
1336
1378
  ctrl.abort();
@@ -1352,13 +1394,13 @@ var classIdToBranch = /* @__PURE__ */ new Map(), compat = {
1352
1394
  _resume(RENDERER_REGISTER_ID, fn);
1353
1395
  },
1354
1396
  isRenderer(renderer) {
1355
- return renderer.B;
1397
+ return renderer.g;
1356
1398
  },
1357
1399
  getStartNode(branch) {
1358
- return branch.h;
1400
+ return branch.S;
1359
1401
  },
1360
1402
  setScopeNodes(branch, startNode, endNode) {
1361
- branch.h = startNode, branch.j = endNode;
1403
+ branch.S = startNode, branch.L = endNode;
1362
1404
  },
1363
1405
  runComponentEffects() {
1364
1406
  this.effects && runEffects(this.effects);
@@ -1374,9 +1416,9 @@ var classIdToBranch = /* @__PURE__ */ new Map(), compat = {
1374
1416
  },
1375
1417
  createRenderer(params, clone) {
1376
1418
  let renderer = _content_branch(0, 0, 0, params);
1377
- return renderer.B = (branch) => {
1419
+ return renderer.g = (branch) => {
1378
1420
  let cloned = clone();
1379
- branch.h = cloned.startNode, branch.j = cloned.endNode;
1421
+ branch.S = cloned.startNode, branch.L = cloned.endNode;
1380
1422
  }, renderer;
1381
1423
  },
1382
1424
  render(out, component, renderer, args) {
@@ -1390,11 +1432,14 @@ var classIdToBranch = /* @__PURE__ */ new Map(), compat = {
1390
1432
  branch || (created = 1, branch = component.scope = createAndSetupBranch(
1391
1433
  out.global,
1392
1434
  renderer,
1393
- renderer.t,
1435
+ renderer.d,
1394
1436
  document.body
1395
- )), renderer.m?.(branch, renderer._ ? args[0] : args);
1437
+ )), renderer.a?.(branch, renderer._ ? args[0] : args);
1396
1438
  }), created)
1397
- return toInsertNode(branch.h, branch.j);
1439
+ return toInsertNode(
1440
+ branch.S,
1441
+ branch.L
1442
+ );
1398
1443
  }
1399
1444
  };
1400
1445
 
@@ -1429,21 +1474,21 @@ function mount(input = {}, reference, position) {
1429
1474
  parentNode = reference.parentNode, nextSibling = reference.nextSibling;
1430
1475
  break;
1431
1476
  }
1432
- let curValue, args = this.m, effects = prepareEffects(() => {
1477
+ let curValue, args = this.a, effects = prepareEffects(() => {
1433
1478
  branch = createBranch(
1434
1479
  $global,
1435
1480
  this,
1436
1481
  void 0,
1437
1482
  parentNode
1438
- ), branch.e = (newValue) => {
1483
+ ), branch.T = (newValue) => {
1439
1484
  curValue = newValue;
1440
- }, this.C?.(branch), args?.(branch, input);
1485
+ }, this.h?.(branch), args?.(branch, input);
1441
1486
  });
1442
1487
  return insertChildNodes(
1443
1488
  parentNode,
1444
1489
  nextSibling,
1445
- branch.h,
1446
- branch.j
1490
+ branch.S,
1491
+ branch.L
1447
1492
  ), runEffects(effects), {
1448
1493
  get value() {
1449
1494
  return curValue;
@@ -1523,6 +1568,7 @@ export {
1523
1568
  _on,
1524
1569
  _or,
1525
1570
  _resume,
1571
+ _resume_dynamic_tag,
1526
1572
  _return,
1527
1573
  _return_change,
1528
1574
  _script,