haori 0.59.1 → 0.59.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
@@ -1,23 +1,23 @@
1
- const me = class me {
1
+ const be = class be {
2
2
  /**
3
3
  * 開発モードの状態を取得します。
4
4
  *
5
5
  * @returns 開発モードならtrue、そうでなければfalse
6
6
  */
7
7
  static isEnabled() {
8
- return me.devMode;
8
+ return be.devMode;
9
9
  }
10
10
  /**
11
11
  * 開発モードを有効化します。
12
12
  */
13
13
  static enable() {
14
- me.devMode = !0;
14
+ be.devMode = !0;
15
15
  }
16
16
  /**
17
17
  * 開発モードを無効化します。
18
18
  */
19
19
  static disable() {
20
- me.devMode = !1;
20
+ be.devMode = !1;
21
21
  }
22
22
  /**
23
23
  * 開発モードを切り替えます。
@@ -25,17 +25,17 @@ const me = class me {
25
25
  * @param enabled trueで有効化、falseで無効化
26
26
  */
27
27
  static set(e) {
28
- me.devMode = e;
28
+ be.devMode = e;
29
29
  }
30
30
  };
31
- me.devMode = !1;
32
- let q = me;
33
- const Be = "embedded";
34
- function _e(b) {
31
+ be.devMode = !1;
32
+ let q = be;
33
+ const He = "embedded";
34
+ function tt(b) {
35
35
  return b === "embedded" || b === "demo";
36
36
  }
37
- function At(b) {
38
- return b === null ? null : _e(b) ? b : Be;
37
+ function St(b) {
38
+ return b === null ? null : tt(b) ? b : He;
39
39
  }
40
40
  const ee = class ee {
41
41
  /**
@@ -73,7 +73,7 @@ const ee = class ee {
73
73
  * @return 戻り値はありません。
74
74
  */
75
75
  static setRuntime(e) {
76
- ee._runtime = _e(e) ? e : Be;
76
+ ee._runtime = tt(e) ? e : He;
77
77
  }
78
78
  /**
79
79
  * 実行環境からプレフィックスと開発モードかどうかを自動検出します。
@@ -87,7 +87,7 @@ const ee = class ee {
87
87
  if (e instanceof HTMLScriptElement) {
88
88
  const r = e.getAttribute("data-prefix") || ee._prefix;
89
89
  ee._prefix = r.endsWith("-") ? r : r + "-";
90
- const i = At(
90
+ const i = St(
91
91
  e.getAttribute("data-runtime")
92
92
  );
93
93
  i !== null && (ee._runtime = i), ee._strictBind = e.hasAttribute(
@@ -117,7 +117,7 @@ const ee = class ee {
117
117
  return ee._prefix;
118
118
  }
119
119
  };
120
- ee._prefix = "data-", ee._runtime = Be, ee._strictBind = !1;
120
+ ee._prefix = "data-", ee._runtime = He, ee._strictBind = !1;
121
121
  let l = ee;
122
122
  typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", l.detect) : l.detect());
123
123
  class m {
@@ -149,7 +149,7 @@ class m {
149
149
  console.error(e, ...t);
150
150
  }
151
151
  }
152
- const Et = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, Ke = "new:", M = class M {
152
+ const Rt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, Ge = "new:", M = class M {
153
153
  /**
154
154
  * 外部ライブラリ連携を登録します。
155
155
  *
@@ -285,7 +285,7 @@ const Et = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, Ke = "new:
285
285
  M.appliedKeys(e).set(r, n);
286
286
  });
287
287
  }), M.names(e, `${l.prefix}enhance-new`).forEach((r) => {
288
- const i = `${Ke}${r}`;
288
+ const i = `${Ge}${r}`;
289
289
  if (M.instances.get(e)?.has(i))
290
290
  return;
291
291
  const n = M.resolveGlobal(r);
@@ -322,7 +322,7 @@ const Et = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, Ke = "new:
322
322
  static destroyElement(e) {
323
323
  const t = M.instances.get(e);
324
324
  t && (t.forEach((r, i) => {
325
- if (i.startsWith(Ke))
325
+ if (i.startsWith(Ge))
326
326
  return;
327
327
  const n = M.enhancers.get(i);
328
328
  !n || typeof n.destroy != "function" || M.run(`enhance "${i}" destroy`, () => {
@@ -368,7 +368,7 @@ const Et = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, Ke = "new:
368
368
  * @returns 解決した値。解決できない場合は null
369
369
  */
370
370
  static resolveGlobal(e) {
371
- if (!Et.test(e))
371
+ if (!Rt.test(e))
372
372
  return m.error(
373
373
  "[Haori]",
374
374
  `${l.prefix}enhance-new accepts a dot-separated global reference only: ${e}`
@@ -421,26 +421,26 @@ const Et = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, Ke = "new:
421
421
  }
422
422
  };
423
423
  M.enhancers = /* @__PURE__ */ new Map(), M.instances = /* @__PURE__ */ new WeakMap(), M.warnedUnknownNames = /* @__PURE__ */ new Set(), M.warnedMissingGlobals = /* @__PURE__ */ new Set(), M.visited = /* @__PURE__ */ new WeakSet(), M.mutationCapture = null;
424
- let te = M;
425
- const et = "yyyy/MM/dd HH:mm", vt = "en-US", ze = 1e4;
426
- function le(b) {
424
+ let re = M;
425
+ const rt = "yyyy/MM/dd HH:mm", Tt = "en-US", Ye = 1e4;
426
+ function ue(b) {
427
427
  return String(b).padStart(2, "0");
428
428
  }
429
- function tt(b, e, t, r, i, n) {
429
+ function it(b, e, t, r, i, n) {
430
430
  return {
431
431
  yyyy: String(b).padStart(4, "0"),
432
- yy: le(b % 100),
433
- MM: le(e),
432
+ yy: ue(b % 100),
433
+ MM: ue(e),
434
434
  M: String(e),
435
- dd: le(t),
435
+ dd: ue(t),
436
436
  d: String(t),
437
- HH: le(r),
437
+ HH: ue(r),
438
438
  H: String(r),
439
- mm: le(i),
440
- ss: le(n)
439
+ mm: ue(i),
440
+ ss: ue(n)
441
441
  };
442
442
  }
443
- function rt(b, e) {
443
+ function nt(b, e) {
444
444
  let t;
445
445
  try {
446
446
  t = new Intl.DateTimeFormat("en-US", {
@@ -460,9 +460,9 @@ function rt(b, e) {
460
460
  for (const u of t)
461
461
  u.type !== "literal" && (r[u.type] = u.value);
462
462
  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);
463
- return !Number.isFinite(i) || !Number.isFinite(n) || !Number.isFinite(s) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(c) ? null : tt(i, n, s, a, o, c);
463
+ return !Number.isFinite(i) || !Number.isFinite(n) || !Number.isFinite(s) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(c) ? null : it(i, n, s, a, o, c);
464
464
  }
465
- function Pe(b, e = et, t) {
465
+ function Le(b, e = rt, t) {
466
466
  if (b == null || b === "")
467
467
  return "";
468
468
  const r = b instanceof Date ? b : new Date(b);
@@ -470,10 +470,10 @@ function Pe(b, e = et, t) {
470
470
  return "";
471
471
  let i;
472
472
  if (typeof t == "string" && t.trim() !== "") {
473
- if (i = rt(r, t.trim()), i === null)
473
+ if (i = nt(r, t.trim()), i === null)
474
474
  return "";
475
475
  } else
476
- i = tt(
476
+ i = it(
477
477
  r.getFullYear(),
478
478
  r.getMonth() + 1,
479
479
  r.getDate(),
@@ -487,15 +487,15 @@ function Pe(b, e = et, t) {
487
487
  (s, a) => a !== void 0 ? a === "" ? "'" : a : n[s]
488
488
  );
489
489
  }
490
- const wt = "yyyy-MM-dd";
491
- function it(b = et, e) {
492
- return Pe(/* @__PURE__ */ new Date(), b, e);
490
+ const Dt = "yyyy-MM-dd";
491
+ function st(b = rt, e) {
492
+ return Le(/* @__PURE__ */ new Date(), b, e);
493
493
  }
494
- function nt(b = 0, e = wt, t) {
494
+ function at(b = 0, e = Dt, t) {
495
495
  const r = Number.isFinite(b) ? Math.trunc(b) : 0, i = typeof t == "string" && t.trim() !== "" ? t.trim() : "";
496
496
  let n, s, a;
497
497
  if (i !== "") {
498
- const c = rt(/* @__PURE__ */ new Date(), i);
498
+ const c = nt(/* @__PURE__ */ new Date(), i);
499
499
  if (c === null)
500
500
  return "";
501
501
  n = Number(c.yyyy), s = Number(c.MM), a = Number(c.dd);
@@ -504,9 +504,9 @@ function nt(b = 0, e = wt, t) {
504
504
  n = c.getFullYear(), s = c.getMonth() + 1, a = c.getDate();
505
505
  }
506
506
  const o = new Date(Date.UTC(n, s - 1, a + r));
507
- return Pe(o, e, "UTC");
507
+ return Le(o, e, "UTC");
508
508
  }
509
- function st(b, e) {
509
+ function ot(b, e) {
510
510
  if (b == null)
511
511
  return "";
512
512
  let t;
@@ -525,23 +525,23 @@ function st(b, e) {
525
525
  const i = Math.max(0, Math.trunc(e));
526
526
  r.minimumFractionDigits = i, r.maximumFractionDigits = i;
527
527
  }
528
- return new Intl.NumberFormat(vt, r).format(t);
528
+ return new Intl.NumberFormat(Tt, r).format(t);
529
529
  }
530
- function at(b, e, t) {
530
+ function lt(b, e, t) {
531
531
  let r, i, n;
532
532
  if (e === void 0 ? (r = 0, i = b, n = 1) : (r = b, i = e, n = t === void 0 ? 1 : t), !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(n) || n === 0)
533
533
  return [];
534
534
  r = Math.trunc(r), i = Math.trunc(i), n = Math.trunc(n);
535
535
  const s = [];
536
536
  if (n > 0)
537
- for (let a = r; a < i && s.length < ze; a += n)
537
+ for (let a = r; a < i && s.length < Ye; a += n)
538
538
  s.push(a);
539
539
  else
540
- for (let a = r; a > i && s.length < ze; a += n)
540
+ for (let a = r; a > i && s.length < Ye; a += n)
541
541
  s.push(a);
542
542
  return s;
543
543
  }
544
- function ot(b, e, t = {}) {
544
+ function ct(b, e, t = {}) {
545
545
  const r = Math.trunc(Number(b));
546
546
  if (!Number.isFinite(r) || r <= 0)
547
547
  return [];
@@ -578,62 +578,62 @@ function ot(b, e, t = {}) {
578
578
  }
579
579
  return c;
580
580
  }
581
- const St = /^(\d{4})-(\d{1,2})$/, Rt = 1200;
582
- function ke(b, e) {
581
+ const Ft = /^(\d{4})-(\d{1,2})$/, kt = 1200;
582
+ function xe(b, e) {
583
583
  const t = Number(b);
584
584
  return Number.isFinite(t) ? Math.trunc(t) : e;
585
585
  }
586
- function Le(b, e) {
586
+ function Oe(b, e) {
587
587
  if (typeof b != "string")
588
588
  return "";
589
- const t = St.exec(b.trim());
589
+ const t = Ft.exec(b.trim());
590
590
  if (!t)
591
591
  return "";
592
592
  const r = Number(t[1]), i = Number(t[2]);
593
593
  if (i < 1 || i > 12)
594
594
  return "";
595
595
  const n = Number.isFinite(e) ? Math.trunc(e) : 0, s = r * 12 + (i - 1) + n, a = Math.floor(s / 12), o = s - a * 12 + 1;
596
- return `${String(a).padStart(4, "0")}-${le(o)}`;
596
+ return `${String(a).padStart(4, "0")}-${ue(o)}`;
597
597
  }
598
- function Tt(b) {
598
+ function It(b) {
599
599
  if (typeof b == "string" && b.trim() !== "")
600
- return Le(b, 0);
600
+ return Oe(b, 0);
601
601
  const e = /* @__PURE__ */ new Date();
602
- return `${String(e.getFullYear()).padStart(4, "0")}-${le(e.getMonth() + 1)}`;
602
+ return `${String(e.getFullYear()).padStart(4, "0")}-${ue(e.getMonth() + 1)}`;
603
603
  }
604
- function lt(b, e) {
604
+ function ut(b, e) {
605
605
  const t = Math.trunc(Number(b));
606
606
  if (!Number.isFinite(t) || t < 0)
607
607
  return [];
608
- const r = Tt(e);
608
+ const r = It(e);
609
609
  if (r === "")
610
610
  return [];
611
- const i = Math.min(t, Rt), n = [];
611
+ const i = Math.min(t, kt), n = [];
612
612
  for (let s = 0; s <= i; s += 1) {
613
- const a = Le(r, -s);
613
+ const a = Oe(r, -s);
614
614
  n.push({ targetMonth: a, label: a.replace(/-/g, "/") });
615
615
  }
616
616
  return n;
617
617
  }
618
- function ct(b, e) {
618
+ function dt(b, e) {
619
619
  const t = { start: 0, end: 0, total: 0, empty: !0 };
620
620
  if (!b || typeof b != "object")
621
621
  return t;
622
- const r = b, i = ke(r.totalElements ?? r.totalCount, 0);
622
+ const r = b, i = xe(r.totalElements ?? r.totalCount, 0);
623
623
  if (i <= 0)
624
624
  return t;
625
- const n = Math.max(0, ke(r.number, 0)), s = Math.max(0, ke(r.size, 0)), a = n * s, o = Math.min(a + 1, i);
625
+ const n = Math.max(0, xe(r.number, 0)), s = Math.max(0, xe(r.size, 0)), a = n * s, o = Math.min(a + 1, i);
626
626
  let c;
627
627
  if (e !== void 0 && Number.isFinite(e))
628
628
  c = Math.max(0, Math.trunc(e));
629
629
  else {
630
- const d = ke(r.numberOfElements, NaN);
630
+ const d = xe(r.numberOfElements, NaN);
631
631
  c = Number.isFinite(d) ? d : Math.min(s, i - a);
632
632
  }
633
633
  const u = Math.min(a + c, i);
634
634
  return { start: o, end: Math.max(u, o), total: i, empty: !1 };
635
635
  }
636
- function ut(b, e, t) {
636
+ function ft(b, e, t) {
637
637
  if (!Array.isArray(b) || b.length === 0)
638
638
  return null;
639
639
  const r = String(t), i = b.find(
@@ -641,7 +641,7 @@ function ut(b, e, t) {
641
641
  );
642
642
  return i === void 0 ? null : i;
643
643
  }
644
- function dt(b, e) {
644
+ function ht(b, e) {
645
645
  if (!Array.isArray(b))
646
646
  return 0;
647
647
  let t = 0;
@@ -654,25 +654,25 @@ function dt(b, e) {
654
654
  }
655
655
  return t;
656
656
  }
657
- function ft(b, e) {
657
+ function pt(b, e) {
658
658
  return e == null || b == null ? String(b) : String(b[e]);
659
659
  }
660
- function ht(b, e) {
660
+ function gt(b, e) {
661
661
  if (!Array.isArray(b))
662
662
  return [];
663
663
  const t = /* @__PURE__ */ new Set(), r = [];
664
664
  for (const i of b) {
665
- const n = ft(i, e);
665
+ const n = pt(i, e);
666
666
  t.has(n) || (t.add(n), r.push(i));
667
667
  }
668
668
  return r;
669
669
  }
670
- function pt(b, e) {
670
+ function mt(b, e) {
671
671
  if (!Array.isArray(b))
672
672
  return [];
673
673
  const t = /* @__PURE__ */ new Map(), r = [];
674
674
  for (const i of b) {
675
- const n = ft(i, e), s = t.get(n);
675
+ const n = pt(i, e), s = t.get(n);
676
676
  if (s === void 0) {
677
677
  const a = i == null ? i : i[e];
678
678
  t.set(n, r.length), r.push({ key: a, items: [i] });
@@ -681,22 +681,22 @@ function pt(b, e) {
681
681
  }
682
682
  return r;
683
683
  }
684
- const Dt = Object.freeze({
685
- date: Pe,
686
- now: it,
687
- today: nt,
688
- number: st,
689
- pages: ot,
690
- range: at,
691
- monthAdd: Le,
692
- monthRange: lt,
693
- pageSummary: ct,
694
- findBy: ut,
695
- sum: dt,
696
- distinct: ht,
697
- groupBy: pt
684
+ const Nt = Object.freeze({
685
+ date: Le,
686
+ now: st,
687
+ today: at,
688
+ number: ot,
689
+ pages: ct,
690
+ range: lt,
691
+ monthAdd: Oe,
692
+ monthRange: ut,
693
+ pageSummary: dt,
694
+ findBy: ft,
695
+ sum: ht,
696
+ distinct: gt,
697
+ groupBy: mt
698
698
  });
699
- class qe {
699
+ class We {
700
700
  constructor() {
701
701
  this.MAX_BUDGET = 8, this.queue = [], this.processing = !1;
702
702
  }
@@ -786,7 +786,7 @@ class qe {
786
786
  async waitForIdle(e = 1e3) {
787
787
  let t = 0, r = 0;
788
788
  for (; t < 2 && r < e; )
789
- this.processing || this.queue.length > 0 ? (await this.wait(), t = 0) : t += 1, await qe.nextTick(), r += 1;
789
+ this.processing || this.queue.length > 0 ? (await this.wait(), t = 0) : t += 1, await We.nextTick(), r += 1;
790
790
  }
791
791
  /**
792
792
  * 次のフレーム(または 1 マクロタスク)まで待機します。
@@ -799,7 +799,7 @@ class qe {
799
799
  });
800
800
  }
801
801
  }
802
- const je = class je {
802
+ const Ke = class Ke {
803
803
  /**
804
804
  * タスクをキューに追加します。
805
805
  *
@@ -826,8 +826,8 @@ const je = class je {
826
826
  return this.ASYNC_QUEUE.waitForIdle(e);
827
827
  }
828
828
  };
829
- je.ASYNC_QUEUE = new qe();
830
- let z = je;
829
+ Ke.ASYNC_QUEUE = new We();
830
+ let z = Ke;
831
831
  const R = class R {
832
832
  /**
833
833
  * ストレージを、参照が例外になる環境でも安全に読み出します。
@@ -1528,35 +1528,35 @@ ${t}`;
1528
1528
  if (g.compileFailed || g.evaluator === null)
1529
1529
  return { value: null, unresolvedReference: !1 };
1530
1530
  try {
1531
- const y = [], A = this.wrapBoundValues(a);
1531
+ const y = [], E = this.wrapBoundValues(a);
1532
1532
  g.bindKeys.forEach((T) => {
1533
- y.push(A[T]);
1533
+ y.push(E[T]);
1534
1534
  });
1535
- const E = this.withBlockedPropertyAccess(
1535
+ const A = this.withBlockedPropertyAccess(
1536
1536
  () => g.evaluator(...y)
1537
1537
  );
1538
- return E === void 0 && this.warnBlockedIdentifiers(e), {
1539
- value: E,
1538
+ return A === void 0 && this.warnBlockedIdentifiers(e), {
1539
+ value: A,
1540
1540
  // `undefined` になる参照は「値が無い」状態であり、未解決参照として扱う。
1541
1541
  // 暗黙のオプショナルチェーンにより、`null` / `undefined` を経由した
1542
1542
  // メンバーアクセスもここへ集約される。
1543
- unresolvedReference: E === void 0
1543
+ unresolvedReference: A === void 0
1544
1544
  };
1545
1545
  } catch (y) {
1546
1546
  if (o && y instanceof ReferenceError) {
1547
- const A = this.extractMissingIdentifier(y);
1548
- if (A !== null && this.canRecoverMissingIdentifier(A, a)) {
1549
- a[A] = void 0;
1547
+ const E = this.extractMissingIdentifier(y);
1548
+ if (E !== null && this.canRecoverMissingIdentifier(E, a)) {
1549
+ a[E] = void 0;
1550
1550
  continue;
1551
1551
  }
1552
1552
  }
1553
1553
  if (this.warnBlockedIdentifiers(e), y instanceof ReferenceError && u.length > 0) {
1554
- const A = this.evaluateAsCondition(
1554
+ const E = this.evaluateAsCondition(
1555
1555
  e,
1556
1556
  a,
1557
1557
  u
1558
1558
  );
1559
- return A !== void 0 ? { value: A, unresolvedReference: !1 } : (this.recordUnresolvedIdentifiers(
1559
+ return E !== void 0 ? { value: E, unresolvedReference: !1 } : (this.recordUnresolvedIdentifiers(
1560
1560
  this.extractUninitializedIdentifiers(y, u),
1561
1561
  e
1562
1562
  ), { value: void 0, unresolvedReference: !0 });
@@ -1581,12 +1581,12 @@ ${t}`;
1581
1581
  */
1582
1582
  static prepareEvaluator(e, t, r = []) {
1583
1583
  const i = Object.keys(t).filter(
1584
- (E) => !this.FORBIDDEN_BINDING_NAMES.has(E)
1584
+ (A) => !this.FORBIDDEN_BINDING_NAMES.has(A)
1585
1585
  ), n = [], s = [];
1586
- i.forEach((E) => {
1587
- this.isUsableBindingKey(E) ? n.push(E) : s.push(E);
1586
+ i.forEach((A) => {
1587
+ this.isUsableBindingKey(A) ? n.push(A) : s.push(A);
1588
1588
  }), n.sort(), this.reportUnusableBindingKeys(s);
1589
- const a = new Set(n), o = r.filter((E) => !a.has(E)), c = `${e}:${n.join(",")}:${o.join(
1589
+ const a = new Set(n), o = r.filter((A) => !a.has(A)), c = `${e}:${n.join(",")}:${o.join(
1590
1590
  ","
1591
1591
  )}`;
1592
1592
  let u = this.EXPRESSION_CACHE.get(c) || null;
@@ -1598,22 +1598,22 @@ ${t}`;
1598
1598
  };
1599
1599
  const d = this.buildAssignments(n), g = this.buildShadowDeclarations(o), y = this.toGuardedMemberExpression(
1600
1600
  this.toOptionalChainExpression(e)
1601
- ), A = d ? `"use strict";
1601
+ ), E = d ? `"use strict";
1602
1602
  ${d};
1603
1603
  return (${y});${g}` : `"use strict";
1604
1604
  return (${y});${g}`;
1605
1605
  try {
1606
- return u = new Function(...n, A), this.EXPRESSION_CACHE.set(c, u), this.compileFailedExpressions.delete(e), {
1606
+ return u = new Function(...n, E), this.EXPRESSION_CACHE.set(c, u), this.compileFailedExpressions.delete(e), {
1607
1607
  bindKeys: n,
1608
1608
  evaluator: u,
1609
1609
  compileFailed: !1
1610
1610
  };
1611
- } catch (E) {
1611
+ } catch (A) {
1612
1612
  return o.length > 0 ? (m.warn(
1613
1613
  "[Haori]",
1614
1614
  "Failed to shadow undeclared identifier(s): " + o.join(", ") + ". Falling back to evaluation without shadowing.",
1615
1615
  e
1616
- ), this.prepareEvaluator(e, t, [])) : (m.error("[Haori]", "Failed to compile expression:", e, E), this.compileFailedExpressions.add(e), {
1616
+ ), this.prepareEvaluator(e, t, [])) : (m.error("[Haori]", "Failed to compile expression:", e, A), this.compileFailedExpressions.add(e), {
1617
1617
  bindKeys: n,
1618
1618
  evaluator: null,
1619
1619
  compileFailed: !0
@@ -2316,7 +2316,7 @@ return (${y});${g}`;
2316
2316
  }
2317
2317
  };
2318
2318
  R.MAX_IDENTIFIER_RECOVERY_COUNT = 8, R.BUILTIN_NAMESPACE = "haori", R.BUILTIN_HELPERS = {
2319
- ...Dt
2319
+ ...Nt
2320
2320
  }, R.BUILTIN_REFERENCE_PATTERN = /(^|[^\w$.])haori(?![\w$])/, R.BUILTIN_DATA_PROPERTY = "data", R.BUILTIN_DATA_REFERENCE_PATTERN = /(^|[^\w$.])haori\s*(\.\s*data(?![\w$])|\[)/, R.IDENTIFIER_NAME_PATTERN = /^[\p{ID_Start}$_][\p{ID_Continue}$\u200C\u200D]*$/u, R.usableBindingKeyCache = /* @__PURE__ */ new Map(), R.loggedUnusableBindingKeys = /* @__PURE__ */ new Set(), R.compileFailedExpressions = /* @__PURE__ */ new Set(), R.forbiddenBindingValueCache = /* @__PURE__ */ new WeakMap(), R.forbiddenBindingValueCacheResetScheduled = !1, R.loggedForbiddenKeySignatures = /* @__PURE__ */ new Set(), R.loggedForbiddenKeyResetScheduled = !1, R.FORBIDDEN_NAMES = [
2321
2321
  // グローバルオブジェクト
2322
2322
  "window",
@@ -2504,13 +2504,13 @@ R.MAX_IDENTIFIER_RECOVERY_COUNT = 8, R.BUILTIN_NAMESPACE = "haori", R.BUILTIN_HE
2504
2504
  "%",
2505
2505
  "..."
2506
2506
  ]), R.strictComparisonSplits = /* @__PURE__ */ new Map(), R.WRAPPED_VALUES = /* @__PURE__ */ new WeakSet();
2507
- let ie = R;
2508
- const he = "data-haori-if-disabled", Ge = "input, select, textarea, button, fieldset", C = class C {
2507
+ let ne = R;
2508
+ const ge = "data-haori-if-disabled", Xe = "input, select, textarea, button, fieldset", P = class P {
2509
2509
  /**
2510
2510
  * 集計状態を初期化します。
2511
2511
  */
2512
2512
  static reset() {
2513
- C.ELEMENT_STORES.clear(), C.ensureGlobalAccess();
2513
+ P.ELEMENT_STORES.clear(), P.ensureGlobalAccess();
2514
2514
  }
2515
2515
  /**
2516
2516
  * 集計を開始します。
@@ -2518,7 +2518,7 @@ const he = "data-haori-if-disabled", Ge = "input, select, textarea, button, fiel
2518
2518
  * @returns 戻り値はありません。
2519
2519
  */
2520
2520
  static start() {
2521
- C.collecting = !0;
2521
+ P.collecting = !0;
2522
2522
  }
2523
2523
  /**
2524
2524
  * 集計を停止します。
@@ -2526,7 +2526,7 @@ const he = "data-haori-if-disabled", Ge = "input, select, textarea, button, fiel
2526
2526
  * @returns 戻り値はありません。
2527
2527
  */
2528
2528
  static stop() {
2529
- C.collecting = !1;
2529
+ P.collecting = !1;
2530
2530
  }
2531
2531
  /**
2532
2532
  * 集計中かどうかを返します。
@@ -2534,7 +2534,7 @@ const he = "data-haori-if-disabled", Ge = "input, select, textarea, button, fiel
2534
2534
  * @returns 集計中なら true
2535
2535
  */
2536
2536
  static isCollecting() {
2537
- return C.collecting && q.isEnabled();
2537
+ return P.collecting && q.isEnabled();
2538
2538
  }
2539
2539
  /**
2540
2540
  * 現在の集計結果スナップショットを返します。
@@ -2542,7 +2542,7 @@ const he = "data-haori-if-disabled", Ge = "input, select, textarea, button, fiel
2542
2542
  * @returns エレメントごとの集計結果
2543
2543
  */
2544
2544
  static snapshot() {
2545
- return C.ensureGlobalAccess(), [...C.ELEMENT_STORES.entries()].map(([e, t]) => ({
2545
+ return P.ensureGlobalAccess(), [...P.ELEMENT_STORES.entries()].map(([e, t]) => ({
2546
2546
  elementId: e,
2547
2547
  tagName: t.tagName,
2548
2548
  attributes: [...t.attributes.entries()].map(([r, i]) => ({
@@ -2551,7 +2551,7 @@ const he = "data-haori-if-disabled", Ge = "input, select, textarea, button, fiel
2551
2551
  calls: i.calls,
2552
2552
  totalDurationMs: i.totalDurationMs,
2553
2553
  maxDurationMs: i.maxDurationMs,
2554
- placeholders: C.sortPlaceholders(
2554
+ placeholders: P.sortPlaceholders(
2555
2555
  i.placeholders
2556
2556
  )
2557
2557
  })).sort((r, i) => i.calls - r.calls),
@@ -2561,7 +2561,7 @@ const he = "data-haori-if-disabled", Ge = "input, select, textarea, button, fiel
2561
2561
  calls: i.calls,
2562
2562
  totalDurationMs: i.totalDurationMs,
2563
2563
  maxDurationMs: i.maxDurationMs,
2564
- placeholders: C.sortPlaceholders(
2564
+ placeholders: P.sortPlaceholders(
2565
2565
  i.placeholders
2566
2566
  )
2567
2567
  })).sort((r, i) => i.calls - r.calls)
@@ -2585,7 +2585,7 @@ const he = "data-haori-if-disabled", Ge = "input, select, textarea, button, fiel
2585
2585
  * @param limit 出力する宣言の数。既定は 20
2586
2586
  * @returns 要約。合計は `limit` で絞る前の全件から求める
2587
2587
  */
2588
- static report(e = C.DEFAULT_REPORT_LIMIT) {
2588
+ static report(e = P.DEFAULT_REPORT_LIMIT) {
2589
2589
  const t = /* @__PURE__ */ new Map();
2590
2590
  let r = 0, i = 0;
2591
2591
  const n = (c, u, d) => {
@@ -2609,7 +2609,7 @@ const he = "data-haori-if-disabled", Ge = "input, select, textarea, button, fiel
2609
2609
  d.maxDurationMs
2610
2610
  ), d.totalDurationMs > g.representativeDurationMs && (g.where = u, g.representativeDurationMs = d.totalDurationMs);
2611
2611
  };
2612
- C.snapshot().forEach((c) => {
2612
+ P.snapshot().forEach((c) => {
2613
2613
  c.attributes.forEach((u) => {
2614
2614
  n(
2615
2615
  `@${u.name}
@@ -2639,7 +2639,7 @@ ${u.template}`,
2639
2639
  entryCount: s.length,
2640
2640
  top: a
2641
2641
  };
2642
- return C.logReport(o), o;
2642
+ return P.logReport(o), o;
2643
2643
  }
2644
2644
  /**
2645
2645
  * 要約を表形式でコンソールへ出力します。
@@ -2669,30 +2669,30 @@ ${u.template}`,
2669
2669
  * @param expressions 今回評価した式一覧
2670
2670
  */
2671
2671
  static record(e, t, r) {
2672
- if (!q.isEnabled() || !e || t.length === 0 || (C.ensureGlobalAccess(), !C.isCollecting()))
2672
+ if (!q.isEnabled() || !e || t.length === 0 || (P.ensureGlobalAccess(), !P.isCollecting()))
2673
2673
  return;
2674
- const i = C.getOrCreateElementStore(
2674
+ const i = P.getOrCreateElementStore(
2675
2675
  e.element
2676
2676
  );
2677
2677
  if (e.kind === "attribute") {
2678
- const s = C.getOrCreateCounter(
2678
+ const s = P.getOrCreateCounter(
2679
2679
  i.attributes,
2680
2680
  e.rawName,
2681
2681
  e.template
2682
2682
  );
2683
- C.updateCounter(
2683
+ P.updateCounter(
2684
2684
  s,
2685
2685
  t,
2686
2686
  r
2687
2687
  );
2688
2688
  return;
2689
2689
  }
2690
- const n = C.getOrCreateCounter(
2690
+ const n = P.getOrCreateCounter(
2691
2691
  i.texts,
2692
2692
  String(e.childIndex),
2693
2693
  e.template
2694
2694
  );
2695
- C.updateCounter(
2695
+ P.updateCounter(
2696
2696
  n,
2697
2697
  t,
2698
2698
  r
@@ -2705,12 +2705,12 @@ ${u.template}`,
2705
2705
  if (!q.isEnabled())
2706
2706
  return;
2707
2707
  const e = globalThis;
2708
- e[C.GLOBAL_KEY] === void 0 && (e[C.GLOBAL_KEY] = {
2709
- start: () => C.start(),
2710
- stop: () => C.stop(),
2711
- reset: () => C.reset(),
2712
- snapshot: () => C.snapshot(),
2713
- report: (t) => C.report(t)
2708
+ e[P.GLOBAL_KEY] === void 0 && (e[P.GLOBAL_KEY] = {
2709
+ start: () => P.start(),
2710
+ stop: () => P.stop(),
2711
+ reset: () => P.reset(),
2712
+ snapshot: () => P.snapshot(),
2713
+ report: (t) => P.report(t)
2714
2714
  });
2715
2715
  }
2716
2716
  /**
@@ -2720,7 +2720,7 @@ ${u.template}`,
2720
2720
  * @returns 集計ストア
2721
2721
  */
2722
2722
  static getOrCreateElementStore(e) {
2723
- const t = C.createElementId(e), r = C.ELEMENT_STORES.get(t);
2723
+ const t = P.createElementId(e), r = P.ELEMENT_STORES.get(t);
2724
2724
  if (r)
2725
2725
  return r;
2726
2726
  const i = {
@@ -2728,7 +2728,7 @@ ${u.template}`,
2728
2728
  attributes: /* @__PURE__ */ new Map(),
2729
2729
  texts: /* @__PURE__ */ new Map()
2730
2730
  };
2731
- return C.ELEMENT_STORES.set(t, i), i;
2731
+ return P.ELEMENT_STORES.set(t, i), i;
2732
2732
  }
2733
2733
  /**
2734
2734
  * カウンタを取得または初期化します。
@@ -2778,7 +2778,7 @@ ${u.template}`,
2778
2778
  */
2779
2779
  static updateCounter(e, t, r) {
2780
2780
  e.calls += 1, e.totalDurationMs += r, e.maxDurationMs = Math.max(e.maxDurationMs, r), t.forEach((i) => {
2781
- const n = C.getOrCreatePlaceholder(
2781
+ const n = P.getOrCreatePlaceholder(
2782
2782
  e.placeholders,
2783
2783
  i.expression
2784
2784
  );
@@ -2817,12 +2817,12 @@ ${u.template}`,
2817
2817
  * @returns 結果と所要時間
2818
2818
  */
2819
2819
  static measure(e) {
2820
- if (!C.isCollecting())
2820
+ if (!P.isCollecting())
2821
2821
  return { value: e(), durationMs: 0 };
2822
- const t = C.now();
2822
+ const t = P.now();
2823
2823
  return {
2824
2824
  value: e(),
2825
- durationMs: C.now() - t
2825
+ durationMs: P.now() - t
2826
2826
  };
2827
2827
  }
2828
2828
  /**
@@ -2849,32 +2849,32 @@ ${u.template}`,
2849
2849
  return t.join(" > ");
2850
2850
  }
2851
2851
  };
2852
- C.GLOBAL_KEY = "__HAORI_EVALUATION_PROFILE__", C.ELEMENT_STORES = /* @__PURE__ */ new Map(), C.collecting = !1, C.DEFAULT_REPORT_LIMIT = 20;
2853
- let Me = C;
2854
- const ce = class ce {
2852
+ P.GLOBAL_KEY = "__HAORI_EVALUATION_PROFILE__", P.ELEMENT_STORES = /* @__PURE__ */ new Map(), P.collecting = !1, P.DEFAULT_REPORT_LIMIT = 20;
2853
+ let Ce = P;
2854
+ const de = class de {
2855
2855
  /**
2856
2856
  * フラグメントのコンストラクタ。
2857
2857
  *
2858
2858
  * @param target 対象ノード
2859
2859
  */
2860
2860
  constructor(e) {
2861
- this.parent = null, this.mounted = !1, this.skipMutationNodes = !1, this.skipMutationNodeSet = /* @__PURE__ */ new Set(), this.target = e, ce.FRAGMENT_CACHE.set(e, this);
2861
+ this.parent = null, this.mounted = !1, this.skipMutationNodes = !1, this.skipMutationNodeSet = /* @__PURE__ */ new Set(), this.target = e, de.FRAGMENT_CACHE.set(e, this);
2862
2862
  }
2863
2863
  static get(e) {
2864
2864
  if (e == null)
2865
2865
  return null;
2866
- if (ce.FRAGMENT_CACHE.has(e))
2867
- return ce.FRAGMENT_CACHE.get(e);
2866
+ if (de.FRAGMENT_CACHE.has(e))
2867
+ return de.FRAGMENT_CACHE.get(e);
2868
2868
  let t;
2869
2869
  switch (e.nodeType) {
2870
2870
  case Node.ELEMENT_NODE:
2871
2871
  t = new S(e);
2872
2872
  break;
2873
2873
  case Node.TEXT_NODE:
2874
- t = new ne(e);
2874
+ t = new ae(e);
2875
2875
  break;
2876
2876
  case Node.COMMENT_NODE:
2877
- t = new We(e);
2877
+ t = new je(e);
2878
2878
  break;
2879
2879
  default:
2880
2880
  return m.warn("[Haori]", "Unsupported node type:", e.nodeType), null;
@@ -2892,7 +2892,7 @@ const ce = class ce {
2892
2892
  * @returns キャッシュ済みのフラグメント。無ければ `null`
2893
2893
  */
2894
2894
  static peek(e) {
2895
- return ce.FRAGMENT_CACHE.get(e) ?? null;
2895
+ return de.FRAGMENT_CACHE.get(e) ?? null;
2896
2896
  }
2897
2897
  /**
2898
2898
  * 指定した子ノードを、エンジン自身が出し入れしている最中かどうかを返します。
@@ -2987,7 +2987,7 @@ const ce = class ce {
2987
2987
  * @return 除去のPromise
2988
2988
  */
2989
2989
  remove(e = !0) {
2990
- return this.parent && this.parent.removeChild(this), ce.FRAGMENT_CACHE.delete(this.target), e ? this.unmount() : Promise.resolve();
2990
+ return this.parent && this.parent.removeChild(this), de.FRAGMENT_CACHE.delete(this.target), e ? this.unmount() : Promise.resolve();
2991
2991
  }
2992
2992
  /**
2993
2993
  * 対象ノードを取得します。
@@ -3014,9 +3014,9 @@ const ce = class ce {
3014
3014
  this.parent = e;
3015
3015
  }
3016
3016
  };
3017
- ce.FRAGMENT_CACHE = /* @__PURE__ */ new WeakMap();
3018
- let I = ce;
3019
- const w = class w extends I {
3017
+ de.FRAGMENT_CACHE = /* @__PURE__ */ new WeakMap();
3018
+ let D = de;
3019
+ const w = class w extends D {
3020
3020
  /**
3021
3021
  * エレメントフラグメントのコンストラクタ。
3022
3022
  * アトリビュートや子フラグメントの作成も行います。
@@ -3036,7 +3036,7 @@ const w = class w extends I {
3036
3036
  e.childNodes.forEach((i) => {
3037
3037
  if (w.isOwnedWithinExternal(i))
3038
3038
  return;
3039
- const n = I.peek(i)?.getParent() ?? null, s = I.get(i);
3039
+ const n = D.peek(i)?.getParent() ?? null, s = D.get(i);
3040
3040
  n !== null && n !== this && (t = t ?? n, n === t && r.push(s)), s.setParent(this), this.children.push(s);
3041
3041
  }), t !== null && this.takeOverPlaceOf(t, r);
3042
3042
  }
@@ -3076,7 +3076,7 @@ const w = class w extends I {
3076
3076
  * @returns 取り込まない場合 true
3077
3077
  */
3078
3078
  static isOwnedWithinExternal(e) {
3079
- const r = I.peek(e)?.getParent() ?? null;
3079
+ const r = D.peek(e)?.getParent() ?? null;
3080
3080
  if (r === null)
3081
3081
  return !1;
3082
3082
  const i = r.getTarget().closest(`[${l.prefix}external]`);
@@ -3169,7 +3169,7 @@ const w = class w extends I {
3169
3169
  */
3170
3170
  static dropIfVisibilityArtifacts(e) {
3171
3171
  e.hasAttribute(`${l.prefix}if-false`) && (e.style.removeProperty("display"), e.getAttribute("style")?.trim() === "" && e.removeAttribute("style"), e.removeAttribute(`${l.prefix}if-false`), w.forEachFormControlInBranch(e, (t) => {
3172
- t.hasAttribute(he) && (t.removeAttribute(he), t.removeAttribute("disabled"));
3172
+ t.hasAttribute(ge) && (t.removeAttribute(ge), t.removeAttribute("disabled"));
3173
3173
  }));
3174
3174
  }
3175
3175
  /**
@@ -3180,7 +3180,7 @@ const w = class w extends I {
3180
3180
  */
3181
3181
  remove(e = !0) {
3182
3182
  const t = [];
3183
- return e && te.destroySubtree(this.getTarget()), this.getTarget().hasAttribute(`${l.prefix}external`) ? this.detachPreservingSubtree(e) : (this.children.slice().forEach((r) => {
3183
+ return e && re.destroySubtree(this.getTarget()), this.getTarget().hasAttribute(`${l.prefix}external`) ? this.detachPreservingSubtree(e) : (this.children.slice().forEach((r) => {
3184
3184
  t.push(r.remove(!1));
3185
3185
  }), this.children.length = 0, this.attributeMap.clear(), this.bindingData = null, this.bindingDataCache = null, this.derivedBindingData = null, this.descendantBindingDataCache = null, this.template && (t.push(this.template.remove(!1)), this.template = null), this.eachInputSignature = null, this.deriveSubtreeSignature = null, this.deriveInputSignature = null, this.clearUnappliedValueWrite(), t.push(super.remove(e)), Promise.all(t).then(() => {
3186
3186
  }));
@@ -3817,7 +3817,7 @@ const w = class w extends I {
3817
3817
  * @returns 戻り値はありません。
3818
3818
  */
3819
3819
  static notifyValueToEnhancers(e) {
3820
- te.isApplied(e) && te.refreshSubtree(e);
3820
+ re.isApplied(e) && re.refreshSubtree(e);
3821
3821
  }
3822
3822
  /**
3823
3823
  * 「載らなかった書き込み」の記録を解除します。
@@ -4111,9 +4111,41 @@ const w = class w extends I {
4111
4111
  const t = this.getTarget().closest("select");
4112
4112
  if (!t)
4113
4113
  return !1;
4114
- const r = I.get(t);
4114
+ const r = D.get(t);
4115
4115
  return r instanceof w ? r.hasPendingUserEdit() : !1;
4116
4116
  }
4117
+ /**
4118
+ * `<select>` の今の選択を控え、その状態へ戻す関数を返します。
4119
+ *
4120
+ * @param select 対象の `<select>`
4121
+ * @returns 控えた選択へ戻す関数
4122
+ */
4123
+ static captureSelection(e) {
4124
+ const t = Array.from(e.options), r = t.map((i) => i.selected);
4125
+ return () => {
4126
+ t.forEach((i, n) => {
4127
+ i.selected = r[n];
4128
+ });
4129
+ };
4130
+ }
4131
+ /**
4132
+ * チェック状態の宣言バインドについて、利用者の操作を記録する入力欄の編集の
4133
+ * 通し番号を返します。
4134
+ *
4135
+ * `option` の `selected` は所属する `<select>` の操作で変化するため、`<select>`
4136
+ * 側の通し番号を返します(`hasPendingCheckableUserEdit()` と同じ対応)。
4137
+ *
4138
+ * @param forSelectedOption `option` の `selected` を反映する場合に true
4139
+ * @returns 編集の通し番号。所属する `<select>` が無い場合は null
4140
+ */
4141
+ getCheckableUserEditSequence(e) {
4142
+ if (!e)
4143
+ return this.userEditSequence;
4144
+ const t = D.get(
4145
+ this.getTarget().closest("select")
4146
+ );
4147
+ return t instanceof w ? t.userEditSequence : null;
4148
+ }
4117
4149
  /**
4118
4150
  * 内部の値をクリアします。エレメントのvalue値は変化しません。
4119
4151
  *
@@ -4376,7 +4408,7 @@ const w = class w extends I {
4376
4408
  const t = this.getTarget().closest("select");
4377
4409
  if (!t)
4378
4410
  return;
4379
- const r = I.get(t);
4411
+ const r = D.get(t);
4380
4412
  r instanceof w && r.syncValue();
4381
4413
  }
4382
4414
  /**
@@ -4493,13 +4525,13 @@ const w = class w extends I {
4493
4525
  return e === t ? this.removeAttribute(e) : this.removeAliasedAttribute(e, t);
4494
4526
  const o = new $e(e, r);
4495
4527
  if (n) {
4496
- const ye = this.attributeMap.get(e);
4497
- if (ye && (ye.isEvaluate || ye.isForceEvaluation()) && !o.isEvaluate && !o.isForceEvaluation()) {
4498
- const Te = z.enqueue(() => {
4528
+ const le = this.attributeMap.get(e);
4529
+ if (le && (le.isEvaluate || le.isForceEvaluation()) && !o.isEvaluate && !o.isForceEvaluation()) {
4530
+ const he = z.enqueue(() => {
4499
4531
  }).finally(() => {
4500
4532
  this.releaseSelfWritingAttributes(s);
4501
4533
  });
4502
- return this.holdSelfWritingAttributes(s, Te), Te;
4534
+ return this.holdSelfWritingAttributes(s, he), he;
4503
4535
  }
4504
4536
  }
4505
4537
  this.attributeMap.set(e, o);
@@ -4508,39 +4540,47 @@ const w = class w extends I {
4508
4540
  element: c,
4509
4541
  rawName: e,
4510
4542
  template: r
4511
- }), d = o.isEvaluate || o.isRawEvaluate, g = e === t && w.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), y = o.isSingleExpression(), A = ue.joinEvaluateResults(u.results), E = u.results.length === 1 ? u.results[0] : A, T = t === "value" && w.resolveDeclaredValueType(c) === "boolean", N = E === !1 && !T, B = !o.isForceEvaluation() && (t !== e ? u.hasUnresolvedReference || E === null || E === void 0 || N : g ? u.hasUnresolvedReference || E === null || E === void 0 || E === !1 : y ? u.hasUnresolvedReference || E === null || E === void 0 || N : d && A === "");
4512
- if (B && u.hasUnresolvedReference && w.warnUnresolvedAttribute(
4543
+ }), d = o.isEvaluate || o.isRawEvaluate, g = e === t && w.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), y = o.isSingleExpression(), E = fe.joinEvaluateResults(u.results), A = u.results.length === 1 ? u.results[0] : E, T = t === "value" && w.resolveDeclaredValueType(c) === "boolean", k = A === !1 && !T, O = !o.isForceEvaluation() && (t !== e ? u.hasUnresolvedReference || A === null || A === void 0 || k : g ? u.hasUnresolvedReference || A === null || A === void 0 || A === !1 : y ? u.hasUnresolvedReference || A === null || A === void 0 || k : d && E === "");
4544
+ if (O && u.hasUnresolvedReference && w.warnUnresolvedAttribute(
4513
4545
  e,
4514
4546
  t,
4515
4547
  r,
4516
4548
  c
4517
- ), q.isEnabled() && E === !1 && y) {
4518
- const ye = o.getSingleExpression(), Te = ye === null ? null : ie.diagnoseStrictComparison(
4519
- ye,
4549
+ ), q.isEnabled() && A === !1 && y) {
4550
+ const le = o.getSingleExpression(), he = le === null ? null : ne.diagnoseStrictComparison(
4551
+ le,
4520
4552
  this.getBindingData()
4521
4553
  );
4522
- Te !== null && w.warnTypeMismatchedComparison(
4554
+ he !== null && w.warnTypeMismatchedComparison(
4523
4555
  e,
4524
4556
  r,
4525
- Te,
4557
+ he,
4526
4558
  c
4527
4559
  );
4528
4560
  }
4529
- const F = o.isForceEvaluation() ? r : y ? E : A, j = i && o.isEvaluate && t === "value" && w.isValuePropertyTarget(c), Z = c.getRootNode(), _ = j && w.isUserEditableValue(c) && (c === Z.activeElement || this.hasPendingUserEdit()), P = B || F === null || F === !1 && !T ? null : String(F), se = e !== t && c.getAttribute(e) !== r, Y = P === null ? c.hasAttribute(t) : c.getAttribute(t) !== P, D = P === null ? "" : P, L = j && !_ && c.value !== D, X = t === "checked" && c instanceof HTMLInputElement && (c.type === "checkbox" || c.type === "radio"), Q = t === "selected" && c instanceof HTMLOptionElement, de = Z.activeElement, oe = de !== null && (X && c === de || Q && c.closest("select") === de) || (X || Q) && this.hasPendingCheckableUserEdit(Q), W = P !== null, G = X && o.isEvaluate && !oe && c.checked !== W, J = Q && o.isEvaluate && !oe && c.selected !== W;
4530
- if (!se && !Y && !L && !G && !J)
4531
- return j && !_ && (this.value = this.normalizeValueForElement(
4561
+ const F = o.isForceEvaluation() ? r : y ? A : E, j = i && o.isEvaluate && t === "value" && w.isValuePropertyTarget(c), J = c.getRootNode(), te = this.userEditSequence, U = j && w.isUserEditableValue(c) && (c === J.activeElement || this.hasPendingUserEdit()), _ = O || F === null || F === !1 && !T ? null : String(F), G = e !== t && c.getAttribute(e) !== r, I = _ === null ? c.hasAttribute(t) : c.getAttribute(t) !== _, $ = _ === null ? "" : _, Z = j && !U && c.value !== $, Q = t === "checked" && c instanceof HTMLInputElement && (c.type === "checkbox" || c.type === "radio"), se = t === "selected" && c instanceof HTMLOptionElement, ce = J.activeElement, W = ce !== null && (Q && c === ce || se && c.closest("select") === ce) || (Q || se) && this.hasPendingCheckableUserEdit(se), Y = this.getCheckableUserEditSequence(se), X = _ !== null, Ee = Q && o.isEvaluate && !W && c.checked !== X, Ne = se && o.isEvaluate && !W && c.selected !== X;
4562
+ if (!G && !I && !Z && !Ee && !Ne)
4563
+ return j && !U && (this.value = this.normalizeValueForElement(
4532
4564
  c,
4533
- D
4534
- ), this.clearUnappliedValueWrite()), (X || Q) && !oe && this.syncCheckableValueFromDom(Q), Promise.resolve();
4535
- const Re = z.enqueue(() => {
4536
- se && c.setAttribute(e, r), P === null ? c.removeAttribute(t) : Y && (c.setAttribute(t, P), t === `${l.prefix}bind` && this.recordSelfWrittenBind(P)), t === "style" && this.captureAndHideDisplay(), j && !_ && (this.value = this.normalizeValueForElement(
4565
+ $
4566
+ ), this.clearUnappliedValueWrite()), (Q || se) && !W && this.syncCheckableValueFromDom(se), Promise.resolve();
4567
+ const ze = z.enqueue(() => {
4568
+ const le = this.getCheckableUserEditSequence(se) !== Y, he = se && (W || le) ? w.captureSelection(
4569
+ // 守るべき選択があるのは所属する `<select>` があるときだけ。
4570
+ c.closest(
4571
+ "select"
4572
+ )
4573
+ ) : null;
4574
+ G && c.setAttribute(e, r), _ === null ? c.removeAttribute(t) : I && (c.setAttribute(t, _), t === `${l.prefix}bind` && this.recordSelfWrittenBind(_)), t === "style" && this.captureAndHideDisplay(), he?.(), j && !U && !(w.isUserEditableValue(c) && this.isSupersededByUserEdit(te)) && (this.value = this.normalizeValueForElement(
4537
4575
  c,
4538
- D
4539
- ), L && (c.value = D), this.recordValueWriteResult(c.value === D)), G && (c.checked = W), J && (c.selected = W), (G || J) && this.syncCheckableValueFromDom(J);
4576
+ $
4577
+ ), Z && (c.value = $), this.recordValueWriteResult(c.value === $));
4578
+ const vt = Ee && !le, wt = Ne && !le;
4579
+ vt && (c.checked = X), wt && (c.selected = X), (Ee || Ne) && this.syncCheckableValueFromDom(Ne);
4540
4580
  }).finally(() => {
4541
4581
  this.releaseSelfWritingAttributes(s);
4542
4582
  });
4543
- return this.holdSelfWritingAttributes(s, Re), Re;
4583
+ return this.holdSelfWritingAttributes(s, ze), ze;
4544
4584
  }
4545
4585
  /**
4546
4586
  * 属性の値を削除します。
@@ -4596,7 +4636,7 @@ const w = class w extends I {
4596
4636
  value: r.results[0],
4597
4637
  hasUnresolvedReference: r.hasUnresolvedReference
4598
4638
  } : {
4599
- value: ue.joinEvaluateResults(r.results),
4639
+ value: fe.joinEvaluateResults(r.results),
4600
4640
  hasUnresolvedReference: r.hasUnresolvedReference
4601
4641
  };
4602
4642
  }
@@ -4641,7 +4681,7 @@ const w = class w extends I {
4641
4681
  const i = t ? r.nextSibling : r;
4642
4682
  let n = t ? r.nextSibling : r;
4643
4683
  for (; n !== null; ) {
4644
- const s = I.get(n);
4684
+ const s = D.get(n);
4645
4685
  if (s !== null) {
4646
4686
  const a = this.children.indexOf(s);
4647
4687
  if (a !== -1)
@@ -4830,7 +4870,7 @@ const w = class w extends I {
4830
4870
  * @returns 戻り値はありません。
4831
4871
  */
4832
4872
  static reassertHiddenDisplay(e) {
4833
- const t = I.get(e);
4873
+ const t = D.get(e);
4834
4874
  t instanceof w && t.hideDisplayWithoutCapture();
4835
4875
  }
4836
4876
  /**
@@ -4857,10 +4897,10 @@ const w = class w extends I {
4857
4897
  * @returns 戻り値はありません。
4858
4898
  */
4859
4899
  static forEachFormControlInBranch(e, t) {
4860
- e.matches(Ge) && t(e);
4900
+ e.matches(Xe) && t(e);
4861
4901
  const r = (i) => {
4862
4902
  Array.from(i.children).forEach((n) => {
4863
- n.hasAttribute(`${l.prefix}if-false`) || (n instanceof HTMLElement && n.matches(Ge) && t(n), r(n));
4903
+ n.hasAttribute(`${l.prefix}if-false`) || (n instanceof HTMLElement && n.matches(Xe) && t(n), r(n));
4864
4904
  });
4865
4905
  };
4866
4906
  r(e);
@@ -4882,7 +4922,7 @@ const w = class w extends I {
4882
4922
  */
4883
4923
  static disableFormControlsInBranch(e) {
4884
4924
  w.forEachFormControlInBranch(e, (t) => {
4885
- t.hasAttribute("disabled") || (t.setAttribute(he, ""), t.setAttribute("disabled", ""));
4925
+ t.hasAttribute("disabled") || (t.setAttribute(ge, ""), t.setAttribute("disabled", ""));
4886
4926
  });
4887
4927
  }
4888
4928
  /**
@@ -4896,7 +4936,7 @@ const w = class w extends I {
4896
4936
  */
4897
4937
  restoreFormControlsDisabledByIf() {
4898
4938
  w.forEachFormControlInBranch(this.getTarget(), (e) => {
4899
- e.hasAttribute(he) && (e.removeAttribute(he), e.removeAttribute("disabled"));
4939
+ e.hasAttribute(ge) && (e.removeAttribute(ge), e.removeAttribute("disabled"));
4900
4940
  });
4901
4941
  }
4902
4942
  /**
@@ -4973,7 +5013,7 @@ w.NUMBER_INPUT_PATTERN = /^-?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/, w.VALUE
4973
5013
  "week"
4974
5014
  ], 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();
4975
5015
  let S = w;
4976
- class ne extends I {
5016
+ class ae extends D {
4977
5017
  /**
4978
5018
  * テキストフラグメントのコンストラクタ。
4979
5019
  * 対象テキストノードの内容を初期化します。
@@ -4981,7 +5021,7 @@ class ne extends I {
4981
5021
  * @param target 対象テキストノード
4982
5022
  */
4983
5023
  constructor(e) {
4984
- super(e), this.skipMutation = !1, this.renderedText = null, this.text = e.textContent || "", this.contents = new ue(this.text);
5024
+ super(e), this.skipMutation = !1, this.renderedText = null, this.text = e.textContent || "", this.contents = new fe(this.text);
4985
5025
  }
4986
5026
  /**
4987
5027
  * フラグメントをクローンします。
@@ -4989,7 +5029,7 @@ class ne extends I {
4989
5029
  * @returns クローンされたフラグメント
4990
5030
  */
4991
5031
  clone() {
4992
- const e = new ne(this.target.cloneNode(!0));
5032
+ const e = new ae(this.target.cloneNode(!0));
4993
5033
  return e.mounted = !1, e.text = this.text, e.contents = this.contents, e.renderedText = this.renderedText, e;
4994
5034
  }
4995
5035
  /**
@@ -5026,7 +5066,7 @@ class ne extends I {
5026
5066
  * @returns 更新のPromise
5027
5067
  */
5028
5068
  setContent(e) {
5029
- return this.skipMutation || this.text === e ? Promise.resolve() : (this.text = e, this.contents = new ue(e), this.evaluate());
5069
+ return this.skipMutation || this.text === e ? Promise.resolve() : (this.text = e, this.contents = new fe(e), this.evaluate());
5030
5070
  }
5031
5071
  /**
5032
5072
  * フラグメントを評価します。
@@ -5044,7 +5084,7 @@ class ne extends I {
5044
5084
  element: this.parent.getTarget(),
5045
5085
  childIndex: this.parent.getChildren().indexOf(this),
5046
5086
  template: this.text
5047
- })[0] : this.contents.isEvaluate && (e = ue.joinEvaluateResults(
5087
+ })[0] : this.contents.isEvaluate && (e = fe.joinEvaluateResults(
5048
5088
  this.contents.evaluate(this.parent.getBindingData(), {
5049
5089
  kind: "text",
5050
5090
  element: this.parent.getTarget(),
@@ -5059,7 +5099,7 @@ class ne extends I {
5059
5099
  });
5060
5100
  }
5061
5101
  }
5062
- class We extends I {
5102
+ class je extends D {
5063
5103
  /**
5064
5104
  * コメントフラグメントのコンストラクタ。
5065
5105
  * 対象コメントノードの内容を初期化します。
@@ -5075,7 +5115,7 @@ class We extends I {
5075
5115
  * @returns クローンされたフラグメント
5076
5116
  */
5077
5117
  clone() {
5078
- const e = new We(this.target.cloneNode(!0));
5118
+ const e = new je(this.target.cloneNode(!0));
5079
5119
  return e.mounted = !1, e.text = this.text, e;
5080
5120
  }
5081
5121
  /**
@@ -5100,7 +5140,7 @@ class We extends I {
5100
5140
  }));
5101
5141
  }
5102
5142
  }
5103
- const Ce = class Ce {
5143
+ const Pe = class Pe {
5104
5144
  /**
5105
5145
  * コンストラクタ。
5106
5146
  *
@@ -5108,7 +5148,7 @@ const Ce = class Ce {
5108
5148
  */
5109
5149
  constructor(e) {
5110
5150
  this.contents = [], this.isEvaluate = !1, this.isRawEvaluate = !1, this.value = e;
5111
- const t = [...e.matchAll(Ce.PLACEHOLDER_REGEX)];
5151
+ const t = [...e.matchAll(Pe.PLACEHOLDER_REGEX)];
5112
5152
  let r = 0, i = !1, n = !1;
5113
5153
  for (const s of t) {
5114
5154
  s.index > r && this.contents.push({
@@ -5213,8 +5253,8 @@ const Ce = class Ce {
5213
5253
  return this.contents.forEach((c) => {
5214
5254
  try {
5215
5255
  if (r(c)) {
5216
- const u = Me.measure(
5217
- () => ie.evaluateDetailed(c.text, e)
5256
+ const u = Ce.measure(
5257
+ () => ne.evaluateDetailed(c.text, e)
5218
5258
  ), d = u.value;
5219
5259
  a += u.durationMs, s.push({
5220
5260
  expression: c.text,
@@ -5232,16 +5272,16 @@ const Ce = class Ce {
5232
5272
  durationMs: 0
5233
5273
  }), n.push("");
5234
5274
  }
5235
- }), Me.record(
5275
+ }), Ce.record(
5236
5276
  t,
5237
5277
  s,
5238
5278
  a
5239
5279
  ), { results: n, hasUnresolvedReference: o };
5240
5280
  }
5241
5281
  };
5242
- Ce.PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g;
5243
- let ue = Ce;
5244
- const re = class re extends ue {
5282
+ Pe.PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g;
5283
+ let fe = Pe;
5284
+ const ie = class ie extends fe {
5245
5285
  /**
5246
5286
  * コンストラクタ。
5247
5287
  *
@@ -5249,7 +5289,7 @@ const re = class re extends ue {
5249
5289
  * @param text 属性値
5250
5290
  */
5251
5291
  constructor(e, t) {
5252
- super(t), this.forceEvaluation = re.needsForceEvaluation(e);
5292
+ super(t), this.forceEvaluation = ie.needsForceEvaluation(e);
5253
5293
  }
5254
5294
  /**
5255
5295
  * 属性名が強制評価の対象かどうかを判定します。
@@ -5262,17 +5302,17 @@ const re = class re extends ue {
5262
5302
  * @returns 強制評価の対象なら true
5263
5303
  */
5264
5304
  static needsForceEvaluation(e) {
5265
- if (re.forceEvaluationNames === null || re.forceEvaluationPrefix !== l.prefix) {
5305
+ if (ie.forceEvaluationNames === null || ie.forceEvaluationPrefix !== l.prefix) {
5266
5306
  const t = /* @__PURE__ */ new Set();
5267
5307
  for (const r of [
5268
5308
  l.prefix,
5269
- ...re.FORCE_EVALUATION_PREFIXES
5309
+ ...ie.FORCE_EVALUATION_PREFIXES
5270
5310
  ])
5271
- for (const i of re.FORCE_EVALUATION_SUFFIXES)
5311
+ for (const i of ie.FORCE_EVALUATION_SUFFIXES)
5272
5312
  t.add(`${r}${i}`);
5273
- re.forceEvaluationNames = t, re.forceEvaluationPrefix = l.prefix;
5313
+ ie.forceEvaluationNames = t, ie.forceEvaluationPrefix = l.prefix;
5274
5314
  }
5275
- return re.forceEvaluationNames.has(e);
5315
+ return ie.forceEvaluationNames.has(e);
5276
5316
  }
5277
5317
  /**
5278
5318
  * 強制評価フラグを取得します。
@@ -5319,9 +5359,9 @@ const re = class re extends ue {
5319
5359
  }) : r;
5320
5360
  }
5321
5361
  };
5322
- re.FORCE_EVALUATION_SUFFIXES = ["if", "each", "derive"], re.FORCE_EVALUATION_PREFIXES = ["data-", "hor-"], re.forceEvaluationNames = null, re.forceEvaluationPrefix = null;
5323
- let $e = re;
5324
- const ve = class ve {
5362
+ ie.FORCE_EVALUATION_SUFFIXES = ["if", "each", "derive"], ie.FORCE_EVALUATION_PREFIXES = ["data-", "hor-"], ie.forceEvaluationNames = null, ie.forceEvaluationPrefix = null;
5363
+ let $e = ie;
5364
+ const Se = class Se {
5325
5365
  /**
5326
5366
  * 実行モードを取得します。
5327
5367
  *
@@ -5397,7 +5437,7 @@ const ve = class ve {
5397
5437
  */
5398
5438
  static openDialog(e) {
5399
5439
  return z.enqueue(() => {
5400
- e instanceof HTMLDialogElement ? (ve.clearMessagesSync(e), e.showModal()) : m.error("[Haori]", "Element is not a dialog: ", e);
5440
+ e instanceof HTMLDialogElement ? (Se.clearMessagesSync(e), e.showModal()) : m.error("[Haori]", "Element is not a dialog: ", e);
5401
5441
  }, !0);
5402
5442
  }
5403
5443
  /**
@@ -5417,7 +5457,7 @@ const ve = class ve {
5417
5457
  * @param message エラーメッセージ
5418
5458
  */
5419
5459
  static addErrorMessage(e, t) {
5420
- return ve.addMessage(e, t, "error");
5460
+ return Se.addMessage(e, t, "error");
5421
5461
  }
5422
5462
  /**
5423
5463
  * メッセージをレベル付きで追加します。
@@ -5442,7 +5482,7 @@ const ve = class ve {
5442
5482
  */
5443
5483
  static clearMessages(e) {
5444
5484
  return z.enqueue(() => {
5445
- !(e instanceof HTMLFormElement) && e.parentElement && (e.parentElement.removeAttribute("data-message"), e.parentElement.removeAttribute("data-message-level")), ve.clearMessagesSync(e);
5485
+ !(e instanceof HTMLFormElement) && e.parentElement && (e.parentElement.removeAttribute("data-message"), e.parentElement.removeAttribute("data-message-level")), Se.clearMessagesSync(e);
5446
5486
  }, !0);
5447
5487
  }
5448
5488
  /**
@@ -5469,7 +5509,7 @@ const ve = class ve {
5469
5509
  * @returns 整形済み文字列。整形できない場合は空文字
5470
5510
  */
5471
5511
  static date(e, t, r) {
5472
- return Pe(e, t, r);
5512
+ return Le(e, t, r);
5473
5513
  }
5474
5514
  /**
5475
5515
  * 現在日時を指定フォーマットの文字列へ整形します。
@@ -5482,7 +5522,7 @@ const ve = class ve {
5482
5522
  * @returns 整形済みの現在日時文字列
5483
5523
  */
5484
5524
  static now(e, t) {
5485
- return it(e, t);
5525
+ return st(e, t);
5486
5526
  }
5487
5527
  /**
5488
5528
  * 現在日付に日数を加減した日付を指定フォーマットの文字列へ整形します。
@@ -5496,7 +5536,7 @@ const ve = class ve {
5496
5536
  * @returns 整形済みの日付文字列。timeZone が不正な場合は空文字
5497
5537
  */
5498
5538
  static today(e, t, r) {
5499
- return nt(e, t, r);
5539
+ return at(e, t, r);
5500
5540
  }
5501
5541
  /**
5502
5542
  * 数値を桁区切り・小数桁付きの文字列へ整形します。
@@ -5508,7 +5548,7 @@ const ve = class ve {
5508
5548
  * @returns 整形済み文字列。整形できない場合は空文字
5509
5549
  */
5510
5550
  static number(e, t) {
5511
- return st(e, t);
5551
+ return ot(e, t);
5512
5552
  }
5513
5553
  /**
5514
5554
  * 整数の配列を生成します(終端は排他)。
@@ -5521,7 +5561,7 @@ const ve = class ve {
5521
5561
  * @returns 整数配列
5522
5562
  */
5523
5563
  static range(e, t, r) {
5524
- return at(e, t, r);
5564
+ return lt(e, t, r);
5525
5565
  }
5526
5566
  /**
5527
5567
  * 番号ページネーション用の表示要素列を生成します。
@@ -5534,7 +5574,7 @@ const ve = class ve {
5534
5574
  * @returns 表示要素の配列
5535
5575
  */
5536
5576
  static pages(e, t, r) {
5537
- return ot(e, t, r);
5577
+ return ct(e, t, r);
5538
5578
  }
5539
5579
  /**
5540
5580
  * `YYYY-MM` 形式の年月文字列に月数を加算します。
@@ -5546,7 +5586,7 @@ const ve = class ve {
5546
5586
  * @returns 加算後の年月(`YYYY-MM` 形式)。不正な入力は空文字
5547
5587
  */
5548
5588
  static monthAdd(e, t) {
5549
- return Le(e, t);
5589
+ return Oe(e, t);
5550
5590
  }
5551
5591
  /**
5552
5592
  * 基準月から過去方向へ `count + 1` 個の年月配列を降順で返します。
@@ -5558,7 +5598,7 @@ const ve = class ve {
5558
5598
  * @returns 年月情報の降順配列。不正な入力は空配列
5559
5599
  */
5560
5600
  static monthRange(e, t) {
5561
- return lt(e, t);
5601
+ return ut(e, t);
5562
5602
  }
5563
5603
  /**
5564
5604
  * ページレスポンスから表示用サマリーを作ります。
@@ -5570,7 +5610,7 @@ const ve = class ve {
5570
5610
  * @returns 表示サマリー
5571
5611
  */
5572
5612
  static pageSummary(e, t) {
5573
- return ct(e, t);
5613
+ return dt(e, t);
5574
5614
  }
5575
5615
  /**
5576
5616
  * 配列から `item[key]` が指定値に一致する最初の要素を返します。
@@ -5584,7 +5624,7 @@ const ve = class ve {
5584
5624
  * @returns 一致した最初の要素。無ければ null
5585
5625
  */
5586
5626
  static findBy(e, t, r) {
5587
- return ut(e, t, r);
5627
+ return ft(e, t, r);
5588
5628
  }
5589
5629
  /**
5590
5630
  * 配列の数値合計を返します。
@@ -5597,7 +5637,7 @@ const ve = class ve {
5597
5637
  * @returns 数値の合計。対象が無ければ 0
5598
5638
  */
5599
5639
  static sum(e, t) {
5600
- return dt(e, t);
5640
+ return ht(e, t);
5601
5641
  }
5602
5642
  /**
5603
5643
  * 配列から重複を取り除いた新しい配列を返します。
@@ -5610,7 +5650,7 @@ const ve = class ve {
5610
5650
  * @returns 重複排除後の新しい配列。非配列は空配列
5611
5651
  */
5612
5652
  static distinct(e, t) {
5613
- return ht(e, t);
5653
+ return gt(e, t);
5614
5654
  }
5615
5655
  /**
5616
5656
  * 配列を `item[key]` ごとのグループへ分けて返します。
@@ -5623,10 +5663,10 @@ const ve = class ve {
5623
5663
  * @returns グループ情報の配列。非配列は空配列
5624
5664
  */
5625
5665
  static groupBy(e, t) {
5626
- return pt(e, t);
5666
+ return mt(e, t);
5627
5667
  }
5628
5668
  };
5629
- ve.enhancers = {
5669
+ Se.enhancers = {
5630
5670
  /**
5631
5671
  * 外部ライブラリ連携を登録します。
5632
5672
  *
@@ -5635,7 +5675,7 @@ ve.enhancers = {
5635
5675
  * @return 戻り値はありません。
5636
5676
  */
5637
5677
  register(e, t) {
5638
- te.register(e, t);
5678
+ re.register(e, t);
5639
5679
  },
5640
5680
  /**
5641
5681
  * 登録済みの連携かどうかを返します。
@@ -5644,16 +5684,16 @@ ve.enhancers = {
5644
5684
  * @return 登録済みなら true
5645
5685
  */
5646
5686
  has(e) {
5647
- return te.has(e);
5687
+ return re.has(e);
5648
5688
  }
5649
5689
  };
5650
- let Se = ve;
5651
- const Ft = "入力内容を確認してください", It = ["addErrorMessage", "clearMessages"], Ye = "data-haori-group-name";
5652
- function Xe() {
5690
+ let Te = Se;
5691
+ const xt = "入力内容を確認してください", Mt = ["addErrorMessage", "clearMessages"], Je = "data-haori-group-name";
5692
+ function Ze() {
5653
5693
  const e = globalThis.window?.Haori;
5654
- return It.every(
5694
+ return Mt.every(
5655
5695
  (r) => typeof e?.[r] == "function"
5656
- ) ? e : Se;
5696
+ ) ? e : Te;
5657
5697
  }
5658
5698
  const h = class h {
5659
5699
  /**
@@ -5836,13 +5876,13 @@ const h = class h {
5836
5876
  return;
5837
5877
  }
5838
5878
  const r = e.getTarget();
5839
- if (!(r instanceof HTMLInputElement) || r.type !== "radio" || r.hasAttribute("name") && !r.hasAttribute(Ye))
5879
+ if (!(r instanceof HTMLInputElement) || r.type !== "radio" || r.hasAttribute("name") && !r.hasAttribute(Je))
5840
5880
  return;
5841
5881
  const i = h.resolveGroupScope(e), n = `${String(t)}--haori${h.resolveGroupScopeId(
5842
5882
  i
5843
5883
  )}`;
5844
5884
  if (r.getAttribute("name") !== n)
5845
- return e.setAttribute(Ye, "").then(() => e.setAttribute("name", n));
5885
+ return e.setAttribute(Je, "").then(() => e.setAttribute("name", n));
5846
5886
  }
5847
5887
  /**
5848
5888
  * ラジオグループのスコープとなるフラグメントを解決します。
@@ -5900,7 +5940,7 @@ const h = class h {
5900
5940
  return h.isDeclarationResolved(e, "value");
5901
5941
  if (t instanceof HTMLSelectElement) {
5902
5942
  for (const r of Array.from(t.options)) {
5903
- const i = I.get(r);
5943
+ const i = D.get(r);
5904
5944
  if (i instanceof S && h.hasDeclarativeBinding(i, "selected") && !h.isDeclarationResolved(i, "selected"))
5905
5945
  return !1;
5906
5946
  }
@@ -6030,7 +6070,7 @@ const h = class h {
6030
6070
  */
6031
6071
  static hasDeclarativeSelectedOption(e) {
6032
6072
  for (const t of Array.from(e.options)) {
6033
- const r = I.get(t);
6073
+ const r = D.get(t);
6034
6074
  if (r instanceof S && h.hasDeclarativeBinding(r, "selected"))
6035
6075
  return !0;
6036
6076
  }
@@ -6239,8 +6279,8 @@ const h = class h {
6239
6279
  const u = h.resolveCollectedValue(e), d = h.isFileInput(e) && Array.isArray(u) ? u : [u];
6240
6280
  Array.isArray(t[String(n)]) ? t[String(n)].push(...d) : t[String(n)] = d;
6241
6281
  } else if (h.isGroupedCheckable(e)) {
6242
- const u = e.getTarget(), d = u instanceof HTMLInputElement ? u.checked : !0, g = u instanceof HTMLInputElement ? u.value : e.getValue(), y = d ? g : null, A = String(n);
6243
- y === null ? A in t || (t[A] = null) : t[A] === null || t[A] === void 0 ? t[A] = y : Array.isArray(t[A]) ? t[A].push(y) : t[A] = [t[A], y];
6282
+ const u = e.getTarget(), d = u instanceof HTMLInputElement ? u.checked : !0, g = u instanceof HTMLInputElement ? u.value : e.getValue(), y = d ? g : null, E = String(n);
6283
+ y === null ? E in t || (t[E] = null) : t[E] === null || t[E] === void 0 ? t[E] = y : Array.isArray(t[E]) ? t[E].push(y) : t[E] = [t[E], y];
6244
6284
  } else
6245
6285
  t[String(n)] = h.resolveCollectedValue(e);
6246
6286
  s && m.warn(
@@ -6266,13 +6306,13 @@ const h = class h {
6266
6306
  const u = [], d = [];
6267
6307
  let g = !1;
6268
6308
  for (const y of e.getChildElementFragments()) {
6269
- const A = {}, E = i === null ? null : /* @__PURE__ */ new Set();
6309
+ const E = {}, A = i === null ? null : /* @__PURE__ */ new Set();
6270
6310
  h.getPartValues(
6271
6311
  y,
6272
- A,
6312
+ E,
6273
6313
  r,
6274
- E
6275
- ), E !== null && h.registerCollectedExcludedKeys(A, E), Object.keys(A).length > 0 ? (g = !0, u.push(A), d.push(y.getListKey())) : r !== null && (u.push({}), d.push(y.getListKey()));
6314
+ A
6315
+ ), A !== null && h.registerCollectedExcludedKeys(E, A), Object.keys(E).length > 0 ? (g = !0, u.push(E), d.push(y.getListKey())) : r !== null && (u.push({}), d.push(y.getListKey()));
6276
6316
  }
6277
6317
  if (r === null) {
6278
6318
  const y = e.getAttribute(`${l.prefix}each-key`);
@@ -6563,8 +6603,8 @@ const h = class h {
6563
6603
  g.hasAttribute(`${l.prefix}form-detach`) && (d = !0), (g.hasAttribute(n) || g.hasAttribute(s)) && (u = g), g = g.parentElement;
6564
6604
  if (d)
6565
6605
  return;
6566
- const y = u ?? c, A = y.getAttribute(n) || y.getAttribute(s) || y.getAttribute(`${l.prefix}form-name`) || y.getAttribute("name");
6567
- A && t.add(A);
6606
+ const y = u ?? c, E = y.getAttribute(n) || y.getAttribute(s) || y.getAttribute(`${l.prefix}form-name`) || y.getAttribute("name");
6607
+ E && t.add(E);
6568
6608
  }), t;
6569
6609
  }
6570
6610
  /**
@@ -6604,7 +6644,7 @@ const h = class h {
6604
6644
  r.setCustomValidity("");
6605
6645
  return;
6606
6646
  }
6607
- const n = h.buildConditionScope(e), s = ie.evaluateDetailed(
6647
+ const n = h.buildConditionScope(e), s = ne.evaluateDetailed(
6608
6648
  h.unwrapConditionExpression(i),
6609
6649
  n
6610
6650
  );
@@ -6627,7 +6667,7 @@ const h = class h {
6627
6667
  */
6628
6668
  static resolveValidityMessage(e) {
6629
6669
  const t = e.getAttribute(`${l.prefix}validity-message`);
6630
- return typeof t == "string" && t.trim() !== "" ? t : Ft;
6670
+ return typeof t == "string" && t.trim() !== "" ? t : xt;
6631
6671
  }
6632
6672
  /**
6633
6673
  * 条件属性の値から式を取り出します。
@@ -6892,7 +6932,7 @@ const h = class h {
6892
6932
  static createRowKeyIndexes(e, t) {
6893
6933
  const r = /* @__PURE__ */ new Map();
6894
6934
  return e.forEach((i, n) => {
6895
- const s = $.createListKey(
6935
+ const s = C.createListKey(
6896
6936
  i,
6897
6937
  t,
6898
6938
  n
@@ -7043,7 +7083,7 @@ const h = class h {
7043
7083
  static collectShadowingContainers(e) {
7044
7084
  const t = `${l.prefix}form-arg`, r = [];
7045
7085
  return e.getTarget().querySelectorAll(`form:not([${t}]), [${l.prefix}form]`).forEach((i) => {
7046
- const n = I.get(i);
7086
+ const n = D.get(i);
7047
7087
  if (!(n instanceof S))
7048
7088
  return;
7049
7089
  const s = n.getRawBindingData();
@@ -7072,7 +7112,7 @@ const h = class h {
7072
7112
  const n = { ...i };
7073
7113
  for (const s of t)
7074
7114
  delete n[s];
7075
- return $.setBindingData(e.getTarget(), n, {
7115
+ return C.setBindingData(e.getTarget(), n, {
7076
7116
  kind: r?.kind ?? "supply",
7077
7117
  sequence: r?.sequence ?? S.nextSequence()
7078
7118
  });
@@ -7086,7 +7126,7 @@ const h = class h {
7086
7126
  static collectArgForms(e) {
7087
7127
  const t = `${l.prefix}form-arg`, r = e.getTarget().querySelectorAll(`form[${t}]`), i = [];
7088
7128
  return r.forEach((n) => {
7089
- const s = I.get(n);
7129
+ const s = D.get(n);
7090
7130
  if (!(s instanceof S))
7091
7131
  return;
7092
7132
  const a = s.getAttribute(t);
@@ -7159,7 +7199,7 @@ const h = class h {
7159
7199
  for (const i of t) {
7160
7200
  if (h.INITIAL_RESTORED_FORMS.has(i))
7161
7201
  continue;
7162
- const n = I.get(i);
7202
+ const n = D.get(i);
7163
7203
  if (!(n instanceof S))
7164
7204
  continue;
7165
7205
  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;
@@ -7378,9 +7418,9 @@ const h = class h {
7378
7418
  return Promise.resolve();
7379
7419
  const c = h.resolveFieldName(e), u = e.getAttribute(`${l.prefix}form-object`), d = e.getAttribute(`${l.prefix}form-list`), g = e.hasAttribute(`${l.prefix}form-list`);
7380
7420
  if (c) {
7381
- const y = t[String(c)], A = n && h.hasResolvedDeclarativeState(e), E = n && typeof y > "u" && !h.isDeclarativeStateBound(e);
7421
+ const y = t[String(c)], E = n && h.hasResolvedDeclarativeState(e), A = n && typeof y > "u" && !h.isDeclarativeStateBound(e);
7382
7422
  let T = y;
7383
- if (A ? T = void 0 : E && (T = null), h.isFileInput(e))
7423
+ if (E ? T = void 0 : A && (T = null), h.isFileInput(e))
7384
7424
  return (T === null || T === "") && o.push(
7385
7425
  h.applyFragmentValue(e, null, i, a)
7386
7426
  ), Promise.all(o).then(() => {
@@ -7389,11 +7429,11 @@ const h = class h {
7389
7429
  // 解釈する(後続の分岐)。位置で配ると選択状態を決められないため、
7390
7430
  // `data-form-list` を併記していても従来どおりそちらへ渡す。
7391
7431
  !h.isGroupedCheckable(e) && !h.isMultipleSelect(e)) {
7392
- const N = String(c), B = s.get(N) ?? 0;
7393
- s.set(N, B + 1), o.push(
7432
+ const k = String(c), O = s.get(k) ?? 0;
7433
+ s.set(k, O + 1), o.push(
7394
7434
  h.applyFragmentValue(
7395
7435
  e,
7396
- T[B] ?? null,
7436
+ T[O] ?? null,
7397
7437
  i,
7398
7438
  a
7399
7439
  )
@@ -7411,16 +7451,16 @@ const h = class h {
7411
7451
  } else if (u) {
7412
7452
  const y = t[String(u)];
7413
7453
  if (y && typeof y == "object") {
7414
- const A = /* @__PURE__ */ new Map();
7415
- for (const E of e.getChildElementFragments())
7454
+ const E = /* @__PURE__ */ new Map();
7455
+ for (const A of e.getChildElementFragments())
7416
7456
  o.push(
7417
7457
  h.setPartValues(
7418
- E,
7458
+ A,
7419
7459
  y,
7420
7460
  r,
7421
7461
  i,
7422
7462
  n,
7423
- A,
7463
+ E,
7424
7464
  a
7425
7465
  )
7426
7466
  );
@@ -7428,17 +7468,17 @@ const h = class h {
7428
7468
  } else if (d) {
7429
7469
  const y = t[String(d)];
7430
7470
  if (Array.isArray(y)) {
7431
- const A = e.getChildElementFragments(), E = e.getAttribute(`${l.prefix}each-key`), T = h.isCollectedListFromEachSource(e) ? h.pairRowsWithItems(
7432
- A,
7471
+ const E = e.getChildElementFragments(), A = e.getAttribute(`${l.prefix}each-key`), T = h.isCollectedListFromEachSource(e) ? h.pairRowsWithItems(
7472
+ E,
7433
7473
  y,
7434
- E == null ? null : String(E)
7474
+ A == null ? null : String(A)
7435
7475
  ) : null;
7436
- for (let N = 0; N < A.length; N++) {
7437
- const B = A[N], F = T ? T[N] : y.length > N ? y[N] : null;
7476
+ for (let k = 0; k < E.length; k++) {
7477
+ const O = E[k], F = T ? T[k] : y.length > k ? y[k] : null;
7438
7478
  o.push(
7439
7479
  // 行ごとに values が切り替わるので出現位置も行単位で数える。
7440
7480
  h.setPartValues(
7441
- B,
7481
+ O,
7442
7482
  h.asPlainRecord(F) ?? {},
7443
7483
  r,
7444
7484
  i,
@@ -7484,7 +7524,7 @@ const h = class h {
7484
7524
  const r = h.collectBindingTargetForms(e);
7485
7525
  if (r.length > 0 && r.every((n) => n.isSupplyStale(t)))
7486
7526
  return;
7487
- h.markResetSubtree(e, t), $.clearUserEditMarks(e, t), h.clearValues(e), await Promise.all([
7527
+ h.markResetSubtree(e, t), C.clearUserEditMarks(e, t), h.clearValues(e), await Promise.all([
7488
7528
  h.clearMessages(e),
7489
7529
  h.clearEachClones(e)
7490
7530
  ]), await z.enqueue(() => {
@@ -7498,16 +7538,16 @@ const h = class h {
7498
7538
  } finally {
7499
7539
  h.internalResetDepth -= 1;
7500
7540
  }
7501
- h.clearDeclarativeStateFromDom(e), $.invalidateDerivedSubtreeSignatures(e), h.restoreEdits(n);
7541
+ h.clearDeclarativeStateFromDom(e), C.invalidateDerivedSubtreeSignatures(e), h.restoreEdits(n);
7502
7542
  });
7503
7543
  const i = r;
7504
7544
  for (const n of i) {
7505
7545
  const s = h.getInitialBindingData(n);
7506
- s === null && n.getRawBindingData() === null || await $.setBindingData(n.getTarget(), s ?? {}, {
7546
+ s === null && n.getRawBindingData() === null || await C.setBindingData(n.getTarget(), s ?? {}, {
7507
7547
  sequence: t
7508
7548
  });
7509
7549
  }
7510
- h.syncValuesFromDom(e), await $.evaluateAll(e);
7550
+ h.syncValuesFromDom(e), await C.evaluateAll(e);
7511
7551
  for (const n of i)
7512
7552
  h.getInitialBindingData(n) !== null || n.getRawBindingData() !== null || await h.restoreAncestorArgValues(n, {
7513
7553
  sequence: t,
@@ -7527,11 +7567,11 @@ const h = class h {
7527
7567
  ));
7528
7568
  } else
7529
7569
  c = h.mergeCollectedValues(c, a), h.deleteAncestorOwnedKeys(n, s, c);
7530
- await $.setBindingData(n.getTarget(), c, {
7570
+ await C.setBindingData(n.getTarget(), c, {
7531
7571
  sequence: t
7532
7572
  });
7533
7573
  }
7534
- te.refreshSubtree(e.getTarget());
7574
+ re.refreshSubtree(e.getTarget());
7535
7575
  }
7536
7576
  /**
7537
7577
  * 祖先が所有するキーを、リセットの書き込み対象から落とします。
@@ -7555,7 +7595,7 @@ const h = class h {
7555
7595
  */
7556
7596
  static getInitialBindingData(e) {
7557
7597
  const t = e.getInitialBindAttribute();
7558
- return t === null ? null : $.parseDataBind(t);
7598
+ return t === null ? null : C.parseDataBind(t);
7559
7599
  }
7560
7600
  /**
7561
7601
  * フラグメント配下の入力要素について、内部値を現在の DOM 値と再同期します。
@@ -7582,7 +7622,7 @@ const h = class h {
7582
7622
  t instanceof HTMLFormElement ? r.push(t) : r.push(...Array.from(t.querySelectorAll("form")));
7583
7623
  const i = [];
7584
7624
  for (const n of r) {
7585
- const s = I.get(n);
7625
+ const s = D.get(n);
7586
7626
  s instanceof S && i.push(s);
7587
7627
  }
7588
7628
  return i;
@@ -7713,7 +7753,7 @@ const h = class h {
7713
7753
  * @returns Promise(メッセージのクリアが完了したら解決される)
7714
7754
  */
7715
7755
  static clearMessages(e) {
7716
- return Xe().clearMessages(
7756
+ return Ze().clearMessages(
7717
7757
  e.getTarget()
7718
7758
  );
7719
7759
  }
@@ -7740,7 +7780,7 @@ const h = class h {
7740
7780
  * @return Promise(メッセージの追加が完了したら解決される)
7741
7781
  */
7742
7782
  static addMessage(e, t, r, i) {
7743
- const n = [], s = Xe(), a = s.addMessage, o = (u) => typeof a == "function" ? a.call(s, u, r, i) : s.addErrorMessage(u, r), c = h.findFragmentsByKey(e, t);
7783
+ const n = [], s = Ze(), a = s.addMessage, o = (u) => typeof a == "function" ? a.call(s, u, r, i) : s.addErrorMessage(u, r), c = h.findFragmentsByKey(e, t);
7744
7784
  return c.forEach((u) => {
7745
7785
  n.push(o(u.getTarget()));
7746
7786
  }), c.length === 0 && n.push(o(e.getTarget())), Promise.all(n).then(() => {
@@ -7818,8 +7858,8 @@ h.INITIAL_RESTORED_FORMS = /* @__PURE__ */ new WeakSet(), h.LAST_ANCESTOR_ARG_VA
7818
7858
  "constructor",
7819
7859
  "prototype"
7820
7860
  ]), 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]*)$/;
7821
- let k = h;
7822
- class H {
7861
+ let N = h;
7862
+ class B {
7823
7863
  /**
7824
7864
  * カスタムイベントを発火します。
7825
7865
  *
@@ -7843,7 +7883,7 @@ class H {
7843
7883
  * @param version ライブラリバージョン
7844
7884
  */
7845
7885
  static ready(e) {
7846
- H.dispatch(document, "ready", { version: e });
7886
+ B.dispatch(document, "ready", { version: e });
7847
7887
  }
7848
7888
  /**
7849
7889
  * importstartイベントを発火します。
@@ -7852,7 +7892,7 @@ class H {
7852
7892
  * @param url インポート対象URL
7853
7893
  */
7854
7894
  static importStart(e, t) {
7855
- H.dispatch(e, "importstart", {
7895
+ B.dispatch(e, "importstart", {
7856
7896
  url: t,
7857
7897
  startedAt: performance.now()
7858
7898
  });
@@ -7866,7 +7906,7 @@ class H {
7866
7906
  * @param startedAt 開始時刻
7867
7907
  */
7868
7908
  static importEnd(e, t, r, i) {
7869
- H.dispatch(e, "importend", {
7909
+ B.dispatch(e, "importend", {
7870
7910
  url: t,
7871
7911
  bytes: r,
7872
7912
  durationMs: performance.now() - i
@@ -7880,7 +7920,7 @@ class H {
7880
7920
  * @param error エラー内容
7881
7921
  */
7882
7922
  static importError(e, t, r) {
7883
- H.dispatch(e, "importerror", { url: t, error: r });
7923
+ B.dispatch(e, "importerror", { url: t, error: r });
7884
7924
  }
7885
7925
  /**
7886
7926
  * bindchangeイベントを発火します。
@@ -7896,7 +7936,7 @@ class H {
7896
7936
  const u = t?.[c], d = r[c];
7897
7937
  u !== d && n.push(c);
7898
7938
  }
7899
- H.dispatch(e, "bindchange", {
7939
+ B.dispatch(e, "bindchange", {
7900
7940
  previous: t || {},
7901
7941
  next: r,
7902
7942
  changedKeys: n,
@@ -7915,7 +7955,7 @@ class H {
7915
7955
  * @param reason 変更理由
7916
7956
  */
7917
7957
  static bindComplete(e, t = null, r = "other") {
7918
- H.dispatch(e, "bindcomplete", { bindArg: t, reason: r });
7958
+ B.dispatch(e, "bindcomplete", { bindArg: t, reason: r });
7919
7959
  }
7920
7960
  /**
7921
7961
  * eachupdateイベントを発火します。
@@ -7926,7 +7966,7 @@ class H {
7926
7966
  * @param order 現在の順序
7927
7967
  */
7928
7968
  static eachUpdate(e, t, r, i) {
7929
- H.dispatch(e, "eachupdate", {
7969
+ B.dispatch(e, "eachupdate", {
7930
7970
  added: t,
7931
7971
  removed: r,
7932
7972
  order: i,
@@ -7942,7 +7982,7 @@ class H {
7942
7982
  * @param item 行データ
7943
7983
  */
7944
7984
  static rowAdd(e, t, r, i) {
7945
- H.dispatch(e, "rowadd", { key: t, index: r, item: i });
7985
+ B.dispatch(e, "rowadd", { key: t, index: r, item: i });
7946
7986
  }
7947
7987
  /**
7948
7988
  * rowremoveイベントを発火します。
@@ -7952,7 +7992,7 @@ class H {
7952
7992
  * @param index インデックス
7953
7993
  */
7954
7994
  static rowRemove(e, t, r) {
7955
- H.dispatch(e, "rowremove", { key: t, index: r });
7995
+ B.dispatch(e, "rowremove", { key: t, index: r });
7956
7996
  }
7957
7997
  /**
7958
7998
  * rowmoveイベントを発火します。
@@ -7963,7 +8003,7 @@ class H {
7963
8003
  * @param to 移動後インデックス
7964
8004
  */
7965
8005
  static rowMove(e, t, r, i) {
7966
- H.dispatch(e, "rowmove", { key: t, from: r, to: i });
8006
+ B.dispatch(e, "rowmove", { key: t, from: r, to: i });
7967
8007
  }
7968
8008
  /**
7969
8009
  * showイベントを発火します。
@@ -7971,7 +8011,7 @@ class H {
7971
8011
  * @param target data-if要素
7972
8012
  */
7973
8013
  static show(e) {
7974
- H.dispatch(e, "show", { visible: !0 });
8014
+ B.dispatch(e, "show", { visible: !0 });
7975
8015
  }
7976
8016
  /**
7977
8017
  * hideイベントを発火します。
@@ -7979,7 +8019,7 @@ class H {
7979
8019
  * @param target data-if要素
7980
8020
  */
7981
8021
  static hide(e) {
7982
- H.dispatch(e, "hide", { visible: !1 });
8022
+ B.dispatch(e, "hide", { visible: !1 });
7983
8023
  }
7984
8024
  /**
7985
8025
  * fetchstartイベントを発火します。
@@ -7992,7 +8032,7 @@ class H {
7992
8032
  * @return 戻り値はありません。
7993
8033
  */
7994
8034
  static fetchStart(e, t, r, i, n) {
7995
- H.dispatch(e, "fetchstart", {
8035
+ B.dispatch(e, "fetchstart", {
7996
8036
  url: t,
7997
8037
  options: r || {},
7998
8038
  payload: i,
@@ -8009,7 +8049,7 @@ class H {
8009
8049
  * @param startedAt 開始時刻
8010
8050
  */
8011
8051
  static fetchEnd(e, t, r, i) {
8012
- H.dispatch(e, "fetchend", {
8052
+ B.dispatch(e, "fetchend", {
8013
8053
  url: t,
8014
8054
  status: r,
8015
8055
  durationMs: performance.now() - i
@@ -8025,7 +8065,7 @@ class H {
8025
8065
  * @param startedAt 開始時刻(存在する場合)
8026
8066
  */
8027
8067
  static fetchError(e, t, r, i, n) {
8028
- H.dispatch(e, "fetcherror", {
8068
+ B.dispatch(e, "fetcherror", {
8029
8069
  url: t,
8030
8070
  status: i,
8031
8071
  error: r,
@@ -8041,7 +8081,7 @@ class H {
8041
8081
  * @return 戻り値はありません。
8042
8082
  */
8043
8083
  static pollTimeout(e, t, r) {
8044
- H.dispatch(e, "polltimeout", { count: t, elapsedMs: r });
8084
+ B.dispatch(e, "polltimeout", { count: t, elapsedMs: r });
8045
8085
  }
8046
8086
  /**
8047
8087
  * pollstopイベントを発火します。
@@ -8055,33 +8095,33 @@ class H {
8055
8095
  * @return 戻り値はありません。
8056
8096
  */
8057
8097
  static pollStop(e, t, r, i) {
8058
- H.dispatch(e, "pollstop", { reason: t, count: r, elapsedMs: i });
8098
+ B.dispatch(e, "pollstop", { reason: t, count: r, elapsedMs: i });
8059
8099
  }
8060
8100
  }
8061
- const Nt = {
8101
+ const Ct = {
8062
8102
  401: "unauthorized-redirect",
8063
8103
  403: "forbidden-redirect"
8064
8104
  };
8065
- function kt(b, e) {
8105
+ function $t(b, e) {
8066
8106
  return b.replace(/\{\{([\s\S]+?)\}\}/g, (t, r) => {
8067
8107
  try {
8068
- const i = ie.evaluate(String(r).trim(), e);
8108
+ const i = ne.evaluate(String(r).trim(), e);
8069
8109
  return i == null ? "" : String(i);
8070
8110
  } catch {
8071
8111
  return "";
8072
8112
  }
8073
8113
  });
8074
8114
  }
8075
- function xt(b, e) {
8115
+ function Pt(b, e) {
8076
8116
  const t = b.getAttribute(e);
8077
8117
  if (t === null || t === "")
8078
8118
  return null;
8079
8119
  if (!t.includes("{{"))
8080
8120
  return t;
8081
- const r = I.get(b), i = r instanceof S ? r.getBindingData() : {}, n = kt(t, i);
8121
+ const r = D.get(b), i = r instanceof S ? r.getBindingData() : {}, n = $t(t, i);
8082
8122
  return n === "" ? null : n;
8083
8123
  }
8084
- function Mt(b, e, t) {
8124
+ function Lt(b, e, t) {
8085
8125
  const r = b.getAttribute(`${e}-return-param`);
8086
8126
  if (r === null || r === "")
8087
8127
  return t;
@@ -8094,17 +8134,17 @@ function Mt(b, e, t) {
8094
8134
  const i = window.location.pathname + window.location.search + window.location.hash, s = `${encodeURIComponent(r)}=${encodeURIComponent(i)}`, a = t.indexOf("#"), o = a >= 0 ? t.slice(a) : "", c = a >= 0 ? t.slice(0, a) : t, u = c.includes("?") ? "&" : "?";
8095
8135
  return `${c}${u}${s}${o}`;
8096
8136
  }
8097
- function gt(b) {
8098
- const e = Nt[b];
8137
+ function yt(b) {
8138
+ const e = Ct[b];
8099
8139
  if (e === void 0 || typeof document > "u")
8100
8140
  return !1;
8101
8141
  const t = `${l.prefix}${e}`, r = [];
8102
8142
  document.body && r.push(document.body), document.documentElement && r.push(document.documentElement);
8103
8143
  for (const i of r) {
8104
- const n = xt(i, t);
8144
+ const n = Pt(i, t);
8105
8145
  if (n === null)
8106
8146
  continue;
8107
- const s = Mt(i, t, n);
8147
+ const s = Lt(i, t, n);
8108
8148
  try {
8109
8149
  if (new URL(s, window.location.href).href === window.location.href)
8110
8150
  return !1;
@@ -8540,7 +8580,7 @@ const x = class x {
8540
8580
  ), Promise.resolve();
8541
8581
  x.RESTORED_ELEMENTS.add(r);
8542
8582
  const i = x.readRecord(t), n = i ? x.extractFromRecord(t, i) : {}, s = { ...e.getRawBindingData() ?? {}, ...n };
8543
- return x.seedSignature(r, x.selectFromData(t, s)), Object.keys(n).length === 0 ? Promise.resolve() : $.setBindingData(r, s, {
8583
+ return x.seedSignature(r, x.selectFromData(t, s)), Object.keys(n).length === 0 ? Promise.resolve() : C.setBindingData(r, s, {
8544
8584
  reentrant: !0,
8545
8585
  kind: "nonSupply",
8546
8586
  sequence: S.nextSequence()
@@ -8620,7 +8660,7 @@ const x = class x {
8620
8660
  ).forEach((i) => {
8621
8661
  if (!x.RESTORED_ELEMENTS.has(i))
8622
8662
  return;
8623
- const n = I.get(i);
8663
+ const n = D.get(i);
8624
8664
  if (!(n instanceof S))
8625
8665
  return;
8626
8666
  const s = x.readDeclaration(n);
@@ -8636,7 +8676,7 @@ const x = class x {
8636
8676
  };
8637
8677
  x.SIGNATURES = /* @__PURE__ */ new WeakMap(), x.RESTORED_ELEMENTS = /* @__PURE__ */ new WeakSet(), x.WARNED_ELEMENTS = /* @__PURE__ */ new WeakMap(), x.WARNED_KINDS = /* @__PURE__ */ new Set();
8638
8678
  let Fe = x;
8639
- class mt {
8679
+ class bt {
8640
8680
  /**
8641
8681
  * URLのクエリパラメータを取得します。
8642
8682
  *
@@ -8682,7 +8722,7 @@ class mt {
8682
8722
  }
8683
8723
  }
8684
8724
  }
8685
- const $t = [
8725
+ const Ot = [
8686
8726
  "addErrorMessage",
8687
8727
  "clearMessages",
8688
8728
  "closeDialog",
@@ -8690,26 +8730,26 @@ const $t = [
8690
8730
  "dialog",
8691
8731
  "openDialog",
8692
8732
  "toast"
8693
- ], Ct = "__haoriHistoryState__", Oe = "data-haori-click-lock", Je = "ファイルを保存できませんでした", Pt = 100;
8733
+ ], Bt = "__haoriHistoryState__", Be = "data-haori-click-lock", Qe = "ファイルを保存できませんでした", Ht = 100;
8694
8734
  let De = null;
8695
- const Lt = ["info", "warning", "error", "success"], Ze = /^(\d{3})-(click|click-await|close|toast|toast-level|no-message|bind)$/;
8696
- function fe() {
8735
+ const Ut = ["info", "warning", "error", "success"], _e = /^(\d{3})-(click|click-await|close|toast|toast-level|no-message|bind)$/;
8736
+ function pe() {
8697
8737
  const e = globalThis.window?.Haori;
8698
- return $t.every(
8738
+ return Ot.every(
8699
8739
  (r) => typeof e?.[r] == "function"
8700
- ) ? e : Se;
8740
+ ) ? e : Te;
8701
8741
  }
8702
- const Ot = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
8703
- function He(b) {
8704
- return Ot.has(b.toUpperCase());
8742
+ const Vt = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
8743
+ function Ue(b) {
8744
+ return Vt.has(b.toUpperCase());
8705
8745
  }
8706
- function Bt(b, e) {
8746
+ function qt(b, e) {
8707
8747
  for (const [t, r] of Object.entries(e))
8708
8748
  r !== void 0 && (Array.isArray(r) ? r.forEach((i) => {
8709
- b.append(t, be(i));
8710
- }) : b.append(t, be(r)));
8749
+ b.append(t, Ae(i));
8750
+ }) : b.append(t, Ae(r)));
8711
8751
  }
8712
- function be(b) {
8752
+ function Ae(b) {
8713
8753
  if (b == null)
8714
8754
  return "";
8715
8755
  if (typeof b == "object" || typeof b == "function")
@@ -8720,11 +8760,11 @@ function be(b) {
8720
8760
  }
8721
8761
  return String(b);
8722
8762
  }
8723
- function yt(b, e) {
8763
+ function Et(b, e) {
8724
8764
  const t = new URL(b, window.location.href), r = new URLSearchParams(t.search);
8725
- return Bt(r, e), t.search = r.toString(), t.toString();
8765
+ return qt(r, e), t.search = r.toString(), t.toString();
8726
8766
  }
8727
- function Ht(b) {
8767
+ function Wt(b) {
8728
8768
  if (b == null)
8729
8769
  return { payload: {}, dropped: !1 };
8730
8770
  if (typeof b == "string") {
@@ -8741,12 +8781,12 @@ function Ht(b) {
8741
8781
  return { payload: {}, dropped: !0 };
8742
8782
  }
8743
8783
  return e.includes("=") ? {
8744
- payload: Qe(new URLSearchParams(e)),
8784
+ payload: et(new URLSearchParams(e)),
8745
8785
  dropped: !1
8746
8786
  } : { payload: {}, dropped: !0 };
8747
8787
  }
8748
8788
  if (b instanceof URLSearchParams)
8749
- return { payload: Qe(b), dropped: !1 };
8789
+ return { payload: et(b), dropped: !1 };
8750
8790
  if (typeof FormData < "u" && b instanceof FormData) {
8751
8791
  const e = {};
8752
8792
  let t = !1;
@@ -8755,30 +8795,30 @@ function Ht(b) {
8755
8795
  t = !0;
8756
8796
  continue;
8757
8797
  }
8758
- bt(e, r, i);
8798
+ At(e, r, i);
8759
8799
  }
8760
8800
  return { payload: e, dropped: t };
8761
8801
  }
8762
8802
  return { payload: {}, dropped: !0 };
8763
8803
  }
8764
- function Qe(b) {
8804
+ function et(b) {
8765
8805
  const e = {};
8766
8806
  for (const [t, r] of b.entries())
8767
- bt(e, t, r);
8807
+ At(e, t, r);
8768
8808
  return e;
8769
8809
  }
8770
- function bt(b, e, t) {
8810
+ function At(b, e, t) {
8771
8811
  const r = b[e];
8772
8812
  r === void 0 ? b[e] = t : Array.isArray(r) ? r.push(t) : b[e] = [r, t];
8773
8813
  }
8774
- function pe(b, e) {
8775
- if (k.isCompleteSetValue(e))
8814
+ function me(b, e) {
8815
+ if (N.isCompleteSetValue(e))
8776
8816
  return e;
8777
8817
  if (Array.isArray(e)) {
8778
8818
  const t = Array.isArray(b) ? b.slice() : [];
8779
8819
  let r = !1;
8780
8820
  return e.forEach((i, n) => {
8781
- i != null && (typeof i == "object" && !Array.isArray(i) && Object.keys(i).length === 0 || (t[n] = pe(t[n], i), r = !0));
8821
+ i != null && (typeof i == "object" && !Array.isArray(i) && Object.keys(i).length === 0 || (t[n] = me(t[n], i), r = !0));
8782
8822
  }), r ? t : b;
8783
8823
  }
8784
8824
  if (e !== null && typeof e == "object") {
@@ -8786,18 +8826,18 @@ function pe(b, e) {
8786
8826
  for (const [r, i] of Object.entries(
8787
8827
  e
8788
8828
  ))
8789
- t[r] = pe(t[r], i);
8829
+ t[r] = me(t[r], i);
8790
8830
  return t;
8791
8831
  }
8792
8832
  return e;
8793
8833
  }
8794
- function Ut(b) {
8834
+ function jt(b) {
8795
8835
  const e = b?.body;
8796
8836
  return e == null ? !1 : typeof e == "string" ? e !== "" : !0;
8797
8837
  }
8798
- function Vt(b, e) {
8838
+ function Kt(b, e) {
8799
8839
  const t = { ...e || {} }, r = (t.method || "GET").toUpperCase();
8800
- if (l.runtime !== "demo" || He(r))
8840
+ if (l.runtime !== "demo" || Ue(r))
8801
8841
  return {
8802
8842
  url: b,
8803
8843
  options: t,
@@ -8805,11 +8845,11 @@ function Vt(b, e) {
8805
8845
  effectiveMethod: r,
8806
8846
  normalized: !1
8807
8847
  };
8808
- const { payload: i, dropped: n } = Ht(
8848
+ const { payload: i, dropped: n } = Wt(
8809
8849
  t.body
8810
8850
  );
8811
8851
  let s = b;
8812
- Object.keys(i).length > 0 && (s = yt(s, i)), n && m.warn(
8852
+ Object.keys(i).length > 0 && (s = Et(s, i)), n && m.warn(
8813
8853
  "Haori",
8814
8854
  `The ${r} body cannot be converted into a query string and is dropped by the demo runtime normalization. Send the values with ${l.prefix}{event}-data / ${l.prefix}{event}-form, or use the embedded runtime.`
8815
8855
  ), delete t.body, t.method = "GET";
@@ -8825,7 +8865,7 @@ function Vt(b, e) {
8825
8865
  queryString: new URL(s, window.location.href).search || void 0
8826
8866
  };
8827
8867
  }
8828
- function qt(b) {
8868
+ function zt(b) {
8829
8869
  return b == null ? null : typeof b == "string" ? b : b instanceof URLSearchParams ? b.toString() : b instanceof FormData ? Array.from(b.entries()).map(([e, t]) => t instanceof File ? [
8830
8870
  e,
8831
8871
  {
@@ -8836,20 +8876,20 @@ function qt(b) {
8836
8876
  }
8837
8877
  ] : [e, String(t)]) : String(b);
8838
8878
  }
8839
- function Ie(b) {
8840
- return b instanceof Blob ? !0 : Array.isArray(b) ? b.some(Ie) : b !== null && typeof b == "object" ? Object.values(b).some(
8841
- Ie
8879
+ function ke(b) {
8880
+ return b instanceof Blob ? !0 : Array.isArray(b) ? b.some(ke) : b !== null && typeof b == "object" ? Object.values(b).some(
8881
+ ke
8842
8882
  ) : !1;
8843
8883
  }
8844
- function Wt(b) {
8884
+ function Gt(b) {
8845
8885
  return Object.values(b).some((e) => e instanceof Blob ? !1 : Array.isArray(e) ? e.some(
8846
- (t) => !(t instanceof Blob) && Ie(t)
8847
- ) : Ie(e));
8886
+ (t) => !(t instanceof Blob) && ke(t)
8887
+ ) : ke(e));
8848
8888
  }
8849
- function xe(b) {
8850
- return Ue(k.getValues(b));
8889
+ function Me(b) {
8890
+ return Ve(N.getValues(b));
8851
8891
  }
8852
- function Ue(b) {
8892
+ function Ve(b) {
8853
8893
  const e = (r) => {
8854
8894
  if (r instanceof File)
8855
8895
  return r.name;
@@ -8857,7 +8897,7 @@ function Ue(b) {
8857
8897
  return "";
8858
8898
  if (Array.isArray(r)) {
8859
8899
  const i = r.map(e);
8860
- return k.carryCollectedRowIdentity(r, i), i;
8900
+ return N.carryCollectedRowIdentity(r, i), i;
8861
8901
  }
8862
8902
  if (r !== null && typeof r == "object") {
8863
8903
  const i = {};
@@ -8865,15 +8905,15 @@ function Ue(b) {
8865
8905
  r
8866
8906
  ))
8867
8907
  i[n] = e(s);
8868
- return k.carryCollectedRowIdentity(r, i), i;
8908
+ return N.carryCollectedRowIdentity(r, i), i;
8869
8909
  }
8870
8910
  return r;
8871
8911
  }, t = {};
8872
8912
  for (const [r, i] of Object.entries(b))
8873
8913
  t[r] = e(i);
8874
- return k.carryCollectedRowIdentity(b, t), t;
8914
+ return N.carryCollectedRowIdentity(b, t), t;
8875
8915
  }
8876
- function jt(b, e) {
8916
+ function Yt(b, e) {
8877
8917
  const t = new Headers(
8878
8918
  e.headers || void 0
8879
8919
  ), r = Array.from(t.entries()).sort(
@@ -8883,7 +8923,7 @@ function jt(b, e) {
8883
8923
  url: b,
8884
8924
  method: String(e.method || "GET").toUpperCase(),
8885
8925
  headers: r,
8886
- body: qt(e.body || null)
8926
+ body: zt(e.body || null)
8887
8927
  });
8888
8928
  }
8889
8929
  const p = class p {
@@ -8948,7 +8988,7 @@ const p = class p {
8948
8988
  const i = K.read(e, t), n = [];
8949
8989
  if (i)
8950
8990
  (r === "click" || r === "error-click" ? K.queryAllInListOrder(i, t) : K.queryAll(i, t)).forEach((a) => {
8951
- const o = I.get(a);
8991
+ const o = D.get(a);
8952
8992
  o && n.push(o);
8953
8993
  }), n.length === 0 && m.error("Haori", `Element not found: ${i} (${t})`);
8954
8994
  else if (r === "error-click")
@@ -8958,7 +8998,7 @@ const p = class p {
8958
8998
  );
8959
8999
  else if (r === "open" || r === "close" || r === "error-close") {
8960
9000
  const s = e.getTarget().closest("dialog");
8961
- s ? n.push(I.get(s)) : m.error("Haori", `Ancestor <dialog> not found (${t})`);
9001
+ s ? n.push(D.get(s)) : m.error("Haori", `Ancestor <dialog> not found (${t})`);
8962
9002
  } else
8963
9003
  n.push(e);
8964
9004
  return n;
@@ -9004,7 +9044,7 @@ const p = class p {
9004
9044
  );
9005
9045
  const n = p.attrName(r, "error-"), s = /* @__PURE__ */ new Map();
9006
9046
  for (const a of e.getAttributeNames()) {
9007
- const o = a.startsWith(n) ? Ze.exec(a.slice(n.length)) : null;
9047
+ const o = a.startsWith(n) ? _e.exec(a.slice(n.length)) : null;
9008
9048
  o && o[2] === "no-message" && s.set(Number(o[1]), {
9009
9049
  key: `error-${o[1]}`,
9010
9050
  clickFragments: null,
@@ -9036,7 +9076,7 @@ const p = class p {
9036
9076
  for (const a of e.getAttributeNames()) {
9037
9077
  if (!a.startsWith(i))
9038
9078
  continue;
9039
- const o = Ze.exec(
9079
+ const o = _e.exec(
9040
9080
  a.slice(i.length)
9041
9081
  );
9042
9082
  o && n.add(o[1]);
@@ -9082,7 +9122,7 @@ const p = class p {
9082
9122
  * @returns レベル。4 つの値のどれとも一致しない場合は null(`info` で表示する)
9083
9123
  */
9084
9124
  static toToastLevel(e) {
9085
- return Lt.includes(e) ? e : null;
9125
+ return Ut.includes(e) ? e : null;
9086
9126
  }
9087
9127
  /**
9088
9128
  * `data-{event}-error-status` の値を、ステータスの一覧へ変換します。
@@ -9169,7 +9209,7 @@ const p = class p {
9169
9209
  const r = e.getRawAttribute(t);
9170
9210
  let i;
9171
9211
  try {
9172
- i = $.parseDataBind(r);
9212
+ i = C.parseDataBind(r);
9173
9213
  } catch (n) {
9174
9214
  return m.error("Haori", `Invalid fetch headers: ${n}`), null;
9175
9215
  }
@@ -9260,7 +9300,7 @@ const p = class p {
9260
9300
  return { value: e.replace(
9261
9301
  p.DATA_PLACEHOLDER_REGEX,
9262
9302
  (n, s, a) => {
9263
- const o = ie.evaluateDetailed(
9303
+ const o = ne.evaluateDetailed(
9264
9304
  s ?? a ?? "",
9265
9305
  t
9266
9306
  );
@@ -9330,7 +9370,7 @@ const p = class p {
9330
9370
  return { value: e.replace(
9331
9371
  p.DATA_PLACEHOLDER_REGEX,
9332
9372
  (n, s, a, o) => {
9333
- const c = ie.evaluateDetailed(
9373
+ const c = ne.evaluateDetailed(
9334
9374
  s ?? a ?? "",
9335
9375
  t
9336
9376
  );
@@ -9367,7 +9407,7 @@ const p = class p {
9367
9407
  const a = r.trim();
9368
9408
  if (p.SINGLE_PLACEHOLDER_REGEX.test(a))
9369
9409
  return {
9370
- value: $.parseDataBind(n),
9410
+ value: C.parseDataBind(n),
9371
9411
  hasUnresolvedReference: s
9372
9412
  };
9373
9413
  if (a.startsWith("{") || a.startsWith("[")) {
@@ -9376,7 +9416,7 @@ const p = class p {
9376
9416
  e.getBindingData()
9377
9417
  );
9378
9418
  return {
9379
- value: $.parseDataBind(c.value),
9419
+ value: C.parseDataBind(c.value),
9380
9420
  hasUnresolvedReference: s || c.hasUnresolvedReference
9381
9421
  };
9382
9422
  }
@@ -9385,7 +9425,7 @@ const p = class p {
9385
9425
  e.getBindingData()
9386
9426
  );
9387
9427
  return {
9388
- value: $.parseDataBind(o.value),
9428
+ value: C.parseDataBind(o.value),
9389
9429
  hasUnresolvedReference: s || o.hasUnresolvedReference
9390
9430
  };
9391
9431
  }
@@ -9401,8 +9441,8 @@ const p = class p {
9401
9441
  targetFragment: e
9402
9442
  }, i = t ? p.attrName(t, "if") : p.attrName(null, "if", !0);
9403
9443
  if (e.hasAttribute(i)) {
9404
- const D = e.getRawAttribute(i);
9405
- typeof D == "string" && D.trim() !== "" ? (r.conditionExpression = k.unwrapConditionExpression(D), r.conditionAttributeName = i) : m.warn(
9444
+ const I = e.getRawAttribute(i);
9445
+ typeof I == "string" && I.trim() !== "" ? (r.conditionExpression = N.unwrapConditionExpression(I), r.conditionAttributeName = i) : m.warn(
9406
9446
  "Haori",
9407
9447
  `${i} に条件式が指定されていません。`
9408
9448
  );
@@ -9413,26 +9453,26 @@ const p = class p {
9413
9453
  e.getAttribute(p.attrName(t, "confirm"))
9414
9454
  )
9415
9455
  )), e.hasAttribute(p.attrName(t, "data")) && (r.dataAttrName = p.attrName(t, "data")), e.hasAttribute(p.attrName(t, "form"))) {
9416
- const L = K.read(
9456
+ const $ = K.read(
9417
9457
  e,
9418
9458
  p.attrName(t, "form")
9419
9459
  );
9420
- if (L) {
9421
- const X = K.query(
9422
- L,
9460
+ if ($) {
9461
+ const Z = K.query(
9462
+ $,
9423
9463
  p.attrName(t, "form")
9424
9464
  );
9425
- X !== null ? r.formFragment = k.getFormFragment(
9426
- I.get(X)
9465
+ Z !== null ? r.formFragment = N.getFormFragment(
9466
+ D.get(Z)
9427
9467
  ) : m.error(
9428
9468
  "Haori",
9429
- `Form element not found: ${L} (${p.attrName(t, "form")})`
9469
+ `Form element not found: ${$} (${p.attrName(t, "form")})`
9430
9470
  );
9431
9471
  } else
9432
- r.formFragment = k.getFormFragment(e);
9433
- } else (t === "change" || t === "input") && (r.formFragment = k.getFormFragment(e), r.formFragment === null && p.isNamedInputFragment(e) && (r.selfValueFragment = e));
9472
+ r.formFragment = N.getFormFragment(e);
9473
+ } else (t === "change" || t === "input") && (r.formFragment = N.getFormFragment(e), r.formFragment === null && p.isNamedInputFragment(e) && (r.selfValueFragment = e));
9434
9474
  if (e.hasAttribute(`${l.prefix}${t}-before-run`)) {
9435
- const L = e.getRawAttribute(
9475
+ const $ = e.getRawAttribute(
9436
9476
  `${l.prefix}${t}-before-run`
9437
9477
  );
9438
9478
  try {
@@ -9441,45 +9481,45 @@ const p = class p {
9441
9481
  "fetchOptions",
9442
9482
  `
9443
9483
  "use strict";
9444
- ${L}
9484
+ ${$}
9445
9485
  `
9446
9486
  );
9447
- } catch (X) {
9448
- m.error("Haori", `Invalid before script: ${X}`);
9487
+ } catch (Z) {
9488
+ m.error("Haori", `Invalid before script: ${Z}`);
9449
9489
  }
9450
9490
  }
9451
- const D = p.attrName(t, "run");
9452
- if (e.hasAttribute(D)) {
9453
- const L = String(e.getAttribute(D) ?? "");
9454
- let X = null;
9491
+ const I = p.attrName(t, "run");
9492
+ if (e.hasAttribute(I)) {
9493
+ const $ = String(e.getAttribute(I) ?? "");
9494
+ let Z = null;
9455
9495
  try {
9456
- X = new Function(
9496
+ Z = new Function(
9457
9497
  "event",
9458
9498
  `"use strict"; return (
9459
- ${L}
9499
+ ${$}
9460
9500
  );`
9461
9501
  );
9462
9502
  } catch {
9463
9503
  try {
9464
- X = new Function("event", `"use strict";
9465
- ${L}
9504
+ Z = new Function("event", `"use strict";
9505
+ ${$}
9466
9506
  `);
9467
9507
  } catch (Q) {
9468
9508
  m.error("Haori", `Invalid run script: ${Q}`);
9469
9509
  }
9470
9510
  }
9471
- X && (r.runScript = X);
9511
+ Z && (r.runScript = Z);
9472
9512
  }
9473
9513
  }
9474
9514
  const n = p.attrName(t, "fetch"), s = e.hasAttribute(n);
9475
9515
  if (s) {
9476
- const D = e.getAttributeEvaluation(n);
9477
- D && (r.fetchHasUnresolvedReference = D.hasUnresolvedReference, r.fetchUrl = D.hasUnresolvedReference ? null : D.value);
9516
+ const I = e.getAttributeEvaluation(n);
9517
+ I && (r.fetchHasUnresolvedReference = I.hasUnresolvedReference, r.fetchUrl = I.hasUnresolvedReference ? null : I.value);
9478
9518
  }
9479
9519
  const a = {}, o = t ? p.attrName(t, "fetch-method") : p.attrName(null, "method", !0);
9480
9520
  if (e.hasAttribute(o)) {
9481
- const D = e.getAttributeEvaluation(o);
9482
- D?.hasUnresolvedReference ? r.fetchHasUnresolvedReference = !0 : a.method = p.normalizeAttributeText(D?.value) ?? void 0;
9521
+ const I = e.getAttributeEvaluation(o);
9522
+ I?.hasUnresolvedReference ? r.fetchHasUnresolvedReference = !0 : a.method = p.normalizeAttributeText(I?.value) ?? void 0;
9483
9523
  }
9484
9524
  const c = t ? p.attrName(t, "fetch-headers") : p.attrName(null, "headers", !0), u = p.readFetchHeaders(
9485
9525
  e,
@@ -9489,9 +9529,9 @@ ${L}
9489
9529
  const d = t ? p.attrName(t, "fetch-content-type") : p.attrName(null, "content-type", !0);
9490
9530
  let g = null;
9491
9531
  if (e.hasAttribute(d)) {
9492
- const D = e.getAttributeEvaluation(d);
9493
- D?.hasUnresolvedReference && (r.fetchHasUnresolvedReference = !0), g = p.normalizeAttributeText(
9494
- D?.value
9532
+ const I = e.getAttributeEvaluation(d);
9533
+ I?.hasUnresolvedReference && (r.fetchHasUnresolvedReference = !0), g = p.normalizeAttributeText(
9534
+ I?.value
9495
9535
  );
9496
9536
  }
9497
9537
  if (g !== null)
@@ -9500,10 +9540,10 @@ ${L}
9500
9540
  g
9501
9541
  );
9502
9542
  else if (a.method && !p.hasDeclaredContentType(a.headers)) {
9503
- const D = a.method.toUpperCase();
9543
+ const I = a.method.toUpperCase();
9504
9544
  a.headers = p.withContentType(
9505
9545
  a.headers,
9506
- D === "GET" || D === "HEAD" || D === "OPTIONS" ? "application/x-www-form-urlencoded" : "application/json"
9546
+ I === "GET" || I === "HEAD" || I === "OPTIONS" ? "application/x-www-form-urlencoded" : "application/json"
9507
9547
  );
9508
9548
  }
9509
9549
  Object.keys(a).length > 0 && (r.fetchOptions = a);
@@ -9515,50 +9555,50 @@ ${L}
9515
9555
  );
9516
9556
  else if (e.hasAttribute(y)) {
9517
9557
  r.download = !0;
9518
- const D = e.getAttributeEvaluation(y);
9519
- r.downloadFileName = D?.hasUnresolvedReference ? null : p.normalizeAttributeText(D?.value);
9558
+ const I = e.getAttributeEvaluation(y);
9559
+ r.downloadFileName = I?.hasUnresolvedReference ? null : p.normalizeAttributeText(I?.value);
9520
9560
  }
9521
- const A = t ? p.attrName(t, "fetch-download-folder") : p.attrName(null, "download-folder", !0);
9522
- e.hasAttribute(A) && (r.download ? r.downloadFolder = !0 : m.warn(
9561
+ const E = t ? p.attrName(t, "fetch-download-folder") : p.attrName(null, "download-folder", !0);
9562
+ e.hasAttribute(E) && (r.download ? r.downloadFolder = !0 : m.warn(
9523
9563
  "Haori",
9524
- `${A} は ${y} と併せて指定してください(書き出す応答が無いため、この宣言は無視します)。`
9564
+ `${E} は ${y} と併せて指定してください(書き出す応答が無いため、この宣言は無視します)。`
9525
9565
  ));
9526
- const E = t ? p.attrName(t, "bind") : p.attrName(null, "bind", !0);
9527
- if (e.hasAttribute(E)) {
9528
- const D = K.read(e, E);
9529
- if (D) {
9530
- const L = K.queryAll(D, E);
9531
- L.length > 0 ? (r.bindFragments = [], L.forEach((X) => {
9532
- const Q = I.get(X);
9566
+ const A = t ? p.attrName(t, "bind") : p.attrName(null, "bind", !0);
9567
+ if (e.hasAttribute(A)) {
9568
+ const I = K.read(e, A);
9569
+ if (I) {
9570
+ const $ = K.queryAll(I, A);
9571
+ $.length > 0 ? (r.bindFragments = [], $.forEach((Z) => {
9572
+ const Q = D.get(Z);
9533
9573
  Q && r.bindFragments.push(Q);
9534
9574
  })) : m.error(
9535
9575
  "Haori",
9536
- `Bind element not found: ${D} (${E})`
9576
+ `Bind element not found: ${I} (${A})`
9537
9577
  );
9538
9578
  }
9539
9579
  }
9540
- const T = p.attrName(t, "bind-arg"), N = p.attrName(null, "arg", !0), B = p.attrName(null, "bind-arg", !0);
9541
- t ? e.hasAttribute(T) && (r.bindArg = e.getRawAttribute(T)) : e.hasAttribute(N) ? r.bindArg = e.getRawAttribute(
9542
- N
9543
- ) : e.hasAttribute(B) && (r.bindArg = e.getRawAttribute(B));
9580
+ const T = p.attrName(t, "bind-arg"), k = p.attrName(null, "arg", !0), O = p.attrName(null, "bind-arg", !0);
9581
+ t ? e.hasAttribute(T) && (r.bindArg = e.getRawAttribute(T)) : e.hasAttribute(k) ? r.bindArg = e.getRawAttribute(
9582
+ k
9583
+ ) : e.hasAttribute(O) && (r.bindArg = e.getRawAttribute(O));
9544
9584
  const F = t ? p.attrName(t, "bind-params") : p.attrName(null, "bind-params", !0);
9545
9585
  if (e.hasAttribute(F)) {
9546
- const D = e.getRawAttribute(F);
9547
- r.bindParams = D.split("&").map((L) => L.trim());
9586
+ const I = e.getRawAttribute(F);
9587
+ r.bindParams = I.split("&").map(($) => $.trim());
9548
9588
  }
9549
9589
  const j = t ? p.attrName(t, "bind-append") : p.attrName(null, "bind-append", !0);
9550
9590
  if (e.hasAttribute(j)) {
9551
- const D = e.getRawAttribute(j);
9552
- r.bindAppendParams = D.split("&").map((L) => L.trim()).filter(Boolean);
9553
- }
9554
- const Z = t ? p.attrName(t, "bind-merge") : p.attrName(null, "bind-merge", !0);
9555
- e.hasAttribute(Z) && (r.bindMerge = !0);
9556
- const _ = t ? p.attrName(t, "bind-transform") : p.attrName(null, "bind-transform", !0);
9557
- e.hasAttribute(_) && (r.bindTransform = e.getRawAttribute(_));
9558
- const P = t ? p.attrName(t, "copy-params") : null;
9559
- if (P && e.hasAttribute(P)) {
9560
- const D = e.getRawAttribute(P);
9561
- r.copyParams = D.split("&").map((L) => L.trim()).filter(Boolean);
9591
+ const I = e.getRawAttribute(j);
9592
+ r.bindAppendParams = I.split("&").map(($) => $.trim()).filter(Boolean);
9593
+ }
9594
+ const J = t ? p.attrName(t, "bind-merge") : p.attrName(null, "bind-merge", !0);
9595
+ e.hasAttribute(J) && (r.bindMerge = !0);
9596
+ const te = t ? p.attrName(t, "bind-transform") : p.attrName(null, "bind-transform", !0);
9597
+ e.hasAttribute(te) && (r.bindTransform = e.getRawAttribute(te));
9598
+ const U = t ? p.attrName(t, "copy-params") : null;
9599
+ if (U && e.hasAttribute(U)) {
9600
+ const I = e.getRawAttribute(U);
9601
+ r.copyParams = I.split("&").map(($) => $.trim()).filter(Boolean);
9562
9602
  }
9563
9603
  if (t) {
9564
9604
  if (e.hasAttribute(p.attrName(t, "adjust"))) {
@@ -9567,23 +9607,23 @@ ${L}
9567
9607
  p.attrName(t, "adjust")
9568
9608
  );
9569
9609
  if (W) {
9570
- const G = K.queryAll(
9610
+ const Y = K.queryAll(
9571
9611
  W,
9572
9612
  p.attrName(t, "adjust")
9573
9613
  );
9574
- G.length > 0 ? (r.adjustFragments = [], G.forEach((J) => {
9575
- const Re = I.get(J);
9576
- Re && r.adjustFragments.push(Re);
9614
+ Y.length > 0 ? (r.adjustFragments = [], Y.forEach((X) => {
9615
+ const Ee = D.get(X);
9616
+ Ee && r.adjustFragments.push(Ee);
9577
9617
  })) : m.error(
9578
9618
  "Haori",
9579
9619
  `Adjust element not found: ${W} (${p.attrName(t, "adjust")})`
9580
9620
  );
9581
9621
  }
9582
9622
  if (e.hasAttribute(p.attrName(t, "adjust-value"))) {
9583
- const G = e.getRawAttribute(
9623
+ const Y = e.getRawAttribute(
9584
9624
  p.attrName(t, "adjust-value")
9585
- ), J = Number(G);
9586
- isNaN(J) || (r.adjustValue = J);
9625
+ ), X = Number(Y);
9626
+ isNaN(X) || (r.adjustValue = X);
9587
9627
  }
9588
9628
  }
9589
9629
  if (e.hasAttribute(p.attrName(t, "row-add")) && (r.rowAdd = !0), e.hasAttribute(p.attrName(t, "row-remove")) && (r.rowRemove = !0), e.hasAttribute(p.attrName(t, "row-prev")) && (r.rowMovePrev = !0), e.hasAttribute(p.attrName(t, "row-next")) && (r.rowMoveNext = !0), e.hasAttribute(`${l.prefix}${t}-after-run`)) {
@@ -9598,8 +9638,8 @@ ${L}
9598
9638
  ${W}
9599
9639
  `
9600
9640
  );
9601
- } catch (G) {
9602
- m.error("Haori", `Invalid after script: ${G}`);
9641
+ } catch (Y) {
9642
+ m.error("Haori", `Invalid after script: ${Y}`);
9603
9643
  }
9604
9644
  }
9605
9645
  if (e.hasAttribute(p.attrName(t, "dialog")) && (r.dialogMessage = p.unescapeNewlines(
@@ -9632,28 +9672,28 @@ ${W}
9632
9672
  "error-toast-level",
9633
9673
  p.attrName(t, "error-toast-level")
9634
9674
  ));
9635
- const G = p.attrName(t, "error-status");
9636
- e.hasAttribute(G) && (r.errorStatuses = p.parseErrorStatuses(
9637
- e.getRawAttribute(G),
9638
- G
9675
+ const Y = p.attrName(t, "error-status");
9676
+ e.hasAttribute(Y) && (r.errorStatuses = p.parseErrorStatuses(
9677
+ e.getRawAttribute(Y),
9678
+ Y
9639
9679
  )), r.errorNoMessage = e.hasAttribute(
9640
9680
  p.attrName(t, "error-no-message")
9641
9681
  ), r.errorBind = e.hasAttribute(
9642
9682
  p.attrName(t, "error-bind")
9643
9683
  );
9644
9684
  }
9645
- const D = p.attrName(t, "redirect"), L = p.attrName(t, "redirect-replace"), X = e.hasAttribute(D), Q = e.hasAttribute(L);
9646
- if (X && (r.redirectUrl = p.readLateAttribute(
9685
+ const I = p.attrName(t, "redirect"), $ = p.attrName(t, "redirect-replace"), Z = e.hasAttribute(I), Q = e.hasAttribute($);
9686
+ if (Z && (r.redirectUrl = p.readLateAttribute(
9647
9687
  e,
9648
9688
  r,
9649
9689
  "redirect",
9650
- D
9690
+ I
9651
9691
  )), Q && (r.redirectReplaceUrl = p.readLateAttribute(
9652
9692
  e,
9653
9693
  r,
9654
9694
  "redirect-replace",
9655
- L
9656
- )), X || Q) {
9695
+ $
9696
+ )), Z || Q) {
9657
9697
  const W = p.attrName(
9658
9698
  t,
9659
9699
  "redirect-return-param"
@@ -9681,18 +9721,18 @@ ${W}
9681
9721
  p.attrName(t, "history-form")
9682
9722
  );
9683
9723
  if (W) {
9684
- const G = K.query(
9724
+ const Y = K.query(
9685
9725
  W,
9686
9726
  p.attrName(t, "history-form")
9687
9727
  );
9688
- G !== null ? r.historyFormFragment = k.getFormFragment(
9689
- I.get(G)
9728
+ Y !== null ? r.historyFormFragment = N.getFormFragment(
9729
+ D.get(Y)
9690
9730
  ) : m.error(
9691
9731
  "Haori",
9692
9732
  `Form element not found: ${W} (${p.attrName(t, "history-form")})`
9693
9733
  );
9694
9734
  } else
9695
- r.historyFormFragment = k.getFormFragment(e);
9735
+ r.historyFormFragment = N.getFormFragment(e);
9696
9736
  }
9697
9737
  [
9698
9738
  "reset-before",
@@ -9707,44 +9747,44 @@ ${W}
9707
9747
  ].forEach((W) => {
9708
9748
  if (W.startsWith("error-") && t === "poll")
9709
9749
  return;
9710
- const G = p.attrName(t, W);
9711
- if (!e.hasAttribute(G))
9750
+ const Y = p.attrName(t, W);
9751
+ if (!e.hasAttribute(Y))
9712
9752
  return;
9713
- const J = p.resolveSelectorTargets(
9753
+ const X = p.resolveSelectorTargets(
9714
9754
  e,
9715
- G,
9755
+ Y,
9716
9756
  W
9717
9757
  );
9718
- if (J.length > 0)
9758
+ if (X.length > 0)
9719
9759
  switch (W) {
9720
9760
  case "reset-before":
9721
- r.resetBeforeFragments = J;
9761
+ r.resetBeforeFragments = X;
9722
9762
  break;
9723
9763
  case "reset":
9724
- r.resetFragments = J;
9764
+ r.resetFragments = X;
9725
9765
  break;
9726
9766
  case "refetch":
9727
- r.refetchFragments = J;
9767
+ r.refetchFragments = X;
9728
9768
  break;
9729
9769
  case "click":
9730
- r.clickFragments = J, r.clickAwait = e.hasAttribute(`${G}-await`);
9770
+ r.clickFragments = X, r.clickAwait = e.hasAttribute(`${Y}-await`);
9731
9771
  break;
9732
9772
  case "copy":
9733
- r.copyFragments = J;
9773
+ r.copyFragments = X;
9734
9774
  break;
9735
9775
  case "open":
9736
- r.openFragments = J;
9776
+ r.openFragments = X;
9737
9777
  break;
9738
9778
  case "close":
9739
- r.closeFragments = J;
9779
+ r.closeFragments = X;
9740
9780
  break;
9741
9781
  case "error-click":
9742
- r.errorClickFragments = J, r.errorClickAwait = e.hasAttribute(
9743
- `${G}-await`
9782
+ r.errorClickFragments = X, r.errorClickAwait = e.hasAttribute(
9783
+ `${Y}-await`
9744
9784
  );
9745
9785
  break;
9746
9786
  case "error-close":
9747
- r.errorCloseFragments = J;
9787
+ r.errorCloseFragments = X;
9748
9788
  break;
9749
9789
  }
9750
9790
  }), t !== "poll" && (r.errorStatusActions = p.readErrorStatusActions(
@@ -9752,73 +9792,73 @@ ${W}
9752
9792
  r,
9753
9793
  t
9754
9794
  ));
9755
- const oe = p.attrName(t, "copy-source");
9756
- if (e.hasAttribute(oe)) {
9757
- const W = K.read(e, oe);
9795
+ const ce = p.attrName(t, "copy-source");
9796
+ if (e.hasAttribute(ce)) {
9797
+ const W = K.read(e, ce);
9758
9798
  if (W) {
9759
- const G = K.query(W, oe);
9760
- if (G !== null) {
9761
- const J = I.get(G);
9762
- J ? r.copySourceFragment = J : m.error(
9799
+ const Y = K.query(W, ce);
9800
+ if (Y !== null) {
9801
+ const X = D.get(Y);
9802
+ X ? r.copySourceFragment = X : m.error(
9763
9803
  "Haori",
9764
- `Element is not managed by Haori: ${W} (${oe})`
9804
+ `Element is not managed by Haori: ${W} (${ce})`
9765
9805
  );
9766
9806
  } else
9767
9807
  m.error(
9768
9808
  "Haori",
9769
- `Element not found: ${W} (${oe})`
9809
+ `Element not found: ${W} (${ce})`
9770
9810
  );
9771
9811
  } else
9772
9812
  r.copySourceFragment = e;
9773
9813
  }
9774
9814
  }
9775
9815
  if (!t && (e.hasAttribute(p.attrName(null, "data", !0)) && (r.dataAttrName = p.attrName(null, "data", !0)), e.hasAttribute(p.attrName(null, "form", !0)))) {
9776
- const D = K.read(
9816
+ const I = K.read(
9777
9817
  e,
9778
9818
  p.attrName(null, "form", !0)
9779
9819
  );
9780
- if (D) {
9781
- const L = K.query(
9782
- D,
9820
+ if (I) {
9821
+ const $ = K.query(
9822
+ I,
9783
9823
  p.attrName(null, "form", !0)
9784
9824
  );
9785
- L !== null ? r.formFragment = k.getFormFragment(
9786
- I.get(L)
9825
+ $ !== null ? r.formFragment = N.getFormFragment(
9826
+ D.get($)
9787
9827
  ) : m.error(
9788
9828
  "Haori",
9789
- `Form element not found: ${D} (${p.attrName(null, "fetch-form", !0)})`
9829
+ `Form element not found: ${I} (${p.attrName(null, "fetch-form", !0)})`
9790
9830
  );
9791
9831
  } else
9792
- r.formFragment = k.getFormFragment(e);
9832
+ r.formFragment = N.getFormFragment(e);
9793
9833
  }
9794
9834
  (!t || t === "poll") && p.readNoMessageDeclarations(e, r, t ?? "fetch");
9795
- const se = t ? p.attrName(t, "fetch-state") : p.attrName(null, "state", !0);
9796
- if (e.hasAttribute(se)) {
9797
- const D = K.read(e, se), L = [];
9798
- D ? (K.queryAll(D, se).forEach((Q) => {
9799
- const de = I.get(Q);
9800
- de && L.push(de);
9801
- }), L.length === 0 && m.error(
9835
+ const _ = t ? p.attrName(t, "fetch-state") : p.attrName(null, "state", !0);
9836
+ if (e.hasAttribute(_)) {
9837
+ const I = K.read(e, _), $ = [];
9838
+ I ? (K.queryAll(I, _).forEach((Q) => {
9839
+ const se = D.get(Q);
9840
+ se && $.push(se);
9841
+ }), $.length === 0 && m.error(
9802
9842
  "Haori",
9803
- `Element not found: ${D} (${se})`
9804
- )) : L.push(e), L.length > 0 && (r.fetchStateFragments = L);
9843
+ `Element not found: ${I} (${_})`
9844
+ )) : $.push(e), $.length > 0 && (r.fetchStateFragments = $);
9805
9845
  }
9806
- const Y = t ? p.attrName(t, "store-clear") : p.attrName(null, "store-clear", !0);
9807
- if (e.hasAttribute(Y)) {
9808
- const D = e.getRawAttribute(Y), L = D === null ? "" : D.trim();
9809
- if (L === "")
9846
+ const G = t ? p.attrName(t, "store-clear") : p.attrName(null, "store-clear", !0);
9847
+ if (e.hasAttribute(G)) {
9848
+ const I = e.getRawAttribute(G), $ = I === null ? "" : I.trim();
9849
+ if ($ === "")
9810
9850
  m.error(
9811
9851
  "Haori",
9812
- `ストレージキーが指定されていません (${Y})`
9852
+ `ストレージキーが指定されていません (${G})`
9813
9853
  );
9814
9854
  else {
9815
- r.storeClearKey = L;
9816
- const X = e.getRawAttribute(
9817
- `${Y}-type`
9818
- ), Q = X === null ? "session" : X.trim();
9855
+ r.storeClearKey = $;
9856
+ const Z = e.getRawAttribute(
9857
+ `${G}-type`
9858
+ ), Q = Z === null ? "session" : Z.trim();
9819
9859
  Q === "local" || Q === "session" ? r.storeClearKind = Q : (m.warn(
9820
9860
  "Haori",
9821
- `${Y}-type は session または local を指定してください(session として扱います): ${Q}`
9861
+ `${G}-type は session または local を指定してください(session として扱います): ${Q}`
9822
9862
  ), r.storeClearKind = "session");
9823
9863
  }
9824
9864
  }
@@ -9932,8 +9972,8 @@ ${W}
9932
9972
  return this.skipped = !0, !1;
9933
9973
  if (this.options.formFragment && this.validate(this.options.formFragment) === !1)
9934
9974
  return !1;
9935
- if (!this.options.formFragment && this.options.targetFragment && k.warnUnvalidatedCustomValidity(
9936
- k.getFormFragment(this.options.targetFragment),
9975
+ if (!this.options.formFragment && this.options.targetFragment && N.warnUnvalidatedCustomValidity(
9976
+ N.getFormFragment(this.options.targetFragment),
9937
9977
  `${l.prefix}${this.eventType ?? "fetch"}-form が解決できません`
9938
9978
  ), !this.evaluateExecutionCondition())
9939
9979
  return this.skipped = !0, !1;
@@ -9953,7 +9993,7 @@ ${W}
9953
9993
  return !1;
9954
9994
  this.options.resetBeforeFragments && this.options.resetBeforeFragments.length > 0 && (await Promise.all(
9955
9995
  this.options.resetBeforeFragments.map(
9956
- (g) => k.reset(g, this.operationSequence)
9996
+ (g) => N.reset(g, this.operationSequence)
9957
9997
  )
9958
9998
  ), this.captureHistorySnapshots());
9959
9999
  const r = this.prepareFetchRequest();
@@ -9973,84 +10013,84 @@ ${W}
9973
10013
  }
9974
10014
  const c = Object.keys(i).length > 0;
9975
10015
  if (n) {
9976
- const g = (s?.method || "GET").toUpperCase(), A = !a && o && r.transportMode === "query-get" && Ut(s) && !He(g) ? r.baseUrl ?? n : n, E = Vt(
9977
- A,
10016
+ const g = (s?.method || "GET").toUpperCase(), E = !a && o && r.transportMode === "query-get" && jt(s) && !Ue(g) ? r.baseUrl ?? n : n, A = Kt(
10017
+ E,
9978
10018
  s
9979
10019
  );
9980
- n = E.url;
9981
- const T = { ...E.options }, N = E.normalized ? E.requestedMethod : r.requestedMethod, B = E.effectiveMethod, F = r.transportMode === "query-get" || E.normalized, j = E.queryString ?? r.queryString;
10020
+ n = A.url;
10021
+ const T = { ...A.options }, k = A.normalized ? A.requestedMethod : r.requestedMethod, O = A.effectiveMethod, F = r.transportMode === "query-get" || A.normalized, j = A.queryString ?? r.queryString;
9982
10022
  if (F && m.info("Haori demo fetch normalization", {
9983
10023
  runtime: l.runtime,
9984
- requestedMethod: N,
9985
- effectiveMethod: B,
10024
+ requestedMethod: k,
10025
+ effectiveMethod: O,
9986
10026
  transportMode: "query-get",
9987
10027
  url: n,
9988
10028
  payload: c ? i : void 0,
9989
10029
  queryString: j
9990
10030
  }), this.options.targetFragment && n) {
9991
- const Z = performance.now(), _ = {
10031
+ const J = performance.now(), te = {
9992
10032
  runtime: l.runtime,
9993
- requestedMethod: N,
9994
- effectiveMethod: B,
10033
+ requestedMethod: k,
10034
+ effectiveMethod: O,
9995
10035
  transportMode: F ? "query-get" : "http",
9996
10036
  ...F ? { queryString: j } : {}
9997
10037
  };
9998
- return H.fetchStart(
10038
+ return B.fetchStart(
9999
10039
  this.options.targetFragment.getTarget(),
10000
10040
  n,
10001
10041
  T,
10002
10042
  c ? i : void 0,
10003
- _
10004
- ), await this.injectFetchState("loading"), await p.invokeFetch(n, T).then((P) => this.handleFetchResult(
10005
- P,
10043
+ te
10044
+ ), await this.injectFetchState("loading"), await p.invokeFetch(n, T).then((U) => this.handleFetchResult(
10045
+ U,
10006
10046
  n || void 0,
10007
- Z
10008
- )).catch(async (P) => {
10009
- throw n && H.fetchError(
10047
+ J
10048
+ )).catch(async (U) => {
10049
+ throw n && B.fetchError(
10010
10050
  this.options.targetFragment.getTarget(),
10011
10051
  n,
10012
- P
10052
+ U
10013
10053
  ), await this.injectFetchState(
10014
10054
  "error",
10015
10055
  null,
10016
- P instanceof Error ? P.message : String(P)
10017
- ), await this.runErrorActions(null), P;
10056
+ U instanceof Error ? U.message : String(U)
10057
+ ), await this.runErrorActions(null), U;
10018
10058
  });
10019
10059
  }
10020
- return await fetch(n, T).then((Z) => this.handleFetchResult(Z, n || void 0));
10060
+ return await fetch(n, T).then((J) => this.handleFetchResult(J, n || void 0));
10021
10061
  }
10022
10062
  if ((!this.options.bindFragments || this.options.bindFragments.length === 0) && this.options.formFragment && c) {
10023
- const g = this.options.formFragment, y = g.getTarget(), A = /* @__PURE__ */ new Set();
10024
- e && e.appliedDisabledAttribute && this.options.targetFragment && A.add(this.options.targetFragment);
10025
- const E = g.getRawBindingData(), T = Ue(i), N = g.getAttribute(`${l.prefix}form-arg`);
10026
- let B;
10027
- if (N) {
10028
- B = { ...E ?? {} };
10029
- const F = String(N), j = k.resolveAncestorArgOwner(g, F);
10030
- B[F] = k.mergeCollectedValues(
10031
- (j ? j.value : B[F]) ?? null,
10063
+ const g = this.options.formFragment, y = g.getTarget(), E = /* @__PURE__ */ new Set();
10064
+ e && e.appliedDisabledAttribute && this.options.targetFragment && E.add(this.options.targetFragment);
10065
+ const A = g.getRawBindingData(), T = Ve(i), k = g.getAttribute(`${l.prefix}form-arg`);
10066
+ let O;
10067
+ if (k) {
10068
+ O = { ...A ?? {} };
10069
+ const F = String(k), j = N.resolveAncestorArgOwner(g, F);
10070
+ O[F] = N.mergeCollectedValues(
10071
+ (j ? j.value : O[F]) ?? null,
10032
10072
  T
10033
10073
  );
10034
10074
  } else
10035
- B = k.mergeCollectedValues(
10036
- E,
10075
+ O = N.mergeCollectedValues(
10076
+ A,
10037
10077
  T,
10038
- k.ancestorBaseResolver(g)
10078
+ N.ancestorBaseResolver(g)
10039
10079
  );
10040
- await $.setBindingData(y, B, {
10041
- skipFragments: A,
10080
+ await C.setBindingData(y, O, {
10081
+ skipFragments: E,
10042
10082
  kind: "nonSupply",
10043
10083
  sequence: this.operationSequence,
10044
- editedPaths: k.collectEditedPaths(
10084
+ editedPaths: N.collectEditedPaths(
10045
10085
  g,
10046
10086
  this.operationSequence,
10047
- N ? String(N) : "",
10087
+ k ? String(k) : "",
10048
10088
  T
10049
10089
  )
10050
10090
  });
10051
10091
  }
10052
10092
  this.suppressEmptyReplaceBind = !c && !this.options.formFragment && (this.eventType === "change" || this.eventType === "input"), this.twoWayCommitBind = this.eventType === "change" || this.eventType === "input";
10053
- const u = c ? Ue(i) : {}, d = new Response(JSON.stringify(u), {
10093
+ const u = c ? Ve(i) : {}, d = new Response(JSON.stringify(u), {
10054
10094
  headers: { "Content-Type": "application/json" }
10055
10095
  });
10056
10096
  return await this.handleFetchResult(d);
@@ -10067,10 +10107,10 @@ ${W}
10067
10107
  if (this.eventType !== "click" || !this.options.targetFragment)
10068
10108
  return null;
10069
10109
  const e = this.options.targetFragment, t = e.getTarget();
10070
- if (p.RUNNING_CLICK_TARGETS.has(t) || t.matches(":disabled") || t.hasAttribute("disabled") || t.hasAttribute(Oe))
10110
+ if (p.RUNNING_CLICK_TARGETS.has(t) || t.matches(":disabled") || t.hasAttribute("disabled") || t.hasAttribute(Be))
10071
10111
  return !1;
10072
10112
  const r = t.hasAttribute(`${l.prefix}click-no-disabled`);
10073
- return p.RUNNING_CLICK_TARGETS.add(t), t.setAttribute(Oe, ""), r || t.setAttribute("disabled", ""), {
10113
+ return p.RUNNING_CLICK_TARGETS.add(t), t.setAttribute(Be, ""), r || t.setAttribute("disabled", ""), {
10074
10114
  target: t,
10075
10115
  fragment: e,
10076
10116
  appliedDisabledAttribute: !r
@@ -10112,7 +10152,7 @@ ${W}
10112
10152
  if (!e)
10113
10153
  return;
10114
10154
  const t = e.target;
10115
- if (p.RUNNING_CLICK_TARGETS.delete(t), t.removeAttribute(Oe), !e.appliedDisabledAttribute)
10155
+ if (p.RUNNING_CLICK_TARGETS.delete(t), t.removeAttribute(Be), !e.appliedDisabledAttribute)
10116
10156
  return;
10117
10157
  const r = p.findDisabledDeclaration(
10118
10158
  e.fragment
@@ -10121,7 +10161,7 @@ ${W}
10121
10161
  t.removeAttribute("disabled");
10122
10162
  return;
10123
10163
  }
10124
- $.setAttribute(t, r.name, r.value).catch(
10164
+ C.setAttribute(t, r.name, r.value).catch(
10125
10165
  (i) => {
10126
10166
  m.error(
10127
10167
  "Haori",
@@ -10215,7 +10255,7 @@ ${W}
10215
10255
  break;
10216
10256
  await t(s), this.downloadReceivedBytes += s.byteLength, this.dropTotalBytesIfExceeded();
10217
10257
  const a = Date.now();
10218
- a - r >= Pt && (r = a, await this.injectFetchState("loading"));
10258
+ a - r >= Ht && (r = a, await this.injectFetchState("loading"));
10219
10259
  }
10220
10260
  } catch (n) {
10221
10261
  return m.error("Haori", `応答をファイルとして読み取れませんでした: ${n}`), !1;
@@ -10289,7 +10329,7 @@ ${W}
10289
10329
  `保存先のフォルダを確かめられなかったため、今までどおり保存します: ${c}`
10290
10330
  ), "fallback";
10291
10331
  }
10292
- if (s && !await fe().confirm(
10332
+ if (s && !await pe().confirm(
10293
10333
  `${n} は既にあります。上書きしますか?`
10294
10334
  ))
10295
10335
  return "cancelled";
@@ -10375,8 +10415,8 @@ ${W}
10375
10415
  * @returns 表示の完了 Promise
10376
10416
  */
10377
10417
  async showDownloadFailure(e) {
10378
- const t = this.options.formFragment ?? (this.options.targetFragment ? k.getFormFragment(this.options.targetFragment) || this.options.targetFragment : null), r = t ? t.getTarget() : document.body, i = fe();
10379
- await i.clearMessages(r), e && await i.addErrorMessage(r, Je);
10418
+ const t = this.options.formFragment ?? (this.options.targetFragment ? N.getFormFragment(this.options.targetFragment) || this.options.targetFragment : null), r = t ? t.getTarget() : document.body, i = pe();
10419
+ await i.clearMessages(r), e && await i.addErrorMessage(r, Qe);
10380
10420
  }
10381
10421
  /**
10382
10422
  * 保存するファイル名を決めます。
@@ -10459,23 +10499,23 @@ ${W}
10459
10499
  * フェッチ後の処理を実行します。
10460
10500
  */
10461
10501
  async handleFetchResult(e, t, r) {
10462
- const i = fe();
10502
+ const i = pe();
10463
10503
  if (!e.ok) {
10464
- if (gt(e.status))
10504
+ if (yt(e.status))
10465
10505
  return !1;
10466
- this.options.targetFragment && t && H.fetchError(
10506
+ this.options.targetFragment && t && B.fetchError(
10467
10507
  this.options.targetFragment.getTarget(),
10468
10508
  t,
10469
10509
  new Error(`${e.status} ${e.statusText}`),
10470
10510
  e.status,
10471
10511
  r
10472
10512
  );
10473
- const A = this.selectErrorActions(e.status), E = A?.bind === !0, T = await this.handleFetchError(
10474
- E ? e.clone() : e,
10475
- A?.noMessage !== !0 && !E
10513
+ const E = this.selectErrorActions(e.status), A = E?.bind === !0, T = await this.handleFetchError(
10514
+ A ? e.clone() : e,
10515
+ E?.noMessage !== !0 && !A
10476
10516
  );
10477
- return E && await this.bindResult(e).catch((N) => {
10478
- m.error("Haori", "Failed to bind the error response:", N);
10517
+ return A && await this.bindResult(e).catch((k) => {
10518
+ m.error("Haori", "Failed to bind the error response:", k);
10479
10519
  }), await this.injectFetchState(
10480
10520
  "error",
10481
10521
  e.status,
@@ -10483,53 +10523,53 @@ ${W}
10483
10523
  T
10484
10524
  ), await this.runErrorActions(e.status), !1;
10485
10525
  }
10486
- if (this.options.targetFragment && t && r && H.fetchEnd(
10526
+ if (this.options.targetFragment && t && r && B.fetchEnd(
10487
10527
  this.options.targetFragment.getTarget(),
10488
10528
  t,
10489
10529
  e.status,
10490
10530
  r
10491
10531
  ), this.options.afterCallback) {
10492
- const A = this.options.afterCallback(e);
10493
- if (A != null) {
10494
- if (A === !1 || typeof A == "object" && A.stop)
10532
+ const E = this.options.afterCallback(e);
10533
+ if (E != null) {
10534
+ if (E === !1 || typeof E == "object" && E.stop)
10495
10535
  return !1;
10496
- typeof A == "object" && "response" in A && (e = "response" in A ? A.response : e);
10536
+ typeof E == "object" && "response" in E && (e = "response" in E ? E.response : e);
10497
10537
  }
10498
10538
  }
10499
10539
  if (this.options.download) {
10500
- const A = await this.saveResponseAsFile(e, t);
10501
- if (A === "cancelled")
10540
+ const E = await this.saveResponseAsFile(e, t);
10541
+ if (E === "cancelled")
10502
10542
  return await this.injectFetchState("success", e.status, null), !1;
10503
- if (A === "failed") {
10504
- const E = this.selectErrorActions(null);
10505
- return await this.showDownloadFailure(E?.noMessage !== !0), await this.injectFetchState(
10543
+ if (E === "failed") {
10544
+ const A = this.selectErrorActions(null);
10545
+ return await this.showDownloadFailure(A?.noMessage !== !0), await this.injectFetchState(
10506
10546
  "error",
10507
10547
  e.status,
10508
- Je
10548
+ Qe
10509
10549
  ), await this.runErrorActions(null), !1;
10510
10550
  }
10511
10551
  }
10512
10552
  const n = [];
10513
10553
  n.push(this.bindResult(e)), n.push(this.adjust()), n.push(this.addRow()), n.push(this.removeRow()), n.push(this.movePrevRow()), n.push(this.moveNextRow()), await Promise.all(n), await this.injectFetchState("success", e.status, null), this.options.resetFragments && this.options.resetFragments.length > 0 && await Promise.all(
10514
10554
  this.options.resetFragments.map(
10515
- (A) => k.reset(A, this.operationSequence)
10555
+ (E) => N.reset(E, this.operationSequence)
10516
10556
  )
10517
10557
  ), await this.copy();
10518
10558
  const s = [];
10519
- this.options.refetchFragments && this.options.refetchFragments.length > 0 && this.options.refetchFragments.forEach((A) => {
10520
- s.push(new p(A, null).run());
10559
+ this.options.refetchFragments && this.options.refetchFragments.length > 0 && this.options.refetchFragments.forEach((E) => {
10560
+ s.push(new p(E, null).run());
10521
10561
  });
10522
10562
  const a = await this.clickTargets(
10523
10563
  this.options.clickFragments,
10524
10564
  this.options.clickAwait === !0,
10525
10565
  "click-await"
10526
10566
  );
10527
- if (!a && this.options.openFragments && this.options.openFragments.length > 0 && this.options.openFragments.forEach((A) => {
10528
- const E = A.getTarget();
10529
- E instanceof HTMLElement ? s.push(i.openDialog(E)) : m.error("Haori", "Element is not an HTML element: ", E);
10530
- }), !a && this.options.closeFragments && this.options.closeFragments.length > 0 && this.options.closeFragments.forEach((A) => {
10531
- const E = A.getTarget();
10532
- E instanceof HTMLElement ? s.push(i.closeDialog(E)) : m.error("Haori", "Element is not an HTML element: ", E);
10567
+ if (!a && this.options.openFragments && this.options.openFragments.length > 0 && this.options.openFragments.forEach((E) => {
10568
+ const A = E.getTarget();
10569
+ A instanceof HTMLElement ? s.push(i.openDialog(A)) : m.error("Haori", "Element is not an HTML element: ", A);
10570
+ }), !a && this.options.closeFragments && this.options.closeFragments.length > 0 && this.options.closeFragments.forEach((E) => {
10571
+ const A = E.getTarget();
10572
+ A instanceof HTMLElement ? s.push(i.closeDialog(A)) : m.error("Haori", "Element is not an HTML element: ", A);
10533
10573
  }), await Promise.all(s), a)
10534
10574
  return !1;
10535
10575
  const o = p.unescapeNewlines(
@@ -10542,10 +10582,10 @@ ${W}
10542
10582
  this.resolveLateAttribute("toast", this.options.toastMessage)
10543
10583
  );
10544
10584
  if (c) {
10545
- const A = p.toToastLevel(
10585
+ const E = p.toToastLevel(
10546
10586
  this.resolveLateAttribute("toast-level", this.options.toastLevel)
10547
10587
  );
10548
- await i.toast(c, A ?? "info");
10588
+ await i.toast(c, E ?? "info");
10549
10589
  }
10550
10590
  this.clearStore(), this.pushHistory();
10551
10591
  const u = this.resolveLateAttribute(
@@ -10570,22 +10610,22 @@ ${W}
10570
10610
  );
10571
10611
  const y = g || d;
10572
10612
  if (y) {
10573
- let A = y;
10574
- const E = this.resolveLateAttribute(
10613
+ let E = y;
10614
+ const A = this.resolveLateAttribute(
10575
10615
  "redirect-return-param",
10576
10616
  this.options.redirectReturnParam
10577
10617
  );
10578
- if (E) {
10579
- const N = new URLSearchParams(window.location.search).get(E);
10580
- if (N !== null) {
10581
- const B = N.trim();
10582
- mt.isSafeLocalPath(B) ? A = B : m.warn(
10618
+ if (A) {
10619
+ const k = new URLSearchParams(window.location.search).get(A);
10620
+ if (k !== null) {
10621
+ const O = k.trim();
10622
+ bt.isSafeLocalPath(O) ? E = O : m.warn(
10583
10623
  "Haori",
10584
- `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${N}`
10624
+ `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${k}`
10585
10625
  );
10586
10626
  }
10587
10627
  }
10588
- g ? window.location.replace(A) : window.location.href = A;
10628
+ g ? window.location.replace(E) : window.location.href = E;
10589
10629
  }
10590
10630
  return !0;
10591
10631
  }
@@ -10615,7 +10655,7 @@ ${W}
10615
10655
  if (!e || e.length === 0)
10616
10656
  return !1;
10617
10657
  for (const i of e) {
10618
- await $.evaluateAll(i);
10658
+ await C.evaluateAll(i);
10619
10659
  const n = i.getTarget();
10620
10660
  if (t && p.takeClickOutcome(n), typeof n.click == "function" ? n.click() : n.dispatchEvent(
10621
10661
  new MouseEvent("click", { bubbles: !0, cancelable: !0 })
@@ -10651,7 +10691,7 @@ ${W}
10651
10691
  `${t.key}-click-await`
10652
10692
  ))
10653
10693
  return;
10654
- const i = fe(), n = [];
10694
+ const i = pe(), n = [];
10655
10695
  t.closeFragments?.forEach((a) => {
10656
10696
  const o = a.getTarget();
10657
10697
  o instanceof HTMLElement ? n.push(i.closeDialog(o)) : m.error("Haori", "Element is not an HTML element: ", o);
@@ -10749,10 +10789,10 @@ ${W}
10749
10789
  g != null && (Array.isArray(g) ? (o.searchParams.delete(d), g.forEach((y) => o.searchParams.append(d, String(y)))) : typeof g == "object" ? o.searchParams.set(d, JSON.stringify(g)) : o.searchParams.set(d, String(g)));
10750
10790
  };
10751
10791
  n && c(r), s && c(i), history.pushState(
10752
- { [Ct]: !0 },
10792
+ { [Bt]: !0 },
10753
10793
  "",
10754
10794
  o.toString()
10755
- ), $.refreshUrlParams();
10795
+ ), C.refreshUrlParams();
10756
10796
  } catch (a) {
10757
10797
  m.error("Haori", `history.pushState failed: ${a}`);
10758
10798
  }
@@ -10769,12 +10809,12 @@ ${W}
10769
10809
  */
10770
10810
  async handleFetchError(e, t) {
10771
10811
  let r = null;
10772
- this.options.formFragment ? r = this.options.formFragment : this.options.targetFragment && (r = k.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
10812
+ this.options.formFragment ? r = this.options.formFragment : this.options.targetFragment && (r = N.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
10773
10813
  const i = r ? r.getTarget() : document.body;
10774
- await fe().clearMessages(i);
10814
+ await pe().clearMessages(i);
10775
10815
  const n = async (u) => {
10776
10816
  const d = r ? r.getTarget() : document.body;
10777
- await fe().addErrorMessage(d, u);
10817
+ await pe().addErrorMessage(d, u);
10778
10818
  }, s = () => {
10779
10819
  if (!this.options.scrollOnError)
10780
10820
  return;
@@ -10784,7 +10824,7 @@ ${W}
10784
10824
  if (t) {
10785
10825
  u.length === 0 && await n(`${e.status} ${e.statusText}`);
10786
10826
  for (const d of u)
10787
- d.key && r ? await k.addErrorMessage(r, d.key, d.message) : await n(d.message);
10827
+ d.key && r ? await N.addErrorMessage(r, d.key, d.message) : await n(d.message);
10788
10828
  s();
10789
10829
  }
10790
10830
  return u.length === 0 ? null : u.map((d) => d.message).join(`
@@ -10795,22 +10835,22 @@ ${W}
10795
10835
  const u = await e.json(), d = [];
10796
10836
  if (Array.isArray(u)) {
10797
10837
  const g = /* @__PURE__ */ new Map(), y = [];
10798
- for (const A of u)
10799
- if (A && typeof A == "object" && !Array.isArray(A)) {
10800
- const E = A.key, T = A.message, N = typeof E == "string" && E.length > 0 ? E : null, B = typeof T == "string" ? T : T != null ? String(T) : "";
10801
- if (B.length === 0)
10838
+ for (const E of u)
10839
+ if (E && typeof E == "object" && !Array.isArray(E)) {
10840
+ const A = E.key, T = E.message, k = typeof A == "string" && A.length > 0 ? A : null, O = typeof T == "string" ? T : T != null ? String(T) : "";
10841
+ if (O.length === 0)
10802
10842
  continue;
10803
- if (N !== null) {
10804
- const F = g.get(N) ?? [];
10805
- F.push(B), g.set(N, F);
10843
+ if (k !== null) {
10844
+ const F = g.get(k) ?? [];
10845
+ F.push(O), g.set(k, F);
10806
10846
  } else
10807
- y.push(B);
10808
- } else typeof A == "string" && A.length > 0 && y.push(A);
10809
- for (const [A, E] of g)
10810
- d.push({ key: A, message: E.join(`
10847
+ y.push(O);
10848
+ } else typeof E == "string" && E.length > 0 && y.push(E);
10849
+ for (const [E, A] of g)
10850
+ d.push({ key: E, message: A.join(`
10811
10851
  `) });
10812
- for (const A of y)
10813
- d.push({ message: A });
10852
+ for (const E of y)
10853
+ d.push({ message: E });
10814
10854
  } else if (u && typeof u == "object") {
10815
10855
  if (typeof u.message == "string" && d.push({ message: u.message }), Array.isArray(u.messages))
10816
10856
  for (const g of u.messages)
@@ -10843,11 +10883,11 @@ ${W}
10843
10883
  */
10844
10884
  validate(e) {
10845
10885
  if (this.options.valid !== !0)
10846
- return k.warnUnvalidatedCustomValidity(
10886
+ return N.warnUnvalidatedCustomValidity(
10847
10887
  e,
10848
10888
  `${l.prefix}${this.eventType ?? "fetch"}-validate の指定がありません`
10849
10889
  ), !0;
10850
- k.applyCustomValidity(e);
10890
+ N.applyCustomValidity(e);
10851
10891
  const t = this.findFirstInvalid(e);
10852
10892
  if (t === null)
10853
10893
  return !0;
@@ -10938,10 +10978,10 @@ ${W}
10938
10978
  const r = this.options.targetFragment;
10939
10979
  if (!r)
10940
10980
  return !0;
10941
- const i = this.options.conditionAttributeName ?? `${l.prefix}if`, n = k.buildConditionScope(
10981
+ const i = this.options.conditionAttributeName ?? `${l.prefix}if`, n = N.buildConditionScope(
10942
10982
  r,
10943
10983
  this.options.formFragment ?? null
10944
- ), s = ie.evaluateDetailed(t, n);
10984
+ ), s = ne.evaluateDetailed(t, n);
10945
10985
  return s.unresolvedReference ? (e || m.warn(
10946
10986
  "Haori",
10947
10987
  `${i} の参照が解決できないため実行しません: ${t}`
@@ -10986,7 +11026,7 @@ ${W}
10986
11026
  */
10987
11027
  confirm() {
10988
11028
  const e = this.options.confirmMessage;
10989
- return e == null ? Promise.resolve(!0) : fe().confirm(e);
11029
+ return e == null ? Promise.resolve(!0) : pe().confirm(e);
10990
11030
  }
10991
11031
  /**
10992
11032
  * 結果データを対象のフラグメントにバインドします。
@@ -11003,7 +11043,7 @@ ${W}
11003
11043
  let i = t ? JSON.parse(r) : r;
11004
11044
  if (this.options.bindTransform)
11005
11045
  try {
11006
- i = ie.evaluate(this.options.bindTransform, {
11046
+ i = ne.evaluate(this.options.bindTransform, {
11007
11047
  response: i
11008
11048
  });
11009
11049
  } catch (o) {
@@ -11036,17 +11076,17 @@ ${W}
11036
11076
  attributeName: s,
11037
11077
  syncWhenUnchanged: "reflect",
11038
11078
  apply: (y) => {
11039
- const A = this.resolveCurrentRowItem(o, y), E = { ...A };
11079
+ const E = this.resolveCurrentRowItem(o, y), A = { ...E };
11040
11080
  if (i && typeof i == "object" && !Array.isArray(i)) {
11041
- const T = A[g], N = T !== null && typeof T == "object" && !Array.isArray(T) ? T : {};
11042
- E[g] = this.mergeAppendBindingData(
11081
+ const T = E[g], k = T !== null && typeof T == "object" && !Array.isArray(T) ? T : {};
11082
+ A[g] = this.mergeAppendBindingData(
11043
11083
  o,
11044
11084
  i,
11045
- N
11085
+ k
11046
11086
  );
11047
11087
  } else
11048
- E[g] = i;
11049
- return this.reconcileRowUserEdits(o, E);
11088
+ A[g] = i;
11089
+ return this.reconcileRowUserEdits(o, A);
11050
11090
  }
11051
11091
  });
11052
11092
  return;
@@ -11062,7 +11102,7 @@ ${W}
11062
11102
  } else
11063
11103
  u[d] = i;
11064
11104
  n.push(
11065
- $.setBindingData(
11105
+ C.setBindingData(
11066
11106
  o.getTarget(),
11067
11107
  this.reconcileUserEditsForBind(o, u, [d]),
11068
11108
  {
@@ -11105,12 +11145,12 @@ ${W}
11105
11145
  attributeName: s,
11106
11146
  syncWhenUnchanged: "reflect",
11107
11147
  apply: (g) => {
11108
- const y = this.options.bindMerge ? this.resolveCurrentRowItem(o, g) : g, A = this.mergeAppendBindingData(
11148
+ const y = this.options.bindMerge ? this.resolveCurrentRowItem(o, g) : g, E = this.mergeAppendBindingData(
11109
11149
  o,
11110
11150
  i,
11111
11151
  y
11112
- ), E = this.options.bindMerge ? { ...y, ...A } : A;
11113
- return this.reconcileRowUserEdits(o, E);
11152
+ ), A = this.options.bindMerge ? { ...y, ...E } : E;
11153
+ return this.reconcileRowUserEdits(o, A);
11114
11154
  }
11115
11155
  });
11116
11156
  return;
@@ -11120,7 +11160,7 @@ ${W}
11120
11160
  i
11121
11161
  ), d = this.options.bindMerge ? { ...o.getRawBindingData() ?? {}, ...u } : u;
11122
11162
  n.push(
11123
- $.setBindingData(
11163
+ C.setBindingData(
11124
11164
  o.getTarget(),
11125
11165
  this.reconcileUserEditsForBind(
11126
11166
  o,
@@ -11139,7 +11179,7 @@ ${W}
11139
11179
  return n.push(this.applyRowWrites(a)), Promise.all(n).then(() => {
11140
11180
  const o = this.options.bindArg ?? null;
11141
11181
  this.options.bindFragments.forEach((c) => {
11142
- H.bindComplete(c.getTarget(), o);
11182
+ B.bindComplete(c.getTarget(), o);
11143
11183
  });
11144
11184
  });
11145
11185
  });
@@ -11182,14 +11222,14 @@ ${W}
11182
11222
  if (i === null)
11183
11223
  return t;
11184
11224
  const n = this.eventType === "poll";
11185
- if (!n && !this.twoWayCommitBind && $.clearUserEditMarks(e, i), !(e.getTarget() instanceof HTMLFormElement))
11225
+ if (!n && !this.twoWayCommitBind && C.clearUserEditMarks(e, i), !(e.getTarget() instanceof HTMLFormElement))
11186
11226
  return this.reconcileAncestorArgFormEdits(
11187
11227
  e,
11188
11228
  t,
11189
11229
  r,
11190
11230
  n ? 0 : i
11191
11231
  );
11192
- const s = k.getValuesEditedAfter(
11232
+ const s = N.getValuesEditedAfter(
11193
11233
  e,
11194
11234
  n ? 0 : i
11195
11235
  );
@@ -11198,9 +11238,9 @@ ${W}
11198
11238
  const a = e.getAttribute(`${l.prefix}form-arg`);
11199
11239
  if (a) {
11200
11240
  const o = String(a), c = t[o], u = c && typeof c == "object" && !Array.isArray(c) ? c : {};
11201
- return { ...t, [o]: pe(u, s) };
11241
+ return { ...t, [o]: me(u, s) };
11202
11242
  }
11203
- return pe(t, s);
11243
+ return me(t, s);
11204
11244
  }
11205
11245
  /**
11206
11246
  * 編集可能な行へのバインドについて、送信後の編集を要素データへ上書きし直します。
@@ -11222,12 +11262,12 @@ ${W}
11222
11262
  if (r === null)
11223
11263
  return t;
11224
11264
  const i = this.eventType === "poll";
11225
- !i && !this.twoWayCommitBind && $.clearUserEditMarks(e, r);
11226
- const n = k.getValuesEditedAfter(
11265
+ !i && !this.twoWayCommitBind && C.clearUserEditMarks(e, r);
11266
+ const n = N.getValuesEditedAfter(
11227
11267
  e,
11228
11268
  i ? 0 : r
11229
11269
  );
11230
- return Object.keys(n).length === 0 ? t : pe(t, n);
11270
+ return Object.keys(n).length === 0 ? t : me(t, n);
11231
11271
  }
11232
11272
  /**
11233
11273
  * 祖先へのバインドについて、配下の `data-form-arg` フォームで送信後に行われた
@@ -11246,14 +11286,14 @@ ${W}
11246
11286
  */
11247
11287
  reconcileAncestorArgFormEdits(e, t, r, i) {
11248
11288
  let n = t;
11249
- for (const { form: s, key: a } of k.collectArgForms(e)) {
11289
+ for (const { form: s, key: a } of N.collectArgForms(e)) {
11250
11290
  if (!r.includes(a))
11251
11291
  continue;
11252
- const o = k.getValuesEditedAfter(s, i);
11292
+ const o = N.getValuesEditedAfter(s, i);
11253
11293
  if (Object.keys(o).length === 0)
11254
11294
  continue;
11255
11295
  const c = n[a], u = c && typeof c == "object" && !Array.isArray(c) ? c : {};
11256
- n = { ...n, [a]: pe(u, o) };
11296
+ n = { ...n, [a]: me(u, o) };
11257
11297
  }
11258
11298
  return n;
11259
11299
  }
@@ -11296,7 +11336,7 @@ ${W}
11296
11336
  ...t
11297
11337
  };
11298
11338
  n.push(
11299
- $.setBindingData(s.getTarget(), o, {
11339
+ C.setBindingData(s.getTarget(), o, {
11300
11340
  // 通番はコピーを起こした操作のもの(フェッチ応答の反映と同じ理由)。
11301
11341
  sequence: this.operationSequence
11302
11342
  })
@@ -11329,8 +11369,8 @@ ${W}
11329
11369
  * @returns 行の入力欄の状態を反映した要素データ
11330
11370
  */
11331
11371
  resolveCurrentRowItem(e, t) {
11332
- const r = k.getValuesEditedAfter(e, 0);
11333
- return Object.keys(r).length === 0 ? t : pe(t, r);
11372
+ const r = N.getValuesEditedAfter(e, 0);
11373
+ return Object.keys(r).length === 0 ? t : me(t, r);
11334
11374
  }
11335
11375
  /**
11336
11376
  * 行の要素データへコピーの値を反映します。
@@ -11358,9 +11398,9 @@ ${W}
11358
11398
  * @returns コピー元のデータ
11359
11399
  */
11360
11400
  resolveCopySourceData() {
11361
- return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? xe(this.options.copySourceFragment) : $.withoutReservedBindingKeys(
11401
+ return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? Me(this.options.copySourceFragment) : C.withoutReservedBindingKeys(
11362
11402
  this.options.copySourceFragment.getRawBindingData() ?? {}
11363
- ) : this.options.formFragment ? xe(this.options.formFragment) : this.options.targetFragment ? $.withoutReservedBindingKeys(
11403
+ ) : this.options.formFragment ? Me(this.options.formFragment) : this.options.targetFragment ? C.withoutReservedBindingKeys(
11364
11404
  this.options.targetFragment.getRawBindingData() ?? {}
11365
11405
  ) : {};
11366
11406
  }
@@ -11374,8 +11414,8 @@ ${W}
11374
11414
  let t = !1;
11375
11415
  const r = this.options.formFragment ?? this.options.selfValueFragment;
11376
11416
  if (r) {
11377
- const i = k.getValues(r);
11378
- Object.assign(e, i), k.carryCollectedRowIdentity(i, e);
11417
+ const i = N.getValues(r);
11418
+ Object.assign(e, i), N.carryCollectedRowIdentity(i, e);
11379
11419
  }
11380
11420
  if (this.options.data && typeof this.options.data == "object" && Object.assign(e, this.options.data), this.options.targetFragment && this.options.dataAttrName) {
11381
11421
  const i = p.resolveDataAttributeDetailed(
@@ -11425,10 +11465,10 @@ ${W}
11425
11465
  let i = this.options.fetchUrl;
11426
11466
  const n = { ...this.options.fetchOptions || {} }, s = new Headers(
11427
11467
  n.headers || void 0
11428
- ), a = (n.method || "GET").toUpperCase(), o = l.runtime === "demo" && !He(a), c = o ? "GET" : a;
11429
- if (n.method = c, Object.keys(t).length > 0 && Ie(t)) {
11468
+ ), a = (n.method || "GET").toUpperCase(), o = l.runtime === "demo" && !Ue(a), c = o ? "GET" : a;
11469
+ if (n.method = c, Object.keys(t).length > 0 && ke(t)) {
11430
11470
  const d = s.get("Content-Type") || "";
11431
- c !== "GET" && c !== "HEAD" && c !== "OPTIONS" && /multipart\/form-data/i.test(d) ? Wt(t) && m.warn(
11471
+ c !== "GET" && c !== "HEAD" && c !== "OPTIONS" && /multipart\/form-data/i.test(d) ? Gt(t) && m.warn(
11432
11472
  "Haori",
11433
11473
  `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.`
11434
11474
  ) : m.warn(
@@ -11437,21 +11477,21 @@ ${W}
11437
11477
  );
11438
11478
  }
11439
11479
  if (c === "GET" || c === "HEAD" || c === "OPTIONS")
11440
- Object.keys(t).length > 0 && (i = yt(i, t));
11480
+ Object.keys(t).length > 0 && (i = Et(i, t));
11441
11481
  else if (Object.keys(t).length > 0) {
11442
11482
  const d = s.get("Content-Type") || "";
11443
11483
  if (/multipart\/form-data/i.test(d)) {
11444
11484
  s.delete("Content-Type");
11445
11485
  const g = new FormData();
11446
- for (const [y, A] of Object.entries(t))
11447
- A == null ? g.append(y, "") : A instanceof Blob ? g.append(y, A) : Array.isArray(A) ? A.forEach((E) => {
11448
- E instanceof Blob ? g.append(y, E) : g.append(y, be(E));
11449
- }) : g.append(y, be(A));
11486
+ for (const [y, E] of Object.entries(t))
11487
+ E == null ? g.append(y, "") : E instanceof Blob ? g.append(y, E) : Array.isArray(E) ? E.forEach((A) => {
11488
+ A instanceof Blob ? g.append(y, A) : g.append(y, Ae(A));
11489
+ }) : g.append(y, Ae(E));
11450
11490
  n.body = g;
11451
11491
  } else if (/application\/x-www-form-urlencoded/i.test(d)) {
11452
11492
  const g = new URLSearchParams();
11453
- for (const [y, A] of Object.entries(t))
11454
- A !== void 0 && (Array.isArray(A) ? A.forEach((E) => g.append(y, be(E))) : g.append(y, be(A)));
11493
+ for (const [y, E] of Object.entries(t))
11494
+ E !== void 0 && (Array.isArray(E) ? E.forEach((A) => g.append(y, Ae(A))) : g.append(y, Ae(E)));
11455
11495
  n.body = g;
11456
11496
  } else
11457
11497
  s.set("Content-Type", "application/json"), n.body = JSON.stringify(t);
@@ -11468,7 +11508,7 @@ ${W}
11468
11508
  effectiveMethod: c,
11469
11509
  queryString: u,
11470
11510
  transportMode: o ? "query-get" : "http",
11471
- signature: jt(i, n)
11511
+ signature: Yt(i, n)
11472
11512
  };
11473
11513
  }
11474
11514
  /**
@@ -11478,7 +11518,7 @@ ${W}
11478
11518
  this.options.targetFragment && this.options.historyDataAttrName ? this.historyDataSnapshot = p.resolveDataAttribute(
11479
11519
  this.options.targetFragment,
11480
11520
  this.options.historyDataAttrName
11481
- ) : this.historyDataSnapshot = void 0, this.historyFormSnapshot = this.options.historyFormFragment ? xe(this.options.historyFormFragment) : void 0;
11521
+ ) : this.historyDataSnapshot = void 0, this.historyFormSnapshot = this.options.historyFormFragment ? Me(this.options.historyFormFragment) : void 0;
11482
11522
  }
11483
11523
  /**
11484
11524
  * history-data の評価値を取得します。
@@ -11500,7 +11540,7 @@ ${W}
11500
11540
  if (this.historyFormSnapshot !== void 0)
11501
11541
  return this.historyFormSnapshot;
11502
11542
  if (this.options.historyFormFragment)
11503
- return xe(this.options.historyFormFragment);
11543
+ return Me(this.options.historyFormFragment);
11504
11544
  }
11505
11545
  /**
11506
11546
  * copy-params が指定されている場合は include / exclude を考慮して抽出します。
@@ -11577,7 +11617,7 @@ ${W}
11577
11617
  "Haori",
11578
11618
  `Row container not found: ${i} (${r})`
11579
11619
  ), null;
11580
- const a = I.get(s);
11620
+ const a = D.get(s);
11581
11621
  return a instanceof S ? a.hasAttribute(`${l.prefix}each`) ? a : (m.error(
11582
11622
  "Haori",
11583
11623
  `Row container must have ${l.prefix}each: ${i} (${r})`
@@ -11613,7 +11653,7 @@ ${W}
11613
11653
  `Row container has no ${l.prefix}each expression.`
11614
11654
  ), null;
11615
11655
  const i = e.getRawAttribute(`${l.prefix}each-array`), n = i !== null, s = n ? `${l.prefix}each-array` : `${l.prefix}each`, a = n ? i : r, o = a.trim().split(".");
11616
- if (!(o.length > 0 && o.every((E) => /^[A-Za-z_$][\w$]*$/.test(E))))
11656
+ if (!(o.length > 0 && o.every((A) => /^[A-Za-z_$][\w$]*$/.test(A))))
11617
11657
  return t || m.error(
11618
11658
  "Haori",
11619
11659
  `Row operations require a plain identifier path for ${s} (got: ${a}).` + (n ? "" : ` Declare ${l.prefix}each-array to specify the array to write back to.`)
@@ -11631,9 +11671,9 @@ ${W}
11631
11671
  d = u.owner, g = u.ownerData, y = [...u.path, ...o.slice(1)];
11632
11672
  else {
11633
11673
  for (d = e, g = null; d; ) {
11634
- const E = d.getRawBindingData();
11635
- if (E && o[0] in E && !p.isRowScopeKey(d, o[0])) {
11636
- g = E;
11674
+ const A = d.getRawBindingData();
11675
+ if (A && o[0] in A && !p.isRowScopeKey(d, o[0])) {
11676
+ g = A;
11637
11677
  break;
11638
11678
  }
11639
11679
  d = d.getParent();
@@ -11645,8 +11685,8 @@ ${W}
11645
11685
  "Haori",
11646
11686
  `Binding data owner not found for ${s}="${a}".`
11647
11687
  ), null;
11648
- const A = p.readPathValue(g, y);
11649
- return Array.isArray(A) ? { owner: d, ownerData: g, array: A, path: y, mapped: n } : (t || m.error(
11688
+ const E = p.readPathValue(g, y);
11689
+ return Array.isArray(E) ? { owner: d, ownerData: g, array: E, path: y, mapped: n } : (t || m.error(
11650
11690
  "Haori",
11651
11691
  `${s}="${a}" does not resolve to an array.`
11652
11692
  ), null);
@@ -11845,11 +11885,11 @@ ${W}
11845
11885
  );
11846
11886
  continue;
11847
11887
  }
11848
- a[d] = y, o = !0, u.syncWhenUnchanged === "supply" && k.clearRowUserEditMarksForChangedKeys(u.row, y);
11888
+ a[d] = y, o = !0, u.syncWhenUnchanged === "supply" && N.clearRowUserEditMarksForChangedKeys(u.row, y);
11849
11889
  }
11850
11890
  if (!o)
11851
11891
  return;
11852
- const c = $.setBindingData(
11892
+ const c = C.setBindingData(
11853
11893
  s.owner.getTarget(),
11854
11894
  p.withPathValue(s.ownerData, s.path, a),
11855
11895
  {
@@ -11865,7 +11905,7 @@ ${W}
11865
11905
  sequence: this.operationSequence
11866
11906
  }
11867
11907
  );
11868
- if ($.isEachUpdateRunning(n)) {
11908
+ if (C.isEachUpdateRunning(n)) {
11869
11909
  c.catch((u) => {
11870
11910
  m.error("Haori", "Failed to write row data.", u);
11871
11911
  });
@@ -11895,7 +11935,7 @@ ${W}
11895
11935
  * @returns 反映完了の Promise
11896
11936
  */
11897
11937
  static syncUnchangedRowValues(e, t, r) {
11898
- return r === "supply" && k.clearRowUserEditMarksForChangedKeys(e, t), k.syncRowValues(e, t);
11938
+ return r === "supply" && N.clearRowUserEditMarksForChangedKeys(e, t), N.syncRowValues(e, t);
11899
11939
  }
11900
11940
  /**
11901
11941
  * 行の要素データが同じ内容かどうかを判定します。
@@ -11961,7 +12001,7 @@ ${W}
11961
12001
  if (a && o !== null) {
11962
12002
  const c = [];
11963
12003
  r.forEach((g, y) => {
11964
- $.createListKey(
12004
+ C.createListKey(
11965
12005
  g,
11966
12006
  String(a),
11967
12007
  y
@@ -12074,20 +12114,20 @@ ${W}
12074
12114
  return Promise.resolve();
12075
12115
  const g = /* @__PURE__ */ new Map();
12076
12116
  return a.forEach((y) => {
12077
- const A = y.getListKey();
12078
- A !== null && !g.has(String(A)) && g.set(String(A), y);
12079
- }), d.forEach((y, A) => {
12080
- if (p.isSameRowItem(i.array[A], y))
12117
+ const E = y.getListKey();
12118
+ E !== null && !g.has(String(E)) && g.set(String(E), y);
12119
+ }), d.forEach((y, E) => {
12120
+ if (p.isSameRowItem(i.array[E], y))
12081
12121
  return;
12082
- const E = g.get(
12083
- $.createListKey(
12122
+ const A = g.get(
12123
+ C.createListKey(
12084
12124
  y,
12085
12125
  null,
12086
- A
12126
+ E
12087
12127
  )
12088
12128
  );
12089
- E && $.clearUserEditMarks(E);
12090
- }), $.setBindingData(
12129
+ A && C.clearUserEditMarks(A);
12130
+ }), C.setBindingData(
12091
12131
  i.owner.getTarget(),
12092
12132
  p.withPathValue(i.ownerData, i.path, d),
12093
12133
  {
@@ -12132,7 +12172,7 @@ ${W}
12132
12172
  ...a.getRawBindingData() ?? {},
12133
12173
  _fetch: s
12134
12174
  };
12135
- return $.setBindingData(o, c, {
12175
+ return C.setBindingData(o, c, {
12136
12176
  reflectToAttribute: !1,
12137
12177
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
12138
12178
  // 解除しない)。
@@ -12144,8 +12184,8 @@ ${W}
12144
12184
  }
12145
12185
  };
12146
12186
  p.DATA_PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g, p.SINGLE_PLACEHOLDER_REGEX = /^(\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\})$/, p.RUNNING_CLICK_TARGETS = /* @__PURE__ */ new WeakSet(), p.CLICK_OUTCOMES = /* @__PURE__ */ new WeakMap(), p.validationReportGeneration = 0, p.VALIDATION_SCROLL_TIMEOUT_MS = 1e3, p.VALIDATION_SCROLL_STABLE_FRAMES = 2;
12147
- let ae = p;
12148
- class Kt {
12187
+ let oe = p;
12188
+ class Xt {
12149
12189
  /**
12150
12190
  * 指定URLから HTML を取得し、body 内の HTML 文字列を返します。
12151
12191
  *
@@ -12166,7 +12206,7 @@ class Kt {
12166
12206
  throw m.error("[Haori]", "Failed to fetch import source:", e, n), new Error(`Failed to fetch: ${e}`);
12167
12207
  }
12168
12208
  if (!r.ok) {
12169
- gt(r.status);
12209
+ yt(r.status);
12170
12210
  const n = `${r.status} ${r.statusText}`;
12171
12211
  throw m.error("[Haori]", "Import HTTP error:", e, n), new Error(`Failed to load ${e}: ${n}`);
12172
12212
  }
@@ -12235,7 +12275,7 @@ const f = class f {
12235
12275
  * @returns data-attr-* の内部反映なら true
12236
12276
  */
12237
12277
  static isAliasedAttributeReflection(e, t) {
12238
- const r = I.get(e);
12278
+ const r = D.get(e);
12239
12279
  return r instanceof S ? r.hasAttribute(
12240
12280
  `${l.prefix}${f.ATTRIBUTE_ALIAS_SUFFIX}${t}`
12241
12281
  ) : !1;
@@ -12267,7 +12307,7 @@ const f = class f {
12267
12307
  static reevaluateChildren(e) {
12268
12308
  const t = [];
12269
12309
  return e.getChildren().forEach((r) => {
12270
- r instanceof S ? t.push(f.evaluateAll(r)) : r instanceof ne && t.push(f.evaluateText(r));
12310
+ r instanceof S ? t.push(f.evaluateAll(r)) : r instanceof ae && t.push(f.evaluateText(r));
12271
12311
  }), Promise.all(t).then(() => {
12272
12312
  });
12273
12313
  }
@@ -12338,7 +12378,7 @@ const f = class f {
12338
12378
  if (t.has(e) || !e.isInitialized())
12339
12379
  return Promise.resolve();
12340
12380
  const r = [];
12341
- return e.hasAttribute(`${l.prefix}validity`) && k.applyCustomValidity(e), e.hasAttribute(`${l.prefix}fetch`) && r.push(f.executeManagedFetch(e)), e.hasAttribute(`${l.prefix}import`) && r.push(f.executeManagedImport(e)), e.isVisible() ? (e.getChildren().forEach((i) => {
12381
+ 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.isVisible() ? (e.getChildren().forEach((i) => {
12342
12382
  i instanceof S && r.push(
12343
12383
  f.reevaluateReactiveSpecialAttributes(i, t)
12344
12384
  );
@@ -12358,7 +12398,7 @@ const f = class f {
12358
12398
  return Promise.all(f.initialValueRestores).then(() => f.executeManagedFetch(e, !0)).catch((a) => {
12359
12399
  m.error("Haori", `初期表示の取得に失敗しました: ${a}`);
12360
12400
  }), Promise.resolve();
12361
- const i = f.getReactiveFetchState(r), n = ae.resolveAutoFetchSignature(e);
12401
+ const i = f.getReactiveFetchState(r), n = oe.resolveAutoFetchSignature(e);
12362
12402
  if (i.running)
12363
12403
  return (n.hasUnresolvedReference || n.signature !== i.lastSignature) && (i.rerunRequested = !0), Promise.resolve();
12364
12404
  if (n.hasUnresolvedReference || n.signature === null)
@@ -12366,7 +12406,7 @@ const f = class f {
12366
12406
  if (i.lastSignature === n.signature)
12367
12407
  return Promise.resolve();
12368
12408
  i.lastSignature = n.signature, i.running = !0;
12369
- const s = new ae(e, null);
12409
+ const s = new oe(e, null);
12370
12410
  return s.markReentrantBind(), s.runWithResult().then(() => {
12371
12411
  }).finally(() => {
12372
12412
  if (i.running = !1, i.rerunRequested)
@@ -12391,20 +12431,20 @@ const f = class f {
12391
12431
  return Promise.resolve();
12392
12432
  r.lastUrl = n, r.running = !0;
12393
12433
  const s = performance.now();
12394
- return t.setAttribute(`${l.prefix}importing`, ""), H.importStart(t, n), Kt.load(n).then((a) => {
12434
+ return t.setAttribute(`${l.prefix}importing`, ""), B.importStart(t, n), Xt.load(n).then((a) => {
12395
12435
  const o = new TextEncoder().encode(a).length;
12396
12436
  return z.enqueue(() => {
12397
12437
  t.innerHTML = a;
12398
12438
  }).then(() => {
12399
- t.removeAttribute(`${l.prefix}importing`), H.importEnd(t, n, o, s), f.adoptImportedChildren(e);
12439
+ t.removeAttribute(`${l.prefix}importing`), B.importEnd(t, n, o, s), f.adoptImportedChildren(e);
12400
12440
  const c = [];
12401
12441
  return e.getChildren().forEach((u) => {
12402
- u instanceof S ? c.push(f.scan(u.getTarget())) : u instanceof ne && c.push(f.evaluateText(u));
12442
+ u instanceof S ? c.push(f.scan(u.getTarget())) : u instanceof ae && c.push(f.evaluateText(u));
12403
12443
  }), Promise.all(c).then(() => {
12404
12444
  });
12405
12445
  });
12406
12446
  }).catch((a) => {
12407
- t.removeAttribute(`${l.prefix}importing`), H.importError(t, n, a), m.error("[Haori]", "Failed to import HTML:", n, a);
12447
+ t.removeAttribute(`${l.prefix}importing`), B.importError(t, n, a), m.error("[Haori]", "Failed to import HTML:", n, a);
12408
12448
  }).finally(() => {
12409
12449
  if (r.running = !1, r.rerunRequested)
12410
12450
  return r.rerunRequested = !1, f.executeManagedImport(e);
@@ -12427,7 +12467,7 @@ const f = class f {
12427
12467
  e.getChildren().filter((r) => r.getTarget().parentNode !== t).forEach((r) => {
12428
12468
  r.remove(!1);
12429
12469
  }), t.childNodes.forEach((r) => {
12430
- const i = I.get(r);
12470
+ const i = D.get(r);
12431
12471
  i !== null && i.getParent() !== e && e.pushChild(i);
12432
12472
  });
12433
12473
  }
@@ -12452,14 +12492,14 @@ const f = class f {
12452
12492
  * @returns Promise (スキャンが完了したときに解決される)
12453
12493
  */
12454
12494
  static scanElement(e, t) {
12455
- const r = I.get(e);
12495
+ const r = D.get(e);
12456
12496
  if (!r)
12457
12497
  return Promise.resolve();
12458
12498
  const i = f.initializeElementFragment(r, !1).then(
12459
- () => k.restoreInitialValues(e)
12499
+ () => N.restoreInitialValues(e)
12460
12500
  );
12461
12501
  return f.initialValueRestores.add(i), i.then(() => {
12462
- f.initialValueRestores.delete(i), t && te.applySubtree(e);
12502
+ f.initialValueRestores.delete(i), t && re.applySubtree(e);
12463
12503
  });
12464
12504
  }
12465
12505
  /**
@@ -12480,7 +12520,7 @@ const f = class f {
12480
12520
  const r = e.getTarget();
12481
12521
  return S.retryUnappliedValueWrites(r, t).then(
12482
12522
  () => {
12483
- te.applySubtree(r);
12523
+ re.applySubtree(r);
12484
12524
  }
12485
12525
  );
12486
12526
  }
@@ -12493,26 +12533,29 @@ const f = class f {
12493
12533
  */
12494
12534
  static initializeFreshEachRow(e) {
12495
12535
  return f.initializeElementFragment(e, !0).then(() => {
12496
- f.needsScheduledEvaluateAll(e) && f.scheduleEvaluateAll(e), te.applySubtree(e.getTarget());
12536
+ f.needsScheduledEvaluateAll(e) && f.scheduleEvaluateAll(e), re.applySubtree(e.getTarget());
12497
12537
  });
12498
12538
  }
12499
12539
  /**
12500
12540
  * ElementFragment とその子孫を初期化します。
12501
12541
  *
12502
12542
  * @param fragment 対象フラグメント
12503
- * @param stopAtEach true の場合、data-each 要素では通常再帰を止める
12543
+ * @param stopAtEach true の場合、data-each 要素では行へ降りない(固定要素と
12544
+ * コンテナ直下のテキストノードは初期化する)
12504
12545
  * @returns 初期化完了の Promise
12505
12546
  */
12506
12547
  static initializeElementFragment(e, t) {
12507
12548
  return f.syncMountedState(e), t && e.isFreshInitializationSkippable() ? Promise.resolve() : f.initializeElementAttributes(e).then(() => {
12508
- if (f.shouldSkipChildInitialization(e, t)) {
12549
+ if (f.shouldSkipChildInitialization(e)) {
12509
12550
  f.refreshDerivedSubtreeSignature(e);
12510
12551
  return;
12511
12552
  }
12512
- const r = [];
12513
- return e.getChildren().forEach((i) => {
12514
- i instanceof S ? r.push(f.initializeElementFragment(i, t)) : i instanceof ne && r.push(f.evaluateText(i));
12515
- }), Promise.all(r).then(() => {
12553
+ const r = t && e.hasAttribute(`${l.prefix}each`), i = [];
12554
+ return e.getChildren().forEach((n) => {
12555
+ n instanceof S ? (!r || f.isEachFixedChild(n)) && i.push(
12556
+ f.initializeElementFragment(n, t)
12557
+ ) : n instanceof ae && i.push(f.evaluateText(n));
12558
+ }), Promise.all(i).then(() => {
12516
12559
  f.refreshDerivedSubtreeSignature(e);
12517
12560
  });
12518
12561
  });
@@ -12567,18 +12610,21 @@ const f = class f {
12567
12610
  e.getRawAttribute(n)
12568
12611
  ))), r.add(n));
12569
12612
  }
12570
- return t.then(() => (e.markInitialized(), k.prepareFormName(e)));
12613
+ return t.then(() => (e.markInitialized(), N.prepareFormName(e)));
12571
12614
  }
12572
12615
  /**
12573
12616
  * 子孫初期化をスキップすべきかどうかを返します。
12574
12617
  *
12618
+ * 新規行の中の `data-each` コンテナは、ここではスキップしません。行には降りず、
12619
+ * 固定要素とコンテナ直下のテキストノードだけを初期化します
12620
+ * (`initializeElementFragment()`)。
12621
+ *
12575
12622
  * @param fragment 対象フラグメント
12576
- * @param stopAtEach true の場合、data-each 要素で通常再帰を止める
12577
12623
  * @returns 子孫初期化をスキップするなら true
12578
12624
  */
12579
- static shouldSkipChildInitialization(e, t) {
12580
- const r = e.getAttribute(`${l.prefix}if`);
12581
- return e.hasAttribute(`${l.prefix}if`) && f.isHiddenIfCondition(r) ? !0 : t && e.hasAttribute(`${l.prefix}each`);
12625
+ static shouldSkipChildInitialization(e) {
12626
+ const t = e.getAttribute(`${l.prefix}if`);
12627
+ return e.hasAttribute(`${l.prefix}if`) && f.isHiddenIfCondition(t);
12582
12628
  }
12583
12629
  /**
12584
12630
  * エレメントに属性を設定します。
@@ -12594,7 +12640,7 @@ const f = class f {
12594
12640
  * @returns Promise (DOM操作が完了したときに解決される)
12595
12641
  */
12596
12642
  static setAttribute(e, t, r, i = !1, n) {
12597
- const s = I.get(e), a = f.getAliasedAttributeName(t);
12643
+ const s = D.get(e), a = f.getAliasedAttributeName(t);
12598
12644
  if (a !== null)
12599
12645
  return r === null ? s.removeAliasedAttribute(t, a) : s.setAliasedAttribute(
12600
12646
  t,
@@ -12667,24 +12713,24 @@ const f = class f {
12667
12713
  break;
12668
12714
  case `${l.prefix}validity`:
12669
12715
  case `${l.prefix}validity-message`:
12670
- return r !== null && k.applyCustomValidity(s), Promise.all(o).then(() => {
12716
+ return r !== null && N.applyCustomValidity(s), Promise.all(o).then(() => {
12671
12717
  });
12672
12718
  case `${l.prefix}url-param`: {
12673
- const g = s.getAttribute(`${l.prefix}url-arg`), y = mt.readParams();
12719
+ const g = s.getAttribute(`${l.prefix}url-arg`), y = bt.readParams();
12674
12720
  g === null && s.hasAttribute(`${l.prefix}store`) && m.warn(
12675
12721
  "Haori",
12676
12722
  `${l.prefix}url-param を ${l.prefix}url-arg なしで ${l.prefix}store と併用すると復元した値が消えます(${l.prefix}url-arg を指定してください)。`
12677
12723
  );
12678
- const A = {
12724
+ const E = {
12679
12725
  reentrant: !0,
12680
12726
  kind: "nonSupply",
12681
12727
  sequence: S.nextSequence()
12682
12728
  };
12683
12729
  if (g === null)
12684
- o.push(f.setBindingData(e, y, A));
12730
+ o.push(f.setBindingData(e, y, E));
12685
12731
  else {
12686
- const E = s.getRawBindingData() || {};
12687
- E[String(g)] = y, o.push(f.setBindingData(e, E, A));
12732
+ const A = s.getRawBindingData() || {};
12733
+ A[String(g)] = y, o.push(f.setBindingData(e, A, E));
12688
12734
  }
12689
12735
  break;
12690
12736
  }
@@ -12727,7 +12773,7 @@ const f = class f {
12727
12773
  * @returns Promise (DOM操作が完了したときに解決される)
12728
12774
  */
12729
12775
  static setBindingData(e, t, r = {}) {
12730
- const i = I.get(e), n = r.skipFragments ?? /* @__PURE__ */ new Set(), s = r.reentrant ?? !1, a = r.reflectToAttribute ?? !0, o = r.kind ?? "supply", c = r.sequence ?? S.nextOperationSequence(), u = {
12776
+ const i = D.get(e), n = r.skipFragments ?? /* @__PURE__ */ new Set(), s = r.reentrant ?? !1, a = r.reflectToAttribute ?? !0, o = r.kind ?? "supply", c = r.sequence ?? S.nextOperationSequence(), u = {
12731
12777
  sequence: c,
12732
12778
  kind: o,
12733
12779
  ...r.editedPaths === void 0 ? {} : { editedPaths: r.editedPaths }
@@ -12735,39 +12781,39 @@ const f = class f {
12735
12781
  d && i.markSupplyApplied(c);
12736
12782
  const g = S.currentSequence(), y = i.getRawBindingData();
12737
12783
  d && (r.clearUserEdits ?? !0) && f.clearUserEditMarks(i, c);
12738
- const A = a ? f.resolveByPathAuthority(i, y, t, u) : t;
12739
- i.setBindingData(A), a && (H.bindChange(e, y, A, "manual"), Fe.mirror(i));
12740
- const E = () => {
12784
+ const E = a ? f.resolveByPathAuthority(i, y, t, u) : t;
12785
+ i.setBindingData(E), a && (B.bindChange(e, y, E, "manual"), Fe.mirror(i));
12786
+ const A = () => {
12741
12787
  i.markBindingWorkStart();
12742
- const T = i.getRawBindingData() ?? A;
12743
- let N = a ? i.setAttribute(
12788
+ const T = i.getRawBindingData() ?? E;
12789
+ let k = a ? i.setAttribute(
12744
12790
  `${l.prefix}bind`,
12745
12791
  JSON.stringify(f.withoutReservedBindingKeys(T))
12746
12792
  ) : Promise.resolve();
12747
- return e.tagName === "FORM" && (N = N.then(() => {
12793
+ return e.tagName === "FORM" && (k = k.then(() => {
12748
12794
  if (i.wasResetAfter(g))
12749
12795
  return;
12750
- const B = i.getRawBindingData() ?? A;
12751
- return k.syncValues(
12796
+ const O = i.getRawBindingData() ?? E;
12797
+ return N.syncValues(
12752
12798
  i,
12753
- k.resolveSyncValues(i, B),
12799
+ N.resolveSyncValues(i, O),
12754
12800
  !1,
12755
12801
  u
12756
12802
  );
12757
- })), N = N.then(
12758
- () => k.syncAncestorArgForms(i, g, u, y)
12759
- ), N = N.then(() => f.evaluateAll(i, n)), N = N.then(
12803
+ })), k = k.then(
12804
+ () => N.syncAncestorArgForms(i, g, u, y)
12805
+ ), k = k.then(() => f.evaluateAll(i, n)), k = k.then(
12760
12806
  () => S.retryUnappliedValueWrites(e, g)
12761
- ), N = N.then(
12807
+ ), k = k.then(
12762
12808
  () => f.reevaluateReactiveSpecialAttributes(i, n)
12763
- ), N.then(
12809
+ ), k.then(
12764
12810
  () => i.markBindingWorkEnd(),
12765
- (B) => {
12766
- throw i.markBindingWorkEnd(), B;
12811
+ (O) => {
12812
+ throw i.markBindingWorkEnd(), O;
12767
12813
  }
12768
12814
  );
12769
12815
  };
12770
- return s ? E() : i.enqueueBindingWork(E);
12816
+ return s ? A() : i.enqueueBindingWork(A);
12771
12817
  }
12772
12818
  /**
12773
12819
  * 宣言データとして外へ出すデータから予約キーを取り除きます。
@@ -12826,36 +12872,36 @@ const f = class f {
12826
12872
  if (f.isPlainRecord(t) && f.isPlainRecord(r)) {
12827
12873
  const u = t, d = r, g = {};
12828
12874
  let y = Object.keys(u).some(
12829
- (E) => !Object.prototype.hasOwnProperty.call(d, E)
12875
+ (A) => !Object.prototype.hasOwnProperty.call(d, A)
12830
12876
  );
12831
- const A = /* @__PURE__ */ new Set([
12877
+ const E = /* @__PURE__ */ new Set([
12832
12878
  ...Object.keys(u),
12833
12879
  ...Object.keys(d)
12834
12880
  ]);
12835
- for (const E of A) {
12836
- const T = n === "" ? E : `${n}.${E}`, N = f.mergePathAuthority(
12881
+ for (const A of E) {
12882
+ const T = n === "" ? A : `${n}.${A}`, k = f.mergePathAuthority(
12837
12883
  e,
12838
- Object.prototype.hasOwnProperty.call(u, E) ? u[E] : f.ABSENT_PATH,
12839
- Object.prototype.hasOwnProperty.call(d, E) ? d[E] : f.ABSENT_PATH,
12884
+ Object.prototype.hasOwnProperty.call(u, A) ? u[A] : f.ABSENT_PATH,
12885
+ Object.prototype.hasOwnProperty.call(d, A) ? d[A] : f.ABSENT_PATH,
12840
12886
  i,
12841
12887
  T
12842
12888
  );
12843
- N !== f.ABSENT_PATH && (g[E] = N), N !== (Object.prototype.hasOwnProperty.call(d, E) ? d[E] : f.ABSENT_PATH) && (y = !0);
12889
+ k !== f.ABSENT_PATH && (g[A] = k), k !== (Object.prototype.hasOwnProperty.call(d, A) ? d[A] : f.ABSENT_PATH) && (y = !0);
12844
12890
  }
12845
12891
  return y ? g : d;
12846
12892
  }
12847
12893
  const s = f.resolveArrayPairing(e, t, r, n);
12848
12894
  if (s !== null) {
12849
12895
  const u = t, d = r, g = d.map(
12850
- (y, A) => f.mergePathAuthority(
12896
+ (y, E) => f.mergePathAuthority(
12851
12897
  e,
12852
- u[A],
12898
+ u[E],
12853
12899
  y,
12854
12900
  i,
12855
- `${n}[${s[A]}]`
12901
+ `${n}[${s[E]}]`
12856
12902
  )
12857
12903
  );
12858
- return g.some((y, A) => y !== d[A]) ? g : d;
12904
+ return g.some((y, E) => y !== d[E]) ? g : d;
12859
12905
  }
12860
12906
  if (f.isSameBindingValue(t, r))
12861
12907
  return r;
@@ -13009,7 +13055,7 @@ const f = class f {
13009
13055
  * `resolved: true` のときは解決済みスコープ(常にオブジェクト)。
13010
13056
  */
13011
13057
  static getBindingData(e, t = {}) {
13012
- const r = I.get(e);
13058
+ const r = D.get(e);
13013
13059
  return r instanceof S ? t.resolved ? r.getBindingData() : r.getRawBindingData() : null;
13014
13060
  }
13015
13061
  /**
@@ -13042,7 +13088,7 @@ const f = class f {
13042
13088
  * @return 解決済みスコープと各キーの由来情報
13043
13089
  */
13044
13090
  static collectScope(e) {
13045
- const t = I.get(e);
13091
+ const t = D.get(e);
13046
13092
  if (!t)
13047
13093
  return { resolved: {}, sources: {} };
13048
13094
  const r = t.getBindingData(), i = {}, n = (c) => {
@@ -13091,16 +13137,16 @@ const f = class f {
13091
13137
  * @returns 追加したノードの走査(評価)の Promise。走査しない場合は解決済みの Promise
13092
13138
  */
13093
13139
  static addNode(e, t) {
13094
- const r = I.get(e);
13140
+ const r = D.get(e);
13095
13141
  if (r.isSkipMutationNode(t))
13096
13142
  return Promise.resolve();
13097
- const i = I.get(t.nextSibling), n = I.get(t);
13143
+ const i = D.get(t.nextSibling), n = D.get(t);
13098
13144
  if (n) {
13099
13145
  if (n.getParent() === r)
13100
13146
  return Promise.resolve();
13101
13147
  if (r.insertBefore(n, i), n instanceof S)
13102
13148
  return f.scan(n.getTarget());
13103
- if (n instanceof ne)
13149
+ if (n instanceof ae)
13104
13150
  return f.evaluateText(n);
13105
13151
  }
13106
13152
  return Promise.resolve();
@@ -13111,7 +13157,7 @@ const f = class f {
13111
13157
  * @param node 削除するノード
13112
13158
  */
13113
13159
  static removeNode(e) {
13114
- const t = I.get(e);
13160
+ const t = D.get(e);
13115
13161
  if (t) {
13116
13162
  const r = t.getParent();
13117
13163
  if (r && r.isSkipMutationNode(e))
@@ -13126,7 +13172,7 @@ const f = class f {
13126
13172
  * @param text 新しいテキスト
13127
13173
  */
13128
13174
  static changeText(e, t) {
13129
- const r = I.get(e);
13175
+ const r = D.get(e);
13130
13176
  r && r.setContent(t);
13131
13177
  }
13132
13178
  /**
@@ -13138,27 +13184,27 @@ const f = class f {
13138
13184
  * @returns Promise (DOM操作が完了したときに解決される)
13139
13185
  */
13140
13186
  static changeValue(e, t) {
13141
- const r = I.get(e);
13187
+ const r = D.get(e);
13142
13188
  if (r.getValue() === t)
13143
13189
  return Promise.resolve();
13144
13190
  const i = [];
13145
13191
  i.push(r.setValue(t));
13146
13192
  const n = f.getFormFragment(r);
13147
13193
  if (n) {
13148
- const s = k.getValues(n), a = n.getAttribute(`${l.prefix}form-arg`), o = n.getRawBindingData();
13194
+ const s = N.getValues(n), a = n.getAttribute(`${l.prefix}form-arg`), o = n.getRawBindingData();
13149
13195
  let c;
13150
13196
  if (a) {
13151
13197
  c = { ...o ?? {} };
13152
- const u = String(a), d = k.resolveAncestorArgOwner(n, u);
13153
- c[u] = k.mergeCollectedValues(
13198
+ const u = String(a), d = N.resolveAncestorArgOwner(n, u);
13199
+ c[u] = N.mergeCollectedValues(
13154
13200
  (d ? d.value : c[u]) ?? null,
13155
13201
  s
13156
13202
  );
13157
13203
  } else
13158
- c = k.mergeCollectedValues(
13204
+ c = N.mergeCollectedValues(
13159
13205
  o,
13160
13206
  s,
13161
- k.ancestorBaseResolver(n)
13207
+ N.ancestorBaseResolver(n)
13162
13208
  );
13163
13209
  i.push(
13164
13210
  // 値の設定に伴うコミットなので、値の供給ではない更新として扱う(権威を
@@ -13197,29 +13243,29 @@ const f = class f {
13197
13243
  const i = e.hasAttribute(`${l.prefix}derive`), n = e.hasAttribute(`${l.prefix}if`), s = e.hasAttribute(`${l.prefix}each`), a = e.getRawAttribute(`${l.prefix}derive`), o = e.getRawAttribute(`${l.prefix}derive-name`);
13198
13244
  let c = !1, u = !1, d = null;
13199
13245
  if (!i && e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), !i && e.getDeriveInputSignature() !== null && e.setDeriveInputSignature(null), i) {
13200
- const A = f.createDeriveInputSignature(
13246
+ const E = f.createDeriveInputSignature(
13201
13247
  e,
13202
13248
  a,
13203
13249
  o
13204
13250
  );
13205
- A === null ? (e.getDeriveInputSignature() !== null && e.setDeriveInputSignature(null), r = r.then(
13251
+ E === null ? (e.getDeriveInputSignature() !== null && e.setDeriveInputSignature(null), r = r.then(
13206
13252
  () => f.evaluateDerive(e, a, o).then(
13207
13253
  () => {
13208
13254
  }
13209
13255
  )
13210
- )) : e.getDeriveInputSignature() !== A && (r = r.then(() => f.evaluateDerive(
13256
+ )) : e.getDeriveInputSignature() !== E && (r = r.then(() => f.evaluateDerive(
13211
13257
  e,
13212
13258
  a,
13213
13259
  o
13214
13260
  ).then(() => {
13215
- e.setDeriveInputSignature(A);
13261
+ e.setDeriveInputSignature(E);
13216
13262
  })));
13217
13263
  }
13218
13264
  let g = !1, y = 0;
13219
13265
  return n && (r = r.then(() => {
13220
- const A = e.isVisible();
13266
+ const E = e.isVisible();
13221
13267
  return y = S.currentSequence(), f.evaluateIf(e).then(() => {
13222
- g = !A && e.isVisible();
13268
+ g = !E && e.isVisible();
13223
13269
  });
13224
13270
  })), s ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => f.evaluateEachFixedChildren(e)).then(() => f.evaluateEach(e)).then(() => {
13225
13271
  if (g)
@@ -13240,14 +13286,14 @@ const f = class f {
13240
13286
  })), r.then(() => {
13241
13287
  if (c)
13242
13288
  return;
13243
- const A = [];
13244
- return e.getChildren().forEach((E) => {
13245
- if (E instanceof S) {
13246
- if (f.canSkipUnchangedNestedEach(E))
13289
+ const E = [];
13290
+ return e.getChildren().forEach((A) => {
13291
+ if (A instanceof S) {
13292
+ if (f.canSkipUnchangedNestedEach(A))
13247
13293
  return;
13248
- A.push(f.evaluateAll(E, t));
13249
- } else E instanceof ne && A.push(f.evaluateText(E));
13250
- }), Promise.all(A).then(() => {
13294
+ E.push(f.evaluateAll(A, t));
13295
+ } else A instanceof ae && E.push(f.evaluateText(A));
13296
+ }), Promise.all(E).then(() => {
13251
13297
  });
13252
13298
  }).then(() => {
13253
13299
  u && d !== null && e.setDeriveSubtreeSignature(d);
@@ -13269,7 +13315,7 @@ const f = class f {
13269
13315
  const i = e.getRawDerivedBindingData(), n = typeof r == "string" ? r.trim() : "";
13270
13316
  if (!t || n === "")
13271
13317
  return i === null ? Promise.resolve(!1) : (e.setDerivedBindingData(null), Promise.resolve(!0));
13272
- const s = ie.evaluateDetailed(
13318
+ const s = ne.evaluateDetailed(
13273
13319
  t,
13274
13320
  e.getBindingData()
13275
13321
  );
@@ -13316,7 +13362,7 @@ const f = class f {
13316
13362
  const t = e.getRawAttribute(`${l.prefix}if`);
13317
13363
  if (typeof t != "string" || t.indexOf("{{") >= 0)
13318
13364
  return;
13319
- if (ie.hasCompileFailure(t)) {
13365
+ if (ne.hasCompileFailure(t)) {
13320
13366
  m.warn(
13321
13367
  "[Haori]",
13322
13368
  "data-if is hidden because the expression could not be compiled (see the preceding compile error):",
@@ -13392,7 +13438,7 @@ const f = class f {
13392
13438
  static evaluateEachFixedChildren(e) {
13393
13439
  const t = [];
13394
13440
  return e.getChildren().forEach((r) => {
13395
- r instanceof S ? f.isEachFixedChild(r) && t.push(f.evaluateAll(r)) : r instanceof ne && t.push(f.evaluateText(r));
13441
+ r instanceof S ? f.isEachFixedChild(r) && t.push(f.evaluateAll(r)) : r instanceof ae && t.push(f.evaluateText(r));
13396
13442
  }), Promise.all(t).then(() => {
13397
13443
  });
13398
13444
  }
@@ -13430,7 +13476,7 @@ const f = class f {
13430
13476
  if (f.isHiddenIfCondition(r))
13431
13477
  q.isEnabled() && e.isVisible() && f.logFalsyIfDiagnostics(e), t.push(
13432
13478
  e.hide().then(() => {
13433
- H.hide(e.getTarget());
13479
+ B.hide(e.getTarget());
13434
13480
  })
13435
13481
  );
13436
13482
  else {
@@ -13445,10 +13491,10 @@ const f = class f {
13445
13491
  () => f.reevaluateReactiveSpecialAttributes(o)
13446
13492
  )
13447
13493
  ) : s.push(f.scanElement(o.getTarget(), !1));
13448
- } else o instanceof ne && s.push(f.evaluateText(o));
13494
+ } else o instanceof ae && s.push(f.evaluateText(o));
13449
13495
  }), t.push(
13450
13496
  e.show().then(() => {
13451
- H.show(e.getTarget()), i || (f.triggerLoadOnShow(e), te.refreshSubtree(e.getTarget(), !1));
13497
+ B.show(e.getTarget()), i || (f.triggerLoadOnShow(e), re.refreshSubtree(e.getTarget(), !1));
13452
13498
  })
13453
13499
  ), t.push(
13454
13500
  Promise.all(s).then(() => {
@@ -13471,7 +13517,7 @@ const f = class f {
13471
13517
  */
13472
13518
  static triggerLoadOnShow(e) {
13473
13519
  const t = `${l.prefix}load-`;
13474
- e.getTarget().getAttributeNames().some((i) => i.startsWith(t)) && new ae(e, "load").run().catch((i) => {
13520
+ e.getTarget().getAttributeNames().some((i) => i.startsWith(t)) && new oe(e, "load").run().catch((i) => {
13475
13521
  m.error("[Haori]", "data-load procedure error (on show):", i);
13476
13522
  });
13477
13523
  }
@@ -13499,7 +13545,7 @@ const f = class f {
13499
13545
  * @return 差分更新(再実行を含む)の完了 Promise
13500
13546
  */
13501
13547
  static evaluateEach(e) {
13502
- if (q.isEnabled() && ie.recordRowScopeIdentifiers([
13548
+ if (q.isEnabled() && ne.recordRowScopeIdentifiers([
13503
13549
  f.getRowScopeName(e, "each-arg"),
13504
13550
  f.getRowScopeName(e, "each-index")
13505
13551
  ]), e.isMounted() || f.syncMountedState(e), !e.isVisible() || !e.isMounted())
@@ -13549,7 +13595,7 @@ const f = class f {
13549
13595
  t.rerunRequested = !1, await f.performEachUpdate(e);
13550
13596
  while (t.rerunRequested);
13551
13597
  const i = e.getTarget();
13552
- i.setAttribute(`${l.prefix}each-done`, ""), te.refreshSubtree(i, !1), f.runEachRenderedScript(i);
13598
+ i.setAttribute(`${l.prefix}each-done`, ""), re.refreshSubtree(i, !1), f.runEachRenderedScript(i);
13553
13599
  } finally {
13554
13600
  t.running = !1, t.settled = null;
13555
13601
  }
@@ -13686,10 +13732,10 @@ ${r}
13686
13732
  (c) => !c.hasAttribute(`${l.prefix}each-before`) && !c.hasAttribute(`${l.prefix}each-after`)
13687
13733
  ).forEach((c) => {
13688
13734
  if (!s) {
13689
- const d = I.get(c);
13735
+ const d = D.get(c);
13690
13736
  d instanceof S && (r = d.clone(), f.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0);
13691
13737
  }
13692
- const u = I.get(c);
13738
+ const u = D.get(c);
13693
13739
  u instanceof S && e.getChildren().includes(u) && (e.removeChild(u), u.setMounted(!1)), c.parentNode && c.parentNode.removeChild(c);
13694
13740
  });
13695
13741
  }
@@ -13830,7 +13876,7 @@ ${r}
13830
13876
  if (i instanceof S) {
13831
13877
  if (!f.isRowLocalSubtree(i, r))
13832
13878
  return !1;
13833
- } else if (i instanceof ne) {
13879
+ } else if (i instanceof ae) {
13834
13880
  const n = i.getRawText();
13835
13881
  if (n.includes("{{") && !f.areExpressionsRowLocal(
13836
13882
  f.extractInterpolations(n),
@@ -13854,7 +13900,7 @@ ${r}
13854
13900
  const i = r.trim();
13855
13901
  if (i === "")
13856
13902
  continue;
13857
- const n = ie.getFreeIdentifiers(i);
13903
+ const n = ne.getFreeIdentifiers(i);
13858
13904
  if (n.length === 0 || n.some((s) => !t.has(s)))
13859
13905
  return !1;
13860
13906
  }
@@ -13930,7 +13976,7 @@ ${r}
13930
13976
  const e = `${l.prefix}url-param`, r = Array.from(
13931
13977
  document.querySelectorAll(`[${e}]`)
13932
13978
  ).map((i) => {
13933
- const n = I.peek(i);
13979
+ const n = D.peek(i);
13934
13980
  return n instanceof S ? f.setAttribute(
13935
13981
  i,
13936
13982
  e,
@@ -14103,7 +14149,7 @@ ${r}
14103
14149
  const n = e.getRawAttribute(i);
14104
14150
  return typeof n == "string" && n.includes("{{");
14105
14151
  }) ? !0 : e.getChildren().some(
14106
- (i) => i instanceof ne && i.hasDynamicContent()
14152
+ (i) => i instanceof ae && i.hasDynamicContent()
14107
14153
  );
14108
14154
  }
14109
14155
  /**
@@ -14113,7 +14159,7 @@ ${r}
14113
14159
  * @returns subtree 全体を省略可能なら true
14114
14160
  */
14115
14161
  static markFreshInitializationSkippable(e) {
14116
- const t = e.getAttributeNames().some((n) => f.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof S ? !f.markFreshInitializationSkippable(n) : n instanceof ne ? n.hasDynamicContent() : !1), i = !t && !r;
14162
+ const t = e.getAttributeNames().some((n) => f.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof S ? !f.markFreshInitializationSkippable(n) : n instanceof ae ? n.hasDynamicContent() : !1), i = !t && !r;
14117
14163
  return e.setFreshInitializationSkippable(i), i;
14118
14164
  }
14119
14165
  /**
@@ -14157,100 +14203,100 @@ ${r}
14157
14203
  );
14158
14204
  const g = d.map((F) => F.getListKey()), y = /* @__PURE__ */ new Set();
14159
14205
  d = d.filter((F, j) => {
14160
- const Z = String(F.getListKey()), _ = c.get(Z) ?? 0;
14161
- if (_ === 0) {
14206
+ const J = String(F.getListKey()), te = c.get(J) ?? 0;
14207
+ if (te === 0) {
14162
14208
  y.add(F);
14163
- const P = F.getListKey();
14164
- return P !== null && H.rowRemove(F.getTarget(), P, j), u.push(F.remove()), !1;
14209
+ const U = F.getListKey();
14210
+ return U !== null && B.rowRemove(F.getTarget(), U, j), u.push(F.remove()), !1;
14165
14211
  }
14166
- return c.set(Z, _ - 1), !0;
14212
+ return c.set(J, te - 1), !0;
14167
14213
  });
14168
- const A = d.map((F) => F.getListKey()), E = /* @__PURE__ */ new Map();
14214
+ const E = d.map((F) => F.getListKey()), A = /* @__PURE__ */ new Map();
14169
14215
  d.forEach((F) => {
14170
14216
  const j = F.getListKey();
14171
14217
  if (j === null)
14172
14218
  return;
14173
- const Z = E.get(j);
14174
- Z ? Z.push(F) : E.set(j, [F]);
14219
+ const J = A.get(j);
14220
+ J ? J.push(F) : A.set(j, [F]);
14175
14221
  });
14176
- const T = e.getChildElementFragments().filter((F) => !y.has(F)), N = T.filter(
14222
+ const T = e.getChildElementFragments().filter((F) => !y.has(F)), k = T.filter(
14177
14223
  (F) => F.hasAttribute(`${l.prefix}each-before`)
14178
14224
  ).length;
14179
- let B = Promise.resolve();
14225
+ let O = Promise.resolve();
14180
14226
  return a.forEach((F, j) => {
14181
- const Z = t[j], _ = j;
14182
- let P;
14183
- const se = E.get(F)?.shift();
14184
- if (se) {
14185
- P = se;
14186
- const Y = N + j;
14187
- B = B.then(
14227
+ const J = t[j], te = j;
14228
+ let U;
14229
+ const _ = A.get(F)?.shift();
14230
+ if (_) {
14231
+ U = _;
14232
+ const G = k + j;
14233
+ O = O.then(
14188
14234
  () => f.updateRowFragment(
14189
- P,
14190
- Z,
14235
+ U,
14236
+ J,
14191
14237
  i,
14192
- _,
14238
+ te,
14193
14239
  s ? String(s) : null,
14194
14240
  F
14195
14241
  ).then(
14196
- (D) => (
14242
+ (I) => (
14197
14243
  // 再利用行も新しい並び順の位置へ移動する。移動しないと、配列を並べ替え
14198
14244
  // ただけの更新(data-each-key 指定時はキーが変わらないため全行が再利用
14199
14245
  // される)で DOM の順序が古いまま残る。
14200
14246
  f.repositionEachRow(
14201
14247
  e,
14202
- P,
14248
+ U,
14203
14249
  T,
14204
- Y
14205
- ).then((L) => {
14206
- if (L !== null && H.rowMove(
14207
- P.getTarget(),
14250
+ G
14251
+ ).then(($) => {
14252
+ if ($ !== null && B.rowMove(
14253
+ U.getTarget(),
14208
14254
  F,
14209
- L - N,
14255
+ $ - k,
14210
14256
  j
14211
- ), !(!D && f.isRowLocalEachTemplate(e)))
14212
- return f.evaluateAll(P).then(
14213
- () => f.applyRowFormValues(e, P, Z)
14257
+ ), !(!I && f.isRowLocalEachTemplate(e)))
14258
+ return f.evaluateAll(U).then(
14259
+ () => f.applyRowFormValues(e, U, J)
14214
14260
  );
14215
14261
  })
14216
14262
  )
14217
14263
  )
14218
14264
  );
14219
14265
  } else {
14220
- P = r.clone();
14221
- const Y = N + j;
14222
- B = B.then(
14266
+ U = r.clone();
14267
+ const G = k + j;
14268
+ O = O.then(
14223
14269
  () => f.updateRowFragment(
14224
- P,
14225
- Z,
14270
+ U,
14271
+ J,
14226
14272
  i,
14227
- _,
14273
+ te,
14228
14274
  s ? String(s) : null,
14229
14275
  F
14230
14276
  ).then(() => {
14231
- const D = T[Y] ?? null;
14232
- return e.insertBefore(P, D).then(() => {
14233
- T.splice(Y, 0, P);
14234
- }).then(() => f.initializeFreshEachRow(P)).then(() => f.applyRowFormValues(e, P, Z)).then(() => {
14235
- H.rowAdd(P.getTarget(), F, _, Z);
14277
+ const I = T[G] ?? null;
14278
+ return e.insertBefore(U, I).then(() => {
14279
+ T.splice(G, 0, U);
14280
+ }).then(() => f.initializeFreshEachRow(U)).then(() => f.applyRowFormValues(e, U, J)).then(() => {
14281
+ B.rowAdd(U.getTarget(), F, te, J);
14236
14282
  });
14237
14283
  })
14238
14284
  );
14239
14285
  }
14240
- }), Promise.all(u).then(() => B).then(() => {
14286
+ }), Promise.all(u).then(() => O).then(() => {
14241
14287
  const F = a.filter(
14242
- (Y) => Y !== null
14243
- ), j = A.filter(
14244
- (Y) => Y !== null
14245
- ), Z = new Set(j), _ = F.filter((Y) => !Z.has(Y)), se = g.filter(
14246
- (Y) => Y !== null
14288
+ (G) => G !== null
14289
+ ), j = E.filter(
14290
+ (G) => G !== null
14291
+ ), J = new Set(j), te = F.filter((G) => !J.has(G)), _ = g.filter(
14292
+ (G) => G !== null
14247
14293
  ).filter(
14248
- (Y) => !o.has(Y)
14294
+ (G) => !o.has(G)
14249
14295
  );
14250
- H.eachUpdate(
14296
+ B.eachUpdate(
14251
14297
  e.getTarget(),
14298
+ te,
14252
14299
  _,
14253
- se,
14254
14300
  F
14255
14301
  );
14256
14302
  });
@@ -14354,7 +14400,7 @@ ${r}
14354
14400
  * @returns 反映完了の Promise
14355
14401
  */
14356
14402
  static applyRowFormValues(e, t, r) {
14357
- return !e.hasAttribute(`${l.prefix}form-list`) || !k.isCollectedListFromEachSource(e) || typeof r != "object" || r === null || Array.isArray(r) ? Promise.resolve() : k.syncRowValues(t, r);
14403
+ return !e.hasAttribute(`${l.prefix}form-list`) || !N.isCollectedListFromEachSource(e) || typeof r != "object" || r === null || Array.isArray(r) ? Promise.resolve() : N.syncRowValues(t, r);
14358
14404
  }
14359
14405
  /**
14360
14406
  * リスト比較用のキーを生成します。
@@ -14542,8 +14588,8 @@ f.ATTRIBUTE_ALIAS_SUFFIX = "attr-", f.PRIORITY_ATTRIBUTE_SUFFIXES = [
14542
14588
  "enhance",
14543
14589
  "enhance-new"
14544
14590
  ]), 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");
14545
- let $ = f;
14546
- const we = class we {
14591
+ let C = f;
14592
+ const Re = class Re {
14547
14593
  /**
14548
14594
  * コンストラクタ。
14549
14595
  *
@@ -14551,10 +14597,10 @@ const we = class we {
14551
14597
  */
14552
14598
  constructor(e = document) {
14553
14599
  this.customEventHandlers = /* @__PURE__ */ new Map(), this.builtinListenersAdded = !1, this.deferred = !1, this.deferredProcedures = [], this.onClick = (t) => this.delegate(t, "click"), this.onReset = (t) => {
14554
- if (t.defaultPrevented || k.isResettingInternally())
14600
+ if (t.defaultPrevented || N.isResettingInternally())
14555
14601
  return;
14556
14602
  const r = t.target;
14557
- r instanceof HTMLElement && setTimeout(() => te.refreshSubtree(r), 0);
14603
+ r instanceof HTMLElement && setTimeout(() => re.refreshSubtree(r), 0);
14558
14604
  }, this.onChange = (t) => this.delegate(t, "change"), this.onInput = (t) => this.delegate(t, "input"), this.onLoadCapture = (t) => this.delegate(t, "load"), this.onWindowLoad = () => {
14559
14605
  if (this.deferred) {
14560
14606
  this.deferredProcedures.push(() => this.runWindowLoadProcedure());
@@ -14563,8 +14609,8 @@ const we = class we {
14563
14609
  this.runWindowLoadProcedure();
14564
14610
  }, this.onPopstate = (t) => {
14565
14611
  const r = t.state;
14566
- if (!r || r[we.HISTORY_STATE_KEY] !== !0) {
14567
- $.refreshUrlParams();
14612
+ if (!r || r[Re.HISTORY_STATE_KEY] !== !0) {
14613
+ C.refreshUrlParams();
14568
14614
  return;
14569
14615
  }
14570
14616
  location.reload();
@@ -14576,8 +14622,8 @@ const we = class we {
14576
14622
  * @returns 戻り値はない。
14577
14623
  */
14578
14624
  runWindowLoadProcedure() {
14579
- const e = document.documentElement, t = I.get(e);
14580
- t && new ae(t, "load").run();
14625
+ const e = document.documentElement, t = D.get(e);
14626
+ t && new oe(t, "load").run();
14581
14627
  }
14582
14628
  /**
14583
14629
  * イベントリスナーの登録を開始します。
@@ -14671,7 +14717,7 @@ const we = class we {
14671
14717
  subscribeCustomEvent(e) {
14672
14718
  if (e === null || e === "")
14673
14719
  return;
14674
- if (we.BUILTIN_EVENT_NAMES.has(e)) {
14720
+ if (Re.BUILTIN_EVENT_NAMES.has(e)) {
14675
14721
  m.warn(
14676
14722
  "[Haori]",
14677
14723
  `data-on="${e}" は組み込みイベントです。data-${e}-* を使用してください(data-on はカスタムイベント専用)。`
@@ -14700,8 +14746,8 @@ const we = class we {
14700
14746
  this.root.querySelectorAll(`[${this.onAttributeName}]`).forEach((i) => {
14701
14747
  if (i.getAttribute(this.onAttributeName) !== e)
14702
14748
  return;
14703
- const n = I.get(i);
14704
- n instanceof S && this.isFromTarget(n, t) && new ae(n, "on", t).run().catch((s) => {
14749
+ const n = D.get(i);
14750
+ n instanceof S && this.isFromTarget(n, t) && new oe(n, "on", t).run().catch((s) => {
14705
14751
  m.error("[Haori]", "Procedure execution error:", s);
14706
14752
  });
14707
14753
  });
@@ -14784,16 +14830,16 @@ const we = class we {
14784
14830
  * @returns 戻り値はない。
14785
14831
  */
14786
14832
  runProcedureFor(e, t, r) {
14787
- const i = I.get(e);
14833
+ const i = D.get(e);
14788
14834
  if (!i)
14789
14835
  return;
14790
14836
  (t === "change" || t === "input") && this.syncUserEdit(e, t === "change");
14791
14837
  const n = () => {
14792
- const s = new ae(i, t, r).runWithOutcome().catch((a) => (m.error("[Haori]", "Procedure execution error:", a), "failure"));
14838
+ const s = new oe(i, t, r).runWithOutcome().catch((a) => (m.error("[Haori]", "Procedure execution error:", a), "failure"));
14793
14839
  if (t === "click") {
14794
- ae.recordClickOutcome(e, s);
14840
+ oe.recordClickOutcome(e, s);
14795
14841
  const a = r.target;
14796
- a instanceof HTMLElement && a !== e && ae.recordClickOutcome(a, s);
14842
+ a instanceof HTMLElement && a !== e && oe.recordClickOutcome(a, s);
14797
14843
  }
14798
14844
  };
14799
14845
  if (t === "click" && e.hasAttribute(`${l.prefix}click-defer`)) {
@@ -14844,7 +14890,7 @@ const we = class we {
14844
14890
  * @returns 戻り値はない。
14845
14891
  */
14846
14892
  markUserEditOnly(e) {
14847
- const t = I.get(e);
14893
+ const t = D.get(e);
14848
14894
  t instanceof S && t.markUserEdit();
14849
14895
  }
14850
14896
  /**
@@ -14860,13 +14906,13 @@ const we = class we {
14860
14906
  * @returns 戻り値はない。
14861
14907
  */
14862
14908
  syncUserEdit(e, t) {
14863
- const r = I.get(e);
14909
+ const r = D.get(e);
14864
14910
  if (r instanceof S && (r.syncValue(), t ? r.markUserEditOnChange() : r.markUserEdit(), e instanceof HTMLInputElement && e.type === "radio" && e.name)) {
14865
14911
  const i = document.getElementsByName(e.name);
14866
14912
  for (const n of Array.from(i)) {
14867
14913
  if (n === e || !(n instanceof HTMLInputElement) || n.type !== "radio" || n.form !== e.form)
14868
14914
  continue;
14869
- const s = I.get(n);
14915
+ const s = D.get(n);
14870
14916
  s instanceof S && (s.syncValue(), s.markUserEdit());
14871
14917
  }
14872
14918
  }
@@ -14914,13 +14960,13 @@ const we = class we {
14914
14960
  return null;
14915
14961
  }
14916
14962
  };
14917
- we.HISTORY_STATE_KEY = "__haoriHistoryState__", we.BUILTIN_EVENT_NAMES = /* @__PURE__ */ new Set([
14963
+ Re.HISTORY_STATE_KEY = "__haoriHistoryState__", Re.BUILTIN_EVENT_NAMES = /* @__PURE__ */ new Set([
14918
14964
  "click",
14919
14965
  "change",
14920
14966
  "input",
14921
14967
  "load"
14922
14968
  ]);
14923
- let Ve = we;
14969
+ let qe = Re;
14924
14970
  const V = class V {
14925
14971
  /**
14926
14972
  * ノードが現在の Window に属する HTMLElement かどうかを判定します。
@@ -14959,7 +15005,7 @@ const V = class V {
14959
15005
  * @returns 戻り値はありません。
14960
15006
  */
14961
15007
  static syncElement(e) {
14962
- const t = V.registrations.get(e), r = I.get(e);
15008
+ const t = V.registrations.get(e), r = D.get(e);
14963
15009
  if (!r || !V.shouldObserve(r)) {
14964
15010
  t && (t.observer.disconnect(), V.registrations.delete(e));
14965
15011
  return;
@@ -15020,7 +15066,7 @@ const V = class V {
15020
15066
  static runProcedure(e, t) {
15021
15067
  t.pending = !1, t.running = !0;
15022
15068
  let r = !1;
15023
- new ae(t.fragment, "intersect").runWithResult().then((i) => {
15069
+ new oe(t.fragment, "intersect").runWithResult().then((i) => {
15024
15070
  r = i;
15025
15071
  }).catch((i) => {
15026
15072
  m.error("[Haori]", "Intersect procedure execution error:", i);
@@ -15118,7 +15164,7 @@ V.CONFIG_KEYS = /* @__PURE__ */ new Set([
15118
15164
  "disabled",
15119
15165
  "once"
15120
15166
  ]), V.registrations = /* @__PURE__ */ new Map();
15121
- let Ae = V;
15167
+ let ve = V;
15122
15168
  const v = class v {
15123
15169
  /**
15124
15170
  * 指定ノードとその子孫を走査し、`data-poll-*` の監視状態を同期します。
@@ -15144,7 +15190,7 @@ const v = class v {
15144
15190
  const t = v.registrations.get(e);
15145
15191
  if (!t && !v.hasPollAttribute(e))
15146
15192
  return;
15147
- const r = I.get(e);
15193
+ const r = D.get(e);
15148
15194
  if (!(r instanceof S) || !v.shouldObserve(r)) {
15149
15195
  t && v.teardown(e, t);
15150
15196
  return;
@@ -15307,7 +15353,7 @@ const v = class v {
15307
15353
  t.fetching = !0, t.count += 1;
15308
15354
  let i = !1;
15309
15355
  try {
15310
- i = await new ae(
15356
+ i = await new oe(
15311
15357
  t.fragment,
15312
15358
  "poll"
15313
15359
  ).runWithResult();
@@ -15353,7 +15399,7 @@ const v = class v {
15353
15399
  */
15354
15400
  static async handleTimeout(e) {
15355
15401
  const t = v.registrations.get(e);
15356
- !t || t.stopped || (t.timeoutTimerId = null, t.timedOut = !0, e.isConnected && H.pollTimeout(
15402
+ !t || t.stopped || (t.timeoutTimerId = null, t.timedOut = !0, e.isConnected && B.pollTimeout(
15357
15403
  e,
15358
15404
  t.count,
15359
15405
  v.elapsed(t)
@@ -15373,7 +15419,7 @@ const v = class v {
15373
15419
  v.registrations.delete(e);
15374
15420
  return;
15375
15421
  }
15376
- await v.injectState(t), e.isConnected && H.pollStop(
15422
+ await v.injectState(t), e.isConnected && B.pollStop(
15377
15423
  e,
15378
15424
  r,
15379
15425
  t.count,
@@ -15459,7 +15505,7 @@ const v = class v {
15459
15505
  ...i.getRawBindingData() ?? {},
15460
15506
  _poll: r
15461
15507
  };
15462
- return $.setBindingData(n, s, {
15508
+ return C.setBindingData(n, s, {
15463
15509
  reflectToAttribute: !1,
15464
15510
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
15465
15511
  // 解除しない)。
@@ -15497,7 +15543,7 @@ const v = class v {
15497
15543
  return n.forEach((a) => {
15498
15544
  if (!a.isConnected)
15499
15545
  return;
15500
- const o = I.get(a);
15546
+ const o = D.get(a);
15501
15547
  o instanceof S && s.push(o);
15502
15548
  }), s;
15503
15549
  }
@@ -15645,12 +15691,12 @@ v.CONFIG_KEYS = /* @__PURE__ */ new Set([
15645
15691
  "disabled",
15646
15692
  "state"
15647
15693
  ]), v.DEFAULT_INTERVAL_MS = 5e3, v.MIN_INTERVAL_MS = 100, v.registrations = /* @__PURE__ */ new Map(), v.visibilityListener = null;
15648
- let Ee = v;
15649
- const zt = "0.59.1";
15650
- function Gt(b) {
15694
+ let we = v;
15695
+ const Jt = "0.59.3";
15696
+ function Zt(b) {
15651
15697
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => b()) : Promise.resolve().then(b);
15652
15698
  }
15653
- const O = class O {
15699
+ const L = class L {
15654
15700
  /**
15655
15701
  * ノードが現在の Window に属する HTMLElement かどうかを判定します。
15656
15702
  *
@@ -15669,8 +15715,8 @@ const O = class O {
15669
15715
  * @param root 走査の起点ノード
15670
15716
  */
15671
15717
  static syncTree(e) {
15672
- (e instanceof Element || e instanceof DocumentFragment) && (O.isHtmlElement(e) && O.syncElement(e), e.querySelectorAll("*").forEach((t) => {
15673
- O.syncElement(t);
15718
+ (e instanceof Element || e instanceof DocumentFragment) && (L.isHtmlElement(e) && L.syncElement(e), e.querySelectorAll("*").forEach((t) => {
15719
+ L.syncElement(t);
15674
15720
  }));
15675
15721
  }
15676
15722
  /**
@@ -15680,42 +15726,42 @@ const O = class O {
15680
15726
  * @param element 対象要素
15681
15727
  */
15682
15728
  static syncElement(e) {
15683
- const t = O.registrations.get(e), r = I.get(e);
15684
- if (!(r instanceof S) || !O.shouldObserve(r)) {
15685
- t && (t.observer.disconnect(), O.registrations.delete(e));
15729
+ const t = L.registrations.get(e), r = D.get(e);
15730
+ if (!(r instanceof S) || !L.shouldObserve(r)) {
15731
+ t && (t.observer.disconnect(), L.registrations.delete(e));
15686
15732
  return;
15687
15733
  }
15688
15734
  if (typeof IntersectionObserver > "u")
15689
15735
  return;
15690
- const i = O.resolveVarName(r);
15736
+ const i = L.resolveVarName(r);
15691
15737
  if (i === "") {
15692
- t && (t.observer.disconnect(), O.registrations.delete(e)), m.warn(
15738
+ t && (t.observer.disconnect(), L.registrations.delete(e)), m.warn(
15693
15739
  "[Haori]",
15694
15740
  'data-each-visible requires a variable name (e.g. data-each-visible="visibleRange").'
15695
15741
  );
15696
15742
  return;
15697
15743
  }
15698
- const n = O.resolveRoot(r), s = O.resolveRootMargin(r);
15744
+ const n = L.resolveRoot(r), s = L.resolveRootMargin(r);
15699
15745
  if (t && t.observer.root === n && t.observer.rootMargin === s && t.varName === i) {
15700
- t.fragment = r, O.refreshRows(t);
15746
+ t.fragment = r, L.refreshRows(t);
15701
15747
  return;
15702
15748
  }
15703
- t && (t.observer.disconnect(), O.registrations.delete(e));
15749
+ t && (t.observer.disconnect(), L.registrations.delete(e));
15704
15750
  const a = new IntersectionObserver(
15705
15751
  (c) => {
15706
- const u = O.registrations.get(e);
15752
+ const u = L.registrations.get(e);
15707
15753
  if (!u)
15708
15754
  return;
15709
15755
  let d = !1;
15710
15756
  c.forEach((g) => {
15711
15757
  const y = g.target;
15712
15758
  u.observedRows.has(y) && (g.isIntersecting ? u.visibleRows.has(y) || (u.visibleRows.add(y), d = !0) : u.visibleRows.delete(y) && (d = !0));
15713
- }), d && O.scheduleCompute(u);
15759
+ }), d && L.scheduleCompute(u);
15714
15760
  },
15715
15761
  {
15716
15762
  root: n,
15717
15763
  rootMargin: s,
15718
- threshold: O.THRESHOLD
15764
+ threshold: L.THRESHOLD
15719
15765
  }
15720
15766
  ), o = {
15721
15767
  fragment: r,
@@ -15728,7 +15774,7 @@ const O = class O {
15728
15774
  scheduled: !1,
15729
15775
  lastSnapshot: null
15730
15776
  };
15731
- O.registrations.set(e, o), O.refreshRows(o);
15777
+ L.registrations.set(e, o), L.refreshRows(o);
15732
15778
  }
15733
15779
  /**
15734
15780
  * 指定ノード配下の監視登録を解放します。
@@ -15736,22 +15782,22 @@ const O = class O {
15736
15782
  * @param root 走査の起点ノード
15737
15783
  */
15738
15784
  static cleanupTree(e) {
15739
- if (O.isHtmlElement(e)) {
15740
- const t = O.registrations.get(e);
15741
- t && (t.observer.disconnect(), O.registrations.delete(e));
15785
+ if (L.isHtmlElement(e)) {
15786
+ const t = L.registrations.get(e);
15787
+ t && (t.observer.disconnect(), L.registrations.delete(e));
15742
15788
  }
15743
15789
  (e instanceof Element || e instanceof DocumentFragment) && e.querySelectorAll("*").forEach((t) => {
15744
- const r = O.registrations.get(t);
15745
- r && (r.observer.disconnect(), O.registrations.delete(t));
15790
+ const r = L.registrations.get(t);
15791
+ r && (r.observer.disconnect(), L.registrations.delete(t));
15746
15792
  });
15747
15793
  }
15748
15794
  /**
15749
15795
  * すべての監視登録を解放します。
15750
15796
  */
15751
15797
  static disconnectAll() {
15752
- O.registrations.forEach((e) => {
15798
+ L.registrations.forEach((e) => {
15753
15799
  e.observer.disconnect();
15754
- }), O.registrations.clear();
15800
+ }), L.registrations.clear();
15755
15801
  }
15756
15802
  /**
15757
15803
  * 監視対象(`data-each` かつ `data-each-visible`)かどうかを判定します。
@@ -15786,7 +15832,7 @@ const O = class O {
15786
15832
  if (typeof r != "string" || r.trim() === "")
15787
15833
  return null;
15788
15834
  const i = K.query(r, t, document);
15789
- return O.isHtmlElement(i) ? i : (m.error("[Haori]", `Visible range root element not found: ${r}`), null);
15835
+ return L.isHtmlElement(i) ? i : (m.error("[Haori]", `Visible range root element not found: ${r}`), null);
15790
15836
  }
15791
15837
  /**
15792
15838
  * rootMargin を解決します。
@@ -15796,7 +15842,7 @@ const O = class O {
15796
15842
  */
15797
15843
  static resolveRootMargin(e) {
15798
15844
  const t = `${l.prefix}each-visible-margin`, r = e.getAttribute(t);
15799
- return r === null || r === !1 || r === "" ? O.DEFAULT_ROOT_MARGIN : String(r);
15845
+ return r === null || r === !1 || r === "" ? L.DEFAULT_ROOT_MARGIN : String(r);
15800
15846
  }
15801
15847
  /**
15802
15848
  * コンテナ直下の実際の行要素(`each-before`/`each-after` を除く)を描画順で返します。
@@ -15816,12 +15862,12 @@ const O = class O {
15816
15862
  * @param registration 対象の登録
15817
15863
  */
15818
15864
  static refreshRows(e) {
15819
- const t = O.realRowElements(e.fragment), r = new Set(t);
15865
+ const t = L.realRowElements(e.fragment), r = new Set(t);
15820
15866
  for (const i of [...e.observedRows])
15821
15867
  r.has(i) || (e.observer.unobserve(i), e.observedRows.delete(i), e.visibleRows.delete(i));
15822
15868
  for (const i of t)
15823
15869
  e.observedRows.has(i) || (e.observer.observe(i), e.observedRows.add(i));
15824
- O.scheduleCompute(e);
15870
+ L.scheduleCompute(e);
15825
15871
  }
15826
15872
  /**
15827
15873
  * 次フレームでの集計・公開を予約します(多発する交差イベントを 1 回にまとめる)。
@@ -15829,10 +15875,10 @@ const O = class O {
15829
15875
  * @param registration 対象の登録
15830
15876
  */
15831
15877
  static scheduleCompute(e) {
15832
- e.scheduled || (e.scheduled = !0, Gt(() => {
15878
+ e.scheduled || (e.scheduled = !0, Zt(() => {
15833
15879
  e.scheduled = !1;
15834
15880
  const t = e.fragment.getTarget();
15835
- O.registrations.get(t) === e && O.computeAndPublish(e);
15881
+ L.registrations.get(t) === e && L.computeAndPublish(e);
15836
15882
  }));
15837
15883
  }
15838
15884
  /**
@@ -15841,7 +15887,7 @@ const O = class O {
15841
15887
  * @param registration 対象の登録
15842
15888
  */
15843
15889
  static computeAndPublish(e) {
15844
- const t = O.realRowElements(e.fragment), r = /* @__PURE__ */ new Map();
15890
+ const t = L.realRowElements(e.fragment), r = /* @__PURE__ */ new Map();
15845
15891
  t.forEach((a, o) => r.set(a, o));
15846
15892
  const i = [];
15847
15893
  for (const a of e.visibleRows) {
@@ -15874,7 +15920,7 @@ const O = class O {
15874
15920
  };
15875
15921
  }
15876
15922
  const s = JSON.stringify(n);
15877
- s !== e.lastSnapshot && (e.lastSnapshot = s, O.publish(e, n));
15923
+ s !== e.lastSnapshot && (e.lastSnapshot = s, L.publish(e, n));
15878
15924
  }
15879
15925
  /**
15880
15926
  * 可視範囲スナップショットを最近接の上位 `data-bind` スコープへ公開します。
@@ -15883,7 +15929,7 @@ const O = class O {
15883
15929
  * @param snapshot 公開するスナップショット
15884
15930
  */
15885
15931
  static publish(e, t) {
15886
- const r = O.resolveBindOwner(e.fragment);
15932
+ const r = L.resolveBindOwner(e.fragment);
15887
15933
  if (!r) {
15888
15934
  m.warn(
15889
15935
  "[Haori]",
@@ -15896,7 +15942,7 @@ const O = class O {
15896
15942
  };
15897
15943
  n[e.varName] = { ...t };
15898
15944
  const s = e.fragment.getTarget(), a = i === s ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([e.fragment]);
15899
- $.setBindingData(i, n, {
15945
+ C.setBindingData(i, n, {
15900
15946
  skipFragments: a,
15901
15947
  reflectToAttribute: !1,
15902
15948
  // 可視範囲の公開は値の供給ではない(権威を持たず、ユーザー編集の印も
@@ -15925,33 +15971,33 @@ const O = class O {
15925
15971
  return e.hasAttribute(t) ? e : null;
15926
15972
  }
15927
15973
  };
15928
- O.THRESHOLD = 0, O.DEFAULT_ROOT_MARGIN = "0px", O.registrations = /* @__PURE__ */ new Map();
15929
- let ge = O;
15930
- const U = class U {
15974
+ L.THRESHOLD = 0, L.DEFAULT_ROOT_MARGIN = "0px", L.registrations = /* @__PURE__ */ new Map();
15975
+ let ye = L;
15976
+ const H = class H {
15931
15977
  /**
15932
15978
  * 既存の MutationObserver をすべて停止します。
15933
15979
  */
15934
15980
  static disconnectMutationObservers() {
15935
- U._mutationObservers.forEach((e) => {
15981
+ H._mutationObservers.forEach((e) => {
15936
15982
  e.disconnect();
15937
- }), U._mutationObservers.length = 0;
15983
+ }), H._mutationObservers.length = 0;
15938
15984
  }
15939
15985
  /**
15940
15986
  * 初期化メソッド。
15941
15987
  * ドキュメントのheadとbodyを監視対象として設定します。
15942
15988
  */
15943
15989
  static async init() {
15944
- if (U._initialized)
15990
+ if (H._initialized)
15945
15991
  return;
15946
- U._initialized = !0, U.disconnectMutationObservers(), S.setPendingMutationFlusher(() => {
15947
- U.flushPendingMutations();
15992
+ H._initialized = !0, H.disconnectMutationObservers(), S.setPendingMutationFlusher(() => {
15993
+ H.flushPendingMutations();
15948
15994
  });
15949
- const e = new Ve();
15950
- U._dispatcher = e, e.startDeferred(), U._initialIntakes = [];
15995
+ const e = new qe();
15996
+ H._dispatcher = e, e.startDeferred(), H._initialIntakes = [];
15951
15997
  try {
15952
15998
  const t = await Promise.allSettled([
15953
- $.scan(document.head),
15954
- $.scan(document.body)
15999
+ C.scan(document.head),
16000
+ C.scan(document.body)
15955
16001
  ]), [r, i] = t;
15956
16002
  r.status !== "fulfilled" && m.error(
15957
16003
  "[Haori]",
@@ -15961,11 +16007,11 @@ const U = class U {
15961
16007
  "[Haori]",
15962
16008
  "Failed to build body fragment:",
15963
16009
  i.reason
15964
- ), await U.waitInitialIntakes(), await z.wait(), document.body.setAttribute("data-haori-ready", ""), U.observe(document.head), U.observe(document.body), Ae.syncTree(document.body), Ee.syncTree(document.body), ge.syncTree(document.body);
16010
+ ), await H.waitInitialIntakes(), await z.wait(), document.body.setAttribute("data-haori-ready", ""), H.observe(document.head), H.observe(document.body), ve.syncTree(document.body), we.syncTree(document.body), ye.syncTree(document.body);
15965
16011
  } finally {
15966
- U._initialIntakes = null, e.release();
16012
+ H._initialIntakes = null, e.release();
15967
16013
  }
15968
- H.ready(zt);
16014
+ B.ready(Jt);
15969
16015
  }
15970
16016
  /**
15971
16017
  * 稼働中の EventDispatcher を返します。
@@ -15974,7 +16020,7 @@ const U = class U {
15974
16020
  * @returns 稼働中の EventDispatcher。未初期化の場合は null。
15975
16021
  */
15976
16022
  static getDispatcher() {
15977
- return U._dispatcher;
16023
+ return H._dispatcher;
15978
16024
  }
15979
16025
  /**
15980
16026
  * 初期化の途中で取り込んだ DOM 変更の処理を、すべて待ちます。
@@ -15987,7 +16033,7 @@ const U = class U {
15987
16033
  * @returns 待機完了の Promise
15988
16034
  */
15989
16035
  static async waitInitialIntakes() {
15990
- const e = U._initialIntakes;
16036
+ const e = H._initialIntakes;
15991
16037
  for (; e !== null && e.length > 0; )
15992
16038
  await Promise.allSettled(e.splice(0));
15993
16039
  }
@@ -16007,7 +16053,7 @@ const U = class U {
16007
16053
  * @returns 戻り値はありません。
16008
16054
  */
16009
16055
  static captureMutations(e) {
16010
- if (U._mutationObservers.length > 0) {
16056
+ if (H._mutationObservers.length > 0) {
16011
16057
  e();
16012
16058
  return;
16013
16059
  }
@@ -16022,8 +16068,8 @@ const U = class U {
16022
16068
  try {
16023
16069
  e();
16024
16070
  } finally {
16025
- const r = t.takeRecords().map((i) => U.toCapturedRecord(i));
16026
- t.disconnect(), U.processMutations(r);
16071
+ const r = t.takeRecords().map((i) => H.toCapturedRecord(i));
16072
+ t.disconnect(), H.processMutations(r);
16027
16073
  }
16028
16074
  }
16029
16075
  /**
@@ -16048,7 +16094,7 @@ const U = class U {
16048
16094
  type: e.type,
16049
16095
  target: e.target,
16050
16096
  addedNodes: Array.from(e.addedNodes).filter(
16051
- (t) => !U.hasKnownDescendant(t)
16097
+ (t) => !H.hasKnownDescendant(t)
16052
16098
  ),
16053
16099
  removedNodes: []
16054
16100
  };
@@ -16112,14 +16158,14 @@ const U = class U {
16112
16158
  */
16113
16159
  static observe(e) {
16114
16160
  const t = new MutationObserver((r) => {
16115
- U.processMutations(r);
16161
+ H.processMutations(r);
16116
16162
  });
16117
16163
  t.observe(e, {
16118
16164
  childList: !0,
16119
16165
  subtree: !0,
16120
16166
  attributes: !0,
16121
16167
  characterData: !0
16122
- }), U._mutationObservers.push(t);
16168
+ }), H._mutationObservers.push(t);
16123
16169
  }
16124
16170
  /**
16125
16171
  * 保留中の DOM 変更を同期的に引き取って処理へ載せます。
@@ -16142,15 +16188,15 @@ const U = class U {
16142
16188
  * @returns 戻り値はありません。
16143
16189
  */
16144
16190
  static flushPendingMutations() {
16145
- for (const e of U._mutationObservers) {
16191
+ for (const e of H._mutationObservers) {
16146
16192
  const t = e.takeRecords();
16147
16193
  if (t.length === 0)
16148
16194
  continue;
16149
- const r = t.filter(U.isBindAttributeRecord), i = t.filter(
16150
- (n) => !U.isBindAttributeRecord(n)
16195
+ const r = t.filter(H.isBindAttributeRecord), i = t.filter(
16196
+ (n) => !H.isBindAttributeRecord(n)
16151
16197
  );
16152
- r.length > 0 && U.processMutations(r, S.nextSequence()), i.length > 0 && Promise.resolve().then(() => {
16153
- U.processMutations(i);
16198
+ r.length > 0 && H.processMutations(r, S.nextSequence()), i.length > 0 && Promise.resolve().then(() => {
16199
+ H.processMutations(i);
16154
16200
  });
16155
16201
  }
16156
16202
  }
@@ -16174,42 +16220,42 @@ const U = class U {
16174
16220
  static processMutations(e, t) {
16175
16221
  for (const r of e)
16176
16222
  try {
16177
- if (U.isExternallyManaged(r.target))
16223
+ if (H.isExternallyManaged(r.target))
16178
16224
  continue;
16179
16225
  switch (r.type) {
16180
16226
  case "attributes": {
16181
16227
  const i = r.target;
16182
- if (r.attributeName && i.hasAttribute("data-haori-click-lock") && (r.attributeName === "disabled" || r.attributeName === "data-haori-click-lock") || r.attributeName && i.hasAttribute(he) && (r.attributeName === "disabled" || r.attributeName === he))
16228
+ if (r.attributeName && i.hasAttribute("data-haori-click-lock") && (r.attributeName === "disabled" || r.attributeName === "data-haori-click-lock") || r.attributeName && i.hasAttribute(ge) && (r.attributeName === "disabled" || r.attributeName === ge))
16183
16229
  break;
16184
16230
  if (r.attributeName && (r.attributeName === `${l.prefix}if-false` || r.attributeName === "style" && i.hasAttribute(`${l.prefix}if-false`))) {
16185
16231
  r.attributeName === "style" && S.reassertHiddenDisplay(i);
16186
16232
  break;
16187
16233
  }
16188
- if (r.attributeName && $.isAliasedAttributeReflection(i, r.attributeName))
16234
+ if (r.attributeName && C.isAliasedAttributeReflection(i, r.attributeName))
16189
16235
  break;
16190
- const n = $.setAttribute(
16236
+ const n = C.setAttribute(
16191
16237
  i,
16192
16238
  r.attributeName,
16193
16239
  i.getAttribute(r.attributeName),
16194
16240
  !0,
16195
16241
  t
16196
16242
  );
16197
- U._initialIntakes?.push(n), Ae.syncElement(i), Ee.syncElement(i), ge.syncElement(i);
16243
+ H._initialIntakes?.push(n), ve.syncElement(i), we.syncElement(i), ye.syncElement(i);
16198
16244
  break;
16199
16245
  }
16200
16246
  case "childList": {
16201
16247
  Array.from(r.removedNodes).forEach((i) => {
16202
- U.isStaleExternalRemoval(r, i) || (Ae.cleanupTree(i), Ee.cleanupTree(i), ge.cleanupTree(i), $.removeNode(i));
16248
+ H.isStaleExternalRemoval(r, i) || (ve.cleanupTree(i), we.cleanupTree(i), ye.cleanupTree(i), C.removeNode(i));
16203
16249
  }), Array.from(r.addedNodes).forEach((i) => {
16204
16250
  if (!(i.parentElement instanceof Element))
16205
16251
  return;
16206
- const n = $.addNode(i.parentElement, i);
16207
- U._initialIntakes?.push(n), Ae.syncTree(i), Ee.syncTree(i), ge.syncTree(i);
16208
- }), r.target instanceof Element && ge.syncElement(r.target);
16252
+ const n = C.addNode(i.parentElement, i);
16253
+ H._initialIntakes?.push(n), ve.syncTree(i), we.syncTree(i), ye.syncTree(i);
16254
+ }), r.target instanceof Element && ye.syncElement(r.target);
16209
16255
  break;
16210
16256
  }
16211
16257
  case "characterData": {
16212
- r.target instanceof Text || r.target instanceof Comment ? $.changeText(r.target, r.target.textContent) : m.warn(
16258
+ r.target instanceof Text || r.target instanceof Comment ? C.changeText(r.target, r.target.textContent) : m.warn(
16213
16259
  "[Haori]",
16214
16260
  "Unsupported character data type:",
16215
16261
  r.target
@@ -16225,23 +16271,23 @@ const U = class U {
16225
16271
  }
16226
16272
  }
16227
16273
  };
16228
- U._initialized = !1, U._mutationObservers = [], U._dispatcher = null, U._initialIntakes = null;
16229
- let Ne = U;
16230
- te.setMutationCapture((b) => Ne.captureMutations(b));
16231
- document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", Ne.init) : Ne.init();
16232
- const Yt = () => Se.waitForRenders(), Xt = Se.enhancers;
16274
+ H._initialized = !1, H._mutationObservers = [], H._dispatcher = null, H._initialIntakes = null;
16275
+ let Ie = H;
16276
+ re.setMutationCapture((b) => Ie.captureMutations(b));
16277
+ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", Ie.init) : Ie.init();
16278
+ const Qt = () => Te.waitForRenders(), _t = Te.enhancers;
16233
16279
  export {
16234
- $ as Core,
16235
- te as Enhance,
16280
+ C as Core,
16281
+ re as Enhance,
16236
16282
  l as Env,
16237
- k as Form,
16238
- I as Fragment,
16239
- Se as Haori,
16283
+ N as Form,
16284
+ D as Fragment,
16285
+ Te as Haori,
16240
16286
  m as Log,
16241
16287
  z as Queue,
16242
- Se as default,
16243
- Xt as enhancers,
16244
- zt as version,
16245
- Yt as waitForRenders
16288
+ Te as default,
16289
+ _t as enhancers,
16290
+ Jt as version,
16291
+ Qt as waitForRenders
16246
16292
  };
16247
16293
  //# sourceMappingURL=haori.es.js.map