yamlite 0.36.0 → 0.38.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.
@@ -1,44 +1,44 @@
1
1
  import { A as e, C as t, S as n, T as r, a as i, c as a, d as o, f as s, g as c, l, p as u, s as d, u as f, v as p, y as m } from "./theme-BwJfOY1V.js";
2
- import { A as h, C as g, D as ee, G as _, K as v, L as te, Lt as y, M as b, O as x, P as S, Pt as C, R as w, S as T, _ as ne, _t as E, at as D, bt as O, c as k, dt as re, ft as ie, g as A, gt as ae, h as oe, it as se, k as ce, l as j, lt as M, m as le, mt as ue, n as de, nt as N, ot as fe, pt as pe, r as me, rt as he, s as ge, st as P, tt as F, v as _e, vt as ve, x as ye, y as be, yt as xe } from "./HintPopover-D5P2UuTa.js";
3
- import { F as Se, a as Ce, h as we, i as Te, l as Ee, n as I, r as De, t as Oe, u as ke } from "./tabs-CLBiDAgo.js";
2
+ import { A as h, C as g, D as ee, G as _, K as v, L as te, Lt as y, M as b, O as x, P as S, Pt as C, R as w, S as T, _ as ne, _t as re, at as ie, bt as E, c as D, dt as ae, ft as O, g as oe, gt as se, h as ce, it as le, k as ue, l as k, lt as A, m as j, mt as de, n as fe, nt as pe, ot as M, pt as me, r as N, rt as he, s as ge, st as _e, tt as ve, v as ye, vt as be, x as xe, y as Se, yt as Ce } from "./HintPopover-D5P2UuTa.js";
3
+ import { F as we, a as Te, h as Ee, i as P, l as De, n as F, r as Oe, t as ke, u as Ae } from "./tabs-CLBiDAgo.js";
4
4
  //#region node_modules/.pnpm/@tanstack+react-store@0.11.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@tanstack/react-store/dist/useSelector.js
5
- var L = /* @__PURE__ */ e(t(), 1), Ae = /* @__PURE__ */ e(E(), 1);
6
- function je(e, t) {
5
+ var I = /* @__PURE__ */ e(t(), 1), je = /* @__PURE__ */ e(re(), 1);
6
+ function Me(e, t) {
7
7
  return e === t;
8
8
  }
9
- function Me(e, t = (e) => e, n) {
10
- let r = n?.compare ?? je, i = (0, L.useCallback)((t) => {
9
+ function Ne(e, t = (e) => e, n) {
10
+ let r = n?.compare ?? Me, i = (0, I.useCallback)((t) => {
11
11
  let { unsubscribe: n } = e.subscribe(t);
12
12
  return n;
13
- }, [e]), a = (0, L.useCallback)(() => e.get(), [e]);
14
- return (0, Ae.useSyncExternalStoreWithSelector)(i, a, a, t, r);
13
+ }, [e]), a = (0, I.useCallback)(() => e.get(), [e]);
14
+ return (0, je.useSyncExternalStoreWithSelector)(i, a, a, t, r);
15
15
  }
16
16
  //#endregion
17
17
  //#region node_modules/.pnpm/@tanstack+react-router@1.170.44_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@tanstack/react-router/dist/esm/useMatch.js
18
- var Ne = {};
19
- function Pe(e, t) {
20
- let n = L.useRef();
18
+ var Pe = {};
19
+ function Fe(e, t) {
20
+ let n = I.useRef();
21
21
  return (r) => {
22
22
  let i = e?.select ? e.select(r) : r;
23
23
  return e?.structuralSharing ?? t.options.defaultStructuralSharing ? n.current = y(n.current, i) : i;
24
24
  };
25
25
  }
26
- function Fe(e) {
27
- let t = O(), n = L.useContext(e.from ? ve : xe), r = e.from ?? n, i = t.stores.getMatchStore(r), a = Pe(e, t), o = Me(i, (e) => e ? a(e) : Ne);
28
- if (o !== Ne) return o;
26
+ function Ie(e) {
27
+ let t = E(), n = I.useContext(e.from ? be : Ce), r = e.from ?? n, i = t.stores.getMatchStore(r), a = Fe(e, t), o = Ne(i, (e) => e ? a(e) : Pe);
28
+ if (o !== Pe) return o;
29
29
  (e.shouldThrow ?? !0) && C();
30
30
  }
31
31
  //#endregion
32
32
  //#region node_modules/.pnpm/@tanstack+react-router@1.170.44_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@tanstack/react-router/dist/esm/useRouteContext.js
33
- function Ie(e) {
34
- return Fe({
33
+ function Le(e) {
34
+ return Ie({
35
35
  ...e,
36
36
  select: (t) => e.select ? e.select(t.context) : t.context
37
37
  });
38
38
  }
39
39
  //#endregion
40
40
  //#region node_modules/.pnpm/@tanstack+query-core@5.104.3/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js
41
- var Le = class extends N {
41
+ var Re = class extends pe {
42
42
  constructor(e, t) {
43
43
  super(e, t);
44
44
  }
@@ -70,7 +70,7 @@ var Le = class extends N {
70
70
  fetchNextPage: this.fetchNextPage,
71
71
  fetchPreviousPage: this.fetchPreviousPage,
72
72
  hasNextPage: he(t, n.data),
73
- hasPreviousPage: se(t, n.data),
73
+ hasPreviousPage: le(t, n.data),
74
74
  isFetchNextPageError: l,
75
75
  isFetchingNextPage: u,
76
76
  isFetchPreviousPageError: d,
@@ -79,7 +79,7 @@ var Le = class extends N {
79
79
  isRefetching: a && !u && !f
80
80
  };
81
81
  }
82
- }, Re = class extends fe {
82
+ }, ze = class extends M {
83
83
  #e;
84
84
  #t = void 0;
85
85
  #n;
@@ -92,11 +92,11 @@ var Le = class extends N {
92
92
  }
93
93
  setOptions(e) {
94
94
  let t = this.options;
95
- this.options = this.#e.defaultMutationOptions(e), re(this.options, t) || this.#e.getMutationCache().notify({
95
+ this.options = this.#e.defaultMutationOptions(e), ae(this.options, t) || this.#e.getMutationCache().notify({
96
96
  type: "observerOptionsUpdated",
97
97
  mutation: this.#n,
98
98
  observer: this
99
- }), t?.mutationKey && this.options.mutationKey && P(t.mutationKey) !== P(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
99
+ }), t?.mutationKey && this.options.mutationKey && _e(t.mutationKey) !== _e(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
100
100
  }
101
101
  onSubscribe() {
102
102
  this.listeners.size === 1 && this.#n && (this.#n.addObserver(this), this.#i());
@@ -117,7 +117,7 @@ var Le = class extends N {
117
117
  return this.#r = t, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(e);
118
118
  }
119
119
  #i() {
120
- let e = this.#n?.state ?? F();
120
+ let e = this.#n?.state ?? ve();
121
121
  this.#t = {
122
122
  ...e,
123
123
  isPending: e.status === "pending",
@@ -129,7 +129,7 @@ var Le = class extends N {
129
129
  };
130
130
  }
131
131
  #a(e) {
132
- D.batch(() => {
132
+ ie.batch(() => {
133
133
  let t = this.#r;
134
134
  if (t && this.hasListeners()) {
135
135
  let n = this.#t.variables, r = this.#t.context, i = {
@@ -169,15 +169,15 @@ var Le = class extends N {
169
169
  };
170
170
  //#endregion
171
171
  //#region node_modules/.pnpm/@tanstack+react-query@5.104.3_react@19.3.1/node_modules/@tanstack/react-query/build/modern/useMutation.js
172
- function ze(e, t) {
173
- let n = pe(t), [r] = L.useState(() => new Re(n, e));
174
- L.useEffect(() => {
172
+ function Be(e, t) {
173
+ let n = me(t), [r] = I.useState(() => new ze(n, e));
174
+ I.useEffect(() => {
175
175
  r.setOptions(e);
176
176
  }, [r, e]);
177
- let i = L.useSyncExternalStore(L.useCallback((e) => r.subscribe(D.batchCalls(e)), [r]), () => r.getCurrentResult(), () => r.getCurrentResult()), a = L.useCallback((...e) => {
178
- r.mutate(e[0], e[1]).catch(M);
177
+ let i = I.useSyncExternalStore(I.useCallback((e) => r.subscribe(ie.batchCalls(e)), [r]), () => r.getCurrentResult(), () => r.getCurrentResult()), a = I.useCallback((...e) => {
178
+ r.mutate(e[0], e[1]).catch(A);
179
179
  }, [r]);
180
- if (i.error && ie(r.options.throwOnError, [i.error])) throw i.error;
180
+ if (i.error && O(r.options.throwOnError, [i.error])) throw i.error;
181
181
  return {
182
182
  ...i,
183
183
  mutate: a,
@@ -186,31 +186,31 @@ function ze(e, t) {
186
186
  }
187
187
  //#endregion
188
188
  //#region node_modules/.pnpm/@tanstack+react-query@5.104.3_react@19.3.1/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js
189
- function Be(e, t) {
190
- return v(e, Le, t);
189
+ function Ve(e, t) {
190
+ return v(e, Re, t);
191
191
  }
192
192
  //#endregion
193
193
  //#region ui/src/paraglide/messages/common_cancel.js
194
- var Ve = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "キャンセル" : "Cancel"), He = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "閉じる" : "Close"), Ue = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "閉じる" : "close"), We = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "削除" : "Delete"), Ge = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "切断中" : "disconnected"), Ke = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "読み込み中…" : "Loading…"), qe = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "保存" : "Save"), Je = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "追加" : "Add"), Ye = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "+ 追加" : "+ add"), Xe = (e) => `add to ${e?.field}`, Ze = (e) => `${e?.field} に追加`, Qe = ((e, t = {}) => (t.locale ?? r()) === "ja" ? Ze(e) : Xe(e)), $e = (e) => `${e?.field} as ${e?.kind}`, et = (e) => `${e?.field} を ${e?.kind} で編集`, tt = ((e, t = {}) => (t.locale ?? r()) === "ja" ? et(e) : $e(e)), nt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "種類を変える" : "Change type"), rt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "この項目を空にして、種類を選び直しますか?" : "Clear this field and choose another type?"), it = (e) => `Change type of ${e?.field}`, at = (e) => `${e?.field} の種類を変える`, ot = ((e, t = {}) => (t.locale ?? r()) === "ja" ? at(e) : it(e)), st = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "+ キー" : "+ key"), ct = (e) => `new key in ${e?.field}`, lt = (e) => `${e?.field} の新しいキー`, ut = ((e, t = {}) => (t.locale ?? r()) === "ja" ? lt(e) : ct(e)), dt = (e) => `remove ${e?.item}`, ft = (e) => `${e?.item} を削除`, pt = ((e, t = {}) => (t.locale ?? r()) === "ja" ? ft(e) : dt(e)), mt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "— (未設定)" : "— (unset)"), ht = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "作成" : "Created"), gt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "削除" : "Deleted"), _t = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "フィールド" : "Fields"), vt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "たった今" : "just now"), yt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "さらに古い履歴を読み込む" : "Load older history"), bt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "まだコミットされていません" : "Not committed yet"), xt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "コミットすると、ここに変更が並びます。" : "Once you commit, changes show up here."), St = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "git の履歴はありません" : "No git history"), Ct = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "このフォルダは git リポジトリの外にあります。" : "This folder is outside a git repository."), wt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "値の変更はありません" : "No value changes"), Tt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "(なし)" : "(none)"), Et = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "この版に戻す" : "Restore this version"), Dt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "この時点の値をフォームに入れます(保存はしません)" : "Puts this version's values into the form (does not save)"), Ot = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "今の値と同じです" : "Same as the current values"), kt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "未コミット" : "Uncommitted"), At = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "読めない版です" : "This version can't be read"), jt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "未コミットの変更" : "Uncommitted changes"), Mt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "YAML の差分" : "YAML diff"), Nt = (e) => {
194
+ var He = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "キャンセル" : "Cancel"), L = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "閉じる" : "Close"), Ue = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "削除" : "Delete"), We = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "切断中" : "disconnected"), Ge = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "読み込み中…" : "Loading…"), Ke = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "保存" : "Save"), qe = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "追加" : "Add"), Je = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "+ 追加" : "+ add"), Ye = (e) => `add to ${e?.field}`, Xe = (e) => `${e?.field} に追加`, Ze = ((e, t = {}) => (t.locale ?? r()) === "ja" ? Xe(e) : Ye(e)), Qe = (e) => `${e?.field} as ${e?.kind}`, $e = (e) => `${e?.field} を ${e?.kind} で編集`, et = ((e, t = {}) => (t.locale ?? r()) === "ja" ? $e(e) : Qe(e)), tt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "種類を変える" : "Change type"), nt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "この項目を空にして、種類を選び直しますか?" : "Clear this field and choose another type?"), rt = (e) => `Change type of ${e?.field}`, it = (e) => `${e?.field} の種類を変える`, at = ((e, t = {}) => (t.locale ?? r()) === "ja" ? it(e) : rt(e)), ot = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "+ キー" : "+ key"), st = (e) => `new key in ${e?.field}`, ct = (e) => `${e?.field} の新しいキー`, lt = ((e, t = {}) => (t.locale ?? r()) === "ja" ? ct(e) : st(e)), ut = (e) => `remove ${e?.item}`, dt = (e) => `${e?.item} を削除`, ft = ((e, t = {}) => (t.locale ?? r()) === "ja" ? dt(e) : ut(e)), pt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "— (未設定)" : "— (unset)"), mt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "作成" : "Created"), ht = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "削除" : "Deleted"), gt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "フィールド" : "Fields"), _t = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "たった今" : "just now"), vt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "さらに古い履歴を読み込む" : "Load older history"), yt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "まだコミットされていません" : "Not committed yet"), bt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "コミットすると、ここに変更が並びます。" : "Once you commit, changes show up here."), xt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "git の履歴はありません" : "No git history"), St = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "このフォルダは git リポジトリの外にあります。" : "This folder is outside a git repository."), Ct = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "値の変更はありません" : "No value changes"), wt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "(なし)" : "(none)"), Tt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "この版に戻す" : "Restore this version"), Et = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "この時点の値をフォームに入れます(保存はしません)" : "Puts this version's values into the form (does not save)"), Dt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "今の値と同じです" : "Same as the current values"), Ot = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "未コミット" : "Uncommitted"), kt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "読めない版です" : "This version can't be read"), At = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "未コミットの変更" : "Uncommitted changes"), jt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "YAML の差分" : "YAML diff"), Mt = (e) => {
195
195
  let t = b("en", e?.count, {}, !0);
196
196
  return t === "one" ? `⋯ ${e?.count} unchanged line` : t === "other" ? `⋯ ${e?.count} unchanged lines` : "proposal_unchanged_lines";
197
- }, Pt = (e) => `⋯ 変更のない ${e?.count} 行`, Ft = ((e, t = {}) => (t.locale ?? r()) === "ja" ? Pt(e) : Nt(e)), It = (e) => {
197
+ }, Nt = (e) => `⋯ 変更のない ${e?.count} 行`, Pt = ((e, t = {}) => (t.locale ?? r()) === "ja" ? Nt(e) : Mt(e)), Ft = (e) => {
198
198
  let t = b("en", e?.count, {}, !0);
199
199
  return t === "one" ? `${e?.count} change · saving writes it to the file` : t === "other" ? `${e?.count} changes · saving writes them to the file` : "record_changes";
200
- }, Lt = (e) => `変更 ${e?.count} 件 · 保存するとファイルに反映`, Rt = ((e, t = {}) => (t.locale ?? r()) === "ja" ? Lt(e) : It(e)), zt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコードを削除" : "delete record"), Bt = (e) => `It is also removed from ${e?.file}.`, Vt = (e) => `${e?.file} からも削除されます。`, Ht = ((e, t = {}) => (t.locale ?? r()) === "ja" ? Vt(e) : Bt(e)), Ut = (e) => `Delete ${e?.key}?`, Wt = (e) => `${e?.key} を削除しますか?`, Gt = ((e, t = {}) => (t.locale ?? r()) === "ja" ? Wt(e) : Ut(e)), Kt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "破棄" : "Discard"), qt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "接続が切れています" : "Connection lost"), Jt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコードのファイル" : "record file"), Yt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコードの JSON" : "record JSON"), Xt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコードは JSON オブジェクトにしてください" : "a record must be a JSON object"), Zt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコード" : "record"), Qt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "新規" : "new"), $t = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "上書き" : "Overwrite"), en = (e) => `⚠ Not reflected: ${e?.reason}`, tn = (e) => `⚠ 反映されませんでした: ${e?.reason}`, nn = ((e, t = {}) => (t.locale ?? r()) === "ja" ? tn(e) : en(e)), rn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "反映待ち" : "Waiting to reflect"), an = (e) => `Reflected to ${e?.file}`, on = (e) => `${e?.file} に反映済み`, sn = ((e, t = {}) => (t.locale ?? r()) === "ja" ? on(e) : an(e)), cn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "反映中…" : "Reflecting…"), ln = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "最新を読み込む" : "Load latest"), un = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "必須" : "required"), dn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコードパネルの幅を変更" : "Resize record panel"), fn = (e) => {
200
+ }, It = (e) => `変更 ${e?.count} 件 · 保存するとファイルに反映`, Lt = ((e, t = {}) => (t.locale ?? r()) === "ja" ? It(e) : Ft(e)), Rt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコードを削除" : "delete record"), zt = (e) => `It is also removed from ${e?.file}.`, Bt = (e) => `${e?.file} からも削除されます。`, Vt = ((e, t = {}) => (t.locale ?? r()) === "ja" ? Bt(e) : zt(e)), Ht = (e) => `Delete ${e?.key}?`, Ut = (e) => `${e?.key} を削除しますか?`, Wt = ((e, t = {}) => (t.locale ?? r()) === "ja" ? Ut(e) : Ht(e)), Gt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "破棄" : "Discard"), Kt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "接続が切れています" : "Connection lost"), qt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコードのファイル" : "record file"), Jt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコードの JSON" : "record JSON"), Yt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコードは JSON オブジェクトにしてください" : "a record must be a JSON object"), Xt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコード" : "record"), Zt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "新規" : "new"), Qt = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "上書き" : "Overwrite"), $t = (e) => `⚠ Not reflected: ${e?.reason}`, en = (e) => `⚠ 反映されませんでした: ${e?.reason}`, tn = ((e, t = {}) => (t.locale ?? r()) === "ja" ? en(e) : $t(e)), nn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "反映待ち" : "Waiting to reflect"), rn = (e) => `Reflected to ${e?.file}`, an = (e) => `${e?.file} に反映済み`, on = ((e, t = {}) => (t.locale ?? r()) === "ja" ? an(e) : rn(e)), sn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "反映中…" : "Reflecting…"), cn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "最新を読み込む" : "Load latest"), ln = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "必須" : "required"), R = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "レコードパネルの幅を変更" : "Resize record panel"), un = (e) => {
201
201
  let t = b("en", e?.count, {}, !0);
202
202
  return t === "one" ? `Restored the values from ${e?.from} · ${e?.count} field unsaved` : t === "other" ? `Restored the values from ${e?.from} · ${e?.count} fields unsaved` : "record_restored";
