@oliasoft-open-source/react-ui-library 7.0.1 → 7.0.2-beta-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.
package/dist/index.js CHANGED
@@ -6548,31 +6548,17 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
6548
6548
  }), (t) => {
6549
6549
  e.current = t;
6550
6550
  };
6551
- }, Ed = (e) => {
6552
- let t = m(void 0);
6553
- return l(() => {
6554
- t.current = e;
6555
- }, [e]), t.current;
6556
- }, Dd = (e, t) => {
6557
- let n = t == null ? void 0 : t[e];
6558
- if (!n) {
6559
- var r;
6560
- return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = ur(e)) == null ? "" : r;
6561
- }
6562
- return n;
6563
- }, Od = /* @__PURE__ */ function(e) {
6564
- return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
6565
- }({}), kd = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), Ad = (e) => {
6551
+ }, Ed = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), Dd = (e) => {
6566
6552
  if (!e) return !1;
6567
6553
  let t = Jn(e);
6568
6554
  return !Hn.includes(t);
6569
- }, jd = ({ value: e, unitkey: t, toUnit: n }) => {
6555
+ }, Od = ({ value: e, unitkey: t, toUnit: n }) => {
6570
6556
  var r;
6571
6557
  let i = Vn[t];
6572
6558
  if (!i || i.length === 0 || !((r = dr(e)) != null && r.valid) || !i.includes(n)) return !1;
6573
6559
  let a = Jn(String(e));
6574
6560
  return !(a && !i.includes(a));
6575
- }, Md = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
6561
+ }, kd = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
6576
6562
  var o;
6577
6563
  let s = er(e) ? Xn(e) : e, c = [Infinity, -Infinity].includes(Number(s));
6578
6564
  if (i || c) return {
@@ -6592,13 +6578,13 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
6592
6578
  value: void 0,
6593
6579
  error: "Source unit is missing"
6594
6580
  };
