marko 6.3.55 → 6.3.56

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.
Files changed (64) hide show
  1. package/cheatsheet.md +1 -0
  2. package/dist/common/accessor.d.ts +3 -0
  3. package/dist/common/accessor.debug.d.ts +3 -0
  4. package/dist/common/constants/closure-scopes-prop.d.ts +4 -0
  5. package/dist/common/constants/closure-scopes-prop.debug.d.ts +4 -0
  6. package/dist/common/types.d.ts +1 -1
  7. package/dist/debug/dom/catch.feat.js +1 -1
  8. package/dist/debug/dom/catch.feat.mjs +1 -1
  9. package/dist/debug/dom/controllable-input.feat.js +1 -1
  10. package/dist/debug/dom/controllable-input.feat.mjs +1 -1
  11. package/dist/debug/dom/controllable-open.feat.js +1 -1
  12. package/dist/debug/dom/controllable-open.feat.mjs +1 -1
  13. package/dist/debug/dom/controllable-select.feat.js +1 -1
  14. package/dist/debug/dom/controllable-select.feat.mjs +1 -1
  15. package/dist/debug/dom/controllable-textarea.feat.js +1 -1
  16. package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
  17. package/dist/debug/dom/controllable.feat.js +1 -1
  18. package/dist/debug/dom/controllable.feat.mjs +1 -1
  19. package/dist/debug/dom/dynamic-tag-script.feat.js +1 -1
  20. package/dist/debug/dom/dynamic-tag-script.feat.mjs +1 -1
  21. package/dist/debug/dom/dynamic-tag-var.feat.js +1 -1
  22. package/dist/debug/dom/dynamic-tag-var.feat.mjs +1 -1
  23. package/dist/debug/dom/placeholder.feat.js +1 -1
  24. package/dist/debug/dom/placeholder.feat.mjs +1 -1
  25. package/dist/debug/{dom-tl43c2wO.mjs → dom-BeCNT5R5.mjs} +12 -11
  26. package/dist/debug/{dom-CI0Vojyk.js → dom-DcwejnYg.js} +17 -16
  27. package/dist/debug/dom.js +2 -2
  28. package/dist/debug/dom.mjs +2 -2
  29. package/dist/debug/html.js +7 -11
  30. package/dist/debug/html.mjs +7 -11
  31. package/dist/dom/catch.feat.js +1 -1
  32. package/dist/dom/catch.feat.mjs +1 -1
  33. package/dist/dom/controllable-input.feat.js +1 -1
  34. package/dist/dom/controllable-input.feat.mjs +1 -1
  35. package/dist/dom/controllable-open.feat.js +1 -1
  36. package/dist/dom/controllable-open.feat.mjs +1 -1
  37. package/dist/dom/controllable-select.feat.js +1 -1
  38. package/dist/dom/controllable-select.feat.mjs +1 -1
  39. package/dist/dom/controllable-textarea.feat.js +1 -1
  40. package/dist/dom/controllable-textarea.feat.mjs +1 -1
  41. package/dist/dom/controllable.feat.js +1 -1
  42. package/dist/dom/controllable.feat.mjs +1 -1
  43. package/dist/dom/dynamic-tag-script.feat.js +1 -1
  44. package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
  45. package/dist/dom/dynamic-tag-var.feat.js +1 -1
  46. package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
  47. package/dist/dom/placeholder.feat.js +1 -1
  48. package/dist/dom/placeholder.feat.mjs +1 -1
  49. package/dist/dom/resume.d.ts +1 -1
  50. package/dist/dom/signals.d.ts +1 -1
  51. package/dist/{dom-4udEPZaj.mjs → dom-BwNsIevR.mjs} +11 -8
  52. package/dist/{dom-C1mr-TA7.js → dom-QEF0csuC.js} +12 -9
  53. package/dist/dom.d.ts +1 -1
  54. package/dist/dom.js +2 -2
  55. package/dist/dom.mjs +2 -2
  56. package/dist/html.js +5 -10
  57. package/dist/html.mjs +5 -10
  58. package/dist/translator/index.js +85 -108
  59. package/dist/translator/util/optional.d.ts +1 -3
  60. package/dist/translator/util/references.d.ts +3 -0
  61. package/dist/translator/util/serialize-reasons.d.ts +2 -0
  62. package/dist/translator/util/translate-attrs.d.ts +2 -1
  63. package/package.json +3 -3
  64. package/tags-html.d.ts +4 -3
package/cheatsheet.md CHANGED
@@ -216,6 +216,7 @@ Each left-hand habit is an error or silently wrong.
216
216
  | `input.renderBody` (renders nothing, no error) | `input.content` |
217
217
  | `<await>` with `@placeholder`/`@catch` | wrap in `<try>` |
218
218
  | `el.focus()` on a ref | `el().focus()` inside `<script>`/handler |
219
+ | filling `input.api` from a child's `<script>` for a parent | `<return=api>` in the child; parent `<Child/api>` then `api.x()` |
219
220
  | `input.tab[0]` / `input.tab.length` | `[...input.tab ?? []]` first (attr tags are iterables, not arrays) |
220
221
  | bare text on its own line at template root | wrap in an element (`<p>...`), or prefix the line with `--` and a space |
221
222
  | `onInput(e) { q = e.target.value }` to sync an input | `value:=q`; the change handler owns the value |
@@ -1,5 +1,6 @@
1
1
  import * as AccessorPrefix from "./constants/accessor-prefix";
2
2
  import * as AccessorProp from "./constants/accessor-prop";
3
+ import * as ClosureScopesProp from "./constants/closure-scopes-prop";
3
4
  import * as ClosureSignalProp from "./constants/closure-signal-prop";
4
5
  import * as KeyedScopesProp from "./constants/keyed-scopes-prop";
5
6
  import * as PendingRenderProp from "./constants/pending-render-prop";
@@ -14,5 +15,7 @@ type PendingRenderProp = PendingRenderProp.Value;
14
15
  export { PendingRenderProp };
15
16
  type ClosureSignalProp = ClosureSignalProp.Value;
16
17
  export { ClosureSignalProp };
18
+ type ClosureScopesProp = ClosureScopesProp.Value;
19
+ export { ClosureScopesProp };
17
20
  type KeyedScopesProp = KeyedScopesProp.Value;
18
21
  export { KeyedScopesProp };
@@ -1,5 +1,6 @@
1
1
  import * as AccessorPrefix from "./constants/accessor-prefix.debug";
2
2
  import * as AccessorProp from "./constants/accessor-prop.debug";
3
+ import * as ClosureScopesProp from "./constants/closure-scopes-prop.debug";
3
4
  import * as ClosureSignalProp from "./constants/closure-signal-prop.debug";
4
5
  import * as KeyedScopesProp from "./constants/keyed-scopes-prop.debug";
5
6
  import * as PendingRenderProp from "./constants/pending-render-prop.debug";
@@ -14,5 +15,7 @@ type PendingRenderProp = PendingRenderProp.Value;
14
15
  export { PendingRenderProp };
