yamlite 0.42.0 → 0.43.1

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