@tempots/beatui 1.1.4 → 1.2.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.
Files changed (99) hide show
  1. package/dist/{ar-CZ07-PLK.js → ar-C-kUt6f9.js} +1 -1
  2. package/dist/{ar-CFd5Xkva.cjs → ar-Dc56zcjW.cjs} +1 -1
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +1 -1
  5. package/dist/{auth-divider-CvQ0TQwi.js → auth-divider-D_3gKZ6g.js} +469 -461
  6. package/dist/auth-divider-itm5-j5G.cjs +1 -0
  7. package/dist/beatui.css +20 -7
  8. package/dist/beatui.tailwind.css +20 -7
  9. package/dist/better-auth/index.cjs.js +1 -1
  10. package/dist/better-auth/index.es.js +55 -51
  11. package/dist/{colors-DwufPN8S.js → colors-C2sgnzFH.js} +7 -7
  12. package/dist/{colors-B-p6IzX9.cjs → colors-DPCHjRMj.cjs} +1 -1
  13. package/dist/{de-Dpx6i3Pv.js → de-CP0kbElb.js} +1 -1
  14. package/dist/{de-BJG9UqDS.cjs → de-DboQlEC4.cjs} +1 -1
  15. package/dist/{deep-merge-DEEd-Tte.cjs → deep-merge-Bjv1NvKj.cjs} +1 -1
  16. package/dist/{deep-merge-D1cBNWZX.js → deep-merge-DwXDd3iF.js} +234 -233
  17. package/dist/{duration-input-CdgMuk2b.cjs → duration-input-CjNZyVkf.cjs} +1 -1
  18. package/dist/{duration-input-Dpqj2Am9.js → duration-input-CnMMvPgT.js} +4 -4
  19. package/dist/{editor-toolbar-group-7eMZbEvH.js → editor-toolbar-group-DWUWUO-B.js} +2 -2
  20. package/dist/{editor-toolbar-group-BJWRgYtv.cjs → editor-toolbar-group-QVdBUbB8.cjs} +1 -1
  21. package/dist/{es-apq3F_om.js → es-BtIkcnsw.js} +1 -1
  22. package/dist/{es-BBqPUxJF.cjs → es-CAmE_0Ph.cjs} +1 -1
  23. package/dist/{fa-BYpfIkLu.js → fa-11-rZmQ-.js} +1 -1
  24. package/dist/{fa-d0o3KlIu.cjs → fa-D9LrFZdW.cjs} +1 -1
  25. package/dist/{fr-Ba5_hcn7.js → fr-C-L2F8w2.js} +1 -1
  26. package/dist/{fr-DzXA-sjH.cjs → fr-DKogQyss.cjs} +1 -1
  27. package/dist/{he-Dff_I80g.js → he-Bu1xGoQ9.js} +1 -1
  28. package/dist/{he-Cnx-qg1P.cjs → he-CVx91Jdr.cjs} +1 -1
  29. package/dist/{hi-BeJ8Q4O6.cjs → hi-BgrHV72l.cjs} +1 -1
  30. package/dist/{hi-7G-frHVR.js → hi-CewH-MAH.js} +1 -1
  31. package/dist/{index-C3o9GSH6.js → index-BGKz2Nol.js} +1 -1
  32. package/dist/{index-B5MAsOC-.cjs → index-DFF7Uahh.cjs} +1 -1
  33. package/dist/index.cjs.js +2 -2
  34. package/dist/index.es.js +26 -26
  35. package/dist/{input-container-BZwpJgx6.cjs → input-container-BkPcNDaZ.cjs} +1 -1
  36. package/dist/{input-container-Q9wL2BUl.js → input-container-CO3DNqpp.js} +2 -2
  37. package/dist/{it-dSE5UgTZ.js → it-5hiKQO_p.js} +1 -1
  38. package/dist/{it-DE3pe-gS.cjs → it-B1rA1F9l.cjs} +1 -1
  39. package/dist/{ja-DRzjr2YR.js → ja-CGfEmZrm.js} +1 -1
  40. package/dist/{ja-yzk8mwox.cjs → ja-DZnjjqoi.cjs} +1 -1
  41. package/dist/json-schema/index.cjs.js +1 -1
  42. package/dist/json-schema/index.es.js +10 -10
  43. package/dist/json-schema-display/index.cjs.js +1 -1
  44. package/dist/json-schema-display/index.es.js +1 -1
  45. package/dist/json-structure/index.cjs.js +1 -1
  46. package/dist/json-structure/index.es.js +5 -5
  47. package/dist/{ko-rKqndOMO.cjs → ko-CDnYKYWU.cjs} +1 -1
  48. package/dist/{ko-7gpweMh7.js → ko-DZthvREd.js} +1 -1
  49. package/dist/lexical/index.cjs.js +1 -1
  50. package/dist/lexical/index.es.js +4 -4
  51. package/dist/{modal-ClnvWxzi.cjs → modal-DCxNGrzk.cjs} +1 -1
  52. package/dist/{modal-DXWQ-HUs.js → modal-YKqlh4Dk.js} +3 -3
  53. package/dist/{nl-DKHslb-6.cjs → nl-Bj8QnDEY.cjs} +1 -1
  54. package/dist/{nl-DAe4B7fb.js → nl-CcKyHlQ7.js} +1 -1
  55. package/dist/{notice-Dx4D1UOf.js → notice-Du3tWJTW.js} +4 -4
  56. package/dist/{notice-dOOD80F7.cjs → notice-Q0A1gIho.cjs} +1 -1
  57. package/dist/{oneof-branch-detection-bQKKfV32.cjs → oneof-branch-detection-BEkAezNi.cjs} +1 -1
  58. package/dist/{oneof-branch-detection-B57ZDbzM.js → oneof-branch-detection-DSzC0PkO.js} +1 -1
  59. package/dist/{pl-9yeqi1Kn.cjs → pl-BmuuxxVd.cjs} +1 -1
  60. package/dist/{pl-4xrzOC4A.js → pl-Mwtjp4MV.js} +1 -1
  61. package/dist/prosemirror/index.cjs.js +1 -1
  62. package/dist/prosemirror/index.es.js +4 -4
  63. package/dist/{pt-DYQOe1Td.js → pt-BaTsY-8f.js} +1 -1
  64. package/dist/{pt-CCfVWHz4.cjs → pt-RiC0yeVA.cjs} +1 -1
  65. package/dist/{ru-FofxuqAJ.js → ru-CvbGmz5s.js} +1 -1
  66. package/dist/{ru-Cct0jttM.cjs → ru-pRqtOQHF.cjs} +1 -1
  67. package/dist/tailwind/preset.cjs.js +1 -1
  68. package/dist/tailwind/preset.es.js +2 -2
  69. package/dist/tailwind/vite-plugin.cjs.js +1 -1
  70. package/dist/tailwind/vite-plugin.es.js +1 -1
  71. package/dist/{text-input-DEAddaOi.js → text-input-BAn02BzO.js} +1 -1
  72. package/dist/{text-input-CynkbBpH.cjs → text-input-D_IxFd0M.cjs} +1 -1
  73. package/dist/{toolbar-e9POle8o.js → toolbar-BKan3NHw.js} +1 -1
  74. package/dist/{toolbar-Dz7R1kV3.cjs → toolbar-CnecqhaU.cjs} +1 -1
  75. package/dist/{tr-DhKxAXK0.cjs → tr-B9JhBJeL.cjs} +1 -1
  76. package/dist/{tr-BfKjkfhE.js → tr-YFqQdZjM.js} +1 -1
  77. package/dist/{translations-D8Jwi_d0.cjs → translations-C_-cObaF.cjs} +1 -1
  78. package/dist/{translations-BplmL3nb.js → translations-CxDUnbXn.js} +1 -1
  79. package/dist/{translations-B96REXIk.js → translations-DT5QQ4WO.js} +19 -19
  80. package/dist/{translations-BDGa_4jx.cjs → translations-qefRsdGi.cjs} +1 -1
  81. package/dist/types/better-auth/types.d.ts +5 -1
  82. package/dist/types/components/auth/auth-container.d.ts +1 -1
  83. package/dist/types/components/form/input/date-input.d.ts +4 -4
  84. package/dist/types/components/form/input/date-time-input.d.ts +4 -4
  85. package/dist/types/components/form/input/input-container.d.ts +1 -1
  86. package/dist/types/components/form/input/nullable-date-input.d.ts +2 -2
  87. package/dist/types/components/form/input/nullable-date-time-input.d.ts +2 -2
  88. package/dist/{ur-DmfFC6MV.cjs → ur-BZakU0iv.cjs} +1 -1
  89. package/dist/{ur-COVuSAxC.js → ur-CdnwwnG_.js} +1 -1
  90. package/dist/{use-form-Ca0kF4af.cjs → use-form-BvBkVEKi.cjs} +1 -1
  91. package/dist/{use-form-CEY-gUUT.js → use-form-D_TJyZhP.js} +2 -2
  92. package/dist/{vi-DI3te8d5.js → vi-Bwvz1d_n.js} +1 -1
  93. package/dist/{vi-DvY-zvIr.cjs → vi-D1nly0nb.cjs} +1 -1
  94. package/dist/{widget-customization-CHxaaaEV.cjs → widget-customization-CD_NyRQ8.cjs} +1 -1
  95. package/dist/{widget-customization-BZ8aKWRK.js → widget-customization-D2a6SVP3.js} +5 -5
  96. package/dist/{zh-DJhzbpi2.cjs → zh-DBk7sSD9.cjs} +1 -1
  97. package/dist/{zh-DKIbNXv8.js → zh-hy7Uw6c5.js} +1 -1
  98. package/package.json +1 -1
  99. package/dist/auth-divider-BHAbd_PS.cjs +0 -1
package/dist/index.es.js CHANGED
@@ -1,38 +1,38 @@
1
1
  import { prop as W, Value as f, html as r, attr as a, computedOf as x, Ensure as at, aria as B, OneOfValue as hn, on as D, ForEach as be, Empty as J, Use as se, When as M, Fragment as ne, OnDispose as Ae, style as P, WithElement as we, Repeat as On, untracked as Rt, svg as vn, svgAttr as yn, Unless as Ta, coalesce as Ue, createInertiaHandler as Ia, MapSignal as He, input as rt, emitValue as Ie, OneOfType as Jt, NotEmpty as zn, emitValueAsDate as Aa, Portal as $t, makeProviderMark as jn, WithBrowserCtx as La, renderWithContext as Ma, WithProvider as Fa, ReducedMotion as Na, Task as Ba, Provide as Un, dataAttr as Hn, delaySignal as Ea } from "@tempots/dom";
2
2
  import { Use as Zi } from "@tempots/dom";
3
3
  import { ElementRect as kt, WindowSize as Va, Query as Wn, Location as Ct, NavigationService as Ra, Anchor as Qt } from "@tempots/ui";
4
- import { I as X, b as le, B as pe, h as he, t as ye, a as nt, L as en } from "./translations-B96REXIk.js";
5
- import { c as Ji, e as Qi, d as ec, f as tc, g as nc, i as ac, j as oc, k as sc, l as rc, n as lc, o as ic, m as cc, p as uc, r as dc, s as pc } from "./translations-B96REXIk.js";
6
- import { g as Pe } from "./colors-DwufPN8S.js";
7
- import { b as fc, e as gc, f as mc, c as hc, h as vc, i as yc, a as kc, d as _c, j as wc, k as Cc, n as xc, r as Sc, s as $c, l as Dc, t as Pc, m as Tc } from "./colors-DwufPN8S.js";
8
- import { f as Oa } from "./index-C3o9GSH6.js";
9
- import { h as Ac, i as Lc, j as Mc, k as Fc, l as Nc, m as Bc, n as Ec, o as Vc, p as Rc, q as Oc, r as zc, s as jc, t as Uc, u as Hc, v as Wc, w as qc, x as Gc, y as Yc, z as Kc, A as Zc, g as Xc, b as Jc, B as Qc, C as eu, D as tu, E as nu, F as au, G as ou, H as su, I as ru, J as lu, K as iu, a as cu, L as uu, M as du, N as pu, O as bu, P as fu, Q as gu, d as mu, R as hu, S as vu, T as yu, U as ku, V as _u, W as wu, X as Cu, Y as xu, Z as Su, _ as $u, $ as Du, a0 as Pu, a1 as Tu, a2 as Iu, a3 as Au, a4 as Lu, a5 as Mu, a6 as Fu, a7 as Nu, a8 as Bu, a9 as Eu, aa as Vu, ab as Ru, ac as Ou, ad as zu, ae as ju, af as Uu, ag as Hu, e as Wu, ah as qu, ai as Gu, aj as Yu, ak as Ku, al as Zu, am as Xu, an as Ju, ao as Qu, ap as ed, aq as td, ar as nd, as as ad, at as od, au as sd, av as rd, aw as ld, ax as id, ay as cd, c as ud, az as dd, aA as pd, aB as bd, aC as fd, aD as gd, aE as md, aF as hd, aG as vd, aH as yd, aI as kd, aJ as _d, aK as wd, aL as Cd, aM as xd, aN as Sd, aO as $d, aP as Dd, aQ as Pd, aR as Td, aS as Id, aT as Ad, aU as Ld } from "./index-C3o9GSH6.js";
10
- import { C as Dt, a as tn, I as nn, m as qn, c as Gn, B as Yn, b as Kn, d as za } from "./use-form-CEY-gUUT.js";
11
- import { A as Fd, g as Nd, h as Bd, M as Ed, O as Vd, R as Rd, i as Od, j as zd, k as jd, l as Ud, n as Hd, e as Wd, p as qd, o as Gd, s as Yd, t as Kd, f as Zd, u as Xd, w as Jd } from "./use-form-CEY-gUUT.js";
4
+ import { I as X, b as le, B as pe, h as he, t as ye, a as nt, L as en } from "./translations-DT5QQ4WO.js";
5
+ import { c as Ji, e as Qi, d as ec, f as tc, g as nc, i as ac, j as oc, k as sc, l as rc, n as lc, o as ic, m as cc, p as uc, r as dc, s as pc } from "./translations-DT5QQ4WO.js";
6
+ import { g as Pe } from "./colors-C2sgnzFH.js";
7
+ import { b as fc, e as gc, f as mc, c as hc, h as vc, i as yc, a as kc, d as _c, j as wc, k as Cc, n as xc, r as Sc, s as $c, l as Dc, t as Pc, m as Tc } from "./colors-C2sgnzFH.js";
8
+ import { f as Oa } from "./index-BGKz2Nol.js";
9
+ import { h as Ac, i as Lc, j as Mc, k as Fc, l as Nc, m as Bc, n as Ec, o as Vc, p as Rc, q as Oc, r as zc, s as jc, t as Uc, u as Hc, v as Wc, w as qc, x as Gc, y as Yc, z as Kc, A as Zc, g as Xc, b as Jc, B as Qc, C as eu, D as tu, E as nu, F as au, G as ou, H as su, I as ru, J as lu, K as iu, a as cu, L as uu, M as du, N as pu, O as bu, P as fu, Q as gu, d as mu, R as hu, S as vu, T as yu, U as ku, V as _u, W as wu, X as Cu, Y as xu, Z as Su, _ as $u, $ as Du, a0 as Pu, a1 as Tu, a2 as Iu, a3 as Au, a4 as Lu, a5 as Mu, a6 as Fu, a7 as Nu, a8 as Bu, a9 as Eu, aa as Vu, ab as Ru, ac as Ou, ad as zu, ae as ju, af as Uu, ag as Hu, e as Wu, ah as qu, ai as Gu, aj as Yu, ak as Ku, al as Zu, am as Xu, an as Ju, ao as Qu, ap as ed, aq as td, ar as nd, as as ad, at as od, au as sd, av as rd, aw as ld, ax as id, ay as cd, c as ud, az as dd, aA as pd, aB as bd, aC as fd, aD as gd, aE as md, aF as hd, aG as vd, aH as yd, aI as kd, aJ as _d, aK as wd, aL as Cd, aM as xd, aN as Sd, aO as $d, aP as Dd, aQ as Pd, aR as Td, aS as Id, aT as Ad, aU as Ld } from "./index-BGKz2Nol.js";
10
+ import { C as Dt, a as tn, I as nn, m as qn, c as Gn, B as Yn, b as Kn, d as za } from "./use-form-D_TJyZhP.js";
11
+ import { A as Fd, g as Nd, h as Bd, M as Ed, O as Vd, R as Rd, i as Od, j as zd, k as jd, l as Ud, n as Hd, e as Wd, p as qd, o as Gd, s as Yd, t as Kd, f as Zd, u as Xd, w as Jd } from "./use-form-D_TJyZhP.js";
12
12
  import { delayedAnimationFrame as an, biMax as ht, biMin as ja, sleep as Ua, interval as kn } from "@tempots/std";
13
13
  import { u as Ft, A as _n, a as Ha } from "./use-animated-toggle-C3asw_Sg.js";
14
14
  import { b as ep, c as tp } from "./use-animated-toggle-C3asw_Sg.js";
15
15
  import { T as Zn, a as Wa } from "./theme-kQZEeusG.js";
16
16
  import { beatuiPreset as ap, createBeatuiPreset as op } from "./tailwind/preset.es.js";
17
- import { p as yt, q as on, C as qa, r as Ga, s as wn, t as gt } from "./widget-customization-BZ8aKWRK.js";
18
- import { B as rp, u as lp, E as ip, f as cp, e as up, h as dp, d as pp, j as bp, i as fp, a as gp, N as mp, c as hp, b as vp, R as yp, S as kp, k as _p, v as wp, m as Cp, n as xp, o as Sp, w as $p, x as Dp, y as Pp, z as Tp, A as Ip, D as Ap, F as Lp, G as Mp, H as Fp, I as Np, J as Bp, K as Ep, L as Vp, M as Rp, O as Op, P as zp, Q as jp, T as Up, U as Hp } from "./widget-customization-BZ8aKWRK.js";
17
+ import { p as yt, q as on, C as qa, r as Ga, s as wn, t as gt } from "./widget-customization-D2a6SVP3.js";
18
+ import { B as rp, u as lp, E as ip, f as cp, e as up, h as dp, d as pp, j as bp, i as fp, a as gp, N as mp, c as hp, b as vp, R as yp, S as kp, k as _p, v as wp, m as Cp, n as xp, o as Sp, w as $p, x as Dp, y as Pp, z as Tp, A as Ip, D as Ap, F as Lp, G as Mp, H as Fp, I as Np, J as Bp, K as Ep, L as Vp, M as Rp, O as Op, P as zp, Q as jp, T as Up, U as Hp } from "./widget-customization-D2a6SVP3.js";
19
19
  import { s as Oe } from "./session-id-3KiilioY.js";
20
- import { W as pt, b as Et, N as ft, S as Xn, g as Ya, G as Jn, E as Ka, M as sn, r as Kt } from "./deep-merge-D1cBNWZX.js";
21
- import { B as qp, k as Gp, F as Yp, L as Kp, l as Zp, m as Xp, h as Jp, c as Qp, f as eb, T as tb, i as nb, n as ab, a as ob, U as sb, j as rb, o as lb, p as ib, q as cb, e as ub, t as db, s as pb } from "./deep-merge-D1cBNWZX.js";
22
- import { O as rn, F as Qn, M as ln } from "./modal-DXWQ-HUs.js";
23
- import { B as fb, C as gb, a as mb, S as hb, b as vb, c as yb, o as kb, s as _b, u as wb } from "./modal-DXWQ-HUs.js";
24
- import { B as We, I as ze, a as xt, g as Cn, b as xn } from "./input-container-Q9wL2BUl.js";
25
- import { c as xb } from "./input-container-Q9wL2BUl.js";
26
- import { T as ea, C as lt, m as Za } from "./text-input-DEAddaOi.js";
20
+ import { W as pt, b as Et, N as ft, S as Xn, g as Ya, G as Jn, E as Ka, M as sn, r as Kt } from "./deep-merge-DwXDd3iF.js";
21
+ import { B as qp, k as Gp, F as Yp, L as Kp, l as Zp, m as Xp, h as Jp, c as Qp, f as eb, T as tb, i as nb, n as ab, a as ob, U as sb, j as rb, o as lb, p as ib, q as cb, e as ub, t as db, s as pb } from "./deep-merge-DwXDd3iF.js";
22
+ import { O as rn, F as Qn, M as ln } from "./modal-YKqlh4Dk.js";
23
+ import { B as fb, C as gb, a as mb, S as hb, b as vb, c as yb, o as kb, s as _b, u as wb } from "./modal-YKqlh4Dk.js";
24
+ import { B as We, I as ze, a as xt, g as Cn, b as xn } from "./input-container-CO3DNqpp.js";
25
+ import { c as xb } from "./input-container-CO3DNqpp.js";
26
+ import { T as ea, C as lt, m as Za } from "./text-input-BAn02BzO.js";
27
27
  import { F as _t, M as cn, a as ut, b as un } from "./menu-BkqFGcXg.js";
28
- import { f as Xa, g as Ja } from "./duration-input-Dpqj2Am9.js";
29
- import { B as $b, D as Db, F as Pb, N as Tb, d as Ib, b as Ab, a as Lb, e as Mb, c as Fb, P as Nb } from "./duration-input-Dpqj2Am9.js";
28
+ import { f as Xa, g as Ja } from "./duration-input-CnMMvPgT.js";
29
+ import { B as $b, D as Db, F as Pb, N as Tb, d as Ib, b as Ab, a as Lb, e as Mb, c as Fb, P as Nb } from "./duration-input-CnMMvPgT.js";
30
30
  import { C as Eb, a as Vb, b as Rb, c as Ob, d as zb } from "./utils-vUtP6iPG.js";
31
31
  import { M as Qa, S as eo } from "./stack-BLMteGTn.js";
32
32
  import { D as Ub, E as Hb, L as Wb } from "./stack-BLMteGTn.js";
33
- import { E as Gb, N as Yb, P as Kb } from "./notice-Dx4D1UOf.js";
33
+ import { E as Gb, N as Yb, P as Kb } from "./notice-Du3tWJTW.js";
34
34
  import { L as Xb } from "./link-portal-Cr2l9f3k.js";
35
- import { b as Qb, T as ef, c as tf, a as nf, d as af } from "./toolbar-e9POle8o.js";
35
+ import { b as Qb, T as ef, c as tf, a as nf, d as af } from "./toolbar-BKan3NHw.js";
36
36
  function ll(e, t = 0, n = () => !0) {
37
37
  let o = null, s;
38
38
  const c = W(e.value);
@@ -7964,7 +7964,7 @@ function ki({
7964
7964
  ...l
7965
7965
  );
7966
7966
  return e ? Ba(
7967
- () => import("./translations-BplmL3nb.js").then((b) => b.t),
7967
+ () => import("./translations-CxDUnbXn.js").then((b) => b.t),
7968
7968
  ({ AuthI18n: b }) => Un(b, {}, () => i)
7969
7969
  ) : i;
7970
7970
  });