15
16
  type ClosureSignalProp = ClosureSignalProp.Value;
16
17
  export { ClosureSignalProp };
18
+ type ClosureScopesProp = ClosureScopesProp.Value;
19
+ export { ClosureScopesProp };
17
20
  type KeyedScopesProp = KeyedScopesProp.Value;
18
21
  export { KeyedScopesProp };
@@ -0,0 +1,4 @@
1
+ export declare const Changed = "_";
2
+ type Self = typeof import("./closure-scopes-prop");
3
+ export type Value = Self[keyof Self];
4
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const Changed = "Changed";
2
+ type Self = typeof import("./closure-scopes-prop.debug");
3
+ export type Value = Self[keyof Self];
4
+ export {};
@@ -40,7 +40,7 @@ export interface AwaitCounter {
40
40
  i: number;
41
41
  c: () => void | 1;
42
42
  }
43
- export { AccessorPrefix, AccessorProp, ClosureSignalProp, KeyedScopesProp, PendingRenderProp, RendererProp, } from "./accessor.debug";
43
+ export { AccessorPrefix, AccessorProp, ClosureScopesProp, ClosureSignalProp, KeyedScopesProp, PendingRenderProp, RendererProp, } from "./accessor.debug";
44
44
  type NodeType = NodeType.Value;
45
45
  export { NodeType };
46
46
  type WalkCode = WalkCode.Value;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-CI0Vojyk.js");
2
+ const require_control_flow = require("../dom-DcwejnYg.js");
3
3
  //#region src/dom/catch.feat.ts
