marko 6.0.60 → 6.0.62

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/debug/dom.js CHANGED
@@ -20,98 +20,99 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/dom.ts
21
21
  var dom_exports = {};
22
22
  __export(dom_exports, {
23
- attr: () => attr,
23
+ $signal: () => $signal,
24
+ $signalReset: () => $signalReset,
25
+ _attr: () => _attr,
26
+ _attr_class: () => _attr_class,
27
+ _attr_class_item: () => _attr_class_item,
28
+ _attr_class_items: () => _attr_class_items,
29
+ _attr_content: () => _attr_content,
30
+ _attr_details_open: () => _attr_details_or_dialog_open,
31
+ _attr_details_open_script: () => _attr_details_or_dialog_open_script,
32
+ _attr_dialog_open: () => _attr_details_or_dialog_open,
33
+ _attr_dialog_open_script: () => _attr_details_or_dialog_open_script,
34
+ _attr_input_checked: () => _attr_input_checked,
35
+ _attr_input_checkedValue: () => _attr_input_checkedValue,
36
+ _attr_input_checkedValue_script: () => _attr_input_checkedValue_script,
37
+ _attr_input_checked_script: () => _attr_input_checked_script,
38
+ _attr_input_value: () => _attr_input_value,
39
+ _attr_input_value_script: () => _attr_input_value_script,
40
+ _attr_select_value: () => _attr_select_value,
41
+ _attr_select_value_script: () => _attr_select_value_script,
42
+ _attr_style: () => _attr_style,
43
+ _attr_style_item: () => _attr_style_item,
44
+ _attr_style_items: () => _attr_style_items,
45
+ _attr_textarea_value: () => _attr_input_value,
46
+ _attr_textarea_value_script: () => _attr_input_value_script,
47
+ _attrs: () => _attrs,
48
+ _attrs_content: () => _attrs_content,
49
+ _attrs_partial: () => _attrs_partial,
50
+ _attrs_partial_content: () => _attrs_partial_content,
51
+ _attrs_script: () => _attrs_script,
52
+ _await: () => _await,
53
+ _closure: () => _closure,
54
+ _closure_get: () => _closure_get,
55
+ _const: () => _const,
56
+ _content: () => _content,
57
+ _content_branch: () => _content_branch,
58
+ _content_closures: () => _content_closures,
59
+ _content_resume: () => _content_resume,
60
+ _dynamic_tag: () => _dynamic_tag,
61
+ _el: () => _el,
62
+ _enable_catch: () => _enable_catch,
63
+ _for_closure: () => _for_closure,
64
+ _for_in: () => _for_in,
65
+ _for_of: () => _for_of,
66
+ _for_to: () => _for_to,
67
+ _hoist: () => _hoist,
68
+ _html: () => _html,
69
+ _id: () => _id,
70
+ _if: () => _if,
71
+ _if_closure: () => _if_closure,
72
+ _let: () => _let,
73
+ _lifecycle: () => _lifecycle,
74
+ _on: () => _on,
75
+ _or: () => _or,
76
+ _resume: () => _resume,
77
+ _return: () => _return,
78
+ _return_change: () => _return_change,
79
+ _script: () => _script,
80
+ _template: () => _template,
81
+ _text: () => _text,
82
+ _text_content: () => _text_content,
83
+ _try: () => _try,
84
+ _var: () => _var,
85
+ _var_change: () => _var_change,
86
+ _var_resume: () => _var_resume,
24
87
  attrTag: () => attrTag,
25
88
  attrTags: () => attrTags,
26
- attrs: () => attrs,
27
- attrsAndContent: () => attrsAndContent,
28
- attrsEvents: () => attrsEvents,
29
- awaitTag: () => awaitTag,
30
- classAttr: () => classAttr,
31
- classItem: () => classItem,
32
- classItems: () => classItems,
33
89
  compat: () => compat,
34
- conditional: () => conditional,
35
- conditionalClosure: () => conditionalClosure,
36
- controllable_detailsOrDialog_open: () => controllable_detailsOrDialog_open,
37
- controllable_detailsOrDialog_open_effect: () => controllable_detailsOrDialog_open_effect,
38
- controllable_input_checked: () => controllable_input_checked,
39
- controllable_input_checkedValue: () => controllable_input_checkedValue,
40
- controllable_input_checkedValue_effect: () => controllable_input_checkedValue_effect,
41
- controllable_input_checked_effect: () => controllable_input_checked_effect,
42
- controllable_input_value: () => controllable_input_value,
43
- controllable_input_value_effect: () => controllable_input_value_effect,
44
- controllable_select_value: () => controllable_select_value,
45
- controllable_select_value_effect: () => controllable_select_value_effect,
46
- controllable_textarea_value: () => controllable_input_value,
47
- controllable_textarea_value_effect: () => controllable_input_value_effect,
48
- createContent: () => createContent,
49
- createRenderer: () => createRenderer,
50
- createTemplate: () => createTemplate,
51
- createTry: () => createTry,
52
- data: () => data,
53
- dynamicClosure: () => dynamicClosure,
54
- dynamicClosureRead: () => dynamicClosureRead,
55
- dynamicTag: () => dynamicTag,
56
- effect: () => effect,
57
- enableCatch: () => enableCatch,
58
90
  forIn: () => forIn,
59
91
  forOf: () => forOf,
60
92
  forTo: () => forTo,
61
- getAbortSignal: () => getAbortSignal,
62
- hoist: () => hoist,
63
- html: () => html,
64
93
  init: () => init,
65
- insertContent: () => insertContent,
66
- intersection: () => intersection,
67
- lifecycle: () => lifecycle,
68
- localClosures: () => localClosures,
69
- loopClosure: () => loopClosure,
70
- loopIn: () => loopIn,
71
- loopOf: () => loopOf,
72
- loopTo: () => loopTo,
73
- nextTagId: () => nextTagId,
74
- nodeRef: () => nodeRef,
75
- on: () => on,
76
- partialAttrs: () => partialAttrs,
77
- partialAttrsAndContent: () => partialAttrsAndContent,
78
- props: () => props,
79
- register: () => register,
80
- registerBoundSignal: () => registerBoundSignal,
81
- registerContent: () => registerContent,
82
- resetAbortSignal: () => resetAbortSignal,
83
- run: () => run,
84
- setTagVar: () => setTagVar,
85
- setTagVarChange: () => setTagVarChange,
86
- state: () => state,
87
- styleAttr: () => styleAttr,
88
- styleItem: () => styleItem,
89
- styleItems: () => styleItems,
90
- tagVarSignal: () => tagVarSignal,
91
- tagVarSignalChange: () => tagVarSignalChange,
92
- textContent: () => textContent,
93
- value: () => value
94
+ run: () => run
94
95
  });
95
96
  module.exports = __toCommonJS(dom_exports);
96
97
 
97
98
  // src/common/attr-tag.ts
98
99
  var empty = [];
99
100
  var rest = true ? Symbol("Attribute Tag") : Symbol();
