marko 6.4.1 → 6.4.3

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 (80) hide show
  1. package/cheatsheet.md +1 -1
  2. package/dist/common/constants/accessor-prop.d.ts +1 -0
  3. package/dist/common/constants/accessor-prop.debug.d.ts +1 -0
  4. package/dist/common/errors.d.ts +1 -0
  5. package/dist/common/opt.d.ts +1 -0
  6. package/dist/common/types.d.ts +1 -0
  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 +6 -2
  22. package/dist/debug/dom/dynamic-tag-var.feat.mjs +6 -2
  23. package/dist/debug/dom/lazy.feat.js +1 -1
  24. package/dist/debug/dom/lazy.feat.mjs +1 -1
  25. package/dist/debug/dom/placeholder.feat.js +1 -1
  26. package/dist/debug/dom/placeholder.feat.mjs +1 -1
  27. package/dist/debug/{dom-ClV4kVOO.js → dom-C7F3yZTh.js} +119 -24
  28. package/dist/debug/{dom-LFrKxOk5.mjs → dom-uEY0J_H9.mjs} +78 -25
  29. package/dist/debug/dom.js +16 -4
  30. package/dist/debug/dom.mjs +14 -5
  31. package/dist/debug/html.js +288 -78
  32. package/dist/debug/html.mjs +288 -79
  33. package/dist/dom/catch.feat.js +4 -4
  34. package/dist/dom/catch.feat.mjs +1 -1
  35. package/dist/dom/control-flow.d.ts +2 -2
  36. package/dist/dom/controllable-input.feat.js +2 -2
  37. package/dist/dom/controllable-input.feat.mjs +1 -1
  38. package/dist/dom/controllable-open.feat.js +2 -2
  39. package/dist/dom/controllable-open.feat.mjs +1 -1
  40. package/dist/dom/controllable-select.feat.js +2 -2
  41. package/dist/dom/controllable-select.feat.mjs +1 -1
  42. package/dist/dom/controllable-textarea.feat.js +2 -2
  43. package/dist/dom/controllable-textarea.feat.mjs +1 -1
  44. package/dist/dom/controllable.feat.js +2 -2
  45. package/dist/dom/controllable.feat.mjs +1 -1
  46. package/dist/dom/dom.d.ts +1 -0
  47. package/dist/dom/dynamic-tag-script.feat.js +2 -2
  48. package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
  49. package/dist/dom/dynamic-tag-var.feat.js +4 -2
  50. package/dist/dom/dynamic-tag-var.feat.mjs +4 -3
  51. package/dist/dom/lazy.feat.js +1 -1
  52. package/dist/dom/lazy.feat.mjs +1 -1
  53. package/dist/dom/load.d.ts +1 -0
  54. package/dist/dom/placeholder.feat.js +3 -3
  55. package/dist/dom/placeholder.feat.mjs +1 -1
  56. package/dist/dom/queue.d.ts +4 -1
  57. package/dist/{dom-CNglVi8P.js → dom-CtIT8Mpr.js} +201 -138
  58. package/dist/{dom-DfP3MCo0.mjs → dom-DHg9YChM.mjs} +60 -27
  59. package/dist/dom.d.ts +3 -3
  60. package/dist/dom.js +41 -34
  61. package/dist/dom.mjs +12 -5
  62. package/dist/html/assets.d.ts +12 -6
  63. package/dist/html/attrs.d.ts +1 -0
  64. package/dist/html/compat.d.ts +10 -2
  65. package/dist/html/serializer.d.ts +1 -0
  66. package/dist/html/writer.d.ts +8 -0
  67. package/dist/html.d.ts +1 -1
  68. package/dist/html.js +207 -62
  69. package/dist/html.mjs +207 -62
  70. package/dist/translator/index.js +432 -213
  71. package/dist/translator/util/bindings.d.ts +9 -1
  72. package/dist/translator/util/constants/structure-kind.d.ts +1 -0
  73. package/dist/translator/util/known-tag.d.ts +2 -1
  74. package/dist/translator/util/module-read.d.ts +21 -0
  75. package/dist/translator/util/references.d.ts +1 -0
  76. package/dist/translator/util/runtime.d.ts +2 -0
  77. package/dist/translator/util/sections.d.ts +5 -1
  78. package/dist/translator/util/structure.d.ts +1 -0
  79. package/package.json +3 -3
  80. package/tags-html.d.ts +6 -5
package/dist/html.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { attrTag, attrTags } from "./common/attr-tag";
2
- export { _assert_hoist, _el_read_error, _hoist_read_error, } from "./common/errors";
2
+ export { _assert_class_toggles, _assert_hoist, _el_read_error, _hoist_read_error, } from "./common/errors";
3
3
  export { _flush_head, withLoadAssets, withPageAssets } from "./html/assets";
4
4
  export { _attr, _attr_and, _attr_class, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_input_checked, _attr_input_checkedValue, _attr_input_value, _attr_nonce, _attr_nullish, _attr_option_value, _attr_or, _attr_select_value, _attr_style, _attr_textarea_value, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_select_value, _attrs_textarea_value, _style_html, _textarea_value, } from "./html/attrs";
5
5
  export { compat } from "./html/compat";
