@code0-tech/pictor 0.0.0-mvp.4 → 0.0.0-mvp.6

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 (111) hide show
  1. package/dist/_virtual/compiler-runtime.js +5 -0
  2. package/dist/_virtual/compiler-runtime2.js +4 -0
  3. package/dist/_virtual/react-compiler-runtime.development.js +4 -0
  4. package/dist/_virtual/react-compiler-runtime.production.js +4 -0
  5. package/dist/assets/components/d-flow/DFlow.style.css +1 -0
  6. package/dist/assets/{DFlow.css → node_modules/@xyflow/react/dist/style.css} +1 -1
  7. package/dist/components/avatar/Avatar.js +2 -2
  8. package/dist/components/badge/Badge.js +2 -2
  9. package/dist/components/breadcrumb/Breadcrumb.js +17 -16
  10. package/dist/components/button/Button.js +6 -5
  11. package/dist/components/button-group/ButtonGroup.js +6 -5
  12. package/dist/components/card/Card.js +2 -2
  13. package/dist/components/card/CardSection.js +1 -1
  14. package/dist/components/col/Col.js +9 -8
  15. package/dist/components/command/Command.js +19 -18
  16. package/dist/components/container/Container.js +12 -11
  17. package/dist/components/d-flow/DFlow.edges.hook.js +9 -10
  18. package/dist/components/d-flow/DFlow.js +6 -4
  19. package/dist/components/d-flow/DFlow.nodes.hook.js +18 -19
  20. package/dist/components/d-flow/control/DFlowControl.js +1 -1
  21. package/dist/components/d-flow/data-type/DFlowDataType.service.js +89 -5
  22. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +18 -4
  23. package/dist/components/d-flow/data-type/index.js +1 -1
  24. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +220 -4
  25. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +227 -4
  26. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +1 -1
  27. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +241 -5
  28. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -6
  29. package/dist/components/d-flow/edge/DFlowEdge.js +1 -1
  30. package/dist/components/d-flow/folder/DFlowFolder.js +16 -15
  31. package/dist/components/d-flow/function/DFlowFunction.return.hook.js +1 -1
  32. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +19 -20
  33. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +51 -51
  34. package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +1 -1
  35. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +1 -1
  36. package/dist/components/d-flow/index.js +8 -8
  37. package/dist/components/d-flow/input/DFlowInputDataType.js +201 -201
  38. package/dist/components/d-flow/minimap/DFlowMiniMap.js +6 -5
  39. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +61 -62
  40. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +1 -1
  41. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +1 -1
  42. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +1 -1
  43. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +9 -8
  44. package/dist/components/d-flow/tab/DFlowTabs.js +1 -1
  45. package/dist/components/d-flow/validation/DFlowValidation.js +15 -14
  46. package/dist/components/d-fullscreen/DFullScreen.d.ts +1 -2
  47. package/dist/components/d-fullscreen/DFullScreen.js +15 -14
  48. package/dist/components/d-layout/DLayout.js +13 -12
  49. package/dist/components/d-namespace/index.js +6 -6
  50. package/dist/components/d-organization/index.js +5 -5
  51. package/dist/components/d-resizable/DResizable.js +17 -16
  52. package/dist/components/d-user/index.js +4 -4
  53. package/dist/components/dialog/Dialog.js +18 -17
  54. package/dist/components/file-tabs/FileTabs.js +41 -40
  55. package/dist/components/flex/Flex.js +2 -2
  56. package/dist/components/form/CheckboxInput.js +2 -2
  57. package/dist/components/form/Input.js +1 -1
  58. package/dist/components/form/InputDescription.js +1 -1
  59. package/dist/components/form/InputLabel.js +1 -1
  60. package/dist/components/form/InputMessage.js +1 -1
  61. package/dist/components/form/InputSuggestion.js +1 -1
  62. package/dist/components/form/PinInput.js +2 -2
  63. package/dist/components/form/RadioGroup.js +2 -2
  64. package/dist/components/form/RadioInput.js +2 -2
  65. package/dist/components/menu/Menu.js +2 -2
  66. package/dist/components/quote/Quote.js +4 -3
  67. package/dist/components/row/Row.js +10 -9
  68. package/dist/components/scroll-area/ScrollArea.js +18 -17
  69. package/dist/components/segmented-control/SegmentedControl.js +12 -11
  70. package/dist/components/text/Text.js +2 -2
  71. package/dist/components/tooltip/Tooltip.js +10 -9
  72. package/dist/index.js +219 -218
  73. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
  74. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
  75. package/dist/node_modules/react/compiler-runtime.js +10 -0
  76. package/dist/utils/contextStore.js +1 -1
  77. package/dist/utils/generics.js +88 -89
  78. package/dist/utils/reactiveArrayService.d.ts +1 -1
  79. package/dist/utils/reactiveArrayService.js +51 -41
  80. package/package.json +3 -5
  81. package/dist/DFlowDataType.service-Dz8pQUeO.js +0 -793
  82. package/dist/compiler-runtime-BNHg76kC.js +0 -36
  83. /package/dist/assets/{Avatar.css → components/avatar/Avatar.style.css} +0 -0
  84. /package/dist/assets/{Badge.css → components/badge/Badge.style.css} +0 -0
  85. /package/dist/assets/{Breadcrumb.css → components/breadcrumb/Breadcrumb.style.css} +0 -0
  86. /package/dist/assets/{Button.css → components/button/Button.style.css} +0 -0
  87. /package/dist/assets/{ButtonGroup.css → components/button-group/ButtonGroup.style.css} +0 -0
  88. /package/dist/assets/{Card.css → components/card/Card.style.css} +0 -0
  89. /package/dist/assets/{Col.css → components/col/Col.style.css} +0 -0
  90. /package/dist/assets/{Command.css → components/command/Command.style.css} +0 -0
  91. /package/dist/assets/{Container.css → components/container/Container.style.css} +0 -0
  92. /package/dist/assets/{DFlowFolder.css → components/d-flow/folder/DFlowFolder.style.css} +0 -0
  93. /package/dist/assets/{DFlowFunctionDefaultCard.css → components/d-flow/function/DFlowFunctionDefaultCard.style.css} +0 -0
  94. /package/dist/assets/{DFlowInputDataType.css → components/d-flow/input/DFlowInputDataType.style.css} +0 -0
  95. /package/dist/assets/{DFlowMiniMap.css → components/d-flow/minimap/DFlowMiniMap.style.css} +0 -0
  96. /package/dist/assets/{DFlowSuggestionSearchInput.css → components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css} +0 -0
  97. /package/dist/assets/{DFlowValidation.css → components/d-flow/validation/DFlowValidation.style.css} +0 -0
  98. /package/dist/assets/{DFullScreen.css → components/d-fullscreen/DFullScreen.style.css} +0 -0
  99. /package/dist/assets/{DLayout.css → components/d-layout/DLayout.style.css} +0 -0
  100. /package/dist/assets/{DResizable.css → components/d-resizable/DResizable.style.css} +0 -0
  101. /package/dist/assets/{Dialog.css → components/dialog/Dialog.style.css} +0 -0
  102. /package/dist/assets/{FileTabs.css → components/file-tabs/FileTabs.style.css} +0 -0
  103. /package/dist/assets/{Flex.css → components/flex/Flex.style.css} +0 -0
  104. /package/dist/assets/{Input.css → components/form/Input.style.css} +0 -0
  105. /package/dist/assets/{Menu.css → components/menu/Menu.style.css} +0 -0
  106. /package/dist/assets/{Quote.css → components/quote/Quote.style.css} +0 -0
  107. /package/dist/assets/{Row.css → components/row/Row.style.css} +0 -0
  108. /package/dist/assets/{ScrollArea.css → components/scroll-area/ScrollArea.style.css} +0 -0
  109. /package/dist/assets/{SegmentedControl.css → components/segmented-control/SegmentedControl.style.css} +0 -0
  110. /package/dist/assets/{Text.css → components/text/Text.style.css} +0 -0
  111. /package/dist/assets/{Tooltip.css → components/tooltip/Tooltip.style.css} +0 -0
