Flowfile 0.3.3.2__py3-none-any.whl → 0.3.4.1__py3-none-any.whl

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.

Potentially problematic release.


This version of Flowfile might be problematic. Click here for more details.

Files changed (76) hide show
  1. flowfile/__init__.py +1 -1
  2. flowfile/__main__.py +0 -2
  3. flowfile/api.py +94 -46
  4. flowfile/web/__init__.py +4 -1
  5. flowfile/web/static/assets/{AirbyteReader-2b1cf2d8.js → AirbyteReader-e08044e5.js} +8 -8
  6. flowfile/web/static/assets/{CrossJoin-cc3ab73c.js → CrossJoin-dfcf7351.js} +8 -8
  7. flowfile/web/static/assets/{DatabaseConnectionSettings-307c4652.js → DatabaseConnectionSettings-b2afb1d7.js} +2 -2
  8. flowfile/web/static/assets/{DatabaseManager-69faa6e1.js → DatabaseManager-824a49b2.js} +2 -2
  9. flowfile/web/static/assets/{DatabaseReader-e4134cd0.js → DatabaseReader-a48124d8.js} +9 -9
  10. flowfile/web/static/assets/{DatabaseWriter-d32d75b1.js → DatabaseWriter-b47cbae2.js} +9 -9
  11. flowfile/web/static/assets/{ExploreData-5eb48389.js → ExploreData-fdfc45a4.js} +5 -5
  12. flowfile/web/static/assets/{ExternalSource-29489051.js → ExternalSource-861b0e71.js} +6 -6
  13. flowfile/web/static/assets/{Filter-031332bb.js → Filter-f87bb897.js} +8 -9
  14. flowfile/web/static/assets/{Formula-3b900540.js → Formula-1e2ed720.js} +9 -10
  15. flowfile/web/static/assets/{FuzzyMatch-dee31153.js → FuzzyMatch-b6cc4fdd.js} +9 -9
  16. flowfile/web/static/assets/{GraphSolver-ca74eb47.js → GraphSolver-6a371f4c.js} +5 -5
  17. flowfile/web/static/assets/{GroupBy-081b6591.js → GroupBy-f7b7f472.js} +6 -6
  18. flowfile/web/static/assets/{Join-b467376f.js → Join-eec38203.js} +9 -9
  19. flowfile/web/static/assets/{ManualInput-ffffb80a.js → ManualInput-9aaa46fb.js} +5 -5
  20. flowfile/web/static/assets/{Output-9a87d4ba.js → Output-3b2ca045.js} +4 -4
  21. flowfile/web/static/assets/{Pivot-ee3e6093.js → Pivot-a4f5d88f.js} +6 -6
  22. flowfile/web/static/assets/PolarsCode-49ce444f.js +306 -0
  23. flowfile/web/static/assets/{Read-67fee3a0.js → Read-07acdc9a.js} +6 -6
  24. flowfile/web/static/assets/{RecordCount-a2acd02d.js → RecordCount-6a21da56.js} +5 -5
  25. flowfile/web/static/assets/{RecordId-0c8bcd77.js → RecordId-949bdc17.js} +6 -6
  26. flowfile/web/static/assets/{Sample-60594a3a.js → Sample-7afca6e1.js} +5 -5
  27. flowfile/web/static/assets/{SecretManager-bbcec2ac.js → SecretManager-b41c029d.js} +2 -2
  28. flowfile/web/static/assets/{Select-9540e6ca.js → Select-32b28406.js} +8 -8
  29. flowfile/web/static/assets/{SettingsSection-48f28104.js → SettingsSection-a0f15a05.js} +1 -1
  30. flowfile/web/static/assets/{Sort-6dbe3633.js → Sort-fc6ba0e2.js} +6 -6
  31. flowfile/web/static/assets/{TextToRows-27aab4a8.js → TextToRows-23127596.js} +8 -8
  32. flowfile/web/static/assets/{UnavailableFields-8143044b.js → UnavailableFields-c42880a3.js} +2 -2
  33. flowfile/web/static/assets/{Union-52460248.js → Union-39eecc6c.js} +5 -5
  34. flowfile/web/static/assets/{Unique-f6962644.js → Unique-a0e8fe61.js} +8 -8
  35. flowfile/web/static/assets/{Unpivot-1ff1e938.js → Unpivot-1e2d43f0.js} +5 -5
  36. flowfile/web/static/assets/{api-3b345d92.js → api-44ca9e9c.js} +1 -1
  37. flowfile/web/static/assets/{designer-2394122a.css → designer-186f2e71.css} +64 -9
  38. flowfile/web/static/assets/{designer-4736134f.js → designer-267d44f1.js} +2835 -105
  39. flowfile/web/static/assets/{documentation-b9545eba.js → documentation-6c0810a2.js} +1 -1
  40. flowfile/web/static/assets/{dropDown-d5a4014c.js → dropDown-52790b15.js} +1 -1
  41. flowfile/web/static/assets/{dropDownGeneric-1f4e32ec.js → dropDownGeneric-60f56a8a.js} +2 -2
  42. flowfile/web/static/assets/{fullEditor-f4791c23.js → fullEditor-e272b506.js} +2 -3
  43. flowfile/web/static/assets/{genericNodeSettings-1d456350.js → genericNodeSettings-4bdcf98e.js} +3 -3
  44. flowfile/web/static/assets/{index-f25c9283.js → index-e235a8bc.js} +12 -12
  45. flowfile/web/static/assets/{nodeTitle-cad6fd9d.js → nodeTitle-fc3fc4b7.js} +3 -3
  46. flowfile/web/static/assets/{secretApi-01f07e2c.js → secretApi-cdc2a3fd.js} +1 -1
  47. flowfile/web/static/assets/{selectDynamic-f46a4e3f.js → selectDynamic-96aa82cd.js} +3 -3
  48. flowfile/web/static/assets/{vue-codemirror.esm-eb98fc8b.js → vue-codemirror.esm-25e75a08.js} +610 -29
  49. flowfile/web/static/assets/{vue-content-loader.es-860c0380.js → vue-content-loader.es-6c4b1c24.js} +1 -1
  50. flowfile/web/static/index.html +1 -1
  51. {flowfile-0.3.3.2.dist-info → flowfile-0.3.4.1.dist-info}/METADATA +16 -3
  52. {flowfile-0.3.3.2.dist-info → flowfile-0.3.4.1.dist-info}/RECORD +73 -73
  53. flowfile_core/flowfile/code_generator/__init__.py +0 -0
  54. flowfile_core/flowfile/code_generator/code_generator.py +723 -0
  55. flowfile_core/flowfile/flow_data_engine/flow_data_engine.py +1 -1
  56. flowfile_core/flowfile/flow_data_engine/flow_file_column/main.py +1 -1
  57. flowfile_core/flowfile/{FlowfileFlow.py → flow_graph.py} +3 -3
  58. flowfile_core/flowfile/flow_graph_utils.py +1 -1
  59. flowfile_core/flowfile/handler.py +1 -1
  60. flowfile_core/flowfile/manage/open_flowfile.py +1 -1
  61. flowfile_core/flowfile/util/calculate_layout.py +1 -1
  62. flowfile_core/routes/routes.py +11 -1
  63. flowfile_core/schemas/input_schema.py +2 -1
  64. flowfile_frame/adapters.py +1 -1
  65. flowfile_frame/flow_frame.py +1 -4
  66. flowfile_frame/flow_frame.pyi +1 -1
  67. flowfile_frame/flow_frame_methods.py +1 -1
  68. flowfile_frame/lazy.py +1 -1
  69. flowfile_frame/utils.py +1 -1
  70. flowfile/readme.md +0 -127
  71. flowfile/web/static/assets/PolarsCode-03921254.js +0 -2865
  72. flowfile/web/static/assets/PopOver-3bdf8951.js +0 -577
  73. /flowfile/web/static/assets/{PopOver-bccfde04.css → vue-codemirror-bccfde04.css} +0 -0
  74. {flowfile-0.3.3.2.dist-info → flowfile-0.3.4.1.dist-info}/LICENSE +0 -0
  75. {flowfile-0.3.3.2.dist-info → flowfile-0.3.4.1.dist-info}/WHEEL +0 -0
  76. {flowfile-0.3.3.2.dist-info → flowfile-0.3.4.1.dist-info}/entry_points.txt +0 -0