4
4
  const handlePendingTry = (fn, scope, branch) => {
5
5
  while (branch) {
@@ -1,4 +1,4 @@
1
- import { Dn as Scope, En as Pending, Fn as PendingEffects, In as PendingRenders, Pn as ParentBranch, an as installCatch, in as caughtError, kn as ClosestBranch, on as placeholderShown, y as renderCatch } from "../dom-tl43c2wO.mjs";
1
+ import { Dn as Scope, En as Pending, Fn as PendingEffects, In as PendingRenders, Pn as ParentBranch, an as installCatch, in as caughtError, kn as ClosestBranch, on as placeholderShown, y as renderCatch } from "../dom-BeCNT5R5.mjs";
2
2
  //#region src/dom/catch.feat.ts
3
3
  const handlePendingTry = (fn, scope, branch) => {
4
4
  while (branch) {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-CI0Vojyk.js");
2
+ const require_control_flow = require("../dom-DcwejnYg.js");
3
3
  //#region src/dom/controllable-input.feat.ts
4
4
  require_control_flow.controllableScripts[0] = require_control_flow._attr_input_checked_script;
5
5
  require_control_flow.controllableScripts[1] = require_control_flow._attr_input_checkedValue_script;
@@ -1,4 +1,4 @@
1
- import { E as _attr_input_checkedValue_script, H as controllableScripts, N as _attr_input_value_script, O as _attr_input_checked_script } from "../dom-tl43c2wO.mjs";
1
+ import { E as _attr_input_checkedValue_script, H as controllableScripts, N as _attr_input_value_script, O as _attr_input_checked_script } from "../dom-BeCNT5R5.mjs";
2
2
  //#region src/dom/controllable-input.feat.ts
3
3
  controllableScripts[0] = _attr_input_checked_script;
4
4
  controllableScripts[1] = _attr_input_checkedValue_script;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-CI0Vojyk.js");
2
+ const require_control_flow = require("../dom-DcwejnYg.js");
3
3
  //#region src/dom/controllable-open.feat.ts
4
4
  require_control_flow.controllableScripts[4] = require_control_flow._attr_details_or_dialog_open_script;
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { H as controllableScripts, S as _attr_details_or_dialog_open_script } from "../dom-tl43c2wO.mjs";
1
+ import { H as controllableScripts, S as _attr_details_or_dialog_open_script } from "../dom-BeCNT5R5.mjs";
2
2
  //#region src/dom/controllable-open.feat.ts
3
3
  controllableScripts[4] = _attr_details_or_dialog_open_script;
4
4
  //#endregion
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-CI0Vojyk.js");
2
+ const require_control_flow = require("../dom-DcwejnYg.js");
3
3
  //#region src/dom/controllable-select.feat.ts
4
4
  require_control_flow.controllableScripts[3] = require_control_flow._attr_select_value_script;
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { H as controllableScripts, I as _attr_select_value_script } from "../dom-tl43c2wO.mjs";
1
+ import { H as controllableScripts, I as _attr_select_value_script } from "../dom-BeCNT5R5.mjs";
2
2
  //#region src/dom/controllable-select.feat.ts
3
3
  controllableScripts[3] = _attr_select_value_script;
4
4
  //#endregion
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-CI0Vojyk.js");
2
+ const require_control_flow = require("../dom-DcwejnYg.js");
3
3
  //#region src/dom/controllable-textarea.feat.ts
4
4
  require_control_flow.controllableScripts[2] = require_control_flow._attr_input_value_script;
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { H as controllableScripts, N as _attr_input_value_script } from "../dom-tl43c2wO.mjs";
1
+ import { H as controllableScripts, N as _attr_input_value_script } from "../dom-BeCNT5R5.mjs";
2
2
  //#region src/dom/controllable-textarea.feat.ts
3
3
  controllableScripts[2] = _attr_input_value_script;
4
4
  //#endregion
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-CI0Vojyk.js");
2
+ const require_control_flow = require("../dom-DcwejnYg.js");
3
3
  require("./controllable-input.feat.js");
4
4
  require("./controllable-open.feat.js");
5
5
  require("./controllable-select.feat.js");
@@ -1,4 +1,4 @@
1
- import { B as _controllable_textarea, L as _controllable_input, R as _controllable_open, V as controllableRenders, z as _controllable_select } from "../dom-tl43c2wO.mjs";
1
+ import { B as _controllable_textarea, L as _controllable_input, R as _controllable_open, V as controllableRenders, z as _controllable_select } from "../dom-BeCNT5R5.mjs";
2
2
  import "./controllable-input.feat.mjs";
3
3
  import "./controllable-open.feat.mjs";
4
4
  import "./controllable-select.feat.mjs";
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-CI0Vojyk.js");
2
+ const require_control_flow = require("../dom-DcwejnYg.js");
3
3
  //#region src/dom/dynamic-tag-script.feat.ts
4
4
  require_control_flow._resumed[require_control_flow.DYNAMIC_TAG_SCRIPT_REGISTER_ID] = require_control_flow.withBranches(require_control_flow.dynamicTagScript);
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { $t as DYNAMIC_TAG_SCRIPT_REGISTER_ID, bt as _resumed, g as dynamicTagScript, xn as withBranches } from "../dom-tl43c2wO.mjs";
1
+ import { $t as DYNAMIC_TAG_SCRIPT_REGISTER_ID, bt as _resumed, g as dynamicTagScript, xn as withBranches } from "../dom-BeCNT5R5.mjs";
2
2
  //#region src/dom/dynamic-tag-script.feat.ts
3
3
  _resumed[DYNAMIC_TAG_SCRIPT_REGISTER_ID] = withBranches(dynamicTagScript);
4
4
  //#endregion
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-CI0Vojyk.js");
2
+ const require_control_flow = require("../dom-DcwejnYg.js");
3
3
  //#region src/dom/dynamic-tag-var.feat.ts
4
4
  require_control_flow.installDynamicTagVar((branch) => branch[require_control_flow.TagVariable](() => require_control_flow._el_read(branch[require_control_flow.StartNode])));
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { Mt as _el_read, Rn as StartNode, _ as installDynamicTagVar, zn as TagVariable } from "../dom-tl43c2wO.mjs";
1
+ import { Mt as _el_read, Rn as StartNode, _ as installDynamicTagVar, zn as TagVariable } from "../dom-BeCNT5R5.mjs";
2
2
  //#region src/dom/dynamic-tag-var.feat.ts
3
3
  installDynamicTagVar((branch) => branch[TagVariable](() => _el_read(branch[StartNode])));
4
4
  //#endregion
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-CI0Vojyk.js");
2
+ const require_control_flow = require("../dom-DcwejnYg.js");
3
3
  //#region src/dom/placeholder.feat.ts
4
4
  require_control_flow._resumed[require_control_flow.PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
5
5
  if (tryBranch["#PlaceholderBranch"]) {
@@ -1,4 +1,4 @@
1
- import { Ln as PlaceholderBranch, Yt as destroyBranch, bt as _resumed, en as PLACEHOLDER_DISMISS_REGISTER_ID } from "../dom-tl43c2wO.mjs";
1
+ import { Ln as PlaceholderBranch, Yt as destroyBranch, bt as _resumed, en as PLACEHOLDER_DISMISS_REGISTER_ID } from "../dom-BeCNT5R5.mjs";
2
2
  //#region src/dom/placeholder.feat.ts
3
3
  _resumed[PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
4
4
  if (tryBranch["#PlaceholderBranch"]) {
@@ -41,6 +41,9 @@ const Subscriptions = "#Subscriptions";
41
41
  const TagVariable = "#TagVariable";
42
42
  const TagVariableChange = "#TagVariableChange";
43
43
  //#endregion
44
+ //#region src/common/constants/closure-scopes-prop.debug.ts
45
+ const Changed = "Changed";
46
+ //#endregion
44
47
  //#region src/common/constants/closure-signal-prop.debug.ts
45
48
  const ScopeInstancesAccessor = "scopeInstancesAccessor";
46
49
  const SignalIndexAccessor = "signalIndexAccessor";
@@ -244,7 +247,7 @@ function _hoist_read_error() {
244
247
  throw new Error("Hoisted values can only be read in scripts and event handlers.");
245
248
  }
246
249
  function _assert_hoist(value) {
247
- if (typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
250
+ if (value !== void 0 && typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
248
251
  }
249
252
  function assertExclusiveAttrs(attrs, onError = throwErr) {
250
253
  if (attrs) {
@@ -725,23 +728,21 @@ function _closure(...closureSignals) {
725
728
  for (let i = closureSignals.length; i--;) closureSignals[i][Index] = i;
726
729
  return (scope) => {
727
730
  if (scope[scopeInstances]) {
731
+ scope[scopeInstances][Changed] = 1;
728
732
  for (const childScope of scope[scopeInstances]) if (childScope["#Gen"] > 0 && childScope["#Gen"] < runId) queueRender(childScope, closureSignals[childScope[signalIndex] || 0], -1);
729
733
  }
730
734
  };
731
735
  }
732
- function _closure_get(valueAccessor, fn, getOwnerScope, resumeId, ownerValueAccessor) {
736
+ function _closure_get(valueAccessor, fn, getOwnerScope, resumeId) {
733
737
  const closureSignal = ((scope, resumed) => {
734
738
  const ownerScope = getOwnerScope ? getOwnerScope(scope) : scope["_"];
735
739
  scope[closureSignal[SignalIndexAccessor]] = closureSignal[Index];
736
- if (!resumed || ownerValueAccessor in ownerScope) fn(scope);
740
+ if (!resumed || ownerScope[closureSignal["scopeInstancesAccessor"]]["Changed"]) fn(scope);
737
741
  subscribeToScopeSet(ownerScope, closureSignal[ScopeInstancesAccessor], scope);
738
742
  });
739
743
  closureSignal[ScopeInstancesAccessor] = ClosureScopes + valueAccessor;
740
744
  closureSignal[SignalIndexAccessor] = ClosureSignalIndex + valueAccessor;
741
- if (resumeId) {
742
- ownerValueAccessor = valueAccessor;
743
- _resumed[resumeId] = (scope) => closureSignal(scope, 1);
744
- }
745
+ if (resumeId) _resumed[resumeId] = (scope) => closureSignal(scope, 1);
745
746
  return closureSignal;
746
747
  }
747
748
  function _child_setup(setup) {
@@ -1093,7 +1094,7 @@ function _var_resume(id, signal) {
1093
1094
  function _el(id, accessor) {
1094
1095
  return _resumed[id] = (scope) => () => _el_read(scope[accessor]);
1095
1096
  }
1096
- function _resume_dynamic_tag_var(accessor) {
1097
+ function _dynamic_tag_var_resume(accessor) {
1097
1098
  _resumed[DYNAMIC_TAG_VAR_REGISTER_ID + accessor] = (scope) => () => {
1098
1099
  const node = scope[accessor];
1099
1100
  return _el_read(node.nodeType === 8 ? node.previousSibling : node);
@@ -1711,11 +1712,11 @@ function _await_promise(nodeAccessor, params) {
1711
1712
  const tryPlaceholder = (isPromise(promise) || scope[promiseAccessor]) && findBranchWithKey(scope, "#PlaceholderContent");
1712
1713
  const tryBranch = tryPlaceholder || awaitBranch;
1713
1714
  if (!tryBranch) {
1714
- const replay = scope[promiseAccessor] = () => replay === scope[promiseAccessor] && awaitPromise(scope, promise);
1715
+ const deferred = scope[promiseAccessor] = () => deferred === scope[promiseAccessor] && awaitPromise(scope, promise);
1715
1716
  const awaitCounter = findBranchWithKey(scope, PlaceholderContent)?.[AwaitCounter];
1716
1717
  if (awaitCounter?.i) {
1717
1718
  const complete = awaitCounter.c;
1718
- awaitCounter.c = () => complete() || queueAsyncRender(scope, replay);
1719
+ awaitCounter.c = () => complete() || queueAsyncRender(scope, deferred);
1719
1720
  }
1720
1721
  return;
1721
1722
  }
@@ -2129,4 +2130,4 @@ function byFirstArg(name) {
2129
2130
  return name;
2130
2131
  }
2131
2132
  //#endregion
2132
- export { _attrs_content as $, DYNAMIC_TAG_SCRIPT_REGISTER_ID as $t, _attr_input_value_attribute_default as A, EndNode as An, _closure_get as At, _controllable_textarea as B, _let as Bt, _attr_input_checked as C, Owner as Cn, init as Ct, _attr_input_checked_default as D, Scope as Dn, withLazy as Dt, _attr_input_checkedValue_script as E, Pending as En, readyFailed as Et, _attr_select_value_default as F, PendingEffects as Fn, _global_read as Ft, _attr_class_item as G, _script as Gt, controllableScripts as H, _or as Ht, _attr_select_value_script as I, PendingRenders as In, _hoist as It, _attr_nonce as J, _assert_init as Jt, _attr_class_items as K, _var as Kt, _controllable_input as L, PlaceholderBranch as Ln, _hoist_resume as Lt, _attr_input_value_dynamic_default as M, Global as Mn, _el_read as Mt, _attr_input_value_script as N, Load as Nn, _for_closure as Nt, _attr_input_checked_script as O, AwaitCounter as On, _child_setup as Ot, _attr_select_value as P, ParentBranch as Pn, _for_selector as Pt, _attrs as Q, syncGen as Qt, _controllable_open as R, StartNode as Rn, _id as Rt, _attr_details_or_dialog_open_script as S, Clone as Sn, getRegisteredWithScope as St, _attr_input_checkedValue_default as T, Setup as Tn, ready as Tt, _attr as U, _return as Ut, controllableRenders as V, _let_change as Vt, _attr_class as W, _return_change as Wt, _attr_style_item as X, insertBranchBefore as Xt, _attr_style as Y, destroyBranch as Yt, _attr_style_items as Z, removeAndDestroyBranch as Zt, installDynamicTagVar as _, forUntil as _n, setupBranch as _t, _for_in as a, installCatch as an, _style_rule_item as at, _attr_details_or_dialog_open as b, _call as bn, _resumed as bt, _for_to as c, queueAsyncRender as cn, _text_content as ct, _for_until_unkeyed as d, run as dn, toInsertNode as dt, PLACEHOLDER_DISMISS_REGISTER_ID as en, _attrs_partial as et, _if as f, runEffects as fn, _content as ft, dynamicTagScript as g, forTo as gn, createBranch as gt, addAwaitCounter as h, forOf as hn, createAndSetupBranch as ht, _dynamic_tag_content as i, caughtError as in, _lifecycle as it, _attr_input_value_default as j, Gen$1 as jn, _const as jt, _attr_input_value as k, ClosestBranch as kn, _closure as kt, _for_to_unkeyed as l, queueEffect as ln, _to_text as lt, _try as m, forIn as mn, _content_resume as mt, _await_promise as n, $signal as nn, _attrs_script as nt, _for_of as o, placeholderShown as on, _style_shell as ot, _show as p, runId as pn, _content_closures as pt, _attr_content as q, _var_change as qt, _dynamic_tag as r, $signalReset as rn, _html as rt, _for_of_unkeyed as s, prepareEffects as sn, _text as st, _await_content as t, _on as tn, _attrs_partial_content as tt, _for_until as u, queueRender as un, insertChildNodes as ut, patchDynamicTag as v, _assert_hoist as vn, _el as vt, _attr_input_checkedValue as w, Params as wn, initEmbedded as wt, _attr_details_or_dialog_open_default as x, withBranches as xn, _var_resume as xt, renderCatch as y, _hoist_read_error as yn, _resume_dynamic_tag_var as yt, _controllable_select as z, TagVariable as zn, _if_closure as zt };
2133
+ export { _attrs_content as $, DYNAMIC_TAG_SCRIPT_REGISTER_ID as $t, _attr_input_value_attribute_default as A, EndNode as An, _closure_get as At, _controllable_textarea as B, _let as Bt, _attr_input_checked as C, Owner as Cn, init as Ct, _attr_input_checked_default as D, Scope as Dn, withLazy as Dt, _attr_input_checkedValue_script as E, Pending as En, readyFailed as Et, _attr_select_value_default as F, PendingEffects as Fn, _global_read as Ft, _attr_class_item as G, _script as Gt, controllableScripts as H, _or as Ht, _attr_select_value_script as I, PendingRenders as In, _hoist as It, _attr_nonce as J, _assert_init as Jt, _attr_class_items as K, _var as Kt, _controllable_input as L, PlaceholderBranch as Ln, _hoist_resume as Lt, _attr_input_value_dynamic_default as M, Global as Mn, _el_read as Mt, _attr_input_value_script as N, Load as Nn, _for_closure as Nt, _attr_input_checked_script as O, AwaitCounter as On, _child_setup as Ot, _attr_select_value as P, ParentBranch as Pn, _for_selector as Pt, _attrs as Q, syncGen as Qt, _controllable_open as R, StartNode as Rn, _id as Rt, _attr_details_or_dialog_open_script as S, Clone as Sn, getRegisteredWithScope as St, _attr_input_checkedValue_default as T, Setup as Tn, ready as Tt, _attr as U, _return as Ut, controllableRenders as V, _let_change as Vt, _attr_class as W, _return_change as Wt, _attr_style_item as X, insertBranchBefore as Xt, _attr_style as Y, destroyBranch as Yt, _attr_style_items as Z, removeAndDestroyBranch as Zt, installDynamicTagVar as _, forUntil as _n, setupBranch as _t, _for_in as a, installCatch as an, _style_rule_item as at, _attr_details_or_dialog_open as b, _call as bn, _resumed as bt, _for_to as c, queueAsyncRender as cn, _text_content as ct, _for_until_unkeyed as d, run as dn, toInsertNode as dt, PLACEHOLDER_DISMISS_REGISTER_ID as en, _attrs_partial as et, _if as f, runEffects as fn, _content as ft, dynamicTagScript as g, forTo as gn, createBranch as gt, addAwaitCounter as h, forOf as hn, createAndSetupBranch as ht, _dynamic_tag_content as i, caughtError as in, _lifecycle as it, _attr_input_value_default as j, Gen$1 as jn, _const as jt, _attr_input_value as k, ClosestBranch as kn, _closure as kt, _for_to_unkeyed as l, queueEffect as ln, _to_text as lt, _try as m, forIn as mn, _content_resume as mt, _await_promise as n, $signal as nn, _attrs_script as nt, _for_of as o, placeholderShown as on, _style_shell as ot, _show as p, runId as pn, _content_closures as pt, _attr_content as q, _var_change as qt, _dynamic_tag as r, $signalReset as rn, _html as rt, _for_of_unkeyed as s, prepareEffects as sn, _text as st, _await_content as t, _on as tn, _attrs_partial_content as tt, _for_until as u, queueRender as un, insertChildNodes as ut, patchDynamicTag as v, _assert_hoist as vn, _dynamic_tag_var_resume as vt, _attr_input_checkedValue as w, Params as wn, initEmbedded as wt, _attr_details_or_dialog_open_default as x, withBranches as xn, _var_resume as xt, renderCatch as y, _hoist_read_error as yn, _el as yt, _controllable_select as z, TagVariable as zn, _if_closure as zt };
@@ -42,6 +42,9 @@ const Subscriptions = "#Subscriptions";
42
42
  const TagVariable = "#TagVariable";
43
43
  const TagVariableChange = "#TagVariableChange";
44
44
  //#endregion
45
+ //#region src/common/constants/closure-scopes-prop.debug.ts
46
+ const Changed = "Changed";
47
+ //#endregion
45
48
  //#region src/common/constants/closure-signal-prop.debug.ts
46
49
  const ScopeInstancesAccessor = "scopeInstancesAccessor";
47
50
  const SignalIndexAccessor = "signalIndexAccessor";
@@ -245,7 +248,7 @@ function _hoist_read_error() {
245
248
  throw new Error("Hoisted values can only be read in scripts and event handlers.");
246
249
  }
247
250
  function _assert_hoist(value) {
248
- if (typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
251
+ if (value !== void 0 && typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
249
252
  }
250
253
  function assertExclusiveAttrs(attrs, onError = throwErr) {
251
254
  if (attrs) {
@@ -726,23 +729,21 @@ function _closure(...closureSignals) {
726
729
  for (let i = closureSignals.length; i--;) closureSignals[i][Index] = i;
727
730
  return (scope) => {
728
731
  if (scope[scopeInstances]) {
732
+ scope[scopeInstances][Changed] = 1;
729
733
  for (const childScope of scope[scopeInstances]) if (childScope["#Gen"] > 0 && childScope["#Gen"] < runId) queueRender(childScope, closureSignals[childScope[signalIndex] || 0], -1);
730
734
  }
731
735
  };
732
736
  }
733
- function _closure_get(valueAccessor, fn, getOwnerScope, resumeId, ownerValueAccessor) {
737
+ function _closure_get(valueAccessor, fn, getOwnerScope, resumeId) {
734
738
  const closureSignal = ((scope, resumed) => {
735
739
  const ownerScope = getOwnerScope ? getOwnerScope(scope) : scope["_"];
736
740
  scope[closureSignal[SignalIndexAccessor]] = closureSignal[Index];
737
- if (!resumed || ownerValueAccessor in ownerScope) fn(scope);
741
+ if (!resumed || ownerScope[closureSignal["scopeInstancesAccessor"]]["Changed"]) fn(scope);
738
742
  subscribeToScopeSet(ownerScope, closureSignal[ScopeInstancesAccessor], scope);
739
743
  });
740
744
  closureSignal[ScopeInstancesAccessor] = ClosureScopes + valueAccessor;
741
745
  closureSignal[SignalIndexAccessor] = ClosureSignalIndex + valueAccessor;
742
- if (resumeId) {
743
- ownerValueAccessor = valueAccessor;
744
- _resumed[resumeId] = (scope) => closureSignal(scope, 1);
745
- }
746
+ if (resumeId) _resumed[resumeId] = (scope) => closureSignal(scope, 1);
746
747
  return closureSignal;
747
748
  }
748
749
  function _child_setup(setup) {
@@ -1094,7 +1095,7 @@ function _var_resume(id, signal) {
1094
1095
  function _el(id, accessor) {
1095
1096
  return _resumed[id] = (scope) => () => _el_read(scope[accessor]);
1096
1097
  }
1097
- function _resume_dynamic_tag_var(accessor) {
1098
+ function _dynamic_tag_var_resume(accessor) {
1098
1099
  _resumed[DYNAMIC_TAG_VAR_REGISTER_ID + accessor] = (scope) => () => {
1099
1100
  const node = scope[accessor];
1100
1101
  return _el_read(node.nodeType === 8 ? node.previousSibling : node);
@@ -1712,11 +1713,11 @@ function _await_promise(nodeAccessor, params) {
1712
1713
  const tryPlaceholder = (isPromise(promise) || scope[promiseAccessor]) && findBranchWithKey(scope, "#PlaceholderContent");
1713
1714
  const tryBranch = tryPlaceholder || awaitBranch;
1714
1715
  if (!tryBranch) {
1715
- const replay = scope[promiseAccessor] = () => replay === scope[promiseAccessor] && awaitPromise(scope, promise);
1716
+ const deferred = scope[promiseAccessor] = () => deferred === scope[promiseAccessor] && awaitPromise(scope, promise);
1716
1717
  const awaitCounter = findBranchWithKey(scope, PlaceholderContent)?.[AwaitCounter];
1717
1718
  if (awaitCounter?.i) {
1718
1719
  const complete = awaitCounter.c;
1719
- awaitCounter.c = () => complete() || queueAsyncRender(scope, replay);
1720
+ awaitCounter.c = () => complete() || queueAsyncRender(scope, deferred);
1720
1721
  }
1721
1722
  return;
1722
1723
  }
@@ -2556,6 +2557,12 @@ Object.defineProperty(exports, "_dynamic_tag_content", {
2556
2557
  return _dynamic_tag_content;
2557
2558
  }
2558
2559
  });
2560
+ Object.defineProperty(exports, "_dynamic_tag_var_resume", {
2561
+ enumerable: true,
2562
+ get: function() {
2563
+ return _dynamic_tag_var_resume;
2564
+ }
2565
+ });
2559
2566
  Object.defineProperty(exports, "_el", {
2560
2567
  enumerable: true,
2561
2568
  get: function() {
@@ -2700,12 +2707,6 @@ Object.defineProperty(exports, "_or", {
2700
2707
  return _or;
2701
2708
  }
2702
2709
  });
2703
- Object.defineProperty(exports, "_resume_dynamic_tag_var", {
2704
- enumerable: true,
2705
- get: function() {
2706
- return _resume_dynamic_tag_var;
2707
- }
2708
- });
2709
2710
  Object.defineProperty(exports, "_resumed", {
2710
2711
  enumerable: true,
2711
2712
  get: function() {
package/dist/debug/dom.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_control_flow = require("./dom-CI0Vojyk.js");
3
+ const require_control_flow = require("./dom-DcwejnYg.js");
4
4
  //#region src/common/attr-tag.ts
5
5
  const empty = [];
6
6
  const rest = Symbol("Attribute Tag");
@@ -353,6 +353,7 @@ Object.defineProperty(exports, "_dynamic_tag", {
353
353
  }
354
354
  });
355
355
  exports._dynamic_tag_content = require_control_flow._dynamic_tag_content;
356
+ exports._dynamic_tag_var_resume = require_control_flow._dynamic_tag_var_resume;
356
357
  exports._el = require_control_flow._el;
357
358
  exports._el_read = require_control_flow._el_read;
358
359
  exports._for_closure = require_control_flow._for_closure;
@@ -385,7 +386,6 @@ exports._load_template = _load_template;
385
386
  exports._load_visible_trigger = _load_visible_trigger;
386
387
  exports._on = require_control_flow._on;
387
388
  exports._or = require_control_flow._or;
388
- exports._resume_dynamic_tag_var = require_control_flow._resume_dynamic_tag_var;
389
389
  exports._resumed = require_control_flow._resumed;
390
390
  exports._return = require_control_flow._return;
391
391
  exports._return_change = require_control_flow._return_change;
@@ -1,4 +1,4 @@
1
- import { $ as _attrs_content, A as _attr_input_value_attribute_default, An as EndNode, At as _closure_get, B as _controllable_textarea, Bt as _let, C as _attr_input_checked, Cn as Owner, Ct as init, D as _attr_input_checked_default, Dt as withLazy, E as _attr_input_checkedValue_script, Et as readyFailed, F as _attr_select_value_default, Ft as _global_read, G as _attr_class_item, Gt as _script, Ht as _or, I as _attr_select_value_script, It as _hoist, J as _attr_nonce, Jt as _assert_init, K as _attr_class_items, Kt as _var, L as _controllable_input, Lt as _hoist_resume, M as _attr_input_value_dynamic_default, Mn as Global, Mt as _el_read, N as _attr_input_value_script, Nn as Load, Nt as _for_closure, O as _attr_input_checked_script, Ot as _child_setup, P as _attr_select_value, Pt as _for_selector, Q as _attrs, Qt as syncGen, R as _controllable_open, Rn as StartNode, Rt as _id, S as _attr_details_or_dialog_open_script, Sn as Clone, St as getRegisteredWithScope, T as _attr_input_checkedValue_default, Tn as Setup, Tt as ready, U as _attr, Ut as _return, Vt as _let_change, W as _attr_class, Wt as _return_change, X as _attr_style_item, Xt as insertBranchBefore, Y as _attr_style, Yt as destroyBranch, Z as _attr_style_items, Zt as removeAndDestroyBranch, _n as forUntil, _t as setupBranch, a as _for_in, at as _style_rule_item, b as _attr_details_or_dialog_open, bn as _call, bt as _resumed, c as _for_to, cn as queueAsyncRender, ct as _text_content, d as _for_until_unkeyed, dn as run, dt as toInsertNode, et as _attrs_partial, f as _if, fn as runEffects, ft as _content, gn as forTo, gt as createBranch, h as addAwaitCounter, hn as forOf, ht as createAndSetupBranch, i as _dynamic_tag_content, it as _lifecycle, j as _attr_input_value_default, jt as _const, k as _attr_input_value, kt as _closure, l as _for_to_unkeyed, ln as queueEffect, lt as _to_text, m as _try, mn as forIn, mt as _content_resume, n as _await_promise, nn as $signal, nt as _attrs_script, o as _for_of, ot as _style_shell, p as _show, pn as runId, pt as _content_closures, q as _attr_content, qt as _var_change, r as _dynamic_tag, rn as $signalReset, rt as _html, s as _for_of_unkeyed, sn as prepareEffects, st as _text, t as _await_content, tn as _on, tt as _attrs_partial_content, u as _for_until, un as queueRender, ut as insertChildNodes, v as patchDynamicTag, vn as _assert_hoist, vt as _el, w as _attr_input_checkedValue, wn as Params, wt as initEmbedded, x as _attr_details_or_dialog_open_default, xt as _var_resume, y as renderCatch, yn as _hoist_read_error, yt as _resume_dynamic_tag_var, z as _controllable_select, zn as TagVariable, zt as _if_closure } from "./dom-tl43c2wO.mjs";
1
+ import { $ as _attrs_content, A as _attr_input_value_attribute_default, An as EndNode, At as _closure_get, B as _controllable_textarea, Bt as _let, C as _attr_input_checked, Cn as Owner, Ct as init, D as _attr_input_checked_default, Dt as withLazy, E as _attr_input_checkedValue_script, Et as readyFailed, F as _attr_select_value_default, Ft as _global_read, G as _attr_class_item, Gt as _script, Ht as _or, I as _attr_select_value_script, It as _hoist, J as _attr_nonce, Jt as _assert_init, K as _attr_class_items, Kt as _var, L as _controllable_input, Lt as _hoist_resume, M as _attr_input_value_dynamic_default, Mn as Global, Mt as _el_read, N as _attr_input_value_script, Nn as Load, Nt as _for_closure, O as _attr_input_checked_script, Ot as _child_setup, P as _attr_select_value, Pt as _for_selector, Q as _attrs, Qt as syncGen, R as _controllable_open, Rn as StartNode, Rt as _id, S as _attr_details_or_dialog_open_script, Sn as Clone, St as getRegisteredWithScope, T as _attr_input_checkedValue_default, Tn as Setup, Tt as ready, U as _attr, Ut as _return, Vt as _let_change, W as _attr_class, Wt as _return_change, X as _attr_style_item, Xt as insertBranchBefore, Y as _attr_style, Yt as destroyBranch, Z as _attr_style_items, Zt as removeAndDestroyBranch, _n as forUntil, _t as setupBranch, a as _for_in, at as _style_rule_item, b as _attr_details_or_dialog_open, bn as _call, bt as _resumed, c as _for_to, cn as queueAsyncRender, ct as _text_content, d as _for_until_unkeyed, dn as run, dt as toInsertNode, et as _attrs_partial, f as _if, fn as runEffects, ft as _content, gn as forTo, gt as createBranch, h as addAwaitCounter, hn as forOf, ht as createAndSetupBranch, i as _dynamic_tag_content, it as _lifecycle, j as _attr_input_value_default, jt as _const, k as _attr_input_value, kt as _closure, l as _for_to_unkeyed, ln as queueEffect, lt as _to_text, m as _try, mn as forIn, mt as _content_resume, n as _await_promise, nn as $signal, nt as _attrs_script, o as _for_of, ot as _style_shell, p as _show, pn as runId, pt as _content_closures, q as _attr_content, qt as _var_change, r as _dynamic_tag, rn as $signalReset, rt as _html, s as _for_of_unkeyed, sn as prepareEffects, st as _text, t as _await_content, tn as _on, tt as _attrs_partial_content, u as _for_until, un as queueRender, ut as insertChildNodes, v as patchDynamicTag, vn as _assert_hoist, vt as _dynamic_tag_var_resume, w as _attr_input_checkedValue, wn as Params, wt as initEmbedded, x as _attr_details_or_dialog_open_default, xt as _var_resume, y as renderCatch, yn as _hoist_read_error, yt as _el, z as _controllable_select, zn as TagVariable, zt as _if_closure } from "./dom-BeCNT5R5.mjs";
2
2
  //#region src/common/attr-tag.ts
3
3
  const empty = [];
4
4
  const rest = Symbol("Attribute Tag");
@@ -289,4 +289,4 @@ function getSelectorOrResolve(selector, resolve) {
289
289
  return document.querySelector(selector) || (console.warn(`A lazy load trigger could not find an element matching "${selector}". The module was loaded immediately.`), resolve());
290
290
  }
291
291
  //#endregion
292
- export { $signal, $signalReset, _assert_hoist, _assert_init, _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_details_or_dialog_open_default as _attr_details_open_default, _attr_details_or_dialog_open_default as _attr_dialog_open_default, _attr_details_or_dialog_open_script as _attr_details_open_script, _attr_details_or_dialog_open_script as _attr_dialog_open_script, _attr_input_checked, _attr_input_checkedValue, _attr_input_checkedValue_default, _attr_input_checkedValue_script, _attr_input_checked_default, _attr_input_checked_script, _attr_input_value, _attr_input_value as _attr_textarea_value, _attr_input_value_attribute_default, _attr_input_value_default, _attr_input_value_default as _attr_textarea_value_default, _attr_input_value_dynamic_default, _attr_input_value_script, _attr_input_value_script as _attr_textarea_value_script, _attr_nonce, _attr_select_value, _attr_select_value_default, _attr_select_value_script, _attr_style, _attr_style_item, _attr_style_items, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_script, _await_content, _await_promise, _call, _child_setup, _closure, _closure_get, _const, _content, _content_closures, _content_resume, _controllable_input, _controllable_open, _controllable_select, _controllable_textarea, _dynamic_tag, _dynamic_tag_content, _el, _el_read, _for_closure, _for_in, _for_of, _for_of_unkeyed, _for_selector, _for_to, _for_to_unkeyed, _for_until, _for_until_unkeyed, _global_read, _hoist, _hoist_read_error, _hoist_resume, _html, _id, _if, _if_closure, _let, _let_change, _lifecycle, _load_event_trigger, _load_idle_trigger, _load_media_trigger, _load_race_trigger, _load_setup, _load_signal, _load_template, _load_visible_trigger, _on, _or, _resume_dynamic_tag_var, _resumed, _return, _return_change, _script, _show, _style_rule_item, _style_shell, _template, _text, _text_content, _to_text, _try, _var, _var_change, _var_resume, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, init, initEmbedded, ready, readyFailed, run };
292
+ export { $signal, $signalReset, _assert_hoist, _assert_init, _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_details_or_dialog_open_default as _attr_details_open_default, _attr_details_or_dialog_open_default as _attr_dialog_open_default, _attr_details_or_dialog_open_script as _attr_details_open_script, _attr_details_or_dialog_open_script as _attr_dialog_open_script, _attr_input_checked, _attr_input_checkedValue, _attr_input_checkedValue_default, _attr_input_checkedValue_script, _attr_input_checked_default, _attr_input_checked_script, _attr_input_value, _attr_input_value as _attr_textarea_value, _attr_input_value_attribute_default, _attr_input_value_default, _attr_input_value_default as _attr_textarea_value_default, _attr_input_value_dynamic_default, _attr_input_value_script, _attr_input_value_script as _attr_textarea_value_script, _attr_nonce, _attr_select_value, _attr_select_value_default, _attr_select_value_script, _attr_style, _attr_style_item, _attr_style_items, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_script, _await_content, _await_promise, _call, _child_setup, _closure, _closure_get, _const, _content, _content_closures, _content_resume, _controllable_input, _controllable_open, _controllable_select, _controllable_textarea, _dynamic_tag, _dynamic_tag_content, _dynamic_tag_var_resume, _el, _el_read, _for_closure, _for_in, _for_of, _for_of_unkeyed, _for_selector, _for_to, _for_to_unkeyed, _for_until, _for_until_unkeyed, _global_read, _hoist, _hoist_read_error, _hoist_resume, _html, _id, _if, _if_closure, _let, _let_change, _lifecycle, _load_event_trigger, _load_idle_trigger, _load_media_trigger, _load_race_trigger, _load_setup, _load_signal, _load_template, _load_visible_trigger, _on, _or, _resumed, _return, _return_change, _script, _show, _style_rule_item, _style_shell, _template, _text, _text_content, _to_text, _try, _var, _var_change, _var_resume, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, init, initEmbedded, ready, readyFailed, run };
@@ -216,7 +216,7 @@ function _hoist_read_error() {
216
216
  throw new Error("Hoisted values can only be read in scripts and event handlers.");
217
217
  }
218
218
  function _assert_hoist(value) {
219
- if (typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
219
+ if (value !== void 0 && typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
220
220
  }
221
221
  function assertExclusiveAttrs(attrs, onError = throwErr) {
222
222
  if (attrs) {
@@ -557,7 +557,7 @@ var State$1 = class {
557
557
  strs = /* @__PURE__ */ new Map();
558
558
  refs = /* @__PURE__ */ new WeakMap();
559
559
  pendingAssignments = /* @__PURE__ */ new Set();
560
- boundary = void 0;
560
+ boundary;
561
561
  channel = void 0;
562
562
  channelDeps = null;
563
563
  mutated = [];
@@ -1034,7 +1034,6 @@ function writeRegExp(state, val) {
1034
1034
  }
1035
1035
  function writePromise(state, val, ref) {
1036
1036
  const { boundary, channel } = state;
1037
- if (!boundary) return false;
1038
1037
  const pId = nextRefAccess(state);
1039
1038
  const handle = newAsyncHandle(state, ref, pId);
1040
1039
  state.buf.push("(p=>p=new Promise((f,r)=>" + pId + "={f,r(e){p.catch(_=>0);r(e)}}))()");
@@ -1372,8 +1371,8 @@ function writeTemporal(state, val, name) {
1372
1371
  return true;
1373
1372
  }
1374
1373
  function writeReadableStream(state, val, ref) {
1374
+ if (val.locked) return false;
1375
1375
  const { boundary, channel } = state;
1376
- if (!boundary || val.locked) return false;
1377
1376
  const reader = val.getReader();
1378
1377
  const iterId = nextRefAccess(state);
1379
1378
  const handle = newAsyncHandle(state, ref, iterId);
@@ -1444,7 +1443,6 @@ function writeAsyncGenerator(state, iter, ref) {
1444
1443
  return true;
1445
1444
  }
1446
1445
  const { boundary, channel } = state;
1447
- if (!boundary) return false;
1448
1446
  const iterId = nextRefAccess(state);
1449
1447
  const handle = newAsyncHandle(state, ref, iterId);
1450
1448
  const onFulfilled = ({ value, done }) => {
@@ -1507,7 +1505,7 @@ function writeAsyncCall(state, boundary, handle, method, value, channel, valueId
1507
1505
  boundary.endAsync();
1508
1506
  }
1509
1507
  function throwUnserializable(state, cause, ref = null, accessor = "") {
1510
- if (cause !== void 0 && state.boundary?.abort) {
1508
+ if (cause !== void 0) {
1511
1509
  let message = "Unable to serialize";
1512
1510
  let access = "";
1513
1511
  while (ref) {
@@ -1590,11 +1588,9 @@ function trackChannel(state, ref) {
1590
1588
  return false;
1591
1589
  }
1592
1590
  function abortUnreachableChannel(state, val) {
1593
- if (state.boundary?.abort) {
1594
- const err = new TypeError("Unable to serialize a value shared between independently lazy loaded content. Values shared this way must also be serialized by content that is not lazily loaded, or by a common parent.", { cause: val });
1595
- err.stack = void 0;
1596
- state.boundary.abort(err);
1597
- }
1591
+ const err = new TypeError("Unable to serialize a value shared between independently lazy loaded content. Values shared this way must also be serialized by content that is not lazily loaded, or by a common parent.", { cause: val });
1592
+ err.stack = void 0;
1593
+ state.boundary.abort(err);
1598
1594
  }
1599
1595
  function isCircular(parent, ref) {
1600
1596
  let cur = parent;
@@ -214,7 +214,7 @@ function _hoist_read_error() {
214
214
  throw new Error("Hoisted values can only be read in scripts and event handlers.");
215
215
  }
216
216
  function _assert_hoist(value) {
217
- if (typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
217
+ if (value !== void 0 && typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
218
218
  }
219
219
  function assertExclusiveAttrs(attrs, onError = throwErr) {
220
220
  if (attrs) {
@@ -555,7 +555,7 @@ var State$1 = class {
555
555
  strs = /* @__PURE__ */ new Map();
556
556
  refs = /* @__PURE__ */ new WeakMap();
557
557
  pendingAssignments = /* @__PURE__ */ new Set();
558
- boundary = void 0;
558
+ boundary;
559
559
  channel = void 0;
560
560
  channelDeps = null;
561
561
  mutated = [];
@@ -1032,7 +1032,6 @@ function writeRegExp(state, val) {
1032
1032
  }
1033
1033
  function writePromise(state, val, ref) {
1034
1034
  const { boundary, channel } = state;
1035
- if (!boundary) return false;
1036
1035
  const pId = nextRefAccess(state);
1037
1036
  const handle = newAsyncHandle(state, ref, pId);
1038
1037
  state.buf.push("(p=>p=new Promise((f,r)=>" + pId + "={f,r(e){p.catch(_=>0);r(e)}}))()");
@@ -1370,8 +1369,8 @@ function writeTemporal(state, val, name) {
1370
1369
  return true;
1371
1370
  }
1372
1371
  function writeReadableStream(state, val, ref) {
1372
+ if (val.locked) return false;
1373
1373
  const { boundary, channel } = state;
1374
- if (!boundary || val.locked) return false;
1375
1374
  const reader = val.getReader();
1376
1375
  const iterId = nextRefAccess(state);
1377
1376
  const handle = newAsyncHandle(state, ref, iterId);
@@ -1442,7 +1441,6 @@ function writeAsyncGenerator(state, iter, ref) {
1442
1441
  return true;
1443
1442
  }
1444
1443
  const { boundary, channel } = state;
1445
- if (!boundary) return false;
1446
1444
  const iterId = nextRefAccess(state);
1447
1445
  const handle = newAsyncHandle(state, ref, iterId);
1448
1446
  const onFulfilled = ({ value, done }) => {
@@ -1505,7 +1503,7 @@ function writeAsyncCall(state, boundary, handle, method, value, channel, valueId
1505
1503
  boundary.endAsync();
1506
1504
  }
1507
1505
  function throwUnserializable(state, cause, ref = null, accessor = "") {
1508
- if (cause !== void 0 && state.boundary?.abort) {
1506
+ if (cause !== void 0) {
1509
1507
  let message = "Unable to serialize";
1510
1508
  let access = "";
1511
1509
  while (ref) {
@@ -1588,11 +1586,9 @@ function trackChannel(state, ref) {
1588
1586
  return false;
1589
1587
  }
1590
1588
  function abortUnreachableChannel(state, val) {
1591
- if (state.boundary?.abort) {
1592
- const err = new TypeError("Unable to serialize a value shared between independently lazy loaded content. Values shared this way must also be serialized by content that is not lazily loaded, or by a common parent.", { cause: val });
1593
- err.stack = void 0;
1594
- state.boundary.abort(err);
1595
- }
1589
+ const err = new TypeError("Unable to serialize a value shared between independently lazy loaded content. Values shared this way must also be serialized by content that is not lazily loaded, or by a common parent.", { cause: val });
1590
+ err.stack = void 0;
1591
+ state.boundary.abort(err);
1596
1592
  }
1597
1593
  function isCircular(parent, ref) {
1598
1594
  let cur = parent;
@@ -1,4 +1,4 @@
1
- let require_control_flow = require("../dom-C1mr-TA7.js"), handlePendingTry = (fn, scope, branch) => {
1
+ let require_control_flow = require("../dom-QEF0csuC.js"), handlePendingTry = (fn, scope, branch) => {
2
2
  for (; branch;) {
3
3
  if (branch.O?.i) return (branch.J ||= []).push(fn, scope);
4
4
  branch = branch.N;
@@ -4,7 +4,7 @@ let handlePendingTry = (fn, scope, branch) => {
4
4
  branch = branch.N;
5
5
  }
6
6
  };
7
- import { in as placeholderShown, nn as caughtError, rn as installCatch, y as renderCatch } from "../dom-4udEPZaj.mjs";
7
+ import { in as placeholderShown, nn as caughtError, rn as installCatch, y as renderCatch } from "../dom-BwNsIevR.mjs";
8
8
  //#region src/dom/catch.feat.ts
9
9
  installCatch((runEffects) => (effects, checkPending = placeholderShown.has(effects)) => {
10
10
  if (checkPending || caughtError.has(effects)) {
@@ -1,3 +1,3 @@
1
- let require_control_flow = require("../dom-C1mr-TA7.js");
1
+ let require_control_flow = require("../dom-QEF0csuC.js");
2
2
  require_control_flow.H[0] = require_control_flow.O, require_control_flow.H[1] = require_control_flow.E, require_control_flow.H[2] = require_control_flow.N;
3
3
  //#endregion
@@ -1,3 +1,3 @@
1
- import { E as _attr_input_checkedValue_script, H as controllableScripts, N as _attr_input_value_script, O as _attr_input_checked_script } from "../dom-4udEPZaj.mjs";
1
+ import { E as _attr_input_checkedValue_script, H as controllableScripts, N as _attr_input_value_script, O as _attr_input_checked_script } from "../dom-BwNsIevR.mjs";
2
2
  controllableScripts[0] = _attr_input_checked_script, controllableScripts[1] = _attr_input_checkedValue_script, controllableScripts[2] = _attr_input_value_script;
3
3
  //#endregion
@@ -1,4 +1,4 @@
1
- let require_control_flow = require("../dom-C1mr-TA7.js");
1
+ let require_control_flow = require("../dom-QEF0csuC.js");
2
2
  //#region src/dom/controllable-open.feat.ts
3
3
  require_control_flow.H[4] = require_control_flow.S;
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { H as controllableScripts, S as _attr_details_or_dialog_open_script } from "../dom-4udEPZaj.mjs";
1
+ import { H as controllableScripts, S as _attr_details_or_dialog_open_script } from "../dom-BwNsIevR.mjs";
2
2
  //#region src/dom/controllable-open.feat.ts
3
3
  controllableScripts[4] = _attr_details_or_dialog_open_script;
4
4
  //#endregion