@tempots/beatui 0.82.0 → 0.82.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 (173) hide show
  1. package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
  2. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +63 -1351
  5. package/dist/auth-divider-BqZPH1-z.cjs +1 -0
  6. package/dist/auth-divider-Wr-S16kF.js +1355 -0
  7. package/dist/beatui.css +1347 -0
  8. package/dist/beatui.tailwind.css +1347 -0
  9. package/dist/better-auth/index.cjs.js +1 -0
  10. package/dist/better-auth/index.es.js +754 -0
  11. package/dist/{deep-merge-CiOwVWn8.js → deep-merge-BYm0y62g.js} +34 -33
  12. package/dist/deep-merge-d7sf0xmN.cjs +1 -0
  13. package/dist/duration-input-B9UNmUCh.cjs +1 -0
  14. package/dist/{duration-input-B3vnnwBZ.js → duration-input-DqcJbxKD.js} +23 -22
  15. package/dist/editor-toolbar-group--a-xgsJw.cjs +1 -0
  16. package/dist/editor-toolbar-group-CVpl5mxF.js +31 -0
  17. package/dist/{hls.light.min-Bhrf47iR.cjs → hls.light.min-C6xKDzRR.cjs} +1 -1
  18. package/dist/{hls.light.min-C6VwviEa.js → hls.light.min-hEMf_E8u.js} +1 -1
  19. package/dist/{index-C5YCCgnn.cjs → index-05UbKOYe.cjs} +1 -1
  20. package/dist/{index-ChsRjiIp.cjs → index-Bt7FYl80.cjs} +19 -19
  21. package/dist/{index-DT6-HMMz.js → index-C2Lq1m45.js} +1432 -1462
  22. package/dist/{index-CiAVfKIZ.js → index-lYhXnu6I.js} +1 -1
  23. package/dist/index.cjs.js +4 -4
  24. package/dist/index.es.js +2326 -2680
  25. package/dist/input-container-C6qEIjcA.cjs +1 -0
  26. package/dist/input-container-DiCjOzR2.js +247 -0
  27. package/dist/json-schema/index.cjs.js +1 -1
  28. package/dist/json-schema/index.es.js +33 -32
  29. package/dist/json-schema-display/index.cjs.js +1 -1
  30. package/dist/json-schema-display/index.es.js +1 -1
  31. package/dist/json-structure/index.cjs.js +1 -1
  32. package/dist/json-structure/index.es.js +542 -700
  33. package/dist/lexical/index.cjs.js +46 -0
  34. package/dist/lexical/index.es.js +21370 -0
  35. package/dist/lexical.css +1124 -0
  36. package/dist/menu-CZzRsQP_.js +372 -0
  37. package/dist/menu-ClrU72xH.cjs +1 -0
  38. package/dist/modal-I5srcntN.cjs +1 -0
  39. package/dist/modal-v3u2Fpnd.js +488 -0
  40. package/dist/{notice-CZHWWwOQ.js → notice-BuZvdvZh.js} +48 -47
  41. package/dist/notice-CLDdy1MW.cjs +1 -0
  42. package/dist/{oneof-branch-detection-C8g3eWnx.cjs → oneof-branch-detection-DsM1K5xc.cjs} +1 -1
  43. package/dist/{oneof-branch-detection-BVNoKU9d.js → oneof-branch-detection-Dt8ss9lc.js} +1 -1
  44. package/dist/prosemirror/index.cjs.js +1 -1
  45. package/dist/prosemirror/index.es.js +1 -1
  46. package/dist/session-id-3KiilioY.js +8 -0
  47. package/dist/session-id-B5lJMzbB.cjs +1 -0
  48. package/dist/styles-url-B2dzXrYt.cjs +1 -0
  49. package/dist/styles-url-Cw_mxshe.js +4 -0
  50. package/dist/text-input-B3VBat1k.js +44 -0
  51. package/dist/text-input-Ds8e7Z1G.cjs +1 -0
  52. package/dist/{toolbar-DR2Zd4Oo.js → toolbar-D994_E_s.js} +4 -4
  53. package/dist/toolbar-x0_8lmKu.cjs +1 -0
  54. package/dist/types/better-auth/bridge.d.ts +2 -0
  55. package/dist/types/better-auth/callbacks.d.ts +6 -0
  56. package/dist/types/better-auth/components/authenticated.d.ts +4 -0
  57. package/dist/types/better-auth/components/better-auth-container.d.ts +4 -0
  58. package/dist/types/better-auth/components/better-auth-modal.d.ts +4 -0
  59. package/dist/types/better-auth/components/magic-link-form.d.ts +7 -0
  60. package/dist/types/better-auth/components/passkey-management.d.ts +6 -0
  61. package/dist/types/better-auth/components/passkey-signin.d.ts +12 -0
  62. package/dist/types/better-auth/components/two-factor-setup.d.ts +8 -0
  63. package/dist/types/better-auth/components/two-factor-verify.d.ts +10 -0
  64. package/dist/types/better-auth/i18n/default.d.ts +29 -0
  65. package/dist/types/better-auth/i18n/locales/en.d.ts +28 -0
  66. package/dist/types/better-auth/i18n/translations.d.ts +27 -0
  67. package/dist/types/better-auth/index.d.ts +22 -0
  68. package/dist/types/better-auth/provider.d.ts +6 -0
  69. package/dist/types/better-auth/session.d.ts +14 -0
  70. package/dist/types/better-auth/social-mapping.d.ts +2 -0
  71. package/dist/types/better-auth/types.d.ts +164 -0
  72. package/dist/types/components/auth/auth-container.d.ts +1 -1
  73. package/dist/types/components/auth/social-providers.d.ts +1 -1
  74. package/dist/types/components/auth/types.d.ts +2 -0
  75. package/dist/types/components/editor-toolbar/editor-toolbar-button.d.ts +16 -0
  76. package/dist/types/components/editor-toolbar/editor-toolbar-group.d.ts +9 -0
  77. package/dist/types/components/editor-toolbar/index.d.ts +2 -0
  78. package/dist/types/components/json-structure/controls/control-utils.d.ts +19 -0
  79. package/dist/types/components/json-structure/controls/index.d.ts +1 -0
  80. package/dist/types/components/lexical/bare-editor.d.ts +29 -0
  81. package/dist/types/components/lexical/code/index.d.ts +1 -0
  82. package/dist/types/components/lexical/code/language-selector.d.ts +13 -0
  83. package/dist/types/components/lexical/contextual-editor.d.ts +22 -0
  84. package/dist/types/components/lexical/docked-editor.d.ts +23 -0
  85. package/dist/types/components/lexical/floating/block-handle.d.ts +16 -0
  86. package/dist/types/components/lexical/floating/floating-toolbar.d.ts +12 -0
  87. package/dist/types/components/lexical/floating/index.d.ts +6 -0
  88. package/dist/types/components/lexical/floating/slash-command-palette.d.ts +20 -0
  89. package/dist/types/components/lexical/index.d.ts +8 -0
  90. package/dist/types/components/lexical/lexical-editor-input.d.ts +30 -0
  91. package/dist/types/components/lexical/table/index.d.ts +1 -0
  92. package/dist/types/components/lexical/table/table-controls.d.ts +12 -0
  93. package/dist/types/components/lexical/toolbar/index.d.ts +6 -0
  94. package/dist/types/components/lexical/toolbar/lexical-toolbar.d.ts +12 -0
  95. package/dist/types/components/lexical/toolbar/toolbar-button.d.ts +1 -0
  96. package/dist/types/components/lexical/toolbar/toolbar-group.d.ts +1 -0
  97. package/dist/types/components/lexical/toolbar/toolbar-helpers.d.ts +30 -0
  98. package/dist/types/components/prosemirror/etoolbar-button.d.ts +1 -11
  99. package/dist/types/components/prosemirror/etoolbar-group.d.ts +1 -4
  100. package/dist/types/lexical/commands/index.d.ts +17 -0
  101. package/dist/types/lexical/headless.d.ts +39 -0
  102. package/dist/types/lexical/horizontal-rule-node.d.ts +20 -0
  103. package/dist/types/lexical/index.d.ts +20 -0
  104. package/dist/types/lexical/lazy-loader.d.ts +35 -0
  105. package/dist/types/lexical/nodes.d.ts +29 -0
  106. package/dist/types/lexical/plugins/auto-link.d.ts +7 -0
  107. package/dist/types/lexical/plugins/clipboard.d.ts +11 -0
  108. package/dist/types/lexical/plugins/code-shiki.d.ts +11 -0
  109. package/dist/types/lexical/plugins/code.d.ts +7 -0
  110. package/dist/types/lexical/plugins/dragon.d.ts +6 -0
  111. package/dist/types/lexical/plugins/file-io.d.ts +10 -0
  112. package/dist/types/lexical/plugins/hashtag.d.ts +7 -0
  113. package/dist/types/lexical/plugins/history.d.ts +7 -0
  114. package/dist/types/lexical/plugins/horizontal-rule.d.ts +12 -0
  115. package/dist/types/lexical/plugins/html-io.d.ts +9 -0
  116. package/dist/types/lexical/plugins/index.d.ts +24 -0
  117. package/dist/types/lexical/plugins/link.d.ts +6 -0
  118. package/dist/types/lexical/plugins/list.d.ts +6 -0
  119. package/dist/types/lexical/plugins/mark.d.ts +15 -0
  120. package/dist/types/lexical/plugins/markdown-io.d.ts +13 -0
  121. package/dist/types/lexical/plugins/offset.d.ts +6 -0
  122. package/dist/types/lexical/plugins/overflow.d.ts +7 -0
  123. package/dist/types/lexical/plugins/plain-text.d.ts +6 -0
  124. package/dist/types/lexical/plugins/rich-text.d.ts +6 -0
  125. package/dist/types/lexical/plugins/selection.d.ts +6 -0
  126. package/dist/types/lexical/plugins/slash-commands.d.ts +26 -0
  127. package/dist/types/lexical/plugins/table.d.ts +11 -0
  128. package/dist/types/lexical/plugins/text.d.ts +13 -0
  129. package/dist/types/lexical/plugins/yjs.d.ts +9 -0
  130. package/dist/types/lexical/styles-url.d.ts +2 -0
  131. package/dist/types/lexical/styles.d.ts +2 -0
  132. package/dist/types/lexical/types.d.ts +634 -0
  133. package/dist/types/lexical-i18n/default.d.ts +92 -0
  134. package/dist/types/lexical-i18n/index.d.ts +21 -0
  135. package/dist/types/lexical-i18n/locales/ar.d.ts +91 -0
  136. package/dist/types/lexical-i18n/locales/de.d.ts +91 -0
  137. package/dist/types/lexical-i18n/locales/en.d.ts +91 -0
  138. package/dist/types/lexical-i18n/locales/es.d.ts +91 -0
  139. package/dist/types/lexical-i18n/locales/fa.d.ts +91 -0
  140. package/dist/types/lexical-i18n/locales/fr.d.ts +91 -0
  141. package/dist/types/lexical-i18n/locales/he.d.ts +91 -0
  142. package/dist/types/lexical-i18n/locales/hi.d.ts +91 -0
  143. package/dist/types/lexical-i18n/locales/it.d.ts +91 -0
  144. package/dist/types/lexical-i18n/locales/ja.d.ts +91 -0
  145. package/dist/types/lexical-i18n/locales/ko.d.ts +91 -0
  146. package/dist/types/lexical-i18n/locales/nl.d.ts +91 -0
  147. package/dist/types/lexical-i18n/locales/pl.d.ts +91 -0
  148. package/dist/types/lexical-i18n/locales/pt.d.ts +91 -0
  149. package/dist/types/lexical-i18n/locales/ru.d.ts +91 -0
  150. package/dist/types/lexical-i18n/locales/tr.d.ts +91 -0
  151. package/dist/types/lexical-i18n/locales/ur.d.ts +91 -0
  152. package/dist/types/lexical-i18n/locales/vi.d.ts +91 -0
  153. package/dist/types/lexical-i18n/locales/zh.d.ts +91 -0
  154. package/dist/types/lexical-i18n/translations.d.ts +21 -0
  155. package/dist/use-animated-toggle-ChycsEoj.js +175 -0
  156. package/dist/use-animated-toggle-DR6CyMac.cjs +1 -0
  157. package/dist/{use-form-CgZyrACX.js → use-form-B56E_x5Y.js} +83 -88
  158. package/dist/use-form-Cnp3XQ5X.cjs +2 -0
  159. package/dist/widget-customization-Dk7XcVly.cjs +1 -0
  160. package/dist/{widget-customization-DRA7E9Zf.js → widget-customization-Ds9sicAg.js} +106 -105
  161. package/package.json +48 -3
  162. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  163. package/dist/_commonjsHelpers-DwGv2jUC.cjs +0 -1
  164. package/dist/deep-merge-DxZqCkE5.cjs +0 -1
  165. package/dist/duration-input-Dg5SX3lM.cjs +0 -1
  166. package/dist/modal-D2xE47kr.cjs +0 -1
  167. package/dist/modal-hkQD1bqZ.js +0 -655
  168. package/dist/notice-C0SmlheE.cjs +0 -1
  169. package/dist/text-input-CByq5OIo.cjs +0 -1
  170. package/dist/text-input-CFJntP7G.js +0 -287
  171. package/dist/toolbar-TPWYzoiF.cjs +0 -1
  172. package/dist/use-form-JjeKCINk.cjs +0 -2
  173. package/dist/widget-customization-G-QLB1rw.cjs +0 -1
