haori 0.47.2 → 0.47.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.
package/dist/haori.es.js CHANGED
@@ -149,7 +149,7 @@ class m {
149
149
  console.error(e, ...t);
150
150
  }
151
151
  }
152
- const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:", $ = class $ {
152
+ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:", k = class k {
153
153
  /**
154
154
  * 外部ライブラリ連携を登録します。
155
155
  *
@@ -170,7 +170,7 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
170
170
  m.error("[Haori]", `Enhancer "${r}" must have an init function.`);
171
171
  return;
172
172
  }
173
- $.enhancers.set(r, t), $.warnedUnknownNames.delete(r), typeof document < "u" && document.body && $.applySubtree(document.body);
173
+ k.enhancers.set(r, t), k.warnedUnknownNames.delete(r), typeof document < "u" && document.body && k.applySubtree(document.body);
174
174
  }
175
175
  /**
176
176
  * 登録済みの連携かどうかを返します。
@@ -179,7 +179,7 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
179
179
  * @returns 登録済みなら true
180
180
  */
181
181
  static has(e) {
182
- return $.enhancers.has(e);
182
+ return k.enhancers.has(e);
183
183
  }
184
184
  /**
185
185
  * 対象要素とその子孫へ、まだ適用していない連携を適用します。
@@ -190,8 +190,8 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
190
190
  * @returns 戻り値はありません。
191
191
  */
