@uipath/rules-tool 1.205.0-preview.276 → 1.206.0-preview.279

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/DmnFactory-L7MABUC6-q2sr3grz.js +10 -0
  2. package/dist/DmnModelTypes-ATR7FVKZ-h8srwcxk.js +8 -0
  3. package/dist/KieDmnMarshaller-LGE63WDG-nfkpv8f4.js +8 -0
  4. package/dist/THIRD-PARTY-NOTICES.md +4 -4
  5. package/dist/business-rules-z2zw35qd.js +25 -0
  6. package/dist/{constants-cnn0jfw6.js → constants-1sdwfz26.js} +7 -15
  7. package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
  8. package/dist/first-party-service-hegqxm82.js +8 -0
  9. package/dist/hitPolicyResult-CGCR73CW-jz89f1aa.js +12 -0
  10. package/dist/index-4a4x1ygg.js +24 -0
  11. package/dist/{index-52h8rpew.js → index-egzwtc07.js} +2 -4
  12. package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
  13. package/dist/index-xaxgkfez.js +23 -0
  14. package/dist/{tool-tjcg2xje.js → index-y5yffb2s.js} +3525 -236
  15. package/dist/index-z4kt2kt6.js +8 -0
  16. package/dist/{index-bhjt1h5c.js → index-zeszs1ra.js} +23 -66
  17. package/dist/index.js +8 -9
  18. package/dist/{jmespath-231m3hyn.js → jmespath-ab6tdc42.js} +1 -1
  19. package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
  20. package/dist/rule-catalog-5qnmp0xp.js +71 -0
  21. package/dist/rules-command-error-30c8a3n9.js +13 -0
  22. package/dist/{rules-debug-service-sa1xtzr6.js → rules-debug-service-xc1cmwwh.js} +37 -38
  23. package/dist/{rules-init-service-z3ev90qz.js → rules-init-service-frjbgfcs.js} +12 -16
  24. package/dist/{rules-refresh-service-jn6my893.js → rules-refresh-service-18hrs394.js} +13 -14
  25. package/dist/{rules-validate-service-hfw8m3dm.js → rules-validate-service-s787ehrr.js} +10 -13
  26. package/dist/{tool-fk8rznma.js → tool-89e90qrm.js} +173 -223
  27. package/dist/{tool-fbxe48wd.js → tool-8cnhz30a.js} +13991 -15184
  28. package/dist/{tool-pg3h6jtk.js → tool-8sjyv0xg.js} +659 -14
  29. package/dist/{tool-h7gn1rar.js → tool-93hqhaj3.js} +402 -417
  30. package/dist/{tool-xc8qhcwx.js → tool-cf9810hm.js} +32 -34
  31. package/dist/{tool-wf2qkrye.js → tool-cs8nyk0r.js} +990 -514
  32. package/dist/{tool-txp5th7j.js → tool-e23cj2jx.js} +127 -42
  33. package/dist/{tool-1de529jm.js → tool-epsr41wx.js} +12 -3
  34. package/dist/{tool-gkbr01gc.js → tool-fkppxa9f.js} +14 -17
  35. package/dist/{tool-86f1xpxn.js → tool-m59a481n.js} +18 -20
  36. package/dist/tool-mst6a4dr.js +73 -0
  37. package/dist/{tool-t4k013ex.js → tool-njnhj05q.js} +8 -8
  38. package/dist/tool-p7hqn93n.js +455 -0
  39. package/dist/{tool-z1ay3csx.js → tool-sbtf80ft.js} +66 -24
  40. package/dist/{tool-yq5jph4h.js → tool-vqm4apm6.js} +207 -216
  41. package/dist/tool.js +7 -8
  42. package/package.json +2 -2
  43. package/dist/DmnFactory-L7MABUC6-98k17dkr.js +0 -46
  44. package/dist/DmnModelTypes-ATR7FVKZ-jp35cecy.js +0 -18
  45. package/dist/KieDmnMarshaller-LGE63WDG-3vemswef.js +0 -20
  46. package/dist/business-rules-pm96sefm.js +0 -26
  47. package/dist/first-party-service-sd8yaf73.js +0 -27
  48. package/dist/hitPolicyResult-CGCR73CW-9bmc4nsr.js +0 -36
  49. package/dist/index-cpm94vee.js +0 -132
  50. package/dist/index-dqa169gp.js +0 -25
  51. package/dist/index-x9msn1dj.js +0 -85
  52. package/dist/index-ybrgtfsg.js +0 -3326
  53. package/dist/rule-catalog-10fhgevc.js +0 -74
  54. package/dist/rules-command-error-k6kxwfn7.js +0 -14
  55. package/dist/tool-1pccj6q3.js +0 -1116
  56. package/dist/tool-53w8skv5.js +0 -262
  57. package/dist/tool-7haj67tr.js +0 -19
  58. package/dist/tool-fbmxx07c.js +0 -73
  59. package/dist/tool-gdtpsdn7.js +0 -342
  60. package/dist/tool-jd313s2x.js +0 -10
  61. package/dist/tool-qgqscsjc.js +0 -46
  62. /package/dist/{tool-cfrcyxgm.js → tool-2nmqvfmt.js} +0 -0
@@ -1,55 +1,45 @@
1
1
  import {
2
- Ft,
3
- Is,
4
- Ot,
5
- _t,
6
- bs,
7
- hs,
8
- m
9
- } from "./tool-h7gn1rar.js";
10
- import {
11
- Ce,
2
+ pe,
3
+ me,
4
+ ue,
5
+ a,
12
6
  E,
13
- J,
14
- Re,
15
- W,
7
+ xe,
8
+ j,
16
9
  X,
17
- a,
10
+ Re,
11
+ J,
18
12
  ee,
19
- j as j2,
20
- me,
21
- ne,
22
- pe,
13
+ Ce,
23
14
  te,
24
- ue,
25
- xe,
26
- z
27
- } from "./tool-yq5jph4h.js";
15
+ ne
16
+ } from "./tool-vqm4apm6.js";
28
17
  import {
29
- R as R2
30
- } from "./tool-86f1xpxn.js";
18
+ m2,
19
+ _t,
20
+ Is,
21
+ Ft,
22
+ bs,
23
+ Ot,
24
+ hs
25
+ } from "./tool-93hqhaj3.js";
31
26
  import {
32
- A,
33
- H,
34
- I,
35
- Q,
36
- R,
37
- j,
38
- q,
39
- x,
40
- y
41
- } from "./tool-z1ay3csx.js";
27
+ R
28
+ } from "./tool-m59a481n.js";
42
29
  import {
43
30
  e,
31
+ t,
44
32
  r,
45
- t
46
- } from "./tool-jd313s2x.js";
33
+ x2,
34
+ A2,
35
+ Q,
36
+ j2,
37
+ q,
38
+ y,
39
+ I
40
+ } from "./tool-sbtf80ft.js";
47
41
 
48
42
  // ../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-PMJFR7UV.js
49
- var We = { "dmn:decision": { element: "decision", name: W, prefix: "decision" }, "dmn:inputData": { element: "inputData", name: "Input data", prefix: "inputData" }, "dmn:businessKnowledgeModel": { element: "businessKnowledgeModel", name: "Knowledge model", prefix: "bkm" }, "dmn:knowledgeSource": { element: "knowledgeSource", name: "Knowledge source", prefix: "knowledgeSource" } };
50
- function Ge(e2) {
51
- return e2 in We;
52
- }
53
43
  function fe(e2) {
54
44
  return e2["@_label"] ?? e2["@_name"] ?? "";
55
45
  }