package/dist/html.js CHANGED
@@ -268,7 +268,7 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
268
268
  } else {
269
269
  let chunk = getChunk(), beforeBranch = shouldResume ? deferBranchStart(chunk) : void 0, render = () => {
270
270
  if (renderer) try {
271
- return _set_scope_reason(shouldResume && inputOrArgs !== void 0 ? CLIENT_ALL : 0), inputIsArgs ? renderer(...inputOrArgs) : renderer(content ? {
271
+ return _set_scope_reason(shouldResume ? CLIENT_ALL : 0), inputIsArgs ? renderer(...inputOrArgs) : renderer(content ? {
272
272
  ...inputOrArgs,
273
273
  content
274
274
  } : inputOrArgs);
@@ -277,7 +277,7 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
277
277
  }
278
278
  else if (content) return content();
279
279
  };
280
- result = shouldResume ? withBranchId(branchId, render) : render(), rendered = _peek_scope_id() !== branchId, beforeBranch !== void 0 && (applyBranchStart(chunk, beforeBranch, rendered), _html(state.mark("]", scopeId + " " + accessor + (rendered ? " " + branchId : ""))));
280
+ result = shouldResume ? withBranchId(branchId, render) : render(), rendered = _peek_scope_id() !== branchId, beforeBranch !== void 0 && (applyBranchStart(chunk, beforeBranch, rendered), _html(state.mark("]", scopeId + " " + accessor + (rendered ? " " + branchId : ""))), renderer && _existing_scope(branchId));
281
281
  }
282
282
  return rendered ? shouldResume && writeScope(scopeId, { ["D" + accessor]: rendererKey(renderer) }) : _scope_id(), result;
283
283
  }, patchDynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (patch) => {
@@ -285,8 +285,9 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
285
285
  let patched = patch(tag, scopeId, accessor);
286
286
  return patched !== tag && (patched.a = tag), originalDynamicTag(scopeId, accessor, patched, input, content, inputIsArgs, resume);
287
287
  };
288
- })(_dynamic_tag), CONSUMED_RESULT_MESSAGE = "Cannot read from a consumed render result", _template = (templateId, renderer, page) => (renderer.render = render, renderer.i = !page, renderer._ = renderer, _content_resume(templateId, renderer)), kAssets = Symbol(), kBlockIndex = Symbol(), kDeferIndex = Symbol(), assetFlush, SET_SCOPE_REGISTER_ID = "$C_s", RENDER_BODY_ID = "$C_b", K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
288
+ })(_dynamic_tag), CONSUMED_RESULT_MESSAGE = "Cannot read from a consumed render result", _template = (templateId, renderer, page) => (renderer.render = render, renderer.i = !page, renderer._ = renderer, _content_resume(templateId, renderer)), kAssets = Symbol(), kHead = Symbol(), SET_SCOPE_REGISTER_ID = "$C_s", RENDER_BODY_ID = "$C_b", K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
289
289
  $global,
290
+ writeLoadAsset,
290
291
  fork: _await,
291
292
  write: _html,
292
293
  writeScript,
@@ -305,7 +306,8 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
305
306
  onFlush(fn) {
306
307
  let { flushHTML } = Chunk.prototype;
307
308
  Chunk.prototype.flushHTML = function(boundary) {
308
- return fn(this), flushHTML.call(this, boundary);
309
+ let { state } = boundary, reorders = swapReorders(state, null);
310
+ return fn(this), swapReorders(state, reorders), flushHTML.call(this, boundary);
309
311
  };
310
312
  },
311
313
  patchDynamicTag,
@@ -328,24 +330,45 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
328
330
  return compatRegistered;
329
331
  };
330
332
  },
333
+ joinChunks(chunks) {
334
+ let joined;
335
+ for (let chunk of chunks) chunk.boundary.aborted || (joined ? joined.append(chunk) : joined = chunk);
336
+ return joined;
337
+ },
338
+ appendChunks(chunks) {
339
+ let chunk = getChunk();
340
+ for (let part of chunks) chunk.append(part), part.effects && (chunk.lastEffect = part.lastEffect);
341
+ },
342
+ deferReorders(reorders) {
343
+ let chunk = getChunk();
344
+ for (let i = reorders.length; i--;) {
345
+ let carrier = chunk.fork(chunk.boundary, chunk.next);
346
+ carrier.deferredReorder = reorders[i], chunk.next = carrier;
347
+ }
348
+ },
331
349
  createChunk($global) {
332
350
  let state = this.ensureState($global);
333
351
  return new Chunk(new Boundary(state), null, null, state);
334
352
  },
