treege 0.6.1 → 0.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,4 @@
1
1
  # [Versions](https://github.com/Tracktor/treege/releases)
2
2
 
3
- ## v0.6.1
3
+ ## v0.6.2
4
4
  - Upgrade design system
5
- - Update `test` script
package/dist/main.js CHANGED
@@ -9881,7 +9881,7 @@ function ml(e, t, n, r) {
9881
9881
  const i = r.light || r, o = r.dark || r * 1.5;
9882
9882
  e[t] || (e.hasOwnProperty(n) ? e[t] = e[n] : t === "light" ? e.light = Yb(e.main, i) : t === "dark" && (e.dark = Ub(e.main, o)));
9883
9883
  }
9884
- function ex(e = "light") {
9884
+ function e2(e = "light") {
9885
9885
  return e === "dark" ? {
9886
9886
  main: yn[200],
9887
9887
  light: yn[50],
@@ -9892,7 +9892,7 @@ function ex(e = "light") {
9892
9892
  dark: yn[800]
9893
9893
  };
9894
9894
  }
9895
- function tx(e = "light") {
9895
+ function t2(e = "light") {
9896
9896
  return e === "dark" ? {
9897
9897
  main: gn[200],
9898
9898
  light: gn[50],
@@ -9903,7 +9903,7 @@ function tx(e = "light") {
9903
9903
  dark: gn[700]
9904
9904
  };
9905
9905
  }
9906
- function nx(e = "light") {
9906
+ function n2(e = "light") {
9907
9907
  return e === "dark" ? {
9908
9908
  main: mn[500],
9909
9909
  light: mn[300],
@@ -9914,7 +9914,7 @@ function nx(e = "light") {
9914
9914
  dark: mn[800]
9915
9915
  };
9916
9916
  }
9917
- function rx(e = "light") {
9917
+ function r2(e = "light") {
9918
9918
  return e === "dark" ? {
9919
9919
  main: vn[400],
9920
9920
  light: vn[300],
@@ -9925,7 +9925,7 @@ function rx(e = "light") {
9925
9925
  dark: vn[900]
9926
9926
  };
9927
9927
  }
9928
- function ix(e = "light") {
9928
+ function i2(e = "light") {
9929
9929
  return e === "dark" ? {
9930
9930
  main: _n[400],
9931
9931
  light: _n[300],
@@ -9936,7 +9936,7 @@ function ix(e = "light") {
9936
9936
  dark: _n[900]
9937
9937
  };
9938
9938
  }
9939
- function ox(e = "light") {
9939
+ function o2(e = "light") {
9940
9940
  return e === "dark" ? {
9941
9941
  main: Jn[400],
9942
9942
  light: Jn[300],
@@ -9947,12 +9947,12 @@ function ox(e = "light") {
9947
9947
  dark: Jn[900]
9948
9948
  };
9949
9949
  }
9950
- function ax(e) {
9950
+ function a2(e) {
9951
9951
  const {
9952
9952
  mode: t = "light",
9953
9953
  contrastThreshold: n = 3,
9954
9954
  tonalOffset: r = 0.2
9955
- } = e, i = wr(e, Zb), o = e.primary || ex(t), a = e.secondary || tx(t), s = e.error || nx(t), u = e.info || rx(t), l = e.success || ix(t), c = e.warning || ox(t);
9955
+ } = e, i = wr(e, Zb), o = e.primary || e2(t), a = e.secondary || t2(t), s = e.error || n2(t), u = e.info || r2(t), l = e.success || i2(t), c = e.warning || o2(t);
9956
9956
  function d(p) {
9957
9957
  const g = pl(p, Vo.text.primary) >= n ? Vo.text.primary : gl.text.primary;
9958
9958
  if (process.env.NODE_ENV !== "production") {
@@ -10029,14 +10029,14 @@ const theme2 = createTheme({ palette: {
10029
10029
  tonalOffset: r
10030
10030
  }, h[t]), i);
10031
10031
  }
10032
- const sx = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
10033
- function ux(e) {
10032
+ const s2 = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
10033
+ function u2(e) {
10034
10034
  return Math.round(e * 1e5) / 1e5;
10035
10035
  }
10036
10036
  const yl = {
10037
10037
  textTransform: "uppercase"
10038
10038
  }, vl = '"Roboto", "Helvetica", "Arial", sans-serif';
10039
- function lx(e, t) {
10039
+ function l2(e, t) {
10040
10040
  const n = typeof t == "function" ? t(e) : t, {
10041
10041
  fontFamily: r = vl,
10042
10042
  fontSize: i = 14,
@@ -10047,7 +10047,7 @@ function lx(e, t) {
10047
10047
  htmlFontSize: l = 16,
10048
10048
  allVariants: c,
10049
10049
  pxToRem: d
10050
- } = n, f = wr(n, sx);
10050
+ } = n, f = wr(n, s2);
10051
10051
  process.env.NODE_ENV !== "production" && (typeof i != "number" && console.error("MUI: `fontSize` is required to be a number."), typeof l != "number" && console.error("MUI: `htmlFontSize` is required to be a number."));
10052
10052
  const h = i / 14, y = d || ((x) => `${x / l * h}rem`), p = (x, w, T, b, v) => Ke({
10053
10053
  fontFamily: r,
@@ -10055,7 +10055,7 @@ function lx(e, t) {
10055
10055
  fontSize: y(w),
10056
10056
  lineHeight: T
10057
10057
  }, r === vl ? {
10058
- letterSpacing: `${ux(b / w)}em`
10058
+ letterSpacing: `${u2(b / w)}em`
10059
10059
  } : {}, v, c), g = {
10060
10060
  h1: p(o, 96, 1.167, -1.5),
10061
10061
  h2: p(o, 60, 1.2, -0.5),
@@ -10084,16 +10084,16 @@ function lx(e, t) {
10084
10084
  clone: !1
10085
10085
  });
10086
10086
  }
10087
- const cx = 0.2, fx = 0.14, dx = 0.12;
10087
+ const c2 = 0.2, f2 = 0.14, d2 = 0.12;
10088
10088
  function Me(...e) {
10089
- return [`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${cx})`, `${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${fx})`, `${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${dx})`].join(",");
10089
+ return [`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${c2})`, `${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${f2})`, `${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${d2})`].join(",");
10090
10090
  }
10091
- const hx = ["none", Me(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), Me(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), Me(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), Me(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), Me(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), Me(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), Me(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), Me(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), Me(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), Me(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), Me(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), Me(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), Me(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), Me(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), Me(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), Me(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), Me(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), Me(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), Me(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), Me(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), Me(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), Me(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), Me(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), Me(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)], px = hx, gx = ["duration", "easing", "delay"], mx = {
10091
+ const h2 = ["none", Me(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), Me(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), Me(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), Me(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), Me(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), Me(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), Me(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), Me(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), Me(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), Me(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), Me(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), Me(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), Me(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), Me(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), Me(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), Me(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), Me(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), Me(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), Me(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), Me(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), Me(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), Me(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), Me(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), Me(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)], p2 = h2, g2 = ["duration", "easing", "delay"], m2 = {
10092
10092
  easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)",
10093
10093
  easeOut: "cubic-bezier(0.0, 0, 0.2, 1)",
10094
10094
  easeIn: "cubic-bezier(0.4, 0, 1, 1)",
10095
10095
  sharp: "cubic-bezier(0.4, 0, 0.6, 1)"
10096
- }, yx = {
10096
+ }, y2 = {
10097
10097
  shortest: 150,
10098
10098
  shorter: 200,
10099
10099
  short: 250,
@@ -10105,22 +10105,22 @@ const hx = ["none", Me(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), Me(0, 3, 1, -2, 0,
10105
10105
  function _l(e) {
10106
10106
  return `${Math.round(e)}ms`;
10107
10107
  }
10108
- function vx(e) {
10108
+ function v2(e) {
10109
10109
  if (!e)
10110
10110
  return 0;
10111
10111
  const t = e / 36;
10112
10112
  return Math.round((4 + 15 * t ** 0.25 + t / 5) * 10);
10113
10113
  }
10114
- function _x(e) {
10115
- const t = Ke({}, mx, e.easing), n = Ke({}, yx, e.duration);
10114
+ function _2(e) {
10115
+ const t = Ke({}, m2, e.easing), n = Ke({}, y2, e.duration);
10116
10116
  return Ke({
10117
- getAutoHeightDuration: vx,
10117
+ getAutoHeightDuration: v2,
10118
10118
  create: (i = ["all"], o = {}) => {
10119
10119
  const {
10120
10120
  duration: a = n.standard,
10121
10121
  easing: s = t.easeInOut,
10122
10122
  delay: u = 0
10123
- } = o, l = wr(o, gx);
10123
+ } = o, l = wr(o, g2);
10124
10124
  if (process.env.NODE_ENV !== "production") {
10125
10125
  const c = (f) => typeof f == "string", d = (f) => !isNaN(parseFloat(f));
10126
10126
  !c(i) && !Array.isArray(i) && console.error('MUI: Argument "props" must be a string or Array.'), !d(a) && !c(a) && console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`), c(s) || console.error('MUI: Argument "easing" must be a string.'), !d(u) && !c(u) && console.error('MUI: Argument "delay" must be a number or a string.'), Object.keys(l).length !== 0 && console.error(`MUI: Unrecognized argument(s) [${Object.keys(l).join(",")}].`);
@@ -10132,7 +10132,7 @@ function _x(e) {
10132
10132
  duration: n
10133
10133
  });
10134
10134
  }
10135
- const bx = {
10135
+ const b2 = {
10136
10136
  mobileStepper: 1e3,
10137
10137
  fab: 1050,
10138
10138
  speedDial: 1050,
@@ -10141,24 +10141,24 @@ const bx = {
10141
10141
  modal: 1300,
10142
10142
  snackbar: 1400,
10143
10143
  tooltip: 1500
10144
- }, xx = bx, Mx = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
10145
- function wx(e = {}, ...t) {
10144
+ }, x2 = b2, M2 = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
10145
+ function w2(e = {}, ...t) {
10146
10146
  const {
10147
10147
  mixins: n = {},
10148
10148
  palette: r = {},
10149
10149
  transitions: i = {},
10150
10150
  typography: o = {}
10151
- } = e, a = wr(e, Mx);
10151
+ } = e, a = wr(e, M2);
10152
10152
  if (e.vars)
10153
10153
  throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name." : kn(18));
10154
- const s = ax(r), u = ps(e);
10154
+ const s = a2(r), u = ps(e);
10155
10155
  let l = Rt(u, {
10156
10156
  mixins: Vb(u.breakpoints, n),
10157
10157
  palette: s,
10158
- shadows: px.slice(),
10159
- typography: lx(s, o),
10160
- transitions: _x(i),
10161
- zIndex: Ke({}, xx)
10158
+ shadows: p2.slice(),
10159
+ typography: l2(s, o),
10160
+ transitions: _2(i),
10161
+ zIndex: Ke({}, x2)
10162
10162
  });
10163
10163
  if (l = Rt(l, a), l = t.reduce((c, d) => Rt(c, d), l), process.env.NODE_ENV !== "production") {
10164
10164
  const c = ["active", "checked", "completed", "disabled", "error", "expanded", "focused", "focusVisible", "required", "selected"], d = (f, h) => {
@@ -10191,8 +10191,8 @@ function wx(e = {}, ...t) {
10191
10191
  });
10192
10192
  }, l;
10193
10193
  }
10194
- const Tx = wx(), Bf = Tx;
10195
- function Nx({
10194
+ const T2 = w2(), Bf = T2;
10195
+ function N2({
10196
10196
  props: e,
10197
10197
  name: t
10198
10198
  }) {
@@ -10202,15 +10202,15 @@ function Nx({
10202
10202
  defaultTheme: Bf
10203
10203
  });
10204
10204
  }
10205
- const Ex = (e) => oi(e) && e !== "classes", Dx = jb({
10205
+ const E2 = (e) => oi(e) && e !== "classes", D2 = jb({
10206
10206
  defaultTheme: Bf,
10207
- rootShouldForwardProp: Ex
10208
- }), Ox = Dx;
10209
- function Sx(e) {
10207
+ rootShouldForwardProp: E2
10208
+ }), O2 = D2;
10209
+ function S2(e) {
10210
10210
  return ts("MuiSvgIcon", e);
10211
10211
  }
10212
10212
  vv("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
10213
- const Cx = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], Ax = (e) => {
10213
+ const C2 = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], A2 = (e) => {
10214
10214
  const {
10215
10215
  color: t,
10216
10216
  fontSize: n,
@@ -10218,8 +10218,8 @@ const Cx = ["children", "className", "color", "component", "fontSize", "htmlColo
10218
10218
  } = e, i = {
10219
10219
  root: ["root", t !== "inherit" && `color${St(t)}`, `fontSize${St(n)}`]
10220
10220
  };
10221
- return pv(i, Sx, r);
10222
- }, kx = Ox("svg", {
10221
+ return pv(i, S2, r);
10222
+ }, k2 = O2("svg", {
10223
10223
  name: "MuiSvgIcon",
10224
10224
  slot: "Root",
10225
10225
  overridesResolver: (e, t) => {
@@ -10256,7 +10256,7 @@ const Cx = ["children", "className", "color", "component", "fontSize", "htmlColo
10256
10256
  }[t.color]
10257
10257
  };
10258
10258
  }), ms = /* @__PURE__ */ be.forwardRef(function(t, n) {
10259
- const r = Nx({
10259
+ const r = N2({
10260
10260
  props: t,
10261
10261
  name: "MuiSvgIcon"
10262
10262
  }), {
@@ -10269,7 +10269,7 @@ const Cx = ["children", "className", "color", "component", "fontSize", "htmlColo
10269
10269
  inheritViewBox: c = !1,
10270
10270
  titleAccess: d,
10271
10271
  viewBox: f = "0 0 24 24"
10272
- } = r, h = wr(r, Cx), y = Ke({}, r, {
10272
+ } = r, h = wr(r, C2), y = Ke({}, r, {
10273
10273
  color: a,
10274
10274
  component: s,
10275
10275
  fontSize: u,
@@ -10278,8 +10278,8 @@ const Cx = ["children", "className", "color", "component", "fontSize", "htmlColo
10278
10278
  viewBox: f
10279
10279
  }), p = {};
10280
10280
  c || (p.viewBox = f);
10281
- const g = Ax(y);
10282
- return /* @__PURE__ */ oe(kx, Ke({
10281
+ const g = A2(y);
10282
+ return /* @__PURE__ */ oe(k2, Ke({
10283
10283
  as: s,
10284
10284
  className: _v(g.root, o),
10285
10285
  focusable: "false",
@@ -10310,7 +10310,7 @@ process.env.NODE_ENV !== "production" && (ms.propTypes = {
10310
10310
  });
10311
10311
  ms.muiName = "SvgIcon";
10312
10312
  const bl = ms;
10313
- function Ix(e, t) {
10313
+ function I2(e, t) {
10314
10314
  function n(r, i) {
10315
10315
  return /* @__PURE__ */ M(bl, Ke({
10316
10316
  "data-testid": `${t}Icon`,
@@ -10321,17 +10321,17 @@ function Ix(e, t) {
10321
10321
  }
10322
10322
  return process.env.NODE_ENV !== "production" && (n.displayName = `${t}Icon`), n.muiName = bl.muiName, /* @__PURE__ */ be.memo(/* @__PURE__ */ be.forwardRef(n));
10323
10323
  }
10324
- const zx = {
10324
+ const z2 = {
10325
10325
  configure: (e) => {
10326
10326
  process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
10327
10327
  `)), Tf.configure(e);
10328
10328
  }
10329
- }, Rx = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10329
+ }, R2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10330
10330
  __proto__: null,
10331
- unstable_ClassNameGenerator: zx,
10331
+ unstable_ClassNameGenerator: z2,
10332
10332
  capitalize: St,
10333
10333
  createChainedFunction: Gy,
10334
- createSvgIcon: Ix,
10334
+ createSvgIcon: I2,
10335
10335
  debounce: Ky,
10336
10336
  deprecatedPropType: Hy,
10337
10337
  isMuiElement: Xy,
@@ -10346,7 +10346,7 @@ const zx = {
10346
10346
  useEventCallback: ov,
10347
10347
  useForkRef: av,
10348
10348
  useIsFocusVisible: hv
10349
- }, Symbol.toStringTag, { value: "Module" })), jx = /* @__PURE__ */ Bt(Rx);
10349
+ }, Symbol.toStringTag, { value: "Module" })), j2 = /* @__PURE__ */ Bt(R2);
10350
10350
  var xl;
10351
10351
  function Le() {
10352
10352
  return xl || (xl = 1, function(e) {
@@ -10358,34 +10358,34 @@ function Le() {
10358
10358
  return t.createSvgIcon;
10359
10359
  }
10360
10360
  });
10361
- var t = jx;
10361
+ var t = j2;
10362
10362
  }(Fo)), Fo;
10363
10363
  }
10364
10364
  const Pe = /* @__PURE__ */ Bt(qd);
10365
- var $x = Ce.exports;
10365
+ var $2 = Ce.exports;
10366
10366
  Object.defineProperty(es, "__esModule", {
10367
10367
  value: !0
10368
10368
  });
10369
- var Gf = es.default = void 0, Lx = $x(Le()), Px = Pe, Fx = (0, Lx.default)(/* @__PURE__ */ (0, Px.jsx)("path", {
10369
+ var Gf = es.default = void 0, L2 = $2(Le()), P2 = Pe, F2 = (0, L2.default)(/* @__PURE__ */ (0, P2.jsx)("path", {
10370
10370
  d: "m20.41 6.41-2.83-2.83c-.37-.37-.88-.58-1.41-.58H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h7.4l8.6-8.6V7.83c0-.53-.21-1.04-.59-1.42zM12 18c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-9c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h7c.55 0 1 .45 1 1v2zm4.99 7.25 1.77 1.77-4.84 4.84c-.1.09-.23.14-.36.14H15.5c-.28 0-.5-.22-.5-.5v-1.06c0-.13.05-.26.15-.35l4.84-4.84zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71z"
10371
10371
  }), "SaveAsRounded");
10372
- Gf = es.default = Fx;
10373
- var ys = {}, Ux = Ce.exports;
10372
+ Gf = es.default = F2;
10373
+ var ys = {}, U2 = Ce.exports;
10374
10374
  Object.defineProperty(ys, "__esModule", {
10375
10375
  value: !0
10376
10376
  });
10377
- var Kf = ys.default = void 0, Yx = Ux(Le()), Vx = Pe, qx = (0, Yx.default)(/* @__PURE__ */ (0, Vx.jsx)("path", {
10377
+ var Kf = ys.default = void 0, Y2 = U2(Le()), V2 = Pe, q2 = (0, Y2.default)(/* @__PURE__ */ (0, V2.jsx)("path", {
10378
10378
  d: "M17.59 3.59c-.38-.38-.89-.59-1.42-.59H5c-1.11 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7.83c0-.53-.21-1.04-.59-1.41l-2.82-2.83zM12 19c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm1-10H7c-1.1 0-2-.9-2-2s.9-2 2-2h6c1.1 0 2 .9 2 2s-.9 2-2 2z"
10379
10379
  }), "SaveRounded");
10380
- Kf = ys.default = qx;
10381
- var vs = {}, Qx = Ce.exports;
10380
+ Kf = ys.default = q2;
10381
+ var vs = {}, Q2 = Ce.exports;
10382
10382
  Object.defineProperty(vs, "__esModule", {
10383
10383
  value: !0
10384
10384
  });
10385
- var Hf = vs.default = void 0, Wx = Qx(Le()), Bx = Pe, Gx = (0, Wx.default)(/* @__PURE__ */ (0, Bx.jsx)("path", {
10385
+ var Hf = vs.default = void 0, W2 = Q2(Le()), B2 = Pe, G2 = (0, W2.default)(/* @__PURE__ */ (0, B2.jsx)("path", {
10386
10386
  d: "M18 2h-7.17c-.53 0-1.04.21-1.42.59L4.59 7.41C4.21 7.79 4 8.3 4 8.83V20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6.35 14.65-2.79-2.79c-.32-.32-.1-.86.35-.86H11v-2.99c0-.55.44-.99.99-1 .56-.01 1.01.44 1.01 1V13h1.79c.45 0 .67.54.35.85l-2.79 2.79c-.19.2-.51.2-.7.01z"
10387
10387
  }), "SimCardDownloadRounded");
10388
- Hf = vs.default = Gx;
10388
+ Hf = vs.default = G2;
10389
10389
  const _s = () => {
10390
10390
  const {
10391
10391
  dispatchSnackbar: e
@@ -10408,17 +10408,17 @@ const _s = () => {
10408
10408
  version: e
10409
10409
  }).then((i) => i.data)
10410
10410
  };
10411
- }, Kx = (e) => {
10411
+ }, K2 = (e) => {
10412
10412
  const {
10413
10413
  postWorkflow: t
10414
10414
  } = Xf();
10415
10415
  return Rl(t, e);
10416
- }, Hx = (e) => {
10416
+ }, H2 = (e) => {
10417
10417
  const {
10418
10418
  patchWorkflow: t
10419
10419
  } = Xf();
10420
10420
  return Rl(t, e);
10421
- }, Xx = () => {
10421
+ }, X2 = () => {
10422
10422
  const {
10423
10423
  t: e
10424
10424
  } = ct(["snackMessage"]), {
@@ -10429,7 +10429,7 @@ const _s = () => {
10429
10429
  tree: i
10430
10430
  } = ft(), {
10431
10431
  mutate: o
10432
- } = Kx({
10432
+ } = K2({
10433
10433
  onError: () => {
10434
10434
  t(e("error.saveTree", {
10435
10435
  ns: "snackMessage"
@@ -10445,7 +10445,7 @@ const _s = () => {
10445
10445
  }
10446
10446
  }), {
10447
10447
  mutate: a
10448
- } = Hx({
10448
+ } = H2({
10449
10449
  onError: () => {
10450
10450
  t(e("error.updateTree", {
10451
10451
  ns: "snackMessage"
@@ -10488,7 +10488,7 @@ const _s = () => {
10488
10488
  }
10489
10489
  }
10490
10490
  };
10491
- }, Jx = ({
10491
+ }, J2 = ({
10492
10492
  downloadedFileName: e = "export",
10493
10493
  value: t
10494
10494
  }) => {
@@ -10497,7 +10497,7 @@ const _s = () => {
10497
10497
  } = ct("button"), {
10498
10498
  getDownloadLink: r,
10499
10499
  handleSubmit: i
10500
- } = Xx(), {
10500
+ } = X2(), {
10501
10501
  currentTree: o,
10502
10502
  endPoint: a
10503
10503
  } = ft(), {
@@ -10536,7 +10536,7 @@ const _s = () => {
10536
10536
  })
10537
10537
  })]
10538
10538
  });
10539
- }, Zx = {
10539
+ }, Z2 = {
10540
10540
  box: {
10541
10541
  backgroundColor: _e.backgroundPrimary,
10542
10542
  border: `solid 1px ${_e.borderLight}`
@@ -10556,7 +10556,7 @@ const _s = () => {
10556
10556
  maxWidth: "sm",
10557
10557
  fullWidth: !0,
10558
10558
  children: /* @__PURE__ */ oe(He, {
10559
- sx: Zx.box,
10559
+ sx: Z2.box,
10560
10560
  p: 4,
10561
10561
  children: [/* @__PURE__ */ M("h3", {
10562
10562
  children: i
@@ -10565,14 +10565,14 @@ const _s = () => {
10565
10565
  }), e]
10566
10566
  })
10567
10567
  });
10568
- var bs = {}, e2 = Ce.exports;
10568
+ var bs = {}, ex = Ce.exports;
10569
10569
  Object.defineProperty(bs, "__esModule", {
10570
10570
  value: !0
10571
10571
  });
10572
- var Jf = bs.default = void 0, t2 = e2(Le()), n2 = Pe, r2 = (0, t2.default)(/* @__PURE__ */ (0, n2.jsx)("path", {
10572
+ var Jf = bs.default = void 0, tx = ex(Le()), nx = Pe, rx = (0, tx.default)(/* @__PURE__ */ (0, nx.jsx)("path", {
10573
10573
  d: "M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"
10574
10574
  }), "CloseRounded");
10575
- Jf = bs.default = r2;
10575
+ Jf = bs.default = rx;
10576
10576
  const Hr = {
10577
10577
  container: {
10578
10578
  display: "flex",
@@ -10599,7 +10599,7 @@ const Hr = {
10599
10599
  paddingY: 1,
10600
10600
  width: "100%"
10601
10601
  }
10602
- }, i2 = ({
10602
+ }, ix = ({
10603
10603
  children: e,
10604
10604
  appear: t,
10605
10605
  in: n,
@@ -10621,7 +10621,7 @@ const Hr = {
10621
10621
  tabIndex: s,
10622
10622
  timeout: u,
10623
10623
  children: e
10624
- }), o2 = Il(i2), a2 = ({
10624
+ }), ox = Il(ix), ax = ({
10625
10625
  children: e,
10626
10626
  open: t,
10627
10627
  onClose: n,
@@ -10637,7 +10637,7 @@ const Hr = {
10637
10637
  "aria-labelledby": "modal-modal-title",
10638
10638
  "aria-describedby": "modal-modal-description",
10639
10639
  fullScreen: !0,
10640
- TransitionComponent: o2,
10640
+ TransitionComponent: ox,
10641
10641
  children: /* @__PURE__ */ oe(He, {
10642
10642
  sx: Hr.container,
10643
10643
  children: [/* @__PURE__ */ M(Sd, {
@@ -10669,39 +10669,39 @@ const Hr = {
10669
10669
  children: e
10670
10670
  })]
10671
10671
  })
10672
- }), s2 = {
10672
+ }), sx = {
10673
10673
  box: {
10674
10674
  border: `solid 1px ${_e.borderLight}`,
10675
10675
  flexGrow: 0
10676
10676
  }
10677
- }, u2 = ({
10677
+ }, ux = ({
10678
10678
  children: e
10679
10679
  }) => /* @__PURE__ */ M(He, {
10680
10680
  p: 2,
10681
10681
  role: "group",
10682
- sx: s2.box,
10682
+ sx: sx.box,
10683
10683
  children: e
10684
- }), l2 = {
10684
+ }), lx = {
10685
10685
  box: {
10686
10686
  border: `solid 1px ${_e.borderLight}`,
10687
10687
  flexGrow: 0
10688
10688
  }
10689
- }, c2 = ({
10689
+ }, cx = ({
10690
10690
  children: e
10691
10691
  }) => /* @__PURE__ */ M(He, {
10692
- sx: l2.box,
10692
+ sx: lx.box,
10693
10693
  padding: 2,
10694
10694
  component: "header",
10695
10695
  children: e
10696
- }), f2 = {
10696
+ }), fx = {
10697
10697
  box: {
10698
10698
  border: `solid 1px ${_e.borderLight}`,
10699
10699
  flexGrow: 1
10700
10700
  }
10701
- }, d2 = ({
10701
+ }, dx = ({
10702
10702
  children: e
10703
10703
  }) => /* @__PURE__ */ M(He, {
10704
- sx: f2.box,
10704
+ sx: fx.box,
10705
10705
  component: "main",
10706
10706
  role: "tree",
10707
10707
  children: e
@@ -10709,7 +10709,7 @@ const Hr = {
10709
10709
  stack: {
10710
10710
  width: "100%"
10711
10711
  }
10712
- }, h2 = ({
10712
+ }, hx = ({
10713
10713
  children: e
10714
10714
  }) => {
10715
10715
  const t = _d.toArray(e);
@@ -10741,16 +10741,16 @@ const Hr = {
10741
10741
  })
10742
10742
  })]
10743
10743
  });
10744
- }, p2 = {
10744
+ }, px = {
10745
10745
  box: {
10746
10746
  border: `solid 1px ${_e.borderLight}`,
10747
10747
  flexGrow: 1,
10748
10748
  overflow: "auto"
10749
10749
  }
10750
- }, g2 = ({
10750
+ }, gx = ({
10751
10751
  children: e
10752
10752
  }) => /* @__PURE__ */ M(He, {
10753
- sx: p2.box,
10753
+ sx: px.box,
10754
10754
  component: "aside",
10755
10755
  children: e
10756
10756
  }), Zf = (e, t) => {
@@ -10782,16 +10782,16 @@ const Hr = {
10782
10782
  }, xs = (e, t, n) => {
10783
10783
  const r = Rn(e, t);
10784
10784
  return Zf(r, n);
10785
- }, m2 = (e, t) => {
10785
+ }, mx = (e, t) => {
10786
10786
  if (!e)
10787
10787
  return null;
10788
10788
  const n = t.attributes.isDecision;
10789
10789
  return Object.defineProperty(e, "attributes", { value: { ...e.attributes, isLeaf: !1 } }), n ? (Object.defineProperty(e, "children", { value: [{ ...t, attributes: { ...t.attributes, isLeaf: !1 } }] }), null) : (Object.defineProperty(e, "children", { value: [{ ...t, attributes: { ...t.attributes, isLeaf: !0 } }] }), null);
10790
- }, y2 = ({ tree: e, path: t, name: n, child: r }) => {
10790
+ }, yx = ({ tree: e, path: t, name: n, child: r }) => {
10791
10791
  if (!e)
10792
10792
  return r.children.length ? { ...r } : { ...r, attributes: { ...r.attributes, isLeaf: !0, isRoot: !0 } };
10793
10793
  const i = structuredClone(e), o = xs(i, t, n);
10794
- return m2(o, r), i;
10794
+ return mx(o, r), i;
10795
10795
  }, ed = (e, t = []) => {
10796
10796
  if (!e)
10797
10797
  return [];
@@ -10812,52 +10812,52 @@ const Hr = {
10812
10812
  for (let s = 0; r === null && s < e.children.length; s += 1)
10813
10813
  r = td(e.children[s], t, e);
10814
10814
  return r;
10815
- }, v2 = (e, t) => (!e || !t || (Object.defineProperty(e, "children", { value: e.children.filter((n) => n.name !== t.name) }), Object.defineProperty(e, "attributes", { value: { ...e.attributes, isLeaf: !0 } })), null), _2 = (e, t, n) => {
10815
+ }, vx = (e, t) => (!e || !t || (Object.defineProperty(e, "children", { value: e.children.filter((n) => n.name !== t.name) }), Object.defineProperty(e, "attributes", { value: { ...e.attributes, isLeaf: !0 } })), null), _x = (e, t, n) => {
10816
10816
  const r = Rn(e, t);
10817
10817
  return td(r, n);
10818
- }, b2 = ({ tree: e, path: t, name: n }) => {
10819
- const r = structuredClone(e), i = xs(r, t, n), o = _2(r, t, n);
10820
- return v2(o, i), r;
10821
- }, x2 = (e, t) => {
10818
+ }, bx = ({ tree: e, path: t, name: n }) => {
10819
+ const r = structuredClone(e), i = xs(r, t, n), o = _x(r, t, n);
10820
+ return vx(o, i), r;
10821
+ }, xx = (e, t) => {
10822
10822
  if (!e)
10823
10823
  return null;
10824
10824
  const n = t.attributes.isDecision, r = e.attributes.isDecision, i = e.attributes.depth === 0;
10825
10825
  return r || n ? (Object.defineProperty(e, "children", { value: [...t.children] }), Object.defineProperty(e, "attributes", {
10826
10826
  value: { ...t.attributes, isLeaf: !t.children.length || !n, isRoot: i }
10827
10827
  }), Object.defineProperty(e, "name", { value: t.name }), null) : (Object.defineProperty(e, "children", { value: [...e.children] }), Object.defineProperty(e, "attributes", { value: { ...t.attributes, isLeaf: !e.children.length, isRoot: i } }), Object.defineProperty(e, "name", { value: t.name }), null);
10828
- }, M2 = ({ tree: e, path: t, name: n, child: r }) => {
10828
+ }, Mx = ({ tree: e, path: t, name: n, child: r }) => {
10829
10829
  const i = structuredClone(e), o = xs(i, t, n);
10830
- return x2(o, r), i;
10830
+ return xx(o, r), i;
10831
10831
  }, Dt = {
10832
10832
  appendTreeCard: "appendTreeCard",
10833
10833
  deleteTreeCard: "deleteTreeCard",
10834
10834
  replaceTreeCard: "replaceTreeCard",
10835
10835
  resetTree: "resetTree",
10836
10836
  setTree: "setTree"
10837
- }, w2 = (e, t, n) => ({
10837
+ }, wx = (e, t, n) => ({
10838
10838
  children: n,
10839
10839
  name: t,
10840
10840
  path: e,
10841
10841
  type: Dt.appendTreeCard
10842
- }), T2 = (e, t, n) => ({
10842
+ }), Tx = (e, t, n) => ({
10843
10843
  children: n,
10844
10844
  name: t,
10845
10845
  path: e,
10846
10846
  type: Dt.replaceTreeCard
10847
- }), N2 = (e, t) => ({
10847
+ }), Nx = (e, t) => ({
10848
10848
  name: t,
10849
10849
  path: e,
10850
10850
  type: Dt.deleteTreeCard
10851
- }), E2 = () => ({
10851
+ }), Ex = () => ({
10852
10852
  type: Dt.resetTree
10853
10853
  }), nd = (e) => ({
10854
10854
  tree: e,
10855
10855
  type: Dt.setTree
10856
- }), D2 = (e, t) => {
10856
+ }), Dx = (e, t) => {
10857
10857
  switch (t.type) {
10858
10858
  case Dt.appendTreeCard: {
10859
10859
  const { name: n, path: r, children: i } = t;
10860
- return y2({
10860
+ return yx({
10861
10861
  child: i,
10862
10862
  name: n,
10863
10863
  path: r,
@@ -10866,11 +10866,11 @@ const Hr = {
10866
10866
  }
10867
10867
  case Dt.deleteTreeCard: {
10868
10868
  const { path: n, name: r } = t;
10869
- return b2({ name: r, path: n, tree: e });
10869
+ return bx({ name: r, path: n, tree: e });
10870
10870
  }
10871
10871
  case Dt.replaceTreeCard: {
10872
10872
  const { name: n, path: r, children: i } = t;
10873
- return M2({
10873
+ return Mx({
10874
10874
  child: i,
10875
10875
  name: n,
10876
10876
  path: r,
@@ -10884,7 +10884,7 @@ const Hr = {
10884
10884
  default:
10885
10885
  throw new Error();
10886
10886
  }
10887
- }, O2 = () => {
10887
+ }, Ox = () => {
10888
10888
  const {
10889
10889
  dispatchTree: e,
10890
10890
  setModalOpen: t,
@@ -10896,17 +10896,17 @@ const Hr = {
10896
10896
  var u, l;
10897
10897
  o.preventDefault();
10898
10898
  const a = ((u = n == null ? void 0 : n.data) == null ? void 0 : u.name) || "", s = ((l = r == null ? void 0 : r.at(-1)) == null ? void 0 : l.path) || "";
10899
- e(N2(s, a)), t(null);
10899
+ e(Nx(s, a)), t(null);
10900
10900
  }
10901
10901
  };
10902
- }, S2 = ({
10902
+ }, Sx = ({
10903
10903
  onClose: e
10904
10904
  }) => {
10905
10905
  const {
10906
10906
  t
10907
10907
  } = ct(), {
10908
10908
  handleSubmit: n
10909
- } = O2();
10909
+ } = Ox();
10910
10910
  return /* @__PURE__ */ M("form", {
10911
10911
  onSubmit: n,
10912
10912
  children: /* @__PURE__ */ oe(ze, {
@@ -10926,22 +10926,22 @@ const Hr = {
10926
10926
  })
10927
10927
  });
10928
10928
  };
10929
- var Ms = {}, C2 = Ce.exports;
10929
+ var Ms = {}, Cx = Ce.exports;
10930
10930
  Object.defineProperty(Ms, "__esModule", {
10931
10931
  value: !0
10932
10932
  });
10933
- var rd = Ms.default = void 0, A2 = C2(Le()), k2 = Pe, I2 = (0, A2.default)(/* @__PURE__ */ (0, k2.jsx)("path", {
10933
+ var rd = Ms.default = void 0, Ax = Cx(Le()), kx = Pe, Ix = (0, Ax.default)(/* @__PURE__ */ (0, kx.jsx)("path", {
10934
10934
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4 11h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1z"
10935
10935
  }), "AddCircleRounded");
10936
- rd = Ms.default = I2;
10937
- var ws = {}, z2 = Ce.exports;
10936
+ rd = Ms.default = Ix;
10937
+ var ws = {}, zx = Ce.exports;
10938
10938
  Object.defineProperty(ws, "__esModule", {
10939
10939
  value: !0
10940
10940
  });
10941
- var id = ws.default = void 0, R2 = z2(Le()), j2 = Pe, $2 = (0, R2.default)(/* @__PURE__ */ (0, j2.jsx)("path", {
10941
+ var id = ws.default = void 0, Rx = zx(Le()), jx = Pe, $x = (0, Rx.default)(/* @__PURE__ */ (0, jx.jsx)("path", {
10942
10942
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4 11H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1z"
10943
10943
  }), "RemoveCircleRounded");
10944
- id = ws.default = $2;
10944
+ id = ws.default = $x;
10945
10945
  const ar = [
10946
10946
  {
10947
10947
  isBooleanField: !1,
@@ -11055,14 +11055,14 @@ const ar = [
11055
11055
  isRequiredDisabled: !0,
11056
11056
  type: "tree"
11057
11057
  }
11058
- ], L2 = () => {
11058
+ ], Lx = () => {
11059
11059
  const {
11060
11060
  endPoint: e
11061
11061
  } = ft();
11062
11062
  return {
11063
11063
  fields: Al(() => ar.filter((n) => !(n.type === "tree" && !e)), [e])()
11064
11064
  };
11065
- }, P2 = ({
11065
+ }, Px = ({
11066
11066
  onChange: e,
11067
11067
  value: t
11068
11068
  }) => {
@@ -11070,7 +11070,7 @@ const ar = [
11070
11070
  t: n
11071
11071
  } = ct(), {
11072
11072
  fields: r
11073
- } = L2();
11073
+ } = Lx();
11074
11074
  return /* @__PURE__ */ oe(Pl, {
11075
11075
  sx: {
11076
11076
  flex: 1
@@ -11100,14 +11100,14 @@ const ar = [
11100
11100
  })]
11101
11101
  });
11102
11102
  };
11103
- var Ts = {}, F2 = Ce.exports;
11103
+ var Ts = {}, Fx = Ce.exports;
11104
11104
  Object.defineProperty(Ts, "__esModule", {
11105
11105
  value: !0
11106
11106
  });
11107
- var od = Ts.default = void 0, U2 = F2(Le()), Y2 = Pe, V2 = (0, U2.default)(/* @__PURE__ */ (0, Y2.jsx)("path", {
11107
+ var od = Ts.default = void 0, Ux = Fx(Le()), Yx = Pe, Vx = (0, Ux.default)(/* @__PURE__ */ (0, Yx.jsx)("path", {
11108
11108
  d: "M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"
11109
11109
  }), "AddRounded");
11110
- od = Ts.default = V2;
11110
+ od = Ts.default = Vx;
11111
11111
  const ad = () => ({
11112
11112
  getAllWorkflow: () => Dn.get("/v1/workflows").then((n) => n.data),
11113
11113
  getWorkflow: (n) => Dn.get(`/v1/workflow?id=${n}`).then((r) => r.data)
@@ -11119,7 +11119,7 @@ const ad = () => ({
11119
11119
  refetchOnWindowFocus: !1,
11120
11120
  ...t
11121
11121
  });
11122
- }, q2 = (e) => {
11122
+ }, qx = (e) => {
11123
11123
  const {
11124
11124
  getAllWorkflow: t
11125
11125
  } = ad();
@@ -11127,7 +11127,7 @@ const ad = () => ({
11127
11127
  refetchOnWindowFocus: !1,
11128
11128
  ...e
11129
11129
  });
11130
- }, Q2 = (e) => {
11130
+ }, Qx = (e) => {
11131
11131
  const {
11132
11132
  t
11133
11133
  } = ct("snackMessage"), {
@@ -11157,7 +11157,7 @@ const ad = () => ({
11157
11157
  data: u,
11158
11158
  isLoading: l,
11159
11159
  refetch: c
11160
- } = q2({
11160
+ } = qx({
11161
11161
  enabled: !1,
11162
11162
  keepPreviousData: !0,
11163
11163
  onError: () => {
@@ -11175,7 +11175,7 @@ const ad = () => ({
11175
11175
  if (p === "add-new-tree") {
11176
11176
  s(""), i({
11177
11177
  name: ""
11178
- }), o(E2());
11178
+ }), o(Ex());
11179
11179
  return;
11180
11180
  }
11181
11181
  s(p);
@@ -11221,7 +11221,7 @@ const ad = () => ({
11221
11221
  workflowsSuggestions: c,
11222
11222
  workflowsSuggestionsLoading: d,
11223
11223
  treeSelected: f
11224
- } = Q2(a);
11224
+ } = Qx(a);
11225
11225
  return /* @__PURE__ */ oe(Pl, {
11226
11226
  size: n,
11227
11227
  required: t,
@@ -11265,7 +11265,7 @@ const ad = () => ({
11265
11265
  })]
11266
11266
  })]
11267
11267
  });
11268
- }, W2 = ({
11268
+ }, Wx = ({
11269
11269
  helperText: e,
11270
11270
  hiddenValue: t,
11271
11271
  isHiddenField: n,
@@ -11302,10 +11302,10 @@ const ad = () => ({
11302
11302
  onChange: a,
11303
11303
  value: e
11304
11304
  });
11305
- }, Nl = (e) => (/* @__PURE__ */ new Set([...e])).size === e.length, B2 = (e, t, n) => {
11305
+ }, Nl = (e) => (/* @__PURE__ */ new Set([...e])).size === e.length, Bx = (e, t, n) => {
11306
11306
  const r = [...e, t];
11307
11307
  return Nl(n ? r.filter((i) => i !== n) : r);
11308
- }, G2 = () => {
11308
+ }, Gx = () => {
11309
11309
  var sn, kr, Ir, zr, Rr, jr, $r, Lr, un, Yn, At, ln, cn;
11310
11310
  const e = vr(() => [{
11311
11311
  id: "0",
@@ -11371,7 +11371,7 @@ const ad = () => ({
11371
11371
  return;
11372
11372
  }
11373
11373
  const ue = J && (r == null ? void 0 : r.data.name), xe = (Je = o == null ? void 0 : o.at(-1)) == null ? void 0 : Je.path, Re = Rn(t, xe), Ue = ed(Re);
11374
- if (B2(Ue, fe, ue)) {
11374
+ if (Bx(Ue, fe, ue)) {
11375
11375
  Y("");
11376
11376
  return;
11377
11377
  }
@@ -11521,7 +11521,7 @@ const ad = () => ({
11521
11521
  children: Je,
11522
11522
  name: d
11523
11523
  };
11524
- n(Ue ? T2(vt || "", xe, _) : w2(vt || null, xe, _)), a(null);
11524
+ n(Ue ? Tx(vt || "", xe, _) : wx(vt || null, xe, _)), a(null);
11525
11525
  };
11526
11526
  return bd(() => {
11527
11527
  var P, fe, ue, xe, Re, Ue, dt, Je, vt, fn, dn, Pt, hn, _, z, L, G, re, de;
@@ -11611,7 +11611,7 @@ const ad = () => ({
11611
11611
  top: "50%",
11612
11612
  transform: "translateY(-50%)"
11613
11613
  }
11614
- }, K2 = ({
11614
+ }, Kx = ({
11615
11615
  onClose: e
11616
11616
  }) => {
11617
11617
  const {
@@ -11655,7 +11655,7 @@ const ad = () => ({
11655
11655
  handleChangeLabel: J,
11656
11656
  handleChangeRepeatable: C,
11657
11657
  handleChangeHiddenValue: R
11658
- } = G2();
11658
+ } = Gx();
11659
11659
  return /* @__PURE__ */ oe("form", {
11660
11660
  onSubmit: V,
11661
11661
  children: [/* @__PURE__ */ oe(ze, {
@@ -11693,10 +11693,10 @@ const ad = () => ({
11693
11693
  sm: "row",
11694
11694
  xs: "column"
11695
11695
  },
11696
- children: [/* @__PURE__ */ M(P2, {
11696
+ children: [/* @__PURE__ */ M(Px, {
11697
11697
  value: a,
11698
11698
  onChange: I
11699
- }), /* @__PURE__ */ M(W2, {
11699
+ }), /* @__PURE__ */ M(Wx, {
11700
11700
  helperText: s,
11701
11701
  hiddenValue: l,
11702
11702
  isHiddenField: h,
@@ -11855,14 +11855,14 @@ const ad = () => ({
11855
11855
  })]
11856
11856
  });
11857
11857
  };
11858
- var Es = {}, H2 = Ce.exports;
11858
+ var Es = {}, Hx = Ce.exports;
11859
11859
  Object.defineProperty(Es, "__esModule", {
11860
11860
  value: !0
11861
11861
  });
11862
- var ud = Es.default = void 0, X2 = H2(Le()), J2 = Pe, Z2 = (0, X2.default)(/* @__PURE__ */ (0, J2.jsx)("path", {
11862
+ var ud = Es.default = void 0, Xx = Hx(Le()), Jx = Pe, Zx = (0, Xx.default)(/* @__PURE__ */ (0, Jx.jsx)("path", {
11863
11863
  d: "M17 11h3c1.11 0 2-.9 2-2V5c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1H9.01V5c0-1.11-.9-2-2-2H4c-1.1 0-2 .9-2 2v4c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2V8h2v7.01c0 1.65 1.34 2.99 2.99 2.99H15v1c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2v-4c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1h-1.01c-.54 0-.99-.45-.99-.99V8h2v1c0 1.1.9 2 2 2z"
11864
11864
  }), "AccountTreeRounded");
11865
- ud = Es.default = Z2;
11865
+ ud = Es.default = Zx;
11866
11866
  var Ds = {}, eM = Ce.exports;
11867
11867
  Object.defineProperty(Ds, "__esModule", {
11868
11868
  value: !0
@@ -12350,8 +12350,8 @@ const Ie = {
12350
12350
  isDeleteModal: l
12351
12351
  } = PM(), c = (h = n == null ? void 0 : n.at(-1)) == null ? void 0 : h.path, d = (y = n == null ? void 0 : n.at(-1)) == null ? void 0 : y.label, f = e && Rn(e, c);
12352
12352
  return /* @__PURE__ */ oe(Ei, {
12353
- children: [/* @__PURE__ */ oe(h2, {
12354
- children: [/* @__PURE__ */ M(c2, {
12353
+ children: [/* @__PURE__ */ oe(hx, {
12354
+ children: [/* @__PURE__ */ M(cx, {
12355
12355
  children: /* @__PURE__ */ oe(ze, {
12356
12356
  justifyContent: "space-between",
12357
12357
  direction: "row",
@@ -12367,17 +12367,17 @@ const Ie = {
12367
12367
  })]
12368
12368
  })]
12369
12369
  })
12370
- }), /* @__PURE__ */ M(d2, {
12370
+ }), /* @__PURE__ */ M(dx, {
12371
12371
  children: /* @__PURE__ */ M(Yu, {
12372
12372
  data: e,
12373
12373
  renderCustomNodeElement: Sl
12374
12374
  })
12375
- }), /* @__PURE__ */ M(g2, {
12375
+ }), /* @__PURE__ */ M(gx, {
12376
12376
  children: /* @__PURE__ */ M(Yy, {
12377
12377
  value: e
12378
12378
  })
12379
- }), /* @__PURE__ */ M(u2, {
12380
- children: /* @__PURE__ */ M(Jx, {
12379
+ }), /* @__PURE__ */ M(ux, {
12380
+ children: /* @__PURE__ */ M(J2, {
12381
12381
  value: e
12382
12382
  })
12383
12383
  })]
@@ -12385,17 +12385,17 @@ const Ie = {
12385
12385
  open: u,
12386
12386
  onClose: a,
12387
12387
  title: o(),
12388
- children: /* @__PURE__ */ M(K2, {
12388
+ children: /* @__PURE__ */ M(Kx, {
12389
12389
  onClose: a
12390
12390
  })
12391
12391
  }), /* @__PURE__ */ M(Ml, {
12392
12392
  open: l,
12393
12393
  onClose: a,
12394
12394
  title: s(),
12395
- children: /* @__PURE__ */ M(S2, {
12395
+ children: /* @__PURE__ */ M(Sx, {
12396
12396
  onClose: a
12397
12397
  })
12398
- }), /* @__PURE__ */ M(a2, {
12398
+ }), /* @__PURE__ */ M(ax, {
12399
12399
  open: t,
12400
12400
  onClose: i,
12401
12401
  title: d,
@@ -12405,13 +12405,13 @@ const Ie = {
12405
12405
  })
12406
12406
  })]
12407
12407
  });
12408
- }, VM = "0.6.1", qM = ({
12408
+ }, VM = "0.6.2", qM = ({
12409
12409
  children: e,
12410
12410
  endPoint: t,
12411
12411
  initialTree: n,
12412
12412
  initialTreeId: r
12413
12413
  }) => {
12414
- const [i, o] = Se(Ft.currentHierarchyPointNode), [a, s] = Se(Ft.modalOpen), [u, l] = Se(Ft.treeModalOpen), [c, d] = Se(Ft.treePath), [f, h] = Cl(D2, n || Ft.tree), [y, p] = Se(r ? {
12414
+ const [i, o] = Se(Ft.currentHierarchyPointNode), [a, s] = Se(Ft.modalOpen), [u, l] = Se(Ft.treeModalOpen), [c, d] = Se(Ft.treePath), [f, h] = Cl(Dx, n || Ft.tree), [y, p] = Se(r ? {
12415
12415
  ...Ft.currentTree,
12416
12416
  id: r
12417
12417
  } : Ft.currentTree), g = vr(() => ({
package/dist/main.umd.cjs CHANGED
@@ -162,4 +162,4 @@ const theme2 = createTheme({ palette: {
162
162
  primary: { main: green[500] },
163
163
  } });`:yn(12,g?` (${g})`:"",JSON.stringify(p.main)));return lf(p,"light",w,r),lf(p,"dark",T,r),p.contrastText||(p.contrastText=d(p.main)),p},h={dark:Ja,light:uf};return process.env.NODE_ENV!=="production"&&(h[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),At(We({common:We({},vr),mode:t,primary:f({color:o,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:c,name:"warning"}),info:f({color:u,name:"info"}),success:f({color:l,name:"success"}),grey:X_,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},h[t]),i)}const ab=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function sb(e){return Math.round(e*1e5)/1e5}const cf={textTransform:"uppercase"},ff='"Roboto", "Helvetica", "Arial", sans-serif';function ub(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=ff,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:u=700,htmlFontSize:l=16,allVariants:c,pxToRem:d}=n,f=sr(n,ab);process.env.NODE_ENV!=="production"&&(typeof i!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=i/14,v=d||(x=>`${x/l*h}rem`),p=(x,w,T,b,y)=>We({fontFamily:r,fontWeight:x,fontSize:v(w),lineHeight:T},r===ff?{letterSpacing:`${sb(b/w)}em`}:{},y,c),g={h1:p(o,96,1.167,-1.5),h2:p(o,60,1.2,-.5),h3:p(a,48,1.167,0),h4:p(a,34,1.235,.25),h5:p(a,24,1.334,0),h6:p(s,20,1.6,.15),subtitle1:p(a,16,1.75,.15),subtitle2:p(s,14,1.57,.1),body1:p(a,16,1.5,.15),body2:p(a,14,1.43,.15),button:p(s,14,1.75,.4,cf),caption:p(a,12,1.66,.4),overline:p(a,12,2.66,1,cf)};return At(We({htmlFontSize:l,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:u},g),f,{clone:!1})}const lb=.2,cb=.14,fb=.12;function Te(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${lb})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${cb})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${fb})`].join(",")}const db=["none",Te(0,2,1,-1,0,1,1,0,0,1,3,0),Te(0,3,1,-2,0,2,2,0,0,1,5,0),Te(0,3,3,-2,0,3,4,0,0,1,8,0),Te(0,2,4,-1,0,4,5,0,0,1,10,0),Te(0,3,5,-1,0,5,8,0,0,1,14,0),Te(0,3,5,-1,0,6,10,0,0,1,18,0),Te(0,4,5,-2,0,7,10,1,0,2,16,1),Te(0,5,5,-3,0,8,10,1,0,3,14,2),Te(0,5,6,-3,0,9,12,1,0,3,16,2),Te(0,6,6,-3,0,10,14,1,0,4,18,3),Te(0,6,7,-4,0,11,15,1,0,4,20,3),Te(0,7,8,-4,0,12,17,2,0,5,22,4),Te(0,7,8,-4,0,13,19,2,0,5,24,4),Te(0,7,9,-4,0,14,21,2,0,5,26,4),Te(0,8,9,-5,0,15,22,2,0,6,28,5),Te(0,8,10,-5,0,16,24,2,0,6,30,5),Te(0,8,11,-5,0,17,26,2,0,6,32,5),Te(0,9,11,-5,0,18,28,2,0,7,34,6),Te(0,9,12,-6,0,19,29,2,0,7,36,6),Te(0,10,13,-6,0,20,31,3,0,8,38,7),Te(0,10,13,-6,0,21,33,3,0,8,40,7),Te(0,10,14,-6,0,22,35,3,0,8,42,7),Te(0,11,14,-7,0,23,36,3,0,9,44,8),Te(0,11,15,-7,0,24,38,3,0,9,46,8)],hb=["duration","easing","delay"],pb={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},gb={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function df(e){return`${Math.round(e)}ms`}function mb(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function vb(e){const t=We({},pb,e.easing),n=We({},gb,e.duration);return We({getAutoHeightDuration:mb,create:(i=["all"],o={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:u=0}=o,l=sr(o,hb);if(process.env.NODE_ENV!=="production"){const c=f=>typeof f=="string",d=f=>!isNaN(parseFloat(f));!c(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(a)&&!c(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),c(s)||console.error('MUI: Argument "easing" must be a string.'),!d(u)&&!c(u)&&console.error('MUI: Argument "delay" must be a number or a string.'),Object.keys(l).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(l).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof a=="string"?a:df(a)} ${s} ${typeof u=="string"?u:df(u)}`).join(",")}},e,{easing:t,duration:n})}const yb={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},_b=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function bb(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,a=sr(e,_b);if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":yn(18));const s=ob(r),u=Ha(e);let l=At(u,{mixins:H_(u.breakpoints,n),palette:s,shadows:db.slice(),typography:ub(s,o),transitions:vb(i),zIndex:We({},yb)});if(l=At(l,a),l=t.reduce((c,d)=>At(c,d),l),process.env.NODE_ENV!=="production"){const c=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],d=(f,h)=>{let v;for(v in f){const p=f[v];if(c.indexOf(v)!==-1&&Object.keys(p).length>0){if(process.env.NODE_ENV!=="production"){const g=Aa("",v);console.error([`MUI: The \`${h}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(f,null,2),"",`Instead, you need to use the '&.${g}' syntax:`,JSON.stringify({root:{[`&.${g}`]:p}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
164
164
  `))}f[v]={}}}};Object.keys(l.components).forEach(f=>{const h=l.components[f].styleOverrides;h&&f.indexOf("Mui")===0&&d(h,f)})}return l.unstable_sxConfig=We({},Ga,a==null?void 0:a.unstable_sxConfig),l.unstable_sx=function(d){return Ka({sx:d,theme:this})},l}const hf=bb();function xb({props:e,name:t}){return B_({props:e,name:t,defaultTheme:hf})}const Mb=q_({defaultTheme:hf,rootShouldForwardProp:e=>zi(e)&&e!=="classes"});function wb(e){return Aa("MuiSvgIcon",e)}Ov("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Tb=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Nb=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${wt(t)}`,`fontSize${wt(n)}`]};return Ev(i,wb,r)},Eb=Mb("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${wt(n.color)}`],t[`fontSize${wt(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,a,s,u,l,c,d,f,h,v,p,g,x,w;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(o=i.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((a=e.typography)==null||(s=a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem",medium:((u=e.typography)==null||(l=u.pxToRem)==null?void 0:l.call(u,24))||"1.5rem",large:((c=e.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,35))||"2.1875rem"}[t.fontSize],color:(f=(h=(e.vars||e).palette)==null||(v=h[t.color])==null?void 0:v.main)!=null?f:{action:(p=(e.vars||e).palette)==null||(g=p.action)==null?void 0:g.active,disabled:(x=(e.vars||e).palette)==null||(w=x.action)==null?void 0:w.disabled,inherit:void 0}[t.color]}}),Za=Me.forwardRef(function(t,n){const r=xb({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:a="inherit",component:s="svg",fontSize:u="medium",htmlColor:l,inheritViewBox:c=!1,titleAccess:d,viewBox:f="0 0 24 24"}=r,h=sr(r,Tb),v=We({},r,{color:a,component:s,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:c,viewBox:f}),p={};c||(p.viewBox=f);const g=Nb(v);return oe(Eb,We({as:s,className:Cv(g.root,o),focusable:"false",color:l,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},p,h,{ownerState:v,children:[i,d?M("title",{children:d}):null]}))});process.env.NODE_ENV!=="production"&&(Za.propTypes={children:le.exports.node,classes:le.exports.object,className:le.exports.string,color:le.exports.oneOfType([le.exports.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),le.exports.string]),component:le.exports.elementType,fontSize:le.exports.oneOfType([le.exports.oneOf(["inherit","large","medium","small"]),le.exports.string]),htmlColor:le.exports.string,inheritViewBox:le.exports.bool,shapeRendering:le.exports.string,sx:le.exports.oneOfType([le.exports.arrayOf(le.exports.oneOfType([le.exports.func,le.exports.object,le.exports.bool])),le.exports.func,le.exports.object]),titleAccess:le.exports.string,viewBox:le.exports.string}),Za.muiName="SvgIcon";const pf=Za;function Db(e,t){function n(r,i){return M(pf,We({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=pf.muiName,Me.memo(Me.forwardRef(n))}const Ob=$t(Object.freeze(Object.defineProperty({__proto__:null,unstable_ClassNameGenerator:{configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
165
- `)),bc.configure(e)}},capitalize:wt,createChainedFunction:sv,createSvgIcon:Db,debounce:uv,deprecatedPropType:lv,isMuiElement:cv,ownerDocument:dc,ownerWindow:fv,requirePropFactory:dv,setRef:hc,unstable_useEnhancedEffect:pc,unstable_useId:pv,unsupportedProp:gv,useControlled:mv,useEventCallback:vv,useForkRef:yv,useIsFocusVisible:Nv},Symbol.toStringTag,{value:"Module"})));var gf;function Le(){return gf||(gf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=Ob}(Da)),Da}const Pe=$t(cd);var Cb=Se.exports;Object.defineProperty(Ea,"__esModule",{value:!0});var mf=Ea.default=void 0,Sb=Cb(Le()),Ab=Pe,Ib=(0,Sb.default)((0,Ab.jsx)("path",{d:"m20.41 6.41-2.83-2.83c-.37-.37-.88-.58-1.41-.58H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h7.4l8.6-8.6V7.83c0-.53-.21-1.04-.59-1.42zM12 18c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-9c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h7c.55 0 1 .45 1 1v2zm4.99 7.25 1.77 1.77-4.84 4.84c-.1.09-.23.14-.36.14H15.5c-.28 0-.5-.22-.5-.5v-1.06c0-.13.05-.26.15-.35l4.84-4.84zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71z"}),"SaveAsRounded");mf=Ea.default=Ib;var es={},zb=Se.exports;Object.defineProperty(es,"__esModule",{value:!0});var vf=es.default=void 0,kb=zb(Le()),jb=Pe,$b=(0,kb.default)((0,jb.jsx)("path",{d:"M17.59 3.59c-.38-.38-.89-.59-1.42-.59H5c-1.11 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7.83c0-.53-.21-1.04-.59-1.41l-2.82-2.83zM12 19c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm1-10H7c-1.1 0-2-.9-2-2s.9-2 2-2h6c1.1 0 2 .9 2 2s-.9 2-2 2z"}),"SaveRounded");vf=es.default=$b;var ts={},Rb=Se.exports;Object.defineProperty(ts,"__esModule",{value:!0});var yf=ts.default=void 0,Lb=Rb(Le()),Pb=Pe,Fb=(0,Lb.default)((0,Pb.jsx)("path",{d:"M18 2h-7.17c-.53 0-1.04.21-1.42.59L4.59 7.41C4.21 7.79 4 8.3 4 8.83V20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6.35 14.65-2.79-2.79c-.32-.32-.1-.86.35-.86H11v-2.99c0-.55.44-.99.99-1 .56-.01 1.01.44 1.01 1V13h1.79c.45 0 .67.54.35.85l-2.79 2.79c-.19.2-.51.2-.7.01z"}),"SimCardDownloadRounded");yf=ts.default=Fb;const ns=()=>{const{dispatchSnackbar:e}=W.useContext(Ds);return{close:()=>e(Os()),open:(r,i="success")=>e(md(r,i))}},_f=()=>{const{version:e}=at();return{patchWorkflow:r=>on.default.patch("/v1/workflow",{...r,version:e}).then(i=>i.data),postWorkflow:r=>on.default.post("/v1/workflow",{...r,version:e}).then(i=>i.data)}},Ub=e=>{const{postWorkflow:t}=_f();return nn.useMutation(t,e)},Yb=e=>{const{patchWorkflow:t}=_f();return nn.useMutation(t,e)},qb=()=>{const{t:e}=Je.useTranslation(["snackMessage"]),{open:t}=ns(),{setCurrentTree:n,currentTree:r,tree:i}=at(),{mutate:o}=Ub({onError:()=>{t(e("error.saveTree",{ns:"snackMessage"}),"error")},onSuccess:c=>{t(e("success.saveTree",{ns:"snackMessage"})),n(d=>({...d,id:c.workflow_id}))}}),{mutate:a}=Yb({onError:()=>{t(e("error.updateTree",{ns:"snackMessage"}),"error")},onSuccess:()=>{t(e("success.updateTree",{ns:"snackMessage"}))}}),s=c=>JSON.stringify(c,null,2);return{formatJSON:s,getDownloadLink:c=>`data:text/json;charset=utf-8,${encodeURIComponent(s(c))}`,handleSubmit:()=>{const{name:c,id:d}=r;if(!c){n(f=>({...f,errorName:"Champs Requis"}));return}if(i){if(d){a({id:d,label:c,workflow:i});return}o({label:c,workflow:i})}}}},Vb=({downloadedFileName:e="export",value:t})=>{const{t:n}=Je.useTranslation("button"),{getDownloadLink:r,handleSubmit:i}=qb(),{currentTree:o,endPoint:a}=at(),{id:s}=o;return oe(S.Stack,{direction:"row",spacing:2,justifyContent:"center",children:[M(S.Tooltip,{title:n("downloadJSONFile"),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:M(S.Box,{children:M(S.Button,{variant:"outlined",href:r(t),download:`${e}.json`,disabled:!t,children:M(yf,{})})})}),M(S.Tooltip,{title:n(s?"update":"save"),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:M(S.Box,{children:M(S.Button,{variant:"outlined",onClick:i,disabled:!t||!a,children:s?M(mf,{}):M(vf,{})})})})]})},Bb={box:{backgroundColor:xe.backgroundPrimary,border:`solid 1px ${xe.borderLight}`}},bf=({children:e,description:t,open:n,onClose:r,title:i})=>M(S.Dialog,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",scroll:"body",maxWidth:"sm",fullWidth:!0,children:oe(S.Box,{sx:Bb.box,p:4,children:[M("h3",{children:i}),M("p",{children:t}),e]})});var rs={},Qb=Se.exports;Object.defineProperty(rs,"__esModule",{value:!0});var xf=rs.default=void 0,Wb=Qb(Le()),Gb=Pe,Kb=(0,Wb.default)((0,Gb.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),"CloseRounded");xf=rs.default=Kb;const ki={container:{display:"flex",flexDirection:"column",height:"100%",margin:1},main:{border:`solid 1px ${xe.borderLight}`,height:" 100%",margin:1},toolbar:{backgroundColor:xe.backgroundPrimary,boxShadow:"none",display:"flex",padding:"0 ! important"},toolbarBox:{backgroundColor:xe.tertiaryMain,border:`solid 1px ${xe.primaryMain}`,margin:1,paddingX:2,paddingY:1,width:"100%"}},Hb=({children:e,appear:t,in:n,onEnter:r,onExited:i,onFocus:o,role:a,tabIndex:s,timeout:u},l)=>M(S.Slide,{direction:"up",ref:l,appear:t,in:n,onEnter:r,onExited:i,onFocus:o,role:a,tabIndex:s,timeout:u,children:e}),Xb=W.forwardRef(Hb),Jb=({children:e,open:t,onClose:n,title:r})=>M(S.Dialog,{PaperProps:{sx:{backgroundColor:xe.backgroundPrimary,backgroundImage:"none"}},open:t,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",fullScreen:!0,TransitionComponent:Xb,children:oe(S.Box,{sx:ki.container,children:[M(S.AppBar,{position:"sticky",elevation:0,children:M(S.Toolbar,{sx:ki.toolbar,children:oe(S.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:ki.toolbarBox,children:[M(S.Typography,{variant:"h5",children:M("strong",{children:r})}),M(S.IconButton,{edge:"end",color:"inherit",onClick:n,"aria-label":"close",children:M(xf,{})})]})})}),M(S.Box,{sx:ki.main,children:e})]})}),Zb={box:{border:`solid 1px ${xe.borderLight}`,flexGrow:0}},ex=({children:e})=>M(S.Box,{p:2,role:"group",sx:Zb.box,children:e}),tx={box:{border:`solid 1px ${xe.borderLight}`,flexGrow:0}},nx=({children:e})=>M(S.Box,{sx:tx.box,padding:2,component:"header",children:e}),rx={box:{border:`solid 1px ${xe.borderLight}`,flexGrow:1}},ix=({children:e})=>M(S.Box,{sx:rx.box,component:"main",role:"tree",children:e}),Mf={stack:{width:"100%"}},ox=({children:e})=>{const t=W.Children.toArray(e);return oe(S.Grid,{container:!0,padding:1,flexWrap:"nowrap",height:"100%",role:"treegrid",children:[M(S.Grid,{item:!0,xs:9,padding:1,display:"flex",children:oe(S.Stack,{sx:Mf.stack,spacing:2,children:[t[0],t[1]]})}),M(S.Grid,{item:!0,xs:3,padding:1,display:"flex",children:oe(S.Stack,{sx:Mf.stack,spacing:2,children:[t[2],t[3]]})})]})},ax={box:{border:`solid 1px ${xe.borderLight}`,flexGrow:1,overflow:"auto"}},sx=({children:e})=>M(S.Box,{sx:ax.box,component:"aside",children:e}),wf=(e,t)=>{var o;if(!e)return null;let n=null;const r=(e==null?void 0:e.name)===t,i=(o=e==null?void 0:e.children)==null?void 0:o.length;if(r)return e;if(i)for(let a=0;n===null&&a<e.children.length;a+=1)n=wf(e.children[a],t);return n},Sn=(e,t)=>{var a,s,u,l,c;if(!e)return null;if(!t)return e;let n=null;const r=((a=e==null?void 0:e.attributes)==null?void 0:a.treePath)===t,i=(s=e==null?void 0:e.attributes)==null?void 0:s.tree,o=(u=e==null?void 0:e.children)==null?void 0:u.length;if(r)return((l=e==null?void 0:e.attributes)==null?void 0:l.tree)||null;if(i&&(n=Sn((c=e.attributes)==null?void 0:c.tree,t)),o)for(let d=0;n===null&&d<e.children.length;d+=1)n=Sn(e.children[d],t);return n},is=(e,t,n)=>{const r=Sn(e,t);return wf(r,n)},ux=(e,t)=>{if(!e)return null;const n=t.attributes.isDecision;return Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!1}}),n?(Object.defineProperty(e,"children",{value:[{...t,attributes:{...t.attributes,isLeaf:!1}}]}),null):(Object.defineProperty(e,"children",{value:[{...t,attributes:{...t.attributes,isLeaf:!0}}]}),null)},lx=({tree:e,path:t,name:n,child:r})=>{if(!e)return r.children.length?{...r}:{...r,attributes:{...r.attributes,isLeaf:!0,isRoot:!0}};const i=structuredClone(e),o=is(i,t,n);return ux(o,r),i},Tf=(e,t=[])=>{if(!e)return[];let n=[...t];return Object.entries(e).forEach(([r,i])=>{const o=r==="name",a=r==="children"&&i.length>0;o&&(n=[...n,i]),a&&(n=[...n,...i.map(s=>Tf(s,n)).flat()])}),n},Nf=(e,t,n=null)=>{var a;if(!e)return null;let r=null;const i=(e==null?void 0:e.name)===t,o=(a=e==null?void 0:e.children)==null?void 0:a.length;if(i)return n;if(o)for(let s=0;r===null&&s<e.children.length;s+=1)r=Nf(e.children[s],t,e);return r},cx=(e,t)=>(!e||!t||(Object.defineProperty(e,"children",{value:e.children.filter(n=>n.name!==t.name)}),Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!0}})),null),fx=(e,t,n)=>{const r=Sn(e,t);return Nf(r,n)},dx=({tree:e,path:t,name:n})=>{const r=structuredClone(e),i=is(r,t,n),o=fx(r,t,n);return cx(o,i),r},hx=(e,t)=>{if(!e)return null;const n=t.attributes.isDecision,r=e.attributes.isDecision,i=e.attributes.depth===0;return r||n?(Object.defineProperty(e,"children",{value:[...t.children]}),Object.defineProperty(e,"attributes",{value:{...t.attributes,isLeaf:!t.children.length||!n,isRoot:i}}),Object.defineProperty(e,"name",{value:t.name}),null):(Object.defineProperty(e,"children",{value:[...e.children]}),Object.defineProperty(e,"attributes",{value:{...t.attributes,isLeaf:!e.children.length,isRoot:i}}),Object.defineProperty(e,"name",{value:t.name}),null)},px=({tree:e,path:t,name:n,child:r})=>{const i=structuredClone(e),o=is(i,t,n);return hx(o,r),i},Dt={appendTreeCard:"appendTreeCard",deleteTreeCard:"deleteTreeCard",replaceTreeCard:"replaceTreeCard",resetTree:"resetTree",setTree:"setTree"},gx=(e,t,n)=>({children:n,name:t,path:e,type:Dt.appendTreeCard}),mx=(e,t,n)=>({children:n,name:t,path:e,type:Dt.replaceTreeCard}),vx=(e,t)=>({name:t,path:e,type:Dt.deleteTreeCard}),yx=()=>({type:Dt.resetTree}),Ef=e=>({tree:e,type:Dt.setTree}),_x=(e,t)=>{switch(t.type){case Dt.appendTreeCard:{const{name:n,path:r,children:i}=t;return lx({child:i,name:n,path:r,tree:e})}case Dt.deleteTreeCard:{const{path:n,name:r}=t;return dx({name:r,path:n,tree:e})}case Dt.replaceTreeCard:{const{name:n,path:r,children:i}=t;return px({child:i,name:n,path:r,tree:e})}case Dt.resetTree:return null;case Dt.setTree:return t.tree;default:throw new Error}},bx=()=>{const{dispatchTree:e,setModalOpen:t,currentHierarchyPointNode:n,treePath:r}=at();return{handleSubmit:o=>{var u,l;o.preventDefault();const a=((u=n==null?void 0:n.data)==null?void 0:u.name)||"",s=((l=r==null?void 0:r.at(-1))==null?void 0:l.path)||"";e(vx(s,a)),t(null)}}},xx=({onClose:e})=>{const{t}=Je.useTranslation(),{handleSubmit:n}=bx();return M("form",{onSubmit:n,children:oe(S.Stack,{spacing:2,direction:"row",justifyContent:"flex-end",children:[M(S.Button,{variant:"text",onClick:e,children:t("cancel")}),M(S.Button,{variant:"contained",color:"error",type:"submit",children:t("remove")})]})})};var os={},Mx=Se.exports;Object.defineProperty(os,"__esModule",{value:!0});var Df=os.default=void 0,wx=Mx(Le()),Tx=Pe,Nx=(0,wx.default)((0,Tx.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4 11h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1z"}),"AddCircleRounded");Df=os.default=Nx;var as={},Ex=Se.exports;Object.defineProperty(as,"__esModule",{value:!0});var Of=as.default=void 0,Dx=Ex(Le()),Ox=Pe,Cx=(0,Dx.default)((0,Ox.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4 11H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1z"}),"RemoveCircleRounded");Of=as.default=Cx;const _r=[{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"text"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"number"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"email"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"file"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"password"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"tel"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"address"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"url"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"date"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"time"},{isBooleanField:!0,isDecisionField:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"switch"},{isBooleanField:!0,isDecisionField:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"checkbox"},{isBooleanField:!1,isDecisionField:!0,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"radio"},{isBooleanField:!1,isDecisionField:!0,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"select"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"hidden"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"tree"}],Sx=()=>{const{endPoint:e}=at();return{fields:W.useCallback(()=>_r.filter(n=>!(n.type==="tree"&&!e)),[e])()}},Ax=({onChange:e,value:t})=>{const{t:n}=Je.useTranslation(),{fields:r}=Sx();return oe(S.FormControl,{sx:{flex:1},required:!0,children:[M(S.InputLabel,{children:n("type")}),M(S.Select,{value:t,label:n("type"),onChange:e,MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:r.map(({type:i})=>M(S.MenuItem,{value:i,children:n(`type.${i}`,{ns:"form"})},i))})]})};var ss={},Ix=Se.exports;Object.defineProperty(ss,"__esModule",{value:!0});var Cf=ss.default=void 0,zx=Ix(Le()),kx=Pe,jx=(0,zx.default)((0,kx.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}),"AddRounded");Cf=ss.default=jx;const Sf=()=>({getAllWorkflow:()=>on.default.get("/v1/workflows").then(n=>n.data),getWorkflow:n=>on.default.get(`/v1/workflow?id=${n}`).then(r=>r.data)}),us=(e,t)=>{const{getWorkflow:n}=Sf();return nn.useQuery(["/v1/workflow",e],()=>e&&n(e),{refetchOnWindowFocus:!1,...t})},$x=e=>{const{getAllWorkflow:t}=Sf();return nn.useQuery("/v1/workflows",t,{refetchOnWindowFocus:!1,...e})},Rx=e=>{const{t}=Je.useTranslation("snackMessage"),{open:n}=ns(),{currentTree:r,setCurrentTree:i,dispatchTree:o}=at(),[a,s]=W.useState("");us(a,{enabled:!!a&&!e&&a!==r.id,onError:()=>n(t("error.fetchTree",{ns:"snackMessage"}),"error"),onSuccess:({id:v,label:p,workflow:g})=>{e||(i({id:v,name:p}),o(Ef(g)))}});const{data:u,isLoading:l,refetch:c}=$x({enabled:!1,keepPreviousData:!0,onError:()=>{n(t("error.fetchTree"),"error")},onSuccess:()=>{r.id&&!a&&s(r.id)}}),d=async({target:v})=>{const{value:p}=v;if(p==="add-new-tree"){s(""),i({name:""}),o(yx());return}s(p)},f=()=>h(),h=()=>c();return{currentTree:r,fetchWorkflowSuggestions:h,handleChangeTree:d,handleOnOpen:f,setTreeSelected:s,treeSelected:a,workflowsSuggestions:u,workflowsSuggestionsLoading:l}},Af={formControl:{flex:1},select:{".MuiOutlinedInput-notchedOutline":{border:0,paddingLeft:5},".MuiSelect-select":{opacity:0,width:0},boxShadow:"none"}},If=({arrowOnly:e,required:t,size:n,showBtnAddNewTree:r,onChange:i,value:o})=>{const a=W.useMemo(()=>!!i,[i]),{t:s}=Je.useTranslation("form"),{handleChangeTree:u,handleOnOpen:l,workflowsSuggestions:c,workflowsSuggestionsLoading:d,treeSelected:f}=Rx(a);return oe(S.FormControl,{size:n,required:t,sx:Af.formControl,children:[!e&&M(S.InputLabel,{children:s("tree")}),oe(S.Select,{value:a?o:f,id:"tree-select",onChange:h=>a?i==null?void 0:i(h):u(h),sx:e?Af.select:void 0,label:s("tree"),onOpen:l,children:[d&&M(S.MenuItem,{children:M(S.Skeleton,{width:"100%"})}),c==null?void 0:c.map(({label:h,id:v})=>M(S.MenuItem,{value:v,children:h},v)),r&&M(S.MenuItem,{disabled:!0,children:M(S.Box,{sx:{height:1,width:"100%"},children:M(S.Divider,{})})}),r&&oe(S.MenuItem,{value:"add-new-tree",children:[M(S.Typography,{mr:1,children:s("newTree")}),M(Cf,{color:"primary"})]})]})]})},Lx=({helperText:e,hiddenValue:t,isHiddenField:n,isTreeField:r,treeSelected:i,handleChangeTreeSelect:o,handleChangeHelperText:a,handleChangeHiddenValue:s})=>{const{t:u}=Je.useTranslation(["translation","form"]);return r?M(If,{required:!0,value:i,onChange:o}):n?M(S.TextField,{required:!0,sx:{flex:1},label:u("hiddenValue",{ns:"form"}),onChange:s,value:t}):M(S.TextField,{sx:{flex:1},label:u("helperText",{ns:"form"}),onChange:a,value:e})},zf=e=>new Set([...e]).size===e.length,Px=(e,t,n)=>{const r=[...e,t];return zf(n?r.filter(i=>i!==n):r)},Fx=()=>{var In,Fi,Ui,Yi,qi,Vi,Bi,Qi,zn,xr,zt,kn,jn;const e=W.useMemo(()=>[{id:"0",label:"",message:"",value:""}],[]),{tree:t,dispatchTree:n,currentHierarchyPointNode:r,modalOpen:i,treePath:o,setModalOpen:a}=at(),{open:s}=ns(),{t:u}=Je.useTranslation(),[l,c]=W.useState(e),[d,f]=W.useState(""),[h,v]=W.useState(""),[p,g]=W.useState(""),[x,w]=W.useState(!1),[T,b]=W.useState(!1),[y,C]=W.useState("text"),[I,O]=W.useState(""),[E,D]=W.useState(""),[k,m]=W.useState(""),[N,z]=W.useState({off:"",on:""}),[R,L]=W.useState(!1),[V,q]=W.useState(""),ee=i==="edit",A=y==="tree",$=y==="hidden",G=_r.some(F=>F.type===y&&(F==null?void 0:F.isBooleanField)),B=_r.some(F=>F.type===y&&(F==null?void 0:F.isDecisionField)),U=_r.some(F=>F.type===y&&(F==null?void 0:F.isRequiredDisabled)),X=_r.some(F=>F.type===y&&(F==null?void 0:F.isRepeatableDisabled)),K=F=>!B&&F>0,{refetch:J,isLoading:Z}=us(I,{enabled:!1,onError:()=>{s(u("error.fetchTree",{ns:"snackMessage"}),"error")}}),ne=(F,_e)=>{c(de=>de.map(Ne=>{const{id:Fe}=Ne;return F.target.dataset.id===Fe?{...Ne,id:Fe,[_e]:F.target.value}:{...Ne}}))},te=F=>{v(F.target.value)},ze=F=>{g(F.target.value)},Y=F=>{ne(F,"label")},Ke=F=>{ne(F,"value")},Q=F=>{ne(F,"message")},lt=F=>{m(F.target.value)},vt=F=>{var tt;const{value:_e}=F.target;if(f(F.target.value),!t||!_e){q("");return}const de=ee&&(r==null?void 0:r.data.name),Ne=(tt=o==null?void 0:o.at(-1))==null?void 0:tt.path,Fe=Sn(t,Ne),He=Tf(Fe);if(Px(He,_e,de)){q("");return}q(u("mustBeUnique",{ns:"form"}))},en=F=>{w(F.target.checked)},ji=F=>{b(F.target.checked)},An=F=>{L(F.target.checked)},_s=F=>{C(F.target.value),b(!1),w(!1),L(!1)},bs=F=>{O(F.target.value)},br=F=>_e=>{z(de=>({...de,[F]:_e.target.value}))},xs=F=>{D(F.target.value)},Ms=()=>{c(F=>{const _e=Number(F[F.length-1].id),de=String(_e+1);return[...F,{...e[0],id:de}]})},$i=F=>{c(_e=>_e.filter(({id:de})=>F!==de))},Ri=(F,_e)=>{var Ne,Fe,He;const de=(He=(Fe=(Ne=F==null?void 0:F.children)==null?void 0:Ne[_e])==null?void 0:Fe.data)==null?void 0:He.children;return de?de.map(({name:pt,attributes:tt,children:yt})=>({attributes:tt,children:yt,name:pt})):[]},tn=F=>{var _e;return T?(_e=l==null?void 0:l.filter((de,Ne)=>!K(Ne)))==null?void 0:_e.map(({message:de,value:Ne,label:Fe},He)=>{const pt=`${d}:${Ne}`,tt=Ri(r,He);return{attributes:{depth:F+1,label:Fe,value:Ne,...de&&{message:de},...tt.length===0&&{isLeaf:!0}},children:tt,name:pt}}):[]},ws=F=>F.map(({message:_e,...de})=>({...de,..._e&&{message:_e}})),Li=(F,_e,de)=>{var Ne;return F&&(!_e||de)?J():F&&_e&&!de?{data:{workflow:(Ne=r==null?void 0:r.data.attributes)==null?void 0:Ne.tree},isError:null}:{data:null,isError:null}},Pi=async F=>{var j,P,H,se;F.preventDefault();const{on:_e,off:de}=N,Ne=((j=r==null?void 0:r.data)==null?void 0:j.name)||"",Fe=(r==null?void 0:r.depth)||0,He=i==="edit",pt=Fe+(He||r===null?0:1),tt=tn(pt),yt=(P=o==null?void 0:o.at(-1))==null?void 0:P.path,$n=o.length?`${yt}/${d}`:`/${d}`,Rn=((se=(H=r==null?void 0:r.data.attributes)==null?void 0:H.tree)==null?void 0:se.treeId)!==I,{data:Bt,isError:Ln}=await Li(A,He,Rn);if(Ln)return;const _={attributes:{depth:pt,label:p,type:y,...E&&{helperText:E},...(de||_e)&&{messages:{...de&&{off:de},..._e&&{on:_e}}},...A&&{tree:{...Bt==null?void 0:Bt.workflow,treeId:I},treePath:$n},...T&&{isDecision:T},...B&&!T&&{values:ws(l)},...x&&{required:x},...k&&{step:k},...R&&{repeatable:R},...$&&{hiddenValue:h}},children:tt,name:d};n(He?mx(yt||"",Ne,_):gx(yt||null,Ne,_)),a(null)};return W.useEffect(()=>{var F,_e,de,Ne,Fe,He,pt,tt,yt,$n,Rn,Bt,Ln,_,j,P,H,se,be;if(i==="edit"){const re=((_e=(F=r==null?void 0:r.data)==null?void 0:F.attributes)==null?void 0:_e.values)||((Fe=(Ne=(de=r==null?void 0:r.data)==null?void 0:de.children)==null?void 0:Ne.filter(({attributes:Ae})=>!(Ae!=null&&Ae.type)))==null?void 0:Fe.map(({attributes:Ae},Ee)=>{const{label:Ce,value:nt,message:kt}=Ae||{};return{id:String(Ee),label:String(Ce),value:String(nt),...kt&&{message:String(kt)}}}));f((r==null?void 0:r.data.name)||""),C(((He=r==null?void 0:r.data.attributes)==null?void 0:He.type)||"text"),D(((pt=r==null?void 0:r.data.attributes)==null?void 0:pt.helperText)||""),w(((tt=r==null?void 0:r.data.attributes)==null?void 0:tt.required)||!1),m(((yt=r==null?void 0:r.data.attributes)==null?void 0:yt.step)||""),g((($n=r==null?void 0:r.data.attributes)==null?void 0:$n.label)||""),b(((Rn=r==null?void 0:r.data.attributes)==null?void 0:Rn.isDecision)||!1),c(re!=null&&re.length?re:e),z({off:((Ln=(Bt=r==null?void 0:r.data.attributes)==null?void 0:Bt.messages)==null?void 0:Ln.off)||"",on:((j=(_=r==null?void 0:r.data.attributes)==null?void 0:_.messages)==null?void 0:j.on)||""}),O(((H=(P=r==null?void 0:r.data.attributes)==null?void 0:P.tree)==null?void 0:H.treeId)||""),L(((se=r==null?void 0:r.data.attributes)==null?void 0:se.repeatable)||!1),v(((be=r==null?void 0:r.data.attributes)==null?void 0:be.hiddenValue)||"")}},[(Fi=(In=r==null?void 0:r.data.attributes)==null?void 0:In.tree)==null?void 0:Fi.treeId,(Ui=r==null?void 0:r.data.attributes)==null?void 0:Ui.messages,(Yi=r==null?void 0:r.data.attributes)==null?void 0:Yi.helperText,(qi=r==null?void 0:r.data.attributes)==null?void 0:qi.isDecision,(Vi=r==null?void 0:r.data.attributes)==null?void 0:Vi.label,(Bi=r==null?void 0:r.data.attributes)==null?void 0:Bi.required,(Qi=r==null?void 0:r.data.attributes)==null?void 0:Qi.step,(zn=r==null?void 0:r.data.attributes)==null?void 0:zn.type,(xr=r==null?void 0:r.data.attributes)==null?void 0:xr.values,(zt=r==null?void 0:r.data)==null?void 0:zt.children,r==null?void 0:r.data.name,(kn=r==null?void 0:r.data.attributes)==null?void 0:kn.repeatable,(jn=r==null?void 0:r.data.attributes)==null?void 0:jn.hiddenValue,e,i]),{getDisabledValueField:K,handleAddValue:Ms,handleChangeHelperText:xs,handleChangeHiddenValue:te,handleChangeIsDecisionField:ji,handleChangeLabel:ze,handleChangeMessage:br,handleChangeName:vt,handleChangeOptionLabel:Y,handleChangeOptionMessage:Q,handleChangeOptionValue:Ke,handleChangeRepeatable:An,handleChangeRequired:en,handleChangeStep:lt,handleChangeTreeSelect:bs,handleChangeType:_s,handleDeleteValue:$i,handleSubmit:Pi,helperText:E,hiddenValue:h,isBooleanField:G,isDecision:T,isDecisionField:B,isHiddenField:$,isRepeatableDisabled:X,isRequiredDisabled:U,isTreeField:A,isWorkflowLoading:Z,label:p,messages:N,name:d,repeatable:R,required:x,step:k,treeSelected:I,type:y,uniqueNameErrorMessage:V,values:l}},kf={marginRight:"-20px !important",minWidth:"auto !important"},jf={iconButton:kf,iconButtonDelete:{...kf,"&:before":{borderRadius:"50%",content:'""',height:20,position:"absolute",width:20,zIndex:-1},backgroundColor:xe.backgroundPrimary,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)"}},Ux=({onClose:e})=>{const{t}=Je.useTranslation(["translation","form"]),{values:n,required:r,name:i,uniqueNameErrorMessage:o,type:a,helperText:s,label:u,hiddenValue:l,isBooleanField:c,isDecision:d,isDecisionField:f,isHiddenField:h,isRequiredDisabled:v,isRepeatableDisabled:p,isTreeField:g,treeSelected:x,isWorkflowLoading:w,repeatable:T,messages:{on:b,off:y},handleChangeTreeSelect:C,handleChangeHelperText:I,handleChangeOptionMessage:O,handleChangeRequired:E,handleChangeName:D,handleChangeType:k,handleChangeIsDecisionField:m,handleChangeOptionLabel:N,handleDeleteValue:z,handleChangeOptionValue:R,handleChangeMessage:L,handleSubmit:V,handleAddValue:q,handleChangeLabel:ee,handleChangeRepeatable:A,handleChangeHiddenValue:$}=Fx();return oe("form",{onSubmit:V,children:[oe(S.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[M(S.TextField,{sx:{flex:1},label:t("label",{ns:"form"}),onChange:ee,value:u,required:!0}),M(S.TextField,{label:t("name"),sx:{flex:1},onChange:D,value:i,error:!!o,helperText:o,required:!0})]}),oe(S.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[M(Ax,{value:a,onChange:k}),M(Lx,{helperText:s,hiddenValue:l,isHiddenField:h,isTreeField:g,treeSelected:x,handleChangeTreeSelect:C,handleChangeHelperText:I,handleChangeHiddenValue:$})]}),c&&oe(S.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[M(S.TextField,{sx:{flex:1},label:t("onMessage",{ns:"form"}),onChange:L("on"),value:b}),M(S.TextField,{sx:{flex:1},label:t("offMessage",{ns:"form"}),onChange:L("off"),value:y})]}),oe(S.Stack,{paddingY:1,children:[M(S.FormGroup,{children:M(S.FormControlLabel,{disabled:p,control:M(S.Checkbox,{checked:T,onChange:A}),label:t("repeatable",{ns:"form"})})}),M(S.FormGroup,{children:M(S.FormControlLabel,{disabled:v,control:M(S.Checkbox,{checked:r,onChange:E}),label:t("required")})}),M(S.FormGroup,{children:M(S.FormControlLabel,{disabled:!f,control:M(S.Checkbox,{checked:d,onChange:m}),label:t("decisionField",{ns:"form"})})})]}),f&&oe(wr,{children:[M("h4",{children:t("values")}),n==null?void 0:n.map(({value:G,label:B,id:U,message:X})=>oe(S.Stack,{direction:{sm:"row",xs:"column"},spacing:1,paddingY:1,position:"relative",children:[M(S.TextField,{label:t("label",{ns:"form"}),sx:{flex:1},onChange:N,value:B,inputProps:{"data-id":U},required:!0}),M(S.TextField,{label:t("value",{ns:"form"}),sx:{flex:1},onChange:R,value:G,inputProps:{"data-id":U},required:!0}),M(S.TextField,{label:"Message",sx:{flex:1},onChange:O,value:X,inputProps:{"data-id":U}}),n.length>1&&M(S.Button,{color:"warning",sx:jf.iconButtonDelete,"data-id":U,onClick:()=>z(U),children:M(Of,{})})]},U))]}),f&&M(S.Box,{justifyContent:"flex-end",display:"flex",children:M(S.Button,{color:"success",sx:jf.iconButton,onClick:q,children:M(Df,{})})}),oe(S.Stack,{spacing:2,direction:"row",justifyContent:"flex-end",paddingTop:3,children:[M(S.Button,{variant:"text",onClick:e,children:t("cancel")}),M(S.Button,{variant:"contained",type:"submit",disabled:!!o||w,children:w?M(S.CircularProgress,{size:14}):t("validate")})]})]})};var ls={},Yx=Se.exports;Object.defineProperty(ls,"__esModule",{value:!0});var $f=ls.default=void 0,qx=Yx(Le()),Vx=Pe,Bx=(0,qx.default)((0,Vx.jsx)("path",{d:"M17 11h3c1.11 0 2-.9 2-2V5c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1H9.01V5c0-1.11-.9-2-2-2H4c-1.1 0-2 .9-2 2v4c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2V8h2v7.01c0 1.65 1.34 2.99 2.99 2.99H15v1c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2v-4c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1h-1.01c-.54 0-.99-.45-.99-.99V8h2v1c0 1.1.9 2 2 2z"}),"AccountTreeRounded");$f=ls.default=Bx;var cs={},Qx=Se.exports;Object.defineProperty(cs,"__esModule",{value:!0});var Rf=cs.default=void 0,Wx=Qx(Le()),Gx=Pe,Kx=(0,Wx.default)((0,Gx.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 10h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1z"}),"AddBoxRounded");Rf=cs.default=Kx;var fs={},Hx=Se.exports;Object.defineProperty(fs,"__esModule",{value:!0});var Lf=fs.default=void 0,Xx=Hx(Le()),Jx=Pe,Zx=(0,Xx.default)((0,Jx.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v10zM9 9h6c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H9c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1zm6.5-5-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1h-2.5z"}),"DeleteOutlineRounded");Lf=fs.default=Zx;var ds={},e2=Se.exports;Object.defineProperty(ds,"__esModule",{value:!0});var Pf=ds.default=void 0,t2=e2(Le()),n2=Pe,r2=(0,t2.default)((0,n2.jsx)("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1c-.1.1-.15.22-.15.36zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"EditRounded");Pf=ds.default=r2;var hs={},i2=Se.exports;Object.defineProperty(hs,"__esModule",{value:!0});var Ff=hs.default=void 0,o2=i2(Le()),a2=Pe,s2=(0,o2.default)((0,a2.jsx)("path",{d:"M12 3c-4.8 0-9 3.86-9 9 0 2.12.74 4.07 1.97 5.61l-1.68 1.68c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l1.68-1.68C7.93 20.26 9.88 21 12 21c2.3 0 4.61-.88 6.36-2.64C20.12 16.61 21 14.3 21 12V5c0-1.1-.9-2-2-2h-7zm3.83 9.26-5.16 4.63c-.16.15-.41.14-.56-.01-.14-.14-.16-.36-.04-.52l2.44-3.33-4.05-.4c-.44-.04-.63-.59-.3-.89l5.16-4.63c.16-.15.41-.14.56.01.14.14.16.36.04.52l-2.44 3.33 4.05.4c.45.04.63.59.3.89z"}),"EnergySavingsLeafRounded");Ff=hs.default=s2;var ps={},u2=Se.exports;Object.defineProperty(ps,"__esModule",{value:!0});var Uf=ps.default=void 0,l2=u2(Le()),Yf=Pe,c2=(0,l2.default)([(0,Yf.jsx)("path",{d:"M14.14 12h-.06c.81 0 1.28-.91.82-1.57L9.82 3.17c-.4-.57-1.24-.57-1.64 0L3.1 10.43c-.46.66.01 1.57.82 1.57h-.06L.99 16.46c-.43.66.05 1.54.84 1.54H7v2c0 1.1.9 2 2 2s2-.9 2-2v-2h5.17c.79 0 1.27-.88.84-1.54L14.14 12z"},"0"),(0,Yf.jsx)("path",{d:"M23.01 16.46 20.14 12h-.06c.81 0 1.28-.91.82-1.57l-5.08-7.26c-.4-.57-1.24-.57-1.64 0l-1.57 2.24 3.11 4.44c.43.61.48 1.41.14 2.07-.08.16-.18.3-.3.43l2.29 3.57c.4.62.42 1.4.07 2.04-.01.02-.02.03-.03.04h4.28c.79 0 1.27-.88.84-1.54zM13 20c0 1.1.9 2 2 2s2-.9 2-2v-1h-4v1z"},"1")],"ForestRounded");Uf=ps.default=c2;var gs={},f2=Se.exports;Object.defineProperty(gs,"__esModule",{value:!0});var qf=gs.default=void 0,d2=f2(Le()),h2=Pe,p2=(0,d2.default)((0,h2.jsx)("path",{d:"M12 4V2.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V6c3.31 0 6 2.69 6 6 0 .79-.15 1.56-.44 2.25-.15.36-.04.77.23 1.04.51.51 1.37.33 1.64-.34.37-.91.57-1.91.57-2.95 0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-.79.15-1.56.44-2.25.15-.36.04-.77-.23-1.04-.51-.51-1.37-.33-1.64.34C4.2 9.96 4 10.96 4 12c0 4.42 3.58 8 8 8v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36V18z"}),"LoopRounded");qf=gs.default=p2;var ms={},g2=Se.exports;Object.defineProperty(ms,"__esModule",{value:!0});var Vf=ms.default=void 0,m2=g2(Le()),v2=Pe,y2=(0,m2.default)((0,v2.jsx)("path",{d:"M16.96 12h.08c.81 0 1.28-.91.82-1.57l-5.08-7.25c-.4-.57-1.24-.57-1.64 0L6.1 10.43c-.46.66.02 1.57.83 1.57h.04l-2.9 4.46c-.44.66.04 1.54.84 1.54h5.08v2.02c0 1.09.89 1.98 1.98 1.98 1.09 0 1.98-.89 1.98-1.98V18h5.15c.8 0 1.28-.89.83-1.55L16.96 12z"}),"ParkRounded");Vf=ms.default=y2;var vs={},_2=Se.exports;Object.defineProperty(vs,"__esModule",{value:!0});var Bf=vs.default=void 0,b2=_2(Le()),x2=Pe,M2=(0,b2.default)((0,x2.jsx)("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24zM2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0zM12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5zm2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64l2.64 2.64z"}),"VisibilityOffRounded");Bf=vs.default=M2;var ys={},w2=Se.exports;Object.defineProperty(ys,"__esModule",{value:!0});var Qf=ys.default=void 0,T2=w2(Le()),N2=Pe,E2=(0,T2.default)((0,N2.jsx)("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"VisibilityRounded");Qf=ys.default=E2;const je={actionButton:{minWidth:"auto !important"},container:{background:xe.backgroundPrimary,borderRadius:"1rem"},containerField:{background:xe.backgroundPrimary,border:`solid 1px ${xe.primaryMain}`,borderRadius:"1rem"},containerHidden:{background:xe.backgroundPrimary,border:`solid 1px ${xe.error}`,borderRadius:"1rem"},containerTree:{background:xe.tertiaryMain,border:`solid 1px ${xe.primaryMain}`,borderRadius:"1rem"},containerValue:{background:xe.backgroundPrimary,border:`solid 1px ${xe.secondaryMain}`,borderRadius:"1rem"},icon:{color:xe.grey500},nodeSvg:{stroke:"transparent !important"},stepChip:{fontSize:".7rem !important",fontWeight:"bold",height:"20px !important"},title:{display:"-webkit-box",margin:0,overflow:"hidden",textAlign:"right",textOverflow:"ellipsis",webkitBoxOrient:"vertical",webkitLineClamp:2}},D2=e=>{const t=!!e,n=e==="tree";return e==="hidden"?je.containerHidden:n?je.containerTree:t?je.containerField:je.containerValue},O2=({nodeDatum:e,onAddChildren:t,onEditChildren:n,onDeleteChildren:r,onOpenTreeModal:i,hierarchyPointNode:o,size:a=220})=>{var y;const{t:s}=Je.useTranslation(["translation","form"]),{attributes:u}=e||{},{isRoot:l,isLeaf:c,required:d,step:f,type:h,label:v,repeatable:p}=u||{},g=!!h,x=h==="tree",w=h==="hidden",T=!g,b=!l&&!c;return oe("g",{children:[M(S.GlobalStyles,{styles:{".rd3t-node svg":je.nodeSvg}}),M("foreignObject",{height:a,width:a,x:`-${a/2}`,y:`-${a/2}`,style:D2(h),children:oe(S.Box,{flex:1,display:"flex",p:2,height:"100%",flexDirection:"column",justifyContent:"space-between",children:[oe(S.Stack,{alignItems:"flex-end",spacing:.5,children:[g&&oe(S.Stack,{direction:"row",spacing:1,alignItems:"center",children:[f&&M(S.Tooltip,{title:`${s("step",{ns:"form"})} ${(y=e==null?void 0:e.attributes)==null?void 0:y.step}`,placement:"left",arrow:!0,children:M(S.Chip,{color:"primary",size:"small",label:f,sx:je.stepChip})}),M(S.Typography,{variant:"subtitle2",sx:je.title,children:M("strong",{children:v})})]}),g&&M(S.Chip,{color:"info",size:"small",label:s(`type.${h}`,{ns:"form"})}),d&&M(S.Stack,{direction:"row",spacing:.5,children:d&&M(S.Chip,{color:"warning",size:"small",variant:"outlined",label:`${s("required")}`})}),M(S.Stack,{spacing:.5,alignItems:"flex-end",children:T&&M(S.Typography,{variant:"subtitle2",sx:je.title,children:M("strong",{children:v})})}),oe(S.Box,{paddingTop:.5,children:[w&&M(S.Tooltip,{title:s("isAHidden"),placement:"bottom",arrow:!0,children:M(Bf,{style:je.icon})}),p&&M(S.Tooltip,{title:s("isARepeatable"),placement:"bottom",arrow:!0,children:M(qf,{style:je.icon})}),c&&M(S.Tooltip,{title:s("isALeaf"),placement:"bottom",arrow:!0,children:M(Ff,{style:je.icon})}),l&&M(S.Tooltip,{title:s("isTheRoot"),placement:"bottom",arrow:!0,children:M(Vf,{style:je.icon})}),b&&M(S.Tooltip,{title:s("isABranch"),placement:"bottom",arrow:!0,children:M($f,{style:je.icon})}),x&&M(S.Tooltip,{title:s("isATree"),placement:"bottom",arrow:!0,children:M(Uf,{style:je.icon})})]})]}),oe(S.Stack,{direction:"row",justifyContent:"flex-end",spacing:0,alignSelf:"flex-end",children:[!l&&M(S.Tooltip,{title:s("remove"),arrow:!0,children:M(S.Button,{variant:"text",sx:je.actionButton,size:"small",color:"error",onClick:()=>r==null?void 0:r(o),children:M(Lf,{})})}),!T&&M(S.Tooltip,{title:s("edit"),arrow:!0,children:M(S.Button,{variant:"text",color:"secondary",sx:je.actionButton,size:"small",onClick:()=>n==null?void 0:n(o),children:M(Pf,{})})}),c&&M(S.Tooltip,{title:s("add"),arrow:!0,children:M(S.Button,{variant:"text",color:"success",sx:je.actionButton,size:"small",onClick:()=>t==null?void 0:t(o),children:M(Rf,{})})}),x&&M(S.Tooltip,{title:s("show"),arrow:!0,children:M(S.Button,{variant:"text",color:"info",sx:je.actionButton,size:"small",onClick:()=>i==null?void 0:i(o),children:M(Qf,{})})})]})]})})]})},C2=W.memo(O2),Wf=()=>{const{setModalOpen:e,setCurrentHierarchyPointNode:t,setTreeModalOpen:n,setTreePath:r}=at();return{handleAddChildren:l=>{t(l),e("add")},handleCloseTreeModal:()=>{r([]),n(!1)},handleDeleteChildren:l=>{t(l),e("delete")},handleEditChildren:l=>{t(l),e("edit")},handleOpenTreeModal:l=>{var d,f;const c={label:l==null?void 0:l.data.attributes.label,path:((f=(d=l==null?void 0:l.data)==null?void 0:d.attributes)==null?void 0:f.treePath)||""};r(h=>[...h,c]),n(!0)}}},S2=({nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:i,onNodeMouseOut:o})=>{const{handleDeleteChildren:a,handleEditChildren:s,handleAddChildren:u,handleOpenTreeModal:l}=Wf();return M(C2,{nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:i,onNodeMouseOut:o,onAddChildren:u,onOpenTreeModal:l,onDeleteChildren:a,onEditChildren:s})},Gf=({nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:i,onNodeMouseOut:o})=>M(S2,{nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:i,onNodeMouseOut:o}),A2=()=>{const{currentHierarchyPointNode:e,modalOpen:t,setModalOpen:n}=at(),{t:r}=Je.useTranslation(["modal","snackMessage"]),i=t==="edit";return{closeModal:()=>n(null),getTitleModalDelete:()=>{var f,h;const d=(h=(f=e==null?void 0:e.data)==null?void 0:f.attributes)==null?void 0:h.label;return r("deleteTitle",{name:d,ns:"modal"})},getTitleModalMutation:()=>{var h;const d=(h=e==null?void 0:e.data)==null?void 0:h.attributes.label;return d?r(i?"editTitle":"addTitle",{name:d,ns:"modal"}):r("addFirstTitle",{name:d,ns:"modal"})},isDeleteModal:t==="delete",isModalMutationOpen:i||t==="add"}},I2=()=>{const{currentTree:e,setCurrentTree:t,tree:n}=at(),{name:r,errorName:i,id:o}=e;return{disabled:!!e.id&&!n,errorName:i,handleChangeName:u=>{const{value:l}=u.target;if(!l){t(c=>({...c,errorName:"Champs requis",name:u.target.value}));return}t(c=>({...c,errorName:"",name:u.target.value}))},id:o,name:r}},z2=()=>{const{t:e}=Je.useTranslation("form"),{name:t,handleChangeName:n,errorName:r,disabled:i}=I2();return M(S.TextField,{required:!0,label:e("treeName"),size:"small",onChange:n,value:t,error:!!r,disabled:i})},k2=()=>{var h,v;const{tree:e,treeModalOpen:t,treePath:n,endPoint:r}=at(),{handleCloseTreeModal:i}=Wf(),{getTitleModalMutation:o,closeModal:a,getTitleModalDelete:s,isModalMutationOpen:u,isDeleteModal:l}=A2(),c=(h=n==null?void 0:n.at(-1))==null?void 0:h.path,d=(v=n==null?void 0:n.at(-1))==null?void 0:v.label,f=e&&Sn(e,c);return oe(wr,{children:[oe(ox,{children:[M(nx,{children:oe(S.Stack,{justifyContent:"space-between",direction:"row",alignItems:"center",children:[M(xd,{}),!!r&&oe(S.Stack,{direction:"row",alignItems:"center",spacing:2,children:[M(z2,{}),M(If,{size:"small",arrowOnly:!0,showBtnAddNewTree:!0})]})]})}),M(ix,{children:M(ac,{data:e,renderCustomNodeElement:Gf})}),M(sx,{children:M(tv,{value:e})}),M(ex,{children:M(Vb,{value:e})})]}),M(bf,{open:u,onClose:a,title:o(),children:M(Ux,{onClose:a})}),M(bf,{open:l,onClose:a,title:s(),children:M(xx,{onClose:a})}),M(Jb,{open:t,onClose:i,title:d,children:f&&M(ac,{data:f,renderCustomNodeElement:Gf})})]})},j2="0.6.1",$2=({children:e,endPoint:t,initialTree:n,initialTreeId:r})=>{const[i,o]=W.useState(qt.currentHierarchyPointNode),[a,s]=W.useState(qt.modalOpen),[u,l]=W.useState(qt.treeModalOpen),[c,d]=W.useState(qt.treePath),[f,h]=W.useReducer(_x,n||qt.tree),[v,p]=W.useState(r?{...qt.currentTree,id:r}:qt.currentTree),g=W.useMemo(()=>({currentHierarchyPointNode:i,currentTree:v,dispatchTree:h,endPoint:t,modalOpen:a,setCurrentHierarchyPointNode:o,setCurrentTree:p,setModalOpen:s,setTreeModalOpen:l,setTreePath:d,tree:f,treeModalOpen:u,treePath:c,version:j2}),[i,a,u,c,f,v,t]);return us(v.id,{enabled:!!r,onSuccess:async x=>{!x||(p({id:x==null?void 0:x.id,name:x==null?void 0:x.label}),h(Ef((x==null?void 0:x.workflow)||null)))}}),M(ic.Provider,{value:g,children:e})},R2={createTree:"Create Tree",downloadJSONFile:"Download JSON File",save:"Save",update:"Update"},L2={decisionFields:"Decision fields",helperText:"Helper text",hiddenValue:"Hidden value",label:"Label",mustBeUnique:"Must be unique",newTree:"Nouvel arbre",offMessage:"Message (disable)",onMessage:"Message (enable)",repeatable:"Repeatable",staticFields:"Static fields",step:"Step",tree:"Tree",treeName:"Tree name",type:{address:"Address",checkbox:"Checkbox",date:"Date",email:"Email",file:"File",number:"Number",password:"Password",radio:"Radio",select:"Select",switch:"Switch",tel:"Tel",time:"Time",text:"Text",hidden:"Hidden field",tree:"Tree",url:"URL"},value:"Value",values:"Values"},P2={saveTree:"Save a Tree",addFirstTitle:"Add a field",addTitle:"Add a field to \xAB {{name}} \xBB",deleteTitle:"Are you sure to delete \xAB {{name}} \xBB",editTitle:"Edit field \xAB {{name}} \xBB"},F2={error:{saveTree:"An error has occurred. Please try again",updateTree:"An error has occurred. Please try again",fetchTree:"An error has occurred. Please try again"},success:{saveTree:"Tree registered",updateTree:"Tree updated"}},U2={add:"Add",cancel:"Cancel",disabled:"Disabled",edit:"Edit",isALeaf:"Is a leaf",isAHidden:"Is a hidden field",isARepeatable:"Is a repeatable",isABranch:"Is a branch",isATree:"Is a tree",isTheRoot:"Is the root",label:"Label",name:"Name",remove:"Remove",required:"Required",save:"Save",show:"Show",type:"Type",validate:"Validate",value:"Value",values:"Values"},Y2={createTree:"Cr\xE9er un arbre",downloadJSONFile:"T\xE9l\xE9charger le fichier JSON",save:"Enregistrer",update:"Modifier"},q2={decisionField:"Champs de d\xE9cision",helperText:"Texte d'information",hiddenValue:"Valeur cach\xE9",label:"Label",mustBeUnique:"Doit \xEAtre unique",newTree:"Nouvel arbre",offMessage:"Message (d\xE9sactiver)",onMessage:"Message (activer)",repeatable:"R\xE9p\xE9table",staticFields:"Champs statiques",step:"\xC9tape",tree:"Arbre",treeName:"Nom de l'arbre",type:{address:"Adresse",checkbox:"Case \xE0 cocher",date:"Date",email:"Email",file:"Fichier",number:"Nombre",password:"Mot de passe",radio:"Radio",select:"Select",switch:"Switch",tel:"T\xE9l\xE9phone",time:"Temps",text:"Texte",hidden:"Champs cach\xE9",tree:"Arbre",url:"URL"},value:"Valeur",values:"Valeurs"},V2={saveTree:"Enregistrer l'arbre",addFirstTitle:"Ajouter un champ",addTitle:"Ajouter un champ \xE0 \xAB {{name}} \xBB",deleteTitle:"Voulez vraiment supprimer \xAB {{name}} \xBB",editTitle:"\xC9diter le champ \xAB {{name}} \xBB"},B2={error:{saveTree:"Une erreur est survenue veuillez r\xE9essayer",updateTree:"Une erreur est survenue veuillez r\xE9essayer",fetchTree:"Une erreur est survenue veuillez r\xE9essayer"},success:{saveTree:"Arbre enregistr\xE9",updateTree:"Arbre mis \xE0 jour"}},Q2={add:"Ajouter",cancel:"Annuler",disabled:"D\xE9sactiv\xE9",edit:"\xC9diter",isALeaf:"Est une feuille",isAHidden:"Est un champs cach\xE9",isARepeatable:"Est r\xE9p\xE9table",isABranch:"Est une branche",isATree:"Est un arbre",isTheRoot:"Est la racine",label:"Label",name:"Nom",remove:"Supprimer",required:"Requis",save:"Enregistrer",show:"Afficher",type:"Type",validate:"Valider",value:"Valeur",values:"Valeurs"};od.default.use(ad.default).use(Je.initReactI18next).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!1},resources:{en:{button:R2,form:L2,modal:P2,snackMessage:F2,translation:U2},fr:{button:Y2,form:q2,modal:V2,snackMessage:B2,translation:Q2}}}).then();const W2=({authToken:e,endPoint:t,initialTree:n,initialTreeId:r})=>(W.useLayoutEffect(()=>{on.default.defaults.baseURL=t,on.default.defaults.headers.common.Authorization=`Bearer ${e}`},[t,e]),M(nn.QueryClientProvider,{client:dd,children:M(gd,{authToken:e,children:M($2,{endPoint:t,initialTree:n,initialTreeId:r,children:M(fd,{children:M(_d,{children:M(k2,{})})})})})}));ke.TreePlusIcon=rc,ke.Treege=W2,Object.defineProperties(ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
165
+ `)),bc.configure(e)}},capitalize:wt,createChainedFunction:sv,createSvgIcon:Db,debounce:uv,deprecatedPropType:lv,isMuiElement:cv,ownerDocument:dc,ownerWindow:fv,requirePropFactory:dv,setRef:hc,unstable_useEnhancedEffect:pc,unstable_useId:pv,unsupportedProp:gv,useControlled:mv,useEventCallback:vv,useForkRef:yv,useIsFocusVisible:Nv},Symbol.toStringTag,{value:"Module"})));var gf;function Le(){return gf||(gf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=Ob}(Da)),Da}const Pe=$t(cd);var Cb=Se.exports;Object.defineProperty(Ea,"__esModule",{value:!0});var mf=Ea.default=void 0,Sb=Cb(Le()),Ab=Pe,Ib=(0,Sb.default)((0,Ab.jsx)("path",{d:"m20.41 6.41-2.83-2.83c-.37-.37-.88-.58-1.41-.58H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h7.4l8.6-8.6V7.83c0-.53-.21-1.04-.59-1.42zM12 18c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-9c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h7c.55 0 1 .45 1 1v2zm4.99 7.25 1.77 1.77-4.84 4.84c-.1.09-.23.14-.36.14H15.5c-.28 0-.5-.22-.5-.5v-1.06c0-.13.05-.26.15-.35l4.84-4.84zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71z"}),"SaveAsRounded");mf=Ea.default=Ib;var es={},zb=Se.exports;Object.defineProperty(es,"__esModule",{value:!0});var vf=es.default=void 0,kb=zb(Le()),jb=Pe,$b=(0,kb.default)((0,jb.jsx)("path",{d:"M17.59 3.59c-.38-.38-.89-.59-1.42-.59H5c-1.11 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7.83c0-.53-.21-1.04-.59-1.41l-2.82-2.83zM12 19c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm1-10H7c-1.1 0-2-.9-2-2s.9-2 2-2h6c1.1 0 2 .9 2 2s-.9 2-2 2z"}),"SaveRounded");vf=es.default=$b;var ts={},Rb=Se.exports;Object.defineProperty(ts,"__esModule",{value:!0});var yf=ts.default=void 0,Lb=Rb(Le()),Pb=Pe,Fb=(0,Lb.default)((0,Pb.jsx)("path",{d:"M18 2h-7.17c-.53 0-1.04.21-1.42.59L4.59 7.41C4.21 7.79 4 8.3 4 8.83V20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6.35 14.65-2.79-2.79c-.32-.32-.1-.86.35-.86H11v-2.99c0-.55.44-.99.99-1 .56-.01 1.01.44 1.01 1V13h1.79c.45 0 .67.54.35.85l-2.79 2.79c-.19.2-.51.2-.7.01z"}),"SimCardDownloadRounded");yf=ts.default=Fb;const ns=()=>{const{dispatchSnackbar:e}=W.useContext(Ds);return{close:()=>e(Os()),open:(r,i="success")=>e(md(r,i))}},_f=()=>{const{version:e}=at();return{patchWorkflow:r=>on.default.patch("/v1/workflow",{...r,version:e}).then(i=>i.data),postWorkflow:r=>on.default.post("/v1/workflow",{...r,version:e}).then(i=>i.data)}},Ub=e=>{const{postWorkflow:t}=_f();return nn.useMutation(t,e)},Yb=e=>{const{patchWorkflow:t}=_f();return nn.useMutation(t,e)},qb=()=>{const{t:e}=Je.useTranslation(["snackMessage"]),{open:t}=ns(),{setCurrentTree:n,currentTree:r,tree:i}=at(),{mutate:o}=Ub({onError:()=>{t(e("error.saveTree",{ns:"snackMessage"}),"error")},onSuccess:c=>{t(e("success.saveTree",{ns:"snackMessage"})),n(d=>({...d,id:c.workflow_id}))}}),{mutate:a}=Yb({onError:()=>{t(e("error.updateTree",{ns:"snackMessage"}),"error")},onSuccess:()=>{t(e("success.updateTree",{ns:"snackMessage"}))}}),s=c=>JSON.stringify(c,null,2);return{formatJSON:s,getDownloadLink:c=>`data:text/json;charset=utf-8,${encodeURIComponent(s(c))}`,handleSubmit:()=>{const{name:c,id:d}=r;if(!c){n(f=>({...f,errorName:"Champs Requis"}));return}if(i){if(d){a({id:d,label:c,workflow:i});return}o({label:c,workflow:i})}}}},Vb=({downloadedFileName:e="export",value:t})=>{const{t:n}=Je.useTranslation("button"),{getDownloadLink:r,handleSubmit:i}=qb(),{currentTree:o,endPoint:a}=at(),{id:s}=o;return oe(S.Stack,{direction:"row",spacing:2,justifyContent:"center",children:[M(S.Tooltip,{title:n("downloadJSONFile"),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:M(S.Box,{children:M(S.Button,{variant:"outlined",href:r(t),download:`${e}.json`,disabled:!t,children:M(yf,{})})})}),M(S.Tooltip,{title:n(s?"update":"save"),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:M(S.Box,{children:M(S.Button,{variant:"outlined",onClick:i,disabled:!t||!a,children:s?M(mf,{}):M(vf,{})})})})]})},Bb={box:{backgroundColor:xe.backgroundPrimary,border:`solid 1px ${xe.borderLight}`}},bf=({children:e,description:t,open:n,onClose:r,title:i})=>M(S.Dialog,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",scroll:"body",maxWidth:"sm",fullWidth:!0,children:oe(S.Box,{sx:Bb.box,p:4,children:[M("h3",{children:i}),M("p",{children:t}),e]})});var rs={},Qb=Se.exports;Object.defineProperty(rs,"__esModule",{value:!0});var xf=rs.default=void 0,Wb=Qb(Le()),Gb=Pe,Kb=(0,Wb.default)((0,Gb.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),"CloseRounded");xf=rs.default=Kb;const ki={container:{display:"flex",flexDirection:"column",height:"100%",margin:1},main:{border:`solid 1px ${xe.borderLight}`,height:" 100%",margin:1},toolbar:{backgroundColor:xe.backgroundPrimary,boxShadow:"none",display:"flex",padding:"0 ! important"},toolbarBox:{backgroundColor:xe.tertiaryMain,border:`solid 1px ${xe.primaryMain}`,margin:1,paddingX:2,paddingY:1,width:"100%"}},Hb=({children:e,appear:t,in:n,onEnter:r,onExited:i,onFocus:o,role:a,tabIndex:s,timeout:u},l)=>M(S.Slide,{direction:"up",ref:l,appear:t,in:n,onEnter:r,onExited:i,onFocus:o,role:a,tabIndex:s,timeout:u,children:e}),Xb=W.forwardRef(Hb),Jb=({children:e,open:t,onClose:n,title:r})=>M(S.Dialog,{PaperProps:{sx:{backgroundColor:xe.backgroundPrimary,backgroundImage:"none"}},open:t,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",fullScreen:!0,TransitionComponent:Xb,children:oe(S.Box,{sx:ki.container,children:[M(S.AppBar,{position:"sticky",elevation:0,children:M(S.Toolbar,{sx:ki.toolbar,children:oe(S.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:ki.toolbarBox,children:[M(S.Typography,{variant:"h5",children:M("strong",{children:r})}),M(S.IconButton,{edge:"end",color:"inherit",onClick:n,"aria-label":"close",children:M(xf,{})})]})})}),M(S.Box,{sx:ki.main,children:e})]})}),Zb={box:{border:`solid 1px ${xe.borderLight}`,flexGrow:0}},ex=({children:e})=>M(S.Box,{p:2,role:"group",sx:Zb.box,children:e}),tx={box:{border:`solid 1px ${xe.borderLight}`,flexGrow:0}},nx=({children:e})=>M(S.Box,{sx:tx.box,padding:2,component:"header",children:e}),rx={box:{border:`solid 1px ${xe.borderLight}`,flexGrow:1}},ix=({children:e})=>M(S.Box,{sx:rx.box,component:"main",role:"tree",children:e}),Mf={stack:{width:"100%"}},ox=({children:e})=>{const t=W.Children.toArray(e);return oe(S.Grid,{container:!0,padding:1,flexWrap:"nowrap",height:"100%",role:"treegrid",children:[M(S.Grid,{item:!0,xs:9,padding:1,display:"flex",children:oe(S.Stack,{sx:Mf.stack,spacing:2,children:[t[0],t[1]]})}),M(S.Grid,{item:!0,xs:3,padding:1,display:"flex",children:oe(S.Stack,{sx:Mf.stack,spacing:2,children:[t[2],t[3]]})})]})},ax={box:{border:`solid 1px ${xe.borderLight}`,flexGrow:1,overflow:"auto"}},sx=({children:e})=>M(S.Box,{sx:ax.box,component:"aside",children:e}),wf=(e,t)=>{var o;if(!e)return null;let n=null;const r=(e==null?void 0:e.name)===t,i=(o=e==null?void 0:e.children)==null?void 0:o.length;if(r)return e;if(i)for(let a=0;n===null&&a<e.children.length;a+=1)n=wf(e.children[a],t);return n},Sn=(e,t)=>{var a,s,u,l,c;if(!e)return null;if(!t)return e;let n=null;const r=((a=e==null?void 0:e.attributes)==null?void 0:a.treePath)===t,i=(s=e==null?void 0:e.attributes)==null?void 0:s.tree,o=(u=e==null?void 0:e.children)==null?void 0:u.length;if(r)return((l=e==null?void 0:e.attributes)==null?void 0:l.tree)||null;if(i&&(n=Sn((c=e.attributes)==null?void 0:c.tree,t)),o)for(let d=0;n===null&&d<e.children.length;d+=1)n=Sn(e.children[d],t);return n},is=(e,t,n)=>{const r=Sn(e,t);return wf(r,n)},ux=(e,t)=>{if(!e)return null;const n=t.attributes.isDecision;return Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!1}}),n?(Object.defineProperty(e,"children",{value:[{...t,attributes:{...t.attributes,isLeaf:!1}}]}),null):(Object.defineProperty(e,"children",{value:[{...t,attributes:{...t.attributes,isLeaf:!0}}]}),null)},lx=({tree:e,path:t,name:n,child:r})=>{if(!e)return r.children.length?{...r}:{...r,attributes:{...r.attributes,isLeaf:!0,isRoot:!0}};const i=structuredClone(e),o=is(i,t,n);return ux(o,r),i},Tf=(e,t=[])=>{if(!e)return[];let n=[...t];return Object.entries(e).forEach(([r,i])=>{const o=r==="name",a=r==="children"&&i.length>0;o&&(n=[...n,i]),a&&(n=[...n,...i.map(s=>Tf(s,n)).flat()])}),n},Nf=(e,t,n=null)=>{var a;if(!e)return null;let r=null;const i=(e==null?void 0:e.name)===t,o=(a=e==null?void 0:e.children)==null?void 0:a.length;if(i)return n;if(o)for(let s=0;r===null&&s<e.children.length;s+=1)r=Nf(e.children[s],t,e);return r},cx=(e,t)=>(!e||!t||(Object.defineProperty(e,"children",{value:e.children.filter(n=>n.name!==t.name)}),Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!0}})),null),fx=(e,t,n)=>{const r=Sn(e,t);return Nf(r,n)},dx=({tree:e,path:t,name:n})=>{const r=structuredClone(e),i=is(r,t,n),o=fx(r,t,n);return cx(o,i),r},hx=(e,t)=>{if(!e)return null;const n=t.attributes.isDecision,r=e.attributes.isDecision,i=e.attributes.depth===0;return r||n?(Object.defineProperty(e,"children",{value:[...t.children]}),Object.defineProperty(e,"attributes",{value:{...t.attributes,isLeaf:!t.children.length||!n,isRoot:i}}),Object.defineProperty(e,"name",{value:t.name}),null):(Object.defineProperty(e,"children",{value:[...e.children]}),Object.defineProperty(e,"attributes",{value:{...t.attributes,isLeaf:!e.children.length,isRoot:i}}),Object.defineProperty(e,"name",{value:t.name}),null)},px=({tree:e,path:t,name:n,child:r})=>{const i=structuredClone(e),o=is(i,t,n);return hx(o,r),i},Dt={appendTreeCard:"appendTreeCard",deleteTreeCard:"deleteTreeCard",replaceTreeCard:"replaceTreeCard",resetTree:"resetTree",setTree:"setTree"},gx=(e,t,n)=>({children:n,name:t,path:e,type:Dt.appendTreeCard}),mx=(e,t,n)=>({children:n,name:t,path:e,type:Dt.replaceTreeCard}),vx=(e,t)=>({name:t,path:e,type:Dt.deleteTreeCard}),yx=()=>({type:Dt.resetTree}),Ef=e=>({tree:e,type:Dt.setTree}),_x=(e,t)=>{switch(t.type){case Dt.appendTreeCard:{const{name:n,path:r,children:i}=t;return lx({child:i,name:n,path:r,tree:e})}case Dt.deleteTreeCard:{const{path:n,name:r}=t;return dx({name:r,path:n,tree:e})}case Dt.replaceTreeCard:{const{name:n,path:r,children:i}=t;return px({child:i,name:n,path:r,tree:e})}case Dt.resetTree:return null;case Dt.setTree:return t.tree;default:throw new Error}},bx=()=>{const{dispatchTree:e,setModalOpen:t,currentHierarchyPointNode:n,treePath:r}=at();return{handleSubmit:o=>{var u,l;o.preventDefault();const a=((u=n==null?void 0:n.data)==null?void 0:u.name)||"",s=((l=r==null?void 0:r.at(-1))==null?void 0:l.path)||"";e(vx(s,a)),t(null)}}},xx=({onClose:e})=>{const{t}=Je.useTranslation(),{handleSubmit:n}=bx();return M("form",{onSubmit:n,children:oe(S.Stack,{spacing:2,direction:"row",justifyContent:"flex-end",children:[M(S.Button,{variant:"text",onClick:e,children:t("cancel")}),M(S.Button,{variant:"contained",color:"error",type:"submit",children:t("remove")})]})})};var os={},Mx=Se.exports;Object.defineProperty(os,"__esModule",{value:!0});var Df=os.default=void 0,wx=Mx(Le()),Tx=Pe,Nx=(0,wx.default)((0,Tx.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4 11h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1z"}),"AddCircleRounded");Df=os.default=Nx;var as={},Ex=Se.exports;Object.defineProperty(as,"__esModule",{value:!0});var Of=as.default=void 0,Dx=Ex(Le()),Ox=Pe,Cx=(0,Dx.default)((0,Ox.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4 11H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1z"}),"RemoveCircleRounded");Of=as.default=Cx;const _r=[{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"text"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"number"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"email"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"file"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"password"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"tel"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"address"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"url"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"date"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"time"},{isBooleanField:!0,isDecisionField:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"switch"},{isBooleanField:!0,isDecisionField:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"checkbox"},{isBooleanField:!1,isDecisionField:!0,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"radio"},{isBooleanField:!1,isDecisionField:!0,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"select"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"hidden"},{isBooleanField:!1,isDecisionField:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"tree"}],Sx=()=>{const{endPoint:e}=at();return{fields:W.useCallback(()=>_r.filter(n=>!(n.type==="tree"&&!e)),[e])()}},Ax=({onChange:e,value:t})=>{const{t:n}=Je.useTranslation(),{fields:r}=Sx();return oe(S.FormControl,{sx:{flex:1},required:!0,children:[M(S.InputLabel,{children:n("type")}),M(S.Select,{value:t,label:n("type"),onChange:e,MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:r.map(({type:i})=>M(S.MenuItem,{value:i,children:n(`type.${i}`,{ns:"form"})},i))})]})};var ss={},Ix=Se.exports;Object.defineProperty(ss,"__esModule",{value:!0});var Cf=ss.default=void 0,zx=Ix(Le()),kx=Pe,jx=(0,zx.default)((0,kx.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}),"AddRounded");Cf=ss.default=jx;const Sf=()=>({getAllWorkflow:()=>on.default.get("/v1/workflows").then(n=>n.data),getWorkflow:n=>on.default.get(`/v1/workflow?id=${n}`).then(r=>r.data)}),us=(e,t)=>{const{getWorkflow:n}=Sf();return nn.useQuery(["/v1/workflow",e],()=>e&&n(e),{refetchOnWindowFocus:!1,...t})},$x=e=>{const{getAllWorkflow:t}=Sf();return nn.useQuery("/v1/workflows",t,{refetchOnWindowFocus:!1,...e})},Rx=e=>{const{t}=Je.useTranslation("snackMessage"),{open:n}=ns(),{currentTree:r,setCurrentTree:i,dispatchTree:o}=at(),[a,s]=W.useState("");us(a,{enabled:!!a&&!e&&a!==r.id,onError:()=>n(t("error.fetchTree",{ns:"snackMessage"}),"error"),onSuccess:({id:v,label:p,workflow:g})=>{e||(i({id:v,name:p}),o(Ef(g)))}});const{data:u,isLoading:l,refetch:c}=$x({enabled:!1,keepPreviousData:!0,onError:()=>{n(t("error.fetchTree"),"error")},onSuccess:()=>{r.id&&!a&&s(r.id)}}),d=async({target:v})=>{const{value:p}=v;if(p==="add-new-tree"){s(""),i({name:""}),o(yx());return}s(p)},f=()=>h(),h=()=>c();return{currentTree:r,fetchWorkflowSuggestions:h,handleChangeTree:d,handleOnOpen:f,setTreeSelected:s,treeSelected:a,workflowsSuggestions:u,workflowsSuggestionsLoading:l}},Af={formControl:{flex:1},select:{".MuiOutlinedInput-notchedOutline":{border:0,paddingLeft:5},".MuiSelect-select":{opacity:0,width:0},boxShadow:"none"}},If=({arrowOnly:e,required:t,size:n,showBtnAddNewTree:r,onChange:i,value:o})=>{const a=W.useMemo(()=>!!i,[i]),{t:s}=Je.useTranslation("form"),{handleChangeTree:u,handleOnOpen:l,workflowsSuggestions:c,workflowsSuggestionsLoading:d,treeSelected:f}=Rx(a);return oe(S.FormControl,{size:n,required:t,sx:Af.formControl,children:[!e&&M(S.InputLabel,{children:s("tree")}),oe(S.Select,{value:a?o:f,id:"tree-select",onChange:h=>a?i==null?void 0:i(h):u(h),sx:e?Af.select:void 0,label:s("tree"),onOpen:l,children:[d&&M(S.MenuItem,{children:M(S.Skeleton,{width:"100%"})}),c==null?void 0:c.map(({label:h,id:v})=>M(S.MenuItem,{value:v,children:h},v)),r&&M(S.MenuItem,{disabled:!0,children:M(S.Box,{sx:{height:1,width:"100%"},children:M(S.Divider,{})})}),r&&oe(S.MenuItem,{value:"add-new-tree",children:[M(S.Typography,{mr:1,children:s("newTree")}),M(Cf,{color:"primary"})]})]})]})},Lx=({helperText:e,hiddenValue:t,isHiddenField:n,isTreeField:r,treeSelected:i,handleChangeTreeSelect:o,handleChangeHelperText:a,handleChangeHiddenValue:s})=>{const{t:u}=Je.useTranslation(["translation","form"]);return r?M(If,{required:!0,value:i,onChange:o}):n?M(S.TextField,{required:!0,sx:{flex:1},label:u("hiddenValue",{ns:"form"}),onChange:s,value:t}):M(S.TextField,{sx:{flex:1},label:u("helperText",{ns:"form"}),onChange:a,value:e})},zf=e=>new Set([...e]).size===e.length,Px=(e,t,n)=>{const r=[...e,t];return zf(n?r.filter(i=>i!==n):r)},Fx=()=>{var In,Fi,Ui,Yi,qi,Vi,Bi,Qi,zn,xr,zt,kn,jn;const e=W.useMemo(()=>[{id:"0",label:"",message:"",value:""}],[]),{tree:t,dispatchTree:n,currentHierarchyPointNode:r,modalOpen:i,treePath:o,setModalOpen:a}=at(),{open:s}=ns(),{t:u}=Je.useTranslation(),[l,c]=W.useState(e),[d,f]=W.useState(""),[h,v]=W.useState(""),[p,g]=W.useState(""),[x,w]=W.useState(!1),[T,b]=W.useState(!1),[y,C]=W.useState("text"),[I,O]=W.useState(""),[E,D]=W.useState(""),[k,m]=W.useState(""),[N,z]=W.useState({off:"",on:""}),[R,L]=W.useState(!1),[V,q]=W.useState(""),ee=i==="edit",A=y==="tree",$=y==="hidden",G=_r.some(F=>F.type===y&&(F==null?void 0:F.isBooleanField)),B=_r.some(F=>F.type===y&&(F==null?void 0:F.isDecisionField)),U=_r.some(F=>F.type===y&&(F==null?void 0:F.isRequiredDisabled)),X=_r.some(F=>F.type===y&&(F==null?void 0:F.isRepeatableDisabled)),K=F=>!B&&F>0,{refetch:J,isLoading:Z}=us(I,{enabled:!1,onError:()=>{s(u("error.fetchTree",{ns:"snackMessage"}),"error")}}),ne=(F,_e)=>{c(de=>de.map(Ne=>{const{id:Fe}=Ne;return F.target.dataset.id===Fe?{...Ne,id:Fe,[_e]:F.target.value}:{...Ne}}))},te=F=>{v(F.target.value)},ze=F=>{g(F.target.value)},Y=F=>{ne(F,"label")},Ke=F=>{ne(F,"value")},Q=F=>{ne(F,"message")},lt=F=>{m(F.target.value)},vt=F=>{var tt;const{value:_e}=F.target;if(f(F.target.value),!t||!_e){q("");return}const de=ee&&(r==null?void 0:r.data.name),Ne=(tt=o==null?void 0:o.at(-1))==null?void 0:tt.path,Fe=Sn(t,Ne),He=Tf(Fe);if(Px(He,_e,de)){q("");return}q(u("mustBeUnique",{ns:"form"}))},en=F=>{w(F.target.checked)},ji=F=>{b(F.target.checked)},An=F=>{L(F.target.checked)},_s=F=>{C(F.target.value),b(!1),w(!1),L(!1)},bs=F=>{O(F.target.value)},br=F=>_e=>{z(de=>({...de,[F]:_e.target.value}))},xs=F=>{D(F.target.value)},Ms=()=>{c(F=>{const _e=Number(F[F.length-1].id),de=String(_e+1);return[...F,{...e[0],id:de}]})},$i=F=>{c(_e=>_e.filter(({id:de})=>F!==de))},Ri=(F,_e)=>{var Ne,Fe,He;const de=(He=(Fe=(Ne=F==null?void 0:F.children)==null?void 0:Ne[_e])==null?void 0:Fe.data)==null?void 0:He.children;return de?de.map(({name:pt,attributes:tt,children:yt})=>({attributes:tt,children:yt,name:pt})):[]},tn=F=>{var _e;return T?(_e=l==null?void 0:l.filter((de,Ne)=>!K(Ne)))==null?void 0:_e.map(({message:de,value:Ne,label:Fe},He)=>{const pt=`${d}:${Ne}`,tt=Ri(r,He);return{attributes:{depth:F+1,label:Fe,value:Ne,...de&&{message:de},...tt.length===0&&{isLeaf:!0}},children:tt,name:pt}}):[]},ws=F=>F.map(({message:_e,...de})=>({...de,..._e&&{message:_e}})),Li=(F,_e,de)=>{var Ne;return F&&(!_e||de)?J():F&&_e&&!de?{data:{workflow:(Ne=r==null?void 0:r.data.attributes)==null?void 0:Ne.tree},isError:null}:{data:null,isError:null}},Pi=async F=>{var j,P,H,se;F.preventDefault();const{on:_e,off:de}=N,Ne=((j=r==null?void 0:r.data)==null?void 0:j.name)||"",Fe=(r==null?void 0:r.depth)||0,He=i==="edit",pt=Fe+(He||r===null?0:1),tt=tn(pt),yt=(P=o==null?void 0:o.at(-1))==null?void 0:P.path,$n=o.length?`${yt}/${d}`:`/${d}`,Rn=((se=(H=r==null?void 0:r.data.attributes)==null?void 0:H.tree)==null?void 0:se.treeId)!==I,{data:Bt,isError:Ln}=await Li(A,He,Rn);if(Ln)return;const _={attributes:{depth:pt,label:p,type:y,...E&&{helperText:E},...(de||_e)&&{messages:{...de&&{off:de},..._e&&{on:_e}}},...A&&{tree:{...Bt==null?void 0:Bt.workflow,treeId:I},treePath:$n},...T&&{isDecision:T},...B&&!T&&{values:ws(l)},...x&&{required:x},...k&&{step:k},...R&&{repeatable:R},...$&&{hiddenValue:h}},children:tt,name:d};n(He?mx(yt||"",Ne,_):gx(yt||null,Ne,_)),a(null)};return W.useEffect(()=>{var F,_e,de,Ne,Fe,He,pt,tt,yt,$n,Rn,Bt,Ln,_,j,P,H,se,be;if(i==="edit"){const re=((_e=(F=r==null?void 0:r.data)==null?void 0:F.attributes)==null?void 0:_e.values)||((Fe=(Ne=(de=r==null?void 0:r.data)==null?void 0:de.children)==null?void 0:Ne.filter(({attributes:Ae})=>!(Ae!=null&&Ae.type)))==null?void 0:Fe.map(({attributes:Ae},Ee)=>{const{label:Ce,value:nt,message:kt}=Ae||{};return{id:String(Ee),label:String(Ce),value:String(nt),...kt&&{message:String(kt)}}}));f((r==null?void 0:r.data.name)||""),C(((He=r==null?void 0:r.data.attributes)==null?void 0:He.type)||"text"),D(((pt=r==null?void 0:r.data.attributes)==null?void 0:pt.helperText)||""),w(((tt=r==null?void 0:r.data.attributes)==null?void 0:tt.required)||!1),m(((yt=r==null?void 0:r.data.attributes)==null?void 0:yt.step)||""),g((($n=r==null?void 0:r.data.attributes)==null?void 0:$n.label)||""),b(((Rn=r==null?void 0:r.data.attributes)==null?void 0:Rn.isDecision)||!1),c(re!=null&&re.length?re:e),z({off:((Ln=(Bt=r==null?void 0:r.data.attributes)==null?void 0:Bt.messages)==null?void 0:Ln.off)||"",on:((j=(_=r==null?void 0:r.data.attributes)==null?void 0:_.messages)==null?void 0:j.on)||""}),O(((H=(P=r==null?void 0:r.data.attributes)==null?void 0:P.tree)==null?void 0:H.treeId)||""),L(((se=r==null?void 0:r.data.attributes)==null?void 0:se.repeatable)||!1),v(((be=r==null?void 0:r.data.attributes)==null?void 0:be.hiddenValue)||"")}},[(Fi=(In=r==null?void 0:r.data.attributes)==null?void 0:In.tree)==null?void 0:Fi.treeId,(Ui=r==null?void 0:r.data.attributes)==null?void 0:Ui.messages,(Yi=r==null?void 0:r.data.attributes)==null?void 0:Yi.helperText,(qi=r==null?void 0:r.data.attributes)==null?void 0:qi.isDecision,(Vi=r==null?void 0:r.data.attributes)==null?void 0:Vi.label,(Bi=r==null?void 0:r.data.attributes)==null?void 0:Bi.required,(Qi=r==null?void 0:r.data.attributes)==null?void 0:Qi.step,(zn=r==null?void 0:r.data.attributes)==null?void 0:zn.type,(xr=r==null?void 0:r.data.attributes)==null?void 0:xr.values,(zt=r==null?void 0:r.data)==null?void 0:zt.children,r==null?void 0:r.data.name,(kn=r==null?void 0:r.data.attributes)==null?void 0:kn.repeatable,(jn=r==null?void 0:r.data.attributes)==null?void 0:jn.hiddenValue,e,i]),{getDisabledValueField:K,handleAddValue:Ms,handleChangeHelperText:xs,handleChangeHiddenValue:te,handleChangeIsDecisionField:ji,handleChangeLabel:ze,handleChangeMessage:br,handleChangeName:vt,handleChangeOptionLabel:Y,handleChangeOptionMessage:Q,handleChangeOptionValue:Ke,handleChangeRepeatable:An,handleChangeRequired:en,handleChangeStep:lt,handleChangeTreeSelect:bs,handleChangeType:_s,handleDeleteValue:$i,handleSubmit:Pi,helperText:E,hiddenValue:h,isBooleanField:G,isDecision:T,isDecisionField:B,isHiddenField:$,isRepeatableDisabled:X,isRequiredDisabled:U,isTreeField:A,isWorkflowLoading:Z,label:p,messages:N,name:d,repeatable:R,required:x,step:k,treeSelected:I,type:y,uniqueNameErrorMessage:V,values:l}},kf={marginRight:"-20px !important",minWidth:"auto !important"},jf={iconButton:kf,iconButtonDelete:{...kf,"&:before":{borderRadius:"50%",content:'""',height:20,position:"absolute",width:20,zIndex:-1},backgroundColor:xe.backgroundPrimary,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)"}},Ux=({onClose:e})=>{const{t}=Je.useTranslation(["translation","form"]),{values:n,required:r,name:i,uniqueNameErrorMessage:o,type:a,helperText:s,label:u,hiddenValue:l,isBooleanField:c,isDecision:d,isDecisionField:f,isHiddenField:h,isRequiredDisabled:v,isRepeatableDisabled:p,isTreeField:g,treeSelected:x,isWorkflowLoading:w,repeatable:T,messages:{on:b,off:y},handleChangeTreeSelect:C,handleChangeHelperText:I,handleChangeOptionMessage:O,handleChangeRequired:E,handleChangeName:D,handleChangeType:k,handleChangeIsDecisionField:m,handleChangeOptionLabel:N,handleDeleteValue:z,handleChangeOptionValue:R,handleChangeMessage:L,handleSubmit:V,handleAddValue:q,handleChangeLabel:ee,handleChangeRepeatable:A,handleChangeHiddenValue:$}=Fx();return oe("form",{onSubmit:V,children:[oe(S.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[M(S.TextField,{sx:{flex:1},label:t("label",{ns:"form"}),onChange:ee,value:u,required:!0}),M(S.TextField,{label:t("name"),sx:{flex:1},onChange:D,value:i,error:!!o,helperText:o,required:!0})]}),oe(S.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[M(Ax,{value:a,onChange:k}),M(Lx,{helperText:s,hiddenValue:l,isHiddenField:h,isTreeField:g,treeSelected:x,handleChangeTreeSelect:C,handleChangeHelperText:I,handleChangeHiddenValue:$})]}),c&&oe(S.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[M(S.TextField,{sx:{flex:1},label:t("onMessage",{ns:"form"}),onChange:L("on"),value:b}),M(S.TextField,{sx:{flex:1},label:t("offMessage",{ns:"form"}),onChange:L("off"),value:y})]}),oe(S.Stack,{paddingY:1,children:[M(S.FormGroup,{children:M(S.FormControlLabel,{disabled:p,control:M(S.Checkbox,{checked:T,onChange:A}),label:t("repeatable",{ns:"form"})})}),M(S.FormGroup,{children:M(S.FormControlLabel,{disabled:v,control:M(S.Checkbox,{checked:r,onChange:E}),label:t("required")})}),M(S.FormGroup,{children:M(S.FormControlLabel,{disabled:!f,control:M(S.Checkbox,{checked:d,onChange:m}),label:t("decisionField",{ns:"form"})})})]}),f&&oe(wr,{children:[M("h4",{children:t("values")}),n==null?void 0:n.map(({value:G,label:B,id:U,message:X})=>oe(S.Stack,{direction:{sm:"row",xs:"column"},spacing:1,paddingY:1,position:"relative",children:[M(S.TextField,{label:t("label",{ns:"form"}),sx:{flex:1},onChange:N,value:B,inputProps:{"data-id":U},required:!0}),M(S.TextField,{label:t("value",{ns:"form"}),sx:{flex:1},onChange:R,value:G,inputProps:{"data-id":U},required:!0}),M(S.TextField,{label:"Message",sx:{flex:1},onChange:O,value:X,inputProps:{"data-id":U}}),n.length>1&&M(S.Button,{color:"warning",sx:jf.iconButtonDelete,"data-id":U,onClick:()=>z(U),children:M(Of,{})})]},U))]}),f&&M(S.Box,{justifyContent:"flex-end",display:"flex",children:M(S.Button,{color:"success",sx:jf.iconButton,onClick:q,children:M(Df,{})})}),oe(S.Stack,{spacing:2,direction:"row",justifyContent:"flex-end",paddingTop:3,children:[M(S.Button,{variant:"text",onClick:e,children:t("cancel")}),M(S.Button,{variant:"contained",type:"submit",disabled:!!o||w,children:w?M(S.CircularProgress,{size:14}):t("validate")})]})]})};var ls={},Yx=Se.exports;Object.defineProperty(ls,"__esModule",{value:!0});var $f=ls.default=void 0,qx=Yx(Le()),Vx=Pe,Bx=(0,qx.default)((0,Vx.jsx)("path",{d:"M17 11h3c1.11 0 2-.9 2-2V5c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1H9.01V5c0-1.11-.9-2-2-2H4c-1.1 0-2 .9-2 2v4c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2V8h2v7.01c0 1.65 1.34 2.99 2.99 2.99H15v1c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2v-4c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1h-1.01c-.54 0-.99-.45-.99-.99V8h2v1c0 1.1.9 2 2 2z"}),"AccountTreeRounded");$f=ls.default=Bx;var cs={},Qx=Se.exports;Object.defineProperty(cs,"__esModule",{value:!0});var Rf=cs.default=void 0,Wx=Qx(Le()),Gx=Pe,Kx=(0,Wx.default)((0,Gx.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 10h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1z"}),"AddBoxRounded");Rf=cs.default=Kx;var fs={},Hx=Se.exports;Object.defineProperty(fs,"__esModule",{value:!0});var Lf=fs.default=void 0,Xx=Hx(Le()),Jx=Pe,Zx=(0,Xx.default)((0,Jx.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v10zM9 9h6c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H9c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1zm6.5-5-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1h-2.5z"}),"DeleteOutlineRounded");Lf=fs.default=Zx;var ds={},e2=Se.exports;Object.defineProperty(ds,"__esModule",{value:!0});var Pf=ds.default=void 0,t2=e2(Le()),n2=Pe,r2=(0,t2.default)((0,n2.jsx)("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1c-.1.1-.15.22-.15.36zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"EditRounded");Pf=ds.default=r2;var hs={},i2=Se.exports;Object.defineProperty(hs,"__esModule",{value:!0});var Ff=hs.default=void 0,o2=i2(Le()),a2=Pe,s2=(0,o2.default)((0,a2.jsx)("path",{d:"M12 3c-4.8 0-9 3.86-9 9 0 2.12.74 4.07 1.97 5.61l-1.68 1.68c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l1.68-1.68C7.93 20.26 9.88 21 12 21c2.3 0 4.61-.88 6.36-2.64C20.12 16.61 21 14.3 21 12V5c0-1.1-.9-2-2-2h-7zm3.83 9.26-5.16 4.63c-.16.15-.41.14-.56-.01-.14-.14-.16-.36-.04-.52l2.44-3.33-4.05-.4c-.44-.04-.63-.59-.3-.89l5.16-4.63c.16-.15.41-.14.56.01.14.14.16.36.04.52l-2.44 3.33 4.05.4c.45.04.63.59.3.89z"}),"EnergySavingsLeafRounded");Ff=hs.default=s2;var ps={},u2=Se.exports;Object.defineProperty(ps,"__esModule",{value:!0});var Uf=ps.default=void 0,l2=u2(Le()),Yf=Pe,c2=(0,l2.default)([(0,Yf.jsx)("path",{d:"M14.14 12h-.06c.81 0 1.28-.91.82-1.57L9.82 3.17c-.4-.57-1.24-.57-1.64 0L3.1 10.43c-.46.66.01 1.57.82 1.57h-.06L.99 16.46c-.43.66.05 1.54.84 1.54H7v2c0 1.1.9 2 2 2s2-.9 2-2v-2h5.17c.79 0 1.27-.88.84-1.54L14.14 12z"},"0"),(0,Yf.jsx)("path",{d:"M23.01 16.46 20.14 12h-.06c.81 0 1.28-.91.82-1.57l-5.08-7.26c-.4-.57-1.24-.57-1.64 0l-1.57 2.24 3.11 4.44c.43.61.48 1.41.14 2.07-.08.16-.18.3-.3.43l2.29 3.57c.4.62.42 1.4.07 2.04-.01.02-.02.03-.03.04h4.28c.79 0 1.27-.88.84-1.54zM13 20c0 1.1.9 2 2 2s2-.9 2-2v-1h-4v1z"},"1")],"ForestRounded");Uf=ps.default=c2;var gs={},f2=Se.exports;Object.defineProperty(gs,"__esModule",{value:!0});var qf=gs.default=void 0,d2=f2(Le()),h2=Pe,p2=(0,d2.default)((0,h2.jsx)("path",{d:"M12 4V2.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V6c3.31 0 6 2.69 6 6 0 .79-.15 1.56-.44 2.25-.15.36-.04.77.23 1.04.51.51 1.37.33 1.64-.34.37-.91.57-1.91.57-2.95 0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-.79.15-1.56.44-2.25.15-.36.04-.77-.23-1.04-.51-.51-1.37-.33-1.64.34C4.2 9.96 4 10.96 4 12c0 4.42 3.58 8 8 8v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36V18z"}),"LoopRounded");qf=gs.default=p2;var ms={},g2=Se.exports;Object.defineProperty(ms,"__esModule",{value:!0});var Vf=ms.default=void 0,m2=g2(Le()),v2=Pe,y2=(0,m2.default)((0,v2.jsx)("path",{d:"M16.96 12h.08c.81 0 1.28-.91.82-1.57l-5.08-7.25c-.4-.57-1.24-.57-1.64 0L6.1 10.43c-.46.66.02 1.57.83 1.57h.04l-2.9 4.46c-.44.66.04 1.54.84 1.54h5.08v2.02c0 1.09.89 1.98 1.98 1.98 1.09 0 1.98-.89 1.98-1.98V18h5.15c.8 0 1.28-.89.83-1.55L16.96 12z"}),"ParkRounded");Vf=ms.default=y2;var vs={},_2=Se.exports;Object.defineProperty(vs,"__esModule",{value:!0});var Bf=vs.default=void 0,b2=_2(Le()),x2=Pe,M2=(0,b2.default)((0,x2.jsx)("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24zM2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0zM12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5zm2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64l2.64 2.64z"}),"VisibilityOffRounded");Bf=vs.default=M2;var ys={},w2=Se.exports;Object.defineProperty(ys,"__esModule",{value:!0});var Qf=ys.default=void 0,T2=w2(Le()),N2=Pe,E2=(0,T2.default)((0,N2.jsx)("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"VisibilityRounded");Qf=ys.default=E2;const je={actionButton:{minWidth:"auto !important"},container:{background:xe.backgroundPrimary,borderRadius:"1rem"},containerField:{background:xe.backgroundPrimary,border:`solid 1px ${xe.primaryMain}`,borderRadius:"1rem"},containerHidden:{background:xe.backgroundPrimary,border:`solid 1px ${xe.error}`,borderRadius:"1rem"},containerTree:{background:xe.tertiaryMain,border:`solid 1px ${xe.primaryMain}`,borderRadius:"1rem"},containerValue:{background:xe.backgroundPrimary,border:`solid 1px ${xe.secondaryMain}`,borderRadius:"1rem"},icon:{color:xe.grey500},nodeSvg:{stroke:"transparent !important"},stepChip:{fontSize:".7rem !important",fontWeight:"bold",height:"20px !important"},title:{display:"-webkit-box",margin:0,overflow:"hidden",textAlign:"right",textOverflow:"ellipsis",webkitBoxOrient:"vertical",webkitLineClamp:2}},D2=e=>{const t=!!e,n=e==="tree";return e==="hidden"?je.containerHidden:n?je.containerTree:t?je.containerField:je.containerValue},O2=({nodeDatum:e,onAddChildren:t,onEditChildren:n,onDeleteChildren:r,onOpenTreeModal:i,hierarchyPointNode:o,size:a=220})=>{var y;const{t:s}=Je.useTranslation(["translation","form"]),{attributes:u}=e||{},{isRoot:l,isLeaf:c,required:d,step:f,type:h,label:v,repeatable:p}=u||{},g=!!h,x=h==="tree",w=h==="hidden",T=!g,b=!l&&!c;return oe("g",{children:[M(S.GlobalStyles,{styles:{".rd3t-node svg":je.nodeSvg}}),M("foreignObject",{height:a,width:a,x:`-${a/2}`,y:`-${a/2}`,style:D2(h),children:oe(S.Box,{flex:1,display:"flex",p:2,height:"100%",flexDirection:"column",justifyContent:"space-between",children:[oe(S.Stack,{alignItems:"flex-end",spacing:.5,children:[g&&oe(S.Stack,{direction:"row",spacing:1,alignItems:"center",children:[f&&M(S.Tooltip,{title:`${s("step",{ns:"form"})} ${(y=e==null?void 0:e.attributes)==null?void 0:y.step}`,placement:"left",arrow:!0,children:M(S.Chip,{color:"primary",size:"small",label:f,sx:je.stepChip})}),M(S.Typography,{variant:"subtitle2",sx:je.title,children:M("strong",{children:v})})]}),g&&M(S.Chip,{color:"info",size:"small",label:s(`type.${h}`,{ns:"form"})}),d&&M(S.Stack,{direction:"row",spacing:.5,children:d&&M(S.Chip,{color:"warning",size:"small",variant:"outlined",label:`${s("required")}`})}),M(S.Stack,{spacing:.5,alignItems:"flex-end",children:T&&M(S.Typography,{variant:"subtitle2",sx:je.title,children:M("strong",{children:v})})}),oe(S.Box,{paddingTop:.5,children:[w&&M(S.Tooltip,{title:s("isAHidden"),placement:"bottom",arrow:!0,children:M(Bf,{style:je.icon})}),p&&M(S.Tooltip,{title:s("isARepeatable"),placement:"bottom",arrow:!0,children:M(qf,{style:je.icon})}),c&&M(S.Tooltip,{title:s("isALeaf"),placement:"bottom",arrow:!0,children:M(Ff,{style:je.icon})}),l&&M(S.Tooltip,{title:s("isTheRoot"),placement:"bottom",arrow:!0,children:M(Vf,{style:je.icon})}),b&&M(S.Tooltip,{title:s("isABranch"),placement:"bottom",arrow:!0,children:M($f,{style:je.icon})}),x&&M(S.Tooltip,{title:s("isATree"),placement:"bottom",arrow:!0,children:M(Uf,{style:je.icon})})]})]}),oe(S.Stack,{direction:"row",justifyContent:"flex-end",spacing:0,alignSelf:"flex-end",children:[!l&&M(S.Tooltip,{title:s("remove"),arrow:!0,children:M(S.Button,{variant:"text",sx:je.actionButton,size:"small",color:"error",onClick:()=>r==null?void 0:r(o),children:M(Lf,{})})}),!T&&M(S.Tooltip,{title:s("edit"),arrow:!0,children:M(S.Button,{variant:"text",color:"secondary",sx:je.actionButton,size:"small",onClick:()=>n==null?void 0:n(o),children:M(Pf,{})})}),c&&M(S.Tooltip,{title:s("add"),arrow:!0,children:M(S.Button,{variant:"text",color:"success",sx:je.actionButton,size:"small",onClick:()=>t==null?void 0:t(o),children:M(Rf,{})})}),x&&M(S.Tooltip,{title:s("show"),arrow:!0,children:M(S.Button,{variant:"text",color:"info",sx:je.actionButton,size:"small",onClick:()=>i==null?void 0:i(o),children:M(Qf,{})})})]})]})})]})},C2=W.memo(O2),Wf=()=>{const{setModalOpen:e,setCurrentHierarchyPointNode:t,setTreeModalOpen:n,setTreePath:r}=at();return{handleAddChildren:l=>{t(l),e("add")},handleCloseTreeModal:()=>{r([]),n(!1)},handleDeleteChildren:l=>{t(l),e("delete")},handleEditChildren:l=>{t(l),e("edit")},handleOpenTreeModal:l=>{var d,f;const c={label:l==null?void 0:l.data.attributes.label,path:((f=(d=l==null?void 0:l.data)==null?void 0:d.attributes)==null?void 0:f.treePath)||""};r(h=>[...h,c]),n(!0)}}},S2=({nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:i,onNodeMouseOut:o})=>{const{handleDeleteChildren:a,handleEditChildren:s,handleAddChildren:u,handleOpenTreeModal:l}=Wf();return M(C2,{nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:i,onNodeMouseOut:o,onAddChildren:u,onOpenTreeModal:l,onDeleteChildren:a,onEditChildren:s})},Gf=({nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:i,onNodeMouseOut:o})=>M(S2,{nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:i,onNodeMouseOut:o}),A2=()=>{const{currentHierarchyPointNode:e,modalOpen:t,setModalOpen:n}=at(),{t:r}=Je.useTranslation(["modal","snackMessage"]),i=t==="edit";return{closeModal:()=>n(null),getTitleModalDelete:()=>{var f,h;const d=(h=(f=e==null?void 0:e.data)==null?void 0:f.attributes)==null?void 0:h.label;return r("deleteTitle",{name:d,ns:"modal"})},getTitleModalMutation:()=>{var h;const d=(h=e==null?void 0:e.data)==null?void 0:h.attributes.label;return d?r(i?"editTitle":"addTitle",{name:d,ns:"modal"}):r("addFirstTitle",{name:d,ns:"modal"})},isDeleteModal:t==="delete",isModalMutationOpen:i||t==="add"}},I2=()=>{const{currentTree:e,setCurrentTree:t,tree:n}=at(),{name:r,errorName:i,id:o}=e;return{disabled:!!e.id&&!n,errorName:i,handleChangeName:u=>{const{value:l}=u.target;if(!l){t(c=>({...c,errorName:"Champs requis",name:u.target.value}));return}t(c=>({...c,errorName:"",name:u.target.value}))},id:o,name:r}},z2=()=>{const{t:e}=Je.useTranslation("form"),{name:t,handleChangeName:n,errorName:r,disabled:i}=I2();return M(S.TextField,{required:!0,label:e("treeName"),size:"small",onChange:n,value:t,error:!!r,disabled:i})},k2=()=>{var h,v;const{tree:e,treeModalOpen:t,treePath:n,endPoint:r}=at(),{handleCloseTreeModal:i}=Wf(),{getTitleModalMutation:o,closeModal:a,getTitleModalDelete:s,isModalMutationOpen:u,isDeleteModal:l}=A2(),c=(h=n==null?void 0:n.at(-1))==null?void 0:h.path,d=(v=n==null?void 0:n.at(-1))==null?void 0:v.label,f=e&&Sn(e,c);return oe(wr,{children:[oe(ox,{children:[M(nx,{children:oe(S.Stack,{justifyContent:"space-between",direction:"row",alignItems:"center",children:[M(xd,{}),!!r&&oe(S.Stack,{direction:"row",alignItems:"center",spacing:2,children:[M(z2,{}),M(If,{size:"small",arrowOnly:!0,showBtnAddNewTree:!0})]})]})}),M(ix,{children:M(ac,{data:e,renderCustomNodeElement:Gf})}),M(sx,{children:M(tv,{value:e})}),M(ex,{children:M(Vb,{value:e})})]}),M(bf,{open:u,onClose:a,title:o(),children:M(Ux,{onClose:a})}),M(bf,{open:l,onClose:a,title:s(),children:M(xx,{onClose:a})}),M(Jb,{open:t,onClose:i,title:d,children:f&&M(ac,{data:f,renderCustomNodeElement:Gf})})]})},j2="0.6.2",$2=({children:e,endPoint:t,initialTree:n,initialTreeId:r})=>{const[i,o]=W.useState(qt.currentHierarchyPointNode),[a,s]=W.useState(qt.modalOpen),[u,l]=W.useState(qt.treeModalOpen),[c,d]=W.useState(qt.treePath),[f,h]=W.useReducer(_x,n||qt.tree),[v,p]=W.useState(r?{...qt.currentTree,id:r}:qt.currentTree),g=W.useMemo(()=>({currentHierarchyPointNode:i,currentTree:v,dispatchTree:h,endPoint:t,modalOpen:a,setCurrentHierarchyPointNode:o,setCurrentTree:p,setModalOpen:s,setTreeModalOpen:l,setTreePath:d,tree:f,treeModalOpen:u,treePath:c,version:j2}),[i,a,u,c,f,v,t]);return us(v.id,{enabled:!!r,onSuccess:async x=>{!x||(p({id:x==null?void 0:x.id,name:x==null?void 0:x.label}),h(Ef((x==null?void 0:x.workflow)||null)))}}),M(ic.Provider,{value:g,children:e})},R2={createTree:"Create Tree",downloadJSONFile:"Download JSON File",save:"Save",update:"Update"},L2={decisionFields:"Decision fields",helperText:"Helper text",hiddenValue:"Hidden value",label:"Label",mustBeUnique:"Must be unique",newTree:"Nouvel arbre",offMessage:"Message (disable)",onMessage:"Message (enable)",repeatable:"Repeatable",staticFields:"Static fields",step:"Step",tree:"Tree",treeName:"Tree name",type:{address:"Address",checkbox:"Checkbox",date:"Date",email:"Email",file:"File",number:"Number",password:"Password",radio:"Radio",select:"Select",switch:"Switch",tel:"Tel",time:"Time",text:"Text",hidden:"Hidden field",tree:"Tree",url:"URL"},value:"Value",values:"Values"},P2={saveTree:"Save a Tree",addFirstTitle:"Add a field",addTitle:"Add a field to \xAB {{name}} \xBB",deleteTitle:"Are you sure to delete \xAB {{name}} \xBB",editTitle:"Edit field \xAB {{name}} \xBB"},F2={error:{saveTree:"An error has occurred. Please try again",updateTree:"An error has occurred. Please try again",fetchTree:"An error has occurred. Please try again"},success:{saveTree:"Tree registered",updateTree:"Tree updated"}},U2={add:"Add",cancel:"Cancel",disabled:"Disabled",edit:"Edit",isALeaf:"Is a leaf",isAHidden:"Is a hidden field",isARepeatable:"Is a repeatable",isABranch:"Is a branch",isATree:"Is a tree",isTheRoot:"Is the root",label:"Label",name:"Name",remove:"Remove",required:"Required",save:"Save",show:"Show",type:"Type",validate:"Validate",value:"Value",values:"Values"},Y2={createTree:"Cr\xE9er un arbre",downloadJSONFile:"T\xE9l\xE9charger le fichier JSON",save:"Enregistrer",update:"Modifier"},q2={decisionField:"Champs de d\xE9cision",helperText:"Texte d'information",hiddenValue:"Valeur cach\xE9",label:"Label",mustBeUnique:"Doit \xEAtre unique",newTree:"Nouvel arbre",offMessage:"Message (d\xE9sactiver)",onMessage:"Message (activer)",repeatable:"R\xE9p\xE9table",staticFields:"Champs statiques",step:"\xC9tape",tree:"Arbre",treeName:"Nom de l'arbre",type:{address:"Adresse",checkbox:"Case \xE0 cocher",date:"Date",email:"Email",file:"Fichier",number:"Nombre",password:"Mot de passe",radio:"Radio",select:"Select",switch:"Switch",tel:"T\xE9l\xE9phone",time:"Temps",text:"Texte",hidden:"Champs cach\xE9",tree:"Arbre",url:"URL"},value:"Valeur",values:"Valeurs"},V2={saveTree:"Enregistrer l'arbre",addFirstTitle:"Ajouter un champ",addTitle:"Ajouter un champ \xE0 \xAB {{name}} \xBB",deleteTitle:"Voulez vraiment supprimer \xAB {{name}} \xBB",editTitle:"\xC9diter le champ \xAB {{name}} \xBB"},B2={error:{saveTree:"Une erreur est survenue veuillez r\xE9essayer",updateTree:"Une erreur est survenue veuillez r\xE9essayer",fetchTree:"Une erreur est survenue veuillez r\xE9essayer"},success:{saveTree:"Arbre enregistr\xE9",updateTree:"Arbre mis \xE0 jour"}},Q2={add:"Ajouter",cancel:"Annuler",disabled:"D\xE9sactiv\xE9",edit:"\xC9diter",isALeaf:"Est une feuille",isAHidden:"Est un champs cach\xE9",isARepeatable:"Est r\xE9p\xE9table",isABranch:"Est une branche",isATree:"Est un arbre",isTheRoot:"Est la racine",label:"Label",name:"Nom",remove:"Supprimer",required:"Requis",save:"Enregistrer",show:"Afficher",type:"Type",validate:"Valider",value:"Valeur",values:"Valeurs"};od.default.use(ad.default).use(Je.initReactI18next).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!1},resources:{en:{button:R2,form:L2,modal:P2,snackMessage:F2,translation:U2},fr:{button:Y2,form:q2,modal:V2,snackMessage:B2,translation:Q2}}}).then();const W2=({authToken:e,endPoint:t,initialTree:n,initialTreeId:r})=>(W.useLayoutEffect(()=>{on.default.defaults.baseURL=t,on.default.defaults.headers.common.Authorization=`Bearer ${e}`},[t,e]),M(nn.QueryClientProvider,{client:dd,children:M(gd,{authToken:e,children:M($2,{endPoint:t,initialTree:n,initialTreeId:r,children:M(fd,{children:M(_d,{children:M(k2,{})})})})})}));ke.TreePlusIcon=rc,ke.Treege=W2,Object.defineProperties(ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "treege",
3
3
  "description": "Form decision tree generator",
4
4
  "license": "ISC",
5
- "version": "0.6.1",
5
+ "version": "0.6.2",
6
6
  "type": "module",
7
7
  "types": "dist/main.d.ts",
8
8
  "main": "dist/main.umd.cjs",
@@ -38,7 +38,7 @@
38
38
  "@uiw/codemirror-theme-dracula": "^4.11.4",
39
39
  "@uiw/react-codemirror": "^4.11.4",
40
40
  "axios": "^1.1.2",
41
- "design-system-tracktor": "^1.8.8",
41
+ "design-system-tracktor": "^1.8.10",
42
42
  "i18next": "^21.8.14",
43
43
  "i18next-browser-languagedetector": "^6.1.4",
44
44
  "react": "^18.2.0",