@uipath/rules-tool 1.204.0-preview.249 → 1.204.0-preview.250
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DmnFactory-VWZOSZHH-jkpbxz3n.js +42 -0
- package/dist/DmnModelTypes-ATR7FVKZ-jp35cecy.js +18 -0
- package/dist/KieDmnMarshaller-6TTUU5B4-47q50gk4.js +20 -0
- package/dist/THIRD-PARTY-NOTICES.md +1054 -0
- package/dist/business-rules-bnr581tz.js +26 -0
- package/dist/{constants-za5vbzp8.js → constants-9pa118cj.js} +17 -10
- package/dist/{embedded-file-reader-wmsg31a8.js → embedded-file-reader-rf2g1kfj.js} +4 -1
- package/dist/first-party-service-sd8yaf73.js +27 -0
- package/dist/hitPolicyResult-4WDHTX4A-gk103w84.js +33 -0
- package/dist/index-2hzp9b97.js +116 -0
- package/dist/index-34pj9f36.js +48 -0
- package/dist/{index-zdwhfpt1.js → index-4c4exdzw.js} +370 -406
- package/dist/index-dqa169gp.js +25 -0
- package/dist/{index-we6zjs66.js → index-fs1nd5ap.js} +40 -4
- package/dist/{index-nzr4mx5p.js → index-sby22td6.js} +22 -2
- package/dist/{index-7wc0g78k.js → index-t4mx1a5e.js} +5 -2
- package/dist/index.js +9 -8
- package/dist/{jmespath-ab6tdc42.js → jmespath-231m3hyn.js} +1 -1
- package/dist/{js-yaml-a2bk27p6.js → js-yaml-88tdqrtd.js} +3 -1
- package/dist/rule-catalog-5gzpe93c.js +46 -0
- package/dist/rules-command-error-20gp2dv9.js +14 -0
- package/dist/{rules-debug-service-h1ahd6p3.js → rules-debug-service-cmgmbhyh.js} +36 -35
- package/dist/{rules-init-service-y678kjje.js → rules-init-service-b74thek5.js} +16 -12
- package/dist/{rules-refresh-service-btn64j8j.js → rules-refresh-service-jgk2kq9d.js} +14 -13
- package/dist/{rules-validate-service-sppr4x13.js → rules-validate-service-mr2fk58k.js} +13 -10
- package/dist/{tool-97x3zjcm.js → tool-19b4ect0.js} +158 -113
- package/dist/{tool-epsr41wx.js → tool-1de529jm.js} +3 -12
- package/dist/{tool-7xmarr97.js → tool-2cky8jwp.js} +2578 -1777
- package/dist/{tool-0bthsb3x.js → tool-4dfpdepw.js} +15 -15
- package/dist/tool-53w8skv5.js +262 -0
- package/dist/tool-7haj67tr.js +19 -0
- package/dist/{tool-e1mmqsjr.js → tool-8h4er38s.js} +411 -396
- package/dist/{tool-2trg1fpx.js → tool-8qy8pkp4.js} +8 -8
- package/dist/tool-av4mmsef.js +73 -0
- package/dist/{tool-8j9f6ns5.js → tool-eymjx05p.js} +11 -11
- package/dist/{tool-mm1x18d6.js → tool-gdtpsdn7.js} +28 -223
- package/dist/{tool-6sqt4zrx.js → tool-jxvk6306.js} +32 -29
- package/dist/tool-m41px07w.js +49 -0
- package/dist/{tool-k2s349kn.js → tool-mkn83w88.js} +17 -14
- package/dist/tool-pm3ewdxc.js +1115 -0
- package/dist/{tool-6rp0gx98.js → tool-tkcx6png.js} +107 -127
- package/dist/{tool-1dycs173.js → tool-wmh645tm.js} +202 -194
- package/dist/{tool-24mr6g8c.js → tool-x0z7hxqr.js} +9 -649
- package/dist/tool.js +8 -7
- package/package.json +2 -15
- package/dist/DmnFactory-SG3RP3T3-cr8e7mxz.js +0 -8
- package/dist/DmnFactory-VWZOSZHH-azx0zqcn.js +0 -8
- package/dist/DmnModelTypes-ATR7FVKZ-vkv7n0jn.js +0 -8
- package/dist/KieDmnMarshaller-6TTUU5B4-rsxhvw7a.js +0 -8
- package/dist/business-rules-d51977r1.js +0 -25
- package/dist/business-rules-dekge24t.js +0 -23
- package/dist/business-rules-ew76mbwg.js +0 -25
- package/dist/business-rules-jmwx05k2.js +0 -25
- package/dist/business-rules-zpzqxyce.js +0 -26
- package/dist/constants-4r8pfr16.js +0 -22
- package/dist/embedded-file-reader-0228j82a.js +0 -111
- package/dist/first-party-service-1qa6cp4d.js +0 -8
- package/dist/first-party-service-28dkctkz.js +0 -8
- package/dist/first-party-service-4fsz3cnj.js +0 -8
- package/dist/first-party-service-ahcc6xc6.js +0 -8
- package/dist/first-party-service-y1ccmsvp.js +0 -8
- package/dist/first-party-service-zpr1q3nd.js +0 -8
- package/dist/hitPolicyResult-4WDHTX4A-dbtkgpqp.js +0 -12
- package/dist/index-2zxy6zgp.js +0 -23
- package/dist/index-3nx77wfh.js +0 -23
- package/dist/index-43zg1wqe.js +0 -19621
- package/dist/index-47jera73.js +0 -23
- package/dist/index-70jn7cz1.js +0 -19631
- package/dist/index-8kb5kc5y.js +0 -24
- package/dist/index-97yad7ms.js +0 -8
- package/dist/index-dfn83hxf.js +0 -14
- package/dist/index-e301h23h.js +0 -24
- package/dist/index-frd259yv.js +0 -24
- package/dist/index-gc7cw2jh.js +0 -23
- package/dist/index-gya2v502.js +0 -8
- package/dist/index-hb3gk1wf.js +0 -24
- package/dist/index-nsnfdqd5.js +0 -24
- package/dist/index-vffktc0w.js +0 -166
- package/dist/index-xymrydfw.js +0 -3095
- package/dist/index-z2qk2qn6.js +0 -24
- package/dist/index-zecwgvg7.js +0 -23
- package/dist/rule-catalog-a5w86qns.js +0 -43
- package/dist/rule-catalog-etpf962f.js +0 -69
- package/dist/rule-catalog-q5cr17hf.js +0 -58
- package/dist/rule-catalog-vc98yg4n.js +0 -43
- package/dist/rule-catalog-z3h66kh5.js +0 -56
- package/dist/rules-command-error-10qmb5w7.js +0 -13
- package/dist/rules-command-error-5bdv4bcx.js +0 -13
- package/dist/rules-command-error-cmssf0w4.js +0 -13
- package/dist/rules-command-error-fsm3b1mv.js +0 -13
- package/dist/rules-debug-service-5rcdh3pj.js +0 -192
- package/dist/rules-debug-service-8q7mkd0r.js +0 -199
- package/dist/rules-debug-service-b9j29ejz.js +0 -192
- package/dist/rules-debug-service-v3jr3r1n.js +0 -192
- package/dist/rules-init-service-3c2yfa7p.js +0 -687
- package/dist/rules-init-service-3wgd9cqp.js +0 -100
- package/dist/rules-init-service-8fqytxq0.js +0 -685
- package/dist/rules-init-service-pspt7sje.js +0 -100
- package/dist/rules-init-service-sbtzw93j.js +0 -102
- package/dist/rules-init-service-x7paqa63.js +0 -687
- package/dist/rules-init-service-y7qzmxx0.js +0 -102
- package/dist/rules-refresh-service-4xxj6ex6.js +0 -65
- package/dist/rules-refresh-service-ba5jk1y9.js +0 -65
- package/dist/rules-refresh-service-qkmphj53.js +0 -65
- package/dist/rules-validate-service-dmgnfne7.js +0 -60
- package/dist/rules-validate-service-hk2d006t.js +0 -60
- package/dist/rules-validate-service-xp05n2d9.js +0 -60
- package/dist/tool-1pkqxwwd.js +0 -17472
- package/dist/tool-39fmkx2d.js +0 -611
- package/dist/tool-3e2q1x2y.js +0 -6578
- package/dist/tool-3j0747gg.js +0 -17077
- package/dist/tool-4z7zcq4z.js +0 -6058
- package/dist/tool-56smnjrh.js +0 -73
- package/dist/tool-5qygptrc.js +0 -6171
- package/dist/tool-5xx6x8pe.js +0 -6596
- package/dist/tool-7fkrd618.js +0 -1556
- package/dist/tool-89xzeteg.js +0 -361
- package/dist/tool-911s9czz.js +0 -570
- package/dist/tool-9bz2x04j.js +0 -40
- package/dist/tool-akh7nnqs.js +0 -704
- package/dist/tool-axfzew45.js +0 -1555
- package/dist/tool-b71jq9pt.js +0 -389
- package/dist/tool-bfj846v8.js +0 -141
- package/dist/tool-bvmc017m.js +0 -96
- package/dist/tool-bykz5ryf.js +0 -454
- package/dist/tool-c76qb8ap.js +0 -17052
- package/dist/tool-ca15515v.js +0 -570
- package/dist/tool-f9qs255w.js +0 -70
- package/dist/tool-ga79rety.js +0 -389
- package/dist/tool-gb547mcn.js +0 -141
- package/dist/tool-gta9rr4h.js +0 -68
- package/dist/tool-h2dfnxdq.js +0 -6486
- package/dist/tool-hg6vr5y9.js +0 -3769
- package/dist/tool-hgvnm4vh.js +0 -1843
- package/dist/tool-hjbf9aay.js +0 -571
- package/dist/tool-k5jm64n3.js +0 -5650
- package/dist/tool-ketztpgf.js +0 -73
- package/dist/tool-n1d88ryb.js +0 -6396
- package/dist/tool-nmqpwh9m.js +0 -6166
- package/dist/tool-pb80pswx.js +0 -73
- package/dist/tool-pcsgwpfw.js +0 -40
- package/dist/tool-q3c1bjyb.js +0 -454
- package/dist/tool-rwp1skmf.js +0 -40
- package/dist/tool-s3fbt22r.js +0 -454
- package/dist/tool-tmbst1r8.js +0 -68
- package/dist/tool-v6w109p0.js +0 -455
- package/dist/tool-w2js05qv.js +0 -389
- package/dist/tool-x67kek1m.js +0 -1838
- package/dist/tool-x89947ah.js +0 -17052
- package/dist/tool-xhksjdka.js +0 -4005
- package/dist/tool-yv3t4gg5.js +0 -108
- package/dist/tool-zbyb1ttx.js +0 -5650
- /package/dist/{tool-fbqnqf9k.js → tool-jd313s2x.js} +0 -0
- /package/dist/{tool-vyx8fpft.js → tool-qgqscsjc.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
e
|
|
3
|
-
} from "./tool-
|
|
3
|
+
} from "./tool-jd313s2x.js";
|
|
4
4
|
import {
|
|
5
5
|
v4_default
|
|
6
|
-
} from "./tool-
|
|
6
|
+
} from "./tool-qgqscsjc.js";
|
|
7
7
|
|
|
8
8
|
// ../../node_modules/@lezer/common/dist/index.js
|
|
9
9
|
var DefaultBufferLength = 1024;
|
|
@@ -154,12 +154,12 @@ class NodeSet {
|
|
|
154
154
|
var CachedNode = new WeakMap;
|
|
155
155
|
var CachedInnerNode = new WeakMap;
|
|
156
156
|
var IterMode;
|
|
157
|
-
(function(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
(function(IterMode2) {
|
|
158
|
+
IterMode2[IterMode2["ExcludeBuffers"] = 1] = "ExcludeBuffers";
|
|
159
|
+
IterMode2[IterMode2["IncludeAnonymous"] = 2] = "IncludeAnonymous";
|
|
160
|
+
IterMode2[IterMode2["IgnoreMounts"] = 4] = "IgnoreMounts";
|
|
161
|
+
IterMode2[IterMode2["IgnoreOverlays"] = 8] = "IgnoreOverlays";
|
|
162
|
+
IterMode2[IterMode2["EnterBracketed"] = 16] = "EnterBracketed";
|
|
163
163
|
})(IterMode || (IterMode = {}));
|
|
164
164
|
|
|
165
165
|
class Tree {
|
|
@@ -440,7 +440,7 @@ class TreeNode extends BaseNode {
|
|
|
440
440
|
}
|
|
441
441
|
nextChild(i, dir, pos, side, mode = 0) {
|
|
442
442
|
for (let parent = this;; ) {
|
|
443
|
-
for (let { children, positions } = parent._tree,
|
|
443
|
+
for (let { children, positions } = parent._tree, e2 = dir > 0 ? children.length : -1;i != e2; i += dir) {
|
|
444
444
|
let next = children[i], start = positions[i] + parent.from, mounted;
|
|
445
445
|
if (!(mode & IterMode.EnterBracketed && next instanceof Tree && (mounted = MountedTree.get(next)) && !mounted.overlay && mounted.bracketed && pos >= start && pos <= start + next.length) && !checkSide(side, pos, start, start + next.length))
|
|
446
446
|
continue;
|
|
@@ -451,9 +451,9 @@ class TreeNode extends BaseNode {
|
|
|
451
451
|
if (index > -1)
|
|
452
452
|
return new BufferNode(new BufferContext(parent, next, i, start), null, index);
|
|
453
453
|
} else if (mode & IterMode.IncludeAnonymous || (!next.type.isAnonymous || hasChild(next))) {
|
|
454
|
-
let
|
|
455
|
-
if (!(mode & IterMode.IgnoreMounts) && (
|
|
456
|
-
return new TreeNode(
|
|
454
|
+
let mounted2;
|
|
455
|
+
if (!(mode & IterMode.IgnoreMounts) && (mounted2 = MountedTree.get(next)) && !mounted2.overlay)
|
|
456
|
+
return new TreeNode(mounted2.tree, start, i, parent);
|
|
457
457
|
let inner = new TreeNode(next, start, i, parent);
|
|
458
458
|
return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side, mode);
|
|
459
459
|
}
|
|
@@ -815,7 +815,7 @@ class TreeCursor {
|
|
|
815
815
|
}
|
|
816
816
|
for (;parent; { index, _parent: parent } = parent) {
|
|
817
817
|
if (index > -1)
|
|
818
|
-
for (let i = index + dir,
|
|
818
|
+
for (let i = index + dir, e2 = dir < 0 ? -1 : parent._tree.children.length;i != e2; i += dir) {
|
|
819
819
|
let child = parent._tree.children[i];
|
|
820
820
|
if (this.mode & IterMode.IncludeAnonymous || child instanceof TreeBuffer || !child.type.isAnonymous || hasChild(child))
|
|
821
821
|
return false;
|
|
@@ -922,15 +922,15 @@ function buildTree(data) {
|
|
|
922
922
|
let cursor = Array.isArray(buffer) ? new FlatBufferCursor(buffer, buffer.length) : buffer;
|
|
923
923
|
let types = nodeSet.types;
|
|
924
924
|
let contextHash = 0, lookAhead = 0;
|
|
925
|
-
function takeNode(parentStart, minPos,
|
|
925
|
+
function takeNode(parentStart, minPos, children2, positions2, inRepeat, depth) {
|
|
926
926
|
let { id, start, end, size } = cursor;
|
|
927
927
|
let lookAheadAtStart = lookAhead, contextAtStart = contextHash;
|
|
928
928
|
if (size < 0) {
|
|
929
929
|
cursor.next();
|
|
930
930
|
if (size == -1) {
|
|
931
|
-
let
|
|
932
|
-
|
|
933
|
-
|
|
931
|
+
let node2 = reused[id];
|
|
932
|
+
children2.push(node2);
|
|
933
|
+
positions2.push(start - parentStart);
|
|
934
934
|
return;
|
|
935
935
|
} else if (size == -3) {
|
|
936
936
|
contextHash = id;
|
|
@@ -942,15 +942,15 @@ function buildTree(data) {
|
|
|
942
942
|
throw new RangeError(`Unrecognized record size: ${size}`);
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
|
-
let type = types[id], node,
|
|
945
|
+
let type = types[id], node, buffer2;
|
|
946
946
|
let startPos = start - parentStart;
|
|
947
|
-
if (end - start <= maxBufferLength && (
|
|
948
|
-
let
|
|
949
|
-
let endPos = cursor.pos -
|
|
947
|
+
if (end - start <= maxBufferLength && (buffer2 = findBufferSize(cursor.pos - minPos, inRepeat))) {
|
|
948
|
+
let data2 = new Uint16Array(buffer2.size - buffer2.skip);
|
|
949
|
+
let endPos = cursor.pos - buffer2.size, index = data2.length;
|
|
950
950
|
while (cursor.pos > endPos)
|
|
951
|
-
index = copyToBuffer(
|
|
952
|
-
node = new TreeBuffer(
|
|
953
|
-
startPos =
|
|
951
|
+
index = copyToBuffer(buffer2.start, data2, index);
|
|
952
|
+
node = new TreeBuffer(data2, end - buffer2.start, nodeSet);
|
|
953
|
+
startPos = buffer2.start - parentStart;
|
|
954
954
|
} else {
|
|
955
955
|
let endPos = cursor.pos - size;
|
|
956
956
|
cursor.next();
|
|
@@ -982,10 +982,10 @@ function buildTree(data) {
|
|
|
982
982
|
node = makeTree(type, localChildren, localPositions, end - start, lookAheadAtStart - end, contextAtStart);
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
|
-
|
|
986
|
-
|
|
985
|
+
children2.push(node);
|
|
986
|
+
positions2.push(startPos);
|
|
987
987
|
}
|
|
988
|
-
function takeFlatNode(parentStart, minPos,
|
|
988
|
+
function takeFlatNode(parentStart, minPos, children2, positions2) {
|
|
989
989
|
let nodes = [];
|
|
990
990
|
let nodeCount = 0, stopAt = -1;
|
|
991
991
|
while (cursor.pos > minPos) {
|
|
@@ -1003,49 +1003,49 @@ function buildTree(data) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
if (nodeCount) {
|
|
1006
|
-
let
|
|
1006
|
+
let buffer2 = new Uint16Array(nodeCount * 4);
|
|
1007
1007
|
let start = nodes[nodes.length - 2];
|
|
1008
1008
|
for (let i = nodes.length - 3, j = 0;i >= 0; i -= 3) {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1009
|
+
buffer2[j++] = nodes[i];
|
|
1010
|
+
buffer2[j++] = nodes[i + 1] - start;
|
|
1011
|
+
buffer2[j++] = nodes[i + 2] - start;
|
|
1012
|
+
buffer2[j++] = j;
|
|
1013
1013
|
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1014
|
+
children2.push(new TreeBuffer(buffer2, nodes[2] - start, nodeSet));
|
|
1015
|
+
positions2.push(start - parentStart);
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
function makeBalanced(type,
|
|
1019
|
-
return (
|
|
1020
|
-
let
|
|
1021
|
-
if (lastI >= 0 && (last =
|
|
1022
|
-
if (!lastI && last.type == type && last.length ==
|
|
1018
|
+
function makeBalanced(type, contextHash2) {
|
|
1019
|
+
return (children2, positions2, length2) => {
|
|
1020
|
+
let lookAhead2 = 0, lastI = children2.length - 1, last, lookAheadProp;
|
|
1021
|
+
if (lastI >= 0 && (last = children2[lastI]) instanceof Tree) {
|
|
1022
|
+
if (!lastI && last.type == type && last.length == length2)
|
|
1023
1023
|
return last;
|
|
1024
1024
|
if (lookAheadProp = last.prop(NodeProp.lookAhead))
|
|
1025
|
-
|
|
1025
|
+
lookAhead2 = positions2[lastI] + last.length + lookAheadProp;
|
|
1026
1026
|
}
|
|
1027
|
-
return makeTree(type,
|
|
1027
|
+
return makeTree(type, children2, positions2, length2, lookAhead2, contextHash2);
|
|
1028
1028
|
};
|
|
1029
1029
|
}
|
|
1030
|
-
function makeRepeatLeaf(
|
|
1030
|
+
function makeRepeatLeaf(children2, positions2, base, i, from, to, type, lookAhead2, contextHash2) {
|
|
1031
1031
|
let localChildren = [], localPositions = [];
|
|
1032
|
-
while (
|
|
1033
|
-
localChildren.push(
|
|
1034
|
-
localPositions.push(
|
|
1032
|
+
while (children2.length > i) {
|
|
1033
|
+
localChildren.push(children2.pop());
|
|
1034
|
+
localPositions.push(positions2.pop() + base - from);
|
|
1035
1035
|
}
|
|
1036
|
-
|
|
1037
|
-
|
|
1036
|
+
children2.push(makeTree(nodeSet.types[type], localChildren, localPositions, to - from, lookAhead2 - to, contextHash2));
|
|
1037
|
+
positions2.push(from - base);
|
|
1038
1038
|
}
|
|
1039
|
-
function makeTree(type,
|
|
1040
|
-
if (
|
|
1041
|
-
let pair = [NodeProp.contextHash,
|
|
1039
|
+
function makeTree(type, children2, positions2, length2, lookAhead2, contextHash2, props) {
|
|
1040
|
+
if (contextHash2) {
|
|
1041
|
+
let pair = [NodeProp.contextHash, contextHash2];
|
|
1042
1042
|
props = props ? [pair].concat(props) : [pair];
|
|
1043
1043
|
}
|
|
1044
|
-
if (
|
|
1045
|
-
let pair = [NodeProp.lookAhead,
|
|
1044
|
+
if (lookAhead2 > 25) {
|
|
1045
|
+
let pair = [NodeProp.lookAhead, lookAhead2];
|
|
1046
1046
|
props = props ? [pair].concat(props) : [pair];
|
|
1047
1047
|
}
|
|
1048
|
-
return new Tree(type,
|
|
1048
|
+
return new Tree(type, children2, positions2, length2, props);
|
|
1049
1049
|
}
|
|
1050
1050
|
function findBufferSize(maxSize, inRepeat) {
|
|
1051
1051
|
let fork = cursor.fork();
|
|
@@ -1091,7 +1091,7 @@ function buildTree(data) {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
return result.size > 4 ? result : undefined;
|
|
1093
1093
|
}
|
|
1094
|
-
function copyToBuffer(bufferStart,
|
|
1094
|
+
function copyToBuffer(bufferStart, buffer2, index) {
|
|
1095
1095
|
let { id, start, end, size } = cursor;
|
|
1096
1096
|
cursor.next();
|
|
1097
1097
|
if (size >= 0 && id < minRepeatType) {
|
|
@@ -1099,12 +1099,12 @@ function buildTree(data) {
|
|
|
1099
1099
|
if (size > 4) {
|
|
1100
1100
|
let endPos = cursor.pos - (size - 4);
|
|
1101
1101
|
while (cursor.pos > endPos)
|
|
1102
|
-
index = copyToBuffer(bufferStart,
|
|
1102
|
+
index = copyToBuffer(bufferStart, buffer2, index);
|
|
1103
1103
|
}
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1104
|
+
buffer2[--index] = startIndex;
|
|
1105
|
+
buffer2[--index] = end - bufferStart;
|
|
1106
|
+
buffer2[--index] = start - bufferStart;
|
|
1107
|
+
buffer2[--index] = id;
|
|
1108
1108
|
} else if (size == -3) {
|
|
1109
1109
|
contextHash = id;
|
|
1110
1110
|
} else if (size == -4) {
|
|
@@ -1142,26 +1142,26 @@ function balanceRange(balanceType, children, positions, from, to, start, length,
|
|
|
1142
1142
|
total += nodeSize(balanceType, children[i]);
|
|
1143
1143
|
let maxChild = Math.ceil(total * 1.5 / 8);
|
|
1144
1144
|
let localChildren = [], localPositions = [];
|
|
1145
|
-
function divide(
|
|
1146
|
-
for (let i =
|
|
1147
|
-
let groupFrom = i, groupStart =
|
|
1145
|
+
function divide(children2, positions2, from2, to2, offset) {
|
|
1146
|
+
for (let i = from2;i < to2; ) {
|
|
1147
|
+
let groupFrom = i, groupStart = positions2[i], groupSize = nodeSize(balanceType, children2[i]);
|
|
1148
1148
|
i++;
|
|
1149
|
-
for (;i <
|
|
1150
|
-
let nextSize = nodeSize(balanceType,
|
|
1149
|
+
for (;i < to2; i++) {
|
|
1150
|
+
let nextSize = nodeSize(balanceType, children2[i]);
|
|
1151
1151
|
if (groupSize + nextSize >= maxChild)
|
|
1152
1152
|
break;
|
|
1153
1153
|
groupSize += nextSize;
|
|
1154
1154
|
}
|
|
1155
1155
|
if (i == groupFrom + 1) {
|
|
1156
1156
|
if (groupSize > maxChild) {
|
|
1157
|
-
let only =
|
|
1158
|
-
divide(only.children, only.positions, 0, only.children.length,
|
|
1157
|
+
let only = children2[groupFrom];
|
|
1158
|
+
divide(only.children, only.positions, 0, only.children.length, positions2[groupFrom] + offset);
|
|
1159
1159
|
continue;
|
|
1160
1160
|
}
|
|
1161
|
-
localChildren.push(
|
|
1161
|
+
localChildren.push(children2[groupFrom]);
|
|
1162
1162
|
} else {
|
|
1163
|
-
let
|
|
1164
|
-
localChildren.push(balanceRange(balanceType,
|
|
1163
|
+
let length2 = positions2[i - 1] + children2[i - 1].length - groupStart;
|
|
1164
|
+
localChildren.push(balanceRange(balanceType, children2, positions2, groupFrom, i, groupStart, length2, null, mkTree));
|
|
1165
1165
|
}
|
|
1166
1166
|
localPositions.push(groupStart + offset - start);
|
|
1167
1167
|
}
|
|
@@ -1404,7 +1404,7 @@ class Stack {
|
|
|
1404
1404
|
if (this.stack.length < 120)
|
|
1405
1405
|
for (let i = 0;best.length < 4 << 1 && i < nextStates.length; i += 2) {
|
|
1406
1406
|
let s = nextStates[i + 1];
|
|
1407
|
-
if (!best.some((v,
|
|
1407
|
+
if (!best.some((v, i2) => i2 & 1 && v == s))
|
|
1408
1408
|
best.push(nextStates[i], s);
|
|
1409
1409
|
}
|
|
1410
1410
|
nextStates = best;
|
|
@@ -2567,7 +2567,7 @@ class LRParser extends Parser {
|
|
|
2567
2567
|
}
|
|
2568
2568
|
if ((this.data[i + 2] & 65536 >> 16) == 0) {
|
|
2569
2569
|
let value = this.data[i + 1];
|
|
2570
|
-
if (!result.some((v,
|
|
2570
|
+
if (!result.some((v, i2) => i2 & 1 && v == value))
|
|
2571
2571
|
result.push(this.data[i], value);
|
|
2572
2572
|
}
|
|
2573
2573
|
}
|
|
@@ -2631,15 +2631,15 @@ class LRParser extends Parser {
|
|
|
2631
2631
|
let values = Object.keys(this.dialects), flags = values.map(() => false);
|
|
2632
2632
|
if (dialect)
|
|
2633
2633
|
for (let part of dialect.split(" ")) {
|
|
2634
|
-
let
|
|
2635
|
-
if (
|
|
2636
|
-
flags[
|
|
2634
|
+
let id2 = values.indexOf(part);
|
|
2635
|
+
if (id2 >= 0)
|
|
2636
|
+
flags[id2] = true;
|
|
2637
2637
|
}
|
|
2638
2638
|
let disabled = null;
|
|
2639
2639
|
for (let i = 0;i < values.length; i++)
|
|
2640
2640
|
if (!flags[i]) {
|
|
2641
|
-
for (let j = this.dialects[values[i]],
|
|
2642
|
-
(disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[
|
|
2641
|
+
for (let j = this.dialects[values[i]], id2;(id2 = this.data[j++]) != 65535; )
|
|
2642
|
+
(disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[id2] = 1;
|
|
2643
2643
|
}
|
|
2644
2644
|
return new Dialect(dialect, flags, disabled);
|
|
2645
2645
|
}
|
|
@@ -2747,7 +2747,7 @@ function sameArray(a, b) {
|
|
|
2747
2747
|
function powerSet(array) {
|
|
2748
2748
|
let sets = [[]];
|
|
2749
2749
|
for (let i = 0;i < array.length; i++) {
|
|
2750
|
-
for (let j = 0,
|
|
2750
|
+
for (let j = 0, e2 = sets.length;j < e2; j++) {
|
|
2751
2751
|
sets.push(sets[j].concat(array[i]));
|
|
2752
2752
|
}
|
|
2753
2753
|
}
|
|
@@ -2853,9 +2853,9 @@ function tagHighlighter(tags, options) {
|
|
|
2853
2853
|
}
|
|
2854
2854
|
let { scope, all = null } = options || {};
|
|
2855
2855
|
return {
|
|
2856
|
-
style: (
|
|
2856
|
+
style: (tags2) => {
|
|
2857
2857
|
let cls = all;
|
|
2858
|
-
for (let tag of
|
|
2858
|
+
for (let tag of tags2) {
|
|
2859
2859
|
for (let sub of tag.set) {
|
|
2860
2860
|
let tagClass = map[sub.id];
|
|
2861
2861
|
if (tagClass) {
|
|
@@ -2970,10 +2970,10 @@ var tags = {
|
|
|
2970
2970
|
local: Tag.defineModifier("local"),
|
|
2971
2971
|
special: Tag.defineModifier("special")
|
|
2972
2972
|
};
|
|
2973
|
-
for (let
|
|
2974
|
-
let val = tags[
|
|
2973
|
+
for (let name2 in tags) {
|
|
2974
|
+
let val = tags[name2];
|
|
2975
2975
|
if (val instanceof Tag)
|
|
2976
|
-
val.name =
|
|
2976
|
+
val.name = name2;
|
|
2977
2977
|
}
|
|
2978
2978
|
var classHighlighter = tagHighlighter([
|
|
2979
2979
|
{ tag: tags.link, class: "tok-link" },
|
|
@@ -3122,17 +3122,17 @@ function parseAdditionalSymbol(input, offset = 0) {
|
|
|
3122
3122
|
return null;
|
|
3123
3123
|
}
|
|
3124
3124
|
function parseIdentifier(input, offset = 0, namePart = false) {
|
|
3125
|
-
for (let inside = false,
|
|
3125
|
+
for (let inside = false, chars2 = [], i = 0;; i++) {
|
|
3126
3126
|
const next = input.peek(offset + i);
|
|
3127
3127
|
if (isStartChar(next) || (inside || namePart) && isPartChar(next)) {
|
|
3128
3128
|
if (!inside) {
|
|
3129
3129
|
inside = true;
|
|
3130
3130
|
}
|
|
3131
|
-
|
|
3131
|
+
chars2.push(next);
|
|
3132
3132
|
} else {
|
|
3133
|
-
if (
|
|
3133
|
+
if (chars2.length) {
|
|
3134
3134
|
return {
|
|
3135
|
-
token: String.fromCharCode(...
|
|
3135
|
+
token: String.fromCharCode(...chars2),
|
|
3136
3136
|
offset: i
|
|
3137
3137
|
};
|
|
3138
3138
|
}
|
|
@@ -3180,27 +3180,27 @@ function parseName(input, variables) {
|
|
|
3180
3180
|
continue;
|
|
3181
3181
|
}
|
|
3182
3182
|
tokens = [...tokens, token];
|
|
3183
|
-
const
|
|
3184
|
-
if (keys.has(
|
|
3185
|
-
const
|
|
3183
|
+
const name2 = [...start, ...tokens].join(" ");
|
|
3184
|
+
if (keys.has(name2)) {
|
|
3185
|
+
const token2 = tokens[0];
|
|
3186
3186
|
nextMatch = {
|
|
3187
|
-
token,
|
|
3188
|
-
offset:
|
|
3187
|
+
token: token2,
|
|
3188
|
+
offset: token2.length,
|
|
3189
3189
|
term: nameIdentifier
|
|
3190
3190
|
};
|
|
3191
3191
|
}
|
|
3192
|
-
if (prefixes.has(
|
|
3192
|
+
if (prefixes.has(name2)) {
|
|
3193
3193
|
continue;
|
|
3194
3194
|
}
|
|
3195
|
-
if (dateTimeIdentifiers.some((el) => el ===
|
|
3196
|
-
const
|
|
3195
|
+
if (dateTimeIdentifiers.some((el) => el === name2)) {
|
|
3196
|
+
const token2 = tokens[0];
|
|
3197
3197
|
nextMatch = {
|
|
3198
|
-
token,
|
|
3199
|
-
offset:
|
|
3198
|
+
token: token2,
|
|
3199
|
+
offset: token2.length,
|
|
3200
3200
|
term: identifier
|
|
3201
3201
|
};
|
|
3202
3202
|
}
|
|
3203
|
-
if (dateTimeIdentifiers.some((el) => el.startsWith(
|
|
3203
|
+
if (dateTimeIdentifiers.some((el) => el.startsWith(name2))) {
|
|
3204
3204
|
continue;
|
|
3205
3205
|
}
|
|
3206
3206
|
return nextMatch;
|
|
@@ -3246,9 +3246,9 @@ var insertSemicolon = new ExternalTokenizer((input, stack) => {
|
|
|
3246
3246
|
break;
|
|
3247
3247
|
}
|
|
3248
3248
|
if (insert) {
|
|
3249
|
-
const
|
|
3249
|
+
const identifier2 = parseIdentifier(input, offset + 1);
|
|
3250
3250
|
const spaces = parseSpaces(input, offset + 1);
|
|
3251
|
-
if (spaces ||
|
|
3251
|
+
if (spaces || identifier2 && /^(then|else|return|satisfies)$/.test(identifier2.token)) {
|
|
3252
3252
|
return;
|
|
3253
3253
|
}
|
|
3254
3254
|
LOG_PARSE && console.log("%s: MATCH <insertSemi>", input.pos);
|
|
@@ -3397,7 +3397,7 @@ class VariableContext {
|
|
|
3397
3397
|
|
|
3398
3398
|
class Variables {
|
|
3399
3399
|
constructor({
|
|
3400
|
-
name = "Expressions",
|
|
3400
|
+
name: name2 = "Expressions",
|
|
3401
3401
|
tokens = [],
|
|
3402
3402
|
children = [],
|
|
3403
3403
|
parent = null,
|
|
@@ -3406,7 +3406,7 @@ class Variables {
|
|
|
3406
3406
|
raw,
|
|
3407
3407
|
__cache
|
|
3408
3408
|
}) {
|
|
3409
|
-
this.name =
|
|
3409
|
+
this.name = name2;
|
|
3410
3410
|
this.tokens = tokens;
|
|
3411
3411
|
this.children = children;
|
|
3412
3412
|
this.parent = parent;
|
|
@@ -3429,9 +3429,9 @@ class Variables {
|
|
|
3429
3429
|
}
|
|
3430
3430
|
return root.__cache;
|
|
3431
3431
|
}
|
|
3432
|
-
enterScope(
|
|
3432
|
+
enterScope(name2) {
|
|
3433
3433
|
const childScope = this.of({
|
|
3434
|
-
name,
|
|
3434
|
+
name: name2,
|
|
3435
3435
|
parent: this
|
|
3436
3436
|
});
|
|
3437
3437
|
LOG_VARS && console.log("[%s] enter", childScope.path, childScope.context);
|
|
@@ -3494,19 +3494,19 @@ class Variables {
|
|
|
3494
3494
|
return val;
|
|
3495
3495
|
}
|
|
3496
3496
|
}
|
|
3497
|
-
resolveName(
|
|
3497
|
+
resolveName(name2) {
|
|
3498
3498
|
const variable = this.tokens.join(" ");
|
|
3499
3499
|
const tokens = [];
|
|
3500
3500
|
const parentScope = this.assign({
|
|
3501
3501
|
tokens
|
|
3502
3502
|
});
|
|
3503
3503
|
const variableScope = this.of({
|
|
3504
|
-
name,
|
|
3504
|
+
name: name2,
|
|
3505
3505
|
parent: parentScope,
|
|
3506
3506
|
value: this.get(variable),
|
|
3507
3507
|
raw: variable
|
|
3508
3508
|
});
|
|
3509
|
-
LOG_VARS && console.log("[%s] resolve %s <%s=%s>",
|
|
3509
|
+
LOG_VARS && console.log("[%s] resolve %s <%s=%s>", name2, variableScope.path, variable, variableScope.value);
|
|
3510
3510
|
return parentScope.pushChild(variableScope);
|
|
3511
3511
|
}
|
|
3512
3512
|
pushChild(child) {
|
|
@@ -3539,16 +3539,16 @@ class Variables {
|
|
|
3539
3539
|
value: variableName
|
|
3540
3540
|
}));
|
|
3541
3541
|
}
|
|
3542
|
-
define(
|
|
3543
|
-
if (typeof
|
|
3544
|
-
LOG_VARS && console.log("[%s] no define <%s=%s>", this.path,
|
|
3542
|
+
define(name2, value) {
|
|
3543
|
+
if (typeof name2 !== "string") {
|
|
3544
|
+
LOG_VARS && console.log("[%s] no define <%s=%s>", this.path, name2, value);
|
|
3545
3545
|
return this;
|
|
3546
3546
|
}
|
|
3547
|
-
LOG_VARS && console.log("[%s] define <%s=%s>", this.path,
|
|
3547
|
+
LOG_VARS && console.log("[%s] define <%s=%s>", this.path, name2, value);
|
|
3548
3548
|
const oldContext = this.context;
|
|
3549
|
-
const newContext = oldContext.set(
|
|
3549
|
+
const newContext = oldContext.set(name2, value);
|
|
3550
3550
|
const oldCache = this.cache.get(oldContext) || computeContextCache(oldContext);
|
|
3551
|
-
const newCache = cacheKey(
|
|
3551
|
+
const newCache = cacheKey(name2, createContextCache(oldCache));
|
|
3552
3552
|
this.cache.set(newContext, newCache);
|
|
3553
3553
|
return this.assign({
|
|
3554
3554
|
context: newContext
|
|
@@ -3572,7 +3572,7 @@ class Variables {
|
|
|
3572
3572
|
}
|
|
3573
3573
|
static of(options) {
|
|
3574
3574
|
const {
|
|
3575
|
-
name,
|
|
3575
|
+
name: name2,
|
|
3576
3576
|
tokens = [],
|
|
3577
3577
|
children = [],
|
|
3578
3578
|
parent = null,
|
|
@@ -3585,7 +3585,7 @@ class Variables {
|
|
|
3585
3585
|
throw new Error("must provide <context>");
|
|
3586
3586
|
}
|
|
3587
3587
|
return new Variables({
|
|
3588
|
-
name,
|
|
3588
|
+
name: name2,
|
|
3589
3589
|
tokens: [...tokens],
|
|
3590
3590
|
children: [...children],
|
|
3591
3591
|
context,
|
|
@@ -3596,23 +3596,23 @@ class Variables {
|
|
|
3596
3596
|
});
|
|
3597
3597
|
}
|
|
3598
3598
|
}
|
|
3599
|
-
function normalizeContextKey(
|
|
3600
|
-
return
|
|
3599
|
+
function normalizeContextKey(name2) {
|
|
3600
|
+
return name2.replace(/\s*([./\-'+]|\*\*?)\s*/g, " $1 ").replace(/\s{2,}/g, " ").trim();
|
|
3601
3601
|
}
|
|
3602
3602
|
function wrap(variables, scopeName, code) {
|
|
3603
3603
|
const parts = variables.children.filter((c) => c.name !== scopeName);
|
|
3604
3604
|
const children = variables.children.filter((c) => c.name === scopeName);
|
|
3605
3605
|
const namePart = parts[0];
|
|
3606
3606
|
const valuePart = parts[Math.max(1, parts.length - 1)];
|
|
3607
|
-
const
|
|
3607
|
+
const name2 = namePart?.computedValue();
|
|
3608
3608
|
const value = valuePart?.computedValue() ?? null;
|
|
3609
3609
|
return variables.assign({
|
|
3610
3610
|
children
|
|
3611
|
-
}).enterScope(scopeName).pushChildren(parts).exitScope(code).define(
|
|
3611
|
+
}).enterScope(scopeName).pushChildren(parts).exitScope(code).define(name2, value);
|
|
3612
3612
|
}
|
|
3613
|
-
function trackVariables(context = {},
|
|
3613
|
+
function trackVariables(context = {}, Context2 = VariableContext) {
|
|
3614
3614
|
const start = Variables.of({
|
|
3615
|
-
context:
|
|
3615
|
+
context: Context2.of(context)
|
|
3616
3616
|
});
|
|
3617
3617
|
return new ContextTracker({
|
|
3618
3618
|
start,
|
|
@@ -3620,12 +3620,12 @@ function trackVariables(context = {}, Context = VariableContext) {
|
|
|
3620
3620
|
if (term === IfExpression) {
|
|
3621
3621
|
const [thenPart, elsePart] = variables.children.slice(-2);
|
|
3622
3622
|
variables = variables.assign({
|
|
3623
|
-
value:
|
|
3623
|
+
value: Context2.of(thenPart?.computedValue(), elsePart?.computedValue())
|
|
3624
3624
|
});
|
|
3625
3625
|
}
|
|
3626
3626
|
if (term === List) {
|
|
3627
3627
|
variables = variables.assign({
|
|
3628
|
-
value:
|
|
3628
|
+
value: Context2.of(...variables.children.map((c) => c?.computedValue()))
|
|
3629
3629
|
});
|
|
3630
3630
|
}
|
|
3631
3631
|
if (term === FilterExpression) {
|
|
@@ -3636,20 +3636,20 @@ function trackVariables(context = {}, Context = VariableContext) {
|
|
|
3636
3636
|
}
|
|
3637
3637
|
if (term === FunctionInvocation) {
|
|
3638
3638
|
const [
|
|
3639
|
-
|
|
3639
|
+
name2,
|
|
3640
3640
|
...args
|
|
3641
3641
|
] = variables.children;
|
|
3642
|
-
if (
|
|
3642
|
+
if (name2?.raw === "get value") {
|
|
3643
3643
|
variables = getContextValue(variables, args);
|
|
3644
3644
|
} else {
|
|
3645
3645
|
variables = variables.assign({
|
|
3646
|
-
value:
|
|
3646
|
+
value: name2?.computedValue() || Context2.of(undefined)
|
|
3647
3647
|
});
|
|
3648
3648
|
}
|
|
3649
3649
|
}
|
|
3650
|
-
const
|
|
3651
|
-
if (
|
|
3652
|
-
return variables.enterScope(
|
|
3650
|
+
const start2 = contextStarts[term];
|
|
3651
|
+
if (start2) {
|
|
3652
|
+
return variables.enterScope(start2);
|
|
3653
3653
|
}
|
|
3654
3654
|
const prefixedStart = prefixedContextStarts[term];
|
|
3655
3655
|
if (prefixedStart) {
|
|
@@ -3661,10 +3661,10 @@ function trackVariables(context = {}, Context = VariableContext) {
|
|
|
3661
3661
|
const lastChild = last(currentChildren);
|
|
3662
3662
|
let newContext = null;
|
|
3663
3663
|
if (term === pathExpressionStart) {
|
|
3664
|
-
newContext =
|
|
3664
|
+
newContext = Context2.of(lastChild?.computedValue());
|
|
3665
3665
|
}
|
|
3666
3666
|
if (term === filterExpressionStart) {
|
|
3667
|
-
newContext =
|
|
3667
|
+
newContext = Context2.of(currentContext, lastChild?.computedValue()).set("item", lastChild?.computedValue());
|
|
3668
3668
|
}
|
|
3669
3669
|
return variables.assign({ children }).enterScope(prefixedStart).pushChild(lastChild).assign({ context: newContext || currentContext });
|
|
3670
3670
|
}
|
|
@@ -3675,23 +3675,23 @@ function trackVariables(context = {}, Context = VariableContext) {
|
|
|
3675
3675
|
}
|
|
3676
3676
|
if (term === ContextEntry) {
|
|
3677
3677
|
const parts = variables.children.filter((c) => c.name !== "ContextEntry");
|
|
3678
|
-
const
|
|
3678
|
+
const name2 = parts[0];
|
|
3679
3679
|
const value = last(parts);
|
|
3680
3680
|
return wrap(variables, "ContextEntry", code).assign({
|
|
3681
|
-
value:
|
|
3681
|
+
value: Context2.of(variables.value).set(name2?.computedValue(), value?.computedValue())
|
|
3682
3682
|
});
|
|
3683
3683
|
}
|
|
3684
3684
|
if (term === ForInExpression || term === QuantifiedInExpression) {
|
|
3685
3685
|
return wrap(variables, "InExpression", code);
|
|
3686
3686
|
}
|
|
3687
3687
|
if (term === forExpressionBodyStart) {
|
|
3688
|
-
return variables.define("partial", ValueProducer.of((
|
|
3689
|
-
return last(
|
|
3688
|
+
return variables.define("partial", ValueProducer.of((variables2) => {
|
|
3689
|
+
return last(variables2.children)?.computedValue();
|
|
3690
3690
|
}));
|
|
3691
3691
|
}
|
|
3692
3692
|
if (term === ParameterName) {
|
|
3693
|
-
const
|
|
3694
|
-
return variables.define(
|
|
3693
|
+
const name2 = last(variables.children).computedValue();
|
|
3694
|
+
return variables.define(name2, 1);
|
|
3695
3695
|
}
|
|
3696
3696
|
if (term === arithmeticPlusStart || term === arithmeticTimesStart || term === arithmeticExpStart) {
|
|
3697
3697
|
const children = variables.children.slice(0, -1);
|
|
@@ -3770,18 +3770,18 @@ function getContextValue(variables, args) {
|
|
|
3770
3770
|
});
|
|
3771
3771
|
}
|
|
3772
3772
|
return variables.assign({
|
|
3773
|
-
value: [normalizeContextKey(keyValue), keyValue].reduce((value,
|
|
3774
|
-
return contextValue.get(
|
|
3773
|
+
value: [normalizeContextKey(keyValue), keyValue].reduce((value, keyValue2) => {
|
|
3774
|
+
return contextValue.get(keyValue2) || value;
|
|
3775
3775
|
}, null)
|
|
3776
3776
|
});
|
|
3777
3777
|
}
|
|
3778
3778
|
function extractNamedArgs(args, argNames) {
|
|
3779
3779
|
const context = {};
|
|
3780
3780
|
for (let i = 0;i < args.length; i += 2) {
|
|
3781
|
-
const [
|
|
3782
|
-
context[
|
|
3781
|
+
const [name2, value] = args.slice(i, i + 2);
|
|
3782
|
+
context[name2.value] = value;
|
|
3783
3783
|
}
|
|
3784
|
-
return argNames.map((
|
|
3784
|
+
return argNames.map((name2) => context[name2]);
|
|
3785
3785
|
}
|
|
3786
3786
|
function last(arr) {
|
|
3787
3787
|
return arr[arr.length - 1];
|
|
@@ -3845,170 +3845,178 @@ var parser = LRParser.deserialize({
|
|
|
3845
3845
|
// ../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-FF6TTFJN.js
|
|
3846
3846
|
var m = parser.configure({ top: "UnaryTests" });
|
|
3847
3847
|
var f = (e2) => e2.parent?.name === "FunctionInvocation" && e2.parent.firstChild?.from === e2.from;
|
|
3848
|
-
var F = (e2,
|
|
3848
|
+
var F = (e2, t2, o) => {
|
|
3849
3849
|
for (let i = e2.parent;i; i = i.parent)
|
|
3850
3850
|
if (!(i.name !== "ForExpression" && i.name !== "QuantifiedExpression"))
|
|
3851
3851
|
for (let n = i.getChild("InExpressions")?.firstChild;n; n = n.nextSibling) {
|
|
3852
3852
|
let r = n.getChild("Name");
|
|
3853
|
-
if (r && e2.from >= n.to && o.slice(r.from, r.to) ===
|
|
3853
|
+
if (r && e2.from >= n.to && o.slice(r.from, r.to) === t2)
|
|
3854
3854
|
return true;
|
|
3855
3855
|
}
|
|
3856
3856
|
return false;
|
|
3857
3857
|
};
|
|
3858
|
-
var h = (e2,
|
|
3858
|
+
var h = (e2, t2, o) => {
|
|
3859
3859
|
for (let i = e2.parent;i; i = i.parent)
|
|
3860
3860
|
if (i.name === "FunctionDefinition")
|
|
3861
3861
|
for (let n = i.getChild("FormalParameters")?.firstChild;n; n = n.nextSibling) {
|
|
3862
3862
|
let r = n.getChild("ParameterName")?.getChild("Name");
|
|
3863
|
-
if (r && o.slice(r.from, r.to) ===
|
|
3863
|
+
if (r && o.slice(r.from, r.to) === t2)
|
|
3864
3864
|
return true;
|
|
3865
3865
|
}
|
|
3866
3866
|
return false;
|
|
3867
3867
|
};
|
|
3868
|
-
var E = (e2,
|
|
3868
|
+
var E = (e2, t2, o) => {
|
|
3869
3869
|
for (let i = e2.parent;i; i = i.parent)
|
|
3870
3870
|
if (i.name === "Context")
|
|
3871
3871
|
for (let n = i.firstChild;n; n = n.nextSibling) {
|
|
3872
3872
|
if (n.name !== "ContextEntry" || n.to > e2.from)
|
|
3873
3873
|
continue;
|
|
3874
3874
|
let r = n.getChild("Key")?.getChild("Name");
|
|
3875
|
-
if (r && o.slice(r.from, r.to) ===
|
|
3875
|
+
if (r && o.slice(r.from, r.to) === t2)
|
|
3876
3876
|
return true;
|
|
3877
3877
|
}
|
|
3878
3878
|
return false;
|
|
3879
3879
|
};
|
|
3880
|
-
var D = (e2,
|
|
3880
|
+
var D = (e2, t2, o) => F(e2, t2, o) || h(e2, t2, o) || E(e2, t2, o);
|
|
3881
3881
|
var d = (e2) => {
|
|
3882
|
-
for (let
|
|
3883
|
-
if (
|
|
3882
|
+
for (let t2 = e2.parent;t2; t2 = t2.parent)
|
|
3883
|
+
if (t2.name === "FilterExpression" && t2.firstChild && e2.from >= t2.firstChild.to)
|
|
3884
3884
|
return true;
|
|
3885
3885
|
return false;
|
|
3886
3886
|
};
|
|
3887
|
-
var c = (e2,
|
|
3888
|
-
(
|
|
3887
|
+
var c = (e2, t2, o) => {
|
|
3888
|
+
(t2 === "unaryTests" ? m : parser).parse(e2).iterate({ enter(n) {
|
|
3889
3889
|
if (n.name !== "VariableName")
|
|
3890
3890
|
return;
|
|
3891
3891
|
let r = n.node, a = e2.slice(r.from, r.to);
|
|
3892
3892
|
f(r) || D(r, a, e2) || o(r, a);
|
|
3893
3893
|
} });
|
|
3894
3894
|
};
|
|
3895
|
-
var p = (e2,
|
|
3896
|
-
if (!e2 || !e2.includes(
|
|
3895
|
+
var p = (e2, t2, o, i) => {
|
|
3896
|
+
if (!e2 || !e2.includes(t2))
|
|
3897
3897
|
return [];
|
|
3898
3898
|
let n = [];
|
|
3899
3899
|
return c(e2, o, (r, a) => {
|
|
3900
|
-
a ===
|
|
3900
|
+
a === t2 && !(i && d(r)) && n.push({ from: r.from, to: r.to });
|
|
3901
3901
|
}), n;
|
|
3902
3902
|
};
|
|
3903
|
-
var
|
|
3904
|
-
|
|
3903
|
+
var k = (e2, t2, o) => p(e2, t2, o, false).length > 0;
|
|
3904
|
+
var N = (e2, t2, o) => {
|
|
3905
|
+
(t2 === "unaryTests" ? m : parser).parse(e2).iterate({ enter(n) {
|
|
3905
3906
|
if (n.name !== "VariableName")
|
|
3906
3907
|
return;
|
|
3907
3908
|
let r = n.node;
|
|
3908
3909
|
f(r) && o(r, e2.slice(r.from, r.to));
|
|
3909
3910
|
} });
|
|
3910
3911
|
};
|
|
3911
|
-
var I = (e2,
|
|
3912
|
-
if (!e2 || !e2.includes(
|
|
3912
|
+
var I = (e2, t2, o) => {
|
|
3913
|
+
if (!e2 || !e2.includes(t2))
|
|
3913
3914
|
return [];
|
|
3914
3915
|
let i = [];
|
|
3915
3916
|
return N(e2, o, (n, r) => {
|
|
3916
|
-
r ===
|
|
3917
|
+
r === t2 && i.push({ from: n.from, to: n.to });
|
|
3917
3918
|
}), i;
|
|
3918
3919
|
};
|
|
3919
|
-
var g = (e2,
|
|
3920
|
+
var g = (e2, t2, o) => {
|
|
3920
3921
|
let i = "", n = 0;
|
|
3921
|
-
for (let r of
|
|
3922
|
+
for (let r of t2)
|
|
3922
3923
|
i += e2.slice(n, r.from) + o, n = r.to;
|
|
3923
3924
|
return i + e2.slice(n);
|
|
3924
3925
|
};
|
|
3925
|
-
var K = (e2,
|
|
3926
|
-
let n = I(e2,
|
|
3926
|
+
var K = (e2, t2, o, i) => {
|
|
3927
|
+
let n = I(e2, t2, i);
|
|
3927
3928
|
return n.length === 0 ? e2 : g(e2, n, o);
|
|
3928
3929
|
};
|
|
3929
|
-
var b = (e2,
|
|
3930
|
+
var b = (e2, t2, o = {}) => {
|
|
3930
3931
|
if (!e2.trim())
|
|
3931
3932
|
return [];
|
|
3932
3933
|
let i = [];
|
|
3933
|
-
return c(e2,
|
|
3934
|
+
return c(e2, t2, (n, r) => {
|
|
3934
3935
|
(o.includeFilterPredicateMembers || !d(n)) && i.push({ name: r, from: n.from, to: n.to });
|
|
3935
3936
|
}), i;
|
|
3936
3937
|
};
|
|
3937
|
-
var R = (e2,
|
|
3938
|
-
let o = [
|
|
3938
|
+
var R = (e2, t2) => {
|
|
3939
|
+
let o = [t2.slice(e2.from, e2.to)], i = e2, n = i.parent;
|
|
3939
3940
|
for (;n && n.name === "PathExpression" && n.from === i.from; ) {
|
|
3940
3941
|
let r = n.getChild("PathName");
|
|
3941
|
-
r && o.push(
|
|
3942
|
+
r && o.push(t2.slice(r.from, r.to)), i = n, n = i.parent;
|
|
3942
3943
|
}
|
|
3943
3944
|
return o.join(".");
|
|
3944
3945
|
};
|
|
3945
|
-
var X = (e2,
|
|
3946
|
+
var X = (e2, t2) => {
|
|
3946
3947
|
if (!e2.trim())
|
|
3947
3948
|
return [];
|
|
3948
3949
|
let o = new Set, i = [];
|
|
3949
|
-
return c(e2,
|
|
3950
|
+
return c(e2, t2, (n) => {
|
|
3950
3951
|
let r = R(n, e2);
|
|
3951
3952
|
o.has(r) || (o.add(r), i.push(r));
|
|
3952
3953
|
}), i;
|
|
3953
3954
|
};
|
|
3954
3955
|
var x = (e2) => {
|
|
3955
|
-
let
|
|
3956
|
-
if (!
|
|
3956
|
+
let t2 = e2.trim();
|
|
3957
|
+
if (!t2)
|
|
3957
3958
|
return false;
|
|
3958
|
-
let o = p(
|
|
3959
|
-
return o.length === 1 && o[0].from === 0 && o[0].to ===
|
|
3959
|
+
let o = p(t2, t2, "expression", false);
|
|
3960
|
+
return o.length === 1 && o[0].from === 0 && o[0].to === t2.length;
|
|
3960
3961
|
};
|
|
3961
|
-
var j = (e2,
|
|
3962
|
-
let n = p(e2,
|
|
3962
|
+
var j = (e2, t2, o, i) => {
|
|
3963
|
+
let n = p(e2, t2, i, false);
|
|
3963
3964
|
return n.length === 0 ? e2 : g(e2, n, o);
|
|
3964
3965
|
};
|
|
3965
3966
|
var s = (e2) => `${e2}_${v4_default()}`;
|
|
3966
3967
|
var C = "Annotation";
|
|
3967
|
-
var
|
|
3968
|
+
var _ = "Decision";
|
|
3968
3969
|
var M = "decision1";
|
|
3969
3970
|
var A = "UiPath Maestro";
|
|
3970
3971
|
var O = () => ({ id: s("definitions"), namespace: `http://uipath.com/dmn/${s("ns")}`, exporter: A });
|
|
3971
3972
|
var S = "null";
|
|
3972
3973
|
var re = (e2) => {
|
|
3973
|
-
let
|
|
3974
|
-
return
|
|
3974
|
+
let t2 = (e2 ?? "").trim();
|
|
3975
|
+
return t2 === "" || t2 === S;
|
|
3975
3976
|
};
|
|
3976
|
-
var P = (e2) => ({ ...O(), name: e2, decision: { id: s("decision"), name: M, label:
|
|
3977
|
+
var P = (e2) => ({ ...O(), name: e2, decision: { id: s("decision"), name: M, label: _, variableId: s("variable"), variableTypeRef: "string", decisionTable: { id: s("decisionTable"), hitPolicy: e.First, inputs: [{ id: s("input"), label: "Input 1", expressionId: s("inputExpression"), expressionText: "", typeRef: "string" }], outputs: [V()], annotations: [{ name: C }], rules: [{ id: s("rule"), inputEntries: [{ id: s("inputEntry"), text: "-" }], outputEntries: [{ id: s("outputEntry"), text: "" }], annotationEntries: [""] }] } }, inputData: [] });
|
|
3977
3978
|
var T = "input1";
|
|
3978
3979
|
var ie = (e2) => {
|
|
3979
|
-
let
|
|
3980
|
-
return q({ ...
|
|
3980
|
+
let t2 = P(e2), [o] = t2.decision.decisionTable.inputs;
|
|
3981
|
+
return q({ ...t2, inputData: [{ id: s("inputData"), variableId: s("variable"), name: T, typeRef: o.typeRef }], decision: { ...t2.decision, decisionTable: { ...t2.decision.decisionTable, inputs: [{ ...o, expressionText: T }] } } });
|
|
3981
3982
|
};
|
|
3983
|
+
var oe = /[\p{L}\p{N}_]/u;
|
|
3984
|
+
var L = /^[\p{L}_][\p{L}\p{N}_]*(\s*\.\s*[\p{L}_][\p{L}\p{N}_]*)*$/u;
|
|
3982
3985
|
var v = /^[\p{L}_][\p{L}\p{N}_]*$/u;
|
|
3983
3986
|
var w = (e2) => v.test(e2.trim()) && x(e2);
|
|
3984
|
-
var U = (e2,
|
|
3985
|
-
let o = `output${
|
|
3987
|
+
var U = (e2, t2) => {
|
|
3988
|
+
let o = `output${t2 + 1}`, i = (e2 ?? "").replace(/[^\p{L}\p{N}_]+(.)?/gu, (r, a) => a ? a.toUpperCase() : "");
|
|
3986
3989
|
if (!/^[\p{L}_]/u.test(i))
|
|
3987
3990
|
return o;
|
|
3988
3991
|
let n = i.charAt(0).toLowerCase() + i.slice(1);
|
|
3989
3992
|
return w(n) ? n : o;
|
|
3990
3993
|
};
|
|
3991
|
-
var B = (e2,
|
|
3994
|
+
var B = (e2, t2) => e2.name?.trim() || U(e2.label, t2);
|
|
3992
3995
|
var se = (e2) => e2 > 1;
|
|
3996
|
+
var ae = (e2) => {
|
|
3997
|
+
let t2 = e2.trim();
|
|
3998
|
+
if (!(!t2 || !L.test(t2)))
|
|
3999
|
+
return t2.split(".")[0].trim() || undefined;
|
|
4000
|
+
};
|
|
3993
4001
|
var q = (e2) => {
|
|
3994
|
-
let
|
|
4002
|
+
let t2 = $(e2.decision.decisionTable.inputs), o = (r) => r.variableName ?? r.name, i = e2.inputData.map((r) => {
|
|
3995
4003
|
let a = o(r);
|
|
3996
|
-
return
|
|
4004
|
+
return t2.has(a) ? r.requirementId ? r : { ...r, requirementId: s("informationRequirement") } : r.requirementId && !r.requirementFromSource ? { ...r, requirementId: undefined } : r;
|
|
3997
4005
|
});
|
|
3998
4006
|
return i.some((r, a) => r !== e2.inputData[a]) ? { ...e2, inputData: i } : e2;
|
|
3999
4007
|
};
|
|
4000
|
-
var $
|
|
4001
|
-
let
|
|
4008
|
+
var $ = (e2) => {
|
|
4009
|
+
let t2 = new Set;
|
|
4002
4010
|
for (let o of e2)
|
|
4003
4011
|
for (let i of b(o.expressionText, "expression"))
|
|
4004
|
-
|
|
4005
|
-
return
|
|
4012
|
+
t2.add(i.name);
|
|
4013
|
+
return t2;
|
|
4006
4014
|
};
|
|
4007
4015
|
function V() {
|
|
4008
4016
|
let e2 = { id: s("output"), label: "Output 1", typeRef: "string" };
|
|
4009
4017
|
return { ...e2, name: B(e2, 0) };
|
|
4010
4018
|
}
|
|
4011
4019
|
|
|
4012
|
-
export { trackVariables, parser, K, b, X, x, j, s, C,
|
|
4020
|
+
export { trackVariables, parser, k, K, b, X, x, j, s, C, _, A, O, S, re, P, ie, oe, w, U, B, se, ae, q, $ };
|
|
4013
4021
|
|
|
4014
|
-
//# debugId=
|
|
4022
|
+
//# debugId=B4DF542C54BA7A5064756E2164756E21
|