@@ -1,75 +1,76 @@
1
- import { _ as J, g as Ke } from "../string-DYyMxBl-.js";
2
- import { html as p, attr as m, Fragment as Z, MapSignal as U, Value as I, computedOf as w, prop as Je, WithElement as Ze, OnDispose as He } from "@tempots/dom";
3
- import { b, a as ne, I as B, d as Xe, f as re, A as G, g as Ye } from "../use-form-CgZyrACX.js";
4
- import { t as H, N as Qe, b as pe, c as de, U as et, e as tt, a as nt, T as rt, L as fe, f as me, g as it, G as st, h as at, S as ut, i as ot } from "../deep-merge-CiOwVWn8.js";
5
- import { T as ct, B as V } from "../text-input-CFJntP7G.js";
6
- import { N as lt, B as pt, D as dt, a as ft, P as mt, b as yt, c as gt, d as ht, e as bt, F as vt } from "../duration-input-B3vnnwBZ.js";
7
- import { l as xt } from "../colors-DPo9GEJR.js";
8
- import { S as E, L as ye, M as $t, i as ie } from "../stack-BJgsPJ9A.js";
9
- function It(e) {
1
+ import { _ as H, g as Ze } from "../string-DYyMxBl-.js";
2
+ import { html as p, attr as m, Fragment as X, MapSignal as W, Value as I, computedOf as T, prop as He, WithElement as Xe, OnDispose as Ye } from "@tempots/dom";
3
+ import { b, a as ie, I as _, d as Qe, f as se, A as J, g as et } from "../use-form-B56E_x5Y.js";
4
+ import { e as Y, N as tt, f as fe, g as me, U as nt, c as rt, a as it, T as st, L as ye, b as ge, h as at, G as ut, i as ot, S as ct, j as lt } from "../deep-merge-BYm0y62g.js";
5
+ import { T as pt } from "../text-input-B3VBat1k.js";
6
+ import { N as dt, B as ft, D as mt, a as yt, P as gt, b as ht, c as bt, d as vt, e as xt, F as $t } from "../duration-input-DqcJbxKD.js";
7
+ import { l as It } from "../colors-DPo9GEJR.js";
8
+ import { B as U } from "../input-container-DiCjOzR2.js";
9
+ import { S as B, L as he, M as Tt, i as ae } from "../stack-BJgsPJ9A.js";
10
+ function wt(e) {
10
11
  return e === "int64" || e === "int128" || e === "uint64" || e === "uint128";
11
12
  }
12
- function P(e) {
13
+ function F(e) {
13
14
  return e === "int8" || e === "int16" || e === "int32" || e === "int64" || e === "int128" || e === "uint8" || e === "uint16" || e === "uint32" || e === "uint64" || e === "uint128";
14
15
  }
15
- function X(e) {
16
+ function Q(e) {
16
17
  return e === "float" || e === "double" || e === "decimal";
17
18
  }
18
- function wt(e) {
19
- return P(e) || X(e);
19
+ function jt(e) {
20
+ return F(e) || Q(e);
20
21
  }
21
- function Y(e) {
22
+ function ee(e) {
22
23
  return e === "date" || e === "datetime" || e === "time" || e === "duration";
23
24
  }
24
- function Tt(e) {
25
- return e === "string" || e === "boolean" || e === "null" || wt(e) || Y(e) || e === "uuid" || e === "uri" || e === "binary";
25
+ function Mt(e) {
26
+ return e === "string" || e === "boolean" || e === "null" || jt(e) || ee(e) || e === "uuid" || e === "uri" || e === "binary";
26
27
  }
27
- function cr(e) {
28
+ function tr(e) {
28
29
  return e === "object" || e === "array" || e === "set" || e === "map" || e === "tuple" || e === "choice" || e === "any";
29
30
  }
30
- function C(e) {
31
+ function O(e) {
31
32
  return typeof e == "object" && e !== null && "$ref" in e;
32
33
  }
33
- function jt(e) {
34
+ function St(e) {
34
35
  return typeof e == "object" && e !== null && !("type" in e) && !("$ref" in e) && !("enum" in e) && !("const" in e);
35
36
  }
36
- function At(e) {
37
+ function Dt(e) {
37
38
  return typeof e == "object" && e !== null && ("type" in e || "$ref" in e || "enum" in e || "const" in e);
38
39
  }
39
- function k(e) {
40
+ function R(e) {
40
41
  return e.type === "object" && "properties" in e;
41
42
  }
42
- function ge(e) {
43
+ function be(e) {
43
44
  return e.type === "array" && "items" in e;
44
45
  }
45
- function he(e) {
46
+ function ve(e) {
46
47
  return e.type === "set" && "items" in e;
47
48
  }
48
- function be(e) {
49
+ function xe(e) {
49
50
  return e.type === "map" && "values" in e;
50
51
  }
51
- function ve(e) {
52
+ function $e(e) {
52
53
  return e.type === "tuple" && "tuple" in e;
53
54
  }
54
- function xe(e) {
55
+ function Ie(e) {
55
56
  return e.type === "choice" && "choices" in e;
56
57
  }
57
- function Mt(e) {
58
+ function At(e) {
58
59
  return "enum" in e && Array.isArray(e.enum);
59
60
  }
60
- function Dt(e) {
61
+ function Ct(e) {
61
62
  return "const" in e;
62
63
  }
63
- function se(e) {
64
- return e === void 0 ? null : typeof e == "string" || Array.isArray(e) ? e : (C(e), null);
64
+ function ue(e) {
65
+ return e === void 0 ? null : typeof e == "string" || Array.isArray(e) ? e : (O(e), null);
65
66
  }
66
- function St(e) {
67
+ function Ot(e) {
67
68
  return e === void 0 ? !1 : e === "null" ? !0 : Array.isArray(e) ? e.includes("null") : !1;
68
69
  }
69
- function Q(e) {
70
+ function te(e) {
70
71
  return typeof e == "string" ? e === "null" ? [] : [e] : Array.isArray(e) ? e.filter((t) => t !== "null") : [];
71
72
  }
72
- const W = {
73
+ const z = {
73
74
  int8: { min: -128n, max: 127n },
74
75
  int16: { min: -32768n, max: 32767n },
75
76
  int32: { min: -2147483648n, max: 2147483647n },
@@ -84,10 +85,10 @@ const W = {
84
85
  uint64: { min: 0n, max: 18446744073709551615n },
85
86
  uint128: { min: 0n, max: 340282366920938463463374607431768211455n }
86
87
  };
87
- function Ot(e) {
88
+ function Nt(e) {
88
89
  return e.startsWith("#/") ? e.slice(2).split("/") : e.includes("/") ? e.split("/") : ["definitions", e];
89
90
  }
90
- function Ct(e, t) {
91
+ function Rt(e, t) {
91
92
  let n = e;
92
93
  for (const r of t) {
93
94
  if (n == null || typeof n != "object")
@@ -96,23 +97,23 @@ function Ct(e, t) {
96
97
  }
97
98
  return n;
98
99
  }
99
- function N(e, t) {
100
- const n = Ot(e), r = Ct(t, n);
100
+ function k(e, t) {
101
+ const n = Nt(e), r = Rt(t, n);
101
102
  if (r == null) {
102
103
  console.warn(`Failed to resolve $ref: ${e}`);
103
104
  return;
104
105
  }
105
- if (At(r))
106
+ if (Dt(r))
106
107
  return r;
107
- if (jt(r)) {
108
+ if (St(r)) {
108
109
  console.warn(`$ref "${e}" points to a namespace, not a type definition`);
109
110
  return;
110
111
  }
111
112
  }
112
- function lr(e, t) {
113
- return N(e.$ref, t);
113
+ function nr(e, t) {
114
+ return k(e.$ref, t);
114
115
  }
115
- class Rt {
116
+ class kt {
116
117
  schema;
117
118
  visited = /* @__PURE__ */ new Set();
118
119
  constructor(t) {
@@ -128,8 +129,8 @@ class Rt {
128
129
  }
129
130
  this.visited.add(t);
130
131
  try {
131
- const n = N(t, this.schema);
132
- if (n?.type && C(n.type)) {
132
+ const n = k(t, this.schema);
133
+ if (n?.type && O(n.type)) {
133
134
  const r = this.resolve(n.type.$ref);
134
135
  if (r) {
135
136
  const { type: s, ...a } = n;
@@ -145,7 +146,7 @@ class Rt {
145
146
  * Resolve a type definition, handling any $ref in its type specifier
146
147
  */
147
148
  resolveDefinition(t) {
148
- if (t.type && C(t.type)) {
149
+ if (t.type && O(t.type)) {
149
150
  const n = this.resolve(t.type.$ref);
150
151
  if (n) {
151
152
  const { type: r, ...s } = t;
@@ -161,10 +162,10 @@ class Rt {
161
162
  this.visited.clear();
162
163
  }
163
164
  }
164
- function ee(e) {
165
- return new Rt(e);
165
+ function ne(e) {
166
+ return new kt(e);
166
167
  }
167
- class te {
168
+ class re {
168
169
  schema;
169
170
  definition;
170
171
  path;
@@ -175,13 +176,13 @@ class te {
175
176
  suppressLabel;
176
177
  refResolver;
177
178
  constructor(t) {
178
- this.schema = t.schema, this.definition = t.definition, this.path = t.path, this.readOnly = t.readOnly ?? !1, this.locale = t.locale, this.widgetRegistry = t.widgetRegistry, this.isPropertyRequired = t.isPropertyRequired ?? !1, this.suppressLabel = t.suppressLabel ?? !1, this.refResolver = t.refResolver ?? ee(t.schema);
179
+ this.schema = t.schema, this.definition = t.definition, this.path = t.path, this.readOnly = t.readOnly ?? !1, this.locale = t.locale, this.widgetRegistry = t.widgetRegistry, this.isPropertyRequired = t.isPropertyRequired ?? !1, this.suppressLabel = t.suppressLabel ?? !1, this.refResolver = t.refResolver ?? ne(t.schema);
179
180
  }
180
181
  /**
181
182
  * Create a new context with updated fields
182
183
  */
183
184
  with(t) {
184
- return new te({
185
+ return new re({
185
186
  schema: this.schema,
186
187
  definition: t.definition ?? this.definition,
187
188
  path: t.path ?? this.path,
@@ -224,24 +225,24 @@ class te {
224
225
  get resolvedType() {
225
226
  const t = this.definition.type;
226
227
  if (!t) return null;
227
- if (C(t)) {
228
+ if (O(t)) {
228
229
  const n = this.refResolver.resolve(t.$ref);
229
- return n?.type ? se(n.type) : null;
230
+ return n?.type ? ue(n.type) : null;
230
231
  }
231
- return se(t);
232
+ return ue(t);
232
233
  }
233
234
  /**
234
235
  * Get the primary type (first non-null type)
235
236
  */
236
237
  get primaryType() {
237
238
  const t = this.resolvedType;
238
- return t ? typeof t == "string" ? t === "null" ? null : t : Q(t)[0] ?? null : null;
239
+ return t ? typeof t == "string" ? t === "null" ? null : t : te(t)[0] ?? null : null;
239
240
  }
240
241
  /**
241
242
  * Check if this type is nullable
242
243
  */
243
244
  get isNullable() {
244
- return St(this.definition.type);
245
+ return Ot(this.definition.type);
245
246
  }
246
247
  /**
247
248
  * Check if this is a required field
@@ -272,7 +273,7 @@ class te {
272
273
  */
273
274
  get isPrimitive() {
274
275
  const t = this.primaryType;
275
- return t != null && Tt(t);
276
+ return t != null && Mt(t);
276
277
  }
277
278
  /**
278
279
  * Get the description from the definition
@@ -320,7 +321,7 @@ class te {
320
321
  if (this.definition.name)
321
322
  return this.definition.name;
322
323
  const t = this.name;
323
- return t ? J(Ke(t)) : "";
324
+ return t ? H(Ze(t)) : "";
324
325
  }
325
326
  /**
326
327
  * Get altnames from the definition
@@ -374,14 +375,14 @@ class te {
374
375
  return this.definition.format;
375
376
  }
376
377
  }
377
- function kt(e, t) {
378
+ function Pt(e, t) {
378
379
  let n;
379
- const r = ee(e);
380
+ const r = ne(e);
380
381
  if (e.$root) {
381
382
  const s = r.resolve(e.$root);
382
383
  s ? n = s : (console.warn(`Failed to resolve $root: ${e.$root}`), n = e);
383
384
  } else e.type || e.properties ? n = e : n = { type: "any" };
384
- return new te({
385
+ return new re({
385
386
  schema: e,
386
387
  definition: n,
387
388
  path: [],
@@ -391,7 +392,7 @@ function kt(e, t) {
391
392
  refResolver: r
392
393
  });
393
394
  }
394
- function $e(e, t, n) {
395
+ function Te(e, t, n) {
395
396
  const r = [], s = [];
396
397
  if (!e.$extends)
397
398
  return { merged: e, inheritanceChain: r, errors: s };
@@ -411,7 +412,7 @@ function $e(e, t, n) {
411
412
  continue;
412
413
  }
413
414
  u.add(f), r.push(f);
414
- const g = N(f, t);
415
+ const g = k(f, t);
415
416
  if (!g) {
416
417
  s.push({
417
418
  path: f,
@@ -427,26 +428,26 @@ function $e(e, t, n) {
427
428
  }
428
429
  return h;
429
430
  }, o = i(a);
430
- return { merged: Nt(o, e), inheritanceChain: r, errors: s };
431
+ return { merged: qt(o, e), inheritanceChain: r, errors: s };
431
432
  }
432
- function Nt(e, t) {
433
+ function qt(e, t) {
433
434
  if (e.length === 0)
434
435
  return t;
435
436
  let n = { ...e[0] };
436
437
  for (let a = 1; a < e.length; a++)
437
- n = ae(n, e[a]);
438
- n = ae(n, t);
438
+ n = oe(n, e[a]);
439
+ n = oe(n, t);
439
440
  const { $extends: r, ...s } = n;
440
441
  return s;
441
442
  }
442
- function ae(e, t) {
443
- return k(e) && k(t) ? qt(e, t) : { ...e, ...t };
443
+ function oe(e, t) {
444
+ return R(e) && R(t) ? Ft(e, t) : { ...e, ...t };
444
445
  }
445
- function qt(e, t) {
446
+ function Ft(e, t) {
446
447
  const n = {
447
448
  ...e.properties ?? {},
448
449
  ...t.properties ?? {}
449
- }, r = ue(e.required), s = ue(t.required), a = Pt([...r, ...s]), u = {
450
+ }, r = ce(e.required), s = ce(t.required), a = Lt([...r, ...s]), u = {
450
451
  ...e,
451
452
  ...t,
452
453
  type: "object",
@@ -454,19 +455,19 @@ function qt(e, t) {
454
455
  };
455
456
  return a.length > 0 && (u.required = a), u;
456
457
  }
457
- function ue(e) {
458
+ function ce(e) {
458
459
  return e ? e.length === 0 ? [] : Array.isArray(e[0]) ? e.flat() : e : [];
459
460
  }
460
- function Pt(e) {
461
+ function Lt(e) {
461
462
  return [...new Set(e)];
462
463
  }
463
- function pr(e) {
464
- const t = ee(e);
464
+ function rr(e) {
465
+ const t = ne(e);
465
466
  return {
466
- resolve: (n) => (t.reset(), $e(n, e))
467
+ resolve: (n) => (t.reset(), Te(n, e))
467
468
  };
468
469
  }
469
- function Ft() {
470
+ function Et() {
470
471
  return p.span(
471
472
  m.class("bc-json-structure-deprecated-badge"),
472
473
  m.style(
@@ -475,59 +476,59 @@ function Ft() {
475
476
  "(deprecated)"
476
477
  );
477
478
  }
478
- function T(e, t) {
479
- return !e || !t ? e ?? "" : p.span(e, Ft());
479
+ function w(e, t) {
480
+ return !e || !t ? e ?? "" : p.span(e, Et());
480
481
  }
481
- function Lt(e) {
482
+ function Vt(e) {
482
483
  const t = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
483
484
  return {
484
- label: e.suppressLabel ? void 0 : T(e.label, e.isDeprecated),
485
+ label: e.suppressLabel ? void 0 : w(e.label, e.isDeprecated),
485
486
  description: e.description,
486
487
  required: e.isRequired,
487
488
  disabled: e.readOnly || e.isDeprecated,
488
489
  placeholder: t
489
490
  };
490
491
  }
491
- function Ie({
492
+ function we({
492
493
  ctx: e,
493
494
  controller: t
494
495
  }) {
495
- const n = Lt(e);
496
- return b(ct, {
496
+ const n = Vt(e);
497
+ return b(pt, {
497
498
  ...n,
498
- controller: H(t)
499
+ controller: Y(t)
499
500
  });
500
501
  }
501
- function Vt(e) {
502
+ function Ut(e) {
502
503
  return {
503
- label: e.suppressLabel ? void 0 : T(e.label, e.isDeprecated),
504
+ label: e.suppressLabel ? void 0 : w(e.label, e.isDeprecated),
504
505
  description: e.description,
505
506
  required: e.isRequired,
506
507
  disabled: e.readOnly || e.isDeprecated
507
508
  };
508
509
  }
509
- function we({
510
+ function je({
510
511
  ctx: e,
511
512
  controller: t
512
513
  }) {
513
- const n = Vt(e), r = b(ne, {
514
+ const n = Ut(e), r = b(ie, {
514
515
  ...n,
515
516
  controller: t
516
517
  });
517
- return e.isNullable ? b(ne, {
518
+ return e.isNullable ? b(ie, {
518
519
  ...n,
519
520
  controller: t,
520
- after: Qe(
521
+ after: tt(
521
522
  t.signal,
522
523
  t.disabled,
523
524
  (s) => t.change(s)
524
525
  )
525
526
  }) : r;
526
527
  }
527
- function Et(e, t) {
528
- const n = W[t], r = Te(e, n.min), s = je(e, n.max), a = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
528
+ function Bt(e, t) {
529
+ const n = z[t], r = Me(e, n.min), s = Se(e, n.max), a = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
529
530
  return {
530
- label: e.suppressLabel ? void 0 : T(e.label, e.isDeprecated),
531
+ label: e.suppressLabel ? void 0 : w(e.label, e.isDeprecated),
531
532
  description: e.description,
532
533
  required: e.isRequired,
533
534
  disabled: e.readOnly || e.isDeprecated,
@@ -538,10 +539,10 @@ function Et(e, t) {
538
539
  placeholder: a
539
540
  };
540
541
  }
541
- function Ut(e, t) {
542
- const n = W[t], r = Te(e, n.min), s = je(e, n.max), a = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
542
+ function Wt(e, t) {
543
+ const n = z[t], r = Me(e, n.min), s = Se(e, n.max), a = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
543
544
  return {
544
- label: e.suppressLabel ? void 0 : T(e.label, e.isDeprecated),
545
+ label: e.suppressLabel ? void 0 : w(e.label, e.isDeprecated),
545
546
  description: e.description,
546
547
  required: e.isRequired,
547
548
  disabled: e.readOnly || e.isDeprecated,
@@ -551,7 +552,7 @@ function Ut(e, t) {
551
552
  placeholder: a
552
553
  };
553
554
  }
554
- function Te(e, t) {
555
+ function Me(e, t) {
555
556
  const n = e.definition;
556
557
  if (n.minimum !== void 0) {
557
558
  const r = typeof n.minimum == "string" ? BigInt(n.minimum) : n.minimum;
@@ -563,7 +564,7 @@ function Te(e, t) {
563
564
  }
564
565
  return t >= BigInt(Number.MIN_SAFE_INTEGER) && t <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(t) : t;
565
566
  }
566
- function je(e, t) {
567
+ function Se(e, t) {
567
568
  const n = e.definition;
568
569
  if (n.maximum !== void 0) {
569
570
  const r = typeof n.maximum == "string" ? BigInt(n.maximum) : n.maximum;
@@ -575,31 +576,31 @@ function je(e, t) {
575
576
  }
576
577
  return t >= BigInt(Number.MIN_SAFE_INTEGER) && t <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(t) : t;
577
578
  }
578
- function Ae({
579
+ function De({
579
580
  ctx: e,
580
581
  controller: t,
581
582
  intType: n
582
583
  }) {
583
- if (It(n)) {
584
- const s = Ut(e, n);
585
- return e.isNullable ? b(lt, {
584
+ if (wt(n)) {
585
+ const s = Wt(e, n);
586
+ return e.isNullable ? b(dt, {
586
587
  ...s,
587
588
  controller: t
588
- }) : b(pt, {
589
+ }) : b(ft, {
589
590
  ...s,
590
591
  controller: t
591
592
  });
592
593
  }
593
- const r = Et(e, n);
594
- return e.isNullable ? b(pe, {
594
+ const r = Bt(e, n);
595
+ return e.isNullable ? b(fe, {
595
596
  ...r,
596
597
  controller: t
597
- }) : b(de, {
598
+ }) : b(me, {
598
599
  ...r,
599
600
  controller: t
600
601
  });
601
602
  }
602
- function Bt(e, t) {
603
+ function _t(e, t) {
603
604
  const n = e.definition;
604
605
  let r;
605
606
  n.multipleOf !== void 0 ? r = n.multipleOf : t === "decimal" && n.scale !== void 0 ? r = Math.pow(10, -n.scale) : r = void 0;
@@ -613,7 +614,7 @@ function Bt(e, t) {
613
614
  }
614
615
  const c = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
615
616
  return {
616
- label: e.suppressLabel ? void 0 : T(e.label, e.isDeprecated),
617
+ label: e.suppressLabel ? void 0 : w(e.label, e.isDeprecated),
617
618
  description: o,
618
619
  required: e.isRequired,
619
620
  disabled: e.readOnly || e.isDeprecated,
@@ -623,137 +624,137 @@ function Bt(e, t) {
623
624
  placeholder: c
624
625
  };
625
626
  }
626
- function Me({
627
+ function Ae({
627
628
  ctx: e,
628
629
  controller: t,
629
630
  floatType: n
630
631
  }) {
631
- const r = Bt(e, n);
632
- return e.isNullable ? b(pe, {
632
+ const r = _t(e, n);
633
+ return e.isNullable ? b(fe, {
633
634
  ...r,
634
635
  controller: t
635
- }) : b(de, {
636
+ }) : b(me, {
636
637
  ...r,
637
638
  controller: t
638
639
  });
639
640
  }
640
- function Wt(e) {
641
+ function zt(e) {
641
642
  return {
642
- label: e.suppressLabel ? void 0 : T(e.label, e.isDeprecated),
643
+ label: e.suppressLabel ? void 0 : w(e.label, e.isDeprecated),
643
644
  description: e.description,
644
645
  required: e.isRequired,
645
646
  disabled: e.readOnly || e.isDeprecated,
646
647
  placeholder: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
647
648
  };
648
649
  }
649
- function De({
650
+ function Ce({
650
651
  ctx: e,
651
652
  controller: t
652
653
  }) {
653
- const n = Wt(e);
654
- return b(et, {
654
+ const n = zt(e);
655
+ return b(nt, {
655
656
  ...n,
656
- controller: H(t)
657
+ controller: Y(t)
657
658
  });
658
659
  }
659
- function _t(e) {
660
+ function Gt(e) {
660
661
  return {
661
- label: e.suppressLabel ? void 0 : T(e.label, e.isDeprecated),
662
+ label: e.suppressLabel ? void 0 : w(e.label, e.isDeprecated),
662
663
  description: e.description,
663
664
  required: e.isRequired,
664
665
  disabled: e.readOnly || e.isDeprecated
665
666
  };
666
667
  }
667
- function Se({
668
+ function Oe({
668
669
  ctx: e,
669
670
  controller: t,
670
671
  temporalType: n
671
672
  }) {
672
- const r = _t(e);
673
+ const r = Gt(e);
673
674
  switch (n) {
674
675
  case "date":
675
- return e.isNullable ? b(ht, {
676
+ return e.isNullable ? b(vt, {
676
677
  ...r,
677
678
  controller: t
678
- }) : b(bt, {
679
+ }) : b(xt, {
679
680
  ...r,
680
681
  controller: t
681
682
  });
682
683
  case "datetime":
683
- return e.isNullable ? b(yt, {
684
+ return e.isNullable ? b(ht, {
684
685
  ...r,
685
686
  controller: t
686
- }) : b(gt, {
687
+ }) : b(bt, {
687
688
  ...r,
688
689
  controller: t
689
690
  });
690
691
  case "time":
691
- return e.isNullable ? b(ft, {
692
+ return e.isNullable ? b(yt, {
692
693
  ...r,
693
694
  controller: t
694
- }) : b(mt, {
695
+ }) : b(gt, {
695
696
  ...r,
696
697
  controller: t
697
698
  });
698
699
  case "duration":
699
- return e.isNullable ? b(tt, {
700
+ return e.isNullable ? b(rt, {
700
701
  ...r,
701
702
  controller: t
702
- }) : b(dt, {
703
+ }) : b(mt, {
703
704
  ...r,
704
705
  controller: t
705
706
  });
706
707
  default:
707
- return console.warn(`Unknown temporal type: ${n}`), Z();
708
+ return console.warn(`Unknown temporal type: ${n}`), X();
708
709
  }
709
710
  }
710
- function zt(e) {
711
+ function Kt(e) {
711
712
  return {
712
- label: e.suppressLabel ? void 0 : T(e.label, e.isDeprecated),
713
+ label: e.suppressLabel ? void 0 : w(e.label, e.isDeprecated),
713
714
  description: e.description,
714
715
  required: e.isRequired,
715
716
  disabled: e.readOnly || e.isDeprecated,
716
717
  placeholder: "https://example.com"
717
718
  };
718
719
  }
719
- function Oe({
720
+ function Ne({
720
721
  ctx: e,
721
722
  controller: t
722
723
  }) {
723
- const n = zt(e);
724
- return b(nt, {
724
+ const n = Kt(e);
725
+ return b(it, {
725
726
  ...n,
726
- controller: H(t)
727
+ controller: Y(t)
727
728
  });
728
729
  }
729
- function Gt(e) {
730
+ function Jt(e) {
730
731
  return {
731
- label: e.suppressLabel ? void 0 : T(e.label, e.isDeprecated),
732
+ label: e.suppressLabel ? void 0 : w(e.label, e.isDeprecated),
732
733
  description: e.description,
733
734
  required: e.isRequired,
734
735
  disabled: e.readOnly || e.isDeprecated
735
736
  };
736
737
  }
737
- function Ce({
738
+ function Re({
738
739
  ctx: e,
739
740
  controller: t
740
741
  }) {
741
- const n = Gt(e);
742
- return b(vt, {
742
+ const n = Jt(e);
743
+ return b($t, {
743
744
  ...n,
744
745
  controller: t
745
746
  });
746
747
  }
747
- function Kt(e) {
748
+ function Zt(e) {
748
749
  return {
749
- label: e.suppressLabel ? void 0 : T(e.label, e.isDeprecated),
750
+ label: e.suppressLabel ? void 0 : w(e.label, e.isDeprecated),
750
751
  description: e.description,
751
752
  required: e.isRequired,
752
753
  disabled: e.readOnly || e.isDeprecated,
753
754
  placeholder: "Enter JSON value"
754
755
  };
755
756
  }
756
- function Jt(e) {
757
+ function Ht(e) {
757
758
  return e.transform(
758
759
  // To input: serialize value to JSON string
759
760
  (t) => t === void 0 ? void 0 : JSON.stringify(t, null, 2),
@@ -768,27 +769,24 @@ function Jt(e) {
768
769
  }
769
770
  );
770
771
  }
771
- function K({
772
+ function Z({
772
773
  ctx: e,
773
774
  controller: t
774
775
  }) {
775
- const n = Kt(e);
776
- return b(rt, {
776
+ const n = Zt(e);
777
+ return b(st, {
777
778
  ...n,
778
- controller: Jt(t)
779
+ controller: Ht(t)
779
780
  });
780
781
  }
781
- function Zt(e) {
782
+ function L(e) {
782
783
  return {
783
784
  label: e.suppressLabel ? void 0 : e.label,
784
785
  description: e.description,
785
786
  required: e.isRequired
786
787
  };
787
788
  }
788
- function Ht(e, t) {
789
- return !t || t.length === 0 ? !1 : typeof t[0] == "string" ? t.includes(e) : Array.isArray(t[0]) ? t.some((n) => n.includes(e)) : !1;
790
- }
791
- function Xt(e) {
789
+ function P(e) {
792
790
  if (e.default !== void 0)
793
791
  return e.default;
794
792
  if (e.examples && e.examples.length > 0)
@@ -813,9 +811,12 @@ function Xt(e) {
813
811
  case "any":
814
812
  return;
815
813
  default:
816
- return t === "int8" || t === "int16" || t === "int32" || t === "int64" || t === "uint8" || t === "uint16" || t === "uint32" || t === "uint64" || t === "float" || t === "double" || t === "decimal" ? 0 : void 0;
814
+ return t === "int8" || t === "int16" || t === "int32" || t === "int64" || t === "int128" || t === "uint8" || t === "uint16" || t === "uint32" || t === "uint64" || t === "uint128" || t === "float" || t === "double" || t === "decimal" ? 0 : void 0;
817
815
  }
818
816
  }
817
+ function Xt(e, t) {
818
+ return !t || t.length === 0 ? !1 : typeof t[0] == "string" ? t.includes(e) : Array.isArray(t[0]) ? t.some((n) => n.includes(e)) : !1;
819
+ }
819
820
  function Yt(e, t = "property") {
820
821
  if (!e.has(t)) return t;
821
822
  let n = 1;
@@ -823,32 +824,32 @@ function Yt(e, t = "property") {
823
824
  n++;
824
825
  return `${t}${n}`;
825
826
  }
826
- function Re({
827
+ function ke({
827
828
  ctx: e,
828
829
  controller: t
829
830
  }) {
830
831
  const n = e.definition;
831
- return n.type !== "object" || !("properties" in n) ? (console.warn("StructureObjectControl requires an ObjectTypeDefinition"), p.div("Invalid object definition")) : U(t.signal, (r) => {
832
- const s = n.properties, a = n.required, u = n.additionalProperties, i = u !== !1, o = typeof u == "object" && u !== null ? u : { type: "any" }, c = n.minProperties ?? 0, l = n.maxProperties ?? 1 / 0, y = xt(s), h = new Set(
832
+ return n.type !== "object" || !("properties" in n) ? (console.warn("StructureObjectControl requires an ObjectTypeDefinition"), p.div("Invalid object definition")) : W(t.signal, (r) => {
833
+ const s = n.properties, a = n.required, u = n.additionalProperties, i = u !== !1, o = typeof u == "object" && u !== null ? u : { type: "any" }, c = n.minProperties ?? 0, l = n.maxProperties ?? 1 / 0, y = It(s), h = new Set(
833
834
  y.map(([x]) => x)
834
- ), f = Object.keys(r ?? {}), g = f.filter((x) => !h.has(x)), d = i && f.length < l && !e.readOnly, v = f.length > c && !e.readOnly, $ = y.map(([x, O]) => {
835
- const D = x, z = t.field(D), Ge = Ht(D, a);
835
+ ), f = Object.keys(r ?? {}), g = f.filter((x) => !h.has(x)), d = i && f.length < l && !e.readOnly, v = f.length > c && !e.readOnly, $ = y.map(([x, C]) => {
836
+ const D = x, K = t.field(D), Je = Xt(D, a);
836
837
  return j({
837
838
  ctx: e.with({
838
- definition: O,
839
- isPropertyRequired: Ge,
839
+ definition: C,
840
+ isPropertyRequired: Je,
840
841
  suppressLabel: !1
841
842
  }).append(D),
842
- controller: z
843
+ controller: K
843
844
  });
844
- }), A = g.map((x) => {
845
- const O = t.field(x);
845
+ }), M = g.map((x) => {
846
+ const C = t.field(x);
846
847
  return p.div(
847
848
  m.class("bc-json-structure-additional-property"),
848
849
  p.div(
849
850
  m.class("bc-json-structure-additional-property-header"),
850
851
  p.strong(`${x}:`),
851
- V(
852
+ U(
852
853
  {
853
854
  variant: "text",
854
855
  size: "xs",
@@ -869,89 +870,54 @@ function Re({
869
870
  isPropertyRequired: !1,
870
871
  suppressLabel: !0
871
872
  }).append(x),
872
- controller: O
873
+ controller: C
873
874
  })
874
875
  )
875
876
  );
876
- }), q = d ? V(
877
+ }), q = d ? U(
877
878
  {
878
879
  variant: "outline",
879
880
  size: "sm",
880
881
  onClick: () => {
881
- const x = I.get(t.signal) ?? {}, O = new Set(Object.keys(x)), D = Yt(O), z = Xt(o);
882
+ const x = I.get(t.signal) ?? {}, C = new Set(Object.keys(x)), D = Yt(C), K = P(o);
882
883
  t.change({
883
884
  ...x,
884
- [D]: z
885
+ [D]: K
885
886
  });
886
887
  }
887
888
  },
888
889
  "Add Property"
889
- ) : null, S = p.div(
890
+ ) : null, A = p.div(
890
891
  m.class("bc-json-structure-object-fields"),
891
892
  ...$,
892
- ...A,
893
+ ...M,
893
894
  q
894
- ), R = p.div(
895
+ ), N = p.div(
895
896
  m.class("bc-json-structure-object"),
896
- S
897
+ A
897
898
  );
898
- return !e.suppressLabel && e.name ? B({
899
- ...Zt(e),
900
- content: R
901
- }) : R;
899
+ return !e.suppressLabel && e.name ? _({
900
+ ...L(e),
901
+ content: N
902
+ }) : N;
902
903
  });
903
904
  }
904
- function Qt(e) {
905
- return {
906
- label: e.suppressLabel ? void 0 : e.label,
907
- description: e.description,
908
- required: e.isRequired
909
- };
910
- }
911
- function en(e) {
912
- if (e.default !== void 0)
913
- return e.default;
914
- if (e.examples && e.examples.length > 0)
915
- return e.examples[0];
916
- if (!e.type) return;
917
- const t = Array.isArray(e.type) ? e.type[0] : e.type;
918
- if (!(typeof t == "object" && "$ref" in t))
919
- switch (t) {
920
- case "string":
921
- return "";
922
- case "boolean":
923
- return !1;
924
- case "null":
925
- return null;
926
- case "object":
927
- return {};
928
- case "array":
929
- case "set":
930
- return [];
931
- case "map":
932
- return {};
933
- case "any":
934
- return;
935
- default:
936
- return t === "int8" || t === "int16" || t === "int32" || t === "int64" || t === "int128" || t === "uint8" || t === "uint16" || t === "uint32" || t === "uint64" || t === "uint128" || t === "float" || t === "double" || t === "decimal" ? 0 : void 0;
937
- }
938
- }
939
- function ke({
905
+ function Pe({
940
906
  ctx: e,
941
907
  controller: t
942
908
  }) {
943
909
  const n = e.definition;
944
910
  if (n.type !== "array" || !("items" in n))
945
911
  return console.warn("StructureArrayControl requires an ArrayTypeDefinition"), p.div("Invalid array definition");
946
- const r = n.items, s = n.minItems ?? 0, a = n.maxItems ?? 1 / 0, u = w(t.signal)((o) => (o?.length ?? 0) < a), i = w(t.signal)((o) => (o?.length ?? 0) > s);
947
- return fe({
948
- ...Qt(e),
912
+ const r = n.items, s = n.minItems ?? 0, a = n.maxItems ?? 1 / 0, u = T(t.signal)((o) => (o?.length ?? 0) < a), i = T(t.signal)((o) => (o?.length ?? 0) > s);
913
+ return ye({
914
+ ...L(e),
949
915
  controller: t,
950
- createItem: () => en(r),
916
+ createItem: () => P(r),
951
917
  showAdd: !0,
952
- addDisabled: w(u)((o) => !o || e.readOnly),
918
+ addDisabled: T(u)((o) => !o || e.readOnly),
953
919
  showRemove: !0,
954
- removeDisabled: w(i)((o) => !o || e.readOnly),
920
+ removeDisabled: T(i)((o) => !o || e.readOnly),
955
921
  element: (o) => {
956
922
  const c = o.position.index, l = o.item;
957
923
  return j({
@@ -964,49 +930,14 @@ function ke({
964
930
  }
965
931
  });
966
932
  }
967
- function tn(e) {
968
- return {
969
- label: e.suppressLabel ? void 0 : e.label,
970
- description: e.description,
971
- required: e.isRequired
972
- };
973
- }
974
- function nn(e) {
975
- if (e.default !== void 0)
976
- return e.default;
977
- if (e.examples && e.examples.length > 0)
978
- return e.examples[0];
979
- if (!e.type) return;
980
- const t = Array.isArray(e.type) ? e.type[0] : e.type;
981
- if (!(typeof t == "object" && "$ref" in t))
982
- switch (t) {
983
- case "string":
984
- return "";
985
- case "boolean":
986
- return !1;
987
- case "null":
988
- return null;
989
- case "object":
990
- return {};
991
- case "array":
992
- case "set":
993
- return [];
994
- case "map":
995
- return {};
996
- case "any":
997
- return;
998
- default:
999
- return t === "int8" || t === "int16" || t === "int32" || t === "int64" || t === "int128" || t === "uint8" || t === "uint16" || t === "uint32" || t === "uint64" || t === "uint128" || t === "float" || t === "double" || t === "decimal" ? 0 : void 0;
1000
- }
1001
- }
1002
- function Ne({
933
+ function qe({
1003
934
  ctx: e,
1004
935
  controller: t
1005
936
  }) {
1006
937
  const n = e.definition;
1007
938
  if (n.type !== "set" || !("items" in n))
1008
939
  return console.warn("StructureSetControl requires a SetTypeDefinition"), p.div("Invalid set definition");
1009
- const r = n.items, s = n.minItems ?? 0, a = n.maxItems ?? 1 / 0, u = w(t.signal)((c) => (c?.length ?? 0) < a), i = w(t.signal)((c) => (c?.length ?? 0) > s), o = w(t.signal)((c) => {
940
+ const r = n.items, s = n.minItems ?? 0, a = n.maxItems ?? 1 / 0, u = T(t.signal)((c) => (c?.length ?? 0) < a), i = T(t.signal)((c) => (c?.length ?? 0) > s), o = T(t.signal)((c) => {
1010
941
  if (!c || c.length === 0) return /* @__PURE__ */ new Set();
1011
942
  const l = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set();
1012
943
  for (let h = 0; h < c.length; h++) {
@@ -1015,14 +946,14 @@ function Ne({
1015
946
  }
1016
947
  return y;
1017
948
  });
1018
- return fe({
1019
- ...tn(e),
949
+ return ye({
950
+ ...L(e),
1020
951
  controller: t,
1021
- createItem: () => nn(r),
952
+ createItem: () => P(r),
1022
953
  showAdd: !0,
1023
- addDisabled: w(u)((c) => !c || e.readOnly),
954
+ addDisabled: T(u)((c) => !c || e.readOnly),
1024
955
  showRemove: !0,
1025
- removeDisabled: w(i)((c) => !c || e.readOnly),
956
+ removeDisabled: T(i)((c) => !c || e.readOnly),
1026
957
  element: (c) => {
1027
958
  const l = c.position.index, y = c.item, h = o.map((g) => g.has(l)), f = j({
1028
959
  ctx: e.with({
@@ -1031,10 +962,10 @@ function Ne({
1031
962
  }).append(l),
1032
963
  controller: y
1033
964
  });
1034
- return h.map((g) => g ? E(
965
+ return h.map((g) => g ? B(
1035
966
  m.class("bc-stack--gap-1"),
1036
967
  f,
1037
- ye(
968
+ he(
1038
969
  m.class("bc-json-structure-set-error"),
1039
970
  "⚠️ Duplicate value - sets must contain unique items"
1040
971
  )
@@ -1042,49 +973,14 @@ function Ne({
1042
973
  }
1043
974
  });
1044
975
  }
1045
- function rn(e) {
1046
- return {
1047
- label: e.suppressLabel ? void 0 : e.label,
1048
- description: e.description,
1049
- required: e.isRequired
1050
- };
1051
- }
1052
- function sn(e) {
1053
- if (e.default !== void 0)
1054
- return e.default;
1055
- if (e.examples && e.examples.length > 0)
1056
- return e.examples[0];
1057
- if (!e.type) return;
1058
- const t = Array.isArray(e.type) ? e.type[0] : e.type;
1059
- if (!(typeof t == "object" && "$ref" in t))
1060
- switch (t) {
1061
- case "string":
1062
- return "";
1063
- case "boolean":
1064
- return !1;
1065
- case "null":
1066
- return null;
1067
- case "object":
1068
- return {};
1069
- case "array":
1070
- case "set":
1071
- return [];
1072
- case "map":
1073
- return {};
1074
- case "any":
1075
- return;
1076
- default:
1077
- return t === "int8" || t === "int16" || t === "int32" || t === "int64" || t === "int128" || t === "uint8" || t === "uint16" || t === "uint32" || t === "uint64" || t === "uint128" || t === "float" || t === "double" || t === "decimal" ? 0 : void 0;
1078
- }
1079
- }
1080
- function an(e, t = "key") {
976
+ function Qt(e, t = "key") {
1081
977
  if (!e.has(t)) return t;
1082
978
  let n = 1;
1083
979
  for (; e.has(`${t}${n}`); )
1084
980
  n++;
1085
981
  return `${t}${n}`;
1086
982
  }
1087
- function qe({
983
+ function Fe({
1088
984
  ctx: e,
1089
985
  controller: t
1090
986
  }) {
@@ -1092,7 +988,7 @@ function qe({
1092
988
  if (n.type !== "map" || !("values" in n))
1093
989
  return console.warn("StructureMapControl requires a MapTypeDefinition"), p.div("Invalid map definition");
1094
990
  const r = n.values, s = n.minProperties ?? 0, a = n.maxProperties ?? 1 / 0;
1095
- return U(t.signal, (u) => {
991
+ return W(t.signal, (u) => {
1096
992
  const i = Object.keys(u ?? {}), o = i.length, c = o < a && !e.readOnly, l = o > s && !e.readOnly, y = i.map((d) => {
1097
993
  const v = t.field(d);
1098
994
  return p.div(
@@ -1100,7 +996,7 @@ function qe({
1100
996
  p.div(
1101
997
  m.class("bc-json-structure-map-entry-header"),
1102
998
  p.strong(m.class("bc-json-structure-map-entry-key"), `${d}:`),
1103
- V(
999
+ U(
1104
1000
  {
1105
1001
  variant: "text",
1106
1002
  size: "xs",
@@ -1124,15 +1020,15 @@ function qe({
1124
1020
  })
1125
1021
  )
1126
1022
  );
1127
- }), h = c ? V(
1023
+ }), h = c ? U(
1128
1024
  {
1129
1025
  variant: "outline",
1130
1026
  size: "sm",
1131
1027
  onClick: () => {
1132
- const d = I.get(t.signal) ?? {}, v = new Set(Object.keys(d)), $ = an(v), A = sn(r);
1028
+ const d = I.get(t.signal) ?? {}, v = new Set(Object.keys(d)), $ = Qt(v), M = P(r);
1133
1029
  t.change({
1134
1030
  ...d,
1135
- [$]: A
1031
+ [$]: M
1136
1032
  });
1137
1033
  }
1138
1034
  },
@@ -1145,48 +1041,13 @@ function qe({
1145
1041
  m.class("bc-json-structure-map"),
1146
1042
  f
1147
1043
  );
1148
- return !e.suppressLabel && e.name ? B({
1149
- ...rn(e),
1044
+ return !e.suppressLabel && e.name ? _({
1045
+ ...L(e),
1150
1046
  content: g
1151
1047
  }) : g;
1152
1048
  });
1153
1049
  }
1154
- function un(e) {
1155
- return {
1156
- label: e.suppressLabel ? void 0 : e.label,
1157
- description: e.description,
1158
- required: e.isRequired
1159
- };
1160
- }
1161
- function on(e) {
1162
- if (e.default !== void 0)
1163
- return e.default;
1164
- if (e.examples && e.examples.length > 0)
1165
- return e.examples[0];
1166
- if (!e.type) return;
1167
- const t = Array.isArray(e.type) ? e.type[0] : e.type;
1168
- if (!(typeof t == "object" && "$ref" in t))
1169
- switch (t) {
1170
- case "string":
1171
- return "";
1172
- case "boolean":
1173
- return !1;
1174
- case "null":
1175
- return null;
1176
- case "object":
1177
- return {};
1178
- case "array":
1179
- case "set":
1180
- return [];
1181
- case "map":
1182
- return {};
1183
- case "any":
1184
- return;
1185
- default:
1186
- return t === "int8" || t === "int16" || t === "int32" || t === "int64" || t === "int128" || t === "uint8" || t === "uint16" || t === "uint32" || t === "uint64" || t === "uint128" || t === "float" || t === "double" || t === "decimal" ? 0 : void 0;
1187
- }
1188
- }
1189
- function Pe({
1050
+ function Le({
1190
1051
  ctx: e,
1191
1052
  controller: t
1192
1053
  }) {
@@ -1197,11 +1058,11 @@ function Pe({
1197
1058
  if (!Array.isArray(a) || a.length !== r.length) {
1198
1059
  const i = r.map((o) => {
1199
1060
  const c = s[o];
1200
- return c ? on(c) : void 0;
1061
+ return c ? P(c) : void 0;
1201
1062
  });
1202
1063
  t.change(i);
1203
1064
  }
1204
- const u = un(e);
1065
+ const u = L(e);
1205
1066
  return p.div(
1206
1067
  m.class("bc-json-structure-tuple"),
1207
1068
  // Optional label and description
@@ -1258,13 +1119,13 @@ function Pe({
1258
1119
  )
1259
1120
  );
1260
1121
  }
1261
- function cn({
1122
+ function en({
1262
1123
  options: e,
1263
1124
  selected: t,
1264
1125
  onChange: n,
1265
1126
  disabled: r
1266
1127
  }) {
1267
- return me({
1128
+ return ge({
1268
1129
  options: e.map((s) => ({
1269
1130
  type: "value",
1270
1131
  value: s.value,
@@ -1275,24 +1136,24 @@ function cn({
1275
1136
  disabled: r
1276
1137
  });
1277
1138
  }
1278
- function ln({
1139
+ function tn({
1279
1140
  ctx: e,
1280
1141
  selector: t,
1281
1142
  inner: n
1282
1143
  }) {
1283
- const r = E(
1144
+ const r = B(
1284
1145
  m.class("bc-stack--gap-2 bc-stack--align-start"),
1285
1146
  t,
1286
1147
  n
1287
1148
  );
1288
- return e.isRoot ? r : B({
1149
+ return e.isRoot ? r : _({
1289
1150
  label: e.suppressLabel ? void 0 : e.label,
1290
1151
  description: e.description,
1291
1152
  required: e.isRequired,
1292
1153
  content: r
1293
1154
  });
1294
1155
  }
1295
- function pn(e, t, n) {
1156
+ function nn(e, t, n) {
1296
1157
  if (!e || typeof e != "object")
1297
1158
  return null;
1298
1159
  const r = e;
@@ -1309,7 +1170,7 @@ function pn(e, t, n) {
1309
1170
  }
1310
1171
  return null;
1311
1172
  }
1312
- function dn(e, t, n) {
1173
+ function rn(e, t, n) {
1313
1174
  if (!e || typeof e != "object")
1314
1175
  return;
1315
1176
  const r = e;
@@ -1320,7 +1181,7 @@ function dn(e, t, n) {
1320
1181
  if (t in r)
1321
1182
  return r[t];
1322
1183
  }
1323
- function oe(e, t, n) {
1184
+ function le(e, t, n) {
1324
1185
  return n ? e && typeof e == "object" ? {
1325
1186
  [n]: t,
1326
1187
  ...e
@@ -1330,32 +1191,7 @@ function oe(e, t, n) {
1330
1191
  [t]: e
1331
1192
  };
1332
1193
  }
1333
- function fn(e) {
1334
- if (e.default !== void 0)
1335
- return e.default;
1336
- if (e.examples && e.examples.length > 0)
1337
- return e.examples[0];
1338
- const t = Array.isArray(e.type) ? e.type[0] : e.type;
1339
- if (!(!t || typeof t == "object"))
1340
- switch (t) {
1341
- case "string":
1342
- return "";
1343
- case "boolean":
1344
- return !1;
1345
- case "null":
1346
- return null;
1347
- case "object":
1348
- return {};
1349
- case "array":
1350
- case "set":
1351
- return [];
1352
- case "map":
1353
- return {};
1354
- default:
1355
- return;
1356
- }
1357
- }
1358
- function Fe({
1194
+ function Ee({
1359
1195
  ctx: e,
1360
1196
  controller: t
1361
1197
  }) {
@@ -1374,44 +1210,44 @@ function Fe({
1374
1210
  const u = a.map((d) => {
1375
1211
  const $ = r[d].name || d;
1376
1212
  return { value: d, label: $ };
1377
- }), i = w(t.signal)((d) => pn(d, r, s)), o = I.get(i) || a[0], c = Je(o);
1213
+ }), i = T(t.signal)((d) => nn(d, r, s)), o = I.get(i) || a[0], c = He(o);
1378
1214
  t.onDispose(c.dispose);
1379
1215
  let l = !1;
1380
1216
  const y = i.on((d) => {
1381
1217
  !l && d !== null && c.set(d);
1382
1218
  });
1383
1219
  t.onDispose(y);
1384
- const f = cn({
1220
+ const f = en({
1385
1221
  options: u,
1386
1222
  selected: c,
1387
1223
  onChange: (d) => {
1388
1224
  l = !0, c.set(d);
1389
1225
  const v = r[d];
1390
1226
  if (v) {
1391
- const $ = fn(v), A = oe($, d, s);
1392
- t.change(A);
1227
+ const $ = P(v), M = le($, d, s);
1228
+ t.change(M);
1393
1229
  }
1394
1230
  },
1395
1231
  disabled: e.readOnly || e.isDeprecated
1396
- }), g = U(c, (d) => {
1232
+ }), g = W(c, (d) => {
1397
1233
  const v = r[I.get(d)];
1398
1234
  if (!v)
1399
1235
  return p.div(
1400
1236
  m.class("bc-json-structure-error"),
1401
1237
  `Choice variant not found: ${I.get(d)}`
1402
1238
  );
1403
- const $ = w(t.signal)(
1404
- (S) => dn(S, I.get(d), s)
1405
- ), A = (S) => {
1406
- const R = oe(
1407
- S,
1239
+ const $ = T(t.signal)(
1240
+ (A) => rn(A, I.get(d), s)
1241
+ ), M = (A) => {
1242
+ const N = le(
1243
+ A,
1408
1244
  I.get(d),
1409
1245
  s
1410
1246
  );
1411
- t.change(R);
1412
- }, q = new Xe(
1247
+ t.change(N);
1248
+ }, q = new Qe(
1413
1249
  [...t.path, I.get(d)],
1414
- A,
1250
+ M,
1415
1251
  $,
1416
1252
  t.status,
1417
1253
  {
@@ -1429,26 +1265,26 @@ function Fe({
1429
1265
  controller: q
1430
1266
  });
1431
1267
  });
1432
- return ln({
1268
+ return tn({
1433
1269
  ctx: e,
1434
1270
  selector: f,
1435
1271
  inner: g
1436
1272
  });
1437
1273
  }
1438
- function mn(e) {
1274
+ function sn(e) {
1439
1275
  return {
1440
- label: e.suppressLabel ? void 0 : T(e.label, e.isDeprecated),
1276
+ label: e.suppressLabel ? void 0 : w(e.label, e.isDeprecated),
1441
1277
  description: e.description,
1442
1278
  required: e.isRequired,
1443
1279
  disabled: e.readOnly || e.isDeprecated
1444
1280
  };
1445
1281
  }
1446
- function Le({
1282
+ function Ve({
1447
1283
  ctx: e,
1448
1284
  controller: t
1449
1285
  }) {
1450
- const n = mn(e);
1451
- return it({
1286
+ const n = sn(e);
1287
+ return at({
1452
1288
  ...n,
1453
1289
  options: (e.enumValues ?? []).map((r) => ({
1454
1290
  type: "value",
@@ -1458,18 +1294,18 @@ function Le({
1458
1294
  controller: t
1459
1295
  });
1460
1296
  }
1461
- function Ve({
1297
+ function Ue({
1462
1298
  ctx: e,
1463
1299
  controller: t
1464
1300
  }) {
1465
- return Z(
1466
- Ze(() => {
1301
+ return X(
1302
+ Xe(() => {
1467
1303
  I.get(t.signal) !== e.constValue && t.change(e.constValue);
1468
1304
  }),
1469
- st($t(e.label, ": "), ye(String(e.constValue)))
1305
+ ut(Tt(e.label, ": "), he(String(e.constValue)))
1470
1306
  );
1471
1307
  }
1472
- function yn(e) {
1308
+ function an(e) {
1473
1309
  return {
1474
1310
  label: e.suppressLabel ? void 0 : e.label,
1475
1311
  description: e.description,
@@ -1477,7 +1313,7 @@ function yn(e) {
1477
1313
  disabled: e.readOnly || e.isDeprecated
1478
1314
  };
1479
1315
  }
1480
- function gn(e, t) {
1316
+ function un(e, t) {
1481
1317
  if (e === null) return t.includes("null") ? "null" : null;
1482
1318
  if (e === void 0)
1483
1319
  return t.includes("string") ? "string" : t[0] ?? null;
@@ -1507,7 +1343,7 @@ function gn(e, t) {
1507
1343
  return null;
1508
1344
  }
1509
1345
  }
1510
- function hn(e, t) {
1346
+ function on(e, t) {
1511
1347
  try {
1512
1348
  switch (t) {
1513
1349
  case "string":
@@ -1579,7 +1415,7 @@ function hn(e, t) {
1579
1415
  return { ok: !1 };
1580
1416
  }
1581
1417
  }
1582
- function bn(e) {
1418
+ function cn(e) {
1583
1419
  switch (e) {
1584
1420
  case "null":
1585
1421
  return null;
@@ -1596,16 +1432,16 @@ function bn(e) {
1596
1432
  return;
1597
1433
  }
1598
1434
  }
1599
- function vn(e) {
1435
+ function ln(e) {
1600
1436
  return e.map((t) => ({
1601
1437
  key: t,
1602
- label: J(t),
1603
- detect: (n) => gn(n, [t]) === t,
1604
- convert: (n) => hn(n, t),
1605
- defaultValue: () => bn(t)
1438
+ label: H(t),
1439
+ detect: (n) => un(n, [t]) === t,
1440
+ convert: (n) => on(n, t),
1441
+ defaultValue: () => cn(t)
1606
1442
  }));
1607
1443
  }
1608
- function xn({
1444
+ function pn({
1609
1445
  options: e,
1610
1446
  selected: t,
1611
1447
  onChange: n
@@ -1614,14 +1450,14 @@ function xn({
1614
1450
  const a = Object.fromEntries(
1615
1451
  e.map((u) => [u.value, u.label])
1616
1452
  );
1617
- return ut({
1453
+ return ct({
1618
1454
  options: a,
1619
1455
  value: t,
1620
1456
  onChange: (u) => n(u),
1621
1457
  size: "sm"
1622
1458
  });
1623
1459
  }
1624
- return me({
1460
+ return ge({
1625
1461
  options: e.map((a) => ({
1626
1462
  type: "value",
1627
1463
  value: a.value,
@@ -1631,22 +1467,22 @@ function xn({
1631
1467
  onChange: n
1632
1468
  });
1633
1469
  }
1634
- function $n({
1470
+ function dn({
1635
1471
  ctx: e,
1636
1472
  showSelector: t,
1637
1473
  selector: n,
1638
1474
  inner: r
1639
1475
  }) {
1640
- return e.isRoot ? t ? E(m.class("bc-stack--gap-2"), n, r) : r : B({
1641
- ...yn(e),
1642
- content: t ? E(
1476
+ return e.isRoot ? t ? B(m.class("bc-stack--gap-2"), n, r) : r : _({
1477
+ ...an(e),
1478
+ content: t ? B(
1643
1479
  m.class("bc-stack--gap-2 bc-stack--align-start"),
1644
1480
  n,
1645
1481
  r
1646
1482
  ) : r
1647
1483
  });
1648
1484
  }
1649
- function In({
1485
+ function fn({
1650
1486
  ctx: e,
1651
1487
  controller: t
1652
1488
  }) {
@@ -1656,7 +1492,7 @@ function In({
1656
1492
  s = r;
1657
1493
  else
1658
1494
  return console.warn("StructureUnionControl called with non-array type"), j({ ctx: e, controller: t });
1659
- const a = s.includes("null"), u = Q(r), i = a && u.length > 0 ? u : s, o = vn(i), c = new at(
1495
+ const a = s.includes("null"), u = te(r), i = a && u.length > 0 ? u : s, o = ln(i), c = new ot(
1660
1496
  t.path,
1661
1497
  t.change,
1662
1498
  t.signal,
@@ -1665,13 +1501,13 @@ function In({
1665
1501
  o
1666
1502
  );
1667
1503
  t.onDispose(() => c.dispose());
1668
- const l = (f) => xn({
1669
- options: i.map((g) => ({ value: g, label: J(g) })),
1504
+ const l = (f) => pn({
1505
+ options: i.map((g) => ({ value: g, label: H(g) })),
1670
1506
  selected: c.activeBranch,
1671
1507
  onChange: f
1672
1508
  }), y = (f) => {
1673
1509
  c.switchToBranch(f, !1);
1674
- }, h = U(c.activeBranch, (f) => {
1510
+ }, h = W(c.activeBranch, (f) => {
1675
1511
  const g = I.get(f), d = c.getBranchController(g), v = e.with({
1676
1512
  definition: { ...n, type: g },
1677
1513
  // Suppress inner labels only when union is nested (non-root)
@@ -1682,7 +1518,7 @@ function In({
1682
1518
  controller: d
1683
1519
  });
1684
1520
  });
1685
- return $n({
1521
+ return dn({
1686
1522
  ctx: e,
1687
1523
  showSelector: i.length > 1,
1688
1524
  selector: l(y),
@@ -1695,7 +1531,7 @@ function j({
1695
1531
  }) {
1696
1532
  let n = e;
1697
1533
  const r = e.definition;
1698
- if (r.type && C(r.type)) {
1534
+ if (r.type && O(r.type)) {
1699
1535
  const i = e.resolveRef(r.type.$ref);
1700
1536
  if (i) {
1701
1537
  const { type: o, ...c } = r, l = { ...i, ...c };
@@ -1703,7 +1539,7 @@ function j({
1703
1539
  }
1704
1540
  }
1705
1541
  if (n.definition.$extends) {
1706
- const { merged: i } = $e(n.definition, e.schema);
1542
+ const { merged: i } = Te(n.definition, e.schema);
1707
1543
  n = n.with({ definition: i });
1708
1544
  }
1709
1545
  const s = n.widgetRegistry;
@@ -1715,149 +1551,149 @@ function j({
1715
1551
  ctx: n
1716
1552
  });
1717
1553
  }
1718
- if (Mt(n.definition))
1719
- return Le({
1554
+ if (At(n.definition))
1555
+ return Ve({
1720
1556
  ctx: n,
1721
1557
  controller: t
1722
1558
  });
1723
- if (Dt(n.definition))
1724
- return Ve({
1559
+ if (Ct(n.definition))
1560
+ return Ue({
1725
1561
  ctx: n,
1726
1562
  controller: t
1727
1563
  });
1728
1564
  const a = n.resolvedType;
1729
- if (Array.isArray(a) && Q(a).length > 1)
1730
- return In({
1565
+ if (Array.isArray(a) && te(a).length > 1)
1566
+ return fn({
1731
1567
  ctx: n,
1732
1568
  controller: t
1733
1569
  });
1734
1570
  const u = n.primaryType;
1735
1571
  if (!u)
1736
- return K({
1572
+ return Z({
1737
1573
  ctx: n,
1738
1574
  controller: t
1739
1575
  });
1740
- if (k(n.definition)) {
1741
- const i = t instanceof re ? t : t.object();
1742
- return Re({
1576
+ if (R(n.definition)) {
1577
+ const i = t instanceof se ? t : t.object();
1578
+ return ke({
1743
1579
  ctx: n,
1744
1580
  controller: i
1745
1581
  });
1746
1582
  }
1747
- if (ge(n.definition)) {
1748
- const i = t instanceof G ? t : t.array();
1749
- return ke({
1583
+ if (be(n.definition)) {
1584
+ const i = t instanceof J ? t : t.array();
1585
+ return Pe({
1750
1586
  ctx: n,
1751
1587
  controller: i
1752
1588
  });
1753
1589
  }
1754
- if (he(n.definition)) {
1755
- const i = t instanceof G ? t : t.array();
1756
- return Ne({
1590
+ if (ve(n.definition)) {
1591
+ const i = t instanceof J ? t : t.array();
1592
+ return qe({
1757
1593
  ctx: n,
1758
1594
  controller: i
1759
1595
  });
1760
1596
  }
1761
- if (be(n.definition)) {
1762
- const i = t instanceof re ? t : t.object();
1763
- return qe({
1597
+ if (xe(n.definition)) {
1598
+ const i = t instanceof se ? t : t.object();
1599
+ return Fe({
1764
1600
  ctx: n,
1765
1601
  controller: i
1766
1602
  });
1767
1603
  }
1768
- if (ve(n.definition)) {
1769
- const i = t instanceof G ? t : t.array();
1770
- return Pe({
1604
+ if ($e(n.definition)) {
1605
+ const i = t instanceof J ? t : t.array();
1606
+ return Le({
1771
1607
  ctx: n,
1772
1608
  controller: i
1773
1609
  });
1774
1610
  }
1775
- if (xe(n.definition))
1776
- return Fe({
1611
+ if (Ie(n.definition))
1612
+ return Ee({
1777
1613
  ctx: n,
1778
1614
  controller: t
1779
1615
  });
1780
1616
  switch (u) {
1781
1617
  case "string":
1782
- return Ie({
1618
+ return we({
1783
1619
  ctx: n,
1784
1620
  controller: t
1785
1621
  });
1786
1622
  case "boolean":
1787
- return we({
1623
+ return je({
1788
1624
  ctx: n,
1789
1625
  controller: t
1790
1626
  });
1791
1627
  case "uuid":
1792
- return De({
1628
+ return Ce({
1793
1629
  ctx: n,
1794
1630
  controller: t
1795
1631
  });
1796
1632
  case "uri":
1797
- return Oe({
1633
+ return Ne({
1798
1634
  ctx: n,
1799
1635
  controller: t
1800
1636
  });
1801
1637
  case "binary":
1802
- return Ce({
1638
+ return Re({
1803
1639
  ctx: n,
1804
1640
  controller: t
1805
1641
  });
1806
1642
  case "null":
1807
- return Tn(n);
1643
+ return yn(n);
1808
1644
  case "any":
1809
- return K({
1645
+ return Z({
1810
1646
  ctx: n,
1811
1647
  controller: t
1812
1648
  });
1813
1649
  default:
1814
- return P(u) ? Ae({
1650
+ return F(u) ? De({
1815
1651
  ctx: n,
1816
1652
  controller: t,
1817
1653
  intType: u
1818
- }) : X(u) ? Me({
1654
+ }) : Q(u) ? Ae({
1819
1655
  ctx: n,
1820
1656
  controller: t,
1821
1657
  floatType: u
1822
- }) : Y(u) ? Se({
1658
+ }) : ee(u) ? Oe({
1823
1659
  ctx: n,
1824
1660
  controller: t,
1825
1661
  temporalType: u
1826
- }) : (console.warn(`Unknown type: ${u}`), jn(n, u));
1662
+ }) : (console.warn(`Unknown type: ${u}`), gn(n, u));
1827
1663
  }
1828
1664
  }
1829
- function wn({
1665
+ function mn({
1830
1666
  schema: e,
1831
1667
  controller: t,
1832
1668
  widgetRegistry: n,
1833
1669
  readOnly: r,
1834
1670
  locale: s
1835
1671
  }) {
1836
- const a = kt(e, {
1672
+ const a = Pt(e, {
1837
1673
  widgetRegistry: n,
1838
1674
  readOnly: r,
1839
1675
  locale: s
1840
1676
  });
1841
1677
  return j({ ctx: a, controller: t });
1842
1678
  }
1843
- function Tn(e) {
1679
+ function yn(e) {
1844
1680
  return p.div(
1845
1681
  m.class("bc-json-structure-placeholder"),
1846
1682
  p.span(`[Null: ${e.label}]`),
1847
1683
  p.em("null")
1848
1684
  );
1849
1685
  }
1850
- function jn(e, t) {
1686
+ function gn(e, t) {
1851
1687
  return p.div(
1852
1688
  m.class("bc-json-structure-unknown"),
1853
1689
  p.span(`Unknown type: ${t}`),
1854
1690
  p.em(`at path: ${e.jsonPath}`)
1855
1691
  );
1856
1692
  }
1857
- function Ee(e, t) {
1858
- return new An(e, t);
1693
+ function Be(e, t) {
1694
+ return new hn(e, t);
1859
1695
  }
1860
- class An {
1696
+ class hn {
1861
1697
  schema;
1862
1698
  options;
1863
1699
  constructor(t, n) {
@@ -1947,7 +1783,7 @@ class An {
1947
1783
  case "any":
1948
1784
  return !0;
1949
1785
  default:
1950
- return P(n) ? this.validateInteger(t, n, r, s, a) : X(n) ? this.validateFloat(t, r, s, a) : Y(n) ? this.validateTemporal(t, n, s, a) : n === "uuid" ? this.validateUuid(t, s, a) : n === "uri" ? this.validateUri(t, s, a) : n === "binary" ? this.validateBinary(t, s, a) : !1;
1786
+ return F(n) ? this.validateInteger(t, n, r, s, a) : Q(n) ? this.validateFloat(t, r, s, a) : ee(n) ? this.validateTemporal(t, n, s, a) : n === "uuid" ? this.validateUuid(t, s, a) : n === "uri" ? this.validateUri(t, s, a) : n === "binary" ? this.validateBinary(t, s, a) : !1;
1951
1787
  }
1952
1788
  }
1953
1789
  validateString(t, n, r, s) {
@@ -1979,8 +1815,8 @@ class An {
1979
1815
  if (typeof t != "number" && typeof t != "bigint") return !1;
1980
1816
  if (typeof t == "number" && !Number.isInteger(t))
1981
1817
  return a.push({ path: s, type: "type", expected: n, actual: "float" }), !1;
1982
- if (P(n)) {
1983
- const u = W[n], i = typeof t == "bigint" ? t : BigInt(Math.round(t));
1818
+ if (F(n)) {
1819
+ const u = z[n], i = typeof t == "bigint" ? t : BigInt(Math.round(t));
1984
1820
  (i < u.min || i > u.max) && a.push({
1985
1821
  path: s,
1986
1822
  type: "integer_bounds",
@@ -2056,7 +1892,7 @@ class An {
2056
1892
  validateObject(t, n, r, s) {
2057
1893
  if (typeof t != "object" || t === null || Array.isArray(t))
2058
1894
  return !1;
2059
- if (!k(n)) return !0;
1895
+ if (!R(n)) return !0;
2060
1896
  const a = t, u = n.required;
2061
1897
  if (u) {
2062
1898
  const i = Array.isArray(u[0]) ? u.flat() : u;
@@ -2092,7 +1928,7 @@ class An {
2092
1928
  }
2093
1929
  validateArray(t, n, r, s) {
2094
1930
  if (!Array.isArray(t)) return !1;
2095
- if (!ge(n)) return !0;
1931
+ if (!be(n)) return !0;
2096
1932
  const a = n;
2097
1933
  a.minItems !== void 0 && t.length < a.minItems && s.push({
2098
1934
  path: r,
@@ -2113,7 +1949,7 @@ class An {
2113
1949
  }
2114
1950
  validateSet(t, n, r, s) {
2115
1951
  if (!Array.isArray(t)) return !1;
2116
- if (!he(n)) return !0;
1952
+ if (!ve(n)) return !0;
2117
1953
  const a = /* @__PURE__ */ new Set();
2118
1954
  for (let u = 0; u < t.length; u++) {
2119
1955
  const i = JSON.stringify(t[u]);
@@ -2128,7 +1964,7 @@ class An {
2128
1964
  validateMap(t, n, r, s) {
2129
1965
  if (typeof t != "object" || t === null || Array.isArray(t))
2130
1966
  return !1;
2131
- if (!be(n)) return !0;
1967
+ if (!xe(n)) return !0;
2132
1968
  const a = t;
2133
1969
  for (const [u, i] of Object.entries(a)) {
2134
1970
  const o = `${r}/${u}`;
@@ -2138,7 +1974,7 @@ class An {
2138
1974
  }
2139
1975
  validateTuple(t, n, r, s) {
2140
1976
  if (!Array.isArray(t)) return !1;
2141
- if (!ve(n)) return !0;
1977
+ if (!$e(n)) return !0;
2142
1978
  const a = n.tuple.length;
2143
1979
  t.length !== a && s.push({
2144
1980
  path: r,
@@ -2155,7 +1991,7 @@ class An {
2155
1991
  validateChoice(t, n, r, s) {
2156
1992
  if (typeof t != "object" || t === null || Array.isArray(t))
2157
1993
  return !1;
2158
- if (!xe(n)) return !0;
1994
+ if (!Ie(n)) return !0;
2159
1995
  const a = t, u = Object.keys(n.choices), i = Object.keys(a).find((c) => u.includes(c));
2160
1996
  if (!i)
2161
1997
  return s.push({
@@ -2173,39 +2009,39 @@ class An {
2173
2009
  ), !0;
2174
2010
  }
2175
2011
  }
2176
- function dr(e, t, n) {
2177
- return Ee(e, n).validate(t);
2012
+ function ir(e, t, n) {
2013
+ return Be(e, n).validate(t);
2178
2014
  }
2179
- function Mn(e, t) {
2180
- const n = Dn(e, t);
2015
+ function bn(e, t) {
2016
+ const n = vn(e, t);
2181
2017
  return {
2182
2018
  path: e.path,
2183
2019
  message: n,
2184
2020
  code: e.type
2185
2021
  };
2186
2022
  }
2187
- function Ue(e, t) {
2023
+ function We(e, t) {
2188
2024
  return e.map((n) => {
2189
2025
  const r = t?.get(n.path);
2190
- return Mn(n, r);
2026
+ return bn(n, r);
2191
2027
  });
2192
2028
  }
2193
- function Dn(e, t) {
2029
+ function vn(e, t) {
2194
2030
  switch (e.type) {
2195
2031
  // Type errors
2196
2032
  case "type":
2197
- return `Expected ${ce(e.expected)}, got ${Sn(e.actual)}`;
2033
+ return `Expected ${pe(e.expected)}, got ${xn(e.actual)}`;
2198
2034
  case "type_mismatch":
2199
- return `Value must be of type ${ce(e.expected)}`;
2035
+ return `Value must be of type ${pe(e.expected)}`;
2200
2036
  // String validation
2201
2037
  case "minLength":
2202
2038
  return `Must be at least ${e.expected} characters`;
2203
2039
  case "maxLength":
2204
2040
  return `Must be no more than ${e.expected} characters`;
2205
2041
  case "pattern":
2206
- return On(e, t);
2042
+ return $n(e, t);
2207
2043
  case "format":
2208
- return Cn(e);
2044
+ return In(e);
2209
2045
  // Numeric validation
2210
2046
  case "minimum":
2211
2047
  return `Must be at least ${e.expected}`;
@@ -2218,7 +2054,7 @@ function Dn(e, t) {
2218
2054
  case "multipleOf":
2219
2055
  return `Must be a multiple of ${e.expected}`;
2220
2056
  case "integer_bounds":
2221
- return Rn(e);
2057
+ return Tn(e);
2222
2058
  // Array/Set validation
2223
2059
  case "minItems":
2224
2060
  return `Must have at least ${e.expected} items`;
@@ -2242,10 +2078,10 @@ function Dn(e, t) {
2242
2078
  case "additionalProperties":
2243
2079
  return `Unknown property: ${e.actual}`;
2244
2080
  case "dependentRequired":
2245
- return kn(e);
2081
+ return wn(e);
2246
2082
  // Enum/Const validation
2247
2083
  case "enum":
2248
- return Nn(e);
2084
+ return jn(e);
2249
2085
  case "const":
2250
2086
  return `Must be exactly ${JSON.stringify(e.expected)}`;
2251
2087
  // Reference errors
@@ -2260,13 +2096,13 @@ function Dn(e, t) {
2260
2096
  return e.context?.message ?? `Validation error: ${e.type}`;
2261
2097
  }
2262
2098
  }
2263
- function ce(e) {
2264
- return typeof e == "string" ? le(e) : Array.isArray(e) ? e.map(le).join(" or ") : String(e);
2099
+ function pe(e) {
2100
+ return typeof e == "string" ? de(e) : Array.isArray(e) ? e.map(de).join(" or ") : String(e);
2265
2101
  }
2266
- function Sn(e) {
2102
+ function xn(e) {
2267
2103
  return e === null ? "null" : e === void 0 ? "undefined" : typeof e;
2268
2104
  }
2269
- function le(e) {
2105
+ function de(e) {
2270
2106
  return {
2271
2107
  string: "text",
2272
2108
  boolean: "true/false",
@@ -2300,7 +2136,7 @@ function le(e) {
2300
2136
  null: "empty"
2301
2137
  }[e] ?? e;
2302
2138
  }
2303
- function On(e, t) {
2139
+ function $n(e, t) {
2304
2140
  const n = t?.description;
2305
2141
  if (n && e.type === "pattern")
2306
2142
  return `Does not match required format: ${n}`;
@@ -2319,7 +2155,7 @@ function On(e, t) {
2319
2155
  }
2320
2156
  return "Does not match required format";
2321
2157
  }
2322
- function Cn(e) {
2158
+ function In(e) {
2323
2159
  const t = e.expected;
2324
2160
  return {
2325
2161
  email: "Must be a valid email address",
@@ -2336,23 +2172,23 @@ function Cn(e) {
2336
2172
  "json-pointer": "Must be a valid JSON pointer"
2337
2173
  }[t] ?? `Must be a valid ${t}`;
2338
2174
  }
2339
- function Rn(e) {
2175
+ function Tn(e) {
2340
2176
  const t = e.context?.type;
2341
- if (t && P(t)) {
2342
- const n = W[t];
2177
+ if (t && F(t)) {
2178
+ const n = z[t];
2343
2179
  return `Must be between ${n.min} and ${n.max}`;
2344
2180
  }
2345
2181
  return "Value is out of range for this integer type";
2346
2182
  }
2347
- function kn(e) {
2183
+ function wn(e) {
2348
2184
  const t = e.context?.dependent, n = e.context?.required;
2349
2185
  return t && n?.length ? `When "${t}" is present, "${n.join('", "')}" must also be provided` : "Missing required dependent fields";
2350
2186
  }
2351
- function Nn(e) {
2187
+ function jn(e) {
2352
2188
  const t = e.expected;
2353
2189
  return t && t.length <= 5 ? `Must be one of: ${t.map((r) => JSON.stringify(r)).join(", ")}` : "Invalid value";
2354
2190
  }
2355
- function fr(e) {
2191
+ function sr(e) {
2356
2192
  const t = /* @__PURE__ */ new Map();
2357
2193
  for (const n of e) {
2358
2194
  const r = t.get(n.path) ?? [];
@@ -2360,17 +2196,17 @@ function fr(e) {
2360
2196
  }
2361
2197
  return t;
2362
2198
  }
2363
- function mr(e, t) {
2199
+ function ar(e, t) {
2364
2200
  return e.filter((n) => n.path === t);
2365
2201
  }
2366
- function yr(e, t) {
2202
+ function ur(e, t) {
2367
2203
  return e.some((n) => n.path === t);
2368
2204
  }
2369
- function gr(e, t) {
2205
+ function or(e, t) {
2370
2206
  const n = t === "" ? "/" : `${t}/`;
2371
2207
  return e.filter((r) => r.path.startsWith(n));
2372
2208
  }
2373
- class _ {
2209
+ class G {
2374
2210
  registrations = /* @__PURE__ */ new Map();
2375
2211
  parent;
2376
2212
  constructor(t) {
@@ -2436,20 +2272,20 @@ class _ {
2436
2272
  return a && t.supportedFormats?.includes(a) && (r += 30), r += t.priority ?? 0, r;
2437
2273
  }
2438
2274
  createChild() {
2439
- return new _(this);
2275
+ return new G(this);
2440
2276
  }
2441
2277
  }
2442
- let L = null;
2443
- function F() {
2444
- return L || (L = new _()), L;
2278
+ let V = null;
2279
+ function E() {
2280
+ return V || (V = new G()), V;
2445
2281
  }
2446
- function hr(e) {
2447
- L = e;
2282
+ function cr(e) {
2283
+ V = e;
2448
2284
  }
2449
- function br(e) {
2450
- return new _(e);
2285
+ function lr(e) {
2286
+ return new G(e);
2451
2287
  }
2452
- function vr(e, t, n) {
2288
+ function pr(e, t, n) {
2453
2289
  return {
2454
2290
  name: `type:${e}`,
2455
2291
  registration: {
@@ -2462,7 +2298,7 @@ function vr(e, t, n) {
2462
2298
  }
2463
2299
  };
2464
2300
  }
2465
- function xr(e, t, n) {
2301
+ function dr(e, t, n) {
2466
2302
  return {
2467
2303
  name: `format:${e}`,
2468
2304
  registration: {
@@ -2476,7 +2312,7 @@ function xr(e, t, n) {
2476
2312
  }
2477
2313
  };
2478
2314
  }
2479
- function $r(e, t, n, r) {
2315
+ function fr(e, t, n, r) {
2480
2316
  return {
2481
2317
  name: `type:${e}:format:${t}`,
2482
2318
  registration: {
@@ -2491,7 +2327,7 @@ function $r(e, t, n, r) {
2491
2327
  }
2492
2328
  };
2493
2329
  }
2494
- function Ir(e, t, n, r) {
2330
+ function mr(e, t, n, r) {
2495
2331
  return {
2496
2332
  name: e,
2497
2333
  registration: {
@@ -2505,15 +2341,15 @@ function Ir(e, t, n, r) {
2505
2341
  }
2506
2342
  };
2507
2343
  }
2508
- function qn(e, t) {
2344
+ function Mn(e, t) {
2509
2345
  if (t) {
2510
2346
  const r = t.findBestWidget(e);
2511
2347
  if (r)
2512
2348
  return r;
2513
2349
  }
2514
- return F().findBestWidget(e);
2350
+ return E().findBestWidget(e);
2515
2351
  }
2516
- function wr(e) {
2352
+ function yr(e) {
2517
2353
  const t = e.definition, n = {};
2518
2354
  if (typeof t == "object" && "x:ui" in t) {
2519
2355
  const r = t["x:ui"];
@@ -2528,7 +2364,7 @@ function wr(e) {
2528
2364
  }
2529
2365
  return Object.keys(n).length > 0 ? n : void 0;
2530
2366
  }
2531
- function Be(e) {
2367
+ function _e(e) {
2532
2368
  const t = e.definition;
2533
2369
  if (typeof t == "object" && "x:ui" in t) {
2534
2370
  const n = t["x:ui"];
@@ -2541,18 +2377,18 @@ function Be(e) {
2541
2377
  return n.type;
2542
2378
  }
2543
2379
  }
2544
- function Tr(e) {
2545
- return Be(e) !== void 0;
2380
+ function gr(e) {
2381
+ return _e(e) !== void 0;
2546
2382
  }
2547
- function jr(e, t) {
2548
- const n = Be(e);
2383
+ function hr(e, t) {
2384
+ const n = _e(e);
2549
2385
  if (n) {
2550
2386
  if (t) {
2551
2387
  const a = t.get(n);
2552
2388
  if (a)
2553
2389
  return { name: n, registration: a };
2554
2390
  }
2555
- const s = F().get(n);
2391
+ const s = E().get(n);
2556
2392
  if (s)
2557
2393
  return { name: n, registration: s };
2558
2394
  console.warn(
@@ -2560,18 +2396,18 @@ function jr(e, t) {
2560
2396
  { path: e.jsonPath }
2561
2397
  );
2562
2398
  }
2563
- return qn(e, t);
2399
+ return Mn(e, t);
2564
2400
  }
2565
- function Ar(e, t, n) {
2401
+ function br(e, t, n) {
2566
2402
  return {
2567
2403
  ...e,
2568
2404
  ...t,
2569
2405
  ...n
2570
2406
  };
2571
2407
  }
2572
- function Pn(e = F()) {
2408
+ function Sn(e = E()) {
2573
2409
  e.register("string", {
2574
- factory: ({ controller: i, ctx: o }) => Ie({
2410
+ factory: ({ controller: i, ctx: o }) => we({
2575
2411
  ctx: o,
2576
2412
  controller: i
2577
2413
  }),
@@ -2581,7 +2417,7 @@ function Pn(e = F()) {
2581
2417
  priority: 0,
2582
2418
  canFallback: !0
2583
2419
  }), e.register("boolean", {
2584
- factory: ({ controller: i, ctx: o }) => we({
2420
+ factory: ({ controller: i, ctx: o }) => je({
2585
2421
  ctx: o,
2586
2422
  controller: i
2587
2423
  }),
@@ -2591,7 +2427,7 @@ function Pn(e = F()) {
2591
2427
  priority: 0,
2592
2428
  canFallback: !0
2593
2429
  }), e.register("uuid", {
2594
- factory: ({ controller: i, ctx: o }) => De({
2430
+ factory: ({ controller: i, ctx: o }) => Ce({
2595
2431
  ctx: o,
2596
2432
  controller: i
2597
2433
  }),
@@ -2601,7 +2437,7 @@ function Pn(e = F()) {
2601
2437
  priority: 0,
2602
2438
  canFallback: !0
2603
2439
  }), e.register("uri", {
2604
- factory: ({ controller: i, ctx: o }) => Oe({
2440
+ factory: ({ controller: i, ctx: o }) => Ne({
2605
2441
  ctx: o,
2606
2442
  controller: i
2607
2443
  }),
@@ -2611,7 +2447,7 @@ function Pn(e = F()) {
2611
2447
  priority: 0,
2612
2448
  canFallback: !0
2613
2449
  }), e.register("binary", {
2614
- factory: ({ controller: i, ctx: o }) => Ce({
2450
+ factory: ({ controller: i, ctx: o }) => Re({
2615
2451
  ctx: o,
2616
2452
  controller: i
2617
2453
  }),
@@ -2621,7 +2457,7 @@ function Pn(e = F()) {
2621
2457
  priority: 0,
2622
2458
  canFallback: !0
2623
2459
  }), e.register("any", {
2624
- factory: ({ controller: i, ctx: o }) => K({
2460
+ factory: ({ controller: i, ctx: o }) => Z({
2625
2461
  ctx: o,
2626
2462
  controller: i
2627
2463
  }),
@@ -2642,7 +2478,7 @@ function Pn(e = F()) {
2642
2478
  "uint32",
2643
2479
  "uint64",
2644
2480
  "uint128"
2645
- ], n = ({ controller: i, ctx: o }) => Ae({
2481
+ ], n = ({ controller: i, ctx: o }) => De({
2646
2482
  ctx: o,
2647
2483
  controller: i,
2648
2484
  intType: o.primaryType
@@ -2656,7 +2492,7 @@ function Pn(e = F()) {
2656
2492
  priority: 0,
2657
2493
  canFallback: !0
2658
2494
  });
2659
- const r = ["float", "double", "decimal"], s = ({ controller: i, ctx: o }) => Me({
2495
+ const r = ["float", "double", "decimal"], s = ({ controller: i, ctx: o }) => Ae({
2660
2496
  ctx: o,
2661
2497
  controller: i,
2662
2498
  floatType: o.primaryType
@@ -2670,7 +2506,7 @@ function Pn(e = F()) {
2670
2506
  priority: 0,
2671
2507
  canFallback: !0
2672
2508
  });
2673
- const a = ["date", "datetime", "time", "duration"], u = ({ controller: i, ctx: o }) => Se({
2509
+ const a = ["date", "datetime", "time", "duration"], u = ({ controller: i, ctx: o }) => Oe({
2674
2510
  ctx: o,
2675
2511
  controller: i,
2676
2512
  temporalType: o.primaryType
@@ -2685,7 +2521,7 @@ function Pn(e = F()) {
2685
2521
  canFallback: !0
2686
2522
  });
2687
2523
  e.register("object", {
2688
- factory: ({ controller: i, ctx: o }) => Re({
2524
+ factory: ({ controller: i, ctx: o }) => ke({
2689
2525
  ctx: o,
2690
2526
  controller: i
2691
2527
  }),
@@ -2695,7 +2531,7 @@ function Pn(e = F()) {
2695
2531
  priority: 0,
2696
2532
  canFallback: !0
2697
2533
  }), e.register("array", {
2698
- factory: ({ controller: i, ctx: o }) => ke({
2534
+ factory: ({ controller: i, ctx: o }) => Pe({
2699
2535
  ctx: o,
2700
2536
  controller: i
2701
2537
  }),
@@ -2705,7 +2541,7 @@ function Pn(e = F()) {
2705
2541
  priority: 0,
2706
2542
  canFallback: !0
2707
2543
  }), e.register("set", {
2708
- factory: ({ controller: i, ctx: o }) => Ne({
2544
+ factory: ({ controller: i, ctx: o }) => qe({
2709
2545
  ctx: o,
2710
2546
  controller: i
2711
2547
  }),
@@ -2715,7 +2551,7 @@ function Pn(e = F()) {
2715
2551
  priority: 0,
2716
2552
  canFallback: !0
2717
2553
  }), e.register("map", {
2718
- factory: ({ controller: i, ctx: o }) => qe({
2554
+ factory: ({ controller: i, ctx: o }) => Fe({
2719
2555
  ctx: o,
2720
2556
  controller: i
2721
2557
  }),
@@ -2725,7 +2561,7 @@ function Pn(e = F()) {
2725
2561
  priority: 0,
2726
2562
  canFallback: !0
2727
2563
  }), e.register("tuple", {
2728
- factory: ({ controller: i, ctx: o }) => Pe({
2564
+ factory: ({ controller: i, ctx: o }) => Le({
2729
2565
  ctx: o,
2730
2566
  controller: i
2731
2567
  }),
@@ -2735,7 +2571,7 @@ function Pn(e = F()) {
2735
2571
  priority: 0,
2736
2572
  canFallback: !0
2737
2573
  }), e.register("choice", {
2738
- factory: ({ controller: i, ctx: o }) => Fe({
2574
+ factory: ({ controller: i, ctx: o }) => Ee({
2739
2575
  ctx: o,
2740
2576
  controller: i
2741
2577
  }),
@@ -2745,7 +2581,7 @@ function Pn(e = F()) {
2745
2581
  priority: 0,
2746
2582
  canFallback: !0
2747
2583
  }), e.register("enum", {
2748
- factory: ({ controller: i, ctx: o }) => Le({
2584
+ factory: ({ controller: i, ctx: o }) => Ve({
2749
2585
  ctx: o,
2750
2586
  controller: i
2751
2587
  }),
@@ -2756,7 +2592,7 @@ function Pn(e = F()) {
2756
2592
  canFallback: !1,
2757
2593
  matcher: (i) => i.hasEnum
2758
2594
  }), e.register("const", {
2759
- factory: ({ controller: i, ctx: o }) => Ve({
2595
+ factory: ({ controller: i, ctx: o }) => Ue({
2760
2596
  ctx: o,
2761
2597
  controller: i
2762
2598
  }),
@@ -2768,71 +2604,74 @@ function Pn(e = F()) {
2768
2604
  matcher: (i) => i.hasConst
2769
2605
  });
2770
2606
  }
2771
- function Fn(e = F()) {
2607
+ function Dn(e = E()) {
2772
2608
  return e.has("string") && e.has("object") && e.has("array");
2773
2609
  }
2774
- function Mr(e = F()) {
2775
- Fn(e) || Pn(e);
2610
+ function vr(e = E()) {
2611
+ Dn(e) || Sn(e);
2776
2612
  }
2777
- function Ln(e) {
2613
+ function An(e) {
2778
2614
  let t = e;
2779
2615
  if (e.$root) {
2780
- const n = N(e.$root, e);
2616
+ const n = k(e.$root, e);
2781
2617
  n && (t = n);
2782
2618
  }
2783
- return M(t, e, /* @__PURE__ */ new Set());
2619
+ return S(t, e, /* @__PURE__ */ new Set());
2784
2620
  }
2785
- function M(e, t, n) {
2786
- if (e.type && C(e.type)) {
2621
+ function S(e, t, n) {
2622
+ if (e.type && O(e.type)) {
2787
2623
  const r = e.type.$ref;
2788
2624
  if (n.has(r))
2789
2625
  return;
2790
2626
  n.add(r);
2791
- const s = N(r, t);
2792
- if (s) {
2793
- const a = {
2794
- ...s,
2795
- ...e,
2796
- type: s.type
2797
- // Use resolved type, not the ref
2798
- }, u = M(a, t, n);
2799
- return n.delete(r), u;
2627
+ try {
2628
+ const s = k(r, t);
2629
+ if (s) {
2630
+ const a = {
2631
+ ...s,
2632
+ ...e,
2633
+ type: s.type
2634
+ // Use resolved type, not the ref
2635
+ };
2636
+ return S(a, t, n);
2637
+ }
2638
+ return;
2639
+ } finally {
2640
+ n.delete(r);
2800
2641
  }
2801
- n.delete(r);
2802
- return;
2803
2642
  }
2804
- return e.default !== void 0 ? e.default : Array.isArray(e.examples) && e.examples.length > 0 ? e.examples[0] : "const" in e && e.const !== void 0 ? e.const : "enum" in e && Array.isArray(e.enum) && e.enum.length > 0 ? e.enum[0] : Hn(e) ? null : Vn(e, t, n);
2643
+ return e.default !== void 0 ? e.default : Array.isArray(e.examples) && e.examples.length > 0 ? e.examples[0] : "const" in e && e.const !== void 0 ? e.const : "enum" in e && Array.isArray(e.enum) && e.enum.length > 0 ? e.enum[0] : Un(e) ? null : Cn(e, t, n);
2805
2644
  }
2806
- function Vn(e, t, n) {
2807
- const r = We(e);
2808
- if (k(e))
2809
- return Un(e, t, n);
2645
+ function Cn(e, t, n) {
2646
+ const r = ze(e);
2647
+ if (R(e))
2648
+ return Nn(e, t, n);
2810
2649
  if (r === "choice" && "choices" in e)
2811
- return Bn(e, t, n);
2650
+ return Rn(e, t, n);
2812
2651
  if (r === "tuple" && "tuple" in e && "properties" in e)
2813
- return Wn(e, t, n);
2652
+ return kn(e, t, n);
2814
2653
  if (r === "array")
2815
- return _n(e, t, n);
2654
+ return Pn(e, t, n);
2816
2655
  if (r === "set")
2817
- return zn(e, t, n);
2656
+ return qn(e, t, n);
2818
2657
  if (r === "map")
2819
2658
  return {};
2820
2659
  if (r === "string")
2821
- return Gn(e);
2822
- if (Xn(r))
2823
- return Kn(e);
2824
- if (Yn(r))
2825
- return Jn(e);
2660
+ return Fn(e);
2661
+ if (Bn(r))
2662
+ return Ln(e);
2663
+ if (Wn(r))
2664
+ return En(e);
2826
2665
  if (r === "boolean")
2827
2666
  return !1;
2828
2667
  if (r === "null")
2829
2668
  return null;
2830
- if (Qn(r))
2831
- return Zn(r);
2669
+ if (_n(r))
2670
+ return Vn(r);
2832
2671
  if (r === "uuid" || r === "uri" || r === "uri-reference" || r === "binary" || r === "bytes")
2833
2672
  return "";
2834
2673
  }
2835
- function En(e) {
2674
+ function On(e) {
2836
2675
  if (!e || e.length === 0)
2837
2676
  return /* @__PURE__ */ new Set();
2838
2677
  if (Array.isArray(e[0])) {
@@ -2841,34 +2680,37 @@ function En(e) {
2841
2680
  }
2842
2681
  return new Set(e);
2843
2682
  }
2844
- function Un(e, t, n) {
2845
- if (!k(e))
2683
+ function Nn(e, t, n) {
2684
+ if (!R(e))
2846
2685
  return {};
2847
- const r = En(e.required), s = {};
2686
+ const r = On(e.required), s = {};
2848
2687
  for (const [a, u] of Object.entries(e.properties))
2849
2688
  if (r.has(a))
2850
- if (u.type && C(u.type)) {
2689
+ if (u.type && O(u.type)) {
2851
2690
  const i = u.type.$ref;
2852
2691
  if (n.has(i))
2853
2692
  continue;
2854
2693
  n.add(i);
2855
- const o = N(i, t);
2856
- if (o) {
2857
- const c = {
2858
- ...o,
2859
- ...u,
2860
- type: o.type
2861
- }, l = M(c, t, n);
2862
- l !== void 0 && (s[a] = l);
2694
+ try {
2695
+ const o = k(i, t);
2696
+ if (o) {
2697
+ const c = {
2698
+ ...o,
2699
+ ...u,
2700
+ type: o.type
2701
+ }, l = S(c, t, n);
2702
+ l !== void 0 && (s[a] = l);
2703
+ }
2704
+ } finally {
2705
+ n.delete(i);
2863
2706
  }
2864
- n.delete(i);
2865
2707
  } else {
2866
- const i = M(u, t, n);
2708
+ const i = S(u, t, n);
2867
2709
  i !== void 0 && (s[a] = i);
2868
2710
  }
2869
2711
  return s;
2870
2712
  }
2871
- function Bn(e, t, n) {
2713
+ function Rn(e, t, n) {
2872
2714
  if (!("choices" in e))
2873
2715
  return;
2874
2716
  const r = e.choices, s = Object.keys(r);
@@ -2876,7 +2718,7 @@ function Bn(e, t, n) {
2876
2718
  return;
2877
2719
  const a = s[0], u = r[a];
2878
2720
  if ("selector" in e && e.selector) {
2879
- const o = e.selector, c = M(u, t, n);
2721
+ const o = e.selector, c = S(u, t, n);
2880
2722
  return typeof c == "object" && c !== null ? {
2881
2723
  [o]: a,
2882
2724
  ...c
@@ -2884,10 +2726,10 @@ function Bn(e, t, n) {
2884
2726
  [o]: a
2885
2727
  };
2886
2728
  }
2887
- const i = M(u, t, n);
2729
+ const i = S(u, t, n);
2888
2730
  return { [a]: i };
2889
2731
  }
2890
- function Wn(e, t, n) {
2732
+ function kn(e, t, n) {
2891
2733
  if (!("tuple" in e) || !("properties" in e))
2892
2734
  return {};
2893
2735
  const r = e.tuple, s = e.properties, a = new Set(
@@ -2898,38 +2740,38 @@ function Wn(e, t, n) {
2898
2740
  continue;
2899
2741
  const o = s[i];
2900
2742
  if (o) {
2901
- const c = M(o, t, n);
2743
+ const c = S(o, t, n);
2902
2744
  c !== void 0 && (u[i] = c);
2903
2745
  }
2904
2746
  }
2905
2747
  return u;
2906
2748
  }
2907
- function _n(e, t, n) {
2749
+ function Pn(e, t, n) {
2908
2750
  const r = ("minItems" in e ? e.minItems : 0) ?? 0;
2909
2751
  if (r === 0)
2910
2752
  return [];
2911
2753
  const s = "items" in e ? e.items : void 0;
2912
2754
  if (!s)
2913
2755
  return Array(r).fill(null);
2914
- const a = M(s, t, n);
2756
+ const a = S(s, t, n);
2915
2757
  return Array(r).fill(a ?? null);
2916
2758
  }
2917
- function zn(e, t, n) {
2759
+ function qn(e, t, n) {
2918
2760
  const r = ("minItems" in e ? e.minItems : 0) ?? 0;
2919
2761
  if (r === 0)
2920
2762
  return [];
2921
2763
  const s = "items" in e ? e.items : void 0;
2922
2764
  if (!s)
2923
2765
  return Array(r).fill(null);
2924
- const a = M(s, t, n);
2766
+ const a = S(s, t, n);
2925
2767
  return Array(r).fill(a ?? null);
2926
2768
  }
2927
- function Gn(e) {
2769
+ function Fn(e) {
2928
2770
  switch ("format" in e ? e.format : void 0) {
2929
2771
  case "date":
2930
- return _e();
2772
+ return Ge();
2931
2773
  case "date-time":
2932
- return ze();
2774
+ return Ke();
2933
2775
  case "time":
2934
2776
  return "00:00:00";
2935
2777
  case "email":
@@ -2940,8 +2782,8 @@ function Gn(e) {
2940
2782
  return "";
2941
2783
  }
2942
2784
  }
2943
- function Kn(e) {
2944
- const t = We(e), n = t === "int64" || t === "uint64" || t === "int128" || t === "uint128";
2785
+ function Ln(e) {
2786
+ const t = ze(e), n = t === "int64" || t === "uint64" || t === "int128" || t === "uint128";
2945
2787
  let r = "minimum" in e ? e.minimum : void 0, s = "maximum" in e ? e.maximum : void 0;
2946
2788
  const a = "exclusiveMinimum" in e ? e.exclusiveMinimum : void 0, u = "exclusiveMaximum" in e ? e.exclusiveMaximum : void 0;
2947
2789
  a !== void 0 && (r = a + 1), u !== void 0 && (s = u - 1);
@@ -2950,7 +2792,7 @@ function Kn(e) {
2950
2792
  const o = "multipleOf" in e ? e.multipleOf : void 0;
2951
2793
  return o !== void 0 && o > 0 && (i = Math.round(i / o) * o, r !== void 0 && i < r && (i = Math.ceil(r / o) * o), s !== void 0 && i > s && (i = Math.floor(s / o) * o)), n ? BigInt(Math.round(i)) : Math.round(i);
2952
2794
  }
2953
- function Jn(e) {
2795
+ function En(e) {
2954
2796
  let t = "minimum" in e ? e.minimum : void 0, n = "maximum" in e ? e.maximum : void 0;
2955
2797
  const r = "exclusiveMinimum" in e ? e.exclusiveMinimum : void 0, s = "exclusiveMaximum" in e ? e.exclusiveMaximum : void 0, a = "multipleOf" in e ? e.multipleOf : 1e-3;
2956
2798
  r !== void 0 && (t = r + a), s !== void 0 && (n = s - a);
@@ -2959,26 +2801,26 @@ function Jn(e) {
2959
2801
  const i = "multipleOf" in e ? e.multipleOf : void 0;
2960
2802
  return i !== void 0 && i > 0 && (u = Math.round(u / i) * i, t !== void 0 && u < t && (u = Math.ceil(t / i) * i), n !== void 0 && u > n && (u = Math.floor(n / i) * i)), u;
2961
2803
  }
2962
- function Zn(e) {
2804
+ function Vn(e) {
2963
2805
  switch (e) {
2964
2806
  case "date":
2965
- return _e();
2807
+ return Ge();
2966
2808
  case "time":
2967
2809
  return "00:00:00";
2968
2810
  case "datetime":
2969
- return ze();
2811
+ return Ke();
2970
2812
  case "duration":
2971
2813
  return "PT0S";
2972
2814
  default:
2973
2815
  return "";
2974
2816
  }
2975
2817
  }
2976
- function Hn(e) {
2818
+ function Un(e) {
2977
2819
  return Array.isArray(e.type) ? e.type.some(
2978
2820
  (t) => typeof t == "string" ? t === "null" : !1
2979
2821
  ) : !1;
2980
2822
  }
2981
- function We(e) {
2823
+ function ze(e) {
2982
2824
  const t = e.type;
2983
2825
  if (typeof t == "string")
2984
2826
  return t;
@@ -2988,7 +2830,7 @@ function We(e) {
2988
2830
  return n;
2989
2831
  }
2990
2832
  }
2991
- function Xn(e) {
2833
+ function Bn(e) {
2992
2834
  return e ? [
2993
2835
  "int8",
2994
2836
  "int16",
@@ -3002,22 +2844,22 @@ function Xn(e) {
3002
2844
  "uint128"
3003
2845
  ].includes(e) : !1;
3004
2846
  }
3005
- function Yn(e) {
2847
+ function Wn(e) {
3006
2848
  return e ? ["float", "double", "decimal"].includes(e) : !1;
3007
2849
  }
3008
- function Qn(e) {
2850
+ function _n(e) {
3009
2851
  return e ? ["date", "time", "datetime", "duration"].includes(e) : !1;
3010
2852
  }
3011
- function _e() {
2853
+ function Ge() {
3012
2854
  return (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
3013
2855
  }
3014
- function ze() {
2856
+ function Ke() {
3015
2857
  return (/* @__PURE__ */ new Date()).toISOString();
3016
2858
  }
3017
- function er(e) {
2859
+ function zn(e) {
3018
2860
  if (e.isValid)
3019
- return ie.valid;
3020
- const t = Ue(e.errors), n = /* @__PURE__ */ new Map();
2861
+ return ae.valid;
2862
+ const t = We(e.errors), n = /* @__PURE__ */ new Map();
3021
2863
  for (const u of t) {
3022
2864
  const i = n.get(u.path) || [];
3023
2865
  i.push(u), n.set(u.path, i);
@@ -3048,9 +2890,9 @@ function er(e) {
3048
2890
  a[c] = r(l, i);
3049
2891
  }
3050
2892
  }
3051
- return Object.keys(a).length > 0 && (s.dependencies = a), ie.invalid(s);
2893
+ return Object.keys(a).length > 0 && (s.dependencies = a), ae.invalid(s);
3052
2894
  }
3053
- function Dr({
2895
+ function xr({
3054
2896
  schema: e,
3055
2897
  initialValue: t,
3056
2898
  validationMode: n,
@@ -3062,30 +2904,30 @@ function Dr({
3062
2904
  onValidate: o,
3063
2905
  applySchemaDefaults: c = !0
3064
2906
  }, l) {
3065
- const y = t !== void 0 ? I.get(t) : void 0, h = Ln(e);
2907
+ const y = t !== void 0 ? I.get(t) : void 0, h = An(e);
3066
2908
  let f;
3067
- t === void 0 ? f = h ?? {} : c ? f = ot(
2909
+ t === void 0 ? f = h ?? {} : c ? f = lt(
3068
2910
  h,
3069
2911
  y
3070
2912
  ) : f = y;
3071
- const g = Ee(e), d = n ?? "onTouched", v = (R) => {
3072
- const x = g.validate(R);
2913
+ const g = Be(e), d = n ?? "onTouched", v = (N) => {
2914
+ const x = g.validate(N);
3073
2915
  if (o && !x.isValid) {
3074
- const O = Ue(x.errors);
3075
- o(O);
2916
+ const C = We(x.errors);
2917
+ o(C);
3076
2918
  }
3077
- return er(x);
3078
- }, { controller: $, setStatus: A } = Ye({
2919
+ return zn(x);
2920
+ }, { controller: $, setStatus: M } = et({
3079
2921
  initialValue: f,
3080
2922
  validationMode: d,
3081
2923
  validateDebounceMs: r,
3082
2924
  validate: d === "onSubmit" ? void 0 : v,
3083
2925
  onChange: i
3084
- }), S = Z(
3085
- He(() => {
2926
+ }), A = X(
2927
+ Ye(() => {
3086
2928
  $.dispose();
3087
2929
  }),
3088
- wn({
2930
+ mn({
3089
2931
  schema: e,
3090
2932
  controller: $,
3091
2933
  widgetRegistry: s,
@@ -3093,67 +2935,67 @@ function Dr({
3093
2935
  locale: u
3094
2936
  })
3095
2937
  );
3096
- return l({ Form: S, controller: $, setStatus: A });
2938
+ return l({ Form: A, controller: $, setStatus: M });
3097
2939
  }
3098
2940
  export {
3099
- _ as DefaultWidgetRegistry,
3100
- W as INTEGER_BOUNDS,
3101
- Dr as JSONStructureForm,
3102
- Rt as RefResolver,
3103
- te as StructureContext,
3104
- wn as StructureControl,
2941
+ G as DefaultWidgetRegistry,
2942
+ z as INTEGER_BOUNDS,
2943
+ xr as JSONStructureForm,
2944
+ kt as RefResolver,
2945
+ re as StructureContext,
2946
+ mn as StructureControl,
3105
2947
  j as StructureGenericControl,
3106
- pr as createExtendsResolver,
3107
- ee as createRefResolver,
3108
- kt as createStructureContext,
3109
- Ee as createValidator,
3110
- br as createWidgetRegistry,
3111
- Mr as ensureDefaultWidgets,
3112
- Ln as extractStructureDefaults,
3113
- xr as forFormat,
3114
- Ir as forMatcher,
3115
- vr as forType,
3116
- $r as forTypeAndFormat,
3117
- Mn as formatValidationError,
3118
- Ue as formatValidationErrors,
3119
- gr as getChildErrors,
3120
- mr as getErrorsForPath,
3121
- Be as getExplicitWidgetName,
3122
- F as getGlobalWidgetRegistry,
3123
- Q as getNonNullTypes,
3124
- se as getResolvedType,
3125
- wr as getWidgetOptions,
3126
- fr as groupErrorsByPath,
3127
- Dt as hasConstValue,
3128
- Tr as hasCustomWidget,
3129
- Fn as hasDefaultWidgets,
3130
- Mt as hasEnumValue,
3131
- yr as hasErrorsAtPath,
3132
- ge as isArrayTypeDefinition,
3133
- It as isBigIntType,
3134
- xe as isChoiceTypeDefinition,
3135
- cr as isCompoundType,
3136
- X as isFloatType,
3137
- P as isIntegerType,
3138
- be as isMapTypeDefinition,
3139
- jt as isNamespace,
3140
- St as isNullableType,
3141
- wt as isNumericType,
3142
- k as isObjectTypeDefinition,
3143
- Tt as isPrimitiveType,
3144
- he as isSetTypeDefinition,
3145
- Y as isTemporalType,
3146
- ve as isTupleTypeDefinition,
3147
- At as isTypeDefinition,
3148
- C as isTypeReference,
3149
- Ar as mergeWidgetOptions,
3150
- Ot as parseRefPath,
3151
- Pn as registerDefaultWidgets,
3152
- $e as resolveExtends,
3153
- N as resolveRef,
3154
- lr as resolveTypeReference,
3155
- qn as resolveWidget,
3156
- jr as resolveWidgetWithOverride,
3157
- hr as setGlobalWidgetRegistry,
3158
- dr as validate
2948
+ rr as createExtendsResolver,
2949
+ ne as createRefResolver,
2950
+ Pt as createStructureContext,
2951
+ Be as createValidator,
2952
+ lr as createWidgetRegistry,
2953
+ vr as ensureDefaultWidgets,
2954
+ An as extractStructureDefaults,
2955
+ dr as forFormat,
2956
+ mr as forMatcher,
2957
+ pr as forType,
2958
+ fr as forTypeAndFormat,
2959
+ bn as formatValidationError,
2960
+ We as formatValidationErrors,
2961
+ or as getChildErrors,
2962
+ ar as getErrorsForPath,
2963
+ _e as getExplicitWidgetName,
2964
+ E as getGlobalWidgetRegistry,
2965
+ te as getNonNullTypes,
2966
+ ue as getResolvedType,
2967
+ yr as getWidgetOptions,
2968
+ sr as groupErrorsByPath,
2969
+ Ct as hasConstValue,
2970
+ gr as hasCustomWidget,
2971
+ Dn as hasDefaultWidgets,
2972
+ At as hasEnumValue,
2973
+ ur as hasErrorsAtPath,
2974
+ be as isArrayTypeDefinition,
2975
+ wt as isBigIntType,
2976
+ Ie as isChoiceTypeDefinition,
2977
+ tr as isCompoundType,
2978
+ Q as isFloatType,
2979
+ F as isIntegerType,
2980
+ xe as isMapTypeDefinition,
2981
+ St as isNamespace,
2982
+ Ot as isNullableType,
2983
+ jt as isNumericType,
2984
+ R as isObjectTypeDefinition,
2985
+ Mt as isPrimitiveType,
2986
+ ve as isSetTypeDefinition,
2987
+ ee as isTemporalType,
2988
+ $e as isTupleTypeDefinition,
2989
+ Dt as isTypeDefinition,
2990
+ O as isTypeReference,
2991
+ br as mergeWidgetOptions,
2992
+ Nt as parseRefPath,
2993
+ Sn as registerDefaultWidgets,
2994
+ Te as resolveExtends,
2995
+ k as resolveRef,
2996
+ nr as resolveTypeReference,
2997
+ Mn as resolveWidget,
2998
+ hr as resolveWidgetWithOverride,
2999
+ cr as setGlobalWidgetRegistry,
3000
+ ir as validate
3159
3001
  };