100
- function attrTag(attrs2) {
101
- attrs2[Symbol.iterator] = attrTagIterator;
102
- attrs2[rest] = empty;
103
- return attrs2;
101
+ function attrTag(attrs) {
102
+ attrs[Symbol.iterator] = attrTagIterator;
103
+ attrs[rest] = empty;
104
+ return attrs;
104
105
  }
105
- function attrTags(first, attrs2) {
106
+ function attrTags(first, attrs) {
106
107
  if (first) {
107
108
  if (first[rest] === empty) {
108
- first[rest] = [attrs2];
109
+ first[rest] = [attrs];
109
110
  } else {
110
- first[rest].push(attrs2);
111
+ first[rest].push(attrs);
111
112
  }
112
113
  return first;
113
114
  }
114
- return attrTag(attrs2);
115
+ return attrTag(attrs);
115
116
  }
116
117
  function* attrTagIterator() {
117
118
  yield this;
@@ -144,14 +145,14 @@ function forTo(to, from, step, cb) {
144
145
  function classValue(classValue2) {
145
146
  return toDelimitedString(classValue2, " ", stringifyClassObject);
146
147
  }
147
- function stringifyClassObject(name, value2) {
148
- return value2 ? name : "";
148
+ function stringifyClassObject(name, value) {
149
+ return value ? name : "";
149
150
  }
150
151
  function styleValue(styleValue2) {
151
152
  return toDelimitedString(styleValue2, ";", stringifyStyleObject);
152
153
  }
153
- function stringifyStyleObject(name, value2) {
154
- return value2 || value2 === 0 ? name + ":" + value2 : "";
154
+ function stringifyStyleObject(name, value) {
155
+ return value || value === 0 ? name + ":" + value : "";
155
156
  }
156
157
  function toDelimitedString(val, delimiter, stringify) {
157
158
  let str = "";
@@ -186,13 +187,13 @@ function isEventHandler(name) {
186
187
  function getEventHandlerName(name) {
187
188
  return name[2] === "-" ? name.slice(3) : name.slice(2).toLowerCase();
188
189
  }
189
- function normalizeDynamicRenderer(value2) {
190
- return value2 ? value2.content || value2.default || value2 : void 0;
190
+ function normalizeDynamicRenderer(value) {
191
+ return value ? value.content || value.default || value : void 0;
191
192
  }
192
193
 
193
194
  // src/dom/event.ts
194
195
  var defaultDelegator = createDelegator();
195
- function on(element, type, handler) {
196
+ function _on(element, type, handler) {
196
197
  if (element["$" + type] === void 0) {
197
198
  defaultDelegator(element, type, handleDelegated);
198
199
  }
@@ -307,57 +308,57 @@ function walk(startNode, walkCodes, branch) {
307
308
  walkInternal(0, walkCodes, branch);
308
309
  }
309
310
  function walkInternal(currentWalkIndex, walkCodes, scope) {
310
- let value2;
311
+ let value;
311
312
  let storedMultiplier = 0;
312
313
  let currentMultiplier = 0;
313
314
  let currentScopeIndex = 0;
314
315
  for (; currentWalkIndex < walkCodes.length; ) {
315
- value2 = walkCodes.charCodeAt(currentWalkIndex++);
316
+ value = walkCodes.charCodeAt(currentWalkIndex++);
316
317
  currentMultiplier = storedMultiplier;
317
318
  storedMultiplier = 0;
318
- if (value2 === 32 /* Get */) {
319
+ if (value === 32 /* Get */) {
319
320
  const node = walker.currentNode;
320
321
  scope[true ? getDebugKey(currentScopeIndex, walker.currentNode) : currentScopeIndex] = node;
321
322
  scope["Getter:" /* Getter */ + (true ? getDebugKey(currentScopeIndex++, walker.currentNode) : currentScopeIndex++)] = () => node;
322
- } else if (value2 === 37 /* Replace */ || value2 === 49 /* DynamicTagWithVar */) {
323
+ } else if (value === 37 /* Replace */ || value === 49 /* DynamicTagWithVar */) {
323
324
  walker.currentNode.replaceWith(
324
325
  walker.currentNode = scope[true ? getDebugKey(currentScopeIndex++, "#text") : currentScopeIndex++] = new Text()
325
326
  );
326
- if (value2 === 49 /* DynamicTagWithVar */) {
327
+ if (value === 49 /* DynamicTagWithVar */) {
327
328
  scope[true ? getDebugKey(currentScopeIndex++, "#scopeOffset") : currentScopeIndex++] = skipScope(scope);
328
329
  }
329
- } else if (value2 === 38 /* EndChild */) {
330
+ } else if (value === 38 /* EndChild */) {
330
331
  return currentWalkIndex;
331
- } else if (value2 === 47 /* BeginChild */ || value2 === 48 /* BeginChildWithVar */) {
332
+ } else if (value === 47 /* BeginChild */ || value === 48 /* BeginChildWithVar */) {
332
333
  currentWalkIndex = walkInternal(
333
334
  currentWalkIndex,
334
335
  walkCodes,
335
336
  scope[true ? getDebugKey(currentScopeIndex++, "#childScope") : currentScopeIndex++] = createScope(scope.$global, scope.___closestBranch)
336
337
  );
337
- if (value2 === 48 /* BeginChildWithVar */) {
338
+ if (value === 48 /* BeginChildWithVar */) {
338
339
  scope[true ? getDebugKey(currentScopeIndex++, "#scopeOffset") : currentScopeIndex++] = skipScope(scope);
339
340
  }
340
- } else if (value2 < 91 /* NextEnd */ + 1) {
341
- value2 = 20 /* Next */ * currentMultiplier + value2 - 67 /* Next */;
342
- while (value2--) {
341
+ } else if (value < 91 /* NextEnd */ + 1) {
342
+ value = 20 /* Next */ * currentMultiplier + value - 67 /* Next */;
343
+ while (value--) {
343
344
  walker.nextNode();
344
345
  }
345
- } else if (value2 < 106 /* OverEnd */ + 1) {
346
- value2 = 10 /* Over */ * currentMultiplier + value2 - 97 /* Over */;
347
- while (value2--) {
346
+ } else if (value < 106 /* OverEnd */ + 1) {
347
+ value = 10 /* Over */ * currentMultiplier + value - 97 /* Over */;
348
+ while (value--) {
348
349
  walker.nextSibling();
349
350
  }
350
- } else if (value2 < 116 /* OutEnd */ + 1) {
351
- value2 = 10 /* Out */ * currentMultiplier + value2 - 107 /* Out */;
352
- while (value2--) {
351
+ } else if (value < 116 /* OutEnd */ + 1) {
352
+ value = 10 /* Out */ * currentMultiplier + value - 107 /* Out */;
353
+ while (value--) {
353
354
  walker.parentNode();
354
355
  }
355
356
  walker.nextSibling();
356
357
  } else {
357
- if (value2 < 117 /* Multiplier */ || value2 > 126 /* MultiplierEnd */) {
358
- throw new Error(`Unknown walk code: ${value2}`);
358
+ if (value < 117 /* Multiplier */ || value > 126 /* MultiplierEnd */) {
359
+ throw new Error(`Unknown walk code: ${value}`);
359
360
  }
360
- storedMultiplier = currentMultiplier * 10 /* Multiplier */ + value2 - 117 /* Multiplier */;
361
+ storedMultiplier = currentMultiplier * 10 /* Multiplier */ + value - 117 /* Multiplier */;
361
362
  }
362
363
  }
363
364
  }
@@ -397,84 +398,72 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
397
398
  value: resumeRender = ((renderId) => {
398
399
  const render = resumeRender[renderId] = renders2[renderId] || renders2(renderId);
399
400
  const walk2 = render.w;
400
- const commentPrefixLen = render.i.length;
401
401
  const scopeLookup = render.s = {};
402
402
  const serializeContext = {
403
403
  _: registeredValues
404
404
  };
405
405
  const branches = branchesEnabled && /* @__PURE__ */ (() => {
406
- const branchStack = [];
407
- const branchIds = /* @__PURE__ */ new Set();
408
- const parentBranchIds = /* @__PURE__ */ new Map();
409
- let lastEndNode;
410
- let currentBranchId;
411
- const endBranch = (branchId, reference) => {
412
- const branch = scopeLookup[branchId] ||= {};
413
- let endNode = reference;
414
- let prevNode;
415
- while ((prevNode = endNode.previousSibling) !== branch.___startNode && ~visits.indexOf(endNode = prevNode)) ;
416
- branch.___endNode = lastEndNode = endNode === lastEndNode ? reference.parentNode.insertBefore(new Text(), reference) : endNode;
417
- branch.___startNode ||= lastEndNode;
418
- branchIds.add(branchId);
419
- return branch;
406
+ const branchParents = /* @__PURE__ */ new Map();
407
+ const branchStarts = [];
408
+ const orphanBranches = [];
409
+ const endBranch = (singleNode) => {
410
+ const parent = visit.parentNode;
411
+ let startVisit = visit;
412
+ let i = orphanBranches.length;
413
+ let claimed = 0;
414
+ let branchId;
415
+ let branch;
416
+ while (branchId = +lastToken) {
417
+ branch = scopeLookup[branchId] ||= {};
418
+ if (singleNode) {
419
+ while (startVisit.previousSibling && ~visits.indexOf(
420
+ startVisit = startVisit.previousSibling
421
+ )) ;
422
+ branch.___endNode = branch.___startNode = startVisit;
423
+ if (visitType === "'" /* BranchEndNativeTag */) {
424
+ branch[true ? getDebugKey(0, startVisit) : 0] = startVisit;
425
+ }
426
+ } else {
427
+ startVisit = branchStarts.pop();
428
+ if (parent !== startVisit.parentNode) {
429
+ parent.prepend(startVisit);
430
+ }
431
+ branch.___startNode = startVisit;
432
+ branch.___endNode = visit.previousSibling === startVisit ? startVisit : parent.insertBefore(new Text(), visit);
433
+ }
434
+ while (i-- && orphanBranches[i] > branchId) {
435
+ branchParents.set(orphanBranches[i], branchId);
436
+ claimed++;
437
+ }
438
+ orphanBranches.push(branchId);
439
+ branchParents.set(branchId, 0);
440
+ nextToken();
441
+ }
442
+ orphanBranches.splice(i, claimed);
420
443
  };
421
444
  return {
422
445
  ___visit() {
423
- if (visitToken === "[" /* BranchStart */) {
424
- if (currentBranchId && visitDataIndex) {
425
- endBranch(currentBranchId, visit);
426
- currentBranchId = branchStack.pop();
427
- }
428
- if (currentBranchId) {
429
- branchStack.push(currentBranchId);
430
- parentBranchIds.set(scopeId, currentBranchId);
431
- }
432
- currentBranchId = scopeId;
433
- visitScope.___startNode = visit;
434
- } else if (visitToken === "]" /* BranchEnd */) {
435
- const curParent = visit.parentNode;
436
- const startNode = endBranch(
437
- currentBranchId,
438
- visit
439
- ).___startNode;
440
- visitScope[visitData] = visit;
441
- if (curParent !== startNode.parentNode) {
442
- curParent.prepend(startNode);
443
- }
444
- currentBranchId = branchStack.pop();
446
+ if (visitType === "[" /* BranchStart */) {
447
+ endBranch();
448
+ branchStarts.push(visit);
445
449
  } else {
446
- let next = visitData.indexOf(" ");
447
- let curNode = visit;
448
- visitScope[~next ? visitData.slice(0, next) : visitData] = visitToken === "=" /* BranchSingleNodeOnlyChildInParent */ ? visit.parentNode : visit;
449
- while (~next) {
450
- const start = next + 1;
451
- next = visitData.indexOf(" ", start);
452
- const childScopeId = +visitData.slice(
453
- start,
454
- ~next ? next : visitData.length
455
- );
456
- curNode = endBranch(childScopeId, curNode).___endNode;
457
- parentBranchIds.set(childScopeId, scopeId);
458
- if (visitToken === "'" /* BranchNativeTag */) {
459
- const childBranch = scopeLookup[childScopeId];
460
- childBranch[true ? getDebugKey(0, curNode) : 0] = childBranch.___startNode = childBranch.___endNode = curNode;
461
- }
462
- }
450
+ visitScope[
451
+ nextToken()
452
+ /* read accessor */
453
+ ] = visitType === ")" /* BranchEndOnlyChildInParent */ || visitType === "}" /* BranchEndSingleNodeOnlyChildInParent */ ? visit.parentNode : visit;
454
+ nextToken();
455
+ endBranch(
456
+ visitType !== "]" /* BranchEnd */ && visitType !== ")" /* BranchEndOnlyChildInParent */
457
+ );
463
458
  }
464
459
  },
465
460
  ___scope(scope) {
466
- const parentBranchId = scope["#ClosestBranchId" /* ClosestBranchId */] || parentBranchIds.get(scopeId);
467
- if (parentBranchId) {
468
- scope.___closestBranch = scopeLookup[parentBranchId];
469
- }
470
- if (branchIds.has(scopeId)) {
471
- const branch = scope;
472
- const parentBranch = branch.___closestBranch;
473
- scope.___closestBranch = branch;
474
- if (parentBranch) {
475
- branch.___parentBranch = parentBranch;
476
- (parentBranch.___branchScopes ||= /* @__PURE__ */ new Set()).add(branch);
461
+ scope.___closestBranch = scopeLookup[scope["#ClosestBranchId" /* ClosestBranchId */] || branchParents.get(scopeId)];
462
+ if (branchParents.has(scopeId)) {
463
+ if (scope.___closestBranch) {
464
+ ((scope.___parentBranch = scope.___closestBranch).___branchScopes ||= /* @__PURE__ */ new Set()).add(scope);
477
465
  }
466
+ scope.___closestBranch = scope;
478
467
  }
479
468
  }
480
469
  };
@@ -487,29 +476,31 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
487
476
  let scopeId;
488
477
  let visit;
489
478
  let visitText;
490
- let visitData;
491
- let visitDataIndex;
492
- let visitToken;
479
+ let visitType;
493
480
  let visitScope;
481
+ let lastToken;
482
+ let lastTokenIndex;
483
+ const nextToken = () => lastToken = visitText.slice(
484
+ lastTokenIndex,
485
+ // eslint-disable-next-line no-cond-assign
486
+ (lastTokenIndex = visitText.indexOf(" ", lastTokenIndex) + 1) ? lastTokenIndex - 1 : visitText.length
487
+ );
494
488
  render.w = () => {
495
489
  try {
496
490
  walk2();
497
491
  isResuming = 1;
498
492
  for (visit of visits = render.v) {
493
+ lastTokenIndex = render.i.length;
499
494
  visitText = visit.data;
500
- visitDataIndex = visitText.indexOf(" ") + 1;
501
- scopeId = +visitText.slice(
502
- commentPrefixLen + 1,
503
- visitDataIndex ? visitDataIndex - 1 : visitText.length
504
- );
505
- visitData = visitDataIndex ? visitText.slice(visitDataIndex) : "";
506
- visitToken = visitText[commentPrefixLen];
507
- visitScope = scopeLookup[scopeId] ||= {
508
- ___id: scopeId
509
- };
510
- if (visitToken === "*" /* Node */) {
511
- visitScope["Getter:" /* Getter */ + visitData] = /* @__PURE__ */ ((node) => () => node)(visitScope[visitData] = visit.previousSibling);
512
- } else if (branches) {
495
+ visitType = visitText[lastTokenIndex++];
496
+ if (scopeId = +nextToken()) {
497
+ visitScope = scopeLookup[scopeId] ||= {
498
+ ___id: scopeId
499
+ };
500
+ }
501
+ if (visitType === "*" /* Node */) {
502
+ visitScope["Getter:" /* Getter */ + nextToken()] = /* @__PURE__ */ ((node) => () => node)(visitScope[lastToken] = visit.previousSibling);
503
+ } else if (branchesEnabled) {
513
504
  branches.___visit();
514
505
  }
515
506
  }
@@ -542,7 +533,7 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
542
533
  scopeLookup[scopeId]
543
534
  );
544
535
  }
545
- if (branches) {
536
+ if (branchesEnabled) {
546
537
  branches.___scope(scope);
547
538
  }
548
539
  if (true) {
@@ -573,24 +564,24 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
573
564
  }
574
565
  }
575
566
  var isResuming;
576
- function register(id, obj) {
567
+ function _resume(id, obj) {
577
568
  registeredValues[id] = obj;
578
569
  return obj;
579
570
  }
580
- function registerBoundSignal(id, signal) {
581
- registeredValues[id] = (scope) => (value2) => signal(scope, value2);
571
+ function _var_resume(id, signal) {
572
+ registeredValues[id] = (scope) => (value) => signal(scope, value);
582
573
  return signal;
583
574
  }
584
575
  function getRegisteredWithScope(id, scope) {
585
576
  const val = registeredValues[id];
586
577
  return scope ? val(scope) : val;
587
578
  }
588
- function nodeRef(id, key) {
589
- return register(id, (scope) => () => scope[key]());
579
+ function _el(id, key) {
580
+ return _resume(id, (scope) => () => scope[key]());
590
581
  }
591
582
 
592
583
  // src/dom/controllable.ts
593
- function controllable_input_checked(scope, nodeAccessor, checked, checkedChange) {
584
+ function _attr_input_checked(scope, nodeAccessor, checked, checkedChange) {
594
585
  setCheckboxValue(
595
586
  scope,
596
587
  nodeAccessor,
@@ -599,7 +590,7 @@ function controllable_input_checked(scope, nodeAccessor, checked, checkedChange)
599
590
  checkedChange
600
591
  );
601
592
  }
602
- function controllable_input_checked_effect(scope, nodeAccessor) {
593
+ function _attr_input_checked_script(scope, nodeAccessor) {
603
594
  const el = scope[nodeAccessor];
604
595
  syncControllable(el, "input", hasCheckboxChanged, () => {
605
596
  const checkedChange = scope["ControlledHandler:" /* ControlledHandler */ + nodeAccessor];
@@ -611,18 +602,18 @@ function controllable_input_checked_effect(scope, nodeAccessor) {
611
602
  }
612
603
  });
613
604
  }
614
- function controllable_input_checkedValue(scope, nodeAccessor, checkedValue, checkedValueChange, value2) {
605
+ function _attr_input_checkedValue(scope, nodeAccessor, checkedValue, checkedValueChange, value) {
615
606
  scope["ControlledValue:" /* ControlledValue */ + nodeAccessor] = checkedValue;
616
- attr(scope[nodeAccessor], "value", value2);
607
+ _attr(scope[nodeAccessor], "value", value);
617
608
  setCheckboxValue(
618
609
  scope,
619
610
  nodeAccessor,
620
611
  1 /* InputCheckedValue */,
621
- Array.isArray(checkedValue) ? checkedValue.includes(value2) : checkedValue === value2,
612
+ Array.isArray(checkedValue) ? checkedValue.includes(value) : checkedValue === value,
622
613
  checkedValueChange
623
614
  );
624
615
  }
625
- function controllable_input_checkedValue_effect(scope, nodeAccessor) {
616
+ function _attr_input_checkedValue_script(scope, nodeAccessor) {
626
617
  const el = scope[nodeAccessor];
627
618
  syncControllable(el, "input", hasCheckboxChanged, () => {
628
619
  const checkedValueChange = scope["ControlledHandler:" /* ControlledHandler */ + nodeAccessor];
@@ -645,13 +636,13 @@ function controllable_input_checkedValue_effect(scope, nodeAccessor) {
645
636
  }
646
637
  });
647
638
  }
648
- function controllable_input_value(scope, nodeAccessor, value2, valueChange) {
639
+ function _attr_input_value(scope, nodeAccessor, value, valueChange) {
649
640
  const el = scope[nodeAccessor];
650
- const normalizedValue = normalizeStrProp(value2);
641
+ const normalizedValue = normalizeStrProp(value);
651
642
  scope["ControlledHandler:" /* ControlledHandler */ + nodeAccessor] = valueChange;
652
643
  if (valueChange) {
653
644
  scope["ControlledType:" /* ControlledType */ + nodeAccessor] = 0 /* InputChecked */;
654
- scope["ControlledValue:" /* ControlledValue */ + nodeAccessor] = value2;
645
+ scope["ControlledValue:" /* ControlledValue */ + nodeAccessor] = value;
655
646
  if (el.isConnected) {
656
647
  setValueAndUpdateSelection(el, normalizedValue);
657
648
  } else {
@@ -662,7 +653,7 @@ function controllable_input_value(scope, nodeAccessor, value2, valueChange) {
662
653
  el.defaultValue = normalizedValue;
663
654
  }
664
655
  }
665
- function controllable_input_value_effect(scope, nodeAccessor) {
656
+ function _attr_input_value_script(scope, nodeAccessor) {
666
657
  const el = scope[nodeAccessor];
667
658
  if (isResuming) {
668
659
  scope["ControlledValue:" /* ControlledValue */ + nodeAccessor] = el.defaultValue;
@@ -681,24 +672,24 @@ function controllable_input_value_effect(scope, nodeAccessor) {
681
672
  }
682
673
  });
683
674
  }
684
- function controllable_select_value(scope, nodeAccessor, value2, valueChange) {
675
+ function _attr_select_value(scope, nodeAccessor, value, valueChange) {
685
676
  scope["ControlledHandler:" /* ControlledHandler */ + nodeAccessor] = valueChange;
686
677
  if (valueChange) {
687
678
  scope["ControlledType:" /* ControlledType */ + nodeAccessor] = 3 /* SelectValue */;
688
- scope["ControlledValue:" /* ControlledValue */ + nodeAccessor] = value2;
679
+ scope["ControlledValue:" /* ControlledValue */ + nodeAccessor] = value;
689
680
  } else {
690
681
  scope["ControlledType:" /* ControlledType */ + nodeAccessor] = 5 /* None */;
691
682
  }
692
683
  pendingEffects.unshift(
693
684
  () => setSelectOptions(
694
685
  scope[nodeAccessor],
695
- value2,
686
+ value,
696
687
  valueChange
697
688
  ),
698
689
  scope
699
690
  );
700
691
  }
701
- function controllable_select_value_effect(scope, nodeAccessor) {
692
+ function _attr_select_value_script(scope, nodeAccessor) {
702
693
  const el = scope[nodeAccessor];
703
694
  const onChange = () => {
704
695
  const valueChange = scope["ControlledHandler:" /* ControlledHandler */ + nodeAccessor];
@@ -717,8 +708,8 @@ function controllable_select_value_effect(scope, nodeAccessor) {
717
708
  };
718
709
  if (!el._) {
719
710
  new MutationObserver(() => {
720
- const value2 = scope["ControlledValue:" /* ControlledValue */ + nodeAccessor];
721
- if (Array.isArray(value2) ? value2.length !== el.selectedOptions.length || value2.some((value3, i) => value3 != el.selectedOptions[i].value) : el.value != value2) {
711
+ const value = scope["ControlledValue:" /* ControlledValue */ + nodeAccessor];
712
+ if (Array.isArray(value) ? value.length !== el.selectedOptions.length || value.some((value2, i) => value2 != el.selectedOptions[i].value) : el.value != value) {
722
713
  onChange();
723
714
  }
724
715
  }).observe(el, {
@@ -728,10 +719,10 @@ function controllable_select_value_effect(scope, nodeAccessor) {
728
719
  }
729
720
  syncControllable(el, "input", hasSelectChanged, onChange);
730
721
  }
731
- function setSelectOptions(el, value2, valueChange) {
732
- if (Array.isArray(value2)) {
722
+ function setSelectOptions(el, value, valueChange) {
723
+ if (Array.isArray(value)) {
733
724
  for (const opt of el.options) {
734
- const selected = value2.includes(opt.value);
725
+ const selected = value.includes(opt.value);
735
726
  if (valueChange) {
736
727
  opt.selected = selected;
737
728
  } else {
@@ -739,7 +730,7 @@ function setSelectOptions(el, value2, valueChange) {
739
730
  }
740
731
  }
741
732
  } else {
742
- const normalizedValue = normalizeStrProp(value2);
733
+ const normalizedValue = normalizeStrProp(value);
743
734
  if (valueChange) {
744
735
  el.value = normalizedValue;
745
736
  } else {
@@ -749,7 +740,7 @@ function setSelectOptions(el, value2, valueChange) {
749
740
  }
750
741
  }
751
742
  }
752
- function controllable_detailsOrDialog_open(scope, nodeAccessor, open, openChange) {
743
+ function _attr_details_or_dialog_open(scope, nodeAccessor, open, openChange) {
753
744
  scope["ControlledHandler:" /* ControlledHandler */ + nodeAccessor] = openChange;
754
745
  if (openChange) {
755
746
  scope["ControlledType:" /* ControlledType */ + nodeAccessor] = 4 /* DetailsOrDialogOpen */;
@@ -758,7 +749,7 @@ function controllable_detailsOrDialog_open(scope, nodeAccessor, open, openChange
758
749
  }
759
750
  scope[nodeAccessor].open = scope["ControlledValue:" /* ControlledValue */ + nodeAccessor] = normalizeBoolProp(open);
760
751
  }
761
- function controllable_detailsOrDialog_open_effect(scope, nodeAccessor) {
752
+ function _attr_details_or_dialog_open_script(scope, nodeAccessor) {
762
753
  const el = scope[nodeAccessor];
763
754
  const hasChanged = () => el.open !== scope["ControlledValue:" /* ControlledValue */ + nodeAccessor];
764
755
  syncControllable(
@@ -777,13 +768,13 @@ function controllable_detailsOrDialog_open_effect(scope, nodeAccessor) {
777
768
  );
778
769
  }
779
770
  var inputType = "";
780
- function setValueAndUpdateSelection(el, value2) {
781
- if (el.value !== value2) {
771
+ function setValueAndUpdateSelection(el, value) {
772
+ if (el.value !== value) {
782
773
  const updatedPosition = resolveCursorPosition(
783
774
  inputType,
784
775
  el.getRootNode().activeElement === el && el.selectionStart,
785
776
  el.value,
786
- el.value = value2
777
+ el.value = value
787
778
  );
788
779
  if (~updatedPosition) {
789
780
  el.setSelectionRange(updatedPosition, updatedPosition);
@@ -847,11 +838,11 @@ function hasSelectChanged(el) {
847
838
  function hasFormElementChanged(el) {
848
839
  return el.options ? hasSelectChanged(el) : hasValueChanged(el) || hasCheckboxChanged(el);
849
840
  }
850
- function normalizeStrProp(value2) {
851
- return normalizeAttrValue(value2) || "";
841
+ function normalizeStrProp(value) {
842
+ return normalizeAttrValue(value) || "";
852
843
  }
853
- function normalizeBoolProp(value2) {
854
- return value2 != null && value2 !== false;
844
+ function normalizeBoolProp(value) {
845
+ return value != null && value !== false;
855
846
  }
856
847
  function updateList(arr, val, push) {
857
848
  const index = arr.indexOf(val);
@@ -863,9 +854,9 @@ function toValueProp(it) {
863
854
 
864
855
  // src/dom/parse-html.ts
865
856
  var parsers = {};
866
- function parseHTML(html2, ns) {
857
+ function parseHTML(html, ns) {
867
858
  const parser = parsers[ns] ||= document.createElementNS(ns, "template");
868
- parser.innerHTML = html2;
859
+ parser.innerHTML = html;
869
860
  return parser.content || parser;
870
861
  }
871
862
 
@@ -913,7 +904,7 @@ function triggerMacroTask() {
913
904
  }
914
905
 
915
906
  // src/dom/signals.ts
916
- function state(valueAccessor, fn) {
907
+ function _let(valueAccessor, fn) {
917
908
  if (true) {
918
909
  var id = +valueAccessor.slice(
919
910
  valueAccessor.lastIndexOf("/") + 1
@@ -924,42 +915,42 @@ function state(valueAccessor, fn) {
924
915
  );
925
916
  }
926
917
  const valueChangeAccessor = "TagVariableChange:" /* TagVariableChange */ + valueAccessor;
927
- const update = (scope, value2) => {
928
- if (scope[valueAccessor] !== value2) {
929
- scope[valueAccessor] = value2;
930
- fn(scope, value2);
918
+ const update = (scope, value) => {
919
+ if (scope[valueAccessor] !== value) {
920
+ scope[valueAccessor] = value;
921
+ fn(scope, value);
931
922
  }
932
923
  };
933
- return (scope, value2, valueChange) => {
924
+ return (scope, value, valueChange) => {
934
925
  if (rendering) {
935
- if ((scope[valueChangeAccessor] = valueChange) && scope[valueAccessor] !== value2 || !(valueAccessor in scope)) {
936
- scope[valueAccessor] = value2;
937
- fn(scope, value2);
926
+ if ((scope[valueChangeAccessor] = valueChange) && scope[valueAccessor] !== value || !(valueAccessor in scope)) {
927
+ scope[valueAccessor] = value;
928
+ fn(scope, value);
938
929
  }
939
930
  } else if (scope[valueChangeAccessor]) {
940
- scope[valueChangeAccessor](value2);
931
+ scope[valueChangeAccessor](value);
941
932
  } else {
942
933
  schedule();
943
934
  queueRender(
944
935
  scope,
945
936
  update,
946
937
  true ? id : valueAccessor,
947
- value2
938
+ value
948
939
  );
949
940
  }
950
- return value2;
941
+ return value;
951
942
  };
952
943
  }
953
- function value(valueAccessor, fn = () => {
944
+ function _const(valueAccessor, fn = () => {
954
945
  }) {
955
- return (scope, value2) => {
956
- if (!(valueAccessor in scope) || scope[valueAccessor] !== value2) {
957
- scope[valueAccessor] = value2;
958
- fn(scope, value2);
946
+ return (scope, value) => {
947
+ if (!(valueAccessor in scope) || scope[valueAccessor] !== value) {
948
+ scope[valueAccessor] = value;
949
+ fn(scope, value);
959
950
  }
960
951
  };
961
952
  }
962
- function intersection(id, fn, defaultPending = 1, scopeIdAccessor = /* @__KEY__ */ "___id") {
953
+ function _or(id, fn, defaultPending = 1, scopeIdAccessor = /* @__KEY__ */ "___id") {
963
954
  return (scope) => {
964
955
  if (scope.___creating) {
965
956
  if (scope[id] === void 0) {
@@ -972,7 +963,7 @@ function intersection(id, fn, defaultPending = 1, scopeIdAccessor = /* @__KEY__
972
963
  }
973
964
  };
974
965
  }
975
- function loopClosure(valueAccessor, ownerLoopNodeAccessor, fn) {
966
+ function _for_closure(valueAccessor, ownerLoopNodeAccessor, fn) {
976
967
  const childSignal = closure(valueAccessor, fn);
977
968
  const loopScopeAccessor = "LoopScopeArray:" /* LoopScopeArray */ + ownerLoopNodeAccessor;
978
969
  const loopScopeMapAccessor = "LoopScopeMap:" /* LoopScopeMap */ + ownerLoopNodeAccessor;
@@ -998,7 +989,7 @@ function loopClosure(valueAccessor, ownerLoopNodeAccessor, fn) {
998
989
  ownerSignal._ = childSignal;
999
990
  return ownerSignal;
1000
991
  }
1001
- function conditionalClosure(valueAccessor, ownerConditionalNodeAccessor, branch, fn) {
992
+ function _if_closure(valueAccessor, ownerConditionalNodeAccessor, branch, fn) {
1002
993
  const childSignal = closure(valueAccessor, fn);
1003
994
  const scopeAccessor = "ConditionalScope:" /* ConditionalScope */ + ownerConditionalNodeAccessor;
1004
995
  const branchAccessor = "ConditionalRenderer:" /* ConditionalRenderer */ + ownerConditionalNodeAccessor;
@@ -1015,13 +1006,13 @@ function subscribeToScopeSet(ownerScope, accessor, scope) {
1015
1006
  const subscribers = ownerScope[accessor] ||= /* @__PURE__ */ new Set();
1016
1007
  if (!subscribers.has(scope)) {
1017
1008
  subscribers.add(scope);
1018
- getAbortSignal(scope, -1).addEventListener(
1009
+ $signal(scope, -1).addEventListener(
1019
1010
  "abort",
1020
1011
  () => ownerScope[accessor].delete(scope)
1021
1012
  );
1022
1013
  }
1023
1014
  }
1024
- function dynamicClosure(...closureSignals) {
1015
+ function _closure(...closureSignals) {
1025
1016
  const [{ ___scopeInstancesAccessor, ___signalIndexAccessor }] = closureSignals;
1026
1017
  for (let i = closureSignals.length; i--; ) {
1027
1018
  closureSignals[i].___index = i;
@@ -1040,7 +1031,7 @@ function dynamicClosure(...closureSignals) {
1040
1031
  }
1041
1032
  };
1042
1033
  }
1043
- function dynamicClosureRead(valueAccessor, fn, getOwnerScope) {
1034
+ function _closure_get(valueAccessor, fn, getOwnerScope) {
1044
1035
  const childSignal = closure(valueAccessor, fn, getOwnerScope);
1045
1036
  const closureSignal = ((scope) => {
1046
1037
  scope[closureSignal.___signalIndexAccessor] = closureSignal.___index;
@@ -1063,22 +1054,22 @@ function closure(valueAccessor, fn, getOwnerScope) {
1063
1054
  );
1064
1055
  };
1065
1056
  }
1066
- function setTagVar(scope, childAccessor, tagVarSignal2) {
1067
- scope[childAccessor]["#TagVariable" /* TagVariable */] = (value2) => tagVarSignal2(scope, value2);
1057
+ function _var(scope, childAccessor, signal) {
1058
+ scope[childAccessor]["#TagVariable" /* TagVariable */] = (value) => signal(scope, value);
1068
1059
  }
1069
- var tagVarSignal = (scope, value2) => scope["#TagVariable" /* TagVariable */]?.(value2);
1070
- function setTagVarChange(scope, changeHandler) {
1060
+ var _return = (scope, value) => scope["#TagVariable" /* TagVariable */]?.(value);
1061
+ function _return_change(scope, changeHandler) {
1071
1062
  scope["#TagVariableChange" /* TagVariableChange */] = changeHandler;
1072
1063
  }
1073
- var tagVarSignalChange = (scope, value2) => scope["#TagVariableChange" /* TagVariableChange */]?.(value2);
1064
+ var _var_change = (scope, value) => scope["#TagVariableChange" /* TagVariableChange */]?.(value);
1074
1065
  var tagIdsByGlobal = /* @__PURE__ */ new WeakMap();
1075
- function nextTagId({ $global }) {
1066
+ function _id({ $global }) {
1076
1067
  const id = tagIdsByGlobal.get($global) || 0;
1077
1068
  tagIdsByGlobal.set($global, id + 1);
1078
1069
  return "c" + $global.runtimeId + $global.renderId + id.toString(36);
1079
1070
  }
1080
- function effect(id, fn) {
1081
- register(id, fn);
1071
+ function _script(id, fn) {
1072
+ _resume(id, fn);
1082
1073
  return (scope) => {
1083
1074
  queueEffect(scope, fn);
1084
1075
  };
@@ -1096,7 +1087,7 @@ function* traverseAllHoisted(scope, path, curIndex = path.length - 1) {
1096
1087
  }
1097
1088
  }
1098
1089
  }
1099
- function hoist(...path) {
1090
+ function _hoist(...path) {
1100
1091
  return (scope) => {
1101
1092
  const getOne = (...args) => iterator().next().value(...args);
1102
1093
  const iterator = getOne[Symbol.iterator] = () => traverseAllHoisted(scope, path);
@@ -1135,7 +1126,7 @@ function setupBranch(renderer, branch) {
1135
1126
  }
1136
1127
  return branch;
1137
1128
  }
1138
- function createContent(id, template, walks, setup, params, dynamicScopesAccessor) {
1129
+ function _content(id, template, walks, setup, params, dynamicScopesAccessor) {
1139
1130
  walks = walks ? walks.replace(/[^\0-1]+$/, "") : "";
1140
1131
  setup = setup ? setup._ || setup : void 0;
1141
1132
  params ||= void 0;
@@ -1162,16 +1153,16 @@ function createContent(id, template, walks, setup, params, dynamicScopesAccessor
1162
1153
  };
1163
1154
  };
1164
1155
  }
1165
- function registerContent(id, template, walks, setup, params, dynamicScopesAccessor) {
1166
- return register(
1156
+ function _content_resume(id, template, walks, setup, params, dynamicScopesAccessor) {
1157
+ return _resume(
1167
1158
  id,
1168
- createContent(id, template, walks, setup, params, dynamicScopesAccessor)
1159
+ _content(id, template, walks, setup, params, dynamicScopesAccessor)
1169
1160
  );
1170
1161
  }
1171
- function localClosures(renderer, closureFns) {
1162
+ function _content_closures(renderer, closureFns) {
1172
1163
  const closureSignals = {};
1173
1164
  for (const key in closureFns) {
1174
- closureSignals[key] = value(key, closureFns[key]);
1165
+ closureSignals[key] = _const(key, closureFns[key]);
1175
1166
  }
1176
1167
  return (owner, closureValues) => {
1177
1168
  const instance = renderer(owner);
@@ -1180,12 +1171,12 @@ function localClosures(renderer, closureFns) {
1180
1171
  return instance;
1181
1172
  };
1182
1173
  }
1183
- function createRenderer(template, walks, setup, params) {
1184
- return createContent("", template, walks, setup, params)();
1174
+ function _content_branch(template, walks, setup, params) {
1175
+ return _content("", template, walks, setup, params)();
1185
1176
  }
1186
1177
  var cloneCache = {};
1187
- function createCloneableHTML(html2, ns) {
1188
- const { firstChild, lastChild } = parseHTML(html2, ns);
1178
+ function createCloneableHTML(html, ns) {
1179
+ const { firstChild, lastChild } = parseHTML(html, ns);
1189
1180
  const parent = document.createElementNS(ns, "t");
1190
1181
  insertChildNodes(parent, null, firstChild, lastChild);
1191
1182
  return firstChild === lastChild && firstChild.nodeType < 8 /* Comment */ ? (branch, walks) => {
@@ -1203,53 +1194,53 @@ function createCloneableHTML(html2, ns) {
1203
1194
  }
1204
1195
 
1205
1196
  // src/dom/dom.ts
1206
- function attr(element, name, value2) {
1207
- setAttribute(element, name, normalizeAttrValue(value2));
1197
+ function _attr(element, name, value) {
1198
+ setAttribute(element, name, normalizeAttrValue(value));
1208
1199
  }
1209
- function setAttribute(element, name, value2) {
1210
- if (element.getAttribute(name) != value2) {
1211
- if (value2 === void 0) {
1200
+ function setAttribute(element, name, value) {
1201
+ if (element.getAttribute(name) != value) {
1202
+ if (value === void 0) {
1212
1203
  element.removeAttribute(name);
1213
1204
  } else {
1214
- element.setAttribute(name, value2);
1205
+ element.setAttribute(name, value);
1215
1206
  }
1216
1207
  }
1217
1208
  }
1218
- function classAttr(element, value2) {
1219
- setAttribute(element, "class", classValue(value2) || void 0);
1209
+ function _attr_class(element, value) {
1210
+ setAttribute(element, "class", classValue(value) || void 0);
1220
1211
  }
1221
- function classItems(element, items) {
1212
+ function _attr_class_items(element, items) {
1222
1213
  for (const key in items) {
1223
- classItem(element, key, items[key]);
1214
+ _attr_class_item(element, key, items[key]);
1224
1215
  }
1225
1216
  }
1226
- function classItem(element, name, value2) {
1227
- element.classList.toggle(name, !!value2);
1217
+ function _attr_class_item(element, name, value) {
1218
+ element.classList.toggle(name, !!value);
1228
1219
  }
1229
- function styleAttr(element, value2) {
1230
- setAttribute(element, "style", styleValue(value2) || void 0);
1220
+ function _attr_style(element, value) {
1221
+ setAttribute(element, "style", styleValue(value) || void 0);
1231
1222
  }
1232
- function styleItems(element, items) {
1223
+ function _attr_style_items(element, items) {
1233
1224
  for (const key in items) {
1234
- styleItem(element, key, items[key]);
1225
+ _attr_style_item(element, key, items[key]);
1235
1226
  }
1236
1227
  }
1237
- function styleItem(element, name, value2) {
1238
- element.style.setProperty(name, value2 || value2 === 0 ? value2 + "" : "");
1228
+ function _attr_style_item(element, name, value) {
1229
+ element.style.setProperty(name, value || value === 0 ? value + "" : "");
1239
1230
  }
1240
- function data(node, value2) {
1241
- const normalizedValue = normalizeString(value2);
1231
+ function _text(node, value) {
1232
+ const normalizedValue = normalizeString(value);
1242
1233
  if (node.data !== normalizedValue) {
1243
1234
  node.data = normalizedValue;
1244
1235
  }
1245
1236
  }
1246
- function textContent(node, value2) {
1247
- const normalizedValue = normalizeString(value2);
1237
+ function _text_content(node, value) {
1238
+ const normalizedValue = normalizeString(value);
1248
1239
  if (node.textContent !== normalizedValue) {
1249
1240
  node.textContent = normalizedValue;
1250
1241
  }
1251
1242
  }
1252
- function attrs(scope, nodeAccessor, nextAttrs) {
1243
+ function _attrs(scope, nodeAccessor, nextAttrs) {
1253
1244
  const el = scope[nodeAccessor];
1254
1245
  for (let i = el.attributes.length; i--; ) {
1255
1246
  const { name } = el.attributes.item(i);
@@ -1259,14 +1250,14 @@ function attrs(scope, nodeAccessor, nextAttrs) {
1259
1250
  }
1260
1251
  attrsInternal(scope, nodeAccessor, nextAttrs);
1261
1252
  }
1262
- function attrsAndContent(scope, nodeAccessor, nextAttrs) {
1263
- attrs(scope, nodeAccessor, nextAttrs);
1264
- insertContent(scope, nodeAccessor, nextAttrs?.content);
1253
+ function _attrs_content(scope, nodeAccessor, nextAttrs) {
1254
+ _attrs(scope, nodeAccessor, nextAttrs);
1255
+ _attr_content(scope, nodeAccessor, nextAttrs?.content);
1265
1256
  }
1266
- function hasAttrAlias(element, attr2, nextAttrs) {
1267
- return attr2 === "checked" && element.tagName === "INPUT" && "checkedValue" in nextAttrs;
1257
+ function hasAttrAlias(element, attr, nextAttrs) {
1258
+ return attr === "checked" && element.tagName === "INPUT" && "checkedValue" in nextAttrs;
1268
1259
  }
1269
- function partialAttrs(scope, nodeAccessor, nextAttrs, skip) {
1260
+ function _attrs_partial(scope, nodeAccessor, nextAttrs, skip) {
1270
1261
  const el = scope[nodeAccessor];
1271
1262
  const partial = {};
1272
1263
  for (let i = el.attributes.length; i--; ) {
@@ -1280,9 +1271,9 @@ function partialAttrs(scope, nodeAccessor, nextAttrs, skip) {
1280
1271
  }
1281
1272
  attrsInternal(scope, nodeAccessor, partial);
1282
1273
  }
1283
- function partialAttrsAndContent(scope, nodeAccessor, nextAttrs, skip) {
1284
- partialAttrs(scope, nodeAccessor, nextAttrs, skip);
1285
- insertContent(scope, nodeAccessor, nextAttrs?.content);
1274
+ function _attrs_partial_content(scope, nodeAccessor, nextAttrs, skip) {
1275
+ _attrs_partial(scope, nodeAccessor, nextAttrs, skip);
1276
+ _attr_content(scope, nodeAccessor, nextAttrs?.content);
1286
1277
  }
1287
1278
  function attrsInternal(scope, nodeAccessor, nextAttrs) {
1288
1279
  const el = scope[nodeAccessor];
@@ -1291,14 +1282,14 @@ function attrsInternal(scope, nodeAccessor, nextAttrs) {
1291
1282
  switch (el.tagName) {
1292
1283
  case "INPUT":
1293
1284
  if ("checked" in nextAttrs || "checkedChange" in nextAttrs) {
1294
- controllable_input_checked(
1285
+ _attr_input_checked(
1295
1286
  scope,
1296
1287
  nodeAccessor,
1297
1288
  nextAttrs.checked,
1298
1289
  nextAttrs.checkedChange
1299
1290
  );
1300
1291
  } else if ("checkedValue" in nextAttrs || "checkedValueChange" in nextAttrs) {
1301
- controllable_input_checkedValue(
1292
+ _attr_input_checkedValue(
1302
1293
  scope,
1303
1294
  nodeAccessor,
1304
1295
  nextAttrs.checkedValue,
@@ -1306,7 +1297,7 @@ function attrsInternal(scope, nodeAccessor, nextAttrs) {
1306
1297
  nextAttrs.value
1307
1298
  );
1308
1299
  } else if ("value" in nextAttrs || "valueChange" in nextAttrs) {
1309
- controllable_input_value(
1300
+ _attr_input_value(
1310
1301
  scope,
1311
1302
  nodeAccessor,
1312
1303
  nextAttrs.value,
@@ -1319,7 +1310,7 @@ function attrsInternal(scope, nodeAccessor, nextAttrs) {
1319
1310
  break;
1320
1311
  case "SELECT":
1321
1312
  if ("value" in nextAttrs || "valueChange" in nextAttrs) {
1322
- controllable_select_value(
1313
+ _attr_select_value(
1323
1314
  scope,
1324
1315
  nodeAccessor,
1325
1316
  nextAttrs.value,
@@ -1330,7 +1321,7 @@ function attrsInternal(scope, nodeAccessor, nextAttrs) {
1330
1321
  break;
1331
1322
  case "TEXTAREA":
1332
1323
  if ("value" in nextAttrs || "valueChange" in nextAttrs) {
1333
- controllable_input_value(
1324
+ _attr_input_value(
1334
1325
  scope,
1335
1326
  nodeAccessor,
1336
1327
  nextAttrs.value,
@@ -1342,7 +1333,7 @@ function attrsInternal(scope, nodeAccessor, nextAttrs) {
1342
1333
  case "DETAILS":
1343
1334
  case "DIALOG":
1344
1335
  if ("open" in nextAttrs || "openChange" in nextAttrs) {
1345
- controllable_detailsOrDialog_open(
1336
+ _attr_details_or_dialog_open(
1346
1337
  scope,
1347
1338
  nodeAccessor,
1348
1339
  nextAttrs.open,
@@ -1353,27 +1344,27 @@ function attrsInternal(scope, nodeAccessor, nextAttrs) {
1353
1344
  break;
1354
1345
  }
1355
1346
  for (const name in nextAttrs) {
1356
- const value2 = nextAttrs[name];
1347
+ const value = nextAttrs[name];
1357
1348
  switch (name) {
1358
1349
  case "class":
1359
- classAttr(el, value2);
1350
+ _attr_class(el, value);
1360
1351
  break;
1361
1352
  case "style":
1362
- styleAttr(el, value2);
1353
+ _attr_style(el, value);
1363
1354
  break;
1364
1355
  default: {
1365
1356
  if (isEventHandler(name)) {
1366
- (events ||= scope["EventAttributes:" /* EventAttributes */ + nodeAccessor] = {})[getEventHandlerName(name)] = value2;
1357
+ (events ||= scope["EventAttributes:" /* EventAttributes */ + nodeAccessor] = {})[getEventHandlerName(name)] = value;
1367
1358
  } else if (!(skip?.test(name) || name === "content" && el.tagName !== "META")) {
1368
- attr(el, name, value2);
1359
+ _attr(el, name, value);
1369
1360
  }
1370
1361
  break;
1371
1362
  }
1372
1363
  }
1373
1364
  }
1374
1365
  }
1375
- function insertContent(scope, nodeAccessor, value2) {
1376
- const content = normalizeClientRender(value2);
1366
+ function _attr_content(scope, nodeAccessor, value) {
1367
+ const content = normalizeClientRender(value);
1377
1368
  const rendererAccessor = "ConditionalRenderer:" /* ConditionalRenderer */ + nodeAccessor;
1378
1369
  if (scope[rendererAccessor] !== (scope[rendererAccessor] = content?.___id)) {
1379
1370
  setConditionalRenderer(scope, nodeAccessor, content, createAndSetupBranch);
@@ -1386,36 +1377,36 @@ function insertContent(scope, nodeAccessor, value2) {
1386
1377
  }
1387
1378
  }
1388
1379
  }
1389
- function attrsEvents(scope, nodeAccessor) {
1380
+ function _attrs_script(scope, nodeAccessor) {
1390
1381
  const el = scope[nodeAccessor];
1391
1382
  const events = scope["EventAttributes:" /* EventAttributes */ + nodeAccessor];
1392
1383
  switch (scope["ControlledType:" /* ControlledType */ + nodeAccessor]) {
1393
1384
  case 0 /* InputChecked */:
1394
- controllable_input_checked_effect(scope, nodeAccessor);
1385
+ _attr_input_checked_script(scope, nodeAccessor);
1395
1386
  break;
1396
1387
  case 1 /* InputCheckedValue */:
1397
- controllable_input_checkedValue_effect(scope, nodeAccessor);
1388
+ _attr_input_checkedValue_script(scope, nodeAccessor);
1398
1389
  break;
1399
1390
  case 2 /* InputValue */:
1400
- controllable_input_value_effect(scope, nodeAccessor);
1391
+ _attr_input_value_script(scope, nodeAccessor);
1401
1392
  break;
1402
1393
  case 3 /* SelectValue */:
1403
- controllable_select_value_effect(scope, nodeAccessor);
1394
+ _attr_select_value_script(scope, nodeAccessor);
1404
1395
  break;
1405
1396
  case 4 /* DetailsOrDialogOpen */:
1406
- controllable_detailsOrDialog_open_effect(scope, nodeAccessor);
1397
+ _attr_details_or_dialog_open_script(scope, nodeAccessor);
1407
1398
  break;
1408
1399
  }
1409
1400
  for (const name in events) {
1410
- on(el, name, events[name]);
1401
+ _on(el, name, events[name]);
1411
1402
  }
1412
1403
  }
1413
- function html(scope, value2, accessor) {
1404
+ function _html(scope, value, accessor) {
1414
1405
  const firstChild = scope[accessor];
1415
1406
  const parentNode = firstChild.parentNode;
1416
1407
  const lastChild = scope["DynamicPlaceholderLastChild:" /* DynamicPlaceholderLastChild */ + accessor] || firstChild;
1417
1408
  const newContent = parseHTML(
1418
- value2 || value2 === 0 ? value2 + "" : "",
1409
+ value || value === 0 ? value + "" : "",
1419
1410
  parentNode.namespaceURI
1420
1411
  );
1421
1412
  insertChildNodes(
@@ -1426,43 +1417,27 @@ function html(scope, value2, accessor) {
1426
1417
  );
1427
1418
  removeChildNodes(firstChild, lastChild);
1428
1419
  }
1429
- function normalizeClientRender(value2) {
1430
- const renderer = normalizeDynamicRenderer(value2);
1420
+ function normalizeClientRender(value) {
1421
+ const renderer = normalizeDynamicRenderer(value);
1431
1422
  if (renderer) {
1432
1423
  if (renderer.___id) {
1433
1424
  return renderer;
1434
1425
  } else if (true) {
1435
1426
  throw new Error(
1436
- `Invalid \`content\` attribute. Received ${typeof value2}`
1427
+ `Invalid \`content\` attribute. Received ${typeof value}`
1437
1428
  );
1438
1429
  }
1439
1430
  }
1440
1431
  }
1441
- function props(scope, nodeIndex, index) {
1442
- const nextProps = scope[index];
1443
- const prevProps = scope[index + "-"];
1444
- const node = scope[nodeIndex];
1445
- if (prevProps) {
1446
- for (const name in prevProps) {
1447
- if (!(name in nextProps)) {
1448
- node[name] = void 0;
1449
- }
1450
- }
1451
- }
1452
- for (const name in nextProps) {
1453
- node[name] = nextProps[name];
1432
+ function normalizeAttrValue(value) {
1433
+ if (value || value === 0) {
1434
+ return value === true ? "" : value + "";
1454
1435
  }
1455
- scope[index + "-"] = nextProps;
1456
1436
  }
1457
- function normalizeAttrValue(value2) {
1458
- if (value2 || value2 === 0) {
1459
- return value2 === true ? "" : value2 + "";
1460
- }
1437
+ function normalizeString(value) {
1438
+ return value || value === 0 ? value + "" : "\u200D";
1461
1439
  }
1462
- function normalizeString(value2) {
1463
- return value2 || value2 === 0 ? value2 + "" : "\u200D";
1464
- }
1465
- function lifecycle(scope, index, thisObj) {
1440
+ function _lifecycle(scope, index, thisObj) {
1466
1441
  const instance = scope[index];
1467
1442
  if (instance) {
1468
1443
  Object.assign(instance, thisObj);
@@ -1470,10 +1445,7 @@ function lifecycle(scope, index, thisObj) {
1470
1445
  } else {
1471
1446
  scope[index] = thisObj;
1472
1447
  thisObj.onMount?.();
1473
- getAbortSignal(
1474
- scope,
1475
- "LifecycleAbortController:" /* LifecycleAbortController */ + index
1476
- ).onabort = () => thisObj.onDestroy?.();
1448
+ $signal(scope, "LifecycleAbortController:" /* LifecycleAbortController */ + index).onabort = () => thisObj.onDestroy?.();
1477
1449
  }
1478
1450
  }
1479
1451
  function removeChildNodes(startNode, endNode) {
@@ -1668,7 +1640,7 @@ function longestIncreasingSubsequence(a) {
1668
1640
  }
1669
1641
 
1670
1642
  // src/dom/control-flow.ts
1671
- function awaitTag(nodeAccessor, renderer) {
1643
+ function _await(nodeAccessor, renderer) {
1672
1644
  const promiseAccessor = "Promise:" /* Promise */ + nodeAccessor;
1673
1645
  const branchAccessor = "ConditionalScope:" /* ConditionalScope */ + nodeAccessor;
1674
1646
  return (scope, promise) => {
@@ -1713,7 +1685,7 @@ function awaitTag(nodeAccessor, renderer) {
1713
1685
  tempDetachBranch(awaitBranch);
1714
1686
  }
1715
1687
  const thisPromise = scope[promiseAccessor] = promise.then(
1716
- (data2) => {
1688
+ (data) => {
1717
1689
  if (thisPromise === scope[promiseAccessor]) {
1718
1690
  scope[promiseAccessor] = 0;
1719
1691
  schedule();
@@ -1739,7 +1711,7 @@ function awaitTag(nodeAccessor, renderer) {
1739
1711
  );
1740
1712
  referenceNode.remove();
1741
1713
  }
1742
- renderer.___params?.(awaitBranch, [data2]);
1714
+ renderer.___params?.(awaitBranch, [data]);
1743
1715
  if (tryWithPlaceholder) {
1744
1716
  placeholderShown.add(pendingEffects);
1745
1717
  if (!--tryWithPlaceholder.___pendingAsyncCount) {
@@ -1773,14 +1745,14 @@ function awaitTag(nodeAccessor, renderer) {
1773
1745
  );
1774
1746
  };
1775
1747
  }
1776
- function createTry(nodeAccessor, tryContent) {
1748
+ function _try(nodeAccessor, content) {
1777
1749
  const branchAccessor = "ConditionalScope:" /* ConditionalScope */ + nodeAccessor;
1778
1750
  return (scope, input) => {
1779
1751
  if (!scope[branchAccessor]) {
1780
1752
  setConditionalRenderer(
1781
1753
  scope,
1782
1754
  nodeAccessor,
1783
- tryContent,
1755
+ content,
1784
1756
  createAndSetupBranch
1785
1757
  );
1786
1758
  }
@@ -1819,7 +1791,7 @@ function renderCatch(scope, error) {
1819
1791
  );
1820
1792
  }
1821
1793
  }
1822
- function conditional(nodeAccessor, ...branches) {
1794
+ function _if(nodeAccessor, ...branches) {
1823
1795
  const branchAccessor = "ConditionalRenderer:" /* ConditionalRenderer */ + nodeAccessor;
1824
1796
  enableBranches();
1825
1797
  return (scope, newBranch) => {
@@ -1834,9 +1806,9 @@ function conditional(nodeAccessor, ...branches) {
1834
1806
  };
1835
1807
  }
1836
1808
  function patchDynamicTag(fn) {
1837
- dynamicTag = fn(dynamicTag);
1809
+ _dynamic_tag = fn(_dynamic_tag);
1838
1810
  }
1839
- var dynamicTag = function dynamicTag2(nodeAccessor, getContent, getTagVar, inputIsArgs) {
1811
+ var _dynamic_tag = function dynamicTag(nodeAccessor, getContent, getTagVar, inputIsArgs) {
1840
1812
  const childScopeAccessor = "ConditionalScope:" /* ConditionalScope */ + nodeAccessor;
1841
1813
  const rendererAccessor = "ConditionalRenderer:" /* ConditionalRenderer */ + nodeAccessor;
1842
1814
  enableBranches();
@@ -1850,7 +1822,7 @@ var dynamicTag = function dynamicTag2(nodeAccessor, getContent, getTagVar, input
1850
1822
  createBranchWithTagNameOrRenderer
1851
1823
  );
1852
1824
  if (getTagVar) {
1853
- setTagVar(scope, childScopeAccessor, getTagVar());
1825
+ _var(scope, childScopeAccessor, getTagVar());
1854
1826
  }
1855
1827
  if (typeof normalizedRenderer === "string") {
1856
1828
  if (getContent) {
@@ -1881,7 +1853,7 @@ var dynamicTag = function dynamicTag2(nodeAccessor, getContent, getTagVar, input
1881
1853
  const childScope = scope[childScopeAccessor];
1882
1854
  const args = getInput?.();
1883
1855
  if (typeof normalizedRenderer === "string") {
1884
- (getContent ? attrs : attrsAndContent)(
1856
+ (getContent ? _attrs : _attrs_content)(
1885
1857
  childScope,
1886
1858
  true ? `#${normalizedRenderer}/0` : 0,
1887
1859
  (inputIsArgs ? args[0] : args) || {}
@@ -1936,7 +1908,7 @@ function setConditionalRenderer(scope, nodeAccessor, newRenderer, createBranch2)
1936
1908
  referenceNode.remove();
1937
1909
  }
1938
1910
  }
1939
- function loopOf(nodeAccessor, renderer) {
1911
+ function _for_of(nodeAccessor, renderer) {
1940
1912
  return loop(
1941
1913
  nodeAccessor,
1942
1914
  renderer,
@@ -1952,14 +1924,14 @@ function loopOf(nodeAccessor, renderer) {
1952
1924
  }
1953
1925
  );
1954
1926
  }
1955
- function loopIn(nodeAccessor, renderer) {
1927
+ function _for_in(nodeAccessor, renderer) {
1956
1928
  return loop(
1957
1929
  nodeAccessor,
1958
1930
  renderer,
1959
- ([obj, by = byFirstArg], cb) => forIn(obj, (key, value2) => cb(by(key, value2), [key, value2]))
1931
+ ([obj, by = byFirstArg], cb) => forIn(obj, (key, value) => cb(by(key, value), [key, value]))
1960
1932
  );
1961
1933
  }
1962
- function loopTo(nodeAccessor, renderer) {
1934
+ function _for_to(nodeAccessor, renderer) {
1963
1935
  return loop(
1964
1936
  nodeAccessor,
1965
1937
  renderer,
@@ -1969,7 +1941,7 @@ function loopTo(nodeAccessor, renderer) {
1969
1941
  function loop(nodeAccessor, renderer, forEach) {
1970
1942
  const params = renderer.___params;
1971
1943
  enableBranches();
1972
- return (scope, value2) => {
1944
+ return (scope, value) => {
1973
1945
  const referenceNode = scope[nodeAccessor];
1974
1946
  const oldMap = scope["LoopScopeMap:" /* LoopScopeMap */ + nodeAccessor];
1975
1947
  const oldArray = oldMap ? scope["LoopScopeArray:" /* LoopScopeArray */ + nodeAccessor] || [
@@ -1978,7 +1950,7 @@ function loop(nodeAccessor, renderer, forEach) {
1978
1950
  const parentNode = referenceNode.nodeType > 1 /* Element */ ? referenceNode.parentNode || oldArray[0].___startNode.parentNode : referenceNode;
1979
1951
  const newMap = scope["LoopScopeMap:" /* LoopScopeMap */ + nodeAccessor] = /* @__PURE__ */ new Map();
1980
1952
  const newArray = scope["LoopScopeArray:" /* LoopScopeArray */ + nodeAccessor] = [];
1981
- forEach(value2, (key, args) => {
1953
+ forEach(value, (key, args) => {
1982
1954
  const branch = oldMap?.get(key) || createAndSetupBranch(scope.$global, renderer, scope, parentNode);
1983
1955
  params?.(branch, args);
1984
1956
  newMap.set(key, branch);
@@ -2032,17 +2004,17 @@ var pendingEffects = [];
2032
2004
  var pendingScopes = [];
2033
2005
  var rendering;
2034
2006
  var scopeKeyOffset = 1e3;
2035
- function queueRender(scope, signal, signalKey, value2, scopeKey = scope.___id) {
2007
+ function queueRender(scope, signal, signalKey, value, scopeKey = scope.___id) {
2036
2008
  const key = scopeKey * scopeKeyOffset + signalKey;
2037
2009
  const existingRender = signalKey >= 0 && pendingRendersLookup.get(key);
2038
2010
  if (existingRender) {
2039
- existingRender.___value = value2;
2011
+ existingRender.___value = value;
2040
2012
  } else {
2041
2013
  const render = {
2042
2014
  ___key: key,
2043
2015
  ___scope: scope,
2044
2016
  ___signal: signal,
2045
- ___value: value2
2017
+ ___value: value
2046
2018
  };
2047
2019
  let i = pendingRenders.push(render) - 1;
2048
2020
  while (i) {
@@ -2132,8 +2104,8 @@ function runRenders() {
2132
2104
  pendingScopes = [];
2133
2105
  }
2134
2106
  var runRender = (render) => render.___signal(render.___scope, render.___value);
2135
- var enableCatch = () => {
2136
- enableCatch = () => {
2107
+ var _enable_catch = () => {
2108
+ _enable_catch = () => {
2137
2109
  };
2138
2110
  enableBranches();
2139
2111
  const handlePendingTry = (fn, scope, branch) => {
@@ -2172,14 +2144,14 @@ var enableCatch = () => {
2172
2144
  };
2173
2145
 
2174
2146
  // src/dom/abort-signal.ts
2175
- function resetAbortSignal(scope, id) {
2147
+ function $signalReset(scope, id) {
2176
2148
  const ctrl = scope.___abortControllers?.[id];
2177
2149
  if (ctrl) {
2178
2150
  queueEffect(ctrl, abort);
2179
2151
  scope.___abortControllers[id] = void 0;
2180
2152
  }
2181
2153
  }
2182
- function getAbortSignal(scope, id) {
2154
+ function $signal(scope, id) {
2183
2155
  if (scope.___closestBranch) {
2184
2156
  (scope.___closestBranch.___abortScopes ||= /* @__PURE__ */ new Set()).add(scope);
2185
2157
  }
@@ -2201,13 +2173,13 @@ var compat = {
2201
2173
  patchDynamicTag,
2202
2174
  queueEffect,
2203
2175
  init(warp10Noop) {
2204
- register(SET_SCOPE_REGISTER_ID, (branch) => {
2176
+ _resume(SET_SCOPE_REGISTER_ID, (branch) => {
2205
2177
  classIdToBranch.set(branch.m5c, branch);
2206
2178
  });
2207
- register(RENDER_BODY_ID, warp10Noop);
2179
+ _resume(RENDER_BODY_ID, warp10Noop);
2208
2180
  },
2209
2181
  registerRenderer(fn) {
2210
- register(RENDERER_REGISTER_ID, fn);
2182
+ _resume(RENDERER_REGISTER_ID, fn);
2211
2183
  },
2212
2184
  isRenderer(renderer) {
2213
2185
  return renderer.___clone;
@@ -2229,17 +2201,17 @@ var compat = {
2229
2201
  destroyBranch(this.scope);
2230
2202
  }
2231
2203
  },
2232
- resolveRegistered(value2, $global) {
2233
- if (Array.isArray(value2) && typeof value2[0] === "string") {
2204
+ resolveRegistered(value, $global) {
2205
+ if (Array.isArray(value) && typeof value[0] === "string") {
2234
2206
  return getRegisteredWithScope(
2235
- value2[0],
2236
- value2.length === 2 && self[$global.runtimeId]?.[$global.renderId]?.s[value2[1]]
2207
+ value[0],
2208
+ value.length === 2 && self[$global.runtimeId]?.[$global.renderId]?.s[value[1]]
2237
2209
  );
2238
2210
  }
2239
- return value2;
2211
+ return value;
2240
2212
  },
2241
2213
  createRenderer(params, clone) {
2242
- const renderer = createRenderer(0, 0, 0, params);
2214
+ const renderer = _content_branch(0, 0, 0, params);
2243
2215
  renderer.___clone = (branch) => {
2244
2216
  const cloned = clone();
2245
2217
  branch.___startNode = cloned.startNode;
@@ -2281,8 +2253,8 @@ var compat = {
2281
2253
  };
2282
2254
 
2283
2255
  // src/dom/template.ts
2284
- var createTemplate = (id, template, walks, setup, inputSignal) => {
2285
- const renderer = createContent(
2256
+ var _template = (id, template, walks, setup, inputSignal) => {
2257
+ const renderer = _content(
2286
2258
  id,
2287
2259
  template,
2288
2260
  walks,
@@ -2298,7 +2270,7 @@ var createTemplate = (id, template, walks, setup, inputSignal) => {
2298
2270
  );
2299
2271
  };
2300
2272
  }
2301
- return register(id, renderer);
2273
+ return _resume(id, renderer);
2302
2274
  };
2303
2275
  function mount(input = {}, reference, position) {
2304
2276
  let branch;
@@ -2372,7 +2344,7 @@ function mount(input = {}, reference, position) {
2372
2344
  return curValue;
2373
2345
  },
2374
2346
  set value(newValue) {
2375
- tagVarSignalChange(branch, newValue);
2347
+ _var_change(branch, newValue);
2376
2348
  },
2377
2349
  update(newInput) {
2378
2350
  if (args) {