@michelangelo-ai/core 0.7.0 → 0.8.0-rc.2

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 (25) hide show
  1. package/dist/components/form/fields/string/components/editable-string-tag.d.ts.map +1 -1
  2. package/dist/components/form/fields/string/components/multi-string-field.d.ts.map +1 -1
  3. package/dist/components/form/layout/array-form-group/array-form-group.d.ts.map +1 -1
  4. package/dist/components/links-box/__tests__/links-box.test.d.ts +2 -0
  5. package/dist/components/links-box/__tests__/links-box.test.d.ts.map +1 -0
  6. package/dist/components/links-box/links-box.d.ts +7 -0
  7. package/dist/components/links-box/links-box.d.ts.map +1 -0
  8. package/dist/components/links-box/map-link-config-to-column-config.d.ts +4 -0
  9. package/dist/components/links-box/map-link-config-to-column-config.d.ts.map +1 -0
  10. package/dist/components/links-box/types.d.ts +11 -0
  11. package/dist/components/links-box/types.d.ts.map +1 -0
  12. package/dist/components/message-container/__tests__/message-container.test.d.ts +2 -0
  13. package/dist/components/message-container/__tests__/message-container.test.d.ts.map +1 -0
  14. package/dist/components/message-container/message-container.d.ts +7 -0
  15. package/dist/components/message-container/message-container.d.ts.map +1 -0
  16. package/dist/components/message-container/styled-components.d.ts +6 -0
  17. package/dist/components/message-container/styled-components.d.ts.map +1 -0
  18. package/dist/components/message-container/types.d.ts +17 -0
  19. package/dist/components/message-container/types.d.ts.map +1 -0
  20. package/dist/components/row/types.d.ts +0 -2
  21. package/dist/components/row/types.d.ts.map +1 -1
  22. package/dist/michelangelo-core.cjs +8 -8
  23. package/dist/michelangelo-core.js +290 -305
  24. package/dist/tsconfig.tsbuildinfo +1 -1
  25. package/package.json +1 -1
@@ -469,15 +469,15 @@ function Pr(i, e, t, n) {
469
469
  headers: []
470
470
  }, m = [];
