@gregoriusrippenstein/node-red-contrib-introspection 0.6.6 → 0.6.7

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.
@@ -0,0 +1,615 @@
1
+ [
2
+ {
3
+ "id": "3541d7b242989f17",
4
+ "type": "group",
5
+ "z": "c7d40a2eacbeb56e",
6
+ "name": "start here",
7
+ "style": {
8
+ "label": true
9
+ },
10
+ "nodes": [
11
+ "1ed80b9a8975da2d",
12
+ "09e2ec0b886b3f03",
13
+ "e4b5af274f0fb512",
14
+ "083231a35e20e926",
15
+ "9f2c01a0a3458034",
16
+ "e8be6e48bc564a0b",
17
+ "1b55a569db1a65bb",
18
+ "658a813087e8c163",
19
+ "ba12938804f8c670",
20
+ "1d684ddc7f7f8355",
21
+ "983a7a1d8f4996ef",
22
+ "b0194284097d856c",
23
+ "0638a2ba33801a3a"
24
+ ],
25
+ "x": 22.333251953125,
26
+ "y": 86,
27
+ "w": 1388,
28
+ "h": 951.666748046875
29
+ },
30
+ {
31
+ "id": "1ed80b9a8975da2d",
32
+ "type": "function",
33
+ "z": "c7d40a2eacbeb56e",
34
+ "g": "3541d7b242989f17",
35
+ "name": "function 28",
36
+ "func": "\nreturn msg;",
37
+ "outputs": 1,
38
+ "timeout": 0,
39
+ "noerr": 0,
40
+ "initialize": "",
41
+ "finalize": "",
42
+ "libs": [],
43
+ "x": 214.33327865600586,
44
+ "y": 577.6667213439941,
45
+ "wires": [
46
+ [
47
+ "09e2ec0b886b3f03"
48
+ ]
49
+ ]
50
+ },
51
+ {
52
+ "id": "09e2ec0b886b3f03",
53
+ "type": "function",
54
+ "z": "c7d40a2eacbeb56e",
55
+ "g": "3541d7b242989f17",
56
+ "name": "function 29",
57
+ "func": "\nreturn msg;",
58
+ "outputs": 1,
59
+ "timeout": 0,
60
+ "noerr": 0,
61
+ "initialize": "",
62
+ "finalize": "",
63
+ "libs": [],
64
+ "x": 416.33327865600586,
65
+ "y": 459.66672134399414,
66
+ "wires": [
67
+ [
68
+ "e4b5af274f0fb512"
69
+ ]
70
+ ]
71
+ },
72
+ {
73
+ "id": "e4b5af274f0fb512",
74
+ "type": "function",
75
+ "z": "c7d40a2eacbeb56e",
76
+ "g": "3541d7b242989f17",
77
+ "name": "function 30",
78
+ "func": "\nreturn msg;",
79
+ "outputs": 1,
80
+ "timeout": 0,
81
+ "noerr": 0,
82
+ "initialize": "",
83
+ "finalize": "",
84
+ "libs": [],
85
+ "x": 685.3332786560059,
86
+ "y": 567.6667213439941,
87
+ "wires": [
88
+ [
89
+ "9f2c01a0a3458034"
90
+ ]
91
+ ]
92
+ },
93
+ {
94
+ "id": "083231a35e20e926",
95
+ "type": "catch",
96
+ "z": "c7d40a2eacbeb56e",
97
+ "g": "3541d7b242989f17",
98
+ "name": "",
99
+ "scope": [
100
+ "1ed80b9a8975da2d",
101
+ "09e2ec0b886b3f03",
102
+ "0638a2ba33801a3a"
103
+ ],
104
+ "uncaught": false,
105
+ "x": 507.333251953125,
106
+ "y": 321.6667175292969,
107
+ "wires": [
108
+ [
109
+ "9f2c01a0a3458034",
110
+ "e4b5af274f0fb512",
111
+ "1d684ddc7f7f8355"
112
+ ]
113
+ ]
114
+ },
115
+ {
116
+ "id": "9f2c01a0a3458034",
117
+ "type": "link out",
118
+ "z": "c7d40a2eacbeb56e",
119
+ "g": "3541d7b242989f17",
120
+ "name": "link out 133",
121
+ "mode": "return",
122
+ "links": [],
123
+ "x": 954.3332786560059,
124
+ "y": 567.6667213439941,
125
+ "wires": []
126
+ },
127
+ {
128
+ "id": "e8be6e48bc564a0b",
129
+ "type": "link in",
130
+ "z": "c7d40a2eacbeb56e",
131
+ "g": "3541d7b242989f17",
132
+ "name": "link in 6",
133
+ "links": [],
134
+ "x": 100.33328247070312,
135
+ "y": 310.6667175292969,
136
+ "wires": [
137
+ [
138
+ "1ed80b9a8975da2d"
139
+ ]
140
+ ]
141
+ },
142
+ {
143
+ "id": "1b55a569db1a65bb",
144
+ "type": "link call",
145
+ "z": "c7d40a2eacbeb56e",
146
+ "g": "3541d7b242989f17",
147
+ "name": "",
148
+ "links": [
149
+ "e8be6e48bc564a0b"
150
+ ],
151
+ "linkType": "static",
152
+ "timeout": "30",
153
+ "x": 599.333251953125,
154
+ "y": 996.666748046875,
155
+ "wires": [
156
+ [
157
+ "ba12938804f8c670"
158
+ ]
159
+ ]
160
+ },
161
+ {
162
+ "id": "658a813087e8c163",
163
+ "type": "inject",
164
+ "z": "c7d40a2eacbeb56e",
165
+ "g": "3541d7b242989f17",
166
+ "name": "",
167
+ "props": [
168
+ {
169
+ "p": "payload"
170
+ },
171
+ {
172
+ "p": "topic",
173
+ "vt": "str"
174
+ }
175
+ ],
176
+ "repeat": "",
177
+ "crontab": "",
178
+ "once": false,
179
+ "onceDelay": 0.1,
180
+ "topic": "",
181
+ "payload": "",
182
+ "payloadType": "date",
183
+ "x": 128.333251953125,
184
+ "y": 752.666748046875,
185
+ "wires": [
186
+ [
187
+ "1b55a569db1a65bb"
188
+ ]
189
+ ]
190
+ },
191
+ {
192
+ "id": "ba12938804f8c670",
193
+ "type": "debug",
194
+ "z": "c7d40a2eacbeb56e",
195
+ "g": "3541d7b242989f17",
196
+ "name": "debug 178",
197
+ "active": true,
198
+ "tosidebar": true,
199
+ "console": false,
200
+ "tostatus": false,
201
+ "complete": "false",
202
+ "statusVal": "",
203
+ "statusType": "auto",
204
+ "x": 1294.333251953125,
205
+ "y": 741.666748046875,
206
+ "wires": []
207
+ },
208
+ {
209
+ "id": "1d684ddc7f7f8355",
210
+ "type": "debug",
211
+ "z": "c7d40a2eacbeb56e",
212
+ "g": "3541d7b242989f17",
213
+ "name": "debug 180",
214
+ "active": true,
215
+ "tosidebar": true,
216
+ "console": false,
217
+ "tostatus": false,
218
+ "complete": "false",
219
+ "statusVal": "",
220
+ "statusType": "auto",
221
+ "x": 814,
222
+ "y": 222,
223
+ "wires": []
224
+ },
225
+ {
226
+ "id": "983a7a1d8f4996ef",
227
+ "type": "catch",
228
+ "z": "c7d40a2eacbeb56e",
229
+ "g": "3541d7b242989f17",
230
+ "name": "",
231
+ "scope": null,
232
+ "uncaught": false,
233
+ "x": 536,
234
+ "y": 127,
235
+ "wires": [
236
+ [
237
+ "1d684ddc7f7f8355"
238
+ ]
239
+ ]
240
+ },
241
+ {
242
+ "id": "b0194284097d856c",
243
+ "type": "catch",
244
+ "z": "c7d40a2eacbeb56e",
245
+ "g": "3541d7b242989f17",
246
+ "name": "",
247
+ "scope": null,
248
+ "uncaught": false,
249
+ "x": 1066,
250
+ "y": 359,
251
+ "wires": [
252
+ []
253
+ ]
254
+ },
255
+ {
256
+ "id": "0638a2ba33801a3a",
257
+ "type": "function",
258
+ "z": "c7d40a2eacbeb56e",
259
+ "g": "3541d7b242989f17",
260
+ "name": "function 31",
261
+ "func": "\nreturn msg;",
262
+ "outputs": 1,
263
+ "timeout": 0,
264
+ "noerr": 0,
265
+ "initialize": "",
266
+ "finalize": "",
267
+ "libs": [],
268
+ "x": 981,
269
+ "y": 296,
270
+ "wires": [
271
+ []
272
+ ]
273
+ },
274
+ {
275
+ "id": "8cde6772c4db3d97",
276
+ "type": "group",
277
+ "z": "c7d40a2eacbeb56e",
278
+ "name": "result of \"coalesce link call nodes\" only.",
279
+ "style": {
280
+ "label": true
281
+ },
282
+ "nodes": [
283
+ "0bdbe9c00bc87270",
284
+ "be9d7f9c1f7e6d36",
285
+ "dd032f3b5335484e",
286
+ "4be696a8c45a4811",
287
+ "a8581bc5b135edc9",
288
+ "b0a49c7e838b0c42",
289
+ "09e0de8993a9d389",
290
+ "97ab9003e63b7362",
291
+ "2e40763646e416b9",
292
+ "250a2639dc077746",
293
+ "1464757b8bdc7ddb",
294
+ "e7cd5a3aea164f6c",
295
+ "3b15017bfbfa2aaf",
296
+ "a01634173f88efe0",
297
+ "bd5e81f3fc2b50c8",
298
+ "bbcc6c1839088d61"
299
+ ],
300
+ "x": 74.99997329711914,
301
+ "y": 1253.3332786560059,
302
+ "w": 1388,
303
+ "h": 951.666748046875
304
+ },
305
+ {
306
+ "id": "0bdbe9c00bc87270",
307
+ "type": "function",
308
+ "z": "c7d40a2eacbeb56e",
309
+ "g": "8cde6772c4db3d97",
310
+ "name": "function 32",
311
+ "func": "\nreturn msg;",
312
+ "outputs": 1,
313
+ "timeout": 0,
314
+ "noerr": 0,
315
+ "initialize": "",
316
+ "finalize": "",
317
+ "libs": [],
318
+ "x": 267,
319
+ "y": 1745,
320
+ "wires": [
321
+ [
322
+ "be9d7f9c1f7e6d36"
323
+ ]
324
+ ]
325
+ },
326
+ {
327
+ "id": "be9d7f9c1f7e6d36",
328
+ "type": "function",
329
+ "z": "c7d40a2eacbeb56e",
330
+ "g": "8cde6772c4db3d97",
331
+ "name": "function 33",
332
+ "func": "\nreturn msg;",
333
+ "outputs": 1,
334
+ "timeout": 0,
335
+ "noerr": 0,
336
+ "initialize": "",
337
+ "finalize": "",
338
+ "libs": [],
339
+ "x": 469,
340
+ "y": 1627,
341
+ "wires": [
342
+ [
343
+ "dd032f3b5335484e"
344
+ ]
345
+ ]
346
+ },
347
+ {
348
+ "id": "dd032f3b5335484e",
349
+ "type": "function",
350
+ "z": "c7d40a2eacbeb56e",
351
+ "g": "8cde6772c4db3d97",
352
+ "name": "function 34",
353
+ "func": "\nreturn msg;",
354
+ "outputs": 1,
355
+ "timeout": 0,
356
+ "noerr": 0,
357
+ "initialize": "",
358
+ "finalize": "",
359
+ "libs": [],
360
+ "x": 738,
361
+ "y": 1735,
362
+ "wires": [
363
+ [
364
+ "a8581bc5b135edc9"
365
+ ]
366
+ ]
367
+ },
368
+ {
369
+ "id": "4be696a8c45a4811",
370
+ "type": "catch",
371
+ "z": "c7d40a2eacbeb56e",
372
+ "g": "8cde6772c4db3d97",
373
+ "name": "",
374
+ "scope": [
375
+ "0bdbe9c00bc87270",
376
+ "be9d7f9c1f7e6d36",
377
+ "e7cd5a3aea164f6c"
378
+ ],
379
+ "uncaught": false,
380
+ "x": 559.9999732971191,
381
+ "y": 1488.9999961853027,
382
+ "wires": [
383
+ [
384
+ "a8581bc5b135edc9",
385
+ "dd032f3b5335484e",
386
+ "2e40763646e416b9"
387
+ ]
388
+ ]
389
+ },
390
+ {
391
+ "id": "a8581bc5b135edc9",
392
+ "type": "link out",
393
+ "z": "c7d40a2eacbeb56e",
394
+ "g": "8cde6772c4db3d97",
395
+ "name": "link out 134",
396
+ "mode": "return",
397
+ "links": [],
398
+ "x": 1007,
399
+ "y": 1735,
400
+ "wires": []
401
+ },
402
+ {
403
+ "id": "b0a49c7e838b0c42",
404
+ "type": "link in",
405
+ "z": "c7d40a2eacbeb56e",
406
+ "g": "8cde6772c4db3d97",
407
+ "name": "link in 7",
408
+ "links": [],
409
+ "x": 153.00000381469727,
410
+ "y": 1477.9999961853027,
411
+ "wires": [
412
+ [
413
+ "0bdbe9c00bc87270"
414
+ ]
415
+ ]
416
+ },
417
+ {
418
+ "id": "09e0de8993a9d389",
419
+ "type": "inject",
420
+ "z": "c7d40a2eacbeb56e",
421
+ "g": "8cde6772c4db3d97",
422
+ "name": "",
423
+ "props": [
424
+ {
425
+ "p": "payload"
426
+ },
427
+ {
428
+ "p": "topic",
429
+ "vt": "str"
430
+ }
431
+ ],
432
+ "repeat": "",
433
+ "crontab": "",
434
+ "once": false,
435
+ "onceDelay": 0.1,
436
+ "topic": "",
437
+ "payload": "",
438
+ "payloadType": "date",
439
+ "x": 180.99997329711914,
440
+ "y": 1920.0000267028809,
441
+ "wires": [
442
+ [
443
+ "3b15017bfbfa2aaf"
444
+ ]
445
+ ]
446
+ },
447
+ {
448
+ "id": "97ab9003e63b7362",
449
+ "type": "debug",
450
+ "z": "c7d40a2eacbeb56e",
451
+ "g": "8cde6772c4db3d97",
452
+ "name": "debug 181",
453
+ "active": true,
454
+ "tosidebar": true,
455
+ "console": false,
456
+ "tostatus": false,
457
+ "complete": "false",
458
+ "statusVal": "",
459
+ "statusType": "auto",
460
+ "x": 1346.9999732971191,
461
+ "y": 1909.0000267028809,
462
+ "wires": []
463
+ },
464
+ {
465
+ "id": "2e40763646e416b9",
466
+ "type": "debug",
467
+ "z": "c7d40a2eacbeb56e",
468
+ "g": "8cde6772c4db3d97",
469
+ "name": "debug 182",
470
+ "active": true,
471
+ "tosidebar": true,
472
+ "console": false,
473
+ "tostatus": false,
474
+ "complete": "false",
475
+ "statusVal": "",
476
+ "statusType": "auto",
477
+ "x": 866.6667213439941,
478
+ "y": 1389.3332786560059,
479
+ "wires": []
480
+ },
481
+ {
482
+ "id": "250a2639dc077746",
483
+ "type": "catch",
484
+ "z": "c7d40a2eacbeb56e",
485
+ "g": "8cde6772c4db3d97",
486
+ "name": "",
487
+ "scope": null,
488
+ "uncaught": false,
489
+ "x": 588.6667213439941,
490
+ "y": 1294.3332786560059,
491
+ "wires": [
492
+ [
493
+ "2e40763646e416b9"
494
+ ]
495
+ ]
496
+ },
497
+ {
498
+ "id": "1464757b8bdc7ddb",
499
+ "type": "catch",
500
+ "z": "c7d40a2eacbeb56e",
501
+ "g": "8cde6772c4db3d97",
502
+ "name": "",
503
+ "scope": null,
504
+ "uncaught": false,
505
+ "x": 1118.6667213439941,
506
+ "y": 1526.3332786560059,
507
+ "wires": [
508
+ []
509
+ ]
510
+ },
511
+ {
512
+ "id": "e7cd5a3aea164f6c",
513
+ "type": "function",
514
+ "z": "c7d40a2eacbeb56e",
515
+ "g": "8cde6772c4db3d97",
516
+ "name": "function 35",
517
+ "func": "\nreturn msg;",
518
+ "outputs": 1,
519
+ "timeout": 0,
520
+ "noerr": 0,
521
+ "initialize": "",
522
+ "finalize": "",
523
+ "libs": [],
524
+ "x": 1033.6667213439941,
525
+ "y": 1463.3332786560059,
526
+ "wires": [
527
+ []
528
+ ]
529
+ },
530
+ {
531
+ "id": "3b15017bfbfa2aaf",
532
+ "type": "function",
533
+ "z": "c7d40a2eacbeb56e",
534
+ "g": "8cde6772c4db3d97",
535
+ "name": "function 36",
536
+ "func": "\nreturn msg;",
537
+ "outputs": 1,
538
+ "timeout": 0,
539
+ "noerr": 0,
540
+ "initialize": "",
541
+ "finalize": "",
542
+ "libs": [],
543
+ "x": 651.9999732971191,
544
+ "y": 2164.000026702881,
545
+ "wires": [
546
+ [
547
+ "a01634173f88efe0"
548
+ ]
549
+ ]
550
+ },
551
+ {
552
+ "id": "a01634173f88efe0",
553
+ "type": "function",
554
+ "z": "c7d40a2eacbeb56e",
555
+ "g": "8cde6772c4db3d97",
556
+ "name": "function 37",
557
+ "func": "\nreturn msg;",
558
+ "outputs": 1,
559
+ "timeout": 0,
560
+ "noerr": 0,
561
+ "initialize": "",
562
+ "finalize": "",
563
+ "libs": [],
564
+ "x": 853.9999732971191,
565
+ "y": 2046.0000267028809,
566
+ "wires": [
567
+ [
568
+ "bd5e81f3fc2b50c8"
569
+ ]
570
+ ]
571
+ },
572
+ {
573
+ "id": "bd5e81f3fc2b50c8",
574
+ "type": "function",
575
+ "z": "c7d40a2eacbeb56e",
576
+ "g": "8cde6772c4db3d97",
577
+ "name": "function 38",
578
+ "func": "\nreturn msg;",
579
+ "outputs": 1,
580
+ "timeout": 0,
581
+ "noerr": 0,
582
+ "initialize": "",
583
+ "finalize": "",
584
+ "libs": [],
585
+ "x": 1122.9999732971191,
586
+ "y": 2154.000026702881,
587
+ "wires": [
588
+ [
589
+ "97ab9003e63b7362"
590
+ ]
591
+ ]
592
+ },
593
+ {
594
+ "id": "bbcc6c1839088d61",
595
+ "type": "catch",
596
+ "z": "c7d40a2eacbeb56e",
597
+ "g": "8cde6772c4db3d97",
598
+ "name": "",
599
+ "scope": [
600
+ "e7cd5a3aea164f6c",
601
+ "3b15017bfbfa2aaf",
602
+ "a01634173f88efe0"
603
+ ],
604
+ "uncaught": false,
605
+ "x": 944.9999465942383,
606
+ "y": 1908.0000228881836,
607
+ "wires": [
608
+ [
609
+ "97ab9003e63b7362",
610
+ "bd5e81f3fc2b50c8",
611
+ "2e40763646e416b9"
612
+ ]
613
+ ]
614
+ }
615
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gregoriusrippenstein/node-red-contrib-introspection",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "dependencies": {
5
5
  "got": "^13",
6
6
  "uglify-js": "^3.17.4",
@@ -2,7 +2,7 @@
2
2
  (function() {
3
3
  var globalRefToSvgData;
4
4
 
5
- let obfuscateHelpers={getFlowDataFromCurrentWorkspace:e=>{var e=e||RED.workspaces.active(),r=RED.nodes.groups(e),e=(r=(r=r.concat(RED.nodes.junctions(e))).concat(RED.nodes.filterNodes({z:e})),RED.nodes.eachConfig(function(e){e.z===RED.workspaces.active()&&!1===e._def.hasUsers&&r.push(e)}),RED.nodes.workspace(e)||RED.nodes.subflow(e));return r.unshift(e),RED.nodes.createExportableNodeSet(r)},openImportDialog:e=>{RED.clipboard.import();let r=e;setTimeout(()=>{$("#red-ui-clipboard-dialog-import-text").val(JSON.stringify(r)).trigger("paste")},300)}};function obfuscatieCurrentFlow(r){let l=obfuscateHelpers.getFlowDataFromCurrentWorkspace(),c=(r.remove_groups&&(l=l.filter(e=>"group"!=e.type)).forEach(e=>{delete e.g}),{}),o={},u={},d={},i=[],s={};if(l.forEach(e=>{"subflow"==(c[e.id]=e).type&&(s[e.id]=e),"junction"==e.type&&(o[e.id]=e),"link out"==e.type&&(d[e.id]=e),"link in"==e.type&&(u[e.id]=e),"link call"==e.type&&i.push(e.id)}),r.remove_junctions&&(Object.keys(o).forEach(t=>{let i=o[t];s[i.z]||l.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o=r.wires[e].indexOf(t);-1<o&&(r.wires[e].splice(o,1),r.wires[e].push(...i.wires[0]))}})}),l=l.filter(e=>!("junction"==e.type&&!s[e.z]))),r.remove_linkout_nodes||r.remove_linkcall_nodes){let t=[],o=[],s=[],a=(r.remove_linkout_nodes&&!r.copy_linkin_nodes&&Object.keys(d).forEach(i=>{var e=d[i],r=e.links||[];r.reduce((e,r)=>e&&!!u[r],!0)&&"return"!=e.mode&&(t.push(i),r.forEach(t=>{l.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o=r.wires[e].indexOf(i);-1<o&&(r.wires[e].splice(o,1),r.wires[e].push(...u[t].wires[0]))}})}))}),(i,e)=>{if(!e)return!1;let r=[],n=[],o=[];function s(e){if(o.indexOf(e.id)<0)if(o.push(e.id),r.push(e),"link out"===e.type){if("return"!=e.mode)throw"not handable"}else RED.nodes.getNodeLinks(e).forEach(function(e){s(e.target)})}try{if(RED.nodes.getNodeLinks(e).forEach(function(e){s(e.target),n.push(e.target.id)}),0==r.length)return!1;let o={};var a=r[0];let t={x:i.x-a.x,y:i.y-a.y};var l=r.map(e=>{var r=structuredClone(c[e.id]);return r||console.log("WARNING: nodeid not found",[e.id,c[e.id]]),r.id=RED.nodes.id(),r.x+=t.x,r.y+=t.y,o[e.id]=r});return l.forEach(e=>{e.wires&&(e.wires=e.wires.map(e=>e.map(e=>{var r=o[e];return r&&"link out"==r.type?[...i.wires[0],(r||{}).id||e]:(r||{}).id||e}).flat()))}),{nodes:l.filter(e=>"link out"!=e.type),entryNodes:n.map(e=>o[e])}}catch(e){return console.log(e),!1}});r.remove_linkout_nodes&&r.copy_linkin_nodes&&Object.keys(d).forEach(n=>{let o=d[n];var e=o.links||[];"return"!=o.mode&&(e=e.map(e=>{var r=u[e],r=a(o,r);if(r)return[e,r]})).reduce((e,r)=>e&&!!r,!0)&&(t.push(n),e.forEach(([,i])=>{l.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o,t=r.wires[e].indexOf(n);-1<t&&(o=i.entryNodes.map(e=>e.id),r.wires[e].splice(t,1),r.wires[e].push(...o),s.push(...i.nodes))}})}))}),r.remove_linkcall_nodes&&i.forEach(i=>{var e=c[i],r=u[e.links[0]];let n=a(e,r);r&&n&&(o.push(e.id),l.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o,t=r.wires[e].indexOf(i);-1<t&&(o=n.entryNodes.map(e=>e.id),r.wires[e].splice(t,1),r.wires[e].push(...o),s.push(...n.nodes))}}))}),(l=l.filter(e=>t.indexOf(e.id)<0&&o.indexOf(e.id)<0)).push(...s)}if((l=r.remove_debugs?l.filter(e=>"debug"!=e.type):l).forEach(e=>{r.name&&(e.name=e.id),r.info&&(e.info="",delete e.outputLabels,delete e.inputLabels),r.position&&(e.x=150,e.y=150),r.remove_icons&&delete e.icon}),r.javascript){let o={},r=[];l.forEach(e=>{"javascript"!=(o[e.id]=e).format&&"function"!=e.type&&"css"!=e.format&&"json"!=e.format||r.push(e)});var e={parse:{bare_returns:!0,expression:!1},compress:{},mangle:{reserved:["$","export","require"]},output:null,sourceMap:null,nameCache:null,toplevel:!1,warnings:!1},t={compatibility:"*",level:2};$.ajax({url:"ClientCode/"+RED.nodes.id()+"/ugify",type:"POST",contentType:"application/json; charset=utf-8",data:JSON.stringify({nodes:r,jscfg:e,csscfg:t}),success:function(e){e.forEach(e=>{var r=o[e.id];e._error&&console.log("ERROR NODE",e),"function"==r.type?r.func=e.func:"javascript"!=r.format&&"css"!=r.format&&"json"!=r.format||(r.template=e.template)}),obfuscateHelpers.openImportDialog(l)},error:function(e,r,o){RED.notify("ClientCode Communcation Failure: "+n.id+": "+r,{type:"error",timeout:3e3})}})}else obfuscateHelpers.openImportDialog(l)}
5
+ let obfuscateHelpers={getFlowDataFromCurrentWorkspace:e=>{var e=e||RED.workspaces.active(),r=RED.nodes.groups(e),e=(r=(r=r.concat(RED.nodes.junctions(e))).concat(RED.nodes.filterNodes({z:e})),RED.nodes.eachConfig(function(e){e.z===RED.workspaces.active()&&!1===e._def.hasUsers&&r.push(e)}),RED.nodes.workspace(e)||RED.nodes.subflow(e));return r.unshift(e),RED.nodes.createExportableNodeSet(r)},openImportDialog:e=>{RED.clipboard.import();let r=e;setTimeout(()=>{$("#red-ui-clipboard-dialog-import-text").val(JSON.stringify(r)).trigger("paste")},300)}};function obfuscatieCurrentFlow(r){let c=obfuscateHelpers.getFlowDataFromCurrentWorkspace(),l=(r.remove_groups&&(c=c.filter(e=>"group"!=e.type)).forEach(e=>{delete e.g}),{}),o={},p={},u={},i=[],d={},s={};if(c.forEach(e=>{"subflow"==(l[e.id]=e).type&&(s[e.id]=e),"junction"==e.type&&(o[e.id]=e),"link out"==e.type&&(u[e.id]=e),"link in"==e.type&&(p[e.id]=e),"link call"==e.type&&i.push(e.id),"catch"==e.type&&(d[e.id]=(e.wires||[])[0]||[])}),r.remove_junctions&&(Object.keys(o).forEach(t=>{let i=o[t];s[i.z]||c.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o=r.wires[e].indexOf(t);-1<o&&(r.wires[e].splice(o,1),r.wires[e].push(...i.wires[0]))}})}),c=c.filter(e=>!("junction"==e.type&&!s[e.z]))),r.remove_linkout_nodes||r.remove_linkcall_nodes){let t=[],o=[],n=[],a=(r.remove_linkout_nodes&&!r.copy_linkin_nodes&&Object.keys(u).forEach(i=>{var e=u[i],r=e.links||[];r.reduce((e,r)=>e&&!!p[r],!0)&&"return"!=e.mode&&(t.push(i),r.forEach(t=>{c.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o=r.wires[e].indexOf(i);-1<o&&(r.wires[e].splice(o,1),r.wires[e].push(...p[t].wires[0]))}})}))}),(i,e)=>{if(!e)return!1;let r=[],s=[],o=[];function n(e){if(o.indexOf(e.id)<0)if(o.push(e.id),r.push(e),"link out"===e.type){if("return"!=e.mode)throw"not handable"}else RED.nodes.getNodeLinks(e).forEach(function(e){n(e.target)})}try{RED.nodes.getNodeLinks(e).forEach(function(e){n(e.target),s.push(e.target.id)});if(Object.keys(d).forEach(e=>{((r,e)=>{try{return e.map(e=>e.id).forEach(e=>{if(r.includes(e))throw"yes"}),!1}catch(e){return!0}})(d[e],r)&&r.push(l[e])}),0==r.length)return!1;let o={};var a=r[0];let t={x:i.x-a.x,y:i.y-a.y};var c=r.map(e=>{var r=structuredClone(l[e.id]);return r||console.log("WARNING: nodeid not found",[e.id,l[e.id]]),r.id=RED.nodes.id(),r.x+=t.x,r.y+=t.y,o[e.id]=r});return c.forEach(e=>{"catch"==e.type&&Array.isArray(e.scope)&&(e.scope=e.scope.map(e=>{var r=o[e];return r&&r.id||e})),e.wires&&(e.wires=e.wires.map(e=>e.map(e=>{var r=o[e];return r&&"link out"==r.type?[...i.wires[0],(r||{}).id||e]:(r||{}).id||e}).flat()))}),{nodes:c.filter(e=>"link out"!=e.type),entryNodes:s.map(e=>o[e])}}catch(e){return console.log(e),!1}});r.remove_linkout_nodes&&r.copy_linkin_nodes&&Object.keys(u).forEach(s=>{let o=u[s];var e=o.links||[];"return"!=o.mode&&(e=e.map(e=>{var r=p[e],r=a(o,r);if(r)return[e,r]})).reduce((e,r)=>e&&!!r,!0)&&(t.push(s),e.forEach(([,i])=>{c.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o,t=r.wires[e].indexOf(s);-1<t&&(o=i.entryNodes.map(e=>e.id),r.wires[e].splice(t,1),r.wires[e].push(...o),n.push(...i.nodes))}})}))}),r.remove_linkcall_nodes&&i.forEach(i=>{var e=l[i],r=p[e.links[0]];let s=a(e,r);r&&s&&(o.push(e.id),c.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o,t=r.wires[e].indexOf(i);-1<t&&(o=s.entryNodes.map(e=>e.id),r.wires[e].splice(t,1),r.wires[e].push(...o),n.push(...s.nodes))}}))}),(c=c.filter(e=>t.indexOf(e.id)<0&&o.indexOf(e.id)<0)).push(...n)}if((c=r.remove_debugs?c.filter(e=>"debug"!=e.type):c).forEach(e=>{r.name&&(e.name=e.id),r.info&&(e.info="",delete e.outputLabels,delete e.inputLabels),r.position&&(e.x=150,e.y=150),r.remove_icons&&delete e.icon}),r.javascript){let o={},r=[];c.forEach(e=>{"javascript"!=(o[e.id]=e).format&&"function"!=e.type&&"css"!=e.format&&"json"!=e.format||r.push(e)});var e={parse:{bare_returns:!0,expression:!1},compress:{},mangle:{reserved:["$","export","require"]},output:null,sourceMap:null,nameCache:null,toplevel:!1,warnings:!1},t={compatibility:"*",level:2};$.ajax({url:"ClientCode/"+RED.nodes.id()+"/ugify",type:"POST",contentType:"application/json; charset=utf-8",data:JSON.stringify({nodes:r,jscfg:e,csscfg:t}),success:function(e){e.forEach(e=>{var r=o[e.id];e._error&&console.log("ERROR NODE",e),"function"==r.type?r.func=e.func:"javascript"!=r.format&&"css"!=r.format&&"json"!=r.format||(r.template=e.template)}),obfuscateHelpers.openImportDialog(c)},error:function(e,r,o){RED.notify("ClientCode Communcation Failure: "+n.id+": "+r,{type:"error",timeout:3e3})}})}else obfuscateHelpers.openImportDialog(c)}
6
6
 