335
- flushScript($global, chunk) {
336
- chunk ||= this.createChunk($global);
337
- let { boundary } = chunk, scripts = boundary.flush() === 0 ? chunk.flushScript(boundary).scripts : "";
338
- if (boundary.aborted) throw boundary.reason;
353
+ flushScript(chunk, reorders) {
354
+ let { boundary } = chunk, { state } = boundary, html = "", scripts = "";
355
+ if (reorders) for (let reorder of reorders) state.reorder(reorder);
356
+ if (boundary.flush() === 0 && ({html, scripts} = chunk.flushScript(boundary)), boundary.aborted) throw boundary.reason;
339
357
  if (boundary.count) throw Error("Cannot serialize promise across tags/class compat layer.");
340
- return scripts;
358
+ return {
359
+ html,
360
+ scripts
361
+ };
341
362
  },
342
- render(renderer, willRerender, classAPIOut, component, input, completeChunks, registerChildScope) {
343
- let state = this.ensureState(classAPIOut.global), boundary = new Boundary(state), context = getChunk()?.context ?? null, head = new Chunk(boundary, new Chunk(boundary, null, context, state), context, state), normalizedInput = input;
363
+ render(renderer, willRerender, classAPIOut, component, input, componentScopes, registerChildScope, parentChunk) {
364
+ if (parentChunk?.boundary.aborted) return;
365
+ let state = this.ensureState(classAPIOut.global), boundary = new Boundary(state, void 0, parentChunk?.boundary), context = getChunk()?.context ?? null, head = new Chunk(boundary, new Chunk(boundary, null, context, state), context, state), normalizedInput = input;
344
366
  if ("renderBody" in input) {
345
367
  normalizedInput = {};
346
368
  for (let key in input) normalizedInput[key === "renderBody" ? "content" : key] = input[key];
347
369
  }
348
- head.render(() => {
370
+ let componentScope = new Chunk(boundary, null, context, state);
371
+ componentScope.render(() => {
349
372
  if (this.hasPendingClassFunctions(classAPIOut.global) && drainClassFunctions(classAPIOut.global, (hostId) => {
350
373
  let fnScopeId = _scope_id(), scope = writeScope(fnScopeId, {
351
374
  m5c: component.id,
@@ -356,6 +379,7 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
356
379
  let scopeId = _peek_scope_id();
357
380
  writeScope(scopeId, { m5c: component.id }), _script(scopeId, SET_SCOPE_REGISTER_ID);
358
381
  }
382
+ }), head.render(() => {
359
383
  _set_scope_reason(willRerender ? CLIENT_ALL : 0);
360
384
  try {
361
385
  renderer(normalizedInput);
@@ -368,7 +392,16 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
368
392
  });
369
393
  classAPIOut.onLast((next) => {
370
394
  (boundary.onNext = () => {
371
- boundary.aborted ? (asyncOut.error(boundary.reason), boundary.onNext = NOOP) : boundary.count || (boundary.onNext = NOOP, head = head.consume(boundary), asyncOut.write(head.html), asyncOut.script(head.scripts), asyncOut.end(), head.html = head.scripts = "", completeChunks.push(head), next());
395
+ if (boundary.aborted) boundary.onNext = NOOP, parentChunk?.boundary.aborted ? (asyncOut.end(), next()) : asyncOut.error(boundary.reason);
396
+ else if (!boundary.count) {
397
+ boundary.onNext = NOOP;
398
+ let queued = swapReorders(state, null);
399
+ head = head.consume(boundary);
400
+ let reorders = swapReorders(state, queued);
401
+ reorders && asyncOut.writer.get("reorders").push(...reorders);
402
+ let heldEffects = head.takeHeldEffects();
403
+ heldEffects && (head.effects = joinHeldEffects(heldEffects, head.effects), head.lastEffect = ""), asyncOut.write(head.html), asyncOut.script(head.scripts), head.html = head.scripts = "", asyncOut.writer.get("chunks").push(head), asyncOut.end(), componentScopes.push(componentScope), next();
404
+ }
372
405
  })();
373
406
  });
374
407
  });
@@ -450,6 +483,7 @@ function normalizeDynamicRenderer(value) {
450
483
  }
451
484
  //#endregion
452
485
  //#region src/common/errors.ts
486
+ function _assert_class_toggles(classes, toggles) {}
453
487
  function _el_read_error() {}
454
488
  function _hoist_read_error() {}
455
489
  function _assert_hoist(value) {}
@@ -474,6 +508,13 @@ function forUntil(until, from, step, cb) {
474
508
  }
475
509
  //#endregion
476
510
  //#region src/common/opt.ts
511
+ function reduce(opt, cb, acc) {
512
+ if (opt) {
513
+ if (Array.isArray(opt)) for (let item of opt) acc = cb(acc, item);
514
+ else acc = cb(acc, opt);
515
+ }
516
+ return acc;
517
+ }
477
518
  function push(opt, item) {
478
519
  return opt ? Array.isArray(opt) ? (opt.push(item), opt) : [opt, item] : item;
479
520
  }
@@ -546,6 +587,14 @@ var State$1 = class {
546
587
  channel
547
588
  });
548
589
  }
590
+ dropCall(value, object, property) {
591
+ let { mutated } = this.#state;
592
+ for (let i = 0; i < mutated.length; i++) {
593
+ let mutation = mutated[i];
594
+ if (mutation.value === value && mutation.object === object && mutation.property === property) return mutated.splice(i, 1), !0;
595
+ }
596
+ return !1;
597
+ }
549
598
  };
550
599
  function register(id, val, scope, locals) {
551
600
  return REGISTRY.set(val, {
@@ -1486,6 +1535,15 @@ function _html(html) {
1486
1535
  function writeScript(script) {
1487
1536
  $chunk.writeScript(script);
1488
1537
  }
1538
+ function catchableBoundary() {
1539
+ let { boundary } = $chunk;
1540
+ return boundary.withinCatch ? boundary : null;
1541
+ }
1542
+ function mayDrop(written) {
1543
+ let { boundary } = $chunk;
1544
+ for (let cur = written; cur && !isWithin(boundary, cur); cur = cur.parent) if (cur.aborted || cur.count) return !0;
1545
+ return !1;
1546
+ }
1489
1547
  function _script(scopeId, registryId, markerGuard) {
1490
1548
  markerGuard === 0 && ($chunk.serializeState.readyId || $chunk.context?.[kIsAsync]) && _resume_branch(scopeId), $chunk.boundary.state.needsMainRuntime = !0, $chunk.writeEffect(scopeId, registryId);
1491
1549
  }
@@ -1530,7 +1588,12 @@ function _resume_branch(scopeId) {
1530
1588
  }
1531
1589
  function _attr_content(nodeAccessor, scopeId, content, markerGuard) {
1532
1590
  let shouldResume = markerGuard !== 0, render = normalizeServerRender(content), branchId = _peek_scope_id();
1533
- render && (shouldResume ? withBranchId(branchId, render) : render()), _peek_scope_id() === branchId ? _scope_id() : shouldResume && writeScope(scopeId, {
1591
+ if (render) try {
1592
+ _set_scope_reason(shouldResume ? CLIENT_ALL : 0), shouldResume ? withBranchId(branchId, render) : render();
1593
+ } finally {
1594
+ _set_scope_reason(void 0);
1595
+ }
1596
+ _peek_scope_id() === branchId ? _scope_id() : shouldResume && writeScope(scopeId, {
1534
1597
  ["A" + nodeAccessor]: writeScope(branchId, {}),
1535
1598
  ["D" + nodeAccessor]: rendererKey(render)
1536
1599
  });
@@ -1635,8 +1698,8 @@ function scopeWithId(state, scopeId) {
1635
1698
  }
1636
1699
  function _subscribe(subscribers, scope, resumeId, markerGuard) {
1637
1700
  if (subscribers) {
1638
- let { serializer } = $chunk.boundary.state;
1639
- !$chunk.serializeState.readyId && !serializer.written(subscribers) ? subscribers.add(scope) : resumeId ? _script(scope[K_SCOPE_ID], resumeId, markerGuard) : serializer.writeCall(scope, subscribers, "add", $chunk.serializeState);
1701
+ let { boundary, serializeState } = $chunk, { serializer } = boundary.state;
1702
+ !serializeState.readyId && !serializer.written(subscribers) ? subscribers.add(scope) : resumeId ? _script(scope[K_SCOPE_ID], resumeId, markerGuard) : serializer.writeCall(scope, subscribers, "add", serializeState), boundary.withinCatch && (boundary.subscribed ||= []).push(subscribers, scope, serializeState);
1640
1703
  }
1641
1704
  return scope;
1642
1705
  }
@@ -1713,7 +1776,9 @@ function tryPlaceholder(content, placeholder, branchId, scopeId, placeholderBran
1713
1776
  };
1714
1777
  }
1715
1778
  function tryBoundary(content, catchContent, branchId, renderers) {
1716
- let chunk = $chunk, { boundary } = chunk, { state } = boundary, catchBoundary = new Boundary(state, void 0, boundary), body = chunk.fork(catchBoundary, null), bodyEnd = body.render(() => withBranchId(branchId, content));
1779
+ let chunk = $chunk, { boundary } = chunk, { state } = boundary, catchBoundary = new Boundary(state, void 0, boundary);
1780
+ catchContent && (catchBoundary.withinCatch = !0);
1781
+ let body = chunk.fork(catchBoundary, null), bodyEnd = body.render(() => withBranchId(branchId, content));
1717
1782
  if (catchBoundary.aborted) {
1718
1783
  if (!catchContent) throw catchBoundary.reason;
1719
1784
  return catchContent(catchBoundary.reason), !0;
@@ -1733,10 +1798,10 @@ function tryBoundary(content, catchContent, branchId, renderers) {
1733
1798
  return;
1734
1799
  }
1735
1800
  let streamed = !chunk.catchRange, catchChunk = chunk.fork(boundary, null);
1736
- chunk.catchRange = null;
1801
+ chunk.catchRange = null, renderersAtSettle || catchChunk.render(clearTryRenderers, branchId);
1737
1802
  let inOrder = catchChunk === catchChunk.render(catchContent, catchBoundary.reason);
1738
1803
  if (boundary.aborted) return;
1739
- if (bodyEnd.consumed) catchChunk.reorderId = reorderId, state.reorder(catchChunk);
1804
+ if ((bodyEnd.consumed || !inOrder) && (catchChunk.reorderBranch = branchId), bodyEnd.consumed) catchChunk.reorderId = reorderId, state.reorder(catchChunk);
1740
1805
  else {
1741
1806
  let reorder = null;
1742
1807
  inOrder ? streamed && (reorder = chunk.fork(boundary, null)) : reorder = catchChunk, reorder && (reorder.reorderId = reorderId);
@@ -1749,6 +1814,18 @@ function tryBoundary(content, catchContent, branchId, renderers) {
1749
1814
  }
1750
1815
  }, renderersAtSettle;
1751
1816
  }
1817
+ function unsubscribe(subscribed, serializer) {
1818
+ for (let i = 0; i < subscribed.length; i += 3) {
1819
+ let subscribers = subscribed[i], scope = subscribed[i + 1];
1820
+ serializer.written(subscribers) ? serializer.dropCall(scope, subscribers, "add") || serializer.writeCall(scope, subscribers, "delete", subscribed[i + 2]) : subscribers.delete(scope);
1821
+ }
1822
+ }
1823
+ function clearTryRenderers(branchId) {
1824
+ writeScope(branchId, {
1825
+ E: 0,
1826
+ Q: _scope_with_id(branchId).Q && 0
1827
+ });
1828
+ }
1752
1829
  function writeTryRenderers(branchId, catchContent, placeholderContent) {
1753
1830
  writeScope(branchId, {
1754
1831
  E: catchContent,
@@ -1833,15 +1910,17 @@ var State = class {
1833
1910
  parent;
1834
1911
  aborted = !1;
1835
1912
  reason;
1913
+ subscribed;
1836
1914
  pendingReorders;
1837
1915
  children;
1916
+ withinCatch = !1;
1838
1917
  constructor(state, signal, parent) {
1839
- this.state = state, this.parent = parent, parent ? parent.aborted ? this.abort(parent.reason) : (parent.children ||= []).push(this) : signal && (signal.aborted ? this.abort(signal.reason) : signal.addEventListener("abort", this));
1918
+ this.state = state, this.parent = parent, parent ? (this.withinCatch = parent.withinCatch, parent.aborted ? this.abort(parent.reason) : (parent.children ||= []).push(this)) : signal && (signal.aborted ? this.abort(signal.reason) : signal.addEventListener("abort", this));
1840
1919
  }
1841
1920
  abort(reason) {
1842
1921
  if (this.aborted) return;
1843
1922
  let { state } = this;
1844
- if (this.aborted = !0, this.reason = reason, this.pendingReorders) {
1923
+ if (this.aborted = !0, this.reason = reason, this.subscribed && unsubscribe(this.subscribed, state.serializer), this.pendingReorders) {
1845
1924
  for (let reorder of this.pendingReorders) state.reorder(reorder);
1846
1925
  this.pendingReorders = void 0;
1847
1926
  }
@@ -1868,7 +1947,9 @@ var State = class {
1868
1947
  async = !1;
1869
1948
  consumed = !1;
1870
1949
  reorderId = null;
1950
+ reorderBranch = 0;
1871
1951
  deferredReady = null;
1952
+ heldEffects = null;
1872
1953
  deferredReorder = null;
1873
1954
  catchRange = null;
1874
1955
  placeholder = null;
@@ -1886,7 +1967,7 @@ var State = class {
1886
1967
  this.html += html;
1887
1968
  }
1888
1969
  writeEffect(scopeId, registryId) {
1889
- countResumeWrite(this), this.lastEffect === registryId ? this.effects += " " + scopeId : (this.lastEffect = registryId, this.effects = concatEffects(this.effects, registryId + " " + scopeId));
1970
+ countResumeWrite(this), this.lastEffect === registryId ? this.effects = concatEffects(this.effects, scopeId + "") : (this.lastEffect = registryId, this.effects = concatEffects(this.effects, registryId + " " + scopeId));
1890
1971
  }
1891
1972
  writeScript(script) {
1892
1973
  this.scripts = concatScripts(this.scripts, script);
@@ -1894,6 +1975,10 @@ var State = class {
1894
1975
  append(chunk) {
1895
1976
  this.html += chunk.html, this.effects = concatEffects(this.effects, chunk.effects), this.scripts = concatScripts(this.scripts, chunk.scripts), this.lastEffect = chunk.lastEffect || this.lastEffect, this.deferredReady = concat(this.deferredReady, chunk.takeDeferredReady());
1896
1977
  }
1978
+ takeHeldEffects() {
1979
+ let { heldEffects } = this;
1980
+ return this.heldEffects = null, heldEffects;
1981
+ }
1897
1982
  takeDeferredReady() {
1898
1983
  let { deferredReady } = this;
1899
1984
  return this.deferredReady = null, deferredReady;
@@ -1934,12 +2019,12 @@ var State = class {
1934
2019
  let { body } = placeholder, end = body;
1935
2020
  for (; end.next && !end.async;) end = end.next;
1936
2021
  if (!end.async) return end.next = this.next, this.next = body, !1;
1937
- let { branchId, scopeId, placeholderBranchId } = placeholder, reorderId = body.reorderId = branchId ? branchId + "" : state.nextReorderId();
2022
+ let { branchId, scopeId, placeholderBranchId } = placeholder, reorderId = body.reorderId = branchId + "";
1938
2023
  this.writeHTML(state.mark("!^", reorderId));
1939
2024
  let { effects } = this, beforeBranch = deferBranchStart(this);
1940
2025
  if (this.render(() => withBranchId(placeholderBranchId, placeholder.render)) !== this && this.boundary.abort(/* @__PURE__ */ Error("An @placeholder cannot contain async content.")), this.boundary.aborted) return !0;
1941
2026
  let stateful = this.effects !== effects;
1942
- return applyBranchStart(this, beforeBranch, stateful), stateful && (this.render(() => writeScope(branchId, { P: scopeWithId(state, placeholderBranchId) })), this.writeHTML(state.mark("]", scopeId + " " + ("P" + branchId) + " " + placeholderBranchId)), end.writeEffect(branchId, "_f")), this.writeHTML(state.mark("!", reorderId)), this.deferredReorder = body, !1;
2027
+ return applyBranchStart(this, beforeBranch, stateful), stateful && (this.render(() => writeScope(branchId, { P: scopeWithId(state, placeholderBranchId) })), this.writeHTML(state.mark("]", scopeId + " " + ("P" + branchId) + " " + placeholderBranchId)), dismissChunk(end, body).writeEffect(branchId, "_f")), this.writeHTML(state.mark("!", reorderId)), this.deferredReorder = body, !1;
1943
2028
  }
1944
2029
  markCatchRange() {
1945
2030
  let { catchRange } = this;
@@ -1954,9 +2039,9 @@ var State = class {
1954
2039
  }
1955
2040
  consume(boundary) {
1956
2041
  this.renderPlaceholders(boundary);
1957
- let cur = this, html = "", effects = "", scripts = "", lastEffect = "", deferredReady;
1958
- for (; cur.next && !cur.async;) cur.markCatchRange(), cur.queueDeferredReorder(), html += cur.html, cur.serializeState.readyId ? deferredReady = push(deferredReady, cur) : (effects = concatEffects(effects, cur.effects), scripts = concatScripts(scripts, cur.scripts), lastEffect = cur.lastEffect || lastEffect), deferredReady = concat(deferredReady, cur.takeDeferredReady()), cur.consumed = !0, cur = cur.next;
1959
- return cur.deferOwnReady(), cur.deferredReady = concat(deferredReady, cur.deferredReady), cur.html = html + cur.html, cur.effects = concatEffects(effects, cur.effects), cur.scripts = concatScripts(scripts, cur.scripts), cur.lastEffect ||= lastEffect, cur;
2042
+ let cur = this, html = "", effects = "", scripts = "", effectsEnd, heldEffects = this.heldEffects, deferredReady;
2043
+ for (this.heldEffects = null, this.serializeState.readyId && this.effects && followHeldEffects(this); cur.next && !cur.async;) cur.markCatchRange(), cur.queueDeferredReorder(), html += cur.html, cur.serializeState.readyId ? deferredReady = push(deferredReady, cur) : (cur.effects && (effectsEnd && effectsEnd.boundary !== cur.boundary && (heldEffects = holdEffectsOn(heldEffects, effectsEnd, effects), effects = ""), effectsEnd = cur, effects = concatEffects(effects, cur.effects)), scripts = concatScripts(scripts, cur.scripts)), deferredReady = concat(deferredReady, cur.takeDeferredReady()), cur.consumed = !0, cur = cur.next;
2044
+ return cur.deferOwnReady(), effects && (cur.serializeState.readyId ? heldEffects = holdEffectsOn(heldEffects, effectsEnd, effects) : effectsEnd.boundary === cur.boundary ? (cur.effects = concatEffects(effects, cur.effects), cur.lastEffect ||= effectsEnd.lastEffect) : (heldEffects = holdEffectsOn(heldEffects, effectsEnd, effects), isWithin(cur.boundary, effectsEnd.boundary) && (cur.lastEffect ||= effectsEnd.lastEffect))), cur.heldEffects = heldEffects, cur.deferredReady = concat(deferredReady, cur.deferredReady), cur.html = html + cur.html, cur.scripts = concatScripts(scripts, cur.scripts), cur;
1960
2045
  }
1961
2046
  render(content, val) {
1962
2047
  let prev = $chunk;
@@ -1990,32 +2075,37 @@ var State = class {
1990
2075
  }
1991
2076
  flushScript(boundary) {
1992
2077
  let { state } = boundary, { $global, runtimePrefix } = state, needsWalk = state.walkOnNextFlush;
1993
- needsWalk && (state.walkOnNextFlush = !1);
2078
+ needsWalk && (state.walkOnNextFlush = !1), flushSerializer(boundary, state);
1994
2079
  let readyResumeScripts = this.flushReadyScripts(boundary, void 0, this.async);
1995
2080
  for (let channel; !boundary.aborted && (channel = state.serializer.pendingReadyChannel());) {
1996
2081
  let resumes = state.serializer.stringifyScopes([], boundary, channel), deps = state.serializer.takeChannelDeps();
1997
2082
  state.needsMainRuntime = !0, readyResumeScripts = concatScripts(readyResumeScripts, state.writeReady(channel.readyId, concatSequence(depsMarker(deps), resumes)));
1998
2083
  }
1999
2084
  readyResumeScripts && (needsWalk = !0);
2000
- let effects = this.async ? "" : this.effects, { html, scripts } = this;
2001
- state.needsMainRuntime && !state.hasMainRuntime && (state.hasMainRuntime = !0, scripts = concatScripts(scripts, "(e=>(self[e]||=(l,f=e+l,s=f.length,a={},d=[],t=document,n=t.createTreeWalker(t,129))=>t=self[e][l]={i:f,d:t,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(r=l.slice(s+1),(l=l[s])>\"#\"||(a[r]=e),l),r,e),l>\"#\"&&d.push(e)}},self[e]))(\"" + $global.runtimeId + "\")(\"" + $global.renderId + "\")")), scripts = concatScripts(scripts, readyResumeScripts), effects && (needsWalk = !0, state.resumes = state.resumes ? state.resumes + ",\"" + effects + "\"" : "\"" + effects + "\"");
2085
+ let effects = this.async ? "" : joinHeldEffects(this.takeHeldEffects(), this.effects), { html, scripts } = this;
2086
+ html && state.hasReorderRuntime && (html = state.mark("*", "") + html), state.needsMainRuntime && !state.hasMainRuntime && (state.hasMainRuntime = !0, scripts = concatScripts(scripts, "(e=>(self[e]||=(l,f=e+l,s=f.length,a={},d=[],t=document,n=t.createTreeWalker(t,129))=>t=self[e][l]={i:f,d:t,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(r=l.slice(s+1),(l=l[s])>\"#\"||(a[r]=e),l),r,e),l>\"#\"&&d.push(e)}},self[e]))(\"" + $global.runtimeId + "\")(\"" + $global.renderId + "\")")), scripts = concatScripts(scripts, readyResumeScripts), effects && (needsWalk = !0, state.resumes = state.resumes ? state.resumes + ",\"" + effects + "\"" : "\"" + effects + "\"");
2002
2087
  let reordered = "", needsResumeArray = !1;
2003
2088
  if (state.writeReorders) {
2004
2089
  for (let reorderedChunk of state.writeReorders) {
2005
2090
  needsWalk = !0, state.hasReorderRuntime || (state.hasReorderRuntime = !0, scripts = concatScripts(scripts, "(e=>{if(e.j)return;let i,l,r,t=e.p={},c=(i,l)=>e.l[i].replaceWith(...l.childNodes);e.j={},e.x=(n,a,d,o,g)=>{d==r&&i(),\"#\"==n?(t[a]=l).i++:\"T\"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=()=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:1,r:a,c(i=e.l[\"^\"+a],f=d.cloneNode()){if(--o.i)return 1;for(;f.prepend(r=e.l[a].previousSibling||i),i!=r;);c(a,d)}}),e.v.push({data:e.i+\"*\"+l.r}),(n=e.j[a])&&(g=l.c,l.c=()=>g()||n(e.r)))}})(" + runtimePrefix + ")"));
2006
- let { reorderId } = reorderedChunk, readyReservations = [], reorderHTML = "", reorderEffects = "", reorderScripts = "", cur = reorderedChunk.boundary.aborted ? null : reorderedChunk;
2091
+ let { reorderId, reorderBranch } = reorderedChunk, rootBranch = reorderBranch || +reorderId, readyReservations = [], reorderHTML = "", reorderEffects = "", effectsBoundary = reorderedChunk.boundary, reorderScripts = "", cur = reorderedChunk.boundary.aborted ? null : reorderedChunk;
2007
2092
  for (reorderedChunk.reorderId = null; cur;) {
2008
2093
  cur.markCatchRange(), cur.queueDeferredReorder(), cur.deferOwnReady();
2009
2094
  let { next } = cur, readyResumeScripts = cur.flushReadyScripts(boundary, readyReservations, this.async);
2010
- this.deferredReady = concat(this.deferredReady, cur.takeDeferredReady()), cur.consumed = !0, reorderHTML += cur.html, reorderEffects = concatEffects(reorderEffects, cur.effects), reorderScripts = concatScripts(reorderScripts, concatScripts(readyResumeScripts, cur.scripts)), cur.async && (reorderHTML += state.mark("#", cur.reorderId = state.nextReorderId()), (cur.boundary.pendingReorders ||= /* @__PURE__ */ new Set()).add(cur), cur.html = cur.effects = cur.scripts = cur.lastEffect = "", cur.next = null), cur = next;
2095
+ if (this.deferredReady = concat(this.deferredReady, cur.takeDeferredReady()), cur.consumed = !0, reorderHTML += cur.html, this.async && cur.effects && cur.boundary !== effectsBoundary && (reorderEffects &&= (holdReorderEffects(this, effectsBoundary, reorderEffects), ""), effectsBoundary = cur.boundary), reorderEffects = concatEffects(reorderEffects, cur.effects), reorderScripts = concatScripts(reorderScripts, concatScripts(readyResumeScripts, cur.scripts)), cur.async) {
2096
+ reorderHTML += state.mark("#", cur.reorderId = state.nextReorderId());
2097
+ let holeBranch = cur.context?.[kBranchId];
2098
+ cur.reorderBranch = holeBranch > rootBranch ? holeBranch : reorderBranch, (cur.boundary.pendingReorders ||= /* @__PURE__ */ new Set()).add(cur), cur.html = cur.effects = cur.scripts = cur.lastEffect = "", cur.next = null;
2099
+ }
2100
+ cur = next;
2011
2101
  }
2012
- reorderEffects && (this.async ? (this.effects = concatEffects(this.effects, reorderEffects), this.lastEffect = "") : (needsResumeArray = !0, reorderScripts = concatScripts(reorderScripts, "_.push(\"" + reorderEffects + "\")")));
2102
+ reorderEffects && (this.async ? holdReorderEffects(this, effectsBoundary, reorderEffects) : (needsResumeArray = !0, reorderScripts = concatScripts(reorderScripts, "_.push(\"" + reorderEffects + "\")")));
2013
2103
  for (let reservation of readyReservations) reordered = concatScripts(reordered, reservation);
2014
- reordered = concatScripts(reordered, reorderScripts && runtimePrefix + ".j" + toAccess(reorderId) + "=_=>{" + reorderScripts + "}"), html += "<t hidden " + state.commentPrefix + "=" + reorderId + ">" + reorderHTML + "</t>";
2104
+ reordered = concatScripts(reordered, reorderScripts && runtimePrefix + ".j" + toAccess(reorderId) + "=_=>{" + reorderScripts + "}"), html += "<t hidden " + state.commentPrefix + "=" + reorderId + ">" + (reorderBranch ? state.mark("*", reorderBranch + "") : "") + reorderHTML + "</t>";
2015
2105
  }
2016
2106
  state.writeReorders = null;
2017
2107
  }
2018
- return flushSerializer(boundary, state), (state.resumes || needsResumeArray && !state.hasWrittenResume) && (scripts = concatScripts(scripts, state.resumeScript(state.resumes))), scripts = concatScripts(scripts, reordered), needsWalk && (scripts = concatScripts(scripts, state.walkScript())), this.html = html, this.scripts = scripts, this.async || (this.effects = this.lastEffect = ""), state.resumes = "", this;
2108
+ return (state.resumes || needsResumeArray && !state.hasWrittenResume) && (scripts = concatScripts(scripts, state.resumeScript(state.resumes))), scripts = concatScripts(scripts, reordered), needsWalk && (scripts = concatScripts(scripts, state.walkScript())), this.html = html, this.scripts = scripts, this.async || (this.effects = this.lastEffect = ""), state.resumes = "", this;
2019
2109
  }
2020
2110
  flushHTML(boundary) {
2021
2111
  let { state } = boundary;
@@ -2031,6 +2121,33 @@ function renderReorderPlaceholders(reorder, reorders) {
2031
2121
  }
2032
2122
  return reorders;
2033
2123
  }
2124
+ function dismissChunk(end, body) {
2125
+ if (end.boundary !== body.boundary) for (; end.next;) end = end.next;
2126
+ return end;
2127
+ }
2128
+ function followHeldEffects(chunk) {
2129
+ let held = reduce(chunk.deferredReady, lastHeldOf, chunk);
2130
+ held !== chunk && (held.effects = concatEffects(held.effects, chunk.effects), chunk.effects = "");
2131
+ }
2132
+ function lastHeldOf(held, cur) {
2133
+ return cur.serializeState === held.serializeState && cur.boundary === held.boundary ? cur : held;
2134
+ }
2135
+ function holdEffectsOn(heldEffects, chunk, effects) {
2136
+ return chunk.effects = effects, push(heldEffects, chunk);
2137
+ }
2138
+ function isWithin(boundary, outer) {
2139
+ for (; boundary && boundary !== outer;) boundary = boundary.parent;
2140
+ return !!boundary;
2141
+ }
2142
+ function holdReorderEffects(head, boundary, effects) {
2143
+ head.serializeState.readyId || (head.effects && (head.heldEffects = holdEffectsOn(head.heldEffects, head.fork(head.boundary, null), head.effects)), head.effects = head.lastEffect = ""), head.heldEffects = holdEffectsOn(head.heldEffects, head.fork(boundary, null), effects);
2144
+ }
2145
+ function joinHeldEffects(heldEffects, effects) {
2146
+ return concatEffects(reduce(heldEffects, joinUncaught, ""), effects);
2147
+ }
2148
+ function joinUncaught(joined, held) {
2149
+ return held.boundary.aborted ? joined : concatEffects(joined, held.effects);
2150
+ }
2034
2151
  function flushSerializer(boundary, serializeState) {
2035
2152
  let { state } = boundary, { serializer } = state, pending = serializer.pending(serializeState);
2036
2153
  if (serializeState.flushScopes || pending) {
@@ -2338,42 +2455,66 @@ function settle(boundary) {
2338
2455
  function NOOP$1() {}
2339
2456
  //#endregion
2340
2457
  //#region src/html/assets.ts
2341
- function withLoadAssets(renderer, assetId, triggers) {
2342
- return Object.assign((input) => {
2343
- let g = $global();
2344
- return addAsset(g, assetId, triggers), _html(flush(g, "")), writeWaitReady(assetId, renderer, input);
2345
- }, renderer);
2458
+ function withLoadAssets(renderer, flush, assetId, triggers) {
2459
+ return Object.assign((input) => (writeLoadAsset(assetId, flush, triggers), writeWaitReady(assetId, renderer, input)), renderer);
2460
+ }
2461
+ function writeLoadAsset(assetId, flush, triggers) {
2462
+ let g = $global();
2463
+ writeAsset(g, addAsset(g, assetId, flush, triggers));
2346
2464
  }
2347
2465
  function withPageAssets(template, runtime, assetId, runtimeId) {
2348
- return assetFlush = runtime, Object.assign((input) => {
2466
+ return Object.assign((input) => {
2349
2467
  let g = $global();
2350
- return runtimeId && (g[kAssets] || (g.runtimeId = runtimeId)), addAsset(g, assetId), g.__flush__ ? (_html(flush(g, "")), writeWaitReady(assetId, template, input)) : (g.__flush__ = flush, template(input));
2468
+ runtimeId && (g[kAssets] || (g.runtimeId = runtimeId));
2469
+ let asset = addAsset(g, assetId, runtime);
2470
+ return g.__flush__ ? (writeAsset(g, asset), writeWaitReady(assetId, template, input)) : (g.__flush__ = flushPage, template(input));
2351
2471
  }, template);
2352
2472
  }
2353
2473
  function _flush_head() {
2354
2474
  let g = $global();
2355
- return g[kAssets] ? flush(g, "") : "";
2475
+ return g[kAssets] ? (g[kHead] = !0, takeAssets(g, catchableBoundary())) : "";
2476
+ }
2477
+ function flushPage(g, html) {
2478
+ return takeAssets(g, null) + html;
2356
2479
  }
2357
- function flush(g, html) {
2358
- let result = "", assets = g[kAssets], { length } = assets, bi = g[kBlockIndex], di = g[kDeferIndex];
2359
- for (; bi < length; bi++) result += assetFlush(g, "block", assets[bi].id);
2360
- for (; di < length; di++) {
2361
- let { id, triggers } = assets[di], deferHTML = assetFlush(g, "defer", id);
2362
- triggers ? deferHTML && writeTriggerScript(id, deferHTML, triggers) : result += deferHTML;
2480
+ function takeAssets(g, at) {
2481
+ let block = "", defer = "";
2482
+ for (let asset of g[kAssets]) asset.htmlAt === void 0 && (asset.htmlAt = at, block += blockHTML(g, asset), asset.triggers || (defer += deferHTML(g, asset)));
2483
+ return block + defer;
2484
+ }
2485
+ function writeAsset(g, asset) {
2486
+ if (needsWrite(asset.htmlAt) && (asset.htmlAt = void 0, g[kHead] || g.__flush__ !== flushPage)) {
2487
+ let block = blockHTML(g, asset);
2488
+ _html(block + (asset.triggers ? "" : deferHTML(g, asset))), block && isInResumedBranch() && writeScript(`document.head.insertAdjacentHTML("beforeend",${_escape_script(JSON.stringify(block))})`), asset.htmlAt = catchableBoundary();
2489
+ }
2490
+ if (asset.triggers && needsWrite(asset.scriptAt)) {
2491
+ let defer = deferHTML(g, asset);
2492
+ defer && writeScript(asset.script ||= triggerScript(asset.id, defer, asset.triggers)), asset.scriptAt = catchableBoundary();
2363
2493
  }
2364
- return g[kBlockIndex] = bi, g[kDeferIndex] = di, result + html;
2365
2494
  }
2366
- function addAsset(g, id, triggers) {
2367
- let assets = g[kAssets];
2368
- assets ? assets.find((a) => a.id === id) || assets.push({
2369
- id,
2370
- triggers
2371
- }) : (g[kAssets] = [{
2372
- id,
2373
- triggers
2374
- }], g[kBlockIndex] = g[kDeferIndex] = 0);
2495
+ function needsWrite(at) {
2496
+ return at === void 0 || at !== null && mayDrop(at);
2497
+ }
2498
+ function blockHTML(g, asset) {
2499
+ return asset.block ??= asset.flush(g, "block", asset.id);
2500
+ }
2501
+ function deferHTML(g, asset) {
2502
+ return asset.defer ??= asset.flush(g, "defer", asset.id);
2375
2503
  }
2376
- function writeTriggerScript(id, html, triggers) {
2504
+ function addAsset(g, id, flush, triggers) {
2505
+ let assets = g[kAssets] ||= [], asset = assets.find((a) => a.id === id);
2506
+ return asset || assets.push(asset = {
2507
+ id,
2508
+ flush,
2509
+ triggers,
2510
+ block: void 0,
2511
+ defer: void 0,
2512
+ script: void 0,
2513
+ htmlAt: void 0,
2514
+ scriptAt: void 0
2515
+ }), asset;
2516
+ }
2517
+ function triggerScript(id, html, triggers) {
2377
2518
  let htmlStr = _escape_script(JSON.stringify(html)), exprs = triggers.map((trigger) => {
2378
2519
  let options = trigger.options && toObjectExpression(trigger.options);
2379
2520
  switch (trigger.type) {
@@ -2383,7 +2524,7 @@ function writeTriggerScript(id, html, triggers) {
2383
2524
  default: return `(e=>e?.addEventListener("${trigger.type.slice(3)}",l,{once:1}))(${querySelectorOrLoad(trigger.selector)})`;
2384
2525
  }
2385
2526
  });
2386
- writeScript(`((p,h,d,l=$=>{d||p.after(new Range().createContextualFragment(d=h))})=>${exprs.length > 1 ? `{${exprs.join(";")}}` : exprs[0]})(document.currentScript,${htmlStr})`);
2527
+ return `((h,d,l=$=>{d||document.head.append(new Range().createContextualFragment(d=h))})=>${exprs.length > 1 ? `{${exprs.join(";")}}` : exprs[0]})(${htmlStr})`;
2387
2528
  }
2388
2529
  function querySelectorOrLoad(selector) {
2389
2530
  return `document.querySelector(${JSON.stringify(selector)})||l()`;
@@ -2402,8 +2543,12 @@ function drainClassFunctions($global, writeScope) {
2402
2543
  for (let [id, fn, hostId] of pending) register(id, fn, scopeByHost[hostId] ||= writeScope(hostId));
2403
2544
  pending.length = 0;
2404
2545
  }
2546
+ function swapReorders(state, reorders) {
2547
+ let { writeReorders } = state;
2548
+ return state.writeReorders = reorders, writeReorders;
2549
+ }
2405
2550
  function NOOP() {}
2406
- exports.$global = $global, exports._assert_hoist = _assert_hoist, exports._attr = _attr, exports._attr_and = _attr_and, exports._attr_class = _attr_class, exports._attr_content = _attr_content, exports._attr_details_open = _attr_details_or_dialog_open, exports._attr_dialog_open = _attr_details_or_dialog_open, exports._attr_input_checked = _attr_input_checked, exports._attr_input_checkedValue = _attr_input_checkedValue, exports._attr_input_value = _attr_input_value, exports._attr_nonce = _attr_nonce, exports._attr_nullish = _attr_nullish, exports._attr_option_value = _attr_option_value, exports._attr_or = _attr_or, exports._attr_select_value = _attr_select_value, exports._attr_style = _attr_style, exports._attr_textarea_value = _attr_textarea_value, exports._attrs = _attrs, exports._attrs_content = _attrs_content, exports._attrs_partial = _attrs_partial, exports._attrs_partial_content = _attrs_partial_content, exports._attrs_select_value = _attrs_select_value, exports._attrs_textarea_value = _attrs_textarea_value, exports._await = _await, exports._content = _content, exports._content_resume = _content_resume, Object.defineProperty(exports, "_dynamic_tag", {
2551
+ exports.$global = $global, exports._assert_class_toggles = _assert_class_toggles, exports._assert_hoist = _assert_hoist, exports._attr = _attr, exports._attr_and = _attr_and, exports._attr_class = _attr_class, exports._attr_content = _attr_content, exports._attr_details_open = _attr_details_or_dialog_open, exports._attr_dialog_open = _attr_details_or_dialog_open, exports._attr_input_checked = _attr_input_checked, exports._attr_input_checkedValue = _attr_input_checkedValue, exports._attr_input_value = _attr_input_value, exports._attr_nonce = _attr_nonce, exports._attr_nullish = _attr_nullish, exports._attr_option_value = _attr_option_value, exports._attr_or = _attr_or, exports._attr_select_value = _attr_select_value, exports._attr_style = _attr_style, exports._attr_textarea_value = _attr_textarea_value, exports._attrs = _attrs, exports._attrs_content = _attrs_content, exports._attrs_partial = _attrs_partial, exports._attrs_partial_content = _attrs_partial_content, exports._attrs_select_value = _attrs_select_value, exports._attrs_textarea_value = _attrs_textarea_value, exports._await = _await, exports._content = _content, exports._content_resume = _content_resume, Object.defineProperty(exports, "_dynamic_tag", {
2407
2552
  enumerable: !0,
2408
2553
  get: function() {
2409
2554
  return _dynamic_tag;