192
192
  static applySubtree(e) {
193
- $.forEachTarget(e, (t) => {
194
- $.applyElement(t);
193
+ k.forEachTarget(e, (t) => {
194
+ k.applyElement(t);
195
195
  });
196
196
  }
197
197
  /**
@@ -204,8 +204,8 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
204
204
  * @returns 戻り値はありません。
205
205
  */
206
206
  static refreshSubtree(e) {
207
- $.forEachTarget(e, (t) => {
208
- $.refreshElement(t);
207
+ k.forEachTarget(e, (t) => {
208
+ k.refreshElement(t);
209
209
  });
210
210
  }
211
211
  /**
@@ -217,8 +217,8 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
217
217
  * @returns 戻り値はありません。
218
218
  */
219
219
  static destroySubtree(e) {
220
- $.forEachTarget(e, (t) => {
221
- $.destroyElement(t);
220
+ k.forEachTarget(e, (t) => {
221
+ k.destroyElement(t);
222
222
  });
223
223
  }
224
224
  /**
@@ -243,27 +243,27 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
243
243
  * @returns 戻り値はありません。
244
244
  */
245
245
  static applyElement(e) {
246
- const t = $.instances.get(e) ?? null;
247
- $.names(e, `${l.prefix}enhance`).forEach((r) => {
246
+ const t = k.instances.get(e) ?? null;
247
+ k.names(e, `${l.prefix}enhance`).forEach((r) => {
248
248
  if (t?.has(r))
249
249
  return;
250
- const i = $.enhancers.get(r);
250
+ const i = k.enhancers.get(r);
251
251
  if (!i) {
252
- $.warnUnknownName(r);
252
+ k.warnUnknownName(r);
253
253
  return;
254
254
  }
255
- $.run(`enhance "${r}"`, () => {
255
+ k.run(`enhance "${r}"`, () => {
256
256
  const n = i.init(e);
257
- $.appliedKeys(e).set(r, n);
257
+ k.appliedKeys(e).set(r, n);
258
258
  });
259
- }), $.names(e, `${l.prefix}enhance-new`).forEach((r) => {
259
+ }), k.names(e, `${l.prefix}enhance-new`).forEach((r) => {
260
260
  const i = `${je}${r}`;
261
- if ($.instances.get(e)?.has(i))
261
+ if (k.instances.get(e)?.has(i))
262
262
  return;
263
- const n = $.resolveGlobal(r);
264
- n !== null && $.run(`enhance-new "${r}"`, () => {
263
+ const n = k.resolveGlobal(r);
264
+ n !== null && k.run(`enhance-new "${r}"`, () => {
265
265
  const s = new n(e);
266
- $.appliedKeys(e).set(i, s);
266
+ k.appliedKeys(e).set(i, s);
267
267
  });
268
268
  });
269
269
  }
@@ -274,15 +274,15 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
274
274
  * @returns 戻り値はありません。
275
275
  */
276
276
  static refreshElement(e) {
277
- const t = $.instances.get(e);
278
- $.names(e, `${l.prefix}enhance`).forEach((r) => {
277
+ const t = k.instances.get(e);
278
+ k.names(e, `${l.prefix}enhance`).forEach((r) => {
279
279
  if (!t || !t.has(r))
280
280
  return;
281
- const i = $.enhancers.get(r);
282
- !i || typeof i.refresh != "function" || $.run(`enhance "${r}" refresh`, () => {
281
+ const i = k.enhancers.get(r);
282
+ !i || typeof i.refresh != "function" || k.run(`enhance "${r}" refresh`, () => {
283
283
  i.refresh(e, t.get(r));
284
284
  });
285
- }), $.applyElement(e);
285
+ }), k.applyElement(e);
286
286
  }
287
287
  /**
288
288
  * 1 要素の連携を破棄します。
@@ -291,15 +291,15 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
291
291
  * @returns 戻り値はありません。
292
292
  */
293
293
  static destroyElement(e) {
294
- const t = $.instances.get(e);
294
+ const t = k.instances.get(e);
295
295
  t && (t.forEach((r, i) => {
296
296
  if (i.startsWith(je))
297
297
  return;
298
- const n = $.enhancers.get(i);
299
- !n || typeof n.destroy != "function" || $.run(`enhance "${i}" destroy`, () => {
298
+ const n = k.enhancers.get(i);
299
+ !n || typeof n.destroy != "function" || k.run(`enhance "${i}" destroy`, () => {
300
300
  n.destroy(e, r);
301
301
  });
302
- }), $.instances.delete(e));
302
+ }), k.instances.delete(e));
303
303
  }
304
304
  /**
305
305
  * 要素の適用状況を返します(無ければ作成します)。
@@ -308,11 +308,11 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
308
308
  * @returns キー → インスタンスの対応
309
309
  */
310
310
  static appliedKeys(e) {
311
- const t = $.instances.get(e);
311
+ const t = k.instances.get(e);
312
312
  if (t)
313
313
  return t;
314
314
  const r = /* @__PURE__ */ new Map();
315
- return $.instances.set(e, r), r;
315
+ return k.instances.set(e, r), r;
316
316
  }
317
317
  /**
318
318
  * 空白区切りの属性値を名前の一覧へ分解します。
@@ -353,7 +353,7 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
353
353
  if (t = t[r], t === void 0)
354
354
  break;
355
355
  }
356
- return typeof t != "function" ? (q.isEnabled() && !$.warnedMissingGlobals.has(e) && ($.warnedMissingGlobals.add(e), m.warn(
356
+ return typeof t != "function" ? (q.isEnabled() && !k.warnedMissingGlobals.has(e) && (k.warnedMissingGlobals.add(e), m.warn(
357
357
  "[Haori]",
358
358
  `${l.prefix}enhance-new could not resolve the global reference (load the library before Haori runs): ${e}`
359
359
  )), null) : t;
@@ -365,7 +365,7 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
365
365
  * @returns 戻り値はありません。
366
366
  */
367
367
  static warnUnknownName(e) {
368
- !q.isEnabled() || $.warnedUnknownNames.has(e) || ($.warnedUnknownNames.add(e), m.warn(
368
+ !q.isEnabled() || k.warnedUnknownNames.has(e) || (k.warnedUnknownNames.add(e), m.warn(
369
369
  "[Haori]",
370
370
  `Enhancer "${e}" is not registered yet; the declaration is kept pending and applied when it is registered (Haori.enhancers.register('${e}', {init(el) {...}})).`
371
371
  ));
@@ -387,8 +387,8 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
387
387
  }
388
388
  }
389
389
  };
390
- $.enhancers = /* @__PURE__ */ new Map(), $.instances = /* @__PURE__ */ new WeakMap(), $.warnedUnknownNames = /* @__PURE__ */ new Set(), $.warnedMissingGlobals = /* @__PURE__ */ new Set();
391
- let se = $;
390
+ k.enhancers = /* @__PURE__ */ new Map(), k.instances = /* @__PURE__ */ new WeakMap(), k.warnedUnknownNames = /* @__PURE__ */ new Set(), k.warnedMissingGlobals = /* @__PURE__ */ new Set();
391
+ let se = k;
392
392
  const Ze = "yyyy/MM/dd HH:mm", bt = "en-US", Ke = 1e4;
393
393
  function oe(y) {
394
394
  return String(y).padStart(2, "0");
@@ -429,7 +429,7 @@ function _e(y, e) {
429
429
  const i = Number(r.year), n = Number(r.month), s = Number(r.day), a = Number(r.hour), o = Number(r.minute), c = Number(r.second);
430
430
  return !Number.isFinite(i) || !Number.isFinite(n) || !Number.isFinite(s) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(c) ? null : Qe(i, n, s, a, o, c);
431
431
  }
432
- function $e(y, e = Ze, t) {
432
+ function ke(y, e = Ze, t) {
433
433
  if (y == null || y === "")
434
434
  return "";
435
435
  const r = y instanceof Date ? y : new Date(y);
@@ -456,7 +456,7 @@ function $e(y, e = Ze, t) {
456
456
  }
457
457
  const Et = "yyyy-MM-dd";
458
458
  function et(y = Ze, e) {
459
- return $e(/* @__PURE__ */ new Date(), y, e);
459
+ return ke(/* @__PURE__ */ new Date(), y, e);
460
460
  }
461
461
  function tt(y = 0, e = Et, t) {
462
462
  const r = Number.isFinite(y) ? Math.trunc(y) : 0, i = typeof t == "string" && t.trim() !== "" ? t.trim() : "";
@@ -471,7 +471,7 @@ function tt(y = 0, e = Et, t) {
471
471
  n = c.getFullYear(), s = c.getMonth() + 1, a = c.getDate();
472
472
  }
473
473
  const o = new Date(Date.UTC(n, s - 1, a + r));
474
- return $e(o, e, "UTC");
474
+ return ke(o, e, "UTC");
475
475
  }
476
476
  function rt(y, e) {
477
477
  if (y == null)
@@ -550,7 +550,7 @@ function De(y, e) {
550
550
  const t = Number(y);
551
551
  return Number.isFinite(t) ? Math.trunc(t) : e;
552
552
  }
553
- function ke(y, e) {
553
+ function $e(y, e) {
554
554
  if (typeof y != "string")
555
555
  return "";
556
556
  const t = At.exec(y.trim());
@@ -564,7 +564,7 @@ function ke(y, e) {
564
564
  }
565
565
  function St(y) {
566
566
  if (typeof y == "string" && y.trim() !== "")
567
- return ke(y, 0);
567
+ return $e(y, 0);
568
568
  const e = /* @__PURE__ */ new Date();
569
569
  return `${String(e.getFullYear()).padStart(4, "0")}-${oe(e.getMonth() + 1)}`;
570
570
  }
@@ -577,7 +577,7 @@ function st(y, e) {
577
577
  return [];
578
578
  const i = Math.min(t, vt), n = [];
579
579
  for (let s = 0; s <= i; s += 1) {
580
- const a = ke(r, -s);
580
+ const a = $e(r, -s);
581
581
  n.push({ targetMonth: a, label: a.replace(/-/g, "/") });
582
582
  }
583
583
  return n;
@@ -649,13 +649,13 @@ function dt(y, e) {
649
649
  return r;
650
650
  }
651
651
  const wt = Object.freeze({
652
- date: $e,
652
+ date: ke,
653
653
  now: et,
654
654
  today: tt,
655
655
  number: rt,
656
656
  pages: nt,
657
657
  range: it,
658
- monthAdd: ke,
658
+ monthAdd: $e,
659
659
  monthRange: st,
660
660
  pageSummary: at,
661
661
  findBy: ot,
@@ -795,7 +795,7 @@ const qe = class qe {
795
795
  };
796
796
  qe.ASYNC_QUEUE = new He();
797
797
  let G = qe;
798
- const T = class T {
798
+ const D = class D {
799
799
  /**
800
800
  * ストレージを、参照が例外になる環境でも安全に読み出します。
801
801
  *
@@ -833,8 +833,8 @@ const T = class T {
833
833
  e.history,
834
834
  // 参照だけで例外になり得るのはこの 2 つのみ(他は同一オリジンの自 window
835
835
  // 由来で常に読める)。ホットパスなので、囲むのも必要な箇所だけに絞る。
836
- T.readStorageSafely(() => e.localStorage),
837
- T.readStorageSafely(() => e.sessionStorage),
836
+ D.readStorageSafely(() => e.localStorage),
837
+ D.readStorageSafely(() => e.sessionStorage),
838
838
  e.fetch,
839
839
  e.Function,
840
840
  e.setTimeout,
@@ -1182,7 +1182,7 @@ let ${e.join(", ")};`;
1182
1182
  s.push(c), c && n.push({
1183
1183
  start: o.position + 1,
1184
1184
  end: o.position + 1,
1185
- text: T.MEMBER_KEY_GUARD_OPEN
1185
+ text: D.MEMBER_KEY_GUARD_OPEN
1186
1186
  });
1187
1187
  } else o.value === "]" && s.pop() === !0 && n.push({
1188
1188
  start: o.position,
@@ -1724,14 +1724,14 @@ return (${g});${p}`;
1724
1724
  * @returns 食い違っている場合は両辺の型。該当しない場合は null
1725
1725
  */
1726
1726
  static diagnoseStrictComparison(e, t = {}) {
1727
- const r = T.splitStrictComparison(e);
1727
+ const r = D.splitStrictComparison(e);
1728
1728
  if (r === null)
1729
1729
  return null;
1730
- const i = T.evaluateDetailed(r.left, t), n = T.evaluateDetailed(r.right, t);
1730
+ const i = D.evaluateDetailed(r.left, t), n = D.evaluateDetailed(r.right, t);
1731
1731
  if (i.unresolvedReference || n.unresolvedReference)
1732
1732
  return null;
1733
1733
  const s = i.value, a = n.value;
1734
- return typeof s == typeof a || !T.isLooselyEqual(s, a) ? null : { left: typeof s, right: typeof a };
1734
+ return typeof s == typeof a || !D.isLooselyEqual(s, a) ? null : { left: typeof s, right: typeof a };
1735
1735
  }
1736
1736
  /**
1737
1737
  * 型をまたいだ緩い比較(`==`)を行います。
@@ -1758,11 +1758,11 @@ return (${g});${p}`;
1758
1758
  * @returns 左辺と右辺。単一の厳密比較でない場合は null
1759
1759
  */
1760
1760
  static splitStrictComparison(e) {
1761
- const t = T.strictComparisonSplits.get(e);
1761
+ const t = D.strictComparisonSplits.get(e);
1762
1762
  if (t !== void 0)
1763
1763
  return t;
1764
- const r = T.computeStrictComparisonSplit(e);
1765
- return T.strictComparisonSplits.set(e, r), r;
1764
+ const r = D.computeStrictComparisonSplit(e);
1765
+ return D.strictComparisonSplits.set(e, r), r;
1766
1766
  }
1767
1767
  /**
1768
1768
  * 式を単一の厳密比較として分割します(記憶しない実体)。
@@ -1771,7 +1771,7 @@ return (${g});${p}`;
1771
1771
  * @returns 左辺と右辺。単一の厳密比較でない場合は null
1772
1772
  */
1773
1773
  static computeStrictComparisonSplit(e) {
1774
- const t = T.tokenizeExpression(e);
1774
+ const t = D.tokenizeExpression(e);
1775
1775
  if (t === null)
1776
1776
  return null;
1777
1777
  let r = 0, i = null;
@@ -1787,7 +1787,7 @@ return (${g});${p}`;
1787
1787
  }
1788
1788
  if (r === 0) {
1789
1789
  if (a.value === "&&")
1790
- return T.splitStrictComparison(
1790
+ return D.splitStrictComparison(
1791
1791
  e.slice(0, a.position)
1792
1792
  );
1793
1793
  if (a.value === "===") {
@@ -1796,7 +1796,7 @@ return (${g});${p}`;
1796
1796
  i = a;
1797
1797
  continue;
1798
1798
  }
1799
- if (T.COMPOSING_OPERATORS.has(a.value))
1799
+ if (D.COMPOSING_OPERATORS.has(a.value))
1800
1800
  return null;
1801
1801
  }
1802
1802
  }
@@ -2274,9 +2274,9 @@ return (${g});${p}`;
2274
2274
  return this.forbiddenBindingValueCache.set(e, !1), !1;
2275
2275
  }
2276
2276
  };
2277
- T.MAX_IDENTIFIER_RECOVERY_COUNT = 8, T.BUILTIN_NAMESPACE = "haori", T.BUILTIN_HELPERS = {
2277
+ D.MAX_IDENTIFIER_RECOVERY_COUNT = 8, D.BUILTIN_NAMESPACE = "haori", D.BUILTIN_HELPERS = {
2278
2278
  ...wt
2279
- }, T.BUILTIN_REFERENCE_PATTERN = /(^|[^\w$.])haori(?![\w$])/, T.BUILTIN_DATA_PROPERTY = "data", T.BUILTIN_DATA_REFERENCE_PATTERN = /(^|[^\w$.])haori\s*(\.\s*data(?![\w$])|\[)/, T.IDENTIFIER_NAME_PATTERN = /^[\p{ID_Start}$_][\p{ID_Continue}$\u200C\u200D]*$/u, T.usableBindingKeyCache = /* @__PURE__ */ new Map(), T.loggedUnusableBindingKeys = /* @__PURE__ */ new Set(), T.compileFailedExpressions = /* @__PURE__ */ new Set(), T.forbiddenBindingValueCache = /* @__PURE__ */ new WeakMap(), T.forbiddenBindingValueCacheResetScheduled = !1, T.loggedForbiddenKeySignatures = /* @__PURE__ */ new Set(), T.loggedForbiddenKeyResetScheduled = !1, T.FORBIDDEN_NAMES = [
2279
+ }, D.BUILTIN_REFERENCE_PATTERN = /(^|[^\w$.])haori(?![\w$])/, D.BUILTIN_DATA_PROPERTY = "data", D.BUILTIN_DATA_REFERENCE_PATTERN = /(^|[^\w$.])haori\s*(\.\s*data(?![\w$])|\[)/, D.IDENTIFIER_NAME_PATTERN = /^[\p{ID_Start}$_][\p{ID_Continue}$\u200C\u200D]*$/u, D.usableBindingKeyCache = /* @__PURE__ */ new Map(), D.loggedUnusableBindingKeys = /* @__PURE__ */ new Set(), D.compileFailedExpressions = /* @__PURE__ */ new Set(), D.forbiddenBindingValueCache = /* @__PURE__ */ new WeakMap(), D.forbiddenBindingValueCacheResetScheduled = !1, D.loggedForbiddenKeySignatures = /* @__PURE__ */ new Set(), D.loggedForbiddenKeyResetScheduled = !1, D.FORBIDDEN_NAMES = [
2280
2280
  // グローバルオブジェクト
2281
2281
  "window",
2282
2282
  "self",
@@ -2308,7 +2308,7 @@ T.MAX_IDENTIFIER_RECOVERY_COUNT = 8, T.BUILTIN_NAMESPACE = "haori", T.BUILTIN_HE
2308
2308
  "sessionStorage",
2309
2309
  "IndexedDB",
2310
2310
  "history"
2311
- ], T.STRICT_FORBIDDEN_NAMES = ["eval", "arguments"], T.REBINDABLE_FORBIDDEN_NAMES = /* @__PURE__ */ new Set([
2311
+ ], D.STRICT_FORBIDDEN_NAMES = ["eval", "arguments"], D.REBINDABLE_FORBIDDEN_NAMES = /* @__PURE__ */ new Set([
2312
2312
  "location",
2313
2313
  "history",
2314
2314
  "document",
@@ -2316,23 +2316,23 @@ T.MAX_IDENTIFIER_RECOVERY_COUNT = 8, T.BUILTIN_NAMESPACE = "haori", T.BUILTIN_HE
2316
2316
  "localStorage",
2317
2317
  "sessionStorage",
2318
2318
  "IndexedDB"
2319
- ]), T.FORBIDDEN_BINDING_NAMES = /* @__PURE__ */ new Set([
2320
- ...T.FORBIDDEN_NAMES.filter(
2321
- (e) => !T.REBINDABLE_FORBIDDEN_NAMES.has(e)
2319
+ ]), D.FORBIDDEN_BINDING_NAMES = /* @__PURE__ */ new Set([
2320
+ ...D.FORBIDDEN_NAMES.filter(
2321
+ (e) => !D.REBINDABLE_FORBIDDEN_NAMES.has(e)
2322
2322
  ),
2323
2323
  "constructor",
2324
2324
  "__proto__",
2325
2325
  "prototype",
2326
- ...T.STRICT_FORBIDDEN_NAMES
2327
- ]), T.FORBIDDEN_PROPERTY_NAMES = /* @__PURE__ */ new Set([
2326
+ ...D.STRICT_FORBIDDEN_NAMES
2327
+ ]), D.FORBIDDEN_PROPERTY_NAMES = /* @__PURE__ */ new Set([
2328
2328
  "constructor",
2329
2329
  "__proto__",
2330
2330
  "prototype"
2331
- ]), T.OBJECT_PROPERTY_MODIFIERS = /* @__PURE__ */ new Set([
2331
+ ]), D.OBJECT_PROPERTY_MODIFIERS = /* @__PURE__ */ new Set([
2332
2332
  "get",
2333
2333
  "set",
2334
2334
  "async"
2335
- ]), T.DISALLOWED_KEYWORDS = /* @__PURE__ */ new Set([
2335
+ ]), D.DISALLOWED_KEYWORDS = /* @__PURE__ */ new Set([
2336
2336
  "await",
2337
2337
  "break",
2338
2338
  "case",
@@ -2366,7 +2366,7 @@ T.MAX_IDENTIFIER_RECOVERY_COUNT = 8, T.BUILTIN_NAMESPACE = "haori", T.BUILTIN_HE
2366
2366
  "while",
2367
2367
  "with",
2368
2368
  "yield"
2369
- ]), T.NON_SHADOWABLE_IDENTIFIERS = /* @__PURE__ */ new Set([
2369
+ ]), D.NON_SHADOWABLE_IDENTIFIERS = /* @__PURE__ */ new Set([
2370
2370
  // リテラル・グローバル定数
2371
2371
  "true",
2372
2372
  "false",
@@ -2384,7 +2384,7 @@ T.MAX_IDENTIFIER_RECOVERY_COUNT = 8, T.BUILTIN_NAMESPACE = "haori", T.BUILTIN_HE
2384
2384
  "public",
2385
2385
  "static",
2386
2386
  "super"
2387
- ]), T.ALLOWED_GLOBAL_IDENTIFIERS = /* @__PURE__ */ new Set([
2387
+ ]), D.ALLOWED_GLOBAL_IDENTIFIERS = /* @__PURE__ */ new Set([
2388
2388
  // 名前空間オブジェクト
2389
2389
  "Math",
2390
2390
  "JSON",
@@ -2440,10 +2440,10 @@ T.MAX_IDENTIFIER_RECOVERY_COUNT = 8, T.BUILTIN_NAMESPACE = "haori", T.BUILTIN_HE
2440
2440
  "encodeURIComponent",
2441
2441
  "decodeURI",
2442
2442
  "decodeURIComponent"
2443
- ]), T.EXPRESSION_CACHE = /* @__PURE__ */ new Map(), T.FREE_IDENTIFIER_CACHE = /* @__PURE__ */ new Map(), T.BOUND_IDENTIFIER_CACHE = /* @__PURE__ */ new Map(), T.OPTIONAL_CHAIN_CACHE = /* @__PURE__ */ new Map(), T.GUARDED_MEMBER_CACHE = /* @__PURE__ */ new Map(), T.MEMBER_KEY_GUARD_OPEN = "(_hk=>_hk==='constructor'||_hk==='__proto__'||_hk==='prototype'?undefined:_hk)(", T.FORBIDDEN_NAME_PATTERNS = T.FORBIDDEN_NAMES.map((e) => ({
2443
+ ]), D.EXPRESSION_CACHE = /* @__PURE__ */ new Map(), D.FREE_IDENTIFIER_CACHE = /* @__PURE__ */ new Map(), D.BOUND_IDENTIFIER_CACHE = /* @__PURE__ */ new Map(), D.OPTIONAL_CHAIN_CACHE = /* @__PURE__ */ new Map(), D.GUARDED_MEMBER_CACHE = /* @__PURE__ */ new Map(), D.MEMBER_KEY_GUARD_OPEN = "(_hk=>_hk==='constructor'||_hk==='__proto__'||_hk==='prototype'?undefined:_hk)(", D.FORBIDDEN_NAME_PATTERNS = D.FORBIDDEN_NAMES.map((e) => ({
2444
2444
  name: e,
2445
2445
  pattern: new RegExp(`(^|[^\\w$.])${e}(?![\\w$])`)
2446
- })), T.FORBIDDEN_IDENTIFIER_CACHE = /* @__PURE__ */ new Map(), T.pendingUnresolvedIdentifiers = /* @__PURE__ */ new Set(), T.unresolvedReportScheduled = !1, T.suppliedIdentifiers = /* @__PURE__ */ new Set(), T.pendingScopeMissingIdentifiers = /* @__PURE__ */ new Map(), T.scopeMissingReportScheduled = !1, T.rowScopeIdentifiers = /* @__PURE__ */ new Set(), T.loggedScopeMissingIdentifiers = /* @__PURE__ */ new Set(), T.loggedBlockedIdentifierExpressions = /* @__PURE__ */ new Set(), T.COMPOSING_OPERATORS = /* @__PURE__ */ new Set([
2446
+ })), D.FORBIDDEN_IDENTIFIER_CACHE = /* @__PURE__ */ new Map(), D.pendingUnresolvedIdentifiers = /* @__PURE__ */ new Set(), D.unresolvedReportScheduled = !1, D.suppliedIdentifiers = /* @__PURE__ */ new Set(), D.pendingScopeMissingIdentifiers = /* @__PURE__ */ new Map(), D.scopeMissingReportScheduled = !1, D.rowScopeIdentifiers = /* @__PURE__ */ new Set(), D.loggedScopeMissingIdentifiers = /* @__PURE__ */ new Set(), D.loggedBlockedIdentifierExpressions = /* @__PURE__ */ new Set(), D.COMPOSING_OPERATORS = /* @__PURE__ */ new Set([
2447
2447
  "||",
2448
2448
  "?",
2449
2449
  ":",
@@ -2462,14 +2462,14 @@ T.MAX_IDENTIFIER_RECOVERY_COUNT = 8, T.BUILTIN_NAMESPACE = "haori", T.BUILTIN_HE
2462
2462
  "/",
2463
2463
  "%",
2464
2464
  "..."
2465
- ]), T.strictComparisonSplits = /* @__PURE__ */ new Map(), T.WRAPPED_VALUES = /* @__PURE__ */ new WeakSet();
2466
- let ee = T;
2467
- const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fieldset", k = class k {
2465
+ ]), D.strictComparisonSplits = /* @__PURE__ */ new Map(), D.WRAPPED_VALUES = /* @__PURE__ */ new WeakSet();
2466
+ let ee = D;
2467
+ const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fieldset", P = class P {
2468
2468
  /**
2469
2469
  * 集計状態を初期化します。
2470
2470
  */
2471
2471
  static reset() {
2472
- k.ELEMENT_STORES.clear(), k.ensureGlobalAccess();
2472
+ P.ELEMENT_STORES.clear(), P.ensureGlobalAccess();
2473
2473
  }
2474
2474
  /**
2475
2475
  * 集計を開始します。
@@ -2477,7 +2477,7 @@ const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2477
2477
  * @returns 戻り値はありません。
2478
2478
  */
2479
2479
  static start() {
2480
- k.collecting = !0;
2480
+ P.collecting = !0;
2481
2481
  }
2482
2482
  /**
2483
2483
  * 集計を停止します。
@@ -2485,7 +2485,7 @@ const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2485
2485
  * @returns 戻り値はありません。
2486
2486
  */
2487
2487
  static stop() {
2488
- k.collecting = !1;
2488
+ P.collecting = !1;
2489
2489
  }
2490
2490
  /**
2491
2491
  * 集計中かどうかを返します。
@@ -2493,7 +2493,7 @@ const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2493
2493
  * @returns 集計中なら true
2494
2494
  */
2495
2495
  static isCollecting() {
2496
- return k.collecting && q.isEnabled();
2496
+ return P.collecting && q.isEnabled();
2497
2497
  }
2498
2498
  /**
2499
2499
  * 現在の集計結果スナップショットを返します。
@@ -2501,7 +2501,7 @@ const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2501
2501
  * @returns エレメントごとの集計結果
2502
2502
  */
2503
2503
  static snapshot() {
2504
- return k.ensureGlobalAccess(), [...k.ELEMENT_STORES.entries()].map(([e, t]) => ({
2504
+ return P.ensureGlobalAccess(), [...P.ELEMENT_STORES.entries()].map(([e, t]) => ({
2505
2505
  elementId: e,
2506
2506
  tagName: t.tagName,
2507
2507
  attributes: [...t.attributes.entries()].map(([r, i]) => ({
@@ -2510,7 +2510,7 @@ const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2510
2510
  calls: i.calls,
2511
2511
  totalDurationMs: i.totalDurationMs,
2512
2512
  maxDurationMs: i.maxDurationMs,
2513
- placeholders: k.sortPlaceholders(
2513
+ placeholders: P.sortPlaceholders(
2514
2514
  i.placeholders
2515
2515
  )
2516
2516
  })).sort((r, i) => i.calls - r.calls),
@@ -2520,7 +2520,7 @@ const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2520
2520
  calls: i.calls,
2521
2521
  totalDurationMs: i.totalDurationMs,
2522
2522
  maxDurationMs: i.maxDurationMs,
2523
- placeholders: k.sortPlaceholders(
2523
+ placeholders: P.sortPlaceholders(
2524
2524
  i.placeholders
2525
2525
  )
2526
2526
  })).sort((r, i) => i.calls - r.calls)
@@ -2544,7 +2544,7 @@ const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2544
2544
  * @param limit 出力する宣言の数。既定は 20
2545
2545
  * @returns 要約。合計は `limit` で絞る前の全件から求める
2546
2546
  */
2547
- static report(e = k.DEFAULT_REPORT_LIMIT) {
2547
+ static report(e = P.DEFAULT_REPORT_LIMIT) {
2548
2548
  const t = /* @__PURE__ */ new Map();
2549
2549
  let r = 0, i = 0;
2550
2550
  const n = (c, u, d) => {
@@ -2568,7 +2568,7 @@ const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2568
2568
  d.maxDurationMs
2569
2569
  ), d.totalDurationMs > p.representativeDurationMs && (p.where = u, p.representativeDurationMs = d.totalDurationMs);
2570
2570
  };
2571
- k.snapshot().forEach((c) => {
2571
+ P.snapshot().forEach((c) => {
2572
2572
  c.attributes.forEach((u) => {
2573
2573
  n(
2574
2574
  `@${u.name}
@@ -2598,7 +2598,7 @@ ${u.template}`,
2598
2598
  entryCount: s.length,
2599
2599
  top: a
2600
2600
  };
2601
- return k.logReport(o), o;
2601
+ return P.logReport(o), o;
2602
2602
  }
2603
2603
  /**
2604
2604
  * 要約を表形式でコンソールへ出力します。
@@ -2628,30 +2628,30 @@ ${u.template}`,
2628
2628
  * @param expressions 今回評価した式一覧
2629
2629
  */
2630
2630
  static record(e, t, r) {
2631
- if (!q.isEnabled() || !e || t.length === 0 || (k.ensureGlobalAccess(), !k.isCollecting()))
2631
+ if (!q.isEnabled() || !e || t.length === 0 || (P.ensureGlobalAccess(), !P.isCollecting()))
2632
2632
  return;
2633
- const i = k.getOrCreateElementStore(
2633
+ const i = P.getOrCreateElementStore(
2634
2634
  e.element
2635
2635
  );
2636
2636
  if (e.kind === "attribute") {
2637
- const s = k.getOrCreateCounter(
2637
+ const s = P.getOrCreateCounter(
2638
2638
  i.attributes,
2639
2639
  e.rawName,
2640
2640
  e.template
2641
2641
  );
2642
- k.updateCounter(
2642
+ P.updateCounter(
2643
2643
  s,
2644
2644
  t,
2645
2645
  r
2646
2646
  );
2647
2647
  return;
2648
2648
  }
2649
- const n = k.getOrCreateCounter(
2649
+ const n = P.getOrCreateCounter(
2650
2650
  i.texts,
2651
2651
  String(e.childIndex),
2652
2652
  e.template
2653
2653
  );
2654
- k.updateCounter(
2654
+ P.updateCounter(
2655
2655
  n,
2656
2656
  t,
2657
2657
  r
@@ -2664,12 +2664,12 @@ ${u.template}`,
2664
2664
  if (!q.isEnabled())
2665
2665
  return;
2666
2666
  const e = globalThis;
2667
- e[k.GLOBAL_KEY] === void 0 && (e[k.GLOBAL_KEY] = {
2668
- start: () => k.start(),
2669
- stop: () => k.stop(),
2670
- reset: () => k.reset(),
2671
- snapshot: () => k.snapshot(),
2672
- report: (t) => k.report(t)
2667
+ e[P.GLOBAL_KEY] === void 0 && (e[P.GLOBAL_KEY] = {
2668
+ start: () => P.start(),
2669
+ stop: () => P.stop(),
2670
+ reset: () => P.reset(),
2671
+ snapshot: () => P.snapshot(),
2672
+ report: (t) => P.report(t)
2673
2673
  });
2674
2674
  }
2675
2675
  /**
@@ -2679,7 +2679,7 @@ ${u.template}`,
2679
2679
  * @returns 集計ストア
2680
2680
  */
2681
2681
  static getOrCreateElementStore(e) {
2682
- const t = k.createElementId(e), r = k.ELEMENT_STORES.get(t);
2682
+ const t = P.createElementId(e), r = P.ELEMENT_STORES.get(t);
2683
2683
  if (r)
2684
2684
  return r;
2685
2685
  const i = {
@@ -2687,7 +2687,7 @@ ${u.template}`,
2687
2687
  attributes: /* @__PURE__ */ new Map(),
2688
2688
  texts: /* @__PURE__ */ new Map()
2689
2689
  };
2690
- return k.ELEMENT_STORES.set(t, i), i;
2690
+ return P.ELEMENT_STORES.set(t, i), i;
2691
2691
  }
2692
2692
  /**
2693
2693
  * カウンタを取得または初期化します。
@@ -2737,7 +2737,7 @@ ${u.template}`,
2737
2737
  */
2738
2738
  static updateCounter(e, t, r) {
2739
2739
  e.calls += 1, e.totalDurationMs += r, e.maxDurationMs = Math.max(e.maxDurationMs, r), t.forEach((i) => {
2740
- const n = k.getOrCreatePlaceholder(
2740
+ const n = P.getOrCreatePlaceholder(
2741
2741
  e.placeholders,
2742
2742
  i.expression
2743
2743
  );
@@ -2776,12 +2776,12 @@ ${u.template}`,
2776
2776
  * @returns 結果と所要時間
2777
2777
  */
2778
2778
  static measure(e) {
2779
- if (!k.isCollecting())
2779
+ if (!P.isCollecting())
2780
2780
  return { value: e(), durationMs: 0 };
2781
- const t = k.now();
2781
+ const t = P.now();
2782
2782
  return {
2783
2783
  value: e(),
2784
- durationMs: k.now() - t
2784
+ durationMs: P.now() - t
2785
2785
  };
2786
2786
  }
2787
2787
  /**
@@ -2808,8 +2808,8 @@ ${u.template}`,
2808
2808
  return t.join(" > ");
2809
2809
  }
2810
2810
  };
2811
- k.GLOBAL_KEY = "__HAORI_EVALUATION_PROFILE__", k.ELEMENT_STORES = /* @__PURE__ */ new Map(), k.collecting = !1, k.DEFAULT_REPORT_LIMIT = 20;
2812
- let Fe = k;
2811
+ P.GLOBAL_KEY = "__HAORI_EVALUATION_PROFILE__", P.ELEMENT_STORES = /* @__PURE__ */ new Map(), P.collecting = !1, P.DEFAULT_REPORT_LIMIT = 20;
2812
+ let Fe = P;
2813
2813
  const pe = class pe {
2814
2814
  /**
2815
2815
  * フラグメントのコンストラクタ。
@@ -2827,7 +2827,7 @@ const pe = class pe {
2827
2827
  let t;
2828
2828
  switch (e.nodeType) {
2829
2829
  case Node.ELEMENT_NODE:
2830
- t = new D(e);
2830
+ t = new T(e);
2831
2831
  break;
2832
2832
  case Node.TEXT_NODE:
2833
2833
  t = new re(e);
@@ -3122,10 +3122,46 @@ const w = class w extends M {
3122
3122
  /**
3123
3123
  * バインドデータを設定します。
3124
3124
  *
3125
+ * 予約キー(`_` 始まりのエンジン管理変数)は、新しいデータが同じキーを持たない
3126
+ * 限り引き継ぎます(仕様「`data-bind`」)。予約キーは `data-bind` 属性へ書き出さ
3127
+ * ないため、宣言を取り込む側も外部から属性を書き換える側もこの値を運べません。
3128
+ * 引き継がないと、`data-if` が真になったときの子の初期化や外部からの書き換えの
3129
+ * たびに `_fetch` / `_poll` が消え、注入した状態が「まだ何も起きていない」状態と
3130
+ * 区別できなくなります。明示的に落とす場合はキー自体を持たせてください
3131
+ * (`{_fetch: undefined}`)。
3132
+ *
3125
3133
  * @param data バインドデータ
3126
3134
  */
3127
3135
  setBindingData(e) {
3128
- this.bindingData = e, this.clearBindingDataCache();
3136
+ this.bindingData = this.withRetainedReservedKeys(e), this.clearBindingDataCache();
3137
+ }
3138
+ /**
3139
+ * 新しいバインドデータへ、現在の予約キーのうち引き継ぐものを足します。
3140
+ *
3141
+ * @param data 新しいバインドデータ
3142
+ * @returns 予約キーを引き継いだバインドデータ
3143
+ */
3144
+ withRetainedReservedKeys(e) {
3145
+ const t = this.bindingData;
3146
+ if (t === null)
3147
+ return e;
3148
+ const r = {};
3149
+ for (const i of Object.keys(t))
3150
+ w.isReservedBindingKey(i) && (r[i] = t[i]);
3151
+ return { ...r, ...e };
3152
+ }
3153
+ /**
3154
+ * 予約キー(エンジン管理変数)かどうかを判定します。
3155
+ *
3156
+ * `_fetch` / `_poll` など、Haori が実行時に注入し、`data-bind` 属性へ書き出さない
3157
+ * 値が対象です(仕様「`data-bind`」)。`data-bind` 属性へのミラー
3158
+ * (`Core.setBindingData()`)も同じ判定で対象から外します。
3159
+ *
3160
+ * @param key 判定対象のキー
3161
+ * @returns 予約キーなら true
3162
+ */
3163
+ static isReservedBindingKey(e) {
3164
+ return e.startsWith("_");
3129
3165
  }
3130
3166
  /**
3131
3167
  * バインドデータ更新に伴う DOM 反映・再評価を、同一フラグメントでは呼出順
@@ -4310,14 +4346,14 @@ const w = class w extends M {
4310
4346
  c
4311
4347
  );
4312
4348
  }
4313
- const x = o.isForceEvaluation() ? r : g ? A : E, U = i && o.isEvaluate && t === "value" && w.isValuePropertyTarget(c), K = c.getRootNode(), R = U && w.isUserEditableValue(c) && (c === K.activeElement || this.hasPendingUserEdit()), S = W || x === null || x === !1 && !I ? null : String(x), H = e !== t && c.getAttribute(e) !== r, B = S === null ? c.hasAttribute(t) : c.getAttribute(t) !== S, te = S === null ? "" : S, ie = U && !R && c.value !== te, V = t === "checked" && c instanceof HTMLInputElement && (c.type === "checkbox" || c.type === "radio"), z = t === "selected" && c instanceof HTMLOptionElement, Z = K.activeElement, J = Z !== null && (V && c === Z || z && c.closest("select") === Z) || (V || z) && this.hasPendingCheckableUserEdit(z), ae = S !== null, Se = V && !J && c.checked !== ae, ce = z && !J && c.selected !== ae;
4314
- if (!H && !B && !ie && !Se && !ce)
4349
+ const x = o.isForceEvaluation() ? r : g ? A : E, U = i && o.isEvaluate && t === "value" && w.isValuePropertyTarget(c), K = c.getRootNode(), R = U && w.isUserEditableValue(c) && (c === K.activeElement || this.hasPendingUserEdit()), S = W || x === null || x === !1 && !I ? null : String(x), H = e !== t && c.getAttribute(e) !== r, O = S === null ? c.hasAttribute(t) : c.getAttribute(t) !== S, te = S === null ? "" : S, ie = U && !R && c.value !== te, V = t === "checked" && c instanceof HTMLInputElement && (c.type === "checkbox" || c.type === "radio"), z = t === "selected" && c instanceof HTMLOptionElement, Z = K.activeElement, J = Z !== null && (V && c === Z || z && c.closest("select") === Z) || (V || z) && this.hasPendingCheckableUserEdit(z), ae = S !== null, Se = V && !J && c.checked !== ae, ce = z && !J && c.selected !== ae;
4350
+ if (!H && !O && !ie && !Se && !ce)
4315
4351
  return U && !R && (this.value = this.normalizeValueForElement(
4316
4352
  c,
4317
4353
  te
4318
4354
  ), this.clearUnappliedValueWrite()), (V || z) && !J && this.syncCheckableValueFromDom(z), Promise.resolve();
4319
4355
  const We = G.enqueue(() => {
4320
- H && c.setAttribute(e, r), S === null ? c.removeAttribute(t) : B && (c.setAttribute(t, S), t === `${l.prefix}bind` && this.recordSelfWrittenBind(S)), U && !R && (this.value = this.normalizeValueForElement(
4356
+ H && c.setAttribute(e, r), S === null ? c.removeAttribute(t) : O && (c.setAttribute(t, S), t === `${l.prefix}bind` && this.recordSelfWrittenBind(S)), U && !R && (this.value = this.normalizeValueForElement(
4321
4357
  c,
4322
4358
  te
4323
4359
  ), ie && (c.value = te), this.recordValueWriteResult(c.value === te)), Se && (c.checked = ae), ce && (c.selected = ae), (Se || ce) && this.syncCheckableValueFromDom(ce);
@@ -4686,7 +4722,7 @@ w.NUMBER_INPUT_PATTERN = /^-?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/, w.VALUE
4686
4722
  "time",
4687
4723
  "week"
4688
4724
  ], w.UNAPPLIED_VALUE_WRITES = /* @__PURE__ */ new Set(), w.sequenceCounter = 0, w.bindingWorkActiveCount = 0, w.pendingMutationFlusher = null, w.loggedUnresolvedAttributes = /* @__PURE__ */ new Set(), w.loggedTypeMismatchedComparisons = /* @__PURE__ */ new Set();
4689
- let D = w;
4725
+ let T = w;
4690
4726
  class re extends M {
4691
4727
  /**
4692
4728
  * テキストフラグメントのコンストラクタ。
@@ -5180,7 +5216,7 @@ const Ee = class Ee {
5180
5216
  * @returns 整形済み文字列。整形できない場合は空文字
5181
5217
  */
5182
5218
  static date(e, t, r) {
5183
- return $e(e, t, r);
5219
+ return ke(e, t, r);
5184
5220
  }
5185
5221
  /**
5186
5222
  * 現在日時を指定フォーマットの文字列へ整形します。
@@ -5257,7 +5293,7 @@ const Ee = class Ee {
5257
5293
  * @returns 加算後の年月(`YYYY-MM` 形式)。不正な入力は空文字
5258
5294
  */
5259
5295
  static monthAdd(e, t) {
5260
- return ke(e, t);
5296
+ return $e(e, t);
5261
5297
  }
5262
5298
  /**
5263
5299
  * 基準月から過去方向へ `count + 1` 個の年月配列を降順で返します。
@@ -5612,7 +5648,7 @@ const h = class h {
5612
5648
  if (t instanceof HTMLSelectElement) {
5613
5649
  for (const r of Array.from(t.options)) {
5614
5650
  const i = M.get(r);
5615
- if (i instanceof D && h.hasDeclarativeBinding(i, "selected") && !h.isDeclarationResolved(i, "selected"))
5651
+ if (i instanceof T && h.hasDeclarativeBinding(i, "selected") && !h.isDeclarationResolved(i, "selected"))
5616
5652
  return !1;
5617
5653
  }
5618
5654
  return !0;
@@ -5655,7 +5691,7 @@ const h = class h {
5655
5691
  */
5656
5692
  static isDeclarativeStateBound(e) {
5657
5693
  const t = e.getTarget();
5658
- return t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio") ? h.hasDeclarativeBinding(e, "checked") : D.isValuePropertyTarget(t) ? h.hasDeclarativeBinding(e, "value") ? !0 : t instanceof HTMLSelectElement ? h.hasDeclarativeSelectedOption(t) : !1 : !1;
5694
+ return t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio") ? h.hasDeclarativeBinding(e, "checked") : T.isValuePropertyTarget(t) ? h.hasDeclarativeBinding(e, "value") ? !0 : t instanceof HTMLSelectElement ? h.hasDeclarativeSelectedOption(t) : !1 : !1;
5659
5695
  }
5660
5696
  /**
5661
5697
  * 対象の部分木にある入力欄を、ネイティブのフォームリセットと同じ既定値へ戻します。
@@ -5712,7 +5748,7 @@ const h = class h {
5712
5748
  }), t.selectedIndex = -1) : (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && (t.value = "");
5713
5749
  }
5714
5750
  e.getChildren().forEach((t) => {
5715
- t instanceof D && h.clearDeclarativeStateFromDom(t);
5751
+ t instanceof T && h.clearDeclarativeStateFromDom(t);
5716
5752
  });
5717
5753
  }
5718
5754
  /**
@@ -5742,7 +5778,7 @@ const h = class h {
5742
5778
  static hasDeclarativeSelectedOption(e) {
5743
5779
  for (const t of Array.from(e.options)) {
5744
5780
  const r = M.get(t);
5745
- if (r instanceof D && h.hasDeclarativeBinding(r, "selected"))
5781
+ if (r instanceof T && h.hasDeclarativeBinding(r, "selected"))
5746
5782
  return !0;
5747
5783
  }
5748
5784
  return !1;
@@ -6532,7 +6568,7 @@ const h = class h {
6532
6568
  static createRowKeyIndexes(e, t) {
6533
6569
  const r = /* @__PURE__ */ new Map();
6534
6570
  return e.forEach((i, n) => {
6535
- const s = L.createListKey(
6571
+ const s = $.createListKey(
6536
6572
  i,
6537
6573
  t,
6538
6574
  n
@@ -6650,7 +6686,7 @@ const h = class h {
6650
6686
  const t = `${l.prefix}form-arg`, r = e.getTarget().querySelectorAll(`form[${t}]`), i = [];
6651
6687
  return r.forEach((n) => {
6652
6688
  const s = M.get(n);
6653
- if (!(s instanceof D))
6689
+ if (!(s instanceof T))
6654
6690
  return;
6655
6691
  const a = s.getAttribute(t);
6656
6692
  a && i.push({ form: s, key: String(a) });
@@ -6683,9 +6719,9 @@ const h = class h {
6683
6719
  const a = e.getRawBindingData();
6684
6720
  if (a && Object.prototype.hasOwnProperty.call(a, t)) {
6685
6721
  const o = { ...a };
6686
- return delete o[t], L.setBindingData(n, o, {
6722
+ return delete o[t], $.setBindingData(n, o, {
6687
6723
  kind: i?.kind ?? "supply",
6688
- sequence: i?.sequence ?? D.nextSequence()
6724
+ sequence: i?.sequence ?? T.nextSequence()
6689
6725
  });
6690
6726
  }
6691
6727
  return h.syncValues(e, r, !1, i);
@@ -6730,7 +6766,7 @@ const h = class h {
6730
6766
  if (h.INITIAL_RESTORED_FORMS.has(i))
6731
6767
  continue;
6732
6768
  const n = M.get(i);
6733
- if (!(n instanceof D))
6769
+ if (!(n instanceof T))
6734
6770
  continue;
6735
6771
  const s = n.getRawBindingData(), a = n.getAttribute(`${l.prefix}form-arg`), o = a ? String(a) : null, c = o !== null && !(s && Object.prototype.hasOwnProperty.call(s, o)) ? h.resolveAncestorArgOwner(n, o) : null;
6736
6772
  if (!(!s && !c)) {
@@ -7050,11 +7086,11 @@ const h = class h {
7050
7086
  * 番号を持つことになり、後勝ちが逆転する
7051
7087
  * @returns すべての初期化処理が完了するPromise
7052
7088
  */
7053
- static async reset(e, t = D.nextSequence()) {
7089
+ static async reset(e, t = T.nextSequence()) {
7054
7090
  const r = h.collectBindingTargetForms(e);
7055
7091
  if (r.length > 0 && r.every((n) => n.isSupplyStale(t)))
7056
7092
  return;
7057
- h.markResetSubtree(e, t), L.clearUserEditMarks(e, t), h.clearValues(e), await Promise.all([
7093
+ h.markResetSubtree(e, t), $.clearUserEditMarks(e, t), h.clearValues(e), await Promise.all([
7058
7094
  h.clearMessages(e),
7059
7095
  h.clearEachClones(e)
7060
7096
  ]), await G.enqueue(() => {
@@ -7067,11 +7103,11 @@ const h = class h {
7067
7103
  const i = r;
7068
7104
  for (const n of i) {
7069
7105
  const s = h.getInitialBindingData(n);
7070
- s === null && n.getRawBindingData() === null || await L.setBindingData(n.getTarget(), s ?? {}, {
7106
+ s === null && n.getRawBindingData() === null || await $.setBindingData(n.getTarget(), s ?? {}, {
7071
7107
  sequence: t
7072
7108
  });
7073
7109
  }
7074
- h.syncValuesFromDom(e), await L.evaluateAll(e);
7110
+ h.syncValuesFromDom(e), await $.evaluateAll(e);
7075
7111
  for (const n of i)
7076
7112
  h.getInitialBindingData(n) !== null || n.getRawBindingData() !== null || await h.restoreAncestorArgValues(n, {
7077
7113
  sequence: t,
@@ -7091,7 +7127,7 @@ const h = class h {
7091
7127
  ));
7092
7128
  } else
7093
7129
  c = h.mergeCollectedValues(c, a);
7094
- await L.setBindingData(n.getTarget(), c, {
7130
+ await $.setBindingData(n.getTarget(), c, {
7095
7131
  sequence: t
7096
7132
  });
7097
7133
  }
@@ -7104,7 +7140,7 @@ const h = class h {
7104
7140
  */
7105
7141
  static getInitialBindingData(e) {
7106
7142
  const t = e.getInitialBindAttribute();
7107
- return t === null ? null : L.parseDataBind(t);
7143
+ return t === null ? null : $.parseDataBind(t);
7108
7144
  }
7109
7145
  /**
7110
7146
  * フラグメント配下の入力要素について、内部値を現在の DOM 値と再同期します。
@@ -7132,7 +7168,7 @@ const h = class h {
7132
7168
  const i = [];
7133
7169
  for (const n of r) {
7134
7170
  const s = M.get(n);
7135
- s instanceof D && i.push(s);
7171
+ s instanceof T && i.push(s);
7136
7172
  }
7137
7173
  return i;
7138
7174
  }
@@ -7368,7 +7404,7 @@ h.INITIAL_RESTORED_FORMS = /* @__PURE__ */ new WeakSet(), h.LAST_ANCESTOR_ARG_VA
7368
7404
  "prototype"
7369
7405
  ]), h.COLLECTED_ROW_IDENTITY = /* @__PURE__ */ new WeakMap(), h.COMPLETE_SET_VALUES = /* @__PURE__ */ new WeakSet(), h.COLLECTED_EXCLUDED_KEYS = /* @__PURE__ */ new WeakMap(), h.warnedPositionalRowFallbacks = /* @__PURE__ */ new Set(), h.warnedDerivedRowsWithoutKey = /* @__PURE__ */ new Set(), h.LEADING_PATH_PATTERN = /^\s*([A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)*)\s*([\s\S]*)$/;
7370
7406
  let N = h;
7371
- class O {
7407
+ class B {
7372
7408
  /**
7373
7409
  * カスタムイベントを発火します。
7374
7410
  *
@@ -7392,7 +7428,7 @@ class O {
7392
7428
  * @param version ライブラリバージョン
7393
7429
  */
7394
7430
  static ready(e) {
7395
- O.dispatch(document, "ready", { version: e });
7431
+ B.dispatch(document, "ready", { version: e });
7396
7432
  }
7397
7433
  /**
7398
7434
  * importstartイベントを発火します。
@@ -7401,7 +7437,7 @@ class O {
7401
7437
  * @param url インポート対象URL
7402
7438
  */
7403
7439
  static importStart(e, t) {
7404
- O.dispatch(e, "importstart", {
7440
+ B.dispatch(e, "importstart", {
7405
7441
  url: t,
7406
7442
  startedAt: performance.now()
7407
7443
  });
@@ -7415,7 +7451,7 @@ class O {
7415
7451
  * @param startedAt 開始時刻
7416
7452
  */
7417
7453
  static importEnd(e, t, r, i) {
7418
- O.dispatch(e, "importend", {
7454
+ B.dispatch(e, "importend", {
7419
7455
  url: t,
7420
7456
  bytes: r,
7421
7457
  durationMs: performance.now() - i
@@ -7429,7 +7465,7 @@ class O {
7429
7465
  * @param error エラー内容
7430
7466
  */
7431
7467
  static importError(e, t, r) {
7432
- O.dispatch(e, "importerror", { url: t, error: r });
7468
+ B.dispatch(e, "importerror", { url: t, error: r });
7433
7469
  }
7434
7470
  /**
7435
7471
  * bindchangeイベントを発火します。
@@ -7445,7 +7481,7 @@ class O {
7445
7481
  const u = t?.[c], d = r[c];
7446
7482
  u !== d && n.push(c);
7447
7483
  }
7448
- O.dispatch(e, "bindchange", {
7484
+ B.dispatch(e, "bindchange", {
7449
7485
  previous: t || {},
7450
7486
  next: r,
7451
7487
  changedKeys: n,
@@ -7464,7 +7500,7 @@ class O {
7464
7500
  * @param reason 変更理由
7465
7501
  */
7466
7502
  static bindComplete(e, t = null, r = "other") {
7467
- O.dispatch(e, "bindcomplete", { bindArg: t, reason: r });
7503
+ B.dispatch(e, "bindcomplete", { bindArg: t, reason: r });
7468
7504
  }
7469
7505
  /**
7470
7506
  * eachupdateイベントを発火します。
@@ -7475,7 +7511,7 @@ class O {
7475
7511
  * @param order 現在の順序
7476
7512
  */
7477
7513
  static eachUpdate(e, t, r, i) {
7478
- O.dispatch(e, "eachupdate", {
7514
+ B.dispatch(e, "eachupdate", {
7479
7515
  added: t,
7480
7516
  removed: r,
7481
7517
  order: i,
@@ -7491,7 +7527,7 @@ class O {
7491
7527
  * @param item 行データ
7492
7528
  */
7493
7529
  static rowAdd(e, t, r, i) {
7494
- O.dispatch(e, "rowadd", { key: t, index: r, item: i });
7530
+ B.dispatch(e, "rowadd", { key: t, index: r, item: i });
7495
7531
  }
7496
7532
  /**
7497
7533
  * rowremoveイベントを発火します。
@@ -7501,7 +7537,7 @@ class O {
7501
7537
  * @param index インデックス
7502
7538
  */
7503
7539
  static rowRemove(e, t, r) {
7504
- O.dispatch(e, "rowremove", { key: t, index: r });
7540
+ B.dispatch(e, "rowremove", { key: t, index: r });
7505
7541
  }
7506
7542
  /**
7507
7543
  * rowmoveイベントを発火します。
@@ -7512,7 +7548,7 @@ class O {
7512
7548
  * @param to 移動後インデックス
7513
7549
  */
7514
7550
  static rowMove(e, t, r, i) {
7515
- O.dispatch(e, "rowmove", { key: t, from: r, to: i });
7551
+ B.dispatch(e, "rowmove", { key: t, from: r, to: i });
7516
7552
  }
7517
7553
  /**
7518
7554
  * showイベントを発火します。
@@ -7520,7 +7556,7 @@ class O {
7520
7556
  * @param target data-if要素
7521
7557
  */
7522
7558
  static show(e) {
7523
- O.dispatch(e, "show", { visible: !0 });
7559
+ B.dispatch(e, "show", { visible: !0 });
7524
7560
  }
7525
7561
  /**
7526
7562
  * hideイベントを発火します。
@@ -7528,7 +7564,7 @@ class O {
7528
7564
  * @param target data-if要素
7529
7565
  */
7530
7566
  static hide(e) {
7531
- O.dispatch(e, "hide", { visible: !1 });
7567
+ B.dispatch(e, "hide", { visible: !1 });
7532
7568
  }
7533
7569
  /**
7534
7570
  * fetchstartイベントを発火します。
@@ -7541,7 +7577,7 @@ class O {
7541
7577
  * @return 戻り値はありません。
7542
7578
  */
7543
7579
  static fetchStart(e, t, r, i, n) {
7544
- O.dispatch(e, "fetchstart", {
7580
+ B.dispatch(e, "fetchstart", {
7545
7581
  url: t,
7546
7582
  options: r || {},
7547
7583
  payload: i,
@@ -7558,7 +7594,7 @@ class O {
7558
7594
  * @param startedAt 開始時刻
7559
7595
  */
7560
7596
  static fetchEnd(e, t, r, i) {
7561
- O.dispatch(e, "fetchend", {
7597
+ B.dispatch(e, "fetchend", {
7562
7598
  url: t,
7563
7599
  status: r,
7564
7600
  durationMs: performance.now() - i
@@ -7574,7 +7610,7 @@ class O {
7574
7610
  * @param startedAt 開始時刻(存在する場合)
7575
7611
  */
7576
7612
  static fetchError(e, t, r, i, n) {
7577
- O.dispatch(e, "fetcherror", {
7613
+ B.dispatch(e, "fetcherror", {
7578
7614
  url: t,
7579
7615
  status: i,
7580
7616
  error: r,
@@ -7590,7 +7626,7 @@ class O {
7590
7626
  * @return 戻り値はありません。
7591
7627
  */
7592
7628
  static pollTimeout(e, t, r) {
7593
- O.dispatch(e, "polltimeout", { count: t, elapsedMs: r });
7629
+ B.dispatch(e, "polltimeout", { count: t, elapsedMs: r });
7594
7630
  }
7595
7631
  /**
7596
7632
  * pollstopイベントを発火します。
@@ -7604,7 +7640,7 @@ class O {
7604
7640
  * @return 戻り値はありません。
7605
7641
  */
7606
7642
  static pollStop(e, t, r, i) {
7607
- O.dispatch(e, "pollstop", { reason: t, count: r, elapsedMs: i });
7643
+ B.dispatch(e, "pollstop", { reason: t, count: r, elapsedMs: i });
7608
7644
  }
7609
7645
  }
7610
7646
  const Dt = {
@@ -7627,7 +7663,7 @@ function xt(y, e) {
7627
7663
  return null;
7628
7664
  if (!t.includes("{{"))
7629
7665
  return t;
7630
- const r = M.get(y), i = r instanceof D ? r.getBindingData() : {}, n = It(t, i);
7666
+ const r = M.get(y), i = r instanceof T ? r.getBindingData() : {}, n = It(t, i);
7631
7667
  return n === "" ? null : n;
7632
7668
  }
7633
7669
  function Ft(y, e, t) {
@@ -7748,13 +7784,15 @@ const F = class F {
7748
7784
  /**
7749
7785
  * 予約キー(エンジン管理変数)かどうかを判定します。
7750
7786
  *
7751
- * `_fetch` / `_poll` などのエンジン管理変数を保存対象から常に除外します。
7787
+ * `_fetch` / `_poll` などのエンジン管理変数を保存対象から常に除外します。判定の
7788
+ * 規則は `ElementFragment` に集約しています(属性ミラーや `data-{event}-copy` の
7789
+ * 除外と同じ規則です)。
7752
7790
  *
7753
7791
  * @param key 判定対象のキー
7754
7792
  * @returns 予約キーなら true
7755
7793
  */
7756
7794
  static isReservedKey(e) {
7757
- return e.startsWith("_");
7795
+ return T.isReservedBindingKey(e);
7758
7796
  }
7759
7797
  /**
7760
7798
  * 素の JSON オブジェクト(配列でないオブジェクト)かどうかを判定します。
@@ -8048,10 +8086,10 @@ const F = class F {
8048
8086
  ), Promise.resolve();
8049
8087
  F.RESTORED_ELEMENTS.add(r);
8050
8088
  const i = F.readRecord(t), n = i ? F.extractFromRecord(t, i) : {}, s = { ...e.getRawBindingData() ?? {}, ...n };
8051
- return F.seedSignature(r, F.selectFromData(t, s)), Object.keys(n).length === 0 ? Promise.resolve() : L.setBindingData(r, s, {
8089
+ return F.seedSignature(r, F.selectFromData(t, s)), Object.keys(n).length === 0 ? Promise.resolve() : $.setBindingData(r, s, {
8052
8090
  reentrant: !0,
8053
8091
  kind: "nonSupply",
8054
- sequence: D.nextSequence()
8092
+ sequence: T.nextSequence()
8055
8093
  });
8056
8094
  }
8057
8095
  /**
@@ -8129,7 +8167,7 @@ const F = class F {
8129
8167
  if (!F.RESTORED_ELEMENTS.has(i))
8130
8168
  return;
8131
8169
  const n = M.get(i);
8132
- if (!(n instanceof D))
8170
+ if (!(n instanceof T))
8133
8171
  return;
8134
8172
  const s = F.readDeclaration(n);
8135
8173
  if (!s || s.key !== e || s.kind !== t)
@@ -8198,10 +8236,10 @@ function Ie() {
8198
8236
  ) ? e : ve;
8199
8237
  }
8200
8238
  const Ct = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
8201
- function Oe(y) {
8239
+ function Be(y) {
8202
8240
  return Ct.has(y.toUpperCase());
8203
8241
  }
8204
- function $t(y, e) {
8242
+ function kt(y, e) {
8205
8243
  for (const [t, r] of Object.entries(e))
8206
8244
  r !== void 0 && (Array.isArray(r) ? r.forEach((i) => {
8207
8245
  y.append(t, me(i));
@@ -8220,9 +8258,9 @@ function me(y) {
8220
8258
  }
8221
8259
  function pt(y, e) {
8222
8260
  const t = new URL(y, window.location.href), r = new URLSearchParams(t.search);
8223
- return $t(r, e), t.search = r.toString(), t.toString();
8261
+ return kt(r, e), t.search = r.toString(), t.toString();
8224
8262
  }
8225
- function kt(y) {
8263
+ function $t(y) {
8226
8264
  if (y == null)
8227
8265
  return { payload: {}, dropped: !1 };
8228
8266
  if (typeof y == "string") {
@@ -8295,7 +8333,7 @@ function Pt(y) {
8295
8333
  }
8296
8334
  function Lt(y, e) {
8297
8335
  const t = { ...e || {} }, r = (t.method || "GET").toUpperCase();
8298
- if (l.runtime !== "demo" || Oe(r))
8336
+ if (l.runtime !== "demo" || Be(r))
8299
8337
  return {
8300
8338
  url: y,
8301
8339
  options: t,
@@ -8303,7 +8341,7 @@ function Lt(y, e) {
8303
8341
  effectiveMethod: r,
8304
8342
  normalized: !1
8305
8343
  };
8306
- const { payload: i, dropped: n } = kt(
8344
+ const { payload: i, dropped: n } = $t(
8307
8345
  t.body
8308
8346
  );
8309
8347
  let s = y;
@@ -8323,7 +8361,7 @@ function Lt(y, e) {
8323
8361
  queryString: new URL(s, window.location.href).search || void 0
8324
8362
  };
8325
8363
  }
8326
- function Ot(y) {
8364
+ function Bt(y) {
8327
8365
  return y == null ? null : typeof y == "string" ? y : y instanceof URLSearchParams ? y.toString() : y instanceof FormData ? Array.from(y.entries()).map(([e, t]) => t instanceof File ? [
8328
8366
  e,
8329
8367
  {
@@ -8339,15 +8377,15 @@ function Te(y) {
8339
8377
  Te
8340
8378
  ) : !1;
8341
8379
  }
8342
- function Bt(y) {
8380
+ function Ot(y) {
8343
8381
  return Object.values(y).some((e) => e instanceof Blob ? !1 : Array.isArray(e) ? e.some(
8344
8382
  (t) => !(t instanceof Blob) && Te(t)
8345
8383
  ) : Te(e));
8346
8384
  }
8347
8385
  function xe(y) {
8348
- return Be(N.getValues(y));
8386
+ return Oe(N.getValues(y));
8349
8387
  }
8350
- function Be(y) {
8388
+ function Oe(y) {
8351
8389
  const e = (r) => {
8352
8390
  if (r instanceof File)
8353
8391
  return r.name;
@@ -8381,7 +8419,7 @@ function Ut(y, e) {
8381
8419
  url: y,
8382
8420
  method: String(e.method || "GET").toUpperCase(),
8383
8421
  headers: r,
8384
- body: Ot(e.body || null)
8422
+ body: Bt(e.body || null)
8385
8423
  });
8386
8424
  }
8387
8425
  const b = class b {
@@ -8393,7 +8431,7 @@ const b = class b {
8393
8431
  * @param domEvent 起点となった DOM イベント
8394
8432
  */
8395
8433
  constructor(e, t = null, r = null) {
8396
- this.reentrantBind = !1, this.suppressEmptyReplaceBind = !1, this.requestUserEditSequence = null, this.twoWayCommitBind = !1, this.operationSequence = r != null ? D.nextOperationSequence() : D.nextSequence(), b.isElementFragment(e) ? (this.options = b.buildOptions(e, t), this.eventType = t) : (this.options = e, this.eventType = null), this.domEvent = r;
8434
+ this.reentrantBind = !1, this.suppressEmptyReplaceBind = !1, this.requestUserEditSequence = null, this.twoWayCommitBind = !1, this.operationSequence = r != null ? T.nextOperationSequence() : T.nextSequence(), b.isElementFragment(e) ? (this.options = b.buildOptions(e, t), this.eventType = t) : (this.options = e, this.eventType = null), this.domEvent = r;
8397
8435
  }
8398
8436
  /**
8399
8437
  * イベント属性名を正しく生成します。
@@ -8579,7 +8617,7 @@ const b = class b {
8579
8617
  const a = r.trim();
8580
8618
  if (b.SINGLE_PLACEHOLDER_REGEX.test(a))
8581
8619
  return {
8582
- value: L.parseDataBind(n),
8620
+ value: $.parseDataBind(n),
8583
8621
  hasUnresolvedReference: s
8584
8622
  };
8585
8623
  if (a.startsWith("{") || a.startsWith("[")) {
@@ -8588,7 +8626,7 @@ const b = class b {
8588
8626
  e.getBindingData()
8589
8627
  );
8590
8628
  return {
8591
- value: L.parseDataBind(c.value),
8629
+ value: $.parseDataBind(c.value),
8592
8630
  hasUnresolvedReference: s || c.hasUnresolvedReference
8593
8631
  };
8594
8632
  }
@@ -8597,7 +8635,7 @@ const b = class b {
8597
8635
  e.getBindingData()
8598
8636
  );
8599
8637
  return {
8600
- value: L.parseDataBind(o.value),
8638
+ value: $.parseDataBind(o.value),
8601
8639
  hasUnresolvedReference: s || o.hasUnresolvedReference
8602
8640
  };
8603
8641
  }
@@ -8676,8 +8714,8 @@ ${S}
8676
8714
  H = new Function("event", `"use strict";
8677
8715
  ${S}
8678
8716
  `);
8679
- } catch (B) {
8680
- m.error("Haori", `Invalid run script: ${B}`);
8717
+ } catch (O) {
8718
+ m.error("Haori", `Invalid run script: ${O}`);
8681
8719
  }
8682
8720
  }
8683
8721
  H && (r.runScript = H);
@@ -8700,7 +8738,7 @@ ${S}
8700
8738
  R
8701
8739
  );
8702
8740
  try {
8703
- a.headers = L.parseDataBind(S);
8741
+ a.headers = $.parseDataBind(S);
8704
8742
  } catch (H) {
8705
8743
  m.error("Haori", `Invalid fetch headers: ${H}`);
8706
8744
  }
@@ -8716,7 +8754,7 @@ ${S}
8716
8754
  R
8717
8755
  );
8718
8756
  try {
8719
- a.headers = L.parseDataBind(S);
8757
+ a.headers = $.parseDataBind(S);
8720
8758
  } catch (H) {
8721
8759
  m.error("Haori", `Invalid fetch headers: ${H}`);
8722
8760
  }
@@ -8757,8 +8795,8 @@ ${S}
8757
8795
  if (R) {
8758
8796
  const S = X.queryAll(R, d);
8759
8797
  S.length > 0 ? (r.bindFragments = [], S.forEach((H) => {
8760
- const B = M.get(H);
8761
- B && r.bindFragments.push(B);
8798
+ const O = M.get(H);
8799
+ O && r.bindFragments.push(O);
8762
8800
  })) : m.error(
8763
8801
  "Haori",
8764
8802
  `Bind element not found: ${R} (${d})`
@@ -8849,18 +8887,18 @@ ${V}
8849
8887
  ), Z = ["info", "warning", "error", "success"].includes(V);
8850
8888
  r.toastLevel = Z ? V : null;
8851
8889
  }
8852
- const R = b.attrName(t, "redirect"), S = b.attrName(t, "redirect-replace"), H = e.hasAttribute(R), B = e.hasAttribute(S);
8890
+ const R = b.attrName(t, "redirect"), S = b.attrName(t, "redirect-replace"), H = e.hasAttribute(R), O = e.hasAttribute(S);
8853
8891
  if (H && (r.redirectUrl = b.readLateAttribute(
8854
8892
  e,
8855
8893
  r,
8856
8894
  "redirect",
8857
8895
  R
8858
- )), B && (r.redirectReplaceUrl = b.readLateAttribute(
8896
+ )), O && (r.redirectReplaceUrl = b.readLateAttribute(
8859
8897
  e,
8860
8898
  r,
8861
8899
  "redirect-replace",
8862
8900
  S
8863
- )), H || B) {
8901
+ )), H || O) {
8864
8902
  const V = b.attrName(
8865
8903
  t,
8866
8904
  "redirect-return-param"
@@ -8991,8 +9029,8 @@ ${V}
8991
9029
  const U = t ? b.attrName(t, "fetch-state") : b.attrName(null, "state", !0);
8992
9030
  if (e.hasAttribute(U)) {
8993
9031
  const R = X.read(e, U), S = [];
8994
- R ? (X.queryAll(R, U).forEach((B) => {
8995
- const te = M.get(B);
9032
+ R ? (X.queryAll(R, U).forEach((O) => {
9033
+ const te = M.get(O);
8996
9034
  te && S.push(te);
8997
9035
  }), S.length === 0 && m.error(
8998
9036
  "Haori",
@@ -9011,10 +9049,10 @@ ${V}
9011
9049
  r.storeClearKey = S;
9012
9050
  const H = e.getRawAttribute(
9013
9051
  `${K}-type`
9014
- ), B = H === null ? "session" : H.trim();
9015
- B === "local" || B === "session" ? r.storeClearKind = B : (m.warn(
9052
+ ), O = H === null ? "session" : H.trim();
9053
+ O === "local" || O === "session" ? r.storeClearKind = O : (m.warn(
9016
9054
  "Haori",
9017
- `${K}-type は session または local を指定してください(session として扱います): ${B}`
9055
+ `${K}-type は session または local を指定してください(session として扱います): ${O}`
9018
9056
  ), r.storeClearKind = "session");
9019
9057
  }
9020
9058
  }
@@ -9139,7 +9177,7 @@ ${V}
9139
9177
  )
9140
9178
  ), this.captureHistorySnapshots());
9141
9179
  const r = this.prepareFetchRequest();
9142
- this.requestUserEditSequence = D.currentSequence();
9180
+ this.requestUserEditSequence = T.currentSequence();
9143
9181
  const i = r.payload;
9144
9182
  let n = r.url, s = r.options, a = !1, o = !1;
9145
9183
  if (this.options.beforeCallback) {
@@ -9155,7 +9193,7 @@ ${V}
9155
9193
  }
9156
9194
  const c = Object.keys(i).length > 0;
9157
9195
  if (n) {
9158
- const p = (s?.method || "GET").toUpperCase(), E = !a && o && r.transportMode === "query-get" && Pt(s) && !Oe(p) ? r.baseUrl ?? n : n, A = Lt(
9196
+ const p = (s?.method || "GET").toUpperCase(), E = !a && o && r.transportMode === "query-get" && Pt(s) && !Be(p) ? r.baseUrl ?? n : n, A = Lt(
9159
9197
  E,
9160
9198
  s
9161
9199
  );
@@ -9177,7 +9215,7 @@ ${V}
9177
9215
  transportMode: x ? "query-get" : "http",
9178
9216
  ...x ? { queryString: U } : {}
9179
9217
  };
9180
- return O.fetchStart(
9218
+ return B.fetchStart(
9181
9219
  this.options.targetFragment.getTarget(),
9182
9220
  n,
9183
9221
  I,
@@ -9188,7 +9226,7 @@ ${V}
9188
9226
  n || void 0,
9189
9227
  K
9190
9228
  )).catch(async (S) => {
9191
- throw n && O.fetchError(
9229
+ throw n && B.fetchError(
9192
9230
  this.options.targetFragment.getTarget(),
9193
9231
  n,
9194
9232
  S
@@ -9204,7 +9242,7 @@ ${V}
9204
9242
  if ((!this.options.bindFragments || this.options.bindFragments.length === 0) && this.options.formFragment && c) {
9205
9243
  const p = this.options.formFragment, g = p.getTarget(), E = /* @__PURE__ */ new Set();
9206
9244
  e && e.appliedDisabledAttribute && this.options.targetFragment && E.add(this.options.targetFragment);
9207
- const A = p.getRawBindingData(), I = Be(i), C = p.getAttribute(`${l.prefix}form-arg`);
9245
+ const A = p.getRawBindingData(), I = Oe(i), C = p.getAttribute(`${l.prefix}form-arg`);
9208
9246
  let W;
9209
9247
  if (C) {
9210
9248
  W = { ...A ?? {} };
@@ -9215,7 +9253,7 @@ ${V}
9215
9253
  );
9216
9254
  } else
9217
9255
  W = N.mergeCollectedValues(A, I);
9218
- await L.setBindingData(g, W, {
9256
+ await $.setBindingData(g, W, {
9219
9257
  skipFragments: E,
9220
9258
  kind: "nonSupply",
9221
9259
  sequence: this.operationSequence,
@@ -9228,7 +9266,7 @@ ${V}
9228
9266
  });
9229
9267
  }
9230
9268
  this.suppressEmptyReplaceBind = !c && !this.options.formFragment && (this.eventType === "change" || this.eventType === "input"), this.twoWayCommitBind = this.eventType === "change" || this.eventType === "input";
9231
- const u = c ? Be(i) : {}, d = new Response(JSON.stringify(u), {
9269
+ const u = c ? Oe(i) : {}, d = new Response(JSON.stringify(u), {
9232
9270
  headers: { "Content-Type": "application/json" }
9233
9271
  });
9234
9272
  return await this.handleFetchResult(d);
@@ -9268,7 +9306,7 @@ ${V}
9268
9306
  async handleFetchResult(e, t, r) {
9269
9307
  const i = Ie();
9270
9308
  if (!e.ok)
9271
- return ft(e.status) || (this.options.targetFragment && t && O.fetchError(
9309
+ return ft(e.status) || (this.options.targetFragment && t && B.fetchError(
9272
9310
  this.options.targetFragment.getTarget(),
9273
9311
  t,
9274
9312
  new Error(`${e.status} ${e.statusText}`),
@@ -9279,7 +9317,7 @@ ${V}
9279
9317
  e.status,
9280
9318
  e.statusText || null
9281
9319
  )), !1;
9282
- if (this.options.targetFragment && t && r && O.fetchEnd(
9320
+ if (this.options.targetFragment && t && r && B.fetchEnd(
9283
9321
  this.options.targetFragment.getTarget(),
9284
9322
  t,
9285
9323
  e.status,
@@ -9303,7 +9341,7 @@ ${V}
9303
9341
  s.push(new b(g, null).run());
9304
9342
  }), this.options.clickFragments && this.options.clickFragments.length > 0)
9305
9343
  for (const g of this.options.clickFragments) {
9306
- await L.evaluateAll(g);
9344
+ await $.evaluateAll(g);
9307
9345
  const E = g.getTarget();
9308
9346
  typeof E.click == "function" ? E.click() : E.dispatchEvent(
9309
9347
  new MouseEvent("click", { bubbles: !0, cancelable: !0 })
@@ -9726,7 +9764,7 @@ ${V}
9726
9764
  } else
9727
9765
  u[d] = i;
9728
9766
  n.push(
9729
- L.setBindingData(
9767
+ $.setBindingData(
9730
9768
  o.getTarget(),
9731
9769
  this.reconcileUserEditsForBind(o, u),
9732
9770
  {
@@ -9784,7 +9822,7 @@ ${V}
9784
9822
  i
9785
9823
  ), d = this.options.bindMerge ? { ...o.getRawBindingData() ?? {}, ...u } : u;
9786
9824
  n.push(
9787
- L.setBindingData(
9825
+ $.setBindingData(
9788
9826
  o.getTarget(),
9789
9827
  this.reconcileUserEditsForBind(o, d),
9790
9828
  {
@@ -9799,7 +9837,7 @@ ${V}
9799
9837
  return n.push(this.applyRowWrites(a)), Promise.all(n).then(() => {
9800
9838
  const o = this.options.bindArg ?? null;
9801
9839
  this.options.bindFragments.forEach((c) => {
9802
- O.bindComplete(c.getTarget(), o);
9840
+ B.bindComplete(c.getTarget(), o);
9803
9841
  });
9804
9842
  });
9805
9843
  });
@@ -9840,7 +9878,7 @@ ${V}
9840
9878
  if (r === null)
9841
9879
  return t;
9842
9880
  const i = this.eventType === "poll";
9843
- if (!i && !this.twoWayCommitBind && L.clearUserEditMarks(e, r), !(e.getTarget() instanceof HTMLFormElement))
9881
+ if (!i && !this.twoWayCommitBind && $.clearUserEditMarks(e, r), !(e.getTarget() instanceof HTMLFormElement))
9844
9882
  return this.reconcileAncestorArgFormEdits(
9845
9883
  e,
9846
9884
  t,
@@ -9879,7 +9917,7 @@ ${V}
9879
9917
  if (r === null)
9880
9918
  return t;
9881
9919
  const i = this.eventType === "poll";
9882
- !i && !this.twoWayCommitBind && L.clearUserEditMarks(e, r);
9920
+ !i && !this.twoWayCommitBind && $.clearUserEditMarks(e, r);
9883
9921
  const n = N.getValuesEditedAfter(
9884
9922
  e,
9885
9923
  i ? 0 : r
@@ -9952,7 +9990,7 @@ ${V}
9952
9990
  ...t
9953
9991
  };
9954
9992
  n.push(
9955
- L.setBindingData(s.getTarget(), o, {
9993
+ $.setBindingData(s.getTarget(), o, {
9956
9994
  // 通番はコピーを起こした操作のもの(フェッチ応答の反映と同じ理由)。
9957
9995
  sequence: this.operationSequence
9958
9996
  })
@@ -10014,7 +10052,11 @@ ${V}
10014
10052
  * @returns コピー元のデータ
10015
10053
  */
10016
10054
  resolveCopySourceData() {
10017
- return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? xe(this.options.copySourceFragment) : { ...this.options.copySourceFragment.getRawBindingData() ?? {} } : this.options.formFragment ? xe(this.options.formFragment) : this.options.targetFragment ? { ...this.options.targetFragment.getRawBindingData() ?? {} } : {};
10055
+ return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? xe(this.options.copySourceFragment) : $.withoutReservedBindingKeys(
10056
+ this.options.copySourceFragment.getRawBindingData() ?? {}
10057
+ ) : this.options.formFragment ? xe(this.options.formFragment) : this.options.targetFragment ? $.withoutReservedBindingKeys(
10058
+ this.options.targetFragment.getRawBindingData() ?? {}
10059
+ ) : {};
10018
10060
  }
10019
10061
  /**
10020
10062
  * data 属性とフォーム値を統合した送信データを作成し、未解決参照の有無を返します。
@@ -10077,10 +10119,10 @@ ${V}
10077
10119
  let i = this.options.fetchUrl;
10078
10120
  const n = { ...this.options.fetchOptions || {} }, s = new Headers(
10079
10121
  n.headers || void 0
10080
- ), a = (n.method || "GET").toUpperCase(), o = l.runtime === "demo" && !Oe(a), c = o ? "GET" : a;
10122
+ ), a = (n.method || "GET").toUpperCase(), o = l.runtime === "demo" && !Be(a), c = o ? "GET" : a;
10081
10123
  if (n.method = c, Object.keys(t).length > 0 && Te(t)) {
10082
10124
  const d = s.get("Content-Type") || "";
10083
- c !== "GET" && c !== "HEAD" && c !== "OPTIONS" && /multipart\/form-data/i.test(d) ? Bt(t) && m.warn(
10125
+ c !== "GET" && c !== "HEAD" && c !== "OPTIONS" && /multipart\/form-data/i.test(d) ? Ot(t) && m.warn(
10084
10126
  "Haori",
10085
10127
  `A File value nested under ${l.prefix}form-object / ${l.prefix}form-list cannot be sent. Place file inputs at the top level of the collected form values.`
10086
10128
  ) : m.warn(
@@ -10230,7 +10272,7 @@ ${V}
10230
10272
  `Row container not found: ${i} (${r})`
10231
10273
  ), null;
10232
10274
  const a = M.get(s);
10233
- return a instanceof D ? a.hasAttribute(`${l.prefix}each`) ? a : (m.error(
10275
+ return a instanceof T ? a.hasAttribute(`${l.prefix}each`) ? a : (m.error(
10234
10276
  "Haori",
10235
10277
  `Row container must have ${l.prefix}each: ${i} (${r})`
10236
10278
  ), null) : (m.error(
@@ -10501,7 +10543,7 @@ ${V}
10501
10543
  }
10502
10544
  if (!o)
10503
10545
  return;
10504
- const c = L.setBindingData(
10546
+ const c = $.setBindingData(
10505
10547
  s.owner.getTarget(),
10506
10548
  b.withPathValue(s.ownerData, s.path, a),
10507
10549
  {
@@ -10517,7 +10559,7 @@ ${V}
10517
10559
  sequence: this.operationSequence
10518
10560
  }
10519
10561
  );
10520
- if (L.isEachUpdateRunning(n)) {
10562
+ if ($.isEachUpdateRunning(n)) {
10521
10563
  c.catch((u) => {
10522
10564
  m.error("Haori", "Failed to write row data.", u);
10523
10565
  });
@@ -10613,7 +10655,7 @@ ${V}
10613
10655
  if (a && o !== null) {
10614
10656
  const c = [];
10615
10657
  r.forEach((p, g) => {
10616
- L.createListKey(
10658
+ $.createListKey(
10617
10659
  p,
10618
10660
  String(a),
10619
10661
  g
@@ -10732,14 +10774,14 @@ ${V}
10732
10774
  if (b.isSameRowItem(i.array[E], g))
10733
10775
  return;
10734
10776
  const A = p.get(
10735
- L.createListKey(
10777
+ $.createListKey(
10736
10778
  g,
10737
10779
  null,
10738
10780
  E
10739
10781
  )
10740
10782
  );
10741
- A && L.clearUserEditMarks(A);
10742
- }), L.setBindingData(
10783
+ A && $.clearUserEditMarks(A);
10784
+ }), $.setBindingData(
10743
10785
  i.owner.getTarget(),
10744
10786
  b.withPathValue(i.ownerData, i.path, d),
10745
10787
  {
@@ -10782,7 +10824,7 @@ ${V}
10782
10824
  ...s.getRawBindingData() ?? {},
10783
10825
  _fetch: n
10784
10826
  };
10785
- return L.setBindingData(a, o, {
10827
+ return $.setBindingData(a, o, {
10786
10828
  reflectToAttribute: !1,
10787
10829
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
10788
10830
  // 解除しない)。
@@ -10886,7 +10928,7 @@ const f = class f {
10886
10928
  */
10887
10929
  static isAliasedAttributeReflection(e, t) {
10888
10930
  const r = M.get(e);
10889
- return r instanceof D ? r.hasAttribute(
10931
+ return r instanceof T ? r.hasAttribute(
10890
10932
  `${l.prefix}${f.ATTRIBUTE_ALIAS_SUFFIX}${t}`
10891
10933
  ) : !1;
10892
10934
  }
@@ -10917,7 +10959,7 @@ const f = class f {
10917
10959
  static reevaluateChildren(e) {
10918
10960
  const t = [];
10919
10961
  return e.getChildren().forEach((r) => {
10920
- r instanceof D ? t.push(f.evaluateAll(r)) : r instanceof re && t.push(f.evaluateText(r));
10962
+ r instanceof T ? t.push(f.evaluateAll(r)) : r instanceof re && t.push(f.evaluateText(r));
10921
10963
  }), Promise.all(t).then(() => {
10922
10964
  });
10923
10965
  }
@@ -10938,9 +10980,9 @@ const f = class f {
10938
10980
  * @param upTo この通し番号までの編集を解除対象とする(既定は現在の最新)
10939
10981
  * @return 戻り値はありません。
10940
10982
  */
10941
- static clearUserEditMarks(e, t = D.currentSequence()) {
10983
+ static clearUserEditMarks(e, t = T.currentSequence()) {
10942
10984
  e.clearUserEditMark(t), e.getChildren().forEach((r) => {
10943
- r instanceof D && f.clearUserEditMarks(r, t);
10985
+ r instanceof T && f.clearUserEditMarks(r, t);
10944
10986
  });
10945
10987
  }
10946
10988
  /**
@@ -10989,7 +11031,7 @@ const f = class f {
10989
11031
  return Promise.resolve();
10990
11032
  const r = [];
10991
11033
  return e.hasAttribute(`${l.prefix}validity`) && N.applyCustomValidity(e), e.hasAttribute(`${l.prefix}fetch`) && r.push(f.executeManagedFetch(e)), e.hasAttribute(`${l.prefix}import`) && r.push(f.executeManagedImport(e)), e.getChildren().forEach((i) => {
10992
- i instanceof D && r.push(
11034
+ i instanceof T && r.push(
10993
11035
  f.reevaluateReactiveSpecialAttributes(i, t)
10994
11036
  );
10995
11037
  }), Promise.all(r).then(() => {
@@ -11035,20 +11077,20 @@ const f = class f {
11035
11077
  return Promise.resolve();
11036
11078
  r.lastUrl = n, r.running = !0;
11037
11079
  const s = performance.now();
11038
- return t.setAttribute(`${l.prefix}importing`, ""), O.importStart(t, n), Ht.load(n).then((a) => {
11080
+ return t.setAttribute(`${l.prefix}importing`, ""), B.importStart(t, n), Ht.load(n).then((a) => {
11039
11081
  const o = new TextEncoder().encode(a).length;
11040
11082
  return G.enqueue(() => {
11041
11083
  t.innerHTML = a;
11042
11084
  }).then(() => {
11043
- t.removeAttribute(`${l.prefix}importing`), O.importEnd(t, n, o, s), f.adoptImportedChildren(e);
11085
+ t.removeAttribute(`${l.prefix}importing`), B.importEnd(t, n, o, s), f.adoptImportedChildren(e);
11044
11086
  const c = [];
11045
11087
  return e.getChildren().forEach((u) => {
11046
- u instanceof D ? c.push(f.scan(u.getTarget())) : u instanceof re && c.push(f.evaluateText(u));
11088
+ u instanceof T ? c.push(f.scan(u.getTarget())) : u instanceof re && c.push(f.evaluateText(u));
11047
11089
  }), Promise.all(c).then(() => {
11048
11090
  });
11049
11091
  });
11050
11092
  }).catch((a) => {
11051
- t.removeAttribute(`${l.prefix}importing`), O.importError(t, n, a), m.error("[Haori]", "Failed to import HTML:", n, a);
11093
+ t.removeAttribute(`${l.prefix}importing`), B.importError(t, n, a), m.error("[Haori]", "Failed to import HTML:", n, a);
11052
11094
  }).finally(() => {
11053
11095
  if (r.running = !1, r.rerunRequested)
11054
11096
  return r.rerunRequested = !1, f.executeManagedImport(e);
@@ -11114,7 +11156,7 @@ const f = class f {
11114
11156
  }
11115
11157
  const r = [];
11116
11158
  return e.getChildren().forEach((i) => {
11117
- i instanceof D ? r.push(f.initializeElementFragment(i, t)) : i instanceof re && r.push(f.evaluateText(i));
11159
+ i instanceof T ? r.push(f.initializeElementFragment(i, t)) : i instanceof re && r.push(f.evaluateText(i));
11118
11160
  }), Promise.all(r).then(() => {
11119
11161
  f.refreshDerivedSubtreeSignature(e);
11120
11162
  });
@@ -11213,11 +11255,11 @@ const f = class f {
11213
11255
  let c = null, u = null, d = null;
11214
11256
  switch (t) {
11215
11257
  case `${l.prefix}bind`: {
11216
- if (r !== null && i && s instanceof D && s.consumeSelfWrittenBind(r))
11258
+ if (r !== null && i && s instanceof T && s.consumeSelfWrittenBind(r))
11217
11259
  break;
11218
11260
  const p = r === null ? {} : f.parseDataBind(r);
11219
11261
  if (i) {
11220
- const g = n ?? D.nextSequence();
11262
+ const g = n ?? T.nextSequence();
11221
11263
  return r === null ? (o.push(
11222
11264
  f.setBindingData(e, p, {
11223
11265
  reflectToAttribute: !1,
@@ -11285,7 +11327,7 @@ const f = class f {
11285
11327
  const E = {
11286
11328
  reentrant: !0,
11287
11329
  kind: "nonSupply",
11288
- sequence: D.nextSequence()
11330
+ sequence: T.nextSequence()
11289
11331
  };
11290
11332
  if (p === null)
11291
11333
  o.push(f.setBindingData(e, g, E));
@@ -11334,20 +11376,23 @@ const f = class f {
11334
11376
  * @returns Promise (DOM操作が完了したときに解決される)
11335
11377
  */
11336
11378
  static setBindingData(e, t, r = {}) {
11337
- const i = M.get(e), n = r.skipFragments ?? /* @__PURE__ */ new Set(), s = r.reentrant ?? !1, a = r.reflectToAttribute ?? !0, o = r.kind ?? "supply", c = r.sequence ?? D.nextOperationSequence(), u = {
11379
+ const i = M.get(e), n = r.skipFragments ?? /* @__PURE__ */ new Set(), s = r.reentrant ?? !1, a = r.reflectToAttribute ?? !0, o = r.kind ?? "supply", c = r.sequence ?? T.nextOperationSequence(), u = {
11338
11380
  sequence: c,
11339
11381
  kind: o,
11340
11382
  ...r.editedPaths === void 0 ? {} : { editedPaths: r.editedPaths }
11341
11383
  }, d = o === "supply";
11342
11384
  d && i.markSupplyApplied(c);
11343
- const p = D.currentSequence(), g = i.getRawBindingData();
11385
+ const p = T.currentSequence(), g = i.getRawBindingData();
11344
11386
  d && (r.clearUserEdits ?? !0) && f.clearUserEditMarks(i, c);
11345
11387
  const E = a ? f.resolveByPathAuthority(i, g, t, u) : t;
11346
- i.setBindingData(E), a && (O.bindChange(e, g, E, "manual"), Re.mirror(i));
11388
+ i.setBindingData(E), a && (B.bindChange(e, g, E, "manual"), Re.mirror(i));
11347
11389
  const A = () => {
11348
11390
  i.markBindingWorkStart();
11349
11391
  const I = i.getRawBindingData() ?? E;
11350
- let C = a ? i.setAttribute(`${l.prefix}bind`, JSON.stringify(I)) : Promise.resolve();
11392
+ let C = a ? i.setAttribute(
11393
+ `${l.prefix}bind`,
11394
+ JSON.stringify(f.withoutReservedBindingKeys(I))
11395
+ ) : Promise.resolve();
11351
11396
  return e.tagName === "FORM" && (C = C.then(() => {
11352
11397
  if (i.wasResetAfter(p))
11353
11398
  return;
@@ -11361,7 +11406,7 @@ const f = class f {
11361
11406
  })), C = C.then(
11362
11407
  () => N.syncAncestorArgForms(i, p, u)
11363
11408
  ), C = C.then(() => f.evaluateAll(i, n)), C = C.then(
11364
- () => D.retryUnappliedValueWrites(e, p)
11409
+ () => T.retryUnappliedValueWrites(e, p)
11365
11410
  ), C = C.then(
11366
11411
  () => f.reevaluateReactiveSpecialAttributes(i, n)
11367
11412
  ), C.then(
@@ -11373,6 +11418,24 @@ const f = class f {
11373
11418
  };
11374
11419
  return s ? A() : i.enqueueBindingWork(A);
11375
11420
  }
11421
+ /**
11422
+ * 宣言データとして外へ出すデータから予約キーを取り除きます。
11423
+ *
11424
+ * `_fetch` / `_poll` は内部バインディングデータにのみ持つ実行時の値で、宣言
11425
+ * データとしては外へ出しません(仕様「`data-bind`」)。内部データ側は予約キーを
11426
+ * 引き継ぐため(`ElementFragment.setBindingData()`)、出口の側で取り除かないと、
11427
+ * `data-bind` 属性が数秒ごとの状態遷移で書き換わり続け、`data-{event}-copy` は
11428
+ * 別の要素のフェッチ状態をコピー先へ運びます。
11429
+ *
11430
+ * @param data 外へ出すバインドデータ
11431
+ * @returns 予約キーを除いたデータ
11432
+ */
11433
+ static withoutReservedBindingKeys(e) {
11434
+ const t = {};
11435
+ for (const r of Object.keys(e))
11436
+ T.isReservedBindingKey(r) || (t[r] = e[r]);
11437
+ return t;
11438
+ }
11376
11439
  /**
11377
11440
  * 変化した経路ごとに適用可否を判定し、棄却した経路を前の値のまま残したデータを
11378
11441
  * 返します。
@@ -11596,7 +11659,7 @@ const f = class f {
11596
11659
  */
11597
11660
  static getBindingData(e, t = {}) {
11598
11661
  const r = M.get(e);
11599
- return r instanceof D ? t.resolved ? r.getBindingData() : r.getRawBindingData() : null;
11662
+ return r instanceof T ? t.resolved ? r.getBindingData() : r.getRawBindingData() : null;
11600
11663
  }
11601
11664
  /**
11602
11665
  * 指定要素の式評価で見えるバインディングスコープをダンプします(デバッグ用)。
@@ -11683,7 +11746,7 @@ const f = class f {
11683
11746
  if (n) {
11684
11747
  if (n.getParent() === r)
11685
11748
  return;
11686
- r.insertBefore(n, i), n instanceof D ? f.scan(n.getTarget()) : n instanceof re && f.evaluateText(n);
11749
+ r.insertBefore(n, i), n instanceof T ? f.scan(n.getTarget()) : n instanceof re && f.evaluateText(n);
11687
11750
  }
11688
11751
  }
11689
11752
  /**
@@ -11742,7 +11805,7 @@ const f = class f {
11742
11805
  // 持たず、ユーザー編集の印も解除しない)。
11743
11806
  f.setBindingData(n.getTarget(), c, {
11744
11807
  kind: "nonSupply",
11745
- sequence: D.nextSequence()
11808
+ sequence: T.nextSequence()
11746
11809
  })
11747
11810
  );
11748
11811
  }
@@ -11810,7 +11873,7 @@ const f = class f {
11810
11873
  return;
11811
11874
  const p = [];
11812
11875
  return e.getChildren().forEach((g) => {
11813
- if (g instanceof D) {
11876
+ if (g instanceof T) {
11814
11877
  if (f.canSkipUnchangedNestedEach(g))
11815
11878
  return;
11816
11879
  p.push(f.evaluateAll(g, t));
@@ -11938,7 +12001,7 @@ const f = class f {
11938
12001
  */
11939
12002
  static hasEachFixedChildren(e) {
11940
12003
  return e.getChildren().some(
11941
- (t) => t instanceof D && f.isEachFixedChild(t)
12004
+ (t) => t instanceof T && f.isEachFixedChild(t)
11942
12005
  );
11943
12006
  }
11944
12007
  /**
@@ -11960,7 +12023,7 @@ const f = class f {
11960
12023
  static evaluateEachFixedChildren(e) {
11961
12024
  const t = [];
11962
12025
  return e.getChildren().forEach((r) => {
11963
- r instanceof D ? f.isEachFixedChild(r) && t.push(f.evaluateAll(r)) : r instanceof re && t.push(f.evaluateText(r));
12026
+ r instanceof T ? f.isEachFixedChild(r) && t.push(f.evaluateAll(r)) : r instanceof re && t.push(f.evaluateText(r));
11964
12027
  }), Promise.all(t).then(() => {
11965
12028
  });
11966
12029
  }
@@ -11977,14 +12040,14 @@ const f = class f {
11977
12040
  if (f.isHiddenIfCondition(r))
11978
12041
  q.isEnabled() && e.isVisible() && f.logFalsyIfDiagnostics(e), t.push(
11979
12042
  e.hide().then(() => {
11980
- O.hide(e.getTarget());
12043
+ B.hide(e.getTarget());
11981
12044
  })
11982
12045
  );
11983
12046
  else {
11984
12047
  e.restoreFormControlsDisabledByIf();
11985
12048
  const i = e.isVisible(), n = [], s = e.hasAttribute(`${l.prefix}each`);
11986
12049
  e.getChildren().forEach((a) => {
11987
- if (a instanceof D) {
12050
+ if (a instanceof T) {
11988
12051
  if (s && !f.isEachFixedChild(a))
11989
12052
  return;
11990
12053
  n.push(
@@ -11993,7 +12056,7 @@ const f = class f {
11993
12056
  } else a instanceof re && n.push(f.evaluateText(a));
11994
12057
  }), t.push(
11995
12058
  e.show().then(() => {
11996
- O.show(e.getTarget()), i || (f.triggerLoadOnShow(e), se.refreshSubtree(e.getTarget()));
12059
+ B.show(e.getTarget()), i || (f.triggerLoadOnShow(e), se.refreshSubtree(e.getTarget()));
11997
12060
  })
11998
12061
  ), t.push(Promise.all(n).then(() => {
11999
12062
  }));
@@ -12214,7 +12277,7 @@ ${r}
12214
12277
  if (r === null) {
12215
12278
  let s = !1;
12216
12279
  if (e.getChildren().forEach((a) => {
12217
- if (!s && a instanceof D) {
12280
+ if (!s && a instanceof T) {
12218
12281
  if (a.hasAttribute(`${l.prefix}each-before`) || a.hasAttribute(`${l.prefix}each-after`))
12219
12282
  return;
12220
12283
  r = a.clone(), f.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0, e.removeChild(a);
@@ -12228,10 +12291,10 @@ ${r}
12228
12291
  ).forEach((c) => {
12229
12292
  if (!s) {
12230
12293
  const d = M.get(c);
12231
- d instanceof D && (r = d.clone(), f.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0);
12294
+ d instanceof T && (r = d.clone(), f.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0);
12232
12295
  }
12233
12296
  const u = M.get(c);
12234
- u instanceof D && e.getChildren().includes(u) && (e.removeChild(u), u.setMounted(!1)), c.parentNode && c.parentNode.removeChild(c);
12297
+ u instanceof T && e.getChildren().includes(u) && (e.removeChild(u), u.setMounted(!1)), c.parentNode && c.parentNode.removeChild(c);
12235
12298
  });
12236
12299
  }
12237
12300
  return this.updateDiff(e, t).then(() => {
@@ -12368,7 +12431,7 @@ ${r}
12368
12431
  typeof s == "string" && s !== "" && n.add(s), r = n;
12369
12432
  }
12370
12433
  for (const i of e.getChildren())
12371
- if (i instanceof D) {
12434
+ if (i instanceof T) {
12372
12435
  if (!f.isRowLocalSubtree(i, r))
12373
12436
  return !1;
12374
12437
  } else if (i instanceof re) {
@@ -12431,7 +12494,7 @@ ${r}
12431
12494
  * @returns 含むなら true
12432
12495
  */
12433
12496
  static hasDisallowedDerivedSubtreeDescendant(e) {
12434
- return e.getChildren().some((t) => t instanceof D ? t.hasAttribute(`${l.prefix}derive`) || t.hasAttribute(`${l.prefix}derive-name`) || t.hasAttribute(`${l.prefix}fetch`) || t.hasAttribute(`${l.prefix}import`) ? !0 : f.hasDisallowedDerivedSubtreeDescendant(t) : !1);
12497
+ return e.getChildren().some((t) => t instanceof T ? t.hasAttribute(`${l.prefix}derive`) || t.hasAttribute(`${l.prefix}derive-name`) || t.hasAttribute(`${l.prefix}fetch`) || t.hasAttribute(`${l.prefix}import`) ? !0 : f.hasDisallowedDerivedSubtreeDescendant(t) : !1);
12435
12498
  }
12436
12499
  /**
12437
12500
  * data-derive host が子孫要素へ公開している binding の署名を返します。
@@ -12533,7 +12596,7 @@ ${r}
12533
12596
  typeof a == "string" && a.trim() !== "" && (n += `[${l.prefix}derive-name="${a.trim()}"]`);
12534
12597
  const o = r.getParent();
12535
12598
  if (o) {
12536
- const c = o.getChildren().filter((u) => u instanceof D).findIndex((u) => u === r);
12599
+ const c = o.getChildren().filter((u) => u instanceof T).findIndex((u) => u === r);
12537
12600
  n += `:nth-child(${c + 1})`;
12538
12601
  }
12539
12602
  t.unshift(n), r = o;
@@ -12606,7 +12669,7 @@ ${r}
12606
12669
  * @returns subtree 全体を省略可能なら true
12607
12670
  */
12608
12671
  static markFreshInitializationSkippable(e) {
12609
- const t = e.getAttributeNames().some((n) => f.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof D ? !f.markFreshInitializationSkippable(n) : n instanceof re ? n.hasDynamicContent() : !1), i = !t && !r;
12672
+ const t = e.getAttributeNames().some((n) => f.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof T ? !f.markFreshInitializationSkippable(n) : n instanceof re ? n.hasDynamicContent() : !1), i = !t && !r;
12610
12673
  return e.setFreshInitializationSkippable(i), i;
12611
12674
  }
12612
12675
  /**
@@ -12645,7 +12708,7 @@ ${r}
12645
12708
  c.set(x, (c.get(x) ?? 0) + 1);
12646
12709
  }), n && o.size !== a.length && f.warnDuplicateEachKey(String(n));
12647
12710
  const u = [];
12648
- let d = e.getChildren().filter((x) => x instanceof D).filter(
12711
+ let d = e.getChildren().filter((x) => x instanceof T).filter(
12649
12712
  (x) => !x.hasAttribute(`${l.prefix}each-before`) && !x.hasAttribute(`${l.prefix}each-after`)
12650
12713
  );
12651
12714
  const p = d.map((x) => x.getListKey()), g = /* @__PURE__ */ new Set();
@@ -12654,7 +12717,7 @@ ${r}
12654
12717
  if (R === 0) {
12655
12718
  g.add(x);
12656
12719
  const S = x.getListKey();
12657
- return S !== null && O.rowRemove(x.getTarget(), S, U), u.push(x.remove()), !1;
12720
+ return S !== null && B.rowRemove(x.getTarget(), S, U), u.push(x.remove()), !1;
12658
12721
  }
12659
12722
  return c.set(K, R - 1), !0;
12660
12723
  });
@@ -12676,7 +12739,7 @@ ${r}
12676
12739
  const H = A.get(x)?.shift();
12677
12740
  if (H) {
12678
12741
  S = H;
12679
- const B = C + U;
12742
+ const O = C + U;
12680
12743
  W = W.then(
12681
12744
  () => f.updateRowFragment(
12682
12745
  S,
@@ -12694,9 +12757,9 @@ ${r}
12694
12757
  e,
12695
12758
  S,
12696
12759
  I,
12697
- B
12760
+ O
12698
12761
  ).then((ie) => {
12699
- if (ie !== null && O.rowMove(
12762
+ if (ie !== null && B.rowMove(
12700
12763
  S.getTarget(),
12701
12764
  x,
12702
12765
  ie - C,
@@ -12711,7 +12774,7 @@ ${r}
12711
12774
  );
12712
12775
  } else {
12713
12776
  S = r.clone();
12714
- const B = C + U;
12777
+ const O = C + U;
12715
12778
  W = W.then(
12716
12779
  () => f.updateRowFragment(
12717
12780
  S,
@@ -12721,26 +12784,26 @@ ${r}
12721
12784
  s ? String(s) : null,
12722
12785
  x
12723
12786
  ).then(() => {
12724
- const te = I[B] ?? null;
12787
+ const te = I[O] ?? null;
12725
12788
  return e.insertBefore(S, te).then(() => {
12726
- I.splice(B, 0, S);
12789
+ I.splice(O, 0, S);
12727
12790
  }).then(() => f.initializeFreshEachRow(S)).then(() => f.applyRowFormValues(e, S, K)).then(() => {
12728
- O.rowAdd(S.getTarget(), x, R, K);
12791
+ B.rowAdd(S.getTarget(), x, R, K);
12729
12792
  });
12730
12793
  })
12731
12794
  );
12732
12795
  }
12733
12796
  }), Promise.all(u).then(() => W).then(() => {
12734
12797
  const x = a.filter(
12735
- (B) => B !== null
12798
+ (O) => O !== null
12736
12799
  ), U = E.filter(
12737
- (B) => B !== null
12738
- ), K = new Set(U), R = x.filter((B) => !K.has(B)), H = p.filter(
12739
- (B) => B !== null
12800
+ (O) => O !== null
12801
+ ), K = new Set(U), R = x.filter((O) => !K.has(O)), H = p.filter(
12802
+ (O) => O !== null
12740
12803
  ).filter(
12741
- (B) => !o.has(B)
12804
+ (O) => !o.has(O)
12742
12805
  );
12743
- O.eachUpdate(
12806
+ B.eachUpdate(
12744
12807
  e.getTarget(),
12745
12808
  R,
12746
12809
  H,
@@ -12773,7 +12836,7 @@ ${r}
12773
12836
  */
12774
12837
  static warnExtraEachChildren(e) {
12775
12838
  const t = e.getChildren().filter(
12776
- (r) => r instanceof D
12839
+ (r) => r instanceof T
12777
12840
  ).filter(
12778
12841
  (r) => !r.hasAttribute(`${l.prefix}each-before`) && !r.hasAttribute(`${l.prefix}each-after`)
12779
12842
  );
@@ -13035,7 +13098,7 @@ f.ATTRIBUTE_ALIAS_SUFFIX = "attr-", f.PRIORITY_ATTRIBUTE_SUFFIXES = [
13035
13098
  "enhance",
13036
13099
  "enhance-new"
13037
13100
  ]), f.ROW_LOCAL_ROW_OPERATIONS = /* @__PURE__ */ new Set(["row-add", "row-remove", "row-prev", "row-next"]), f.REACTIVE_FETCH_STATES = /* @__PURE__ */ new WeakMap(), f.REACTIVE_IMPORT_STATES = /* @__PURE__ */ new WeakMap(), f.DERIVE_SUBTREE_PROFILES = /* @__PURE__ */ new WeakMap(), f.EACH_UPDATE_STATES = /* @__PURE__ */ new WeakMap(), f.EACH_RENDERED_CHANGE_FIRED = /* @__PURE__ */ new WeakSet(), f.EACH_RENDERED_CHANGE_WARNED = /* @__PURE__ */ new WeakSet(), f.WARNED_DUPLICATE_EACH_KEYS = /* @__PURE__ */ new Set(), f.ABSENT_PATH = Symbol("absent");
13038
- let L = f;
13101
+ let $ = f;
13039
13102
  const Ae = class Ae {
13040
13103
  /**
13041
13104
  * コンストラクタ。
@@ -13185,7 +13248,7 @@ const Ae = class Ae {
13185
13248
  if (i.getAttribute(this.onAttributeName) !== e)
13186
13249
  return;
13187
13250
  const n = M.get(i);
13188
- n instanceof D && new ne(n, "on", t).run().catch((s) => {
13251
+ n instanceof T && new ne(n, "on", t).run().catch((s) => {
13189
13252
  m.error("[Haori]", "Procedure execution error:", s);
13190
13253
  });
13191
13254
  });
@@ -13306,7 +13369,7 @@ const Ae = class Ae {
13306
13369
  */
13307
13370
  markUserEditOnly(e) {
13308
13371
  const t = M.get(e);
13309
- t instanceof D && t.markUserEdit();
13372
+ t instanceof T && t.markUserEdit();
13310
13373
  }
13311
13374
  /**
13312
13375
  * `change` / `input` の対象要素について、内部値の同期とユーザー編集の記録を行います。
@@ -13322,13 +13385,13 @@ const Ae = class Ae {
13322
13385
  */
13323
13386
  syncUserEdit(e, t) {
13324
13387
  const r = M.get(e);
13325
- if (r instanceof D && (r.syncValue(), t ? r.markUserEditOnChange() : r.markUserEdit(), e instanceof HTMLInputElement && e.type === "radio" && e.name)) {
13388
+ if (r instanceof T && (r.syncValue(), t ? r.markUserEditOnChange() : r.markUserEdit(), e instanceof HTMLInputElement && e.type === "radio" && e.name)) {
13326
13389
  const i = document.getElementsByName(e.name);
13327
13390
  for (const n of Array.from(i)) {
13328
13391
  if (n === e || !(n instanceof HTMLInputElement) || n.type !== "radio" || n.form !== e.form)
13329
13392
  continue;
13330
13393
  const s = M.get(n);
13331
- s instanceof D && (s.syncValue(), s.markUserEdit());
13394
+ s instanceof T && (s.syncValue(), s.markUserEdit());
13332
13395
  }
13333
13396
  }
13334
13397
  }
@@ -13536,7 +13599,7 @@ const v = class v {
13536
13599
  if (!t && !v.hasPollAttribute(e))
13537
13600
  return;
13538
13601
  const r = M.get(e);
13539
- if (!(r instanceof D) || !v.shouldObserve(r)) {
13602
+ if (!(r instanceof T) || !v.shouldObserve(r)) {
13540
13603
  t && v.teardown(e, t);
13541
13604
  return;
13542
13605
  }
@@ -13714,7 +13777,7 @@ const v = class v {
13714
13777
  await v.stop(e, t, "error");
13715
13778
  return;
13716
13779
  }
13717
- if (await v.restoreStateIfCleared(t), i && v.isUntilSatisfied(t.fragment)) {
13780
+ if (i && v.isUntilSatisfied(t.fragment)) {
13718
13781
  await v.stop(e, t, "until");
13719
13782
  return;
13720
13783
  }
@@ -13744,7 +13807,7 @@ const v = class v {
13744
13807
  */
13745
13808
  static async handleTimeout(e) {
13746
13809
  const t = v.registrations.get(e);
13747
- !t || t.stopped || (t.timeoutTimerId = null, t.timedOut = !0, e.isConnected && O.pollTimeout(
13810
+ !t || t.stopped || (t.timeoutTimerId = null, t.timedOut = !0, e.isConnected && B.pollTimeout(
13748
13811
  e,
13749
13812
  t.count,
13750
13813
  v.elapsed(t)
@@ -13764,7 +13827,7 @@ const v = class v {
13764
13827
  v.registrations.delete(e);
13765
13828
  return;
13766
13829
  }
13767
- await v.injectState(t), e.isConnected && O.pollStop(
13830
+ await v.injectState(t), e.isConnected && B.pollStop(
13768
13831
  e,
13769
13832
  r,
13770
13833
  t.count,
@@ -13850,34 +13913,17 @@ const v = class v {
13850
13913
  ...i.getRawBindingData() ?? {},
13851
13914
  _poll: r
13852
13915
  };
13853
- return L.setBindingData(n, s, {
13916
+ return $.setBindingData(n, s, {
13854
13917
  reflectToAttribute: !1,
13855
13918
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
13856
13919
  // 解除しない)。
13857
13920
  kind: "nonSupply",
13858
- sequence: D.nextSequence()
13921
+ sequence: T.nextSequence()
13859
13922
  });
13860
13923
  })
13861
13924
  ).then(() => {
13862
13925
  });
13863
13926
  }
13864
- /**
13865
- * 手続きの実行で `_poll` が失われていた場合に注入し直します。
13866
- *
13867
- * `data-poll-bind` は既定でバインド先を全置換するため、注入先が bind 先と同じ
13868
- * 要素(`data-poll-state` の値を省略して自要素を対象にした場合など)では、
13869
- * 取得成功のたびに `_poll` が消えます。失われたときだけ書き戻すことで、毎回の
13870
- * 注入による再評価コスト(`injectState()` のコメント参照)を避けながら状態を
13871
- * 維持します。
13872
- *
13873
- * @param registration 登録情報
13874
- * @returns 処理完了の Promise
13875
- */
13876
- static async restoreStateIfCleared(e) {
13877
- v.resolveStateFragments(e).some(
13878
- (i) => (i.getRawBindingData() ?? {})._poll === void 0
13879
- ) && await v.injectState(e);
13880
- }
13881
13927
  /**
13882
13928
  * `_poll` の注入先フラグメントを解決します。
13883
13929
  *
@@ -13906,7 +13952,7 @@ const v = class v {
13906
13952
  if (!a.isConnected)
13907
13953
  return;
13908
13954
  const o = M.get(a);
13909
- o instanceof D && s.push(o);
13955
+ o instanceof T && s.push(o);
13910
13956
  }), s;
13911
13957
  }
13912
13958
  /**
@@ -14054,11 +14100,11 @@ v.CONFIG_KEYS = /* @__PURE__ */ new Set([
14054
14100
  "state"
14055
14101
  ]), v.DEFAULT_INTERVAL_MS = 5e3, v.MIN_INTERVAL_MS = 100, v.registrations = /* @__PURE__ */ new Map(), v.visibilityListener = null;
14056
14102
  let be = v;
14057
- const Vt = "0.47.2";
14103
+ const Vt = "0.47.3";
14058
14104
  function qt(y) {
14059
14105
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => y()) : Promise.resolve().then(y);
14060
14106
  }
14061
- const P = class P {
14107
+ const L = class L {
14062
14108
  /**
14063
14109
  * ノードが現在の Window に属する HTMLElement かどうかを判定します。
14064
14110
  *
@@ -14077,8 +14123,8 @@ const P = class P {
14077
14123
  * @param root 走査の起点ノード
14078
14124
  */
14079
14125
  static syncTree(e) {
14080
- (e instanceof Element || e instanceof DocumentFragment) && (P.isHtmlElement(e) && P.syncElement(e), e.querySelectorAll("*").forEach((t) => {
14081
- P.syncElement(t);
14126
+ (e instanceof Element || e instanceof DocumentFragment) && (L.isHtmlElement(e) && L.syncElement(e), e.querySelectorAll("*").forEach((t) => {
14127
+ L.syncElement(t);
14082
14128
  }));
14083
14129
  }
14084
14130
  /**
@@ -14088,42 +14134,42 @@ const P = class P {
14088
14134
  * @param element 対象要素
14089
14135
  */
14090
14136
  static syncElement(e) {
14091
- const t = P.registrations.get(e), r = M.get(e);
14092
- if (!(r instanceof D) || !P.shouldObserve(r)) {
14093
- t && (t.observer.disconnect(), P.registrations.delete(e));
14137
+ const t = L.registrations.get(e), r = M.get(e);
14138
+ if (!(r instanceof T) || !L.shouldObserve(r)) {
14139
+ t && (t.observer.disconnect(), L.registrations.delete(e));
14094
14140
  return;
14095
14141
  }
14096
14142
  if (typeof IntersectionObserver > "u")
14097
14143
  return;
14098
- const i = P.resolveVarName(r);
14144
+ const i = L.resolveVarName(r);
14099
14145
  if (i === "") {
14100
- t && (t.observer.disconnect(), P.registrations.delete(e)), m.warn(
14146
+ t && (t.observer.disconnect(), L.registrations.delete(e)), m.warn(
14101
14147
  "[Haori]",
14102
14148
  'data-each-visible requires a variable name (e.g. data-each-visible="visibleRange").'
14103
14149
  );
14104
14150
  return;
14105
14151
  }
14106
- const n = P.resolveRoot(r), s = P.resolveRootMargin(r);
14152
+ const n = L.resolveRoot(r), s = L.resolveRootMargin(r);
14107
14153
  if (t && t.observer.root === n && t.observer.rootMargin === s && t.varName === i) {
14108
- t.fragment = r, P.refreshRows(t);
14154
+ t.fragment = r, L.refreshRows(t);
14109
14155
  return;
14110
14156
  }
14111
- t && (t.observer.disconnect(), P.registrations.delete(e));
14157
+ t && (t.observer.disconnect(), L.registrations.delete(e));
14112
14158
  const a = new IntersectionObserver(
14113
14159
  (c) => {
14114
- const u = P.registrations.get(e);
14160
+ const u = L.registrations.get(e);
14115
14161
  if (!u)
14116
14162
  return;
14117
14163
  let d = !1;
14118
14164
  c.forEach((p) => {
14119
14165
  const g = p.target;
14120
14166
  u.observedRows.has(g) && (p.isIntersecting ? u.visibleRows.has(g) || (u.visibleRows.add(g), d = !0) : u.visibleRows.delete(g) && (d = !0));
14121
- }), d && P.scheduleCompute(u);
14167
+ }), d && L.scheduleCompute(u);
14122
14168
  },
14123
14169
  {
14124
14170
  root: n,
14125
14171
  rootMargin: s,
14126
- threshold: P.THRESHOLD
14172
+ threshold: L.THRESHOLD
14127
14173
  }
14128
14174
  ), o = {
14129
14175
  fragment: r,
@@ -14136,7 +14182,7 @@ const P = class P {
14136
14182
  scheduled: !1,
14137
14183
  lastSnapshot: null
14138
14184
  };
14139
- P.registrations.set(e, o), P.refreshRows(o);
14185
+ L.registrations.set(e, o), L.refreshRows(o);
14140
14186
  }
14141
14187
  /**
14142
14188
  * 指定ノード配下の監視登録を解放します。
@@ -14144,22 +14190,22 @@ const P = class P {
14144
14190
  * @param root 走査の起点ノード
14145
14191
  */
14146
14192
  static cleanupTree(e) {
14147
- if (P.isHtmlElement(e)) {
14148
- const t = P.registrations.get(e);
14149
- t && (t.observer.disconnect(), P.registrations.delete(e));
14193
+ if (L.isHtmlElement(e)) {
14194
+ const t = L.registrations.get(e);
14195
+ t && (t.observer.disconnect(), L.registrations.delete(e));
14150
14196
  }
14151
14197
  (e instanceof Element || e instanceof DocumentFragment) && e.querySelectorAll("*").forEach((t) => {
14152
- const r = P.registrations.get(t);
14153
- r && (r.observer.disconnect(), P.registrations.delete(t));
14198
+ const r = L.registrations.get(t);
14199
+ r && (r.observer.disconnect(), L.registrations.delete(t));
14154
14200
  });
14155
14201
  }
14156
14202
  /**
14157
14203
  * すべての監視登録を解放します。
14158
14204
  */
14159
14205
  static disconnectAll() {
14160
- P.registrations.forEach((e) => {
14206
+ L.registrations.forEach((e) => {
14161
14207
  e.observer.disconnect();
14162
- }), P.registrations.clear();
14208
+ }), L.registrations.clear();
14163
14209
  }
14164
14210
  /**
14165
14211
  * 監視対象(`data-each` かつ `data-each-visible`)かどうかを判定します。
@@ -14194,7 +14240,7 @@ const P = class P {
14194
14240
  if (typeof r != "string" || r.trim() === "")
14195
14241
  return null;
14196
14242
  const i = X.query(r, t, document);
14197
- return P.isHtmlElement(i) ? i : (m.error("[Haori]", `Visible range root element not found: ${r}`), null);
14243
+ return L.isHtmlElement(i) ? i : (m.error("[Haori]", `Visible range root element not found: ${r}`), null);
14198
14244
  }
14199
14245
  /**
14200
14246
  * rootMargin を解決します。
@@ -14204,7 +14250,7 @@ const P = class P {
14204
14250
  */
14205
14251
  static resolveRootMargin(e) {
14206
14252
  const t = `${l.prefix}each-visible-margin`, r = e.getAttribute(t);
14207
- return r === null || r === !1 || r === "" ? P.DEFAULT_ROOT_MARGIN : String(r);
14253
+ return r === null || r === !1 || r === "" ? L.DEFAULT_ROOT_MARGIN : String(r);
14208
14254
  }
14209
14255
  /**
14210
14256
  * コンテナ直下の実際の行要素(`each-before`/`each-after` を除く)を描画順で返します。
@@ -14214,7 +14260,7 @@ const P = class P {
14214
14260
  */
14215
14261
  static realRowElements(e) {
14216
14262
  return e.getChildren().filter(
14217
- (t) => t instanceof D && !t.hasAttribute(`${l.prefix}each-before`) && !t.hasAttribute(`${l.prefix}each-after`)
14263
+ (t) => t instanceof T && !t.hasAttribute(`${l.prefix}each-before`) && !t.hasAttribute(`${l.prefix}each-after`)
14218
14264
  ).map((t) => t.getTarget());
14219
14265
  }
14220
14266
  /**
@@ -14224,12 +14270,12 @@ const P = class P {
14224
14270
  * @param registration 対象の登録
14225
14271
  */
14226
14272
  static refreshRows(e) {
14227
- const t = P.realRowElements(e.fragment), r = new Set(t);
14273
+ const t = L.realRowElements(e.fragment), r = new Set(t);
14228
14274
  for (const i of [...e.observedRows])
14229
14275
  r.has(i) || (e.observer.unobserve(i), e.observedRows.delete(i), e.visibleRows.delete(i));
14230
14276
  for (const i of t)
14231
14277
  e.observedRows.has(i) || (e.observer.observe(i), e.observedRows.add(i));
14232
- P.scheduleCompute(e);
14278
+ L.scheduleCompute(e);
14233
14279
  }
14234
14280
  /**
14235
14281
  * 次フレームでの集計・公開を予約します(多発する交差イベントを 1 回にまとめる)。
@@ -14240,7 +14286,7 @@ const P = class P {
14240
14286
  e.scheduled || (e.scheduled = !0, qt(() => {
14241
14287
  e.scheduled = !1;
14242
14288
  const t = e.fragment.getTarget();
14243
- P.registrations.get(t) === e && P.computeAndPublish(e);
14289
+ L.registrations.get(t) === e && L.computeAndPublish(e);
14244
14290
  }));
14245
14291
  }
14246
14292
  /**
@@ -14249,7 +14295,7 @@ const P = class P {
14249
14295
  * @param registration 対象の登録
14250
14296
  */
14251
14297
  static computeAndPublish(e) {
14252
- const t = P.realRowElements(e.fragment), r = /* @__PURE__ */ new Map();
14298
+ const t = L.realRowElements(e.fragment), r = /* @__PURE__ */ new Map();
14253
14299
  t.forEach((a, o) => r.set(a, o));
14254
14300
  const i = [];
14255
14301
  for (const a of e.visibleRows) {
@@ -14282,7 +14328,7 @@ const P = class P {
14282
14328
  };
14283
14329
  }
14284
14330
  const s = JSON.stringify(n);
14285
- s !== e.lastSnapshot && (e.lastSnapshot = s, P.publish(e, n));
14331
+ s !== e.lastSnapshot && (e.lastSnapshot = s, L.publish(e, n));
14286
14332
  }
14287
14333
  /**
14288
14334
  * 可視範囲スナップショットを最近接の上位 `data-bind` スコープへ公開します。
@@ -14291,7 +14337,7 @@ const P = class P {
14291
14337
  * @param snapshot 公開するスナップショット
14292
14338
  */
14293
14339
  static publish(e, t) {
14294
- const r = P.resolveBindOwner(e.fragment);
14340
+ const r = L.resolveBindOwner(e.fragment);
14295
14341
  if (!r) {
14296
14342
  m.warn(
14297
14343
  "[Haori]",
@@ -14304,13 +14350,13 @@ const P = class P {
14304
14350
  };
14305
14351
  n[e.varName] = { ...t };
14306
14352
  const s = e.fragment.getTarget(), a = i === s ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([e.fragment]);
14307
- L.setBindingData(i, n, {
14353
+ $.setBindingData(i, n, {
14308
14354
  skipFragments: a,
14309
14355
  reflectToAttribute: !1,
14310
14356
  // 可視範囲の公開は値の供給ではない(権威を持たず、ユーザー編集の印も
14311
14357
  // 解除しない)。
14312
14358
  kind: "nonSupply",
14313
- sequence: D.nextSequence()
14359
+ sequence: T.nextSequence()
14314
14360
  }).catch((o) => {
14315
14361
  m.error("[Haori]", "Failed to publish visible range:", o);
14316
14362
  });
@@ -14333,8 +14379,8 @@ const P = class P {
14333
14379
  return e.hasAttribute(t) ? e : null;
14334
14380
  }
14335
14381
  };
14336
- P.THRESHOLD = 0, P.DEFAULT_ROOT_MARGIN = "0px", P.registrations = /* @__PURE__ */ new Map();
14337
- let fe = P;
14382
+ L.THRESHOLD = 0, L.DEFAULT_ROOT_MARGIN = "0px", L.registrations = /* @__PURE__ */ new Map();
14383
+ let fe = L;
14338
14384
  const Y = class Y {
14339
14385
  /**
14340
14386
  * 既存の MutationObserver をすべて停止します。
@@ -14351,15 +14397,15 @@ const Y = class Y {
14351
14397
  static async init() {
14352
14398
  if (Y._initialized)
14353
14399
  return;
14354
- Y._initialized = !0, Y.disconnectMutationObservers(), D.setPendingMutationFlusher(() => {
14400
+ Y._initialized = !0, Y.disconnectMutationObservers(), T.setPendingMutationFlusher(() => {
14355
14401
  Y.flushPendingMutations();
14356
14402
  });
14357
14403
  const e = new Ue();
14358
14404
  Y._dispatcher = e, e.startDeferred();
14359
14405
  try {
14360
14406
  const t = await Promise.allSettled([
14361
- L.scan(document.head),
14362
- L.scan(document.body)
14407
+ $.scan(document.head),
14408
+ $.scan(document.body)
14363
14409
  ]), [r, i] = t;
14364
14410
  r.status !== "fulfilled" && m.error(
14365
14411
  "[Haori]",
@@ -14373,7 +14419,7 @@ const Y = class Y {
14373
14419
  } finally {
14374
14420
  e.release();
14375
14421
  }
14376
- O.ready(Vt);
14422
+ B.ready(Vt);
14377
14423
  }
14378
14424
  /**
14379
14425
  * 稼働中の EventDispatcher を返します。
@@ -14444,7 +14490,7 @@ const Y = class Y {
14444
14490
  const r = t.filter(Y.isBindAttributeRecord), i = t.filter(
14445
14491
  (n) => !Y.isBindAttributeRecord(n)
14446
14492
  );
14447
- r.length > 0 && Y.processMutations(r, D.nextSequence()), i.length > 0 && Promise.resolve().then(() => {
14493
+ r.length > 0 && Y.processMutations(r, T.nextSequence()), i.length > 0 && Promise.resolve().then(() => {
14448
14494
  Y.processMutations(i);
14449
14495
  });
14450
14496
  }
@@ -14474,9 +14520,9 @@ const Y = class Y {
14474
14520
  switch (r.type) {
14475
14521
  case "attributes": {
14476
14522
  const i = r.target;
14477
- if (r.attributeName && i.hasAttribute("data-haori-click-lock") && (r.attributeName === "disabled" || r.attributeName === "data-haori-click-lock") || r.attributeName && i.hasAttribute(ue) && (r.attributeName === "disabled" || r.attributeName === ue) || r.attributeName && (r.attributeName === `${l.prefix}if-false` || r.attributeName === "style" && i.hasAttribute(`${l.prefix}if-false`)) || r.attributeName && L.isAliasedAttributeReflection(i, r.attributeName))
14523
+ if (r.attributeName && i.hasAttribute("data-haori-click-lock") && (r.attributeName === "disabled" || r.attributeName === "data-haori-click-lock") || r.attributeName && i.hasAttribute(ue) && (r.attributeName === "disabled" || r.attributeName === ue) || r.attributeName && (r.attributeName === `${l.prefix}if-false` || r.attributeName === "style" && i.hasAttribute(`${l.prefix}if-false`)) || r.attributeName && $.isAliasedAttributeReflection(i, r.attributeName))
14478
14524
  break;
14479
- L.setAttribute(
14525
+ $.setAttribute(
14480
14526
  i,
14481
14527
  r.attributeName,
14482
14528
  i.getAttribute(r.attributeName),
@@ -14487,14 +14533,14 @@ const Y = class Y {
14487
14533
  }
14488
14534
  case "childList": {
14489
14535
  Array.from(r.removedNodes).forEach((i) => {
14490
- ye.cleanupTree(i), be.cleanupTree(i), fe.cleanupTree(i), L.removeNode(i);
14536
+ ye.cleanupTree(i), be.cleanupTree(i), fe.cleanupTree(i), $.removeNode(i);
14491
14537
  }), Array.from(r.addedNodes).forEach((i) => {
14492
- i.parentElement instanceof Element && (L.addNode(i.parentElement, i), ye.syncTree(i), be.syncTree(i), fe.syncTree(i));
14538
+ i.parentElement instanceof Element && ($.addNode(i.parentElement, i), ye.syncTree(i), be.syncTree(i), fe.syncTree(i));
14493
14539
  }), r.target instanceof Element && fe.syncElement(r.target);
14494
14540
  break;
14495
14541
  }
14496
14542
  case "characterData": {
14497
- r.target instanceof Text || r.target instanceof Comment ? L.changeText(r.target, r.target.textContent) : m.warn(
14543
+ r.target instanceof Text || r.target instanceof Comment ? $.changeText(r.target, r.target.textContent) : m.warn(
14498
14544
  "[Haori]",
14499
14545
  "Unsupported character data type:",
14500
14546
  r.target
@@ -14515,7 +14561,7 @@ let Me = Y;
14515
14561
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", Me.init) : Me.init();
14516
14562
  const Wt = () => ve.waitForRenders(), jt = ve.enhancers;
14517
14563
  export {
14518
- L as Core,
14564
+ $ as Core,
14519
14565
  se as Enhance,
14520
14566
  l as Env,
14521
14567
  N as Form,