@@ -10826,8 +10826,10 @@ export {
10826
10826
  Ub as DangerLabel,
10827
10827
  zl as DataTable,
10828
10828
  No as DataToolbar,
10829
+ Xl as DateInput,
10829
10830
  bl as DatePicker,
10830
10831
  fl as DateRangePicker,
10832
+ Jl as DateTimeInput,
10831
10833
  Ll as Divider,
10832
10834
  Ni as Drawer,
10833
10835
  ga as DropdownBase,
@@ -10878,10 +10880,6 @@ export {
10878
10880
  un as MenuSeparator,
10879
10881
  ln as Modal,
10880
10882
  Qa as MutedLabel,
10881
- Xl as NativeDateInput,
10882
- Jl as NativeDateTimeInput,
10883
- cp as NativeNullableDateInput,
10884
- up as NativeNullableDateTimeInput,
10885
10883
  _i as NativePdfPreview,
10886
10884
  Et as NativeSelect,
10887
10885
  Jp as NativeSelectControl,
@@ -10897,6 +10895,8 @@ export {
10897
10895
  Tb as NullableBigintInput,
10898
10896
  Ul as NullableColorInput,
10899
10897
  Hl as NullableColorSwatchInput,
10898
+ cp as NullableDateInput,
10899
+ up as NullableDateTimeInput,
10900
10900
  Qp as NullableDurationInput,
10901
10901
  dp as NullableEmailInput,
10902
10902
  ii as NullableInstantInput,
@@ -1 +1 @@
1
- "use strict";const e=require("@tempots/dom"),r=require("./translations-BDGa_4jx.cjs"),m=require("@tempots/ui"),C=require("./colors-B-p6IzX9.cjs");function f(l,o,u,t){const d=["bc-button",`bc-button--size-${l}`,`bc-control--padding-${l}`,`bc-control--rounded-${o}`];return u&&d.push("bc-button--loading"),t&&d.push("bc-button--full-width"),d.join(" ")}function v(l,o,u){const t=new Map;t.set("--button-text-shadow","var(--text-shadow-none)"),t.set("--button-text-shadow-dark","var(--text-shadow-none)");const d=(a,n,b,i)=>{u||(t.set("--button-bg-hover",a),t.set("--button-text-hover",b),t.set("--button-bg-hover-dark",n),t.set("--button-text-hover-dark",i))};switch(l){case"filled":{const a=r.backgroundValue(o,"solid","light"),n=r.backgroundValue(o,"solid","dark");t.set("--button-bg",a.backgroundColor),t.set("--button-text",a.textColor),t.set("--button-bg-dark",n.backgroundColor),t.set("--button-text-dark",n.textColor),t.set("--button-text-shadow","var(--text-shadow-button-filled, var(--text-shadow-sm))"),t.set("--button-text-shadow-dark","var(--text-shadow-button-filled, var(--text-shadow-sm))");const b=r.hoverBackgroundValue(o,"solid","light"),i=r.hoverBackgroundValue(o,"solid","dark");d(b.backgroundColor,i.backgroundColor,b.textColor,i.textColor);break}case"light":{const a=r.backgroundValue(o,"light","light"),n=r.backgroundValue(o,"light","dark");t.set("--button-bg",a.backgroundColor),t.set("--button-text",a.textColor),t.set("--button-bg-dark",n.backgroundColor),t.set("--button-text-dark",n.textColor);const b=r.hoverBackgroundValue(o,"light","light"),i=r.hoverBackgroundValue(o,"light","dark");d(b.backgroundColor,i.backgroundColor,b.textColor,i.textColor);break}case"outline":{t.set("--button-bg","transparent"),t.set("--button-bg-dark","transparent"),t.set("--button-border",r.borderColorValue(o,"light")),t.set("--button-border-dark",r.borderColorValue(o,"dark")),t.set("--button-text",r.textColorValue(o,"light")),t.set("--button-text-dark",r.textColorValue(o,"dark")),t.set("--button-text-shadow","var(--text-shadow-button-light, var(--text-shadow-xs))"),t.set("--button-text-shadow-dark","var(--text-shadow-button-light, var(--text-shadow-xs))");const a=r.hoverBackgroundValue(o,"light","light"),n=r.hoverBackgroundValue(o,"light","dark");d(a.backgroundColor,n.backgroundColor,a.textColor,n.textColor);break}case"dashed":{t.set("--button-bg","transparent"),t.set("--button-bg-dark","transparent"),t.set("--button-border",r.borderColorValue(o,"light")),t.set("--button-border-dark",r.borderColorValue(o,"dark")),t.set("--button-border-style","dashed"),t.set("--button-text",r.textColorValue(o,"light")),t.set("--button-text-dark",r.textColorValue(o,"dark"));const a=r.hoverBackgroundValue(o,"light","light"),n=r.hoverBackgroundValue(o,"light","dark");d(a.backgroundColor,n.backgroundColor,a.textColor,n.textColor);break}case"default":{const a=r.backgroundValue("neutral","light","light"),n=r.backgroundValue("neutral","light","dark");t.set("--button-bg",a.backgroundColor),t.set("--button-text",r.textColorValue(o,"light")),t.set("--button-bg-dark",n.backgroundColor),t.set("--button-text-dark",r.textColorValue(o,"dark")),t.set("--button-border",C.getColorVar("neutral",300)),t.set("--button-border-dark",C.getColorVar("neutral",700)),t.set("--button-text-shadow","var(--text-shadow-button-default, var(--text-shadow-2xs))"),t.set("--button-text-shadow-dark","var(--text-shadow-button-default, var(--text-shadow-2xs))");const b=r.hoverBackgroundValue("base","light","light"),i=r.hoverBackgroundValue("base","light","dark");d(b.backgroundColor,i.backgroundColor,t.get("--button-text")??a.textColor,t.get("--button-text-dark")??n.textColor);break}case"subtle":{t.set("--button-bg","transparent"),t.set("--button-bg-dark","transparent"),t.set("--button-text",r.textColorValue(o,"light")),t.set("--button-text-dark",r.textColorValue(o,"dark"));const a=r.hoverBackgroundValue(o,"light","light"),n=r.hoverBackgroundValue(o,"light","dark");d(a.backgroundColor,n.backgroundColor,a.textColor,n.textColor);break}case"text":{t.set("--button-bg","transparent"),t.set("--button-bg-dark","transparent"),t.set("--button-text",r.textColorValue(o,"light")),t.set("--button-text-dark",r.textColorValue(o,"dark")),u||t.set("--button-hover-decoration","underline");break}}return Array.from(t.entries()).map(([a,n])=>`${a}: ${n}`).join("; ")}function w({type:l="button",disabled:o=!1,loading:u=!1,variant:t="filled",size:d="md",color:a="base",roundedness:n="sm",onClick:b=()=>{},fullWidth:i=!1,stopPropagation:k=!0},...x){const h=e.prop(null);return e.Use(r.BeatUII18n,g=>e.html.button(e.attr.type(l),e.attr.disabled(e.computedOf(o,u)((s,c)=>s||c)),e.aria.busy(u??!1),e.When(u??!1,()=>e.aria.label(g.$.loadingExtended)),e.attr.class(e.computedOf(d,n,u,i)(f)),e.attr.style(e.computedOf(t,a,o)(v)),e.When(u??!1,()=>e.Fragment(e.style.width(h.map(s=>s==null?"":`${s.width}px`)),e.style.height(h.map(s=>s==null?"":`${s.height}px`)),r.Icon({icon:"line-md:loading-twotone-loop",size:d??"md"}),e.html.span(e.attr.class("sr-only"),e.aria.live("polite"),g.$.loadingExtended)),()=>e.Fragment(e.on.click(s=>{l!=="submit"&&s.preventDefault(),k&&s.stopPropagation(),b()}),...x)),e.When(u!=null,()=>m.ElementRect(s=>(s.on(c=>{e.Value.get(u??!1)||h.set(c)}),e.Empty)))))}function B(l,o,u){const t=[l?"bc-base-input-container":"bc-input-container"];return o?t.push(l?"bc-base-input-container--disabled":"bc-input-container--disabled"):t.push(l?"bc-base-input-container--default":"bc-input-container--default"),u&&t.push("bc-input-container--error"),t.join(" ")}function V(l,o){const u=["bc-input-container__input"];return l||(u.push(`bc-control--padding-${o}`),u.push(`bc-control--text-size-${o}`)),u.join(" ")}const I=({baseContainer:l,class:o,classes:u,disabled:t,input:d,before:a,after:n,hasError:b,focusableSelector:i="input, select, textarea",growInput:k=!0,size:x},...h)=>{const g=e.Value.map(t??!1,s=>s);return e.html.div(e.WithElement(s=>{const c=()=>{s.querySelector(i)?.focus()};return s.addEventListener("click",c),e.OnDispose(()=>s.removeEventListener("click",c))}),e.attr.class(e.computedOf(l,g,b??!1)((s,c,p)=>B(s??!1,c??!1,p??!1))),e.attr.class(o),e.attr.class(u?.container),a!=null?e.html.span(e.attr.class("bc-input-container__before"),a):null,e.html.div(e.attr.class(e.computedOf(l,x??"md")((s,c)=>V(s??!1,c??"md"))),e.attr.class(e.Value.map(k,s=>s?"bc-input-container__input--grow":"")),e.attr.class(u?.wrapper),d),n!=null?e.html.span(e.attr.class("bc-input-container__after"),n):null,...h)};function y({icon:l,size:o="md",color:u="neutral"}){return e.html.span(e.attr.class("bc-input-container__icon"),r.Icon({icon:l,size:o,color:u}))}exports.Button=w;exports.InputContainer=I;exports.InputIcon=y;exports.generateButtonClasses=f;exports.generateButtonStyles=v;exports.generateInputContainerInputClasses=V;
1
+ "use strict";const e=require("@tempots/dom"),r=require("./translations-qefRsdGi.cjs"),m=require("@tempots/ui"),C=require("./colors-DPCHjRMj.cjs");function f(l,o,u,t){const d=["bc-button",`bc-button--size-${l}`,`bc-control--padding-${l}`,`bc-control--rounded-${o}`];return u&&d.push("bc-button--loading"),t&&d.push("bc-button--full-width"),d.join(" ")}function v(l,o,u){const t=new Map;t.set("--button-text-shadow","var(--text-shadow-none)"),t.set("--button-text-shadow-dark","var(--text-shadow-none)");const d=(a,n,b,i)=>{u||(t.set("--button-bg-hover",a),t.set("--button-text-hover",b),t.set("--button-bg-hover-dark",n),t.set("--button-text-hover-dark",i))};switch(l){case"filled":{const a=r.backgroundValue(o,"solid","light"),n=r.backgroundValue(o,"solid","dark");t.set("--button-bg",a.backgroundColor),t.set("--button-text",a.textColor),t.set("--button-bg-dark",n.backgroundColor),t.set("--button-text-dark",n.textColor),t.set("--button-text-shadow","var(--text-shadow-button-filled, var(--text-shadow-sm))"),t.set("--button-text-shadow-dark","var(--text-shadow-button-filled, var(--text-shadow-sm))");const b=r.hoverBackgroundValue(o,"solid","light"),i=r.hoverBackgroundValue(o,"solid","dark");d(b.backgroundColor,i.backgroundColor,b.textColor,i.textColor);break}case"light":{const a=r.backgroundValue(o,"light","light"),n=r.backgroundValue(o,"light","dark");t.set("--button-bg",a.backgroundColor),t.set("--button-text",a.textColor),t.set("--button-bg-dark",n.backgroundColor),t.set("--button-text-dark",n.textColor);const b=r.hoverBackgroundValue(o,"light","light"),i=r.hoverBackgroundValue(o,"light","dark");d(b.backgroundColor,i.backgroundColor,b.textColor,i.textColor);break}case"outline":{t.set("--button-bg","transparent"),t.set("--button-bg-dark","transparent"),t.set("--button-border",r.borderColorValue(o,"light")),t.set("--button-border-dark",r.borderColorValue(o,"dark")),t.set("--button-text",r.textColorValue(o,"light")),t.set("--button-text-dark",r.textColorValue(o,"dark")),t.set("--button-text-shadow","var(--text-shadow-button-light, var(--text-shadow-xs))"),t.set("--button-text-shadow-dark","var(--text-shadow-button-light, var(--text-shadow-xs))");const a=r.hoverBackgroundValue(o,"light","light"),n=r.hoverBackgroundValue(o,"light","dark");d(a.backgroundColor,n.backgroundColor,a.textColor,n.textColor);break}case"dashed":{t.set("--button-bg","transparent"),t.set("--button-bg-dark","transparent"),t.set("--button-border",r.borderColorValue(o,"light")),t.set("--button-border-dark",r.borderColorValue(o,"dark")),t.set("--button-border-style","dashed"),t.set("--button-text",r.textColorValue(o,"light")),t.set("--button-text-dark",r.textColorValue(o,"dark"));const a=r.hoverBackgroundValue(o,"light","light"),n=r.hoverBackgroundValue(o,"light","dark");d(a.backgroundColor,n.backgroundColor,a.textColor,n.textColor);break}case"default":{const a=r.backgroundValue("neutral","light","light"),n=r.backgroundValue("neutral","light","dark");t.set("--button-bg",a.backgroundColor),t.set("--button-text",r.textColorValue(o,"light")),t.set("--button-bg-dark",n.backgroundColor),t.set("--button-text-dark",r.textColorValue(o,"dark")),t.set("--button-border",C.getColorVar("neutral",300)),t.set("--button-border-dark",C.getColorVar("neutral",700)),t.set("--button-text-shadow","var(--text-shadow-button-default, var(--text-shadow-2xs))"),t.set("--button-text-shadow-dark","var(--text-shadow-button-default, var(--text-shadow-2xs))");const b=r.hoverBackgroundValue("base","light","light"),i=r.hoverBackgroundValue("base","light","dark");d(b.backgroundColor,i.backgroundColor,t.get("--button-text")??a.textColor,t.get("--button-text-dark")??n.textColor);break}case"subtle":{t.set("--button-bg","transparent"),t.set("--button-bg-dark","transparent"),t.set("--button-text",r.textColorValue(o,"light")),t.set("--button-text-dark",r.textColorValue(o,"dark"));const a=r.hoverBackgroundValue(o,"light","light"),n=r.hoverBackgroundValue(o,"light","dark");d(a.backgroundColor,n.backgroundColor,a.textColor,n.textColor);break}case"text":{t.set("--button-bg","transparent"),t.set("--button-bg-dark","transparent"),t.set("--button-text",r.textColorValue(o,"light")),t.set("--button-text-dark",r.textColorValue(o,"dark")),u||t.set("--button-hover-decoration","underline");break}}return Array.from(t.entries()).map(([a,n])=>`${a}: ${n}`).join("; ")}function w({type:l="button",disabled:o=!1,loading:u=!1,variant:t="filled",size:d="md",color:a="base",roundedness:n="sm",onClick:b=()=>{},fullWidth:i=!1,stopPropagation:k=!0},...x){const h=e.prop(null);return e.Use(r.BeatUII18n,g=>e.html.button(e.attr.type(l),e.attr.disabled(e.computedOf(o,u)((s,c)=>s||c)),e.aria.busy(u??!1),e.When(u??!1,()=>e.aria.label(g.$.loadingExtended)),e.attr.class(e.computedOf(d,n,u,i)(f)),e.attr.style(e.computedOf(t,a,o)(v)),e.When(u??!1,()=>e.Fragment(e.style.width(h.map(s=>s==null?"":`${s.width}px`)),e.style.height(h.map(s=>s==null?"":`${s.height}px`)),r.Icon({icon:"line-md:loading-twotone-loop",size:d??"md"}),e.html.span(e.attr.class("sr-only"),e.aria.live("polite"),g.$.loadingExtended)),()=>e.Fragment(e.on.click(s=>{l!=="submit"&&s.preventDefault(),k&&s.stopPropagation(),b()}),...x)),e.When(u!=null,()=>m.ElementRect(s=>(s.on(c=>{e.Value.get(u??!1)||h.set(c)}),e.Empty)))))}function B(l,o,u){const t=[l?"bc-base-input-container":"bc-input-container"];return o?t.push(l?"bc-base-input-container--disabled":"bc-input-container--disabled"):t.push(l?"bc-base-input-container--default":"bc-input-container--default"),u&&t.push("bc-input-container--error"),t.join(" ")}function V(l,o){const u=["bc-input-container__input"];return l||(u.push(`bc-control--padding-${o}`),u.push(`bc-control--text-size-${o}`)),u.join(" ")}const I=({baseContainer:l,class:o,classes:u,disabled:t,input:d,before:a,after:n,hasError:b,focusableSelector:i="input, select, textarea",growInput:k=!0,size:x},...h)=>{const g=e.Value.map(t??!1,s=>s);return e.html.div(e.WithElement(s=>{const c=()=>{s.querySelector(i)?.focus()};return s.addEventListener("click",c),e.OnDispose(()=>s.removeEventListener("click",c))}),e.attr.class(e.computedOf(l,g,b??!1)((s,c,p)=>B(s??!1,c??!1,p??!1))),e.attr.class(o),e.attr.class(u?.container),a!=null?e.html.span(e.attr.class("bc-input-container__before"),a):null,e.html.div(e.attr.class(e.computedOf(l,x??"md")((s,c)=>V(s??!1,c??"md"))),e.attr.class(e.Value.map(k,s=>s?"bc-input-container__input--grow":"")),e.attr.class(u?.wrapper),d),n!=null?e.html.span(e.attr.class("bc-input-container__after"),n):null,...h)};function y({icon:l,size:o="md",color:u="neutral"}){return e.html.span(e.attr.class("bc-input-container__icon"),r.Icon({icon:l,size:o,color:u}))}exports.Button=w;exports.InputContainer=I;exports.InputIcon=y;exports.generateButtonClasses=f;exports.generateButtonStyles=v;exports.generateInputContainerInputClasses=V;
@@ -1,7 +1,7 @@
1
1
  import { prop as E, Use as V, html as g, attr as b, computedOf as p, aria as w, When as D, Fragment as $, style as y, on as j, Value as I, Empty as S, WithElement as O, OnDispose as U } from "@tempots/dom";
2
- import { B as W, I as B, t as c, h as i, b as k, a as v } from "./translations-B96REXIk.js";
2
+ import { B as W, I as B, t as c, h as i, b as k, a as v } from "./translations-DT5QQ4WO.js";
3
3
  import { ElementRect as q } from "@tempots/ui";
4
- import { g as _ } from "./colors-DwufPN8S.js";
4
+ import { g as _ } from "./colors-C2sgnzFH.js";
5
5
  function z(s, e, r, t) {
6
6
  const u = [
7
7
  "bc-button",
@@ -1,4 +1,4 @@
1
- import { f as l } from "./translations-B96REXIk.js";
1
+ import { f as l } from "./translations-DT5QQ4WO.js";
2
2
  const c = {
3
3
  loadingExtended: "Caricamento, attendere prego...",
4
4
  loadingShort: "Caricamento...",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./translations-BDGa_4jx.cjs"),r={loadingExtended:"Caricamento, attendere prego...",loadingShort:"Caricamento...",locale:"Lingua",iconDescription:"Icona",loadingIcon:"Icona di caricamento",failedToLoadIcon:"Impossibile caricare l'icona",editLabel:"Modifica",selectOne:"Seleziona uno",selectNone:"Nessuno",selectMany:"Seleziona più elementi",noResults:"Nessun risultato",passwordPlaceholderText:"Password Segreta",togglePasswordVisibility:"Attiva/disattiva visibilità password",toggleMenu:"Attiva/disattiva menu",toggleAside:"Attiva/disattiva pannello laterale",mainNavigation:"Navigazione principale",sidebar:"Barra laterale",closeDrawer:"Chiudi cassetto",closeModal:"Chiudi modale",confirm:"Conferma",cancel:"Annulla",addLabel:"Aggiungi",removeItem:"Rimuovi elemento",currentLocale:"Italiano",ar:"Arabo",de:"Tedesco",en:"Inglese",es:"Spagnolo",fr:"Francese",hi:"Hindi",it:"Italiano",ja:"Giapponese",ko:"Coreano",nl:"Olandese",pl:"Polacco",pt:"Portoghese",ru:"Russo",tr:"Turco",vi:"Vietnamita",zh:"Cinese",he:"Ebraico",fa:"Persiano",ur:"Urdu",emailPlaceholderText:"Inserisci la tua email",incrementValue:"Incrementa valore",decrementValue:"Decrementa valore",dropZoneInstructions:e=>e?"Clicca per scegliere o trascina i file qui, o premi Invio o Spazio per aprire il selettore file":"Trascina i file qui",fileSizeUnits:["Byte","KB","MB","GB","TB"],removeFile:"Rimuovi file",clearAllFiles:"Cancella tutti i file",clearValue:"Cancella valore",unknownType:"Tipo sconosciuto",filesInputInstructions:(e,i,o)=>{let a=e==null||e>1?"Clicca per scegliere o trascina i file qui":"Clicca per scegliere o trascina un file qui";if(e||i){const t=[];if(e!=null&&e>1&&t.push(`fino a ${e} file`),i&&o){const n=l.formatFileSize(i,{units:o});t.push(`max ${n} ciascuno`)}t.length>0&&(a+=` (${t.join(", ")})`)}return a},paginationLabel:"Paginazione",paginationRange:(e,i,o,a)=>a>o?`Righe da ${e} a ${i} di ${o} di ${a}`:`Righe da ${e} a ${i} di ${o}`,firstPage:"Prima pagina",previousPage:"Pagina precedente",nextPage:"Pagina successiva",lastPage:"Ultima pagina",breadcrumbs:"Breadcrumb",commandPalette:"Tavolozza comandi",typeACommand:"Digita un comando...",noResultsFound:"Nessun risultato trovato",noMatchingCommands:"Nessun comando corrispondente",appearanceSystem:"Sistema",appearanceLight:"Chiaro",appearanceDark:"Scuro",ok:"OK",changeTypeConfirmation:"La modifica del tipo cancellerà il valore attuale. Continuare?",notifications:"Notifiche",markAllAsRead:"Segna tutto come letto",noNotifications:"Nessuna notifica",schemaConflictsDetected:"Conflitti di schema rilevati",schemaViolationsDetected:"Violazioni di schema rilevate",properties:"Proprietà",uploading:"Caricamento...",dropFilesOrBrowse:"Trascina i file qui o clicca per sfogliare",acceptedTypes:e=>`Tipi accettati: ${e}`,enterUrlPrompt:"Inserisci URL:",exceeded:"(superato)",pdfPreview:"Anteprima PDF",lexical:{fontFamily:"Famiglia di caratteri",fontSize:"Dimensione carattere",lineHeight:"Altezza riga",fontColor:"Colore carattere",highlightColor:"Colore evidenziazione",backgroundColor:"Colore sfondo",bold:"Grassetto",italic:"Corsivo",underline:"Sottolineato",strikethrough:"Barrato",code:"Codice",clearFormatting:"Cancella formattazione",normal:"Normale",heading:e=>`Titolo ${e}`,bulletList:"Elenco puntato",orderedList:"Elenco numerato",checkList:"Elenco di controllo",indent:"Aumenta rientro",outdent:"Riduci rientro",blockquote:"Citazione",codeBlock:"Blocco di codice",horizontalRule:"Linea orizzontale",insertTable:"Inserisci tabella",link:"Collegamento",undo:"Annulla",redo:"Ripristina",cut:"Taglia",copy:"Copia",paste:"Incolla",defaultOption:"Predefinito",slashCommands:"Comandi slash",noCommandsFound:"Nessun comando trovato",changeBlockType:"Cambia tipo di blocco",blockTypes:"Tipi di blocco",enterUrl:"Inserisci URL:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Ordine crescente",sortDescending:"Ordine decrescente",clearSort:"Rimuovi ordinamento",filterPlaceholder:"Filtra...",clearFilter:"Rimuovi filtro",selectAll:"Seleziona tutto",deselectAll:"Deseleziona tutto",selectedCount:e=>`${e} selezionati`,resetAll:"Ripristina tutto",noResults:"Nessun risultato trovato",loading:"Caricamento...",filterPanelAddCondition:"Aggiungi condizione",filterPanelApply:"Applica",filterPanelClear:"Cancella filtri",filterPanelAnd:"E",filterPanelOr:"O",filterPanelContains:"Contiene",filterPanelNotContains:"Non contiene",filterPanelEquals:"Uguale a",filterPanelNotEquals:"Diverso da",filterPanelStartsWith:"Inizia con",filterPanelEndsWith:"Finisce con",filterPanelIsNull:"È vuoto",filterPanelIsNotNull:"Non è vuoto",filterPanelGt:"Maggiore di",filterPanelGte:"Maggiore o uguale",filterPanelLt:"Minore di",filterPanelLte:"Minore o uguale",filterPanelBetween:"Tra",filterPanelValuePlaceholder:"Valore...",sortMultiHint:"Tieni premuto Shift per ordinare per più colonne",columnVisibility:"Colonne",showAllColumns:"Mostra tutto",menuSortAsc:"Ordina crescente",menuSortDesc:"Ordina decrescente",menuClearSort:"Rimuovi ordinamento",menuHideColumn:"Nascondi colonna",menuChooseColumns:"Scegli colonne",menuResetColumns:"Ripristina colonne",menuFilter:"Filtra",rowCount:(e,i)=>`Righe: ${e} Righe totali: ${i}`,filterTagsPlaceholder:"Seleziona valori...",groupCount:e=>`${e} elementi`,collapseGroup:"Comprimi gruppo",expandGroup:"Espandi gruppo",describeFilter:{textContains:(e,i)=>`${e} contiene "${i}"`,textNotContains:(e,i)=>`${e} non contiene "${i}"`,textEquals:(e,i)=>`${e} uguale a "${i}"`,textNotEquals:(e,i)=>`${e} diverso da "${i}"`,textStartsWith:(e,i)=>`${e} inizia con "${i}"`,textEndsWith:(e,i)=>`${e} finisce con "${i}"`,compareEq:(e,i)=>`${e} = ${i}`,compareNeq:(e,i)=>`${e} ≠ ${i}`,compareGt:(e,i)=>`${e} > ${i}`,compareGte:(e,i)=>`${e} ≥ ${i}`,compareLt:(e,i)=>`${e} < ${i}`,compareLte:(e,i)=>`${e} ≤ ${i}`,rangeBetween:(e,i,o)=>`${e} tra ${i} e ${o}`,rangeGte:(e,i)=>`${e} ≥ ${i}`,rangeLte:(e,i)=>`${e} ≤ ${i}`,setIn:(e,i)=>`${e} in [${i}]`,setNotIn:(e,i)=>`${e} non in [${i}]`,booleanIs:(e,i)=>`${e} è ${i}`,isNull:e=>`${e} è vuoto`,isNotNull:e=>`${e} non è vuoto`,compositeAnd:e=>e.join(" E "),compositeOr:e=>e.join(" O ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Caricamento PDF...",loadFailed:"Impossibile caricare il PDF",invalidPdf:"File PDF non valido",pageOutOfRange:(e,i)=>`La pagina ${e} è fuori intervallo (1-${i})`,renderFailed:"Impossibile renderizzare la pagina PDF"}};exports.default=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./translations-qefRsdGi.cjs"),r={loadingExtended:"Caricamento, attendere prego...",loadingShort:"Caricamento...",locale:"Lingua",iconDescription:"Icona",loadingIcon:"Icona di caricamento",failedToLoadIcon:"Impossibile caricare l'icona",editLabel:"Modifica",selectOne:"Seleziona uno",selectNone:"Nessuno",selectMany:"Seleziona più elementi",noResults:"Nessun risultato",passwordPlaceholderText:"Password Segreta",togglePasswordVisibility:"Attiva/disattiva visibilità password",toggleMenu:"Attiva/disattiva menu",toggleAside:"Attiva/disattiva pannello laterale",mainNavigation:"Navigazione principale",sidebar:"Barra laterale",closeDrawer:"Chiudi cassetto",closeModal:"Chiudi modale",confirm:"Conferma",cancel:"Annulla",addLabel:"Aggiungi",removeItem:"Rimuovi elemento",currentLocale:"Italiano",ar:"Arabo",de:"Tedesco",en:"Inglese",es:"Spagnolo",fr:"Francese",hi:"Hindi",it:"Italiano",ja:"Giapponese",ko:"Coreano",nl:"Olandese",pl:"Polacco",pt:"Portoghese",ru:"Russo",tr:"Turco",vi:"Vietnamita",zh:"Cinese",he:"Ebraico",fa:"Persiano",ur:"Urdu",emailPlaceholderText:"Inserisci la tua email",incrementValue:"Incrementa valore",decrementValue:"Decrementa valore",dropZoneInstructions:e=>e?"Clicca per scegliere o trascina i file qui, o premi Invio o Spazio per aprire il selettore file":"Trascina i file qui",fileSizeUnits:["Byte","KB","MB","GB","TB"],removeFile:"Rimuovi file",clearAllFiles:"Cancella tutti i file",clearValue:"Cancella valore",unknownType:"Tipo sconosciuto",filesInputInstructions:(e,i,o)=>{let a=e==null||e>1?"Clicca per scegliere o trascina i file qui":"Clicca per scegliere o trascina un file qui";if(e||i){const t=[];if(e!=null&&e>1&&t.push(`fino a ${e} file`),i&&o){const n=l.formatFileSize(i,{units:o});t.push(`max ${n} ciascuno`)}t.length>0&&(a+=` (${t.join(", ")})`)}return a},paginationLabel:"Paginazione",paginationRange:(e,i,o,a)=>a>o?`Righe da ${e} a ${i} di ${o} di ${a}`:`Righe da ${e} a ${i} di ${o}`,firstPage:"Prima pagina",previousPage:"Pagina precedente",nextPage:"Pagina successiva",lastPage:"Ultima pagina",breadcrumbs:"Breadcrumb",commandPalette:"Tavolozza comandi",typeACommand:"Digita un comando...",noResultsFound:"Nessun risultato trovato",noMatchingCommands:"Nessun comando corrispondente",appearanceSystem:"Sistema",appearanceLight:"Chiaro",appearanceDark:"Scuro",ok:"OK",changeTypeConfirmation:"La modifica del tipo cancellerà il valore attuale. Continuare?",notifications:"Notifiche",markAllAsRead:"Segna tutto come letto",noNotifications:"Nessuna notifica",schemaConflictsDetected:"Conflitti di schema rilevati",schemaViolationsDetected:"Violazioni di schema rilevate",properties:"Proprietà",uploading:"Caricamento...",dropFilesOrBrowse:"Trascina i file qui o clicca per sfogliare",acceptedTypes:e=>`Tipi accettati: ${e}`,enterUrlPrompt:"Inserisci URL:",exceeded:"(superato)",pdfPreview:"Anteprima PDF",lexical:{fontFamily:"Famiglia di caratteri",fontSize:"Dimensione carattere",lineHeight:"Altezza riga",fontColor:"Colore carattere",highlightColor:"Colore evidenziazione",backgroundColor:"Colore sfondo",bold:"Grassetto",italic:"Corsivo",underline:"Sottolineato",strikethrough:"Barrato",code:"Codice",clearFormatting:"Cancella formattazione",normal:"Normale",heading:e=>`Titolo ${e}`,bulletList:"Elenco puntato",orderedList:"Elenco numerato",checkList:"Elenco di controllo",indent:"Aumenta rientro",outdent:"Riduci rientro",blockquote:"Citazione",codeBlock:"Blocco di codice",horizontalRule:"Linea orizzontale",insertTable:"Inserisci tabella",link:"Collegamento",undo:"Annulla",redo:"Ripristina",cut:"Taglia",copy:"Copia",paste:"Incolla",defaultOption:"Predefinito",slashCommands:"Comandi slash",noCommandsFound:"Nessun comando trovato",changeBlockType:"Cambia tipo di blocco",blockTypes:"Tipi di blocco",enterUrl:"Inserisci URL:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Ordine crescente",sortDescending:"Ordine decrescente",clearSort:"Rimuovi ordinamento",filterPlaceholder:"Filtra...",clearFilter:"Rimuovi filtro",selectAll:"Seleziona tutto",deselectAll:"Deseleziona tutto",selectedCount:e=>`${e} selezionati`,resetAll:"Ripristina tutto",noResults:"Nessun risultato trovato",loading:"Caricamento...",filterPanelAddCondition:"Aggiungi condizione",filterPanelApply:"Applica",filterPanelClear:"Cancella filtri",filterPanelAnd:"E",filterPanelOr:"O",filterPanelContains:"Contiene",filterPanelNotContains:"Non contiene",filterPanelEquals:"Uguale a",filterPanelNotEquals:"Diverso da",filterPanelStartsWith:"Inizia con",filterPanelEndsWith:"Finisce con",filterPanelIsNull:"È vuoto",filterPanelIsNotNull:"Non è vuoto",filterPanelGt:"Maggiore di",filterPanelGte:"Maggiore o uguale",filterPanelLt:"Minore di",filterPanelLte:"Minore o uguale",filterPanelBetween:"Tra",filterPanelValuePlaceholder:"Valore...",sortMultiHint:"Tieni premuto Shift per ordinare per più colonne",columnVisibility:"Colonne",showAllColumns:"Mostra tutto",menuSortAsc:"Ordina crescente",menuSortDesc:"Ordina decrescente",menuClearSort:"Rimuovi ordinamento",menuHideColumn:"Nascondi colonna",menuChooseColumns:"Scegli colonne",menuResetColumns:"Ripristina colonne",menuFilter:"Filtra",rowCount:(e,i)=>`Righe: ${e} Righe totali: ${i}`,filterTagsPlaceholder:"Seleziona valori...",groupCount:e=>`${e} elementi`,collapseGroup:"Comprimi gruppo",expandGroup:"Espandi gruppo",describeFilter:{textContains:(e,i)=>`${e} contiene "${i}"`,textNotContains:(e,i)=>`${e} non contiene "${i}"`,textEquals:(e,i)=>`${e} uguale a "${i}"`,textNotEquals:(e,i)=>`${e} diverso da "${i}"`,textStartsWith:(e,i)=>`${e} inizia con "${i}"`,textEndsWith:(e,i)=>`${e} finisce con "${i}"`,compareEq:(e,i)=>`${e} = ${i}`,compareNeq:(e,i)=>`${e} ≠ ${i}`,compareGt:(e,i)=>`${e} > ${i}`,compareGte:(e,i)=>`${e} ≥ ${i}`,compareLt:(e,i)=>`${e} < ${i}`,compareLte:(e,i)=>`${e} ≤ ${i}`,rangeBetween:(e,i,o)=>`${e} tra ${i} e ${o}`,rangeGte:(e,i)=>`${e} ≥ ${i}`,rangeLte:(e,i)=>`${e} ≤ ${i}`,setIn:(e,i)=>`${e} in [${i}]`,setNotIn:(e,i)=>`${e} non in [${i}]`,booleanIs:(e,i)=>`${e} è ${i}`,isNull:e=>`${e} è vuoto`,isNotNull:e=>`${e} non è vuoto`,compositeAnd:e=>e.join(" E "),compositeOr:e=>e.join(" O ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Caricamento PDF...",loadFailed:"Impossibile caricare il PDF",invalidPdf:"File PDF non valido",pageOutOfRange:(e,i)=>`La pagina ${e} è fuori intervallo (1-${i})`,renderFailed:"Impossibile renderizzare la pagina PDF"}};exports.default=r;
@@ -1,4 +1,4 @@
1
- import { f as r } from "./translations-B96REXIk.js";
1
+ import { f as r } from "./translations-DT5QQ4WO.js";
2
2
  const s = {
3
3
  loadingExtended: "読み込み中です、お待ちください",
4
4
  loadingShort: "読み込み中...",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./translations-BDGa_4jx.cjs"),a={loadingExtended:"読み込み中です、お待ちください",loadingShort:"読み込み中...",locale:"ロケール",iconDescription:"アイコン",loadingIcon:"読み込みアイコン",failedToLoadIcon:"アイコンの読み込みに失敗しました",editLabel:"編集",selectOne:"一つ選択",selectNone:"なし",selectMany:"複数選択",noResults:"結果なし",passwordPlaceholderText:"パスワード",togglePasswordVisibility:"パスワードの表示を切り替え",toggleMenu:"メニューを切り替え",toggleAside:"サイドパネルを切り替え",mainNavigation:"メインナビゲーション",sidebar:"サイドバー",closeDrawer:"ドロワーを閉じる",closeModal:"モーダルを閉じる",confirm:"確認",cancel:"キャンセル",addLabel:"追加",removeItem:"項目を削除",currentLocale:"日本語",ar:"アラビア語",de:"ドイツ語",en:"英語",es:"スペイン語",fr:"フランス語",hi:"ヒンディー語",it:"イタリア語",ja:"日本語",ko:"韓国語",nl:"オランダ語",pl:"ポーランド語",pt:"ポルトガル語",ru:"ロシア語",tr:"トルコ語",vi:"ベトナム語",zh:"中国語",he:"ヘブライ語",fa:"ペルシア語",ur:"ウルドゥー語",emailPlaceholderText:"メールアドレスを入力",incrementValue:"値を増加",decrementValue:"値を減少",dropZoneInstructions:e=>e?"クリックして選択するか、ファイルをここにドラッグ、またはEnterキーまたはSpaceキーを押してファイル選択を開く":"ファイルをここにドラッグ",fileSizeUnits:["バイト","KB","MB","GB","TB"],removeFile:"ファイルを削除",clearAllFiles:"すべてのファイルを削除",clearValue:"リセット",unknownType:"不明なタイプ",filesInputInstructions:(e,t,l)=>{let n=(e==null||e>1,"クリックして選択するか、ファイルをここにドラッグ");if(e||t){const o=[];if(e!=null&&e>1&&o.push(`最大${e}ファイル`),t&&l){const r=i.formatFileSize(t,{units:l});o.push(`各${r}以下`)}o.length>0&&(n+=` (${o.join("、")})`)}return n},paginationLabel:"ページネーション",paginationRange:(e,t,l,n)=>n>l?`${n}件中${l}件の${e}〜${t}行`:`${l}件中${e}〜${t}行`,firstPage:"最初のページ",previousPage:"前のページ",nextPage:"次のページ",lastPage:"最後のページ",breadcrumbs:"パンくずリスト",commandPalette:"コマンドパレット",typeACommand:"コマンドを入力...",noResultsFound:"結果が見つかりません",noMatchingCommands:"一致するコマンドがありません",appearanceSystem:"システム",appearanceLight:"ライト",appearanceDark:"ダーク",ok:"OK",changeTypeConfirmation:"型を変更すると現在の値がクリアされます。続行しますか?",notifications:"通知",markAllAsRead:"すべて既読にする",noNotifications:"通知はありません",schemaConflictsDetected:"スキーマの競合が検出されました",schemaViolationsDetected:"スキーマ違反が検出されました",properties:"プロパティ",uploading:"アップロード中...",dropFilesOrBrowse:"ファイルをここにドロップするか、クリックして参照",acceptedTypes:e=>`対応形式: ${e}`,enterUrlPrompt:"URLを入力:",exceeded:"(超過)",pdfPreview:"PDFプレビュー",lexical:{fontFamily:"フォントファミリー",fontSize:"フォントサイズ",lineHeight:"行の高さ",fontColor:"フォントの色",highlightColor:"ハイライトの色",backgroundColor:"背景色",bold:"太字",italic:"斜体",underline:"下線",strikethrough:"取り消し線",code:"コード",clearFormatting:"書式をクリア",normal:"標準",heading:e=>`見出し ${e}`,bulletList:"箇条書き",orderedList:"番号付きリスト",checkList:"チェックリスト",indent:"インデントを増やす",outdent:"インデントを減らす",blockquote:"引用",codeBlock:"コードブロック",horizontalRule:"水平線",insertTable:"表を挿入",link:"リンク",undo:"元に戻す",redo:"やり直し",cut:"切り取り",copy:"コピー",paste:"貼り付け",defaultOption:"デフォルト",slashCommands:"スラッシュコマンド",noCommandsFound:"コマンドが見つかりません",changeBlockType:"ブロックタイプを変更",blockTypes:"ブロックタイプ",enterUrl:"URLを入力:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"昇順で並べ替え",sortDescending:"降順で並べ替え",clearSort:"並べ替えを解除",filterPlaceholder:"フィルター...",clearFilter:"フィルターを解除",selectAll:"すべて選択",deselectAll:"すべて選択解除",selectedCount:e=>`${e}件選択中`,resetAll:"すべてリセット",noResults:"結果が見つかりません",loading:"読み込み中...",filterPanelAddCondition:"条件を追加",filterPanelApply:"適用",filterPanelClear:"フィルターをクリア",filterPanelAnd:"かつ",filterPanelOr:"または",filterPanelContains:"含む",filterPanelNotContains:"含まない",filterPanelEquals:"等しい",filterPanelNotEquals:"等しくない",filterPanelStartsWith:"で始まる",filterPanelEndsWith:"で終わる",filterPanelIsNull:"空である",filterPanelIsNotNull:"空でない",filterPanelGt:"より大きい",filterPanelGte:"以上",filterPanelLt:"より小さい",filterPanelLte:"以下",filterPanelBetween:"範囲",filterPanelValuePlaceholder:"値...",sortMultiHint:"Shiftキーを押しながら複数列をソート",columnVisibility:"列",showAllColumns:"すべて表示",menuSortAsc:"昇順で並び替え",menuSortDesc:"降順で並び替え",menuClearSort:"並び替えをクリア",menuHideColumn:"列を非表示",menuChooseColumns:"列を選択",menuResetColumns:"列をリセット",menuFilter:"フィルター",rowCount:(e,t)=>`行数: ${e} 合計行数: ${t}`,filterTagsPlaceholder:"値を選択...",groupCount:e=>`${e} 件`,collapseGroup:"グループを折りたたむ",expandGroup:"グループを展開",describeFilter:{textContains:(e,t)=>`${e} が "${t}" を含む`,textNotContains:(e,t)=>`${e} が "${t}" を含まない`,textEquals:(e,t)=>`${e} が "${t}" に等しい`,textNotEquals:(e,t)=>`${e} が "${t}" に等しくない`,textStartsWith:(e,t)=>`${e} が "${t}" で始まる`,textEndsWith:(e,t)=>`${e} が "${t}" で終わる`,compareEq:(e,t)=>`${e} = ${t}`,compareNeq:(e,t)=>`${e} ≠ ${t}`,compareGt:(e,t)=>`${e} > ${t}`,compareGte:(e,t)=>`${e} ≥ ${t}`,compareLt:(e,t)=>`${e} < ${t}`,compareLte:(e,t)=>`${e} ≤ ${t}`,rangeBetween:(e,t,l)=>`${e} が ${t} ~ ${l} の間`,rangeGte:(e,t)=>`${e} ≥ ${t}`,rangeLte:(e,t)=>`${e} ≤ ${t}`,setIn:(e,t)=>`${e} が [${t}] に含まれる`,setNotIn:(e,t)=>`${e} が [${t}] に含まれない`,booleanIs:(e,t)=>`${e} は ${t}`,isNull:e=>`${e} が空`,isNotNull:e=>`${e} が空でない`,compositeAnd:e=>e.join(" かつ "),compositeOr:e=>e.join(" または ")}},prosemirror:{bold:"太字",italic:"斜体",code:"インラインコード",link:"リンクを挿入",removeLink:"リンクを削除",heading:e=>`見出し ${e}`,bulletList:"箇条書き",orderedList:"番号付きリスト",blockquote:"引用",codeBlock:"コードブロック",horizontalRule:"水平線",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"PDFを読み込み中...",loadFailed:"PDFの読み込みに失敗しました",invalidPdf:"無効なPDFファイル",pageOutOfRange:(e,t)=>`ページ ${e} は範囲外です (1-${t})`,renderFailed:"PDFページのレンダリングに失敗しました"}};exports.default=a;exports.ja=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./translations-qefRsdGi.cjs"),a={loadingExtended:"読み込み中です、お待ちください",loadingShort:"読み込み中...",locale:"ロケール",iconDescription:"アイコン",loadingIcon:"読み込みアイコン",failedToLoadIcon:"アイコンの読み込みに失敗しました",editLabel:"編集",selectOne:"一つ選択",selectNone:"なし",selectMany:"複数選択",noResults:"結果なし",passwordPlaceholderText:"パスワード",togglePasswordVisibility:"パスワードの表示を切り替え",toggleMenu:"メニューを切り替え",toggleAside:"サイドパネルを切り替え",mainNavigation:"メインナビゲーション",sidebar:"サイドバー",closeDrawer:"ドロワーを閉じる",closeModal:"モーダルを閉じる",confirm:"確認",cancel:"キャンセル",addLabel:"追加",removeItem:"項目を削除",currentLocale:"日本語",ar:"アラビア語",de:"ドイツ語",en:"英語",es:"スペイン語",fr:"フランス語",hi:"ヒンディー語",it:"イタリア語",ja:"日本語",ko:"韓国語",nl:"オランダ語",pl:"ポーランド語",pt:"ポルトガル語",ru:"ロシア語",tr:"トルコ語",vi:"ベトナム語",zh:"中国語",he:"ヘブライ語",fa:"ペルシア語",ur:"ウルドゥー語",emailPlaceholderText:"メールアドレスを入力",incrementValue:"値を増加",decrementValue:"値を減少",dropZoneInstructions:e=>e?"クリックして選択するか、ファイルをここにドラッグ、またはEnterキーまたはSpaceキーを押してファイル選択を開く":"ファイルをここにドラッグ",fileSizeUnits:["バイト","KB","MB","GB","TB"],removeFile:"ファイルを削除",clearAllFiles:"すべてのファイルを削除",clearValue:"リセット",unknownType:"不明なタイプ",filesInputInstructions:(e,t,l)=>{let n=(e==null||e>1,"クリックして選択するか、ファイルをここにドラッグ");if(e||t){const o=[];if(e!=null&&e>1&&o.push(`最大${e}ファイル`),t&&l){const r=i.formatFileSize(t,{units:l});o.push(`各${r}以下`)}o.length>0&&(n+=` (${o.join("、")})`)}return n},paginationLabel:"ページネーション",paginationRange:(e,t,l,n)=>n>l?`${n}件中${l}件の${e}〜${t}行`:`${l}件中${e}〜${t}行`,firstPage:"最初のページ",previousPage:"前のページ",nextPage:"次のページ",lastPage:"最後のページ",breadcrumbs:"パンくずリスト",commandPalette:"コマンドパレット",typeACommand:"コマンドを入力...",noResultsFound:"結果が見つかりません",noMatchingCommands:"一致するコマンドがありません",appearanceSystem:"システム",appearanceLight:"ライト",appearanceDark:"ダーク",ok:"OK",changeTypeConfirmation:"型を変更すると現在の値がクリアされます。続行しますか?",notifications:"通知",markAllAsRead:"すべて既読にする",noNotifications:"通知はありません",schemaConflictsDetected:"スキーマの競合が検出されました",schemaViolationsDetected:"スキーマ違反が検出されました",properties:"プロパティ",uploading:"アップロード中...",dropFilesOrBrowse:"ファイルをここにドロップするか、クリックして参照",acceptedTypes:e=>`対応形式: ${e}`,enterUrlPrompt:"URLを入力:",exceeded:"(超過)",pdfPreview:"PDFプレビュー",lexical:{fontFamily:"フォントファミリー",fontSize:"フォントサイズ",lineHeight:"行の高さ",fontColor:"フォントの色",highlightColor:"ハイライトの色",backgroundColor:"背景色",bold:"太字",italic:"斜体",underline:"下線",strikethrough:"取り消し線",code:"コード",clearFormatting:"書式をクリア",normal:"標準",heading:e=>`見出し ${e}`,bulletList:"箇条書き",orderedList:"番号付きリスト",checkList:"チェックリスト",indent:"インデントを増やす",outdent:"インデントを減らす",blockquote:"引用",codeBlock:"コードブロック",horizontalRule:"水平線",insertTable:"表を挿入",link:"リンク",undo:"元に戻す",redo:"やり直し",cut:"切り取り",copy:"コピー",paste:"貼り付け",defaultOption:"デフォルト",slashCommands:"スラッシュコマンド",noCommandsFound:"コマンドが見つかりません",changeBlockType:"ブロックタイプを変更",blockTypes:"ブロックタイプ",enterUrl:"URLを入力:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"昇順で並べ替え",sortDescending:"降順で並べ替え",clearSort:"並べ替えを解除",filterPlaceholder:"フィルター...",clearFilter:"フィルターを解除",selectAll:"すべて選択",deselectAll:"すべて選択解除",selectedCount:e=>`${e}件選択中`,resetAll:"すべてリセット",noResults:"結果が見つかりません",loading:"読み込み中...",filterPanelAddCondition:"条件を追加",filterPanelApply:"適用",filterPanelClear:"フィルターをクリア",filterPanelAnd:"かつ",filterPanelOr:"または",filterPanelContains:"含む",filterPanelNotContains:"含まない",filterPanelEquals:"等しい",filterPanelNotEquals:"等しくない",filterPanelStartsWith:"で始まる",filterPanelEndsWith:"で終わる",filterPanelIsNull:"空である",filterPanelIsNotNull:"空でない",filterPanelGt:"より大きい",filterPanelGte:"以上",filterPanelLt:"より小さい",filterPanelLte:"以下",filterPanelBetween:"範囲",filterPanelValuePlaceholder:"値...",sortMultiHint:"Shiftキーを押しながら複数列をソート",columnVisibility:"列",showAllColumns:"すべて表示",menuSortAsc:"昇順で並び替え",menuSortDesc:"降順で並び替え",menuClearSort:"並び替えをクリア",menuHideColumn:"列を非表示",menuChooseColumns:"列を選択",menuResetColumns:"列をリセット",menuFilter:"フィルター",rowCount:(e,t)=>`行数: ${e} 合計行数: ${t}`,filterTagsPlaceholder:"値を選択...",groupCount:e=>`${e} 件`,collapseGroup:"グループを折りたたむ",expandGroup:"グループを展開",describeFilter:{textContains:(e,t)=>`${e} が "${t}" を含む`,textNotContains:(e,t)=>`${e} が "${t}" を含まない`,textEquals:(e,t)=>`${e} が "${t}" に等しい`,textNotEquals:(e,t)=>`${e} が "${t}" に等しくない`,textStartsWith:(e,t)=>`${e} が "${t}" で始まる`,textEndsWith:(e,t)=>`${e} が "${t}" で終わる`,compareEq:(e,t)=>`${e} = ${t}`,compareNeq:(e,t)=>`${e} ≠ ${t}`,compareGt:(e,t)=>`${e} > ${t}`,compareGte:(e,t)=>`${e} ≥ ${t}`,compareLt:(e,t)=>`${e} < ${t}`,compareLte:(e,t)=>`${e} ≤ ${t}`,rangeBetween:(e,t,l)=>`${e} が ${t} ~ ${l} の間`,rangeGte:(e,t)=>`${e} ≥ ${t}`,rangeLte:(e,t)=>`${e} ≤ ${t}`,setIn:(e,t)=>`${e} が [${t}] に含まれる`,setNotIn:(e,t)=>`${e} が [${t}] に含まれない`,booleanIs:(e,t)=>`${e} は ${t}`,isNull:e=>`${e} が空`,isNotNull:e=>`${e} が空でない`,compositeAnd:e=>e.join(" かつ "),compositeOr:e=>e.join(" または ")}},prosemirror:{bold:"太字",italic:"斜体",code:"インラインコード",link:"リンクを挿入",removeLink:"リンクを削除",heading:e=>`見出し ${e}`,bulletList:"箇条書き",orderedList:"番号付きリスト",blockquote:"引用",codeBlock:"コードブロック",horizontalRule:"水平線",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"PDFを読み込み中...",loadFailed:"PDFの読み込みに失敗しました",invalidPdf:"無効なPDFファイル",pageOutOfRange:(e,t)=>`ページ ${e} は範囲外です (1-${t})`,renderFailed:"PDFページのレンダリングに失敗しました"}};exports.default=a;exports.ja=a;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@tempots/dom"),A=require("../oneof-branch-detection-bQKKfV32.cjs"),_=require("../translations-BDGa_4jx.cjs"),Q=require("../notice-dOOD80F7.cjs"),j=require("../widget-customization-CHxaaaEV.cjs"),F=require("../stack-dwLevGa2.cjs"),v=require("../use-form-Ca0kF4af.cjs"),W=require("@tempots/std"),k=require("../deep-merge-DEEd-Tte.cjs"),T=require("../utils-DmEuG3Np.cjs"),Se=require("../text-input-CynkbBpH.cjs"),we=require("../input-container-BZwpJgx6.cjs"),_e=require("ajv");function Oe(e){if(!e||typeof e!="object")return!1;const t=e;return!!(e.if||t.dependentRequired||t.dependentSchemas||e.dependencies)}function Ce(e,t,n,r=[]){if(!n)return null;try{if(A.compileWithCache(n,e)(t)){const o=e.title||"disallowed schema";return{path:r,message:`Value matches ${o}`,notSchema:e}}return null}catch{return null}}function Ae(e,t,n,r=[]){const i=[],a=[],o=ae(e,t,n);o&&i.push(o);const s=Array.isArray(e.required)?[...e.required]:[];if(typeof t=="object"&&t!=null&&!Array.isArray(t)){const m=t,f=e.dependentRequired;if(f){for(const[d,p]of Object.entries(f))if(Object.prototype.hasOwnProperty.call(m,d))for(const w of p)s.push(w)}const b=e.dependencies;if(b){for(const[d,p]of Object.entries(b))if(Object.prototype.hasOwnProperty.call(m,d))if(Array.isArray(p))for(const w of p)s.push(w);else typeof p=="object"&&p&&i.push(p)}const S=e.dependentSchemas;if(S)for(const[d,p]of Object.entries(S))Object.prototype.hasOwnProperty.call(m,d)&&i.push(p)}const u=[e,...i],{mergedSchema:c,conflicts:y}=A.mergeAllOf(u,r);if(s.length>0){const m=new Set([...c.required??[],...s]);c.required=[...m]}return a.push(...y),{effective:c,conflicts:a}}function ae(e,t,n){if(!n||!e.if||typeof e.if!="object")return null;try{if(A.compileWithCache(n,e.if)(t)){const a=e.then;if(a&&typeof a=="object")return a}else{const a=e.else;if(a&&typeof a=="object")return a}}catch{}return null}function J(e,t,n){const r=new Set;if(!t||typeof t!="object")return r;if(e.properties&&Object.keys(e.properties).forEach(o=>{o in t&&r.add(o)}),e.patternProperties&&Object.keys(t).forEach(o=>{Object.keys(e.patternProperties).forEach(s=>{try{new RegExp(s).test(o)&&r.add(o)}catch{}})}),e.additionalProperties===!0||e.additionalProperties&&typeof e.additionalProperties=="object"){const o=new Set;e.properties&&Object.keys(e.properties).forEach(s=>{s in t&&o.add(s)}),e.patternProperties&&Object.keys(t).forEach(s=>{Object.keys(e.patternProperties).forEach(u=>{try{new RegExp(u).test(s)&&o.add(s)}catch{}})}),Object.keys(t).forEach(s=>{o.has(s)||r.add(s)})}e.allOf&&e.allOf.forEach(o=>{typeof o=="object"&&J(o,t,n).forEach(u=>r.add(u))});const i=ae(e,t,n);i&&J(i,t,n).forEach(s=>r.add(s));const a=e.dependentSchemas;return a&&Object.keys(a).forEach(o=>{if(o in t){const s=a[o];typeof s=="object"&&J(s,t,n).forEach(c=>r.add(c))}}),e.dependencies&&Object.keys(e.dependencies).forEach(o=>{if(o in t){const s=e.dependencies[o];typeof s=="object"&&!Array.isArray(s)&&J(s,t,n).forEach(c=>r.add(c))}}),r}function $({ctx:e}){const{examples:t,default:n}=e;let{description:r}=e;r==null&&t!=null&&n!=null&&(Array.isArray(t)?r=`example: ${t[0]}`:r=`example: ${t}`);const i=[];if(e.isDeprecated&&i.push("deprecated"),e.isReadOnly&&!e.shouldIgnoreReadOnly&&i.push("read-only"),e.isWriteOnly&&!e.shouldShowWriteOnly&&i.push("write-only"),i.length>0){const a=`(${i.join(", ")})`;r=r?`${r} ${a}`:a}return{label:e.suppressLabel?void 0:e.widgetLabel,description:r,required:e.isPropertyRequired,layout:e.horizontal?"horizontal":"vertical"}}function G(e,t){if(e.default!=null)return t(e.default);if(Array.isArray(e.examples))return t(e.examples[0]);if(e.examples!=null)return t(e.examples)}function je(e){return e==null?1:Math.round(e)}function oe(e){return e.isWriteOnly&&!e.shouldShowWriteOnly}function se(e){return e.isReadOnly&&!e.shouldIgnoreReadOnly||e.isDeprecated}function R({ctx:e,controller:t,resolved:n}){const r=n?.widget,i={controller:t,ctx:e,options:n?.options,setStatus:e.setStatus,formValue:e.formValue,validationMode:e.validationMode,submitting:e.submitting};if(r!=null&&e.widgetRegistry){const o=e.widgetRegistry.get(r);if(o)return o.factory(i)}if(r!=null){const o=j.globalWidgetRegistry.get(r);if(o)return o.factory(i)}if(e.widgetRegistry){const o=e.widgetRegistry.findBestWidget(e);if(o)return o.registration.factory(i)}const a=j.globalWidgetRegistry.findBestWidget(e);return a?a.registration.factory(i):null}function ke(e){const{options:t,selected:n,onChange:r,mode:i="auto",size:a="sm",keyFor:o=y=>String(y),parseKey:s=y=>y}=e,u=t.length;if((i==="auto"?u<=3?"segmented":"select":i)==="segmented"){const y=Object.fromEntries(t.map(m=>[o(m.value),m.label]));return k.SegmentedInput({options:y,value:l.Value.map(n,m=>o(m)),onChange:m=>r(s(m)),size:a})}return k.NativeSelect({options:t.map(y=>({type:"value",value:y.value,label:y.label})),value:n,onChange:r})}function Ie({ctx:e,showSelector:t,selector:n,inner:r}){return e.isRoot?t?F.Stack(l.attr.class("bc-stack--gap-2"),n,r):r:v.InputWrapper({...$({ctx:e}),content:t?F.Stack(l.attr.class("bc-stack--gap-2 bc-stack--align-start"),n,r):r})}function Ke(e,t){if(e===null)return t.includes("null")?"null":null;switch(typeof e){case"string":return t.includes("string")?"string":null;case"number":return Number.isInteger(e)&&t.includes("integer")?"integer":t.includes("number")?"number":null;case"boolean":return t.includes("boolean")?"boolean":null;case"object":return Array.isArray(e)?t.includes("array")?"array":null:t.includes("object")?"object":null;default:return null}}function ze(e,t){try{switch(t){case"string":return e==null?{ok:!0,value:void 0}:{ok:!0,value:String(e)};case"number":{if(typeof e=="number")return{ok:!0,value:e};if(typeof e=="string"){const n=Number(e);return Number.isFinite(n)?{ok:!0,value:n}:{ok:!1}}return typeof e=="boolean"?{ok:!0,value:e?1:0}:{ok:!1}}case"integer":return typeof e=="number"&&Number.isInteger(e)?{ok:!0,value:e}:typeof e=="string"?/^[-+]?\d+$/.test(e.trim())?{ok:!0,value:parseInt(e,10)}:{ok:!1}:typeof e=="boolean"?{ok:!0,value:e?1:0}:{ok:!1};case"boolean":{if(typeof e=="boolean")return{ok:!0,value:e};if(typeof e=="string"){const n=e.trim().toLowerCase();return n==="true"||n==="1"||n==="yes"?{ok:!0,value:!0}:n==="false"||n==="0"||n==="no"?{ok:!0,value:!1}:{ok:!1}}return typeof e=="number"?{ok:!0,value:e!==0}:{ok:!1}}case"array":return Array.isArray(e)?{ok:!0,value:e}:{ok:!1};case"object":return e!=null&&typeof e=="object"&&!Array.isArray(e)?{ok:!0,value:e}:{ok:!1};case"null":return{ok:!0,value:null}}}catch{return{ok:!1}}}function He(e){switch(e){case"null":return null;case"array":return[];case"object":return{};default:return}}function Ge(e){if(typeof e=="boolean")return{};const t=e["x:ui"];if(t!=null&&typeof t=="object"&&!Array.isArray(t)){const n=t;return{unionDefault:typeof n.unionDefault=="string"?n.unionDefault:void 0,confirmBranchChange:!!n.confirmBranchChange,selector:n.selector==="segmented"||n.selector==="select"?n.selector:void 0}}return{}}function Xe(e){const{definition:t}=e;if(typeof t=="boolean")return;const n={pattern:t.pattern,minLength:t.minLength,maxLength:t.maxLength},r=T.resolveWidget(t,e.name),i=r?.widget;if(i!=null)switch(i){case"binary":return{...n,format:"binary",...r?.options};case"date":return{...n,format:"date"};case"date-time":return{...n,format:"date-time"};case"email":return{...n,format:"email"};case"markdown":return{...n,format:"markdown"};case"password":return{...n,format:"password"};case"textarea":return{...n,format:"textarea"};case"time":return{...n,format:"time"};case"uuid":return{format:"uuid"};case"url":return{...n,format:"url"};case"uri":return{...n,format:"uri"};case"uri-reference":return{...n,format:"uri-reference"};case"hostname":return{...n,format:"hostname"};case"ipv4":return{...n,format:"ipv4"};case"ipv6":return{...n,format:"ipv6"};case"regex":return{...n,format:"regex"};case"duration":return{...n,format:"duration"};case"color":return{...n,format:"color"}}}const Ye=e=>{const{after:t,disabled:n}=e,r=Se.mapInputOptions(e,a=>a??void 0,a=>a??null),i=k.NullableResetAfter(e.value,n,e.onChange??e.onInput);return j.Base64Input({...r,after:t!=null?l.Fragment(i,t):i})};function de({ctx:e,options:t,controller:n}){const r=Xe(e),i=!e.isNullable,a=()=>i?k.transformNullToUndefined(n):n;switch(r?.format){case"email":return v.Control(j.NullableEmailInput,{...t,controller:a()});case"date":return v.MappedControl(j.NativeNullableDateInput,{...t,controller:a(),toInput:o=>o==null?null:new Date(o),fromInput:o=>o?.toISOString().split("T")[0]??null});case"date-time":return v.MappedControl(j.NativeNullableDateTimeInput,{...t,controller:a(),toInput:o=>o==null?null:new Date(o),fromInput:o=>o?.toISOString()??null});case"time":return v.Control(j.NullableTextInput,{...t,controller:a(),placeholder:"HH:MM:SS"});case"password":return v.Control(j.NullablePasswordInput,{...t,controller:a()});case"binary":{const{definition:o}=e,s=typeof o=="object"?o["x:ui"]:void 0;return r.mediaType&&(r.mediaType.startsWith("image/")||r.mediaType.startsWith("video/")||r.mediaType.startsWith("audio/")||r.mediaType==="application/pdf"||s?.preferFileUpload===!0)?v.Control(Ye,{...t,controller:a(),mode:"input",accept:r.mediaType||"*/*",maxFileSize:(typeof s?.maxBytes=="number"?s.maxBytes:void 0)||(typeof s?.maxFileSize=="number"?s.maxFileSize:void 0),showFileList:!0}):v.Control(j.NullableTextArea,{...t,controller:a(),placeholder:"Paste base64-encoded data",rows:3})}case"uri":case"url":return v.Control(j.NullableUrlInput,{...t,controller:a(),placeholder:"https://example.com"});case"uri-reference":return v.Control(j.NullableTextInput,{...t,controller:a(),placeholder:"Enter URL..."});case"hostname":return v.Control(j.NullableTextInput,{...t,controller:a(),placeholder:"example.com"});case"ipv4":return v.Control(j.NullableTextInput,{...t,controller:a(),placeholder:"192.168.1.1"});case"ipv6":return v.Control(j.NullableTextInput,{...t,controller:a(),placeholder:"2001:db8::1"});case"regex":return v.Control(j.NullableTextArea,{...t,controller:a(),placeholder:"^[a-zA-Z0-9]+$",rows:3});case"duration":return k.WithTemporal(({Duration:o})=>v.MappedControl(k.NullableDurationInput,{...t,controller:a(),toInput:s=>s==null?null:o.from(s),fromInput:s=>s?.toString?.()??null}));case"color":return v.Control(j.ColorSwatchInput,{...t,controller:n,displayValue:!0});case"uuid":return v.Control(j.NullableUuidInput,{...t,controller:a()});case"textarea":return v.Control(j.NullableTextArea,{...t,controller:a()});default:return v.Control(j.NullableTextInput,{...t,controller:a()})}}function ee({ctx:e,controller:t}){if(oe(e))return l.Empty;const n=T.resolveWidget(e.definition,e.name),r=n?.widget,i=R({ctx:e,controller:t,resolved:n});if(i)return i;const a={...$({ctx:e}),placeholder:G(e.definition,String),disabled:se(e)};if((e.isNullable||e.isOptional)&&!e.shouldShowPresenceToggle)return de({ctx:e,options:a,controller:t});if(r!=null&&["url","uri","uri-reference","hostname","ipv4","ipv6","regex","duration","binary","markdown","time","color"].includes(r))return de({ctx:e,options:a,controller:t});switch(r){case"email":return v.Control(Q.EmailInput,{...a,controller:k.transformEmptyStringToUndefined(t)});case"password":return v.Control(Q.PasswordInput,{...a,controller:k.transformEmptyStringToUndefined(t)});case"uuid":return v.Control(k.UuidInput,{...a,controller:k.transformEmptyStringToUndefined(t)});case"textarea":return v.Control(k.TextArea,{...a,controller:k.transformEmptyStringToUndefined(t)});default:return v.Control(Se.TextInput,{...a,controller:k.transformEmptyStringToUndefined(t)})}}function Ze(e){const t=T.resolveWidget(e.definition,e.name);if(t?.widget==="slider")return{widget:"slider",options:t.options};if(t?.widget==="rating")return{widget:"rating",options:t.options};const n=e.definition,r=typeof n=="object"?n["x:ui"]:void 0;return r?.displayFormat==="currency"?{widget:"currency",options:{currency:typeof r?.currency=="string"?r.currency:"USD"}}:r?.displayFormat==="percent"?{widget:"percent"}:{widget:"number"}}function X({ctx:e,controller:t}){if(oe(e))return l.Empty;const n=e.definition,r=Ze(e),i=T.resolveWidget(e.definition,e.name),a=R({ctx:e,controller:t,resolved:i});if(a)return a;const o={...$({ctx:e}),placeholder:G(e.definition,String),min:n.minimum,max:n.maximum,step:n.multipleOf,disabled:se(e)},s=(e.isNullable||e.isOptional)&&!e.shouldShowPresenceToggle,u=s&&!e.isNullable;switch(r.widget){case"rating":const c=(typeof r.options?.max=="number"?r.options.max:n.maximum)||5;return s?v.Control(j.NullableRatingInput,{...o,max:c,controller:u?k.transformNullToUndefined(t):t}):v.Control(j.RatingInput,{...o,max:c,controller:t});case"slider":return s?v.Control(j.NullableSliderInput,{...o,controller:u?k.transformNullToUndefined(t):t}):v.Control(j.SliderInput,{...o,controller:t});case"currency":const y=typeof r.options?.currency=="string"?r.options.currency:"USD";return s?v.Control(k.MaskInput,{...o,mask:pe(y),controller:t}):v.Control(k.MaskInput,{...o,mask:pe(y),controller:t});case"percent":return s?v.Control(k.MaskInput,{...o,mask:me(),controller:t}):v.Control(k.MaskInput,{...o,mask:me(),controller:t});default:return s?v.Control(k.NullableNumberInput,{...o,controller:u?k.transformNullToUndefined(t):t}):v.Control(k.NumberInput,{...o,controller:t})}}function pe(e){return`${Qe(e)} 000,000.00`}function me(){return"000.00%"}function Qe(e){return{USD:"$",EUR:"€",GBP:"£",JPY:"¥",CAD:"C$",AUD:"A$"}[e.toUpperCase()]||e}function te({ctx:e,controller:t}){return X({ctx:e.with({definition:{...e.definition,multipleOf:je(e.definition.multipleOf)}}),controller:t})}function ne({ctx:e,controller:t}){if(oe(e))return l.Empty;const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i={...$({ctx:e}),disabled:se(e)},a=v.Control(v.CheckboxInput,{...i,controller:t});if(!e.isNullable&&(!e.isOptional||e.shouldShowPresenceToggle))return a;const o=!e.isNullable;return v.Control(v.CheckboxInput,{...i,controller:t,after:k.NullableResetAfter(t.signal,t.disabled,()=>t.change(o?void 0:null))})}function le({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});return r||l.WithElement(()=>{t.change(null)})}function et({conflicts:e}){return e.length===0?l.Empty:l.Use(_.BeatUII18n,t=>Q.Notice({variant:"warning",tone:"prominent",title:t.value.schemaConflictsDetected,class:"bc-schema-conflicts-banner"},l.html.ul(l.attr.style("margin: 0; padding-left: 1.25rem; list-style-type: disc;"),...e.map(n=>l.html.li(l.attr.style("margin-bottom: 0.25rem;"),n.message,n.path.length>0?l.html.code(l.attr.style("margin-left: 0.5rem; font-size: 0.75rem; opacity: 0.7;"),` (${n.path.join(".")})`):null)))))}function tt({violations:e}){return e.length===0?l.Empty:l.Use(_.BeatUII18n,t=>Q.Notice({variant:"danger",tone:"prominent",title:t.value.schemaViolationsDetected,class:"bc-not-violations-banner"},l.html.ul(l.attr.style("margin: 0; padding-left: 1.25rem; list-style-type: disc;"),...e.map(n=>l.html.li(l.attr.style("margin-bottom: 0.25rem;"),n.message,n.path.length>0?l.html.code(l.attr.style("margin-left: 0.5rem; font-size: 0.75rem; opacity: 0.7;"),` (${n.path.join(".")})`):null)))))}function nt({ctx:e,controller:t,content:n}){const r=l.Value.map(t.signal,o=>o!==void 0),i=e.widgetLabel??"Property",a=o=>{if(o){const s=e.default;if(s!==void 0)t.change(s);else{const u=e.definition;u.type==="string"?t.change(""):u.type==="number"||u.type==="integer"?t.change(0):u.type==="boolean"?t.change(!1):u.type==="array"?t.change([]):u.type==="object"?t.change({}):t.change(null)}}else t.change(void 0)};return F.Stack(l.html.div(l.attr.class("bc-presence-toggle"),v.InputWrapper({layout:"horizontal",label:`Include ${i}`,content:j.Switch({value:r,onChange:a,size:"xs"})})),l.When(r,()=>n))}function V(e,t,n){const r=e.schemaConflicts.length>0,i=e.notViolations.length>0,a=e.shouldShowPresenceToggle&&n!=null;let o=t;return a&&n!=null&&(o=nt({ctx:e,controller:n,content:t})),!r&&!i?o:F.Stack(l.attr.class("bc-stack--gap-2"),i?tt({violations:e.notViolations}):null,r?et({conflicts:e.schemaConflicts}):null,o)}function Ne(e){if(typeof e=="boolean")return;const t=e["x:ui"];if(!t||!t.visibleIf)return;const n=t.visibleIf;if(typeof n=="string"||typeof n=="object"&&n!==null)return n}function rt(e){if(e.startsWith("!"))return{field:e.slice(1),operator:"falsy"};if(e.includes("!=")){const[t,n]=e.split("!=",2);return{field:t.trim(),operator:"notEquals",value:ye(n.trim())}}if(e.includes("=")){const[t,n]=e.split("=",2);return{field:t.trim(),operator:"equals",value:ye(n.trim())}}return{field:e.trim(),operator:"truthy"}}function ye(e){if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.slice(1,-1);if(e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(e!=="undefined")return/^-?\d+(\.\d+)?$/.test(e)?parseFloat(e):e}function it(e,t){if(e==null||typeof e!="object")return;const n=t.split(".");let r=e;for(const i of n){if(r==null||typeof r!="object")return;if(Array.isArray(r)){const a=parseInt(i,10);if(!isNaN(a))r=r[a];else return}else r=r[i]}return r}function re(e,t){const n=it(t,e.field);switch(e.operator){case"equals":return n===e.value;case"notEquals":return n!==e.value;case"truthy":return!!n;case"falsy":return!n;case"contains":return typeof n=="string"&&typeof e.value=="string"||Array.isArray(n)?n.includes(e.value):!1;case"notContains":return typeof n=="string"&&typeof e.value=="string"||Array.isArray(n)?!n.includes(e.value):!0;case"greaterThan":return typeof n=="number"&&typeof e.value=="number"&&n>e.value;case"lessThan":return typeof n=="number"&&typeof e.value=="number"&&n<e.value;case"greaterThanOrEqual":return typeof n=="number"&&typeof e.value=="number"&&n>=e.value;case"lessThanOrEqual":return typeof n=="number"&&typeof e.value=="number"&&n<=e.value;case"in":return Array.isArray(e.values)&&e.values.includes(n);case"notIn":return!Array.isArray(e.values)||!e.values.includes(n);default:return!1}}function Pe(e,t){const n=e.conditions.map(r=>"operator"in r&&["and","or","not"].includes(r.operator)?Pe(r,t):re(r,t));switch(e.operator){case"and":return n.every(Boolean);case"or":return n.some(Boolean);case"not":return!n[0];default:return!1}}function at(e,t){try{if(typeof e=="string"){const n=rt(e);return re(n,t)}return"operator"in e&&["and","or","not"].includes(e.operator)?Pe(e,t):re(e,t)}catch(n){return console.warn("Error evaluating visibility condition:",n),!0}}function ot(e,t){return l.computedOf(t)(n=>at(e,n))}const ge={behavior:"hide",clearOnHide:!1};function st({ctx:e,controller:t,children:n,options:r=ge}){const i=Ne(e.definition);if(!i)return n;const a={...ge,...r},o=lt(t),s=ot(i,o);return a.clearOnHide&&s.on(u=>{!u&&t.signal.value!==void 0&&t.change(void 0)}),a.behavior==="unmount"?l.When(s,()=>n):n}function lt(e){return e.signal}function Ve({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const a=e.definition.enum??[],o=(e.isNullable||e.isOptional)&&!a.includes(null),s=!e.isNullable;return l.Use(_.BeatUII18n,u=>{const c=a.map(m=>({type:"value",value:m,label:String(m)}));o&&c.unshift({type:"value",value:null,label:l.Value.get(u.$.selectNone)});const y=o&&s?k.transformNullToUndefined(t):t;return k.NativeSelectControl({...$({ctx:e}),options:c,controller:y,equality:(m,f)=>m==null&&f==null?!0:m===f})})}function Ee({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition;return l.Fragment(l.WithElement(()=>{l.Value.get(t.signal)!==i.const&&t.change(i.const)}),k.Group(F.MutedLabel(e.widgetLabel,": "),F.Label(String(i.const))))}function Te(e,t,n){const{controller:r,effCtx:i,patternProps:a,apSchema:o,canRemove:s,lockKeyAfterSet:u,validatePropertyName:c}=n,y=r.field(e),m=l.prop(e),f=l.prop(null);let b=o;if(t){const w=Object.keys(a).find(h=>{try{return new RegExp(h).test(e)}catch{return!1}});if(w){const h=a[w];h!==!1&&typeof h=="object"&&(b=h)}}const S=w=>{const h=(w??"").trim();if(!h||h===e||Object.prototype.hasOwnProperty.call(l.Value.get(r.signal)??{},h))return;const g=c(h);if(!g.ok){f.set(g.message);return}f.set(null);const O={...l.Value.get(r.signal)??{}},C=O[e];delete O[e],O[h]=C,r.change(O)},d=l.Use(_.BeatUII18n,w=>v.CloseButton({size:"xs",label:w.$.removeItem,disabled:!s(Object.keys(l.Value.get(r.signal)??{}).length),onClick:()=>{const h=Object.keys(l.Value.get(r.signal)??{}).length;if(!s(h))return;const g={...l.Value.get(r.signal)??{}};delete g[e],r.change(g)}})),p=l.Value.map(y.signal,w=>u&&w!=null);return l.html.div(l.attr.class("bc-object-helpers__row"),l.style.gridTemplateColumns("2fr 3fr min-content"),v.InputWrapper({content:j.EditableText({value:m,onChange:S,disabled:l.computedOf(r.disabled,p)((w,h)=>w||h)}),error:l.Ensure(f,w=>l.html.div(l.attr.class("bc-object-helpers__error"),w)),description:Object.keys(a).length>0?l.html.div(l.attr.class("bc-object-helpers__description"),"Allowed patterns: ",Object.keys(a).join(", ")):null}),l.html.div(B({ctx:i.with({definition:b,suppressLabel:!0}).append(e),controller:y})),l.html.div(l.attr.class("bc-object-helpers__remove"),d))}function Fe(e,t,n){const{controller:r,effCtx:i,patternProps:a,apSchema:o,unevaluatedProps:s,canRemove:u,lockKeyAfterSet:c,validatePropertyName:y}=n,m=r.field(e),f=l.prop(e),b=l.prop(null);let S;if(s&&typeof s=="object")S=s;else if(t){const h=Object.keys(a).find(g=>{try{return new RegExp(g).test(e)}catch{return!1}});if(h){const g=a[h];g!==!1&&typeof g=="object"?S=g:S=o}else S=o}else S=o;const d=h=>{const g=(h??"").trim();if(!g||g===e||Object.prototype.hasOwnProperty.call(l.Value.get(r.signal)??{},g))return;const O=y(g);if(!O.ok){b.set(O.message);return}b.set(null);const C={...l.Value.get(r.signal)??{}},N=C[e];delete C[e],C[g]=N,r.change(C)},p=l.Use(_.BeatUII18n,h=>v.CloseButton({size:"xs",label:h.$.removeItem,disabled:!u(Object.keys(l.Value.get(r.signal)??{}).length),onClick:()=>{const g=Object.keys(l.Value.get(r.signal)??{}).length;if(!u(g))return;const O={...l.Value.get(r.signal)??{}};delete O[e],r.change(O)}})),w=l.Value.map(m.signal,h=>c&&h!=null);return l.html.div(l.attr.class("bc-object-helpers__row"),l.style.gridTemplateColumns("2fr 3fr min-content"),v.InputWrapper({content:j.EditableText({value:f,onChange:d,disabled:l.computedOf(r.disabled,w)((h,g)=>h||g)}),error:l.Ensure(b,h=>l.html.div(l.attr.class("bc-object-helpers__error"),h)),description:l.html.div(l.attr.class("bc-object-helpers__description"),s===!1?"Unevaluated property (not allowed by schema)":"Unevaluated property",Object.keys(a).length>0?l.html.span(" • Allowed patterns: ",Object.keys(a).join(", ")):null)}),l.html.div(B({ctx:i.with({definition:S,suppressLabel:!0}).append(e),controller:m})),l.html.div(l.attr.class("bc-object-helpers__remove"),p))}function We(e){const t=e.properties??{},n=new Set(Object.keys(t)),r=e.additionalProperties??!0,i=r!==!1,a=r===!0||r===void 0?{}:r,o=e.minProperties??0,s=e.maxProperties??1/0,u=e.unevaluatedProperties;let c=!0,y=null;u===!1?(c=!1,y="No unevaluated properties are allowed by schema"):u&&typeof u=="object"&&(c=!0);const m=e.patternProperties??{},f=Object.keys(m).filter(Boolean).map(p=>{try{return new RegExp(p)}catch{return null}}).filter(p=>p!=null),b=e.propertyNames,S=e["x:ui"],d=!!(S&&typeof S=="object"&&S.lockKeyAfterSet);return{knownProps:t,knownKeys:n,ap:r,apAllowed:i,apSchema:a,minProps:o,maxProps:s,unevaluatedProps:u,canAddUnevaluated:c,unevaluatedTooltip:y,patternProps:m,patternList:f,propertyNamesDef:b,lockKeyAfterSet:d}}function Re(e,t){const{knownKeys:n,apAllowed:r,patternList:i,patternProps:a,propertyNamesDef:o}=e;return s=>{const u=(s??"").trim();if(u==="")return{ok:!1,message:"Key cannot be empty"};if(o===!1)return{ok:!1,message:"No property names are allowed by schema"};if(o&&typeof o=="object"&&t)try{const c=t.compile(o);if(!c(u))return{ok:!1,message:c.errors?.[0]?.message??"Invalid property name"}}catch{}if(!r&&!n.has(u)){if(i.length===0)return{ok:!1,message:"Only declared properties are allowed"};if(!i.some(y=>y.test(u)))return{ok:!1,message:`Key must match one of: ${Object.keys(a).join(", ")}`}}return{ok:!0}}}function Me(e){const{minProps:t,apSchema:n,unevaluatedProps:r}=e;return{canRemove:s=>s>t,makeDefaultFor:s=>{const u=G(s,y=>y);if(u!==void 0)return u;const c=s.type;if(c==="string")return"";if(c==="number"||c==="integer")return 0;if(c==="boolean")return!1;if(c==="array")return[];if(c==="object")return{}},getValueSchemaForNew:()=>r&&typeof r=="object"?r:n}}function ut({ctx:e,controller:t,config:n,effective:r}){const i=W.objectEntries(n.knownProps).filter(([,s])=>s!==!1),a=i.map(([s])=>s);return{children:i.map(([s,u])=>{const c=s,y=t.field(c);return B({ctx:e.with({definition:u,isPropertyRequired:Array.isArray(r.required)?r.required.includes(c):e.hasRequiredProperty(c),suppressLabel:!1}).append(c),controller:y})}),names:a}}function ct({controller:e,config:t,validatePropertyName:n,helpers:r}){if(!t.apAllowed)return null;const i=(a,o)=>{const s=a,u=y=>o.has(y)?!1:n(y).ok;if(u(s))return s;let c=1;for(;o.has(s+c)||!u(s+c);)c++;return s+c};return l.Use(_.BeatUII18n,a=>we.Button({variant:"outline",disabled:l.Value.map(e.signal,o=>!t.canAddUnevaluated||Object.keys(o??{}).length>=t.maxProps),onClick:()=>{const o=l.Value.get(e.signal)??{},s=Object.keys(o);if(!t.canAddUnevaluated||s.length>=t.maxProps)return;const u=new Set(s),c=i("property",u);if(!n(c).ok)return;const m=r.getValueSchemaForNew(),f=r.makeDefaultFor(m),b={...o,[c]:f};e.change(b)}},l.attr.title(t.unevaluatedTooltip),a.$.addLabel))}function Le({ctx:e,containerLayout:t,content:n}){return!e.suppressLabel&&e.name!=null&&(!t||!["fieldset","group"].includes(t.format||""))?v.InputWrapper({...$({ctx:e}),content:n}):n}function ft({ctx:e,controller:t,baseDef:n}){const r=We(n),i=Re(r,e.ajv),a=Me(r),{children:o,names:s}=ut({ctx:e,controller:t,config:r,effective:n}),u=l.MapSignal(t.signal,b=>{const d=Object.keys(b??{}).filter(g=>!r.knownKeys.has(g));if(d.length===0)return l.Empty;const p=J(n,b??{},e.ajv),w=d.filter(g=>!p.has(g)),h=d.filter(g=>p.has(g));return l.Fragment(...h.map(g=>{const O=r.patternList.some(C=>C.test(g));return Te(g,O,{controller:t,effCtx:e,patternProps:r.patternProps,apSchema:r.apSchema,canRemove:a.canRemove,lockKeyAfterSet:r.lockKeyAfterSet,validatePropertyName:i})}),...w.map(g=>{const O=r.patternList.some(C=>C.test(g));return Fe(g,O,{controller:t,effCtx:e,patternProps:r.patternProps,apSchema:r.apSchema,unevaluatedProps:r.unevaluatedProps,canRemove:a.canRemove,lockKeyAfterSet:r.lockKeyAfterSet,validatePropertyName:i})}))}),c=ct({controller:t,config:r,validatePropertyName:i,helpers:a}),y=A.getContainerLayout(e),m=[...o,u,c].filter(Boolean),f=A.applyContainerLayout(y,e,m,s);return Le({ctx:e,containerLayout:y,content:f})}function dt({ctx:e,controller:t,baseDef:n}){return l.MapSignal(t.signal,r=>{const{effective:i,conflicts:a}=Ae(n,r,e.ajv,e.path),o=e.with({definition:i,schemaConflicts:[...e.schemaConflicts,...a]}),s=We(i),u=Re(s,e.ajv),c=Me(s),y=Object.keys(r??{}),m=y.filter(I=>!s.knownKeys.has(I)),f=J(i,r??{},e.ajv),b=m.filter(I=>!f.has(I)),S=m.filter(I=>f.has(I)),d=s.apAllowed&&s.canAddUnevaluated&&y.length<s.maxProps,p=(I,M)=>{const P=I,D=z=>M.has(z)?!1:u(z).ok;if(D(P))return P;let x=1;for(;M.has(P+x)||!D(P+x);)x++;return P+x},w=l.Use(_.BeatUII18n,I=>we.Button({variant:"outline",disabled:!d,onClick:()=>{if(!d)return;const M=new Set(Object.keys(l.Value.get(t.signal)??{})),P=p("property",M);if(!u(P).ok)return;const x=c.getValueSchemaForNew(),z=c.makeDefaultFor(x),Z={...l.Value.get(t.signal)??{},[P]:z};t.change(Z)}},l.attr.title(s.unevaluatedTooltip),I.$.addLabel)),h=A.getContainerLayout(o),g=W.objectEntries(s.knownProps).filter(([,I])=>I!==!1),C=[...g.map(([I])=>I),...S,...b],N=[...g.map(([I,M])=>{const P=I,D=t.field(P);return B({ctx:o.with({definition:M,isPropertyRequired:Array.isArray(i.required)?i.required.includes(P):o.hasRequiredProperty(P),suppressLabel:!1}).append(P),controller:D})}),...S.map(I=>{const M=s.patternList.some(P=>P.test(I));return Te(I,M,{controller:t,effCtx:o,patternProps:s.patternProps,apSchema:s.apSchema,canRemove:c.canRemove,lockKeyAfterSet:s.lockKeyAfterSet,validatePropertyName:u})}),...b.map(I=>{const M=s.patternList.some(P=>P.test(I));return Fe(I,M,{controller:t,effCtx:o,patternProps:s.patternProps,apSchema:s.apSchema,unevaluatedProps:s.unevaluatedProps,canRemove:c.canRemove,lockKeyAfterSet:s.lockKeyAfterSet,validatePropertyName:u})}),s.apAllowed?w:null].filter(Boolean),K=A.applyContainerLayout(h,o,N,C);return Le({ctx:o,containerLayout:h,content:K})})}function ue({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition;return Oe(i)?dt({ctx:e,controller:t,baseDef:i}):ft({ctx:e,controller:t,baseDef:i})}function pt(e){if(typeof e=="boolean")return{discriminator:null,type:null};if(e.discriminator&&typeof e.discriminator=="object"){const n=e.discriminator;if(typeof n.propertyName=="string")return{discriminator:{propertyName:n.propertyName,mapping:n.mapping||{}},type:"openapi"}}const t=e["x:ui"];return t?.discriminatorKey&&typeof t.discriminatorKey=="string"?{discriminator:{key:t.discriminatorKey,mapping:t.discriminatorMapping||{}},type:"beatui"}:{discriminator:null,type:null}}function mt(e,t,n){if(!t.discriminator||!n||typeof n!="object")return null;const{discriminator:r,type:i}=t;if(i==="openapi"){const a=r,o=n[a.propertyName];if(o==null)return null;if(a.mapping&&a.mapping[o]){const s=a.mapping[o];return yt(e,s)}return he(e,a.propertyName,o)}if(i==="beatui"){const a=r,o=n[a.key];if(o==null)return null;if(a.mapping&&a.mapping[o]!=null){const s=a.mapping[o];return s>=0&&s<e.length?s:null}return he(e,a.key,o)}return null}function yt(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(typeof r=="object"&&r.$ref===t)return n}return null}function he(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if(typeof i!="object")continue;const a=i.properties;if(a&&a[t]){const o=a[t];if(typeof o=="object"&&o.const===n||typeof o=="object"&&Array.isArray(o.enum)&&o.enum.length===1&&o.enum[0]===n)return r}if(i.const===n)return r}return null}function Ue({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition.anyOf;return Be({ctx:e,controller:t,kind:"anyOf",variants:i})}function $e({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition.oneOf;return Be({ctx:e,controller:t,kind:"oneOf",variants:i})}function gt({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const a=e.definition.allOf.filter(c=>typeof c=="object").map(c=>A.resolveAnyRef(c,e.schema,e.ajv)),{mergedSchema:o,conflicts:s}=A.mergeAllOf(a,e.path),u=e.with({definition:o,schemaConflicts:[...e.schemaConflicts,...s]});return B({ctx:u,controller:t})}function Be({ctx:e,controller:t,kind:n,variants:r}){const i=r.map((d,p)=>A.getOneOfBranchLabel(d,p,`${n} ${p+1}`)),a=typeof e.definition=="boolean"?{discriminator:null,type:null}:pt(e.definition),o=l.computedOf(t.signal,e.ajv)((d,p)=>{if(n==="oneOf"){if(a.discriminator){const w=mt(r,a,d);if(w!==null)return w}return A.autoSelectOneOfBranch(e,d,p)}return A.autoSelectOneOfBranch(e,d,p)}),s=l.Value.get(o),u=l.prop(s>=0?s:0);t.onDispose(()=>u.dispose());let c=!1;const y=o.on(d=>{!c&&d>=0&&u.set(d)});t.onDispose(y);const m=r.length,f=d=>{c=!0,u.set(d)},b=m>1?ke({options:r.map((d,p)=>({value:p,label:i[p]})),selected:u,onChange:f}):"",S=l.MapSignal(u,d=>B({ctx:e.with({definition:r[l.Value.get(d)],suppressLabel:!e.isRoot}),controller:t}));return Ie({ctx:e,showSelector:m>1,selector:b,inner:S})}function B({ctx:e,controller:t}){const n=typeof e.definition=="boolean"?{}:e.definition;let r=n?.$ref?A.resolveRef(n,e.schema):n,i=e.with({definition:r});if(r?.allOf!=null){const o=r.allOf.filter(s=>typeof s=="object"&&s!==null);if(o.length>0){const s=o.map(f=>A.resolveAnyRef(f,e.schema,e.ajv)),{mergedSchema:u,conflicts:c}=A.mergeAllOf(s,e.path),{allOf:y,...m}=r;r={...m,...u},i=e.with({definition:r,schemaConflicts:[...e.schemaConflicts,...c]})}}let a=[...i.notViolations];if(r?.not!=null&&typeof r.not=="object"){const o=l.Value.get(t.signal),s=Ce(r.not,o,i.ajv,i.path);s&&(a=[...a,s],i=i.with({notViolations:a}))}if(r==null)return E(i,t,V(i,Y({ctx:i,controller:t}),t));if(r.enum!=null)return E(i,t,V(i,Ve({ctx:i,controller:t}),t));if(r.const!=null)return E(i,t,V(i,Ee({ctx:i,controller:t}),t));if(r.anyOf!=null)return E(i,t,V(i,Ue({ctx:i,controller:t}),t));if(r.oneOf!=null)return E(i,t,V(i,$e({ctx:i,controller:t}),t));if(r?.type==null)return V(i,Y({ctx:i,controller:t}),t);if(Array.isArray(r.type)){const s=r.type.filter(u=>u!=="null");if(s.length===1&&["string","number","integer","boolean"].includes(s[0]))switch(s[0]){case"number":return V(i,X({ctx:i,controller:t}),t);case"integer":return V(i,te({ctx:i,controller:t}),t);case"string":return V(i,ee({ctx:i,controller:t}),t);case"boolean":return V(i,ne({ctx:i,controller:t}),t)}return E(i,t,V(i,fe({ctx:i,controller:t}),t))}switch(r.type){case"number":return E(i,t,V(i,X({ctx:i,controller:t}),t));case"integer":return E(i,t,V(i,te({ctx:i,controller:t}),t));case"string":return E(i,t,V(i,ee({ctx:i,controller:t}),t));case"boolean":return E(i,t,V(i,ne({ctx:i,controller:t}),t));case"array":return E(i,t,V(i,ce({ctx:i,controller:t instanceof v.ArrayController?t:t.array()}),t));case"object":{const o=ue({ctx:i,controller:t instanceof v.ObjectController?t:t.object()});return i.isRoot?E(i,t,V(i,o,t)):E(i,t,V(i,l.html.div(l.attr.class("bc-json-schema-object"),o),t))}case"null":return E(i,t,V(i,le({ctx:i,controller:t}),t));default:return console.warn("Unknown type",r.type),E(i,t,V(i,l.html.div(l.attr.class("bc-json-schema-unknown"),"Unknown"),t))}}function xe({schema:e,controller:t,ajv:n,widgetRegistry:r,setStatus:i,formValue:a,validationMode:o,submitting:s}){const u=new A.SchemaContext({schema:e,definition:e,horizontal:!1,isPropertyRequired:!1,path:[],ajv:n,widgetRegistry:r,setStatus:i,formValue:a,validationMode:o,submitting:s});return e===!0?Y({ctx:u,controller:t}):e===!1?l.Empty:B({ctx:u,controller:t})}function E(e,t,n){return Ne(e.definition)?st({ctx:e,controller:t,children:n,options:{behavior:"hide",clearOnHide:!1}}):n}function ht(e){return e.prefixItems!=null?{isTuple:!0,prefixItems:e.prefixItems,additionalItemsSchema:Array.isArray(e.items)?!0:e.items??!0,tupleLabels:be(e)}:Array.isArray(e.items)?{isTuple:!0,prefixItems:e.items,additionalItemsSchema:e.additionalItems??!0,tupleLabels:be(e)}:{isTuple:!1,prefixItems:[],additionalItemsSchema:e.items??!0}}function be(e){if(typeof e=="boolean")return;const t=e["x:ui"];return Array.isArray(t?.tupleLabels)?t.tupleLabels:void 0}function ce({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition,a=ht(i),o=l.computedOf(t.signal)(f=>{const b=f?.length??0;return!(i.maxItems!=null&&b>=i.maxItems||a.isTuple&&b>=a.prefixItems.length&&a.additionalItemsSchema===!1)}),s=l.computedOf(t.signal)(f=>{const b=f?.length??0;return i.minItems==null||b>i.minItems}),u=l.computedOf(t.signal)(f=>{if(!i.uniqueItems||!f)return new Set;const b=new Map,S=new Set;for(let d=0;d<f.length;d++){const p=JSON.stringify(f[d]);b.has(p)?(S.add(b.get(p)),S.add(d)):b.set(p,d)}return S}),c=l.computedOf(t.signal)(f=>{if(!i.contains||!f)return{matchingIndices:new Set,count:0,isValid:!0};const b=new Set;let S=0;if(e.ajv)try{const h=e.ajv.compile(i.contains);for(let g=0;g<f.length;g++)h(f[g])&&(b.add(g),S++)}catch{}else{const h=i.contains,g=O=>{if(typeof h=="boolean")return h;if(typeof h!="object"||h==null)return!1;const C=h,N=C.type;if(N==="integer"||N==="number")return!(typeof O!="number"||!Number.isFinite(O)||N==="integer"&&!Number.isInteger(O)||typeof C.minimum=="number"&&O<C.minimum||typeof C.exclusiveMinimum=="number"&&O<=C.exclusiveMinimum||typeof C.maximum=="number"&&O>C.maximum||typeof C.exclusiveMaximum=="number"&&O>=C.exclusiveMaximum||typeof C.multipleOf=="number"&&O%C.multipleOf!==0);if(N==="string"){if(typeof O!="string"||typeof C.minLength=="number"&&O.length<C.minLength||typeof C.maxLength=="number"&&O.length>C.maxLength)return!1;if(typeof C.pattern=="string")try{if(!new RegExp(C.pattern).test(O))return!1}catch{}return!0}return!1};for(let O=0;O<f.length;O++)g(f[O])&&(b.add(O),S++)}const d=i.minContains??(i.contains?1:0),p=i.maxContains,w=S>=d&&(p==null||S<=p);return{matchingIndices:b,count:S,isValid:w,minContains:d,maxContains:p}}),y=i.contains?c.map(f=>{const b=typeof i.contains=="object"&&i.contains.title?i.contains.title:"required pattern";if(!f.isValid){if(f.count<(f.minContains??0))return`Must contain at least ${f.minContains??0} item(s) matching ${b} (currently ${f.count})`;if(f.maxContains!=null&&f.count>f.maxContains)return`Must contain at most ${f.maxContains} item(s) matching ${b} (currently ${f.count})`}return`Contains ${f.count} item(s) matching ${b}`}):null,m=k.ListControl({...$({ctx:e}),createItem:()=>{const f=t.signal.value?.length??0;if(a.isTuple&&f<a.prefixItems.length){const b=a.prefixItems[f];return G(b,()=>{})}else return G(a.additionalItemsSchema,()=>{})},controller:t,showAdd:!0,addDisabled:l.computedOf(o)(f=>!f),showRemove:!0,removeDisabled:l.computedOf(s)(f=>!f),element:f=>{const b=f.item,S=f.position.index;let d,p;a.isTuple&&S<a.prefixItems.length?(d=a.prefixItems[S],a.tupleLabels?.[S]?p=a.tupleLabels[S]:typeof d=="object"&&d.title?p=d.title:p=`Item ${S+1}`):(d=a.additionalItemsSchema,a.isTuple&&(p=`Additional Item ${S-a.prefixItems.length+1}`));const w=B({ctx:e.with({definition:d}).append(S),controller:b}),h=u.map(N=>N.has(S)),g=c.map(N=>N.matchingIndices.has(S));let O=w;p&&a.isTuple&&(O=F.Stack(l.attr.class("bc-stack--gap-1"),F.Label(l.attr.class("bc-array-control__item-label"),p),O));const C=[];return i.uniqueItems&&C.push(l.When(h,()=>F.Label(l.attr.class("bc-array-control__indicator bc-array-control__indicator--error"),"⚠️ Duplicate value"))),i.contains&&C.push(l.When(g,()=>F.Label(l.attr.class("bc-array-control__indicator bc-array-control__indicator--success"),"✓ Matches required pattern"))),C.length>0?F.Stack(l.attr.class("bc-stack--gap-1"),O,...C):O}});return i.contains&&y?F.Stack(l.attr.class("bc-stack--gap-2"),m,l.MapSignal(l.computedOf(c,y)((f,b)=>({info:f,summary:b})),({info:f,summary:b})=>F.Label(l.attr.class(f.isValid?"bc-array-control__summary bc-array-control__summary--success":"bc-array-control__summary bc-array-control__summary--error"),b))):m}function bt(e){return e.map(t=>({key:t,label:W.upperCaseFirst(t),detect:n=>Ke(n,[t])===t,convert:n=>ze(n,t),defaultValue:()=>He(t)}))}function fe({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition;let a=i.type??[];const o=Ge(i),s=a.includes("null"),u=a.filter(d=>d!=="null"&&(d==="string"||d==="number"||d==="integer"||d==="boolean")),c=s&&u.length===a.length-1;c&&(a=u);const y=bt(a),m=new k.UnionController(t.path,t.change,t.signal,t.status,{disabled:t.disabled},y);t.onDispose(()=>m.dispose());const f=d=>ke({options:a.map(p=>({value:p,label:W.upperCaseFirst(p)})),selected:m.activeBranch,onChange:d,mode:o.selector??"auto"}),b=d=>{m.switchToBranch(d,o.confirmBranchChange)},S=l.MapSignal(m.activeBranch,d=>{const p=l.Value.get(d),w=m.getBranchController(p);if(c&&(p==="number"||p==="integer")){const g=i;return v.Control(k.NullableNumberInput,{...$({ctx:e.with({suppressLabel:!e.isRoot})}),controller:w,min:g.minimum,max:g.maximum,step:p==="integer"?je(g.multipleOf):g.multipleOf})}const h=e.with({definition:{...i,type:p},suppressLabel:!e.isRoot});switch(p){case"string":return ee({ctx:h,controller:w});case"number":return X({ctx:h,controller:w});case"integer":return te({ctx:h,controller:w});case"boolean":return ne({ctx:h,controller:w});case"null":return le({ctx:h,controller:w});case"array":{const g=w.array();return ce({ctx:h,controller:g})}case"object":{const g=w.object();return ue({ctx:h,controller:g})}default:return v.Control(k.NullableNumberInput,{...$({ctx:h}),controller:w})}});return Ie({ctx:e,showSelector:a.length>1,selector:f(b),inner:S})}function Y({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});return r||(e.definition===!0?Y({ctx:e.with({definition:{type:["string","number","object","array","boolean","null"]}}),controller:t}):fe({ctx:e.with({definition:{...e.definition,type:["string","number","object","array","boolean","null"]}}),controller:t}))}function vt(e){if(typeof e=="boolean")return[];const t=e["x:ui"];return!t||!Array.isArray(t.crossField)?[]:t.crossField.filter(n=>typeof n=="object"&&n!=null&&typeof n.id=="string"&&Array.isArray(n.fields)&&typeof n.validate=="function")}function St(e,t,n=!1){const r=[],i=[...t].sort((a,o)=>(o.priority||0)-(a.priority||0));for(const a of i)if(!(a.onSubmitOnly&&!n))try{const o={};for(const u of a.fields)o[u]=wt(e,u);const s=a.validate(o,e);if(!s.valid){const u=a.targets||a.fields;if(s.fieldErrors)for(const[c,y]of Object.entries(s.fieldErrors))r.push({instancePath:`/${c}`,schemaPath:`#/x:ui/crossField/${a.id}`,keyword:"crossField",params:{ruleId:a.id,fields:a.fields,context:s.context},message:y});else{const c=s.message||a.message||"Cross-field validation failed";for(const y of u)r.push({instancePath:`/${y}`,schemaPath:`#/x:ui/crossField/${a.id}`,keyword:"crossField",params:{ruleId:a.id,fields:a.fields,context:s.context},message:c})}}}catch(o){console.warn(`Error in cross-field validation rule ${a.id}:`,o);const s=a.targets?.[0]||a.fields[0];r.push({instancePath:`/${s}`,schemaPath:`#/x:ui/crossField/${a.id}`,keyword:"crossField",params:{ruleId:a.id,fields:a.fields},message:"Cross-field validation error"})}return r.length>0?A.ajvErrorsToControllerValidation(r):W.Validation.valid}function wt(e,t){if(e==null||typeof e!="object")return;const n=t.split(".");let r=e;for(const i of n){if(r==null||typeof r!="object")return;if(Array.isArray(r)){const a=parseInt(i,10);if(!isNaN(a))r=r[a];else return}else r=r[i]}return r}function Ot(e){if(typeof e=="boolean")return;const t=e["x:ui"];if(!t)return;const n={};Array.isArray(t.when)&&(n.when=t.when.filter(i=>typeof i=="object"&&i!=null&&"watch"in i&&"condition"in i)),Array.isArray(t.crossField)&&(n.crossField=t.crossField.filter(i=>typeof i=="object"&&i!=null&&Array.isArray(i.fields)&&typeof i.validate=="function"));const r=vt(e);return r.length>0&&(n.crossFieldRules=r),Array.isArray(t.async)&&(n.async=t.async.filter(i=>typeof i=="object"&&i!=null&&typeof i.validate=="function")),Object.keys(n).length>0?n:void 0}function ie(e,t){if(!e.startsWith("$."))throw new Error(`Invalid JSONPath: ${e}. Must start with '$.'.`);const n=e.slice(2).split(/[.[\]]/).filter(Boolean);let r=t;for(const i of n){if(r==null)return;if(typeof r=="object"&&!Array.isArray(r))r=r[i];else if(Array.isArray(r)){const a=parseInt(i,10);if(!isNaN(a))r=r[a];else return}else return}return r}function Ct(e,t){try{if(typeof e.condition=="function"){const r=(Array.isArray(e.watch)?e.watch:[e.watch]).map(i=>ie(i,t));return e.condition(r.length===1?r[0]:r,t)}return typeof e.condition=="string"?!!ie(e.condition,t):!1}catch(n){return console.warn("Error evaluating conditional validation:",n),!1}}function At(e,t,n,r){const i=[];if(r&&!r(e)&&r.errors&&i.push(...r.errors),n.when){for(const a of n.when)if(Ct(a,t)?a.then:a.else,a.validate)try{const s=a.validate(e,t);s&&i.push({instancePath:"",schemaPath:"#/x:ui/when",keyword:"conditional",params:{},message:s})}catch(s){console.warn("Error in conditional validation:",s)}}if(n.crossField)for(const a of n.crossField)try{const o={};for(const u of a.fields)o[u]=ie(`$.${u}`,t);const s=a.validate(o,t);if(s){const u=a.target||a.fields[0];i.push({instancePath:`/${u}`,schemaPath:"#/x:ui/crossField",keyword:"crossField",params:{fields:a.fields},message:a.message||s})}}catch(o){console.warn("Error in cross-field validation:",o)}if(n.crossFieldRules&&n.crossFieldRules.length>0){const a=St(t,n.crossFieldRules);if(a.type==="invalid"){const o=jt(a);i.push(...o)}}return i.length>0?A.ajvErrorsToControllerValidation(i):W.Validation.valid}function jt(e){if(e.type==="valid")return[];const t=[];function n(r,i=""){if(r.message&&t.push({instancePath:i,schemaPath:"#/crossField",keyword:"crossField",params:{},message:r.message}),r.dependencies)for(const[a,o]of Object.entries(r.dependencies)){const s=i?`${i}/${a}`:`/${a}`;n(o,s)}}return n(e.error),t}function kt(e,t){const n=new Set;if(e.when)for(const r of e.when)(Array.isArray(r.watch)?r.watch:[r.watch]).forEach(a=>n.add(a));if(e.crossField)for(const r of e.crossField)r.fields.forEach(i=>n.add(i));return{watchedPaths:Array.from(n),shouldRevalidate:r=>Array.from(n).some(i=>r.startsWith(i)||i.startsWith(r))}}function It(e){if(typeof e=="boolean")return[];const t=e["x:ui"];return!t||!Array.isArray(t.async)?[]:t.async.filter(n=>typeof n=="object"&&n!=null&&typeof n.id=="string"&&typeof n.field=="string"&&typeof n.validate=="function")}class Nt{timeouts=new Map;validationStates=new Map;abortControllers=new Map;getValidationState(t){return this.validationStates.has(t)||this.validationStates.set(t,l.prop({isValidating:!1,result:W.Validation.valid,lastValidatedValue:void 0,lastValidatedAt:0})),this.validationStates.get(t)}async validateField(t,n,r,i=!1){const a=`${t.field}_${t.id}`,o=this.getValidationState(a),s=this.timeouts.get(a);s!==void 0&&clearTimeout(s);const u=this.abortControllers.get(a);if(u&&u.abort(),!i&&o.value.lastValidatedValue===n)return;if(t.minLength&&typeof n=="string"&&n.length<t.minLength){o.set({...o.value,result:W.Validation.valid,isValidating:!1});return}const c=setTimeout(async()=>{const y=new AbortController;this.abortControllers.set(a,y),o.set({...o.value,isValidating:!0,result:t.loadingMessage?W.Validation.invalid({message:t.loadingMessage}):o.value.result});try{const m=await t.validate(n,r);if(y.signal.aborted)return;const f=m.valid?W.Validation.valid:W.Validation.invalid({message:m.message||"Async validation failed",context:m.context});o.set({isValidating:!1,result:f,lastValidatedValue:n,lastValidatedAt:Date.now()})}catch(m){if(y.signal.aborted)return;const f=m instanceof Error?m.message:"Async validation error";o.set({isValidating:!1,result:W.Validation.invalid({message:f}),lastValidatedValue:n,lastValidatedAt:Date.now()})}finally{this.abortControllers.delete(a),this.timeouts.delete(a)}},i?0:t.debounce||300);this.timeouts.set(a,c)}cancelAll(){for(const t of this.timeouts.values())clearTimeout(t);this.timeouts.clear();for(const t of this.abortControllers.values())t.abort();this.abortControllers.clear()}getAllValidationResults(){const t={};for(const[n,r]of this.validationStates.entries()){const i=r.value;!i.isValidating&&i.result.type==="invalid"&&(t[n]=i.result)}return t}isValidating(){for(const t of this.validationStates.values())if(t.value.isValidating)return!0;return!1}dispose(){this.cancelAll();for(const t of this.validationStates.values())t.dispose();this.validationStates.clear()}}function q(e){if(typeof e!="boolean")return Pt(e)}function Pt(e){if(e.default!==void 0)return e.default;if(Array.isArray(e.examples)&&e.examples.length>0)return e.examples[0];if(e.const!==void 0)return e.const;if(Array.isArray(e.enum)&&e.enum.length>0)return e.enum[0];if(Mt(e))return null;if(e.allOf&&Array.isArray(e.allOf))return Vt(e.allOf);const t=e.oneOf??e.anyOf;if(t&&Array.isArray(t))for(const n of t){const r=q(n);if(r!==void 0)return r}return Et(e)}function Vt(e){const t={};let n=!1;for(const r of e){const i=q(r);i!==void 0&&typeof i=="object"&&i!==null&&(Object.assign(t,i),n=!0)}return n?t:void 0}function Et(e){switch(Lt(e)){case"object":return Tt(e);case"array":return Ft(e);case"string":return Wt(e);case"number":case"integer":return Rt(e);case"boolean":return!1;case"null":return null;default:return}}function Tt(e){if(!e.properties)return{};const t=new Set(e.required??[]),n={};let r=!1;for(const[i,a]of Object.entries(e.properties)){if(!t.has(i)||typeof a=="boolean")continue;const o=q(a);o!==void 0&&(n[i]=o,r=!0)}return r?n:{}}function Ft(e){const t=e.minItems??0;if(t===0)return[];const n=e.items;if(!n||typeof n=="boolean")return Array(t).fill(null);if(Array.isArray(n))return n.slice(0,t).map(i=>q(i)??null);const r=q(n);return Array(t).fill(r??null)}function Wt(e){switch(e.format){case"date":return Ut();case"date-time":return $t();case"time":return"00:00:00";default:return""}}function Rt(e){const t=e.type==="integer";let n=e.minimum,r=e.maximum;if(e.exclusiveMinimum!==void 0){const o=typeof e.exclusiveMinimum=="number"?e.exclusiveMinimum:e.exclusiveMinimum?n??0:void 0;o!==void 0&&(n=t?o+1:o+ve(e))}if(e.exclusiveMaximum!==void 0){const o=typeof e.exclusiveMaximum=="number"?e.exclusiveMaximum:e.exclusiveMaximum?r??0:void 0;o!==void 0&&(r=t?o-1:o-ve(e))}let i;n!==void 0&&r!==void 0?i=(n+r)/2:n!==void 0?i=n:r!==void 0?i=0<=r?0:r:i=0;const a=e.multipleOf;return a!==void 0&&a>0&&(i=Math.round(i/a)*a,n!==void 0&&i<n&&(i=Math.ceil(n/a)*a),r!==void 0&&i>r&&(i=Math.floor(r/a)*a)),t&&(i=Math.round(i)),i}function ve(e){return e.multipleOf!==void 0?e.multipleOf:.001}function Mt(e){return Array.isArray(e.type)?e.type.includes("null"):!1}function Lt(e){if(typeof e.type=="string")return e.type;if(Array.isArray(e.type))return e.type.find(t=>t!=="null");if(e.properties!==void 0)return"object";if(e.items!==void 0)return"array"}function Ut(){return new Date().toISOString().split("T")[0]}function $t(){return new Date().toISOString()}function Bt(e){const t=globalThis.structuredClone;return typeof t=="function"?t(e):JSON.parse(JSON.stringify(e))}function xt(e,t){try{return JSON.stringify(e)===JSON.stringify(t)}catch{return e===t}}function Dt(e){const t=new j.WidgetRegistry;for(let n=0;n<e.length;n++){const r=e[n],i=r.displayName??`custom-widget-${n}`;t.register(i,{factory:r.factory,displayName:r.displayName??`Custom Widget ${n+1}`,description:r.description,supportedTypes:r.supportedTypes,priority:r.priority??50,canFallback:!0,matcher:r.matcher})}return t}function Jt({schema:e,initialValue:t,externalSchemas:n,refResolver:r,sanitizeAdditional:i,validationMode:a,validateDebounceMs:o,customWidgets:s,applySchemaDefaults:u=!0,submitting:c},y){const m=t!==void 0?l.Value.get(t):void 0,f=q(e);let b;return t===void 0?b=f??{}:u?b=k.deepMergeDefaults(f,m):b=m,l.Async(A.getAjvForSchema(e,{externalSchemas:n,refResolver:r,sanitizeAdditional:i}),S=>{if(S.ok){const{ajv:d,validate:p}=S.value,w=Ot(e),h=It(e),g=h.length>0?new Nt:null,O=a??"onTouched",C=L=>{const U=p(L);let H;return U?H=W.Validation.valid:H=A.ajvErrorsToControllerValidation(p.errors??[]),w?At(L,L,w,p):H},{controller:N,setStatus:K}=v.useController({initialValue:b,validationMode:O,validateDebounceMs:o,validate:O==="onSubmit"?void 0:C}),I=w?kt(w):null,M=i!==!1;let P=!1;const D=M?N.signal.on(L=>{if(P)return;const U=Bt(L);p(U)&&!xt(U,L)&&(P=!0,N.change(U),P=!1)}):()=>{},x=I?N.signal.on((L,U)=>{U!=null&&JSON.stringify(L)!==JSON.stringify(U)&&setTimeout(()=>{const qe=N.status.value;K(qe)},10)}):()=>{},z=g&&h.length>0?N.signal.on(L=>{for(const U of h)g.validateField(U,L,L)}):()=>{},Z=()=>{D(),x(),z(),g?.dispose(),N.dispose()},De=s?Dt(s):void 0,Je=l.Fragment(l.OnDispose(Z),xe({schema:e,controller:N,ajv:d,widgetRegistry:De,setStatus:K,formValue:N.signal,validationMode:O,submitting:c}));return y({Form:Je,controller:N,setStatus:K})}return l.html.div(l.attr.class("bc-json-schema-form__error"),S.error)})}function qt(e,t){const r=(t?.ajv??new _e({allErrors:!0})).compile(e);return{"~standard":{version:1,vendor:"ajv",validate:i=>r(i)?{value:i}:{issues:_t(r.errors??[])},types:void 0}}}function _t(e){return e.map(t=>({message:Kt(t),path:zt(t)}))}function Kt(e){return e.message??`${e.keyword} validation failed`}function zt(e){const t=Ht(e.instancePath||"");if(e.keyword==="required"){const n=e.params.missingProperty;if(n!=null)return[...t,n]}if(e.keyword==="additionalProperties"){const n=e.params.additionalProperty;if(n!=null)return[...t,n]}if(e.keyword==="unevaluatedProperties"){const n=e.params.unevaluatedProperty;if(n!=null)return[...t,n]}return t.length>0?t:void 0}function Ht(e){return e?e.split("/").slice(1).map(n=>n.replace(/~1/g,"/").replace(/~0/g,"~")).map(n=>Gt(n)?Number(n):n):[]}function Gt(e){return/^\d+$/.test(e)}exports.SchemaContext=A.SchemaContext;exports.ajvErrorsToControllerValidation=A.ajvErrorsToControllerValidation;exports.ajvErrorsToDependencies=A.ajvErrorsToDependencies;exports.buildMessage=A.buildMessage;exports.buildPath=A.buildPath;exports.clearCaches=A.clearCaches;exports.clearCachesForAjv=A.clearCachesForAjv;exports.compileWithCache=A.compileWithCache;exports.getAjvForSchema=A.getAjvForSchema;exports.getCacheStats=A.getCacheStats;exports.jsonPointerToSegments=A.jsonPointerToSegments;exports.mergeAllOf=A.mergeAllOf;exports.createDiagnosticWidget=j.createDiagnosticWidget;exports.forFormat=j.forFormat;exports.forTypeAndFormat=j.forTypeAndFormat;exports.forXUI=j.forXUI;exports.JSONSchemaAllOf=gt;exports.JSONSchemaAny=Y;exports.JSONSchemaAnyOf=Ue;exports.JSONSchemaArray=ce;exports.JSONSchemaBoolean=ne;exports.JSONSchemaConst=Ee;exports.JSONSchemaControl=xe;exports.JSONSchemaEnum=Ve;exports.JSONSchemaForm=Jt;exports.JSONSchemaGenericControl=B;exports.JSONSchemaInteger=te;exports.JSONSchemaNull=le;exports.JSONSchemaNumber=X;exports.JSONSchemaObject=ue;exports.JSONSchemaOneOf=$e;exports.JSONSchemaString=ee;exports.JSONSchemaUnion=fe;exports.composeEffectiveObjectSchema=Ae;exports.createAJVStandardSchema=qt;exports.evaluateIfThenElseOverlay=ae;exports.evaluateNotViolation=Ce;exports.extractSchemaDefaults=q;exports.getEvaluatedProperties=J;exports.hasConditionalFeatures=Oe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@tempots/dom"),A=require("../oneof-branch-detection-BEkAezNi.cjs"),_=require("../translations-qefRsdGi.cjs"),Q=require("../notice-Q0A1gIho.cjs"),j=require("../widget-customization-CD_NyRQ8.cjs"),F=require("../stack-dwLevGa2.cjs"),v=require("../use-form-BvBkVEKi.cjs"),W=require("@tempots/std"),k=require("../deep-merge-Bjv1NvKj.cjs"),T=require("../utils-DmEuG3Np.cjs"),Se=require("../text-input-D_IxFd0M.cjs"),we=require("../input-container-BkPcNDaZ.cjs"),_e=require("ajv");function Oe(e){if(!e||typeof e!="object")return!1;const t=e;return!!(e.if||t.dependentRequired||t.dependentSchemas||e.dependencies)}function Ce(e,t,n,r=[]){if(!n)return null;try{if(A.compileWithCache(n,e)(t)){const o=e.title||"disallowed schema";return{path:r,message:`Value matches ${o}`,notSchema:e}}return null}catch{return null}}function Ae(e,t,n,r=[]){const i=[],a=[],o=ae(e,t,n);o&&i.push(o);const s=Array.isArray(e.required)?[...e.required]:[];if(typeof t=="object"&&t!=null&&!Array.isArray(t)){const m=t,f=e.dependentRequired;if(f){for(const[d,p]of Object.entries(f))if(Object.prototype.hasOwnProperty.call(m,d))for(const w of p)s.push(w)}const b=e.dependencies;if(b){for(const[d,p]of Object.entries(b))if(Object.prototype.hasOwnProperty.call(m,d))if(Array.isArray(p))for(const w of p)s.push(w);else typeof p=="object"&&p&&i.push(p)}const S=e.dependentSchemas;if(S)for(const[d,p]of Object.entries(S))Object.prototype.hasOwnProperty.call(m,d)&&i.push(p)}const u=[e,...i],{mergedSchema:c,conflicts:y}=A.mergeAllOf(u,r);if(s.length>0){const m=new Set([...c.required??[],...s]);c.required=[...m]}return a.push(...y),{effective:c,conflicts:a}}function ae(e,t,n){if(!n||!e.if||typeof e.if!="object")return null;try{if(A.compileWithCache(n,e.if)(t)){const a=e.then;if(a&&typeof a=="object")return a}else{const a=e.else;if(a&&typeof a=="object")return a}}catch{}return null}function J(e,t,n){const r=new Set;if(!t||typeof t!="object")return r;if(e.properties&&Object.keys(e.properties).forEach(o=>{o in t&&r.add(o)}),e.patternProperties&&Object.keys(t).forEach(o=>{Object.keys(e.patternProperties).forEach(s=>{try{new RegExp(s).test(o)&&r.add(o)}catch{}})}),e.additionalProperties===!0||e.additionalProperties&&typeof e.additionalProperties=="object"){const o=new Set;e.properties&&Object.keys(e.properties).forEach(s=>{s in t&&o.add(s)}),e.patternProperties&&Object.keys(t).forEach(s=>{Object.keys(e.patternProperties).forEach(u=>{try{new RegExp(u).test(s)&&o.add(s)}catch{}})}),Object.keys(t).forEach(s=>{o.has(s)||r.add(s)})}e.allOf&&e.allOf.forEach(o=>{typeof o=="object"&&J(o,t,n).forEach(u=>r.add(u))});const i=ae(e,t,n);i&&J(i,t,n).forEach(s=>r.add(s));const a=e.dependentSchemas;return a&&Object.keys(a).forEach(o=>{if(o in t){const s=a[o];typeof s=="object"&&J(s,t,n).forEach(c=>r.add(c))}}),e.dependencies&&Object.keys(e.dependencies).forEach(o=>{if(o in t){const s=e.dependencies[o];typeof s=="object"&&!Array.isArray(s)&&J(s,t,n).forEach(c=>r.add(c))}}),r}function $({ctx:e}){const{examples:t,default:n}=e;let{description:r}=e;r==null&&t!=null&&n!=null&&(Array.isArray(t)?r=`example: ${t[0]}`:r=`example: ${t}`);const i=[];if(e.isDeprecated&&i.push("deprecated"),e.isReadOnly&&!e.shouldIgnoreReadOnly&&i.push("read-only"),e.isWriteOnly&&!e.shouldShowWriteOnly&&i.push("write-only"),i.length>0){const a=`(${i.join(", ")})`;r=r?`${r} ${a}`:a}return{label:e.suppressLabel?void 0:e.widgetLabel,description:r,required:e.isPropertyRequired,layout:e.horizontal?"horizontal":"vertical"}}function G(e,t){if(e.default!=null)return t(e.default);if(Array.isArray(e.examples))return t(e.examples[0]);if(e.examples!=null)return t(e.examples)}function je(e){return e==null?1:Math.round(e)}function oe(e){return e.isWriteOnly&&!e.shouldShowWriteOnly}function se(e){return e.isReadOnly&&!e.shouldIgnoreReadOnly||e.isDeprecated}function R({ctx:e,controller:t,resolved:n}){const r=n?.widget,i={controller:t,ctx:e,options:n?.options,setStatus:e.setStatus,formValue:e.formValue,validationMode:e.validationMode,submitting:e.submitting};if(r!=null&&e.widgetRegistry){const o=e.widgetRegistry.get(r);if(o)return o.factory(i)}if(r!=null){const o=j.globalWidgetRegistry.get(r);if(o)return o.factory(i)}if(e.widgetRegistry){const o=e.widgetRegistry.findBestWidget(e);if(o)return o.registration.factory(i)}const a=j.globalWidgetRegistry.findBestWidget(e);return a?a.registration.factory(i):null}function ke(e){const{options:t,selected:n,onChange:r,mode:i="auto",size:a="sm",keyFor:o=y=>String(y),parseKey:s=y=>y}=e,u=t.length;if((i==="auto"?u<=3?"segmented":"select":i)==="segmented"){const y=Object.fromEntries(t.map(m=>[o(m.value),m.label]));return k.SegmentedInput({options:y,value:l.Value.map(n,m=>o(m)),onChange:m=>r(s(m)),size:a})}return k.NativeSelect({options:t.map(y=>({type:"value",value:y.value,label:y.label})),value:n,onChange:r})}function Ie({ctx:e,showSelector:t,selector:n,inner:r}){return e.isRoot?t?F.Stack(l.attr.class("bc-stack--gap-2"),n,r):r:v.InputWrapper({...$({ctx:e}),content:t?F.Stack(l.attr.class("bc-stack--gap-2 bc-stack--align-start"),n,r):r})}function Ke(e,t){if(e===null)return t.includes("null")?"null":null;switch(typeof e){case"string":return t.includes("string")?"string":null;case"number":return Number.isInteger(e)&&t.includes("integer")?"integer":t.includes("number")?"number":null;case"boolean":return t.includes("boolean")?"boolean":null;case"object":return Array.isArray(e)?t.includes("array")?"array":null:t.includes("object")?"object":null;default:return null}}function ze(e,t){try{switch(t){case"string":return e==null?{ok:!0,value:void 0}:{ok:!0,value:String(e)};case"number":{if(typeof e=="number")return{ok:!0,value:e};if(typeof e=="string"){const n=Number(e);return Number.isFinite(n)?{ok:!0,value:n}:{ok:!1}}return typeof e=="boolean"?{ok:!0,value:e?1:0}:{ok:!1}}case"integer":return typeof e=="number"&&Number.isInteger(e)?{ok:!0,value:e}:typeof e=="string"?/^[-+]?\d+$/.test(e.trim())?{ok:!0,value:parseInt(e,10)}:{ok:!1}:typeof e=="boolean"?{ok:!0,value:e?1:0}:{ok:!1};case"boolean":{if(typeof e=="boolean")return{ok:!0,value:e};if(typeof e=="string"){const n=e.trim().toLowerCase();return n==="true"||n==="1"||n==="yes"?{ok:!0,value:!0}:n==="false"||n==="0"||n==="no"?{ok:!0,value:!1}:{ok:!1}}return typeof e=="number"?{ok:!0,value:e!==0}:{ok:!1}}case"array":return Array.isArray(e)?{ok:!0,value:e}:{ok:!1};case"object":return e!=null&&typeof e=="object"&&!Array.isArray(e)?{ok:!0,value:e}:{ok:!1};case"null":return{ok:!0,value:null}}}catch{return{ok:!1}}}function He(e){switch(e){case"null":return null;case"array":return[];case"object":return{};default:return}}function Ge(e){if(typeof e=="boolean")return{};const t=e["x:ui"];if(t!=null&&typeof t=="object"&&!Array.isArray(t)){const n=t;return{unionDefault:typeof n.unionDefault=="string"?n.unionDefault:void 0,confirmBranchChange:!!n.confirmBranchChange,selector:n.selector==="segmented"||n.selector==="select"?n.selector:void 0}}return{}}function Xe(e){const{definition:t}=e;if(typeof t=="boolean")return;const n={pattern:t.pattern,minLength:t.minLength,maxLength:t.maxLength},r=T.resolveWidget(t,e.name),i=r?.widget;if(i!=null)switch(i){case"binary":return{...n,format:"binary",...r?.options};case"date":return{...n,format:"date"};case"date-time":return{...n,format:"date-time"};case"email":return{...n,format:"email"};case"markdown":return{...n,format:"markdown"};case"password":return{...n,format:"password"};case"textarea":return{...n,format:"textarea"};case"time":return{...n,format:"time"};case"uuid":return{format:"uuid"};case"url":return{...n,format:"url"};case"uri":return{...n,format:"uri"};case"uri-reference":return{...n,format:"uri-reference"};case"hostname":return{...n,format:"hostname"};case"ipv4":return{...n,format:"ipv4"};case"ipv6":return{...n,format:"ipv6"};case"regex":return{...n,format:"regex"};case"duration":return{...n,format:"duration"};case"color":return{...n,format:"color"}}}const Ye=e=>{const{after:t,disabled:n}=e,r=Se.mapInputOptions(e,a=>a??void 0,a=>a??null),i=k.NullableResetAfter(e.value,n,e.onChange??e.onInput);return j.Base64Input({...r,after:t!=null?l.Fragment(i,t):i})};function de({ctx:e,options:t,controller:n}){const r=Xe(e),i=!e.isNullable,a=()=>i?k.transformNullToUndefined(n):n;switch(r?.format){case"email":return v.Control(j.NullableEmailInput,{...t,controller:a()});case"date":return v.MappedControl(j.NullableDateInput,{...t,controller:a(),toInput:o=>o==null?null:new Date(o),fromInput:o=>o?.toISOString().split("T")[0]??null});case"date-time":return v.MappedControl(j.NullableDateTimeInput,{...t,controller:a(),toInput:o=>o==null?null:new Date(o),fromInput:o=>o?.toISOString()??null});case"time":return v.Control(j.NullableTextInput,{...t,controller:a(),placeholder:"HH:MM:SS"});case"password":return v.Control(j.NullablePasswordInput,{...t,controller:a()});case"binary":{const{definition:o}=e,s=typeof o=="object"?o["x:ui"]:void 0;return r.mediaType&&(r.mediaType.startsWith("image/")||r.mediaType.startsWith("video/")||r.mediaType.startsWith("audio/")||r.mediaType==="application/pdf"||s?.preferFileUpload===!0)?v.Control(Ye,{...t,controller:a(),mode:"input",accept:r.mediaType||"*/*",maxFileSize:(typeof s?.maxBytes=="number"?s.maxBytes:void 0)||(typeof s?.maxFileSize=="number"?s.maxFileSize:void 0),showFileList:!0}):v.Control(j.NullableTextArea,{...t,controller:a(),placeholder:"Paste base64-encoded data",rows:3})}case"uri":case"url":return v.Control(j.NullableUrlInput,{...t,controller:a(),placeholder:"https://example.com"});case"uri-reference":return v.Control(j.NullableTextInput,{...t,controller:a(),placeholder:"Enter URL..."});case"hostname":return v.Control(j.NullableTextInput,{...t,controller:a(),placeholder:"example.com"});case"ipv4":return v.Control(j.NullableTextInput,{...t,controller:a(),placeholder:"192.168.1.1"});case"ipv6":return v.Control(j.NullableTextInput,{...t,controller:a(),placeholder:"2001:db8::1"});case"regex":return v.Control(j.NullableTextArea,{...t,controller:a(),placeholder:"^[a-zA-Z0-9]+$",rows:3});case"duration":return k.WithTemporal(({Duration:o})=>v.MappedControl(k.NullableDurationInput,{...t,controller:a(),toInput:s=>s==null?null:o.from(s),fromInput:s=>s?.toString?.()??null}));case"color":return v.Control(j.ColorSwatchInput,{...t,controller:n,displayValue:!0});case"uuid":return v.Control(j.NullableUuidInput,{...t,controller:a()});case"textarea":return v.Control(j.NullableTextArea,{...t,controller:a()});default:return v.Control(j.NullableTextInput,{...t,controller:a()})}}function ee({ctx:e,controller:t}){if(oe(e))return l.Empty;const n=T.resolveWidget(e.definition,e.name),r=n?.widget,i=R({ctx:e,controller:t,resolved:n});if(i)return i;const a={...$({ctx:e}),placeholder:G(e.definition,String),disabled:se(e)};if((e.isNullable||e.isOptional)&&!e.shouldShowPresenceToggle)return de({ctx:e,options:a,controller:t});if(r!=null&&["url","uri","uri-reference","hostname","ipv4","ipv6","regex","duration","binary","markdown","time","color"].includes(r))return de({ctx:e,options:a,controller:t});switch(r){case"email":return v.Control(Q.EmailInput,{...a,controller:k.transformEmptyStringToUndefined(t)});case"password":return v.Control(Q.PasswordInput,{...a,controller:k.transformEmptyStringToUndefined(t)});case"uuid":return v.Control(k.UuidInput,{...a,controller:k.transformEmptyStringToUndefined(t)});case"textarea":return v.Control(k.TextArea,{...a,controller:k.transformEmptyStringToUndefined(t)});default:return v.Control(Se.TextInput,{...a,controller:k.transformEmptyStringToUndefined(t)})}}function Ze(e){const t=T.resolveWidget(e.definition,e.name);if(t?.widget==="slider")return{widget:"slider",options:t.options};if(t?.widget==="rating")return{widget:"rating",options:t.options};const n=e.definition,r=typeof n=="object"?n["x:ui"]:void 0;return r?.displayFormat==="currency"?{widget:"currency",options:{currency:typeof r?.currency=="string"?r.currency:"USD"}}:r?.displayFormat==="percent"?{widget:"percent"}:{widget:"number"}}function X({ctx:e,controller:t}){if(oe(e))return l.Empty;const n=e.definition,r=Ze(e),i=T.resolveWidget(e.definition,e.name),a=R({ctx:e,controller:t,resolved:i});if(a)return a;const o={...$({ctx:e}),placeholder:G(e.definition,String),min:n.minimum,max:n.maximum,step:n.multipleOf,disabled:se(e)},s=(e.isNullable||e.isOptional)&&!e.shouldShowPresenceToggle,u=s&&!e.isNullable;switch(r.widget){case"rating":const c=(typeof r.options?.max=="number"?r.options.max:n.maximum)||5;return s?v.Control(j.NullableRatingInput,{...o,max:c,controller:u?k.transformNullToUndefined(t):t}):v.Control(j.RatingInput,{...o,max:c,controller:t});case"slider":return s?v.Control(j.NullableSliderInput,{...o,controller:u?k.transformNullToUndefined(t):t}):v.Control(j.SliderInput,{...o,controller:t});case"currency":const y=typeof r.options?.currency=="string"?r.options.currency:"USD";return s?v.Control(k.MaskInput,{...o,mask:pe(y),controller:t}):v.Control(k.MaskInput,{...o,mask:pe(y),controller:t});case"percent":return s?v.Control(k.MaskInput,{...o,mask:me(),controller:t}):v.Control(k.MaskInput,{...o,mask:me(),controller:t});default:return s?v.Control(k.NullableNumberInput,{...o,controller:u?k.transformNullToUndefined(t):t}):v.Control(k.NumberInput,{...o,controller:t})}}function pe(e){return`${Qe(e)} 000,000.00`}function me(){return"000.00%"}function Qe(e){return{USD:"$",EUR:"€",GBP:"£",JPY:"¥",CAD:"C$",AUD:"A$"}[e.toUpperCase()]||e}function te({ctx:e,controller:t}){return X({ctx:e.with({definition:{...e.definition,multipleOf:je(e.definition.multipleOf)}}),controller:t})}function ne({ctx:e,controller:t}){if(oe(e))return l.Empty;const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i={...$({ctx:e}),disabled:se(e)},a=v.Control(v.CheckboxInput,{...i,controller:t});if(!e.isNullable&&(!e.isOptional||e.shouldShowPresenceToggle))return a;const o=!e.isNullable;return v.Control(v.CheckboxInput,{...i,controller:t,after:k.NullableResetAfter(t.signal,t.disabled,()=>t.change(o?void 0:null))})}function le({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});return r||l.WithElement(()=>{t.change(null)})}function et({conflicts:e}){return e.length===0?l.Empty:l.Use(_.BeatUII18n,t=>Q.Notice({variant:"warning",tone:"prominent",title:t.value.schemaConflictsDetected,class:"bc-schema-conflicts-banner"},l.html.ul(l.attr.style("margin: 0; padding-left: 1.25rem; list-style-type: disc;"),...e.map(n=>l.html.li(l.attr.style("margin-bottom: 0.25rem;"),n.message,n.path.length>0?l.html.code(l.attr.style("margin-left: 0.5rem; font-size: 0.75rem; opacity: 0.7;"),` (${n.path.join(".")})`):null)))))}function tt({violations:e}){return e.length===0?l.Empty:l.Use(_.BeatUII18n,t=>Q.Notice({variant:"danger",tone:"prominent",title:t.value.schemaViolationsDetected,class:"bc-not-violations-banner"},l.html.ul(l.attr.style("margin: 0; padding-left: 1.25rem; list-style-type: disc;"),...e.map(n=>l.html.li(l.attr.style("margin-bottom: 0.25rem;"),n.message,n.path.length>0?l.html.code(l.attr.style("margin-left: 0.5rem; font-size: 0.75rem; opacity: 0.7;"),` (${n.path.join(".")})`):null)))))}function nt({ctx:e,controller:t,content:n}){const r=l.Value.map(t.signal,o=>o!==void 0),i=e.widgetLabel??"Property",a=o=>{if(o){const s=e.default;if(s!==void 0)t.change(s);else{const u=e.definition;u.type==="string"?t.change(""):u.type==="number"||u.type==="integer"?t.change(0):u.type==="boolean"?t.change(!1):u.type==="array"?t.change([]):u.type==="object"?t.change({}):t.change(null)}}else t.change(void 0)};return F.Stack(l.html.div(l.attr.class("bc-presence-toggle"),v.InputWrapper({layout:"horizontal",label:`Include ${i}`,content:j.Switch({value:r,onChange:a,size:"xs"})})),l.When(r,()=>n))}function V(e,t,n){const r=e.schemaConflicts.length>0,i=e.notViolations.length>0,a=e.shouldShowPresenceToggle&&n!=null;let o=t;return a&&n!=null&&(o=nt({ctx:e,controller:n,content:t})),!r&&!i?o:F.Stack(l.attr.class("bc-stack--gap-2"),i?tt({violations:e.notViolations}):null,r?et({conflicts:e.schemaConflicts}):null,o)}function Ne(e){if(typeof e=="boolean")return;const t=e["x:ui"];if(!t||!t.visibleIf)return;const n=t.visibleIf;if(typeof n=="string"||typeof n=="object"&&n!==null)return n}function rt(e){if(e.startsWith("!"))return{field:e.slice(1),operator:"falsy"};if(e.includes("!=")){const[t,n]=e.split("!=",2);return{field:t.trim(),operator:"notEquals",value:ye(n.trim())}}if(e.includes("=")){const[t,n]=e.split("=",2);return{field:t.trim(),operator:"equals",value:ye(n.trim())}}return{field:e.trim(),operator:"truthy"}}function ye(e){if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.slice(1,-1);if(e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(e!=="undefined")return/^-?\d+(\.\d+)?$/.test(e)?parseFloat(e):e}function it(e,t){if(e==null||typeof e!="object")return;const n=t.split(".");let r=e;for(const i of n){if(r==null||typeof r!="object")return;if(Array.isArray(r)){const a=parseInt(i,10);if(!isNaN(a))r=r[a];else return}else r=r[i]}return r}function re(e,t){const n=it(t,e.field);switch(e.operator){case"equals":return n===e.value;case"notEquals":return n!==e.value;case"truthy":return!!n;case"falsy":return!n;case"contains":return typeof n=="string"&&typeof e.value=="string"||Array.isArray(n)?n.includes(e.value):!1;case"notContains":return typeof n=="string"&&typeof e.value=="string"||Array.isArray(n)?!n.includes(e.value):!0;case"greaterThan":return typeof n=="number"&&typeof e.value=="number"&&n>e.value;case"lessThan":return typeof n=="number"&&typeof e.value=="number"&&n<e.value;case"greaterThanOrEqual":return typeof n=="number"&&typeof e.value=="number"&&n>=e.value;case"lessThanOrEqual":return typeof n=="number"&&typeof e.value=="number"&&n<=e.value;case"in":return Array.isArray(e.values)&&e.values.includes(n);case"notIn":return!Array.isArray(e.values)||!e.values.includes(n);default:return!1}}function Pe(e,t){const n=e.conditions.map(r=>"operator"in r&&["and","or","not"].includes(r.operator)?Pe(r,t):re(r,t));switch(e.operator){case"and":return n.every(Boolean);case"or":return n.some(Boolean);case"not":return!n[0];default:return!1}}function at(e,t){try{if(typeof e=="string"){const n=rt(e);return re(n,t)}return"operator"in e&&["and","or","not"].includes(e.operator)?Pe(e,t):re(e,t)}catch(n){return console.warn("Error evaluating visibility condition:",n),!0}}function ot(e,t){return l.computedOf(t)(n=>at(e,n))}const ge={behavior:"hide",clearOnHide:!1};function st({ctx:e,controller:t,children:n,options:r=ge}){const i=Ne(e.definition);if(!i)return n;const a={...ge,...r},o=lt(t),s=ot(i,o);return a.clearOnHide&&s.on(u=>{!u&&t.signal.value!==void 0&&t.change(void 0)}),a.behavior==="unmount"?l.When(s,()=>n):n}function lt(e){return e.signal}function Ve({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const a=e.definition.enum??[],o=(e.isNullable||e.isOptional)&&!a.includes(null),s=!e.isNullable;return l.Use(_.BeatUII18n,u=>{const c=a.map(m=>({type:"value",value:m,label:String(m)}));o&&c.unshift({type:"value",value:null,label:l.Value.get(u.$.selectNone)});const y=o&&s?k.transformNullToUndefined(t):t;return k.NativeSelectControl({...$({ctx:e}),options:c,controller:y,equality:(m,f)=>m==null&&f==null?!0:m===f})})}function Ee({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition;return l.Fragment(l.WithElement(()=>{l.Value.get(t.signal)!==i.const&&t.change(i.const)}),k.Group(F.MutedLabel(e.widgetLabel,": "),F.Label(String(i.const))))}function Te(e,t,n){const{controller:r,effCtx:i,patternProps:a,apSchema:o,canRemove:s,lockKeyAfterSet:u,validatePropertyName:c}=n,y=r.field(e),m=l.prop(e),f=l.prop(null);let b=o;if(t){const w=Object.keys(a).find(h=>{try{return new RegExp(h).test(e)}catch{return!1}});if(w){const h=a[w];h!==!1&&typeof h=="object"&&(b=h)}}const S=w=>{const h=(w??"").trim();if(!h||h===e||Object.prototype.hasOwnProperty.call(l.Value.get(r.signal)??{},h))return;const g=c(h);if(!g.ok){f.set(g.message);return}f.set(null);const O={...l.Value.get(r.signal)??{}},C=O[e];delete O[e],O[h]=C,r.change(O)},d=l.Use(_.BeatUII18n,w=>v.CloseButton({size:"xs",label:w.$.removeItem,disabled:!s(Object.keys(l.Value.get(r.signal)??{}).length),onClick:()=>{const h=Object.keys(l.Value.get(r.signal)??{}).length;if(!s(h))return;const g={...l.Value.get(r.signal)??{}};delete g[e],r.change(g)}})),p=l.Value.map(y.signal,w=>u&&w!=null);return l.html.div(l.attr.class("bc-object-helpers__row"),l.style.gridTemplateColumns("2fr 3fr min-content"),v.InputWrapper({content:j.EditableText({value:m,onChange:S,disabled:l.computedOf(r.disabled,p)((w,h)=>w||h)}),error:l.Ensure(f,w=>l.html.div(l.attr.class("bc-object-helpers__error"),w)),description:Object.keys(a).length>0?l.html.div(l.attr.class("bc-object-helpers__description"),"Allowed patterns: ",Object.keys(a).join(", ")):null}),l.html.div(B({ctx:i.with({definition:b,suppressLabel:!0}).append(e),controller:y})),l.html.div(l.attr.class("bc-object-helpers__remove"),d))}function Fe(e,t,n){const{controller:r,effCtx:i,patternProps:a,apSchema:o,unevaluatedProps:s,canRemove:u,lockKeyAfterSet:c,validatePropertyName:y}=n,m=r.field(e),f=l.prop(e),b=l.prop(null);let S;if(s&&typeof s=="object")S=s;else if(t){const h=Object.keys(a).find(g=>{try{return new RegExp(g).test(e)}catch{return!1}});if(h){const g=a[h];g!==!1&&typeof g=="object"?S=g:S=o}else S=o}else S=o;const d=h=>{const g=(h??"").trim();if(!g||g===e||Object.prototype.hasOwnProperty.call(l.Value.get(r.signal)??{},g))return;const O=y(g);if(!O.ok){b.set(O.message);return}b.set(null);const C={...l.Value.get(r.signal)??{}},N=C[e];delete C[e],C[g]=N,r.change(C)},p=l.Use(_.BeatUII18n,h=>v.CloseButton({size:"xs",label:h.$.removeItem,disabled:!u(Object.keys(l.Value.get(r.signal)??{}).length),onClick:()=>{const g=Object.keys(l.Value.get(r.signal)??{}).length;if(!u(g))return;const O={...l.Value.get(r.signal)??{}};delete O[e],r.change(O)}})),w=l.Value.map(m.signal,h=>c&&h!=null);return l.html.div(l.attr.class("bc-object-helpers__row"),l.style.gridTemplateColumns("2fr 3fr min-content"),v.InputWrapper({content:j.EditableText({value:f,onChange:d,disabled:l.computedOf(r.disabled,w)((h,g)=>h||g)}),error:l.Ensure(b,h=>l.html.div(l.attr.class("bc-object-helpers__error"),h)),description:l.html.div(l.attr.class("bc-object-helpers__description"),s===!1?"Unevaluated property (not allowed by schema)":"Unevaluated property",Object.keys(a).length>0?l.html.span(" • Allowed patterns: ",Object.keys(a).join(", ")):null)}),l.html.div(B({ctx:i.with({definition:S,suppressLabel:!0}).append(e),controller:m})),l.html.div(l.attr.class("bc-object-helpers__remove"),p))}function We(e){const t=e.properties??{},n=new Set(Object.keys(t)),r=e.additionalProperties??!0,i=r!==!1,a=r===!0||r===void 0?{}:r,o=e.minProperties??0,s=e.maxProperties??1/0,u=e.unevaluatedProperties;let c=!0,y=null;u===!1?(c=!1,y="No unevaluated properties are allowed by schema"):u&&typeof u=="object"&&(c=!0);const m=e.patternProperties??{},f=Object.keys(m).filter(Boolean).map(p=>{try{return new RegExp(p)}catch{return null}}).filter(p=>p!=null),b=e.propertyNames,S=e["x:ui"],d=!!(S&&typeof S=="object"&&S.lockKeyAfterSet);return{knownProps:t,knownKeys:n,ap:r,apAllowed:i,apSchema:a,minProps:o,maxProps:s,unevaluatedProps:u,canAddUnevaluated:c,unevaluatedTooltip:y,patternProps:m,patternList:f,propertyNamesDef:b,lockKeyAfterSet:d}}function Re(e,t){const{knownKeys:n,apAllowed:r,patternList:i,patternProps:a,propertyNamesDef:o}=e;return s=>{const u=(s??"").trim();if(u==="")return{ok:!1,message:"Key cannot be empty"};if(o===!1)return{ok:!1,message:"No property names are allowed by schema"};if(o&&typeof o=="object"&&t)try{const c=t.compile(o);if(!c(u))return{ok:!1,message:c.errors?.[0]?.message??"Invalid property name"}}catch{}if(!r&&!n.has(u)){if(i.length===0)return{ok:!1,message:"Only declared properties are allowed"};if(!i.some(y=>y.test(u)))return{ok:!1,message:`Key must match one of: ${Object.keys(a).join(", ")}`}}return{ok:!0}}}function Me(e){const{minProps:t,apSchema:n,unevaluatedProps:r}=e;return{canRemove:s=>s>t,makeDefaultFor:s=>{const u=G(s,y=>y);if(u!==void 0)return u;const c=s.type;if(c==="string")return"";if(c==="number"||c==="integer")return 0;if(c==="boolean")return!1;if(c==="array")return[];if(c==="object")return{}},getValueSchemaForNew:()=>r&&typeof r=="object"?r:n}}function ut({ctx:e,controller:t,config:n,effective:r}){const i=W.objectEntries(n.knownProps).filter(([,s])=>s!==!1),a=i.map(([s])=>s);return{children:i.map(([s,u])=>{const c=s,y=t.field(c);return B({ctx:e.with({definition:u,isPropertyRequired:Array.isArray(r.required)?r.required.includes(c):e.hasRequiredProperty(c),suppressLabel:!1}).append(c),controller:y})}),names:a}}function ct({controller:e,config:t,validatePropertyName:n,helpers:r}){if(!t.apAllowed)return null;const i=(a,o)=>{const s=a,u=y=>o.has(y)?!1:n(y).ok;if(u(s))return s;let c=1;for(;o.has(s+c)||!u(s+c);)c++;return s+c};return l.Use(_.BeatUII18n,a=>we.Button({variant:"outline",disabled:l.Value.map(e.signal,o=>!t.canAddUnevaluated||Object.keys(o??{}).length>=t.maxProps),onClick:()=>{const o=l.Value.get(e.signal)??{},s=Object.keys(o);if(!t.canAddUnevaluated||s.length>=t.maxProps)return;const u=new Set(s),c=i("property",u);if(!n(c).ok)return;const m=r.getValueSchemaForNew(),f=r.makeDefaultFor(m),b={...o,[c]:f};e.change(b)}},l.attr.title(t.unevaluatedTooltip),a.$.addLabel))}function Le({ctx:e,containerLayout:t,content:n}){return!e.suppressLabel&&e.name!=null&&(!t||!["fieldset","group"].includes(t.format||""))?v.InputWrapper({...$({ctx:e}),content:n}):n}function ft({ctx:e,controller:t,baseDef:n}){const r=We(n),i=Re(r,e.ajv),a=Me(r),{children:o,names:s}=ut({ctx:e,controller:t,config:r,effective:n}),u=l.MapSignal(t.signal,b=>{const d=Object.keys(b??{}).filter(g=>!r.knownKeys.has(g));if(d.length===0)return l.Empty;const p=J(n,b??{},e.ajv),w=d.filter(g=>!p.has(g)),h=d.filter(g=>p.has(g));return l.Fragment(...h.map(g=>{const O=r.patternList.some(C=>C.test(g));return Te(g,O,{controller:t,effCtx:e,patternProps:r.patternProps,apSchema:r.apSchema,canRemove:a.canRemove,lockKeyAfterSet:r.lockKeyAfterSet,validatePropertyName:i})}),...w.map(g=>{const O=r.patternList.some(C=>C.test(g));return Fe(g,O,{controller:t,effCtx:e,patternProps:r.patternProps,apSchema:r.apSchema,unevaluatedProps:r.unevaluatedProps,canRemove:a.canRemove,lockKeyAfterSet:r.lockKeyAfterSet,validatePropertyName:i})}))}),c=ct({controller:t,config:r,validatePropertyName:i,helpers:a}),y=A.getContainerLayout(e),m=[...o,u,c].filter(Boolean),f=A.applyContainerLayout(y,e,m,s);return Le({ctx:e,containerLayout:y,content:f})}function dt({ctx:e,controller:t,baseDef:n}){return l.MapSignal(t.signal,r=>{const{effective:i,conflicts:a}=Ae(n,r,e.ajv,e.path),o=e.with({definition:i,schemaConflicts:[...e.schemaConflicts,...a]}),s=We(i),u=Re(s,e.ajv),c=Me(s),y=Object.keys(r??{}),m=y.filter(I=>!s.knownKeys.has(I)),f=J(i,r??{},e.ajv),b=m.filter(I=>!f.has(I)),S=m.filter(I=>f.has(I)),d=s.apAllowed&&s.canAddUnevaluated&&y.length<s.maxProps,p=(I,M)=>{const P=I,D=z=>M.has(z)?!1:u(z).ok;if(D(P))return P;let x=1;for(;M.has(P+x)||!D(P+x);)x++;return P+x},w=l.Use(_.BeatUII18n,I=>we.Button({variant:"outline",disabled:!d,onClick:()=>{if(!d)return;const M=new Set(Object.keys(l.Value.get(t.signal)??{})),P=p("property",M);if(!u(P).ok)return;const x=c.getValueSchemaForNew(),z=c.makeDefaultFor(x),Z={...l.Value.get(t.signal)??{},[P]:z};t.change(Z)}},l.attr.title(s.unevaluatedTooltip),I.$.addLabel)),h=A.getContainerLayout(o),g=W.objectEntries(s.knownProps).filter(([,I])=>I!==!1),C=[...g.map(([I])=>I),...S,...b],N=[...g.map(([I,M])=>{const P=I,D=t.field(P);return B({ctx:o.with({definition:M,isPropertyRequired:Array.isArray(i.required)?i.required.includes(P):o.hasRequiredProperty(P),suppressLabel:!1}).append(P),controller:D})}),...S.map(I=>{const M=s.patternList.some(P=>P.test(I));return Te(I,M,{controller:t,effCtx:o,patternProps:s.patternProps,apSchema:s.apSchema,canRemove:c.canRemove,lockKeyAfterSet:s.lockKeyAfterSet,validatePropertyName:u})}),...b.map(I=>{const M=s.patternList.some(P=>P.test(I));return Fe(I,M,{controller:t,effCtx:o,patternProps:s.patternProps,apSchema:s.apSchema,unevaluatedProps:s.unevaluatedProps,canRemove:c.canRemove,lockKeyAfterSet:s.lockKeyAfterSet,validatePropertyName:u})}),s.apAllowed?w:null].filter(Boolean),K=A.applyContainerLayout(h,o,N,C);return Le({ctx:o,containerLayout:h,content:K})})}function ue({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition;return Oe(i)?dt({ctx:e,controller:t,baseDef:i}):ft({ctx:e,controller:t,baseDef:i})}function pt(e){if(typeof e=="boolean")return{discriminator:null,type:null};if(e.discriminator&&typeof e.discriminator=="object"){const n=e.discriminator;if(typeof n.propertyName=="string")return{discriminator:{propertyName:n.propertyName,mapping:n.mapping||{}},type:"openapi"}}const t=e["x:ui"];return t?.discriminatorKey&&typeof t.discriminatorKey=="string"?{discriminator:{key:t.discriminatorKey,mapping:t.discriminatorMapping||{}},type:"beatui"}:{discriminator:null,type:null}}function mt(e,t,n){if(!t.discriminator||!n||typeof n!="object")return null;const{discriminator:r,type:i}=t;if(i==="openapi"){const a=r,o=n[a.propertyName];if(o==null)return null;if(a.mapping&&a.mapping[o]){const s=a.mapping[o];return yt(e,s)}return he(e,a.propertyName,o)}if(i==="beatui"){const a=r,o=n[a.key];if(o==null)return null;if(a.mapping&&a.mapping[o]!=null){const s=a.mapping[o];return s>=0&&s<e.length?s:null}return he(e,a.key,o)}return null}function yt(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(typeof r=="object"&&r.$ref===t)return n}return null}function he(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if(typeof i!="object")continue;const a=i.properties;if(a&&a[t]){const o=a[t];if(typeof o=="object"&&o.const===n||typeof o=="object"&&Array.isArray(o.enum)&&o.enum.length===1&&o.enum[0]===n)return r}if(i.const===n)return r}return null}function Ue({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition.anyOf;return Be({ctx:e,controller:t,kind:"anyOf",variants:i})}function $e({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition.oneOf;return Be({ctx:e,controller:t,kind:"oneOf",variants:i})}function gt({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const a=e.definition.allOf.filter(c=>typeof c=="object").map(c=>A.resolveAnyRef(c,e.schema,e.ajv)),{mergedSchema:o,conflicts:s}=A.mergeAllOf(a,e.path),u=e.with({definition:o,schemaConflicts:[...e.schemaConflicts,...s]});return B({ctx:u,controller:t})}function Be({ctx:e,controller:t,kind:n,variants:r}){const i=r.map((d,p)=>A.getOneOfBranchLabel(d,p,`${n} ${p+1}`)),a=typeof e.definition=="boolean"?{discriminator:null,type:null}:pt(e.definition),o=l.computedOf(t.signal,e.ajv)((d,p)=>{if(n==="oneOf"){if(a.discriminator){const w=mt(r,a,d);if(w!==null)return w}return A.autoSelectOneOfBranch(e,d,p)}return A.autoSelectOneOfBranch(e,d,p)}),s=l.Value.get(o),u=l.prop(s>=0?s:0);t.onDispose(()=>u.dispose());let c=!1;const y=o.on(d=>{!c&&d>=0&&u.set(d)});t.onDispose(y);const m=r.length,f=d=>{c=!0,u.set(d)},b=m>1?ke({options:r.map((d,p)=>({value:p,label:i[p]})),selected:u,onChange:f}):"",S=l.MapSignal(u,d=>B({ctx:e.with({definition:r[l.Value.get(d)],suppressLabel:!e.isRoot}),controller:t}));return Ie({ctx:e,showSelector:m>1,selector:b,inner:S})}function B({ctx:e,controller:t}){const n=typeof e.definition=="boolean"?{}:e.definition;let r=n?.$ref?A.resolveRef(n,e.schema):n,i=e.with({definition:r});if(r?.allOf!=null){const o=r.allOf.filter(s=>typeof s=="object"&&s!==null);if(o.length>0){const s=o.map(f=>A.resolveAnyRef(f,e.schema,e.ajv)),{mergedSchema:u,conflicts:c}=A.mergeAllOf(s,e.path),{allOf:y,...m}=r;r={...m,...u},i=e.with({definition:r,schemaConflicts:[...e.schemaConflicts,...c]})}}let a=[...i.notViolations];if(r?.not!=null&&typeof r.not=="object"){const o=l.Value.get(t.signal),s=Ce(r.not,o,i.ajv,i.path);s&&(a=[...a,s],i=i.with({notViolations:a}))}if(r==null)return E(i,t,V(i,Y({ctx:i,controller:t}),t));if(r.enum!=null)return E(i,t,V(i,Ve({ctx:i,controller:t}),t));if(r.const!=null)return E(i,t,V(i,Ee({ctx:i,controller:t}),t));if(r.anyOf!=null)return E(i,t,V(i,Ue({ctx:i,controller:t}),t));if(r.oneOf!=null)return E(i,t,V(i,$e({ctx:i,controller:t}),t));if(r?.type==null)return V(i,Y({ctx:i,controller:t}),t);if(Array.isArray(r.type)){const s=r.type.filter(u=>u!=="null");if(s.length===1&&["string","number","integer","boolean"].includes(s[0]))switch(s[0]){case"number":return V(i,X({ctx:i,controller:t}),t);case"integer":return V(i,te({ctx:i,controller:t}),t);case"string":return V(i,ee({ctx:i,controller:t}),t);case"boolean":return V(i,ne({ctx:i,controller:t}),t)}return E(i,t,V(i,fe({ctx:i,controller:t}),t))}switch(r.type){case"number":return E(i,t,V(i,X({ctx:i,controller:t}),t));case"integer":return E(i,t,V(i,te({ctx:i,controller:t}),t));case"string":return E(i,t,V(i,ee({ctx:i,controller:t}),t));case"boolean":return E(i,t,V(i,ne({ctx:i,controller:t}),t));case"array":return E(i,t,V(i,ce({ctx:i,controller:t instanceof v.ArrayController?t:t.array()}),t));case"object":{const o=ue({ctx:i,controller:t instanceof v.ObjectController?t:t.object()});return i.isRoot?E(i,t,V(i,o,t)):E(i,t,V(i,l.html.div(l.attr.class("bc-json-schema-object"),o),t))}case"null":return E(i,t,V(i,le({ctx:i,controller:t}),t));default:return console.warn("Unknown type",r.type),E(i,t,V(i,l.html.div(l.attr.class("bc-json-schema-unknown"),"Unknown"),t))}}function xe({schema:e,controller:t,ajv:n,widgetRegistry:r,setStatus:i,formValue:a,validationMode:o,submitting:s}){const u=new A.SchemaContext({schema:e,definition:e,horizontal:!1,isPropertyRequired:!1,path:[],ajv:n,widgetRegistry:r,setStatus:i,formValue:a,validationMode:o,submitting:s});return e===!0?Y({ctx:u,controller:t}):e===!1?l.Empty:B({ctx:u,controller:t})}function E(e,t,n){return Ne(e.definition)?st({ctx:e,controller:t,children:n,options:{behavior:"hide",clearOnHide:!1}}):n}function ht(e){return e.prefixItems!=null?{isTuple:!0,prefixItems:e.prefixItems,additionalItemsSchema:Array.isArray(e.items)?!0:e.items??!0,tupleLabels:be(e)}:Array.isArray(e.items)?{isTuple:!0,prefixItems:e.items,additionalItemsSchema:e.additionalItems??!0,tupleLabels:be(e)}:{isTuple:!1,prefixItems:[],additionalItemsSchema:e.items??!0}}function be(e){if(typeof e=="boolean")return;const t=e["x:ui"];return Array.isArray(t?.tupleLabels)?t.tupleLabels:void 0}function ce({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition,a=ht(i),o=l.computedOf(t.signal)(f=>{const b=f?.length??0;return!(i.maxItems!=null&&b>=i.maxItems||a.isTuple&&b>=a.prefixItems.length&&a.additionalItemsSchema===!1)}),s=l.computedOf(t.signal)(f=>{const b=f?.length??0;return i.minItems==null||b>i.minItems}),u=l.computedOf(t.signal)(f=>{if(!i.uniqueItems||!f)return new Set;const b=new Map,S=new Set;for(let d=0;d<f.length;d++){const p=JSON.stringify(f[d]);b.has(p)?(S.add(b.get(p)),S.add(d)):b.set(p,d)}return S}),c=l.computedOf(t.signal)(f=>{if(!i.contains||!f)return{matchingIndices:new Set,count:0,isValid:!0};const b=new Set;let S=0;if(e.ajv)try{const h=e.ajv.compile(i.contains);for(let g=0;g<f.length;g++)h(f[g])&&(b.add(g),S++)}catch{}else{const h=i.contains,g=O=>{if(typeof h=="boolean")return h;if(typeof h!="object"||h==null)return!1;const C=h,N=C.type;if(N==="integer"||N==="number")return!(typeof O!="number"||!Number.isFinite(O)||N==="integer"&&!Number.isInteger(O)||typeof C.minimum=="number"&&O<C.minimum||typeof C.exclusiveMinimum=="number"&&O<=C.exclusiveMinimum||typeof C.maximum=="number"&&O>C.maximum||typeof C.exclusiveMaximum=="number"&&O>=C.exclusiveMaximum||typeof C.multipleOf=="number"&&O%C.multipleOf!==0);if(N==="string"){if(typeof O!="string"||typeof C.minLength=="number"&&O.length<C.minLength||typeof C.maxLength=="number"&&O.length>C.maxLength)return!1;if(typeof C.pattern=="string")try{if(!new RegExp(C.pattern).test(O))return!1}catch{}return!0}return!1};for(let O=0;O<f.length;O++)g(f[O])&&(b.add(O),S++)}const d=i.minContains??(i.contains?1:0),p=i.maxContains,w=S>=d&&(p==null||S<=p);return{matchingIndices:b,count:S,isValid:w,minContains:d,maxContains:p}}),y=i.contains?c.map(f=>{const b=typeof i.contains=="object"&&i.contains.title?i.contains.title:"required pattern";if(!f.isValid){if(f.count<(f.minContains??0))return`Must contain at least ${f.minContains??0} item(s) matching ${b} (currently ${f.count})`;if(f.maxContains!=null&&f.count>f.maxContains)return`Must contain at most ${f.maxContains} item(s) matching ${b} (currently ${f.count})`}return`Contains ${f.count} item(s) matching ${b}`}):null,m=k.ListControl({...$({ctx:e}),createItem:()=>{const f=t.signal.value?.length??0;if(a.isTuple&&f<a.prefixItems.length){const b=a.prefixItems[f];return G(b,()=>{})}else return G(a.additionalItemsSchema,()=>{})},controller:t,showAdd:!0,addDisabled:l.computedOf(o)(f=>!f),showRemove:!0,removeDisabled:l.computedOf(s)(f=>!f),element:f=>{const b=f.item,S=f.position.index;let d,p;a.isTuple&&S<a.prefixItems.length?(d=a.prefixItems[S],a.tupleLabels?.[S]?p=a.tupleLabels[S]:typeof d=="object"&&d.title?p=d.title:p=`Item ${S+1}`):(d=a.additionalItemsSchema,a.isTuple&&(p=`Additional Item ${S-a.prefixItems.length+1}`));const w=B({ctx:e.with({definition:d}).append(S),controller:b}),h=u.map(N=>N.has(S)),g=c.map(N=>N.matchingIndices.has(S));let O=w;p&&a.isTuple&&(O=F.Stack(l.attr.class("bc-stack--gap-1"),F.Label(l.attr.class("bc-array-control__item-label"),p),O));const C=[];return i.uniqueItems&&C.push(l.When(h,()=>F.Label(l.attr.class("bc-array-control__indicator bc-array-control__indicator--error"),"⚠️ Duplicate value"))),i.contains&&C.push(l.When(g,()=>F.Label(l.attr.class("bc-array-control__indicator bc-array-control__indicator--success"),"✓ Matches required pattern"))),C.length>0?F.Stack(l.attr.class("bc-stack--gap-1"),O,...C):O}});return i.contains&&y?F.Stack(l.attr.class("bc-stack--gap-2"),m,l.MapSignal(l.computedOf(c,y)((f,b)=>({info:f,summary:b})),({info:f,summary:b})=>F.Label(l.attr.class(f.isValid?"bc-array-control__summary bc-array-control__summary--success":"bc-array-control__summary bc-array-control__summary--error"),b))):m}function bt(e){return e.map(t=>({key:t,label:W.upperCaseFirst(t),detect:n=>Ke(n,[t])===t,convert:n=>ze(n,t),defaultValue:()=>He(t)}))}function fe({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});if(r)return r;const i=e.definition;let a=i.type??[];const o=Ge(i),s=a.includes("null"),u=a.filter(d=>d!=="null"&&(d==="string"||d==="number"||d==="integer"||d==="boolean")),c=s&&u.length===a.length-1;c&&(a=u);const y=bt(a),m=new k.UnionController(t.path,t.change,t.signal,t.status,{disabled:t.disabled},y);t.onDispose(()=>m.dispose());const f=d=>ke({options:a.map(p=>({value:p,label:W.upperCaseFirst(p)})),selected:m.activeBranch,onChange:d,mode:o.selector??"auto"}),b=d=>{m.switchToBranch(d,o.confirmBranchChange)},S=l.MapSignal(m.activeBranch,d=>{const p=l.Value.get(d),w=m.getBranchController(p);if(c&&(p==="number"||p==="integer")){const g=i;return v.Control(k.NullableNumberInput,{...$({ctx:e.with({suppressLabel:!e.isRoot})}),controller:w,min:g.minimum,max:g.maximum,step:p==="integer"?je(g.multipleOf):g.multipleOf})}const h=e.with({definition:{...i,type:p},suppressLabel:!e.isRoot});switch(p){case"string":return ee({ctx:h,controller:w});case"number":return X({ctx:h,controller:w});case"integer":return te({ctx:h,controller:w});case"boolean":return ne({ctx:h,controller:w});case"null":return le({ctx:h,controller:w});case"array":{const g=w.array();return ce({ctx:h,controller:g})}case"object":{const g=w.object();return ue({ctx:h,controller:g})}default:return v.Control(k.NullableNumberInput,{...$({ctx:h}),controller:w})}});return Ie({ctx:e,showSelector:a.length>1,selector:f(b),inner:S})}function Y({ctx:e,controller:t}){const n=T.resolveWidget(e.definition,e.name),r=R({ctx:e,controller:t,resolved:n});return r||(e.definition===!0?Y({ctx:e.with({definition:{type:["string","number","object","array","boolean","null"]}}),controller:t}):fe({ctx:e.with({definition:{...e.definition,type:["string","number","object","array","boolean","null"]}}),controller:t}))}function vt(e){if(typeof e=="boolean")return[];const t=e["x:ui"];return!t||!Array.isArray(t.crossField)?[]:t.crossField.filter(n=>typeof n=="object"&&n!=null&&typeof n.id=="string"&&Array.isArray(n.fields)&&typeof n.validate=="function")}function St(e,t,n=!1){const r=[],i=[...t].sort((a,o)=>(o.priority||0)-(a.priority||0));for(const a of i)if(!(a.onSubmitOnly&&!n))try{const o={};for(const u of a.fields)o[u]=wt(e,u);const s=a.validate(o,e);if(!s.valid){const u=a.targets||a.fields;if(s.fieldErrors)for(const[c,y]of Object.entries(s.fieldErrors))r.push({instancePath:`/${c}`,schemaPath:`#/x:ui/crossField/${a.id}`,keyword:"crossField",params:{ruleId:a.id,fields:a.fields,context:s.context},message:y});else{const c=s.message||a.message||"Cross-field validation failed";for(const y of u)r.push({instancePath:`/${y}`,schemaPath:`#/x:ui/crossField/${a.id}`,keyword:"crossField",params:{ruleId:a.id,fields:a.fields,context:s.context},message:c})}}}catch(o){console.warn(`Error in cross-field validation rule ${a.id}:`,o);const s=a.targets?.[0]||a.fields[0];r.push({instancePath:`/${s}`,schemaPath:`#/x:ui/crossField/${a.id}`,keyword:"crossField",params:{ruleId:a.id,fields:a.fields},message:"Cross-field validation error"})}return r.length>0?A.ajvErrorsToControllerValidation(r):W.Validation.valid}function wt(e,t){if(e==null||typeof e!="object")return;const n=t.split(".");let r=e;for(const i of n){if(r==null||typeof r!="object")return;if(Array.isArray(r)){const a=parseInt(i,10);if(!isNaN(a))r=r[a];else return}else r=r[i]}return r}function Ot(e){if(typeof e=="boolean")return;const t=e["x:ui"];if(!t)return;const n={};Array.isArray(t.when)&&(n.when=t.when.filter(i=>typeof i=="object"&&i!=null&&"watch"in i&&"condition"in i)),Array.isArray(t.crossField)&&(n.crossField=t.crossField.filter(i=>typeof i=="object"&&i!=null&&Array.isArray(i.fields)&&typeof i.validate=="function"));const r=vt(e);return r.length>0&&(n.crossFieldRules=r),Array.isArray(t.async)&&(n.async=t.async.filter(i=>typeof i=="object"&&i!=null&&typeof i.validate=="function")),Object.keys(n).length>0?n:void 0}function ie(e,t){if(!e.startsWith("$."))throw new Error(`Invalid JSONPath: ${e}. Must start with '$.'.`);const n=e.slice(2).split(/[.[\]]/).filter(Boolean);let r=t;for(const i of n){if(r==null)return;if(typeof r=="object"&&!Array.isArray(r))r=r[i];else if(Array.isArray(r)){const a=parseInt(i,10);if(!isNaN(a))r=r[a];else return}else return}return r}function Ct(e,t){try{if(typeof e.condition=="function"){const r=(Array.isArray(e.watch)?e.watch:[e.watch]).map(i=>ie(i,t));return e.condition(r.length===1?r[0]:r,t)}return typeof e.condition=="string"?!!ie(e.condition,t):!1}catch(n){return console.warn("Error evaluating conditional validation:",n),!1}}function At(e,t,n,r){const i=[];if(r&&!r(e)&&r.errors&&i.push(...r.errors),n.when){for(const a of n.when)if(Ct(a,t)?a.then:a.else,a.validate)try{const s=a.validate(e,t);s&&i.push({instancePath:"",schemaPath:"#/x:ui/when",keyword:"conditional",params:{},message:s})}catch(s){console.warn("Error in conditional validation:",s)}}if(n.crossField)for(const a of n.crossField)try{const o={};for(const u of a.fields)o[u]=ie(`$.${u}`,t);const s=a.validate(o,t);if(s){const u=a.target||a.fields[0];i.push({instancePath:`/${u}`,schemaPath:"#/x:ui/crossField",keyword:"crossField",params:{fields:a.fields},message:a.message||s})}}catch(o){console.warn("Error in cross-field validation:",o)}if(n.crossFieldRules&&n.crossFieldRules.length>0){const a=St(t,n.crossFieldRules);if(a.type==="invalid"){const o=jt(a);i.push(...o)}}return i.length>0?A.ajvErrorsToControllerValidation(i):W.Validation.valid}function jt(e){if(e.type==="valid")return[];const t=[];function n(r,i=""){if(r.message&&t.push({instancePath:i,schemaPath:"#/crossField",keyword:"crossField",params:{},message:r.message}),r.dependencies)for(const[a,o]of Object.entries(r.dependencies)){const s=i?`${i}/${a}`:`/${a}`;n(o,s)}}return n(e.error),t}function kt(e,t){const n=new Set;if(e.when)for(const r of e.when)(Array.isArray(r.watch)?r.watch:[r.watch]).forEach(a=>n.add(a));if(e.crossField)for(const r of e.crossField)r.fields.forEach(i=>n.add(i));return{watchedPaths:Array.from(n),shouldRevalidate:r=>Array.from(n).some(i=>r.startsWith(i)||i.startsWith(r))}}function It(e){if(typeof e=="boolean")return[];const t=e["x:ui"];return!t||!Array.isArray(t.async)?[]:t.async.filter(n=>typeof n=="object"&&n!=null&&typeof n.id=="string"&&typeof n.field=="string"&&typeof n.validate=="function")}class Nt{timeouts=new Map;validationStates=new Map;abortControllers=new Map;getValidationState(t){return this.validationStates.has(t)||this.validationStates.set(t,l.prop({isValidating:!1,result:W.Validation.valid,lastValidatedValue:void 0,lastValidatedAt:0})),this.validationStates.get(t)}async validateField(t,n,r,i=!1){const a=`${t.field}_${t.id}`,o=this.getValidationState(a),s=this.timeouts.get(a);s!==void 0&&clearTimeout(s);const u=this.abortControllers.get(a);if(u&&u.abort(),!i&&o.value.lastValidatedValue===n)return;if(t.minLength&&typeof n=="string"&&n.length<t.minLength){o.set({...o.value,result:W.Validation.valid,isValidating:!1});return}const c=setTimeout(async()=>{const y=new AbortController;this.abortControllers.set(a,y),o.set({...o.value,isValidating:!0,result:t.loadingMessage?W.Validation.invalid({message:t.loadingMessage}):o.value.result});try{const m=await t.validate(n,r);if(y.signal.aborted)return;const f=m.valid?W.Validation.valid:W.Validation.invalid({message:m.message||"Async validation failed",context:m.context});o.set({isValidating:!1,result:f,lastValidatedValue:n,lastValidatedAt:Date.now()})}catch(m){if(y.signal.aborted)return;const f=m instanceof Error?m.message:"Async validation error";o.set({isValidating:!1,result:W.Validation.invalid({message:f}),lastValidatedValue:n,lastValidatedAt:Date.now()})}finally{this.abortControllers.delete(a),this.timeouts.delete(a)}},i?0:t.debounce||300);this.timeouts.set(a,c)}cancelAll(){for(const t of this.timeouts.values())clearTimeout(t);this.timeouts.clear();for(const t of this.abortControllers.values())t.abort();this.abortControllers.clear()}getAllValidationResults(){const t={};for(const[n,r]of this.validationStates.entries()){const i=r.value;!i.isValidating&&i.result.type==="invalid"&&(t[n]=i.result)}return t}isValidating(){for(const t of this.validationStates.values())if(t.value.isValidating)return!0;return!1}dispose(){this.cancelAll();for(const t of this.validationStates.values())t.dispose();this.validationStates.clear()}}function q(e){if(typeof e!="boolean")return Pt(e)}function Pt(e){if(e.default!==void 0)return e.default;if(Array.isArray(e.examples)&&e.examples.length>0)return e.examples[0];if(e.const!==void 0)return e.const;if(Array.isArray(e.enum)&&e.enum.length>0)return e.enum[0];if(Mt(e))return null;if(e.allOf&&Array.isArray(e.allOf))return Vt(e.allOf);const t=e.oneOf??e.anyOf;if(t&&Array.isArray(t))for(const n of t){const r=q(n);if(r!==void 0)return r}return Et(e)}function Vt(e){const t={};let n=!1;for(const r of e){const i=q(r);i!==void 0&&typeof i=="object"&&i!==null&&(Object.assign(t,i),n=!0)}return n?t:void 0}function Et(e){switch(Lt(e)){case"object":return Tt(e);case"array":return Ft(e);case"string":return Wt(e);case"number":case"integer":return Rt(e);case"boolean":return!1;case"null":return null;default:return}}function Tt(e){if(!e.properties)return{};const t=new Set(e.required??[]),n={};let r=!1;for(const[i,a]of Object.entries(e.properties)){if(!t.has(i)||typeof a=="boolean")continue;const o=q(a);o!==void 0&&(n[i]=o,r=!0)}return r?n:{}}function Ft(e){const t=e.minItems??0;if(t===0)return[];const n=e.items;if(!n||typeof n=="boolean")return Array(t).fill(null);if(Array.isArray(n))return n.slice(0,t).map(i=>q(i)??null);const r=q(n);return Array(t).fill(r??null)}function Wt(e){switch(e.format){case"date":return Ut();case"date-time":return $t();case"time":return"00:00:00";default:return""}}function Rt(e){const t=e.type==="integer";let n=e.minimum,r=e.maximum;if(e.exclusiveMinimum!==void 0){const o=typeof e.exclusiveMinimum=="number"?e.exclusiveMinimum:e.exclusiveMinimum?n??0:void 0;o!==void 0&&(n=t?o+1:o+ve(e))}if(e.exclusiveMaximum!==void 0){const o=typeof e.exclusiveMaximum=="number"?e.exclusiveMaximum:e.exclusiveMaximum?r??0:void 0;o!==void 0&&(r=t?o-1:o-ve(e))}let i;n!==void 0&&r!==void 0?i=(n+r)/2:n!==void 0?i=n:r!==void 0?i=0<=r?0:r:i=0;const a=e.multipleOf;return a!==void 0&&a>0&&(i=Math.round(i/a)*a,n!==void 0&&i<n&&(i=Math.ceil(n/a)*a),r!==void 0&&i>r&&(i=Math.floor(r/a)*a)),t&&(i=Math.round(i)),i}function ve(e){return e.multipleOf!==void 0?e.multipleOf:.001}function Mt(e){return Array.isArray(e.type)?e.type.includes("null"):!1}function Lt(e){if(typeof e.type=="string")return e.type;if(Array.isArray(e.type))return e.type.find(t=>t!=="null");if(e.properties!==void 0)return"object";if(e.items!==void 0)return"array"}function Ut(){return new Date().toISOString().split("T")[0]}function $t(){return new Date().toISOString()}function Bt(e){const t=globalThis.structuredClone;return typeof t=="function"?t(e):JSON.parse(JSON.stringify(e))}function xt(e,t){try{return JSON.stringify(e)===JSON.stringify(t)}catch{return e===t}}function Dt(e){const t=new j.WidgetRegistry;for(let n=0;n<e.length;n++){const r=e[n],i=r.displayName??`custom-widget-${n}`;t.register(i,{factory:r.factory,displayName:r.displayName??`Custom Widget ${n+1}`,description:r.description,supportedTypes:r.supportedTypes,priority:r.priority??50,canFallback:!0,matcher:r.matcher})}return t}function Jt({schema:e,initialValue:t,externalSchemas:n,refResolver:r,sanitizeAdditional:i,validationMode:a,validateDebounceMs:o,customWidgets:s,applySchemaDefaults:u=!0,submitting:c},y){const m=t!==void 0?l.Value.get(t):void 0,f=q(e);let b;return t===void 0?b=f??{}:u?b=k.deepMergeDefaults(f,m):b=m,l.Async(A.getAjvForSchema(e,{externalSchemas:n,refResolver:r,sanitizeAdditional:i}),S=>{if(S.ok){const{ajv:d,validate:p}=S.value,w=Ot(e),h=It(e),g=h.length>0?new Nt:null,O=a??"onTouched",C=L=>{const U=p(L);let H;return U?H=W.Validation.valid:H=A.ajvErrorsToControllerValidation(p.errors??[]),w?At(L,L,w,p):H},{controller:N,setStatus:K}=v.useController({initialValue:b,validationMode:O,validateDebounceMs:o,validate:O==="onSubmit"?void 0:C}),I=w?kt(w):null,M=i!==!1;let P=!1;const D=M?N.signal.on(L=>{if(P)return;const U=Bt(L);p(U)&&!xt(U,L)&&(P=!0,N.change(U),P=!1)}):()=>{},x=I?N.signal.on((L,U)=>{U!=null&&JSON.stringify(L)!==JSON.stringify(U)&&setTimeout(()=>{const qe=N.status.value;K(qe)},10)}):()=>{},z=g&&h.length>0?N.signal.on(L=>{for(const U of h)g.validateField(U,L,L)}):()=>{},Z=()=>{D(),x(),z(),g?.dispose(),N.dispose()},De=s?Dt(s):void 0,Je=l.Fragment(l.OnDispose(Z),xe({schema:e,controller:N,ajv:d,widgetRegistry:De,setStatus:K,formValue:N.signal,validationMode:O,submitting:c}));return y({Form:Je,controller:N,setStatus:K})}return l.html.div(l.attr.class("bc-json-schema-form__error"),S.error)})}function qt(e,t){const r=(t?.ajv??new _e({allErrors:!0})).compile(e);return{"~standard":{version:1,vendor:"ajv",validate:i=>r(i)?{value:i}:{issues:_t(r.errors??[])},types:void 0}}}function _t(e){return e.map(t=>({message:Kt(t),path:zt(t)}))}function Kt(e){return e.message??`${e.keyword} validation failed`}function zt(e){const t=Ht(e.instancePath||"");if(e.keyword==="required"){const n=e.params.missingProperty;if(n!=null)return[...t,n]}if(e.keyword==="additionalProperties"){const n=e.params.additionalProperty;if(n!=null)return[...t,n]}if(e.keyword==="unevaluatedProperties"){const n=e.params.unevaluatedProperty;if(n!=null)return[...t,n]}return t.length>0?t:void 0}function Ht(e){return e?e.split("/").slice(1).map(n=>n.replace(/~1/g,"/").replace(/~0/g,"~")).map(n=>Gt(n)?Number(n):n):[]}function Gt(e){return/^\d+$/.test(e)}exports.SchemaContext=A.SchemaContext;exports.ajvErrorsToControllerValidation=A.ajvErrorsToControllerValidation;exports.ajvErrorsToDependencies=A.ajvErrorsToDependencies;exports.buildMessage=A.buildMessage;exports.buildPath=A.buildPath;exports.clearCaches=A.clearCaches;exports.clearCachesForAjv=A.clearCachesForAjv;exports.compileWithCache=A.compileWithCache;exports.getAjvForSchema=A.getAjvForSchema;exports.getCacheStats=A.getCacheStats;exports.jsonPointerToSegments=A.jsonPointerToSegments;exports.mergeAllOf=A.mergeAllOf;exports.createDiagnosticWidget=j.createDiagnosticWidget;exports.forFormat=j.forFormat;exports.forTypeAndFormat=j.forTypeAndFormat;exports.forXUI=j.forXUI;exports.JSONSchemaAllOf=gt;exports.JSONSchemaAny=Y;exports.JSONSchemaAnyOf=Ue;exports.JSONSchemaArray=ce;exports.JSONSchemaBoolean=ne;exports.JSONSchemaConst=Ee;exports.JSONSchemaControl=xe;exports.JSONSchemaEnum=Ve;exports.JSONSchemaForm=Jt;exports.JSONSchemaGenericControl=B;exports.JSONSchemaInteger=te;exports.JSONSchemaNull=le;exports.JSONSchemaNumber=X;exports.JSONSchemaObject=ue;exports.JSONSchemaOneOf=$e;exports.JSONSchemaString=ee;exports.JSONSchemaUnion=fe;exports.composeEffectiveObjectSchema=Ae;exports.createAJVStandardSchema=qt;exports.evaluateIfThenElseOverlay=ae;exports.evaluateNotViolation=Ce;exports.extractSchemaDefaults=q;exports.getEvaluatedProperties=J;exports.hasConditionalFeatures=Oe;
@@ -1,17 +1,17 @@
1
1
  import { attr as O, Value as j, Fragment as ce, Empty as U, WithElement as Te, Use as K, html as I, When as oe, computedOf as M, prop as X, style as Me, Ensure as We, MapSignal as re, Async as mt, OnDispose as yt } from "@tempots/dom";
2
- import { m as ve, c as $e, g as Le, a as Be, r as De, e as gt, f as Oe, S as ht, b as bt, h as we, i as vt } from "../oneof-branch-detection-B57ZDbzM.js";
3
- import { j as Nr, k as Rr, l as Vr, n as Er, o as Fr, p as Tr, q as Mr } from "../oneof-branch-detection-B57ZDbzM.js";
4
- import { B as q } from "../translations-B96REXIk.js";
5
- import { P as wt, E as St, N as xe } from "../notice-Dx4D1UOf.js";
6
- import { g as je, B as At, N as H, a as fe, b as Ot, C as jt, c as kt, d as Ct, e as Pt, f as It, h as Nt, i as Rt, S as Vt, j as Et, R as Ft, k as Tt, E as _e, W as Mt } from "../widget-customization-BZ8aKWRK.js";
7
- import { l as $r, m as Lr, n as Br, o as Dr } from "../widget-customization-BZ8aKWRK.js";
2
+ import { m as ve, c as $e, g as Le, a as Be, r as De, e as gt, f as Oe, S as ht, b as bt, h as we, i as vt } from "../oneof-branch-detection-DSzC0PkO.js";
3
+ import { j as Nr, k as Rr, l as Vr, n as Er, o as Fr, p as Tr, q as Mr } from "../oneof-branch-detection-DSzC0PkO.js";
4
+ import { B as q } from "../translations-DT5QQ4WO.js";
5
+ import { P as wt, E as St, N as xe } from "../notice-Du3tWJTW.js";
6
+ import { g as je, B as At, N as H, a as fe, b as Ot, C as jt, c as kt, d as Ct, e as Pt, f as It, h as Nt, i as Rt, S as Vt, j as Et, R as Ft, k as Tt, E as _e, W as Mt } from "../widget-customization-D2a6SVP3.js";
7
+ import { l as $r, m as Lr, n as Br, o as Dr } from "../widget-customization-D2a6SVP3.js";
8
8
  import { S as _, L as ee, M as Wt } from "../stack-BLMteGTn.js";
9
- import { I as ie, b as A, M as de, a as ke, C as Ue, O as $t, A as Lt, f as Bt } from "../use-form-CEY-gUUT.js";
9
+ import { I as ie, b as A, M as de, a as ke, C as Ue, O as $t, A as Lt, f as Bt } from "../use-form-D_TJyZhP.js";
10
10
  import { objectEntries as Ke, upperCaseFirst as qe, Validation as $ } from "@tempots/std";
11
- import { S as Dt, b as xt, N as Je, W as _t, c as Ut, t as te, e as Q, T as Kt, U as qt, f as pe, g as Jt, M as ae, G as zt, h as Ht, L as Gt, i as Xt, j as Yt } from "../deep-merge-D1cBNWZX.js";
11
+ import { S as Dt, b as xt, N as Je, W as _t, c as Ut, t as te, e as Q, T as Kt, U as qt, f as pe, g as Jt, M as ae, G as zt, h as Ht, L as Gt, i as Xt, j as Yt } from "../deep-merge-DwXDd3iF.js";
12
12
  import { r as V } from "../utils-vUtP6iPG.js";
13
- import { m as Zt, T as Qt } from "../text-input-DEAddaOi.js";
14
- import { B as ze } from "../input-container-Q9wL2BUl.js";
13
+ import { m as Zt, T as Qt } from "../text-input-BAn02BzO.js";
14
+ import { B as ze } from "../input-container-CO3DNqpp.js";
15
15
  import en from "ajv";
16
16
  function tn(e) {
17
17
  if (!e || typeof e != "object") return !1;