@@ -1,2865 +0,0 @@
1
- import { C as CodeLoader } from "./vue-content-loader.es-860c0380.js";
2
- import { u as useNodeStore } from "./PopOver-3bdf8951.js";
3
- import { P as Parser, N as NodeSet, b as NodeType, c as DefaultBufferLength, d as NodeProp, e as Tree, I as IterMode, s as styleTags, t as tags, L as LanguageSupport, f as syntaxTree, i as ifNotIn, g as LRLanguage, h as indentNodeProp, j as delimitedIndent, k as foldNodeProp, l as foldInside, m as completeFromList, n as NodeWeakMap, o as snippetCompletion, H as HighlightStyle, p as syntaxHighlighting, q as EditorView, r as keymap, u as acceptCompletion, v as indentMore, E as EditorState, a as autocompletion, T } from "./vue-codemirror.esm-eb98fc8b.js";
4
- import { d as defineComponent, r as ref, X as shallowRef, m as watch, c as openBlock, e as createElementBlock, f as createVNode, u as unref, t as toDisplayString, i as createCommentVNode, w as withCtx, h as createBlock, n as onMounted, R as nextTick, a7 as Teleport } from "./index-f25c9283.js";
5
- import { G as GenericNodeSettings } from "./genericNodeSettings-1d456350.js";
6
- import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cad6fd9d.js";
7
- import "./designer-4736134f.js";
8
- class Stack {
9
- /**
10
- @internal
11
- */
12
- constructor(p, stack, state, reducePos, pos, score, buffer, bufferBase, curContext, lookAhead = 0, parent) {
13
- this.p = p;
14
- this.stack = stack;
15
- this.state = state;
16
- this.reducePos = reducePos;
17
- this.pos = pos;
18
- this.score = score;
19
- this.buffer = buffer;
20
- this.bufferBase = bufferBase;
21
- this.curContext = curContext;
22
- this.lookAhead = lookAhead;
23
- this.parent = parent;
24
- }
25
- /**
26
- @internal
27
- */
28
- toString() {
29
- return `[${this.stack.filter((_, i) => i % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
30
- }
31
- // Start an empty stack
32
- /**
33
- @internal
34
- */
35
- static start(p, state, pos = 0) {
36
- let cx = p.parser.context;
37
- return new Stack(p, [], state, pos, pos, 0, [], 0, cx ? new StackContext(cx, cx.start) : null, 0, null);
38
- }
39
- /**
40
- The stack's current [context](#lr.ContextTracker) value, if
41
- any. Its type will depend on the context tracker's type
42
- parameter, or it will be `null` if there is no context
43
- tracker.
44
- */
45
- get context() {
46
- return this.curContext ? this.curContext.context : null;
47
- }
48
- // Push a state onto the stack, tracking its start position as well
49
- // as the buffer base at that point.
50
- /**
51
- @internal
52
- */
53
- pushState(state, start) {
54
- this.stack.push(this.state, start, this.bufferBase + this.buffer.length);
55
- this.state = state;
56
- }
57
- // Apply a reduce action
58
- /**
59
- @internal
60
- */
61
- reduce(action) {
62
- var _a;
63
- let depth = action >> 19, type = action & 65535;
64
- let { parser: parser2 } = this.p;
65
- let lookaheadRecord = this.reducePos < this.pos - 25;
66
- if (lookaheadRecord)
67
- this.setLookAhead(this.pos);
68
- let dPrec = parser2.dynamicPrecedence(type);
69
- if (dPrec)
70
- this.score += dPrec;
71
- if (depth == 0) {
72
- this.pushState(parser2.getGoto(this.state, type, true), this.reducePos);
73
- if (type < parser2.minRepeatTerm)
74
- this.storeNode(type, this.reducePos, this.reducePos, lookaheadRecord ? 8 : 4, true);
75
- this.reduceContext(type, this.reducePos);
76
- return;
77
- }
78
- let base = this.stack.length - (depth - 1) * 3 - (action & 262144 ? 6 : 0);
79
- let start = base ? this.stack[base - 2] : this.p.ranges[0].from, size = this.reducePos - start;
80
- if (size >= 2e3 && !((_a = this.p.parser.nodeSet.types[type]) === null || _a === void 0 ? void 0 : _a.isAnonymous)) {
81
- if (start == this.p.lastBigReductionStart) {
82
- this.p.bigReductionCount++;
83
- this.p.lastBigReductionSize = size;
84
- } else if (this.p.lastBigReductionSize < size) {
85
- this.p.bigReductionCount = 1;
86
- this.p.lastBigReductionStart = start;
87
- this.p.lastBigReductionSize = size;
88
- }
89
- }
90
- let bufferBase = base ? this.stack[base - 1] : 0, count = this.bufferBase + this.buffer.length - bufferBase;
91
- if (type < parser2.minRepeatTerm || action & 131072) {
92
- let pos = parser2.stateFlag(
93
- this.state,
94
- 1
95
- /* StateFlag.Skipped */
96
- ) ? this.pos : this.reducePos;
97
- this.storeNode(type, start, pos, count + 4, true);
98
- }
99
- if (action & 262144) {
100
- this.state = this.stack[base];
101
- } else {
102
- let baseStateID = this.stack[base - 3];
103
- this.state = parser2.getGoto(baseStateID, type, true);
104
- }
105
- while (this.stack.length > base)
106
- this.stack.pop();
107
- this.reduceContext(type, start);
108
- }
109
- // Shift a value into the buffer
110
- /**
111
- @internal
112
- */
113
- storeNode(term, start, end, size = 4, mustSink = false) {
114
- if (term == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
115
- let cur = this, top = this.buffer.length;
116
- if (top == 0 && cur.parent) {
117
- top = cur.bufferBase - cur.parent.bufferBase;
118
- cur = cur.parent;
119
- }
120
- if (top > 0 && cur.buffer[top - 4] == 0 && cur.buffer[top - 1] > -1) {
121
- if (start == end)
122
- return;
123
- if (cur.buffer[top - 2] >= start) {
124
- cur.buffer[top - 2] = end;
125
- return;
126
- }
127
- }
128
- }
129
- if (!mustSink || this.pos == end) {
130
- this.buffer.push(term, start, end, size);
131
- } else {
132
- let index = this.buffer.length;
133
- if (index > 0 && this.buffer[index - 4] != 0) {
134
- let mustMove = false;
135
- for (let scan = index; scan > 0 && this.buffer[scan - 2] > end; scan -= 4) {
136
- if (this.buffer[scan - 1] >= 0) {
137
- mustMove = true;
138
- break;
139
- }
140
- }
141
- if (mustMove)
142
- while (index > 0 && this.buffer[index - 2] > end) {
143
- this.buffer[index] = this.buffer[index - 4];
144
- this.buffer[index + 1] = this.buffer[index - 3];
145
- this.buffer[index + 2] = this.buffer[index - 2];
146
- this.buffer[index + 3] = this.buffer[index - 1];
147
- index -= 4;
148
- if (size > 4)
149
- size -= 4;
150
- }
151
- }
152
- this.buffer[index] = term;
153
- this.buffer[index + 1] = start;
154
- this.buffer[index + 2] = end;
155
- this.buffer[index + 3] = size;
156
- }
157
- }
158
- // Apply a shift action
159
- /**
160
- @internal
161
- */
162
- shift(action, type, start, end) {
163
- if (action & 131072) {
164
- this.pushState(action & 65535, this.pos);
165
- } else if ((action & 262144) == 0) {
166
- let nextState = action, { parser: parser2 } = this.p;
167
- if (end > this.pos || type <= parser2.maxNode) {
168
- this.pos = end;
169
- if (!parser2.stateFlag(
170
- nextState,
171
- 1
172
- /* StateFlag.Skipped */
173
- ))
174
- this.reducePos = end;
175
- }
176
- this.pushState(nextState, start);
177
- this.shiftContext(type, start);
178
- if (type <= parser2.maxNode)
179
- this.buffer.push(type, start, end, 4);
180
- } else {
181
- this.pos = end;
182
- this.shiftContext(type, start);
183
- if (type <= this.p.parser.maxNode)
184
- this.buffer.push(type, start, end, 4);
185
- }
186
- }
187
- // Apply an action
188
- /**
189
- @internal
190
- */
191
- apply(action, next, nextStart, nextEnd) {
192
- if (action & 65536)
193
- this.reduce(action);
194
- else
195
- this.shift(action, next, nextStart, nextEnd);
196
- }
197
- // Add a prebuilt (reused) node into the buffer.
198
- /**
199
- @internal
200
- */
201
- useNode(value, next) {
202
- let index = this.p.reused.length - 1;
203
- if (index < 0 || this.p.reused[index] != value) {
204
- this.p.reused.push(value);
205
- index++;
206
- }
207
- let start = this.pos;
208
- this.reducePos = this.pos = start + value.length;
209
- this.pushState(next, start);
210
- this.buffer.push(
211
- index,
212
- start,
213
- this.reducePos,
214
- -1
215
- /* size == -1 means this is a reused value */
216
- );
217
- if (this.curContext)
218
- this.updateContext(this.curContext.tracker.reuse(this.curContext.context, value, this, this.p.stream.reset(this.pos - value.length)));
219
- }
220
- // Split the stack. Due to the buffer sharing and the fact
221
- // that `this.stack` tends to stay quite shallow, this isn't very
222
- // expensive.
223
- /**
224
- @internal
225
- */
226
- split() {
227
- let parent = this;
228
- let off = parent.buffer.length;
229
- while (off > 0 && parent.buffer[off - 2] > parent.reducePos)
230
- off -= 4;
231
- let buffer = parent.buffer.slice(off), base = parent.bufferBase + off;
232
- while (parent && base == parent.bufferBase)
233
- parent = parent.parent;
234
- return new Stack(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, buffer, base, this.curContext, this.lookAhead, parent);
235
- }
236
- // Try to recover from an error by 'deleting' (ignoring) one token.
237
- /**
238
- @internal
239
- */
240
- recoverByDelete(next, nextEnd) {
241
- let isNode = next <= this.p.parser.maxNode;
242
- if (isNode)
243
- this.storeNode(next, this.pos, nextEnd, 4);
244
- this.storeNode(0, this.pos, nextEnd, isNode ? 8 : 4);
245
- this.pos = this.reducePos = nextEnd;
246
- this.score -= 190;
247
- }
248
- /**
249
- Check if the given term would be able to be shifted (optionally
250
- after some reductions) on this stack. This can be useful for
251
- external tokenizers that want to make sure they only provide a
252
- given token when it applies.
253
- */
254
- canShift(term) {
255
- for (let sim = new SimulatedStack(this); ; ) {
256
- let action = this.p.parser.stateSlot(
257
- sim.state,
258
- 4
259
- /* ParseState.DefaultReduce */
260
- ) || this.p.parser.hasAction(sim.state, term);
261
- if (action == 0)
262
- return false;
263
- if ((action & 65536) == 0)
264
- return true;
265
- sim.reduce(action);
266
- }
267
- }
268
- // Apply up to Recover.MaxNext recovery actions that conceptually
269
- // inserts some missing token or rule.
270
- /**
271
- @internal
272
- */
273
- recoverByInsert(next) {
274
- if (this.stack.length >= 300)
275
- return [];
276
- let nextStates = this.p.parser.nextStates(this.state);
277
- if (nextStates.length > 4 << 1 || this.stack.length >= 120) {
278
- let best = [];
279
- for (let i = 0, s; i < nextStates.length; i += 2) {
280
- if ((s = nextStates[i + 1]) != this.state && this.p.parser.hasAction(s, next))
281
- best.push(nextStates[i], s);
282
- }
283
- if (this.stack.length < 120)
284
- for (let i = 0; best.length < 4 << 1 && i < nextStates.length; i += 2) {
285
- let s = nextStates[i + 1];
286
- if (!best.some((v, i2) => i2 & 1 && v == s))
287
- best.push(nextStates[i], s);
288
- }
289
- nextStates = best;
290
- }
291
- let result = [];
292
- for (let i = 0; i < nextStates.length && result.length < 4; i += 2) {
293
- let s = nextStates[i + 1];
294
- if (s == this.state)
295
- continue;
296
- let stack = this.split();
297
- stack.pushState(s, this.pos);
298
- stack.storeNode(0, stack.pos, stack.pos, 4, true);
299
- stack.shiftContext(nextStates[i], this.pos);
300
- stack.reducePos = this.pos;
301
- stack.score -= 200;
302
- result.push(stack);
303
- }
304
- return result;
305
- }
306
- // Force a reduce, if possible. Return false if that can't
307
- // be done.
308
- /**
309
- @internal
310
- */
311
- forceReduce() {
312
- let { parser: parser2 } = this.p;
313
- let reduce = parser2.stateSlot(
314
- this.state,
315
- 5
316
- /* ParseState.ForcedReduce */
317
- );
318
- if ((reduce & 65536) == 0)
319
- return false;
320
- if (!parser2.validAction(this.state, reduce)) {
321
- let depth = reduce >> 19, term = reduce & 65535;
322
- let target = this.stack.length - depth * 3;
323
- if (target < 0 || parser2.getGoto(this.stack[target], term, false) < 0) {
324
- let backup = this.findForcedReduction();
325
- if (backup == null)
326
- return false;
327
- reduce = backup;
328
- }
329
- this.storeNode(0, this.pos, this.pos, 4, true);
330
- this.score -= 100;
331
- }
332
- this.reducePos = this.pos;
333
- this.reduce(reduce);
334
- return true;
335
- }
336
- /**
337
- Try to scan through the automaton to find some kind of reduction
338
- that can be applied. Used when the regular ForcedReduce field
339
- isn't a valid action. @internal
340
- */
341
- findForcedReduction() {
342
- let { parser: parser2 } = this.p, seen = [];
343
- let explore = (state, depth) => {
344
- if (seen.includes(state))
345
- return;
346
- seen.push(state);
347
- return parser2.allActions(state, (action) => {
348
- if (action & (262144 | 131072))
349
- ;
350
- else if (action & 65536) {
351
- let rDepth = (action >> 19) - depth;
352
- if (rDepth > 1) {
353
- let term = action & 65535, target = this.stack.length - rDepth * 3;
354
- if (target >= 0 && parser2.getGoto(this.stack[target], term, false) >= 0)
355
- return rDepth << 19 | 65536 | term;
356
- }
357
- } else {
358
- let found = explore(action, depth + 1);
359
- if (found != null)
360
- return found;
361
- }
362
- });
363
- };
364
- return explore(this.state, 0);
365
- }
366
- /**
367
- @internal
368
- */
369
- forceAll() {
370
- while (!this.p.parser.stateFlag(
371
- this.state,
372
- 2
373
- /* StateFlag.Accepting */
374
- )) {
375
- if (!this.forceReduce()) {
376
- this.storeNode(0, this.pos, this.pos, 4, true);
377
- break;
378
- }
379
- }
380
- return this;
381
- }
382
- /**
383
- Check whether this state has no further actions (assumed to be a direct descendant of the
384
- top state, since any other states must be able to continue
385
- somehow). @internal
386
- */
387
- get deadEnd() {
388
- if (this.stack.length != 3)
389
- return false;
390
- let { parser: parser2 } = this.p;
391
- return parser2.data[parser2.stateSlot(
392
- this.state,
393
- 1
394
- /* ParseState.Actions */
395
- )] == 65535 && !parser2.stateSlot(
396
- this.state,
397
- 4
398
- /* ParseState.DefaultReduce */
399
- );
400
- }
401
- /**
402
- Restart the stack (put it back in its start state). Only safe
403
- when this.stack.length == 3 (state is directly below the top
404
- state). @internal
405
- */
406
- restart() {
407
- this.storeNode(0, this.pos, this.pos, 4, true);
408
- this.state = this.stack[0];
409
- this.stack.length = 0;
410
- }
411
- /**
412
- @internal
413
- */
414
- sameState(other) {
415
- if (this.state != other.state || this.stack.length != other.stack.length)
416
- return false;
417
- for (let i = 0; i < this.stack.length; i += 3)
418
- if (this.stack[i] != other.stack[i])
419
- return false;
420
- return true;
421
- }
422
- /**
423
- Get the parser used by this stack.
424
- */
425
- get parser() {
426
- return this.p.parser;
427
- }
428
- /**
429
- Test whether a given dialect (by numeric ID, as exported from
430
- the terms file) is enabled.
431
- */
432
- dialectEnabled(dialectID) {
433
- return this.p.parser.dialect.flags[dialectID];
434
- }
435
- shiftContext(term, start) {
436
- if (this.curContext)
437
- this.updateContext(this.curContext.tracker.shift(this.curContext.context, term, this, this.p.stream.reset(start)));
438
- }
439
- reduceContext(term, start) {
440
- if (this.curContext)
441
- this.updateContext(this.curContext.tracker.reduce(this.curContext.context, term, this, this.p.stream.reset(start)));
442
- }
443
- /**
444
- @internal
445
- */
446
- emitContext() {
447
- let last = this.buffer.length - 1;
448
- if (last < 0 || this.buffer[last] != -3)
449
- this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
450
- }
451
- /**
452
- @internal
453
- */
454
- emitLookAhead() {
455
- let last = this.buffer.length - 1;
456
- if (last < 0 || this.buffer[last] != -4)
457
- this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
458
- }
459
- updateContext(context) {
460
- if (context != this.curContext.context) {
461
- let newCx = new StackContext(this.curContext.tracker, context);
462
- if (newCx.hash != this.curContext.hash)
463
- this.emitContext();
464
- this.curContext = newCx;
465
- }
466
- }
467
- /**
468
- @internal
469
- */
470
- setLookAhead(lookAhead) {
471
- if (lookAhead > this.lookAhead) {
472
- this.emitLookAhead();
473
- this.lookAhead = lookAhead;
474
- }
475
- }
476
- /**
477
- @internal
478
- */
479
- close() {
480
- if (this.curContext && this.curContext.tracker.strict)
481
- this.emitContext();
482
- if (this.lookAhead > 0)
483
- this.emitLookAhead();
484
- }
485
- }
486
- class StackContext {
487
- constructor(tracker, context) {
488
- this.tracker = tracker;
489
- this.context = context;
490
- this.hash = tracker.strict ? tracker.hash(context) : 0;
491
- }
492
- }
493
- class SimulatedStack {
494
- constructor(start) {
495
- this.start = start;
496
- this.state = start.state;
497
- this.stack = start.stack;
498
- this.base = this.stack.length;
499
- }
500
- reduce(action) {
501
- let term = action & 65535, depth = action >> 19;
502
- if (depth == 0) {
503
- if (this.stack == this.start.stack)
504
- this.stack = this.stack.slice();
505
- this.stack.push(this.state, 0, 0);
506
- this.base += 3;
507
- } else {
508
- this.base -= (depth - 1) * 3;
509
- }
510
- let goto = this.start.p.parser.getGoto(this.stack[this.base - 3], term, true);
511
- this.state = goto;
512
- }
513
- }
514
- class StackBufferCursor {
515
- constructor(stack, pos, index) {
516
- this.stack = stack;
517
- this.pos = pos;
518
- this.index = index;
519
- this.buffer = stack.buffer;
520
- if (this.index == 0)
521
- this.maybeNext();
522
- }
523
- static create(stack, pos = stack.bufferBase + stack.buffer.length) {
524
- return new StackBufferCursor(stack, pos, pos - stack.bufferBase);
525
- }
526
- maybeNext() {
527
- let next = this.stack.parent;
528
- if (next != null) {
529
- this.index = this.stack.bufferBase - next.bufferBase;
530
- this.stack = next;
531
- this.buffer = next.buffer;
532
- }
533
- }
534
- get id() {
535
- return this.buffer[this.index - 4];
536
- }
537
- get start() {
538
- return this.buffer[this.index - 3];
539
- }
540
- get end() {
541
- return this.buffer[this.index - 2];
542
- }
543
- get size() {
544
- return this.buffer[this.index - 1];
545
- }
546
- next() {
547
- this.index -= 4;
548
- this.pos -= 4;
549
- if (this.index == 0)
550
- this.maybeNext();
551
- }
552
- fork() {
553
- return new StackBufferCursor(this.stack, this.pos, this.index);
554
- }
555
- }
556
- function decodeArray(input, Type = Uint16Array) {
557
- if (typeof input != "string")
558
- return input;
559
- let array = null;
560
- for (let pos = 0, out = 0; pos < input.length; ) {
561
- let value = 0;
562
- for (; ; ) {
563
- let next = input.charCodeAt(pos++), stop = false;
564
- if (next == 126) {
565
- value = 65535;
566
- break;
567
- }
568
- if (next >= 92)
569
- next--;
570
- if (next >= 34)
571
- next--;
572
- let digit = next - 32;
573
- if (digit >= 46) {
574
- digit -= 46;
575
- stop = true;
576
- }
577
- value += digit;
578
- if (stop)
579
- break;
580
- value *= 46;
581
- }
582
- if (array)
583
- array[out++] = value;
584
- else
585
- array = new Type(value);
586
- }
587
- return array;
588
- }
589
- class CachedToken {
590
- constructor() {
591
- this.start = -1;
592
- this.value = -1;
593
- this.end = -1;
594
- this.extended = -1;
595
- this.lookAhead = 0;
596
- this.mask = 0;
597
- this.context = 0;
598
- }
599
- }
600
- const nullToken = new CachedToken();
601
- class InputStream {
602
- /**
603
- @internal
604
- */
605
- constructor(input, ranges) {
606
- this.input = input;
607
- this.ranges = ranges;
608
- this.chunk = "";
609
- this.chunkOff = 0;
610
- this.chunk2 = "";
611
- this.chunk2Pos = 0;
612
- this.next = -1;
613
- this.token = nullToken;
614
- this.rangeIndex = 0;
615
- this.pos = this.chunkPos = ranges[0].from;
616
- this.range = ranges[0];
617
- this.end = ranges[ranges.length - 1].to;
618
- this.readNext();
619
- }
620
- /**
621
- @internal
622
- */
623
- resolveOffset(offset, assoc) {
624
- let range = this.range, index = this.rangeIndex;
625
- let pos = this.pos + offset;
626
- while (pos < range.from) {
627
- if (!index)
628
- return null;
629
- let next = this.ranges[--index];
630
- pos -= range.from - next.to;
631
- range = next;
632
- }
633
- while (assoc < 0 ? pos > range.to : pos >= range.to) {
634
- if (index == this.ranges.length - 1)
635
- return null;
636
- let next = this.ranges[++index];
637
- pos += next.from - range.to;
638
- range = next;
639
- }
640
- return pos;
641
- }
642
- /**
643
- @internal
644
- */
645
- clipPos(pos) {
646
- if (pos >= this.range.from && pos < this.range.to)
647
- return pos;
648
- for (let range of this.ranges)
649
- if (range.to > pos)
650
- return Math.max(pos, range.from);
651
- return this.end;
652
- }
653
- /**
654
- Look at a code unit near the stream position. `.peek(0)` equals
655
- `.next`, `.peek(-1)` gives you the previous character, and so
656
- on.
657
-
658
- Note that looking around during tokenizing creates dependencies
659
- on potentially far-away content, which may reduce the
660
- effectiveness incremental parsing—when looking forward—or even
661
- cause invalid reparses when looking backward more than 25 code
662
- units, since the library does not track lookbehind.
663
- */
664
- peek(offset) {
665
- let idx = this.chunkOff + offset, pos, result;
666
- if (idx >= 0 && idx < this.chunk.length) {
667
- pos = this.pos + offset;
668
- result = this.chunk.charCodeAt(idx);
669
- } else {
670
- let resolved = this.resolveOffset(offset, 1);
671
- if (resolved == null)
672
- return -1;
673
- pos = resolved;
674
- if (pos >= this.chunk2Pos && pos < this.chunk2Pos + this.chunk2.length) {
675
- result = this.chunk2.charCodeAt(pos - this.chunk2Pos);
676
- } else {
677
- let i = this.rangeIndex, range = this.range;
678
- while (range.to <= pos)
679
- range = this.ranges[++i];
680
- this.chunk2 = this.input.chunk(this.chunk2Pos = pos);
681
- if (pos + this.chunk2.length > range.to)
682
- this.chunk2 = this.chunk2.slice(0, range.to - pos);
683
- result = this.chunk2.charCodeAt(0);
684
- }
685
- }
686
- if (pos >= this.token.lookAhead)
687
- this.token.lookAhead = pos + 1;
688
- return result;
689
- }
690
- /**
691
- Accept a token. By default, the end of the token is set to the
692
- current stream position, but you can pass an offset (relative to
693
- the stream position) to change that.
694
- */
695
- acceptToken(token, endOffset = 0) {
696
- let end = endOffset ? this.resolveOffset(endOffset, -1) : this.pos;
697
- if (end == null || end < this.token.start)
698
- throw new RangeError("Token end out of bounds");
699
- this.token.value = token;
700
- this.token.end = end;
701
- }
702
- /**
703
- Accept a token ending at a specific given position.
704
- */
705
- acceptTokenTo(token, endPos) {
706
- this.token.value = token;
707
- this.token.end = endPos;
708
- }
709
- getChunk() {
710
- if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
711
- let { chunk, chunkPos } = this;
712
- this.chunk = this.chunk2;
713
- this.chunkPos = this.chunk2Pos;
714
- this.chunk2 = chunk;
715
- this.chunk2Pos = chunkPos;
716
- this.chunkOff = this.pos - this.chunkPos;
717
- } else {
718
- this.chunk2 = this.chunk;
719
- this.chunk2Pos = this.chunkPos;
720
- let nextChunk = this.input.chunk(this.pos);
721
- let end = this.pos + nextChunk.length;
722
- this.chunk = end > this.range.to ? nextChunk.slice(0, this.range.to - this.pos) : nextChunk;
723
- this.chunkPos = this.pos;
724
- this.chunkOff = 0;
725
- }
726
- }
727
- readNext() {
728
- if (this.chunkOff >= this.chunk.length) {
729
- this.getChunk();
730
- if (this.chunkOff == this.chunk.length)
731
- return this.next = -1;
732
- }
733
- return this.next = this.chunk.charCodeAt(this.chunkOff);
734
- }
735
- /**
736
- Move the stream forward N (defaults to 1) code units. Returns
737
- the new value of [`next`](#lr.InputStream.next).
738
- */
739
- advance(n = 1) {
740
- this.chunkOff += n;
741
- while (this.pos + n >= this.range.to) {
742
- if (this.rangeIndex == this.ranges.length - 1)
743
- return this.setDone();
744
- n -= this.range.to - this.pos;
745
- this.range = this.ranges[++this.rangeIndex];
746
- this.pos = this.range.from;
747
- }
748
- this.pos += n;
749
- if (this.pos >= this.token.lookAhead)
750
- this.token.lookAhead = this.pos + 1;
751
- return this.readNext();
752
- }
753
- setDone() {
754
- this.pos = this.chunkPos = this.end;
755
- this.range = this.ranges[this.rangeIndex = this.ranges.length - 1];
756
- this.chunk = "";
757
- return this.next = -1;
758
- }
759
- /**
760
- @internal
761
- */
762
- reset(pos, token) {
763
- if (token) {
764
- this.token = token;
765
- token.start = pos;
766
- token.lookAhead = pos + 1;
767
- token.value = token.extended = -1;
768
- } else {
769
- this.token = nullToken;
770
- }
771
- if (this.pos != pos) {
772
- this.pos = pos;
773
- if (pos == this.end) {
774
- this.setDone();
775
- return this;
776
- }
777
- while (pos < this.range.from)
778
- this.range = this.ranges[--this.rangeIndex];
779
- while (pos >= this.range.to)
780
- this.range = this.ranges[++this.rangeIndex];
781
- if (pos >= this.chunkPos && pos < this.chunkPos + this.chunk.length) {
782
- this.chunkOff = pos - this.chunkPos;
783
- } else {
784
- this.chunk = "";
785
- this.chunkOff = 0;
786
- }
787
- this.readNext();
788
- }
789
- return this;
790
- }
791
- /**
792
- @internal
793
- */
794
- read(from, to) {
795
- if (from >= this.chunkPos && to <= this.chunkPos + this.chunk.length)
796
- return this.chunk.slice(from - this.chunkPos, to - this.chunkPos);
797
- if (from >= this.chunk2Pos && to <= this.chunk2Pos + this.chunk2.length)
798
- return this.chunk2.slice(from - this.chunk2Pos, to - this.chunk2Pos);
799
- if (from >= this.range.from && to <= this.range.to)
800
- return this.input.read(from, to);
801
- let result = "";
802
- for (let r of this.ranges) {
803
- if (r.from >= to)
804
- break;
805
- if (r.to > from)
806
- result += this.input.read(Math.max(r.from, from), Math.min(r.to, to));
807
- }
808
- return result;
809
- }
810
- }
811
- class TokenGroup {
812
- constructor(data, id2) {
813
- this.data = data;
814
- this.id = id2;
815
- }
816
- token(input, stack) {
817
- let { parser: parser2 } = stack.p;
818
- readToken(this.data, input, stack, this.id, parser2.data, parser2.tokenPrecTable);
819
- }
820
- }
821
- TokenGroup.prototype.contextual = TokenGroup.prototype.fallback = TokenGroup.prototype.extend = false;
822
- TokenGroup.prototype.fallback = TokenGroup.prototype.extend = false;
823
- class ExternalTokenizer {
824
- /**
825
- Create a tokenizer. The first argument is the function that,
826
- given an input stream, scans for the types of tokens it
827
- recognizes at the stream's position, and calls
828
- [`acceptToken`](#lr.InputStream.acceptToken) when it finds
829
- one.
830
- */
831
- constructor(token, options = {}) {
832
- this.token = token;
833
- this.contextual = !!options.contextual;
834
- this.fallback = !!options.fallback;
835
- this.extend = !!options.extend;
836
- }
837
- }
838
- function readToken(data, input, stack, group, precTable, precOffset) {
839
- let state = 0, groupMask = 1 << group, { dialect } = stack.p.parser;
840
- scan:
841
- for (; ; ) {
842
- if ((groupMask & data[state]) == 0)
843
- break;
844
- let accEnd = data[state + 1];
845
- for (let i = state + 3; i < accEnd; i += 2)
846
- if ((data[i + 1] & groupMask) > 0) {
847
- let term = data[i];
848
- if (dialect.allows(term) && (input.token.value == -1 || input.token.value == term || overrides(term, input.token.value, precTable, precOffset))) {
849
- input.acceptToken(term);
850
- break;
851
- }
852
- }
853
- let next = input.next, low = 0, high = data[state + 2];
854
- if (input.next < 0 && high > low && data[accEnd + high * 3 - 3] == 65535) {
855
- state = data[accEnd + high * 3 - 1];
856
- continue scan;
857
- }
858
- for (; low < high; ) {
859
- let mid = low + high >> 1;
860
- let index = accEnd + mid + (mid << 1);
861
- let from = data[index], to = data[index + 1] || 65536;
862
- if (next < from)
863
- high = mid;
864
- else if (next >= to)
865
- low = mid + 1;
866
- else {
867
- state = data[index + 2];
868
- input.advance();
869
- continue scan;
870
- }
871
- }
872
- break;
873
- }
874
- }
875
- function findOffset(data, start, term) {
876
- for (let i = start, next; (next = data[i]) != 65535; i++)
877
- if (next == term)
878
- return i - start;
879
- return -1;
880
- }
881
- function overrides(token, prev, tableData, tableOffset) {
882
- let iPrev = findOffset(tableData, tableOffset, prev);
883
- return iPrev < 0 || findOffset(tableData, tableOffset, token) < iPrev;
884
- }
885
- const verbose = typeof process != "undefined" && process.env && /\bparse\b/.test({}.LOG);
886
- let stackIDs = null;
887
- function cutAt(tree, pos, side) {
888
- let cursor2 = tree.cursor(IterMode.IncludeAnonymous);
889
- cursor2.moveTo(pos);
890
- for (; ; ) {
891
- if (!(side < 0 ? cursor2.childBefore(pos) : cursor2.childAfter(pos)))
892
- for (; ; ) {
893
- if ((side < 0 ? cursor2.to < pos : cursor2.from > pos) && !cursor2.type.isError)
894
- return side < 0 ? Math.max(0, Math.min(
895
- cursor2.to - 1,
896
- pos - 25
897
- /* Lookahead.Margin */
898
- )) : Math.min(tree.length, Math.max(
899
- cursor2.from + 1,
900
- pos + 25
901
- /* Lookahead.Margin */
902
- ));
903
- if (side < 0 ? cursor2.prevSibling() : cursor2.nextSibling())
904
- break;
905
- if (!cursor2.parent())
906
- return side < 0 ? 0 : tree.length;
907
- }
908
- }
909
- }
910
- class FragmentCursor {
911
- constructor(fragments, nodeSet) {
912
- this.fragments = fragments;
913
- this.nodeSet = nodeSet;
914
- this.i = 0;
915
- this.fragment = null;
916
- this.safeFrom = -1;
917
- this.safeTo = -1;
918
- this.trees = [];
919
- this.start = [];
920
- this.index = [];
921
- this.nextFragment();
922
- }
923
- nextFragment() {
924
- let fr = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
925
- if (fr) {
926
- this.safeFrom = fr.openStart ? cutAt(fr.tree, fr.from + fr.offset, 1) - fr.offset : fr.from;
927
- this.safeTo = fr.openEnd ? cutAt(fr.tree, fr.to + fr.offset, -1) - fr.offset : fr.to;
928
- while (this.trees.length) {
929
- this.trees.pop();
930
- this.start.pop();
931
- this.index.pop();
932
- }
933
- this.trees.push(fr.tree);
934
- this.start.push(-fr.offset);
935
- this.index.push(0);
936
- this.nextStart = this.safeFrom;
937
- } else {
938
- this.nextStart = 1e9;
939
- }
940
- }
941
- // `pos` must be >= any previously given `pos` for this cursor
942
- nodeAt(pos) {
943
- if (pos < this.nextStart)
944
- return null;
945
- while (this.fragment && this.safeTo <= pos)
946
- this.nextFragment();
947
- if (!this.fragment)
948
- return null;
949
- for (; ; ) {
950
- let last = this.trees.length - 1;
951
- if (last < 0) {
952
- this.nextFragment();
953
- return null;
954
- }
955
- let top = this.trees[last], index = this.index[last];
956
- if (index == top.children.length) {
957
- this.trees.pop();
958
- this.start.pop();
959
- this.index.pop();
960
- continue;
961
- }
962
- let next = top.children[index];
963
- let start = this.start[last] + top.positions[index];
964
- if (start > pos) {
965
- this.nextStart = start;
966
- return null;
967
- }
968
- if (next instanceof Tree) {
969
- if (start == pos) {
970
- if (start < this.safeFrom)
971
- return null;
972
- let end = start + next.length;
973
- if (end <= this.safeTo) {
974
- let lookAhead = next.prop(NodeProp.lookAhead);
975
- if (!lookAhead || end + lookAhead < this.fragment.to)
976
- return next;
977
- }
978
- }
979
- this.index[last]++;
980
- if (start + next.length >= Math.max(this.safeFrom, pos)) {
981
- this.trees.push(next);
982
- this.start.push(start);
983
- this.index.push(0);
984
- }
985
- } else {
986
- this.index[last]++;
987
- this.nextStart = start + next.length;
988
- }
989
- }
990
- }
991
- }
992
- class TokenCache {
993
- constructor(parser2, stream) {
994
- this.stream = stream;
995
- this.tokens = [];
996
- this.mainToken = null;
997
- this.actions = [];
998
- this.tokens = parser2.tokenizers.map((_) => new CachedToken());
999
- }
1000
- getActions(stack) {
1001
- let actionIndex = 0;
1002
- let main = null;
1003
- let { parser: parser2 } = stack.p, { tokenizers } = parser2;
1004
- let mask = parser2.stateSlot(
1005
- stack.state,
1006
- 3
1007
- /* ParseState.TokenizerMask */
1008
- );
1009
- let context = stack.curContext ? stack.curContext.hash : 0;
1010
- let lookAhead = 0;
1011
- for (let i = 0; i < tokenizers.length; i++) {
1012
- if ((1 << i & mask) == 0)
1013
- continue;
1014
- let tokenizer = tokenizers[i], token = this.tokens[i];
1015
- if (main && !tokenizer.fallback)
1016
- continue;
1017
- if (tokenizer.contextual || token.start != stack.pos || token.mask != mask || token.context != context) {
1018
- this.updateCachedToken(token, tokenizer, stack);
1019
- token.mask = mask;
1020
- token.context = context;
1021
- }
1022
- if (token.lookAhead > token.end + 25)
1023
- lookAhead = Math.max(token.lookAhead, lookAhead);
1024
- if (token.value != 0) {
1025
- let startIndex = actionIndex;
1026
- if (token.extended > -1)
1027
- actionIndex = this.addActions(stack, token.extended, token.end, actionIndex);
1028
- actionIndex = this.addActions(stack, token.value, token.end, actionIndex);
1029
- if (!tokenizer.extend) {
1030
- main = token;
1031
- if (actionIndex > startIndex)
1032
- break;
1033
- }
1034
- }
1035
- }
1036
- while (this.actions.length > actionIndex)
1037
- this.actions.pop();
1038
- if (lookAhead)
1039
- stack.setLookAhead(lookAhead);
1040
- if (!main && stack.pos == this.stream.end) {
1041
- main = new CachedToken();
1042
- main.value = stack.p.parser.eofTerm;
1043
- main.start = main.end = stack.pos;
1044
- actionIndex = this.addActions(stack, main.value, main.end, actionIndex);
1045
- }
1046
- this.mainToken = main;
1047
- return this.actions;
1048
- }
1049
- getMainToken(stack) {
1050
- if (this.mainToken)
1051
- return this.mainToken;
1052
- let main = new CachedToken(), { pos, p } = stack;
1053
- main.start = pos;
1054
- main.end = Math.min(pos + 1, p.stream.end);
1055
- main.value = pos == p.stream.end ? p.parser.eofTerm : 0;
1056
- return main;
1057
- }
1058
- updateCachedToken(token, tokenizer, stack) {
1059
- let start = this.stream.clipPos(stack.pos);
1060
- tokenizer.token(this.stream.reset(start, token), stack);
1061
- if (token.value > -1) {
1062
- let { parser: parser2 } = stack.p;
1063
- for (let i = 0; i < parser2.specialized.length; i++)
1064
- if (parser2.specialized[i] == token.value) {
1065
- let result = parser2.specializers[i](this.stream.read(token.start, token.end), stack);
1066
- if (result >= 0 && stack.p.parser.dialect.allows(result >> 1)) {
1067
- if ((result & 1) == 0)
1068
- token.value = result >> 1;
1069
- else
1070
- token.extended = result >> 1;
1071
- break;
1072
- }
1073
- }
1074
- } else {
1075
- token.value = 0;
1076
- token.end = this.stream.clipPos(start + 1);
1077
- }
1078
- }
1079
- putAction(action, token, end, index) {
1080
- for (let i = 0; i < index; i += 3)
1081
- if (this.actions[i] == action)
1082
- return index;
1083
- this.actions[index++] = action;
1084
- this.actions[index++] = token;
1085
- this.actions[index++] = end;
1086
- return index;
1087
- }
1088
- addActions(stack, token, end, index) {
1089
- let { state } = stack, { parser: parser2 } = stack.p, { data } = parser2;
1090
- for (let set = 0; set < 2; set++) {
1091
- for (let i = parser2.stateSlot(
1092
- state,
1093
- set ? 2 : 1
1094
- /* ParseState.Actions */
1095
- ); ; i += 3) {
1096
- if (data[i] == 65535) {
1097
- if (data[i + 1] == 1) {
1098
- i = pair(data, i + 2);
1099
- } else {
1100
- if (index == 0 && data[i + 1] == 2)
1101
- index = this.putAction(pair(data, i + 2), token, end, index);
1102
- break;
1103
- }
1104
- }
1105
- if (data[i] == token)
1106
- index = this.putAction(pair(data, i + 1), token, end, index);
1107
- }
1108
- }
1109
- return index;
1110
- }
1111
- }
1112
- class Parse {
1113
- constructor(parser2, input, fragments, ranges) {
1114
- this.parser = parser2;
1115
- this.input = input;
1116
- this.ranges = ranges;
1117
- this.recovering = 0;
1118
- this.nextStackID = 9812;
1119
- this.minStackPos = 0;
1120
- this.reused = [];
1121
- this.stoppedAt = null;
1122
- this.lastBigReductionStart = -1;
1123
- this.lastBigReductionSize = 0;
1124
- this.bigReductionCount = 0;
1125
- this.stream = new InputStream(input, ranges);
1126
- this.tokens = new TokenCache(parser2, this.stream);
1127
- this.topTerm = parser2.top[1];
1128
- let { from } = ranges[0];
1129
- this.stacks = [Stack.start(this, parser2.top[0], from)];
1130
- this.fragments = fragments.length && this.stream.end - from > parser2.bufferLength * 4 ? new FragmentCursor(fragments, parser2.nodeSet) : null;
1131
- }
1132
- get parsedPos() {
1133
- return this.minStackPos;
1134
- }
1135
- // Move the parser forward. This will process all parse stacks at
1136
- // `this.pos` and try to advance them to a further position. If no
1137
- // stack for such a position is found, it'll start error-recovery.
1138
- //
1139
- // When the parse is finished, this will return a syntax tree. When
1140
- // not, it returns `null`.
1141
- advance() {
1142
- let stacks = this.stacks, pos = this.minStackPos;
1143
- let newStacks = this.stacks = [];
1144
- let stopped, stoppedTokens;
1145
- if (this.bigReductionCount > 300 && stacks.length == 1) {
1146
- let [s] = stacks;
1147
- while (s.forceReduce() && s.stack.length && s.stack[s.stack.length - 2] >= this.lastBigReductionStart) {
1148
- }
1149
- this.bigReductionCount = this.lastBigReductionSize = 0;
1150
- }
1151
- for (let i = 0; i < stacks.length; i++) {
1152
- let stack = stacks[i];
1153
- for (; ; ) {
1154
- this.tokens.mainToken = null;
1155
- if (stack.pos > pos) {
1156
- newStacks.push(stack);
1157
- } else if (this.advanceStack(stack, newStacks, stacks)) {
1158
- continue;
1159
- } else {
1160
- if (!stopped) {
1161
- stopped = [];
1162
- stoppedTokens = [];
1163
- }
1164
- stopped.push(stack);
1165
- let tok = this.tokens.getMainToken(stack);
1166
- stoppedTokens.push(tok.value, tok.end);
1167
- }
1168
- break;
1169
- }
1170
- }
1171
- if (!newStacks.length) {
1172
- let finished = stopped && findFinished(stopped);
1173
- if (finished) {
1174
- if (verbose)
1175
- console.log("Finish with " + this.stackID(finished));
1176
- return this.stackToTree(finished);
1177
- }
1178
- if (this.parser.strict) {
1179
- if (verbose && stopped)
1180
- console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none"));
1181
- throw new SyntaxError("No parse at " + pos);
1182
- }
1183
- if (!this.recovering)
1184
- this.recovering = 5;
1185
- }
1186
- if (this.recovering && stopped) {
1187
- let finished = this.stoppedAt != null && stopped[0].pos > this.stoppedAt ? stopped[0] : this.runRecovery(stopped, stoppedTokens, newStacks);
1188
- if (finished) {
1189
- if (verbose)
1190
- console.log("Force-finish " + this.stackID(finished));
1191
- return this.stackToTree(finished.forceAll());
1192
- }
1193
- }
1194
- if (this.recovering) {
1195
- let maxRemaining = this.recovering == 1 ? 1 : this.recovering * 3;
1196
- if (newStacks.length > maxRemaining) {
1197
- newStacks.sort((a, b) => b.score - a.score);
1198
- while (newStacks.length > maxRemaining)
1199
- newStacks.pop();
1200
- }
1201
- if (newStacks.some((s) => s.reducePos > pos))
1202
- this.recovering--;
1203
- } else if (newStacks.length > 1) {
1204
- outer:
1205
- for (let i = 0; i < newStacks.length - 1; i++) {
1206
- let stack = newStacks[i];
1207
- for (let j = i + 1; j < newStacks.length; j++) {
1208
- let other = newStacks[j];
1209
- if (stack.sameState(other) || stack.buffer.length > 500 && other.buffer.length > 500) {
1210
- if ((stack.score - other.score || stack.buffer.length - other.buffer.length) > 0) {
1211
- newStacks.splice(j--, 1);
1212
- } else {
1213
- newStacks.splice(i--, 1);
1214
- continue outer;
1215
- }
1216
- }
1217
- }
1218
- }
1219
- if (newStacks.length > 12)
1220
- newStacks.splice(
1221
- 12,
1222
- newStacks.length - 12
1223
- /* Rec.MaxStackCount */
1224
- );
1225
- }
1226
- this.minStackPos = newStacks[0].pos;
1227
- for (let i = 1; i < newStacks.length; i++)
1228
- if (newStacks[i].pos < this.minStackPos)
1229
- this.minStackPos = newStacks[i].pos;
1230
- return null;
1231
- }
1232
- stopAt(pos) {
1233
- if (this.stoppedAt != null && this.stoppedAt < pos)
1234
- throw new RangeError("Can't move stoppedAt forward");
1235
- this.stoppedAt = pos;
1236
- }
1237
- // Returns an updated version of the given stack, or null if the
1238
- // stack can't advance normally. When `split` and `stacks` are
1239
- // given, stacks split off by ambiguous operations will be pushed to
1240
- // `split`, or added to `stacks` if they move `pos` forward.
1241
- advanceStack(stack, stacks, split) {
1242
- let start = stack.pos, { parser: parser2 } = this;
1243
- let base = verbose ? this.stackID(stack) + " -> " : "";
1244
- if (this.stoppedAt != null && start > this.stoppedAt)
1245
- return stack.forceReduce() ? stack : null;
1246
- if (this.fragments) {
1247
- let strictCx = stack.curContext && stack.curContext.tracker.strict, cxHash = strictCx ? stack.curContext.hash : 0;
1248
- for (let cached = this.fragments.nodeAt(start); cached; ) {
1249
- let match = this.parser.nodeSet.types[cached.type.id] == cached.type ? parser2.getGoto(stack.state, cached.type.id) : -1;
1250
- if (match > -1 && cached.length && (!strictCx || (cached.prop(NodeProp.contextHash) || 0) == cxHash)) {
1251
- stack.useNode(cached, match);
1252
- if (verbose)
1253
- console.log(base + this.stackID(stack) + ` (via reuse of ${parser2.getName(cached.type.id)})`);
1254
- return true;
1255
- }
1256
- if (!(cached instanceof Tree) || cached.children.length == 0 || cached.positions[0] > 0)
1257
- break;
1258
- let inner = cached.children[0];
1259
- if (inner instanceof Tree && cached.positions[0] == 0)
1260
- cached = inner;
1261
- else
1262
- break;
1263
- }
1264
- }
1265
- let defaultReduce = parser2.stateSlot(
1266
- stack.state,
1267
- 4
1268
- /* ParseState.DefaultReduce */
1269
- );
1270
- if (defaultReduce > 0) {
1271
- stack.reduce(defaultReduce);
1272
- if (verbose)
1273
- console.log(base + this.stackID(stack) + ` (via always-reduce ${parser2.getName(
1274
- defaultReduce & 65535
1275
- /* Action.ValueMask */
1276
- )})`);
1277
- return true;
1278
- }
1279
- if (stack.stack.length >= 8400) {
1280
- while (stack.stack.length > 6e3 && stack.forceReduce()) {
1281
- }
1282
- }
1283
- let actions = this.tokens.getActions(stack);
1284
- for (let i = 0; i < actions.length; ) {
1285
- let action = actions[i++], term = actions[i++], end = actions[i++];
1286
- let last = i == actions.length || !split;
1287
- let localStack = last ? stack : stack.split();
1288
- let main = this.tokens.mainToken;
1289
- localStack.apply(action, term, main ? main.start : localStack.pos, end);
1290
- if (verbose)
1291
- console.log(base + this.stackID(localStack) + ` (via ${(action & 65536) == 0 ? "shift" : `reduce of ${parser2.getName(
1292
- action & 65535
1293
- /* Action.ValueMask */
1294
- )}`} for ${parser2.getName(term)} @ ${start}${localStack == stack ? "" : ", split"})`);
1295
- if (last)
1296
- return true;
1297
- else if (localStack.pos > start)
1298
- stacks.push(localStack);
1299
- else
1300
- split.push(localStack);
1301
- }
1302
- return false;
1303
- }
1304
- // Advance a given stack forward as far as it will go. Returns the
1305
- // (possibly updated) stack if it got stuck, or null if it moved
1306
- // forward and was given to `pushStackDedup`.
1307
- advanceFully(stack, newStacks) {
1308
- let pos = stack.pos;
1309
- for (; ; ) {
1310
- if (!this.advanceStack(stack, null, null))
1311
- return false;
1312
- if (stack.pos > pos) {
1313
- pushStackDedup(stack, newStacks);
1314
- return true;
1315
- }
1316
- }
1317
- }
1318
- runRecovery(stacks, tokens, newStacks) {
1319
- let finished = null, restarted = false;
1320
- for (let i = 0; i < stacks.length; i++) {
1321
- let stack = stacks[i], token = tokens[i << 1], tokenEnd = tokens[(i << 1) + 1];
1322
- let base = verbose ? this.stackID(stack) + " -> " : "";
1323
- if (stack.deadEnd) {
1324
- if (restarted)
1325
- continue;
1326
- restarted = true;
1327
- stack.restart();
1328
- if (verbose)
1329
- console.log(base + this.stackID(stack) + " (restarted)");
1330
- let done = this.advanceFully(stack, newStacks);
1331
- if (done)
1332
- continue;
1333
- }
1334
- let force = stack.split(), forceBase = base;
1335
- for (let j = 0; force.forceReduce() && j < 10; j++) {
1336
- if (verbose)
1337
- console.log(forceBase + this.stackID(force) + " (via force-reduce)");
1338
- let done = this.advanceFully(force, newStacks);
1339
- if (done)
1340
- break;
1341
- if (verbose)
1342
- forceBase = this.stackID(force) + " -> ";
1343
- }
1344
- for (let insert of stack.recoverByInsert(token)) {
1345
- if (verbose)
1346
- console.log(base + this.stackID(insert) + " (via recover-insert)");
1347
- this.advanceFully(insert, newStacks);
1348
- }
1349
- if (this.stream.end > stack.pos) {
1350
- if (tokenEnd == stack.pos) {
1351
- tokenEnd++;
1352
- token = 0;
1353
- }
1354
- stack.recoverByDelete(token, tokenEnd);
1355
- if (verbose)
1356
- console.log(base + this.stackID(stack) + ` (via recover-delete ${this.parser.getName(token)})`);
1357
- pushStackDedup(stack, newStacks);
1358
- } else if (!finished || finished.score < stack.score) {
1359
- finished = stack;
1360
- }
1361
- }
1362
- return finished;
1363
- }
1364
- // Convert the stack's buffer to a syntax tree.
1365
- stackToTree(stack) {
1366
- stack.close();
1367
- return Tree.build({
1368
- buffer: StackBufferCursor.create(stack),
1369
- nodeSet: this.parser.nodeSet,
1370
- topID: this.topTerm,
1371
- maxBufferLength: this.parser.bufferLength,
1372
- reused: this.reused,
1373
- start: this.ranges[0].from,
1374
- length: stack.pos - this.ranges[0].from,
1375
- minRepeatType: this.parser.minRepeatTerm
1376
- });
1377
- }
1378
- stackID(stack) {
1379
- let id2 = (stackIDs || (stackIDs = /* @__PURE__ */ new WeakMap())).get(stack);
1380
- if (!id2)
1381
- stackIDs.set(stack, id2 = String.fromCodePoint(this.nextStackID++));
1382
- return id2 + stack;
1383
- }
1384
- }
1385
- function pushStackDedup(stack, newStacks) {
1386
- for (let i = 0; i < newStacks.length; i++) {
1387
- let other = newStacks[i];
1388
- if (other.pos == stack.pos && other.sameState(stack)) {
1389
- if (newStacks[i].score < stack.score)
1390
- newStacks[i] = stack;
1391
- return;
1392
- }
1393
- }
1394
- newStacks.push(stack);
1395
- }
1396
- class Dialect {
1397
- constructor(source, flags, disabled) {
1398
- this.source = source;
1399
- this.flags = flags;
1400
- this.disabled = disabled;
1401
- }
1402
- allows(term) {
1403
- return !this.disabled || this.disabled[term] == 0;
1404
- }
1405
- }
1406
- const id = (x) => x;
1407
- class ContextTracker {
1408
- /**
1409
- Define a context tracker.
1410
- */
1411
- constructor(spec) {
1412
- this.start = spec.start;
1413
- this.shift = spec.shift || id;
1414
- this.reduce = spec.reduce || id;
1415
- this.reuse = spec.reuse || id;
1416
- this.hash = spec.hash || (() => 0);
1417
- this.strict = spec.strict !== false;
1418
- }
1419
- }
1420
- class LRParser extends Parser {
1421
- /**
1422
- @internal
1423
- */
1424
- constructor(spec) {
1425
- super();
1426
- this.wrappers = [];
1427
- if (spec.version != 14)
1428
- throw new RangeError(`Parser version (${spec.version}) doesn't match runtime version (${14})`);
1429
- let nodeNames = spec.nodeNames.split(" ");
1430
- this.minRepeatTerm = nodeNames.length;
1431
- for (let i = 0; i < spec.repeatNodeCount; i++)
1432
- nodeNames.push("");
1433
- let topTerms = Object.keys(spec.topRules).map((r) => spec.topRules[r][1]);
1434
- let nodeProps = [];
1435
- for (let i = 0; i < nodeNames.length; i++)
1436
- nodeProps.push([]);
1437
- function setProp(nodeID, prop, value) {
1438
- nodeProps[nodeID].push([prop, prop.deserialize(String(value))]);
1439
- }
1440
- if (spec.nodeProps)
1441
- for (let propSpec of spec.nodeProps) {
1442
- let prop = propSpec[0];
1443
- if (typeof prop == "string")
1444
- prop = NodeProp[prop];
1445
- for (let i = 1; i < propSpec.length; ) {
1446
- let next = propSpec[i++];
1447
- if (next >= 0) {
1448
- setProp(next, prop, propSpec[i++]);
1449
- } else {
1450
- let value = propSpec[i + -next];
1451
- for (let j = -next; j > 0; j--)
1452
- setProp(propSpec[i++], prop, value);
1453
- i++;
1454
- }
1455
- }
1456
- }
1457
- this.nodeSet = new NodeSet(nodeNames.map((name, i) => NodeType.define({
1458
- name: i >= this.minRepeatTerm ? void 0 : name,
1459
- id: i,
1460
- props: nodeProps[i],
1461
- top: topTerms.indexOf(i) > -1,
1462
- error: i == 0,
1463
- skipped: spec.skippedNodes && spec.skippedNodes.indexOf(i) > -1
1464
- })));
1465
- if (spec.propSources)
1466
- this.nodeSet = this.nodeSet.extend(...spec.propSources);
1467
- this.strict = false;
1468
- this.bufferLength = DefaultBufferLength;
1469
- let tokenArray = decodeArray(spec.tokenData);
1470
- this.context = spec.context;
1471
- this.specializerSpecs = spec.specialized || [];
1472
- this.specialized = new Uint16Array(this.specializerSpecs.length);
1473
- for (let i = 0; i < this.specializerSpecs.length; i++)
1474
- this.specialized[i] = this.specializerSpecs[i].term;
1475
- this.specializers = this.specializerSpecs.map(getSpecializer);
1476
- this.states = decodeArray(spec.states, Uint32Array);
1477
- this.data = decodeArray(spec.stateData);
1478
- this.goto = decodeArray(spec.goto);
1479
- this.maxTerm = spec.maxTerm;
1480
- this.tokenizers = spec.tokenizers.map((value) => typeof value == "number" ? new TokenGroup(tokenArray, value) : value);
1481
- this.topRules = spec.topRules;
1482
- this.dialects = spec.dialects || {};
1483
- this.dynamicPrecedences = spec.dynamicPrecedences || null;
1484
- this.tokenPrecTable = spec.tokenPrec;
1485
- this.termNames = spec.termNames || null;
1486
- this.maxNode = this.nodeSet.types.length - 1;
1487
- this.dialect = this.parseDialect();
1488
- this.top = this.topRules[Object.keys(this.topRules)[0]];
1489
- }
1490
- createParse(input, fragments, ranges) {
1491
- let parse = new Parse(this, input, fragments, ranges);
1492
- for (let w of this.wrappers)
1493
- parse = w(parse, input, fragments, ranges);
1494
- return parse;
1495
- }
1496
- /**
1497
- Get a goto table entry @internal
1498
- */
1499
- getGoto(state, term, loose = false) {
1500
- let table = this.goto;
1501
- if (term >= table[0])
1502
- return -1;
1503
- for (let pos = table[term + 1]; ; ) {
1504
- let groupTag = table[pos++], last = groupTag & 1;
1505
- let target = table[pos++];
1506
- if (last && loose)
1507
- return target;
1508
- for (let end = pos + (groupTag >> 1); pos < end; pos++)
1509
- if (table[pos] == state)
1510
- return target;
1511
- if (last)
1512
- return -1;
1513
- }
1514
- }
1515
- /**
1516
- Check if this state has an action for a given terminal @internal
1517
- */
1518
- hasAction(state, terminal) {
1519
- let data = this.data;
1520
- for (let set = 0; set < 2; set++) {
1521
- for (let i = this.stateSlot(
1522
- state,
1523
- set ? 2 : 1
1524
- /* ParseState.Actions */
1525
- ), next; ; i += 3) {
1526
- if ((next = data[i]) == 65535) {
1527
- if (data[i + 1] == 1)
1528
- next = data[i = pair(data, i + 2)];
1529
- else if (data[i + 1] == 2)
1530
- return pair(data, i + 2);
1531
- else
1532
- break;
1533
- }
1534
- if (next == terminal || next == 0)
1535
- return pair(data, i + 1);
1536
- }
1537
- }
1538
- return 0;
1539
- }
1540
- /**
1541
- @internal
1542
- */
1543
- stateSlot(state, slot) {
1544
- return this.states[state * 6 + slot];
1545
- }
1546
- /**
1547
- @internal
1548
- */
1549
- stateFlag(state, flag) {
1550
- return (this.stateSlot(
1551
- state,
1552
- 0
1553
- /* ParseState.Flags */
1554
- ) & flag) > 0;
1555
- }
1556
- /**
1557
- @internal
1558
- */
1559
- validAction(state, action) {
1560
- return !!this.allActions(state, (a) => a == action ? true : null);
1561
- }
1562
- /**
1563
- @internal
1564
- */
1565
- allActions(state, action) {
1566
- let deflt = this.stateSlot(
1567
- state,
1568
- 4
1569
- /* ParseState.DefaultReduce */
1570
- );
1571
- let result = deflt ? action(deflt) : void 0;
1572
- for (let i = this.stateSlot(
1573
- state,
1574
- 1
1575
- /* ParseState.Actions */
1576
- ); result == null; i += 3) {
1577
- if (this.data[i] == 65535) {
1578
- if (this.data[i + 1] == 1)
1579
- i = pair(this.data, i + 2);
1580
- else
1581
- break;
1582
- }
1583
- result = action(pair(this.data, i + 1));
1584
- }
1585
- return result;
1586
- }
1587
- /**
1588
- Get the states that can follow this one through shift actions or
1589
- goto jumps. @internal
1590
- */
1591
- nextStates(state) {
1592
- let result = [];
1593
- for (let i = this.stateSlot(
1594
- state,
1595
- 1
1596
- /* ParseState.Actions */
1597
- ); ; i += 3) {
1598
- if (this.data[i] == 65535) {
1599
- if (this.data[i + 1] == 1)
1600
- i = pair(this.data, i + 2);
1601
- else
1602
- break;
1603
- }
1604
- if ((this.data[i + 2] & 65536 >> 16) == 0) {
1605
- let value = this.data[i + 1];
1606
- if (!result.some((v, i2) => i2 & 1 && v == value))
1607
- result.push(this.data[i], value);
1608
- }
1609
- }
1610
- return result;
1611
- }
1612
- /**
1613
- Configure the parser. Returns a new parser instance that has the
1614
- given settings modified. Settings not provided in `config` are
1615
- kept from the original parser.
1616
- */
1617
- configure(config) {
1618
- let copy = Object.assign(Object.create(LRParser.prototype), this);
1619
- if (config.props)
1620
- copy.nodeSet = this.nodeSet.extend(...config.props);
1621
- if (config.top) {
1622
- let info = this.topRules[config.top];
1623
- if (!info)
1624
- throw new RangeError(`Invalid top rule name ${config.top}`);
1625
- copy.top = info;
1626
- }
1627
- if (config.tokenizers)
1628
- copy.tokenizers = this.tokenizers.map((t) => {
1629
- let found = config.tokenizers.find((r) => r.from == t);
1630
- return found ? found.to : t;
1631
- });
1632
- if (config.specializers) {
1633
- copy.specializers = this.specializers.slice();
1634
- copy.specializerSpecs = this.specializerSpecs.map((s, i) => {
1635
- let found = config.specializers.find((r) => r.from == s.external);
1636
- if (!found)
1637
- return s;
1638
- let spec = Object.assign(Object.assign({}, s), { external: found.to });
1639
- copy.specializers[i] = getSpecializer(spec);
1640
- return spec;
1641
- });
1642
- }
1643
- if (config.contextTracker)
1644
- copy.context = config.contextTracker;
1645
- if (config.dialect)
1646
- copy.dialect = this.parseDialect(config.dialect);
1647
- if (config.strict != null)
1648
- copy.strict = config.strict;
1649
- if (config.wrap)
1650
- copy.wrappers = copy.wrappers.concat(config.wrap);
1651
- if (config.bufferLength != null)
1652
- copy.bufferLength = config.bufferLength;
1653
- return copy;
1654
- }
1655
- /**
1656
- Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
1657
- are registered for this parser.
1658
- */
1659
- hasWrappers() {
1660
- return this.wrappers.length > 0;
1661
- }
1662
- /**
1663
- Returns the name associated with a given term. This will only
1664
- work for all terms when the parser was generated with the
1665
- `--names` option. By default, only the names of tagged terms are
1666
- stored.
1667
- */
1668
- getName(term) {
1669
- return this.termNames ? this.termNames[term] : String(term <= this.maxNode && this.nodeSet.types[term].name || term);
1670
- }
1671
- /**
1672
- The eof term id is always allocated directly after the node
1673
- types. @internal
1674
- */
1675
- get eofTerm() {
1676
- return this.maxNode + 1;
1677
- }
1678
- /**
1679
- The type of top node produced by the parser.
1680
- */
1681
- get topNode() {
1682
- return this.nodeSet.types[this.top[1]];
1683
- }
1684
- /**
1685
- @internal
1686
- */
1687
- dynamicPrecedence(term) {
1688
- let prec = this.dynamicPrecedences;
1689
- return prec == null ? 0 : prec[term] || 0;
1690
- }
1691
- /**
1692
- @internal
1693
- */
1694
- parseDialect(dialect) {
1695
- let values = Object.keys(this.dialects), flags = values.map(() => false);
1696
- if (dialect)
1697
- for (let part of dialect.split(" ")) {
1698
- let id2 = values.indexOf(part);
1699
- if (id2 >= 0)
1700
- flags[id2] = true;
1701
- }
1702
- let disabled = null;
1703
- for (let i = 0; i < values.length; i++)
1704
- if (!flags[i]) {
1705
- for (let j = this.dialects[values[i]], id2; (id2 = this.data[j++]) != 65535; )
1706
- (disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[id2] = 1;
1707
- }
1708
- return new Dialect(dialect, flags, disabled);
1709
- }
1710
- /**
1711
- Used by the output of the parser generator. Not available to
1712
- user code. @hide
1713
- */
1714
- static deserialize(spec) {
1715
- return new LRParser(spec);
1716
- }
1717
- }
1718
- function pair(data, off) {
1719
- return data[off] | data[off + 1] << 16;
1720
- }
1721
- function findFinished(stacks) {
1722
- let best = null;
1723
- for (let stack of stacks) {
1724
- let stopped = stack.p.stoppedAt;
1725
- if ((stack.pos == stack.p.stream.end || stopped != null && stack.pos > stopped) && stack.p.parser.stateFlag(
1726
- stack.state,
1727
- 2
1728
- /* StateFlag.Accepting */
1729
- ) && (!best || best.score < stack.score))
1730
- best = stack;
1731
- }
1732
- return best;
1733
- }
1734
- function getSpecializer(spec) {
1735
- if (spec.external) {
1736
- let mask = spec.extend ? 1 : 0;
1737
- return (value, stack) => spec.external(value, stack) << 1 | mask;
1738
- }
1739
- return spec.get;
1740
- }
1741
- const printKeyword = 1, indent = 194, dedent = 195, newline$1 = 196, blankLineStart = 197, newlineBracketed = 198, eof = 199, stringContent = 200, Escape = 2, replacementStart = 3, stringEnd = 201, ParenL = 24, ParenthesizedExpression = 25, TupleExpression = 49, ComprehensionExpression = 50, BracketL = 55, ArrayExpression = 56, ArrayComprehensionExpression = 57, BraceL = 59, DictionaryExpression = 60, DictionaryComprehensionExpression = 61, SetExpression = 62, SetComprehensionExpression = 63, ArgList = 65, subscript = 238, String$1 = 71, stringStart = 241, stringStartD = 242, stringStartL = 243, stringStartLD = 244, stringStartR = 245, stringStartRD = 246, stringStartRL = 247, stringStartRLD = 248, FormatString = 72, stringStartF = 249, stringStartFD = 250, stringStartFL = 251, stringStartFLD = 252, stringStartFR = 253, stringStartFRD = 254, stringStartFRL = 255, stringStartFRLD = 256, FormatReplacement = 73, nestedFormatReplacement = 77, importList = 263, TypeParamList = 112, ParamList = 130, SequencePattern = 151, MappingPattern = 152, PatternArgList = 155;
1742
- const newline = 10, carriageReturn = 13, space = 32, tab = 9, hash = 35, parenOpen = 40, dot = 46, braceOpen = 123, braceClose = 125, singleQuote = 39, doubleQuote = 34, backslash = 92, letter_o = 111, letter_x = 120, letter_N = 78, letter_u = 117, letter_U = 85;
1743
- const bracketed = /* @__PURE__ */ new Set([
1744
- ParenthesizedExpression,
1745
- TupleExpression,
1746
- ComprehensionExpression,
1747
- importList,
1748
- ArgList,
1749
- ParamList,
1750
- ArrayExpression,
1751
- ArrayComprehensionExpression,
1752
- subscript,
1753
- SetExpression,
1754
- SetComprehensionExpression,
1755
- FormatString,
1756
- FormatReplacement,
1757
- nestedFormatReplacement,
1758
- DictionaryExpression,
1759
- DictionaryComprehensionExpression,
1760
- SequencePattern,
1761
- MappingPattern,
1762
- PatternArgList,
1763
- TypeParamList
1764
- ]);
1765
- function isLineBreak(ch) {
1766
- return ch == newline || ch == carriageReturn;
1767
- }
1768
- function isHex(ch) {
1769
- return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
1770
- }
1771
- const newlines = new ExternalTokenizer((input, stack) => {
1772
- let prev;
1773
- if (input.next < 0) {
1774
- input.acceptToken(eof);
1775
- } else if (stack.context.flags & cx_Bracketed) {
1776
- if (isLineBreak(input.next))
1777
- input.acceptToken(newlineBracketed, 1);
1778
- } else if (((prev = input.peek(-1)) < 0 || isLineBreak(prev)) && stack.canShift(blankLineStart)) {
1779
- let spaces = 0;
1780
- while (input.next == space || input.next == tab) {
1781
- input.advance();
1782
- spaces++;
1783
- }
1784
- if (input.next == newline || input.next == carriageReturn || input.next == hash)
1785
- input.acceptToken(blankLineStart, -spaces);
1786
- } else if (isLineBreak(input.next)) {
1787
- input.acceptToken(newline$1, 1);
1788
- }
1789
- }, { contextual: true });
1790
- const indentation = new ExternalTokenizer((input, stack) => {
1791
- let context = stack.context;
1792
- if (context.flags)
1793
- return;
1794
- let prev = input.peek(-1);
1795
- if (prev == newline || prev == carriageReturn) {
1796
- let depth = 0, chars = 0;
1797
- for (; ; ) {
1798
- if (input.next == space)
1799
- depth++;
1800
- else if (input.next == tab)
1801
- depth += 8 - depth % 8;
1802
- else
1803
- break;
1804
- input.advance();
1805
- chars++;
1806
- }
1807
- if (depth != context.indent && input.next != newline && input.next != carriageReturn && input.next != hash) {
1808
- if (depth < context.indent)
1809
- input.acceptToken(dedent, -chars);
1810
- else
1811
- input.acceptToken(indent);
1812
- }
1813
- }
1814
- });
1815
- const cx_Bracketed = 1, cx_String = 2, cx_DoubleQuote = 4, cx_Long = 8, cx_Raw = 16, cx_Format = 32;
1816
- function Context(parent, indent2, flags) {
1817
- this.parent = parent;
1818
- this.indent = indent2;
1819
- this.flags = flags;
1820
- this.hash = (parent ? parent.hash + parent.hash << 8 : 0) + indent2 + (indent2 << 4) + flags + (flags << 6);
1821
- }
1822
- const topIndent = new Context(null, 0, 0);
1823
- function countIndent(space2) {
1824
- let depth = 0;
1825
- for (let i = 0; i < space2.length; i++)
1826
- depth += space2.charCodeAt(i) == tab ? 8 - depth % 8 : 1;
1827
- return depth;
1828
- }
1829
- const stringFlags = new Map([
1830
- [stringStart, 0],
1831
- [stringStartD, cx_DoubleQuote],
1832
- [stringStartL, cx_Long],
1833
- [stringStartLD, cx_Long | cx_DoubleQuote],
1834
- [stringStartR, cx_Raw],
1835
- [stringStartRD, cx_Raw | cx_DoubleQuote],
1836
- [stringStartRL, cx_Raw | cx_Long],
1837
- [stringStartRLD, cx_Raw | cx_Long | cx_DoubleQuote],
1838
- [stringStartF, cx_Format],
1839
- [stringStartFD, cx_Format | cx_DoubleQuote],
1840
- [stringStartFL, cx_Format | cx_Long],
1841
- [stringStartFLD, cx_Format | cx_Long | cx_DoubleQuote],
1842
- [stringStartFR, cx_Format | cx_Raw],
1843
- [stringStartFRD, cx_Format | cx_Raw | cx_DoubleQuote],
1844
- [stringStartFRL, cx_Format | cx_Raw | cx_Long],
1845
- [stringStartFRLD, cx_Format | cx_Raw | cx_Long | cx_DoubleQuote]
1846
- ].map(([term, flags]) => [term, flags | cx_String]));
1847
- const trackIndent = new ContextTracker({
1848
- start: topIndent,
1849
- reduce(context, term, _, input) {
1850
- if (context.flags & cx_Bracketed && bracketed.has(term) || (term == String$1 || term == FormatString) && context.flags & cx_String)
1851
- return context.parent;
1852
- return context;
1853
- },
1854
- shift(context, term, stack, input) {
1855
- if (term == indent)
1856
- return new Context(context, countIndent(input.read(input.pos, stack.pos)), 0);
1857
- if (term == dedent)
1858
- return context.parent;
1859
- if (term == ParenL || term == BracketL || term == BraceL || term == replacementStart)
1860
- return new Context(context, 0, cx_Bracketed);
1861
- if (stringFlags.has(term))
1862
- return new Context(context, 0, stringFlags.get(term) | context.flags & cx_Bracketed);
1863
- return context;
1864
- },
1865
- hash(context) {
1866
- return context.hash;
1867
- }
1868
- });
1869
- const legacyPrint = new ExternalTokenizer((input) => {
1870
- for (let i = 0; i < 5; i++) {
1871
- if (input.next != "print".charCodeAt(i))
1872
- return;
1873
- input.advance();
1874
- }
1875
- if (/\w/.test(String.fromCharCode(input.next)))
1876
- return;
1877
- for (let off = 0; ; off++) {
1878
- let next = input.peek(off);
1879
- if (next == space || next == tab)
1880
- continue;
1881
- if (next != parenOpen && next != dot && next != newline && next != carriageReturn && next != hash)
1882
- input.acceptToken(printKeyword);
1883
- return;
1884
- }
1885
- });
1886
- const strings = new ExternalTokenizer((input, stack) => {
1887
- let { flags } = stack.context;
1888
- let quote = flags & cx_DoubleQuote ? doubleQuote : singleQuote;
1889
- let long = (flags & cx_Long) > 0;
1890
- let escapes = !(flags & cx_Raw);
1891
- let format = (flags & cx_Format) > 0;
1892
- let start = input.pos;
1893
- for (; ; ) {
1894
- if (input.next < 0) {
1895
- break;
1896
- } else if (format && input.next == braceOpen) {
1897
- if (input.peek(1) == braceOpen) {
1898
- input.advance(2);
1899
- } else {
1900
- if (input.pos == start) {
1901
- input.acceptToken(replacementStart, 1);
1902
- return;
1903
- }
1904
- break;
1905
- }
1906
- } else if (escapes && input.next == backslash) {
1907
- if (input.pos == start) {
1908
- input.advance();
1909
- let escaped = input.next;
1910
- if (escaped >= 0) {
1911
- input.advance();
1912
- skipEscape(input, escaped);
1913
- }
1914
- input.acceptToken(Escape);
1915
- return;
1916
- }
1917
- break;
1918
- } else if (input.next == backslash && !escapes && input.peek(1) > -1) {
1919
- input.advance(2);
1920
- } else if (input.next == quote && (!long || input.peek(1) == quote && input.peek(2) == quote)) {
1921
- if (input.pos == start) {
1922
- input.acceptToken(stringEnd, long ? 3 : 1);
1923
- return;
1924
- }
1925
- break;
1926
- } else if (input.next == newline) {
1927
- if (long) {
1928
- input.advance();
1929
- } else if (input.pos == start) {
1930
- input.acceptToken(stringEnd);
1931
- return;
1932
- }
1933
- break;
1934
- } else {
1935
- input.advance();
1936
- }
1937
- }
1938
- if (input.pos > start)
1939
- input.acceptToken(stringContent);
1940
- });
1941
- function skipEscape(input, ch) {
1942
- if (ch == letter_o) {
1943
- for (let i = 0; i < 2 && input.next >= 48 && input.next <= 55; i++)
1944
- input.advance();
1945
- } else if (ch == letter_x) {
1946
- for (let i = 0; i < 2 && isHex(input.next); i++)
1947
- input.advance();
1948
- } else if (ch == letter_u) {
1949
- for (let i = 0; i < 4 && isHex(input.next); i++)
1950
- input.advance();
1951
- } else if (ch == letter_U) {
1952
- for (let i = 0; i < 8 && isHex(input.next); i++)
1953
- input.advance();
1954
- } else if (ch == letter_N) {
1955
- if (input.next == braceOpen) {
1956
- input.advance();
1957
- while (input.next >= 0 && input.next != braceClose && input.next != singleQuote && input.next != doubleQuote && input.next != newline)
1958
- input.advance();
1959
- if (input.next == braceClose)
1960
- input.advance();
1961
- }
1962
- }
1963
- }
1964
- const pythonHighlighting = styleTags({
1965
- 'async "*" "**" FormatConversion FormatSpec': tags.modifier,
1966
- "for while if elif else try except finally return raise break continue with pass assert await yield match case": tags.controlKeyword,
1967
- "in not and or is del": tags.operatorKeyword,
1968
- "from def class global nonlocal lambda": tags.definitionKeyword,
1969
- import: tags.moduleKeyword,
1970
- "with as print": tags.keyword,
1971
- Boolean: tags.bool,
1972
- None: tags.null,
1973
- VariableName: tags.variableName,
1974
- "CallExpression/VariableName": tags.function(tags.variableName),
1975
- "FunctionDefinition/VariableName": tags.function(tags.definition(tags.variableName)),
1976
- "ClassDefinition/VariableName": tags.definition(tags.className),
1977
- PropertyName: tags.propertyName,
1978
- "CallExpression/MemberExpression/PropertyName": tags.function(tags.propertyName),
1979
- Comment: tags.lineComment,
1980
- Number: tags.number,
1981
- String: tags.string,
1982
- FormatString: tags.special(tags.string),
1983
- Escape: tags.escape,
1984
- UpdateOp: tags.updateOperator,
1985
- "ArithOp!": tags.arithmeticOperator,
1986
- BitOp: tags.bitwiseOperator,
1987
- CompareOp: tags.compareOperator,
1988
- AssignOp: tags.definitionOperator,
1989
- Ellipsis: tags.punctuation,
1990
- At: tags.meta,
1991
- "( )": tags.paren,
1992
- "[ ]": tags.squareBracket,
1993
- "{ }": tags.brace,
1994
- ".": tags.derefOperator,
1995
- ", ;": tags.separator
1996
- });
1997
- const spec_identifier = { __proto__: null, await: 44, or: 54, and: 56, in: 60, not: 62, is: 64, if: 70, else: 72, lambda: 76, yield: 94, from: 96, async: 102, for: 104, None: 162, True: 164, False: 164, del: 178, pass: 182, break: 186, continue: 190, return: 194, raise: 202, import: 206, as: 208, global: 212, nonlocal: 214, assert: 218, type: 223, elif: 236, while: 240, try: 246, except: 248, finally: 250, with: 254, def: 258, class: 268, match: 279, case: 285 };
1998
- const parser = LRParser.deserialize({
1999
- version: 14,
2000
- states: "##jO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4nQdO'#F[P4uOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO5TQdO'#DoOOQS,5:Y,5:YO5hQdO'#HdOOQS,5:],5:]O5uQ!fO,5:]O5zQtO,59YO1lQdO,59bO1lQdO,59bO1lQdO,59bO8jQdO,59bO8oQdO,59bO8vQdO,59jO8}QdO'#HTO:TQdO'#HSOOQS'#HS'#HSOOQS'#D['#D[O:lQd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V'_V-g,`-h.TQ.d-lQ/P.^R/Q._U.]-l.^._Q/U.aQ/b.tQ/g.zU/i.|/j/yQ/n/RQ/|/oQ0O/tU0Q/u0S0[Q0]0UQ0a0ZR0b0^R/T.`R/d.t",
2003
- nodeNames: "⚠ print Escape { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",
2004
- maxTerm: 277,
2005
- context: trackIndent,
2006
- nodeProps: [
2007
- ["isolate", -5, 4, 71, 72, 73, 77, ""],
2008
- ["group", -15, 6, 85, 87, 88, 90, 92, 94, 96, 98, 99, 100, 102, 105, 108, 110, "Statement Statement", -22, 8, 18, 21, 25, 40, 49, 50, 56, 57, 60, 61, 62, 63, 64, 67, 70, 71, 72, 79, 80, 81, 82, "Expression", -10, 114, 116, 119, 121, 122, 126, 128, 133, 135, 138, "Statement", -9, 143, 144, 147, 148, 150, 151, 152, 153, 154, "Pattern"],
2009
- ["openedBy", 23, "(", 54, "[", 58, "{"],
2010
- ["closedBy", 24, ")", 55, "]", 59, "}"]
2011
- ],
2012
- propSources: [pythonHighlighting],
2013
- skippedNodes: [0, 4],
2014
- repeatNodeCount: 34,
2015
- tokenData: "!2|~R!`OX%TXY%oY[%T[]%o]p%Tpq%oqr'ars)Yst*xtu%Tuv,dvw-hwx.Uxy/tyz0[z{0r{|2S|}2p}!O3W!O!P4_!P!Q:Z!Q!R;k!R![>_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;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[s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",
2016
- tokenizers: [legacyPrint, indentation, newlines, strings, 0, 1, 2, 3, 4],
2017
- topRules: { "Script": [0, 5] },
2018
- specialized: [{ term: 221, get: (value) => spec_identifier[value] || -1 }],
2019
- tokenPrec: 7668
2020
- });
2021
- const cache = /* @__PURE__ */ new NodeWeakMap();
2022
- const ScopeNodes = /* @__PURE__ */ new Set([
2023
- "Script",
2024
- "Body",
2025
- "FunctionDefinition",
2026
- "ClassDefinition",
2027
- "LambdaExpression",
2028
- "ForStatement",
2029
- "MatchClause"
2030
- ]);
2031
- function defID(type) {
2032
- return (node, def, outer) => {
2033
- if (outer)
2034
- return false;
2035
- let id2 = node.node.getChild("VariableName");
2036
- if (id2)
2037
- def(id2, type);
2038
- return true;
2039
- };
2040
- }
2041
- const gatherCompletions = {
2042
- FunctionDefinition: /* @__PURE__ */ defID("function"),
2043
- ClassDefinition: /* @__PURE__ */ defID("class"),
2044
- ForStatement(node, def, outer) {
2045
- if (outer)
2046
- for (let child = node.node.firstChild; child; child = child.nextSibling) {
2047
- if (child.name == "VariableName")
2048
- def(child, "variable");
2049
- else if (child.name == "in")
2050
- break;
2051
- }
2052
- },
2053
- ImportStatement(_node, def) {
2054
- var _a, _b;
2055
- let { node } = _node;
2056
- let isFrom = ((_a = node.firstChild) === null || _a === void 0 ? void 0 : _a.name) == "from";
2057
- for (let ch = node.getChild("import"); ch; ch = ch.nextSibling) {
2058
- if (ch.name == "VariableName" && ((_b = ch.nextSibling) === null || _b === void 0 ? void 0 : _b.name) != "as")
2059
- def(ch, isFrom ? "variable" : "namespace");
2060
- }
2061
- },
2062
- AssignStatement(node, def) {
2063
- for (let child = node.node.firstChild; child; child = child.nextSibling) {
2064
- if (child.name == "VariableName")
2065
- def(child, "variable");
2066
- else if (child.name == ":" || child.name == "AssignOp")
2067
- break;
2068
- }
2069
- },
2070
- ParamList(node, def) {
2071
- for (let prev = null, child = node.node.firstChild; child; child = child.nextSibling) {
2072
- if (child.name == "VariableName" && (!prev || !/\*|AssignOp/.test(prev.name)))
2073
- def(child, "variable");
2074
- prev = child;
2075
- }
2076
- },
2077
- CapturePattern: /* @__PURE__ */ defID("variable"),
2078
- AsPattern: /* @__PURE__ */ defID("variable"),
2079
- __proto__: null
2080
- };
2081
- function getScope(doc, node) {
2082
- let cached = cache.get(node);
2083
- if (cached)
2084
- return cached;
2085
- let completions = [], top = true;
2086
- function def(node2, type) {
2087
- let name = doc.sliceString(node2.from, node2.to);
2088
- completions.push({ label: name, type });
2089
- }
2090
- node.cursor(IterMode.IncludeAnonymous).iterate((node2) => {
2091
- if (node2.name) {
2092
- let gather = gatherCompletions[node2.name];
2093
- if (gather && gather(node2, def, top) || !top && ScopeNodes.has(node2.name))
2094
- return false;
2095
- top = false;
2096
- } else if (node2.to - node2.from > 8192) {
2097
- for (let c of getScope(doc, node2.node))
2098
- completions.push(c);
2099
- return false;
2100
- }
2101
- });
2102
- cache.set(node, completions);
2103
- return completions;
2104
- }
2105
- const Identifier = /^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/;
2106
- const dontComplete = ["String", "FormatString", "Comment", "PropertyName"];
2107
- function localCompletionSource(context) {
2108
- let inner = syntaxTree(context.state).resolveInner(context.pos, -1);
2109
- if (dontComplete.indexOf(inner.name) > -1)
2110
- return null;
2111
- let isWord = inner.name == "VariableName" || inner.to - inner.from < 20 && Identifier.test(context.state.sliceDoc(inner.from, inner.to));
2112
- if (!isWord && !context.explicit)
2113
- return null;
2114
- let options = [];
2115
- for (let pos = inner; pos; pos = pos.parent) {
2116
- if (ScopeNodes.has(pos.name))
2117
- options = options.concat(getScope(context.state.doc, pos));
2118
- }
2119
- return {
2120
- options,
2121
- from: isWord ? inner.from : context.pos,
2122
- validFor: Identifier
2123
- };
2124
- }
2125
- const globals = /* @__PURE__ */ [
2126
- "__annotations__",
2127
- "__builtins__",
2128
- "__debug__",
2129
- "__doc__",
2130
- "__import__",
2131
- "__name__",
2132
- "__loader__",
2133
- "__package__",
2134
- "__spec__",
2135
- "False",
2136
- "None",
2137
- "True"
2138
- ].map((n) => ({ label: n, type: "constant" })).concat(/* @__PURE__ */ [
2139
- "ArithmeticError",
2140
- "AssertionError",
2141
- "AttributeError",
2142
- "BaseException",
2143
- "BlockingIOError",
2144
- "BrokenPipeError",
2145
- "BufferError",
2146
- "BytesWarning",
2147
- "ChildProcessError",
2148
- "ConnectionAbortedError",
2149
- "ConnectionError",
2150
- "ConnectionRefusedError",
2151
- "ConnectionResetError",
2152
- "DeprecationWarning",
2153
- "EOFError",
2154
- "Ellipsis",
2155
- "EncodingWarning",
2156
- "EnvironmentError",
2157
- "Exception",
2158
- "FileExistsError",
2159
- "FileNotFoundError",
2160
- "FloatingPointError",
2161
- "FutureWarning",
2162
- "GeneratorExit",
2163
- "IOError",
2164
- "ImportError",
2165
- "ImportWarning",
2166
- "IndentationError",
2167
- "IndexError",
2168
- "InterruptedError",
2169
- "IsADirectoryError",
2170
- "KeyError",
2171
- "KeyboardInterrupt",
2172
- "LookupError",
2173
- "MemoryError",
2174
- "ModuleNotFoundError",
2175
- "NameError",
2176
- "NotADirectoryError",
2177
- "NotImplemented",
2178
- "NotImplementedError",
2179
- "OSError",
2180
- "OverflowError",
2181
- "PendingDeprecationWarning",
2182
- "PermissionError",
2183
- "ProcessLookupError",
2184
- "RecursionError",
2185
- "ReferenceError",
2186
- "ResourceWarning",
2187
- "RuntimeError",
2188
- "RuntimeWarning",
2189
- "StopAsyncIteration",
2190
- "StopIteration",
2191
- "SyntaxError",
2192
- "SyntaxWarning",
2193
- "SystemError",
2194
- "SystemExit",
2195
- "TabError",
2196
- "TimeoutError",
2197
- "TypeError",
2198
- "UnboundLocalError",
2199
- "UnicodeDecodeError",
2200
- "UnicodeEncodeError",
2201
- "UnicodeError",
2202
- "UnicodeTranslateError",
2203
- "UnicodeWarning",
2204
- "UserWarning",
2205
- "ValueError",
2206
- "Warning",
2207
- "ZeroDivisionError"
2208
- ].map((n) => ({ label: n, type: "type" }))).concat(/* @__PURE__ */ [
2209
- "bool",
2210
- "bytearray",
2211
- "bytes",
2212
- "classmethod",
2213
- "complex",
2214
- "float",
2215
- "frozenset",
2216
- "int",
2217
- "list",
2218
- "map",
2219
- "memoryview",
2220
- "object",
2221
- "range",
2222
- "set",
2223
- "staticmethod",
2224
- "str",
2225
- "super",
2226
- "tuple",
2227
- "type"
2228
- ].map((n) => ({ label: n, type: "class" }))).concat(/* @__PURE__ */ [
2229
- "abs",
2230
- "aiter",
2231
- "all",
2232
- "anext",
2233
- "any",
2234
- "ascii",
2235
- "bin",
2236
- "breakpoint",
2237
- "callable",
2238
- "chr",
2239
- "compile",
2240
- "delattr",
2241
- "dict",
2242
- "dir",
2243
- "divmod",
2244
- "enumerate",
2245
- "eval",
2246
- "exec",
2247
- "exit",
2248
- "filter",
2249
- "format",
2250
- "getattr",
2251
- "globals",
2252
- "hasattr",
2253
- "hash",
2254
- "help",
2255
- "hex",
2256
- "id",
2257
- "input",
2258
- "isinstance",
2259
- "issubclass",
2260
- "iter",
2261
- "len",
2262
- "license",
2263
- "locals",
2264
- "max",
2265
- "min",
2266
- "next",
2267
- "oct",
2268
- "open",
2269
- "ord",
2270
- "pow",
2271
- "print",
2272
- "property",
2273
- "quit",
2274
- "repr",
2275
- "reversed",
2276
- "round",
2277
- "setattr",
2278
- "slice",
2279
- "sorted",
2280
- "sum",
2281
- "vars",
2282
- "zip"
2283
- ].map((n) => ({ label: n, type: "function" })));
2284
- const snippets = [
2285
- /* @__PURE__ */ snippetCompletion("def ${name}(${params}):\n ${}", {
2286
- label: "def",
2287
- detail: "function",
2288
- type: "keyword"
2289
- }),
2290
- /* @__PURE__ */ snippetCompletion("for ${name} in ${collection}:\n ${}", {
2291
- label: "for",
2292
- detail: "loop",
2293
- type: "keyword"
2294
- }),
2295
- /* @__PURE__ */ snippetCompletion("while ${}:\n ${}", {
2296
- label: "while",
2297
- detail: "loop",
2298
- type: "keyword"
2299
- }),
2300
- /* @__PURE__ */ snippetCompletion("try:\n ${}\nexcept ${error}:\n ${}", {
2301
- label: "try",
2302
- detail: "/ except block",
2303
- type: "keyword"
2304
- }),
2305
- /* @__PURE__ */ snippetCompletion("if ${}:\n \n", {
2306
- label: "if",
2307
- detail: "block",
2308
- type: "keyword"
2309
- }),
2310
- /* @__PURE__ */ snippetCompletion("if ${}:\n ${}\nelse:\n ${}", {
2311
- label: "if",
2312
- detail: "/ else block",
2313
- type: "keyword"
2314
- }),
2315
- /* @__PURE__ */ snippetCompletion("class ${name}:\n def __init__(self, ${params}):\n ${}", {
2316
- label: "class",
2317
- detail: "definition",
2318
- type: "keyword"
2319
- }),
2320
- /* @__PURE__ */ snippetCompletion("import ${module}", {
2321
- label: "import",
2322
- detail: "statement",
2323
- type: "keyword"
2324
- }),
2325
- /* @__PURE__ */ snippetCompletion("from ${module} import ${names}", {
2326
- label: "from",
2327
- detail: "import",
2328
- type: "keyword"
2329
- })
2330
- ];
2331
- const globalCompletion = /* @__PURE__ */ ifNotIn(dontComplete, /* @__PURE__ */ completeFromList(/* @__PURE__ */ globals.concat(snippets)));
2332
- function innerBody(context) {
2333
- let { node, pos } = context;
2334
- let lineIndent = context.lineIndent(pos, -1);
2335
- let found = null;
2336
- for (; ; ) {
2337
- let before = node.childBefore(pos);
2338
- if (!before) {
2339
- break;
2340
- } else if (before.name == "Comment") {
2341
- pos = before.from;
2342
- } else if (before.name == "Body" || before.name == "MatchBody") {
2343
- if (context.baseIndentFor(before) + context.unit <= lineIndent)
2344
- found = before;
2345
- node = before;
2346
- } else if (before.name == "MatchClause") {
2347
- node = before;
2348
- } else if (before.type.is("Statement")) {
2349
- node = before;
2350
- } else {
2351
- break;
2352
- }
2353
- }
2354
- return found;
2355
- }
2356
- function indentBody(context, node) {
2357
- let base = context.baseIndentFor(node);
2358
- let line = context.lineAt(context.pos, -1), to = line.from + line.text.length;
2359
- if (/^\s*($|#)/.test(line.text) && context.node.to < to + 100 && !/\S/.test(context.state.sliceDoc(to, context.node.to)) && context.lineIndent(context.pos, -1) <= base)
2360
- return null;
2361
- if (/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(context.textAfter) && context.lineIndent(context.pos, -1) > base)
2362
- return null;
2363
- return base + context.unit;
2364
- }
2365
- const pythonLanguage = /* @__PURE__ */ LRLanguage.define({
2366
- name: "python",
2367
- parser: /* @__PURE__ */ parser.configure({
2368
- props: [
2369
- /* @__PURE__ */ indentNodeProp.add({
2370
- Body: (context) => {
2371
- var _a;
2372
- let body = /^\s*(#|$)/.test(context.textAfter) && innerBody(context) || context.node;
2373
- return (_a = indentBody(context, body)) !== null && _a !== void 0 ? _a : context.continue();
2374
- },
2375
- MatchBody: (context) => {
2376
- var _a;
2377
- let inner = innerBody(context);
2378
- return (_a = indentBody(context, inner || context.node)) !== null && _a !== void 0 ? _a : context.continue();
2379
- },
2380
- IfStatement: (cx) => /^\s*(else:|elif )/.test(cx.textAfter) ? cx.baseIndent : cx.continue(),
2381
- "ForStatement WhileStatement": (cx) => /^\s*else:/.test(cx.textAfter) ? cx.baseIndent : cx.continue(),
2382
- TryStatement: (cx) => /^\s*(except[ :]|finally:|else:)/.test(cx.textAfter) ? cx.baseIndent : cx.continue(),
2383
- MatchStatement: (cx) => {
2384
- if (/^\s*case /.test(cx.textAfter))
2385
- return cx.baseIndent + cx.unit;
2386
- return cx.continue();
2387
- },
2388
- "TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression": /* @__PURE__ */ delimitedIndent({ closing: ")" }),
2389
- "DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression": /* @__PURE__ */ delimitedIndent({ closing: "}" }),
2390
- "ArrayExpression ArrayComprehensionExpression": /* @__PURE__ */ delimitedIndent({ closing: "]" }),
2391
- MemberExpression: (cx) => cx.baseIndent + cx.unit,
2392
- "String FormatString": () => null,
2393
- Script: (context) => {
2394
- var _a;
2395
- let inner = innerBody(context);
2396
- return (_a = inner && indentBody(context, inner)) !== null && _a !== void 0 ? _a : context.continue();
2397
- }
2398
- }),
2399
- /* @__PURE__ */ foldNodeProp.add({
2400
- "ArrayExpression DictionaryExpression SetExpression TupleExpression": foldInside,
2401
- Body: (node, state) => ({ from: node.from + 1, to: node.to - (node.to == state.doc.length ? 0 : 1) }),
2402
- "String FormatString": (node, state) => ({ from: state.doc.lineAt(node.from).to, to: node.to })
2403
- })
2404
- ]
2405
- }),
2406
- languageData: {
2407
- closeBrackets: {
2408
- brackets: ["(", "[", "{", "'", '"', "'''", '"""'],
2409
- stringPrefixes: [
2410
- "f",
2411
- "fr",
2412
- "rf",
2413
- "r",
2414
- "u",
2415
- "b",
2416
- "br",
2417
- "rb",
2418
- "F",
2419
- "FR",
2420
- "RF",
2421
- "R",
2422
- "U",
2423
- "B",
2424
- "BR",
2425
- "RB"
2426
- ]
2427
- },
2428
- commentTokens: { line: "#" },
2429
- // Indent logic logic are triggered upon below input patterns
2430
- indentOnInput: /^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/
2431
- }
2432
- });
2433
- function python() {
2434
- return new LanguageSupport(pythonLanguage, [
2435
- pythonLanguage.data.of({ autocomplete: localCompletionSource }),
2436
- pythonLanguage.data.of({ autocomplete: globalCompletion })
2437
- ]);
2438
- }
2439
- const chalky = "#e5c07b", coral = "#e06c75", cyan = "#56b6c2", invalid = "#ffffff", ivory = "#abb2bf", stone = "#7d8799", malibu = "#61afef", sage = "#98c379", whiskey = "#d19a66", violet = "#c678dd", darkBackground = "#21252b", highlightBackground = "#2c313a", background = "#282c34", tooltipBackground = "#353a42", selection = "#3E4451", cursor = "#528bff";
2440
- const oneDarkTheme = /* @__PURE__ */ EditorView.theme({
2441
- "&": {
2442
- color: ivory,
2443
- backgroundColor: background
2444
- },
2445
- ".cm-content": {
2446
- caretColor: cursor
2447
- },
2448
- ".cm-cursor, .cm-dropCursor": { borderLeftColor: cursor },
2449
- "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: selection },
2450
- ".cm-panels": { backgroundColor: darkBackground, color: ivory },
2451
- ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
2452
- ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
2453
- ".cm-searchMatch": {
2454
- backgroundColor: "#72a1ff59",
2455
- outline: "1px solid #457dff"
2456
- },
2457
- ".cm-searchMatch.cm-searchMatch-selected": {
2458
- backgroundColor: "#6199ff2f"
2459
- },
2460
- ".cm-activeLine": { backgroundColor: "#6699ff0b" },
2461
- ".cm-selectionMatch": { backgroundColor: "#aafe661a" },
2462
- "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
2463
- backgroundColor: "#bad0f847"
2464
- },
2465
- ".cm-gutters": {
2466
- backgroundColor: background,
2467
- color: stone,
2468
- border: "none"
2469
- },
2470
- ".cm-activeLineGutter": {
2471
- backgroundColor: highlightBackground
2472
- },
2473
- ".cm-foldPlaceholder": {
2474
- backgroundColor: "transparent",
2475
- border: "none",
2476
- color: "#ddd"
2477
- },
2478
- ".cm-tooltip": {
2479
- border: "none",
2480
- backgroundColor: tooltipBackground
2481
- },
2482
- ".cm-tooltip .cm-tooltip-arrow:before": {
2483
- borderTopColor: "transparent",
2484
- borderBottomColor: "transparent"
2485
- },
2486
- ".cm-tooltip .cm-tooltip-arrow:after": {
2487
- borderTopColor: tooltipBackground,
2488
- borderBottomColor: tooltipBackground
2489
- },
2490
- ".cm-tooltip-autocomplete": {
2491
- "& > ul > li[aria-selected]": {
2492
- backgroundColor: highlightBackground,
2493
- color: ivory
2494
- }
2495
- }
2496
- }, { dark: true });
2497
- const oneDarkHighlightStyle = /* @__PURE__ */ HighlightStyle.define([
2498
- {
2499
- tag: tags.keyword,
2500
- color: violet
2501
- },
2502
- {
2503
- tag: [tags.name, tags.deleted, tags.character, tags.propertyName, tags.macroName],
2504
- color: coral
2505
- },
2506
- {
2507
- tag: [/* @__PURE__ */ tags.function(tags.variableName), tags.labelName],
2508
- color: malibu
2509
- },
2510
- {
2511
- tag: [tags.color, /* @__PURE__ */ tags.constant(tags.name), /* @__PURE__ */ tags.standard(tags.name)],
2512
- color: whiskey
2513
- },
2514
- {
2515
- tag: [/* @__PURE__ */ tags.definition(tags.name), tags.separator],
2516
- color: ivory
2517
- },
2518
- {
2519
- tag: [tags.typeName, tags.className, tags.number, tags.changed, tags.annotation, tags.modifier, tags.self, tags.namespace],
2520
- color: chalky
2521
- },
2522
- {
2523
- tag: [tags.operator, tags.operatorKeyword, tags.url, tags.escape, tags.regexp, tags.link, /* @__PURE__ */ tags.special(tags.string)],
2524
- color: cyan
2525
- },
2526
- {
2527
- tag: [tags.meta, tags.comment],
2528
- color: stone
2529
- },
2530
- {
2531
- tag: tags.strong,
2532
- fontWeight: "bold"
2533
- },
2534
- {
2535
- tag: tags.emphasis,
2536
- fontStyle: "italic"
2537
- },
2538
- {
2539
- tag: tags.strikethrough,
2540
- textDecoration: "line-through"
2541
- },
2542
- {
2543
- tag: tags.link,
2544
- color: stone,
2545
- textDecoration: "underline"
2546
- },
2547
- {
2548
- tag: tags.heading,
2549
- fontWeight: "bold",
2550
- color: coral
2551
- },
2552
- {
2553
- tag: [tags.atom, tags.bool, /* @__PURE__ */ tags.special(tags.variableName)],
2554
- color: whiskey
2555
- },
2556
- {
2557
- tag: [tags.processingInstruction, tags.string, tags.inserted],
2558
- color: sage
2559
- },
2560
- {
2561
- tag: tags.invalid,
2562
- color: invalid
2563
- }
2564
- ]);
2565
- const oneDark = [oneDarkTheme, /* @__PURE__ */ syntaxHighlighting(oneDarkHighlightStyle)];
2566
- const polarsCompletionVals = [
2567
- // Polars basics
2568
- { label: "pl", type: "variable", info: "Polars main module" },
2569
- { label: "col", type: "function", info: "Column selector" },
2570
- { label: "lit", type: "function", info: "Literal value" },
2571
- { label: "expr", type: "function", info: "Expression builder" },
2572
- // Common Polars operations
2573
- { label: "select", type: "method", info: "Select columns" },
2574
- { label: "filter", type: "method", info: "Filter rows" },
2575
- { label: "group_by", type: "method", info: "Group by columns" },
2576
- { label: "agg", type: "method", info: "Aggregate operations" },
2577
- { label: "sort", type: "method", info: "Sort DataFrame" },
2578
- { label: "with_columns", type: "method", info: "Add/modify columns" },
2579
- { label: "join", type: "method", info: "Join operations" },
2580
- // Aggregation functions
2581
- { label: "sum", type: "method", info: "Sum values" },
2582
- { label: "mean", type: "method", info: "Calculate mean" },
2583
- { label: "min", type: "method", info: "Find minimum" },
2584
- { label: "max", type: "method", info: "Find maximum" },
2585
- { label: "count", type: "method", info: "Count records" },
2586
- // Common variables
2587
- { label: "input_df", type: "variable", info: "Input DataFrame" },
2588
- { label: "output_df", type: "variable", info: "Output DataFrame" },
2589
- // Basic Python
2590
- { label: "print", type: "function" },
2591
- { label: "len", type: "function" },
2592
- { label: "range", type: "function" },
2593
- { label: "list", type: "type" },
2594
- { label: "dict", type: "type" },
2595
- { label: "set", type: "type" },
2596
- { label: "str", type: "type" },
2597
- { label: "int", type: "type" },
2598
- { label: "float", type: "type" },
2599
- { label: "bool", type: "type" }
2600
- ];
2601
- const _hoisted_1$2 = { class: "polars-editor-root" };
2602
- const _hoisted_2 = {
2603
- key: 0,
2604
- class: "validation-error"
2605
- };
2606
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2607
- __name: "pythonEditor",
2608
- props: {
2609
- editorString: { type: String, required: true }
2610
- },
2611
- emits: ["update-editor-string", "validation-error"],
2612
- setup(__props, { expose: __expose, emit: __emit }) {
2613
- const props = __props;
2614
- const emit = __emit;
2615
- const validationError = ref(null);
2616
- const polarsCompletions = (context) => {
2617
- let word = context.matchBefore(/\w*/);
2618
- if ((word == null ? void 0 : word.from) == (word == null ? void 0 : word.to) && !context.explicit) {
2619
- return null;
2620
- }
2621
- return {
2622
- from: word == null ? void 0 : word.from,
2623
- options: polarsCompletionVals
2624
- };
2625
- };
2626
- const tabKeymap = keymap.of([
2627
- {
2628
- key: "Tab",
2629
- run: (view2) => {
2630
- if (acceptCompletion(view2)) {
2631
- return true;
2632
- }
2633
- return indentMore(view2);
2634
- }
2635
- }
2636
- ]);
2637
- const insertTextAtCursor = (text) => {
2638
- if (view.value) {
2639
- view.value.dispatch({
2640
- changes: {
2641
- from: view.value.state.selection.main.head,
2642
- to: view.value.state.selection.main.head,
2643
- insert: text
2644
- }
2645
- });
2646
- }
2647
- };
2648
- const code = ref(props.editorString);
2649
- const view = shallowRef(null);
2650
- const extensions = [
2651
- python(),
2652
- oneDark,
2653
- EditorState.tabSize.of(4),
2654
- autocompletion({
2655
- override: [polarsCompletions],
2656
- defaultKeymap: false,
2657
- // Disable default keymap
2658
- closeOnBlur: false
2659
- }),
2660
- tabKeymap
2661
- ];
2662
- const handleReady = (payload) => {
2663
- view.value = payload.view;
2664
- };
2665
- const log = (type, event) => {
2666
- console.log(type, event);
2667
- };
2668
- const handleBlur = async (_) => {
2669
- try {
2670
- validationError.value = null;
2671
- emit("validation-error", null);
2672
- } catch (error) {
2673
- const errorMessage = error instanceof Error ? error.message : String(error);
2674
- validationError.value = errorMessage;
2675
- emit("validation-error", errorMessage);
2676
- }
2677
- };
2678
- watch(code, (newCode) => {
2679
- emit("update-editor-string", newCode);
2680
- });
2681
- __expose({ insertTextAtCursor });
2682
- return (_ctx, _cache) => {
2683
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
2684
- createVNode(unref(T), {
2685
- modelValue: code.value,
2686
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => code.value = $event),
2687
- placeholder: "Enter Polars code here...",
2688
- style: { height: "500px" },
2689
- autofocus: true,
2690
- "indent-with-tab": false,
2691
- "tab-size": 4,
2692
- extensions,
2693
- onReady: handleReady,
2694
- onFocus: _cache[1] || (_cache[1] = ($event) => log("focus", $event)),
2695
- onBlur: handleBlur
2696
- }, null, 8, ["modelValue"]),
2697
- validationError.value ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(validationError.value), 1)) : createCommentVNode("", true)
2698
- ]);
2699
- };
2700
- }
2701
- });
2702
- const pythonEditor_vue_vue_type_style_index_0_lang = "";
2703
- const createPolarsCodeNode = (flowId, nodeId) => {
2704
- const polarsCodeInput = {
2705
- polars_code: `# Example of usage (you can remove this)
2706
- # Single line transformations:
2707
- # input_df.filter(pl.col('column_name') > 0)
2708
-
2709
- # Multi-line transformations (must assign to output_df):
2710
- # result = input_df.select(['a', 'b'])
2711
- # filtered = result.filter(pl.col('a') > 0)
2712
- # output_df = filtered.with_columns(pl.col('b').alias('new_b'))
2713
-
2714
- # Multiple input dataframes are available as input_df_0, input_df_1, etc:
2715
- # output_df = input_df_0.join(input_df_1, on='id')
2716
-
2717
- # No inputs example (node will act as a starter node):
2718
- # output_df = pl.DataFrame({'a': [1, 2, 3], 'b': ['x', 'y', 'z']})
2719
-
2720
- # Your code here:
2721
- input_df`
2722
- };
2723
- const nodePolarsCode = {
2724
- flow_id: flowId,
2725
- node_id: nodeId,
2726
- pos_x: 0,
2727
- pos_y: 0,
2728
- polars_code_input: polarsCodeInput,
2729
- cache_results: false
2730
- };
2731
- return nodePolarsCode;
2732
- };
2733
- const _hoisted_1$1 = {
2734
- key: 0,
2735
- class: "listbox-wrapper"
2736
- };
2737
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2738
- __name: "polarsCode",
2739
- setup(__props, { expose: __expose }) {
2740
- const showEditor = ref(false);
2741
- const nodeStore = useNodeStore();
2742
- const dataLoaded = ref(false);
2743
- const editorChild = ref(null);
2744
- const nodePolarsCode = ref(null);
2745
- const nodeData = ref(null);
2746
- const handleEditorUpdate = (newCode) => {
2747
- if (nodePolarsCode.value && nodePolarsCode.value.polars_code_input) {
2748
- nodePolarsCode.value.polars_code_input.polars_code = newCode;
2749
- }
2750
- };
2751
- const loadNodeData = async (nodeId) => {
2752
- var _a, _b, _c, _d;
2753
- try {
2754
- nodeData.value = await nodeStore.getNodeData(nodeId, false);
2755
- if (nodeData.value) {
2756
- const hasValidSetup = Boolean(
2757
- ((_b = (_a = nodeData.value) == null ? void 0 : _a.setting_input) == null ? void 0 : _b.is_setup) && ((_d = (_c = nodeData.value) == null ? void 0 : _c.setting_input) == null ? void 0 : _d.polars_code_input)
2758
- );
2759
- nodePolarsCode.value = hasValidSetup ? nodeData.value.setting_input : createPolarsCodeNode(nodeStore.flow_id, nodeStore.node_id);
2760
- showEditor.value = true;
2761
- dataLoaded.value = true;
2762
- }
2763
- } catch (error) {
2764
- console.error("Failed to load node data:", error);
2765
- showEditor.value = false;
2766
- dataLoaded.value = false;
2767
- }
2768
- };
2769
- const pushNodeData = async () => {
2770
- if (!nodePolarsCode.value || !nodePolarsCode.value.polars_code_input.polars_code) {
2771
- return;
2772
- }
2773
- nodePolarsCode.value.is_setup = true;
2774
- nodeStore.updateSettings(nodePolarsCode);
2775
- showEditor.value = false;
2776
- dataLoaded.value = false;
2777
- };
2778
- __expose({ loadNodeData, pushNodeData });
2779
- return (_ctx, _cache) => {
2780
- return dataLoaded.value && nodePolarsCode.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
2781
- createVNode(GenericNodeSettings, { "model-value": nodePolarsCode.value }, {
2782
- default: withCtx(() => [
2783
- showEditor.value && nodePolarsCode.value ? (openBlock(), createBlock(_sfc_main$2, {
2784
- key: 0,
2785
- ref_key: "editorChild",
2786
- ref: editorChild,
2787
- "editor-string": nodePolarsCode.value.polars_code_input.polars_code,
2788
- onUpdateEditorString: handleEditorUpdate
2789
- }, null, 8, ["editor-string"])) : createCommentVNode("", true)
2790
- ]),
2791
- _: 1
2792
- }, 8, ["model-value"])
2793
- ])) : (openBlock(), createBlock(unref(CodeLoader), { key: 1 }));
2794
- };
2795
- }
2796
- });
2797
- const _hoisted_1 = { ref: "el" };
2798
- const _sfc_main = /* @__PURE__ */ defineComponent({
2799
- __name: "PolarsCode",
2800
- props: {
2801
- nodeId: {
2802
- type: Number,
2803
- required: true
2804
- }
2805
- },
2806
- setup(__props) {
2807
- const nodeStore = useNodeStore();
2808
- const childComp = ref(null);
2809
- const props = __props;
2810
- const drawer = ref(false);
2811
- const closeOnDrawer = () => {
2812
- var _a;
2813
- drawer.value = false;
2814
- (_a = childComp.value) == null ? void 0 : _a.pushNodeData();
2815
- };
2816
- const openDrawer = async () => {
2817
- if (nodeStore.node_id === props.nodeId) {
2818
- return;
2819
- }
2820
- nodeStore.closeDrawer();
2821
- drawer.value = true;
2822
- const drawerOpen = nodeStore.isDrawerOpen;
2823
- nodeStore.isDrawerOpen = true;
2824
- await nextTick();
2825
- if (nodeStore.node_id === props.nodeId && drawerOpen) {
2826
- return;
2827
- }
2828
- if (childComp.value) {
2829
- childComp.value.loadNodeData(props.nodeId);
2830
- nodeStore.openDrawer(closeOnDrawer);
2831
- }
2832
- };
2833
- onMounted(async () => {
2834
- await nextTick();
2835
- });
2836
- return (_ctx, _cache) => {
2837
- return openBlock(), createElementBlock("div", _hoisted_1, [
2838
- createVNode(NodeButton, {
2839
- ref: "nodeButton",
2840
- "node-id": __props.nodeId,
2841
- "image-src": "polars_code.png",
2842
- title: `${__props.nodeId}: Polars code`,
2843
- onClick: openDrawer
2844
- }, null, 8, ["node-id", "title"]),
2845
- drawer.value ? (openBlock(), createBlock(Teleport, {
2846
- key: 0,
2847
- to: "#nodesettings"
2848
- }, [
2849
- createVNode(NodeTitle, {
2850
- title: "Polars code",
2851
- intro: "Use custom Polars code to transform data."
2852
- }),
2853
- createVNode(_sfc_main$1, {
2854
- ref_key: "childComp",
2855
- ref: childComp,
2856
- "node-id": __props.nodeId
2857
- }, null, 8, ["node-id"])
2858
- ])) : createCommentVNode("", true)
2859
- ], 512);
2860
- };
2861
- }
2862
- });
2863
- export {
2864
- _sfc_main as default
2865
- };