7
7
  function setupTreelist(){var e=collectOrphans();if(0==e.length){RED.notify("No Orphans Found",{type:"warning",timeout:2e3});try{$("#node-input-orphan-target-container-div").treeList("empty")}catch(e){}}else{try{$("#node-input-orphan-target-container-div").treeList("empty")}catch(e){$("#node-input-orphan-target-container-div").css({width:"100%",height:"calc(100%)"}).treeList({multi:!1}).on("treelistitemmouseover",function(e,t){}).on("treelistitemmouseout",function(e,t){}).on("treelistselect",function(e,t){t.node&&(RED.workspaces.show(t.node.z,!1,!1,!0),RED.view.reveal(t.node.id,!0),RED.view.redraw())}).on("treelistconfirm",function(e,t){var n;t.node&&(n=t.node.id,setTimeout(()=>{var e=RED.nodes.node(n);e&&(RED.view.reveal(e.id),RED.view.select(e.id),RED.editor.edit(e)),n==RED.workspaces.active()&&RED.workspaces.edit()},50))}),$("#node-input-orphan-target-filter").show();var n=$("#node-input-orphan-target-filter").searchBox({style:"compact",delay:300,change:function(){var e,t=$(this).val().trim().toLowerCase();""===t?($("#node-input-orphan-target-container-div").treeList("filter",null),n.searchBox("count","")):(e=$("#node-input-orphan-target-container-div").treeList("filter",function(e){return-1<e.label.toLowerCase().indexOf(t)||-1<e.node.type.toLowerCase().indexOf(t)}),n.searchBox("count",e+" / "+$("#node-input-orphan-target-container-div").treeList("data").length))}})}$("#node-input-orphan-target-container-div").treeList("data",e.sort((e,t)=>e.node.z>t.node.z))}}function collectOrphans(){const t=new Set;var n=[],i=(RED.nodes.eachLink(e=>{t.add(e.source),t.add(e.target)}),RED.nodes.eachNode(e=>{t.has(e)||n.push(e)}),[]),r={};return n.forEach(function(e){var t=RED.nodes.getType(e.type);if(t){var n=t.label,n=("function"==typeof n?n.call(e):n)||"",o=e.type;if(0===o.indexOf("subflow:"))return}t&&n||(n=e.type),r[e.id]={node:e,label:n,sublabel:o,selected:!1,checkbox:!1},i.push(r[e.id])}),i}
8
8