6595
- if (kd(s)) return {
6581
+ if (Ed(s)) return {
6596
6582
  value: void 0,
6597
6583
  error: "Value is invalid for conversion"
6598
6584
  };
6599
6585
  try {
6600
6586
  let e = pr(s, l);
6601
- return jd({
6587
+ return Od({
6602
6588
  value: e,
6603
6589
  toUnit: n,
6604
6590
  unitkey: t
@@ -6615,13 +6601,13 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
6615
6601
  error: "Conversion not possible"
6616
6602
  };
6617
6603
  }
6618
- }, Nd = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
6619
- let a = Xn(e), o = kd(a);
6620
- return !jd({
6604
+ }, Ad = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
6605
+ let a = Xn(e), o = Ed(a);
6606
+ return !Od({
6621
6607
  value: e,
6622
6608
  unitkey: n,
6623
6609
  toUnit: t
6624
- }) || Ad(e) || o ? { value: a } : er(e) ? Md({
6610
+ }) || Dd(e) || o ? { value: a } : er(e) ? kd({
6625
6611
  value: e,
6626
6612
  unitkey: n,
6627
6613
  toUnit: t,
@@ -6629,7 +6615,55 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
6629
6615
  doNotConvertValue: i,
6630
6616
  exactPrecision: !0
6631
6617
  }) : { value: e };
6632
- }, Pd = (e) => fn(e) && !an(e) && !ln(e) ? rn(e, "fieldName", "") : typeof e == "string" ? e : "", Fd = (e = "") => Hn == null ? void 0 : Hn.includes(e), Id = (e, t) => {
6618
+ }, jd = ({ error: e, initDisplayUnit: t, noConversion: n, unitkey: r, value: i }) => {
6619
+ let [a = "", o = ""] = i === void 0 ? [] : or(i), [s, c] = h(() => {
6620
+ let { value: e } = Ad({
6621
+ value: i,
6622
+ toUnit: t,
6623
+ unitkey: r,
6624
+ defaultFromUnit: o,
6625
+ doNotConvertValue: n
6626
+ });
6627
+ return e === "" ? {
6628
+ value: a,
6629
+ unit: o
6630
+ } : {
6631
+ value: e,
6632
+ unit: t
6633
+ };
6634
+ }), [l, u] = h({
6635
+ error: e,
6636
+ initDisplayUnit: t,
6637
+ value: i
6638
+ });
6639
+ if (l.error !== e || l.initDisplayUnit !== t || l.value !== i) {
6640
+ let a = l.initDisplayUnit === t ? s.unit : t, { value: d } = Ad({
6641
+ value: i,
6642
+ toUnit: a,
6643
+ unitkey: r,
6644
+ defaultFromUnit: o,
6645
+ doNotConvertValue: n
6646
+ });
6647
+ u({
6648
+ error: e,
6649
+ initDisplayUnit: t,
6650
+ value: i
6651
+ }), c({
6652
+ value: d,
6653
+ unit: a
6654
+ });
6655
+ }
6656
+ return [s, c];
6657
+ }, Md = (e, t) => {
6658
+ let n = t == null ? void 0 : t[e];
6659
+ if (!n) {
6660
+ var r;
6661
+ return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = ur(e)) == null ? "" : r;
6662
+ }
6663
+ return n;
6664
+ }, Nd = /* @__PURE__ */ function(e) {
6665
+ return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
6666
+ }({}), Pd = (e) => fn(e) && !an(e) && !ln(e) ? rn(e, "fieldName", "") : typeof e == "string" ? e : "", Fd = (e = "") => Hn == null ? void 0 : Hn.includes(e), Id = (e, t) => {
6633
6667
  let n = Jn(e || "");
6634
6668
  return Fd(t) && Fd(n);
6635
6669
  }, Ld = n(null), Rd = () => c(Ld), zd = !1, Bd = (e) => {
@@ -6643,35 +6677,29 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
6643
6677
  }), disabledValidation: j = !1, allowEmpty: M = !1, convertBackToStorageUnit: N = !1, enableCosmeticRounding: P = !0, enableDisplayRounding: F = !1, roundDisplayValue: I, selectOnFocus: L = !0, groupOrder: R, tooltip: z = null }) => {
6644
6678
  let ee = Rd(), te = Td();
6645
6679
  typeof c == "number" && (c = `${c}`);
6646
- let [ne = "", re = ""] = c === void 0 ? [] : or(c), B = f(() => Dd(u, C || (ee == null ? void 0 : ee.unitTemplate)), [
6680
+ let [, ne = ""] = c === void 0 ? [] : or(c), re = f(() => Md(u, C || (ee == null ? void 0 : ee.unitTemplate)), [
6647
6681
  u,
6648
6682
  C,
6649
6683
  ee == null ? void 0 : ee.unitTemplate
6650
- ]), ie = Id(c, B), ae = d || B || re, oe = Ed(ae), { value: se } = Nd({
6651
- value: c,
6652
- toUnit: ae,
6684
+ ]), B = Id(c, re), ie = d || re || ne, [ae, oe] = jd({
6685
+ error: i,
6686
+ initDisplayUnit: ie,
6687
+ noConversion: p,
6653
6688
  unitkey: u,
6654
- defaultFromUnit: re,
6655
- doNotConvertValue: p
6656
- }), [ce, le] = h(se === "" ? {
6657
- value: ne,
6658
- unit: re
6659
- } : {
6660
- value: se,
6661
- unit: ae
6662
- }), ue = M || (ce == null ? void 0 : ce.value) === void 0, [de, fe] = h(D ? Od.PREDEFINED : Od.CUSTOM), pe = !!(j || n), me = E && E.find((e) => {
6689
+ value: c
6690
+ }), se = M || (ae == null ? void 0 : ae.value) === void 0, [ce, le] = h(D ? Nd.PREDEFINED : Nd.CUSTOM), ue = !!(j || n), de = E && E.find((e) => {
6663
6691
  if (!(e != null && e.value)) return;
6664
6692
  if (k) return k === e.valueKey;
6665
- let t = er(e.value) ? Jn(e.value) : "", { value: n = c } = Md({
6693
+ let t = er(e.value) ? Jn(e.value) : "", { value: n = c } = kd({
6666
6694
  value: String(c),
6667
6695
  unitkey: u,
6668
6696
  toUnit: t
6669
6697
  });
6670
6698
  return pr(n, t) === e.value;
6671
- }), he = () => {
6699
+ }), fe = () => {
6672
6700
  var e;
6673
- let t = (e = c) == null ? "" : e, n = ce.unit;
6674
- if (!jd({
6701
+ let t = (e = c) == null ? "" : e, n = ae.unit;
6702
+ if (!Od({
6675
6703
  value: t,
6676
6704
  unitkey: u,
6677
6705
  toUnit: n
@@ -6684,79 +6712,54 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
6684
6712
  } catch {
6685
6713
  return null;
6686
6714
  }
6687
- }, ge = (t) => {
6688
- let n = Pd(e), r = t.target, { value: i, selectionStart: a } = r, o = pr(i, (ce == null ? void 0 : ce.unit) || "");
6715
+ }, pe = (t) => {
6716
+ let n = Pd(e), r = t.target, { value: i, selectionStart: a } = r, o = pr(i, (ae == null ? void 0 : ae.unit) || "");
6689
6717
  m({ target: {
6690
- value: N ? pr(Gn(o, re), re) : o,
6718
+ value: N ? pr(Gn(o, ne), ne) : o,
6691
6719
  name: n
6692
6720
  } });
6693
6721
  let [s, c] = or(o);
6694
- le({
6722
+ oe({
6695
6723
  value: s,
6696
6724
  unit: c
6697
6725
  }), te(() => {
6698
6726
  r.selectionStart = a, r.selectionEnd = a;
6699
6727
  });
6700
- }, _e = (e, t) => {
6701
- t === ce.unit || isNaN(Number(e)) || (le({
6728
+ }, me = (e, t) => {
6729
+ t === ae.unit || isNaN(Number(e)) || (oe({
6702
6730
  value: e,
6703
6731
  unit: t
6704
6732
  }), S && S(t));
6705
6733
  };
6706
6734
  l(() => {
6707
- if (ae) {
6708
- let e, t = "";
6709
- if (oe !== ae) {
6710
- let { value: n } = Nd({
6711
- value: c,
6712
- toUnit: ae,
6713
- unitkey: u,
6714
- defaultFromUnit: re,
6715
- doNotConvertValue: p
6716
- });
6717
- e = n, t = ae;
6718
- } else if (pr(ce.value, ce.unit) !== c) {
6719
- let { value: n } = Nd({
6720
- value: c,
6721
- toUnit: ce.unit,
6722
- unitkey: u,
6723
- defaultFromUnit: re,
6724
- doNotConvertValue: p
6725
- });
6726
- e = n, t = ce.unit;
6727
- }
6728
- e !== void 0 && le({
6729
- value: e,
6730
- unit: t
6731
- }), fe(E && me && O ? Od.PREDEFINED : Od.CUSTOM);
6732
- }
6735
+ ie && le(E && de && O ? Nd.PREDEFINED : Nd.CUSTOM);
6733
6736
  }, [
6734
- ae,
6735
- c,
6736
- i,
6737
+ de,
6738
+ ie,
6739
+ E,
6737
6740
  O
6738
6741
  ]);
6739
- let ve = he(), ye = tr(ce.unit) || ce.unit || "", be = p || !ve || ve && ve.length === 1, xe = Pd(e), Se, Ce = (t) => {
6742
+ let he = fe(), ge = tr(ae.unit) || ae.unit || "", _e = p || !he || he && he.length === 1, ve = Pd(e), ye, be = (t) => {
6740
6743
  let r = t != null && t.value ? t.value : "", [i = "", a = ""] = er(r) ? or(r) : [r], o = fr(r);
6741
- if (jd({
6744
+ if (Od({
6742
6745
  value: r,
6743
6746
  unitkey: u,
6744
6747
  toUnit: a
6745
6748
  })) {
6746
- let { value: e = "" } = Nd({
6749
+ let { value: e = "" } = Ad({
6747
6750
  value: r,
6748
- toUnit: B,
6751
+ toUnit: re,
6749
6752
  unitkey: u,
6750
6753
  defaultFromUnit: a,
6751
6754
  doNotConvertValue: p
6752
6755
  });
6753
- o = fr(pr(e, B));
6756
+ o = fr(pr(e, re));
6754
6757
  }
6755
6758
  return {
6756
6759
  type: aa.OPTION,
6757
6760
  inline: !0,
6758
6761
  onClick: () => {
6759
- dr(i).valid && !n && (fe(Od.PREDEFINED), m({ target: {
6762
+ dr(i).valid && !n && (le(Nd.PREDEFINED), m({ target: {
6760
6763
  value: r,
6761
6764
  name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
6762
6765
  predefinedSelected: !0,
@@ -6768,29 +6771,29 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
6768
6771
  height: "0"
6769
6772
  })] }),
6770
6773
  description: o,
6771
- selected: me === t && de === Od.PREDEFINED
6774
+ selected: de === t && ce === Nd.PREDEFINED
6772
6775
  };
6773
6776
  };
6774
- if (Se = [{
6777
+ if (ye = [{
6775
6778
  type: aa.OPTION,
6776
6779
  inline: !0,
6777
6780
  onClick: () => {
6778
- de !== Od.CUSTOM && !n && m({ target: {
6779
- value: pr(ce.value, ce.unit),
6781
+ ce !== Nd.CUSTOM && !n && m({ target: {
6782
+ value: pr(ae.value, ae.unit),
6780
6783
  name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
6781
6784
  } });
6782
6785
  },
6783
6786
  label: "Custom",
6784
- selected: de === Od.CUSTOM
6787
+ selected: ce === Nd.CUSTOM
6785
6788
  }], E != null && E.length) {
6786
- let e = E.map(Ce);
6787
- Se = [...Se, ...e];
6789
+ let e = E.map(be);
6790
+ ye = [...ye, ...e];
6788
6791
  }
6789
- let we = (e) => {
6792
+ let xe = (e) => {
6790
6793
  if (er(e)) {
6791
- let t = Jn(e), { value: n } = Nd({
6794
+ let t = Jn(e), { value: n } = Ad({
6792
6795
  value: e,
6793
- toUnit: ce.unit,
6796
+ toUnit: ae.unit,
6794
6797
  unitkey: u,
6795
6798
  defaultFromUnit: t,
6796
6799
  doNotConvertValue: p
@@ -6798,9 +6801,9 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
6798
6801
  return n;
6799
6802
  }
6800
6803
  return e;
6801
- }, Te = !E && (!R || R === V.FIRST) ? V.FIRST : V.MIDDLE, Ee = !R || R === V.LAST ? V.LAST : V.MIDDLE;
6804
+ }, Se = !E && (!R || R === V.FIRST) ? V.FIRST : V.MIDDLE, Ce = !R || R === V.LAST ? V.LAST : V.MIDDLE;
6802
6805
  return /* @__PURE__ */ y("div", {
6803
- className: de === Od.PREDEFINED ? _(Hd.predefinedMenuActive) : "",
6806
+ className: ce === Nd.PREDEFINED ? _(Hd.predefinedMenuActive) : "",
6804
6807
  children: /* @__PURE__ */ b(Io, {
6805
6808
  small: o,
6806
6809
  width: s,
@@ -6815,65 +6818,65 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
6815
6818
  trigger: "Component",
6816
6819
  component: /* @__PURE__ */ y(K, {
6817
6820
  groupOrder: "first",
6818
- active: de === Od.PREDEFINED,
6819
- icon: de === Od.PREDEFINED ? "link" : "unlink",
6821
+ active: ce === Nd.PREDEFINED,
6822
+ icon: ce === Nd.PREDEFINED ? "link" : "unlink",
6820
6823
  small: o
6821
6824
  }),
6822
6825
  small: o,
6823
- sections: Se
6826
+ sections: ye
6824
6827
  },
6825
- tooltip: de === Od.PREDEFINED ? me == null ? void 0 : me.label : ""
6828
+ tooltip: ce === Nd.PREDEFINED ? de == null ? void 0 : de.label : ""
6826
6829
  }),
6827
6830
  /* @__PURE__ */ y("div", {
6828
6831
  className: Hd.inputWrapper,
6829
6832
  children: /* @__PURE__ */ y(Uc, {
6830
- name: xe,
6833
+ name: ve,
6831
6834
  testId: w,
6832
6835
  disabled: n,
6833
- placeholder: we(t),
6834
- value: ce.value,
6835
- onChange: ge,
6836
+ placeholder: xe(t),
6837
+ value: ae.value,
6838
+ onChange: pe,
6836
6839
  onFocus: x,
6837
6840
  error: i === null ? void 0 : i,
6838
6841
  warning: T === null ? void 0 : T,
6839
6842
  left: a,
6840
- allowEmpty: ue,
6841
- validationCallback: (e, t) => A(xe, t),
6843
+ allowEmpty: se,
6844
+ validationCallback: (e, t) => A(ve, t),
6842
6845
  enableCosmeticRounding: P,
6843
6846
  enableDisplayRounding: F,
6844
6847
  roundDisplayValue: I,
6845
- groupOrder: Te,
6846
- disableInternalErrorValidationMessages: pe,
6848
+ groupOrder: Se,
6849
+ disableInternalErrorValidationMessages: ue,
6847
6850
  small: o,
6848
6851
  selectOnFocus: L,
6849
6852
  tooltip: z
6850
- }, xe)
6853
+ }, ve)
6851
6854
  }),
6852
- ye && (be || !ie ? /* @__PURE__ */ y(Ac, {
6853
- groupOrder: Ee,
6855
+ ge && (_e || !B ? /* @__PURE__ */ y(Ac, {
6856
+ groupOrder: Ce,
6854
6857
  small: o,
6855
- children: ye
6858
+ children: ge
6856
6859
  }) : /* @__PURE__ */ y(Aa, {
6857
- groupOrder: Ee,
6860
+ groupOrder: Ce,
6858
6861
  maxHeight: 380,
6859
6862
  disabled: r,
6860
6863
  testId: w && `${w}-menu`,
6861
6864
  tabIndex: -1,
6862
6865
  menu: {
6863
- label: ye,
6866
+ label: ge,
6864
6867
  trigger: "DropDownButton",
6865
6868
  small: o,
6866
- sections: ve.map(([e = "", t = "", n]) => {
6869
+ sections: he.map(([e = "", t = "", n]) => {
6867
6870
  let r = n || t || "", i = $n(e) ? e : "";
6868
6871
  return {
6869
6872
  type: "Option",
6870
6873
  label: P ? Vd(i) : i,
6871
6874
  inline: !0,
6872
6875
  onClick: (n) => {
6873
- n.stopPropagation(), _e(e, t);
6876
+ n.stopPropagation(), me(e, t);
6874
6877
  },
6875
6878
  description: r,
6876
- selected: r === ye,
6879
+ selected: r === ge,
6877
6880
  testId: `${w}-unit-${r}`
6878
6881
  };
6879
6882
  })
@@ -7712,10 +7715,15 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7712
7715
  })]
7713
7716
  })
7714
7717
  });
7715
- }, Df = Object.freeze({
7718
+ }, Df = (e) => {
7719
+ let t = m(void 0);
7720
+ return l(() => {
7721
+ t.current = e;
7722
+ }, [e]), t.current;
7723
+ }, Of = Object.freeze({
7716
7724
  Translations: "translations",
7717
7725
  LanguageKey: "languageKey"
7718
- }), Of = {
7726
+ }), kf = {
7719
7727
  unified: "Unified",
7720
7728
  split: "Split",
7721
7729
  changesTooLarge: "Changes are too large to be shown",
@@ -7737,29 +7745,29 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7737
7745
  pluralChanges: "changes",
7738
7746
  showAll: "Show all",
7739
7747
  unknown: "Unknown"
7740
- }, kf = (e) => Object.keys(Of).reduce((t, n) => ({
7748
+ }, Af = (e) => Object.keys(kf).reduce((t, n) => ({
7741
7749
  ...t,
7742
- [n]: (e == null ? void 0 : e[n]) || (Of == null ? void 0 : Of[n])
7743
- }), {}), Af = {
7744
- [Df.Translations]: kf(),
7745
- [Df.LanguageKey]: "en"
7746
- }, jf = (e) => e ? Af[e] : Af, Mf = (e, t) => {
7747
- Af[e] = t;
7748
- }, Nf = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
7750
+ [n]: (e == null ? void 0 : e[n]) || (kf == null ? void 0 : kf[n])
7751
+ }), {}), jf = {
7752
+ [Of.Translations]: Af(),
7753
+ [Of.LanguageKey]: "en"
7754
+ }, Mf = (e) => e ? jf[e] : jf, Nf = (e, t) => {
7755
+ jf[e] = t;
7756
+ }, Pf = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
7749
7757
  var a;
7750
7758
  let { unitTemplate: o = null } = (a = Rd()) == null ? {} : a;
7751
- return e[n] = r == null ? Dd(n, o) : r, t[n] = i, {
7759
+ return e[n] = r == null ? Md(n, o) : r, t[n] = i, {
7752
7760
  preferredUnits: e,
7753
7761
  storageUnits: t
7754
7762
  };
7755
7763
  }, {
7756
7764
  preferredUnits: {},
7757
7765
  storageUnits: {}
7758
- }), Pf = ({ row: e, rowIndex: t, selectedUnits: n, storageUnits: r, convertBackToStorageUnit: i, enableCosmeticRounding: a, enableDisplayRounding: o }) => ({
7766
+ }), Ff = ({ row: e, rowIndex: t, selectedUnits: n, storageUnits: r, convertBackToStorageUnit: i, enableCosmeticRounding: a, enableDisplayRounding: o }) => ({
7759
7767
  ...e,
7760
7768
  cells: e.cells.map((e, s) => {
7761
7769
  if ("autoUnit" in e && e != null && e.autoUnit && (typeof (e == null ? void 0 : e.value) == "string" || typeof (e == null ? void 0 : e.value) == "number")) {
7762
- let { unitKey: c, value: l, formatDisplayValue: u } = e, d = o && "roundDisplayValue" in e ? e == null ? void 0 : e.roundDisplayValue : null, f = n[c], p = r[c], m = p && f !== p, { value: h = l } = Md({
7770
+ let { unitKey: c, value: l, formatDisplayValue: u } = e, d = o && "roundDisplayValue" in e ? e == null ? void 0 : e.roundDisplayValue : null, f = n[c], p = r[c], m = p && f !== p, { value: h = l } = kd({
7763
7771
  value: lr(l),
7764
7772
  unitkey: c,
7765
7773
  toUnit: f,
@@ -7773,7 +7781,7 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7773
7781
  roundDisplayValue: d,
7774
7782
  selectOnFocus: !0,
7775
7783
  onChange: (n) => {
7776
- let { value: r } = n.target, a = i ? p : f, { value: o = r } = Md({
7784
+ let { value: r } = n.target, a = i ? p : f, { value: o = r } = kd({
7777
7785
  value: String(r),
7778
7786
  unitkey: c,
7779
7787
  toUnit: a,
@@ -7797,8 +7805,8 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7797
7805
  }
7798
7806
  return e;
7799
7807
  })
7800
- }), Ff = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
7801
- let { translations: i } = jf();
7808
+ }), If = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
7809
+ let { translations: i } = Mf();
7802
7810
  return e ? e.map((e) => ({
7803
7811
  ...e,
7804
7812
  cells: e.cells.map((e) => {
@@ -7827,8 +7835,8 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7827
7835
  return e;
7828
7836
  })
7829
7837
  })) : [];
7830
- }, If = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: o, beforeRenderRow: c }) => {
7831
- let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } = Nf(t), m = Ed(p), [g, _] = h(p), v = ({ unitKey: e, value: n }) => {
7838
+ }, Lf = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: o, beforeRenderRow: c }) => {
7839
+ let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } = Pf(t), m = Df(p), [g, _] = h(p), v = ({ unitKey: e, value: n }) => {
7832
7840
  _({
7833
7841
  ...g,
7834
7842
  [e]: n
@@ -7839,7 +7847,7 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7839
7847
  newUnit: n,
7840
7848
  unitKey: e
7841
7849
  });
7842
- }, b = s(({ row: e, rowIndex: t }) => Pf({
7850
+ }, b = s(({ row: e, rowIndex: t }) => Ff({
7843
7851
  row: c ? c({
7844
7852
  row: e,
7845
7853
  rowIndex: t
@@ -7868,7 +7876,7 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7868
7876
  }, [t]), /* @__PURE__ */ y(yl, {
7869
7877
  table: {
7870
7878
  ...d,
7871
- headers: Ff({
7879
+ headers: If({
7872
7880
  headers: e.headers,
7873
7881
  selectedUnits: g,
7874
7882
  storageUnits: f,
@@ -7879,8 +7887,8 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7879
7887
  canListReorder: o,
7880
7888
  beforeRenderRow: b
7881
7889
  });
7882
- }, Lf = { settingField: "_settingField_1x02n_1" }, Rf = ({ helpText: t, disabled: n = !1, showCustom: r = !1, children: i, userValue: a = void 0, companyValue: o = void 0, noPermission: s = !1, selectedOption: c, handleSelectChange: l, testId: u }) => {
7883
- let { translations: d } = jf(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ b(e.Fragment, { children: [t, /* @__PURE__ */ y("br", {})] }, n)), p = [
7890
+ }, Rf = { settingField: "_settingField_1x02n_1" }, zf = ({ helpText: t, disabled: n = !1, showCustom: r = !1, children: i, userValue: a = void 0, companyValue: o = void 0, noPermission: s = !1, selectedOption: c, handleSelectChange: l, testId: u }) => {
7891
+ let { translations: d } = Mf(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ b(e.Fragment, { children: [t, /* @__PURE__ */ y("br", {})] }, n)), p = [
7884
7892
  ...r ? [] : [{
7885
7893
  label: d == null ? void 0 : d.allUsers,
7886
7894
  value: !1
@@ -7895,7 +7903,7 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7895
7903
  }] : []
7896
7904
  ], m = a !== void 0 && o !== void 0 && !cn(a, o);
7897
7905
  return /* @__PURE__ */ b("div", {
7898
- className: Lf.settingField,
7906
+ className: Rf.settingField,
7899
7907
  "data-testid": u,
7900
7908
  children: [/* @__PURE__ */ b(Nu, {
7901
7909
  justifyContent: "space-between",
@@ -7927,19 +7935,19 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7927
7935
  children: f(t)
7928
7936
  })]
7929
7937
  });
7930
- }, zf = (e, t) => {
7938
+ }, Bf = (e, t) => {
7931
7939
  let n = e.replace(/\r\n/g, "\n").split("\n"), r = t.replace(/\r\n/g, "\n").split("\n"), i = r.length - n.length, a = n.length - r.length;
7932
7940
  return {
7933
7941
  added: Math.max(0, i),
7934
7942
  removed: Math.max(0, a)
7935
7943
  };
7936
- }, Bf = "split", Vf = "unified", Hf = ({ oldJson: e, newJson: t, viewType: n = Bf }) => {
7944
+ }, Vf = "split", Hf = "unified", Uf = ({ oldJson: e, newJson: t, viewType: n = Vf }) => {
7937
7945
  var r, i;
7938
- let { translations: a } = jf(), [o, s] = h(n), c = [{
7939
- value: Bf,
7946
+ let { translations: a } = Mf(), [o, s] = h(n), c = [{
7947
+ value: Vf,
7940
7948
  label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
7941
7949
  }, {
7942
- value: Vf,
7950
+ value: Hf,
7943
7951
  label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
7944
7952
  }];
7945
7953
  l(() => {
@@ -7947,7 +7955,7 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7947
7955
  }, [n]);
7948
7956
  let u = ({ target: { value: e } }) => {
7949
7957
  s(e);
7950
- }, { added: d, removed: f } = zf(e, t), p = d + f > 3500;
7958
+ }, { added: d, removed: f } = Bf(e, t), p = d + f > 3500;
7951
7959
  return /* @__PURE__ */ y(v, { children: /* @__PURE__ */ y(Ba, {
7952
7960
  bordered: !0,
7953
7961
  heading: /* @__PURE__ */ b(Nu, {
@@ -7980,14 +7988,14 @@ var Xa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Za =
7980
7988
  }) : /* @__PURE__ */ y(ei, {
7981
7989
  oldValue: e,
7982
7990
  newValue: t,
7983
- splitView: o === Bf,
7991
+ splitView: o === Vf,
7984
7992
  compareMethod: ti.WORDS
7985
7993
  })
7986
7994
  }) });
7987
7995
  };
7988
7996
  //#endregion
7989
7997
  //#region src/helpers/date.ts
7990
- function Uf({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
7998
+ function Wf({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
7991
7999
  return e ? new Date(e).toLocaleString(a, {
7992
8000
  year: "numeric",
7993
8001
  month: "short",
@@ -8001,28 +8009,28 @@ function Uf({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
8001
8009
  }
8002
8010
  //#endregion
8003
8011
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
8004
- function Wf(e) {
8012
+ function Gf(e) {
8005
8013
  var t;
8006
8014
  let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
8007
8015
  if (!n) throw Error("Invalid RegExp");
8008
8016
  return new RegExp((t = n[1]) == null ? "" : t, n[2]);
8009
8017
  }
8010
- function Gf(e) {
8018
+ function Kf(e) {
8011
8019
  if (typeof e != "object") return e;
8012
8020
  if (e === null) return null;
8013
- if (Array.isArray(e)) return e.map(Gf);
8021
+ if (Array.isArray(e)) return e.map(Kf);
8014
8022
  if (e instanceof Date) return new Date(e.getTime());
8015
- if (e instanceof RegExp) return Wf(e);
8023
+ if (e instanceof RegExp) return Gf(e);
8016
8024
  let t = {};
8017
- for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Gf(e[n]));
8025
+ for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Kf(e[n]));
8018
8026
  return t;
8019
8027
  }
8020
8028
  //#endregion
8021
8029
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
8022
- function Kf(e, t) {
8030
+ function qf(e, t) {
8023
8031
  if (e.length === 0) throw Error(t || "Expected a non-empty array");
8024
8032
  }
8025
- var qf = (e) => e[e.length - 1], Jf = class {
8033
+ var Jf = (e) => e[e.length - 1], Yf = class {
8026
8034
  setResult(e) {
8027
8035
  return this.result = e, this.hasResult = !0, this;
8028
8036
  }
@@ -8030,16 +8038,16 @@ var qf = (e) => e[e.length - 1], Jf = class {
8030
8038
  return this.exiting = !0, this;
8031
8039
  }
8032
8040
  push(e, t) {
8033
- return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (Kf(this.children), qf(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
8041
+ return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (qf(this.children), Jf(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
8034
8042
  }
8035
- }, Yf = class extends Jf {
8043
+ }, Xf = class extends Yf {
8036
8044
  constructor(e, t) {
8037
8045
  super(), this.left = e, this.right = t, this.pipe = "diff";
8038
8046
  }
8039
8047
  prepareDeltaResult(e) {
8040
8048
  var t, n, r, i;
8041
8049
  if (typeof e == "object" && ((t = this.options) != null && t.omitRemovedValues && Array.isArray(e) && e.length > 1 && (e.length === 2 || e[2] === 0 || e[2] === 3) && (e[0] = 0), (n = this.options) != null && n.cloneDiffValues)) {
8042
- let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Gf;
8050
+ let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Kf;
8043
8051
  typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
8044
8052
  }
8045
8053
  return e;
@@ -8047,15 +8055,15 @@ var qf = (e) => e[e.length - 1], Jf = class {
8047
8055
  setResult(e) {
8048
8056
  return this.prepareDeltaResult(e), super.setResult(e);
8049
8057
  }
8050
- }, Xf = class extends Jf {
8058
+ }, Zf = class extends Yf {
8051
8059
  constructor(e, t) {
8052
8060
  super(), this.left = e, this.delta = t, this.pipe = "patch";
8053
8061
  }
8054
- }, Zf = class extends Jf {
8062
+ }, Qf = class extends Yf {
8055
8063
  constructor(e) {
8056
8064
  super(), this.delta = e, this.pipe = "reverse";
8057
8065
  }
8058
- }, Qf = class {
8066
+ }, $f = class {
8059
8067
  constructor(e) {
8060
8068
  this.name = e, this.filters = [];
8061
8069
  }
@@ -8119,7 +8127,7 @@ var qf = (e) => e[e.length - 1], Jf = class {
8119
8127
  }
8120
8128
  }), this);
8121
8129
  }
8122
- }, $f = class {
8130
+ }, ep = class {
8123
8131
  constructor(e) {
8124
8132
  this.selfOptions = e || {}, this.pipes = {};
8125
8133
  }
@@ -8146,7 +8154,7 @@ var qf = (e) => e[e.length - 1], Jf = class {
8146
8154
  for (; r;) n.nextAfterChildren !== void 0 && (n.next = n.nextAfterChildren, n.nextAfterChildren = null), typeof r == "string" && (r = this.pipe(r)), r.process(n), i = r, r = null, n && n.next && (n = n.next, r = n.pipe || i);
8147
8155
  return n.hasResult ? n.result : void 0;
8148
8156
  }
8149
- }, ep = (e, t, n, r) => e[n] === t[r], tp = (e, t, n, r) => {
8157
+ }, tp = (e, t, n, r) => e[n] === t[r], np = (e, t, n, r) => {
8150
8158
  var i, a, o;
8151
8159
  let s = e.length, c = t.length, l, u, d = Array(s + 1);
8152
8160
  for (l = 0; l < s + 1; l++) {
@@ -8162,7 +8170,7 @@ var qf = (e) => e[e.length - 1], Jf = class {
8162
8170
  for (u = 1; u < c + 1; u++) n(e, t, l - 1, u - 1, r) ? s[u] = ((i = f[u - 1]) == null ? 0 : i) + 1 : s[u] = Math.max((a = f[u]) == null ? 0 : a, (o = s[u - 1]) == null ? 0 : o);
8163
8171
  }
8164
8172
  return d;
8165
- }, np = (e, t, n, r) => {
8173
+ }, rp = (e, t, n, r) => {
8166
8174
  let i = t.length, a = n.length, o = {
8167
8175
  sequence: [],
8168
8176
  indices1: [],
@@ -8184,11 +8192,11 @@ var qf = (e) => e[e.length - 1], Jf = class {
8184
8192
  }
8185
8193
  }
8186
8194
  return o;
8187
- }, rp = { get: (e, t, n, r) => {
8195
+ }, ip = { get: (e, t, n, r) => {
8188
8196
  let i = r || {};
8189
- return np(tp(e, t, n || ep, i), e, t, i);
8190
- } }, ip = 3;
8191
- function ap(e, t, n, r) {
8197
+ return rp(np(e, t, n || tp, i), e, t, i);
8198
+ } }, ap = 3;
8199
+ function op(e, t, n, r) {
8192
8200
  for (let i = 0; i < n; i++) {
8193
8201
  let n = e[i];
8194
8202
  for (let e = 0; e < r; e++) {
@@ -8198,7 +8206,7 @@ function ap(e, t, n, r) {
8198
8206
  }
8199
8207
  return !1;
8200
8208
  }
8201
- function op(e, t, n, r, i) {
8209
+ function sp(e, t, n, r, i) {
8202
8210
  let a = e[n], o = t[r];
8203
8211
  if (a === o) return !0;
8204
8212
  if (typeof a != "object" || typeof o != "object") return !1;
@@ -8211,15 +8219,15 @@ function op(e, t, n, r, i) {
8211
8219
  let l = i.hashCache2[r];
8212
8220
  return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l === void 0 ? !1 : c === l;
8213
8221
  }
8214
- var sp = function(e) {
8222
+ var cp = function(e) {
8215
8223
  var t, n, r, i, a;
8216
8224
  if (!e.leftIsArray) return;
8217
8225
  let o = {
8218
8226
  objectHash: (t = e.options) == null ? void 0 : t.objectHash,
8219
8227
  matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
8220
8228
  }, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
8221
- for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !ap(f, p, m, h)); s < m && s < h && op(f, p, s, s, o);) l = s, g = new Yf(f[l], p[l]), e.push(g, l), s++;
8222
- for (; c + s < m && c + s < h && op(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Yf(f[u], p[d]), e.push(g, d), c++;
8229
+ for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !op(f, p, m, h)); s < m && s < h && sp(f, p, s, s, o);) l = s, g = new Xf(f[l], p[l]), e.push(g, l), s++;
8230
+ for (; c + s < m && c + s < h && sp(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Xf(f[u], p[d]), e.push(g, d), c++;
8223
8231
  let _;
8224
8232
  if (s + c === m) {
8225
8233
  if (m === h) {
@@ -8243,7 +8251,7 @@ var sp = function(e) {
8243
8251
  return;
8244
8252
  }
8245
8253
  o.hashCache1 = void 0, o.hashCache2 = void 0;
8246
- let v = f.slice(s, m - c), y = p.slice(s, h - c), b = rp.get(v, y, op, o), x = [];
8254
+ let v = f.slice(s, m - c), y = p.slice(s, h - c), b = ip.get(v, y, sp, o), x = [];
8247
8255
  for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
8248
8256
  let t = `_${l}`;
8249
8257
  _[t] = [
@@ -8264,8 +8272,8 @@ var sp = function(e) {
8264
8272
  if (S && w > 0) for (let n = 0; n < w; n++) {
8265
8273
  u = x[n];
8266
8274
  let r = u === void 0 ? void 0 : _[`_${u}`];
8267
- if (u !== void 0 && r && op(v, y, u - s, l - s, o)) {
8268
- r.splice(1, 2, l, ip), r.splice(1, 2, l, ip), C || (r[0] = ""), d = l, g = new Yf(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
8275
+ if (u !== void 0 && r && sp(v, y, u - s, l - s, o)) {
8276
+ r.splice(1, 2, l, ap), r.splice(1, 2, l, ap), C || (r[0] = ""), d = l, g = new Xf(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
8269
8277
  break;
8270
8278
  }
8271
8279
  }
@@ -8273,20 +8281,20 @@ var sp = function(e) {
8273
8281
  } else {
8274
8282
  if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
8275
8283
  if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
8276
- d = b.indices2[t] + s, g = new Yf(f[u], p[d]), e.push(g, d);
8284
+ d = b.indices2[t] + s, g = new Xf(f[u], p[d]), e.push(g, d);
8277
8285
  }
8278
8286
  }
8279
8287
  e.setResult(_).exit();
8280
8288
  };
8281
- sp.filterName = "arrays";
8282
- var cp = {
8289
+ cp.filterName = "arrays";
8290
+ var lp = {
8283
8291
  numerically(e, t) {
8284
8292
  return e - t;
8285
8293
  },
8286
8294
  numericallyBy(e) {
8287
8295
  return (t, n) => t[e] - n[e];
8288
8296
  }
8289
- }, lp = function(e) {
8297
+ }, up = function(e) {
8290
8298
  var t;
8291
8299
  if (!e.nested) return;
8292
8300
  let n = e.delta;
@@ -8294,7 +8302,7 @@ var cp = {
8294
8302
  let r, i, a = n, o = e.left, s = [], c = [], l = [];
8295
8303
  for (r in a) if (r !== "_t") if (r[0] === "_") {
8296
8304
  let e = r;
8297
- if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === ip)) s.push(Number.parseInt(r.slice(1), 10));
8305
+ if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === ap)) s.push(Number.parseInt(r.slice(1), 10));
8298
8306
  else throw Error(`only removal or move can be applied at original array indices, invalid diff type: ${(t = a[e]) == null ? void 0 : t[2]}`);
8299
8307
  } else {
8300
8308
  let e = r;
@@ -8306,15 +8314,15 @@ var cp = {
8306
8314
  delta: a[e]
8307
8315
  });
8308
8316
  }
8309
- for (s = s.sort(cp.numerically), r = s.length - 1; r >= 0; r--) {
8317
+ for (s = s.sort(lp.numerically), r = s.length - 1; r >= 0; r--) {
8310
8318
  if (i = s[r], i === void 0) continue;
8311
8319
  let e = a[`_${i}`], t = o.splice(i, 1)[0];
8312
- (e == null ? void 0 : e[2]) === ip && c.push({
8320
+ (e == null ? void 0 : e[2]) === ap && c.push({
8313
8321
  index: e[1],
8314
8322
  value: t
8315
8323
  });
8316
8324
  }
8317
- c = c.sort(cp.numericallyBy("index"));
8325
+ c = c.sort(lp.numericallyBy("index"));
8318
8326
  let u = c.length;
8319
8327
  for (r = 0; r < u; r++) {
8320
8328
  let e = c[r];
@@ -8324,7 +8332,7 @@ var cp = {
8324
8332
  if (d > 0) for (r = 0; r < d; r++) {
8325
8333
  let t = l[r];
8326
8334
  if (t === void 0) continue;
8327
- let n = new Xf(o[t.index], t.delta);
8335
+ let n = new Zf(o[t.index], t.delta);
8328
8336
  e.push(n, t.index);
8329
8337
  }
8330
8338
  if (!e.children) {
@@ -8333,8 +8341,8 @@ var cp = {
8333
8341
  }
8334
8342
  e.exit();
8335
8343
  };
8336
- lp.filterName = "arrays";
8337
- var up = function(e) {
8344
+ up.filterName = "arrays";
8345
+ var dp = function(e) {
8338
8346
  if (!e || !e.children || e.delta._t !== "a") return;
8339
8347
  let t = e.left, n = e.children.length;
8340
8348
  for (let r = 0; r < n; r++) {
@@ -8345,16 +8353,16 @@ var up = function(e) {
8345
8353
  }
8346
8354
  e.setResult(t).exit();
8347
8355
  };
8348
- up.filterName = "arraysCollectChildren";
8349
- var dp = function(e) {
8356
+ dp.filterName = "arraysCollectChildren";
8357
+ var fp = function(e) {
8350
8358
  if (!e.nested) {
8351
8359
  let t = e.delta;
8352
- if (t[2] === ip) {
8360
+ if (t[2] === ap) {
8353
8361
  let n = t;
8354
8362
  e.newName = `_${n[1]}`, e.setResult([
8355
8363
  n[0],
8356
8364
  Number.parseInt(e.childName.substring(1), 10),
8357
- ip
8365
+ ap
8358
8366
  ]).exit();
8359
8367
  }
8360
8368
  return;
@@ -8364,26 +8372,26 @@ var dp = function(e) {
8364
8372
  let n = t;
8365
8373
  for (let t in n) {
8366
8374
  if (t === "_t") continue;
8367
- let r = new Zf(n[t]);
8375
+ let r = new Qf(n[t]);
8368
8376
  e.push(r, t);
8369
8377
  }
8370
8378
  e.exit();
8371
8379
  };
8372
- dp.filterName = "arrays";
8373
- var fp = (e, t, n) => {
8380
+ fp.filterName = "arrays";
8381
+ var pp = (e, t, n) => {
8374
8382
  if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
8375
8383
  if (Array.isArray(n) && n[2] === 0) return `_${t}`;
8376
8384
  let r = +t;
8377
8385
  for (let n in e) {
8378
8386
  let i = e[n];
8379
- if (Array.isArray(i)) if (i[2] === ip) {
8387
+ if (Array.isArray(i)) if (i[2] === ap) {
8380
8388
  let e = Number.parseInt(n.substring(1), 10), a = i[1];
8381
8389
  if (a === +t) return e;
8382
8390
  e <= r && a > r ? r++ : e >= r && a < r && r--;
8383
8391
  } else i[2] === 0 ? Number.parseInt(n.substring(1), 10) <= r && r++ : i.length === 1 && Number.parseInt(n, 10) <= r && r--;
8384
8392
  }
8385
8393
  return r;
8386
- }, pp = (e) => {
8394
+ }, mp = (e) => {
8387
8395
  if (!e || !e.children) return;
8388
8396
  let t = e.delta;
8389
8397
  if (t._t !== "a") return;
@@ -8394,22 +8402,22 @@ var fp = (e, t, n) => {
8394
8402
  let a = r.newName;
8395
8403
  if (a === void 0) {
8396
8404
  if (r.childName === void 0) throw Error("child.childName is undefined");
8397
- a = fp(n, r.childName, r.result);
8405
+ a = pp(n, r.childName, r.result);
8398
8406
  }
8399
8407
  i[a] !== r.result && (i[a] = r.result);
8400
8408
  }
8401
8409
  e.setResult(i).exit();
8402
8410
  };
8403
- pp.filterName = "arraysCollectChildren";
8411
+ mp.filterName = "arraysCollectChildren";
8404
8412
  //#endregion
8405
8413
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
8406
- var mp = function(e) {
8414
+ var hp = function(e) {
8407
8415
  e.left instanceof Date ? (e.right instanceof Date && e.left.getTime() === e.right.getTime() ? e.setResult(void 0) : e.setResult([e.left, e.right]), e.exit()) : e.right instanceof Date && e.setResult([e.left, e.right]).exit();
8408
8416
  };
8409
- mp.filterName = "dates";
8417
+ hp.filterName = "dates";
8410
8418
  //#endregion
8411
8419
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
8412
- var hp = new Set(["__proto__"]), gp = (e) => {
8420
+ var gp = new Set(["__proto__"]), _p = (e) => {
8413
8421
  if (!e || !e.children) return;
8414
8422
  let t = e.children.length, n = e.result;
8415
8423
  for (let r = 0; r < t; r++) {
@@ -8421,18 +8429,18 @@ var hp = new Set(["__proto__"]), gp = (e) => {
8421
8429
  }
8422
8430
  n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
8423
8431
  };
8424
- gp.filterName = "collectChildren";
8425
- var _p = (e) => {
8432
+ _p.filterName = "collectChildren";
8433
+ var vp = (e) => {
8426
8434
  var t;
8427
8435
  if (e.leftIsArray || e.leftType !== "object") return;
8428
8436
  let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
8429
8437
  for (let t in n) {
8430
8438
  if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
8431
- let a = new Yf(n[t], r[t]);
8439
+ let a = new Xf(n[t], r[t]);
8432
8440
  e.push(a, t);
8433
8441
  }
8434
8442
  for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
8435
- let n = new Yf(void 0, r[t]);
8443
+ let n = new Xf(void 0, r[t]);
8436
8444
  e.push(n, t);
8437
8445
  }
8438
8446
  if (!e.children || e.children.length === 0) {
@@ -8441,15 +8449,15 @@ var _p = (e) => {
8441
8449
  }
8442
8450
  e.exit();
8443
8451
  };
8444
- _p.filterName = "objects";
8445
- var vp = function(e) {
8452
+ vp.filterName = "objects";
8453
+ var yp = function(e) {
8446
8454
  if (!e.nested) return;
8447
8455
  let t = e.delta;
8448
8456
  if (t._t) return;
8449
8457
  let n = t, r = !1;
8450
8458
  for (let t in n) {
8451
- if (hp.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
8452
- let i = e.left, a = new Xf(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
8459
+ if (gp.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
8460
+ let i = e.left, a = new Zf(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
8453
8461
  e.push(a, t), r = !0;
8454
8462
  }
8455
8463
  if (!r) {
@@ -8458,8 +8466,8 @@ var vp = function(e) {
8458
8466
  }
8459
8467
  e.exit();
8460
8468
  };
8461
- vp.filterName = "objects";
8462
- var yp = function(e) {
8469
+ yp.filterName = "objects";
8470
+ var bp = function(e) {
8463
8471
  if (!e || !e.children || e.delta._t) return;
8464
8472
  if (e.left === null || typeof e.left != "object") {
8465
8473
  e.setResult(e.left).exit();
@@ -8470,17 +8478,17 @@ var yp = function(e) {
8470
8478
  let n = e.children[r];
8471
8479
  if (n === void 0) continue;
8472
8480
  let i = n.childName;
8473
- hp.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
8481
+ gp.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
8474
8482
  }
8475
8483
  e.setResult(t).exit();
8476
8484
  };
8477
- yp.filterName = "collectChildren";
8478
- var bp = function(e) {
8485
+ bp.filterName = "collectChildren";
8486
+ var xp = function(e) {
8479
8487
  if (!e.nested || e.delta._t) return;
8480
8488
  let t = e.delta, n = !1;
8481
8489
  for (let r in t) {
8482
- if (hp.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
8483
- let i = new Zf(t[r]);
8490
+ if (gp.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
8491
+ let i = new Qf(t[r]);
8484
8492
  e.push(i, r), n = !0;
8485
8493
  }
8486
8494
  if (!n) {
@@ -8489,25 +8497,25 @@ var bp = function(e) {
8489
8497
  }
8490
8498
  e.exit();
8491
8499
  };
8492
- bp.filterName = "objects";
8493
- var xp = (e) => {
8500
+ xp.filterName = "objects";
8501
+ var Sp = (e) => {
8494
8502
  if (!e || !e.children || e.delta._t) return;
8495
8503
  let t = e.children.length, n = {};
8496
8504
  for (let r = 0; r < t; r++) {
8497
8505
  let t = e.children[r];
8498
8506
  if (t === void 0) continue;
8499
8507
  let i = t.childName;
8500
- hp.has(i) || n[i] !== t.result && (n[i] = t.result);
8508
+ gp.has(i) || n[i] !== t.result && (n[i] = t.result);
8501
8509
  }
8502
8510
  e.setResult(n).exit();
8503
8511
  };
8504
- xp.filterName = "collectChildren";
8512
+ Sp.filterName = "collectChildren";
8505
8513
  //#endregion
8506
8514
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
8507
- var Sp = 2, Cp = 60, wp = null;
8508
- function Tp(e, t) {
8515
+ var Cp = 2, wp = 60, Tp = null;
8516
+ function Ep(e, t) {
8509
8517
  var n;
8510
- if (!wp) {
8518
+ if (!Tp) {
8511
8519
  let r;
8512
8520
  if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
8513
8521
  else {
@@ -8515,7 +8523,7 @@ function Tp(e, t) {
8515
8523
  let e = /* @__PURE__ */ Error("The diff-match-patch library was not provided. Pass the library in through the options or use the `jsondiffpatch/with-text-diffs` entry-point.");
8516
8524
  throw e.diff_match_patch_not_found = !0, e;
8517
8525
  }
8518
- wp = {
8526
+ Tp = {
8519
8527
  diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
8520
8528
  patch: (e, t) => {
8521
8529
  let n = r.patch_apply(r.patch_fromText(t), e);
@@ -8527,17 +8535,17 @@ function Tp(e, t) {
8527
8535
  }
8528
8536
  };
8529
8537
  }
8530
- return wp;
8538
+ return Tp;
8531
8539
  }
8532
- var Ep = function(e) {
8540
+ var Dp = function(e) {
8533
8541
  var t, n;
8534
8542
  if (e.leftType !== "string") return;
8535
- let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || Cp;
8543
+ let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || wp;
8536
8544
  if (r.length < a || i.length < a) {
8537
8545
  e.setResult([r, i]).exit();
8538
8546
  return;
8539
8547
  }
8540
- let o = Tp(e.options);
8548
+ let o = Ep(e.options);
8541
8549
  if (!o) {
8542
8550
  e.setResult([r, i]).exit();
8543
8551
  return;
@@ -8546,19 +8554,19 @@ var Ep = function(e) {
8546
8554
  e.setResult([
8547
8555
  s(r, i),
8548
8556
  0,
8549
- Sp
8557
+ Cp
8550
8558
  ]).exit();
8551
8559
  };
8552
- Ep.filterName = "texts";
8553
- var Dp = function(e) {
8560
+ Dp.filterName = "texts";
8561
+ var Op = function(e) {
8554
8562
  if (e.nested) return;
8555
8563
  let t = e.delta;
8556
- if (t[2] !== Sp) return;
8557
- let n = t, r = Tp(e.options, !0).patch;
8564
+ if (t[2] !== Cp) return;
8565
+ let n = t, r = Ep(e.options, !0).patch;
8558
8566
  e.setResult(r(e.left, n[0])).exit();
8559
8567
  };
8560
- Dp.filterName = "texts";
8561
- var Op = (e) => {
8568
+ Op.filterName = "texts";
8569
+ var kp = (e) => {
8562
8570
  var t, n, r;
8563
8571
  let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
8564
8572
  for (let e = 0; e < a.length; e++) {
@@ -8579,21 +8587,21 @@ var Op = (e) => {
8579
8587
  } else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
8580
8588
  }
8581
8589
  return a.join("\n");
8582
- }, kp = function(e) {
8590
+ }, Ap = function(e) {
8583
8591
  if (e.nested) return;
8584
8592
  let t = e.delta;
8585
- if (t[2] !== Sp) return;
8593
+ if (t[2] !== Cp) return;
8586
8594
  let n = t;
8587
8595
  e.setResult([
8588
- Op(n[0]),
8596
+ kp(n[0]),
8589
8597
  0,
8590
- Sp
8598
+ Cp
8591
8599
  ]).exit();
8592
8600
  };
8593
- kp.filterName = "texts";
8601
+ Ap.filterName = "texts";
8594
8602
  //#endregion
8595
8603
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
8596
- var Ap = function(e) {
8604
+ var jp = function(e) {
8597
8605
  if (e.left === e.right) {
8598
8606
  e.setResult(void 0).exit();
8599
8607
  return;
@@ -8626,8 +8634,8 @@ var Ap = function(e) {
8626
8634
  }
8627
8635
  e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
8628
8636
  };
8629
- Ap.filterName = "trivial";
8630
- var jp = function(e) {
8637
+ jp.filterName = "trivial";
8638
+ var Mp = function(e) {
8631
8639
  if (e.delta === void 0) {
8632
8640
  e.setResult(e.left).exit();
8633
8641
  return;
@@ -8651,8 +8659,8 @@ var jp = function(e) {
8651
8659
  }
8652
8660
  t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
8653
8661
  };
8654
- jp.filterName = "trivial";
8655
- var Mp = function(e) {
8662
+ Mp.filterName = "trivial";
8663
+ var Np = function(e) {
8656
8664
  if (e.delta === void 0) {
8657
8665
  e.setResult(e.delta).exit();
8658
8666
  return;
@@ -8673,36 +8681,36 @@ var Mp = function(e) {
8673
8681
  }
8674
8682
  t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
8675
8683
  };
8676
- Mp.filterName = "trivial";
8684
+ Np.filterName = "trivial";
8677
8685
  //#endregion
8678
8686
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
8679
- var Np = class {
8687
+ var Pp = class {
8680
8688
  constructor(e) {
8681
- this.processor = new $f(e), this.processor.pipe(new Qf("diff").append(gp, Ap, mp, Ep, _p, sp).shouldHaveResult()), this.processor.pipe(new Qf("patch").append(yp, up, jp, Dp, vp, lp).shouldHaveResult()), this.processor.pipe(new Qf("reverse").append(xp, pp, Mp, kp, bp, dp).shouldHaveResult());
8689
+ this.processor = new ep(e), this.processor.pipe(new $f("diff").append(_p, jp, hp, Dp, vp, cp).shouldHaveResult()), this.processor.pipe(new $f("patch").append(bp, dp, Mp, Op, yp, up).shouldHaveResult()), this.processor.pipe(new $f("reverse").append(Sp, mp, Np, Ap, xp, fp).shouldHaveResult());
8682
8690
  }
8683
8691
  options(e) {
8684
8692
  return this.processor.options(e);
8685
8693
  }
8686
8694
  diff(e, t) {
8687
- return this.processor.process(new Yf(e, t));
8695
+ return this.processor.process(new Xf(e, t));
8688
8696
  }
8689
8697
  patch(e, t) {
8690
- return this.processor.process(new Xf(e, t));
8698
+ return this.processor.process(new Zf(e, t));
8691
8699
  }
8692
8700
  reverse(e) {
8693
- return this.processor.process(new Zf(e));
8701
+ return this.processor.process(new Qf(e));
8694
8702
  }
8695
8703
  unpatch(e, t) {
8696
8704
  return this.patch(e, this.reverse(t));
8697
8705
  }
8698
8706
  clone(e) {
8699
- return Gf(e);
8707
+ return Kf(e);
8700
8708
  }
8701
8709
  };
8702
8710
  //#endregion
8703
8711
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
8704
- function Pp(e) {
8705
- return new Np(e);
8712
+ function Fp(e) {
8713
+ return new Pp(e);
8706
8714
  }
8707
8715
  //#endregion
8708
8716
  //#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
@@ -9275,46 +9283,46 @@ $.Diff = function(e, t) {
9275
9283
  };
9276
9284
  //#endregion
9277
9285
  //#region src/components/audit-log/create-diff-patcher.tsx
9278
- var Fp = (e = {}) => Pp({
9286
+ var Ip = (e = {}) => Fp({
9279
9287
  ...e,
9280
9288
  textDiff: {
9281
9289
  diffMatchPatch: $,
9282
9290
  minLength: 120
9283
9291
  },
9284
9292
  cloneDiffValues: !0
9285
- }), Ip = ["user", "unittemplate"], Lp = Fp(), Rp = (e, t, n) => {
9293
+ }), Lp = ["user", "unittemplate"], Rp = Ip(), zp = (e, t, n) => {
9286
9294
  let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
9287
9295
  for (let e = t.length - 1; e >= 0; e--) {
9288
9296
  let n = r[t[e]];
9289
9297
  if (n) return n;
9290
9298
  }
9291
9299
  return n || "";
9292
- }, zp = (e) => {
9300
+ }, Bp = (e) => {
9293
9301
  let t = (e) => er(e) ? fr(e) : String(e);
9294
9302
  return Array.isArray(e) ? e.length === 0 ? "" : e.some((e) => e && typeof e == "object") ? "Multiple changes..." : e.map(t).join(", ") : e && typeof e == "object" ? Object.keys(e).length === 0 ? "" : "Multiple changes..." : t(e);
9295
- }, Bp = (e) => {
9303
+ }, Vp = (e) => {
9296
9304
  switch (e.length) {
9297
9305
  case 1: {
9298
9306
  let [t] = e;
9299
9307
  return {
9300
9308
  type: "created",
9301
9309
  before: "",
9302
- after: zp(t)
9310
+ after: Bp(t)
9303
9311
  };
9304
9312
  }
9305
9313
  case 2: {
9306
9314
  let [t, n] = e;
9307
9315
  return {
9308
9316
  type: "modified",
9309
- before: zp(t),
9310
- after: zp(n)
9317
+ before: Bp(t),
9318
+ after: Bp(n)
9311
9319
  };
9312
9320
  }
9313
9321
  case 3: {
9314
9322
  let [t] = e;
9315
9323
  return {
9316
9324
  type: "deleted",
9317
- before: zp(t),
9325
+ before: Bp(t),
9318
9326
  after: ""
9319
9327
  };
9320
9328
  }
@@ -9324,15 +9332,15 @@ var Fp = (e = {}) => Pp({
9324
9332
  after: ""
9325
9333
  };
9326
9334
  }
9327
- }, Vp = (e) => Array.isArray(e), Hp = (e, t) => t ? Vp(t) ? t.length === 0 ? e : t.reduce((e, t) => Lp.unpatch($t(e), $t(t)), $t(e)) : Lp.unpatch($t(e), $t(t)) : e, Up = (e) => e.createdAt || e.date, Wp = (e, t, n) => {
9328
- let r = Up(e);
9335
+ }, Hp = (e) => Array.isArray(e), Up = (e, t) => t ? Hp(t) ? t.length === 0 ? e : t.reduce((e, t) => Rp.unpatch($t(e), $t(t)), $t(e)) : Rp.unpatch($t(e), $t(t)) : e, Wp = (e) => e.createdAt || e.date, Gp = (e, t, n) => {
9336
+ let r = Wp(e);
9329
9337
  if (!r) return {
9330
9338
  oldJson: "",
9331
9339
  newJson: "",
9332
9340
  error: `Cannot create comparison view: missing date for audit log ${e.id}`
9333
9341
  };
9334
9342
  let i = t.filter((e) => {
9335
- let t = Up(e);
9343
+ let t = Wp(e);
9336
9344
  return !!(e.diffs && t && t >= r);
9337
9345
  }), a = Array.from({ length: i.length + 1 });
9338
9346
  a[0] = $t(n);
@@ -9345,7 +9353,7 @@ var Fp = (e = {}) => Pp({
9345
9353
  a[e + 1] = a[e];
9346
9354
  continue;
9347
9355
  }
9348
- a[e + 1] = Hp(a[e], t);
9356
+ a[e + 1] = Up(a[e], t);
9349
9357
  }
9350
9358
  let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
9351
9359
  o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
@@ -9360,10 +9368,10 @@ var Fp = (e = {}) => Pp({
9360
9368
  oldJson: o,
9361
9369
  newJson: s
9362
9370
  };
9363
- }, Gp = (e, t, n = {}, r = []) => {
9371
+ }, Kp = (e, t, n = {}, r = []) => {
9364
9372
  var i;
9365
9373
  if (!e) return;
9366
- let a = [...Ip, ...(i = n.hiddenKeys) == null ? [] : i];
9374
+ let a = [...Lp, ...(i = n.hiddenKeys) == null ? [] : i];
9367
9375
  Object.keys(e).forEach((i) => {
9368
9376
  var o;
9369
9377
  let s = e[i];
@@ -9376,12 +9384,12 @@ var Fp = (e = {}) => Pp({
9376
9384
  an(s) ? t.push({
9377
9385
  deltaFormat: [...s],
9378
9386
  path: c
9379
- }) : fn(s) && Gp(s, t, n, c);
9387
+ }) : fn(s) && Kp(s, t, n, c);
9380
9388
  });
9381
- }, Kp = (e, t = {}) => {
9389
+ }, qp = (e, t = {}) => {
9382
9390
  let n = [];
9383
- return e ? (Gp(e, n, t), n) : [];
9384
- }, qp = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Jp = (e) => {
9391
+ return e ? (Kp(e, n, t), n) : [];
9392
+ }, Jp = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Yp = (e) => {
9385
9393
  if (e == null || e === "") return "empty";
9386
9394
  if (typeof e == "boolean") return e ? "true" : "false";
9387
9395
  if (typeof e == "string") return e;
@@ -9392,32 +9400,32 @@ var Fp = (e = {}) => Pp({
9392
9400
  } catch {
9393
9401
  return String(e);
9394
9402
  }
9395
- }, Yp = (e, t = e.length - 1) => {
9403
+ }, Xp = (e, t = e.length - 1) => {
9396
9404
  if (t >= e.length) return "Value";
9397
9405
  let n = e[t];
9398
- return !n || Zn(n) ? Yp(e, t - 1) : qp(n);
9399
- }, Xp = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
9400
- let o = Jp(r), s = Jp(i), c = a ? ` in ${a}` : "";
9406
+ return !n || Zn(n) ? Xp(e, t - 1) : Jp(n);
9407
+ }, Zp = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
9408
+ let o = Yp(r), s = Yp(i), c = a ? ` in ${a}` : "";
9401
9409
  switch (t) {
9402
9410
  case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
9403
9411
  case "created": return `${e} created ${s}${c}.`;
9404
9412
  case "deleted": return `${e} deleted ${o}${c}.`;
9405
9413
  default: return `${e} changed ${n}${c}.`;
9406
9414
  }
9407
- }, Zp = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => /* @__PURE__ */ y(yl, { table: {
9415
+ }, Qp = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => /* @__PURE__ */ y(yl, { table: {
9408
9416
  headers: [{ cells: [{ value: "Changes" }] }],
9409
9417
  rows: n.map((n) => {
9410
- let { deltaFormat: i, path: a } = n, o = Rp(e, a, r), { type: s, before: c, after: l } = Bp(i);
9411
- return { cells: [{ value: Xp({
9418
+ let { deltaFormat: i, path: a } = n, o = zp(e, a, r), { type: s, before: c, after: l } = Vp(i);
9419
+ return { cells: [{ value: Zp({
9412
9420
  userName: t,
9413
9421
  type: s,
9414
- property: Yp(a),
9422
+ property: Xp(a),
9415
9423
  before: c,
9416
9424
  after: l,
9417
9425
  sectionName: o
9418
9426
  }) }] };
9419
9427
  })
9420
- } }), Qp = Object.freeze({
9428
+ } }), $p = Object.freeze({
9421
9429
  summary: {
9422
9430
  label: "Summary",
9423
9431
  value: "summary"
@@ -9426,13 +9434,13 @@ var Fp = (e = {}) => Pp({
9426
9434
  label: "Compare",
9427
9435
  value: "compare"
9428
9436
  }
9429
- }), $p = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
9430
- let c = [Qp.summary, Qp.compare].map(({ label: e, value: t }) => ({
9437
+ }), em = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
9438
+ let c = [$p.summary, $p.compare].map(({ label: e, value: t }) => ({
9431
9439
  label: e,
9432
9440
  value: t
9433
9441
  })), [l, u] = h(c[0]), { diffs: d = void 0 } = e || {};
9434
9442
  if (!d) return null;
9435
- let { oldJson: f, newJson: p, error: m } = Wp(e, t, n);
9443
+ let { oldJson: f, newJson: p, error: m } = Gp(e, t, n);
9436
9444
  return /* @__PURE__ */ y(Jo, {
9437
9445
  visible: r,
9438
9446
  centered: !0,
@@ -9444,15 +9452,15 @@ var Fp = (e = {}) => Pp({
9444
9452
  onChange: (e) => u(c.find((t) => t.value === e.target.value)),
9445
9453
  options: c,
9446
9454
  value: l
9447
- }), l.value === "summary" ? /* @__PURE__ */ y(Zp, {
9455
+ }), l.value === "summary" ? /* @__PURE__ */ y(Qp, {
9448
9456
  userName: e.userName,
9449
9457
  sectionNames: a,
9450
- diffs: Kp(d, i),
9458
+ diffs: qp(d, i),
9451
9459
  defaultSectionName: o
9452
9460
  }) : m ? /* @__PURE__ */ y("div", {
9453
9461
  style: { padding: 16 },
9454
9462
  children: m
9455
- }) : /* @__PURE__ */ y(Hf, {
9463
+ }) : /* @__PURE__ */ y(Uf, {
9456
9464
  oldJson: f,
9457
9465
  newJson: p
9458
9466
  })] }),
@@ -9465,7 +9473,7 @@ var Fp = (e = {}) => Pp({
9465
9473
  height: "90vh"
9466
9474
  } })
9467
9475
  });
9468
- }, em = [
9476
+ }, tm = [
9469
9477
  {
9470
9478
  label: "10 / page",
9471
9479
  value: 10
@@ -9478,8 +9486,8 @@ var Fp = (e = {}) => Pp({
9478
9486
  label: "50 / page",
9479
9487
  value: 50
9480
9488
  }
9481
- ], tm = (e, t = {}) => {
9482
- let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Kp(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
9489
+ ], nm = (e, t = {}) => {
9490
+ let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = qp(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
9483
9491
  if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
9484
9492
  switch (a) {
9485
9493
  case "Created": return `Created by ${r}`;
@@ -9489,7 +9497,7 @@ var Fp = (e = {}) => Pp({
9489
9497
  case "Updated": return `Updated by ${r} (${c})`;
9490
9498
  default: return `Change by ${r}`;
9491
9499
  }
9492
- }, nm = ({ logs: e, data: t, total: n, loading: r, selectedPage: i, rowsPerPage: a, sectionNames: o, defaultSectionName: s, filterToggles: c = [], transformDiffsConfig: l, onChangeRowsPerPage: u, onSelectPage: d, onClickSnapshot: f, snapshotLoading: p, getActions: m, isLogDisabled: g }) => {
9500
+ }, rm = ({ logs: e, data: t, total: n, loading: r, selectedPage: i, rowsPerPage: a, sectionNames: o, defaultSectionName: s, filterToggles: c = [], transformDiffsConfig: l, onChangeRowsPerPage: u, onSelectPage: d, onClickSnapshot: f, snapshotLoading: p, getActions: m, isLogDisabled: g }) => {
9493
9501
  let [_, x] = h(!1), [S, C] = h(null), w = (e) => {
9494
9502
  if (e.snapshot) {
9495
9503
  f == null || f(e.snapshot, e);
@@ -9508,7 +9516,7 @@ var Fp = (e = {}) => Pp({
9508
9516
  return {
9509
9517
  cells: [
9510
9518
  {
9511
- value: e.snapshot ? `Snapshot: ${e.snapshot}` : tm(e, l),
9519
+ value: e.snapshot ? `Snapshot: ${e.snapshot}` : nm(e, l),
9512
9520
  type: "Link",
9513
9521
  disabled: n,
9514
9522
  onClick: n ? void 0 : () => w(e),
@@ -9527,8 +9535,8 @@ var Fp = (e = {}) => Pp({
9527
9535
  type: "Static"
9528
9536
  },
9529
9537
  {
9530
- value: Uf({
9531
- date: Up(e),
9538
+ value: Wf({
9539
+ date: Wp(e),
9532
9540
  showTime: !0
9533
9541
  }),
9534
9542
  type: "Static"
@@ -9571,14 +9579,14 @@ var Fp = (e = {}) => Pp({
9571
9579
  onChange: (e) => {
9572
9580
  u(Number(e.target.value));
9573
9581
  },
9574
- options: em,
9582
+ options: tm,
9575
9583
  value: a
9576
9584
  },
9577
9585
  onSelectPage: (e) => d(e),
9578
9586
  small: !0
9579
9587
  } }
9580
9588
  } })
9581
- }), _ && S && S.diffs && /* @__PURE__ */ y($p, {
9589
+ }), _ && S && S.diffs && /* @__PURE__ */ y(em, {
9582
9590
  sectionNames: o,
9583
9591
  isOpen: _,
9584
9592
  onClose: () => x(!1),
@@ -9588,7 +9596,7 @@ var Fp = (e = {}) => Pp({
9588
9596
  data: t,
9589
9597
  transformDiffsConfig: l
9590
9598
  })] });
9591
- }, rm = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
9599
+ }, im = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
9592
9600
  let i = window.location.href, a = m(i);
9593
9601
  return l(() => {
9594
9602
  a.current = i;
@@ -9611,10 +9619,10 @@ var Fp = (e = {}) => Pp({
9611
9619
  });
9612
9620
  };
9613
9621
  }, [e, t]), null;
9614
- }, im = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, am = (e) => {
9615
- Mf(Df.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
9616
- e === Df.Translations ? Mf(e, kf(t)) : Mf(e, im(t) ? t : { ...t });
9622
+ }, am = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, om = (e) => {
9623
+ Nf(Of.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
9624
+ e === Of.Translations ? Nf(e, Af(t)) : Nf(e, am(t) ? t : { ...t });
9617
9625
  });
9618
9626
  };
9619
9627
  //#endregion
9620
- export { Ei as Accordion, Yi as AccordionWithDefaultToggle, Ma as Actions, ii as Align, nm as AuditLog, va as Badge, Ia as Breadcrumb, Pa as BreadcrumbLinkType, K as Button, Ra as ButtonGroup, ai as ButtonPosition, $i as ButtonType, Ba as Card, Gi as CheckBox, bi as Chevron, Ci as Collapse, ri as Color, co as ColorInput, so as ColorInputPopover, mo as Column, Eo as Dialog, Hf as DiffViewer, U as DisabledContext, yo as Divider, No as Drawer, rf as ElementType, Al as Empty, Mu as Field, Ou as FileButton, Uo as FileInput, Nu as Flex, Fu as FormRow, qa as Grid, V as GroupOrder, Co as Heading, Wi as HelpIcon, W as Icon, H as IconType, Ro as Input, Io as InputGroup, Ac as InputGroupAddon, Bo as InputReaderMethods, ci as InputType, Au as Label, Ju as List, Lu as ListHeading, Uu as ListSubheading, Xu as Loader, Aa as Menu, oa as MenuCarat, aa as MenuType, ms as Message, cs as MessageType, Jo as Modal, bs as NativeSelect, Uc as NumberInput, rd as OptionDropdown, ad as Page, jc as Pagination, uf as PopConfirm, Ua as Popover, od as Portal, cd as PrintHeader, Zo as ProgressBar, ld as RadioButton, md as RichTextInput, gd as Row, wc as Select, Rf as SettingField, xd as SideBar, Cd as Skeleton, $c as Slider, ns as SmartUploadModal, Wo as Spacer, Qi as Spinner, yl as Table, Du as TableImportExport, Xd as Tabs, _o as Text, $d as TextArea, Zd as TextLink, oi as TextTransform, si as Theme, Fr as Toaster, du as Toggle, G as Tooltip, sf as TopBar, mf as Tree, Ef as TreeTable, ni as TriggerType, Ud as UnitInput, qd as UnitSlider, If as UnitTable, rm as UsageTracker, cu as dismissToast, Bd as initializeContext, am as initializeGuiLibrary, Vo as readFile, su as toast, xs as useFocus, Go as useKeyboardEvent, ws as useWindowWidth };
9628
+ export { Ei as Accordion, Yi as AccordionWithDefaultToggle, Ma as Actions, ii as Align, rm as AuditLog, va as Badge, Ia as Breadcrumb, Pa as BreadcrumbLinkType, K as Button, Ra as ButtonGroup, ai as ButtonPosition, $i as ButtonType, Ba as Card, Gi as CheckBox, bi as Chevron, Ci as Collapse, ri as Color, co as ColorInput, so as ColorInputPopover, mo as Column, Eo as Dialog, Uf as DiffViewer, U as DisabledContext, yo as Divider, No as Drawer, rf as ElementType, Al as Empty, Mu as Field, Ou as FileButton, Uo as FileInput, Nu as Flex, Fu as FormRow, qa as Grid, V as GroupOrder, Co as Heading, Wi as HelpIcon, W as Icon, H as IconType, Ro as Input, Io as InputGroup, Ac as InputGroupAddon, Bo as InputReaderMethods, ci as InputType, Au as Label, Ju as List, Lu as ListHeading, Uu as ListSubheading, Xu as Loader, Aa as Menu, oa as MenuCarat, aa as MenuType, ms as Message, cs as MessageType, Jo as Modal, bs as NativeSelect, Uc as NumberInput, rd as OptionDropdown, ad as Page, jc as Pagination, uf as PopConfirm, Ua as Popover, od as Portal, cd as PrintHeader, Zo as ProgressBar, ld as RadioButton, md as RichTextInput, gd as Row, wc as Select, zf as SettingField, xd as SideBar, Cd as Skeleton, $c as Slider, ns as SmartUploadModal, Wo as Spacer, Qi as Spinner, yl as Table, Du as TableImportExport, Xd as Tabs, _o as Text, $d as TextArea, Zd as TextLink, oi as TextTransform, si as Theme, Fr as Toaster, du as Toggle, G as Tooltip, sf as TopBar, mf as Tree, Ef as TreeTable, ni as TriggerType, Ud as UnitInput, qd as UnitSlider, Lf as UnitTable, im as UsageTracker, cu as dismissToast, Bd as initializeContext, om as initializeGuiLibrary, Vo as readFile, su as toast, xs as useFocus, Go as useKeyboardEvent, ws as useWindowWidth };