haori 0.13.2 → 0.14.0

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 K = class K {
1
+ const G = class G {
2
2
  /**
3
3
  * 開発モードの状態を取得します。
4
4
  *
5
5
  * @returns 開発モードならtrue、そうでなければfalse
6
6
  */
7
7
  static isEnabled() {
8
- return K.devMode;
8
+ return G.devMode;
9
9
  }
10
10
  /**
11
11
  * 開発モードを有効化します。
12
12
  */
13
13
  static enable() {
14
- K.devMode = !0;
14
+ G.devMode = !0;
15
15
  }
16
16
  /**
17
17
  * 開発モードを無効化します。
18
18
  */
19
19
  static disable() {
20
- K.devMode = !1;
20
+ G.devMode = !1;
21
21
  }
22
22
  /**
23
23
  * 開発モードを切り替えます。
@@ -25,17 +25,17 @@ const K = class K {
25
25
  * @param enabled trueで有効化、falseで無効化
26
26
  */
27
27
  static set(e) {
28
- K.devMode = e;
28
+ G.devMode = e;
29
29
  }
30
30
  };
31
- K.devMode = !1;
32
- let B = K;
33
- const ne = "embedded";
34
- function de(E) {
35
- return E === "embedded" || E === "demo";
31
+ G.devMode = !1;
32
+ let $ = G;
33
+ const oe = "embedded";
34
+ function pe(m) {
35
+ return m === "embedded" || m === "demo";
36
36
  }
37
- function ve(E) {
38
- return E === null ? null : de(E) ? E : ne;
37
+ function Se(m) {
38
+ return m === null ? null : pe(m) ? m : oe;
39
39
  }
40
40
  const H = class H {
41
41
  /**
@@ -53,7 +53,7 @@ const H = class H {
53
53
  * @return 戻り値はありません。
54
54
  */
55
55
  static setRuntime(e) {
56
- H._runtime = de(e) ? e : ne;
56
+ H._runtime = pe(e) ? e : oe;
57
57
  }
58
58
  /**
59
59
  * 実行環境からプレフィックスと開発モードかどうかを自動検出します。
@@ -67,21 +67,21 @@ const H = class H {
67
67
  if (e instanceof HTMLScriptElement) {
68
68
  const r = e.getAttribute("data-prefix") || H._prefix;
69
69
  H._prefix = r.endsWith("-") ? r : r + "-";
70
- const i = ve(
70
+ const i = Se(
71
71
  e.getAttribute("data-runtime")
72
72
  );
73
73
  i !== null && (H._runtime = i);
74
74
  }
75
75
  if (e instanceof HTMLScriptElement && e.hasAttribute(`${H._prefix}dev`)) {
76
- B.set(!0);
76
+ $.set(!0);
77
77
  return;
78
78
  }
79
79
  const t = window.location.hostname;
80
80
  if (t === "localhost" || t.endsWith(".localhost") || t === "127.0.0.1" || t === "::1" || t.endsWith(".local")) {
81
- B.set(!0);
81
+ $.set(!0);
82
82
  return;
83
83
  }
84
- B.set(!1);
84
+ $.set(!1);
85
85
  } catch {
86
86
  }
87
87
  }
@@ -94,7 +94,7 @@ const H = class H {
94
94
  return H._prefix;
95
95
  }
96
96
  };
97
- H._prefix = "data-", H._runtime = ne;
97
+ H._prefix = "data-", H._runtime = oe;
98
98
  let l = H;
99
99
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", l.detect) : l.detect();
100
100
  class g {
@@ -105,7 +105,7 @@ class g {
105
105
  * @param args 追加の引数
106
106
  */
107
107
  static info(e, ...t) {
108
- B.isEnabled() && console.log && console.log(e, ...t);
108
+ $.isEnabled() && console.log && console.log(e, ...t);
109
109
  }
110
110
  /**
111
111
  * 開発モードでのみコンソールに警告を出力します。
@@ -114,7 +114,7 @@ class g {
114
114
  * @param args 追加の引数
115
115
  */
116
116
  static warn(e, ...t) {
117
- B.isEnabled() && console.warn && console.warn(e, ...t);
117
+ $.isEnabled() && console.warn && console.warn(e, ...t);
118
118
  }
119
119
  /**
120
120
  * モードに関係なくコンソールにエラーを出力します。
@@ -126,41 +126,41 @@ class g {
126
126
  console.error(e, ...t);
127
127
  }
128
128
  }
129
- const ye = "yyyy/MM/dd HH:mm", Ee = "en-US", ce = 1e4;
130
- function W(E) {
131
- return String(E).padStart(2, "0");
129
+ const Te = "yyyy/MM/dd HH:mm", we = "en-US", de = 1e4;
130
+ function V(m) {
131
+ return String(m).padStart(2, "0");
132
132
  }
133
- function fe(E, e = ye) {
134
- if (E == null || E === "")
133
+ function ge(m, e = Te) {
134
+ if (m == null || m === "")
135
135
  return "";
136
- const t = E instanceof Date ? E : new Date(E);
136
+ const t = m instanceof Date ? m : new Date(m);
137
137
  if (Number.isNaN(t.getTime()))
138
138
  return "";
139
139
  const r = {
140
140
  yyyy: String(t.getFullYear()).padStart(4, "0"),
141
- yy: W(t.getFullYear() % 100),
142
- MM: W(t.getMonth() + 1),
141
+ yy: V(t.getFullYear() % 100),
142
+ MM: V(t.getMonth() + 1),
143
143
  M: String(t.getMonth() + 1),
144
- dd: W(t.getDate()),
144
+ dd: V(t.getDate()),
145
145
  d: String(t.getDate()),
146
- HH: W(t.getHours()),
146
+ HH: V(t.getHours()),
147
147
  H: String(t.getHours()),
148
- mm: W(t.getMinutes()),
149
- ss: W(t.getSeconds())
148
+ mm: V(t.getMinutes()),
149
+ ss: V(t.getSeconds())
150
150
  };
151
151
  return e.replace(
152
152
  /'([^']*)'|yyyy|yy|MM|dd|HH|mm|ss|M|d|H/g,
153
153
  (i, s) => s !== void 0 ? s === "" ? "'" : s : r[i]
154
154
  );
155
155
  }
156
- function pe(E, e) {
157
- if (E == null)
156
+ function me(m, e) {
157
+ if (m == null)
158
158
  return "";
159
159
  let t;
160
- if (typeof E == "number")
161
- t = E;
160
+ if (typeof m == "number")
161
+ t = m;
162
162
  else {
163
- const i = String(E).trim();
163
+ const i = String(m).trim();
164
164
  if (i === "")
165
165
  return "";
166
166
  t = Number(i);
@@ -172,24 +172,24 @@ function pe(E, e) {
172
172
  const i = Math.max(0, Math.trunc(e));
173
173
  r.minimumFractionDigits = i, r.maximumFractionDigits = i;
174
174
  }
175
- return new Intl.NumberFormat(Ee, r).format(t);
175
+ return new Intl.NumberFormat(we, r).format(t);
176
176
  }
177
- function ge(E, e, t) {
177
+ function be(m, e, t) {
178
178
  let r, i, s;
179
- if (e === void 0 ? (r = 0, i = E, s = 1) : (r = E, i = e, s = t === void 0 ? 1 : t), !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(s) || s === 0)
179
+ if (e === void 0 ? (r = 0, i = m, s = 1) : (r = m, i = e, s = t === void 0 ? 1 : t), !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(s) || s === 0)
180
180
  return [];
181
181
  r = Math.trunc(r), i = Math.trunc(i), s = Math.trunc(s);
182
182
  const n = [];
183
183
  if (s > 0)
184
- for (let a = r; a < i && n.length < ce; a += s)
184
+ for (let a = r; a < i && n.length < de; a += s)
185
185
  n.push(a);
186
186
  else
187
- for (let a = r; a > i && n.length < ce; a += s)
187
+ for (let a = r; a > i && n.length < de; a += s)
188
188
  n.push(a);
189
189
  return n;
190
190
  }
191
- function me(E, e, t = {}) {
192
- const r = Math.trunc(Number(E));
191
+ function ve(m, e, t = {}) {
192
+ const r = Math.trunc(Number(m));
193
193
  if (!Number.isFinite(r) || r <= 0)
194
194
  return [];
195
195
  const i = Math.min(
@@ -225,7 +225,73 @@ function me(E, e, t = {}) {
225
225
  }
226
226
  return c;
227
227
  }
228
- const Ae = Object.freeze({ date: fe, number: pe, pages: me, range: ge }), I = class I {
228
+ const De = /^(\d{4})-(\d{1,2})$/, Re = 1200;
229
+ function Q(m, e) {
230
+ const t = Number(m);
231
+ return Number.isFinite(t) ? Math.trunc(t) : e;
232
+ }
233
+ function se(m, e) {
234
+ if (typeof m != "string")
235
+ return "";
236
+ const t = De.exec(m.trim());
237
+ if (!t)
238
+ return "";
239
+ const r = Number(t[1]), i = Number(t[2]);
240
+ if (i < 1 || i > 12)
241
+ return "";
242
+ const s = Number.isFinite(e) ? Math.trunc(e) : 0, n = r * 12 + (i - 1) + s, a = Math.floor(n / 12), o = n - a * 12 + 1;
243
+ return `${String(a).padStart(4, "0")}-${V(o)}`;
244
+ }
245
+ function Fe(m) {
246
+ if (typeof m == "string" && m.trim() !== "")
247
+ return se(m, 0);
248
+ const e = /* @__PURE__ */ new Date();
249
+ return `${String(e.getFullYear()).padStart(4, "0")}-${V(e.getMonth() + 1)}`;
250
+ }
251
+ function ye(m, e) {
252
+ const t = Math.trunc(Number(m));
253
+ if (!Number.isFinite(t) || t < 0)
254
+ return [];
255
+ const r = Fe(e);
256
+ if (r === "")
257
+ return [];
258
+ const i = Math.min(t, Re), s = [];
259
+ for (let n = 0; n <= i; n += 1) {
260
+ const a = se(r, -n);
261
+ s.push({ targetMonth: a, label: a.replace(/-/g, "/") });
262
+ }
263
+ return s;
264
+ }
265
+ function Ee(m, e) {
266
+ const t = { start: 0, end: 0, total: 0, empty: !0 };
267
+ if (!m || typeof m != "object")
268
+ return t;
269
+ const r = m, i = Q(
270
+ r.totalElements ?? r.totalCount,
271
+ 0
272
+ );
273
+ if (i <= 0)
274
+ return t;
275
+ const s = Math.max(0, Q(r.number, 0)), n = Math.max(0, Q(r.size, 0)), a = s * n, o = Math.min(a + 1, i);
276
+ let c;
277
+ if (e !== void 0 && Number.isFinite(e))
278
+ c = Math.max(0, Math.trunc(e));
279
+ else {
280
+ const h = Q(r.numberOfElements, NaN);
281
+ c = Number.isFinite(h) ? h : Math.min(n, i - a);
282
+ }
283
+ const d = Math.min(a + c, i);
284
+ return { start: o, end: Math.max(d, o), total: i, empty: !1 };
285
+ }
286
+ const Ne = Object.freeze({
287
+ date: ge,
288
+ number: me,
289
+ pages: ve,
290
+ range: be,
291
+ monthAdd: se,
292
+ monthRange: ye,
293
+ pageSummary: Ee
294
+ }), I = class I {
229
295
  /**
230
296
  * 明示バインド内に持ち込まれてはならない危険値を返します。
231
297
  *
@@ -911,7 +977,7 @@ return (${e});`;
911
977
  }
912
978
  };
913
979
  I.MAX_IDENTIFIER_RECOVERY_COUNT = 8, I.BUILTIN_NAMESPACE = "haori", I.BUILTIN_HELPERS = {
914
- ...Ae
980
+ ...Ne
915
981
  }, I.BUILTIN_REFERENCE_PATTERN = /(^|[^\w$.])haori(?![\w$])/, I.forbiddenBindingValueCache = /* @__PURE__ */ new WeakMap(), I.forbiddenBindingValueCacheResetScheduled = !1, I.FORBIDDEN_NAMES = [
916
982
  // グローバルオブジェクト
917
983
  "window",
@@ -996,7 +1062,7 @@ I.MAX_IDENTIFIER_RECOVERY_COUNT = 8, I.BUILTIN_NAMESPACE = "haori", I.BUILTIN_HE
996
1062
  "yield"
997
1063
  ]), I.EXPRESSION_CACHE = /* @__PURE__ */ new Map();
998
1064
  let J = I;
999
- class oe {
1065
+ class ue {
1000
1066
  constructor() {
1001
1067
  this.MAX_BUDGET = 8, this.queue = [], this.processing = !1;
1002
1068
  }
@@ -1086,7 +1152,7 @@ class oe {
1086
1152
  async waitForIdle(e = 1e3) {
1087
1153
  let t = 0, r = 0;
1088
1154
  for (; t < 2 && r < e; )
1089
- this.processing || this.queue.length > 0 ? (await this.wait(), t = 0) : t += 1, await oe.nextTick(), r += 1;
1155
+ this.processing || this.queue.length > 0 ? (await this.wait(), t = 0) : t += 1, await ue.nextTick(), r += 1;
1090
1156
  }
1091
1157
  /**
1092
1158
  * 次のフレーム(または 1 マクロタスク)まで待機します。
@@ -1099,7 +1165,7 @@ class oe {
1099
1165
  });
1100
1166
  }
1101
1167
  }
1102
- const ue = class ue {
1168
+ const he = class he {
1103
1169
  /**
1104
1170
  * タスクをキューに追加します。
1105
1171
  *
@@ -1126,8 +1192,8 @@ const ue = class ue {
1126
1192
  return this.ASYNC_QUEUE.waitForIdle(e);
1127
1193
  }
1128
1194
  };
1129
- ue.ASYNC_QUEUE = new oe();
1130
- let x = ue;
1195
+ he.ASYNC_QUEUE = new ue();
1196
+ let x = he;
1131
1197
  class X {
1132
1198
  /**
1133
1199
  * 実行モードを取得します。
@@ -1261,7 +1327,7 @@ class X {
1261
1327
  * @returns 整形済み文字列。整形できない場合は空文字
1262
1328
  */
1263
1329
  static date(e, t) {
1264
- return fe(e, t);
1330
+ return ge(e, t);
1265
1331
  }
1266
1332
  /**
1267
1333
  * 数値を桁区切り・小数桁付きの文字列へ整形します。
@@ -1273,7 +1339,7 @@ class X {
1273
1339
  * @returns 整形済み文字列。整形できない場合は空文字
1274
1340
  */
1275
1341
  static number(e, t) {
1276
- return pe(e, t);
1342
+ return me(e, t);
1277
1343
  }
1278
1344
  /**
1279
1345
  * 整数の配列を生成します(終端は排他)。
@@ -1286,7 +1352,7 @@ class X {
1286
1352
  * @returns 整数配列
1287
1353
  */
1288
1354
  static range(e, t, r) {
1289
- return ge(e, t, r);
1355
+ return be(e, t, r);
1290
1356
  }
1291
1357
  /**
1292
1358
  * 番号ページネーション用の表示要素列を生成します。
@@ -1299,13 +1365,49 @@ class X {
1299
1365
  * @returns 表示要素の配列
1300
1366
  */
1301
1367
  static pages(e, t, r) {
1302
- return me(e, t, r);
1368
+ return ve(e, t, r);
1369
+ }
1370
+ /**
1371
+ * `YYYY-MM` 形式の年月文字列に月数を加算します。
1372
+ *
1373
+ * テンプレート式中の `haori.monthAdd(...)` と同じ実装です。
1374
+ *
1375
+ * @param value 基準となる年月(`YYYY-MM` 形式)
1376
+ * @param delta 加算する月数(負数で過去方向)
1377
+ * @returns 加算後の年月(`YYYY-MM` 形式)。不正な入力は空文字
1378
+ */
1379
+ static monthAdd(e, t) {
1380
+ return se(e, t);
1381
+ }
1382
+ /**
1383
+ * 基準月から過去方向へ `count + 1` 個の年月配列を降順で返します。
1384
+ *
1385
+ * テンプレート式中の `haori.monthRange(...)` と同じ実装です。
1386
+ *
1387
+ * @param count 基準月から遡る月数(戻り値の要素数は `count + 1`)
1388
+ * @param base 基準月(`YYYY-MM` 形式、省略時は現在月)
1389
+ * @returns 年月情報の降順配列。不正な入力は空配列
1390
+ */
1391
+ static monthRange(e, t) {
1392
+ return ye(e, t);
1393
+ }
1394
+ /**
1395
+ * ページレスポンスから表示用サマリーを作ります。
1396
+ *
1397
+ * テンプレート式中の `haori.pageSummary(...)` と同じ実装です。
1398
+ *
1399
+ * @param page ページ情報(`number`・`size`・`totalElements`/`totalCount` 等)
1400
+ * @param visibleCount 現在表示している件数(省略可)
1401
+ * @returns 表示サマリー
1402
+ */
1403
+ static pageSummary(e, t) {
1404
+ return Ee(e, t);
1303
1405
  }
1304
1406
  }
1305
- const Se = ["addErrorMessage", "clearMessages"];
1306
- function he() {
1407
+ const Me = ["addErrorMessage", "clearMessages"];
1408
+ function fe() {
1307
1409
  const e = globalThis.window?.Haori;
1308
- return Se.every(
1410
+ return Me.every(
1309
1411
  (r) => typeof e?.[r] == "function"
1310
1412
  ) ? e : X;
1311
1413
  }
@@ -1431,17 +1533,17 @@ class S {
1431
1533
  const h = t[String(c)];
1432
1534
  if (Array.isArray(h)) {
1433
1535
  const p = e.getChildElementFragments();
1434
- for (let v = 0; v < p.length; v++) {
1435
- const T = p[v];
1436
- h.length > v ? n.push(
1536
+ for (let y = 0; y < p.length; y++) {
1537
+ const T = p[y];
1538
+ h.length > y ? n.push(
1437
1539
  S.setPartValues(
1438
1540
  T,
1439
- h[v],
1440
- v,
1541
+ h[y],
1542
+ y,
1441
1543
  i,
1442
1544
  s
1443
1545
  )
1444
- ) : n.push(S.setPartValues(T, {}, v, i, s));
1546
+ ) : n.push(S.setPartValues(T, {}, y, i, s));
1445
1547
  }
1446
1548
  }
1447
1549
  } else
@@ -1517,7 +1619,7 @@ class S {
1517
1619
  * @returns Promise(メッセージのクリアが完了したら解決される)
1518
1620
  */
1519
1621
  static clearMessages(e) {
1520
- return he().clearMessages(
1622
+ return fe().clearMessages(
1521
1623
  e.getTarget()
1522
1624
  );
1523
1625
  }
@@ -1544,7 +1646,7 @@ class S {
1544
1646
  * @return Promise(メッセージの追加が完了したら解決される)
1545
1647
  */
1546
1648
  static addMessage(e, t, r, i) {
1547
- const s = [], n = he(), a = n.addMessage, o = (d) => typeof a == "function" ? a.call(n, d, r, i) : n.addErrorMessage(d, r), c = S.findFragmentsByKey(e, t);
1649
+ const s = [], n = fe(), a = n.addMessage, o = (d) => typeof a == "function" ? a.call(n, d, r, i) : n.addErrorMessage(d, r), c = S.findFragmentsByKey(e, t);
1548
1650
  return c.forEach((d) => {
1549
1651
  s.push(o(d.getTarget()));
1550
1652
  }), c.length === 0 && s.push(o(e.getTarget())), Promise.all(s).then(() => {
@@ -1665,7 +1767,7 @@ const N = class N {
1665
1767
  * @param expressions 今回評価した式一覧
1666
1768
  */
1667
1769
  static record(e, t, r) {
1668
- if (!B.isEnabled() || !e || t.length === 0)
1770
+ if (!$.isEnabled() || !e || t.length === 0)
1669
1771
  return;
1670
1772
  N.ensureGlobalAccess();
1671
1773
  const i = N.getOrCreateElementStore(
@@ -1699,7 +1801,7 @@ const N = class N {
1699
1801
  * globalThis から dev-only の取得窓口を参照できるようにします。
1700
1802
  */
1701
1803
  static ensureGlobalAccess() {
1702
- if (!B.isEnabled())
1804
+ if (!$.isEnabled())
1703
1805
  return;
1704
1806
  const e = globalThis;
1705
1807
  e[N.GLOBAL_KEY] === void 0 && (e[N.GLOBAL_KEY] = {
@@ -1842,21 +1944,21 @@ const N = class N {
1842
1944
  }
1843
1945
  };
1844
1946
  N.GLOBAL_KEY = "__HAORI_EVALUATION_PROFILE__", N.ELEMENT_STORES = /* @__PURE__ */ new Map();
1845
- let Q = N;
1846
- const G = class G {
1947
+ let Z = N;
1948
+ const W = class W {
1847
1949
  /**
1848
1950
  * フラグメントのコンストラクタ。
1849
1951
  *
1850
1952
  * @param target 対象ノード
1851
1953
  */
1852
1954
  constructor(e) {
1853
- this.parent = null, this.mounted = !1, this.skipMutationNodes = !1, this.target = e, G.FRAGMENT_CACHE.set(e, this);
1955
+ this.parent = null, this.mounted = !1, this.skipMutationNodes = !1, this.target = e, W.FRAGMENT_CACHE.set(e, this);
1854
1956
  }
1855
1957
  static get(e) {
1856
1958
  if (e == null)
1857
1959
  return null;
1858
- if (G.FRAGMENT_CACHE.has(e))
1859
- return G.FRAGMENT_CACHE.get(e);
1960
+ if (W.FRAGMENT_CACHE.has(e))
1961
+ return W.FRAGMENT_CACHE.get(e);
1860
1962
  let t;
1861
1963
  switch (e.nodeType) {
1862
1964
  case Node.ELEMENT_NODE:
@@ -1866,7 +1968,7 @@ const G = class G {
1866
1968
  t = new L(e);
1867
1969
  break;
1868
1970
  case Node.COMMENT_NODE:
1869
- t = new le(e);
1971
+ t = new ce(e);
1870
1972
  break;
1871
1973
  default:
1872
1974
  return g.warn("[Haori]", "Unsupported node type:", e.nodeType), null;
@@ -1947,7 +2049,7 @@ const G = class G {
1947
2049
  * @return 除去のPromise
1948
2050
  */
1949
2051
  remove(e = !0) {
1950
- return this.parent && this.parent.removeChild(this), G.FRAGMENT_CACHE.delete(this.target), e ? this.unmount() : Promise.resolve();
2052
+ return this.parent && this.parent.removeChild(this), W.FRAGMENT_CACHE.delete(this.target), e ? this.unmount() : Promise.resolve();
1951
2053
  }
1952
2054
  /**
1953
2055
  * 対象ノードを取得します。
@@ -1974,9 +2076,9 @@ const G = class G {
1974
2076
  this.parent = e;
1975
2077
  }
1976
2078
  };
1977
- G.FRAGMENT_CACHE = /* @__PURE__ */ new WeakMap();
1978
- let w = G;
1979
- const V = class V extends w {
2079
+ W.FRAGMENT_CACHE = /* @__PURE__ */ new WeakMap();
2080
+ let w = W;
2081
+ const j = class j extends w {
1980
2082
  /**
1981
2083
  * エレメントフラグメントのコンストラクタ。
1982
2084
  * アトリビュートや子フラグメントの作成も行います。
@@ -2002,7 +2104,7 @@ const V = class V extends w {
2002
2104
  ], this.children = [], this.attributeMap = /* @__PURE__ */ new Map(), this.bindingData = null, this.derivedBindingData = null, this.bindingDataCache = null, this.descendantBindingDataCache = null, this.visible = !0, this.display = null, this.displayPriority = null, this.template = null, this.listKey = null, this.renderSignature = null, this.eachInputSignature = null, this.deriveSubtreeSignature = null, this.deriveInputSignature = null, this.freshInitializationSkippable = !1, this.value = null, this.skipMutationAttributes = !1, this.skipChangeValue = !1, this.syncValue(), e.getAttributeNames().forEach((t) => {
2003
2105
  const r = e.getAttribute(t);
2004
2106
  if (r !== null && !this.attributeMap.has(t)) {
2005
- const i = new Z(t, r);
2107
+ const i = new _(t, r);
2006
2108
  this.attributeMap.set(t, i);
2007
2109
  }
2008
2110
  }), e.childNodes.forEach((t) => {
@@ -2025,7 +2127,7 @@ const V = class V extends w {
2025
2127
  */
2026
2128
  getChildElementFragments() {
2027
2129
  return this.children.filter(
2028
- (e) => e instanceof V
2130
+ (e) => e instanceof j
2029
2131
  );
2030
2132
  }
2031
2133
  /**
@@ -2057,7 +2159,7 @@ const V = class V extends w {
2057
2159
  * @returns クローンされたフラグメント
2058
2160
  */
2059
2161
  clone() {
2060
- const e = new V(
2162
+ const e = new j(
2061
2163
  this.target.cloneNode(!1)
2062
2164
  );
2063
2165
  return this.attributeMap.forEach((t, r) => {
@@ -2072,7 +2174,7 @@ const V = class V extends w {
2072
2174
  */
2073
2175
  normalizeClonedVisibilityState() {
2074
2176
  (this.visible === !1 || this.getTarget().style.display === "none" || this.getTarget().hasAttribute(`${l.prefix}if-false`)) && (this.visible = !0, this.display = null, this.displayPriority = null, this.getTarget().style.removeProperty("display"), this.getTarget().removeAttribute(`${l.prefix}if-false`)), this.children.forEach((e) => {
2075
- e instanceof V && e.normalizeClonedVisibilityState();
2177
+ e instanceof j && e.normalizeClonedVisibilityState();
2076
2178
  });
2077
2179
  }
2078
2180
  /**
@@ -2160,7 +2262,7 @@ const V = class V extends w {
2160
2262
  */
2161
2263
  clearBindingDataCache() {
2162
2264
  this.bindingDataCache = null, this.descendantBindingDataCache = null, this.children.forEach((e) => {
2163
- e instanceof V && e.clearBindingDataCache();
2265
+ e instanceof j && e.clearBindingDataCache();
2164
2266
  });
2165
2267
  }
2166
2268
  /**
@@ -2441,7 +2543,7 @@ const V = class V extends w {
2441
2543
  return Promise.resolve();
2442
2544
  if (r === null)
2443
2545
  return e === t ? this.removeAttribute(e) : this.removeAliasedAttribute(e, t);
2444
- const n = new Z(e, r);
2546
+ const n = new _(e, r);
2445
2547
  if (s) {
2446
2548
  const U = this.attributeMap.get(e);
2447
2549
  if (U && (U.isEvaluate || U.isForceEvaluation()) && !n.isEvaluate && !n.isForceEvaluation())
@@ -2456,9 +2558,9 @@ const V = class V extends w {
2456
2558
  element: a,
2457
2559
  rawName: e,
2458
2560
  template: r
2459
- }), c = n.isEvaluate || n.isRawEvaluate, d = e === t && V.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), h = n.isSingleExpression(), p = j.joinEvaluateResults(o.results), v = o.results.length === 1 ? o.results[0] : p, T = !n.isForceEvaluation() && (t !== e || d || h ? o.hasUnresolvedReference || v === null || v === void 0 || v === !1 : c && p === ""), b = n.isForceEvaluation() ? r : h ? v : p, y = i && n.isEvaluate && t === "value" && (a instanceof HTMLInputElement && this.INPUT_EVENT_TYPES.includes(a.type) || a instanceof HTMLTextAreaElement || a instanceof HTMLSelectElement), m = T || b === null || b === !1 ? null : String(b), A = e !== t && a.getAttribute(e) !== r, F = m === null ? a.hasAttribute(t) : a.getAttribute(t) !== m, M = y && m !== null && a.value !== m;
2460
- return !A && !F && !M ? (y && m !== null && (this.value = this.normalizeValueForElement(a, m)), Promise.resolve()) : (this.skipMutationAttributes = !0, x.enqueue(() => {
2461
- A && a.setAttribute(e, r), m === null ? a.removeAttribute(t) : (F && a.setAttribute(t, m), y && (this.value = this.normalizeValueForElement(a, m), M && (a.value = m)));
2561
+ }), c = n.isEvaluate || n.isRawEvaluate, d = e === t && j.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), h = n.isSingleExpression(), p = q.joinEvaluateResults(o.results), y = o.results.length === 1 ? o.results[0] : p, T = !n.isForceEvaluation() && (t !== e || d || h ? o.hasUnresolvedReference || y === null || y === void 0 || y === !1 : c && p === ""), v = n.isForceEvaluation() ? r : h ? y : p, E = i && n.isEvaluate && t === "value" && (a instanceof HTMLInputElement && this.INPUT_EVENT_TYPES.includes(a.type) || a instanceof HTMLTextAreaElement || a instanceof HTMLSelectElement), b = T || v === null || v === !1 ? null : String(v), A = e !== t && a.getAttribute(e) !== r, F = b === null ? a.hasAttribute(t) : a.getAttribute(t) !== b, M = E && b !== null && a.value !== b;
2562
+ return !A && !F && !M ? (E && b !== null && (this.value = this.normalizeValueForElement(a, b)), Promise.resolve()) : (this.skipMutationAttributes = !0, x.enqueue(() => {
2563
+ A && a.setAttribute(e, r), b === null ? a.removeAttribute(t) : (F && a.setAttribute(t, b), E && (this.value = this.normalizeValueForElement(a, b), M && (a.value = b)));
2462
2564
  }).finally(() => {
2463
2565
  this.skipMutationAttributes = !1;
2464
2566
  }));
@@ -2510,7 +2612,7 @@ const V = class V extends w {
2510
2612
  value: r.results[0],
2511
2613
  hasUnresolvedReference: r.hasUnresolvedReference
2512
2614
  } : {
2513
- value: j.joinEvaluateResults(r.results),
2615
+ value: q.joinEvaluateResults(r.results),
2514
2616
  hasUnresolvedReference: r.hasUnresolvedReference
2515
2617
  };
2516
2618
  }
@@ -2595,15 +2697,15 @@ const V = class V extends w {
2595
2697
  else {
2596
2698
  let p;
2597
2699
  if (n ? a !== -1 && a < o ? p = o - 1 : p = o : p = this.children.indexOf(t), p === -1) {
2598
- const v = this.resolveInsertionPointFromDom(
2700
+ const y = this.resolveInsertionPointFromDom(
2599
2701
  t,
2600
2702
  !1
2601
2703
  );
2602
- v === null ? (g.warn(
2704
+ y === null ? (g.warn(
2603
2705
  "[Haori]",
2604
2706
  "Reference child not found in children.",
2605
2707
  t
2606
- ), this.children.push(e)) : (this.children.splice(v.index, 0, e), d = v.referenceNode);
2708
+ ), this.children.push(e)) : (this.children.splice(y.index, 0, e), d = y.referenceNode);
2607
2709
  } else
2608
2710
  this.children.splice(p, 0, e);
2609
2711
  }
@@ -2718,7 +2820,7 @@ const V = class V extends w {
2718
2820
  return t === null ? null : t.closestByAttribute(e);
2719
2821
  }
2720
2822
  };
2721
- V.BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
2823
+ j.BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
2722
2824
  "allowfullscreen",
2723
2825
  "async",
2724
2826
  "autofocus",
@@ -2743,7 +2845,7 @@ V.BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
2743
2845
  "reversed",
2744
2846
  "selected"
2745
2847
  ]);
2746
- let C = V;
2848
+ let C = j;
2747
2849
  class L extends w {
2748
2850
  /**
2749
2851
  * テキストフラグメントのコンストラクタ。
@@ -2752,7 +2854,7 @@ class L extends w {
2752
2854
  * @param target 対象テキストノード
2753
2855
  */
2754
2856
  constructor(e) {
2755
- super(e), this.skipMutation = !1, this.renderedText = null, this.text = e.textContent || "", this.contents = new j(this.text);
2857
+ super(e), this.skipMutation = !1, this.renderedText = null, this.text = e.textContent || "", this.contents = new q(this.text);
2756
2858
  }
2757
2859
  /**
2758
2860
  * フラグメントをクローンします。
@@ -2786,7 +2888,7 @@ class L extends w {
2786
2888
  * @returns 更新のPromise
2787
2889
  */
2788
2890
  setContent(e) {
2789
- return this.skipMutation || this.text === e ? Promise.resolve() : (this.text = e, this.contents = new j(e), this.evaluate());
2891
+ return this.skipMutation || this.text === e ? Promise.resolve() : (this.text = e, this.contents = new q(e), this.evaluate());
2790
2892
  }
2791
2893
  /**
2792
2894
  * フラグメントを評価します。
@@ -2807,7 +2909,7 @@ class L extends w {
2807
2909
  childIndex: this.parent.getChildren().indexOf(this),
2808
2910
  template: this.text
2809
2911
  }
2810
- )[0] : this.contents.isEvaluate && (e = j.joinEvaluateResults(
2912
+ )[0] : this.contents.isEvaluate && (e = q.joinEvaluateResults(
2811
2913
  this.contents.evaluate(this.parent.getBindingData(), {
2812
2914
  kind: "text",
2813
2915
  element: this.parent.getTarget(),
@@ -2822,7 +2924,7 @@ class L extends w {
2822
2924
  });
2823
2925
  }
2824
2926
  }
2825
- class le extends w {
2927
+ class ce extends w {
2826
2928
  /**
2827
2929
  * コメントフラグメントのコンストラクタ。
2828
2930
  * 対象コメントノードの内容を初期化します。
@@ -2838,7 +2940,7 @@ class le extends w {
2838
2940
  * @returns クローンされたフラグメント
2839
2941
  */
2840
2942
  clone() {
2841
- const e = new le(this.target.cloneNode(!0));
2943
+ const e = new ce(this.target.cloneNode(!0));
2842
2944
  return e.mounted = !1, e.text = this.text, e;
2843
2945
  }
2844
2946
  /**
@@ -2863,7 +2965,7 @@ class le extends w {
2863
2965
  }));
2864
2966
  }
2865
2967
  }
2866
- const ee = class ee {
2968
+ const te = class te {
2867
2969
  /**
2868
2970
  * コンストラクタ。
2869
2971
  *
@@ -2871,7 +2973,7 @@ const ee = class ee {
2871
2973
  */
2872
2974
  constructor(e) {
2873
2975
  this.contents = [], this.isEvaluate = !1, this.isRawEvaluate = !1, this.value = e;
2874
- const t = [...e.matchAll(ee.PLACEHOLDER_REGEX)];
2976
+ const t = [...e.matchAll(te.PLACEHOLDER_REGEX)];
2875
2977
  let r = 0, i = !1, s = !1;
2876
2978
  for (const n of t) {
2877
2979
  n.index > r && this.contents.push({
@@ -2968,7 +3070,7 @@ const ee = class ee {
2968
3070
  return this.contents.forEach((c) => {
2969
3071
  try {
2970
3072
  if (r(c)) {
2971
- const d = Q.measure(
3073
+ const d = Z.measure(
2972
3074
  () => J.evaluateDetailed(c.text, e)
2973
3075
  ), h = d.value;
2974
3076
  a += d.durationMs, n.push({
@@ -2987,16 +3089,16 @@ const ee = class ee {
2987
3089
  durationMs: 0
2988
3090
  }), s.push("");
2989
3091
  }
2990
- }), Q.record(
3092
+ }), Z.record(
2991
3093
  t,
2992
3094
  n,
2993
3095
  a
2994
3096
  ), { results: s, hasUnresolvedReference: o };
2995
3097
  }
2996
3098
  };
2997
- ee.PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g;
2998
- let j = ee;
2999
- const te = class te extends j {
3099
+ te.PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g;
3100
+ let q = te;
3101
+ const re = class re extends q {
3000
3102
  /**
3001
3103
  * コンストラクタ。
3002
3104
  *
@@ -3004,7 +3106,7 @@ const te = class te extends j {
3004
3106
  * @param text 属性値
3005
3107
  */
3006
3108
  constructor(e, t) {
3007
- super(t), this.forceEvaluation = te.FORCE_EVALUATION_ATTRIBUTES.includes(e);
3109
+ super(t), this.forceEvaluation = re.FORCE_EVALUATION_ATTRIBUTES.includes(e);
3008
3110
  }
3009
3111
  /**
3010
3112
  * 強制評価フラグを取得します。
@@ -3051,7 +3153,7 @@ const te = class te extends j {
3051
3153
  }) : r;
3052
3154
  }
3053
3155
  };
3054
- te.FORCE_EVALUATION_ATTRIBUTES = [
3156
+ re.FORCE_EVALUATION_ATTRIBUTES = [
3055
3157
  "data-if",
3056
3158
  "hor-if",
3057
3159
  "data-each",
@@ -3059,7 +3161,7 @@ te.FORCE_EVALUATION_ATTRIBUTES = [
3059
3161
  "data-derive",
3060
3162
  "hor-derive"
3061
3163
  ];
3062
- let Z = te;
3164
+ let _ = re;
3063
3165
  class R {
3064
3166
  /**
3065
3167
  * カスタムイベントを発火します。
@@ -3282,36 +3384,36 @@ class R {
3282
3384
  });
3283
3385
  }
3284
3386
  }
3285
- const Te = [
3387
+ const xe = [
3286
3388
  "addErrorMessage",
3287
3389
  "closeDialog",
3288
3390
  "confirm",
3289
3391
  "dialog",
3290
3392
  "openDialog",
3291
3393
  "toast"
3292
- ], we = "__haoriHistoryState__", ie = "data-haori-click-lock";
3293
- function se() {
3394
+ ], Pe = "__haoriHistoryState__", ne = "data-haori-click-lock";
3395
+ function ae() {
3294
3396
  const e = globalThis.window?.Haori;
3295
- return Te.every(
3397
+ return xe.every(
3296
3398
  (r) => typeof e?.[r] == "function"
3297
3399
  ) ? e : X;
3298
3400
  }
3299
- const De = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
3300
- function Re(E) {
3301
- return De.has(E.toUpperCase());
3401
+ const Ie = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
3402
+ function Ce(m) {
3403
+ return Ie.has(m.toUpperCase());
3302
3404
  }
3303
- function Fe(E, e) {
3405
+ function ke(m, e) {
3304
3406
  for (const [t, r] of Object.entries(e))
3305
- r !== void 0 && (r === null ? E.append(t, "") : Array.isArray(r) ? r.forEach((i) => {
3306
- E.append(t, String(i));
3307
- }) : typeof r == "object" || typeof r == "function" ? E.append(t, JSON.stringify(r)) : E.append(t, String(r)));
3407
+ r !== void 0 && (r === null ? m.append(t, "") : Array.isArray(r) ? r.forEach((i) => {
3408
+ m.append(t, String(i));
3409
+ }) : typeof r == "object" || typeof r == "function" ? m.append(t, JSON.stringify(r)) : m.append(t, String(r)));
3308
3410
  }
3309
- function Ne(E, e) {
3310
- const t = new URL(E, window.location.href), r = new URLSearchParams(t.search);
3311
- return Fe(r, e), t.search = r.toString(), t.toString();
3411
+ function Oe(m, e) {
3412
+ const t = new URL(m, window.location.href), r = new URLSearchParams(t.search);
3413
+ return ke(r, e), t.search = r.toString(), t.toString();
3312
3414
  }
3313
- function Me(E) {
3314
- return E == null ? null : typeof E == "string" ? E : E instanceof URLSearchParams ? E.toString() : E instanceof FormData ? Array.from(E.entries()).map(([e, t]) => t instanceof File ? [
3415
+ function $e(m) {
3416
+ return m == null ? null : typeof m == "string" ? m : m instanceof URLSearchParams ? m.toString() : m instanceof FormData ? Array.from(m.entries()).map(([e, t]) => t instanceof File ? [
3315
3417
  e,
3316
3418
  {
3317
3419
  type: "file",
@@ -3319,19 +3421,19 @@ function Me(E) {
3319
3421
  size: t.size,
3320
3422
  mimeType: t.type
3321
3423
  }
3322
- ] : [e, String(t)]) : String(E);
3424
+ ] : [e, String(t)]) : String(m);
3323
3425
  }
3324
- function xe(E, e) {
3426
+ function Be(m, e) {
3325
3427
  const t = new Headers(
3326
3428
  e.headers || void 0
3327
3429
  ), r = Array.from(t.entries()).sort(
3328
3430
  ([i], [s]) => i.localeCompare(s)
3329
3431
  );
3330
3432
  return JSON.stringify({
3331
- url: E,
3433
+ url: m,
3332
3434
  method: String(e.method || "GET").toUpperCase(),
3333
3435
  headers: r,
3334
- body: Me(e.body || null)
3436
+ body: $e(e.body || null)
3335
3437
  });
3336
3438
  }
3337
3439
  const f = class f {
@@ -3520,22 +3622,22 @@ const f = class f {
3520
3622
  if (t) {
3521
3623
  if (e.hasAttribute(f.attrName(t, "validate")) && (r.valid = !0), e.hasAttribute(f.attrName(t, "confirm")) && (r.confirmMessage = e.getAttribute(f.attrName(t, "confirm")).replace(/\\n/g, `
3522
3624
  `)), e.hasAttribute(f.attrName(t, "data")) && (r.dataAttrName = f.attrName(t, "data")), e.hasAttribute(f.attrName(t, "form"))) {
3523
- const y = e.getRawAttribute(
3625
+ const E = e.getRawAttribute(
3524
3626
  f.attrName(t, "form")
3525
3627
  );
3526
- if (y) {
3527
- const m = document.body.querySelector(y);
3528
- m !== null ? r.formFragment = S.getFormFragment(
3529
- w.get(m)
3628
+ if (E) {
3629
+ const b = document.body.querySelector(E);
3630
+ b !== null ? r.formFragment = S.getFormFragment(
3631
+ w.get(b)
3530
3632
  ) : g.error(
3531
3633
  "Haori",
3532
- `Form element not found: ${y} (${f.attrName(t, "form")})`
3634
+ `Form element not found: ${E} (${f.attrName(t, "form")})`
3533
3635
  );
3534
3636
  } else
3535
3637
  r.formFragment = S.getFormFragment(e);
3536
3638
  } else t === "change" && (r.formFragment = S.getFormFragment(e));
3537
3639
  if (e.hasAttribute(`${l.prefix}${t}-before-run`)) {
3538
- const y = e.getRawAttribute(
3640
+ const E = e.getRawAttribute(
3539
3641
  `${l.prefix}${t}-before-run`
3540
3642
  );
3541
3643
  try {
@@ -3544,90 +3646,90 @@ const f = class f {
3544
3646
  "fetchOptions",
3545
3647
  `
3546
3648
  "use strict";
3547
- ${y}
3649
+ ${E}
3548
3650
  `
3549
3651
  );
3550
- } catch (m) {
3551
- g.error("Haori", `Invalid before script: ${m}`);
3652
+ } catch (b) {
3653
+ g.error("Haori", `Invalid before script: ${b}`);
3552
3654
  }
3553
3655
  }
3554
- const b = f.attrName(t, "run");
3555
- if (e.hasAttribute(b)) {
3556
- const y = String(e.getAttribute(b) ?? "");
3656
+ const v = f.attrName(t, "run");
3657
+ if (e.hasAttribute(v)) {
3658
+ const E = String(e.getAttribute(v) ?? "");
3557
3659
  try {
3558
3660
  r.runScript = new Function(
3559
3661
  "event",
3560
3662
  `
3561
3663
  "use strict";
3562
- ${y}
3664
+ ${E}
3563
3665
  `
3564
3666
  );
3565
- } catch (m) {
3566
- g.error("Haori", `Invalid run script: ${m}`);
3667
+ } catch (b) {
3668
+ g.error("Haori", `Invalid run script: ${b}`);
3567
3669
  }
3568
3670
  }
3569
3671
  }
3570
3672
  const i = f.attrName(t, "fetch"), s = e.hasAttribute(i);
3571
3673
  if (s) {
3572
- const b = e.getAttributeEvaluation(i);
3573
- b && (r.fetchHasUnresolvedReference = b.hasUnresolvedReference, r.fetchUrl = b.hasUnresolvedReference ? null : b.value);
3674
+ const v = e.getAttributeEvaluation(i);
3675
+ v && (r.fetchHasUnresolvedReference = v.hasUnresolvedReference, r.fetchUrl = v.hasUnresolvedReference ? null : v.value);
3574
3676
  }
3575
3677
  const n = {};
3576
3678
  if (t) {
3577
- const b = f.attrName(t, "fetch-method");
3578
- if (e.hasAttribute(b)) {
3579
- const y = e.getAttributeEvaluation(b);
3580
- y?.hasUnresolvedReference ? r.fetchHasUnresolvedReference = !0 : n.method = y?.value;
3679
+ const v = f.attrName(t, "fetch-method");
3680
+ if (e.hasAttribute(v)) {
3681
+ const E = e.getAttributeEvaluation(v);
3682
+ E?.hasUnresolvedReference ? r.fetchHasUnresolvedReference = !0 : n.method = E?.value;
3581
3683
  }
3582
3684
  } else {
3583
- const b = f.attrName(null, "method", !0);
3584
- if (e.hasAttribute(b)) {
3585
- const y = e.getAttributeEvaluation(
3586
- b
3685
+ const v = f.attrName(null, "method", !0);
3686
+ if (e.hasAttribute(v)) {
3687
+ const E = e.getAttributeEvaluation(
3688
+ v
3587
3689
  );
3588
- y?.hasUnresolvedReference ? r.fetchHasUnresolvedReference = !0 : n.method = y?.value;
3690
+ E?.hasUnresolvedReference ? r.fetchHasUnresolvedReference = !0 : n.method = E?.value;
3589
3691
  }
3590
3692
  }
3591
3693
  if (t) {
3592
- const b = f.attrName(t, "fetch-headers");
3593
- if (e.hasAttribute(b)) {
3594
- const y = e.getRawAttribute(
3595
- b
3694
+ const v = f.attrName(t, "fetch-headers");
3695
+ if (e.hasAttribute(v)) {
3696
+ const E = e.getRawAttribute(
3697
+ v
3596
3698
  );
3597
3699
  try {
3598
- n.headers = P.parseDataBind(y);
3599
- } catch (m) {
3600
- g.error("Haori", `Invalid fetch headers: ${m}`);
3700
+ n.headers = P.parseDataBind(E);
3701
+ } catch (b) {
3702
+ g.error("Haori", `Invalid fetch headers: ${b}`);
3601
3703
  }
3602
3704
  }
3603
3705
  } else {
3604
- const b = f.attrName(
3706
+ const v = f.attrName(
3605
3707
  null,
3606
3708
  "headers",
3607
3709
  !0
3608
3710
  );
3609
- if (e.hasAttribute(b)) {
3610
- const y = e.getRawAttribute(
3611
- b
3711
+ if (e.hasAttribute(v)) {
3712
+ const E = e.getRawAttribute(
3713
+ v
3612
3714
  );
3613
3715
  try {
3614
- n.headers = P.parseDataBind(y);
3615
- } catch (m) {
3616
- g.error("Haori", `Invalid fetch headers: ${m}`);
3716
+ n.headers = P.parseDataBind(E);
3717
+ } catch (b) {
3718
+ g.error("Haori", `Invalid fetch headers: ${b}`);
3617
3719
  }
3618
3720
  }
3619
3721
  }
3620
3722
  if (t) {
3621
- const b = f.attrName(t, "fetch-content-type");
3622
- if (e.hasAttribute(b)) {
3623
- const y = e.getAttributeEvaluation(b);
3624
- y?.hasUnresolvedReference && (r.fetchHasUnresolvedReference = !0), n.headers = {
3723
+ const v = f.attrName(t, "fetch-content-type");
3724
+ if (e.hasAttribute(v)) {
3725
+ const E = e.getAttributeEvaluation(v);
3726
+ E?.hasUnresolvedReference && (r.fetchHasUnresolvedReference = !0), n.headers = {
3625
3727
  ...n.headers,
3626
- "Content-Type": y?.value
3728
+ "Content-Type": E?.value
3627
3729
  };
3628
3730
  } else if (n.method && n.method !== "GET" && n.method !== "HEAD" && n.method !== "OPTIONS") {
3629
- let y = !1;
3630
- n.headers && typeof n.headers == "object" && (y = "Content-Type" in n.headers), y || (n.headers = {
3731
+ let E = !1;
3732
+ n.headers && typeof n.headers == "object" && (E = "Content-Type" in n.headers), E || (n.headers = {
3631
3733
  ...n.headers,
3632
3734
  "Content-Type": "application/json"
3633
3735
  });
@@ -3636,20 +3738,20 @@ ${y}
3636
3738
  "Content-Type": "application/x-www-form-urlencoded"
3637
3739
  });
3638
3740
  } else {
3639
- const b = f.attrName(
3741
+ const v = f.attrName(
3640
3742
  null,
3641
3743
  "content-type",
3642
3744
  !0
3643
3745
  );
3644
- if (e.hasAttribute(b)) {
3645
- const y = e.getAttributeEvaluation(b);
3646
- y?.hasUnresolvedReference && (r.fetchHasUnresolvedReference = !0), n.headers = {
3746
+ if (e.hasAttribute(v)) {
3747
+ const E = e.getAttributeEvaluation(v);
3748
+ E?.hasUnresolvedReference && (r.fetchHasUnresolvedReference = !0), n.headers = {
3647
3749
  ...n.headers,
3648
- "Content-Type": y?.value
3750
+ "Content-Type": E?.value
3649
3751
  };
3650
3752
  } else if (n.method && n.method !== "GET" && n.method !== "HEAD" && n.method !== "OPTIONS") {
3651
- let y = !1;
3652
- n.headers && typeof n.headers == "object" && (y = "Content-Type" in n.headers), y || (n.headers = {
3753
+ let E = !1;
3754
+ n.headers && typeof n.headers == "object" && (E = "Content-Type" in n.headers), E || (n.headers = {
3653
3755
  ...n.headers,
3654
3756
  "Content-Type": "application/json"
3655
3757
  });
@@ -3661,15 +3763,15 @@ ${y}
3661
3763
  Object.keys(n).length > 0 && (r.fetchOptions = n);
3662
3764
  const a = t ? f.attrName(t, "bind") : f.attrName(null, "bind", !0);
3663
3765
  if (e.hasAttribute(a)) {
3664
- const b = e.getRawAttribute(a);
3665
- if (b) {
3666
- const y = document.body.querySelectorAll(b);
3667
- y.length > 0 ? (r.bindFragments = [], y.forEach((m) => {
3668
- const A = w.get(m);
3766
+ const v = e.getRawAttribute(a);
3767
+ if (v) {
3768
+ const E = document.body.querySelectorAll(v);
3769
+ E.length > 0 ? (r.bindFragments = [], E.forEach((b) => {
3770
+ const A = w.get(b);
3669
3771
  A && r.bindFragments.push(A);
3670
3772
  })) : g.error(
3671
3773
  "Haori",
3672
- `Bind element not found: ${b} (${a})`
3774
+ `Bind element not found: ${v} (${a})`
3673
3775
  );
3674
3776
  }
3675
3777
  }
@@ -3687,34 +3789,34 @@ ${y}
3687
3789
  ) : e.hasAttribute(d) && (r.bindArg = e.getRawAttribute(d));
3688
3790
  const h = t ? f.attrName(t, "bind-params") : f.attrName(null, "bind-params", !0);
3689
3791
  if (e.hasAttribute(h)) {
3690
- const b = e.getRawAttribute(h);
3691
- r.bindParams = b.split("&").map((y) => y.trim());
3792
+ const v = e.getRawAttribute(h);
3793
+ r.bindParams = v.split("&").map((E) => E.trim());
3692
3794
  }
3693
3795
  const p = t ? f.attrName(t, "bind-append") : f.attrName(null, "bind-append", !0);
3694
3796
  if (e.hasAttribute(p)) {
3695
- const b = e.getRawAttribute(p);
3696
- r.bindAppendParams = b.split("&").map((y) => y.trim()).filter(Boolean);
3797
+ const v = e.getRawAttribute(p);
3798
+ r.bindAppendParams = v.split("&").map((E) => E.trim()).filter(Boolean);
3697
3799
  }
3698
- const v = t ? f.attrName(t, "bind-merge") : f.attrName(null, "bind-merge", !0);
3699
- e.hasAttribute(v) && (r.bindMerge = !0);
3800
+ const y = t ? f.attrName(t, "bind-merge") : f.attrName(null, "bind-merge", !0);
3801
+ e.hasAttribute(y) && (r.bindMerge = !0);
3700
3802
  const T = t ? f.attrName(t, "copy-params") : null;
3701
3803
  if (T && e.hasAttribute(T)) {
3702
- const b = e.getRawAttribute(T);
3703
- r.copyParams = b.split("&").map((y) => y.trim()).filter(Boolean);
3804
+ const v = e.getRawAttribute(T);
3805
+ r.copyParams = v.split("&").map((E) => E.trim()).filter(Boolean);
3704
3806
  }
3705
3807
  if (t) {
3706
3808
  if (e.hasAttribute(f.attrName(t, "adjust"))) {
3707
- const m = e.getRawAttribute(
3809
+ const b = e.getRawAttribute(
3708
3810
  f.attrName(t, "adjust")
3709
3811
  );
3710
- if (m) {
3711
- const A = document.body.querySelectorAll(m);
3812
+ if (b) {
3813
+ const A = document.body.querySelectorAll(b);
3712
3814
  A.length > 0 ? (r.adjustFragments = [], A.forEach((F) => {
3713
3815
  const M = w.get(F);
3714
3816
  M && r.adjustFragments.push(M);
3715
3817
  })) : g.error(
3716
3818
  "Haori",
3717
- `Adjust element not found: ${m} (${f.attrName(t, "adjust")})`
3819
+ `Adjust element not found: ${b} (${f.attrName(t, "adjust")})`
3718
3820
  );
3719
3821
  }
3720
3822
  if (e.hasAttribute(f.attrName(t, "adjust-value"))) {
@@ -3725,7 +3827,7 @@ ${y}
3725
3827
  }
3726
3828
  }
3727
3829
  if (e.hasAttribute(f.attrName(t, "row-add")) && (r.rowAdd = !0), e.hasAttribute(f.attrName(t, "row-remove")) && (r.rowRemove = !0), e.hasAttribute(f.attrName(t, "row-prev")) && (r.rowMovePrev = !0), e.hasAttribute(f.attrName(t, "row-next")) && (r.rowMoveNext = !0), e.hasAttribute(`${l.prefix}${t}-after-run`)) {
3728
- const m = e.getRawAttribute(
3830
+ const b = e.getRawAttribute(
3729
3831
  `${l.prefix}${t}-after-run`
3730
3832
  );
3731
3833
  try {
@@ -3733,7 +3835,7 @@ ${y}
3733
3835
  "response",
3734
3836
  `
3735
3837
  "use strict";
3736
- ${m}
3838
+ ${b}
3737
3839
  `
3738
3840
  );
3739
3841
  } catch (A) {
@@ -3745,10 +3847,10 @@ ${m}
3745
3847
  r.toastMessage = e.getAttribute(
3746
3848
  f.attrName(t, "toast")
3747
3849
  );
3748
- const m = e.getRawAttribute(
3850
+ const b = e.getRawAttribute(
3749
3851
  f.attrName(t, "toast-level")
3750
- ), F = ["info", "warning", "error", "success"].includes(m);
3751
- r.toastLevel = F ? m : null;
3852
+ ), F = ["info", "warning", "error", "success"].includes(b);
3853
+ r.toastLevel = F ? b : null;
3752
3854
  }
3753
3855
  if (e.hasAttribute(f.attrName(t, "redirect")) && (r.redirectUrl = e.getAttribute(
3754
3856
  f.attrName(t, "redirect")
@@ -3757,16 +3859,16 @@ ${m}
3757
3859
  )), e.hasAttribute(f.attrName(t, "history")) && (r.historyUrl = e.getAttribute(
3758
3860
  f.attrName(t, "history")
3759
3861
  )), e.hasAttribute(f.attrName(t, "history-data")) && (r.historyDataAttrName = f.attrName(t, "history-data")), e.hasAttribute(f.attrName(t, "history-form"))) {
3760
- const m = e.getRawAttribute(
3862
+ const b = e.getRawAttribute(
3761
3863
  f.attrName(t, "history-form")
3762
3864
  );
3763
- if (m) {
3764
- const A = document.body.querySelector(m);
3865
+ if (b) {
3866
+ const A = document.body.querySelector(b);
3765
3867
  A !== null ? r.historyFormFragment = S.getFormFragment(
3766
3868
  w.get(A)
3767
3869
  ) : g.error(
3768
3870
  "Haori",
3769
- `Form element not found: ${m} (${f.attrName(t, "history-form")})`
3871
+ `Form element not found: ${b} (${f.attrName(t, "history-form")})`
3770
3872
  );
3771
3873
  } else
3772
3874
  r.historyFormFragment = S.getFormFragment(e);
@@ -3779,16 +3881,16 @@ ${m}
3779
3881
  "copy",
3780
3882
  "open",
3781
3883
  "close"
3782
- ].forEach((m) => {
3783
- const A = f.attrName(t, m);
3884
+ ].forEach((b) => {
3885
+ const A = f.attrName(t, b);
3784
3886
  if (!e.hasAttribute(A))
3785
3887
  return;
3786
3888
  const F = e.getRawAttribute(A), M = [];
3787
- if (F ? (document.body.querySelectorAll(F).forEach(($) => {
3788
- const z = w.get($);
3789
- z && M.push(z);
3889
+ if (F ? (document.body.querySelectorAll(F).forEach((B) => {
3890
+ const K = w.get(B);
3891
+ K && M.push(K);
3790
3892
  }), M.length === 0 && g.error("Haori", `Element not found: ${F} (${A})`)) : M.push(e), M.length > 0)
3791
- switch (m) {
3893
+ switch (b) {
3792
3894
  case "reset-before":
3793
3895
  r.resetBeforeFragments = M;
3794
3896
  break;
@@ -3812,39 +3914,39 @@ ${m}
3812
3914
  break;
3813
3915
  }
3814
3916
  });
3815
- const y = f.attrName(t, "copy-source");
3816
- if (e.hasAttribute(y)) {
3817
- const m = e.getRawAttribute(
3818
- y
3917
+ const E = f.attrName(t, "copy-source");
3918
+ if (e.hasAttribute(E)) {
3919
+ const b = e.getRawAttribute(
3920
+ E
3819
3921
  );
3820
- if (m) {
3821
- const A = document.body.querySelector(m);
3922
+ if (b) {
3923
+ const A = document.body.querySelector(b);
3822
3924
  if (A !== null) {
3823
3925
  const F = w.get(A);
3824
3926
  F ? r.copySourceFragment = F : g.error(
3825
3927
  "Haori",
3826
- `Element is not managed by Haori: ${m} (${y})`
3928
+ `Element is not managed by Haori: ${b} (${E})`
3827
3929
  );
3828
3930
  } else
3829
3931
  g.error(
3830
3932
  "Haori",
3831
- `Element not found: ${m} (${y})`
3933
+ `Element not found: ${b} (${E})`
3832
3934
  );
3833
3935
  } else
3834
3936
  r.copySourceFragment = e;
3835
3937
  }
3836
3938
  }
3837
3939
  if (!t && (e.hasAttribute(f.attrName(null, "data", !0)) && (r.dataAttrName = f.attrName(null, "data", !0)), e.hasAttribute(f.attrName(null, "form", !0)))) {
3838
- const b = e.getRawAttribute(
3940
+ const v = e.getRawAttribute(
3839
3941
  f.attrName(null, "form", !0)
3840
3942
  );
3841
- if (b) {
3842
- const y = document.body.querySelector(b);
3843
- y !== null ? r.formFragment = S.getFormFragment(
3844
- w.get(y)
3943
+ if (v) {
3944
+ const E = document.body.querySelector(v);
3945
+ E !== null ? r.formFragment = S.getFormFragment(
3946
+ w.get(E)
3845
3947
  ) : g.error(
3846
3948
  "Haori",
3847
- `Form element not found: ${b} (${f.attrName(null, "fetch-form", !0)})`
3949
+ `Form element not found: ${v} (${f.attrName(null, "fetch-form", !0)})`
3848
3950
  );
3849
3951
  } else
3850
3952
  r.formFragment = S.getFormFragment(e);
@@ -3944,8 +4046,8 @@ ${m}
3944
4046
  }
3945
4047
  const a = Object.keys(i).length > 0;
3946
4048
  if (s) {
3947
- const d = { ...n || {} }, h = r.requestedMethod, p = r.effectiveMethod, v = r.transportMode === "query-get", T = r.queryString;
3948
- if (v && g.info("Haori demo fetch normalization", {
4049
+ const d = { ...n || {} }, h = r.requestedMethod, p = r.effectiveMethod, y = r.transportMode === "query-get", T = r.queryString;
4050
+ if (y && g.info("Haori demo fetch normalization", {
3949
4051
  runtime: l.runtime,
3950
4052
  requestedMethod: h,
3951
4053
  effectiveMethod: p,
@@ -3954,38 +4056,38 @@ ${m}
3954
4056
  payload: a ? i : void 0,
3955
4057
  queryString: T
3956
4058
  }), this.options.targetFragment && s) {
3957
- const b = performance.now(), y = {
4059
+ const v = performance.now(), E = {
3958
4060
  runtime: l.runtime,
3959
4061
  requestedMethod: h,
3960
4062
  effectiveMethod: p,
3961
- transportMode: v ? "query-get" : "http",
3962
- ...v ? { queryString: T } : {}
4063
+ transportMode: y ? "query-get" : "http",
4064
+ ...y ? { queryString: T } : {}
3963
4065
  };
3964
4066
  return R.fetchStart(
3965
4067
  this.options.targetFragment.getTarget(),
3966
4068
  s,
3967
4069
  d,
3968
4070
  a ? i : void 0,
3969
- y
3970
- ), fetch(s, d).then((m) => this.handleFetchResult(
3971
- m,
4071
+ E
4072
+ ), fetch(s, d).then((b) => this.handleFetchResult(
4073
+ b,
3972
4074
  s || void 0,
3973
- b
3974
- )).catch((m) => {
4075
+ v
4076
+ )).catch((b) => {
3975
4077
  throw s && R.fetchError(
3976
4078
  this.options.targetFragment.getTarget(),
3977
4079
  s,
3978
- m
3979
- ), m;
4080
+ b
4081
+ ), b;
3980
4082
  });
3981
4083
  }
3982
- return fetch(s, d).then((b) => this.handleFetchResult(b, s || void 0));
4084
+ return fetch(s, d).then((v) => this.handleFetchResult(v, s || void 0));
3983
4085
  }
3984
4086
  if ((!this.options.bindFragments || this.options.bindFragments.length === 0) && this.options.formFragment && a) {
3985
4087
  const d = this.options.formFragment, h = d.getTarget(), p = /* @__PURE__ */ new Set();
3986
4088
  e && e.appliedDisabledAttribute && this.options.targetFragment && p.add(this.options.targetFragment), h.setAttribute(`${l.prefix}bind`, JSON.stringify(i));
3987
- const v = d.getBindingData();
3988
- Object.assign(v, i), await P.setBindingData(h, v, p);
4089
+ const y = d.getBindingData();
4090
+ Object.assign(y, i), await P.setBindingData(h, y, p);
3989
4091
  }
3990
4092
  const o = a ? i : {}, c = new Response(JSON.stringify(o), {
3991
4093
  headers: { "Content-Type": "application/json" }
@@ -4004,12 +4106,12 @@ ${m}
4004
4106
  if (this.eventType !== "click" || !this.options.targetFragment)
4005
4107
  return null;
4006
4108
  const t = this.options.targetFragment.getTarget();
4007
- if (f.RUNNING_CLICK_TARGETS.has(t) || t.matches(":disabled") || t.hasAttribute("disabled") || t.hasAttribute(ie))
4109
+ if (f.RUNNING_CLICK_TARGETS.has(t) || t.matches(":disabled") || t.hasAttribute("disabled") || t.hasAttribute(ne))
4008
4110
  return !1;
4009
4111
  const r = t.hasAttribute(
4010
4112
  `${l.prefix}click-no-disabled`
4011
4113
  );
4012
- return f.RUNNING_CLICK_TARGETS.add(t), t.setAttribute(ie, ""), r || t.setAttribute("disabled", ""), {
4114
+ return f.RUNNING_CLICK_TARGETS.add(t), t.setAttribute(ne, ""), r || t.setAttribute("disabled", ""), {
4013
4115
  target: t,
4014
4116
  appliedDisabledAttribute: !r
4015
4117
  };
@@ -4021,13 +4123,13 @@ ${m}
4021
4123
  * @returns 戻り値はありません。
4022
4124
  */
4023
4125
  releaseExecutionLock(e) {
4024
- e && (f.RUNNING_CLICK_TARGETS.delete(e.target), e.target.removeAttribute(ie), e.appliedDisabledAttribute && e.target.removeAttribute("disabled"));
4126
+ e && (f.RUNNING_CLICK_TARGETS.delete(e.target), e.target.removeAttribute(ne), e.appliedDisabledAttribute && e.target.removeAttribute("disabled"));
4025
4127
  }
4026
4128
  /**
4027
4129
  * フェッチ後の処理を実行します。
4028
4130
  */
4029
4131
  async handleFetchResult(e, t, r) {
4030
- const i = se();
4132
+ const i = ae();
4031
4133
  if (!e.ok)
4032
4134
  return this.options.targetFragment && t && R.fetchError(
4033
4135
  this.options.targetFragment.getTarget(),
@@ -4097,7 +4199,7 @@ ${m}
4097
4199
  h != null && (Array.isArray(h) ? h.forEach((p) => a.searchParams.append(d, String(p))) : typeof h == "object" ? a.searchParams.set(d, JSON.stringify(h)) : a.searchParams.set(d, String(h)));
4098
4200
  };
4099
4201
  i && o(t), s && o(r), history.pushState(
4100
- { [we]: !0 },
4202
+ { [Pe]: !0 },
4101
4203
  "",
4102
4204
  a.toString()
4103
4205
  );
@@ -4113,7 +4215,7 @@ ${m}
4113
4215
  this.options.formFragment ? t = this.options.formFragment : this.options.targetFragment && (t = S.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
4114
4216
  const r = async (n) => {
4115
4217
  const a = t ? t.getTarget() : document.body;
4116
- await se().addErrorMessage(a, n);
4218
+ await ae().addErrorMessage(a, n);
4117
4219
  }, i = () => {
4118
4220
  if (!this.options.scrollOnError)
4119
4221
  return;
@@ -4198,7 +4300,7 @@ ${m}
4198
4300
  */
4199
4301
  confirm() {
4200
4302
  const e = this.options.confirmMessage;
4201
- return e == null ? Promise.resolve(!0) : se().confirm(e);
4303
+ return e == null ? Promise.resolve(!0) : ae().confirm(e);
4202
4304
  }
4203
4305
  /**
4204
4306
  * 結果データを対象のフラグメントにバインドします。
@@ -4342,21 +4444,21 @@ ${m}
4342
4444
  let i = this.options.fetchUrl;
4343
4445
  const s = { ...this.options.fetchOptions || {} }, n = new Headers(
4344
4446
  s.headers || void 0
4345
- ), a = (s.method || "GET").toUpperCase(), o = l.runtime === "demo" && !Re(a), c = o ? "GET" : a;
4447
+ ), a = (s.method || "GET").toUpperCase(), o = l.runtime === "demo" && !Ce(a), c = o ? "GET" : a;
4346
4448
  if (s.method = c, c === "GET" || c === "HEAD" || c === "OPTIONS")
4347
- Object.keys(t).length > 0 && (i = Ne(i, t));
4449
+ Object.keys(t).length > 0 && (i = Oe(i, t));
4348
4450
  else if (Object.keys(t).length > 0) {
4349
4451
  const h = n.get("Content-Type") || "";
4350
4452
  if (/multipart\/form-data/i.test(h)) {
4351
4453
  n.delete("Content-Type");
4352
4454
  const p = new FormData();
4353
- for (const [v, T] of Object.entries(t))
4354
- T == null ? p.append(v, "") : T instanceof Blob ? p.append(v, T) : Array.isArray(T) ? T.forEach((b) => p.append(v, String(b))) : typeof T == "object" ? p.append(v, JSON.stringify(T)) : p.append(v, String(T));
4455
+ for (const [y, T] of Object.entries(t))
4456
+ T == null ? p.append(y, "") : T instanceof Blob ? p.append(y, T) : Array.isArray(T) ? T.forEach((v) => p.append(y, String(v))) : typeof T == "object" ? p.append(y, JSON.stringify(T)) : p.append(y, String(T));
4355
4457
  s.body = p;
4356
4458
  } else if (/application\/x-www-form-urlencoded/i.test(h)) {
4357
4459
  const p = new URLSearchParams();
4358
- for (const [v, T] of Object.entries(t))
4359
- T !== void 0 && (T === null ? p.append(v, "") : Array.isArray(T) ? T.forEach((b) => p.append(v, String(b))) : typeof T == "object" ? p.append(v, JSON.stringify(T)) : p.append(v, String(T)));
4460
+ for (const [y, T] of Object.entries(t))
4461
+ T !== void 0 && (T === null ? p.append(y, "") : Array.isArray(T) ? T.forEach((v) => p.append(y, String(v))) : typeof T == "object" ? p.append(y, JSON.stringify(T)) : p.append(y, String(T)));
4360
4462
  s.body = p;
4361
4463
  } else
4362
4464
  n.set("Content-Type", "application/json"), s.body = JSON.stringify(t);
@@ -4372,7 +4474,7 @@ ${m}
4372
4474
  effectiveMethod: c,
4373
4475
  queryString: d,
4374
4476
  transportMode: o ? "query-get" : "http",
4375
- signature: xe(i, s)
4477
+ signature: Be(i, s)
4376
4478
  };
4377
4479
  }
4378
4480
  /**
@@ -4525,8 +4627,8 @@ ${m}
4525
4627
  }
4526
4628
  };
4527
4629
  f.DATA_PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g, f.SINGLE_PLACEHOLDER_REGEX = /^(\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\})$/, f.RUNNING_CLICK_TARGETS = /* @__PURE__ */ new WeakSet();
4528
- let q = f;
4529
- class Pe {
4630
+ let z = f;
4631
+ class He {
4530
4632
  /**
4531
4633
  * URLのクエリパラメータを取得します。
4532
4634
  *
@@ -4539,7 +4641,7 @@ class Pe {
4539
4641
  }), e;
4540
4642
  }
4541
4643
  }
4542
- class Ie {
4644
+ class Le {
4543
4645
  /**
4544
4646
  * 指定URLから HTML を取得し、body 内の HTML 文字列を返します。
4545
4647
  *
@@ -4723,8 +4825,8 @@ const u = class u {
4723
4825
  * @returns 実行完了の Promise
4724
4826
  */
4725
4827
  static executeManagedFetch(e) {
4726
- const t = e.getTarget(), r = u.getReactiveFetchState(t), i = q.resolveAutoFetchSignature(e);
4727
- return r.running ? ((i.hasUnresolvedReference || i.signature !== r.lastSignature) && (r.rerunRequested = !0), Promise.resolve()) : i.hasUnresolvedReference || i.signature === null ? (r.lastSignature = null, Promise.resolve()) : r.lastSignature === i.signature ? Promise.resolve() : (r.lastSignature = i.signature, r.running = !0, new q(e, null).runWithResult().then(() => {
4828
+ const t = e.getTarget(), r = u.getReactiveFetchState(t), i = z.resolveAutoFetchSignature(e);
4829
+ return r.running ? ((i.hasUnresolvedReference || i.signature !== r.lastSignature) && (r.rerunRequested = !0), Promise.resolve()) : i.hasUnresolvedReference || i.signature === null ? (r.lastSignature = null, Promise.resolve()) : r.lastSignature === i.signature ? Promise.resolve() : (r.lastSignature = i.signature, r.running = !0, new z(e, null).runWithResult().then(() => {
4728
4830
  }).finally(() => {
4729
4831
  if (r.running = !1, r.rerunRequested)
4730
4832
  return r.rerunRequested = !1, u.executeManagedFetch(e);
@@ -4748,7 +4850,7 @@ const u = class u {
4748
4850
  return Promise.resolve();
4749
4851
  r.lastUrl = s, r.running = !0;
4750
4852
  const n = performance.now();
4751
- return t.setAttribute(`${l.prefix}importing`, ""), R.importStart(t, s), Ie.load(s).then((a) => {
4853
+ return t.setAttribute(`${l.prefix}importing`, ""), R.importStart(t, s), Le.load(s).then((a) => {
4752
4854
  const o = new TextEncoder().encode(a).length;
4753
4855
  return x.enqueue(() => {
4754
4856
  t.innerHTML = a;
@@ -4942,7 +5044,7 @@ const u = class u {
4942
5044
  typeof r == "string" && a.push(u.executeManagedImport(s));
4943
5045
  break;
4944
5046
  case `${l.prefix}url-param`: {
4945
- const d = s.getAttribute(`${l.prefix}url-arg`), h = Pe.readParams();
5047
+ const d = s.getAttribute(`${l.prefix}url-arg`), h = He.readParams();
4946
5048
  if (d === null)
4947
5049
  a.push(u.setBindingData(e, h));
4948
5050
  else {
@@ -5009,9 +5111,9 @@ const u = class u {
5009
5111
  return d.id ? `#${d.id}` : d.tagName.toLowerCase();
5010
5112
  }, n = (c, d, h, p) => {
5011
5113
  if (c)
5012
- for (const v of Object.keys(c))
5013
- v in i || (i[v] = {
5014
- value: c[v],
5114
+ for (const y of Object.keys(c))
5115
+ y in i || (i[y] = {
5116
+ value: c[y],
5015
5117
  source: s(d),
5016
5118
  kind: h,
5017
5119
  depth: p
@@ -5020,7 +5122,7 @@ const u = class u {
5020
5122
  let a = t, o = 0;
5021
5123
  for (; a; )
5022
5124
  a !== t && n(a.getRawDerivedBindingData(), a, "derive", o), n(a.getRawBindingData(), a, "bind", o), a = a.getParent(), o += 1;
5023
- return B.isEnabled() && g.info("[Haori]", "scope dump for", e, { resolved: r, sources: i }), { resolved: r, sources: i };
5125
+ return $.isEnabled() && g.info("[Haori]", "scope dump for", e, { resolved: r, sources: i }), { resolved: r, sources: i };
5024
5126
  }
5025
5127
  /**
5026
5128
  * data-bind 属性の値をパースします。
@@ -5162,12 +5264,12 @@ const u = class u {
5162
5264
  if (c)
5163
5265
  return;
5164
5266
  const p = [];
5165
- return e.getChildren().forEach((v) => {
5166
- if (v instanceof C) {
5167
- if (u.canSkipUnchangedNestedEach(v))
5267
+ return e.getChildren().forEach((y) => {
5268
+ if (y instanceof C) {
5269
+ if (u.canSkipUnchangedNestedEach(y))
5168
5270
  return;
5169
- p.push(u.evaluateAll(v, t));
5170
- } else v instanceof L && p.push(u.evaluateText(v));
5271
+ p.push(u.evaluateAll(y, t));
5272
+ } else y instanceof L && p.push(u.evaluateText(y));
5171
5273
  }), Promise.all(p).then(() => {
5172
5274
  });
5173
5275
  }).then(() => {
@@ -5265,7 +5367,7 @@ const u = class u {
5265
5367
  static evaluateIf(e) {
5266
5368
  const t = [], r = e.getAttribute(`${l.prefix}if`);
5267
5369
  if (u.isHiddenIfCondition(r))
5268
- B.isEnabled() && u.logFalsyIfDiagnostics(e), t.push(
5370
+ $.isEnabled() && u.logFalsyIfDiagnostics(e), t.push(
5269
5371
  e.hide().then(() => {
5270
5372
  R.hide(e.getTarget());
5271
5373
  })
@@ -5297,7 +5399,7 @@ const u = class u {
5297
5399
  */
5298
5400
  static triggerLoadOnShow(e) {
5299
5401
  const t = `${l.prefix}load-`;
5300
- e.getTarget().getAttributeNames().some((i) => i.startsWith(t)) && new q(e, "load").run().catch((i) => {
5402
+ e.getTarget().getAttributeNames().some((i) => i.startsWith(t)) && new z(e, "load").run().catch((i) => {
5301
5403
  g.error("[Haori]", "data-load procedure error (on show):", i);
5302
5404
  });
5303
5405
  }
@@ -5496,7 +5598,7 @@ const u = class u {
5496
5598
  * @returns プロファイル
5497
5599
  */
5498
5600
  static getOrCreateDerivedSubtreeProfile(e) {
5499
- if (!B.isEnabled() || !e.hasAttribute(`${l.prefix}derive`))
5601
+ if (!$.isEnabled() || !e.hasAttribute(`${l.prefix}derive`))
5500
5602
  return null;
5501
5603
  const t = u.DERIVE_SUBTREE_PROFILES.get(e);
5502
5604
  if (t)
@@ -5650,23 +5752,23 @@ const u = class u {
5650
5752
  );
5651
5753
  const p = h.map((A) => A.getListKey());
5652
5754
  h = h.filter((A) => c.has(String(A.getListKey())) ? !0 : (d.push(A.remove()), !1));
5653
- const v = h.map((A) => A.getListKey()), T = /* @__PURE__ */ new Map();
5755
+ const y = h.map((A) => A.getListKey()), T = /* @__PURE__ */ new Map();
5654
5756
  h.forEach((A) => {
5655
5757
  const F = A.getListKey();
5656
5758
  F !== null && !T.has(F) && T.set(F, A);
5657
5759
  });
5658
- const b = e.getChildElementFragments().slice(), y = b.filter(
5760
+ const v = e.getChildElementFragments().slice(), E = v.filter(
5659
5761
  (A) => A.hasAttribute(`${l.prefix}each-before`)
5660
5762
  ).length;
5661
- let m = Promise.resolve();
5763
+ let b = Promise.resolve();
5662
5764
  return o.forEach((A, F) => {
5663
5765
  const { item: M, itemIndex: U } = a.get(A);
5664
- let $;
5665
- const z = T.get(A);
5666
- if (z)
5667
- $ = z, m = m.then(
5766
+ let B;
5767
+ const K = T.get(A);
5768
+ if (K)
5769
+ B = K, b = b.then(
5668
5770
  () => u.updateRowFragment(
5669
- $,
5771
+ B,
5670
5772
  M,
5671
5773
  i,
5672
5774
  U,
@@ -5674,34 +5776,34 @@ const u = class u {
5674
5776
  A
5675
5777
  ).then((k) => {
5676
5778
  if (k)
5677
- return u.evaluateAll($);
5779
+ return u.evaluateAll(B);
5678
5780
  })
5679
5781
  );
5680
5782
  else {
5681
- $ = r.clone();
5682
- const k = y + F;
5683
- m = m.then(
5783
+ B = r.clone();
5784
+ const k = E + F;
5785
+ b = b.then(
5684
5786
  () => u.updateRowFragment(
5685
- $,
5787
+ B,
5686
5788
  M,
5687
5789
  i,
5688
5790
  U,
5689
5791
  n ? String(n) : null,
5690
5792
  A
5691
5793
  ).then(() => {
5692
- const be = b[k] ?? null;
5693
- return e.insertBefore($, be).then(() => {
5694
- b.splice(k, 0, $);
5695
- }).then(() => u.initializeFreshEachRow($));
5794
+ const Ae = v[k] ?? null;
5795
+ return e.insertBefore(B, Ae).then(() => {
5796
+ v.splice(k, 0, B);
5797
+ }).then(() => u.initializeFreshEachRow(B));
5696
5798
  })
5697
5799
  );
5698
5800
  }
5699
- }), Promise.all(d).then(() => m).then(() => {
5801
+ }), Promise.all(d).then(() => b).then(() => {
5700
5802
  const A = o.filter(
5701
5803
  (k) => k !== null
5702
- ), F = v.filter(
5804
+ ), F = y.filter(
5703
5805
  (k) => k !== null
5704
- ), M = new Set(F), U = A.filter((k) => !M.has(k)), z = p.filter(
5806
+ ), M = new Set(F), U = A.filter((k) => !M.has(k)), K = p.filter(
5705
5807
  (k) => k !== null
5706
5808
  ).filter(
5707
5809
  (k) => !c.has(k)
@@ -5709,7 +5811,7 @@ const u = class u {
5709
5811
  R.eachUpdate(
5710
5812
  e.getTarget(),
5711
5813
  U,
5712
- z,
5814
+ K,
5713
5815
  A
5714
5816
  );
5715
5817
  });
@@ -5868,7 +5970,7 @@ u.ATTRIBUTE_ALIAS_SUFFIX = "attr-", u.PRIORITY_ATTRIBUTE_SUFFIXES = [
5868
5970
  "url-param"
5869
5971
  ], u.ATTRIBUTE_PLACEHOLDER_REGEX = /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/, u.REACTIVE_FETCH_STATES = /* @__PURE__ */ new WeakMap(), u.REACTIVE_IMPORT_STATES = /* @__PURE__ */ new WeakMap(), u.DERIVE_SUBTREE_PROFILES = /* @__PURE__ */ new WeakMap(), u.EACH_UPDATE_STATES = /* @__PURE__ */ new WeakMap();
5870
5972
  let P = u;
5871
- const re = class re {
5973
+ const ie = class ie {
5872
5974
  /**
5873
5975
  * コンストラクタ。
5874
5976
  *
@@ -5877,10 +5979,10 @@ const re = class re {
5877
5979
  constructor(e = document) {
5878
5980
  this.onClick = (t) => this.delegate(t, "click"), this.onChange = (t) => this.delegate(t, "change"), this.onLoadCapture = (t) => this.delegate(t, "load"), this.onWindowLoad = () => {
5879
5981
  const t = document.documentElement, r = w.get(t);
5880
- r && new q(r, "load").run();
5982
+ r && new z(r, "load").run();
5881
5983
  }, this.onPopstate = (t) => {
5882
5984
  const r = t.state;
5883
- !r || r[re.HISTORY_STATE_KEY] !== !0 || location.reload();
5985
+ !r || r[ie.HISTORY_STATE_KEY] !== !0 || location.reload();
5884
5986
  }, this.root = e;
5885
5987
  }
5886
5988
  /**
@@ -5912,7 +6014,7 @@ const re = class re {
5912
6014
  return;
5913
6015
  t === "change" && i instanceof C && i.syncValue();
5914
6016
  const s = () => {
5915
- new q(i, t, e).run().catch((n) => {
6017
+ new z(i, t, e).run().catch((n) => {
5916
6018
  g.error("[Haori]", "Procedure execution error:", n);
5917
6019
  });
5918
6020
  };
@@ -5957,8 +6059,8 @@ const re = class re {
5957
6059
  return null;
5958
6060
  }
5959
6061
  };
5960
- re.HISTORY_STATE_KEY = "__haoriHistoryState__";
5961
- let ae = re;
6062
+ ie.HISTORY_STATE_KEY = "__haoriHistoryState__";
6063
+ let le = ie;
5962
6064
  const D = class D {
5963
6065
  /**
5964
6066
  * ノードが現在の Window に属する HTMLElement かどうかを判定します。
@@ -5998,7 +6100,7 @@ const D = class D {
5998
6100
  (c) => {
5999
6101
  const d = D.registrations.get(e);
6000
6102
  d && c.forEach((h) => {
6001
- !h.isIntersecting || d.running || D.isDisabled(d.fragment) || (d.running = !0, new q(d.fragment, "intersect").runWithResult().then((p) => {
6103
+ !h.isIntersecting || d.running || D.isDisabled(d.fragment) || (d.running = !0, new z(d.fragment, "intersect").runWithResult().then((p) => {
6002
6104
  p && d.once && (d.observer.disconnect(), D.registrations.delete(e));
6003
6105
  }).catch((p) => {
6004
6106
  g.error(
@@ -6108,7 +6210,7 @@ const O = class O {
6108
6210
  P.scan(document.head),
6109
6211
  P.scan(document.body)
6110
6212
  ]), [t, r] = e;
6111
- t.status !== "fulfilled" && g.error("[Haori]", "Failed to build head fragment:", t.reason), r.status !== "fulfilled" && g.error("[Haori]", "Failed to build body fragment:", r.reason), await x.wait(), document.body.setAttribute("data-haori-ready", ""), O.observe(document.head), O.observe(document.body), new ae().start(), Y.syncTree(document.body);
6213
+ t.status !== "fulfilled" && g.error("[Haori]", "Failed to build head fragment:", t.reason), r.status !== "fulfilled" && g.error("[Haori]", "Failed to build body fragment:", r.reason), await x.wait(), document.body.setAttribute("data-haori-ready", ""), O.observe(document.head), O.observe(document.body), new le().start(), Y.syncTree(document.body);
6112
6214
  }
6113
6215
  /**
6114
6216
  * 指定された要素を監視します。
@@ -6168,9 +6270,9 @@ const O = class O {
6168
6270
  }
6169
6271
  };
6170
6272
  O._initialized = !1, O._mutationObservers = [];
6171
- let _ = O;
6172
- document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", _.init) : _.init();
6173
- const Ce = () => X.waitForRenders(), ke = "0.13.2";
6273
+ let ee = O;
6274
+ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", ee.init) : ee.init();
6275
+ const Ue = () => X.waitForRenders(), Ve = "0.14.0";
6174
6276
  export {
6175
6277
  P as Core,
6176
6278
  l as Env,
@@ -6180,7 +6282,7 @@ export {
6180
6282
  g as Log,
6181
6283
  x as Queue,
6182
6284
  X as default,
6183
- ke as version,
6184
- Ce as waitForRenders
6285
+ Ve as version,
6286
+ Ue as waitForRenders
6185
6287
  };
6186
6288
  //# sourceMappingURL=haori.es.js.map