@@ -1,793 +0,0 @@
1
- import { ReactiveArrayService as B } from "./utils/reactiveArrayService.js";
2
- import { resolveType as G } from "./utils/generics.js";
3
- import { GenericCombinationStrategyType as k, DataTypeRulesVariant as h, DataTypeVariant as T } from "@code0-tech/sagittarius-graphql-types";
4
- import { c as U } from "./compiler-runtime-BNHg76kC.js";
5
- import { DFlowDataTypeRegexRule as H } from "./components/d-flow/data-type/rules/DFlowDataTypeRegexRule.js";
6
- import { DFlowDataTypeRangeRule as W } from "./components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.js";
7
- import { DFlowDataTypeItemOfCollectionRule as J } from "./components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
8
- import { genericMapping as E, staticImplements as D } from "./components/d-flow/data-type/rules/DFlowDataTypeRule.js";
9
- import { useValidateDataType as A } from "./components/d-flow/data-type/DFlowDataType.validation.type.js";
10
- import { useService as X } from "./utils/contextStore.js";
11
- function Y(r, e, t, n) {
12
- var i = O(), a = e(function(s) {
13
- i.initializeInstanceElements(s, o.elements);
14
- }, t), o = i.decorateClass(Z(a.d.map(q)), r);
15
- return i.initializeClassElements(a.F, o.elements), i.runClassFinishers(a.F, o.finishers);
16
- }
17
- function O() {
18
- O = function() {
19
- return r;
20
- };
21
- var r = { elementsDefinitionOrder: [["method"], ["field"]], initializeInstanceElements: function(e, t) {
22
- ["method", "field"].forEach(function(n) {
23
- t.forEach(function(i) {
24
- i.kind === n && i.placement === "own" && this.defineClassElement(e, i);
25
- }, this);
26
- }, this);
27
- }, initializeClassElements: function(e, t) {
28
- var n = e.prototype;
29
- ["method", "field"].forEach(function(i) {
30
- t.forEach(function(a) {
31
- var o = a.placement;
32
- if (a.kind === i && (o === "static" || o === "prototype")) {
33
- var s = o === "static" ? e : n;
34
- this.defineClassElement(s, a);
35
- }
36
- }, this);
37
- }, this);
38
- }, defineClassElement: function(e, t) {
39
- var n = t.descriptor;
40
- if (t.kind === "field") {
41
- var i = t.initializer;
42
- n = { enumerable: n.enumerable, writable: n.writable, configurable: n.configurable, value: i === void 0 ? void 0 : i.call(e) };
43
- }
44
- Object.defineProperty(e, t.key, n);
45
- }, decorateClass: function(e, t) {
46
- var n = [], i = [], a = { static: [], prototype: [], own: [] };
47
- if (e.forEach(function(s) {
48
- this.addElementPlacement(s, a);
49
- }, this), e.forEach(function(s) {
50
- if (!g(s)) return n.push(s);
51
- var l = this.decorateElement(s, a);
52
- n.push(l.element), n.push.apply(n, l.extras), i.push.apply(i, l.finishers);
53
- }, this), !t) return { elements: n, finishers: i };
54
- var o = this.decorateConstructor(n, t);
55
- return i.push.apply(i, o.finishers), o.finishers = i, o;
56
- }, addElementPlacement: function(e, t, n) {
57
- var i = t[e.placement];
58
- if (!n && i.indexOf(e.key) !== -1) throw new TypeError("Duplicated element (" + e.key + ")");
59
- i.push(e.key);
60
- }, decorateElement: function(e, t) {
61
- for (var n = [], i = [], a = e.decorators, o = a.length - 1; o >= 0; o--) {
62
- var s = t[e.placement];
63
- s.splice(s.indexOf(e.key), 1);
64
- var l = this.fromElementDescriptor(e), c = this.toElementFinisherExtras((0, a[o])(l) || l);
65
- e = c.element, this.addElementPlacement(e, t), c.finisher && i.push(c.finisher);
66
- var p = c.extras;
67
- if (p) {
68
- for (var d = 0; d < p.length; d++) this.addElementPlacement(p[d], t);
69
- n.push.apply(n, p);
70
- }
71
- }
72
- return { element: e, finishers: i, extras: n };
73
- }, decorateConstructor: function(e, t) {
74
- for (var n = [], i = t.length - 1; i >= 0; i--) {
75
- var a = this.fromClassDescriptor(e), o = this.toClassDescriptor((0, t[i])(a) || a);
76
- if (o.finisher !== void 0 && n.push(o.finisher), o.elements !== void 0) {
77
- e = o.elements;
78
- for (var s = 0; s < e.length - 1; s++) for (var l = s + 1; l < e.length; l++) if (e[s].key === e[l].key && e[s].placement === e[l].placement) throw new TypeError("Duplicated element (" + e[s].key + ")");
79
- }
80
- }
81
- return { elements: e, finishers: n };
82
- }, fromElementDescriptor: function(e) {
83
- var t = { kind: e.kind, key: e.key, placement: e.placement, descriptor: e.descriptor };
84
- return Object.defineProperty(t, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }), e.kind === "field" && (t.initializer = e.initializer), t;
85
- }, toElementDescriptors: function(e) {
86
- if (e !== void 0) return te(e).map(function(t) {
87
- var n = this.toElementDescriptor(t);
88
- return this.disallowProperty(t, "finisher", "An element descriptor"), this.disallowProperty(t, "extras", "An element descriptor"), n;
89
- }, this);
90
- }, toElementDescriptor: function(e) {
91
- var t = e.kind + "";
92
- if (t !== "method" && t !== "field") throw new TypeError(`An element descriptor's .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "` + t + '"');
93
- var n = j(e.key), i = e.placement + "";
94
- if (i !== "static" && i !== "prototype" && i !== "own") throw new TypeError(`An element descriptor's .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "` + i + '"');
95
- var a = e.descriptor;
96
- this.disallowProperty(e, "elements", "An element descriptor");
97
- var o = { kind: t, key: n, placement: i, descriptor: Object.assign({}, a) };
98
- return t !== "field" ? this.disallowProperty(e, "initializer", "A method descriptor") : (this.disallowProperty(a, "get", "The property descriptor of a field descriptor"), this.disallowProperty(a, "set", "The property descriptor of a field descriptor"), this.disallowProperty(a, "value", "The property descriptor of a field descriptor"), o.initializer = e.initializer), o;
99
- }, toElementFinisherExtras: function(e) {
100
- return { element: this.toElementDescriptor(e), finisher: P(e, "finisher"), extras: this.toElementDescriptors(e.extras) };
101
- }, fromClassDescriptor: function(e) {
102
- var t = { kind: "class", elements: e.map(this.fromElementDescriptor, this) };
103
- return Object.defineProperty(t, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }), t;
104
- }, toClassDescriptor: function(e) {
105
- var t = e.kind + "";
106
- if (t !== "class") throw new TypeError(`A class descriptor's .kind property must be "class", but a decorator created a class descriptor with .kind "` + t + '"');
107
- this.disallowProperty(e, "key", "A class descriptor"), this.disallowProperty(e, "placement", "A class descriptor"), this.disallowProperty(e, "descriptor", "A class descriptor"), this.disallowProperty(e, "initializer", "A class descriptor"), this.disallowProperty(e, "extras", "A class descriptor");
108
- var n = P(e, "finisher");
109
- return { elements: this.toElementDescriptors(e.elements), finisher: n };
110
- }, runClassFinishers: function(e, t) {
111
- for (var n = 0; n < t.length; n++) {
112
- var i = (0, t[n])(e);
113
- if (i !== void 0) {
114
- if (typeof i != "function") throw new TypeError("Finishers must return a constructor.");
115
- e = i;
116
- }
117
- }
118
- return e;
119
- }, disallowProperty: function(e, t, n) {
120
- if (e[t] !== void 0) throw new TypeError(n + " can't have a ." + t + " property.");
121
- } };
122
- return r;
123
- }
124
- function q(r) {
125
- var e, t = j(r.key);
126
- r.kind === "method" ? e = { value: r.value, writable: !0, configurable: !0, enumerable: !1 } : r.kind === "get" ? e = { get: r.value, configurable: !0, enumerable: !1 } : r.kind === "set" ? e = { set: r.value, configurable: !0, enumerable: !1 } : r.kind === "field" && (e = { configurable: !0, writable: !0, enumerable: !0 });
127
- var n = { kind: r.kind === "field" ? "field" : "method", key: t, placement: r.static ? "static" : r.kind === "field" ? "own" : "prototype", descriptor: e };
128
- return r.decorators && (n.decorators = r.decorators), r.kind === "field" && (n.initializer = r.value), n;
129
- }
130
- function Q(r, e) {
131
- r.descriptor.get !== void 0 ? e.descriptor.get = r.descriptor.get : e.descriptor.set = r.descriptor.set;
132
- }
133
- function Z(r) {
134
- for (var e = [], t = function(o) {
135
- return o.kind === "method" && o.key === a.key && o.placement === a.placement;
136
- }, n = 0; n < r.length; n++) {
137
- var i, a = r[n];
138
- if (a.kind === "method" && (i = e.find(t)))
139
- if (I(a.descriptor) || I(i.descriptor)) {
140
- if (g(a) || g(i)) throw new ReferenceError("Duplicated methods (" + a.key + ") can't be decorated.");
141
- i.descriptor = a.descriptor;
142
- } else {
143
- if (g(a)) {
144
- if (g(i)) throw new ReferenceError("Decorators can't be placed on different accessors with for the same property (" + a.key + ").");
145
- i.decorators = a.decorators;
146
- }
147
- Q(a, i);
148
- }
149
- else e.push(a);
150
- }
151
- return e;
152
- }
153
- function g(r) {
154
- return r.decorators && r.decorators.length;
155
- }
156
- function I(r) {
157
- return r !== void 0 && !(r.value === void 0 && r.writable === void 0);
158
- }
159
- function P(r, e) {
160
- var t = r[e];
161
- if (t !== void 0 && typeof t != "function") throw new TypeError("Expected '" + e + "' to be a function");
162
- return t;
163
- }
164
- function j(r) {
165
- var e = ee(r, "string");
166
- return typeof e == "symbol" ? e : e + "";
167
- }
168
- function ee(r, e) {
169
- if (typeof r != "object" || !r) return r;
170
- var t = r[Symbol.toPrimitive];
171
- if (t !== void 0) {
172
- var n = t.call(r, e);
173
- if (typeof n != "object") return n;
174
- throw new TypeError("@@toPrimitive must return a primitive value.");
175
- }
176
- return (e === "string" ? String : Number)(r);
177
- }
178
- function te(r) {
179
- return ae(r) || ne(r) || ie(r) || re();
180
- }
181
- function re() {
182
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
183
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
184
- }
185
- function ie(r, e) {
186
- if (r) {
187
- if (typeof r == "string") return C(r, e);
188
- var t = {}.toString.call(r).slice(8, -1);
189
- return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? C(r, e) : void 0;
190
- }
191
- }
192
- function C(r, e) {
193
- (e == null || e > r.length) && (e = r.length);
194
- for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t];
195
- return n;
196
- }
197
- function ne(r) {
198
- if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
199
- }
200
- function ae(r) {
201
- if (Array.isArray(r)) return r;
202
- }
203
- let oe = Y([D()], function(r) {
204
- class e {
205
- constructor() {
206
- r(this);
207
- }
208
- }
209
- return {
210
- F: e,
211
- d: [{
212
- kind: "method",
213
- static: !0,
214
- key: "validate",
215
- value: function(n, i, a, o, s) {
216
- const l = a?.get(i?.dataTypeIdentifier?.genericKey), c = a?.get(i?.dataTypeIdentifier?.genericKey)?.sourceDataTypeIdentifiers, p = a?.get(i?.dataTypeIdentifier?.genericKey)?.genericCombinationStrategies;
217
- if ("value" in n && !Array.isArray(n.value)) return !1;
218
- if (i?.dataTypeIdentifier?.genericKey && !l && !o?.getDataType(i.dataTypeIdentifier)) return !0;
219
- if (!(o?.getDataType(i.dataTypeIdentifier) || l) || l && !o?.hasDataTypes(c) || l && (p?.length ?? 0) + 1 != c.length) return !1;
220
- if (i?.dataTypeIdentifier?.genericKey && l && c) {
221
- const d = c.map((u) => n.value.every((f) => u.genericType ? y({
222
- __typename: "LiteralValue",
223
- value: f
224
- }, o?.getDataType(u), s, u.genericType.genericMappers) : y({
225
- __typename: "LiteralValue",
226
- value: f
227
- }, o?.getDataType(u), s)));
228
- return d.length > 1 ? d.reduce((u, f, m) => p && p[m - 1].type == k.Or ? u || f : u && f) : d[0];
229
- }
230
- return i?.dataTypeIdentifier?.dataType ? n.value.every((d) => y(d, o?.getDataType(i.dataTypeIdentifier))) : n.value.every((d) => y(d, o?.getDataType(i.dataTypeIdentifier), s, E((i.dataTypeIdentifier?.genericType).genericMappers, a)));
231
- }
232
- }]
233
- };
234
- });
235
- function se(r, e, t, n) {
236
- var i = K(), a = e(function(s) {
237
- i.initializeInstanceElements(s, o.elements);
238
- }, t), o = i.decorateClass(de(a.d.map(le)), r);
239
- return i.initializeClassElements(a.F, o.elements), i.runClassFinishers(a.F, o.finishers);
240
- }
241
- function K() {
242
- K = function() {
243
- return r;
244
- };
245
- var r = { elementsDefinitionOrder: [["method"], ["field"]], initializeInstanceElements: function(e, t) {
246
- ["method", "field"].forEach(function(n) {
247
- t.forEach(function(i) {
248
- i.kind === n && i.placement === "own" && this.defineClassElement(e, i);
249
- }, this);
250
- }, this);
251
- }, initializeClassElements: function(e, t) {
252
- var n = e.prototype;
253
- ["method", "field"].forEach(function(i) {
254
- t.forEach(function(a) {
255
- var o = a.placement;
256
- if (a.kind === i && (o === "static" || o === "prototype")) {
257
- var s = o === "static" ? e : n;
258
- this.defineClassElement(s, a);
259
- }
260
- }, this);
261
- }, this);
262
- }, defineClassElement: function(e, t) {
263
- var n = t.descriptor;
264
- if (t.kind === "field") {
265
- var i = t.initializer;
266
- n = { enumerable: n.enumerable, writable: n.writable, configurable: n.configurable, value: i === void 0 ? void 0 : i.call(e) };
267
- }
268
- Object.defineProperty(e, t.key, n);
269
- }, decorateClass: function(e, t) {
270
- var n = [], i = [], a = { static: [], prototype: [], own: [] };
271
- if (e.forEach(function(s) {
272
- this.addElementPlacement(s, a);
273
- }, this), e.forEach(function(s) {
274
- if (!b(s)) return n.push(s);
275
- var l = this.decorateElement(s, a);
276
- n.push(l.element), n.push.apply(n, l.extras), i.push.apply(i, l.finishers);
277
- }, this), !t) return { elements: n, finishers: i };
278
- var o = this.decorateConstructor(n, t);
279
- return i.push.apply(i, o.finishers), o.finishers = i, o;
280
- }, addElementPlacement: function(e, t, n) {
281
- var i = t[e.placement];
282
- if (!n && i.indexOf(e.key) !== -1) throw new TypeError("Duplicated element (" + e.key + ")");
283
- i.push(e.key);
284
- }, decorateElement: function(e, t) {
285
- for (var n = [], i = [], a = e.decorators, o = a.length - 1; o >= 0; o--) {
286
- var s = t[e.placement];
287
- s.splice(s.indexOf(e.key), 1);
288
- var l = this.fromElementDescriptor(e), c = this.toElementFinisherExtras((0, a[o])(l) || l);
289
- e = c.element, this.addElementPlacement(e, t), c.finisher && i.push(c.finisher);
290
- var p = c.extras;
291
- if (p) {
292
- for (var d = 0; d < p.length; d++) this.addElementPlacement(p[d], t);
293
- n.push.apply(n, p);
294
- }
295
- }
296
- return { element: e, finishers: i, extras: n };
297
- }, decorateConstructor: function(e, t) {
298
- for (var n = [], i = t.length - 1; i >= 0; i--) {
299
- var a = this.fromClassDescriptor(e), o = this.toClassDescriptor((0, t[i])(a) || a);
300
- if (o.finisher !== void 0 && n.push(o.finisher), o.elements !== void 0) {
301
- e = o.elements;
302
- for (var s = 0; s < e.length - 1; s++) for (var l = s + 1; l < e.length; l++) if (e[s].key === e[l].key && e[s].placement === e[l].placement) throw new TypeError("Duplicated element (" + e[s].key + ")");
303
- }
304
- }
305
- return { elements: e, finishers: n };
306
- }, fromElementDescriptor: function(e) {
307
- var t = { kind: e.kind, key: e.key, placement: e.placement, descriptor: e.descriptor };
308
- return Object.defineProperty(t, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }), e.kind === "field" && (t.initializer = e.initializer), t;
309
- }, toElementDescriptors: function(e) {
310
- if (e !== void 0) return fe(e).map(function(t) {
311
- var n = this.toElementDescriptor(t);
312
- return this.disallowProperty(t, "finisher", "An element descriptor"), this.disallowProperty(t, "extras", "An element descriptor"), n;
313
- }, this);
314
- }, toElementDescriptor: function(e) {
315
- var t = e.kind + "";
316
- if (t !== "method" && t !== "field") throw new TypeError(`An element descriptor's .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "` + t + '"');
317
- var n = M(e.key), i = e.placement + "";
318
- if (i !== "static" && i !== "prototype" && i !== "own") throw new TypeError(`An element descriptor's .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "` + i + '"');
319
- var a = e.descriptor;
320
- this.disallowProperty(e, "elements", "An element descriptor");
321
- var o = { kind: t, key: n, placement: i, descriptor: Object.assign({}, a) };
322
- return t !== "field" ? this.disallowProperty(e, "initializer", "A method descriptor") : (this.disallowProperty(a, "get", "The property descriptor of a field descriptor"), this.disallowProperty(a, "set", "The property descriptor of a field descriptor"), this.disallowProperty(a, "value", "The property descriptor of a field descriptor"), o.initializer = e.initializer), o;
323
- }, toElementFinisherExtras: function(e) {
324
- return { element: this.toElementDescriptor(e), finisher: F(e, "finisher"), extras: this.toElementDescriptors(e.extras) };
325
- }, fromClassDescriptor: function(e) {
326
- var t = { kind: "class", elements: e.map(this.fromElementDescriptor, this) };
327
- return Object.defineProperty(t, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }), t;
328
- }, toClassDescriptor: function(e) {
329
- var t = e.kind + "";
330
- if (t !== "class") throw new TypeError(`A class descriptor's .kind property must be "class", but a decorator created a class descriptor with .kind "` + t + '"');
331
- this.disallowProperty(e, "key", "A class descriptor"), this.disallowProperty(e, "placement", "A class descriptor"), this.disallowProperty(e, "descriptor", "A class descriptor"), this.disallowProperty(e, "initializer", "A class descriptor"), this.disallowProperty(e, "extras", "A class descriptor");
332
- var n = F(e, "finisher");
333
- return { elements: this.toElementDescriptors(e.elements), finisher: n };
334
- }, runClassFinishers: function(e, t) {
335
- for (var n = 0; n < t.length; n++) {
336
- var i = (0, t[n])(e);
337
- if (i !== void 0) {
338
- if (typeof i != "function") throw new TypeError("Finishers must return a constructor.");
339
- e = i;
340
- }
341
- }
342
- return e;
343
- }, disallowProperty: function(e, t, n) {
344
- if (e[t] !== void 0) throw new TypeError(n + " can't have a ." + t + " property.");
345
- } };
346
- return r;
347
- }
348
- function le(r) {
349
- var e, t = M(r.key);
350
- r.kind === "method" ? e = { value: r.value, writable: !0, configurable: !0, enumerable: !1 } : r.kind === "get" ? e = { get: r.value, configurable: !0, enumerable: !1 } : r.kind === "set" ? e = { set: r.value, configurable: !0, enumerable: !1 } : r.kind === "field" && (e = { configurable: !0, writable: !0, enumerable: !0 });
351
- var n = { kind: r.kind === "field" ? "field" : "method", key: t, placement: r.static ? "static" : r.kind === "field" ? "own" : "prototype", descriptor: e };
352
- return r.decorators && (n.decorators = r.decorators), r.kind === "field" && (n.initializer = r.value), n;
353
- }
354
- function ce(r, e) {
355
- r.descriptor.get !== void 0 ? e.descriptor.get = r.descriptor.get : e.descriptor.set = r.descriptor.set;
356
- }
357
- function de(r) {
358
- for (var e = [], t = function(o) {
359
- return o.kind === "method" && o.key === a.key && o.placement === a.placement;
360
- }, n = 0; n < r.length; n++) {
361
- var i, a = r[n];
362
- if (a.kind === "method" && (i = e.find(t)))
363
- if (_(a.descriptor) || _(i.descriptor)) {
364
- if (b(a) || b(i)) throw new ReferenceError("Duplicated methods (" + a.key + ") can't be decorated.");
365
- i.descriptor = a.descriptor;
366
- } else {
367
- if (b(a)) {
368
- if (b(i)) throw new ReferenceError("Decorators can't be placed on different accessors with for the same property (" + a.key + ").");
369
- i.decorators = a.decorators;
370
- }
371
- ce(a, i);
372
- }
373
- else e.push(a);
374
- }
375
- return e;
376
- }
377
- function b(r) {
378
- return r.decorators && r.decorators.length;
379
- }
380
- function _(r) {
381
- return r !== void 0 && !(r.value === void 0 && r.writable === void 0);
382
- }
383
- function F(r, e) {
384
- var t = r[e];
385
- if (t !== void 0 && typeof t != "function") throw new TypeError("Expected '" + e + "' to be a function");
386
- return t;
387
- }
388
- function M(r) {
389
- var e = pe(r, "string");
390
- return typeof e == "symbol" ? e : e + "";
391
- }
392
- function pe(r, e) {
393
- if (typeof r != "object" || !r) return r;
394
- var t = r[Symbol.toPrimitive];
395
- if (t !== void 0) {
396
- var n = t.call(r, e);
397
- if (typeof n != "object") return n;
398
- throw new TypeError("@@toPrimitive must return a primitive value.");
399
- }
400
- return (e === "string" ? String : Number)(r);
401
- }
402
- function fe(r) {
403
- return he(r) || me(r) || ye(r) || ue();
404
- }
405
- function ue() {
406
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
407
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
408
- }
409
- function ye(r, e) {
410
- if (r) {
411
- if (typeof r == "string") return S(r, e);
412
- var t = {}.toString.call(r).slice(8, -1);
413
- return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? S(r, e) : void 0;
414
- }
415
- }
416
- function S(r, e) {
417
- (e == null || e > r.length) && (e = r.length);
418
- for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t];
419
- return n;
420
- }
421
- function me(r) {
422
- if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
423
- }
424
- function he(r) {
425
- if (Array.isArray(r)) return r;
426
- }
427
- let ve = se([D()], function(r) {
428
- class e {
429
- constructor() {
430
- r(this);
431
- }
432
- }
433
- return {
434
- F: e,
435
- d: [{
436
- kind: "method",
437
- static: !0,
438
- key: "validate",
439
- value: function(n, i, a, o, s) {
440
- const l = a?.get(i?.dataTypeIdentifier?.genericKey), c = a?.get(i?.dataTypeIdentifier?.genericKey)?.sourceDataTypeIdentifiers, p = a?.get(i?.dataTypeIdentifier?.genericKey)?.genericCombinationStrategies;
441
- if ((i?.key ?? "") in n && i?.dataTypeIdentifier?.genericKey && !l && !o?.getDataType(i.dataTypeIdentifier)) return !0;
442
- if (!(o?.getDataType(i.dataTypeIdentifier) || l) || l && !o?.hasDataTypes(c) || l && (p?.length ?? 0) + 1 != c.length) return !1;
443
- if (i?.dataTypeIdentifier?.genericKey && l && c) {
444
- const d = c.map((f) => y(n.value[i?.key ?? ""], o?.getDataType(f), s, f.genericType.genericMappers)), u = d.length > 1 ? d.reduce((f, m, v) => p && p[v - 1].type == k.Or ? f || m : f && m) : d[0];
445
- return (i?.key ?? "") in n && u;
446
- }
447
- return i?.dataTypeIdentifier?.dataType ? (i?.key ?? "") in n && y(n.value[i?.key ?? ""], o?.getDataType(i.dataTypeIdentifier)) : (i?.key ?? "") in n && y(n.value[i?.key ?? ""], o?.getDataType(i.dataTypeIdentifier), s, E(i?.dataTypeIdentifier?.genericType?.genericMappers, a));
448
- }
449
- }]
450
- };
451
- });
452
- function Te(r, e, t, n) {
453
- var i = N(), a = e(function(s) {
454
- i.initializeInstanceElements(s, o.elements);
455
- }, t), o = i.decorateClass(we(a.d.map(ge)), r);
456
- return i.initializeClassElements(a.F, o.elements), i.runClassFinishers(a.F, o.finishers);
457
- }
458
- function N() {
459
- N = function() {
460
- return r;
461
- };
462
- var r = { elementsDefinitionOrder: [["method"], ["field"]], initializeInstanceElements: function(e, t) {
463
- ["method", "field"].forEach(function(n) {
464
- t.forEach(function(i) {
465
- i.kind === n && i.placement === "own" && this.defineClassElement(e, i);
466
- }, this);
467
- }, this);
468
- }, initializeClassElements: function(e, t) {
469
- var n = e.prototype;
470
- ["method", "field"].forEach(function(i) {
471
- t.forEach(function(a) {
472
- var o = a.placement;
473
- if (a.kind === i && (o === "static" || o === "prototype")) {
474
- var s = o === "static" ? e : n;
475
- this.defineClassElement(s, a);
476
- }
477
- }, this);
478
- }, this);
479
- }, defineClassElement: function(e, t) {
480
- var n = t.descriptor;
481
- if (t.kind === "field") {
482
- var i = t.initializer;
483
- n = { enumerable: n.enumerable, writable: n.writable, configurable: n.configurable, value: i === void 0 ? void 0 : i.call(e) };
484
- }
485
- Object.defineProperty(e, t.key, n);
486
- }, decorateClass: function(e, t) {
487
- var n = [], i = [], a = { static: [], prototype: [], own: [] };
488
- if (e.forEach(function(s) {
489
- this.addElementPlacement(s, a);
490
- }, this), e.forEach(function(s) {
491
- if (!w(s)) return n.push(s);
492
- var l = this.decorateElement(s, a);
493
- n.push(l.element), n.push.apply(n, l.extras), i.push.apply(i, l.finishers);
494
- }, this), !t) return { elements: n, finishers: i };
495
- var o = this.decorateConstructor(n, t);
496
- return i.push.apply(i, o.finishers), o.finishers = i, o;
497
- }, addElementPlacement: function(e, t, n) {
498
- var i = t[e.placement];
499
- if (!n && i.indexOf(e.key) !== -1) throw new TypeError("Duplicated element (" + e.key + ")");
500
- i.push(e.key);
501
- }, decorateElement: function(e, t) {
502
- for (var n = [], i = [], a = e.decorators, o = a.length - 1; o >= 0; o--) {
503
- var s = t[e.placement];
504
- s.splice(s.indexOf(e.key), 1);
505
- var l = this.fromElementDescriptor(e), c = this.toElementFinisherExtras((0, a[o])(l) || l);
506
- e = c.element, this.addElementPlacement(e, t), c.finisher && i.push(c.finisher);
507
- var p = c.extras;
508
- if (p) {
509
- for (var d = 0; d < p.length; d++) this.addElementPlacement(p[d], t);
510
- n.push.apply(n, p);
511
- }
512
- }
513
- return { element: e, finishers: i, extras: n };
514
- }, decorateConstructor: function(e, t) {
515
- for (var n = [], i = t.length - 1; i >= 0; i--) {
516
- var a = this.fromClassDescriptor(e), o = this.toClassDescriptor((0, t[i])(a) || a);
517
- if (o.finisher !== void 0 && n.push(o.finisher), o.elements !== void 0) {
518
- e = o.elements;
519
- for (var s = 0; s < e.length - 1; s++) for (var l = s + 1; l < e.length; l++) if (e[s].key === e[l].key && e[s].placement === e[l].placement) throw new TypeError("Duplicated element (" + e[s].key + ")");
520
- }
521
- }
522
- return { elements: e, finishers: n };
523
- }, fromElementDescriptor: function(e) {
524
- var t = { kind: e.kind, key: e.key, placement: e.placement, descriptor: e.descriptor };
525
- return Object.defineProperty(t, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }), e.kind === "field" && (t.initializer = e.initializer), t;
526
- }, toElementDescriptors: function(e) {
527
- if (e !== void 0) return Ee(e).map(function(t) {
528
- var n = this.toElementDescriptor(t);
529
- return this.disallowProperty(t, "finisher", "An element descriptor"), this.disallowProperty(t, "extras", "An element descriptor"), n;
530
- }, this);
531
- }, toElementDescriptor: function(e) {
532
- var t = e.kind + "";
533
- if (t !== "method" && t !== "field") throw new TypeError(`An element descriptor's .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "` + t + '"');
534
- var n = V(e.key), i = e.placement + "";
535
- if (i !== "static" && i !== "prototype" && i !== "own") throw new TypeError(`An element descriptor's .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "` + i + '"');
536
- var a = e.descriptor;
537
- this.disallowProperty(e, "elements", "An element descriptor");
538
- var o = { kind: t, key: n, placement: i, descriptor: Object.assign({}, a) };
539
- return t !== "field" ? this.disallowProperty(e, "initializer", "A method descriptor") : (this.disallowProperty(a, "get", "The property descriptor of a field descriptor"), this.disallowProperty(a, "set", "The property descriptor of a field descriptor"), this.disallowProperty(a, "value", "The property descriptor of a field descriptor"), o.initializer = e.initializer), o;
540
- }, toElementFinisherExtras: function(e) {
541
- return { element: this.toElementDescriptor(e), finisher: R(e, "finisher"), extras: this.toElementDescriptors(e.extras) };
542
- }, fromClassDescriptor: function(e) {
543
- var t = { kind: "class", elements: e.map(this.fromElementDescriptor, this) };
544
- return Object.defineProperty(t, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }), t;
545
- }, toClassDescriptor: function(e) {
546
- var t = e.kind + "";
547
- if (t !== "class") throw new TypeError(`A class descriptor's .kind property must be "class", but a decorator created a class descriptor with .kind "` + t + '"');
548
- this.disallowProperty(e, "key", "A class descriptor"), this.disallowProperty(e, "placement", "A class descriptor"), this.disallowProperty(e, "descriptor", "A class descriptor"), this.disallowProperty(e, "initializer", "A class descriptor"), this.disallowProperty(e, "extras", "A class descriptor");
549
- var n = R(e, "finisher");
550
- return { elements: this.toElementDescriptors(e.elements), finisher: n };
551
- }, runClassFinishers: function(e, t) {
552
- for (var n = 0; n < t.length; n++) {
553
- var i = (0, t[n])(e);
554
- if (i !== void 0) {
555
- if (typeof i != "function") throw new TypeError("Finishers must return a constructor.");
556
- e = i;
557
- }
558
- }
559
- return e;
560
- }, disallowProperty: function(e, t, n) {
561
- if (e[t] !== void 0) throw new TypeError(n + " can't have a ." + t + " property.");
562
- } };
563
- return r;
564
- }
565
- function ge(r) {
566
- var e, t = V(r.key);
567
- r.kind === "method" ? e = { value: r.value, writable: !0, configurable: !0, enumerable: !1 } : r.kind === "get" ? e = { get: r.value, configurable: !0, enumerable: !1 } : r.kind === "set" ? e = { set: r.value, configurable: !0, enumerable: !1 } : r.kind === "field" && (e = { configurable: !0, writable: !0, enumerable: !0 });
568
- var n = { kind: r.kind === "field" ? "field" : "method", key: t, placement: r.static ? "static" : r.kind === "field" ? "own" : "prototype", descriptor: e };
569
- return r.decorators && (n.decorators = r.decorators), r.kind === "field" && (n.initializer = r.value), n;
570
- }
571
- function be(r, e) {
572
- r.descriptor.get !== void 0 ? e.descriptor.get = r.descriptor.get : e.descriptor.set = r.descriptor.set;
573
- }
574
- function we(r) {
575
- for (var e = [], t = function(o) {
576
- return o.kind === "method" && o.key === a.key && o.placement === a.placement;
577
- }, n = 0; n < r.length; n++) {
578
- var i, a = r[n];
579
- if (a.kind === "method" && (i = e.find(t)))
580
- if (x(a.descriptor) || x(i.descriptor)) {
581
- if (w(a) || w(i)) throw new ReferenceError("Duplicated methods (" + a.key + ") can't be decorated.");
582
- i.descriptor = a.descriptor;
583
- } else {
584
- if (w(a)) {
585
- if (w(i)) throw new ReferenceError("Decorators can't be placed on different accessors with for the same property (" + a.key + ").");
586
- i.decorators = a.decorators;
587
- }
588
- be(a, i);
589
- }
590
- else e.push(a);
591
- }
592
- return e;
593
- }
594
- function w(r) {
595
- return r.decorators && r.decorators.length;
596
- }
597
- function x(r) {
598
- return r !== void 0 && !(r.value === void 0 && r.writable === void 0);
599
- }
600
- function R(r, e) {
601
- var t = r[e];
602
- if (t !== void 0 && typeof t != "function") throw new TypeError("Expected '" + e + "' to be a function");
603
- return t;
604
- }
605
- function V(r) {
606
- var e = ke(r, "string");
607
- return typeof e == "symbol" ? e : e + "";
608
- }
609
- function ke(r, e) {
610
- if (typeof r != "object" || !r) return r;
611
- var t = r[Symbol.toPrimitive];
612
- if (t !== void 0) {
613
- var n = t.call(r, e);
614
- if (typeof n != "object") return n;
615
- throw new TypeError("@@toPrimitive must return a primitive value.");
616
- }
617
- return (e === "string" ? String : Number)(r);
618
- }
619
- function Ee(r) {
620
- return Pe(r) || Ie(r) || Ae(r) || De();
621
- }
622
- function De() {
623
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
624
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
625
- }
626
- function Ae(r, e) {
627
- if (r) {
628
- if (typeof r == "string") return z(r, e);
629
- var t = {}.toString.call(r).slice(8, -1);
630
- return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? z(r, e) : void 0;
631
- }
632
- }
633
- function z(r, e) {
634
- (e == null || e > r.length) && (e = r.length);
635
- for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t];
636
- return n;
637
- }
638
- function Ie(r) {
639
- if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
640
- }
641
- function Pe(r) {
642
- if (Array.isArray(r)) return r;
643
- }
644
- let Ce = Te([D()], function(r) {
645
- class e {
646
- constructor() {
647
- r(this);
648
- }
649
- }
650
- return {
651
- F: e,
652
- d: [{
653
- kind: "method",
654
- static: !0,
655
- key: "validate",
656
- value: function(n, i, a, o, s) {
657
- const l = a?.get(i?.dataTypeIdentifier?.genericKey), c = a?.get(i?.dataTypeIdentifier?.genericKey)?.sourceDataTypeIdentifiers, p = a?.get(i?.dataTypeIdentifier?.genericKey)?.genericCombinationStrategies;
658
- if (n.__typename != "NodeFunction") return !1;
659
- const d = L(n, s);
660
- if (!d) return !1;
661
- if (i?.dataTypeIdentifier?.genericKey && !l && !o?.getDataType(i.dataTypeIdentifier)) return !0;
662
- if (!(o?.getDataType(i.dataTypeIdentifier) || l) || l && !o?.hasDataTypes(c) || l && (p?.length ?? 0) + 1 != c.length) return !1;
663
- if (d?.parameters?.nodes[0]?.value.__typename === "ReferenceValue") {
664
- if (i?.dataTypeIdentifier?.genericKey && l && c) {
665
- const u = c.map((f) => A(o?.getDataType(f), o?.getDataType((d?.parameters?.nodes[0]?.value).dataTypeIdentifier)));
666
- return u.length > 1 ? u.reduce((f, m, v) => p && p[v - 1].type == k.Or ? f || m : f && m) : u[0];
667
- }
668
- if (i?.dataTypeIdentifier?.dataType)
669
- return A(o?.getDataType(i.dataTypeIdentifier), o?.getDataType(d?.parameters?.nodes[0]?.value?.dataTypeIdentifier));
670
- } else if (d?.parameters?.nodes[0]?.value?.__typename != "NodeFunction") {
671
- if (i?.dataTypeIdentifier?.genericKey && l && c) {
672
- const u = c.map((f) => y(d?.parameters?.nodes[0]?.value, o?.getDataType(f), s, f.genericType.genericMappers));
673
- return u.length > 1 ? u.reduce((f, m, v) => p && p[v - 1].type == k.Or ? f || m : f && m) : u[0];
674
- }
675
- return i?.dataTypeIdentifier?.dataType ? y(d?.parameters?.nodes[0]?.value, o?.getDataType(i.dataTypeIdentifier)) : y(d?.parameters?.nodes[0]?.value, o?.getDataType(i.dataTypeIdentifier), s, E(i.dataTypeIdentifier?.genericType?.genericMappers, a));
676
- }
677
- return !1;
678
- }
679
- }]
680
- };
681
- });
682
- const L = (r, e) => {
683
- if (r.functionDefinition?.runtimeFunctionDefinition?.identifier === "RETURN") return r;
684
- if (e.getNodeById(r.nextNodeId)) {
685
- const t = L(e.getNodeById(r.nextNodeId).json(), e);
686
- if (t) return t;
687
- }
688
- }, $ = /* @__PURE__ */ new Map([[h.Regex, H], [h.NumberRange, W], [h.ItemOfCollection, J], [h.ContainsType, oe], [h.ContainsKey, ve], [h.ReturnType, Ce]]), y = (r, e, t, n) => {
689
- const i = U.c(6), a = X(Fe);
690
- let o;
691
- if (i[0] !== e.rules?.nodes || i[1] !== a || i[2] !== t || i[3] !== n || i[4] !== r) {
692
- const s = new Map(n?.map(_e));
693
- o = e.rules?.nodes?.every((l) => !l || !l.variant || !l.config ? !1 : $.get(l.variant) ? $.get(l.variant)?.validate(r, l.config, s, a, t) : !0) ?? !0, i[0] = e.rules?.nodes, i[1] = a, i[2] = t, i[3] = n, i[4] = r, i[5] = o;
694
- } else
695
- o = i[5];
696
- return o;
697
- };
698
- function _e(r) {
699
- return [r.target, r];
700
- }
701
- class Fe extends B {
702
- //TODO: remove string because of sagittarius types update
703
- getDataType(e) {
704
- if (!e || e.genericKey) return;
705
- const t = e.dataType?.identifier ?? e.genericType?.dataType?.identifier, n = e.dataType?.id ?? e.genericType?.dataType?.id;
706
- return this.values().find((i) => i.identifier == t || i.id == n);
707
- }
708
- getDataTypeFromValue(e, t) {
709
- if (!e) return;
710
- if (e.__typename == "LiteralValue") {
711
- if (Array.isArray(e.value) && Array.from(e.value).length > 0) return this.getDataType({
712
- dataType: {
713
- identifier: "ARRAY"
714
- }
715
- });
716
- if (typeof e.value == "string") return this.getDataType({
717
- dataType: {
718
- identifier: "TEXT"
719
- }
720
- });
721
- if (typeof e.value == "number") return this.getDataType({
722
- dataType: {
723
- identifier: "NUMBER"
724
- }
725
- });
726
- if (typeof e.value == "boolean") return this.getDataType({
727
- dataType: {
728
- identifier: "BOOLEAN"
729
- }
730
- });
731
- }
732
- const n = this.values().filter((i) => i.identifier === "OBJECT" || e.__typename === "NodeFunction" && (i.variant != T.Node || !t) ? !1 : y(e, i, t));
733
- return n[n.length - 1];
734
- }
735
- getTypeFromValue(e, t) {
736
- if (!e) return;
737
- if (e.__typename === "ReferenceValue") return e.dataTypeIdentifier;
738
- const n = this.getDataTypeFromValue(e, t);
739
- if ((n?.genericKeys?.length ?? 0) <= 0 || !n?.genericKeys) return {
740
- dataType: {
741
- id: n?.id
742
- }
743
- };
744
- const i = n.genericKeys.map((o) => {
745
- const s = n.rules?.nodes?.find((l) => "dataTypeIdentifier" in (l?.config ?? {}) && l?.config?.dataTypeIdentifier?.genericKey == o || "inputTypes" in (l?.config ?? {}) && l.config.inputTypes?.some((c) => c.dataTypeIdentifier?.genericKey == o));
746
- return s && s.variant == h.ContainsType && "value" in e && e?.value && n.variant === T.Array ? {
747
- sourceDataTypeIdentifiers: [this.getTypeFromValue({
748
- __typename: "LiteralValue",
749
- value: e.value[0]
750
- }, t)],
751
- target: o
752
- } : s && s.variant == h.ContainsKey && "value" in e && e?.value && n.variant === T.Object ? {
753
- sourceDataTypeIdentifiers: [this.getTypeFromValue({
754
- __typename: "LiteralValue",
755
- /* @ts-ignore */
756
- value: e.value[s.config?.key ?? ""]
757
- }, t)],
758
- target: o
759
- } : s && s.variant == h.ReturnType && n.variant === T.Node ? {
760
- sourceDataTypeIdentifiers: [this.getTypeFromValue(e, t)],
761
- target: o
762
- } : s && s.variant == h.InputType && n.variant === T.Node ? {
763
- sourceDataTypeIdentifiers: [{
764
- genericKey: o
765
- }],
766
- target: o
767
- } : null;
768
- }).filter((o) => !!o), a = i.length > 0 ? {
769
- genericType: {
770
- dataType: {
771
- id: n.id
772
- },
773
- genericMappers: i
774
- }
775
- } : {
776
- dataType: {
777
- id: n.id
778
- }
779
- };
780
- return G(a, this);
781
- }
782
- hasDataTypes(e) {
783
- return e.every((t) => this.values().find((n) => n.id === (t.genericType?.dataType?.id ?? t.dataType?.id)));
784
- }
785
- }
786
- export {
787
- Fe as D,
788
- $ as R,
789
- oe as a,
790
- ve as b,
791
- Ce as c,
792
- y as u
793
- };