203
- }, pn = (e) => `${e?.from} の値に戻しました · ${e?.count} 項目が未保存`, mn = ((e, t = {}) => (t.locale ?? r()) === "ja" ? pn(e) : fn(e)), hn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "保存 ⌘S" : "Save ⌘S"), gn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "読み込んだあとに、ファイルか DB で次のフィールドが変わりました。" : "After you loaded it, these fields changed in the file or the DB."), _n = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "あなたの編集" : "Your edit"), vn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "いまの値" : "Current value"), yn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "他で変更されました" : "Changed elsewhere"), bn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "ファイル" : "File"), xn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "フォーム" : "Form"), Sn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "履歴" : "History"), R = n(), Cn = Object.defineProperty, z = (e, t) => Cn(e, "name", {
203
+ }, dn = (e) => `${e?.from} の値に戻しました · ${e?.count} 項目が未保存`, fn = ((e, t = {}) => (t.locale ?? r()) === "ja" ? dn(e) : un(e)), pn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "保存 ⌘S" : "Save ⌘S"), mn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "読み込んだあとに、ファイルか DB で次のフィールドが変わりました。" : "After you loaded it, these fields changed in the file or the DB."), hn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "あなたの編集" : "Your edit"), gn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "いまの値" : "Current value"), _n = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "他で変更されました" : "Changed elsewhere"), vn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "ファイル" : "File"), yn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "フォーム" : "Form"), bn = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "履歴" : "History"), z = n(), xn = Object.defineProperty, B = (e, t) => xn(e, "name", {
204
204
  value: t,
205
205
  configurable: !0
206
- }), wn = "Dialog", [Tn, En] = s(wn), [Dn, B] = Tn(wn), On = /* @__PURE__ */ z((e) => {
207
- let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s = L.useRef(null), c = L.useRef(null), { nodes: u, registry: f } = ye(), [p, m] = l({
206
+ }), Sn = "Dialog", [Cn, wn] = s(Sn), [Tn, V] = Cn(Sn), En = /* @__PURE__ */ B((e) => {
207
+ let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s = I.useRef(null), c = I.useRef(null), { nodes: u, registry: f } = xe(), [p, m] = l({
208
208
  prop: r,
209
209
  defaultProp: i ?? !1,
210
210
  onChange: a,
211
- caller: wn
212
- }), [h, g] = L.useState(0), [ee, _] = L.useState(0);
213
- return /* @__PURE__ */ (0, R.jsx)(Dn, {
211
+ caller: Sn
212
+ }), [h, g] = I.useState(0), [ee, _] = I.useState(0);
213
+ return /* @__PURE__ */ (0, z.jsx)(Tn, {
214
214
  scope: t,
215
215
  triggerRef: s,
216
216
  contentRef: c,
@@ -223,43 +223,43 @@ var Ve = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "キャンセル" : "
223
223
  setDescriptionCount: _,
224
224
  open: p,
225
225
  onOpenChange: m,
226
- onOpenToggle: L.useCallback(() => m((e) => !e), [m]),
226
+ onOpenToggle: I.useCallback(() => m((e) => !e), [m]),
227
227
  modal: o,
228
228
  branchNodes: u,
229
229
  branchRegistry: f,
230
230
  children: n
231
231
  });
232
- }, "Dialog"), kn = "DialogPortal", [An, jn] = Tn(kn, { forceMount: void 0 }), Mn = /* @__PURE__ */ z((e) => {
233
- let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, o = B(kn, t);
234
- return /* @__PURE__ */ (0, R.jsx)(An, {
232
+ }, "Dialog"), Dn = "DialogPortal", [On, kn] = Cn(Dn, { forceMount: void 0 }), An = /* @__PURE__ */ B((e) => {
233
+ let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, o = V(Dn, t);
234
+ return /* @__PURE__ */ (0, z.jsx)(On, {
235
235
  scope: t,
236
236
  forceMount: n,
237
- children: L.Children.map(r, (e) => /* @__PURE__ */ (0, R.jsx)(a, {
237
+ children: I.Children.map(r, (e) => /* @__PURE__ */ (0, z.jsx)(a, {
238
238
  present: n || o.open,
239
- children: /* @__PURE__ */ (0, R.jsx)(ne, {
239
+ children: /* @__PURE__ */ (0, z.jsx)(ne, {
240
240
  asChild: !0,
241
241
  container: i,
242
242
  children: e
243
243
  })
244
244
  }))
245
245
  });
246
- }, "DialogPortal"), Nn = "DialogOverlay", Pn = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ z(function(e, t) {
247
- let n = jn(Nn, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, o = B(Nn, e.__scopeDialog);
248
- return o.modal ? /* @__PURE__ */ (0, R.jsx)(a, {
246
+ }, "DialogPortal"), jn = "DialogOverlay", Mn = /* @__PURE__ */ I.forwardRef(/* @__PURE__ */ B(function(e, t) {
247
+ let n = kn(jn, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, o = V(jn, e.__scopeDialog);
248
+ return o.modal ? /* @__PURE__ */ (0, z.jsx)(a, {
249
249
  present: r || o.open,
250
- children: /* @__PURE__ */ (0, R.jsx)(In, {
250
+ children: /* @__PURE__ */ (0, z.jsx)(Pn, {
251
251
  ...i,
252
252
  ref: t
253
253
  })
254
254
  }) : null;
255
- }, "DialogOverlay")), Fn = c("DialogOverlay.RemoveScroll"), In = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ z(function(e, t) {
256
- let { __scopeDialog: n, ...r } = e, i = B(Nn, n), a = g(), o = p(t, a);
257
- return /* @__PURE__ */ (0, R.jsx)(oe, {
258
- as: Fn,
255
+ }, "DialogOverlay")), Nn = c("DialogOverlay.RemoveScroll"), Pn = /* @__PURE__ */ I.forwardRef(/* @__PURE__ */ B(function(e, t) {
256
+ let { __scopeDialog: n, ...r } = e, i = V(jn, n), a = g(), o = p(t, a);
257
+ return /* @__PURE__ */ (0, z.jsx)(ce, {
258
+ as: Nn,
259
259
  allowPinchZoom: !0,
260
- shards: L.useMemo(() => [i.contentRef, ...i.branchNodes.map((e) => ({ current: e }))], [i.contentRef, i.branchNodes]),
261
- children: /* @__PURE__ */ (0, R.jsx)(u.div, {
262
- "data-state": Kn(i.open),
260
+ shards: I.useMemo(() => [i.contentRef, ...i.branchNodes.map((e) => ({ current: e }))], [i.contentRef, i.branchNodes]),
261
+ children: /* @__PURE__ */ (0, z.jsx)(u.div, {
262
+ "data-state": Wn(i.open),
263
263
  ...r,
264
264
  ref: o,
265
265
  style: {
@@ -268,24 +268,24 @@ var Ve = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "キャンセル" : "
268
268
  }
269
269
  })
270
270
  });
271
- }, "DialogOverlayImpl")), V = "DialogContent", Ln = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ z(function(e, t) {
272
- let n = jn(V, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, o = B(V, e.__scopeDialog);
273
- return /* @__PURE__ */ (0, R.jsx)(a, {
271
+ }, "DialogOverlayImpl")), H = "DialogContent", Fn = /* @__PURE__ */ I.forwardRef(/* @__PURE__ */ B(function(e, t) {
272
+ let n = kn(H, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, o = V(H, e.__scopeDialog);
273
+ return /* @__PURE__ */ (0, z.jsx)(a, {
274
274
  present: r || o.open,
275
- children: o.modal ? /* @__PURE__ */ (0, R.jsx)(Rn, {
275
+ children: o.modal ? /* @__PURE__ */ (0, z.jsx)(In, {
276
276
  ...i,
277
277
  ref: t
278
- }) : /* @__PURE__ */ (0, R.jsx)(zn, {
278
+ }) : /* @__PURE__ */ (0, z.jsx)(Ln, {
279
279
  ...i,
280
280
  ref: t
281
281
  })
282
282
  });
283
- }, "DialogContent")), Rn = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ z(function(e, t) {
284
- let n = B(V, e.__scopeDialog), r = L.useRef(null), i = p(t, n.contentRef, r);
285
- return L.useEffect(() => {
283
+ }, "DialogContent")), In = /* @__PURE__ */ I.forwardRef(/* @__PURE__ */ B(function(e, t) {
284
+ let n = V(H, e.__scopeDialog), r = I.useRef(null), i = p(t, n.contentRef, r);
285
+ return I.useEffect(() => {
286
286
  let e = r.current;
287
- if (e) return le(e);
288
- }, []), /* @__PURE__ */ (0, R.jsx)(Bn, {
287
+ if (e) return j(e);
288
+ }, []), /* @__PURE__ */ (0, z.jsx)(Rn, {
289
289
  ...e,
290
290
  ref: i,
291
291
  trapFocus: n.open,
@@ -299,9 +299,9 @@ var Ve = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "キャンセル" : "
299
299
  }),
300
300
  onFocusOutside: f(e.onFocusOutside, (e) => e.preventDefault())
301
301
  });
302
- }, "DialogContentModal")), zn = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ z(function(e, t) {
303
- let n = B(V, e.__scopeDialog), r = L.useRef(!1), i = L.useRef(!1);
304
- return /* @__PURE__ */ (0, R.jsx)(Bn, {
302
+ }, "DialogContentModal")), Ln = /* @__PURE__ */ I.forwardRef(/* @__PURE__ */ B(function(e, t) {
303
+ let n = V(H, e.__scopeDialog), r = I.useRef(!1), i = I.useRef(!1);
304
+ return /* @__PURE__ */ (0, z.jsx)(Rn, {
305
305
  ...e,
306
306
  ref: t,
307
307
  trapFocus: !1,
@@ -315,23 +315,23 @@ var Ve = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "キャンセル" : "
315
315
  n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
316
316
  }
317
317
  });
318
- }, "DialogContentNonModal")), Bn = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ z(function(e, t) {
319
- let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, "aria-describedby": o, children: s, ...c } = e, l = B(V, n);
320
- return A(), /* @__PURE__ */ (0, R.jsx)(be, {
318
+ }, "DialogContentNonModal")), Rn = /* @__PURE__ */ I.forwardRef(/* @__PURE__ */ B(function(e, t) {
319
+ let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, "aria-describedby": o, children: s, ...c } = e, l = V(H, n);
320
+ return oe(), /* @__PURE__ */ (0, z.jsx)(Se, {
321
321
  registry: l.branchRegistry,
322
- children: /* @__PURE__ */ (0, R.jsx)(_e, {
322
+ children: /* @__PURE__ */ (0, z.jsx)(ye, {
323
323
  asChild: !0,
324
324
  loop: !0,
325
325
  trapped: r,
326
326
  branches: l.branchNodes,
327
327
  onMountAutoFocus: i,
328
328
  onUnmountAutoFocus: a,
329
- children: /* @__PURE__ */ (0, R.jsx)(T, {
329
+ children: /* @__PURE__ */ (0, z.jsx)(T, {
330
330
  role: "dialog",
331
331
  id: l.contentId,
332
332
  "aria-labelledby": l.titlePresent ? l.titleId : void 0,
333
- "aria-describedby": l.descriptionPresent ? Gn(o, l.descriptionId) : o,
334
- "data-state": Kn(l.open),
333
+ "aria-describedby": l.descriptionPresent ? Un(o, l.descriptionId) : o,
334
+ "data-state": Wn(l.open),
335
335
  ...c,
336
336
  ref: t,
337
337
  deferPointerDownOutside: !0,
@@ -340,42 +340,42 @@ var Ve = ((e = {}, t = {}) => (t.locale ?? r()) === "ja" ? "キャンセル" : "
340
340
  })
341
341
  })
342
342
  });
343
- }, "DialogContentImpl")), Vn = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ z(function(e, t) {
344
- let { __scopeDialog: n, ...r } = e, i = B("DialogTitle", n), { setTitleCount: a } = i;
345
- return o(() => (a((e) => e + 1), () => a((e) => e - 1)), [a]), /* @__PURE__ */ (0, R.jsx)(u.h2, {
343
+ }, "DialogContentImpl")), zn = /* @__PURE__ */ I.forwardRef(/* @__PURE__ */ B(function(e, t) {
344
+ let { __scopeDialog: n, ...r } = e, i = V("DialogTitle", n), { setTitleCount: a } = i;
345
+ return o(() => (a((e) => e + 1), () => a((e) => e - 1)), [a]), /* @__PURE__ */ (0, z.jsx)(u.h2, {
346
346
  id: i.titleId,
347
347
  ...r,
348
348
  ref: t
349
349
  });
350
- }, "DialogTitle")), Hn = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ z(function(e, t) {
351
- let { __scopeDialog: n, ...r } = e, i = B("DialogDescription", n), { setDescriptionCount: a } = i;
352
- return o(() => (a((e) => e + 1), () => a((e) => e - 1)), [a]), /* @__PURE__ */ (0, R.jsx)(u.p, {
350
+ }, "DialogTitle")), Bn = /* @__PURE__ */ I.forwardRef(/* @__PURE__ */ B(function(e, t) {
351
+ let { __scopeDialog: n, ...r } = e, i = V("DialogDescription", n), { setDescriptionCount: a } = i;
352
+ return o(() => (a((e) => e + 1), () => a((e) => e - 1)), [a]), /* @__PURE__ */ (0, z.jsx)(u.p, {
353
353
  id: i.descriptionId,
354
354
  ...r,
355
355
  ref: t
356
356
  });
357
- }, "DialogDescription")), Un = "DialogClose", Wn = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ z(function(e, t) {
358
- let { __scopeDialog: n, ...r } = e, i = B(Un, n);
359
- return /* @__PURE__ */ (0, R.jsx)(u.button, {
357
+ }, "DialogDescription")), Vn = "DialogClose", Hn = /* @__PURE__ */ I.forwardRef(/* @__PURE__ */ B(function(e, t) {
358
+ let { __scopeDialog: n, ...r } = e, i = V(Vn, n);
359
+ return /* @__PURE__ */ (0, z.jsx)(u.button, {
360
360
  type: "button",
361
361
  ...r,
362
362
  ref: t,
363
363
  onClick: f(e.onClick, () => i.onOpenChange(!1))
364
364
  });
365
365
  }, "DialogClose"));
366
- function Gn(...e) {
366
+ function Un(...e) {
367
367
  let t = /* @__PURE__ */ new Set();
368
368
  for (let n of e) if (typeof n == "string") for (let e of String(n).trim().split(/\s+/)) e && t.add(e);
369
369
  return t.size > 0 ? Array.from(t).join(" ") : void 0;
370
370
  }
371
- z(Gn, "concatAriaDescribedby");
372
- function Kn(e) {
371
+ B(Un, "concatAriaDescribedby");
372
+ function Wn(e) {
373
373
  return e ? "open" : "closed";
374
374
  }
375
- z(Kn, "getState");
375
+ B(Wn, "getState");
376
376
  //#endregion
377
377
  //#region node_modules/.pnpm/lucide-react@1.58.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left.mjs
378
- var qn = {
378
+ var Gn = {
379
379
  name: "arrow-left",
380
380
  size: 24,
381
381
  node: [["path", {
@@ -386,8 +386,8 @@ var qn = {
386
386
  key: "x3x0zl"
387
387
  }]]
388
388
  };
389
- qn.node;
390
- var Jn = k(qn), Yn = {
389
+ Gn.node;
390
+ var Kn = D(Gn), qn = {
391
391
  name: "arrow-up-right",
392
392
  size: 24,
393
393
  node: [["path", {
@@ -398,8 +398,8 @@ var Jn = k(qn), Yn = {
398
398
  key: "1vkiza"
399
399
  }]]
400
400
  };
401
- Yn.node;
402
- var Xn = k(Yn), Zn = {
401
+ qn.node;
402
+ var Jn = D(qn), Yn = {
403
403
  name: "calendar",
404
404
  size: 24,
405
405
  node: [
@@ -425,8 +425,8 @@ var Xn = k(Yn), Zn = {
425
425
  }]
426
426
  ]
427
427
  };
428
- Zn.node;
429
- var Qn = k(Zn), $n = {
428
+ Yn.node;
429
+ var Xn = D(Yn), Zn = {
430
430
  name: "clock",
431
431
  size: 24,
432
432
  node: [["circle", {
@@ -439,8 +439,8 @@ var Qn = k(Zn), $n = {
439
439
  key: "mmk7yg"
440
440
  }]]
441
441
  };
442
- $n.node;
443
- var er = k($n), tr = {
442
+ Zn.node;
443
+ var Qn = D(Zn), $n = {
444
444
  name: "trash",
445
445
  size: 24,
446
446
  node: [
@@ -467,8 +467,8 @@ var er = k($n), tr = {
467
467
  ],
468
468
  aliases: ["trash-2"]
469
469
  };
470
- tr.node;
471
- var nr = k(tr), rr = {
470
+ $n.node;
471
+ var er = D($n), tr = {
472
472
  name: "type",
473
473
  size: 24,
474
474
  node: [
@@ -486,8 +486,8 @@ var nr = k(tr), rr = {
486
486
  }]
487
487
  ]
488
488
  };
489
- rr.node;
490
- var ir = k(rr), ar = {
489
+ tr.node;
490
+ var nr = D(tr), rr = {
491
491
  name: "x",
492
492
  size: 24,
493
493
  node: [["path", {
@@ -498,12 +498,12 @@ var ir = k(rr), ar = {
498
498
  key: "d8bk6v"
499
499
  }]]
500
500
  };
501
- ar.node;
502
- var H = k(ar);
501
+ rr.node;
502
+ var U = D(rr);
503
503
  //#endregion
504
504
  //#region ui/src/components/ui/input.tsx
505
- function U({ className: e, type: t, ...n }) {
506
- return /* @__PURE__ */ (0, R.jsx)("input", {
505
+ function W({ className: e, type: t, ...n }) {
506
+ return /* @__PURE__ */ (0, z.jsx)("input", {
507
507
  type: t,
508
508
  "data-slot": "input",
509
509
  className: m("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30", "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", e),
@@ -512,81 +512,81 @@ function U({ className: e, type: t, ...n }) {
512
512
  }
513
513
  //#endregion
514
514
  //#region ui/src/components/ui/dialog.tsx
515
- function or({ ...e }) {
516
- return /* @__PURE__ */ (0, R.jsx)(On, {
515
+ function ir({ ...e }) {
516
+ return /* @__PURE__ */ (0, z.jsx)(En, {
517
517
  "data-slot": "dialog",
518
518
  ...e
519
519
  });
520
520
  }
521
- function sr({ ...e }) {
522
- return /* @__PURE__ */ (0, R.jsx)(Mn, {
521
+ function ar({ ...e }) {
522
+ return /* @__PURE__ */ (0, z.jsx)(An, {
523
523
  "data-slot": "dialog-portal",
524
524
  ...e
525
525
  });
526
526
  }
527
- function cr({ className: e, ...t }) {
528
- return /* @__PURE__ */ (0, R.jsx)(Pn, {
527
+ function or({ className: e, ...t }) {
528
+ return /* @__PURE__ */ (0, z.jsx)(Mn, {
529
529
  "data-slot": "dialog-overlay",
530
530
  className: m("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", e),
531
531
  ...t
532
532
  });
533
533
  }
534
- var lr = "flex flex-col gap-0 overflow-hidden p-0 max-md:overflow-hidden md:max-h-[85vh]", ur = "shrink-0 border-t bg-background px-6 py-3 max-md:pb-[calc(0.75rem+env(safe-area-inset-bottom))]";
535
- function dr({ className: e, children: t, showCloseButton: n = !0, pinned: r = !1, ...i }) {
536
- return /* @__PURE__ */ (0, R.jsxs)(sr, {
534
+ var sr = "flex flex-col gap-0 overflow-hidden p-0 max-md:overflow-hidden md:max-h-[85vh]", cr = "shrink-0 border-t bg-background px-6 py-3 max-md:pb-[calc(0.75rem+env(safe-area-inset-bottom))]";
535
+ function lr({ className: e, children: t, showCloseButton: n = !0, pinned: r = !1, ...i }) {
536
+ return /* @__PURE__ */ (0, z.jsxs)(ar, {
537
537
  "data-slot": "dialog-portal",
538
- children: [/* @__PURE__ */ (0, R.jsx)(cr, {}), /* @__PURE__ */ (0, R.jsxs)(Ln, {
538
+ children: [/* @__PURE__ */ (0, z.jsx)(or, {}), /* @__PURE__ */ (0, z.jsxs)(Fn, {
539
539
  "data-slot": "dialog-content",
540
- className: m("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg", "max-md:inset-0 max-md:top-0 max-md:left-0 max-md:h-dvh max-md:max-w-none max-md:translate-x-0 max-md:translate-y-0 max-md:flex max-md:flex-col max-md:overflow-auto max-md:rounded-none max-md:border-0 max-md:pt-[calc(1.5rem+env(safe-area-inset-top))]", r && lr, e),
540
+ className: m("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg", "max-md:inset-0 max-md:top-0 max-md:left-0 max-md:h-dvh max-md:max-w-none max-md:translate-x-0 max-md:translate-y-0 max-md:flex max-md:flex-col max-md:overflow-auto max-md:rounded-none max-md:border-0 max-md:pt-[calc(1.5rem+env(safe-area-inset-top))]", r && sr, e),
541
541
  ...i,
542
- children: [t, n && /* @__PURE__ */ (0, R.jsxs)(Wn, {
542
+ children: [t, n && /* @__PURE__ */ (0, z.jsxs)(Hn, {
543
543
  "data-slot": "dialog-close",
544
544
  className: "absolute top-4 right-4 rounded-xs max-md:top-[calc(0.75rem+env(safe-area-inset-top))] max-md:right-2 max-md:grid max-md:size-10 max-md:place-items-center opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
545
- children: [/* @__PURE__ */ (0, R.jsx)(H, {}), /* @__PURE__ */ (0, R.jsx)("span", {
545
+ children: [/* @__PURE__ */ (0, z.jsx)(U, {}), /* @__PURE__ */ (0, z.jsx)("span", {
546
546
  className: "sr-only",
547
- children: He()
547
+ children: L()
548
548
  })]
549
549
  })]
550
550
  })]
551
551
  });
552
552
  }
553
- function fr({ className: e, pinned: t = !1, ...n }) {
554
- return /* @__PURE__ */ (0, R.jsx)("div", {
553
+ function ur({ className: e, pinned: t = !1, ...n }) {
554
+ return /* @__PURE__ */ (0, z.jsx)("div", {
555
555
  "data-slot": "dialog-header",
556
556
  className: m("flex flex-col gap-2 text-center sm:text-left", t && "shrink-0 border-b px-6 pt-6 pr-12 pb-4 max-md:pt-0", e),
557
557
  ...n
558
558
  });
559
559
  }
560
- function pr({ className: e, ...t }) {
561
- return /* @__PURE__ */ (0, R.jsx)("div", {
560
+ function dr({ className: e, ...t }) {
561
+ return /* @__PURE__ */ (0, z.jsx)("div", {
562
562
  "data-slot": "dialog-body",
563
563
  className: m("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 py-4", e),
564
564
  ...t
565
565
  });
566
566
  }
567
- function mr({ className: e, showCloseButton: t = !1, pinned: n = !1, children: r, ...i }) {
568
- return /* @__PURE__ */ (0, R.jsxs)("div", {
567
+ function fr({ className: e, showCloseButton: t = !1, pinned: n = !1, children: r, ...i }) {
568
+ return /* @__PURE__ */ (0, z.jsxs)("div", {
569
569
  "data-slot": "dialog-footer",
570
- className: m("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", n ? ur : "max-md:sticky max-md:bottom-0 max-md:-mx-6 max-md:-mb-6 max-md:mt-auto max-md:border-t max-md:bg-background max-md:px-6 max-md:pt-3 max-md:pb-[calc(0.75rem+env(safe-area-inset-bottom))]", e),
570
+ className: m("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", n ? cr : "max-md:sticky max-md:bottom-0 max-md:-mx-6 max-md:-mb-6 max-md:mt-auto max-md:border-t max-md:bg-background max-md:px-6 max-md:pt-3 max-md:pb-[calc(0.75rem+env(safe-area-inset-bottom))]", e),
571
571
  ...i,
572
- children: [r, t && /* @__PURE__ */ (0, R.jsx)(Wn, {
572
+ children: [r, t && /* @__PURE__ */ (0, z.jsx)(Hn, {
573
573
  asChild: !0,
574
- children: /* @__PURE__ */ (0, R.jsx)(j, {
574
+ children: /* @__PURE__ */ (0, z.jsx)(k, {
575
575
  variant: "outline",
576
- children: He()
576
+ children: L()
577
577
  })
578
578
  })]
579
579
  });
580
580
  }
581
- function hr({ className: e, ...t }) {
582
- return /* @__PURE__ */ (0, R.jsx)(Vn, {
581
+ function pr({ className: e, ...t }) {
582
+ return /* @__PURE__ */ (0, z.jsx)(zn, {
583
583
  "data-slot": "dialog-title",
584
584
  className: m("text-lg leading-none font-semibold", e),
585
585
  ...t
586
586
  });
587
587
  }
588
- function gr({ className: e, ...t }) {
589
- return /* @__PURE__ */ (0, R.jsx)(Hn, {
588
+ function mr({ className: e, ...t }) {
589
+ return /* @__PURE__ */ (0, z.jsx)(Bn, {
590
590
  "data-slot": "dialog-description",
591
591
  className: m("text-sm text-muted-foreground", e),
592
592
  ...t
@@ -594,7 +594,7 @@ function gr({ className: e, ...t }) {
594
594
  }
595
595
  //#endregion
596
596
  //#region ui/src/components/ui/field.ts
597
- var _r = "text-[12px] font-semibold tracking-wider text-muted-foreground uppercase max-md:text-[13px]", vr = "text-[12px] font-semibold text-muted-foreground max-md:text-[13px]", yr = "h-9 rounded-md border bg-background px-2 text-base md:text-sm", br = "w-56 max-md:w-full", xr = "inline-flex items-center rounded-full bg-chip py-0.5 pr-1 pl-2.5 text-[13px] text-chip-foreground", Sr = /^(\d{4})-(\d{2})-(\d{2})$/, Cr = /^(\d{4}-\d{2}-\d{2})([T ])(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-](\d{2}):(\d{2}))?$/, wr = [
597
+ var hr = "text-[12px] font-semibold tracking-wider text-muted-foreground uppercase max-md:text-[13px]", gr = "text-[12px] font-semibold text-muted-foreground max-md:text-[13px]", _r = "h-9 rounded-md border bg-background px-2 text-base md:text-sm", vr = "w-56 max-md:w-full", yr = "inline-flex items-center rounded-full bg-chip py-0.5 pr-1 pl-2.5 text-[13px] text-chip-foreground", br = /^(\d{4})-(\d{2})-(\d{2})$/, xr = /^(\d{4}-\d{2}-\d{2})([T ])(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-](\d{2}):(\d{2}))?$/, Sr = [
598
598
  31,
599
599
  28,
600
600
  31,
@@ -607,24 +607,24 @@ var _r = "text-[12px] font-semibold tracking-wider text-muted-foreground upperca
607
607
  31,
608
608
  30,
609
609
  31
610
- ], Tr = (e) => e % 4 == 0 && e % 100 != 0 || e % 400 == 0;
611
- function Er(e) {
610
+ ], Cr = (e) => e % 4 == 0 && e % 100 != 0 || e % 400 == 0;
611
+ function wr(e) {
612
612
  if (typeof e != "string") return !1;
613
- let t = Sr.exec(e);
613
+ let t = br.exec(e);
614
614
  if (!t) return !1;
615
615
  let [n, r, i] = [
616
616
  Number(t[1]),
617
617
  Number(t[2]),
618
618
  Number(t[3])
619
619
  ];
620
- return r < 1 || r > 12 || i < 1 ? !1 : i <= (r === 2 && Tr(n) ? 29 : wr[r - 1]);
620
+ return r < 1 || r > 12 || i < 1 ? !1 : i <= (r === 2 && Cr(n) ? 29 : Sr[r - 1]);
621
621
  }
622
- function W(e) {
622
+ function G(e) {
623
623
  if (typeof e != "string") return null;
624
- let t = Cr.exec(e);
624
+ let t = xr.exec(e);
625
625
  if (!t) return null;
626
626
  let [, n, r, i, a, o, s, c, l, u] = t;
627
- return !Er(n) || Number(i) > 23 || Number(a) > 59 || o !== void 0 && Number(o) > 59 || l !== void 0 && (Number(l) > 23 || Number(u) > 59) ? null : {
627
+ return !wr(n) || Number(i) > 23 || Number(a) > 59 || o !== void 0 && Number(o) > 59 || l !== void 0 && (Number(l) > 23 || Number(u) > 59) ? null : {
628
628
  date: n,
629
629
  sep: r,
630
630
  hour: i,
@@ -634,22 +634,22 @@ function W(e) {
634
634
  offset: c ?? null
635
635
  };
636
636
  }
637
- var Dr = (e) => W(e) !== null;
638
- function Or(e) {
637
+ var Tr = (e) => G(e) !== null;
638
+ function Er(e) {
639
639
  let t = e.second === null ? "" : `:${e.second}${e.fraction === null ? "" : `.${e.fraction}`}`;
640
640
  return `${e.date}${e.sep}${e.hour}:${e.minute}${t}${e.offset ?? ""}`;
641
641
  }
642
- function kr(e) {
643
- if (Er(e)) return Date.parse(`${e}T00:00:00Z`);
644
- let t = W(e);
642
+ function Dr(e) {
643
+ if (wr(e)) return Date.parse(`${e}T00:00:00Z`);
644
+ let t = G(e);
645
645
  if (!t) return null;
646
646
  let n = (t.fraction ?? "").padEnd(3, "0").slice(0, 3);
647
647
  return Date.parse(`${t.date}T${t.hour}:${t.minute}:${t.second ?? "00"}.${n}${t.offset ?? "Z"}`);
648
648
  }
649
649
  //#endregion
650
650
  //#region ui/src/components/ui/textarea.tsx
651
- function Ar({ className: e, ...t }) {
652
- return /* @__PURE__ */ (0, R.jsx)("textarea", {
651
+ function Or({ className: e, ...t }) {
652
+ return /* @__PURE__ */ (0, z.jsx)("textarea", {
653
653
  "data-slot": "textarea",
654
654
  className: m("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40", e),
655
655
  ...t
@@ -657,9 +657,9 @@ function Ar({ className: e, ...t }) {
657
657
  }
658
658
  //#endregion
659
659
  //#region ui/src/lib/datetime.ts
660
- var jr = /^(\d{4}-\d{2}-\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/, Mr = (e) => String(e).padStart(2, "0");
661
- function Nr(e) {
662
- let t = W(e);
660
+ var kr = /^(\d{4}-\d{2}-\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/, Ar = (e) => String(e).padStart(2, "0");
661
+ function jr(e) {
662
+ let t = G(e);
663
663
  if (!t || t.fraction !== null && t.fraction.length > 3) return null;
664
664
  let n = t.second === null ? "" : `:${t.second}${t.fraction === null ? "" : `.${t.fraction}`}`, r = t.fraction === null ? t.second === null ? 60 : 1 : .001;
665
665
  return {
@@ -667,15 +667,15 @@ function Nr(e) {
667
667
  step: r
668
668
  };
669
669
  }
670
- function Pr(e, t, n) {
670
+ function Mr(e, t, n) {
671
671
  let [r, i, a] = e.split("-").map(Number), o = -new Date(r, i - 1, a, Number(t), Number(n)).getTimezoneOffset(), s = Math.abs(o);
672
- return `${o < 0 ? "-" : "+"}${Mr(Math.floor(s / 60))}:${Mr(s % 60)}`;
672
+ return `${o < 0 ? "-" : "+"}${Ar(Math.floor(s / 60))}:${Ar(s % 60)}`;
673
673
  }
674
- function Fr(e, t, n = Pr) {
675
- let r = jr.exec(e);
674
+ function Nr(e, t, n = Mr) {
675
+ let r = kr.exec(e);
676
676
  if (!r) return null;
677
- let [, i, a, o, s, c] = r, l = t === null ? null : W(t);
678
- if (!l) return Or({
677
+ let [, i, a, o, s, c] = r, l = t === null ? null : G(t);
678
+ if (!l) return Er({
679
679
  date: i,
680
680
  sep: "T",
681
681
  hour: a,
@@ -685,7 +685,7 @@ function Fr(e, t, n = Pr) {
685
685
  offset: n(i, a, o)
686
686
  });
687
687
  let u = l.fraction?.length ?? 0, d = (c ?? "").replace(/0+$/, "").length;
688
- return Or({
688
+ return Er({
689
689
  date: i,
690
690
  sep: l.sep,
691
691
  hour: a,
@@ -695,40 +695,40 @@ function Fr(e, t, n = Pr) {
695
695
  offset: l.offset
696
696
  });
697
697
  }
698
- var Ir = (e) => {
698
+ var Pr = (e) => {
699
699
  let t = /^([+-])(\d{2}):(\d{2})$/.exec(e ?? "");
700
700
  return t ? (t[1] === "-" ? -1 : 1) * (Number(t[2]) * 60 + Number(t[3])) : 0;
701
701
  };
702
- function Lr(e, t) {
702
+ function Fr(e, t) {
703
703
  if (typeof e != "string") return;
704
- let n = kr(e);
704
+ let n = Dr(e);
705
705
  if (n === null) return;
706
- let r = new Date(n + Ir(t) * 6e4).toISOString(), i = W(e), a = i?.second == null ? "" : i.fraction === null ? r.slice(16, 19) : r.slice(16, 23);
706
+ let r = new Date(n + Pr(t) * 6e4).toISOString(), i = G(e), a = i?.second == null ? "" : i.fraction === null ? r.slice(16, 19) : r.slice(16, 23);
707
707
  return `${r.slice(0, 16)}${a}`;
708
708
  }
709
709
  //#endregion
710
710
  //#region src/rules.ts
711
- function Rr(e, t) {
712
- return t === "date" ? Er(e) ? null : "not a date" : t === "datetime" ? Dr(e) ? null : "not a datetime" : t === "list" ? Array.isArray(e) ? null : "not a list" : t === "map" ? typeof e == "object" && e && !Array.isArray(e) ? null : "not a map" : null;
711
+ function Ir(e, t) {
712
+ return t === "date" ? wr(e) ? null : "not a date" : t === "datetime" ? Tr(e) ? null : "not a datetime" : t === "list" ? Array.isArray(e) ? null : "not a list" : t === "map" ? typeof e == "object" && e && !Array.isArray(e) ? null : "not a map" : null;
713
713
  }
714
- function zr(e, t) {
715
- return t === "date" || t === "datetime" ? Rr(e, t) === null ? kr(e) : null : typeof e == "number" ? e : typeof e == "bigint" ? Number(e) : null;
714
+ function Lr(e, t) {
715
+ return t === "date" || t === "datetime" ? Ir(e, t) === null ? Dr(e) : null : typeof e == "number" ? e : typeof e == "bigint" ? Number(e) : null;
716
716
  }
717
- var Br = (e) => typeof e == "number" ? e : kr(e);
718
- function Vr(e, t, n, r) {
719
- let i = zr(e, t);
720
- return i === null ? null : n !== void 0 && i < Br(n) ? `below min ${n}` : r !== void 0 && i > Br(r) ? `above max ${r}` : null;
717
+ var Rr = (e) => typeof e == "number" ? e : Dr(e);
718
+ function zr(e, t, n, r) {
719
+ let i = Lr(e, t);
720
+ return i === null ? null : n !== void 0 && i < Rr(n) ? `below min ${n}` : r !== void 0 && i > Rr(r) ? `above max ${r}` : null;
721
721
  }
722
722
  //#endregion
723
723
  //#region ui/src/lib/form.ts
724
- var Hr = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ur = (e) => Array.isArray(e) && e.every((e) => typeof e == "string");
725
- function Wr(e) {
726
- return Ee(e) ? !0 : Array.isArray(e) ? Ur(e) : Hr(e) && Object.values(e).every(Wr);
724
+ var Br = (e) => typeof e == "object" && !!e && !Array.isArray(e), Vr = (e) => Array.isArray(e) && e.every((e) => typeof e == "string");
725
+ function Hr(e) {
726
+ return De(e) ? !0 : Array.isArray(e) ? Vr(e) : Br(e) && Object.values(e).every(Hr);
727
727
  }
728
- function Gr(e, t, n, r) {
729
- return n ? "ref" : r === "date" && (e == null || Er(e)) ? "date" : r === "datetime" && (e == null || typeof e == "string" && Nr(e) !== null) ? "datetime" : e == null ? r === "map" ? "map" : "unset" : typeof e == "boolean" ? "switch" : typeof e == "number" ? "number" : typeof e == "string" ? t === "INTEGER" && /^-?\d+$/.test(e) ? "bigint" : r === "markdown" ? "markdown" : e.includes("\n") || e.length > 80 ? "textarea" : "text" : Ur(e) ? "chips" : Hr(e) && Wr(e) ? "map" : "json";
728
+ function Ur(e, t, n, r) {
729
+ return n ? "ref" : r === "date" && (e == null || wr(e)) ? "date" : r === "datetime" && (e == null || typeof e == "string" && jr(e) !== null) ? "datetime" : e == null ? r === "map" ? "map" : "unset" : typeof e == "boolean" ? "switch" : typeof e == "number" ? "number" : typeof e == "string" ? t === "INTEGER" && /^-?\d+$/.test(e) ? "bigint" : r === "markdown" ? "markdown" : e.includes("\n") || e.length > 80 ? "textarea" : "text" : Vr(e) ? "chips" : Br(e) && Hr(e) ? "map" : "json";
730
730
  }
731
- function Kr(e) {
731
+ function Wr(e) {
732
732
  switch (e) {
733
733
  case "BOOLEAN": return !1;
734
734
  case "INTEGER":
@@ -737,57 +737,57 @@ function Kr(e) {
737
737
  case "TEXT": return "";
738
738
  }
739
739
  }
740
- function qr(e) {
741
- return JSON.stringify(e ?? null, (e, t) => Hr(t) ? Object.fromEntries(Object.keys(t).sort().map((e) => [e, t[e]])) : t);
740
+ function Gr(e) {
741
+ return JSON.stringify(e ?? null, (e, t) => Br(t) ? Object.fromEntries(Object.keys(t).sort().map((e) => [e, t[e]])) : t);
742
742
  }
743
- function G(e, t) {
744
- return [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].filter((n) => qr(e[n]) !== qr(t[n]));
743
+ function K(e, t) {
744
+ return [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].filter((n) => Gr(e[n]) !== Gr(t[n]));
745
745
  }
746
- function Jr(e, t) {
747
- let n = G(e, t);
746
+ function Kr(e, t) {
747
+ let n = K(e, t);
748
748
  return {
749
749
  values: Object.fromEntries(n.map((e) => [e, t[e] ?? null])),
750
750
  base: Object.fromEntries(n.map((t) => [t, e[t] ?? null]))
751
751
  };
752
752
  }
753
- function Yr(e, t, n) {
753
+ function qr(e, t, n) {
754
754
  if (t.length === 0) return n;
755
755
  let [r, ...i] = t;
756
756
  if (Array.isArray(e)) {
757
757
  let t = [...e];
758
- return t[r] = Yr(t[r], i, n), t;
758
+ return t[r] = qr(t[r], i, n), t;
759
759
  }
760
- let a = Hr(e) ? e : {};
760
+ let a = Br(e) ? e : {};
761
761
  return {
762
762
  ...a,
763
- [r]: Yr(a[r], i, n)
763
+ [r]: qr(a[r], i, n)
764
764
  };
765
765
  }
766
- function Xr(e, t, n, r) {
767
- return e == null ? null : Rr(e, t) ?? Vr(e, t, n, r);
766
+ function Jr(e, t, n, r) {
767
+ return e == null ? null : Ir(e, t) ?? zr(e, t, n, r);
768
768
  }
769
769
  //#endregion
770
770
  //#region ui/src/components/ChipsInput.tsx
771
- function Zr({ label: e, value: t, onChange: n, placeholder: r = Ye(), removeLabel: i = (e) => pt({ item: e }), accept: a = () => !0, unique: o = !1, invalid: s = !1 }) {
772
- let [c, l] = (0, L.useState)(""), u = () => {
771
+ function Yr({ label: e, value: t, onChange: n, placeholder: r = Je(), removeLabel: i = (e) => ft({ item: e }), accept: a = () => !0, unique: o = !1, invalid: s = !1 }) {
772
+ let [c, l] = (0, I.useState)(""), u = () => {
773
773
  let e = c.trim();
774
774
  if (e === "") return l("");
775
775
  a(e) && (o && t.includes(e) || n([...t, e]), l(""));
776
776
  };
777
- return /* @__PURE__ */ (0, R.jsxs)("div", {
777
+ return /* @__PURE__ */ (0, z.jsxs)("div", {
778
778
  className: `flex min-h-9 flex-wrap items-center gap-1 rounded-md border ${s ? "border-warn" : ""} bg-background px-1.5 py-1 transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50`,
779
779
  children: [
780
- t.map((e, r) => /* @__PURE__ */ (0, R.jsxs)("span", {
781
- className: xr,
782
- children: [e, /* @__PURE__ */ (0, R.jsx)("button", {
780
+ t.map((e, r) => /* @__PURE__ */ (0, z.jsxs)("span", {
781
+ className: yr,
782
+ children: [e, /* @__PURE__ */ (0, z.jsx)("button", {
783
783
  type: "button",
784
784
  "aria-label": i(e),
785
785
  className: "ml-1 opacity-60 hover:opacity-100 max-md:grid max-md:size-7 max-md:place-items-center",
786
786
  onClick: () => n(t.filter((e, t) => t !== r)),
787
- children: /* @__PURE__ */ (0, R.jsx)(H, { className: "size-3" })
787
+ children: /* @__PURE__ */ (0, z.jsx)(U, { className: "size-3" })
788
788
  })]
789
789
  }, `${r}-${e}`)),
790
- /* @__PURE__ */ (0, R.jsx)("input", {
790
+ /* @__PURE__ */ (0, z.jsx)("input", {
791
791
  "aria-label": e,
792
792
  className: "min-w-32 flex-1 bg-transparent px-1 text-base outline-none placeholder:text-muted-foreground md:text-sm",
793
793
  placeholder: r,
@@ -798,20 +798,20 @@ function Zr({ label: e, value: t, onChange: n, placeholder: r = Ye(), removeLabe
798
798
  },
799
799
  onBlur: u
800
800
  }),
801
- c.trim() !== "" && /* @__PURE__ */ (0, R.jsx)("button", {
801
+ c.trim() !== "" && /* @__PURE__ */ (0, z.jsx)("button", {
802
802
  type: "button",
803
- "aria-label": Qe({ field: e }),
803
+ "aria-label": Ze({ field: e }),
804
804
  className: "rounded-md px-2 text-[13px] text-muted-foreground md:hidden",
805
805
  onMouseDown: (e) => e.preventDefault(),
806
806
  onClick: u,
807
- children: Je()
807
+ children: qe()
808
808
  })
809
809
  ]
810
810
  });
811
811
  }
812
812
  //#endregion
813
813
  //#region ui/src/lib/references.ts
814
- function Qr(e, t, n) {
814
+ function Xr(e, t, n) {
815
815
  let r = t?.find((t) => t.name === e.table)?.key;
816
816
  return e.target === void 0 || e.target === r ? { key: n } : { filter: [{
817
817
  col: e.target,
@@ -821,12 +821,12 @@ function Qr(e, t, n) {
821
821
  }
822
822
  //#endregion
823
823
  //#region ui/src/components/RefLink.tsx
824
- function $r({ reference: e, value: t, className: n, children: r }) {
824
+ function Zr({ reference: e, value: t, className: n, children: r }) {
825
825
  let { data: i } = x();
826
- return /* @__PURE__ */ (0, R.jsx)(ue, {
826
+ return /* @__PURE__ */ (0, z.jsx)(de, {
827
827
  to: "/t/$table",
828
828
  params: { table: e.table },
829
- search: Qr(e, i?.tables, t),
829
+ search: Xr(e, i?.tables, t),
830
830
  "aria-label": `open ${e.table} ${t}`,
831
831
  className: n ?? "text-tomato underline-offset-2 hover:underline",
832
832
  onClick: (e) => e.stopPropagation(),
@@ -835,37 +835,37 @@ function $r({ reference: e, value: t, className: n, children: r }) {
835
835
  }
836
836
  //#endregion
837
837
  //#region ui/src/lib/appMode.ts
838
- var ei = () => Ie({
838
+ var Qr = () => Le({
839
839
  from: "__root__",
840
840
  select: (e) => e.app !== void 0
841
- }), ti = (0, L.createContext)(!1), ni = () => (0, L.useContext)(ti), ri, ii = (e) => {
841
+ }), $r = (0, I.createContext)(!1), ei = () => (0, I.useContext)($r), ti, ni = (e) => {
842
+ ti = e;
843
+ }, ri, ii = (e) => {
842
844
  ri = e;
843
- }, ai, oi = (e) => {
844
- ai = e;
845
- }, si = () => ai;
846
- function ci(e, t = document.baseURI) {
847
- return ri === null ? null : ri ? ri(e) : new URL(`-/apps/${encodeURIComponent(e)}/`, t).toString();
845
+ }, ai = () => ri;
846
+ function oi(e, t = document.baseURI) {
847
+ return ti === null ? null : ti ? ti(e) : new URL(`-/apps/${encodeURIComponent(e)}/`, t).toString();
848
848
  }
849
849
  //#endregion
850
850
  //#region ui/src/components/FormField.tsx
851
- var K = (e) => e.join("."), li = (0, L.lazy)(() => import("./MarkdownField-DTAEh2oz.js"));
852
- function ui({ path: e, value: t, problem: n, onChange: r, onValidity: a, readOnly: o }) {
853
- let [s, c] = (0, L.useState)(() => JSON.stringify(t, null, 2)), [l, u] = (0, L.useState)(null), d = i(), f = (0, L.useRef)(JSON.stringify(t)), p = (0, L.useRef)(a);
851
+ var q = (e) => e.join("."), si = (0, I.lazy)(() => import("./MarkdownField-DTAEh2oz.js"));
852
+ function ci({ path: e, value: t, problem: n, onChange: r, onValidity: a, readOnly: o }) {
853
+ let [s, c] = (0, I.useState)(() => JSON.stringify(t, null, 2)), [l, u] = (0, I.useState)(null), d = i(), f = (0, I.useRef)(JSON.stringify(t)), p = (0, I.useRef)(a);
854
854
  p.current = a;
855
- let m = K(e);
856
- return (0, L.useEffect)(() => {
855
+ let m = q(e);
856
+ return (0, I.useEffect)(() => {
857
857
  JSON.stringify(t) !== f.current && (f.current = JSON.stringify(t), c(JSON.stringify(t, null, 2)), u(null), p.current?.(m, !0));
858
- }, [t, m]), (0, L.useEffect)(() => () => p.current?.(m, !0), [m]), /* @__PURE__ */ (0, R.jsxs)("div", { children: [/* @__PURE__ */ (0, R.jsx)(ke, {
858
+ }, [t, m]), (0, I.useEffect)(() => () => p.current?.(m, !0), [m]), /* @__PURE__ */ (0, z.jsxs)("div", { children: [/* @__PURE__ */ (0, z.jsx)(Ae, {
859
859
  "aria-label": m,
860
860
  value: s,
861
- extensions: [we(), Se.lineWrapping],
861
+ extensions: [Ee(), we.lineWrapping],
862
862
  theme: d,
863
863
  editable: !o,
864
864
  basicSetup: {
865
865
  lineNumbers: !1,
866
866
  foldGutter: !1
867
867
  },
868
- className: `overflow-hidden rounded-md border text-[12px] ${J(n)}`,
868
+ className: `overflow-hidden rounded-md border text-[12px] ${Y(n)}`,
869
869
  onChange: (e) => {
870
870
  c(e);
871
871
  try {
@@ -875,44 +875,44 @@ function ui({ path: e, value: t, problem: n, onChange: r, onValidity: a, readOnl
875
875
  u(e instanceof Error ? e.message : String(e)), a?.(m, !1);
876
876
  }
877
877
  }
878
- }), l && /* @__PURE__ */ (0, R.jsx)("p", {
878
+ }), l && /* @__PURE__ */ (0, z.jsx)("p", {
879
879
  className: "mt-1 text-[11px] text-err",
880
880
  children: l
881
881
  })] });
882
882
  }
883
- var q = (e) => e === !0 ? "1" : e === !1 ? "0" : e == null ? "" : String(e);
884
- function di({ path: e, value: t, allowed: n, onChange: r, readOnly: i }) {
885
- let a = q(t), o = a !== "" && !n.some((e) => q(e) === a);
886
- return /* @__PURE__ */ (0, R.jsxs)("select", {
887
- "aria-label": K(e),
883
+ var J = (e) => e === !0 ? "1" : e === !1 ? "0" : e == null ? "" : String(e);
884
+ function li({ path: e, value: t, allowed: n, onChange: r, readOnly: i }) {
885
+ let a = J(t), o = a !== "" && !n.some((e) => J(e) === a);
886
+ return /* @__PURE__ */ (0, z.jsxs)("select", {
887
+ "aria-label": q(e),
888
888
  "aria-invalid": o || void 0,
889
889
  disabled: i,
890
- className: `${yr} w-full ${o ? "border-warn text-warn" : ""}`,
890
+ className: `${_r} w-full ${o ? "border-warn text-warn" : ""}`,
891
891
  value: a,
892
892
  onChange: (e) => {
893
893
  let t = e.target.value;
894
894
  if (t === "") return r(null);
895
- let i = n.find((e) => q(e) === t);
895
+ let i = n.find((e) => J(e) === t);
896
896
  i !== void 0 && r(i);
897
897
  },
898
898
  children: [
899
- /* @__PURE__ */ (0, R.jsx)("option", {
899
+ /* @__PURE__ */ (0, z.jsx)("option", {
900
900
  value: "",
901
901
  children: "—"
902
902
  }),
903
- o && /* @__PURE__ */ (0, R.jsx)("option", {
903
+ o && /* @__PURE__ */ (0, z.jsx)("option", {
904
904
  value: a,
905
905
  children: `${a} (not in values)`
906
906
  }),
907
- n.map((e, t) => /* @__PURE__ */ (0, R.jsx)("option", {
908
- value: q(e),
907
+ n.map((e, t) => /* @__PURE__ */ (0, z.jsx)("option", {
908
+ value: J(e),
909
909
  children: String(e)
910
- }, `${t}:${q(e)}`))
910
+ }, `${t}:${J(e)}`))
911
911
  ]
912
912
  });
913
913
  }
914
- function fi({ path: e, value: t, type: n, reference: r, onChange: i }) {
915
- let a = ni(), o = r?.table ?? "", s = r?.key, { data: c } = _({
914
+ function ui({ path: e, value: t, type: n, reference: r, onChange: i }) {
915
+ let a = ei(), o = r?.table ?? "", s = r?.key, { data: c } = _({
916
916
  queryKey: ["refKeys", o],
917
917
  queryFn: () => w.rows(o, {
918
918
  limit: 500,
@@ -920,42 +920,42 @@ function fi({ path: e, value: t, type: n, reference: r, onChange: i }) {
920
920
  filters: []
921
921
  }),
922
922
  enabled: o !== ""
923
- }), l = `ref-${K(e)}`, u = t == null ? "" : String(t);
924
- return /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [/* @__PURE__ */ (0, R.jsxs)("div", {
923
+ }), l = `ref-${q(e)}`, u = t == null ? "" : String(t);
924
+ return /* @__PURE__ */ (0, z.jsxs)(z.Fragment, { children: [/* @__PURE__ */ (0, z.jsxs)("div", {
925
925
  className: "flex items-center gap-1.5",
926
- children: [/* @__PURE__ */ (0, R.jsx)(U, {
927
- "aria-label": K(e),
926
+ children: [/* @__PURE__ */ (0, z.jsx)(W, {
927
+ "aria-label": q(e),
928
928
  list: l,
929
929
  value: u,
930
930
  onChange: (e) => {
931
931
  let t = e.target.value;
932
932
  if (t === "") return i(null);
933
933
  let r = Number(t);
934
- i(n === "INTEGER" && gi.test(t) && Number.isSafeInteger(r) ? r : t);
934
+ i(n === "INTEGER" && mi.test(t) && Number.isSafeInteger(r) ? r : t);
935
935
  }
936
- }), r && u !== "" && !a && /* @__PURE__ */ (0, R.jsx)($r, {
936
+ }), r && u !== "" && !a && /* @__PURE__ */ (0, z.jsx)(Zr, {
937
937
  reference: r,
938
938
  value: u,
939
939
  className: "shrink-0 text-muted-foreground hover:text-foreground max-md:grid max-md:size-9 max-md:place-items-center max-md:text-foreground",
940
- children: /* @__PURE__ */ (0, R.jsx)(Xn, { className: "size-4" })
940
+ children: /* @__PURE__ */ (0, z.jsx)(Jn, { className: "size-4" })
941
941
  })]
942
- }), /* @__PURE__ */ (0, R.jsx)("datalist", {
942
+ }), /* @__PURE__ */ (0, z.jsx)("datalist", {
943
943
  id: l,
944
- children: s !== void 0 && [...new Set(c?.rows.flatMap((e) => e[s] == null ? [] : [String(e[s])]))].map((e) => /* @__PURE__ */ (0, R.jsx)("option", { value: e }, e))
944
+ children: s !== void 0 && [...new Set(c?.rows.flatMap((e) => e[s] == null ? [] : [String(e[s])]))].map((e) => /* @__PURE__ */ (0, z.jsx)("option", { value: e }, e))
945
945
  })] });
946
946
  }
947
- function pi(e) {
948
- let { path: t, value: n, problem: r, onChange: i } = e, a = Object.entries(n ?? {}), [o, s] = (0, L.useState)(null);
949
- return /* @__PURE__ */ (0, R.jsxs)("div", {
950
- className: `rounded-lg border bg-panel px-2.5 pt-2.5 pb-1 ${J(r)}`,
951
- children: [a.map(([r, a]) => /* @__PURE__ */ (0, R.jsxs)("div", {
947
+ function di(e) {
948
+ let { path: t, value: n, problem: r, onChange: i } = e, a = Object.entries(n ?? {}), [o, s] = (0, I.useState)(null);
949
+ return /* @__PURE__ */ (0, z.jsxs)("div", {
950
+ className: `rounded-lg border bg-panel px-2.5 pt-2.5 pb-1 ${Y(r)}`,
951
+ children: [a.map(([r, a]) => /* @__PURE__ */ (0, z.jsxs)("div", {
952
952
  className: "mb-2.5 grid grid-cols-[minmax(34px,auto)_1fr_auto] items-start gap-1.5",
953
953
  children: [
954
- /* @__PURE__ */ (0, R.jsx)("span", {
954
+ /* @__PURE__ */ (0, z.jsx)("span", {
955
955
  className: "pt-1.5 font-mono text-[11px] text-syn-key max-md:text-[12.5px]",
956
956
  children: r
957
957
  }),
958
- /* @__PURE__ */ (0, R.jsx)(bi, {
958
+ /* @__PURE__ */ (0, z.jsx)(vi, {
959
959
  ...e,
960
960
  path: [...t, r],
961
961
  value: a,
@@ -970,25 +970,25 @@ function pi(e) {
970
970
  [r]: e
971
971
  })
972
972
  }),
973
- /* @__PURE__ */ (0, R.jsx)("button", {
973
+ /* @__PURE__ */ (0, z.jsx)("button", {
974
974
  type: "button",
975
- "aria-label": pt({ item: K([...t, r]) }),
975
+ "aria-label": ft({ item: q([...t, r]) }),
976
976
  className: "pt-1.5 text-muted-foreground max-md:grid max-md:size-8 max-md:place-items-center max-md:pt-0",
977
977
  onClick: () => {
978
978
  let { [r]: e, ...t } = n;
979
979
  i(t);
980
980
  },
981
- children: /* @__PURE__ */ (0, R.jsx)(H, { className: "size-3.5" })
981
+ children: /* @__PURE__ */ (0, z.jsx)(U, { className: "size-3.5" })
982
982
  })
983
983
  ]
984
- }, r)), o === null ? /* @__PURE__ */ (0, R.jsx)("button", {
984
+ }, r)), o === null ? /* @__PURE__ */ (0, z.jsx)("button", {
985
985
  type: "button",
986
986
  className: "pb-2 text-[11.5px] text-muted-foreground max-md:py-2 max-md:text-[13px]",
987
987
  onClick: () => s(""),
988
- children: st()
989
- }) : /* @__PURE__ */ (0, R.jsx)(U, {
988
+ children: ot()
989
+ }) : /* @__PURE__ */ (0, z.jsx)(W, {
990
990
  autoFocus: !0,
991
- "aria-label": ut({ field: K(t) }),
991
+ "aria-label": lt({ field: q(t) }),
992
992
  className: "mb-2 h-7",
993
993
  value: o,
994
994
  onChange: (e) => s(e.target.value),
@@ -1001,126 +1001,126 @@ function pi(e) {
1001
1001
  })]
1002
1002
  });
1003
1003
  }
1004
- var J = (e) => e ? "border-warn" : "";
1005
- function mi({ path: e, value: t, min: n, max: r, problem: i, onChange: a }) {
1006
- return /* @__PURE__ */ (0, R.jsx)(U, {
1004
+ var Y = (e) => e ? "border-warn" : "";
1005
+ function fi({ path: e, value: t, min: n, max: r, problem: i, onChange: a }) {
1006
+ return /* @__PURE__ */ (0, z.jsx)(W, {
1007
1007
  type: "date",
1008
- "aria-label": K(e),
1009
- className: `${br} font-mono ${J(i)}`,
1008
+ "aria-label": q(e),
1009
+ className: `${vr} font-mono ${Y(i)}`,
1010
1010
  value: typeof t == "string" ? t : "",
1011
1011
  min: typeof n == "string" ? n : void 0,
1012
1012
  max: typeof r == "string" ? r : void 0,
1013
1013
  onChange: (e) => a(e.target.value === "" ? null : e.target.value)
1014
1014
  });
1015
1015
  }
1016
- function hi({ path: e, value: t, min: n, max: r, problem: i, onChange: a }) {
1017
- let o = typeof t == "string" ? t : "", s = o === "" ? null : Nr(o), c = W(o)?.offset ?? null, l = o === "" ? Pr((/* @__PURE__ */ new Date()).toISOString().slice(0, 10), "12", "00") : c, u = (0, L.useRef)(o);
1018
- return o !== "" && (u.current = o), /* @__PURE__ */ (0, R.jsxs)("div", {
1016
+ function pi({ path: e, value: t, min: n, max: r, problem: i, onChange: a }) {
1017
+ let o = typeof t == "string" ? t : "", s = o === "" ? null : jr(o), c = G(o)?.offset ?? null, l = o === "" ? Mr((/* @__PURE__ */ new Date()).toISOString().slice(0, 10), "12", "00") : c, u = (0, I.useRef)(o);
1018
+ return o !== "" && (u.current = o), /* @__PURE__ */ (0, z.jsxs)("div", {
1019
1019
  className: "flex items-center gap-1.5 max-md:flex-wrap",
1020
- children: [/* @__PURE__ */ (0, R.jsx)(U, {
1020
+ children: [/* @__PURE__ */ (0, z.jsx)(W, {
1021
1021
  type: "datetime-local",
1022
- "aria-label": K(e),
1023
- className: `w-60 font-mono max-md:w-full ${J(i)}`,
1022
+ "aria-label": q(e),
1023
+ className: `w-60 font-mono max-md:w-full ${Y(i)}`,
1024
1024
  step: s?.step ?? 60,
1025
1025
  value: s?.value ?? "",
1026
- min: Lr(n, l),
1027
- max: Lr(r, l),
1026
+ min: Fr(n, l),
1027
+ max: Fr(r, l),
1028
1028
  onChange: (e) => {
1029
1029
  if (e.target.value === "") return a(null);
1030
- let t = Fr(e.target.value, u.current === "" ? null : u.current);
1030
+ let t = Nr(e.target.value, u.current === "" ? null : u.current);
1031
1031
  t !== null && a(t);
1032
1032
  }
1033
- }), c && /* @__PURE__ */ (0, R.jsx)("span", {
1033
+ }), c && /* @__PURE__ */ (0, z.jsx)("span", {
1034
1034
  className: "font-mono text-[12px] text-muted-foreground",
1035
1035
  children: c
1036
1036
  })]
1037
1037
  });
1038
1038
  }
1039
- var gi = /^-?\d+$/, _i = /^-?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;
1040
- function vi(e) {
1041
- let { path: t, value: n, type: r, format: i, reference: a, problem: o, onChange: s } = e, c = i === "date" || i === "datetime", [l, u] = (0, L.useState)(() => Gr(n, r, a !== void 0, i)), [d, f] = (0, L.useState)(n == null ? "" : String(n)), p = n == null ? "" : String(n), m = (e, t) => {
1042
- l === "unset" && (u(t ?? Gr(e, r, !1, i)), f(e == null ? "" : String(e))), s(e);
1043
- }, h = (e) => /* @__PURE__ */ (0, R.jsx)("button", {
1039
+ var mi = /^-?\d+$/, hi = /^-?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;
1040
+ function gi(e) {
1041
+ let { path: t, value: n, type: r, format: i, reference: a, problem: o, onChange: s } = e, c = i === "date" || i === "datetime", [l, u] = (0, I.useState)(() => Ur(n, r, a !== void 0, i)), [d, f] = (0, I.useState)(n == null ? "" : String(n)), p = n == null ? "" : String(n), m = (e, t) => {
1042
+ l === "unset" && (u(t ?? Ur(e, r, !1, i)), f(e == null ? "" : String(e))), s(e);
1043
+ }, h = (e) => /* @__PURE__ */ (0, z.jsx)("button", {
1044
1044
  type: "button",
1045
- "aria-label": tt({
1046
- field: K(t),
1045
+ "aria-label": et({
1046
+ field: q(t),
1047
1047
  kind: e
1048
1048
  }),
1049
1049
  className: "shrink-0 rounded border px-1.5 py-0.5 font-mono text-[11.5px] text-muted-foreground hover:text-foreground max-md:grid max-md:min-h-8 max-md:min-w-8 max-md:place-items-center",
1050
- onClick: () => u(e === "text" ? "text" : Gr(n, r, !1, i)),
1051
- children: e === "text" ? /* @__PURE__ */ (0, R.jsx)(ir, { className: "size-3.5" }) : i === "date" ? /* @__PURE__ */ (0, R.jsx)(Qn, { className: "size-3.5" }) : /* @__PURE__ */ (0, R.jsx)(er, { className: "size-3.5" })
1050
+ onClick: () => u(e === "text" ? "text" : Ur(n, r, !1, i)),
1051
+ children: e === "text" ? /* @__PURE__ */ (0, z.jsx)(nr, { className: "size-3.5" }) : i === "date" ? /* @__PURE__ */ (0, z.jsx)(Xn, { className: "size-3.5" }) : /* @__PURE__ */ (0, z.jsx)(Qn, { className: "size-3.5" })
1052
1052
  });
1053
- if (e.allowed && r !== "JSON") return /* @__PURE__ */ (0, R.jsx)(di, {
1053
+ if (e.allowed && r !== "JSON") return /* @__PURE__ */ (0, z.jsx)(li, {
1054
1054
  ...e,
1055
1055
  allowed: e.allowed
1056
1056
  });
1057
1057
  switch (l) {
1058
- case "switch": return /* @__PURE__ */ (0, R.jsx)(me, {
1059
- "aria-label": K(t),
1058
+ case "switch": return /* @__PURE__ */ (0, z.jsx)(N, {
1059
+ "aria-label": q(t),
1060
1060
  checked: n === !0,
1061
1061
  onCheckedChange: m
1062
1062
  });
1063
1063
  case "number":
1064
- case "bigint": return /* @__PURE__ */ (0, R.jsx)(U, {
1065
- "aria-label": K(t),
1064
+ case "bigint": return /* @__PURE__ */ (0, z.jsx)(W, {
1065
+ "aria-label": q(t),
1066
1066
  inputMode: r === "REAL" ? "decimal" : "numeric",
1067
- className: `${br} font-mono ${J(o)}`,
1067
+ className: `${vr} font-mono ${Y(o)}`,
1068
1068
  value: d,
1069
1069
  onChange: (e) => {
1070
1070
  let t = e.target.value;
1071
1071
  f(t);
1072
1072
  let n = t.trim();
1073
1073
  if (r === "INTEGER") {
1074
- if (!gi.test(n)) return;
1074
+ if (!mi.test(n)) return;
1075
1075
  let e = Number(n);
1076
1076
  s(Number.isSafeInteger(e) ? e : n);
1077
- } else _i.test(n) && Number.isFinite(Number(n)) && s(Number(n));
1077
+ } else hi.test(n) && Number.isFinite(Number(n)) && s(Number(n));
1078
1078
  }
1079
1079
  });
1080
1080
  case "date":
1081
- case "datetime": return /* @__PURE__ */ (0, R.jsxs)("div", {
1081
+ case "datetime": return /* @__PURE__ */ (0, z.jsxs)("div", {
1082
1082
  className: "flex items-center gap-1.5",
1083
- children: [l === "date" ? /* @__PURE__ */ (0, R.jsx)(mi, { ...e }) : /* @__PURE__ */ (0, R.jsx)(hi, { ...e }), h("text")]
1083
+ children: [l === "date" ? /* @__PURE__ */ (0, z.jsx)(fi, { ...e }) : /* @__PURE__ */ (0, z.jsx)(pi, { ...e }), h("text")]
1084
1084
  });
1085
1085
  case "text": {
1086
- let e = /* @__PURE__ */ (0, R.jsx)(U, {
1087
- "aria-label": K(t),
1088
- className: J(o),
1086
+ let e = /* @__PURE__ */ (0, z.jsx)(W, {
1087
+ "aria-label": q(t),
1088
+ className: Y(o),
1089
1089
  value: p,
1090
1090
  onChange: (e) => m(c && e.target.value === "" ? null : e.target.value)
1091
1091
  });
1092
1092
  if (!c) return e;
1093
- let a = Gr(n, r, !1, i) === i;
1094
- return /* @__PURE__ */ (0, R.jsxs)("div", {
1093
+ let a = Ur(n, r, !1, i) === i;
1094
+ return /* @__PURE__ */ (0, z.jsxs)("div", {
1095
1095
  className: "flex items-center gap-1.5",
1096
1096
  children: [e, a && h("picker")]
1097
1097
  });
1098
1098
  }
1099
- case "textarea": return /* @__PURE__ */ (0, R.jsx)(Ar, {
1100
- "aria-label": K(t),
1101
- className: J(o),
1099
+ case "textarea": return /* @__PURE__ */ (0, z.jsx)(Or, {
1100
+ "aria-label": q(t),
1101
+ className: Y(o),
1102
1102
  rows: 4,
1103
1103
  value: p,
1104
1104
  onChange: (e) => m(e.target.value)
1105
1105
  });
1106
- case "markdown": return /* @__PURE__ */ (0, R.jsx)(L.Suspense, {
1107
- fallback: /* @__PURE__ */ (0, R.jsx)(Ar, {
1108
- "aria-label": K(t),
1106
+ case "markdown": return /* @__PURE__ */ (0, z.jsx)(I.Suspense, {
1107
+ fallback: /* @__PURE__ */ (0, z.jsx)(Or, {
1108
+ "aria-label": q(t),
1109
1109
  rows: 4,
1110
1110
  value: p,
1111
1111
  readOnly: !0
1112
1112
  }),
1113
- children: /* @__PURE__ */ (0, R.jsx)(li, { ...e })
1113
+ children: /* @__PURE__ */ (0, z.jsx)(si, { ...e })
1114
1114
  });
1115
- case "ref": return /* @__PURE__ */ (0, R.jsx)(fi, { ...e });
1116
- case "chips": return /* @__PURE__ */ (0, R.jsx)(Zr, {
1117
- label: K(t),
1115
+ case "ref": return /* @__PURE__ */ (0, z.jsx)(ui, { ...e });
1116
+ case "chips": return /* @__PURE__ */ (0, z.jsx)(Yr, {
1117
+ label: q(t),
1118
1118
  value: n ?? [],
1119
1119
  onChange: s,
1120
1120
  invalid: o
1121
1121
  });
1122
- case "map": return /* @__PURE__ */ (0, R.jsx)(pi, { ...e });
1123
- case "json": return /* @__PURE__ */ (0, R.jsx)(ui, { ...e });
1122
+ case "map": return /* @__PURE__ */ (0, z.jsx)(di, { ...e });
1123
+ case "json": return /* @__PURE__ */ (0, z.jsx)(ci, { ...e });
1124
1124
  case "unset":
1125
1125
  if (r === "JSON") {
1126
1126
  let e = [
@@ -1143,12 +1143,12 @@ function vi(e) {
1143
1143
  chosen: "json"
1144
1144
  }
1145
1145
  ], n = i === "list" ? e.filter((e) => e.name !== "map") : e;
1146
- return /* @__PURE__ */ (0, R.jsx)("div", {
1146
+ return /* @__PURE__ */ (0, z.jsx)("div", {
1147
1147
  className: "flex gap-1.5",
1148
- children: n.map((e) => /* @__PURE__ */ (0, R.jsx)("button", {
1148
+ children: n.map((e) => /* @__PURE__ */ (0, z.jsx)("button", {
1149
1149
  type: "button",
1150
- "aria-label": tt({
1151
- field: K(t),
1150
+ "aria-label": et({
1151
+ field: q(t),
1152
1152
  kind: e.name
1153
1153
  }),
1154
1154
  className: "rounded border px-1.5 py-0.5 font-mono text-[11.5px] text-muted-foreground hover:text-foreground",
@@ -1157,38 +1157,38 @@ function vi(e) {
1157
1157
  }, e.name))
1158
1158
  });
1159
1159
  }
1160
- return /* @__PURE__ */ (0, R.jsx)("button", {
1160
+ return /* @__PURE__ */ (0, z.jsx)("button", {
1161
1161
  type: "button",
1162
- "aria-label": K(t),
1162
+ "aria-label": q(t),
1163
1163
  className: "text-[12px] text-muted-foreground hover:text-foreground",
1164
- onClick: () => m(Kr(r ?? "TEXT")),
1165
- children: mt()
1164
+ onClick: () => m(Wr(r ?? "TEXT")),
1165
+ children: pt()
1166
1166
  });
1167
1167
  }
1168
1168
  }
1169
- var yi = (e) => e == null || (Array.isArray(e) ? e.length === 0 : typeof e == "object" && Object.keys(e).length === 0);
1170
- function bi(e) {
1171
- let { label: t, value: n, type: r, readOnly: i, onChange: a } = e, o = Xr(n, e.format, e.min, e.max), [s] = (0, L.useState)(() => r === "JSON" && n == null && e.format !== "map"), [c, l] = (0, L.useState)(0);
1172
- return /* @__PURE__ */ (0, R.jsxs)("div", {
1169
+ var _i = (e) => e == null || (Array.isArray(e) ? e.length === 0 : typeof e == "object" && Object.keys(e).length === 0);
1170
+ function vi(e) {
1171
+ let { label: t, value: n, type: r, readOnly: i, onChange: a } = e, o = Jr(n, e.format, e.min, e.max), [s] = (0, I.useState)(() => r === "JSON" && n == null && e.format !== "map"), [c, l] = (0, I.useState)(0);
1172
+ return /* @__PURE__ */ (0, z.jsxs)("div", {
1173
1173
  "data-problem": o ?? void 0,
1174
1174
  children: [
1175
- t !== void 0 && /* @__PURE__ */ (0, R.jsxs)("div", {
1175
+ t !== void 0 && /* @__PURE__ */ (0, z.jsxs)("div", {
1176
1176
  className: "mb-1 flex items-center gap-2",
1177
- children: [t, s && !i && n != null && /* @__PURE__ */ (0, R.jsxs)("button", {
1177
+ children: [t, s && !i && n != null && /* @__PURE__ */ (0, z.jsxs)("button", {
1178
1178
  type: "button",
1179
- "aria-label": ot({ field: K(e.path) }),
1179
+ "aria-label": at({ field: q(e.path) }),
1180
1180
  className: "inline-flex shrink-0 items-center gap-1 rounded px-1 text-[12px] font-semibold text-muted-foreground max-md:text-[13px] font-medium hover:text-foreground",
1181
1181
  onClick: () => {
1182
- (yi(n) || window.confirm(rt())) && (a(null), l((e) => e + 1));
1182
+ (_i(n) || window.confirm(nt())) && (a(null), l((e) => e + 1));
1183
1183
  },
1184
- children: [/* @__PURE__ */ (0, R.jsx)(ge, { className: "size-3" }), nt()]
1184
+ children: [/* @__PURE__ */ (0, z.jsx)(ge, { className: "size-3" }), tt()]
1185
1185
  })]
1186
1186
  }),
1187
- /* @__PURE__ */ (0, R.jsx)(vi, {
1187
+ /* @__PURE__ */ (0, z.jsx)(gi, {
1188
1188
  ...e,
1189
1189
  problem: o !== null
1190
1190
  }, c),
1191
- o && /* @__PURE__ */ (0, R.jsx)("p", {
1191
+ o && /* @__PURE__ */ (0, z.jsx)("p", {
1192
1192
  className: "mt-1 text-[11px] text-warn",
1193
1193
  children: o
1194
1194
  })
@@ -1196,86 +1196,10 @@ function bi(e) {
1196
1196
  });
1197
1197
  }
1198
1198
  //#endregion
1199
- //#region ui/src/lib/panelWidth.ts
1200
- var xi = {
1201
- min: 320,
1202
- max: () => Math.max(320, Math.floor(window.innerWidth * .7))
1203
- }, Si = {
1204
- min: 180,
1205
- max: () => Math.max(180, Math.min(480, Math.floor(window.innerWidth * .4)))
1206
- }, Ci = (e, t) => Math.min(t.max(), Math.max(t.min, Math.round(e)));
1207
- function wi(e, t, n) {
1208
- try {
1209
- let r = localStorage.getItem(e);
1210
- return r !== null && Number.isFinite(Number(r)) ? Ci(Number(r), n) : t;
1211
- } catch {
1212
- return t;
1213
- }
1214
- }
1215
- function Ti(e, t, n = xi) {
1216
- let [r, i] = (0, L.useState)(() => wi(e, t, n));
1217
- return [r, (r) => {
1218
- let a = r === null ? t : Ci(r, n);
1219
- i(a);
1220
- try {
1221
- r === null ? localStorage.removeItem(e) : localStorage.setItem(e, String(a));
1222
- } catch {}
1223
- }];
1224
- }
1225
- //#endregion
1226
- //#region ui/src/components/PanelResizeHandle.tsx
1227
- var Ei = 16;
1228
- function Di({ width: e, label: t, onResize: n, edge: r = "left", bounds: i = xi }) {
1229
- let a = r === "left" ? -1 : 1;
1230
- return /* @__PURE__ */ (0, R.jsx)("div", {
1231
- role: "separator",
1232
- "aria-label": t,
1233
- "aria-orientation": "vertical",
1234
- "aria-valuenow": e,
1235
- "aria-valuemin": i.min,
1236
- "aria-valuemax": i.max(),
1237
- tabIndex: 0,
1238
- onPointerDown: (t) => {
1239
- if (t.button !== 0) return;
1240
- t.preventDefault();
1241
- let r = t.currentTarget;
1242
- r.setPointerCapture?.(t.pointerId), document.body.setAttribute("data-resizing", "");
1243
- let i = t.clientX, o = (t) => n(e + a * (t.clientX - i)), s = !1, c = () => {
1244
- if (s) return;
1245
- s = !0, document.removeEventListener("pointermove", o), document.removeEventListener("pointerup", c), document.removeEventListener("pointercancel", c), r.removeEventListener("lostpointercapture", c), document.body.removeAttribute("data-resizing");
1246
- let e = (e) => e.stopPropagation();
1247
- window.addEventListener("click", e, {
1248
- capture: !0,
1249
- once: !0
1250
- }), setTimeout(() => window.removeEventListener("click", e, { capture: !0 }), 0);
1251
- };
1252
- document.addEventListener("pointermove", o), document.addEventListener("pointerup", c), document.addEventListener("pointercancel", c), r.addEventListener("lostpointercapture", c);
1253
- },
1254
- onDoubleClick: () => n(null),
1255
- onKeyDown: (t) => {
1256
- let r = t.key === "ArrowLeft" ? -a * Ei : t.key === "ArrowRight" ? a * Ei : 0;
1257
- r !== 0 && (t.preventDefault(), n(e + r));
1258
- },
1259
- className: m("absolute inset-y-0 z-10 w-1 cursor-col-resize outline-none hover:bg-primary/40 focus-visible:bg-primary/40", r === "left" ? "-left-0.5" : "-right-0.5")
1260
- });
1261
- }
1262
- //#endregion
1263
- //#region ui/src/lib/viewportHeight.ts
1264
- var Oi = (e) => {
1265
- let t = window.visualViewport;
1266
- return t?.addEventListener("resize", e), t?.addEventListener("scroll", e), () => {
1267
- t?.removeEventListener("resize", e), t?.removeEventListener("scroll", e);
1268
- };
1269
- };
1270
- function ki(e) {
1271
- let t = (0, L.useSyncExternalStore)(Oi, () => window.visualViewport?.height);
1272
- return e ? t : void 0;
1273
- }
1274
- //#endregion
1275
1199
  //#region ui/src/lib/recordHistory.ts
1276
- function Ai(e, t) {
1200
+ function yi(e, t) {
1277
1201
  let n = Math.max(0, Math.round((t - Date.parse(e)) / 1e3));
1278
- if (n < 60) return vt();
1202
+ if (n < 60) return _t();
1279
1203
  let i = new Intl.RelativeTimeFormat(r(), { numeric: "always" }), a = Math.round(n / 60);
1280
1204
  if (a < 60) return i.format(-a, "minute");
1281
1205
  let o = Math.round(a / 60);
@@ -1283,26 +1207,26 @@ function Ai(e, t) {
1283
1207
  let s = Math.round(o / 24);
1284
1208
  return s < 30 ? i.format(-s, "day") : e.slice(0, 10);
1285
1209
  }
1286
- var ji = (e) => e == null ? Tt() : typeof e == "string" ? e : JSON.stringify(e), Mi = (e, t, n) => Object.defineProperty(e, t, {
1210
+ var bi = (e) => e == null ? wt() : typeof e == "string" ? e : JSON.stringify(e), xi = (e, t, n) => Object.defineProperty(e, t, {
1287
1211
  value: n,
1288
1212
  enumerable: !0,
1289
1213
  writable: !0,
1290
1214
  configurable: !0
1291
1215
  });
1292
- function Ni(e, t, n) {
1216
+ function Si(e, t, n) {
1293
1217
  let r = {};
1294
- for (let t of Object.keys(e)) Mi(r, t, null);
1295
- for (let [e, n] of Object.entries(t)) Mi(r, e, n);
1296
- return Mi(r, n, e[n]), r;
1218
+ for (let t of Object.keys(e)) xi(r, t, null);
1219
+ for (let [e, n] of Object.entries(t)) xi(r, e, n);
1220
+ return xi(r, n, e[n]), r;
1297
1221
  }
1298
- function Pi(e) {
1222
+ function Ci(e) {
1299
1223
  let t = e?.at(-1);
1300
1224
  if (!e || !t || t.state !== "ok") return null;
1301
1225
  let n = e.reduce((e, t) => e + (t.state === "ok" ? t.entries.filter((e) => e.kind === "commit").length : 0), 0);
1302
1226
  return t.next === null ? String(n) : `${n}+`;
1303
1227
  }
1304
- function Fi(e, t, n) {
1305
- return Be({
1228
+ function wi(e, t, n) {
1229
+ return Ve({
1306
1230
  queryKey: [
1307
1231
  "history",
1308
1232
  e,
@@ -1316,23 +1240,23 @@ function Fi(e, t, n) {
1316
1240
  }
1317
1241
  //#endregion
1318
1242
  //#region ui/src/components/RecordHistory.tsx
1319
- var Ii = (e) => e.slice(0, 7), Li = (e) => e.sha ?? "wip";
1320
- function Ri({ title: e, children: t }) {
1321
- return /* @__PURE__ */ (0, R.jsxs)("div", {
1243
+ var Ti = (e) => e.slice(0, 7), Ei = (e) => e.sha ?? "wip";
1244
+ function Di({ title: e, children: t }) {
1245
+ return /* @__PURE__ */ (0, z.jsxs)("div", {
1322
1246
  className: "px-2 py-10 text-center text-[13px] text-muted-foreground",
1323
- children: [/* @__PURE__ */ (0, R.jsx)("p", {
1247
+ children: [/* @__PURE__ */ (0, z.jsx)("p", {
1324
1248
  className: "mb-1.5 text-[15px] font-semibold text-foreground",
1325
1249
  children: e
1326
1250
  }), t]
1327
1251
  });
1328
1252
  }
1329
- function zi({ children: e }) {
1330
- return /* @__PURE__ */ (0, R.jsx)("span", {
1253
+ function Oi({ children: e }) {
1254
+ return /* @__PURE__ */ (0, z.jsx)("span", {
1331
1255
  className: "rounded border px-1.5 font-mono text-[11px] text-muted-foreground",
1332
1256
  children: e
1333
1257
  });
1334
1258
  }
1335
- function Bi({ table: e, recordKey: t, rev: n }) {
1259
+ function ki({ table: e, recordKey: t, rev: n }) {
1336
1260
  let { data: r, error: i } = _({
1337
1261
  queryKey: [
1338
1262
  "history",
@@ -1343,179 +1267,303 @@ function Bi({ table: e, recordKey: t, rev: n }) {
1343
1267
  ],
1344
1268
  queryFn: () => w.historyDiff(e, t, n)
1345
1269
  });
1346
- return i ? /* @__PURE__ */ (0, R.jsx)("p", {
1270
+ return i ? /* @__PURE__ */ (0, z.jsx)("p", {
1347
1271
  className: "text-[12px] text-err",
1348
1272
  children: i.message
1349
- }) : r ? /* @__PURE__ */ (0, R.jsx)("pre", {
1273
+ }) : r ? /* @__PURE__ */ (0, z.jsx)("pre", {
1350
1274
  className: "overflow-x-auto rounded-md bg-panel py-2 font-mono text-[12px] leading-relaxed",
1351
- children: r.text.split("\n").map((e, t) => /* @__PURE__ */ (0, R.jsx)("span", {
1275
+ children: r.text.split("\n").map((e, t) => /* @__PURE__ */ (0, z.jsx)("span", {
1352
1276
  className: m("block px-3 whitespace-pre", e.startsWith("+") && !e.startsWith("+++") && "bg-ok/15 text-ok", e.startsWith("-") && !e.startsWith("---") && "bg-err-soft text-err"),
1353
1277
  children: e
1354
1278
  }, t))
1355
- }) : /* @__PURE__ */ (0, R.jsx)("p", {
1279
+ }) : /* @__PURE__ */ (0, z.jsx)("p", {
1356
1280
  className: "text-[12px] text-muted-foreground",
1357
- children: Ke()
1281
+ children: Ge()
1358
1282
  });
1359
1283
  }
1360
- function Vi({ entry: e, ...t }) {
1361
- let [n, r] = (0, L.useState)("fields"), i = e.record, a = i !== null && G(t.current, Ni(t.current, i, t.keyColumn)).length > 0, o = n === "yaml" || e.changes.length === 0;
1362
- return /* @__PURE__ */ (0, R.jsxs)("div", {
1284
+ function Ai({ entry: e, ...t }) {
1285
+ let [n, r] = (0, I.useState)("fields"), i = e.record, a = i !== null && K(t.current, Si(t.current, i, t.keyColumn)).length > 0, o = n === "yaml" || e.changes.length === 0;
1286
+ return /* @__PURE__ */ (0, z.jsxs)("div", {
1363
1287
  className: "rounded-b-lg border border-t-0 p-3",
1364
- children: [/* @__PURE__ */ (0, R.jsxs)("div", {
1288
+ children: [/* @__PURE__ */ (0, z.jsxs)("div", {
1365
1289
  className: "mb-2.5 flex items-center gap-2",
1366
- children: [e.changes.length > 0 ? /* @__PURE__ */ (0, R.jsx)("div", {
1290
+ children: [e.changes.length > 0 ? /* @__PURE__ */ (0, z.jsx)("div", {
1367
1291
  className: "inline-flex overflow-hidden rounded-md border text-[12px]",
1368
- children: ["fields", "yaml"].map((e) => /* @__PURE__ */ (0, R.jsx)("button", {
1292
+ children: ["fields", "yaml"].map((e) => /* @__PURE__ */ (0, z.jsx)("button", {
1369
1293
  type: "button",
1370
1294
  "aria-pressed": n === e,
1371
1295
  onClick: () => r(e),
1372
1296
  className: m("px-2.5 py-0.5", n === e && "bg-foreground text-background"),
1373
- children: e === "fields" ? _t() : Mt()
1297
+ children: e === "fields" ? gt() : jt()
1374
1298
  }, e))
1375
- }) : /* @__PURE__ */ (0, R.jsx)("span", {
1299
+ }) : /* @__PURE__ */ (0, z.jsx)("span", {
1376
1300
  className: "text-[12px] text-muted-foreground",
1377
- children: e.unreadable ? At() : wt()
1378
- }), e.kind === "commit" && e.sha && i !== null && t.canRestore && /* @__PURE__ */ (0, R.jsx)(j, {
1301
+ children: e.unreadable ? kt() : Ct()
1302
+ }), e.kind === "commit" && e.sha && i !== null && t.canRestore && /* @__PURE__ */ (0, z.jsx)(k, {
1379
1303
  variant: "outline",
1380
1304
  size: "sm",
1381
1305
  className: "ml-auto",
1382
1306
  disabled: !a,
1383
- title: a ? Dt() : Ot(),
1307
+ title: a ? Et() : Dt(),
1384
1308
  onClick: () => t.onRestore(i, e.sha),
1385
- children: Et()
1309
+ children: Tt()
1386
1310
  })]
1387
- }), o ? /* @__PURE__ */ (0, R.jsx)(Bi, {
1311
+ }), o ? /* @__PURE__ */ (0, z.jsx)(ki, {
1388
1312
  table: t.table,
1389
1313
  recordKey: t.recordKey,
1390
- rev: Li(e)
1391
- }) : e.changes.map((e) => /* @__PURE__ */ (0, R.jsxs)("div", {
1314
+ rev: Ei(e)
1315
+ }) : e.changes.map((e) => /* @__PURE__ */ (0, z.jsxs)("div", {
1392
1316
  className: "grid grid-cols-[7rem_1fr] gap-2 border-b border-dashed py-2 last:border-b-0",
1393
- children: [/* @__PURE__ */ (0, R.jsx)("span", {
1317
+ children: [/* @__PURE__ */ (0, z.jsx)("span", {
1394
1318
  className: "font-mono text-[12px] break-all text-muted-foreground",
1395
1319
  children: e.path
1396
- }), /* @__PURE__ */ (0, R.jsxs)("span", {
1320
+ }), /* @__PURE__ */ (0, z.jsxs)("span", {
1397
1321
  className: "flex min-w-0 flex-col gap-1 font-mono text-[12px]",
1398
- children: [e.from !== null && /* @__PURE__ */ (0, R.jsx)("span", {
1322
+ children: [e.from !== null && /* @__PURE__ */ (0, z.jsx)("span", {
1399
1323
  className: "rounded bg-err-soft px-2 py-0.5 break-all text-err line-through",
1400
- children: ji(e.from)
1401
- }), /* @__PURE__ */ (0, R.jsx)("span", {
1324
+ children: bi(e.from)
1325
+ }), /* @__PURE__ */ (0, z.jsx)("span", {
1402
1326
  className: "rounded bg-ok/15 px-2 py-0.5 break-all text-ok",
1403
- children: ji(e.to)
1327
+ children: bi(e.to)
1404
1328
  })]
1405
1329
  })]
1406
1330
  }, e.path))]
1407
1331
  });
1408
1332
  }
1409
- function Hi(e) {
1410
- let { query: t } = e, [n, r] = (0, L.useState)(null);
1411
- if (t.error) return /* @__PURE__ */ (0, R.jsx)("p", {
1333
+ function ji(e) {
1334
+ let { query: t } = e, [n, r] = (0, I.useState)(null);
1335
+ if (t.error) return /* @__PURE__ */ (0, z.jsx)("p", {
1412
1336
  className: "text-[13px] text-err",
1413
1337
  children: t.error.message
1414
1338
  });
1415
1339
  let i = t.data?.pages[0];
1416
- if (!t.data || !i) return /* @__PURE__ */ (0, R.jsx)("p", {
1340
+ if (!t.data || !i) return /* @__PURE__ */ (0, z.jsx)("p", {
1417
1341
  className: "text-[13px] text-muted-foreground",
1418
- children: Ke()
1342
+ children: Ge()
1419
1343
  });
1420
- if (i.state === "nogit") return /* @__PURE__ */ (0, R.jsx)(Ri, {
1421
- title: St(),
1422
- children: Ct()
1344
+ if (i.state === "nogit") return /* @__PURE__ */ (0, z.jsx)(Di, {
1345
+ title: xt(),
1346
+ children: St()
1423
1347
  });
1424
- if (i.state === "untracked") return /* @__PURE__ */ (0, R.jsx)(Ri, {
1425
- title: bt(),
1426
- children: xt()
1348
+ if (i.state === "untracked") return /* @__PURE__ */ (0, z.jsx)(Di, {
1349
+ title: yt(),
1350
+ children: bt()
1427
1351
  });
1428
- if (i.state === "error") return /* @__PURE__ */ (0, R.jsx)("p", {
1352
+ if (i.state === "error") return /* @__PURE__ */ (0, z.jsx)("p", {
1429
1353
  className: "text-[13px] text-err",
1430
1354
  children: i.message
1431
1355
  });
1432
1356
  let a = t.data.pages.flatMap((e) => e.state === "ok" ? e.entries : []), o = Date.now();
1433
- return /* @__PURE__ */ (0, R.jsxs)("div", { children: [/* @__PURE__ */ (0, R.jsx)("ol", {
1357
+ return /* @__PURE__ */ (0, z.jsxs)("div", { children: [/* @__PURE__ */ (0, z.jsx)("ol", {
1434
1358
  className: "relative m-0 list-none p-0 before:absolute before:top-3.5 before:bottom-3.5 before:left-[11px] before:w-0.5 before:bg-border",
1435
1359
  children: a.map((t) => {
1436
- let i = Li(t), a = n === i;
1437
- return /* @__PURE__ */ (0, R.jsxs)("li", {
1360
+ let i = Ei(t), a = n === i;
1361
+ return /* @__PURE__ */ (0, z.jsxs)("li", {
1438
1362
  className: "relative mb-1.5 pl-8",
1439
1363
  children: [
1440
- /* @__PURE__ */ (0, R.jsx)("span", { className: m("absolute top-3.5 left-1 size-4 rounded-full border-2 border-muted-foreground bg-background", t.kind === "wip" && "border-dashed border-warn", t.head && "border-tomato", a && "border-primary bg-primary") }),
1441
- /* @__PURE__ */ (0, R.jsxs)("button", {
1364
+ /* @__PURE__ */ (0, z.jsx)("span", { className: m("absolute top-3.5 left-1 size-4 rounded-full border-2 border-muted-foreground bg-background", t.kind === "wip" && "border-dashed border-warn", t.head && "border-tomato", a && "border-primary bg-primary") }),
1365
+ /* @__PURE__ */ (0, z.jsxs)("button", {
1442
1366
  type: "button",
1443
1367
  "aria-expanded": a,
1444
1368
  onClick: () => r(a ? null : i),
1445
1369
  className: m("block w-full rounded-lg border border-transparent px-3 py-2 text-left hover:bg-panel", a && "rounded-b-none border-border bg-panel"),
1446
1370
  children: [
1447
- /* @__PURE__ */ (0, R.jsxs)("span", {
1371
+ /* @__PURE__ */ (0, z.jsxs)("span", {
1448
1372
  className: "flex items-baseline gap-2 text-[14px] font-semibold",
1449
1373
  children: [
1450
- t.kind === "wip" ? jt() : t.subject,
1451
- t.kind === "wip" && /* @__PURE__ */ (0, R.jsx)("span", {
1374
+ t.kind === "wip" ? At() : t.subject,
1375
+ t.kind === "wip" && /* @__PURE__ */ (0, z.jsx)("span", {
1452
1376
  className: "rounded bg-warn-soft px-1.5 text-[11px] text-warn",
1453
- children: kt()
1377
+ children: Ot()
1454
1378
  }),
1455
- t.head && /* @__PURE__ */ (0, R.jsx)("span", {
1379
+ t.head && /* @__PURE__ */ (0, z.jsx)("span", {
1456
1380
  className: "rounded bg-chip px-1.5 text-[11px] text-chip-foreground",
1457
1381
  children: "HEAD"
1458
1382
  })
1459
1383
  ]
1460
1384
  }),
1461
- /* @__PURE__ */ (0, R.jsxs)("span", {
1385
+ /* @__PURE__ */ (0, z.jsxs)("span", {
1462
1386
  className: "mt-0.5 flex flex-wrap items-center gap-1.5 text-[12px] text-muted-foreground",
1463
1387
  children: [
1464
- t.sha && /* @__PURE__ */ (0, R.jsx)("span", {
1388
+ t.sha && /* @__PURE__ */ (0, z.jsx)("span", {
1465
1389
  className: "font-mono text-foreground",
1466
- children: Ii(t.sha)
1390
+ children: Ti(t.sha)
1467
1391
  }),
1468
- t.author && /* @__PURE__ */ (0, R.jsx)("span", { children: t.author }),
1469
- /* @__PURE__ */ (0, R.jsx)("span", { children: Ai(t.date, o) })
1392
+ t.author && /* @__PURE__ */ (0, z.jsx)("span", { children: t.author }),
1393
+ /* @__PURE__ */ (0, z.jsx)("span", { children: yi(t.date, o) })
1470
1394
  ]
1471
1395
  }),
1472
- t.renamedFrom ? /* @__PURE__ */ (0, R.jsxs)("span", {
1396
+ t.renamedFrom ? /* @__PURE__ */ (0, z.jsxs)("span", {
1473
1397
  className: "mt-1 block font-mono text-[12px] text-muted-foreground",
1474
1398
  children: [
1475
1399
  t.renamedFrom,
1476
1400
  " → ",
1477
1401
  t.path
1478
1402
  ]
1479
- }) : /* @__PURE__ */ (0, R.jsxs)("span", {
1403
+ }) : /* @__PURE__ */ (0, z.jsxs)("span", {
1480
1404
  className: "mt-1.5 flex flex-wrap gap-1",
1481
1405
  children: [
1482
- t.event === "created" && /* @__PURE__ */ (0, R.jsx)(zi, { children: ht() }),
1483
- t.event === "deleted" && /* @__PURE__ */ (0, R.jsx)(zi, { children: gt() }),
1484
- t.changes.map((e) => /* @__PURE__ */ (0, R.jsx)(zi, { children: e.path }, e.path))
1406
+ t.event === "created" && /* @__PURE__ */ (0, z.jsx)(Oi, { children: mt() }),
1407
+ t.event === "deleted" && /* @__PURE__ */ (0, z.jsx)(Oi, { children: ht() }),
1408
+ t.changes.map((e) => /* @__PURE__ */ (0, z.jsx)(Oi, { children: e.path }, e.path))
1485
1409
  ]
1486
1410
  })
1487
1411
  ]
1488
1412
  }),
1489
- a && /* @__PURE__ */ (0, R.jsx)(Vi, {
1413
+ a && /* @__PURE__ */ (0, z.jsx)(Ai, {
1490
1414
  ...e,
1491
1415
  entry: t
1492
1416
  })
1493
1417
  ]
1494
1418
  }, i);
1495
1419
  })
1496
- }), t.hasNextPage && /* @__PURE__ */ (0, R.jsx)("button", {
1420
+ }), t.hasNextPage && /* @__PURE__ */ (0, z.jsx)("button", {
1497
1421
  type: "button",
1498
1422
  disabled: t.isFetchingNextPage,
1499
1423
  onClick: () => void t.fetchNextPage(),
1500
1424
  className: "mt-2 ml-8 text-[12px] text-muted-foreground",
1501
- children: yt()
1425
+ children: vt()
1502
1426
  })] });
1503
1427
  }
1504
1428
  //#endregion
1505
1429
  //#region ui/src/components/ReflectBadge.tsx
1506
- function Ui({ table: e, recordKey: t }) {
1507
- let n = ce(e, t);
1430
+ function Mi({ table: e, recordKey: t }) {
1431
+ let n = ue(e, t);
1508
1432
  if (!n) return null;
1509
- let r = n.state === "pending" ? cn() : n.state === "applied" ? sn({ file: n.file }) : n.state === "failed" ? nn({ reason: n.reason }) : rn(), i = n.state === "applied" ? "text-ok" : n.state === "failed" ? "text-err" : "text-muted-foreground";
1510
- return /* @__PURE__ */ (0, R.jsx)("span", {
1433
+ let r = n.state === "pending" ? sn() : n.state === "applied" ? on({ file: n.file }) : n.state === "failed" ? tn({ reason: n.reason }) : nn(), i = n.state === "applied" ? "text-ok" : n.state === "failed" ? "text-err" : "text-muted-foreground";
1434
+ return /* @__PURE__ */ (0, z.jsx)("span", {
1511
1435
  role: "status",
1512
1436
  className: `text-[11px] ${i}`,
1513
1437
  children: r
1514
1438
  });
1515
1439
  }
1516
1440
  //#endregion
1441
+ //#region ui/src/lib/panelWidth.ts
1442
+ var Ni = {
1443
+ min: 320,
1444
+ max: () => Math.max(320, Math.floor(window.innerWidth * .7))
1445
+ }, Pi = {
1446
+ min: 180,
1447
+ max: () => Math.max(180, Math.min(480, Math.floor(window.innerWidth * .4)))
1448
+ }, Fi = (e, t) => Math.min(t.max(), Math.max(t.min, Math.round(e)));
1449
+ function Ii(e, t, n) {
1450
+ try {
1451
+ let r = localStorage.getItem(e);
1452
+ return r !== null && Number.isFinite(Number(r)) ? Fi(Number(r), n) : t;
1453
+ } catch {
1454
+ return t;
1455
+ }
1456
+ }
1457
+ function Li(e, t, n = Ni) {
1458
+ let [r, i] = (0, I.useState)(() => Ii(e, t, n));
1459
+ return [r, (r) => {
1460
+ let a = r === null ? t : Fi(r, n);
1461
+ i(a);
1462
+ try {
1463
+ r === null ? localStorage.removeItem(e) : localStorage.setItem(e, String(a));
1464
+ } catch {}
1465
+ }];
1466
+ }
1467
+ //#endregion
1468
+ //#region ui/src/lib/viewportHeight.ts
1469
+ var Ri = (e) => {
1470
+ let t = window.visualViewport;
1471
+ return t?.addEventListener("resize", e), t?.addEventListener("scroll", e), () => {
1472
+ t?.removeEventListener("resize", e), t?.removeEventListener("scroll", e);
1473
+ };
1474
+ };
1475
+ function zi(e) {
1476
+ let t = (0, I.useSyncExternalStore)(Ri, () => window.visualViewport?.height);
1477
+ return e ? t : void 0;
1478
+ }
1479
+ //#endregion
1480
+ //#region ui/src/components/PanelResizeHandle.tsx
1481
+ var Bi = 16;
1482
+ function Vi({ width: e, label: t, onResize: n, edge: r = "left", bounds: i = Ni }) {
1483
+ let a = r === "left" ? -1 : 1;
1484
+ return /* @__PURE__ */ (0, z.jsx)("div", {
1485
+ role: "separator",
1486
+ "aria-label": t,
1487
+ "aria-orientation": "vertical",
1488
+ "aria-valuenow": e,
1489
+ "aria-valuemin": i.min,
1490
+ "aria-valuemax": i.max(),
1491
+ tabIndex: 0,
1492
+ onPointerDown: (t) => {
1493
+ if (t.button !== 0) return;
1494
+ t.preventDefault();
1495
+ let r = t.currentTarget;
1496
+ r.setPointerCapture?.(t.pointerId), document.body.setAttribute("data-resizing", "");
1497
+ let i = t.clientX, o = (t) => n(e + a * (t.clientX - i)), s = !1, c = () => {
1498
+ if (s) return;
1499
+ s = !0, document.removeEventListener("pointermove", o), document.removeEventListener("pointerup", c), document.removeEventListener("pointercancel", c), r.removeEventListener("lostpointercapture", c), document.body.removeAttribute("data-resizing");
1500
+ let e = (e) => e.stopPropagation();
1501
+ window.addEventListener("click", e, {
1502
+ capture: !0,
1503
+ once: !0
1504
+ }), setTimeout(() => window.removeEventListener("click", e, { capture: !0 }), 0);
1505
+ };
1506
+ document.addEventListener("pointermove", o), document.addEventListener("pointerup", c), document.addEventListener("pointercancel", c), r.addEventListener("lostpointercapture", c);
1507
+ },
1508
+ onDoubleClick: () => n(null),
1509
+ onKeyDown: (t) => {
1510
+ let r = t.key === "ArrowLeft" ? -a * Bi : t.key === "ArrowRight" ? a * Bi : 0;
1511
+ r !== 0 && (t.preventDefault(), n(e + r));
1512
+ },
1513
+ className: m("absolute inset-y-0 z-10 w-1 cursor-col-resize outline-none hover:bg-primary/40 focus-visible:bg-primary/40", r === "left" ? "-left-0.5" : "-right-0.5")
1514
+ });
1515
+ }
1516
+ //#endregion
1517
+ //#region ui/src/components/SidePanel.tsx
1518
+ var Hi = {
1519
+ overlay: "absolute inset-y-0 right-0 z-20 shadow-xl",
1520
+ docked: "relative"
1521
+ };
1522
+ function Ui({ layout: e, widthKey: t, defaultWidth: n, resizeLabel: r, className: i, children: a, ...o }) {
1523
+ let s = fe(), [c, l] = Li(t, n), u = zi(s), d = s ? u ? { height: u } : void 0 : { width: c };
1524
+ return /* @__PURE__ */ (0, z.jsxs)("aside", {
1525
+ ...o,
1526
+ className: m("flex min-h-0 flex-col border-l bg-background", Hi[e], "max-md:fixed max-md:inset-0 max-md:z-40 max-md:h-dvh max-md:border-l-0 max-md:shadow-none max-md:animate-[y-slide-up_160ms_ease-out]", i),
1527
+ style: d,
1528
+ children: [!s && /* @__PURE__ */ (0, z.jsx)(Vi, {
1529
+ width: c,
1530
+ label: r,
1531
+ onResize: l
1532
+ }), a]
1533
+ });
1534
+ }
1535
+ function Wi({ onClose: e, className: t, children: n }) {
1536
+ let r = fe();
1537
+ return /* @__PURE__ */ (0, z.jsxs)("header", {
1538
+ className: m("flex items-center gap-2 border-b px-3.5 py-2.5 max-md:gap-1 max-md:px-2 max-md:pt-[calc(0.625rem+env(safe-area-inset-top))]", t),
1539
+ children: [
1540
+ r && /* @__PURE__ */ (0, z.jsx)(k, {
1541
+ variant: "ghost",
1542
+ size: "icon-lg",
1543
+ "aria-label": L(),
1544
+ onClick: e,
1545
+ children: /* @__PURE__ */ (0, z.jsx)(Kn, { className: "size-5" })
1546
+ }),
1547
+ n,
1548
+ !r && /* @__PURE__ */ (0, z.jsx)(k, {
1549
+ variant: "ghost",
1550
+ size: "icon",
1551
+ "aria-label": L(),
1552
+ onClick: e,
1553
+ children: /* @__PURE__ */ (0, z.jsx)(U, { className: "size-5" })
1554
+ })
1555
+ ]
1556
+ });
1557
+ }
1558
+ function Gi({ className: e, ...t }) {
1559
+ return /* @__PURE__ */ (0, z.jsx)("div", {
1560
+ ...t,
1561
+ className: m("flex items-center gap-2 border-t px-3.5 py-2.5 max-md:pb-[calc(0.625rem+env(safe-area-inset-bottom))]", e)
1562
+ });
1563
+ }
1564
+ //#endregion
1517
1565
  //#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/base.js
1518
- var Y = class {
1566
+ var X = class {
1519
1567
  diff(e, t, n = {}) {
1520
1568
  let r;
1521
1569
  typeof n == "function" ? (r = n, n = {}) : "callback" in n && (r = n.callback);
@@ -1644,39 +1692,39 @@ var Y = class {
1644
1692
  return r;
1645
1693
  }
1646
1694
  };
1647
- new class extends Y {}();
1695
+ new class extends X {}();
1648
1696
  //#endregion
1649
1697
  //#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/util/string.js
1650
- function Wi(e, t) {
1698
+ function Ki(e, t) {
1651
1699
  let n = 0;
1652
1700
  for (; n < e.length && n < t.length; n++) if (e[n] != t[n]) return e.slice(0, n);
1653
1701
  return e.slice(0, n);
1654
1702
  }
1655
- function Gi(e, t) {
1703
+ function qi(e, t) {
1656
1704
  let n;
1657
1705
  if (!e || !t || e[e.length - 1] != t[t.length - 1]) return "";
1658
1706
  for (n = 0; n < e.length && n < t.length; n++) if (e[e.length - (n + 1)] != t[t.length - (n + 1)]) return e.slice(-n);
1659
1707
  return e.slice(-n);
1660
1708
  }
1661
- function Ki(e, t, n) {
1709
+ function Ji(e, t, n) {
1662
1710
  if (e.slice(0, t.length) != t) throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);
1663
1711
  return n + e.slice(t.length);
1664
1712
  }
1665
- function qi(e, t, n) {
1713
+ function Yi(e, t, n) {
1666
1714
  if (!t) return e + n;
1667
1715
  if (e.slice(-t.length) != t) throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);
1668
1716
  return e.slice(0, -t.length) + n;
1669
1717
  }
1670
- function X(e, t) {
1671
- return Ki(e, t, "");
1672
- }
1673
1718
  function Z(e, t) {
1674
- return qi(e, t, "");
1719
+ return Ji(e, t, "");
1720
+ }
1721
+ function Xi(e, t) {
1722
+ return Yi(e, t, "");
1675
1723
  }
1676
- function Ji(e, t) {
1677
- return t.slice(0, Yi(e, t));
1724
+ function Zi(e, t) {
1725
+ return t.slice(0, Qi(e, t));
1678
1726
  }
1679
- function Yi(e, t) {
1727
+ function Qi(e, t) {
1680
1728
  let n = 0;
1681
1729
  e.length > t.length && (n = e.length - t.length);
1682
1730
  let r = t.length;
@@ -1694,7 +1742,7 @@ function Yi(e, t) {
1694
1742
  }
1695
1743
  return a;
1696
1744
  }
1697
- function Xi(e, t) {
1745
+ function $i(e, t) {
1698
1746
  let n = [];
1699
1747
  for (let r of Array.from(t.segment(e))) {
1700
1748
  let e = r.segment;
@@ -1702,7 +1750,7 @@ function Xi(e, t) {
1702
1750
  }
1703
1751
  return n;
1704
1752
  }
1705
- function Zi(e, t) {
1753
+ function ea(e, t) {
1706
1754
  if (t) return $(e, t)[1];
1707
1755
  let n;
1708
1756
  for (n = e.length - 1; n >= 0 && e[n].match(/\s/); n--);
@@ -1714,14 +1762,14 @@ function Q(e, t) {
1714
1762
  return n ? n[0] : "";
1715
1763
  }
1716
1764
  function $(e, t) {
1717
- if (!t) return [Q(e), Zi(e)];
1765
+ if (!t) return [Q(e), ea(e)];
1718
1766
  if (t.resolvedOptions().granularity != "word") throw Error("The segmenter passed must have a granularity of \"word\"");
1719
- let n = Xi(e, t), r = n[0], i = n[n.length - 1];
1767
+ let n = $i(e, t), r = n[0], i = n[n.length - 1];
1720
1768
  return [/\s/.test(r) ? r : "", /\s/.test(i) ? i : ""];
1721
1769
  }
1722
1770
  //#endregion
1723
1771
  //#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/word.js
1724
- var Qi = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}", $i = RegExp(`[${Qi}]+|\\s+|[^${Qi}]`, "ug"), ea = new class extends Y {
1772
+ var ta = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}", na = RegExp(`[${ta}]+|\\s+|[^${ta}]`, "ug"), ra = new class extends X {
1725
1773
  equals(e, t, n) {
1726
1774
  return n.ignoreCase && (e = e.toLowerCase(), t = t.toLowerCase()), e.trim() === t.trim();
1727
1775
  }
@@ -1730,8 +1778,8 @@ var Qi = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8
1730
1778
  if (t.intlSegmenter) {
1731
1779
  let r = t.intlSegmenter;
1732
1780
  if (r.resolvedOptions().granularity != "word") throw Error("The segmenter passed must have a granularity of \"word\"");
1733
- n = Xi(e, r);
1734
- } else n = e.match($i) || [];
1781
+ n = $i(e, r);
1782
+ } else n = e.match(na) || [];
1735
1783
  let r = [], i = null;
1736
1784
  return n.forEach((e) => {
1737
1785
  /\s/.test(e) ? i == null ? r.push(e) : r.push(r.pop() + e) : i != null && /\s/.test(i) ? r[r.length - 1] == i ? r.push(r.pop() + e) : r.push(i + e) : r.push(e), i = e;
@@ -1744,23 +1792,23 @@ var Qi = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8
1744
1792
  if (!e || t.oneChangePerToken) return e;
1745
1793
  let n = null, r = null, i = null;
1746
1794
  return e.forEach((e) => {
1747
- e.added ? r = e : e.removed ? i = e : ((r || i) && na(n, i, r, e, t.intlSegmenter), n = e, r = null, i = null);
1748
- }), (r || i) && na(n, i, r, null, t.intlSegmenter), e;
1795
+ e.added ? r = e : e.removed ? i = e : ((r || i) && aa(n, i, r, e, t.intlSegmenter), n = e, r = null, i = null);
1796
+ }), (r || i) && aa(n, i, r, null, t.intlSegmenter), e;
1749
1797
  }
1750
1798
  }();
1751
- function ta(e, t, n) {
1752
- return n?.ignoreWhitespace != null && !n.ignoreWhitespace ? ia(e, t, n) : ea.diff(e, t, n);
1799
+ function ia(e, t, n) {
1800
+ return n?.ignoreWhitespace != null && !n.ignoreWhitespace ? sa(e, t, n) : ra.diff(e, t, n);
1753
1801
  }
1754
- function na(e, t, n, r, i) {
1802
+ function aa(e, t, n, r, i) {
1755
1803
  if (t && n) {
1756
1804
  let [a, o] = $(t.value, i), [s, c] = $(n.value, i);
1757
1805
  if (e) {
1758
- let r = Wi(a, s);
1759
- e.value = qi(e.value, s, r), t.value = X(t.value, r), n.value = X(n.value, r);
1806
+ let r = Ki(a, s);
1807
+ e.value = Yi(e.value, s, r), t.value = Z(t.value, r), n.value = Z(n.value, r);
1760
1808
  }
1761
1809
  if (r) {
1762
- let e = Gi(o, c);
1763
- r.value = Ki(r.value, c, e), t.value = Z(t.value, e), n.value = Z(n.value, e);
1810
+ let e = qi(o, c);
1811
+ r.value = Ji(r.value, c, e), t.value = Xi(t.value, e), n.value = Xi(n.value, e);
1764
1812
  }
1765
1813
  } else if (n) {
1766
1814
  if (e) {
@@ -1772,39 +1820,39 @@ function na(e, t, n, r, i) {
1772
1820
  r.value = r.value.substring(e.length);
1773
1821
  }
1774
1822
  } else if (e && r) {
1775
- let n = Q(r.value, i), [a, o] = $(t.value, i), s = Wi(n, a);
1776
- t.value = X(t.value, s);
1777
- let c = Gi(X(n, s), o);
1778
- t.value = Z(t.value, c), r.value = Ki(r.value, n, c), e.value = qi(e.value, n, n.slice(0, n.length - c.length));
1823
+ let n = Q(r.value, i), [a, o] = $(t.value, i), s = Ki(n, a);
1824
+ t.value = Z(t.value, s);
1825
+ let c = qi(Z(n, s), o);
1826
+ t.value = Xi(t.value, c), r.value = Ji(r.value, n, c), e.value = Yi(e.value, n, n.slice(0, n.length - c.length));
1779
1827
  } else if (r) {
1780
- let e = Q(r.value, i), n = Ji(Zi(t.value, i), e);
1781
- t.value = Z(t.value, n);
1828
+ let e = Q(r.value, i), n = Zi(ea(t.value, i), e);
1829
+ t.value = Xi(t.value, n);
1782
1830
  } else if (e) {
1783
- let n = Ji(Zi(e.value, i), Q(t.value, i));
1784
- t.value = X(t.value, n);
1831
+ let n = Zi(ea(e.value, i), Q(t.value, i));
1832
+ t.value = Z(t.value, n);
1785
1833
  }
1786
1834
  }
1787
- var ra = new class extends Y {
1835
+ var oa = new class extends X {
1788
1836
  tokenize(e) {
1789
- let t = RegExp(`(\\r?\\n)|[${Qi}]+|[^\\S\\n\\r]+|[^${Qi}]`, "ug");
1837
+ let t = RegExp(`(\\r?\\n)|[${ta}]+|[^\\S\\n\\r]+|[^${ta}]`, "ug");
1790
1838
  return e.match(t) || [];
1791
1839
  }
1792
1840
  }();
1793
- function ia(e, t, n) {
1794
- return ra.diff(e, t, n);
1841
+ function sa(e, t, n) {
1842
+ return oa.diff(e, t, n);
1795
1843
  }
1796
- var aa = new class extends Y {
1844
+ var ca = new class extends X {
1797
1845
  constructor() {
1798
- super(...arguments), this.tokenize = sa;
1846
+ super(...arguments), this.tokenize = ua;
1799
1847
  }
1800
1848
  equals(e, t, n) {
1801
1849
  return n.ignoreWhitespace ? ((!n.newlineIsToken || !e.includes("\n")) && (e = e.trim()), (!n.newlineIsToken || !t.includes("\n")) && (t = t.trim())) : n.ignoreNewlineAtEof && !n.newlineIsToken && (e.endsWith("\n") && (e = e.slice(0, -1)), t.endsWith("\n") && (t = t.slice(0, -1))), super.equals(e, t, n);
1802
1850
  }
1803
1851
  }();
1804
- function oa(e, t, n) {
1805
- return aa.diff(e, t, n);
1852
+ function la(e, t, n) {
1853
+ return ca.diff(e, t, n);
1806
1854
  }
1807
- function sa(e, t) {
1855
+ function ua(e, t) {
1808
1856
  t.stripTrailingCr && (e = e.replace(/\r\n/g, "\n"));
1809
1857
  let n = [], r = e.split(/(\n|\r\n)/);
1810
1858
  r[r.length - 1] || r.pop();
@@ -1816,10 +1864,10 @@ function sa(e, t) {
1816
1864
  }
1817
1865
  //#endregion
1818
1866
  //#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/sentence.js
1819
- function ca(e) {
1867
+ function da(e) {
1820
1868
  return e == "." || e == "!" || e == "?";
1821
1869
  }
1822
- new class extends Y {
1870
+ new class extends X {
1823
1871
  tokenize(e) {
1824
1872
  let t = [], n = 0;
1825
1873
  for (let r = 0; r < e.length; r++) {
@@ -1827,39 +1875,39 @@ new class extends Y {
1827
1875
  t.push(e.slice(n));
1828
1876
  break;
1829
1877
  }
1830
- if (ca(e[r]) && e[r + 1].match(/\s/)) {
1878
+ if (da(e[r]) && e[r + 1].match(/\s/)) {
1831
1879
  for (t.push(e.slice(n, r + 1)), r = n = r + 1; e[r + 1]?.match(/\s/);) r++;
1832
1880
  t.push(e.slice(n, r + 1)), n = r + 1;
1833
1881
  }
1834
1882
  }
1835
1883
  return t;
1836
1884
  }
1837
- }(), new class extends Y {
1885
+ }(), new class extends X {
1838
1886
  tokenize(e) {
1839
1887
  return e.split(/([{}:;,]|\s+)/);
1840
1888
  }
1841
- }(), new class extends Y {
1889
+ }(), new class extends X {
1842
1890
  constructor() {
1843
- super(...arguments), this.tokenize = sa;
1891
+ super(...arguments), this.tokenize = ua;
1844
1892
  }
1845
1893
  get useLongestToken() {
1846
1894
  return !0;
1847
1895
  }
1848
1896
  castInput(e, t) {
1849
1897
  let { undefinedReplacement: n, stringifyReplacer: r = (e, t) => t === void 0 ? n : t } = t;
1850
- return typeof e == "string" ? e : JSON.stringify(la(e, null, null, r), null, " ");
1898
+ return typeof e == "string" ? e : JSON.stringify(fa(e, null, null, r), null, " ");
1851
1899
  }
1852
1900
  equals(e, t, n) {
1853
1901
  return super.equals(e.replace(/,([\r\n])/g, "$1"), t.replace(/,([\r\n])/g, "$1"), n);
1854
1902
  }
1855
1903
  }();
1856
- function la(e, t, n, r, i) {
1904
+ function fa(e, t, n, r, i) {
1857
1905
  t ||= [], n ||= [], r && (e = r(i === void 0 ? "" : i, e));
1858
1906
  let a = 0;
1859
1907
  for (; a < t.length; a += 1) if (t[a] === e) return n[a];
1860
1908
  let o;
1861
1909
  if (Object.prototype.toString.call(e) === "[object Array]") {
1862
- for (t.push(e), o = Array(e.length), n.push(o), a = 0; a < e.length; a += 1) o[a] = la(e[a], t, n, r, String(a));
1910
+ for (t.push(e), o = Array(e.length), n.push(o), a = 0; a < e.length; a += 1) o[a] = fa(e[a], t, n, r, String(a));
1863
1911
  return t.pop(), n.pop(), o;
1864
1912
  }
1865
1913
  if (e && e.toJSON && (e = e.toJSON()), typeof e == "object" && e) {
@@ -1868,12 +1916,12 @@ function la(e, t, n, r, i) {
1868
1916
  for (s in e)
1869
1917
  /* istanbul ignore else */
1870
1918
  Object.prototype.hasOwnProperty.call(e, s) && i.push(s);
1871
- for (i.sort(), a = 0; a < i.length; a += 1) s = i[a], o[s] = la(e[s], t, n, r, s);
1919
+ for (i.sort(), a = 0; a < i.length; a += 1) s = i[a], o[s] = fa(e[s], t, n, r, s);
1872
1920
  t.pop(), n.pop();
1873
1921
  } else o = e;
1874
1922
  return o;
1875
1923
  }
1876
- new class extends Y {
1924
+ new class extends X {
1877
1925
  tokenize(e) {
1878
1926
  return e.slice();
1879
1927
  }
@@ -1886,15 +1934,15 @@ new class extends Y {
1886
1934
  }();
1887
1935
  //#endregion
1888
1936
  //#region ui/src/lib/textdiff.ts
1889
- var ua = 2, da = new Intl.Segmenter(void 0, { granularity: "word" }), fa = (e) => typeof e == "string" && (e.includes("\n") || e.length > 120), pa = (e) => e.replace(/\n$/, "").split("\n"), ma = (e, t) => ({
1937
+ var pa = 2, ma = new Intl.Segmenter(void 0, { granularity: "word" }), ha = (e) => typeof e == "string" && (e.includes("\n") || e.length > 120), ga = (e) => e.replace(/\n$/, "").split("\n"), _a = (e, t) => ({
1890
1938
  kind: e,
1891
1939
  segments: [{
1892
1940
  text: t,
1893
1941
  mark: !1
1894
1942
  }]
1895
1943
  });
1896
- function ha(e, t) {
1897
- let n = ta(e, t, { intlSegmenter: da });
1944
+ function va(e, t) {
1945
+ let n = ia(e, t, { intlSegmenter: ma });
1898
1946
  return [{
1899
1947
  kind: "del",
1900
1948
  segments: n.filter((e) => !e.added).map((e) => ({
@@ -1909,21 +1957,21 @@ function ha(e, t) {
1909
1957
  }))
1910
1958
  }];
1911
1959
  }
1912
- function ga(e, t) {
1913
- let n = oa(e, t), r = [];
1960
+ function ya(e, t) {
1961
+ let n = la(e, t), r = [];
1914
1962
  for (let e = 0; e < n.length; e++) {
1915
- let t = n[e], i = pa(t.value), a = n[e + 1];
1963
+ let t = n[e], i = ga(t.value), a = n[e + 1];
1916
1964
  if (t.removed && a?.added) {
1917
- let t = pa(a.value), n = Math.min(i.length, t.length), o = Array.from({ length: n }, (e, n) => ha(i[n], t[n]));
1918
- r.push(...o.map(([e]) => e), ...i.slice(n).map((e) => ma("del", e))), r.push(...o.map(([, e]) => e), ...t.slice(n).map((e) => ma("add", e))), e++;
1919
- } else r.push(...i.map((e) => ma(t.added ? "add" : t.removed ? "del" : "same", e)));
1965
+ let t = ga(a.value), n = Math.min(i.length, t.length), o = Array.from({ length: n }, (e, n) => va(i[n], t[n]));
1966
+ r.push(...o.map(([e]) => e), ...i.slice(n).map((e) => _a("del", e))), r.push(...o.map(([, e]) => e), ...t.slice(n).map((e) => _a("add", e))), e++;
1967
+ } else r.push(...i.map((e) => _a(t.added ? "add" : t.removed ? "del" : "same", e)));
1920
1968
  }
1921
1969
  return r;
1922
1970
  }
1923
- function _a(e) {
1971
+ function ba(e) {
1924
1972
  let t = e.map(() => !1);
1925
1973
  e.forEach((n, r) => {
1926
- if (n.kind !== "same") for (let n = Math.max(0, r - ua); n <= Math.min(e.length - 1, r + ua); n++) t[n] = !0;
1974
+ if (n.kind !== "same") for (let n = Math.max(0, r - pa); n <= Math.min(e.length - 1, r + pa); n++) t[n] = !0;
1927
1975
  });
1928
1976
  let n = [];
1929
1977
  return e.forEach((e, r) => {
@@ -1936,156 +1984,156 @@ function _a(e) {
1936
1984
  }
1937
1985
  //#endregion
1938
1986
  //#region ui/src/components/TextDiff.tsx
1939
- var va = {
1987
+ var xa = {
1940
1988
  same: " ",
1941
1989
  add: "+",
1942
1990
  del: "-"
1943
1991
  };
1944
- function ya({ line: e }) {
1945
- return e.segments.map((t, n) => t.mark ? /* @__PURE__ */ (0, R.jsx)("mark", {
1992
+ function Sa({ line: e }) {
1993
+ return e.segments.map((t, n) => t.mark ? /* @__PURE__ */ (0, z.jsx)("mark", {
1946
1994
  className: m("rounded-sm text-inherit", e.kind === "add" ? "bg-ok/30" : "bg-err/25"),
1947
1995
  children: t.text
1948
1996
  }, n) : t.text);
1949
1997
  }
1950
- function ba({ line: e }) {
1951
- return /* @__PURE__ */ (0, R.jsxs)("div", {
1998
+ function Ca({ line: e }) {
1999
+ return /* @__PURE__ */ (0, z.jsxs)("div", {
1952
2000
  className: m("flex gap-2 px-2.5", e.kind === "add" && "bg-ok/15", e.kind === "del" && "bg-err-soft", e.kind === "same" && "text-muted-foreground"),
1953
- children: [/* @__PURE__ */ (0, R.jsx)("span", {
2001
+ children: [/* @__PURE__ */ (0, z.jsx)("span", {
1954
2002
  "aria-hidden": !0,
1955
2003
  className: m("shrink-0 select-none", e.kind === "add" ? "text-ok" : e.kind === "del" && "text-err"),
1956
- children: va[e.kind]
1957
- }), /* @__PURE__ */ (0, R.jsxs)("span", {
2004
+ children: xa[e.kind]
2005
+ }), /* @__PURE__ */ (0, z.jsxs)("span", {
1958
2006
  className: "min-w-0 whitespace-pre-wrap [overflow-wrap:anywhere]",
1959
- children: [/* @__PURE__ */ (0, R.jsx)(ya, { line: e }), e.segments.every((e) => e.text === "") && "\xA0"]
2007
+ children: [/* @__PURE__ */ (0, z.jsx)(Sa, { line: e }), e.segments.every((e) => e.text === "") && "\xA0"]
1960
2008
  })]
1961
2009
  });
1962
2010
  }
1963
- function xa({ hunk: e }) {
1964
- let [t, n] = (0, L.useState)(!1);
1965
- return t ? e.lines.map((e, t) => /* @__PURE__ */ (0, R.jsx)(ba, { line: e }, t)) : /* @__PURE__ */ (0, R.jsx)("button", {
2011
+ function wa({ hunk: e }) {
2012
+ let [t, n] = (0, I.useState)(!1);
2013
+ return t ? e.lines.map((e, t) => /* @__PURE__ */ (0, z.jsx)(Ca, { line: e }, t)) : /* @__PURE__ */ (0, z.jsx)("button", {
1966
2014
  type: "button",
1967
2015
  onClick: () => n(!0),
1968
2016
  className: "block w-full bg-panel px-2.5 py-0.5 text-left font-sans text-[13px] text-muted-foreground hover:text-foreground",
1969
- children: Ft({ count: e.lines.length })
2017
+ children: Pt({ count: e.lines.length })
1970
2018
  });
1971
2019
  }
1972
- function Sa({ field: e, before: t, after: n, legend: r }) {
1973
- let i = (0, L.useMemo)(() => _a(ga(t, n)), [t, n]);
1974
- return /* @__PURE__ */ (0, R.jsxs)("div", {
2020
+ function Ta({ field: e, before: t, after: n, legend: r }) {
2021
+ let i = (0, I.useMemo)(() => ba(ya(t, n)), [t, n]);
2022
+ return /* @__PURE__ */ (0, z.jsxs)("div", {
1975
2023
  role: "group",
1976
2024
  "aria-label": e,
1977
2025
  className: "flex min-w-0 flex-col gap-1",
1978
- children: [/* @__PURE__ */ (0, R.jsxs)("div", {
2026
+ children: [/* @__PURE__ */ (0, z.jsxs)("div", {
1979
2027
  className: "flex flex-wrap items-baseline gap-x-3 text-[13px]",
1980
2028
  children: [
1981
- /* @__PURE__ */ (0, R.jsx)("span", {
2029
+ /* @__PURE__ */ (0, z.jsx)("span", {
1982
2030
  className: "font-mono text-syn-key",
1983
2031
  children: e
1984
2032
  }),
1985
- /* @__PURE__ */ (0, R.jsxs)("span", {
2033
+ /* @__PURE__ */ (0, z.jsxs)("span", {
1986
2034
  className: "text-muted-foreground",
1987
2035
  children: [
1988
- /* @__PURE__ */ (0, R.jsx)("span", {
2036
+ /* @__PURE__ */ (0, z.jsx)("span", {
1989
2037
  className: "font-mono text-err",
1990
- children: va.del
2038
+ children: xa.del
1991
2039
  }),
1992
2040
  " ",
1993
- /* @__PURE__ */ (0, R.jsx)("span", {
2041
+ /* @__PURE__ */ (0, z.jsx)("span", {
1994
2042
  className: "[&>*]:text-inherit",
1995
2043
  children: r[0]
1996
2044
  })
1997
2045
  ]
1998
2046
  }),
1999
- /* @__PURE__ */ (0, R.jsxs)("span", {
2047
+ /* @__PURE__ */ (0, z.jsxs)("span", {
2000
2048
  className: "text-muted-foreground",
2001
2049
  children: [
2002
- /* @__PURE__ */ (0, R.jsx)("span", {
2050
+ /* @__PURE__ */ (0, z.jsx)("span", {
2003
2051
  className: "font-mono text-ok",
2004
- children: va.add
2052
+ children: xa.add
2005
2053
  }),
2006
2054
  " ",
2007
- /* @__PURE__ */ (0, R.jsx)("span", {
2055
+ /* @__PURE__ */ (0, z.jsx)("span", {
2008
2056
  className: "[&>*]:text-inherit",
2009
2057
  children: r[1]
2010
2058
  })
2011
2059
  ]
2012
2060
  })
2013
2061
  ]
2014
- }), /* @__PURE__ */ (0, R.jsx)("div", {
2062
+ }), /* @__PURE__ */ (0, z.jsx)("div", {
2015
2063
  className: "overflow-hidden rounded-md border font-mono text-[13px] leading-relaxed",
2016
- children: i.map((e, t) => e.kind === "skip" ? /* @__PURE__ */ (0, R.jsx)(xa, { hunk: e }, t) : e.lines.map((e, n) => /* @__PURE__ */ (0, R.jsx)(ba, { line: e }, `${t}:${n}`)))
2064
+ children: i.map((e, t) => e.kind === "skip" ? /* @__PURE__ */ (0, z.jsx)(wa, { hunk: e }, t) : e.lines.map((e, n) => /* @__PURE__ */ (0, z.jsx)(Ca, { line: e }, `${t}:${n}`)))
2017
2065
  })]
2018
2066
  });
2019
2067
  }
2020
2068
  //#endregion
2021
2069
  //#region ui/src/components/FieldDiff.tsx
2022
- var Ca = (e) => typeof e == "string" ? e : e == null ? "" : JSON.stringify(e), wa = (e) => !e.dim && e.a !== e.b && (fa(e.a) || fa(e.b));
2023
- function Ta(e, t) {
2070
+ var Ea = (e) => typeof e == "string" ? e : e == null ? "" : JSON.stringify(e), Da = (e) => !e.dim && e.a !== e.b && (ha(e.a) || ha(e.b));
2071
+ function Oa(e, t) {
2024
2072
  let n = t(e.a), r = t(e.b);
2025
2073
  if (e.dim || typeof e.a != "string" || typeof e.b != "string" || e.a === e.b) return {
2026
2074
  a: n,
2027
2075
  b: r
2028
2076
  };
2029
- let [i, a] = ha(n, r);
2077
+ let [i, a] = va(n, r);
2030
2078
  return {
2031
- a: /* @__PURE__ */ (0, R.jsx)(ya, { line: i }),
2032
- b: /* @__PURE__ */ (0, R.jsx)(ya, { line: a })
2079
+ a: /* @__PURE__ */ (0, z.jsx)(Sa, { line: i }),
2080
+ b: /* @__PURE__ */ (0, z.jsx)(Sa, { line: a })
2033
2081
  };
2034
2082
  }
2035
- function Ea({ labels: e, rows: t, note: n, className: r }) {
2036
- return de() ? /* @__PURE__ */ (0, R.jsxs)("div", {
2083
+ function ka({ labels: e, rows: t, note: n, className: r }) {
2084
+ return fe() ? /* @__PURE__ */ (0, z.jsxs)("div", {
2037
2085
  "data-testid": "field-diff",
2038
2086
  className: m("flex flex-col gap-2 font-mono text-[13px]", r),
2039
- children: [n && /* @__PURE__ */ (0, R.jsx)("p", {
2087
+ children: [n && /* @__PURE__ */ (0, z.jsx)("p", {
2040
2088
  className: "font-sans text-muted-foreground",
2041
2089
  children: n
2042
- }), t.map((t) => /* @__PURE__ */ (0, R.jsxs)("div", {
2090
+ }), t.map((t) => /* @__PURE__ */ (0, z.jsxs)("div", {
2043
2091
  role: "group",
2044
2092
  "aria-label": t.field,
2045
2093
  className: m("overflow-hidden rounded-md border", t.dim && "opacity-50"),
2046
- children: [/* @__PURE__ */ (0, R.jsx)("div", {
2094
+ children: [/* @__PURE__ */ (0, z.jsx)("div", {
2047
2095
  className: "bg-panel px-2.5 py-1.5 font-semibold text-syn-key",
2048
2096
  children: t.field
2049
- }), [[e[0], t.a], [e[1], t.b]].map(([e, n], r) => /* @__PURE__ */ (0, R.jsxs)("div", {
2097
+ }), [[e[0], t.a], [e[1], t.b]].map(([e, n], r) => /* @__PURE__ */ (0, z.jsxs)("div", {
2050
2098
  className: "flex gap-2 border-t px-2.5 py-1.5 break-all",
2051
- children: [/* @__PURE__ */ (0, R.jsx)("span", {
2099
+ children: [/* @__PURE__ */ (0, z.jsx)("span", {
2052
2100
  className: "w-24 shrink-0 font-sans text-[12px] text-muted-foreground",
2053
2101
  children: e
2054
- }), /* @__PURE__ */ (0, R.jsx)("span", {
2102
+ }), /* @__PURE__ */ (0, z.jsx)("span", {
2055
2103
  className: m(t.dim && "line-clamp-2"),
2056
2104
  children: n
2057
2105
  })]
2058
2106
  }, r))]
2059
2107
  }, t.field))]
2060
- }) : /* @__PURE__ */ (0, R.jsxs)("div", {
2108
+ }) : /* @__PURE__ */ (0, z.jsxs)("div", {
2061
2109
  "data-testid": "field-diff",
2062
2110
  className: m("grid grid-cols-[auto_1fr_1fr] gap-x-3 gap-y-1 font-mono text-[12px]", r),
2063
2111
  children: [
2064
- /* @__PURE__ */ (0, R.jsx)("span", {}),
2065
- /* @__PURE__ */ (0, R.jsx)("span", {
2112
+ /* @__PURE__ */ (0, z.jsx)("span", {}),
2113
+ /* @__PURE__ */ (0, z.jsx)("span", {
2066
2114
  className: "font-sans text-muted-foreground",
2067
2115
  children: e[0]
2068
2116
  }),
2069
- /* @__PURE__ */ (0, R.jsx)("span", {
2117
+ /* @__PURE__ */ (0, z.jsx)("span", {
2070
2118
  className: "font-sans text-muted-foreground",
2071
2119
  children: e[1]
2072
2120
  }),
2073
- n && /* @__PURE__ */ (0, R.jsx)("span", {
2121
+ n && /* @__PURE__ */ (0, z.jsx)("span", {
2074
2122
  className: "col-span-3 text-muted-foreground",
2075
2123
  children: n
2076
2124
  }),
2077
- t.map((e) => /* @__PURE__ */ (0, R.jsxs)("div", {
2125
+ t.map((e) => /* @__PURE__ */ (0, z.jsxs)("div", {
2078
2126
  className: m("contents", e.dim && "opacity-50"),
2079
2127
  children: [
2080
- /* @__PURE__ */ (0, R.jsx)("span", {
2128
+ /* @__PURE__ */ (0, z.jsx)("span", {
2081
2129
  className: "text-syn-key",
2082
2130
  children: e.field
2083
2131
  }),
2084
- /* @__PURE__ */ (0, R.jsx)("span", {
2132
+ /* @__PURE__ */ (0, z.jsx)("span", {
2085
2133
  className: m("[overflow-wrap:anywhere]", e.dim && "line-clamp-2"),
2086
2134
  children: e.a
2087
2135
  }),
2088
- /* @__PURE__ */ (0, R.jsx)("span", {
2136
+ /* @__PURE__ */ (0, z.jsx)("span", {
2089
2137
  className: m("[overflow-wrap:anywhere]", e.dim && "line-clamp-2"),
2090
2138
  children: e.b
2091
2139
  })
@@ -2094,42 +2142,42 @@ function Ea({ labels: e, rows: t, note: n, className: r }) {
2094
2142
  ]
2095
2143
  });
2096
2144
  }
2097
- function Da({ labels: e, rows: t, format: n, note: r, className: i }) {
2098
- let a = t.filter((e) => !wa(e)), o = t.filter(wa);
2099
- return /* @__PURE__ */ (0, R.jsxs)("div", {
2145
+ function Aa({ labels: e, rows: t, format: n, note: r, className: i }) {
2146
+ let a = t.filter((e) => !Da(e)), o = t.filter(Da);
2147
+ return /* @__PURE__ */ (0, z.jsxs)("div", {
2100
2148
  className: "flex min-w-0 flex-col gap-3",
2101
- children: [(a.length > 0 || r) && /* @__PURE__ */ (0, R.jsx)(Ea, {
2149
+ children: [(a.length > 0 || r) && /* @__PURE__ */ (0, z.jsx)(ka, {
2102
2150
  labels: e,
2103
2151
  note: r,
2104
2152
  className: i,
2105
2153
  rows: a.map((e) => ({
2106
2154
  field: e.field,
2107
- ...Ta(e, n),
2155
+ ...Oa(e, n),
2108
2156
  dim: e.dim
2109
2157
  }))
2110
- }), o.map((t) => /* @__PURE__ */ (0, R.jsx)(Sa, {
2158
+ }), o.map((t) => /* @__PURE__ */ (0, z.jsx)(Ta, {
2111
2159
  field: t.field,
2112
2160
  legend: e,
2113
- before: Ca(t.a),
2114
- after: Ca(t.b)
2161
+ before: Ea(t.a),
2162
+ after: Ea(t.b)
2115
2163
  }, t.field))]
2116
2164
  });
2117
2165
  }
2118
2166
  //#endregion
2119
2167
  //#region ui/src/components/StaleDialog.tsx
2120
- function Oa({ stale: e, current: t, draft: n, onReload: r, onOverwrite: i, onClose: a }) {
2121
- let o = (0, L.useRef)(null);
2122
- return /* @__PURE__ */ (0, R.jsx)(or, {
2168
+ function ja({ stale: e, current: t, draft: n, onReload: r, onOverwrite: i, onClose: a }) {
2169
+ let o = (0, I.useRef)(null);
2170
+ return /* @__PURE__ */ (0, z.jsx)(ir, {
2123
2171
  open: !0,
2124
2172
  onOpenChange: (e) => !e && a(),
2125
- children: /* @__PURE__ */ (0, R.jsxs)(dr, {
2173
+ children: /* @__PURE__ */ (0, z.jsxs)(lr, {
2126
2174
  onOpenAutoFocus: (e) => {
2127
2175
  e.preventDefault(), o.current?.focus();
2128
2176
  },
2129
2177
  children: [
2130
- /* @__PURE__ */ (0, R.jsxs)(fr, { children: [/* @__PURE__ */ (0, R.jsx)(hr, { children: yn() }), /* @__PURE__ */ (0, R.jsx)(gr, { children: gn() })] }),
2131
- /* @__PURE__ */ (0, R.jsx)(Da, {
2132
- labels: [vn(), _n()],
2178
+ /* @__PURE__ */ (0, z.jsxs)(ur, { children: [/* @__PURE__ */ (0, z.jsx)(pr, { children: _n() }), /* @__PURE__ */ (0, z.jsx)(mr, { children: mn() })] }),
2179
+ /* @__PURE__ */ (0, z.jsx)(Aa, {
2180
+ labels: [gn(), hn()],
2133
2181
  format: (e) => JSON.stringify(e ?? null),
2134
2182
  rows: e.map((e) => ({
2135
2183
  field: e,
@@ -2137,14 +2185,14 @@ function Oa({ stale: e, current: t, draft: n, onReload: r, onOverwrite: i, onClo
2137
2185
  b: n[e]
2138
2186
  }))
2139
2187
  }),
2140
- /* @__PURE__ */ (0, R.jsxs)(mr, { children: [/* @__PURE__ */ (0, R.jsx)(j, {
2188
+ /* @__PURE__ */ (0, z.jsxs)(fr, { children: [/* @__PURE__ */ (0, z.jsx)(k, {
2141
2189
  ref: o,
2142
2190
  variant: "outline",
2143
2191
  onClick: r,
2144
- children: ln()
2145
- }), /* @__PURE__ */ (0, R.jsx)(j, {
2192
+ children: cn()
2193
+ }), /* @__PURE__ */ (0, z.jsx)(k, {
2146
2194
  onClick: i,
2147
- children: $t()
2195
+ children: Qt()
2148
2196
  })] })
2149
2197
  ]
2150
2198
  })
@@ -2152,12 +2200,17 @@ function Oa({ stale: e, current: t, draft: n, onReload: r, onOverwrite: i, onClo
2152
2200
  }
2153
2201
  //#endregion
2154
2202
  //#region ui/src/components/RecordDrawer.tsx
2155
- var ka = (e, t) => Object.hasOwn(e.columns, t) ? e.columns[t] : void 0, Aa = (e, t) => Object.hasOwn(e.formats, t) ? e.formats[t] : void 0, ja = (e) => e.files?.endsWith(".mdx") ?? !1, Ma = (e, t) => Object.hasOwn(e.values, t) ? e.values[t] : void 0, Na = (e, t) => Object.hasOwn(e, t) ? e[t] : void 0, Pa = "absolute inset-y-0 right-0 z-20 border-l bg-background shadow-xl max-md:fixed max-md:inset-0 max-md:z-40 max-md:h-dvh max-md:border-l-0 max-md:shadow-none max-md:animate-[y-slide-up_160ms_ease-out]", Fa = "max-md:flex-1 max-md:text-[14px]";
2156
- function Ia(e, t = !0) {
2157
- let n = (0, L.useRef)(void 0);
2158
- (0, L.useEffect)(() => {
2203
+ var Ma = (e, t) => Object.hasOwn(e.columns, t) ? e.columns[t] : void 0, Na = (e, t) => Object.hasOwn(e.formats, t) ? e.formats[t] : void 0, Pa = (e) => e.files?.endsWith(".mdx") ?? !1, Fa = (e, t) => Object.hasOwn(e.values, t) ? e.values[t] : void 0, Ia = (e, t) => Object.hasOwn(e, t) ? e[t] : void 0, La = {
2204
+ layout: "overlay",
2205
+ widthKey: "yamlite-drawer-width",
2206
+ defaultWidth: 360,
2207
+ "data-record-drawer": ""
2208
+ }, Ra = "flex-1 text-[14px]";
2209
+ function za(e, t = !0) {
2210
+ let n = (0, I.useRef)(void 0);
2211
+ (0, I.useEffect)(() => {
2159
2212
  t && (n.current = window.event);
2160
- }, [t]), (0, L.useEffect)(() => {
2213
+ }, [t]), (0, I.useEffect)(() => {
2161
2214
  if (!t) return;
2162
2215
  let r = (t) => {
2163
2216
  if (t === n.current) return;
@@ -2171,25 +2224,25 @@ function Ia(e, t = !0) {
2171
2224
  };
2172
2225
  });
2173
2226
  }
2174
- function La({ table: e, recordKey: t, headerActions: n, onClose: r }) {
2175
- let a = i(), o = pe(), s = ae(), c = h(), { connected: l } = ee(), u = l && !S(), { data: d, error: f } = _({
2227
+ function Ba({ table: e, recordKey: t, headerActions: n, onClose: r }) {
2228
+ let a = i(), o = me(), s = se(), c = h(), { connected: l } = ee(), u = l && !S(), { data: d, error: f } = _({
2176
2229
  queryKey: [
2177
2230
  "record",
2178
2231
  e.name,
2179
2232
  t
2180
2233
  ],
2181
2234
  queryFn: () => w.record(e.name, t)
2182
- }), [p, g] = (0, L.useState)(null), [v, y] = (0, L.useState)(null), [b, x] = (0, L.useState)(/* @__PURE__ */ new Set()), [C, T] = (0, L.useState)(null), [ne, E] = (0, L.useState)(!1), [D, O] = (0, L.useState)(null), [k, re] = (0, L.useState)("form"), [ie, A] = (0, L.useState)(null), oe = Fi(e.name, t, k === "history" && !S()), [se, ce] = (0, L.useState)(0), M = p !== null && v !== null && G(p, v).length > 0, [le, ue] = Ti("yamlite-drawer-width", 360), N = de(), fe = ki(N), me = N ? fe ? { height: fe } : void 0 : { width: le };
2183
- (0, L.useEffect)(() => {
2184
- d && !M && (v && G(v, d.row).length === 0 ? g(d.row) : he(d.row));
2185
- }, [d, M]);
2186
- function he(e) {
2187
- g(e), y(e), x(/* @__PURE__ */ new Set()), O(null), ce((e) => e + 1), A(null);
2235
+ }), [p, g] = (0, I.useState)(null), [v, y] = (0, I.useState)(null), [b, x] = (0, I.useState)(/* @__PURE__ */ new Set()), [C, T] = (0, I.useState)(null), [ne, re] = (0, I.useState)(!1), [ie, E] = (0, I.useState)(null), [D, ae] = (0, I.useState)("form"), [O, oe] = (0, I.useState)(null), ce = wi(e.name, t, D === "history" && !S()), [le, ue] = (0, I.useState)(0), A = p !== null && v !== null && K(p, v).length > 0, j = fe();
2236
+ (0, I.useEffect)(() => {
2237
+ d && !A && (v && K(v, d.row).length === 0 ? g(d.row) : de(d.row));
2238
+ }, [d, A]);
2239
+ function de(e) {
2240
+ g(e), y(e), x(/* @__PURE__ */ new Set()), E(null), ue((e) => e + 1), oe(null);
2188
2241
  }
2189
- function ge(t, n) {
2190
- p && (y(Ni(p, t, e.key)), x(/* @__PURE__ */ new Set()), ce((e) => e + 1), A(n.slice(0, 7)), re("form"));
2242
+ function pe(t, n) {
2243
+ p && (y(Si(p, t, e.key)), x(/* @__PURE__ */ new Set()), ue((e) => e + 1), oe(n.slice(0, 7)), ae("form"));
2191
2244
  }
2192
- let P = ze({
2245
+ let M = Be({
2193
2246
  mutationFn: ({ values: n, base: r }) => w.update(e.name, t, n, r),
2194
2247
  onMutate: () => c({
2195
2248
  type: "saved",
@@ -2202,7 +2255,7 @@ function La({ table: e, recordKey: t, headerActions: n, onClose: r }) {
2202
2255
  ...p,
2203
2256
  ...r.values
2204
2257
  };
2205
- g(i), y(i), A(null), o.setQueryData([
2258
+ g(i), y(i), oe(null), o.setQueryData([
2206
2259
  "record",
2207
2260
  e.name,
2208
2261
  t
@@ -2225,7 +2278,7 @@ function La({ table: e, recordKey: t, headerActions: n, onClose: r }) {
2225
2278
  current: n.body.current
2226
2279
  });
2227
2280
  }
2228
- }), F = ze({
2281
+ }), N = Be({
2229
2282
  mutationFn: () => w.remove(e.name, t),
2230
2283
  onMutate: () => c({
2231
2284
  type: "saved",
@@ -2245,9 +2298,9 @@ function La({ table: e, recordKey: t, headerActions: n, onClose: r }) {
2245
2298
  search: {}
2246
2299
  });
2247
2300
  }
2248
- }), _e = () => {
2249
- !p || !v || !M || b.size > 0 || !l || P.isPending || P.mutate(Jr(p, v));
2250
- }, ve = () => r ? r() : void s({
2301
+ }), he = () => {
2302
+ !p || !v || !A || b.size > 0 || !l || M.isPending || M.mutate(Kr(p, v));
2303
+ }, ge = () => r ? r() : void s({
2251
2304
  to: "/t/$table",
2252
2305
  params: { table: e.name },
2253
2306
  search: (e) => ({
@@ -2255,133 +2308,113 @@ function La({ table: e, recordKey: t, headerActions: n, onClose: r }) {
2255
2308
  key: void 0
2256
2309
  })
2257
2310
  });
2258
- if (Ia(ve, !M), (0, L.useEffect)(() => {
2311
+ if (za(ge, !A), (0, I.useEffect)(() => {
2259
2312
  let e = (e) => {
2260
- e.key === "s" && (e.metaKey || e.ctrlKey) && !S() && (e.preventDefault(), _e());
2313
+ e.key === "s" && (e.metaKey || e.ctrlKey) && !S() && (e.preventDefault(), he());
2261
2314
  };
2262
2315
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
2263
- }), f) return /* @__PURE__ */ (0, R.jsx)("aside", {
2264
- "data-record-drawer": !0,
2265
- "aria-label": Zt(),
2266
- className: m(Pa, "p-4 text-err"),
2267
- style: me,
2316
+ }), f) return /* @__PURE__ */ (0, z.jsx)(Ui, {
2317
+ ...La,
2318
+ resizeLabel: R(),
2319
+ "aria-label": Xt(),
2320
+ className: "p-4 text-err",
2268
2321
  children: f.message
2269
2322
  });
2270
- if (!v || !p || !d) return /* @__PURE__ */ (0, R.jsx)("aside", {
2271
- "data-record-drawer": !0,
2272
- "aria-label": Zt(),
2273
- className: Pa,
2274
- style: me
2323
+ if (!v || !p || !d) return /* @__PURE__ */ (0, z.jsx)(Ui, {
2324
+ ...La,
2325
+ resizeLabel: R(),
2326
+ "aria-label": Xt()
2275
2327
  });
2276
- let ye = Object.keys(e.columns).filter((t) => t !== e.key), be = Object.keys(v).filter((t) => t !== e.key && !ye.includes(t)), xe = new Set(G(p, v)), Ee = xe.size, Ae = Pi(oe.data?.pages);
2277
- return /* @__PURE__ */ (0, R.jsxs)("aside", {
2278
- "data-record-drawer": !0,
2279
- "aria-label": Zt(),
2280
- className: m(Pa, "flex flex-col"),
2281
- style: me,
2328
+ let _e = Object.keys(e.columns).filter((t) => t !== e.key), ve = Object.keys(v).filter((t) => t !== e.key && !_e.includes(t)), ye = new Set(K(p, v)), be = ye.size, xe = Ci(ce.data?.pages);
2329
+ return /* @__PURE__ */ (0, z.jsxs)(Ui, {
2330
+ ...La,
2331
+ resizeLabel: R(),
2332
+ "aria-label": Xt(),
2282
2333
  children: [
2283
- !N && /* @__PURE__ */ (0, R.jsx)(Di, {
2284
- width: le,
2285
- label: dn(),
2286
- onResize: ue
2287
- }),
2288
- /* @__PURE__ */ (0, R.jsxs)(Oe, {
2289
- value: k,
2334
+ /* @__PURE__ */ (0, z.jsxs)(ke, {
2335
+ value: D,
2290
2336
  onValueChange: (e) => {
2291
- re(e), x((e) => new Set([...e].filter((e) => e !== "$json"))), O(null);
2337
+ ae(e), x((e) => new Set([...e].filter((e) => e !== "$json"))), E(null);
2292
2338
  },
2293
2339
  className: "flex min-h-0 flex-1 flex-col",
2294
2340
  children: [
2295
- /* @__PURE__ */ (0, R.jsxs)("div", {
2296
- className: "flex flex-wrap items-center gap-x-2 gap-y-1.5 border-b px-4 py-3 max-md:gap-1 max-md:px-2 max-md:pt-[calc(0.5rem+env(safe-area-inset-top))] max-md:pb-2",
2297
- children: [
2298
- N && /* @__PURE__ */ (0, R.jsx)("button", {
2299
- type: "button",
2300
- "aria-label": Ue(),
2301
- onClick: ve,
2302
- className: "grid size-10 place-items-center",
2303
- children: /* @__PURE__ */ (0, R.jsx)(Jn, { className: "size-5" })
2304
- }),
2305
- /* @__PURE__ */ (0, R.jsx)("span", {
2306
- className: "min-w-[6rem] flex-1 truncate font-mono font-bold",
2307
- children: t
2308
- }),
2309
- n,
2310
- /* @__PURE__ */ (0, R.jsxs)(De, {
2311
- className: "ml-auto h-7 max-md:order-last max-md:ml-0 max-md:h-9 max-md:w-full",
2312
- children: [
2313
- /* @__PURE__ */ (0, R.jsx)(Te, {
2314
- value: "form",
2315
- className: Fa,
2316
- children: xn()
2317
- }),
2318
- /* @__PURE__ */ (0, R.jsx)(Te, {
2319
- value: "json",
2320
- className: Fa,
2321
- children: "JSON"
2322
- }),
2323
- /* @__PURE__ */ (0, R.jsx)(Te, {
2324
- value: "yaml",
2325
- className: Fa,
2326
- children: bn()
2327
- }),
2328
- !S() && /* @__PURE__ */ (0, R.jsxs)(Te, {
2329
- value: "history",
2330
- className: Fa,
2331
- children: [Sn(), Ae !== null && /* @__PURE__ */ (0, R.jsx)("span", {
2332
- className: "ml-1 font-mono text-[10px] text-muted-foreground",
2333
- children: Ae
2334
- })]
2335
- })
2336
- ]
2337
- }),
2338
- !N && /* @__PURE__ */ (0, R.jsx)("button", {
2339
- type: "button",
2340
- "aria-label": Ue(),
2341
- onClick: ve,
2342
- className: "text-muted-foreground",
2343
- children: /* @__PURE__ */ (0, R.jsx)(H, { className: "size-4" })
2344
- })
2345
- ]
2341
+ /* @__PURE__ */ (0, z.jsxs)(Wi, {
2342
+ onClose: ge,
2343
+ children: [/* @__PURE__ */ (0, z.jsx)("span", {
2344
+ className: "min-w-0 flex-1 truncate font-mono font-bold",
2345
+ title: t,
2346
+ children: t
2347
+ }), n]
2348
+ }),
2349
+ /* @__PURE__ */ (0, z.jsx)("div", {
2350
+ className: "border-b px-3.5 py-2",
2351
+ children: /* @__PURE__ */ (0, z.jsxs)(Oe, {
2352
+ className: "h-9 w-full",
2353
+ children: [
2354
+ /* @__PURE__ */ (0, z.jsx)(P, {
2355
+ value: "form",
2356
+ className: Ra,
2357
+ children: yn()
2358
+ }),
2359
+ /* @__PURE__ */ (0, z.jsx)(P, {
2360
+ value: "json",
2361
+ className: Ra,
2362
+ children: "JSON"
2363
+ }),
2364
+ /* @__PURE__ */ (0, z.jsx)(P, {
2365
+ value: "yaml",
2366
+ className: Ra,
2367
+ children: vn()
2368
+ }),
2369
+ !S() && /* @__PURE__ */ (0, z.jsxs)(P, {
2370
+ value: "history",
2371
+ className: Ra,
2372
+ children: [bn(), xe !== null && /* @__PURE__ */ (0, z.jsx)("span", {
2373
+ className: "ml-1 font-mono text-[12px] text-muted-foreground",
2374
+ children: xe
2375
+ })]
2376
+ })
2377
+ ]
2378
+ })
2346
2379
  }),
2347
- /* @__PURE__ */ (0, R.jsx)("div", {
2348
- className: "truncate px-4 pt-3 font-mono text-[11px] text-muted-foreground max-md:text-[12px]",
2380
+ /* @__PURE__ */ (0, z.jsx)("div", {
2381
+ className: "truncate px-4 pt-3 font-mono text-[13px] text-muted-foreground",
2349
2382
  children: d.file
2350
2383
  }),
2351
- /* @__PURE__ */ (0, R.jsxs)(I, {
2384
+ /* @__PURE__ */ (0, z.jsxs)(F, {
2352
2385
  value: "form",
2353
2386
  className: "min-h-0 flex-1 overflow-auto px-4 py-3",
2354
- onFocus: (e) => N && e.target.matches("input, textarea, [contenteditable]") && e.target.scrollIntoView?.({ block: "center" }),
2355
- children: [!l && /* @__PURE__ */ (0, R.jsx)("p", {
2356
- className: "mb-2 text-[11.5px] text-err",
2357
- children: qt()
2358
- }), /* @__PURE__ */ (0, R.jsx)("fieldset", {
2387
+ onFocus: (e) => j && e.target.matches("input, textarea, [contenteditable]") && e.target.scrollIntoView?.({ block: "center" }),
2388
+ children: [!l && /* @__PURE__ */ (0, z.jsx)("p", {
2389
+ className: "mb-2 text-[13px] text-err",
2390
+ children: Kt()
2391
+ }), /* @__PURE__ */ (0, z.jsx)("fieldset", {
2359
2392
  disabled: !u,
2360
2393
  className: "m-0 min-w-0 border-0 p-0",
2361
- children: [...ye, ...be].map((t) => {
2362
- let n = e.references.find((e) => e.column === t), r = (e.captures ?? []).some((e) => e.column === t), i = /* @__PURE__ */ (0, R.jsx)(bi, {
2394
+ children: [..._e, ...ve].map((t) => {
2395
+ let n = e.references.find((e) => e.column === t), r = (e.captures ?? []).some((e) => e.column === t), i = /* @__PURE__ */ (0, z.jsx)(vi, {
2363
2396
  readOnly: !u || r,
2364
2397
  path: [t],
2365
- label: /* @__PURE__ */ (0, R.jsxs)("div", {
2366
- className: `flex flex-1 justify-between ${vr}`,
2367
- children: [/* @__PURE__ */ (0, R.jsxs)("span", {
2398
+ label: /* @__PURE__ */ (0, z.jsxs)("div", {
2399
+ className: `flex flex-1 justify-between ${gr}`,
2400
+ children: [/* @__PURE__ */ (0, z.jsxs)("span", {
2368
2401
  className: e.required.includes(t) && v[t] == null ? "text-warn" : void 0,
2369
- children: [t, e.required.includes(t) && /* @__PURE__ */ (0, R.jsx)("span", {
2370
- "aria-label": un(),
2402
+ children: [t, e.required.includes(t) && /* @__PURE__ */ (0, z.jsx)("span", {
2403
+ "aria-label": ln(),
2371
2404
  children: " *"
2372
2405
  })]
2373
- }), /* @__PURE__ */ (0, R.jsx)("span", {
2406
+ }), /* @__PURE__ */ (0, z.jsx)("span", {
2374
2407
  className: "font-mono text-[10px] font-medium max-md:text-[11.5px]",
2375
- children: n ? `→ ${n.table}` : Aa(e, t) ?? ka(e, t) ?? Qt()
2408
+ children: n ? `→ ${n.table}` : Na(e, t) ?? Ma(e, t) ?? Zt()
2376
2409
  })]
2377
2410
  }),
2378
2411
  value: v[t],
2379
- type: ka(e, t),
2380
- format: Aa(e, t),
2381
- mdx: ja(e),
2382
- allowed: Ma(e, t),
2383
- min: Na(e.min, t),
2384
- max: Na(e.max, t),
2412
+ type: Ma(e, t),
2413
+ format: Na(e, t),
2414
+ mdx: Pa(e),
2415
+ allowed: Fa(e, t),
2416
+ min: Ia(e.min, t),
2417
+ max: Ia(e.max, t),
2385
2418
  reference: n,
2386
2419
  onChange: (e) => y({
2387
2420
  ...v,
@@ -2391,10 +2424,10 @@ function La({ table: e, recordKey: t, headerActions: n, onClose: r }) {
2391
2424
  let r = new Set(n);
2392
2425
  return t ? r.delete(e) : r.add(e), r;
2393
2426
  })
2394
- }, `${t}:${se}`);
2395
- return /* @__PURE__ */ (0, R.jsx)("div", {
2396
- className: m("mb-3.5", ie && xe.has(t) && "-mx-2 rounded-md bg-warn-soft px-2 py-1"),
2397
- children: r ? /* @__PURE__ */ (0, R.jsx)("fieldset", {
2427
+ }, `${t}:${le}`);
2428
+ return /* @__PURE__ */ (0, z.jsx)("div", {
2429
+ className: m("mb-3.5", O && ye.has(t) && "-mx-2 rounded-md bg-warn-soft px-2 py-1"),
2430
+ children: r ? /* @__PURE__ */ (0, z.jsx)("fieldset", {
2398
2431
  disabled: !0,
2399
2432
  className: "m-0 min-w-0 border-0 p-0",
2400
2433
  children: i
@@ -2403,142 +2436,142 @@ function La({ table: e, recordKey: t, headerActions: n, onClose: r }) {
2403
2436
  })
2404
2437
  })]
2405
2438
  }),
2406
- /* @__PURE__ */ (0, R.jsxs)(I, {
2439
+ /* @__PURE__ */ (0, z.jsxs)(F, {
2407
2440
  value: "json",
2408
2441
  className: "min-h-0 flex-1 overflow-auto px-4 py-3",
2409
- children: [/* @__PURE__ */ (0, R.jsx)(ke, {
2410
- "aria-label": Yt(),
2442
+ children: [/* @__PURE__ */ (0, z.jsx)(Ae, {
2443
+ "aria-label": Jt(),
2411
2444
  value: JSON.stringify(v, null, 2),
2412
- extensions: [we(), Se.lineWrapping],
2445
+ extensions: [Ee(), we.lineWrapping],
2413
2446
  theme: a,
2414
2447
  editable: u,
2415
2448
  onChange: (t) => {
2416
2449
  try {
2417
2450
  let n = JSON.parse(t);
2418
- if (typeof n != "object" || !n || Array.isArray(n)) throw Error(Xt());
2451
+ if (typeof n != "object" || !n || Array.isArray(n)) throw Error(Yt());
2419
2452
  y({
2420
2453
  ...n,
2421
2454
  [e.key]: v[e.key]
2422
- }), x((e) => new Set([...e].filter((e) => e !== "$json"))), O(null);
2455
+ }), x((e) => new Set([...e].filter((e) => e !== "$json"))), E(null);
2423
2456
  } catch (e) {
2424
- x((e) => /* @__PURE__ */ new Set([...e, "$json"])), O(e instanceof Error ? e.message : String(e));
2457
+ x((e) => /* @__PURE__ */ new Set([...e, "$json"])), E(e instanceof Error ? e.message : String(e));
2425
2458
  }
2426
2459
  }
2427
- }), D && /* @__PURE__ */ (0, R.jsx)("p", {
2428
- className: "mt-1 text-[11px] text-err",
2429
- children: D
2460
+ }), ie && /* @__PURE__ */ (0, z.jsx)("p", {
2461
+ className: "mt-1 text-[13px] text-err",
2462
+ children: ie
2430
2463
  })]
2431
2464
  }),
2432
- /* @__PURE__ */ (0, R.jsxs)(I, {
2465
+ /* @__PURE__ */ (0, z.jsxs)(F, {
2433
2466
  value: "yaml",
2434
2467
  className: "min-h-0 flex-1 overflow-auto px-4 py-3",
2435
- children: [d.yamlError && /* @__PURE__ */ (0, R.jsx)("p", {
2436
- className: "mb-2 text-[11.5px] text-err",
2468
+ children: [d.yamlError && /* @__PURE__ */ (0, z.jsx)("p", {
2469
+ className: "mb-2 text-[13px] text-err",
2437
2470
  children: d.yamlError
2438
- }), /* @__PURE__ */ (0, R.jsx)(ke, {
2439
- "aria-label": Jt(),
2471
+ }), /* @__PURE__ */ (0, z.jsx)(Ae, {
2472
+ "aria-label": qt(),
2440
2473
  value: d.yaml ?? "# not written to a file yet",
2441
- extensions: [Ce(), Se.lineWrapping],
2474
+ extensions: [Te(), we.lineWrapping],
2442
2475
  editable: !1,
2443
2476
  theme: a
2444
2477
  })]
2445
2478
  }),
2446
- !S() && /* @__PURE__ */ (0, R.jsx)(I, {
2479
+ !S() && /* @__PURE__ */ (0, z.jsx)(F, {
2447
2480
  value: "history",
2448
2481
  className: "min-h-0 flex-1 overflow-auto px-4 py-3",
2449
- children: /* @__PURE__ */ (0, R.jsx)(Hi, {
2482
+ children: /* @__PURE__ */ (0, z.jsx)(ji, {
2450
2483
  table: e.name,
2451
2484
  recordKey: t,
2452
- query: oe,
2485
+ query: ce,
2453
2486
  current: p,
2454
2487
  keyColumn: e.key,
2455
2488
  canRestore: u,
2456
- onRestore: ge
2489
+ onRestore: pe
2457
2490
  })
2458
2491
  })
2459
2492
  ]
2460
2493
  }),
2461
- !S() && /* @__PURE__ */ (0, R.jsxs)("div", {
2462
- className: "flex items-center gap-2 border-t px-4 py-2.5 max-md:flex-wrap max-md:pb-[calc(0.625rem+env(safe-area-inset-bottom))]",
2494
+ !S() && /* @__PURE__ */ (0, z.jsxs)(Gi, {
2495
+ className: "max-md:flex-wrap",
2463
2496
  children: [
2464
- /* @__PURE__ */ (0, R.jsxs)("span", {
2465
- className: "mr-auto flex min-w-0 flex-col text-[11px] text-muted-foreground max-md:basis-full max-md:text-[12px]",
2466
- children: [Ee > 0 ? ie ? mn({
2467
- from: ie,
2468
- count: Ee
2469
- }) : Rt({ count: Ee }) : /* @__PURE__ */ (0, R.jsx)(Ui, {
2497
+ /* @__PURE__ */ (0, z.jsxs)("span", {
2498
+ className: "mr-auto flex min-w-0 flex-col text-[13px] text-muted-foreground max-md:basis-full",
2499
+ children: [be > 0 ? O ? fn({
2500
+ from: O,
2501
+ count: be
2502
+ }) : Lt({ count: be }) : /* @__PURE__ */ (0, z.jsx)(Mi, {
2470
2503
  table: e.name,
2471
2504
  recordKey: t
2472
- }), P.isError && !(P.error instanceof te && P.error.status === 409) && /* @__PURE__ */ (0, R.jsx)("span", {
2505
+ }), M.isError && !(M.error instanceof te && M.error.status === 409) && /* @__PURE__ */ (0, z.jsx)("span", {
2473
2506
  className: "text-err",
2474
- children: P.error.message
2507
+ children: M.error.message
2475
2508
  })]
2476
2509
  }),
2477
- /* @__PURE__ */ (0, R.jsx)(j, {
2510
+ /* @__PURE__ */ (0, z.jsx)(k, {
2478
2511
  variant: "ghost",
2479
2512
  size: "icon",
2480
- "aria-label": zt(),
2513
+ "aria-label": Rt(),
2481
2514
  disabled: !l,
2482
- onClick: () => E(!0),
2483
- children: /* @__PURE__ */ (0, R.jsx)(nr, { className: "size-4" })
2515
+ onClick: () => re(!0),
2516
+ children: /* @__PURE__ */ (0, z.jsx)(er, { className: "size-4" })
2484
2517
  }),
2485
- /* @__PURE__ */ (0, R.jsx)(j, {
2518
+ /* @__PURE__ */ (0, z.jsx)(k, {
2486
2519
  variant: "outline",
2487
- size: N ? "lg" : "sm",
2488
- disabled: !M,
2489
- onClick: () => he(p),
2490
- children: Kt()
2520
+ size: j ? "lg" : "sm",
2521
+ disabled: !A,
2522
+ onClick: () => de(p),
2523
+ children: Gt()
2491
2524
  }),
2492
- /* @__PURE__ */ (0, R.jsx)(j, {
2493
- size: N ? "lg" : "sm",
2525
+ /* @__PURE__ */ (0, z.jsx)(k, {
2526
+ size: j ? "lg" : "sm",
2494
2527
  className: "max-md:flex-1",
2495
- disabled: !M || b.size > 0 || P.isPending || !l,
2496
- title: l ? void 0 : Ge(),
2497
- onClick: _e,
2498
- children: N ? qe() : hn()
2528
+ disabled: !A || b.size > 0 || M.isPending || !l,
2529
+ title: l ? void 0 : We(),
2530
+ onClick: he,
2531
+ children: j ? Ke() : pn()
2499
2532
  })
2500
2533
  ]
2501
2534
  }),
2502
- C && /* @__PURE__ */ (0, R.jsx)(Oa, {
2535
+ C && /* @__PURE__ */ (0, z.jsx)(ja, {
2503
2536
  stale: C.fields,
2504
2537
  current: C.current,
2505
2538
  draft: v,
2506
2539
  onClose: () => T(null),
2507
2540
  onReload: () => {
2508
- he(C.current), T(null);
2541
+ de(C.current), T(null);
2509
2542
  },
2510
2543
  onOverwrite: () => {
2511
- let e = Jr(p, v);
2544
+ let e = Kr(p, v);
2512
2545
  for (let t of C.fields) e.base[t] = C.current[t] ?? null;
2513
- T(null), P.mutate(e);
2546
+ T(null), M.mutate(e);
2514
2547
  }
2515
2548
  }),
2516
- ne && /* @__PURE__ */ (0, R.jsx)(or, {
2549
+ ne && /* @__PURE__ */ (0, z.jsx)(ir, {
2517
2550
  open: !0,
2518
2551
  onOpenChange: (e) => {
2519
- e || (E(!1), F.reset());
2552
+ e || (re(!1), N.reset());
2520
2553
  },
2521
- children: /* @__PURE__ */ (0, R.jsxs)(dr, { children: [
2522
- /* @__PURE__ */ (0, R.jsx)(fr, { children: /* @__PURE__ */ (0, R.jsx)(hr, { children: Gt({ key: t }) }) }),
2523
- /* @__PURE__ */ (0, R.jsx)("p", {
2554
+ children: /* @__PURE__ */ (0, z.jsxs)(lr, { children: [
2555
+ /* @__PURE__ */ (0, z.jsx)(ur, { children: /* @__PURE__ */ (0, z.jsx)(pr, { children: Wt({ key: t }) }) }),
2556
+ /* @__PURE__ */ (0, z.jsx)("p", {
2524
2557
  className: "text-[12px] text-muted-foreground",
2525
- children: Ht({ file: d.file })
2558
+ children: Vt({ file: d.file })
2526
2559
  }),
2527
- F.error && /* @__PURE__ */ (0, R.jsx)("p", {
2560
+ N.error && /* @__PURE__ */ (0, z.jsx)("p", {
2528
2561
  className: "text-[12px] text-err",
2529
- children: F.error.message
2562
+ children: N.error.message
2530
2563
  }),
2531
- /* @__PURE__ */ (0, R.jsxs)(mr, { children: [/* @__PURE__ */ (0, R.jsx)(j, {
2564
+ /* @__PURE__ */ (0, z.jsxs)(fr, { children: [/* @__PURE__ */ (0, z.jsx)(k, {
2532
2565
  variant: "outline",
2533
2566
  onClick: () => {
2534
- E(!1), F.reset();
2567
+ re(!1), N.reset();
2535
2568
  },
2536
- children: Ve()
2537
- }), /* @__PURE__ */ (0, R.jsx)(j, {
2569
+ children: He()
2570
+ }), /* @__PURE__ */ (0, z.jsx)(k, {
2538
2571
  variant: "destructive",
2539
- disabled: F.isPending,
2540
- onClick: () => F.mutate(),
2541
- children: We()
2572
+ disabled: N.isPending,
2573
+ onClick: () => N.mutate(),
2574
+ children: Ue()
2542
2575
  })] })
2543
2576
  ] })
2544
2577
  })
@@ -2547,10 +2580,10 @@ function La({ table: e, recordKey: t, headerActions: n, onClose: r }) {
2547
2580
  }
2548
2581
  //#endregion
2549
2582
  //#region ui/src/lib/pageFrame.ts
2550
- var Ra;
2551
- function za(e) {
2552
- Ra = e;
2583
+ var Va;
2584
+ function Ha(e) {
2585
+ Va = e;
2553
2586
  }
2554
- var Ba = () => Ra;
2587
+ var Ua = () => Va;
2555
2588
  //#endregion
2556
- export { Rt as $, or as A, nr as B, Yr as C, br as D, vr as E, fr as F, Pn as G, Jn as H, hr as I, hn as J, Mn as K, ur as L, dr as M, gr as N, _r as O, mr as P, Kt as Q, U as R, G as S, xr as T, On as U, Xn as V, Ln as W, un as X, dn as Y, qt as Z, ii as _, Ia as a, Ve as at, $r as b, ki as c, Ie as ct, Ti as d, Me as dt, qe as et, bi as f, oi as g, ci as h, Pa as i, He as it, pr as j, yr as k, Di as l, Fe as lt, si as m, za as n, Ge as nt, Da as o, Be as ot, ti as p, Vn as q, La as r, Ue as rt, Ui as s, ze as st, Ba as t, Ke as tt, Si as u, Pe as ut, ni as v, Ar as w, Zr as x, ei as y, H as z };
2589
+ export { Gt as $, hr as A, W as B, Yr as C, yr as D, Or as E, mr as F, Fn as G, er as H, fr as I, zn as J, Mn as K, ur as L, ir as M, dr as N, gr as O, lr as P, Kt as Q, pr as R, Zr as S, qr as T, Jn as U, U as V, En as W, R as X, pn as Y, ln as Z, oi as _, za as a, He as at, ei as b, Gi as c, Le as ct, Pi as d, Ne as dt, Lt as et, Li as f, ai as g, $r as h, La as i, L as it, _r as j, vr as k, Wi as l, Ie as lt, vi as m, Ha as n, Ge as nt, Aa as o, Ve as ot, Mi as p, An as q, Ba as r, We as rt, Ui as s, Be as st, Ua as t, Ke as tt, Vi as u, Fe as ut, ii as v, K as w, Qr as x, ni as y, cr as z };