471
471
  f.forEach((y) => {
472
- const b = [...m].reverse()[0], x = y.column.depth === p.depth;
473
- let v, C = !1;
474
- if (x && y.column.parent ? v = y.column.parent : (v = y.column, C = !0), b && (b == null ? void 0 : b.column) === v)
472
+ const b = [...m].reverse()[0], v = y.column.depth === p.depth;
473
+ let x, C = !1;
474
+ if (v && y.column.parent ? x = y.column.parent : (x = y.column, C = !0), b && (b == null ? void 0 : b.column) === x)
475
475
  b.subHeaders.push(y);
476
476
  else {
477
- const S = Ac(t, v, {
478
- id: [n, d, v.id, y == null ? void 0 : y.id].filter(Boolean).join("_"),
477
+ const S = Ac(t, x, {
478
+ id: [n, d, x.id, y == null ? void 0 : y.id].filter(Boolean).join("_"),
479
479
  isPlaceholder: C,
480
- placeholderId: C ? `${m.filter((k) => k.column === v).length}` : void 0,
480
+ placeholderId: C ? `${m.filter((k) => k.column === x).length}` : void 0,
481
481
  depth: d,
482
482
  index: m.length
483
483
  });
@@ -492,15 +492,15 @@ function Pr(i, e, t, n) {
492
492
  c(u, o - 1), a.reverse();
493
493
  const h = (f) => f.filter((p) => p.column.getIsVisible()).map((p) => {
494
494
  let m = 0, y = 0, b = [0];
495
- p.subHeaders && p.subHeaders.length ? (b = [], h(p.subHeaders).forEach((v) => {
495
+ p.subHeaders && p.subHeaders.length ? (b = [], h(p.subHeaders).forEach((x) => {
496
496
  let {
497
497
  colSpan: C,
498
498
  rowSpan: S
499
- } = v;
499
+ } = x;
500
500
  m += C, b.push(S);
501
501
  })) : m = 1;
502
- const x = Math.min(...b);
503
- return y = y + x, p.colSpan = m, p.rowSpan = y, {
502
+ const v = Math.min(...b);
503
+ return y = y + v, p.colSpan = m, p.rowSpan = y, {
504
504
  colSpan: m,
505
505
  rowSpan: y
506
506
  };
@@ -1007,25 +1007,25 @@ const Dr = {
1007
1007
  return (s) => {
1008
1008
  if (!n || !r || (s.persist == null || s.persist(), wo(s) && s.touches && s.touches.length > 1))
1009
1009
  return;
1010
- const o = i.getSize(), l = i ? i.getLeafHeaders().map((b) => [b.column.id, b.column.getSize()]) : [[n.id, n.getSize()]], a = wo(s) ? Math.round(s.touches[0].clientX) : s.clientX, c = {}, u = (b, x) => {
1011
- typeof x == "number" && (e.setColumnSizingInfo((v) => {
1010
+ const o = i.getSize(), l = i ? i.getLeafHeaders().map((b) => [b.column.id, b.column.getSize()]) : [[n.id, n.getSize()]], a = wo(s) ? Math.round(s.touches[0].clientX) : s.clientX, c = {}, u = (b, v) => {
1011
+ typeof v == "number" && (e.setColumnSizingInfo((x) => {
1012
1012
  var C, S;
1013
- const k = e.options.columnResizeDirection === "rtl" ? -1 : 1, E = (x - ((C = v == null ? void 0 : v.startOffset) != null ? C : 0)) * k, O = Math.max(E / ((S = v == null ? void 0 : v.startSize) != null ? S : 0), -0.999999);
1014
- return v.columnSizingStart.forEach((R) => {
1013
+ const k = e.options.columnResizeDirection === "rtl" ? -1 : 1, E = (v - ((C = x == null ? void 0 : x.startOffset) != null ? C : 0)) * k, O = Math.max(E / ((S = x == null ? void 0 : x.startSize) != null ? S : 0), -0.999999);
1014
+ return x.columnSizingStart.forEach((R) => {
1015
1015
  let [z, F] = R;
1016
1016
  c[z] = Math.round(Math.max(F + F * O, 0) * 100) / 100;
1017
1017
  }), {
1018
- ...v,
1018
+ ...x,
1019
1019
  deltaOffset: E,
1020
1020
  deltaPercentage: O
1021
1021
  };
1022
- }), (e.options.columnResizeMode === "onChange" || b === "end") && e.setColumnSizing((v) => ({
1023
- ...v,
1022
+ }), (e.options.columnResizeMode === "onChange" || b === "end") && e.setColumnSizing((x) => ({
1023
+ ...x,
1024
1024
  ...c
1025
1025
  })));
1026
1026
  }, h = (b) => u("move", b), f = (b) => {
1027
- u("end", b), e.setColumnSizingInfo((x) => ({
1028
- ...x,
1027
+ u("end", b), e.setColumnSizingInfo((v) => ({
1028
+ ...v,
1029
1029
  isResizingColumn: !1,
1030
1030
  startOffset: null,
1031
1031
  startSize: null,
@@ -1041,8 +1041,8 @@ const Dr = {
1041
1041
  }, m = {
1042
1042
  moveHandler: (b) => (b.cancelable && (b.preventDefault(), b.stopPropagation()), h(b.touches[0].clientX), !1),
1043
1043
  upHandler: (b) => {
1044
- var x;
1045
- d == null || d.removeEventListener("touchmove", m.moveHandler), d == null || d.removeEventListener("touchend", m.upHandler), b.cancelable && (b.preventDefault(), b.stopPropagation()), f((x = b.touches[0]) == null ? void 0 : x.clientX);
1044
+ var v;
1045
+ d == null || d.removeEventListener("touchmove", m.moveHandler), d == null || d.removeEventListener("touchend", m.upHandler), b.cancelable && (b.preventDefault(), b.stopPropagation()), f((v = b.touches[0]) == null ? void 0 : v.clientX);
1046
1046
  }
1047
1047
  }, y = Py() ? {
1048
1048
  passive: !1
@@ -1848,8 +1848,8 @@ function qy(i) {
1848
1848
  getAllColumns: q(() => [r._getColumnDefs()], (f) => {
1849
1849
  const d = function(p, m, y) {
1850
1850
  return y === void 0 && (y = 0), p.map((b) => {
1851
- const x = fy(r, b, y, m), v = b;
1852
- return x.columns = v.columns ? d(v.columns, x, y + 1) : [], x;
1851
+ const v = fy(r, b, y, m), x = b;
1852
+ return v.columns = x.columns ? d(x.columns, v, y + 1) : [], v;
1853
1853
  });
1854
1854
  };
1855
1855
  return d(f);
@@ -2041,17 +2041,17 @@ function Zy() {
2041
2041
  return a.map((p) => (p.depth = c, r.push(p), s[p.id] = p, p.subRows && (p.subRows = o(p.subRows, c + 1, p.id)), p));
2042
2042
  const h = n[c], f = eb(a, h);
2043
2043
  return Array.from(f.entries()).map((p, m) => {
2044
- let [y, b] = p, x = `${h}:${y}`;
2045
- x = u ? `${u}>${x}` : x;
2046
- const v = o(b, c + 1, x);
2047
- v.forEach((k) => {
2048
- k.parentId = x;
2044
+ let [y, b] = p, v = `${h}:${y}`;
2045
+ v = u ? `${u}>${v}` : v;
2046
+ const x = o(b, c + 1, v);
2047
+ x.forEach((k) => {
2048
+ k.parentId = v;
2049
2049
  });
2050
- const C = c ? pf(b, (k) => k.subRows) : b, S = to(i, x, C[0].original, m, c, void 0, u);
2050
+ const C = c ? pf(b, (k) => k.subRows) : b, S = to(i, v, C[0].original, m, c, void 0, u);
2051
2051
  return Object.assign(S, {
2052
2052
  groupingColumnId: h,
2053
2053
  groupingValue: y,
2054
- subRows: v,
2054
+ subRows: x,
2055
2055
  leafRows: C,
2056
2056
  getValue: (k) => {
2057
2057
  if (n.includes(k)) {
@@ -2069,7 +2069,7 @@ function Zy() {
2069
2069
  if (R)
2070
2070
  return S._groupingValuesCache[k] = R(k, C, b), S._groupingValuesCache[k];
2071
2071
  }
2072
- }), v.forEach((k) => {
2072
+ }), x.forEach((k) => {
2073
2073
  r.push(k), s[k.id] = k;
2074
2074
  }), S;
2075
2075
  });
@@ -2149,17 +2149,17 @@ function ib() {
2149
2149
  for (let d = 0; d < s.length; d += 1) {
2150
2150
  var f;
2151
2151
  const p = s[d], m = o[p.id], y = m.sortUndefined, b = (f = p == null ? void 0 : p.desc) != null ? f : !1;
2152
- let x = 0;
2152
+ let v = 0;
2153
2153
  if (y) {
2154
- const v = u.getValue(p.id), C = h.getValue(p.id), S = v === void 0, k = C === void 0;
2154
+ const x = u.getValue(p.id), C = h.getValue(p.id), S = x === void 0, k = C === void 0;
2155
2155
  if (S || k) {
2156
2156
  if (y === "first") return S ? -1 : 1;
2157
2157
  if (y === "last") return S ? 1 : -1;
2158
- x = S && k ? 0 : S ? y : -y;
2158
+ v = S && k ? 0 : S ? y : -y;
2159
2159
  }
2160
2160
  }
2161
- if (x === 0 && (x = m.sortingFn(u, h, p.id)), x !== 0)
2162
- return b && (x *= -1), m.invertSorting && (x *= -1), x;
2161
+ if (v === 0 && (v = m.sortingFn(u, h, p.id)), v !== 0)
2162
+ return b && (v *= -1), m.invertSorting && (v *= -1), v;
2163
2163
  }
2164
2164
  return u.index - h.index;
2165
2165
  }), c.forEach((u) => {
@@ -3250,16 +3250,16 @@ function Lf(i) {
3250
3250
  return (
3251
3251
  // cast: TypeScript cannot simplify Omit<P & WithStickySidesProps, keyof WithStickySidesProps>
3252
3252
  // back to P after rest destructuring
3253
- /* @__PURE__ */ g.jsx(i, { ...c, ref: f, children: ue.Children.map(a, (b, x) => {
3254
- const v = y[x];
3255
- if (!v || !ue.isValidElement(b)) return b;
3253
+ /* @__PURE__ */ g.jsx(i, { ...c, ref: f, children: ue.Children.map(a, (b, v) => {
3254
+ const x = y[v];
3255
+ if (!x || !ue.isValidElement(b)) return b;
3256
3256
  const C = {
3257
3257
  ...m,
3258
- [v.stickySide]: `${v.position}px !important`
3258
+ [x.stickySide]: `${x.position}px !important`
3259
3259
  };
3260
3260
  return ue.cloneElement(b, {
3261
- className: `${u(C)} ${u(Jb(v.shadowSide, o))}`,
3262
- "data-testid": `sticky-cell-${v.stickySide}-sticky`
3261
+ className: `${u(C)} ${u(Jb(x.shadowSide, o))}`,
3262
+ "data-testid": `sticky-cell-${x.stickySide}-sticky`
3263
3263
  });
3264
3264
  }) })
3265
3265
  );
@@ -3689,7 +3689,7 @@ function vv(i) {
3689
3689
  });
3690
3690
  }
3691
3691
  function Ia(i) {
3692
- var b, x, v, C;
3692
+ var b, v, x, C;
3693
3693
  const e = pv(i), t = Ub(e.columns), [n, r] = G(), { state: s, initialState: o } = yv(e.state ?? {}), { enableRowSelection: l, setRowSelectionEnabled: a } = Yb({
3694
3694
  state: s,
3695
3695
  initialState: o
@@ -3709,7 +3709,7 @@ function Ia(i) {
3709
3709
  getFilteredRowModel: Jy(),
3710
3710
  ...e.disableSorting ? { enableSorting: !1 } : { getSortedRowModel: ib() },
3711
3711
  ...e.disablePagination ? {} : { getPaginationRowModel: tb() },
3712
- ...(b = o.grouping) != null && b.length || (x = s.grouping) != null && x.length ? {
3712
+ ...(b = o.grouping) != null && b.length || (v = s.grouping) != null && v.length ? {
3713
3713
  getGroupedRowModel: Zy(),
3714
3714
  getExpandedRowModel: Tc()
3715
3715
  } : {},
@@ -3735,7 +3735,7 @@ function Ia(i) {
3735
3735
  hasFiltersApplied: (
3736
3736
  // cast: TanStack types globalFilter as any; always string, the value passed to
3737
3737
  // setGlobalFilter
3738
- ((v = f.getState().globalFilter) == null ? void 0 : v.length) > 0 || (((C = f.getState().columnFilters) == null ? void 0 : C.length) ?? 0) > 0
3738
+ ((x = f.getState().globalFilter) == null ? void 0 : x.length) > 0 || (((C = f.getState().columnFilters) == null ? void 0 : C.length) ?? 0) > 0
3739
3739
  ),
3740
3740
  filteredLength: f.getRowModel().rows.length,
3741
3741
  columnsLength: t.length
@@ -4023,13 +4023,13 @@ var Ov = function i(e, t, n, r, s) {
4023
4023
  }
4024
4024
  if (!Array.isArray(e))
4025
4025
  throw new Error("Cannot set a numeric property on an object");
4026
- var y = e[d], b = i(y, t + 1, n, r, s), x = [].concat(e);
4026
+ var y = e[d], b = i(y, t + 1, n, r, s), v = [].concat(e);
4027
4027
  if (s && b === void 0) {
4028
- if (x.splice(d, 1), x.length === 0)
4028
+ if (v.splice(d, 1), v.length === 0)
4029
4029
  return;
4030
4030
  } else
4031
- x[d] = b;
4032
- return x;
4031
+ v[d] = b;
4032
+ return v;
4033
4033
  }, gt = function(e, t, n, r) {
4034
4034
  if (r === void 0 && (r = !1), e == null)
4035
4035
  throw new Error("Cannot call setIn() with " + String(e) + " state");
@@ -4038,7 +4038,7 @@ var Ov = function i(e, t, n, r, s) {
4038
4038
  return Ov(e, 0, Nf(t), n, r);
4039
4039
  }, Jn = "FINAL_FORM/form-error", ln = "FINAL_FORM/array-error";
4040
4040
  function Pc(i, e) {
4041
- var t = i.errors, n = i.initialValues, r = i.lastSubmittedValues, s = i.submitErrors, o = i.submitFailed, l = i.submitSucceeded, a = i.submitting, c = i.values, u = e.active, h = e.blur, f = e.change, d = e.data, p = e.focus, m = e.modified, y = e.modifiedSinceLastSubmit, b = e.name, x = e.touched, v = e.validating, C = e.visited, S = ye(c, b), k = ye(t, b);
4041
+ var t = i.errors, n = i.initialValues, r = i.lastSubmittedValues, s = i.submitErrors, o = i.submitFailed, l = i.submitSucceeded, a = i.submitting, c = i.values, u = e.active, h = e.blur, f = e.change, d = e.data, p = e.focus, m = e.modified, y = e.modifiedSinceLastSubmit, b = e.name, v = e.touched, x = e.validating, C = e.visited, S = ye(c, b), k = ye(t, b);
4042
4042
  k && k[ln] && (k = k[ln]);
4043
4043
  var E = s && ye(s, b), O = n && ye(n, b), R = e.isEqual(O, S), z = !!(r && !e.isEqual(ye(r, b), S)), F = !k && !E;
4044
4044
  return {
@@ -4061,11 +4061,11 @@ function Pc(i, e) {
4061
4061
  submitFailed: o,
4062
4062
  submitSucceeded: l,
4063
4063
  submitting: a,
4064
- touched: x,
4064
+ touched: v,
4065
4065
  valid: F,
4066
4066
  value: S,
4067
4067
  visited: C,
4068
- validating: v
4068
+ validating: x
4069
4069
  };
4070
4070
  }
4071
4071
  var La = ["active", "data", "dirty", "dirtySinceLastSubmit", "error", "initial", "invalid", "length", "modified", "modifiedSinceLastSubmit", "pristine", "submitError", "submitFailed", "submitSucceeded", "submitting", "touched", "valid", "value", "visited", "validating"], jt = function(e, t) {
@@ -4196,7 +4196,7 @@ function Bv(i) {
4196
4196
  }, b = function(w, M, I) {
4197
4197
  var L = ye(w.formState.values, M), Y = I(L);
4198
4198
  w.formState.values = gt(w.formState.values, M, Y) || {};
4199
- }, x = function(w, M, I) {
4199
+ }, v = function(w, M, I) {
4200
4200
  if (w.fields[M]) {
4201
4201
  var L, Y;
4202
4202
  w.fields = Se({}, w.fields, (L = {}, L[I] = Se({}, w.fields[M], {
@@ -4216,7 +4216,7 @@ function Bv(i) {
4216
4216
  var J = ye(w.formState.values, M);
4217
4217
  w.formState.values = gt(w.formState.values, M, void 0) || {}, w.formState.values = gt(w.formState.values, I, J), delete w.lastFormState;
4218
4218
  }
4219
- }, v = function(w) {
4219
+ }, x = function(w) {
4220
4220
  return function() {
4221
4221
  if (s) {
4222
4222
  for (var M = {
@@ -4229,7 +4229,7 @@ function Bv(i) {
4229
4229
  var J = s[w](L, M, {
4230
4230
  changeValue: b,
4231
4231
  getIn: ye,
4232
- renameField: x,
4232
+ renameField: v,
4233
4233
  resetFieldState: Z.resetFieldState,
4234
4234
  setIn: gt,
4235
4235
  shallowEqual: jt
@@ -4240,7 +4240,7 @@ function Bv(i) {
4240
4240
  }
4241
4241
  };
4242
4242
  }, C = s ? Object.keys(s).reduce(function($, w) {
4243
- return $[w] = v(w), $;
4243
+ return $[w] = x(w), $;
4244
4244
  }, {}) : {}, S = function(w) {
4245
4245
  var M = [];
4246
4246
  if (l) {
@@ -4578,7 +4578,7 @@ function Bv(i) {
4578
4578
  s = M, M ? (Object.keys(C).forEach(function(I) {
4579
4579
  I in M || delete C[I];
4580
4580
  }), Object.keys(M).forEach(function(I) {
4581
- C[I] = v(I);
4581
+ C[I] = x(I);
4582
4582
  })) : Object.keys(C).forEach(function(I) {
4583
4583
  delete C[I];
4584
4584
  });
@@ -4741,12 +4741,12 @@ function Uv(i) {
4741
4741
  }, b = zv(function() {
4742
4742
  var O = s || Bv(y);
4743
4743
  return O.pauseValidation(), O;
4744
- }), x = ke.useState(function() {
4744
+ }), v = ke.useState(function() {
4745
4745
  var O = {};
4746
4746
  return b.subscribe(function(R) {
4747
4747
  O = R;
4748
4748
  }, f)(), O;
4749
- }), v = x[0], C = x[1], S = $f(v);
4749
+ }), x = v[0], C = v[1], S = $f(x);
4750
4750
  ke.useEffect(function() {
4751
4751
  b.isValidationPaused() && b.resumeValidation();
4752
4752
  var O = [b.subscribe(function(R) {
@@ -4792,7 +4792,7 @@ function Uv(i) {
4792
4792
  }),
4793
4793
  handleSubmit: k
4794
4794
  };
4795
- return Hf(E, v), /* @__PURE__ */ ke.createElement(zf.Provider, {
4795
+ return Hf(E, x), /* @__PURE__ */ ke.createElement(zf.Provider, {
4796
4796
  value: b
4797
4797
  }, Vv(Se({}, m, {
4798
4798
  __versions: Wv
@@ -4875,7 +4875,7 @@ var Qv = La.reduce(function(i, e) {
4875
4875
  };
4876
4876
  function Wf(i, e) {
4877
4877
  e === void 0 && (e = {});
4878
- var t = e, n = t.afterSubmit, r = t.allowNull, s = t.component, o = t.data, l = t.defaultValue, a = t.format, c = a === void 0 ? Oo : a, u = t.formatOnBlur, h = t.initialValue, f = t.multiple, d = t.parse, p = d === void 0 ? Jv : d, m = t.subscription, y = m === void 0 ? Qv : m, b = t.type, x = t.validateFields, v = t.value, C = no("useField"), S = $f(e), k = function(H, X) {
4878
+ var t = e, n = t.afterSubmit, r = t.allowNull, s = t.component, o = t.data, l = t.defaultValue, a = t.format, c = a === void 0 ? Oo : a, u = t.formatOnBlur, h = t.initialValue, f = t.multiple, d = t.parse, p = d === void 0 ? Jv : d, m = t.subscription, y = m === void 0 ? Qv : m, b = t.type, v = t.validateFields, x = t.value, C = no("useField"), S = $f(e), k = function(H, X) {
4879
4879
  return (
4880
4880
  // avoid using `state` const in any closures created inside `register`
4881
4881
  // because they would refer `state` from current execution context
@@ -4902,7 +4902,7 @@ function Wf(i, e) {
4902
4902
  return (S.current.isEqual || Zv)(me, te);
4903
4903
  },
4904
4904
  silent: X,
4905
- validateFields: x
4905
+ validateFields: v
4906
4906
  })
4907
4907
  );
4908
4908
  }, E = ke.useRef(!0), O = ke.useState(function() {
@@ -4938,14 +4938,14 @@ function Wf(i, e) {
4938
4938
  name: i,
4939
4939
  get value() {
4940
4940
  var D = R.value;
4941
- return u ? s === "input" && (D = Oo(D)) : D = c(D, i), D === null && !r && (D = ""), b === "checkbox" || b === "radio" ? v : s === "select" && f ? D || [] : D;
4941
+ return u ? s === "input" && (D = Oo(D)) : D = c(D, i), D === null && !r && (D = ""), b === "checkbox" || b === "radio" ? x : s === "select" && f ? D || [] : D;
4942
4942
  },
4943
4943
  get checked() {
4944
4944
  var D = R.value;
4945
4945
  if (b === "checkbox")
4946
- return D = c(D, i), v === void 0 ? !!D : !!(Array.isArray(D) && ~D.indexOf(v));
4946
+ return D = c(D, i), x === void 0 ? !!D : !!(Array.isArray(D) && ~D.indexOf(x));
4947
4947
  if (b === "radio")
4948
- return c(D, i) === v;
4948
+ return c(D, i) === x;
4949
4949
  },
4950
4950
  onBlur: Mo(function(D) {
4951
4951
  if (R.blur(), u) {
@@ -4955,11 +4955,11 @@ function Wf(i, e) {
4955
4955
  }),
4956
4956
  onChange: Mo(function(D) {
4957
4957
  if (process.env.NODE_ENV !== "production" && D && D.target) {
4958
- var H = D.target.type, X = ~["checkbox", "radio", "select-multiple"].indexOf(H) && !b && s !== "select", fe = H === "select-multiple" ? R.value : v;
4958
+ var H = D.target.type, X = ~["checkbox", "radio", "select-multiple"].indexOf(H) && !b && s !== "select", fe = H === "select-multiple" ? R.value : x;
4959
4959
  X && console.error('You must pass `type="' + (H === "select-multiple" ? "select" : H) + '"` prop to your Field(' + i + `) component.
4960
4960
  ` + ("Without it we don't know how to unpack your `value` prop - " + (Array.isArray(fe) ? "[" + fe + "]" : '"' + fe + '"') + "."));
4961
4961
  }
4962
- var me = D && D.target ? Xv(D, R.value, v, Kv) : D;
4962
+ var me = D && D.target ? Xv(D, R.value, x, Kv) : D;
4963
4963
  R.change(p(me, i));
4964
4964
  }),
4965
4965
  onFocus: Mo(function(D) {
@@ -5015,12 +5015,17 @@ function wt(i, e) {
5015
5015
  return { input: s, meta: o };
5016
5016
  }
5017
5017
  function rx(i) {
5018
- const { closeable: e, index: t, onRemove: n, readOnly: r, updateValue: s, value: o } = i, [, l] = G(), [a, c] = se(!1), [u, h] = se(o), f = () => {
5019
- h(o), c(!1);
5018
+ const { closeable: e, index: t, onRemove: n, readOnly: r, updateValue: s, value: o } = i, [, l] = G(), [a, c] = se(!1), [u, h] = se(o), f = {
5019
+ paddingTop: l.sizing.scale100,
5020
+ paddingRight: l.sizing.scale100,
5021
+ paddingBottom: l.sizing.scale100,
5022
+ paddingLeft: l.sizing.scale100
5020
5023
  }, d = () => {
5024
+ h(o), c(!1);
5025
+ }, p = () => {
5021
5026
  s(u, t), c(!1);
5022
- }, p = (m) => {
5023
- m.key === "Enter" && d();
5027
+ }, m = (y) => {
5028
+ y.key === "Enter" && p();
5024
5029
  };
5025
5030
  return a && !r ? /* @__PURE__ */ g.jsx(
5026
5031
  ul,
@@ -5031,19 +5036,9 @@ function rx(i) {
5031
5036
  component: pe,
5032
5037
  // Matches the size baseui's own small Tag action icon (e.g. the remove icon)
5033
5038
  // renders at, so the confirm icon doesn't look oversized next to it.
5034
- props: { name: "check", onMouseDown: d, size: l.sizing.scale500 }
5039
+ props: { name: "check", onMouseDown: p, size: l.sizing.scale500 }
5035
5040
  },
5036
- // Tighter padding than the shared Tag's default, to suit a compact tag-input list.
5037
- // Spacing between tags is handled by the container's `gap` (see StringTagInput) rather
5038
- // than margin here, since Tag's own overrides always win margin conflicts when merged.
5039
- Root: {
5040
- style: {
5041
- paddingTop: l.sizing.scale100,
5042
- paddingRight: l.sizing.scale200,
5043
- paddingBottom: l.sizing.scale100,
5044
- paddingLeft: l.sizing.scale200
5045
- }
5046
- }
5041
+ Root: { style: f }
5047
5042
  },
5048
5043
  behavior: Vm.selection,
5049
5044
  hierarchy: wc.secondary,
@@ -5052,9 +5047,9 @@ function rx(i) {
5052
5047
  {
5053
5048
  $adjoined: rf.none,
5054
5049
  autoFocus: !0,
5055
- onBlur: f,
5056
- onChange: (m) => h(m.target.value),
5057
- onKeyDown: p,
5050
+ onBlur: d,
5051
+ onChange: (y) => h(y.target.value),
5052
+ onKeyDown: m,
5058
5053
  size: u.length + 1,
5059
5054
  $size: Ca.compact,
5060
5055
  style: { padding: 0 },
@@ -5069,17 +5064,7 @@ function rx(i) {
5069
5064
  onActionClick: n,
5070
5065
  onClick: () => c(!0),
5071
5066
  overrides: {
5072
- // Tighter padding than the shared Tag's default, to suit a compact tag-input list.
5073
- // Spacing between tags is handled by the container's `gap` (see StringTagInput) rather
5074
- // than margin here, since Tag's own overrides always win margin conflicts when merged.
5075
- Root: {
5076
- style: {
5077
- paddingTop: l.sizing.scale100,
5078
- paddingRight: l.sizing.scale200,
5079
- paddingBottom: l.sizing.scale100,
5080
- paddingLeft: l.sizing.scale200
5081
- }
5082
- }
5067
+ Root: { style: f }
5083
5068
  },
5084
5069
  hierarchy: wc.primary,
5085
5070
  children: o
@@ -5158,19 +5143,19 @@ function ox({
5158
5143
  label: e,
5159
5144
  format: f,
5160
5145
  parse: d
5161
- }), [y, b] = se(""), x = Array.isArray(p.value) ? p.value : [], v = (R) => {
5162
- p.onChange([...x, R]), b("");
5163
- }, C = (R) => p.onChange(x.filter((z, F) => F !== R)), S = (R, z) => {
5164
- const F = [...x];
5146
+ }), [y, b] = se(""), v = Array.isArray(p.value) ? p.value : [], x = (R) => {
5147
+ p.onChange([...v, R]), b("");
5148
+ }, C = (R) => p.onChange(v.filter((z, F) => F !== R)), S = (R, z) => {
5149
+ const F = [...v];
5165
5150
  F[z] = R, p.onChange(F);
5166
5151
  }, k = () => {
5167
5152
  p.onChange([]), b("");
5168
5153
  }, E = (R) => {
5169
5154
  if (o) return;
5170
- const z = R.key === "Enter" && y, F = R.key === "Backspace" && x.length > 0 && !y;
5171
- z ? (R.preventDefault(), v(y)) : F && C(x.length - 1);
5155
+ const z = R.key === "Enter" && y, F = R.key === "Backspace" && v.length > 0 && !y;
5156
+ z ? (R.preventDefault(), x(y)) : F && C(v.length - 1);
5172
5157
  }, O = () => {
5173
- p.onBlur(), y && v(y);
5158
+ p.onBlur(), y && x(y);
5174
5159
  };
5175
5160
  return /* @__PURE__ */ g.jsx(
5176
5161
  ht,
@@ -5188,7 +5173,8 @@ function ox({
5188
5173
  id: i,
5189
5174
  value: y,
5190
5175
  onChange: (R) => b(R.currentTarget.value),
5191
- placeholder: !l && !o && x.length === 0 ? a : "",
5176
+ onBlur: O,
5177
+ placeholder: !l && !o && v.length === 0 ? a : "",
5192
5178
  readOnly: o,
5193
5179
  disabled: l,
5194
5180
  overrides: {
@@ -5199,12 +5185,11 @@ function ox({
5199
5185
  component: sx,
5200
5186
  props: {
5201
5187
  clear: k,
5202
- onBlur: O,
5203
5188
  onKeyDown: E,
5204
5189
  readOnly: o,
5205
5190
  removeValue: C,
5206
5191
  updateValue: S,
5207
- valueList: x
5192
+ valueList: v
5208
5193
  },
5209
5194
  style: { width: "auto", flexGrow: 1, padding: 0 }
5210
5195
  }
@@ -5329,9 +5314,9 @@ var Kf = function(e, t, n) {
5329
5314
  source: t.fields[r + "[" + (y - 1) + "]" + h]
5330
5315
  });
5331
5316
  }
5332
- var x = r + "[" + o + "]" + h;
5317
+ var v = r + "[" + o + "]" + h;
5333
5318
  c({
5334
- destKey: x,
5319
+ destKey: v,
5335
5320
  source: d
5336
5321
  });
5337
5322
  }
@@ -5789,7 +5774,7 @@ const Dx = ({
5789
5774
  rows: p,
5790
5775
  maxLength: m
5791
5776
  }) => {
5792
- var v;
5777
+ var x;
5793
5778
  const { input: y, meta: b } = wt(i, {
5794
5779
  required: r,
5795
5780
  validate: s,
@@ -5798,7 +5783,7 @@ const Dx = ({
5798
5783
  label: e,
5799
5784
  format: f,
5800
5785
  parse: d
5801
- }), x = ((v = y.value) == null ? void 0 : v.length) ?? 0;
5786
+ }), v = ((x = y.value) == null ? void 0 : x.length) ?? 0;
5802
5787
  return /* @__PURE__ */ g.jsx(
5803
5788
  ht,
5804
5789
  {
@@ -5808,7 +5793,7 @@ const Dx = ({
5808
5793
  labelEndEnhancer: h,
5809
5794
  caption: u,
5810
5795
  error: b.touched && b.error ? b.error : void 0,
5811
- counter: m ? { length: x, maxLength: m } : void 0,
5796
+ counter: m ? { length: v, maxLength: m } : void 0,
5812
5797
  children: /* @__PURE__ */ g.jsx(
5813
5798
  uf,
5814
5799
  {
@@ -8268,11 +8253,11 @@ function bS(i) {
8268
8253
  } else F == -3 ? c = O : F == -4 && (u = O);
8269
8254
  return E;
8270
8255
  }
8271
- let x = [], v = [];
8256
+ let v = [], x = [];
8272
8257
  for (; l.pos > 0; )
8273
- h(i.start || 0, i.bufferStart || 0, x, v, -1, 0);
8274
- let C = (e = i.length) !== null && e !== void 0 ? e : x.length ? v[0] + x[0].length : 0;
8275
- return new Oe(a[i.topID], x.reverse(), v.reverse(), C);
8258
+ h(i.start || 0, i.bufferStart || 0, v, x, -1, 0);
8259
+ let C = (e = i.length) !== null && e !== void 0 ? e : v.length ? x[0] + v[0].length : 0;
8260
+ return new Oe(a[i.topID], v.reverse(), x.reverse(), C);
8276
8261
  }
8277
8262
  const $c = /* @__PURE__ */ new WeakMap();
8278
8263
  function os(i, e) {
@@ -8300,27 +8285,27 @@ function Ha(i, e, t, n, r, s, o, l, a) {
8300
8285
  c * 1.5 / 8
8301
8286
  /* Balance.BranchFactor */
8302
8287
  ), h = [], f = [];
8303
- function d(p, m, y, b, x) {
8304
- for (let v = y; v < b; ) {
8305
- let C = v, S = m[v], k = os(i, p[v]);
8306
- for (v++; v < b; v++) {
8307
- let E = os(i, p[v]);
8288
+ function d(p, m, y, b, v) {
8289
+ for (let x = y; x < b; ) {
8290
+ let C = x, S = m[x], k = os(i, p[x]);
8291
+ for (x++; x < b; x++) {
8292
+ let E = os(i, p[x]);
8308
8293
  if (k + E >= u)
8309
8294
  break;
8310
8295
  k += E;
8311
8296
  }
8312
- if (v == C + 1) {
8297
+ if (x == C + 1) {
8313
8298
  if (k > u) {
8314
8299
  let E = p[C];
8315
- d(E.children, E.positions, 0, E.children.length, m[C] + x);
8300
+ d(E.children, E.positions, 0, E.children.length, m[C] + v);
8316
8301
  continue;
8317
8302
  }
8318
8303
  h.push(p[C]);
8319
8304
  } else {
8320
- let E = m[v - 1] + p[v - 1].length - S;
8321
- h.push(Ha(i, p, m, C, v, S, E, null, a));
8305
+ let E = m[x - 1] + p[x - 1].length - S;
8306
+ h.push(Ha(i, p, m, C, x, S, E, null, a));
8322
8307
  }
8323
- f.push(S + x - s);
8308
+ f.push(S + v - s);
8324
8309
  }
8325
8310
  }
8326
8311
  return d(e, t, n, r, 0), (l || a)(h, f, o);
@@ -9896,13 +9881,13 @@ class FS {
9896
9881
  if (f && f.overlay) {
9897
9882
  let d = e.node.enter(f.overlay[0].from + l, 1), p = this.highlighters.filter((y) => !y.scope || y.scope(f.tree.type)), m = e.firstChild();
9898
9883
  for (let y = 0, b = l; ; y++) {
9899
- let x = y < f.overlay.length ? f.overlay[y] : null, v = x ? x.from + l : a, C = Math.max(t, b), S = Math.min(n, v);
9884
+ let v = y < f.overlay.length ? f.overlay[y] : null, x = v ? v.from + l : a, C = Math.max(t, b), S = Math.min(n, x);
9900
9885
  if (C < S && m)
9901
- for (; e.from < S && (this.highlightRange(e, C, S, r, s), this.startSpan(Math.min(S, e.to), c), !(e.to >= v || !e.nextSibling())); )
9886
+ for (; e.from < S && (this.highlightRange(e, C, S, r, s), this.startSpan(Math.min(S, e.to), c), !(e.to >= x || !e.nextSibling())); )
9902
9887
  ;
9903
- if (!x || v > n)
9888
+ if (!v || x > n)
9904
9889
  break;
9905
- b = x.to + l, b > t && (this.highlightRange(d.cursor(), Math.max(t, x.from + l), Math.min(n, b), "", p), this.startSpan(Math.min(n, b), c));
9890
+ b = v.to + l, b > t && (this.highlightRange(d.cursor(), Math.max(t, v.from + l), Math.min(n, b), "", p), this.startSpan(Math.min(n, b), c));
9906
9891
  }
9907
9892
  m && e.parent();
9908
9893
  } else if (e.firstChild()) {
@@ -13350,40 +13335,40 @@ function u1(i, e, t, n, r, s, o, l) {
13350
13335
  u = u.assignedSlot || u.parentNode;
13351
13336
  continue;
13352
13337
  }
13353
- let x = u.getBoundingClientRect();
13354
- ({ scaleX: p, scaleY: m } = Ud(u, x)), f = {
13355
- left: x.left,
13356
- right: x.left + u.clientWidth * p,
13357
- top: x.top,
13358
- bottom: x.top + u.clientHeight * m
13338
+ let v = u.getBoundingClientRect();
13339
+ ({ scaleX: p, scaleY: m } = Ud(u, v)), f = {
13340
+ left: v.left,
13341
+ right: v.left + u.clientWidth * p,
13342
+ top: v.top,
13343
+ bottom: v.top + u.clientHeight * m
13359
13344
  };
13360
13345
  }
13361
13346
  let y = 0, b = 0;
13362
13347
  if (r == "nearest")
13363
13348
  e.top < f.top ? (b = e.top - (f.top + o), t > 0 && e.bottom > f.bottom + b && (b = e.bottom - f.bottom + o)) : e.bottom > f.bottom && (b = e.bottom - f.bottom + o, t < 0 && e.top - b < f.top && (b = e.top - (f.top + o)));
13364
13349
  else {
13365
- let x = e.bottom - e.top, v = f.bottom - f.top;
13366
- b = (r == "center" && x <= v ? e.top + x / 2 - v / 2 : r == "start" || r == "center" && t < 0 ? e.top - o : e.bottom - v + o) - f.top;
13350
+ let v = e.bottom - e.top, x = f.bottom - f.top;
13351
+ b = (r == "center" && v <= x ? e.top + v / 2 - x / 2 : r == "start" || r == "center" && t < 0 ? e.top - o : e.bottom - x + o) - f.top;
13367
13352
  }
13368
13353
  if (n == "nearest" ? e.left < f.left ? (y = e.left - (f.left + s), t > 0 && e.right > f.right + y && (y = e.right - f.right + s)) : e.right > f.right && (y = e.right - f.right + s, t < 0 && e.left < f.left + y && (y = e.left - (f.left + s))) : y = (n == "center" ? e.left + (e.right - e.left) / 2 - (f.right - f.left) / 2 : n == "start" == l ? e.left - s : e.right - (f.right - f.left) + s) - f.left, y || b)
13369
13354
  if (d)
13370
13355
  c.scrollBy(y, b);
13371
13356
  else {
13372
- let x = 0, v = 0;
13357
+ let v = 0, x = 0;
13373
13358
  if (b) {
13374
13359
  let C = u.scrollTop;
13375
- u.scrollTop += b / m, v = (u.scrollTop - C) * m;
13360
+ u.scrollTop += b / m, x = (u.scrollTop - C) * m;
13376
13361
  }
13377
13362
  if (y) {
13378
13363
  let C = u.scrollLeft;
13379
- u.scrollLeft += y / p, x = (u.scrollLeft - C) * p;
13364
+ u.scrollLeft += y / p, v = (u.scrollLeft - C) * p;
13380
13365
  }
13381
13366
  e = {
13382
- left: e.left - x,
13383
- top: e.top - v,
13384
- right: e.right - x,
13385
- bottom: e.bottom - v
13386
- }, x && Math.abs(x - y) < 1 && (n = "nearest"), v && Math.abs(v - b) < 1 && (r = "nearest");
13367
+ left: e.left - v,
13368
+ top: e.top - x,
13369
+ right: e.right - v,
13370
+ bottom: e.bottom - x
13371
+ }, v && Math.abs(v - y) < 1 && (n = "nearest"), x && Math.abs(x - b) < 1 && (r = "nearest");
13387
13372
  }
13388
13373
  if (d)
13389
13374
  break;
@@ -15125,8 +15110,8 @@ class gu extends he {
15125
15110
  S.breakAtStart ? k.breakAfter = 1 : S.content.length && k.merge(k.length, k.length, S.content[0], !1, S.openStart, 0) && (k.breakAfter = S.content[0].breakAfter, S.content.shift()), C.content.length && k.merge(0, 0, C.content[C.content.length - 1], !0, 0, C.openEnd) && C.content.pop(), f = C.content.concat(k).concat(S.content);
15126
15111
  } else
15127
15112
  ({ content: f, breakAtStart: d, openStart: p, openEnd: m } = qn.build(this.view.state.doc, u, h, this.decorations, this.dynamicDecorationMap));
15128
- let { i: y, off: b } = s.findPos(c, 1), { i: x, off: v } = s.findPos(a, -1);
15129
- Zd(this, x, v, y, b, f, d, p, m);
15113
+ let { i: y, off: b } = s.findPos(c, 1), { i: v, off: x } = s.findPos(a, -1);
15114
+ Zd(this, v, x, y, b, f, d, p, m);
15130
15115
  }
15131
15116
  n && this.fixCompositionDOM(n);
15132
15117
  }
@@ -15545,10 +15530,10 @@ function Xl(i, e, t) {
15545
15530
  for (let y = 0; y < m.length; y++) {
15546
15531
  let b = m[y];
15547
15532
  r && _o(r, b) && (b = pu(mu(b, r.bottom), r.top));
15548
- let x = V1(e, b), v = z1(t, b);
15549
- if (x == 0 && v == 0)
15533
+ let v = V1(e, b), x = z1(t, b);
15534
+ if (v == 0 && x == 0)
15550
15535
  return p.nodeType == 3 ? yu(p, e, t) : Xl(p, e, t);
15551
- (!n || o > v || o == v && s > x) && (n = p, r = b, s = x, o = v, l = x ? e < b.left ? y > 0 : y < m.length - 1 : !0), x == 0 ? t > b.bottom && (!u || u.bottom < b.bottom) ? (a = p, u = b) : t < b.top && (!h || h.top > b.top) && (c = p, h = b) : u && _o(u, b) ? u = mu(u, b.bottom) : h && _o(h, b) && (h = pu(h, b.top));
15536
+ (!n || o > x || o == x && s > v) && (n = p, r = b, s = v, o = x, l = v ? e < b.left ? y > 0 : y < m.length - 1 : !0), v == 0 ? t > b.bottom && (!u || u.bottom < b.bottom) ? (a = p, u = b) : t < b.top && (!h || h.top > b.top) && (c = p, h = b) : u && _o(u, b) ? u = mu(u, b.bottom) : h && _o(h, b) && (h = pu(h, b.top));
15552
15537
  }
15553
15538
  }
15554
15539
  if (u && u.bottom >= t ? (n = a, r = u) : h && h.top <= t && (n = c, r = h), !n)
@@ -15602,31 +15587,31 @@ function Rg(i, e, t, n = -1) {
15602
15587
  return i.viewport.to == i.state.doc.length ? i.state.doc.length : t ? null : bu(i, o, a, u, h);
15603
15588
  let p = i.dom.ownerDocument, m = i.root.elementFromPoint ? i.root : p, y = m.elementFromPoint(u, h);
15604
15589
  y && !i.contentDOM.contains(y) && (y = null), y || (u = Math.max(o.left + 1, Math.min(o.right - 1, u)), y = m.elementFromPoint(u, h), y && !i.contentDOM.contains(y) && (y = null));
15605
- let b, x = -1;
15590
+ let b, v = -1;
15606
15591
  if (y && ((r = i.docView.nearest(y)) === null || r === void 0 ? void 0 : r.isEditable) != !1) {
15607
15592
  if (p.caretPositionFromPoint) {
15608
15593
  let C = p.caretPositionFromPoint(u, h);
15609
- C && ({ offsetNode: b, offset: x } = C);
15594
+ C && ({ offsetNode: b, offset: v } = C);
15610
15595
  } else if (p.caretRangeFromPoint) {
15611
15596
  let C = p.caretRangeFromPoint(u, h);
15612
- C && ({ startContainer: b, startOffset: x } = C);
15597
+ C && ({ startContainer: b, startOffset: v } = C);
15613
15598
  }
15614
- b && (!i.contentDOM.contains(b) || j.safari && $1(b, x, u) || j.chrome && _1(b, x, u)) && (b = void 0), b && (x = Math.min(Ut(b), x));
15599
+ b && (!i.contentDOM.contains(b) || j.safari && $1(b, v, u) || j.chrome && _1(b, v, u)) && (b = void 0), b && (v = Math.min(Ut(b), v));
15615
15600
  }
15616
15601
  if (!b || !i.docView.dom.contains(b)) {
15617
15602
  let C = Me.find(i.docView, d);
15618
15603
  if (!C)
15619
15604
  return f > a.top + a.height / 2 ? a.to : a.from;
15620
- ({ node: b, offset: x } = Xl(C.dom, u, h));
15605
+ ({ node: b, offset: v } = Xl(C.dom, u, h));
15621
15606
  }
15622
- let v = i.docView.nearest(b);
15623
- if (!v)
15607
+ let x = i.docView.nearest(b);
15608
+ if (!x)
15624
15609
  return null;
15625
- if (v.isWidget && ((s = v.dom) === null || s === void 0 ? void 0 : s.nodeType) == 1) {
15626
- let C = v.dom.getBoundingClientRect();
15627
- return e.y < C.top || e.y <= C.bottom && e.x <= (C.left + C.right) / 2 ? v.posAtStart : v.posAtEnd;
15610
+ if (x.isWidget && ((s = x.dom) === null || s === void 0 ? void 0 : s.nodeType) == 1) {
15611
+ let C = x.dom.getBoundingClientRect();
15612
+ return e.y < C.top || e.y <= C.bottom && e.x <= (C.left + C.right) / 2 ? x.posAtStart : x.posAtEnd;
15628
15613
  } else
15629
- return v.localPosFromDOM(b, x) + v.posAtStart;
15614
+ return x.localPosFromDOM(b, v) + x.posAtStart;
15630
15615
  }
15631
15616
  function bu(i, e, t, n, r) {
15632
15617
  let s = Math.round((n - e.left) * i.defaultCharacterWidth);
@@ -15970,10 +15955,10 @@ function X1(i, e, t) {
15970
15955
  // ignored.
15971
15956
  m.to >= h.from && m.from <= h.to)
15972
15957
  return { range: m };
15973
- let x = r.changes({ from: b, to: y, insert: e.insert }), v = m.to - s.to;
15958
+ let v = r.changes({ from: b, to: y, insert: e.insert }), x = m.to - s.to;
15974
15959
  return {
15975
- changes: x,
15976
- range: c ? T.range(Math.max(0, c.anchor + v), Math.max(0, c.head + v)) : m.map(x)
15960
+ changes: v,
15961
+ range: c ? T.range(Math.max(0, c.anchor + x), Math.max(0, c.head + x)) : m.map(v)
15977
15962
  };
15978
15963
  });
15979
15964
  } else
@@ -17073,12 +17058,12 @@ class Iu {
17073
17058
  let b = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left;
17074
17059
  if (b != this.inView && (this.inView = b, b && (a = !0)), !this.inView && !this.scrollTarget && !Cw(e.dom))
17075
17060
  return 0;
17076
- let x = l.width;
17077
- if ((this.contentDOMWidth != x || this.editorHeight != e.scrollDOM.clientHeight) && (this.contentDOMWidth = l.width, this.editorHeight = e.scrollDOM.clientHeight, c |= 16), a) {
17061
+ let v = l.width;
17062
+ if ((this.contentDOMWidth != v || this.editorHeight != e.scrollDOM.clientHeight) && (this.contentDOMWidth = l.width, this.editorHeight = e.scrollDOM.clientHeight, c |= 16), a) {
17078
17063
  let C = e.docView.measureVisibleLineHeights(this.viewport);
17079
- if (r.mustRefreshForHeights(C) && (o = !0), o || r.lineWrapping && Math.abs(x - this.contentDOMWidth) > r.charWidth) {
17064
+ if (r.mustRefreshForHeights(C) && (o = !0), o || r.lineWrapping && Math.abs(v - this.contentDOMWidth) > r.charWidth) {
17080
17065
  let { lineHeight: S, charWidth: k, textHeight: E } = e.docView.measureTextSize();
17081
- o = S > 0 && r.refresh(s, S, k, E, Math.max(5, x / k), C), o && (e.docView.minWidth = 0, c |= 16);
17066
+ o = S > 0 && r.refresh(s, S, k, E, Math.max(5, v / k), C), o && (e.docView.minWidth = 0, c |= 16);
17082
17067
  }
17083
17068
  m > 0 && y > 0 ? u = Math.max(m, y) : m < 0 && y < 0 && (u = Math.min(m, y)), Pu();
17084
17069
  for (let S of this.viewports) {
@@ -17087,8 +17072,8 @@ class Iu {
17087
17072
  }
17088
17073
  wn && (c |= 2);
17089
17074
  }
17090
- let v = !this.viewportIsAppropriate(this.viewport, u) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
17091
- return v && (c & 2 && (c |= this.updateScaler()), this.viewport = this.getViewport(u, this.scrollTarget), c |= this.updateForViewport()), (c & 2 || v) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(o ? [] : this.lineGaps, e)), c |= this.computeVisibleRanges(), this.mustEnforceCursorAssoc && (this.mustEnforceCursorAssoc = !1, e.docView.enforceCursorAssoc()), c;
17075
+ let x = !this.viewportIsAppropriate(this.viewport, u) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
17076
+ return x && (c & 2 && (c |= this.updateScaler()), this.viewport = this.getViewport(u, this.scrollTarget), c |= this.updateForViewport()), (c & 2 || x) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(o ? [] : this.lineGaps, e)), c |= this.computeVisibleRanges(), this.mustEnforceCursorAssoc && (this.mustEnforceCursorAssoc = !1, e.docView.enforceCursorAssoc()), c;
17092
17077
  }
17093
17078
  get visibleTop() {
17094
17079
  return this.scaler.fromDOM(this.pixelViewport.top);
@@ -17156,14 +17141,14 @@ class Iu {
17156
17141
  a(u, b - 10, f, d), a(b + 10, h, f, d);
17157
17142
  return;
17158
17143
  }
17159
- let y = Ew(e, (b) => b.from >= f.from && b.to <= f.to && Math.abs(b.from - u) < s && Math.abs(b.to - h) < s && !m.some((x) => b.from < x && b.to > x));
17144
+ let y = Ew(e, (b) => b.from >= f.from && b.to <= f.to && Math.abs(b.from - u) < s && Math.abs(b.to - h) < s && !m.some((v) => b.from < v && b.to > v));
17160
17145
  if (!y) {
17161
- if (h < f.to && t && n && t.visibleRanges.some((v) => v.from <= h && v.to >= h)) {
17162
- let v = t.moveToLineBoundary(T.cursor(h), !1, !0).head;
17163
- v > u && (h = v);
17146
+ if (h < f.to && t && n && t.visibleRanges.some((x) => x.from <= h && x.to >= h)) {
17147
+ let x = t.moveToLineBoundary(T.cursor(h), !1, !0).head;
17148
+ x > u && (h = x);
17164
17149
  }
17165
- let b = this.gapSize(f, u, h, d), x = n || b < 2e6 ? b : 2e6;
17166
- y = new Go(u, h, b, x);
17150
+ let b = this.gapSize(f, u, h, d), v = n || b < 2e6 ? b : 2e6;
17151
+ y = new Go(u, h, b, v);
17167
17152
  }
17168
17153
  l.push(y);
17169
17154
  }, c = (u) => {
@@ -17176,8 +17161,8 @@ class Iu {
17176
17161
  if (n) {
17177
17162
  let m = r / this.heightOracle.lineLength * this.heightOracle.lineHeight, y, b;
17178
17163
  if (f != null) {
17179
- let x = Yr(h, f), v = ((this.visibleBottom - this.visibleTop) / 2 + m) / u.height;
17180
- y = x - v, b = x + v;
17164
+ let v = Yr(h, f), x = ((this.visibleBottom - this.visibleTop) / 2 + m) / u.height;
17165
+ y = v - x, b = v + x;
17181
17166
  } else
17182
17167
  y = (this.visibleTop - u.top - m) / u.height, b = (this.visibleBottom - u.top + m) / u.height;
17183
17168
  d = Kr(h, y), p = Kr(h, b);
@@ -17186,12 +17171,12 @@ class Iu {
17186
17171
  if (m > 2e6)
17187
17172
  for (let k of e)
17188
17173
  k.from >= u.from && k.from < u.to && k.size != k.displaySize && k.from * this.heightOracle.charWidth + b < this.pixelViewport.left && (b = k.size - k.displaySize);
17189
- let x = this.pixelViewport.left + b, v = this.pixelViewport.right + b, C, S;
17174
+ let v = this.pixelViewport.left + b, x = this.pixelViewport.right + b, C, S;
17190
17175
  if (f != null) {
17191
- let k = Yr(h, f), E = ((v - x) / 2 + y) / m;
17176
+ let k = Yr(h, f), E = ((x - v) / 2 + y) / m;
17192
17177
  C = k - E, S = k + E;
17193
17178
  } else
17194
- C = (x - y) / m, S = (v + y) / m;
17179
+ C = (v - y) / m, S = (x + y) / m;
17195
17180
  d = Kr(h, C), p = Kr(h, S);
17196
17181
  }
17197
17182
  d > u.from && a(u.from, d, u, h), p < u.to && a(p, u.to, u, h);
@@ -18843,12 +18828,12 @@ function Vw(i, e = Lw) {
18843
18828
  var h, f;
18844
18829
  let d = t[o] || (t[o] = /* @__PURE__ */ Object.create(null)), p = l.split(/ (?!$)/).map((b) => Fw(b, e));
18845
18830
  for (let b = 1; b < p.length; b++) {
18846
- let x = p.slice(0, b).join(" ");
18847
- r(x, !0), d[x] || (d[x] = {
18831
+ let v = p.slice(0, b).join(" ");
18832
+ r(v, !0), d[v] || (d[v] = {
18848
18833
  preventDefault: !0,
18849
18834
  stopPropagation: !1,
18850
- run: [(v) => {
18851
- let C = gi = { view: v, prefix: x, scope: o };
18835
+ run: [(x) => {
18836
+ let C = gi = { view: x, prefix: v, scope: o };
18852
18837
  return setTimeout(() => {
18853
18838
  gi == C && (gi = null);
18854
18839
  }, jw), !0;
@@ -18954,21 +18939,21 @@ function zw(i, e, t) {
18954
18939
  return [];
18955
18940
  let n = Math.max(t.from, i.viewport.from), r = Math.min(t.to, i.viewport.to), s = i.textDirection == ve.LTR, o = i.contentDOM, l = o.getBoundingClientRect(), a = Gg(i), c = o.querySelector(".cm-line"), u = c && window.getComputedStyle(c), h = l.left + (u ? parseInt(u.paddingLeft) + Math.min(0, parseInt(u.textIndent)) : 0), f = l.right - (u ? parseInt(u.paddingRight) : 0), d = Ql(i, n, 1), p = Ql(i, r, -1), m = d.type == Qe.Text ? d : null, y = p.type == Qe.Text ? p : null;
18956
18941
  if (m && (i.lineWrapping || d.widgetLineBreaks) && (m = zu(i, n, 1, m)), y && (i.lineWrapping || p.widgetLineBreaks) && (y = zu(i, r, -1, y)), m && y && m.from == y.from && m.to == y.to)
18957
- return x(v(t.from, t.to, m));
18942
+ return v(x(t.from, t.to, m));
18958
18943
  {
18959
- let S = m ? v(t.from, null, m) : C(d, !1), k = y ? v(null, t.to, y) : C(p, !0), E = [];
18960
- return (m || d).to < (y || p).from - (m && y ? 1 : 0) || d.widgetLineBreaks > 1 && S.bottom + i.defaultLineHeight / 2 < k.top ? E.push(b(h, S.bottom, f, k.top)) : S.bottom < k.top && i.elementAtHeight((S.bottom + k.top) / 2).type == Qe.Text && (S.bottom = k.top = (S.bottom + k.top) / 2), x(S).concat(E).concat(x(k));
18944
+ let S = m ? x(t.from, null, m) : C(d, !1), k = y ? x(null, t.to, y) : C(p, !0), E = [];
18945
+ return (m || d).to < (y || p).from - (m && y ? 1 : 0) || d.widgetLineBreaks > 1 && S.bottom + i.defaultLineHeight / 2 < k.top ? E.push(b(h, S.bottom, f, k.top)) : S.bottom < k.top && i.elementAtHeight((S.bottom + k.top) / 2).type == Qe.Text && (S.bottom = k.top = (S.bottom + k.top) / 2), v(S).concat(E).concat(v(k));
18961
18946
  }
18962
18947
  function b(S, k, E, O) {
18963
18948
  return new Rr(e, S - a.left, k - a.top, E - S, O - k);
18964
18949
  }
18965
- function x({ top: S, bottom: k, horizontal: E }) {
18950
+ function v({ top: S, bottom: k, horizontal: E }) {
18966
18951
  let O = [];
18967
18952
  for (let R = 0; R < E.length; R += 2)
18968
18953
  O.push(b(E[R], S, E[R + 1], k));
18969
18954
  return O;
18970
18955
  }
18971
- function v(S, k, E) {
18956
+ function x(S, k, E) {
18972
18957
  let O = 1e9, R = -1e9, z = [];
18973
18958
  function F(D, H, X, fe, me) {
18974
18959
  let te = i.coordsAtPos(D, D == E.to ? -2 : 2), Z = i.coordsAtPos(X, X == E.from ? 2 : -2);
@@ -19680,7 +19665,7 @@ const qo = /* @__PURE__ */ V.define({
19680
19665
  u.style.top = Jr;
19681
19666
  continue;
19682
19667
  }
19683
- let d = a.arrow ? c.dom.querySelector(".cm-tooltip-arrow") : null, p = d ? 7 : 0, m = f.right - f.left, y = (e = Wu.get(c)) !== null && e !== void 0 ? e : f.bottom - f.top, b = c.offset || xC, x = this.view.textDirection == ve.LTR, v = f.width > n.right - n.left ? x ? n.left : n.right - f.width : x ? Math.max(n.left, Math.min(h.left - (d ? 14 : 0) + b.x, n.right - m)) : Math.min(Math.max(n.left, h.left - m + (d ? 14 : 0) - b.x), n.right - m), C = this.above[l];
19668
+ let d = a.arrow ? c.dom.querySelector(".cm-tooltip-arrow") : null, p = d ? 7 : 0, m = f.right - f.left, y = (e = Wu.get(c)) !== null && e !== void 0 ? e : f.bottom - f.top, b = c.offset || xC, v = this.view.textDirection == ve.LTR, x = f.width > n.right - n.left ? v ? n.left : n.right - f.width : v ? Math.max(n.left, Math.min(h.left - (d ? 14 : 0) + b.x, n.right - m)) : Math.min(Math.max(n.left, h.left - m + (d ? 14 : 0) - b.x), n.right - m), C = this.above[l];
19684
19669
  !a.strictSide && (C ? h.top - y - p - b.y < n.top : h.bottom + y + p + b.y > n.bottom) && C == n.bottom - h.bottom > h.top - n.top && (C = this.above[l] = !C);
19685
19670
  let S = (C ? h.top - n.top : n.bottom - h.bottom) - p;
19686
19671
  if (S < y && c.resize !== !1) {
@@ -19690,15 +19675,15 @@ const qo = /* @__PURE__ */ V.define({
19690
19675
  }
19691
19676
  Wu.set(c, y), u.style.height = (y = S) / s + "px";
19692
19677
  } else u.style.height && (u.style.height = "");
19693
- let k = C ? h.top - y - p - b.y : h.bottom + p + b.y, E = v + m;
19678
+ let k = C ? h.top - y - p - b.y : h.bottom + p + b.y, E = x + m;
19694
19679
  if (c.overlap !== !0)
19695
19680
  for (let O of o)
19696
- O.left < E && O.right > v && O.top < k + y && O.bottom > k && (k = C ? O.top - y - 2 - p : O.bottom + p + 2);
19697
- if (this.position == "absolute" ? (u.style.top = (k - i.parent.top) / s + "px", Uu(u, (v - i.parent.left) / r)) : (u.style.top = k / s + "px", Uu(u, v / r)), d) {
19698
- let O = h.left + (x ? b.x : -b.x) - (v + 14 - 7);
19681
+ O.left < E && O.right > x && O.top < k + y && O.bottom > k && (k = C ? O.top - y - 2 - p : O.bottom + p + 2);
19682
+ if (this.position == "absolute" ? (u.style.top = (k - i.parent.top) / s + "px", Uu(u, (x - i.parent.left) / r)) : (u.style.top = k / s + "px", Uu(u, x / r)), d) {
19683
+ let O = h.left + (v ? b.x : -b.x) - (x + 14 - 7);
19699
19684
  d.style.left = O / r + "px";
19700
19685
  }
19701
- c.overlap !== !0 && o.push({ left: v, top: k, right: E, bottom: k + y }), u.classList.toggle("cm-tooltip-above", C), u.classList.toggle("cm-tooltip-below", !C), c.positioned && c.positioned(i.space);
19686
+ c.overlap !== !0 && o.push({ left: x, top: k, right: E, bottom: k + y }), u.classList.toggle("cm-tooltip-above", C), u.classList.toggle("cm-tooltip-below", !C), c.positioned && c.positioned(i.space);
19702
19687
  }
19703
19688
  }
19704
19689
  maybeMeasure() {
@@ -23431,31 +23416,31 @@ class RA {
23431
23416
  return null;
23432
23417
  let { chars: t, folded: n, any: r, precise: s, byWord: o } = this;
23433
23418
  if (t.length == 1) {
23434
- let x = Ze(e, 0), v = zt(x), C = v == e.length ? 0 : -100;
23435
- if (x != t[0]) if (x == n[0])
23419
+ let v = Ze(e, 0), x = zt(v), C = x == e.length ? 0 : -100;
23420
+ if (v != t[0]) if (v == n[0])
23436
23421
  C += -200;
23437
23422
  else
23438
23423
  return null;
23439
- return this.ret(C, [0, v]);
23424
+ return this.ret(C, [0, x]);
23440
23425
  }
23441
23426
  let l = e.indexOf(this.pattern);
23442
23427
  if (l == 0)
23443
23428
  return this.ret(e.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
23444
23429
  let a = t.length, c = 0;
23445
23430
  if (l < 0) {
23446
- for (let x = 0, v = Math.min(e.length, 200); x < v && c < a; ) {
23447
- let C = Ze(e, x);
23448
- (C == t[c] || C == n[c]) && (r[c++] = x), x += zt(C);
23431
+ for (let v = 0, x = Math.min(e.length, 200); v < x && c < a; ) {
23432
+ let C = Ze(e, v);
23433
+ (C == t[c] || C == n[c]) && (r[c++] = v), v += zt(C);
23449
23434
  }
23450
23435
  if (c < a)
23451
23436
  return null;
23452
23437
  }
23453
23438
  let u = 0, h = 0, f = !1, d = 0, p = -1, m = -1, y = /[a-z]/.test(e), b = !0;
23454
- for (let x = 0, v = Math.min(e.length, 200), C = 0; x < v && h < a; ) {
23455
- let S = Ze(e, x);
23456
- l < 0 && (u < a && S == t[u] && (s[u++] = x), d < a && (S == t[d] || S == n[d] ? (d == 0 && (p = x), m = x + 1, d++) : d = 0));
23439
+ for (let v = 0, x = Math.min(e.length, 200), C = 0; v < x && h < a; ) {
23440
+ let S = Ze(e, v);
23441
+ l < 0 && (u < a && S == t[u] && (s[u++] = v), d < a && (S == t[d] || S == n[d] ? (d == 0 && (p = v), m = v + 1, d++) : d = 0));
23457
23442
  let k, E = S < 255 ? S >= 48 && S <= 57 || S >= 97 && S <= 122 ? 2 : S >= 65 && S <= 90 ? 1 : 0 : (k = Ga(S)) != k.toLowerCase() ? 1 : k != k.toUpperCase() ? 2 : 0;
23458
- (!x || E == 1 && y || C == 0 && E != 0) && (t[h] == S || n[h] == S && (f = !0) ? o[h++] = x : o.length && (b = !1)), C = E, x += zt(S);
23443
+ (!v || E == 1 && y || C == 0 && E != 0) && (t[h] == S || n[h] == S && (f = !0) ? o[h++] = v : o.length && (b = !1)), C = E, v += zt(S);
23459
23444
  }
23460
23445
  return h == a && o[0] == 0 && b ? this.result(-100 + (f ? -200 : 0), o, e) : d == a && p == 0 ? this.ret(-200 - e.length + (m == e.length ? 0 : -100), [0, m]) : l > -1 ? this.ret(-700 - e.length, [l, l + this.pattern.length]) : d == a ? this.ret(-900 - e.length, [p, m]) : h == a ? this.result(-100 + (f ? -200 : 0) + -700 + (b ? 0 : -1100), o, e) : t.length == 2 ? null : this.result((r[0] ? -700 : 0) + -200 + -1100, r, e);
23461
23446
  }
@@ -23524,8 +23509,8 @@ function EA(i, e, t, n, r, s) {
23524
23509
  (o ? e.right : r.right - e.left) - 30
23525
23510
  /* Info.Margin */
23526
23511
  );
23527
- let x = r.bottom - e.bottom;
23528
- x >= m || x > e.top ? u = t.bottom - e.top : (c = "bottom", u = e.bottom - t.top);
23512
+ let v = r.bottom - e.bottom;
23513
+ v >= m || v > e.top ? u = t.bottom - e.top : (c = "bottom", u = e.bottom - t.top);
23529
23514
  }
23530
23515
  let y = (e.bottom - e.top) / s.offsetHeight, b = (e.right - e.left) / s.offsetWidth;
23531
23516
  return {
@@ -23740,8 +23725,8 @@ function DA(i, e) {
23740
23725
  if (d = p.match(m.label)) {
23741
23726
  let y = m.displayLabel ? h ? h(m, d.matched) : [] : d.matched, b = d.score + (m.boost || 0);
23742
23727
  if (s(new xh(m, u.source, y, b)), typeof m.section == "object" && m.section.rank === "dynamic") {
23743
- let { name: x } = m.section;
23744
- r || (r = /* @__PURE__ */ Object.create(null)), r[x] = Math.max(b, r[x] || -1e9);
23728
+ let { name: v } = m.section;
23729
+ r || (r = /* @__PURE__ */ Object.create(null)), r[v] = Math.max(b, r[v] || -1e9);
23745
23730
  }
23746
23731
  }
23747
23732
  }
@@ -24477,26 +24462,26 @@ class Li {
24477
24462
  break;
24478
24463
  let m, y;
24479
24464
  if (l.length)
24480
- m = a, y = l.reduce((v, C) => Math.min(v, C.to), p && p.from > m ? p.from : 1e8);
24465
+ m = a, y = l.reduce((x, C) => Math.min(x, C.to), p && p.from > m ? p.from : 1e8);
24481
24466
  else {
24482
24467
  if (m = p.from, m > h)
24483
24468
  break;
24484
24469
  y = p.to, l.push(p), d++;
24485
24470
  }
24486
24471
  for (; d < s.length; ) {
24487
- let v = s[d];
24488
- if (v.from == m && (v.to > v.from || v.to == m))
24489
- l.push(v), d++, y = Math.min(v.to, y);
24472
+ let x = s[d];
24473
+ if (x.from == m && (x.to > x.from || x.to == m))
24474
+ l.push(x), d++, y = Math.min(x.to, y);
24490
24475
  else {
24491
- y = Math.min(v.from, y);
24476
+ y = Math.min(x.from, y);
24492
24477
  break;
24493
24478
  }
24494
24479
  }
24495
24480
  y = Math.min(y, h);
24496
24481
  let b = !1;
24497
- if (l.some((v) => v.from == m && (v.to == y || y == h)) && (b = m == y, !b && y - m < 10)) {
24498
- let v = m - (u + c.value.length);
24499
- v > 0 && (c.next(v), u = m);
24482
+ if (l.some((x) => x.from == m && (x.to == y || y == h)) && (b = m == y, !b && y - m < 10)) {
24483
+ let x = m - (u + c.value.length);
24484
+ x > 0 && (c.next(x), u = m);
24500
24485
  for (let C = m; ; ) {
24501
24486
  if (C >= y) {
24502
24487
  b = !0;
@@ -24507,24 +24492,24 @@ class Li {
24507
24492
  C = u + c.value.length, u += c.value.length, c.next();
24508
24493
  }
24509
24494
  }
24510
- let x = vE(l);
24495
+ let v = vE(l);
24511
24496
  if (b)
24512
24497
  o.add(m, m, W.widget({
24513
- widget: new pE(x),
24498
+ widget: new pE(v),
24514
24499
  diagnostics: l.slice()
24515
24500
  }));
24516
24501
  else {
24517
- let v = l.reduce((C, S) => S.markClass ? C + " " + S.markClass : C, "");
24502
+ let x = l.reduce((C, S) => S.markClass ? C + " " + S.markClass : C, "");
24518
24503
  o.add(m, y, W.mark({
24519
- class: "cm-lintRange cm-lintRange-" + x + v,
24504
+ class: "cm-lintRange cm-lintRange-" + v + x,
24520
24505
  diagnostics: l.slice(),
24521
24506
  inclusiveEnd: l.some((C) => C.to > y)
24522
24507
  }));
24523
24508
  }
24524
24509
  if (a = y, a == h)
24525
24510
  break;
24526
- for (let v = 0; v < l.length; v++)
24527
- l[v].to <= a && l.splice(v--, 1);
24511
+ for (let x = 0; x < l.length; x++)
24512
+ l[x].to <= a && l.splice(x--, 1);
24528
24513
  }
24529
24514
  let f = o.finish();
24530
24515
  return new Li(f, t, Rn(f));
@@ -25172,8 +25157,8 @@ function VE(i) {
25172
25157
  maxWidth: m = null,
25173
25158
  placeholder: y = "",
25174
25159
  editable: b = !0,
25175
- readOnly: x = !1,
25176
- indentWithTab: v = !0,
25160
+ readOnly: v = !1,
25161
+ indentWithTab: x = !0,
25177
25162
  basicSetup: C = !0,
25178
25163
  root: S,
25179
25164
  initialState: k
@@ -25211,9 +25196,9 @@ function VE(i) {
25211
25196
  }), fe = IE({
25212
25197
  theme: c,
25213
25198
  editable: b,
25214
- readOnly: x,
25199
+ readOnly: v,
25215
25200
  placeholder: y,
25216
- indentWithTab: v,
25201
+ indentWithTab: x,
25217
25202
  basicSetup: C
25218
25203
  }), me = [X, H, ...fe];
25219
25204
  return o && typeof o == "function" && me.push(B.updateListener.of(o)), me = me.concat(l), s0(() => {
@@ -25245,7 +25230,7 @@ function VE(i) {
25245
25230
  R && R.dispatch({
25246
25231
  effects: Q.reconfigure.of(me)
25247
25232
  });
25248
- }, [c, l, u, h, f, d, p, m, y, b, x, v, C, n, o]), Be(() => {
25233
+ }, [c, l, u, h, f, d, p, m, y, b, v, x, C, n, o]), Be(() => {
25249
25234
  if (e !== void 0) {
25250
25235
  var te = R ? R.state.doc.toString() : "";
25251
25236
  if (R && e !== te) {
@@ -25289,8 +25274,8 @@ var zE = ["className", "value", "selection", "extensions", "onChange", "onStatis
25289
25274
  width: m,
25290
25275
  minWidth: y,
25291
25276
  maxWidth: b,
25292
- basicSetup: x,
25293
- placeholder: v,
25277
+ basicSetup: v,
25278
+ placeholder: x,
25294
25279
  indentWithTab: C,
25295
25280
  editable: S,
25296
25281
  readOnly: k,
@@ -25312,8 +25297,8 @@ var zE = ["className", "value", "selection", "extensions", "onChange", "onStatis
25312
25297
  width: m,
25313
25298
  minWidth: y,
25314
25299
  maxWidth: b,
25315
- basicSetup: x,
25316
- placeholder: v,
25300
+ basicSetup: v,
25301
+ placeholder: x,
25317
25302
  indentWithTab: C,
25318
25303
  editable: S,
25319
25304
  readOnly: k,
@@ -25727,7 +25712,7 @@ function Sm({
25727
25712
  ), [p, m] = Xi(
25728
25713
  `${i}.columnVisibility`,
25729
25714
  (t == null ? void 0 : t.columnVisibility) ?? hi.columnVisibility
25730
- ), [y, b] = se(0), [x, v] = se({}), [C, S] = se(
25715
+ ), [y, b] = se(0), [v, x] = se({}), [C, S] = se(
25731
25716
  (t == null ? void 0 : t.rowSelectionEnabled) ?? hi.rowSelectionEnabled
25732
25717
  ), [k, E] = se(
25733
25718
  (t == null ? void 0 : t.grouping) ?? hi.grouping
@@ -25751,8 +25736,8 @@ function Sm({
25751
25736
  setColumnOrder: d,
25752
25737
  columnVisibility: p,
25753
25738
  setColumnVisibility: m,
25754
- rowSelection: x,
25755
- setRowSelection: v,
25739
+ rowSelection: v,
25740
+ setRowSelection: x,
25756
25741
  rowSelectionEnabled: C,
25757
25742
  setRowSelectionEnabled: S,
25758
25743
  grouping: k,
@@ -26374,7 +26359,7 @@ function pT({
26374
26359
  ] });
26375
26360
  }
26376
26361
  function mT({ phases: i = Na }) {
26377
- const [, e] = G(), { phase: t, entity: n, entityId: r, projectId: s, entityTab: o } = ft("detail"), l = Ei(), a = i[t].entities.find((x) => x.id === n), c = br(), { data: u, isLoading: h, error: f } = yr({
26362
+ const [, e] = G(), { phase: t, entity: n, entityId: r, projectId: s, entityTab: o } = ft("detail"), l = Ei(), a = i[t].entities.find((v) => v.id === n), c = br(), { data: u, isLoading: h, error: f } = yr({
26378
26363
  queryName: `Get${gn((a == null ? void 0 : a.service) ?? "")}`,
26379
26364
  serviceOptions: {
26380
26365
  namespace: s,
@@ -26384,18 +26369,18 @@ function mT({ phases: i = Na }) {
26384
26369
  enabled: !!(a != null && a.service) && !!r
26385
26370
  }
26386
26371
  }), d = ue.useCallback(
26387
- (x, v) => {
26388
- l(`/${s}/${t}/${n}/${r}/${x}`, v);
26372
+ (v, x) => {
26373
+ l(`/${s}/${t}/${n}/${r}/${v}`, x);
26389
26374
  },
26390
26375
  [l, s, t, n, r]
26391
26376
  ), p = () => {
26392
26377
  l(`/${s}/${t}/${n}`);
26393
- }, m = ((a == null ? void 0 : a.views) ?? []).find((x) => x.type === "detail") ?? void 0;
26378
+ }, m = ((a == null ? void 0 : a.views) ?? []).find((v) => v.type === "detail") ?? void 0;
26394
26379
  if (ue.useEffect(() => {
26395
26380
  var C;
26396
26381
  if (f || h || !r || !((C = m == null ? void 0 : m.pages) != null && C.length)) return;
26397
- const x = m.pages.map((S) => S.id), v = x[0];
26398
- o ? x.includes(o) || d(v, { replace: !0 }) : d(v, { replace: !0 });
26382
+ const v = m.pages.map((S) => S.id), x = v[0];
26383
+ o ? v.includes(o) || d(x, { replace: !0 }) : d(x, { replace: !0 });
26399
26384
  }, [o, m, h, f, d]), f)
26400
26385
  return /* @__PURE__ */ g.jsx(
26401
26386
  ii,
@@ -26430,10 +26415,10 @@ function mT({ phases: i = Na }) {
26430
26415
  children: /* @__PURE__ */ g.jsx(
26431
26416
  uT,
26432
26417
  {
26433
- tabs: b.pages.map((x) => ({
26434
- id: x.id,
26435
- label: x.label,
26436
- content: /* @__PURE__ */ g.jsx(lT, { page: x, data: y, isLoading: h })
26418
+ tabs: b.pages.map((v) => ({
26419
+ id: v.id,
26420
+ label: v.label,
26421
+ content: /* @__PURE__ */ g.jsx(lT, { page: v, data: y, isLoading: h })
26437
26422
  })),
26438
26423
  activeTabId: o,
26439
26424
  onTabSelect: d
@@ -27015,8 +27000,8 @@ function YM({
27015
27000
  visibleOptionLimit: m,
27016
27001
  isLoading: y = !1,
27017
27002
  clearable: b = !0,
27018
- searchable: x = !0,
27019
- multi: v = !1,
27003
+ searchable: v = !0,
27004
+ multi: x = !1,
27020
27005
  creatable: C = !1
27021
27006
  }) {
27022
27007
  const { input: S, meta: k } = wt(i, {
@@ -27042,7 +27027,7 @@ function YM({
27042
27027
  if (y || C) return;
27043
27028
  const P = S.value;
27044
27029
  if (!(!P || Array.isArray(P) && P.length === 0))
27045
- if (v) {
27030
+ if (x) {
27046
27031
  const _ = P, D = _.filter((H) => O(H));
27047
27032
  D.length !== _.length && S.onChange(D);
27048
27033
  } else O(P) || S.onChange("");
@@ -27050,7 +27035,7 @@ function YM({
27050
27035
  const z = (P) => {
27051
27036
  var D;
27052
27037
  const _ = P.value;
27053
- v ? S.onChange(_.map((H) => {
27038
+ x ? S.onChange(_.map((H) => {
27054
27039
  var X;
27055
27040
  return ((X = R(H.id)) == null ? void 0 : X.id) ?? H.id;
27056
27041
  })) : _.length > 0 ? S.onChange(((D = R(_[0].id)) == null ? void 0 : D.id) ?? _[0].id) : S.onChange("");
@@ -27083,8 +27068,8 @@ function YM({
27083
27068
  placeholder: !l && !o ? h : "",
27084
27069
  disabled: l,
27085
27070
  clearable: !l && !o && b,
27086
- searchable: x,
27087
- multi: v,
27071
+ searchable: v,
27072
+ multi: x,
27088
27073
  overrides: VT(i, l, o),
27089
27074
  creatable: C,
27090
27075
  filterOptions: (P, _, D, H) => F0(P, _, D, H).slice(0, m),
@@ -27120,9 +27105,9 @@ const XM = ({
27120
27105
  label: e,
27121
27106
  format: h,
27122
27107
  parse: f
27123
- }), b = (v) => {
27124
- m.onChange(v.currentTarget.checked);
27125
- }, x = d ?? (m.value ? "Enabled" : "Disabled");
27108
+ }), b = (x) => {
27109
+ m.onChange(x.currentTarget.checked);
27110
+ }, v = d ?? (m.value ? "Enabled" : "Disabled");
27126
27111
  return /* @__PURE__ */ g.jsx(
27127
27112
  ht,
27128
27113
  {
@@ -27144,15 +27129,15 @@ const XM = ({
27144
27129
  labelPlacement: R0.right,
27145
27130
  overrides: {
27146
27131
  Label: {
27147
- style: ({ $theme: v }) => ({
27148
- fontSize: v.sizing.scale550
27132
+ style: ({ $theme: x }) => ({
27133
+ fontSize: x.sizing.scale550
27149
27134
  })
27150
27135
  },
27151
27136
  Root: {
27152
27137
  style: o ? { cursor: "default" } : {}
27153
27138
  }
27154
27139
  },
27155
- children: x
27140
+ children: v
27156
27141
  }
27157
27142
  )
27158
27143
  }
@@ -27206,11 +27191,11 @@ const XM = ({
27206
27191
  format: h,
27207
27192
  parse: f
27208
27193
  }), b = Wt(
27209
- () => d.findIndex((v) => v.value === m.value),
27194
+ () => d.findIndex((x) => x.value === m.value),
27210
27195
  [d, m]
27211
- ), x = An(
27212
- (v, C) => {
27213
- v.preventDefault(), v.stopPropagation(), m.onChange(d[C].value);
27196
+ ), v = An(
27197
+ (x, C) => {
27198
+ x.preventDefault(), x.stopPropagation(), m.onChange(d[C].value);
27214
27199
  },
27215
27200
  [m, d]
27216
27201
  );
@@ -27227,21 +27212,21 @@ const XM = ({
27227
27212
  X0,
27228
27213
  {
27229
27214
  kind: Q0.singleSelect,
27230
- onClick: x,
27215
+ onClick: v,
27231
27216
  selected: b,
27232
27217
  disabled: l || o,
27233
27218
  overrides: $T,
27234
- children: d.map((v) => /* @__PURE__ */ g.jsx(
27219
+ children: d.map((x) => /* @__PURE__ */ g.jsx(
27235
27220
  J0,
27236
27221
  {
27237
27222
  tileKind: Z0.selection,
27238
- leadingContent: () => /* @__PURE__ */ g.jsx(y0, { $style: { textAlign: "left" }, children: v.label }),
27223
+ leadingContent: () => /* @__PURE__ */ g.jsx(y0, { $style: { textAlign: "left" }, children: x.label }),
27239
27224
  headerAlignment: Rc.left,
27240
27225
  bodyAlignment: Rc.left,
27241
27226
  overrides: _T,
27242
- children: /* @__PURE__ */ g.jsx(ey, { $style: { textAlign: "left", marginBottom: p.sizing.scale600 }, children: v.description })
27227
+ children: /* @__PURE__ */ g.jsx(ey, { $style: { textAlign: "left", marginBottom: p.sizing.scale600 }, children: x.description })
27243
27228
  },
27244
- String(v.value)
27229
+ String(x.value)
27245
27230
  ))
27246
27231
  }
27247
27232
  )
@@ -27264,7 +27249,7 @@ const XM = ({
27264
27249
  options: d,
27265
27250
  align: p = iy.horizontal
27266
27251
  }) => {
27267
- var v;
27252
+ var x;
27268
27253
  const { input: m, meta: y } = wt(i, {
27269
27254
  required: r,
27270
27255
  validate: s,
@@ -27273,7 +27258,7 @@ const XM = ({
27273
27258
  label: e,
27274
27259
  format: h,
27275
27260
  parse: f
27276
- }), b = d.every(({ value: C }) => typeof C == "boolean"), x = An(
27261
+ }), b = d.every(({ value: C }) => typeof C == "boolean"), v = An(
27277
27262
  (C) => {
27278
27263
  const S = C.currentTarget.value;
27279
27264
  m.onChange(b ? S === "true" : S);
@@ -27294,7 +27279,7 @@ const XM = ({
27294
27279
  {
27295
27280
  id: m.name,
27296
27281
  readOnly: !0,
27297
- value: ((v = d.find((C) => C.value === m.value)) == null ? void 0 : v.label) ?? "",
27282
+ value: ((x = d.find((C) => C.value === m.value)) == null ? void 0 : x.label) ?? "",
27298
27283
  overrides: {
27299
27284
  InputContainer: {
27300
27285
  style: ({ $theme: C }) => ({
@@ -27321,7 +27306,7 @@ const XM = ({
27321
27306
  value: typeof m.value == "boolean" ? String(m.value) : m.value,
27322
27307
  align: p,
27323
27308
  disabled: l,
27324
- onChange: x,
27309
+ onChange: v,
27325
27310
  onBlur: m.onBlur,
27326
27311
  onFocus: m.onFocus,
27327
27312
  overrides: {
@@ -27473,12 +27458,12 @@ const eO = ({
27473
27458
  label: e,
27474
27459
  format: u,
27475
27460
  parse: h
27476
- }), { value: b = [], onChange: x } = m, v = An(
27461
+ }), { value: b = [], onChange: v } = m, x = An(
27477
27462
  (S) => {
27478
27463
  const k = b.includes(S) ? b.filter((E) => E !== S) : [...b, S];
27479
- x(k);
27464
+ v(k);
27480
27465
  },
27481
- [b, x]
27466
+ [b, v]
27482
27467
  ), C = f.some((S) => S.description);
27483
27468
  return /* @__PURE__ */ g.jsx(
27484
27469
  ht,
@@ -27502,7 +27487,7 @@ const eO = ({
27502
27487
  Zs,
27503
27488
  {
27504
27489
  checked: b.includes(S.id),
27505
- onChange: () => v(S.id),
27490
+ onChange: () => x(S.id),
27506
27491
  disabled: o,
27507
27492
  overrides: {
27508
27493
  Label: {
@@ -27582,8 +27567,8 @@ const tO = ({
27582
27567
  {
27583
27568
  id: y.name,
27584
27569
  value: y.value,
27585
- onChange: ({ date: x }) => {
27586
- at.isNil(x) && YT(y.value) || y.onChange(x);
27570
+ onChange: ({ date: v }) => {
27571
+ at.isNil(v) && YT(y.value) || y.onChange(v);
27587
27572
  },
27588
27573
  placeholder: !a && !o ? l ?? "MM/dd/yyyy" : "",
27589
27574
  formatString: "MM/dd/yyyy",
@@ -27601,8 +27586,8 @@ const tO = ({
27601
27586
  },
27602
27587
  overrides: {
27603
27588
  InputContainer: {
27604
- style: ({ $theme: x }) => ({
27605
- backgroundColor: x.colors.backgroundPrimary
27589
+ style: ({ $theme: v }) => ({
27590
+ backgroundColor: v.colors.backgroundPrimary
27606
27591
  })
27607
27592
  }
27608
27593
  }
@@ -27644,7 +27629,7 @@ const iO = ({
27644
27629
  label: e,
27645
27630
  format: f,
27646
27631
  parse: d
27647
- }), [x, v] = G(), C = ((S = y.value) == null ? void 0 : S.length) ?? 0;
27632
+ }), [v, x] = G(), C = ((S = y.value) == null ? void 0 : S.length) ?? 0;
27648
27633
  return /* @__PURE__ */ g.jsx(
27649
27634
  ht,
27650
27635
  {
@@ -27658,16 +27643,16 @@ const iO = ({
27658
27643
  children: o ? /* @__PURE__ */ g.jsx(
27659
27644
  "div",
27660
27645
  {
27661
- className: x({
27662
- ...v.typography.font300,
27646
+ className: v({
27647
+ ...x.typography.font300,
27663
27648
  // To prevent the div from collapsing when the content is empty
27664
- minHeight: String(v.typography.font300.lineHeight),
27665
- border: `${v.sizing.scale0} solid ${v.colors.borderOpaque}`,
27666
- borderRadius: v.borders.radius300,
27667
- paddingTop: v.sizing.scale400,
27668
- paddingBottom: v.sizing.scale400,
27669
- paddingLeft: v.sizing.scale550,
27670
- paddingRight: v.sizing.scale550
27649
+ minHeight: String(x.typography.font300.lineHeight),
27650
+ border: `${x.sizing.scale0} solid ${x.colors.borderOpaque}`,
27651
+ borderRadius: x.borders.radius300,
27652
+ paddingTop: x.sizing.scale400,
27653
+ paddingBottom: x.sizing.scale400,
27654
+ paddingLeft: x.sizing.scale550,
27655
+ paddingRight: x.sizing.scale550
27671
27656
  }),
27672
27657
  children: /* @__PURE__ */ g.jsx(oi, { children: y.value })
27673
27658
  }
@@ -27894,11 +27879,11 @@ var eM = ["length"], tM = ["meta", "input"], iM = La.reduce(function(i, e) {
27894
27879
  format: function(R) {
27895
27880
  return R;
27896
27881
  }
27897
- }), b = y.meta, x = b.length, v = _h(b, eM), C = y.input, S = _h(y, tM), k = function(R) {
27898
- for (var z = x || 0, F = 0; F < z; F++)
27882
+ }), b = y.meta, v = b.length, x = _h(b, eM), C = y.input, S = _h(y, tM), k = function(R) {
27883
+ for (var z = v || 0, F = 0; F < z; F++)
27899
27884
  R(e + "[" + F + "]", F);
27900
27885
  }, E = function(R) {
27901
- for (var z = x || 0, F = [], P = 0; P < z; P++)
27886
+ for (var z = v || 0, F = [], P = 0; P < z; P++)
27902
27887
  F.push(R(e + "[" + P + "]", P));
27903
27888
  return F;
27904
27889
  };
@@ -27906,12 +27891,12 @@ var eM = ["length"], tM = ["meta", "input"], iM = La.reduce(function(i, e) {
27906
27891
  fields: Ks({
27907
27892
  name: e,
27908
27893
  forEach: k,
27909
- length: x || 0,
27894
+ length: v || 0,
27910
27895
  map: E
27911
27896
  }, p, S, {
27912
27897
  value: C.value
27913
27898
  }),
27914
- meta: v
27899
+ meta: x
27915
27900
  };
27916
27901
  };
27917
27902
  function Mm(i, { minItems: e = 0, readOnly: t = !1 } = {}) {
@@ -27994,12 +27979,12 @@ function lO({
27994
27979
  const { entries: c, handleItemAdd: u, remove: h, isRemovable: f } = Mm(i, {
27995
27980
  minItems: n,
27996
27981
  readOnly: r
27997
- }), d = t ?? (e ? `Add ${e.toLowerCase()}` : "Add more");
27998
- return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
27999
- c.map(({ id: p, indexedFieldPath: m }, y) => /* @__PURE__ */ g.jsx(Em, { index: y, rootFieldPath: i, children: /* @__PURE__ */ g.jsx(
27982
+ }), d = t ?? (e ? `Add ${e.toLowerCase()}` : "Add more"), [p, m] = G();
27983
+ return /* @__PURE__ */ g.jsxs("div", { className: p({ display: "flex", flexDirection: "column", gap: m.sizing.scale800 }), children: [
27984
+ c.map(({ id: y, indexedFieldPath: b }, v) => /* @__PURE__ */ g.jsx(Em, { index: v, rootFieldPath: i, children: /* @__PURE__ */ g.jsx(
28000
27985
  XT,
28001
27986
  {
28002
- title: e ? `${e} ${y + 1}` : void 0,
27987
+ title: e ? `${e} ${v + 1}` : void 0,
28003
27988
  description: o,
28004
27989
  tooltip: l,
28005
27990
  collapsible: a,
@@ -28012,19 +27997,19 @@ function lO({
28012
27997
  size: dt.compact,
28013
27998
  startEnhancer: /* @__PURE__ */ g.jsx(pe, { name: "trashCan", kind: ys.PRIMARY }),
28014
27999
  "aria-label": "Remove",
28015
- onClick: () => h(y),
28000
+ onClick: () => h(v),
28016
28001
  children: "Remove"
28017
28002
  }
28018
28003
  ),
28019
28004
  overrides: {
28020
- // FormGroup comes with marginBottom that intends to be applied to separate groups in the
28021
- // context of an entire form. Since the ArrayFormGroup has a button at the end, we need to
28022
- // remove the margin bottom to avoid disconnect between the form group and the button.
28005
+ // ArrayFormGroup owns spacing between its own entries and the trailing AddButton via
28006
+ // the wrapping flex gap above, so each entry's own marginBottom would double up
28007
+ // (flex gap and margin are additive, not collapsing) and needs to be zeroed here.
28023
28008
  BoxContainer: { style: { marginBottom: 0 } }
28024
28009
  },
28025
- children: s(m, y)
28010
+ children: s(b, v)
28026
28011
  }
28027
- ) }, p)),
28012
+ ) }, y)),
28028
28013
  !r && /* @__PURE__ */ g.jsx(Tm, { label: d, shape: xt.pill, onClick: u })
28029
28014
  ] });
28030
28015
  }