@@ -77,10 +67,10 @@ var In = (e2, n) => {
77
67
  function pe2(e2, n) {
78
68
  if (n.length === 0)
79
69
  return;
80
- let o = "expression" in e2 ? e2.expression : undefined, t2 = (i, r2) => {
70
+ let o = "expression" in e2 ? e2.expression : undefined, t2 = (i, r) => {
81
71
  if (i === undefined)
82
72
  return;
83
- let s = n.reduce((a2, [l, m2, c]) => c === "callee" ? pe(a2, l, m2, r2) : ue(a2, l, m2, r2), i);
73
+ let s = n.reduce((a, [l, m, c]) => c === "callee" ? pe(a, l, m, r) : ue(a, l, m, r), i);
84
74
  return s === i ? undefined : s;
85
75
  };
86
76
  if (o?.__$$element === "literalExpression") {
@@ -90,70 +80,34 @@ function pe2(e2, n) {
90
80
  }
91
81
  if (o?.__$$element === "decisionTable") {
92
82
  for (let i of o.input ?? []) {
93
- let r2 = t2(i.inputExpression.text?.__$$text, "expression");
94
- r2 !== undefined && (i.inputExpression.text = { ...i.inputExpression.text, __$$text: r2 });
83
+ let r = t2(i.inputExpression.text?.__$$text, "expression");
84
+ r !== undefined && (i.inputExpression.text = { ...i.inputExpression.text, __$$text: r });
95
85
  let s = i.inputValues && t2(i.inputValues.text?.__$$text, "unaryTests");
96
86
  i.inputValues && s !== undefined && (i.inputValues.text = { ...i.inputValues.text, __$$text: s });
97
87
  }
98
88
  for (let i of o.output ?? []) {
99
- let r2 = i.outputValues && t2(i.outputValues.text?.__$$text, "unaryTests");
100
- i.outputValues && r2 !== undefined && (i.outputValues.text = { ...i.outputValues.text, __$$text: r2 });
89
+ let r = i.outputValues && t2(i.outputValues.text?.__$$text, "unaryTests");
90
+ i.outputValues && r !== undefined && (i.outputValues.text = { ...i.outputValues.text, __$$text: r });
101
91
  }
102
92
  for (let i of o.rule ?? []) {
103
- for (let r2 of i.inputEntry ?? []) {
104
- let s = t2(r2.text?.__$$text, "unaryTests");
105
- s !== undefined && (r2.text = { ...r2.text, __$$text: s });
93
+ for (let r of i.inputEntry ?? []) {
94
+ let s = t2(r.text?.__$$text, "unaryTests");
95
+ s !== undefined && (r.text = { ...r.text, __$$text: s });
106
96
  }
107
- for (let r2 of i.outputEntry ?? []) {
108
- let s = t2(r2.text?.__$$text, "expression");
109
- s !== undefined && (r2.text = { ...r2.text, __$$text: s });
97
+ for (let r of i.outputEntry ?? []) {
98
+ let s = t2(r.text?.__$$text, "expression");
99
+ s !== undefined && (r.text = { ...r.text, __$$text: s });
110
100
  }
111
101
  }
112
102
  }
113
103
  }
114
- function Tn(e2) {
115
- if (e2.definitions["@_exporter"] === z || (e2.definitions.drgElement ?? []).length === 0)
116
- return e2;
117
- let n = structuredClone(e2), o = [];
118
- for (let i of n.definitions.drgElement ?? []) {
119
- if (i["@_label"] !== undefined)
120
- continue;
121
- let r2 = `dmn:${i.__$$element}`;
122
- if (!Ge(r2))
123
- continue;
124
- let s = v(i);
125
- if (!s || i["@_name"] && [s, i["@_name"]].every((b) => !b || F(b) === b))
126
- continue;
127
- let a2 = fe(i), l = a2 && F(a2) !== a2 ? a2 : s, m2 = F(s) === s ? s : a2 || s, c = L(n.definitions, m2, i["@_id"]), u = i.__$$element === "businessKnowledgeModel" ? i["@_name"] ?? s : s;
128
- i["@_label"] = l, i["@_name"] = c, "variable" in i && i.variable && (i.variable["@_name"] = c), u && u !== c && o.push([u, c, i.__$$element === "businessKnowledgeModel" ? "callee" : "reference"]);
129
- }
130
- let t2 = new Set((n.definitions.drgElement ?? []).map(v));
131
- for (let i of n.definitions.drgElement ?? []) {
132
- let r2 = i["@_id"], s = v(i);
133
- !r2 || !s || r2 === s || t2.has(r2) || o.push([r2, s, i.__$$element === "businessKnowledgeModel" ? "callee" : "reference"]);
134
- }
135
- for (let i of n.definitions.drgElement ?? [])
136
- pe2(i, o);
137
- return n.definitions["@_exporter"] = z, n;
138
- }
139
- var wn = "columnList";
140
104
  var jt = new Set([...r, "days and time duration", "years and months duration", "context", "list", "range", "function", "null"]);
141
- var Nn = (e2, n) => {
142
- let o = n === undefined ? undefined : H(e2, n);
143
- return o === undefined ? undefined : e2.itemDefinitions?.find((t2) => t2.name === o);
144
- };
145
- var Mn = (e2, n) => e2.isCollection && n !== undefined && e2.typeRef !== undefined && R(e2.typeRef) === R(n) && !e2.components?.length && e2.allowedValues === undefined && e2.typeRefNamespaces === undefined;
146
- var Sn = (e2) => e2.id.startsWith(`${wn}_`) && Mn(e2, e2.typeRef);
147
- var zt = (e2, n) => {
148
- let o = Nn(e2, n);
149
- return !!o && Sn(o);
150
- };
151
105
  var An = (e2) => {
152
- let n = new Map, o = (t2, i) => t2?.forEach((r2, s) => {
153
- let a2 = i?.[s];
154
- a2 && (n.set(r2.id, a2), o(r2.components, a2.itemComponent));
106
+ let n = new Map, o = (t2, i) => t2?.forEach((r, s) => {
107
+ let a = i?.[s];
108
+ a && (n.set(r.id, a), o(r.components, a.itemComponent));
155
109
  });
156
- return o(A(e2), e2.itemDefinition), n;
110
+ return o(A2(e2), e2.itemDefinition), n;
157
111
  };
158
112
  var vn = (e2) => e2.includes("/");
159
113
  var Cn = (e2, n) => {
@@ -171,28 +125,28 @@ var On = (e2, n, o) => {
171
125
  return false;
172
126
  if (e2 === n)
173
127
  return true;
174
- let t2 = o.before.get(x(e2));
175
- return t2 !== undefined && t2 === o.after.get(x(n));
128
+ let t2 = o.before.get(x2(e2));
129
+ return t2 !== undefined && t2 === o.after.get(x2(n));
176
130
  };
177
131
  var Xe = (e2, n, o) => {
178
- let t2 = n.get(e2.id), i = t2 !== undefined && (!!t2["@_isCollection"] !== e2.isCollection || !!t2.itemComponent?.length != !!e2.components?.length), r2 = t2?.allowedValues, s = t2?.typeRef !== undefined && !On(t2.typeRef.__$$text, e2.typeRef, o), a2 = i || s || r2 !== undefined && e2.allowedValues === undefined;
179
- return { ...t2, ...a2 ? { typeConstraint: undefined } : {}, allowedValues: Cn(e2.allowedValues, r2), "@_id": vn(e2.id) ? t2?.["@_id"] : e2.id, "@_name": e2.name, "@_isCollection": Pn(e2.isCollection, t2), typeRef: Ln(e2.typeRef, t2?.typeRef), itemComponent: e2.components?.map((l) => Xe(l, n, o)) };
132
+ let t2 = n.get(e2.id), i = t2 !== undefined && (!!t2["@_isCollection"] !== e2.isCollection || !!t2.itemComponent?.length != !!e2.components?.length), r = t2?.allowedValues, s = t2?.typeRef !== undefined && !On(t2.typeRef.__$$text, e2.typeRef, o), a = i || s || r !== undefined && e2.allowedValues === undefined;
133
+ return { ...t2, ...a ? { typeConstraint: undefined } : {}, allowedValues: Cn(e2.allowedValues, r), "@_id": vn(e2.id) ? t2?.["@_id"] : e2.id, "@_name": e2.name, "@_isCollection": Pn(e2.isCollection, t2), typeRef: Ln(e2.typeRef, t2?.typeRef), itemComponent: e2.components?.map((l) => Xe(l, n, o)) };
180
134
  };
181
135
  var Ze = (e2, n) => {
182
- let o = An(e2), t2 = { before: Ye(A(e2)), after: Ye(n) }, i = n?.length ? n.map((r2) => Xe(r2, o, t2)) : undefined;
136
+ let o = An(e2), t2 = { before: Ye(A2(e2)), after: Ye(n) }, i = n?.length ? n.map((r) => Xe(r, o, t2)) : undefined;
183
137
  i === undefined && e2.itemDefinition === undefined || (e2.itemDefinition = i);
184
138
  };
185
- var qn = (e2) => (n) => !!e2 && j(n) === e2;
139
+ var qn = (e2) => (n) => !!e2 && j2(n) === e2;
186
140
  var Qe = (e2, n, o, t2) => {
187
141
  let i = [];
188
- for (let r2 of e2.definitions.drgElement ?? [])
189
- if (!(r2.__$$element !== "decision" || r2.expression?.__$$element !== "decisionTable") && !(t2 !== undefined && r2["@_id"] === t2))
190
- for (let s of r2.expression.input ?? []) {
191
- let a2 = s.inputExpression;
192
- if (!a2 || !qn(n)(s))
142
+ for (let r of e2.definitions.drgElement ?? [])
143
+ if (!(r.__$$element !== "decision" || r.expression?.__$$element !== "decisionTable") && !(t2 !== undefined && r["@_id"] === t2))
144
+ for (let s of r.expression.input ?? []) {
145
+ let a = s.inputExpression;
146
+ if (!a || !qn(n)(s))
193
147
  continue;
194
- let l = o(a2["@_typeRef"]);
195
- l !== a2["@_typeRef"] && (i.push(a2["@_typeRef"]), a2["@_typeRef"] = l);
148
+ let l = o(a["@_typeRef"]);
149
+ l !== a["@_typeRef"] && (i.push(a["@_typeRef"]), a["@_typeRef"] = l);
196
150
  }
197
151
  return i;
198
152
  };
@@ -241,9 +195,9 @@ function on(e2, n) {
241
195
  for (let t2 of tn(e2)) {
242
196
  if (z2(o, t2))
243
197
  continue;
244
- let i = `${t2}${j3}`, r2 = o?.[i];
245
- if (r2 && !z2(Array.isArray(r2) ? r2[0] : r2, t2))
246
- return { key: i, entry: r2 };
198
+ let i = `${t2}${j3}`, r = o?.[i];
199
+ if (r && !z2(Array.isArray(r) ? r[0] : r, t2))
200
+ return { key: i, entry: r };
247
201
  }
248
202
  }
249
203
  function xe2(e2, n) {
@@ -260,10 +214,10 @@ function Fn(e2, n) {
260
214
  return tn(e2).filter((t2) => !z2(n, t2)).map((t2) => `${t2}${j3}`).find((t2) => n[t2] === undefined) ?? `${Un(e2, n)}${j3}`;
261
215
  }
262
216
  function rn(e2, n, o, t2) {
263
- let i = on(e2, n), r2 = n.extensionElements ?? {};
264
- n.extensionElements = r2;
265
- let s = i?.key ?? Fn(e2, r2), a2 = r2[s], m2 = { ...Array.isArray(a2) ? a2[0] : a2, [o]: t2 };
266
- Array.isArray(a2) ? a2[0] = m2 : r2[s] = m2;
217
+ let i = on(e2, n), r = n.extensionElements ?? {};
218
+ n.extensionElements = r;
219
+ let s = i?.key ?? Fn(e2, r), a = r[s], m = { ...Array.isArray(a) ? a[0] : a, [o]: t2 };
220
+ Array.isArray(a) ? a[0] = m : r[s] = m;
267
221
  }
268
222
  function sn(e2) {
269
223
  let n = xe2(e2, e2.definitions)?.["@_surface"];
@@ -291,10 +245,10 @@ function jn(e2, n) {
291
245
  return !(e2.x + e2.width + E2.horizontalGap <= n.x || n.x + n.width + E2.horizontalGap <= e2.x || e2.y + e2.height + E2.verticalGap <= n.y || n.y + n.height + E2.verticalGap <= e2.y);
292
246
  }
293
247
  function zn(e2, n) {
294
- let o = ({ x: r2, y: s }) => [Math.abs(r2) + Math.abs(s), Math.abs(s), -r2, -s], [t2, i] = [o(e2), o(n)];
295
- for (let [r2, s] of t2.entries())
296
- if (s !== i[r2])
297
- return s - i[r2];
248
+ let o = ({ x: r, y: s }) => [Math.abs(r) + Math.abs(s), Math.abs(s), -r, -s], [t2, i] = [o(e2), o(n)];
249
+ for (let [r, s] of t2.entries())
250
+ if (s !== i[r])
251
+ return s - i[r];
298
252
  return 0;
299
253
  }
300
254
  function Hn(e2) {
@@ -305,14 +259,14 @@ function Hn(e2) {
305
259
  return n.sort(zn);
306
260
  }
307
261
  function mn(e2, n) {
308
- let o = ({ x: t2, y: i }) => !n.some((r2) => jn({ x: t2, y: i, width: E2.nodeWidth, height: E2.nodeHeight }, r2));
262
+ let o = ({ x: t2, y: i }) => !n.some((r) => jn({ x: t2, y: i, width: E2.nodeWidth, height: E2.nodeHeight }, r));
309
263
  if (o(e2))
310
264
  return e2;
311
265
  for (let t2 = 1;t2 <= n.length; t2++)
312
266
  for (let i of Hn(t2)) {
313
- let r2 = { x: e2.x + i.x * H2, y: e2.y + i.y * ye };
314
- if (o(r2))
315
- return r2;
267
+ let r = { x: e2.x + i.x * H2, y: e2.y + i.y * ye };
268
+ if (o(r))
269
+ return r;
316
270
  }
317
271
  return { x: Math.max(...n.map((t2) => t2.x + t2.width)) + E2.horizontalGap, y: e2.y };
318
272
  }
@@ -338,8 +292,8 @@ function Ee(e2, n, o) {
338
292
  return;
339
293
  if (!e2.includes(":"))
340
294
  return e2.includes("#") || e2.includes("/") ? undefined : e2;
341
- let [t2, i, ...r2] = e2.split(":");
342
- if (!t2 || !i || r2.length > 0)
295
+ let [t2, i, ...r] = e2.split(":");
296
+ if (!t2 || !i || r.length > 0)
343
297
  return;
344
298
  let s = y(t2, I(o));
345
299
  return s === Kn || s === n["@_namespace"] ? i : undefined;
@@ -351,24 +305,24 @@ function Gn(e2, n, o) {
351
305
  let i = n["@_namespace"];
352
306
  if (!i || n["@_xmlns"] === i)
353
307
  return e2;
354
- let r2 = Object.entries(n).find(([l, m2]) => l.startsWith("@_xmlns:") && m2 === i)?.[0];
355
- if (r2)
356
- return `${r2.slice(8)}:${e2}`;
357
- let s = "tns", a2 = 2;
308
+ let r = Object.entries(n).find(([l, m]) => l.startsWith("@_xmlns:") && m === i)?.[0];
309
+ if (r)
310
+ return `${r.slice(8)}:${e2}`;
311
+ let s = "tns", a = 2;
358
312
  for (;n[`@_xmlns:${s}`]; )
359
- s = `tns${a2++}`;
313
+ s = `tns${a++}`;
360
314
  return n[`@_xmlns:${s}`] = i, `${s}:${e2}`;
361
315
  }
362
316
  function fn(e2, n, o) {
363
317
  let t2 = e2["dmndi:DMNDI"];
364
318
  if (t2)
365
319
  for (let i of t2["dmndi:DMNDiagram"] ?? [])
366
- i["dmndi:DMNDiagramElement"] = i["dmndi:DMNDiagramElement"]?.flatMap((r2) => {
367
- let s = r2["@_dmnElementRef"], a2 = Ee(s, e2, [r2, i, t2, e2]);
368
- if (!a2)
369
- return [r2];
370
- let l = o?.get(a2);
371
- return l ? [{ ...r2, "@_dmnElementRef": Gn(l, e2, s ?? "") }] : n.has(a2) ? [] : [r2];
320
+ i["dmndi:DMNDiagramElement"] = i["dmndi:DMNDiagramElement"]?.flatMap((r) => {
321
+ let s = r["@_dmnElementRef"], a = Ee(s, e2, [r, i, t2, e2]);
322
+ if (!a)
323
+ return [r];
324
+ let l = o?.get(a);
325
+ return l ? [{ ...r, "@_dmnElementRef": Gn(l, e2, s ?? "") }] : n.has(a) ? [] : [r];
372
326
  });
373
327
  }
374
328
  function pn(e2, n) {
@@ -386,8 +340,8 @@ function Xn(e2) {
386
340
  function Zn(e2, n) {
387
341
  let o = e2["dmndi:DMNDI"];
388
342
  return o ? (o["dmndi:DMNDiagram"] ?? []).flatMap((t2) => (t2["dmndi:DMNDiagramElement"] ?? []).flatMap((i) => {
389
- let r2 = Xn(i), s = Ee(i["@_dmnElementRef"], e2, [i, t2, o, e2]);
390
- return !r2 || n && s === n ? [] : [{ x: r2["@_x"], y: r2["@_y"], width: pn(e2, s ?? ""), height: Math.max(r2["@_height"] ?? 0, E2.nodeHeight), kind: s ? Dn(e2, s) : undefined }];
343
+ let r = Xn(i), s = Ee(i["@_dmnElementRef"], e2, [i, t2, o, e2]);
344
+ return !r || n && s === n ? [] : [{ x: r["@_x"], y: r["@_y"], width: pn(e2, s ?? ""), height: Math.max(r["@_height"] ?? 0, E2.nodeHeight), kind: s ? Dn(e2, s) : undefined }];
391
345
  })) : [];
392
346
  }
393
347
  function Qn(e2, n) {
@@ -398,7 +352,7 @@ function Jn(e2, n, o) {
398
352
  if (o && Dn(e2, o) === "inputData") {
399
353
  let t2 = n.filter((i) => i.kind === "inputData");
400
354
  if (t2.length > 0) {
401
- let i = t2.reduce((r2, s) => s.x > r2.x ? s : r2, t2[0]);
355
+ let i = t2.reduce((r, s) => s.x > r.x ? s : r, t2[0]);
402
356
  return { x: i.x + H2, y: i.y };
403
357
  }
404
358
  return { x: Math.min(...n.map((i) => i.x)), y: Math.max(...n.map((i) => i.y)) + ye };
@@ -435,20 +389,20 @@ function ot(e2) {
435
389
  }
436
390
  var gn = ["informationRequirement", "knowledgeRequirement", "authorityRequirement"];
437
391
  function xn(e2, n) {
438
- let o = new Map((e2.drgElement ?? []).map((r2) => [r2["@_id"] ?? "", r2])), t2 = new Set, i = [n];
392
+ let o = new Map((e2.drgElement ?? []).map((r) => [r["@_id"] ?? "", r])), t2 = new Set, i = [n];
439
393
  for (;i.length > 0; ) {
440
- let r2 = o.get(i.shift() ?? "");
441
- if (!r2)
394
+ let r = o.get(i.shift() ?? "");
395
+ if (!r)
442
396
  continue;
443
- let s = [...r2.informationRequirement ?? [], ...r2.knowledgeRequirement ?? [], ...r2.authorityRequirement ?? []];
444
- for (let a2 of s) {
445
- let l = a2.requiredInput?.["@_href"] ?? a2.requiredDecision?.["@_href"] ?? a2.requiredKnowledge?.["@_href"] ?? a2.requiredAuthority?.["@_href"], m2 = $(l);
446
- !m2 || t2.has(m2) || (t2.add(m2), i.push(m2));
397
+ let s = [...r.informationRequirement ?? [], ...r.knowledgeRequirement ?? [], ...r.authorityRequirement ?? []];
398
+ for (let a of s) {
399
+ let l = a.requiredInput?.["@_href"] ?? a.requiredDecision?.["@_href"] ?? a.requiredKnowledge?.["@_href"] ?? a.requiredAuthority?.["@_href"], m = $(l);
400
+ !m || t2.has(m) || (t2.add(m), i.push(m));
447
401
  }
448
402
  }
449
403
  return t2;
450
404
  }
451
- var rt = new Set([..._t.map((e2) => m[e2]), "feel"]);
405
+ var rt = new Set([..._t.map((e2) => m2[e2]), "feel"]);
452
406
  function O(e2) {
453
407
  return !!e2 && !rt.has(e2);
454
408
  }
@@ -475,15 +429,15 @@ function st(e2) {
475
429
  }
476
430
  function G(e2, n) {
477
431
  let o = new Set([...(n.informationRequirement ?? []).map((i) => i.requiredDecision?.["@_href"]), ...(n.knowledgeRequirement ?? []).map((i) => i.requiredKnowledge?.["@_href"])].flatMap((i) => {
478
- let r2 = $(i);
479
- return r2 ? [r2] : [];
432
+ let r = $(i);
433
+ return r ? [r] : [];
480
434
  })), t2 = g(n);
481
435
  return (e2.drgElement ?? []).flatMap((i) => {
482
- let r2 = g(i), s = !o.has(r2) && r2 !== t2 && i.__$$element === "decision" && !xn(e2, r2).has(t2);
483
- if (!o.has(r2) && !s)
436
+ let r = g(i), s = !o.has(r) && r !== t2 && i.__$$element === "decision" && !xn(e2, r).has(t2);
437
+ if (!o.has(r) && !s)
484
438
  return [];
485
- let a2 = i.variable, l = te(a2?.["@_name"], i["@_name"]);
486
- return l ? [{ name: l, ...i["@_label"] && i["@_label"] !== l ? { label: i["@_label"] } : {}, typeRef: a2?.["@_typeRef"], ...s ? { requirableId: r2 } : {}, members: st(i) }] : [];
439
+ let a = i.variable, l = te(a?.["@_name"], i["@_name"]);
440
+ return l ? [{ name: l, ...i["@_label"] && i["@_label"] !== l ? { label: i["@_label"] } : {}, typeRef: a?.["@_typeRef"], ...s ? { requirableId: r } : {}, members: st(i) }] : [];
487
441
  });
488
442
  }
489
443
  function $e(e2) {
@@ -499,8 +453,8 @@ function C(e2) {
499
453
  }
500
454
  function Y(e2, n, o) {
501
455
  return e2.map((t2) => {
502
- let i = _(t2, "inputData"), r2 = n.get(i), s = C(t2);
503
- return { id: i, name: t2["@_name"], label: t2["@_label"], variableId: t2.variable ? _(t2.variable, "variable") : a("variable"), variableName: t2.variable?.["@_name"], typeRef: t2.variable?.["@_typeRef"], description: t2.description?.__$$text, requirementId: r2 ? _(r2, "informationRequirement") : undefined, requirementFromSource: !!r2 && !o.has(s) };
456
+ let i = _(t2, "inputData"), r = n.get(i), s = C(t2);
457
+ return { id: i, name: t2["@_name"], label: t2["@_label"], variableId: t2.variable ? _(t2.variable, "variable") : a("variable"), variableName: t2.variable?.["@_name"], typeRef: t2.variable?.["@_typeRef"], description: t2.description?.__$$text, requirementId: r ? _(r, "informationRequirement") : undefined, requirementFromSource: !!r && !o.has(s) };
504
458
  });
505
459
  }
506
460
  function k(e2) {
@@ -519,13 +473,13 @@ function X2(e2, n) {
519
473
  return e2.variable || n.variableId || n.variableName !== undefined || n.variableTypeRef !== undefined ? { ...e2.variable, "@_id": n.variableId, "@_name": te(n.variableName, n.name) || n.name, "@_typeRef": n.variableTypeRef } : undefined;
520
474
  }
521
475
  function Z(e2, n, o) {
522
- let t2 = new Map(e2.informationRequirement?.map((u) => [g(u), u]) ?? []), i = k(e2), r2 = (e2.informationRequirement ?? []).filter((u) => u.requiredDecision), s = (n.scopeVariables ?? []).filter((u) => u.requirableId), a2 = s.length > 0 ? o() : new Set, l = new Set(r2.flatMap((u) => $(u.requiredDecision?.["@_href"]) ?? [])), m2 = s.flatMap((u) => a2.has(u.name) && !l.has(u.requirableId ?? "") ? [{ "@_id": a("informationRequirement"), requiredDecision: { "@_href": `#${u.requirableId}` } }] : []), c = n.inputData.flatMap((u) => {
476
+ let t2 = new Map(e2.informationRequirement?.map((u) => [g(u), u]) ?? []), i = k(e2), r = (e2.informationRequirement ?? []).filter((u) => u.requiredDecision), s = (n.scopeVariables ?? []).filter((u) => u.requirableId), a2 = s.length > 0 ? o() : new Set, l = new Set(r.flatMap((u) => $(u.requiredDecision?.["@_href"]) ?? [])), m = s.flatMap((u) => a2.has(u.name) && !l.has(u.requirableId ?? "") ? [{ "@_id": a("informationRequirement"), requiredDecision: { "@_href": `#${u.requirableId}` } }] : []), c = n.inputData.flatMap((u) => {
523
477
  if (!u.requirementId)
524
478
  return [];
525
479
  let b = t2.get(u.requirementId) ?? i.get(u.id);
526
480
  return [{ ...b, "@_id": u.requirementId, requiredDecision: undefined, requiredInput: { ...b?.requiredInput, "@_href": `#${u.id}` } }];
527
481
  });
528
- return [...r2, ...m2, ...c];
482
+ return [...r, ...m, ...c];
529
483
  }
530
484
  function Q2(e2) {
531
485
  let n = new Map;
@@ -533,12 +487,12 @@ function Q2(e2) {
533
487
  let t2 = o, i = t2["@_name"];
534
488
  if (!i || t2["@_label"] || !/\s/.test(i))
535
489
  continue;
536
- let r2 = t2.variable?.["@_name"], s = r2 && !/\s/.test(r2) ? r2 : L(e2, i);
490
+ let r = t2.variable?.["@_name"], s = r && !/\s/.test(r) ? r : L(e2, i);
537
491
  t2["@_label"] = i, t2["@_name"] = s, t2.variable && (t2.variable["@_name"] = s), i !== s && n.set(i, s);
538
492
  }
539
493
  for (let o of e2.drgElement ?? []) {
540
- let t2 = o, i = t2["@_name"], r2 = t2.variable?.["@_name"];
541
- !i || !r2 || r2 === i || r2 !== i.replace(/\s+/g, "") || (n.set(r2, i), t2.variable && (t2.variable["@_name"] = i));
494
+ let t2 = o, i = t2["@_name"], r = t2.variable?.["@_name"];
495
+ !i || !r || r === i || r !== i.replace(/\s+/g, "") || (n.set(r, i), t2.variable && (t2.variable["@_name"] = i));
542
496
  }
543
497
  n.size > 0 && be(e2, "", n);
544
498
  }
@@ -546,45 +500,45 @@ function dt(e2, n, o, t2) {
546
500
  let i = [];
547
501
  if (o.size === 0 && t2.size === 0 || (t2.size > 0 && be(e2, n, t2), o.size === 0))
548
502
  return i;
549
- for (let r2 of e2.drgElement ?? [])
550
- r2.__$$element !== "decision" || g(r2) === n || !r2.informationRequirement || (r2.informationRequirement = r2.informationRequirement.filter((s) => {
551
- let a2 = $(s.requiredInput?.["@_href"]);
552
- return !a2 || !o.has(a2) ? true : (i.push(g(s)), false);
503
+ for (let r of e2.drgElement ?? [])
504
+ r.__$$element !== "decision" || g(r) === n || !r.informationRequirement || (r.informationRequirement = r.informationRequirement.filter((s) => {
505
+ let a = $(s.requiredInput?.["@_href"]);
506
+ return !a || !o.has(a) ? true : (i.push(g(s)), false);
553
507
  }));
554
508
  return i;
555
509
  }
556
510
  function J2(e2, n, o) {
557
- let t2 = structuredClone(e2.document), i = t2.definitions, r2 = i.drgElement?.find((d) => d.__$$element === "decision" && g(d) === e2.sourceDecisionId);
558
- if (!r2)
511
+ let t2 = structuredClone(e2.document), i = t2.definitions, r = i.drgElement?.find((d) => d.__$$element === "decision" && g(d) === e2.sourceDecisionId);
512
+ if (!r)
559
513
  throw new Error("Business rule decision is missing");
560
- let s = new Set(e2.sourceInputDataIds), a2 = i.drgElement?.filter((d) => d.__$$element === "inputData" && s.has(g(d))) ?? [], l = new Map(a2.map((d) => [g(d), d])), m2 = new Map(a2.flatMap((d) => d.variable?.["@_id"] ? [[d.variable["@_id"], d]] : [])), c = n.inputData.map((d) => {
561
- let x2 = l.get(d.id) ?? (d.variableId ? m2.get(d.variableId) : undefined);
562
- return { current: x2, inputId: d.id, updated: at(x2, d) };
563
- }), u = new Map(c.flatMap(({ current: d, updated: x2 }) => d?.["@_id"] ? [[d["@_id"], x2]] : [])), b = c.flatMap(({ current: d, updated: x2 }) => d ? [] : [x2]), T = o(r2, n), p = new Set((r2.informationRequirement ?? []).filter((d) => !d.requiredDecision).map(g)), h = new Set(n.inputData.map((d) => d.requirementId).filter((d) => !!d)), Re2 = new Set([...[...p].filter((d) => !h.has(d)), ...a2.map(g).filter((d) => !u.has(d))]), f = new Map;
564
- r2["@_id"] && r2["@_id"] !== n.decision.id && f.set(r2["@_id"], n.decision.id);
565
- for (let { current: d, inputId: x2 } of c)
566
- d?.["@_id"] && d["@_id"] !== x2 && f.set(d["@_id"], x2);
514
+ let s = new Set(e2.sourceInputDataIds), a = i.drgElement?.filter((d) => d.__$$element === "inputData" && s.has(g(d))) ?? [], l = new Map(a.map((d) => [g(d), d])), m = new Map(a.flatMap((d) => d.variable?.["@_id"] ? [[d.variable["@_id"], d]] : [])), c = n.inputData.map((d) => {
515
+ let x = l.get(d.id) ?? (d.variableId ? m.get(d.variableId) : undefined);
516
+ return { current: x, inputId: d.id, updated: at(x, d) };
517
+ }), u = new Map(c.flatMap(({ current: d, updated: x }) => d?.["@_id"] ? [[d["@_id"], x]] : [])), b = c.flatMap(({ current: d, updated: x }) => d ? [] : [x]), T = o(r, n), p = new Set((r.informationRequirement ?? []).filter((d) => !d.requiredDecision).map(g)), h = new Set(n.inputData.map((d) => d.requirementId).filter((d) => !!d)), Re = new Set([...[...p].filter((d) => !h.has(d)), ...a.map(g).filter((d) => !u.has(d))]), f = new Map;
518
+ r["@_id"] && r["@_id"] !== n.decision.id && f.set(r["@_id"], n.decision.id);
519
+ for (let { current: d, inputId: x } of c)
520
+ d?.["@_id"] && d["@_id"] !== x && f.set(d["@_id"], x);
567
521
  i["@_id"] = n.id, i["@_name"] = n.name, i["@_namespace"] = n.namespace, i["@_exporter"] = n.exporter, i["@_exporterVersion"] = n.exporterVersion, Ze(i, n.itemDefinitions);
568
- let R3 = new Set(a2.map(g).filter((d) => !u.has(d))), Ie = new Map(c.flatMap(({ current: d, updated: x2 }) => {
569
- let I2 = d && C(d), A2 = C(x2);
570
- return I2 && A2 && I2 !== A2 ? [[I2, A2]] : [];
571
- })), ne2 = C(r2), te2 = C(T);
572
- ne2 && te2 && ne2 !== te2 && Ie.set(ne2, te2), i.drgElement = i.drgElement?.flatMap((d) => {
573
- let x2 = g(d);
574
- if (x2 === e2.sourceDecisionId)
522
+ let R = new Set(a.map(g).filter((d) => !u.has(d))), Ie = new Map(c.flatMap(({ current: d, updated: x }) => {
523
+ let I = d && C(d), A = C(x);
524
+ return I && A && I !== A ? [[I, A]] : [];
525
+ })), ne = C(r), te = C(T);
526
+ ne && te && ne !== te && Ie.set(ne, te), i.drgElement = i.drgElement?.flatMap((d) => {
527
+ let x = g(d);
528
+ if (x === e2.sourceDecisionId)
575
529
  return [...b, T];
576
- if (s.has(x2)) {
577
- let I2 = u.get(x2);
578
- return I2 ? [I2] : [];
530
+ if (s.has(x)) {
531
+ let I = u.get(x);
532
+ return I ? [I] : [];
579
533
  }
580
534
  return [d];
581
535
  });
582
- let Rn = dt(i, e2.sourceDecisionId, R3, Ie);
583
- for (let { current: d, updated: x2 } of c) {
584
- let I2 = x2.variable?.["@_typeRef"], A2 = C(x2);
585
- d && A2 && I2 !== d.variable?.["@_typeRef"] && Qe(t2, A2, () => I2, T["@_id"]);
536
+ let Rn = dt(i, e2.sourceDecisionId, R, Ie);
537
+ for (let { current: d, updated: x } of c) {
538
+ let I = x.variable?.["@_typeRef"], A = C(x);
539
+ d && A && I !== d.variable?.["@_typeRef"] && Qe(t2, A, () => I, T["@_id"]);
586
540
  }
587
- fn(i, new Set([...Re2, ...Rn]), f);
541
+ fn(i, new Set([...Re, ...Rn]), f);
588
542
  for (let d of b)
589
543
  _n(i, g(d));
590
544
  return t2;
@@ -607,30 +561,30 @@ function mt(e2, n) {
607
561
  let t2 = n !== undefined;
608
562
  if (!q2(o) || !t2 && o.artifact?.length)
609
563
  return;
610
- let i = w(o), r2 = o.drgElement?.filter((f) => f.__$$element === "inputData") ?? [];
611
- if (!t2 && (i.length !== 1 || i.length + r2.length !== (o.drgElement?.length ?? 0)))
564
+ let i = w(o), r = o.drgElement?.filter((f) => f.__$$element === "inputData") ?? [];
565
+ if (!t2 && (i.length !== 1 || i.length + r.length !== (o.drgElement?.length ?? 0)))
612
566
  return;
613
567
  let s = t2 ? i.find((f) => g(f) === n) : i[0];
614
568
  if (!s)
615
569
  return;
616
- let a2 = s.expression?.__$$element === "decisionTable" ? s.expression : undefined, l = new Set(r2.map(g)), m2 = new Set;
617
- if (!a2 || !t2 && (s.knowledgeRequirement?.length || s.authorityRequirement?.length) || !W2(s) || s.informationRequirement?.some((f) => {
570
+ let a = s.expression?.__$$element === "decisionTable" ? s.expression : undefined, l = new Set(r.map(g)), m = new Set;
571
+ if (!a || !t2 && (s.knowledgeRequirement?.length || s.authorityRequirement?.length) || !W2(s) || s.informationRequirement?.some((f) => {
618
572
  if (f.requiredDecision)
619
573
  return !t2;
620
- let R3 = $(f.requiredInput?.["@_href"]);
621
- return !R3 || !l.has(R3) || m2.has(R3) ? true : (m2.add(R3), false);
574
+ let R = $(f.requiredInput?.["@_href"]);
575
+ return !R || !l.has(R) || m.has(R) ? true : (m.add(R), false);
622
576
  }))
623
577
  return;
624
- let c = a2["@_hitPolicy"] ?? e.Unique, u = a2["@_aggregation"], b = a2.input?.length ?? 0, T = a2.output.length, p = a2.annotation?.length ?? 0;
625
- if (!(!ut(c) || u !== undefined && (c !== e.Collect || !R2(u)) || T === 0 || a2.output.some((f) => f.defaultOutputEntry) || p > 1 || a2.rule?.some((f) => (f.inputEntry?.length ?? 0) !== b || f.outputEntry.length !== T || (f.annotationEntry?.length ?? 0) !== p) || [...(a2.input ?? []).flatMap((f) => [f.inputExpression["@_expressionLanguage"], f.inputValues?.["@_expressionLanguage"]]), ...a2.output.map((f) => f.outputValues?.["@_expressionLanguage"]), ...a2.rule?.flatMap((f) => [...f.inputEntry?.map((R3) => R3["@_expressionLanguage"]) ?? [], ...f.outputEntry.map((R3) => R3["@_expressionLanguage"])]) ?? []].some(O) || [...(a2.input ?? []).map((f) => f.inputValues), ...a2.output.map((f) => f.outputValues)].some((f) => f?.extensionElements !== undefined)))
626
- return { definitions: o, decision: s, table: a2, inputData: r2, scopeVariables: t2 ? G(o, s) : [], hitPolicy: c };
578
+ let c = a["@_hitPolicy"] ?? e.Unique, u = a["@_aggregation"], b = a.input?.length ?? 0, T = a.output.length, p = a.annotation?.length ?? 0;
579
+ if (!(!ut(c) || u !== undefined && (c !== e.Collect || !R(u)) || T === 0 || a.output.some((f) => f.defaultOutputEntry) || p > 1 || a.rule?.some((f) => (f.inputEntry?.length ?? 0) !== b || f.outputEntry.length !== T || (f.annotationEntry?.length ?? 0) !== p) || [...(a.input ?? []).flatMap((f) => [f.inputExpression["@_expressionLanguage"], f.inputValues?.["@_expressionLanguage"]]), ...a.output.map((f) => f.outputValues?.["@_expressionLanguage"]), ...a.rule?.flatMap((f) => [...f.inputEntry?.map((R) => R["@_expressionLanguage"]) ?? [], ...f.outputEntry.map((R) => R["@_expressionLanguage"])]) ?? []].some(O) || [...(a.input ?? []).map((f) => f.inputValues), ...a.output.map((f) => f.outputValues)].some((f) => f?.extensionElements !== undefined)))
580
+ return { definitions: o, decision: s, table: a, inputData: r, scopeVariables: t2 ? G(o, s) : [], hitPolicy: c };
627
581
  }
628
582
  function ft(e2, n) {
629
583
  let o = mt(e2, n);
630
584
  if (!o)
631
585
  return;
632
- let { definitions: t2, decision: i, table: r2, inputData: s, hitPolicy: a2 } = o, l = new Set, m2 = new Set, c = r2.input?.map((p) => ({ id: K(l, p, "input"), label: p["@_label"], expressionId: _(p.inputExpression, "inputExpression"), expressionText: N(p.inputExpression.text), typeRef: p.inputExpression["@_typeRef"], allowedValues: yn(p.inputValues, "inputValues") })) ?? [], u = r2.output.map((p) => ({ id: K(l, p, "output"), label: p["@_label"], name: p["@_name"], typeRef: p["@_typeRef"], allowedValues: yn(p.outputValues, "outputValues"), description: p.description?.__$$text })), b = r2.rule?.map((p) => ({ id: K(m2, p, "rule"), description: p.description?.__$$text, inputEntries: p.inputEntry?.map((h) => ({ id: _(h, "inputEntry"), text: N(h.text) })) ?? [], outputEntries: p.outputEntry.map((h) => ({ id: _(h, "outputEntry"), text: yt(N(h.text)) })), annotationEntries: r2.annotation?.length ? p.annotationEntry?.map((h) => N(h.text)) ?? [] : [""] })) ?? [], T = xe({ inputs: c, outputs: u, rules: b });
633
- return { id: _(t2, "definitions"), name: t2["@_name"], ...o.scopeVariables.length ? { scopeVariables: o.scopeVariables } : {}, exporter: t2["@_exporter"], exporterVersion: t2["@_exporterVersion"], ...Q(t2), namespace: t2["@_namespace"], externalTypeRefs: q(t2, i), inputData: Y(s, k(i), T), decision: { id: _(i, "decision"), name: i["@_name"] ?? "", label: i["@_label"], variableId: i.variable ? _(i.variable, "variable") : a("variable"), variableName: i.variable?.["@_name"], variableTypeRef: i.variable?.["@_typeRef"], description: i.description?.__$$text, question: i.question?.__$$text, allowedAnswers: i.allowedAnswers?.__$$text, decisionTable: { id: _(r2, "decisionTable"), label: r2["@_label"], typeRef: r2["@_typeRef"], outputLabel: r2["@_outputLabel"], preferredOrientation: r2["@_preferredOrientation"], hitPolicy: a2, aggregation: R2(r2["@_aggregation"]) ? r2["@_aggregation"] : undefined, inputs: c, outputs: u, annotations: r2.annotation?.length ? r2.annotation.map((p) => ({ name: p["@_name"] })) : [{ name: j2 }], rules: b } } };
586
+ let { definitions: t2, decision: i, table: r, inputData: s, hitPolicy: a2 } = o, l = new Set, m = new Set, c = r.input?.map((p) => ({ id: K(l, p, "input"), label: p["@_label"], expressionId: _(p.inputExpression, "inputExpression"), expressionText: N(p.inputExpression.text), typeRef: p.inputExpression["@_typeRef"], allowedValues: yn(p.inputValues, "inputValues") })) ?? [], u = r.output.map((p) => ({ id: K(l, p, "output"), label: p["@_label"], name: p["@_name"], typeRef: p["@_typeRef"], allowedValues: yn(p.outputValues, "outputValues"), description: p.description?.__$$text })), b = r.rule?.map((p) => ({ id: K(m, p, "rule"), description: p.description?.__$$text, inputEntries: p.inputEntry?.map((h) => ({ id: _(h, "inputEntry"), text: N(h.text) })) ?? [], outputEntries: p.outputEntry.map((h) => ({ id: _(h, "outputEntry"), text: yt(N(h.text)) })), annotationEntries: r.annotation?.length ? p.annotationEntry?.map((h) => N(h.text)) ?? [] : [""] })) ?? [], T = xe({ inputs: c, outputs: u, rules: b });
587
+ return { id: _(t2, "definitions"), name: t2["@_name"], ...o.scopeVariables.length ? { scopeVariables: o.scopeVariables } : {}, exporter: t2["@_exporter"], exporterVersion: t2["@_exporterVersion"], ...Q(t2), namespace: t2["@_namespace"], externalTypeRefs: q(t2, i), inputData: Y(s, k(i), T), decision: { id: _(i, "decision"), name: i["@_name"] ?? "", label: i["@_label"], variableId: i.variable ? _(i.variable, "variable") : a("variable"), variableName: i.variable?.["@_name"], variableTypeRef: i.variable?.["@_typeRef"], description: i.description?.__$$text, question: i.question?.__$$text, allowedAnswers: i.allowedAnswers?.__$$text, decisionTable: { id: _(r, "decisionTable"), label: r["@_label"], typeRef: r["@_typeRef"], outputLabel: r["@_outputLabel"], preferredOrientation: r["@_preferredOrientation"], hitPolicy: a2, aggregation: R(r["@_aggregation"]) ? r["@_aggregation"] : undefined, inputs: c, outputs: u, annotations: r.annotation?.length ? r.annotation.map((p) => ({ name: p["@_name"] })) : [{ name: j }], rules: b } } };
634
588
  }
635
589
  function pt(e2, n) {
636
590
  let o = structuredClone(e2), t2 = ft(o, n);
@@ -650,22 +604,22 @@ function Dt(e2) {
650
604
  }
651
605
  }
652
606
  function _t2(e2, n) {
653
- let o = !e2.annotation?.length && n.annotations.length === 1 && n.annotations[0].name === j2 && n.rules.every((s) => s.annotationEntries.length === 1 && s.annotationEntries[0] === ""), t2 = new Map(e2.input?.map((s) => [s["@_id"], s]) ?? []), i = new Map(e2.output.map((s) => [s["@_id"], s])), r2 = new Map(e2.rule?.map((s) => [s["@_id"], s]) ?? []);
607
+ let o = !e2.annotation?.length && n.annotations.length === 1 && n.annotations[0].name === j && n.rules.every((s) => s.annotationEntries.length === 1 && s.annotationEntries[0] === ""), t2 = new Map(e2.input?.map((s) => [s["@_id"], s]) ?? []), i = new Map(e2.output.map((s) => [s["@_id"], s])), r = new Map(e2.rule?.map((s) => [s["@_id"], s]) ?? []);
654
608
  return { ...e2, "@_id": n.id, "@_label": n.label, "@_typeRef": n.typeRef, "@_outputLabel": n.outputLabel, "@_preferredOrientation": Dt(n.preferredOrientation), "@_hitPolicy": n.hitPolicy === e.Unique ? undefined : n.hitPolicy, "@_aggregation": n.hitPolicy === e.Collect ? n.aggregation : undefined, input: n.inputs.map((s) => {
655
- let a2 = t2.get(s.id);
656
- return { ...a2, "@_id": s.id, "@_label": s.label, inputExpression: { ...a2?.inputExpression, "@_id": s.expressionId, "@_typeRef": s.typeRef, text: y2(a2?.inputExpression.text, s.expressionText) }, inputValues: En(a2?.inputValues, s.allowedValues) };
609
+ let a = t2.get(s.id);
610
+ return { ...a, "@_id": s.id, "@_label": s.label, inputExpression: { ...a?.inputExpression, "@_id": s.expressionId, "@_typeRef": s.typeRef, text: y2(a?.inputExpression.text, s.expressionText) }, inputValues: En(a?.inputValues, s.allowedValues) };
657
611
  }), output: n.outputs.map((s) => {
658
- let a2 = i.get(s.id);
659
- return { ...a2, "@_id": s.id, "@_label": s.label, "@_name": s.name, "@_typeRef": s.typeRef, description: s.description ? y2(a2?.description, s.description) : undefined, outputValues: En(a2?.outputValues, s.allowedValues) };
660
- }), annotation: o ? undefined : n.annotations.map((s, a2) => ({ ...e2.annotation?.[a2], "@_name": s.name })), rule: n.rules.map((s) => {
661
- let a2 = r2.get(s.id), l = new Map(a2?.inputEntry?.map((c) => [c["@_id"], c]) ?? []), m2 = new Map(a2?.outputEntry.map((c) => [c["@_id"], c]) ?? []);
662
- return { ...a2, "@_id": s.id, description: s.description === undefined ? undefined : y2(a2?.description, s.description), inputEntry: s.inputEntries.map((c) => {
612
+ let a = i.get(s.id);
613
+ return { ...a, "@_id": s.id, "@_label": s.label, "@_name": s.name, "@_typeRef": s.typeRef, description: s.description ? y2(a?.description, s.description) : undefined, outputValues: En(a?.outputValues, s.allowedValues) };
614
+ }), annotation: o ? undefined : n.annotations.map((s, a) => ({ ...e2.annotation?.[a], "@_name": s.name })), rule: n.rules.map((s) => {
615
+ let a = r.get(s.id), l = new Map(a?.inputEntry?.map((c) => [c["@_id"], c]) ?? []), m = new Map(a?.outputEntry.map((c) => [c["@_id"], c]) ?? []);
616
+ return { ...a, "@_id": s.id, description: s.description === undefined ? undefined : y2(a?.description, s.description), inputEntry: s.inputEntries.map((c) => {
663
617
  let u = l.get(c.id);
664
618
  return { ...u, "@_id": c.id, text: y2(u?.text, c.text) };
665
619
  }), outputEntry: s.outputEntries.map((c) => {
666
- let u = m2.get(c.id);
620
+ let u = m.get(c.id);
667
621
  return { ...u, "@_id": c.id, text: y2(u?.text, xt(c.text)) };
668
- }), annotationEntry: o ? undefined : s.annotationEntries.map((c, u) => ({ ...a2?.annotationEntry?.[u], text: y2(a2?.annotationEntry?.[u]?.text, c) })) };
622
+ }), annotationEntry: o ? undefined : s.annotationEntries.map((c, u) => ({ ...a?.annotationEntry?.[u], text: y2(a?.annotationEntry?.[u]?.text, c) })) };
669
623
  }) };
670
624
  }
671
625
  function gt(e2, n) {
@@ -686,30 +640,30 @@ function bt(e2, n) {
686
640
  let t2 = n !== undefined;
687
641
  if (!q2(o) || !t2 && o.artifact?.length)
688
642
  return;
689
- let i = w(o), r2 = o.drgElement?.filter((c) => c.__$$element === "inputData") ?? [];
690
- if (!t2 && (i.length !== 1 || i.length + r2.length !== (o.drgElement?.length ?? 0)))
643
+ let i = w(o), r = o.drgElement?.filter((c) => c.__$$element === "inputData") ?? [];
644
+ if (!t2 && (i.length !== 1 || i.length + r.length !== (o.drgElement?.length ?? 0)))
691
645
  return;
692
646
  let s = t2 ? i.find((c) => g(c) === n) : i[0];
693
647
  if (!s || !W2(s))
694
648
  return;
695
- let a2 = new Set(r2.map(g)), l = new Set;
649
+ let a = new Set(r.map(g)), l = new Set;
696
650
  if (!t2 && (s.knowledgeRequirement?.length || s.authorityRequirement?.length) || s.informationRequirement?.some((c) => {
697
651
  if (c.requiredDecision)
698
652
  return !t2;
699
653
  let u = $(c.requiredInput?.["@_href"]);
700
- return !u || !a2.has(u) || l.has(u) ? true : (l.add(u), false);
654
+ return !u || !a.has(u) || l.has(u) ? true : (l.add(u), false);
701
655
  }))
702
656
  return;
703
- let m2 = s.expression?.__$$element === "literalExpression" ? s.expression : undefined;
704
- if (m2 && m2.importedValues === undefined && !O(m2["@_expressionLanguage"]))
705
- return { definitions: o, decision: s, expression: m2, inputData: r2, scopeVariables: G(o, s) };
657
+ let m = s.expression?.__$$element === "literalExpression" ? s.expression : undefined;
658
+ if (m && m.importedValues === undefined && !O(m["@_expressionLanguage"]))
659
+ return { definitions: o, decision: s, expression: m, inputData: r, scopeVariables: G(o, s) };
706
660
  }
707
661
  function $t(e2, n) {
708
662
  let o = bt(e2, n);
709
663
  if (!o)
710
664
  return;
711
- let { definitions: t2, decision: i, expression: r2, inputData: s } = o;
712
- return { id: _(t2, "definitions"), name: t2["@_name"], ...o.scopeVariables.length ? { scopeVariables: o.scopeVariables } : {}, exporter: t2["@_exporter"], exporterVersion: t2["@_exporterVersion"], ...Q(t2), namespace: t2["@_namespace"], externalTypeRefs: q(t2, i), inputData: Y(s, k(i), new Set), decision: { id: _(i, "decision"), name: i["@_name"] ?? "", label: i["@_label"], variableId: i.variable ? _(i.variable, "variable") : a("variable"), variableName: i.variable?.["@_name"], variableTypeRef: i.variable?.["@_typeRef"], description: i.description?.__$$text, question: i.question?.__$$text, allowedAnswers: i.allowedAnswers?.__$$text, literalExpression: { id: _(r2, "literalExpression"), label: r2["@_label"], typeRef: r2["@_typeRef"], text: N(r2.text), expressionLanguage: r2["@_expressionLanguage"] } } };
665
+ let { definitions: t2, decision: i, expression: r, inputData: s } = o;
666
+ return { id: _(t2, "definitions"), name: t2["@_name"], ...o.scopeVariables.length ? { scopeVariables: o.scopeVariables } : {}, exporter: t2["@_exporter"], exporterVersion: t2["@_exporterVersion"], ...Q(t2), namespace: t2["@_namespace"], externalTypeRefs: q(t2, i), inputData: Y(s, k(i), new Set), decision: { id: _(i, "decision"), name: i["@_name"] ?? "", label: i["@_label"], variableId: i.variable ? _(i.variable, "variable") : a("variable"), variableName: i.variable?.["@_name"], variableTypeRef: i.variable?.["@_typeRef"], description: i.description?.__$$text, question: i.question?.__$$text, allowedAnswers: i.allowedAnswers?.__$$text, literalExpression: { id: _(r, "literalExpression"), label: r["@_label"], typeRef: r["@_typeRef"], text: N(r.text), expressionLanguage: r["@_expressionLanguage"] } } };
713
667
  }
714
668
  function ht(e2, n) {
715
669
  let o = structuredClone(e2), t2 = $t(o, n);
@@ -742,8 +696,8 @@ function $n(e2) {
742
696
  for (let t2 of gn) {
743
697
  let i = o[t2];
744
698
  if (Array.isArray(i))
745
- for (let r2 of i)
746
- _(r2, t2);
699
+ for (let r of i)
700
+ _(r, t2);
747
701
  }
748
702
  }
749
703
  for (let o of n.artifact ?? [])
@@ -797,10 +751,6 @@ async function At(e2, n = {}) {
797
751
  return console.error("DMN: could not project a well-formed document", i), { kind: "unsupported", reason: "invalid-xml" };
798
752
  }
799
753
  }
800
- async function Bi(e2, n = {}) {
801
- let o = await At(e2, n);
802
- return V = { xml: e2, allowDrdDocuments: !!n.allowDrdDocuments, result: o }, { supported: o.kind !== "unsupported" };
803
- }
804
754
  function vt(e2, n, o) {
805
755
  let t2 = w(e2.definitions).find((i) => g(i) === n);
806
756
  t2 && dn(e2, t2) && cn(e2, t2, o);
@@ -822,6 +772,6 @@ function zi(e2, n, o = "decision-table") {
822
772
  return an(t2) && un(t2, o), vt(t2, e2.decision.id, "decision-table"), { document: t2, xml: hs(t2) };
823
773
  }
824
774
 
825
- export { fe, Tn, zt, Kt, w, g, $, At, Bi, Ui, Fi, ji, zi };
775
+ export { fe, w, g, $, At, Ui, Fi, ji, zi };
826
776
 
827
- //# debugId=2218CA624DC2465464756E2164756E21
777
+ //# debugId=1D88B2D6E9BFF11564756E2164756E21