@likec4/core 1.23.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/builder/index.d.mts +3 -3
  2. package/dist/builder/index.d.ts +3 -3
  3. package/dist/builder/index.mjs +2 -2
  4. package/dist/compute-view/index.d.mts +4 -4
  5. package/dist/compute-view/index.d.ts +4 -4
  6. package/dist/compute-view/index.mjs +4 -4
  7. package/dist/index.d.mts +7 -8
  8. package/dist/index.d.ts +7 -8
  9. package/dist/index.mjs +4 -4
  10. package/dist/model/index.d.mts +5 -5
  11. package/dist/model/index.d.ts +5 -5
  12. package/dist/model/index.mjs +1 -1
  13. package/dist/shared/{core.3xeQpJ_K.d.cts → core.3L0y_SNW.d.mts} +2 -2
  14. package/dist/shared/{core.QP35c488.d.cts → core.Bhx0OGK8.d.mts} +1 -1
  15. package/dist/shared/{core.QP35c488.d.mts → core.Bhx0OGK8.d.ts} +1 -1
  16. package/dist/shared/{core.DsDq-blc.d.ts → core.BreLKHbT.d.mts} +1 -2
  17. package/dist/shared/{core.DQCc-Jxk.d.ts → core.BsAIrb_r.d.ts} +1 -1
  18. package/dist/shared/{core.GIZxdz4M.mjs → core.C92OYZca.mjs} +1 -1
  19. package/dist/shared/{core.CJaCUZQ9.d.mts → core.C9UbC1nX.d.ts} +1 -2
  20. package/dist/shared/{core.s6UB2oA0.d.ts → core.DBToPQ3n.d.ts} +2 -2
  21. package/dist/shared/{core.1pNr6Ryk.d.ts → core.DbfQeUKm.d.mts} +5 -4
  22. package/dist/shared/core.FFJhmauw.mjs +2078 -0
  23. package/dist/shared/{core.BYs5deiY.d.cts → core.RiWsY3jz.d.mts} +1 -1
  24. package/dist/shared/{core.uGbvOLGK.mjs → core.gWObeLn9.mjs} +28 -9
  25. package/dist/shared/{core.DKJ2y3NP.d.mts → core.k4jahJ8j.d.ts} +5 -4
  26. package/dist/types/index.d.mts +4 -4
  27. package/dist/types/index.d.ts +4 -4
  28. package/dist/types/index.mjs +1 -1
  29. package/dist/utils/index.d.mts +46 -4
  30. package/dist/utils/index.d.ts +46 -4
  31. package/dist/utils/index.mjs +2 -2
  32. package/package.json +3 -27
  33. package/src/compute-view/deployment-view/clean-connections.ts +1 -1
  34. package/src/compute-view/deployment-view/stages/stage-final.ts +1 -1
  35. package/src/compute-view/element-view/compute.ts +1 -1
  36. package/src/compute-view/element-view/memory/memory.ts +1 -1
  37. package/src/compute-view/memory/ops.ts +1 -1
  38. package/src/compute-view/relationships-view/layout.ts +1 -1
  39. package/src/compute-view/relationships-view/utils.ts +1 -1
  40. package/src/model/DeploymentElementModel.ts +4 -6
  41. package/src/model/DeploymentModel.ts +1 -1
  42. package/src/model/LikeC4Model.ts +22 -1
  43. package/src/model/view/LikeC4ViewModel.ts +5 -6
  44. package/src/types/deployments.ts +0 -1
  45. package/src/types/index.ts +1 -1
  46. package/src/types/theme.ts +1 -1
  47. package/src/utils/index.ts +7 -1
  48. package/src/utils/mnemonist.ts +7 -0
  49. package/src/utils/set.ts +5 -3
  50. package/dist/builder/index.cjs +0 -887
  51. package/dist/builder/index.d.cts +0 -509
  52. package/dist/compute-view/index.cjs +0 -86
  53. package/dist/compute-view/index.d.cts +0 -23
  54. package/dist/index.cjs +0 -3857
  55. package/dist/index.d.cts +0 -146
  56. package/dist/model/index.cjs +0 -40
  57. package/dist/model/index.d.cts +0 -259
  58. package/dist/shared/core.BHQYwEvc.d.mts +0 -12
  59. package/dist/shared/core.BS_nXBsP.d.cts +0 -858
  60. package/dist/shared/core.BYiA0A6H.cjs +0 -39
  61. package/dist/shared/core.CEJQrbXY.cjs +0 -441
  62. package/dist/shared/core.D0KD4FiT.d.mts +0 -127
  63. package/dist/shared/core.DEzbhxsA.cjs +0 -14874
  64. package/dist/shared/core.DUbKSpjd.cjs +0 -26
  65. package/dist/shared/core.DqmAHWZs.cjs +0 -7501
  66. package/dist/shared/core.OjOfEBRQ.d.cts +0 -731
  67. package/dist/shared/core.QP35c488.d.ts +0 -185
  68. package/dist/shared/core.f1tiPwpd.mjs +0 -14819
  69. package/dist/types/index.cjs +0 -110
  70. package/dist/types/index.d.cts +0 -72
  71. package/dist/utils/index.cjs +0 -99
  72. package/dist/utils/index.d.cts +0 -340
@@ -0,0 +1,2078 @@
1
+ import { u as u$1, i as invariant } from './core.Btj1m6H6.mjs';
2
+
3
+ var e={done:true,hasNext:false},s={done:false,hasNext:false},a=()=>e;
4
+
5
+ function C(t,...o){let n=t,u=o.map(e=>"lazy"in e?A(e):void 0),p=0;for(;p<o.length;){if(u[p]===void 0||!B(n)){let i=o[p];n=i(n),p+=1;continue}let r=[];for(let i=p;i<o.length;i++){let l=u[i];if(l===void 0||(r.push(l),l.isSingle))break}let a=[];for(let i of n)if(y(i,a,r))break;let{isSingle:s}=r.at(-1);n=s?a[0]:a,p+=r.length;}return n}function y(t,o,n){if(n.length===0)return o.push(t),false;let u=t,p=s,e=false;for(let[r,a]of n.entries()){let{index:s,items:i}=a;if(i.push(u),p=a(u,s,i),a.index+=1,p.hasNext){if(p.hasMany??false){for(let l of p.next)if(y(l,o,n.slice(r+1)))return true;return e}u=p.next;}if(!p.hasNext)break;p.done&&(e=true);}return p.hasNext&&o.push(u),e}function A(t){let{lazy:o,lazyArgs:n}=t,u=o(...n);return Object.assign(u,{isSingle:o.single??false,index:0,items:[]})}function B(t){return typeof t=="string"||typeof t=="object"&&t!==null&&Symbol.iterator in t}
6
+
7
+ function d(...e){return u$1(i$2,e,o$1)}var i$2=(e,n)=>e.length<n.length?e.map((t,r)=>[t,n[r]]):n.map((t,r)=>[e[r],t]),o$1=e=>(n,t)=>({hasNext:true,next:[n,e[t]],done:t>=e.length-1});
8
+
9
+ function i$1(...e){return u$1(r,e)}var r=(e,t)=>e.length>=t;
10
+
11
+ function u(...e){return u$1(i,e)}function i(e,a){let n=[];for(let[o,r]of e.entries()){if(!a(r,o,e))break;n.push(r);}return n}
12
+
13
+ function m(...a){return u$1(o,a,p)}var o=(a,e)=>a.map(e),p=a=>(e,t,r)=>({done:false,hasNext:true,next:a(e,t,r)});
14
+
15
+ function t$1(r){return typeof r=="string"}
16
+
17
+ function t(n){return typeof n=="function"}
18
+
19
+ function l(n){return n!=null}
20
+
21
+ function n(e){return e!==void 0}
22
+
23
+ function getDefaultExportFromCjs (x) {
24
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
25
+ }
26
+
27
+ /**
28
+ * Mnemonist DefaultMap
29
+ * =====================
30
+ *
31
+ * JavaScript implementation of a default map that will return a constructed
32
+ * value any time one tries to access an inexisting key. It's quite similar
33
+ * to python's defaultdict.
34
+ */
35
+
36
+ var defaultMap;
37
+ var hasRequiredDefaultMap;
38
+
39
+ function requireDefaultMap () {
40
+ if (hasRequiredDefaultMap) return defaultMap;
41
+ hasRequiredDefaultMap = 1;
42
+ /**
43
+ * DefaultMap.
44
+ *
45
+ * @constructor
46
+ */
47
+ function DefaultMap(factory) {
48
+ if (typeof factory !== 'function')
49
+ throw new Error('mnemonist/DefaultMap.constructor: expecting a function.');
50
+
51
+ this.items = new Map();
52
+ this.factory = factory;
53
+ this.size = 0;
54
+ }
55
+
56
+ /**
57
+ * Method used to clear the structure.
58
+ *
59
+ * @return {undefined}
60
+ */
61
+ DefaultMap.prototype.clear = function() {
62
+
63
+ // Properties
64
+ this.items.clear();
65
+ this.size = 0;
66
+ };
67
+
68
+ /**
69
+ * Method used to get the value set for given key. If the key does not exist,
70
+ * the value will be created using the provided factory.
71
+ *
72
+ * @param {any} key - Target key.
73
+ * @return {any}
74
+ */
75
+ DefaultMap.prototype.get = function(key) {
76
+ var value = this.items.get(key);
77
+
78
+ if (typeof value === 'undefined') {
79
+ value = this.factory(key, this.size);
80
+ this.items.set(key, value);
81
+ this.size++;
82
+ }
83
+
84
+ return value;
85
+ };
86
+
87
+ /**
88
+ * Method used to get the value set for given key. If the key does not exist,
89
+ * a value won't be created.
90
+ *
91
+ * @param {any} key - Target key.
92
+ * @return {any}
93
+ */
94
+ DefaultMap.prototype.peek = function(key) {
95
+ return this.items.get(key);
96
+ };
97
+
98
+ /**
99
+ * Method used to set a value for given key.
100
+ *
101
+ * @param {any} key - Target key.
102
+ * @param {any} value - Value.
103
+ * @return {DefaultMap}
104
+ */
105
+ DefaultMap.prototype.set = function(key, value) {
106
+ this.items.set(key, value);
107
+ this.size = this.items.size;
108
+
109
+ return this;
110
+ };
111
+
112
+ /**
113
+ * Method used to test the existence of a key in the map.
114
+ *
115
+ * @param {any} key - Target key.
116
+ * @return {boolean}
117
+ */
118
+ DefaultMap.prototype.has = function(key) {
119
+ return this.items.has(key);
120
+ };
121
+
122
+ /**
123
+ * Method used to delete target key.
124
+ *
125
+ * @param {any} key - Target key.
126
+ * @return {boolean}
127
+ */
128
+ DefaultMap.prototype.delete = function(key) {
129
+ var deleted = this.items.delete(key);
130
+
131
+ this.size = this.items.size;
132
+
133
+ return deleted;
134
+ };
135
+
136
+ /**
137
+ * Method used to iterate over each of the key/value pairs.
138
+ *
139
+ * @param {function} callback - Function to call for each item.
140
+ * @param {object} scope - Optional scope.
141
+ * @return {undefined}
142
+ */
143
+ DefaultMap.prototype.forEach = function(callback, scope) {
144
+ scope = arguments.length > 1 ? scope : this;
145
+
146
+ this.items.forEach(callback, scope);
147
+ };
148
+
149
+ /**
150
+ * Iterators.
151
+ */
152
+ DefaultMap.prototype.entries = function() {
153
+ return this.items.entries();
154
+ };
155
+
156
+ DefaultMap.prototype.keys = function() {
157
+ return this.items.keys();
158
+ };
159
+
160
+ DefaultMap.prototype.values = function() {
161
+ return this.items.values();
162
+ };
163
+
164
+ /**
165
+ * Attaching the #.entries method to Symbol.iterator if possible.
166
+ */
167
+ if (typeof Symbol !== 'undefined')
168
+ DefaultMap.prototype[Symbol.iterator] = DefaultMap.prototype.entries;
169
+
170
+ /**
171
+ * Convenience known methods.
172
+ */
173
+ DefaultMap.prototype.inspect = function() {
174
+ return this.items;
175
+ };
176
+
177
+ if (typeof Symbol !== 'undefined')
178
+ DefaultMap.prototype[Symbol.for('nodejs.util.inspect.custom')] = DefaultMap.prototype.inspect;
179
+
180
+ /**
181
+ * Typical factories.
182
+ */
183
+ DefaultMap.autoIncrement = function() {
184
+ var i = 0;
185
+
186
+ return function() {
187
+ return i++;
188
+ };
189
+ };
190
+
191
+ /**
192
+ * Exporting.
193
+ */
194
+ defaultMap = DefaultMap;
195
+ return defaultMap;
196
+ }
197
+
198
+ var defaultMapExports = requireDefaultMap();
199
+ const DefaultMap = /*@__PURE__*/getDefaultExportFromCjs(defaultMapExports);
200
+
201
+ /**
202
+ * Mnemonist DefaultWeakMap
203
+ * =========================
204
+ *
205
+ * JavaScript implementation of a default weak map that will return a constructed
206
+ * value any time one tries to access an non-existing key. It is similar to
207
+ * DefaultMap but uses ES6 WeakMap that only holds weak reference to keys.
208
+ */
209
+
210
+ var defaultWeakMap$1;
211
+ var hasRequiredDefaultWeakMap;
212
+
213
+ function requireDefaultWeakMap () {
214
+ if (hasRequiredDefaultWeakMap) return defaultWeakMap$1;
215
+ hasRequiredDefaultWeakMap = 1;
216
+ /**
217
+ * DefaultWeakMap.
218
+ *
219
+ * @constructor
220
+ */
221
+ function DefaultWeakMap(factory) {
222
+ if (typeof factory !== 'function')
223
+ throw new Error('mnemonist/DefaultWeakMap.constructor: expecting a function.');
224
+
225
+ this.items = new WeakMap();
226
+ this.factory = factory;
227
+ }
228
+
229
+ /**
230
+ * Method used to clear the structure.
231
+ *
232
+ * @return {undefined}
233
+ */
234
+ DefaultWeakMap.prototype.clear = function() {
235
+
236
+ // Properties
237
+ this.items = new WeakMap();
238
+ };
239
+
240
+ /**
241
+ * Method used to get the value set for given key. If the key does not exist,
242
+ * the value will be created using the provided factory.
243
+ *
244
+ * @param {any} key - Target key.
245
+ * @return {any}
246
+ */
247
+ DefaultWeakMap.prototype.get = function(key) {
248
+ var value = this.items.get(key);
249
+
250
+ if (typeof value === 'undefined') {
251
+ value = this.factory(key);
252
+ this.items.set(key, value);
253
+ }
254
+
255
+ return value;
256
+ };
257
+
258
+ /**
259
+ * Method used to get the value set for given key. If the key does not exist,
260
+ * a value won't be created.
261
+ *
262
+ * @param {any} key - Target key.
263
+ * @return {any}
264
+ */
265
+ DefaultWeakMap.prototype.peek = function(key) {
266
+ return this.items.get(key);
267
+ };
268
+
269
+ /**
270
+ * Method used to set a value for given key.
271
+ *
272
+ * @param {any} key - Target key.
273
+ * @param {any} value - Value.
274
+ * @return {DefaultMap}
275
+ */
276
+ DefaultWeakMap.prototype.set = function(key, value) {
277
+ this.items.set(key, value);
278
+ return this;
279
+ };
280
+
281
+ /**
282
+ * Method used to test the existence of a key in the map.
283
+ *
284
+ * @param {any} key - Target key.
285
+ * @return {boolean}
286
+ */
287
+ DefaultWeakMap.prototype.has = function(key) {
288
+ return this.items.has(key);
289
+ };
290
+
291
+ /**
292
+ * Method used to delete target key.
293
+ *
294
+ * @param {any} key - Target key.
295
+ * @return {boolean}
296
+ */
297
+ DefaultWeakMap.prototype.delete = function(key) {
298
+ return this.items.delete(key);
299
+ };
300
+
301
+ /**
302
+ * Convenience known methods.
303
+ */
304
+ DefaultWeakMap.prototype.inspect = function() {
305
+ return this.items;
306
+ };
307
+
308
+ if (typeof Symbol !== 'undefined')
309
+ DefaultWeakMap.prototype[Symbol.for('nodejs.util.inspect.custom')] = DefaultWeakMap.prototype.inspect;
310
+
311
+ /**
312
+ * Exporting.
313
+ */
314
+ defaultWeakMap$1 = DefaultWeakMap;
315
+ return defaultWeakMap$1;
316
+ }
317
+
318
+ var defaultWeakMapExports = requireDefaultWeakMap();
319
+ const defaultWeakMap = /*@__PURE__*/getDefaultExportFromCjs(defaultWeakMapExports);
320
+
321
+ /**
322
+ * Obliterator Iterator Class
323
+ * ===========================
324
+ *
325
+ * Simple class representing the library's iterators.
326
+ */
327
+
328
+ var iterator;
329
+ var hasRequiredIterator;
330
+
331
+ function requireIterator () {
332
+ if (hasRequiredIterator) return iterator;
333
+ hasRequiredIterator = 1;
334
+ /**
335
+ * Iterator class.
336
+ *
337
+ * @constructor
338
+ * @param {function} next - Next function.
339
+ */
340
+ function Iterator(next) {
341
+ if (typeof next !== 'function')
342
+ throw new Error('obliterator/iterator: expecting a function!');
343
+
344
+ this.next = next;
345
+ }
346
+
347
+ /**
348
+ * If symbols are supported, we add `next` to `Symbol.iterator`.
349
+ */
350
+ if (typeof Symbol !== 'undefined')
351
+ Iterator.prototype[Symbol.iterator] = function () {
352
+ return this;
353
+ };
354
+
355
+ /**
356
+ * Returning an iterator of the given values.
357
+ *
358
+ * @param {any...} values - Values.
359
+ * @return {Iterator}
360
+ */
361
+ Iterator.of = function () {
362
+ var args = arguments,
363
+ l = args.length,
364
+ i = 0;
365
+
366
+ return new Iterator(function () {
367
+ if (i >= l) return {done: true};
368
+
369
+ return {done: false, value: args[i++]};
370
+ });
371
+ };
372
+
373
+ /**
374
+ * Returning an empty iterator.
375
+ *
376
+ * @return {Iterator}
377
+ */
378
+ Iterator.empty = function () {
379
+ var iterator = new Iterator(function () {
380
+ return {done: true};
381
+ });
382
+
383
+ return iterator;
384
+ };
385
+
386
+ /**
387
+ * Returning an iterator over the given indexed sequence.
388
+ *
389
+ * @param {string|Array} sequence - Target sequence.
390
+ * @return {Iterator}
391
+ */
392
+ Iterator.fromSequence = function (sequence) {
393
+ var i = 0,
394
+ l = sequence.length;
395
+
396
+ return new Iterator(function () {
397
+ if (i >= l) return {done: true};
398
+
399
+ return {done: false, value: sequence[i++]};
400
+ });
401
+ };
402
+
403
+ /**
404
+ * Returning whether the given value is an iterator.
405
+ *
406
+ * @param {any} value - Value.
407
+ * @return {boolean}
408
+ */
409
+ Iterator.is = function (value) {
410
+ if (value instanceof Iterator) return true;
411
+
412
+ return (
413
+ typeof value === 'object' &&
414
+ value !== null &&
415
+ typeof value.next === 'function'
416
+ );
417
+ };
418
+
419
+ /**
420
+ * Exporting.
421
+ */
422
+ iterator = Iterator;
423
+ return iterator;
424
+ }
425
+
426
+ var support = {};
427
+
428
+ var hasRequiredSupport;
429
+
430
+ function requireSupport () {
431
+ if (hasRequiredSupport) return support;
432
+ hasRequiredSupport = 1;
433
+ support.ARRAY_BUFFER_SUPPORT = typeof ArrayBuffer !== 'undefined';
434
+ support.SYMBOL_SUPPORT = typeof Symbol !== 'undefined';
435
+ return support;
436
+ }
437
+
438
+ /**
439
+ * Obliterator ForEach Function
440
+ * =============================
441
+ *
442
+ * Helper function used to easily iterate over mixed values.
443
+ */
444
+
445
+ var foreach;
446
+ var hasRequiredForeach;
447
+
448
+ function requireForeach () {
449
+ if (hasRequiredForeach) return foreach;
450
+ hasRequiredForeach = 1;
451
+ var support = requireSupport();
452
+
453
+ var ARRAY_BUFFER_SUPPORT = support.ARRAY_BUFFER_SUPPORT;
454
+ var SYMBOL_SUPPORT = support.SYMBOL_SUPPORT;
455
+
456
+ /**
457
+ * Function able to iterate over almost any iterable JS value.
458
+ *
459
+ * @param {any} iterable - Iterable value.
460
+ * @param {function} callback - Callback function.
461
+ */
462
+ foreach = function forEach(iterable, callback) {
463
+ var iterator, k, i, l, s;
464
+
465
+ if (!iterable) throw new Error('obliterator/forEach: invalid iterable.');
466
+
467
+ if (typeof callback !== 'function')
468
+ throw new Error('obliterator/forEach: expecting a callback.');
469
+
470
+ // The target is an array or a string or function arguments
471
+ if (
472
+ Array.isArray(iterable) ||
473
+ (ARRAY_BUFFER_SUPPORT && ArrayBuffer.isView(iterable)) ||
474
+ typeof iterable === 'string' ||
475
+ iterable.toString() === '[object Arguments]'
476
+ ) {
477
+ for (i = 0, l = iterable.length; i < l; i++) callback(iterable[i], i);
478
+ return;
479
+ }
480
+
481
+ // The target has a #.forEach method
482
+ if (typeof iterable.forEach === 'function') {
483
+ iterable.forEach(callback);
484
+ return;
485
+ }
486
+
487
+ // The target is iterable
488
+ if (
489
+ SYMBOL_SUPPORT &&
490
+ Symbol.iterator in iterable &&
491
+ typeof iterable.next !== 'function'
492
+ ) {
493
+ iterable = iterable[Symbol.iterator]();
494
+ }
495
+
496
+ // The target is an iterator
497
+ if (typeof iterable.next === 'function') {
498
+ iterator = iterable;
499
+ i = 0;
500
+
501
+ while (((s = iterator.next()), s.done !== true)) {
502
+ callback(s.value, i);
503
+ i++;
504
+ }
505
+
506
+ return;
507
+ }
508
+
509
+ // The target is a plain object
510
+ for (k in iterable) {
511
+ if (iterable.hasOwnProperty(k)) {
512
+ callback(iterable[k], k);
513
+ }
514
+ }
515
+
516
+ return;
517
+ };
518
+ return foreach;
519
+ }
520
+
521
+ /**
522
+ * Mnemonist Linked List
523
+ * ======================
524
+ *
525
+ * Singly linked list implementation. Uses raw JavaScript objects as nodes
526
+ * as benchmarks proved it was the fastest thing to do.
527
+ */
528
+
529
+ var linkedList$1;
530
+ var hasRequiredLinkedList;
531
+
532
+ function requireLinkedList () {
533
+ if (hasRequiredLinkedList) return linkedList$1;
534
+ hasRequiredLinkedList = 1;
535
+ var Iterator = requireIterator(),
536
+ forEach = requireForeach();
537
+
538
+ /**
539
+ * Linked List.
540
+ *
541
+ * @constructor
542
+ */
543
+ function LinkedList() {
544
+ this.clear();
545
+ }
546
+
547
+ /**
548
+ * Method used to clear the list.
549
+ *
550
+ * @return {undefined}
551
+ */
552
+ LinkedList.prototype.clear = function() {
553
+
554
+ // Properties
555
+ this.head = null;
556
+ this.tail = null;
557
+ this.size = 0;
558
+ };
559
+
560
+ /**
561
+ * Method used to get the first item of the list.
562
+ *
563
+ * @return {any}
564
+ */
565
+ LinkedList.prototype.first = function() {
566
+ return this.head ? this.head.item : undefined;
567
+ };
568
+ LinkedList.prototype.peek = LinkedList.prototype.first;
569
+
570
+ /**
571
+ * Method used to get the last item of the list.
572
+ *
573
+ * @return {any}
574
+ */
575
+ LinkedList.prototype.last = function() {
576
+ return this.tail ? this.tail.item : undefined;
577
+ };
578
+
579
+ /**
580
+ * Method used to add an item at the end of the list.
581
+ *
582
+ * @param {any} item - The item to add.
583
+ * @return {number}
584
+ */
585
+ LinkedList.prototype.push = function(item) {
586
+ var node = {item: item, next: null};
587
+
588
+ if (!this.head) {
589
+ this.head = node;
590
+ this.tail = node;
591
+ }
592
+ else {
593
+ this.tail.next = node;
594
+ this.tail = node;
595
+ }
596
+
597
+ this.size++;
598
+
599
+ return this.size;
600
+ };
601
+
602
+ /**
603
+ * Method used to add an item at the beginning of the list.
604
+ *
605
+ * @param {any} item - The item to add.
606
+ * @return {number}
607
+ */
608
+ LinkedList.prototype.unshift = function(item) {
609
+ var node = {item: item, next: null};
610
+
611
+ if (!this.head) {
612
+ this.head = node;
613
+ this.tail = node;
614
+ }
615
+ else {
616
+ if (!this.head.next)
617
+ this.tail = this.head;
618
+ node.next = this.head;
619
+ this.head = node;
620
+ }
621
+
622
+ this.size++;
623
+
624
+ return this.size;
625
+ };
626
+
627
+ /**
628
+ * Method used to retrieve & remove the first item of the list.
629
+ *
630
+ * @return {any}
631
+ */
632
+ LinkedList.prototype.shift = function() {
633
+ if (!this.size)
634
+ return undefined;
635
+
636
+ var node = this.head;
637
+
638
+ this.head = node.next;
639
+ this.size--;
640
+
641
+ return node.item;
642
+ };
643
+
644
+ /**
645
+ * Method used to iterate over the list.
646
+ *
647
+ * @param {function} callback - Function to call for each item.
648
+ * @param {object} scope - Optional scope.
649
+ * @return {undefined}
650
+ */
651
+ LinkedList.prototype.forEach = function(callback, scope) {
652
+ if (!this.size)
653
+ return;
654
+
655
+ scope = arguments.length > 1 ? scope : this;
656
+
657
+ var n = this.head,
658
+ i = 0;
659
+
660
+ while (n) {
661
+ callback.call(scope, n.item, i, this);
662
+ n = n.next;
663
+ i++;
664
+ }
665
+ };
666
+
667
+ /**
668
+ * Method used to convert the list into an array.
669
+ *
670
+ * @return {array}
671
+ */
672
+ LinkedList.prototype.toArray = function() {
673
+ if (!this.size)
674
+ return [];
675
+
676
+ var array = new Array(this.size);
677
+
678
+ for (var i = 0, l = this.size, n = this.head; i < l; i++) {
679
+ array[i] = n.item;
680
+ n = n.next;
681
+ }
682
+
683
+ return array;
684
+ };
685
+
686
+ /**
687
+ * Method used to create an iterator over a list's values.
688
+ *
689
+ * @return {Iterator}
690
+ */
691
+ LinkedList.prototype.values = function() {
692
+ var n = this.head;
693
+
694
+ return new Iterator(function() {
695
+ if (!n)
696
+ return {
697
+ done: true
698
+ };
699
+
700
+ var value = n.item;
701
+ n = n.next;
702
+
703
+ return {
704
+ value: value,
705
+ done: false
706
+ };
707
+ });
708
+ };
709
+
710
+ /**
711
+ * Method used to create an iterator over a list's entries.
712
+ *
713
+ * @return {Iterator}
714
+ */
715
+ LinkedList.prototype.entries = function() {
716
+ var n = this.head,
717
+ i = 0;
718
+
719
+ return new Iterator(function() {
720
+ if (!n)
721
+ return {
722
+ done: true
723
+ };
724
+
725
+ var value = n.item;
726
+ n = n.next;
727
+ i++;
728
+
729
+ return {
730
+ value: [i - 1, value],
731
+ done: false
732
+ };
733
+ });
734
+ };
735
+
736
+ /**
737
+ * Attaching the #.values method to Symbol.iterator if possible.
738
+ */
739
+ if (typeof Symbol !== 'undefined')
740
+ LinkedList.prototype[Symbol.iterator] = LinkedList.prototype.values;
741
+
742
+ /**
743
+ * Convenience known methods.
744
+ */
745
+ LinkedList.prototype.toString = function() {
746
+ return this.toArray().join(',');
747
+ };
748
+
749
+ LinkedList.prototype.toJSON = function() {
750
+ return this.toArray();
751
+ };
752
+
753
+ LinkedList.prototype.inspect = function() {
754
+ var array = this.toArray();
755
+
756
+ // Trick so that node displays the name of the constructor
757
+ Object.defineProperty(array, 'constructor', {
758
+ value: LinkedList,
759
+ enumerable: false
760
+ });
761
+
762
+ return array;
763
+ };
764
+
765
+ if (typeof Symbol !== 'undefined')
766
+ LinkedList.prototype[Symbol.for('nodejs.util.inspect.custom')] = LinkedList.prototype.inspect;
767
+
768
+ /**
769
+ * Static @.from function taking an arbitrary iterable & converting it into
770
+ * a list.
771
+ *
772
+ * @param {Iterable} iterable - Target iterable.
773
+ * @return {LinkedList}
774
+ */
775
+ LinkedList.from = function(iterable) {
776
+ var list = new LinkedList();
777
+
778
+ forEach(iterable, function(value) {
779
+ list.push(value);
780
+ });
781
+
782
+ return list;
783
+ };
784
+
785
+ /**
786
+ * Exporting.
787
+ */
788
+ linkedList$1 = LinkedList;
789
+ return linkedList$1;
790
+ }
791
+
792
+ var linkedListExports = requireLinkedList();
793
+ const linkedList = /*@__PURE__*/getDefaultExportFromCjs(linkedListExports);
794
+
795
+ /**
796
+ * Mnemonist Queue
797
+ * ================
798
+ *
799
+ * Queue implementation based on the ideas of Queue.js that seems to beat
800
+ * a LinkedList one in performance.
801
+ */
802
+
803
+ var queue$1;
804
+ var hasRequiredQueue;
805
+
806
+ function requireQueue () {
807
+ if (hasRequiredQueue) return queue$1;
808
+ hasRequiredQueue = 1;
809
+ var Iterator = requireIterator(),
810
+ forEach = requireForeach();
811
+
812
+ /**
813
+ * Queue
814
+ *
815
+ * @constructor
816
+ */
817
+ function Queue() {
818
+ this.clear();
819
+ }
820
+
821
+ /**
822
+ * Method used to clear the queue.
823
+ *
824
+ * @return {undefined}
825
+ */
826
+ Queue.prototype.clear = function() {
827
+
828
+ // Properties
829
+ this.items = [];
830
+ this.offset = 0;
831
+ this.size = 0;
832
+ };
833
+
834
+ /**
835
+ * Method used to add an item to the queue.
836
+ *
837
+ * @param {any} item - Item to enqueue.
838
+ * @return {number}
839
+ */
840
+ Queue.prototype.enqueue = function(item) {
841
+
842
+ this.items.push(item);
843
+ return ++this.size;
844
+ };
845
+
846
+ /**
847
+ * Method used to retrieve & remove the first item of the queue.
848
+ *
849
+ * @return {any}
850
+ */
851
+ Queue.prototype.dequeue = function() {
852
+ if (!this.size)
853
+ return;
854
+
855
+ var item = this.items[this.offset];
856
+
857
+ if (++this.offset * 2 >= this.items.length) {
858
+ this.items = this.items.slice(this.offset);
859
+ this.offset = 0;
860
+ }
861
+
862
+ this.size--;
863
+
864
+ return item;
865
+ };
866
+
867
+ /**
868
+ * Method used to retrieve the first item of the queue.
869
+ *
870
+ * @return {any}
871
+ */
872
+ Queue.prototype.peek = function() {
873
+ if (!this.size)
874
+ return;
875
+
876
+ return this.items[this.offset];
877
+ };
878
+
879
+ /**
880
+ * Method used to iterate over the queue.
881
+ *
882
+ * @param {function} callback - Function to call for each item.
883
+ * @param {object} scope - Optional scope.
884
+ * @return {undefined}
885
+ */
886
+ Queue.prototype.forEach = function(callback, scope) {
887
+ scope = arguments.length > 1 ? scope : this;
888
+
889
+ for (var i = this.offset, j = 0, l = this.items.length; i < l; i++, j++)
890
+ callback.call(scope, this.items[i], j, this);
891
+ };
892
+
893
+ /*
894
+ * Method used to convert the queue to a JavaScript array.
895
+ *
896
+ * @return {array}
897
+ */
898
+ Queue.prototype.toArray = function() {
899
+ return this.items.slice(this.offset);
900
+ };
901
+
902
+ /**
903
+ * Method used to create an iterator over a queue's values.
904
+ *
905
+ * @return {Iterator}
906
+ */
907
+ Queue.prototype.values = function() {
908
+ var items = this.items,
909
+ i = this.offset;
910
+
911
+ return new Iterator(function() {
912
+ if (i >= items.length)
913
+ return {
914
+ done: true
915
+ };
916
+
917
+ var value = items[i];
918
+ i++;
919
+
920
+ return {
921
+ value: value,
922
+ done: false
923
+ };
924
+ });
925
+ };
926
+
927
+ /**
928
+ * Method used to create an iterator over a queue's entries.
929
+ *
930
+ * @return {Iterator}
931
+ */
932
+ Queue.prototype.entries = function() {
933
+ var items = this.items,
934
+ i = this.offset,
935
+ j = 0;
936
+
937
+ return new Iterator(function() {
938
+ if (i >= items.length)
939
+ return {
940
+ done: true
941
+ };
942
+
943
+ var value = items[i];
944
+ i++;
945
+
946
+ return {
947
+ value: [j++, value],
948
+ done: false
949
+ };
950
+ });
951
+ };
952
+
953
+ /**
954
+ * Attaching the #.values method to Symbol.iterator if possible.
955
+ */
956
+ if (typeof Symbol !== 'undefined')
957
+ Queue.prototype[Symbol.iterator] = Queue.prototype.values;
958
+
959
+ /**
960
+ * Convenience known methods.
961
+ */
962
+ Queue.prototype.toString = function() {
963
+ return this.toArray().join(',');
964
+ };
965
+
966
+ Queue.prototype.toJSON = function() {
967
+ return this.toArray();
968
+ };
969
+
970
+ Queue.prototype.inspect = function() {
971
+ var array = this.toArray();
972
+
973
+ // Trick so that node displays the name of the constructor
974
+ Object.defineProperty(array, 'constructor', {
975
+ value: Queue,
976
+ enumerable: false
977
+ });
978
+
979
+ return array;
980
+ };
981
+
982
+ if (typeof Symbol !== 'undefined')
983
+ Queue.prototype[Symbol.for('nodejs.util.inspect.custom')] = Queue.prototype.inspect;
984
+
985
+ /**
986
+ * Static @.from function taking an arbitrary iterable & converting it into
987
+ * a queue.
988
+ *
989
+ * @param {Iterable} iterable - Target iterable.
990
+ * @return {Queue}
991
+ */
992
+ Queue.from = function(iterable) {
993
+ var queue = new Queue();
994
+
995
+ forEach(iterable, function(value) {
996
+ queue.enqueue(value);
997
+ });
998
+
999
+ return queue;
1000
+ };
1001
+
1002
+ /**
1003
+ * Static @.of function taking an arbitrary number of arguments & converting it
1004
+ * into a queue.
1005
+ *
1006
+ * @param {...any} args
1007
+ * @return {Queue}
1008
+ */
1009
+ Queue.of = function() {
1010
+ return Queue.from(arguments);
1011
+ };
1012
+
1013
+ /**
1014
+ * Exporting.
1015
+ */
1016
+ queue$1 = Queue;
1017
+ return queue$1;
1018
+ }
1019
+
1020
+ var queueExports = requireQueue();
1021
+ const queue = /*@__PURE__*/getDefaultExportFromCjs(queueExports);
1022
+
1023
+ var set = {};
1024
+
1025
+ /**
1026
+ * Mnemonist Set
1027
+ * ==============
1028
+ *
1029
+ * Useful function related to sets such as union, intersection and so on...
1030
+ */
1031
+
1032
+ var hasRequiredSet;
1033
+
1034
+ function requireSet () {
1035
+ if (hasRequiredSet) return set;
1036
+ hasRequiredSet = 1;
1037
+ (function (exports) {
1038
+ // TODO: optimize versions for less variadicities
1039
+
1040
+ /**
1041
+ * Variadic function computing the intersection of multiple sets.
1042
+ *
1043
+ * @param {...Set} sets - Sets to intersect.
1044
+ * @return {Set} - The intesection.
1045
+ */
1046
+ exports.intersection = function() {
1047
+ if (arguments.length < 2)
1048
+ throw new Error('mnemonist/Set.intersection: needs at least two arguments.');
1049
+
1050
+ var I = new Set();
1051
+
1052
+ // First we need to find the smallest set
1053
+ var smallestSize = Infinity,
1054
+ smallestSet = null;
1055
+
1056
+ var s, i, l = arguments.length;
1057
+
1058
+ for (i = 0; i < l; i++) {
1059
+ s = arguments[i];
1060
+
1061
+ // If one of the set has no items, we can stop right there
1062
+ if (s.size === 0)
1063
+ return I;
1064
+
1065
+ if (s.size < smallestSize) {
1066
+ smallestSize = s.size;
1067
+ smallestSet = s;
1068
+ }
1069
+ }
1070
+
1071
+ // Now we need to intersect this set with the others
1072
+ var iterator = smallestSet.values(),
1073
+ step,
1074
+ item,
1075
+ add,
1076
+ set;
1077
+
1078
+ // TODO: we can optimize by iterating each next time over the current intersection
1079
+ // but this probably means more RAM to consume since we'll create n-1 sets rather than
1080
+ // only the one.
1081
+ while ((step = iterator.next(), !step.done)) {
1082
+ item = step.value;
1083
+ add = true;
1084
+
1085
+ for (i = 0; i < l; i++) {
1086
+ set = arguments[i];
1087
+
1088
+ if (set === smallestSet)
1089
+ continue;
1090
+
1091
+ if (!set.has(item)) {
1092
+ add = false;
1093
+ break;
1094
+ }
1095
+ }
1096
+
1097
+ if (add)
1098
+ I.add(item);
1099
+ }
1100
+
1101
+ return I;
1102
+ };
1103
+
1104
+ /**
1105
+ * Variadic function computing the union of multiple sets.
1106
+ *
1107
+ * @param {...Set} sets - Sets to unite.
1108
+ * @return {Set} - The union.
1109
+ */
1110
+ exports.union = function() {
1111
+ if (arguments.length < 2)
1112
+ throw new Error('mnemonist/Set.union: needs at least two arguments.');
1113
+
1114
+ var U = new Set();
1115
+
1116
+ var i, l = arguments.length;
1117
+
1118
+ var iterator,
1119
+ step;
1120
+
1121
+ for (i = 0; i < l; i++) {
1122
+ iterator = arguments[i].values();
1123
+
1124
+ while ((step = iterator.next(), !step.done))
1125
+ U.add(step.value);
1126
+ }
1127
+
1128
+ return U;
1129
+ };
1130
+
1131
+ /**
1132
+ * Function computing the difference between two sets.
1133
+ *
1134
+ * @param {Set} A - First set.
1135
+ * @param {Set} B - Second set.
1136
+ * @return {Set} - The difference.
1137
+ */
1138
+ exports.difference = function(A, B) {
1139
+
1140
+ // If first set is empty
1141
+ if (!A.size)
1142
+ return new Set();
1143
+
1144
+ if (!B.size)
1145
+ return new Set(A);
1146
+
1147
+ var D = new Set();
1148
+
1149
+ var iterator = A.values(),
1150
+ step;
1151
+
1152
+ while ((step = iterator.next(), !step.done)) {
1153
+ if (!B.has(step.value))
1154
+ D.add(step.value);
1155
+ }
1156
+
1157
+ return D;
1158
+ };
1159
+
1160
+ /**
1161
+ * Function computing the symmetric difference between two sets.
1162
+ *
1163
+ * @param {Set} A - First set.
1164
+ * @param {Set} B - Second set.
1165
+ * @return {Set} - The symmetric difference.
1166
+ */
1167
+ exports.symmetricDifference = function(A, B) {
1168
+ var S = new Set();
1169
+
1170
+ var iterator = A.values(),
1171
+ step;
1172
+
1173
+ while ((step = iterator.next(), !step.done)) {
1174
+ if (!B.has(step.value))
1175
+ S.add(step.value);
1176
+ }
1177
+
1178
+ iterator = B.values();
1179
+
1180
+ while ((step = iterator.next(), !step.done)) {
1181
+ if (!A.has(step.value))
1182
+ S.add(step.value);
1183
+ }
1184
+
1185
+ return S;
1186
+ };
1187
+
1188
+ /**
1189
+ * Function returning whether A is a subset of B.
1190
+ *
1191
+ * @param {Set} A - First set.
1192
+ * @param {Set} B - Second set.
1193
+ * @return {boolean}
1194
+ */
1195
+ exports.isSubset = function(A, B) {
1196
+ var iterator = A.values(),
1197
+ step;
1198
+
1199
+ // Shortcuts
1200
+ if (A === B)
1201
+ return true;
1202
+
1203
+ if (A.size > B.size)
1204
+ return false;
1205
+
1206
+ while ((step = iterator.next(), !step.done)) {
1207
+ if (!B.has(step.value))
1208
+ return false;
1209
+ }
1210
+
1211
+ return true;
1212
+ };
1213
+
1214
+ /**
1215
+ * Function returning whether A is a superset of B.
1216
+ *
1217
+ * @param {Set} A - First set.
1218
+ * @param {Set} B - Second set.
1219
+ * @return {boolean}
1220
+ */
1221
+ exports.isSuperset = function(A, B) {
1222
+ return exports.isSubset(B, A);
1223
+ };
1224
+
1225
+ /**
1226
+ * Function adding the items of set B to the set A.
1227
+ *
1228
+ * @param {Set} A - First set.
1229
+ * @param {Set} B - Second set.
1230
+ */
1231
+ exports.add = function(A, B) {
1232
+ var iterator = B.values(),
1233
+ step;
1234
+
1235
+ while ((step = iterator.next(), !step.done))
1236
+ A.add(step.value);
1237
+
1238
+ return;
1239
+ };
1240
+
1241
+ /**
1242
+ * Function subtracting the items of set B from the set A.
1243
+ *
1244
+ * @param {Set} A - First set.
1245
+ * @param {Set} B - Second set.
1246
+ */
1247
+ exports.subtract = function(A, B) {
1248
+ var iterator = B.values(),
1249
+ step;
1250
+
1251
+ while ((step = iterator.next(), !step.done))
1252
+ A.delete(step.value);
1253
+
1254
+ return;
1255
+ };
1256
+
1257
+ /**
1258
+ * Function intersecting the items of A & B.
1259
+ *
1260
+ * @param {Set} A - First set.
1261
+ * @param {Set} B - Second set.
1262
+ */
1263
+ exports.intersect = function(A, B) {
1264
+ var iterator = A.values(),
1265
+ step;
1266
+
1267
+ while ((step = iterator.next(), !step.done)) {
1268
+ if (!B.has(step.value))
1269
+ A.delete(step.value);
1270
+ }
1271
+
1272
+ return;
1273
+ };
1274
+
1275
+ /**
1276
+ * Function disjuncting the items of A & B.
1277
+ *
1278
+ * @param {Set} A - First set.
1279
+ * @param {Set} B - Second set.
1280
+ */
1281
+ exports.disjunct = function(A, B) {
1282
+ var iterator = A.values(),
1283
+ step;
1284
+
1285
+ var toRemove = [];
1286
+
1287
+ while ((step = iterator.next(), !step.done)) {
1288
+ if (B.has(step.value))
1289
+ toRemove.push(step.value);
1290
+ }
1291
+
1292
+ iterator = B.values();
1293
+
1294
+ while ((step = iterator.next(), !step.done)) {
1295
+ if (!A.has(step.value))
1296
+ A.add(step.value);
1297
+ }
1298
+
1299
+ for (var i = 0, l = toRemove.length; i < l; i++)
1300
+ A.delete(toRemove[i]);
1301
+
1302
+ return;
1303
+ };
1304
+
1305
+ /**
1306
+ * Function returning the size of the intersection of A & B.
1307
+ *
1308
+ * @param {Set} A - First set.
1309
+ * @param {Set} B - Second set.
1310
+ * @return {number}
1311
+ */
1312
+ exports.intersectionSize = function(A, B) {
1313
+ var tmp;
1314
+
1315
+ // We need to know the smallest set
1316
+ if (A.size > B.size) {
1317
+ tmp = A;
1318
+ A = B;
1319
+ B = tmp;
1320
+ }
1321
+
1322
+ if (A.size === 0)
1323
+ return 0;
1324
+
1325
+ if (A === B)
1326
+ return A.size;
1327
+
1328
+ var iterator = A.values(),
1329
+ step;
1330
+
1331
+ var I = 0;
1332
+
1333
+ while ((step = iterator.next(), !step.done)) {
1334
+ if (B.has(step.value))
1335
+ I++;
1336
+ }
1337
+
1338
+ return I;
1339
+ };
1340
+
1341
+ /**
1342
+ * Function returning the size of the union of A & B.
1343
+ *
1344
+ * @param {Set} A - First set.
1345
+ * @param {Set} B - Second set.
1346
+ * @return {number}
1347
+ */
1348
+ exports.unionSize = function(A, B) {
1349
+ var I = exports.intersectionSize(A, B);
1350
+
1351
+ return A.size + B.size - I;
1352
+ };
1353
+
1354
+ /**
1355
+ * Function returning the Jaccard similarity between A & B.
1356
+ *
1357
+ * @param {Set} A - First set.
1358
+ * @param {Set} B - Second set.
1359
+ * @return {number}
1360
+ */
1361
+ exports.jaccard = function(A, B) {
1362
+ var I = exports.intersectionSize(A, B);
1363
+
1364
+ if (I === 0)
1365
+ return 0;
1366
+
1367
+ var U = A.size + B.size - I;
1368
+
1369
+ return I / U;
1370
+ };
1371
+
1372
+ /**
1373
+ * Function returning the overlap coefficient between A & B.
1374
+ *
1375
+ * @param {Set} A - First set.
1376
+ * @param {Set} B - Second set.
1377
+ * @return {number}
1378
+ */
1379
+ exports.overlap = function(A, B) {
1380
+ var I = exports.intersectionSize(A, B);
1381
+
1382
+ if (I === 0)
1383
+ return 0;
1384
+
1385
+ return I / Math.min(A.size, B.size);
1386
+ };
1387
+ } (set));
1388
+ return set;
1389
+ }
1390
+
1391
+ var setExports = requireSet();
1392
+
1393
+ /**
1394
+ * Mnemonist Stack
1395
+ * ================
1396
+ *
1397
+ * Stack implementation relying on JavaScript arrays, which are fast enough &
1398
+ * correctly optimized for this kind of work.
1399
+ */
1400
+
1401
+ var stack;
1402
+ var hasRequiredStack;
1403
+
1404
+ function requireStack () {
1405
+ if (hasRequiredStack) return stack;
1406
+ hasRequiredStack = 1;
1407
+ var Iterator = requireIterator(),
1408
+ forEach = requireForeach();
1409
+
1410
+ /**
1411
+ * Stack
1412
+ *
1413
+ * @constructor
1414
+ */
1415
+ function Stack() {
1416
+ this.clear();
1417
+ }
1418
+
1419
+ /**
1420
+ * Method used to clear the stack.
1421
+ *
1422
+ * @return {undefined}
1423
+ */
1424
+ Stack.prototype.clear = function() {
1425
+
1426
+ // Properties
1427
+ this.items = [];
1428
+ this.size = 0;
1429
+ };
1430
+
1431
+ /**
1432
+ * Method used to add an item to the stack.
1433
+ *
1434
+ * @param {any} item - Item to add.
1435
+ * @return {number}
1436
+ */
1437
+ Stack.prototype.push = function(item) {
1438
+ this.items.push(item);
1439
+ return ++this.size;
1440
+ };
1441
+
1442
+ /**
1443
+ * Method used to retrieve & remove the last item of the stack.
1444
+ *
1445
+ * @return {any}
1446
+ */
1447
+ Stack.prototype.pop = function() {
1448
+ if (this.size === 0)
1449
+ return;
1450
+
1451
+ this.size--;
1452
+ return this.items.pop();
1453
+ };
1454
+
1455
+ /**
1456
+ * Method used to get the last item of the stack.
1457
+ *
1458
+ * @return {any}
1459
+ */
1460
+ Stack.prototype.peek = function() {
1461
+ return this.items[this.size - 1];
1462
+ };
1463
+
1464
+ /**
1465
+ * Method used to iterate over the stack.
1466
+ *
1467
+ * @param {function} callback - Function to call for each item.
1468
+ * @param {object} scope - Optional scope.
1469
+ * @return {undefined}
1470
+ */
1471
+ Stack.prototype.forEach = function(callback, scope) {
1472
+ scope = arguments.length > 1 ? scope : this;
1473
+
1474
+ for (var i = 0, l = this.items.length; i < l; i++)
1475
+ callback.call(scope, this.items[l - i - 1], i, this);
1476
+ };
1477
+
1478
+ /**
1479
+ * Method used to convert the stack to a JavaScript array.
1480
+ *
1481
+ * @return {array}
1482
+ */
1483
+ Stack.prototype.toArray = function() {
1484
+ var array = new Array(this.size),
1485
+ l = this.size - 1,
1486
+ i = this.size;
1487
+
1488
+ while (i--)
1489
+ array[i] = this.items[l - i];
1490
+
1491
+ return array;
1492
+ };
1493
+
1494
+ /**
1495
+ * Method used to create an iterator over a stack's values.
1496
+ *
1497
+ * @return {Iterator}
1498
+ */
1499
+ Stack.prototype.values = function() {
1500
+ var items = this.items,
1501
+ l = items.length,
1502
+ i = 0;
1503
+
1504
+ return new Iterator(function() {
1505
+ if (i >= l)
1506
+ return {
1507
+ done: true
1508
+ };
1509
+
1510
+ var value = items[l - i - 1];
1511
+ i++;
1512
+
1513
+ return {
1514
+ value: value,
1515
+ done: false
1516
+ };
1517
+ });
1518
+ };
1519
+
1520
+ /**
1521
+ * Method used to create an iterator over a stack's entries.
1522
+ *
1523
+ * @return {Iterator}
1524
+ */
1525
+ Stack.prototype.entries = function() {
1526
+ var items = this.items,
1527
+ l = items.length,
1528
+ i = 0;
1529
+
1530
+ return new Iterator(function() {
1531
+ if (i >= l)
1532
+ return {
1533
+ done: true
1534
+ };
1535
+
1536
+ var value = items[l - i - 1];
1537
+
1538
+ return {
1539
+ value: [i++, value],
1540
+ done: false
1541
+ };
1542
+ });
1543
+ };
1544
+
1545
+ /**
1546
+ * Attaching the #.values method to Symbol.iterator if possible.
1547
+ */
1548
+ if (typeof Symbol !== 'undefined')
1549
+ Stack.prototype[Symbol.iterator] = Stack.prototype.values;
1550
+
1551
+
1552
+ /**
1553
+ * Convenience known methods.
1554
+ */
1555
+ Stack.prototype.toString = function() {
1556
+ return this.toArray().join(',');
1557
+ };
1558
+
1559
+ Stack.prototype.toJSON = function() {
1560
+ return this.toArray();
1561
+ };
1562
+
1563
+ Stack.prototype.inspect = function() {
1564
+ var array = this.toArray();
1565
+
1566
+ // Trick so that node displays the name of the constructor
1567
+ Object.defineProperty(array, 'constructor', {
1568
+ value: Stack,
1569
+ enumerable: false
1570
+ });
1571
+
1572
+ return array;
1573
+ };
1574
+
1575
+ if (typeof Symbol !== 'undefined')
1576
+ Stack.prototype[Symbol.for('nodejs.util.inspect.custom')] = Stack.prototype.inspect;
1577
+
1578
+ /**
1579
+ * Static @.from function taking an arbitrary iterable & converting it into
1580
+ * a stack.
1581
+ *
1582
+ * @param {Iterable} iterable - Target iterable.
1583
+ * @return {Stack}
1584
+ */
1585
+ Stack.from = function(iterable) {
1586
+ var stack = new Stack();
1587
+
1588
+ forEach(iterable, function(value) {
1589
+ stack.push(value);
1590
+ });
1591
+
1592
+ return stack;
1593
+ };
1594
+
1595
+ /**
1596
+ * Static @.of function taking an arbitrary number of arguments & converting it
1597
+ * into a stack.
1598
+ *
1599
+ * @param {...any} args
1600
+ * @return {Stack}
1601
+ */
1602
+ Stack.of = function() {
1603
+ return Stack.from(arguments);
1604
+ };
1605
+
1606
+ /**
1607
+ * Exporting.
1608
+ */
1609
+ stack = Stack;
1610
+ return stack;
1611
+ }
1612
+
1613
+ var stackExports = requireStack();
1614
+ const Stack = /*@__PURE__*/getDefaultExportFromCjs(stackExports);
1615
+
1616
+ function commonHead(sources, targets, equals) {
1617
+ if (sources.length === 0 || targets.length === 0) {
1618
+ return [];
1619
+ }
1620
+ equals ??= Object.is;
1621
+ return C(
1622
+ d(sources, targets),
1623
+ u(([source, target]) => equals(source, target)),
1624
+ m(([source, _]) => source)
1625
+ );
1626
+ }
1627
+
1628
+ var naturalCompareLite = {exports: {}};
1629
+
1630
+ var hasRequiredNaturalCompareLite;
1631
+
1632
+ function requireNaturalCompareLite () {
1633
+ if (hasRequiredNaturalCompareLite) return naturalCompareLite.exports;
1634
+ hasRequiredNaturalCompareLite = 1;
1635
+ /*
1636
+ * @version 1.4.0
1637
+ * @date 2015-10-26
1638
+ * @stability 3 - Stable
1639
+ * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
1640
+ * @license MIT License
1641
+ */
1642
+
1643
+
1644
+ var naturalCompare = function(a, b) {
1645
+ var i, codeA
1646
+ , codeB = 1
1647
+ , posA = 0
1648
+ , posB = 0
1649
+ , alphabet = String.alphabet;
1650
+
1651
+ function getCode(str, pos, code) {
1652
+ if (code) {
1653
+ for (i = pos; code = getCode(str, i), code < 76 && code > 65;) ++i;
1654
+ return +str.slice(pos - 1, i)
1655
+ }
1656
+ code = alphabet && alphabet.indexOf(str.charAt(pos));
1657
+ return code > -1 ? code + 76 : ((code = str.charCodeAt(pos) || 0), code < 45 || code > 127) ? code
1658
+ : code < 46 ? 65 // -
1659
+ : code < 48 ? code - 1
1660
+ : code < 58 ? code + 18 // 0-9
1661
+ : code < 65 ? code - 11
1662
+ : code < 91 ? code + 11 // A-Z
1663
+ : code < 97 ? code - 37
1664
+ : code < 123 ? code + 5 // a-z
1665
+ : code - 63
1666
+ }
1667
+
1668
+
1669
+ if ((a+="") != (b+="")) for (;codeB;) {
1670
+ codeA = getCode(a, posA++);
1671
+ codeB = getCode(b, posB++);
1672
+
1673
+ if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
1674
+ codeA = getCode(a, posA, posA);
1675
+ codeB = getCode(b, posB, posA = i);
1676
+ posB = i;
1677
+ }
1678
+
1679
+ if (codeA != codeB) return (codeA < codeB) ? -1 : 1
1680
+ }
1681
+ return 0
1682
+ };
1683
+
1684
+ try {
1685
+ naturalCompareLite.exports = naturalCompare;
1686
+ } catch (e) {
1687
+ String.naturalCompare = naturalCompare;
1688
+ }
1689
+ return naturalCompareLite.exports;
1690
+ }
1691
+
1692
+ var naturalCompareLiteExports = requireNaturalCompareLite();
1693
+ const compare = /*@__PURE__*/getDefaultExportFromCjs(naturalCompareLiteExports);
1694
+
1695
+ function compareNatural(a, b) {
1696
+ if (a === b) return 0;
1697
+ if (t$1(a)) {
1698
+ if (t$1(b)) {
1699
+ return compare(a, b);
1700
+ }
1701
+ return 1;
1702
+ }
1703
+ return t$1(b) ? -1 : 0;
1704
+ }
1705
+
1706
+ function isString(value) {
1707
+ return value != null && typeof value === "string";
1708
+ }
1709
+ function isNonEmptyArray(arr) {
1710
+ return !!arr && Array.isArray(arr) && arr.length > 0;
1711
+ }
1712
+
1713
+ function parentFqn(fqn) {
1714
+ const lastDot = fqn.lastIndexOf(".");
1715
+ if (lastDot > 0) {
1716
+ return fqn.slice(0, lastDot);
1717
+ }
1718
+ return null;
1719
+ }
1720
+ function nameFromFqn(fqn) {
1721
+ const lastDot = fqn.lastIndexOf(".");
1722
+ if (lastDot > 0) {
1723
+ return fqn.slice(lastDot + 1);
1724
+ } else {
1725
+ return fqn;
1726
+ }
1727
+ }
1728
+ const asString = (e) => isString(e) ? e : e.id;
1729
+ function isAncestor(arg1, arg2) {
1730
+ const arg1Id = asString(arg1);
1731
+ if (arg2) {
1732
+ const arg2Id = asString(arg2);
1733
+ return arg2Id.startsWith(arg1Id + ".");
1734
+ }
1735
+ return (ancestor) => {
1736
+ const ancestorId = asString(ancestor);
1737
+ return arg1Id.startsWith(ancestorId + ".");
1738
+ };
1739
+ }
1740
+ function isSameHierarchy(one, another) {
1741
+ if (!another) {
1742
+ return (b) => isSameHierarchy(one, b);
1743
+ }
1744
+ const first = asString(one);
1745
+ const second = asString(another);
1746
+ return first === second || second.startsWith(first + ".") || first.startsWith(second + ".");
1747
+ }
1748
+ function isDescendantOf(descedant, ancestor) {
1749
+ if (!ancestor) {
1750
+ return (d) => isAncestor(descedant, d);
1751
+ }
1752
+ return isAncestor(ancestor, descedant);
1753
+ }
1754
+ function hierarchyLevel(elementOfFqn) {
1755
+ const first = isString(elementOfFqn) ? elementOfFqn : elementOfFqn.id;
1756
+ return first.split(".").length;
1757
+ }
1758
+ function hierarchyDistance(one, another) {
1759
+ const first = isString(one) ? one : one.id;
1760
+ const second = isString(another) ? another : another.id;
1761
+ if (first === second) {
1762
+ return 0;
1763
+ }
1764
+ const firstDepth = hierarchyLevel(first);
1765
+ const secondDepth = hierarchyLevel(second);
1766
+ if (isSameHierarchy(first, second)) {
1767
+ return Math.abs(firstDepth - secondDepth);
1768
+ }
1769
+ const ancestor = commonAncestor(first, second);
1770
+ const ancestorDepth = ancestor ? hierarchyLevel(ancestor) : 0;
1771
+ return firstDepth + secondDepth - (2 * ancestorDepth + 1);
1772
+ }
1773
+ function commonAncestor(first, second) {
1774
+ const a = first.split(".");
1775
+ if (a.length < 2) {
1776
+ return null;
1777
+ }
1778
+ const b = second.split(".");
1779
+ if (b.length < 2) {
1780
+ return null;
1781
+ }
1782
+ let ancestor = [];
1783
+ for (let i = 0; i < Math.min(a.length, b.length) - 1 && a[i] === b[i]; i++) {
1784
+ ancestor.push(a[i]);
1785
+ }
1786
+ if (ancestor.length === 0) {
1787
+ return null;
1788
+ }
1789
+ return ancestor.join(".");
1790
+ }
1791
+ function ancestorsFqn(fqn) {
1792
+ const path = fqn.split(".");
1793
+ path.pop();
1794
+ if (path.length === 0) {
1795
+ return [];
1796
+ }
1797
+ return path.reduce((acc, part, idx) => {
1798
+ if (idx === 0) {
1799
+ acc.push(part);
1800
+ return acc;
1801
+ }
1802
+ acc.unshift(`${acc[0]}.${part}`);
1803
+ return acc;
1804
+ }, []);
1805
+ }
1806
+ function compareFqnHierarchically(a, b) {
1807
+ const depthA = a.split(".").length;
1808
+ const depthB = b.split(".").length;
1809
+ switch (true) {
1810
+ case depthA > depthB: {
1811
+ return 1;
1812
+ }
1813
+ case depthA < depthB: {
1814
+ return -1;
1815
+ }
1816
+ default: {
1817
+ return 0;
1818
+ }
1819
+ }
1820
+ }
1821
+ function compareByFqnHierarchically(a, b) {
1822
+ return compareFqnHierarchically(a.id, b.id);
1823
+ }
1824
+ function sortByFqnHierarchically(array) {
1825
+ return array.map((item) => ({ item, fqn: item.id.split(".") })).sort((a, b) => {
1826
+ return a.fqn.length - b.fqn.length;
1827
+ }).map(({ item }) => item);
1828
+ }
1829
+ function findTopAncestor(items, item) {
1830
+ let parent = item;
1831
+ for (const e of items) {
1832
+ if (isAncestor(e, parent)) {
1833
+ parent = e;
1834
+ }
1835
+ }
1836
+ return parent !== item ? parent : null;
1837
+ }
1838
+ function sortParentsFirst(array) {
1839
+ const result = [];
1840
+ const items = [...array];
1841
+ let item;
1842
+ while (item = items.shift()) {
1843
+ let parent;
1844
+ while (parent = findTopAncestor(items, item)) {
1845
+ result.push(items.splice(items.indexOf(parent), 1)[0]);
1846
+ }
1847
+ result.push(item);
1848
+ }
1849
+ return result;
1850
+ }
1851
+ function sortNaturalByFqn(array, sort) {
1852
+ if (!array || isString(array)) {
1853
+ const dir2 = array ?? "asc";
1854
+ return (arr) => sortNaturalByFqn(arr, dir2);
1855
+ }
1856
+ const dir = sort === "desc" ? -1 : 1;
1857
+ return array.map((item) => ({ item, fqn: item.id.split(".") })).sort((a, b) => {
1858
+ if (a.fqn.length !== b.fqn.length) {
1859
+ return (a.fqn.length - b.fqn.length) * dir;
1860
+ }
1861
+ for (let i = 0; i < a.fqn.length; i++) {
1862
+ const compare = compareNatural(a.fqn[i], b.fqn[i]);
1863
+ if (compare !== 0) {
1864
+ return compare;
1865
+ }
1866
+ }
1867
+ return 0;
1868
+ }).map(({ item }) => item);
1869
+ }
1870
+
1871
+ function getOrCreate(map, key, create) {
1872
+ let entry = map.get(key);
1873
+ if (!entry) {
1874
+ entry = create(key);
1875
+ map.set(key, entry);
1876
+ }
1877
+ return entry;
1878
+ }
1879
+
1880
+ function isIterable(something) {
1881
+ return l(something) && typeof something === "object" && Symbol.iterator in something;
1882
+ }
1883
+
1884
+ function ifilter(arg1, arg2) {
1885
+ const pred = arg2 ?? arg1;
1886
+ invariant(t(pred));
1887
+ function* _filter(iter) {
1888
+ for (const value of iter) {
1889
+ if (pred(value)) {
1890
+ yield value;
1891
+ }
1892
+ }
1893
+ return;
1894
+ }
1895
+ if (!arg2) {
1896
+ return _filter;
1897
+ }
1898
+ return _filter(arg1);
1899
+ }
1900
+
1901
+ function ifind(arg1, arg2) {
1902
+ const pred = arg2 ?? arg1;
1903
+ invariant(t(pred));
1904
+ function _find(iter) {
1905
+ for (const value of iter) {
1906
+ if (pred(value)) {
1907
+ return value;
1908
+ }
1909
+ }
1910
+ return;
1911
+ }
1912
+ if (!arg2) {
1913
+ return _find;
1914
+ }
1915
+ return _find(arg1);
1916
+ }
1917
+
1918
+ function iflat(iterable) {
1919
+ return iterable ? _iflat(iterable) : _iflat;
1920
+ }
1921
+ function* _iflat(iterable) {
1922
+ for (const inner of iterable) {
1923
+ yield* inner;
1924
+ }
1925
+ return;
1926
+ }
1927
+
1928
+ function imap(arg1, arg2) {
1929
+ const mapper = arg2 ?? arg1;
1930
+ invariant(t(mapper));
1931
+ function* _map(iter) {
1932
+ for (const value of iter) {
1933
+ yield mapper(value);
1934
+ }
1935
+ return;
1936
+ }
1937
+ if (!arg2) {
1938
+ return _map;
1939
+ }
1940
+ return _map(arg1);
1941
+ }
1942
+
1943
+ function isome(arg1, arg2) {
1944
+ const pred = arg2 ?? arg1;
1945
+ invariant(t(pred));
1946
+ function _some(iter) {
1947
+ for (const value of iter) {
1948
+ if (pred(value)) {
1949
+ return true;
1950
+ }
1951
+ }
1952
+ return false;
1953
+ }
1954
+ if (!arg2) {
1955
+ return _some;
1956
+ }
1957
+ return _some(arg1);
1958
+ }
1959
+
1960
+ function toArray(iterable) {
1961
+ if (iterable) {
1962
+ return Array.from(iterable);
1963
+ }
1964
+ return (it) => Array.from(it);
1965
+ }
1966
+ function toSet(iterable) {
1967
+ if (iterable) {
1968
+ return new Set(iterable);
1969
+ }
1970
+ return (it) => new Set(it);
1971
+ }
1972
+
1973
+ function iunique(iterable) {
1974
+ return iterable ? _iunique(iterable) : _iunique;
1975
+ }
1976
+ function* _iunique(iterable) {
1977
+ const seen = /* @__PURE__ */ new Set();
1978
+ for (const item of iterable) {
1979
+ if (!seen.has(item)) {
1980
+ seen.add(item);
1981
+ yield item;
1982
+ }
1983
+ }
1984
+ return;
1985
+ }
1986
+
1987
+ function union(...sets) {
1988
+ let result = /* @__PURE__ */ new Set();
1989
+ for (const set of sets) {
1990
+ for (const value of set) {
1991
+ result.add(value);
1992
+ }
1993
+ }
1994
+ return result;
1995
+ }
1996
+ function intersection(first, ...sets) {
1997
+ let result = /* @__PURE__ */ new Set();
1998
+ if (first.size === 0) {
1999
+ return result;
2000
+ }
2001
+ let other = i$1(sets, 2) ? setExports.intersection(...sets) : sets[0];
2002
+ if (other.size === 0) {
2003
+ return result;
2004
+ }
2005
+ for (const value of first) {
2006
+ if (other.has(value)) {
2007
+ result.add(value);
2008
+ }
2009
+ }
2010
+ return result;
2011
+ }
2012
+ function difference(a, b) {
2013
+ if (a.size === 0) {
2014
+ return /* @__PURE__ */ new Set();
2015
+ }
2016
+ if (b.size === 0) {
2017
+ return new Set(a);
2018
+ }
2019
+ let result = /* @__PURE__ */ new Set();
2020
+ for (const value of a) {
2021
+ if (!b.has(value)) {
2022
+ result.add(value);
2023
+ }
2024
+ }
2025
+ return result;
2026
+ }
2027
+ function equals(a, b) {
2028
+ return a.size === b.size && [...a].every((value) => b.has(value));
2029
+ }
2030
+ function symmetricDifference(a, b) {
2031
+ return setExports.symmetricDifference(a, b);
2032
+ }
2033
+ function hasIntersection(a, b) {
2034
+ if (a.size === 0 || b.size === 0) {
2035
+ return false;
2036
+ }
2037
+ if (b.size < a.size) {
2038
+ [a, b] = [b, a];
2039
+ }
2040
+ for (const value of a) {
2041
+ if (b.has(value)) {
2042
+ return true;
2043
+ }
2044
+ }
2045
+ return false;
2046
+ }
2047
+
2048
+ function stringHash(str) {
2049
+ let hash = 5381;
2050
+ const len = str.length;
2051
+ invariant(len > 0, "stringHash: empty string");
2052
+ for (let i = 0; i < len; i++) {
2053
+ hash = hash * 33 ^ str.charCodeAt(i);
2054
+ }
2055
+ return (hash >>> 0).toString(36);
2056
+ }
2057
+
2058
+ function commonjsRequire(path) {
2059
+ throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
2060
+ }
2061
+
2062
+ var object_hash = {exports: {}};
2063
+
2064
+ var hasRequiredObject_hash;
2065
+
2066
+ function requireObject_hash () {
2067
+ if (hasRequiredObject_hash) return object_hash.exports;
2068
+ hasRequiredObject_hash = 1;
2069
+ (function (module, exports) {
2070
+ !function(e){module.exports=e();}(function(){return function r(o,i,u){function s(n,e){if(!i[n]){if(!o[n]){var t="function"==typeof commonjsRequire&&commonjsRequire;if(!e&&t)return t(n,true);if(a)return a(n,true);throw new Error("Cannot find module '"+n+"'")}e=i[n]={exports:{}};o[n][0].call(e.exports,function(e){var t=o[n][1][e];return s(t||e)},e,e.exports,r,o,i,u);}return i[n].exports}for(var a="function"==typeof commonjsRequire&&commonjsRequire,e=0;e<u.length;e++)s(u[e]);return s}({1:[function(w,b,m){!function(e,n,s,c,d,h,p,g,y){var r=w("crypto");function t(e,t){t=u(e,t);var n;return void 0===(n="passthrough"!==t.algorithm?r.createHash(t.algorithm):new l).write&&(n.write=n.update,n.end=n.update),f(t,n).dispatch(e),n.update||n.end(""),n.digest?n.digest("buffer"===t.encoding?void 0:t.encoding):(e=n.read(),"buffer"!==t.encoding?e.toString(t.encoding):e)}(m=b.exports=t).sha1=function(e){return t(e)},m.keys=function(e){return t(e,{excludeValues:true,algorithm:"sha1",encoding:"hex"})},m.MD5=function(e){return t(e,{algorithm:"md5",encoding:"hex"})},m.keysMD5=function(e){return t(e,{algorithm:"md5",encoding:"hex",excludeValues:true})};var o=r.getHashes?r.getHashes().slice():["sha1","md5"],i=(o.push("passthrough"),["buffer","hex","binary","base64"]);function u(e,t){var n={};if(n.algorithm=(t=t||{}).algorithm||"sha1",n.encoding=t.encoding||"hex",n.excludeValues=!!t.excludeValues,n.algorithm=n.algorithm.toLowerCase(),n.encoding=n.encoding.toLowerCase(),n.ignoreUnknown=true===t.ignoreUnknown,n.respectType=false!==t.respectType,n.respectFunctionNames=false!==t.respectFunctionNames,n.respectFunctionProperties=false!==t.respectFunctionProperties,n.unorderedArrays=true===t.unorderedArrays,n.unorderedSets=false!==t.unorderedSets,n.unorderedObjects=false!==t.unorderedObjects,n.replacer=t.replacer||void 0,n.excludeKeys=t.excludeKeys||void 0,void 0===e)throw new Error("Object argument required.");for(var r=0;r<o.length;++r)o[r].toLowerCase()===n.algorithm.toLowerCase()&&(n.algorithm=o[r]);if(-1===o.indexOf(n.algorithm))throw new Error('Algorithm "'+n.algorithm+'" not supported. supported values: '+o.join(", "));if(-1===i.indexOf(n.encoding)&&"passthrough"!==n.algorithm)throw new Error('Encoding "'+n.encoding+'" not supported. supported values: '+i.join(", "));return n}function a(e){if("function"==typeof e)return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))}function f(o,t,i){i=i||[];function u(e){return t.update?t.update(e,"utf8"):t.write(e,"utf8")}return {dispatch:function(e){return this["_"+(null===(e=o.replacer?o.replacer(e):e)?"null":typeof e)](e)},_object:function(t){var n,e=Object.prototype.toString.call(t),r=/\[object (.*)\]/i.exec(e);r=(r=r?r[1]:"unknown:["+e+"]").toLowerCase();if(0<=(e=i.indexOf(t)))return this.dispatch("[CIRCULAR:"+e+"]");if(i.push(t),void 0!==s&&s.isBuffer&&s.isBuffer(t))return u("buffer:"),u(t);if("object"===r||"function"===r||"asyncfunction"===r)return e=Object.keys(t),o.unorderedObjects&&(e=e.sort()),false===o.respectType||a(t)||e.splice(0,0,"prototype","__proto__","constructor"),o.excludeKeys&&(e=e.filter(function(e){return !o.excludeKeys(e)})),u("object:"+e.length+":"),n=this,e.forEach(function(e){n.dispatch(e),u(":"),o.excludeValues||n.dispatch(t[e]),u(",");});if(!this["_"+r]){if(o.ignoreUnknown)return u("["+r+"]");throw new Error('Unknown object type "'+r+'"')}this["_"+r](t);},_array:function(e,t){t=void 0!==t?t:false!==o.unorderedArrays;var n=this;if(u("array:"+e.length+":"),!t||e.length<=1)return e.forEach(function(e){return n.dispatch(e)});var r=[],t=e.map(function(e){var t=new l,n=i.slice();return f(o,t,n).dispatch(e),r=r.concat(n.slice(i.length)),t.read().toString()});return i=i.concat(r),t.sort(),this._array(t,false)},_date:function(e){return u("date:"+e.toJSON())},_symbol:function(e){return u("symbol:"+e.toString())},_error:function(e){return u("error:"+e.toString())},_boolean:function(e){return u("bool:"+e.toString())},_string:function(e){u("string:"+e.length+":"),u(e.toString());},_function:function(e){u("fn:"),a(e)?this.dispatch("[native]"):this.dispatch(e.toString()),false!==o.respectFunctionNames&&this.dispatch("function-name:"+String(e.name)),o.respectFunctionProperties&&this._object(e);},_number:function(e){return u("number:"+e.toString())},_xml:function(e){return u("xml:"+e.toString())},_null:function(){return u("Null")},_undefined:function(){return u("Undefined")},_regexp:function(e){return u("regex:"+e.toString())},_uint8array:function(e){return u("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return u("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return u("int8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return u("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return u("int16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return u("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return u("int32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return u("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return u("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return u("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return u("url:"+e.toString())},_map:function(e){u("map:");e=Array.from(e);return this._array(e,false!==o.unorderedSets)},_set:function(e){u("set:");e=Array.from(e);return this._array(e,false!==o.unorderedSets)},_file:function(e){return u("file:"),this.dispatch([e.name,e.size,e.type,e.lastModfied])},_blob:function(){if(o.ignoreUnknown)return u("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return u("domwindow")},_bigint:function(e){return u("bigint:"+e.toString())},_process:function(){return u("process")},_timer:function(){return u("timer")},_pipe:function(){return u("pipe")},_tcp:function(){return u("tcp")},_udp:function(){return u("udp")},_tty:function(){return u("tty")},_statwatcher:function(){return u("statwatcher")},_securecontext:function(){return u("securecontext")},_connection:function(){return u("connection")},_zlib:function(){return u("zlib")},_context:function(){return u("context")},_nodescript:function(){return u("nodescript")},_httpparser:function(){return u("httpparser")},_dataview:function(){return u("dataview")},_signal:function(){return u("signal")},_fsevent:function(){return u("fsevent")},_tlswrap:function(){return u("tlswrap")}}}function l(){return {buf:"",write:function(e){this.buf+=e;},end:function(e){this.buf+=e;},read:function(){return this.buf}}}m.writeToStream=function(e,t,n){return void 0===n&&(n=t,t={}),f(t=u(e,t),n).dispatch(e)};}.call(this,w("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/");},{buffer:3,crypto:5,lYpoI2:11}],2:[function(e,t,f){!function(e,t,n,r,o,i,u,s,a){!function(e){var a="undefined"!=typeof Uint8Array?Uint8Array:Array,t="+".charCodeAt(0),n="/".charCodeAt(0),r="0".charCodeAt(0),o="a".charCodeAt(0),i="A".charCodeAt(0),u="-".charCodeAt(0),s="_".charCodeAt(0);function f(e){e=e.charCodeAt(0);return e===t||e===u?62:e===n||e===s?63:e<r?-1:e<r+10?e-r+26+26:e<i+26?e-i:e<o+26?e-o+26:void 0}e.toByteArray=function(e){var t,n;if(0<e.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.length,r="="===e.charAt(r-2)?2:"="===e.charAt(r-1)?1:0,o=new a(3*e.length/4-r),i=0<r?e.length-4:e.length,u=0;function s(e){o[u++]=e;}for(t=0;t<i;t+=4,0)s((16711680&(n=f(e.charAt(t))<<18|f(e.charAt(t+1))<<12|f(e.charAt(t+2))<<6|f(e.charAt(t+3))))>>16),s((65280&n)>>8),s(255&n);return 2==r?s(255&(n=f(e.charAt(t))<<2|f(e.charAt(t+1))>>4)):1==r&&(s((n=f(e.charAt(t))<<10|f(e.charAt(t+1))<<4|f(e.charAt(t+2))>>2)>>8&255),s(255&n)),o},e.fromByteArray=function(e){var t,n,r,o,i=e.length%3,u="";function s(e){return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)}for(t=0,r=e.length-i;t<r;t+=3)n=(e[t]<<16)+(e[t+1]<<8)+e[t+2],u+=s((o=n)>>18&63)+s(o>>12&63)+s(o>>6&63)+s(63&o);switch(i){case 1:u=(u+=s((n=e[e.length-1])>>2))+s(n<<4&63)+"==";break;case 2:u=(u=(u+=s((n=(e[e.length-2]<<8)+e[e.length-1])>>10))+s(n>>4&63))+s(n<<2&63)+"=";}return u};}(void 0===f?this.base64js={}:f);}.call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib");},{buffer:3,lYpoI2:11}],3:[function(O,e,H){!function(e,n,f,r,h,p,g,y,w){var a=O("base64-js"),i=O("ieee754");function f(e,t,n){if(!(this instanceof f))return new f(e,t,n);var r,o,i,u,s=typeof e;if("base64"===t&&"string"==s)for(e=(u=e).trim?u.trim():u.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if("number"==s)r=j(e);else if("string"==s)r=f.byteLength(e,t);else {if("object"!=s)throw new Error("First argument needs to be a number, array or string.");r=j(e.length);}if(f._useTypedArrays?o=f._augment(new Uint8Array(r)):((o=this).length=r,o._isBuffer=true),f._useTypedArrays&&"number"==typeof e.byteLength)o._set(e);else if(C(u=e)||f.isBuffer(u)||u&&"object"==typeof u&&"number"==typeof u.length)for(i=0;i<r;i++)f.isBuffer(e)?o[i]=e.readUInt8(i):o[i]=e[i];else if("string"==s)o.write(e,0,t);else if("number"==s&&!f._useTypedArrays&&!n)for(i=0;i<r;i++)o[i]=0;return o}function b(e,t,n,r){return f._charsWritten=c(function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function m(e,t,n,r){return f._charsWritten=c(function(e){for(var t,n,r=[],o=0;o<e.length;o++)n=e.charCodeAt(o),t=n>>8,n=n%256,r.push(n),r.push(t);return r}(t),e,n,r)}function v(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;o++)r+=String.fromCharCode(e[o]);return r}function o(e,t,n,r){r||(d("boolean"==typeof n,"missing or invalid endian"),d(null!=t,"missing offset"),d(t+1<e.length,"Trying to read beyond buffer length"));var o,r=e.length;if(!(r<=t))return n?(o=e[t],t+1<r&&(o|=e[t+1]<<8)):(o=e[t]<<8,t+1<r&&(o|=e[t+1])),o}function u(e,t,n,r){r||(d("boolean"==typeof n,"missing or invalid endian"),d(null!=t,"missing offset"),d(t+3<e.length,"Trying to read beyond buffer length"));var o,r=e.length;if(!(r<=t))return n?(t+2<r&&(o=e[t+2]<<16),t+1<r&&(o|=e[t+1]<<8),o|=e[t],t+3<r&&(o+=e[t+3]<<24>>>0)):(t+1<r&&(o=e[t+1]<<16),t+2<r&&(o|=e[t+2]<<8),t+3<r&&(o|=e[t+3]),o+=e[t]<<24>>>0),o}function _(e,t,n,r){if(r||(d("boolean"==typeof n,"missing or invalid endian"),d(null!=t,"missing offset"),d(t+1<e.length,"Trying to read beyond buffer length")),!(e.length<=t))return r=o(e,t,n,true),32768&r?-1*(65535-r+1):r}function E(e,t,n,r){if(r||(d("boolean"==typeof n,"missing or invalid endian"),d(null!=t,"missing offset"),d(t+3<e.length,"Trying to read beyond buffer length")),!(e.length<=t))return r=u(e,t,n,true),2147483648&r?-1*(4294967295-r+1):r}function I(e,t,n,r){return r||(d("boolean"==typeof n,"missing or invalid endian"),d(t+3<e.length,"Trying to read beyond buffer length")),i.read(e,t,n,23,4)}function A(e,t,n,r){return r||(d("boolean"==typeof n,"missing or invalid endian"),d(t+7<e.length,"Trying to read beyond buffer length")),i.read(e,t,n,52,8)}function s(e,t,n,r,o){o||(d(null!=t,"missing value"),d("boolean"==typeof r,"missing or invalid endian"),d(null!=n,"missing offset"),d(n+1<e.length,"trying to write beyond buffer length"),Y(t,65535));o=e.length;if(!(o<=n))for(var i=0,u=Math.min(o-n,2);i<u;i++)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i);}function l(e,t,n,r,o){o||(d(null!=t,"missing value"),d("boolean"==typeof r,"missing or invalid endian"),d(null!=n,"missing offset"),d(n+3<e.length,"trying to write beyond buffer length"),Y(t,4294967295));o=e.length;if(!(o<=n))for(var i=0,u=Math.min(o-n,4);i<u;i++)e[n+i]=t>>>8*(r?i:3-i)&255;}function B(e,t,n,r,o){o||(d(null!=t,"missing value"),d("boolean"==typeof r,"missing or invalid endian"),d(null!=n,"missing offset"),d(n+1<e.length,"Trying to write beyond buffer length"),F(t,32767,-32768)),e.length<=n||s(e,0<=t?t:65535+t+1,n,r,o);}function L(e,t,n,r,o){o||(d(null!=t,"missing value"),d("boolean"==typeof r,"missing or invalid endian"),d(null!=n,"missing offset"),d(n+3<e.length,"Trying to write beyond buffer length"),F(t,2147483647,-2147483648)),e.length<=n||l(e,0<=t?t:4294967295+t+1,n,r,o);}function U(e,t,n,r,o){o||(d(null!=t,"missing value"),d("boolean"==typeof r,"missing or invalid endian"),d(null!=n,"missing offset"),d(n+3<e.length,"Trying to write beyond buffer length"),D(t,34028234663852886e22,-34028234663852886e22)),e.length<=n||i.write(e,t,n,r,23,4);}function x(e,t,n,r,o){o||(d(null!=t,"missing value"),d("boolean"==typeof r,"missing or invalid endian"),d(null!=n,"missing offset"),d(n+7<e.length,"Trying to write beyond buffer length"),D(t,17976931348623157e292,-17976931348623157e292)),e.length<=n||i.write(e,t,n,r,52,8);}H.Buffer=f,H.SlowBuffer=f,H.INSPECT_MAX_BYTES=50,f.poolSize=8192,f._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(e){return false}}(),f.isEncoding=function(e){switch(String(e).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return true;default:return false}},f.isBuffer=function(e){return !(null==e||!e._isBuffer)},f.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case "hex":n=e.length/2;break;case "utf8":case "utf-8":n=T(e).length;break;case "ascii":case "binary":case "raw":n=e.length;break;case "base64":n=M(e).length;break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":n=2*e.length;break;default:throw new Error("Unknown encoding")}return n},f.concat=function(e,t){if(d(C(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new f(0);if(1===e.length)return e[0];if("number"!=typeof t)for(o=t=0;o<e.length;o++)t+=e[o].length;for(var n=new f(t),r=0,o=0;o<e.length;o++){var i=e[o];i.copy(n,r),r+=i.length;}return n},f.prototype.write=function(e,t,n,r){isFinite(t)?isFinite(n)||(r=n,n=void 0):(a=r,r=t,t=n,n=a),t=Number(t)||0;var o,i,u,s,a=this.length-t;switch((!n||a<(n=Number(n)))&&(n=a),r=String(r||"utf8").toLowerCase()){case "hex":o=function(e,t,n,r){n=Number(n)||0;var o=e.length-n;(!r||o<(r=Number(r)))&&(r=o),d((o=t.length)%2==0,"Invalid hex string"),o/2<r&&(r=o/2);for(var i=0;i<r;i++){var u=parseInt(t.substr(2*i,2),16);d(!isNaN(u),"Invalid hex string"),e[n+i]=u;}return f._charsWritten=2*i,i}(this,e,t,n);break;case "utf8":case "utf-8":i=this,u=t,s=n,o=f._charsWritten=c(T(e),i,u,s);break;case "ascii":case "binary":o=b(this,e,t,n);break;case "base64":i=this,u=t,s=n,o=f._charsWritten=c(M(e),i,u,s);break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":o=m(this,e,t,n);break;default:throw new Error("Unknown encoding")}return o},f.prototype.toString=function(e,t,n){var r,o,i,u,s=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,(n=void 0!==n?Number(n):s.length)===t)return "";switch(e){case "hex":r=function(e,t,n){var r=e.length;(!t||t<0)&&(t=0);(!n||n<0||r<n)&&(n=r);for(var o="",i=t;i<n;i++)o+=k(e[i]);return o}(s,t,n);break;case "utf8":case "utf-8":r=function(e,t,n){var r="",o="";n=Math.min(e.length,n);for(var i=t;i<n;i++)e[i]<=127?(r+=N(o)+String.fromCharCode(e[i]),o=""):o+="%"+e[i].toString(16);return r+N(o)}(s,t,n);break;case "ascii":case "binary":r=v(s,t,n);break;case "base64":o=s,u=n,r=0===(i=t)&&u===o.length?a.fromByteArray(o):a.fromByteArray(o.slice(i,u));break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":r=function(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}(s,t,n);break;default:throw new Error("Unknown encoding")}return r},f.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},f.prototype.copy=function(e,t,n,r){if(t=t||0,(r=r||0===r?r:this.length)!==(n=n||0)&&0!==e.length&&0!==this.length){d(n<=r,"sourceEnd < sourceStart"),d(0<=t&&t<e.length,"targetStart out of bounds"),d(0<=n&&n<this.length,"sourceStart out of bounds"),d(0<=r&&r<=this.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length);var o=(r=e.length-t<r-n?e.length-t+n:r)-n;if(o<100||!f._useTypedArrays)for(var i=0;i<o;i++)e[i+t]=this[i+n];else e._set(this.subarray(n,n+o),t);}},f.prototype.slice=function(e,t){var n=this.length;if(e=S(e,n,0),t=S(t,n,n),f._useTypedArrays)return f._augment(this.subarray(e,t));for(var r=t-e,o=new f(r,void 0,true),i=0;i<r;i++)o[i]=this[i+e];return o},f.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},f.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},f.prototype.readUInt8=function(e,t){if(t||(d(null!=e,"missing offset"),d(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return this[e]},f.prototype.readUInt16LE=function(e,t){return o(this,e,true,t)},f.prototype.readUInt16BE=function(e,t){return o(this,e,false,t)},f.prototype.readUInt32LE=function(e,t){return u(this,e,true,t)},f.prototype.readUInt32BE=function(e,t){return u(this,e,false,t)},f.prototype.readInt8=function(e,t){if(t||(d(null!=e,"missing offset"),d(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){return _(this,e,true,t)},f.prototype.readInt16BE=function(e,t){return _(this,e,false,t)},f.prototype.readInt32LE=function(e,t){return E(this,e,true,t)},f.prototype.readInt32BE=function(e,t){return E(this,e,false,t)},f.prototype.readFloatLE=function(e,t){return I(this,e,true,t)},f.prototype.readFloatBE=function(e,t){return I(this,e,false,t)},f.prototype.readDoubleLE=function(e,t){return A(this,e,true,t)},f.prototype.readDoubleBE=function(e,t){return A(this,e,false,t)},f.prototype.writeUInt8=function(e,t,n){n||(d(null!=e,"missing value"),d(null!=t,"missing offset"),d(t<this.length,"trying to write beyond buffer length"),Y(e,255)),t>=this.length||(this[t]=e);},f.prototype.writeUInt16LE=function(e,t,n){s(this,e,t,true,n);},f.prototype.writeUInt16BE=function(e,t,n){s(this,e,t,false,n);},f.prototype.writeUInt32LE=function(e,t,n){l(this,e,t,true,n);},f.prototype.writeUInt32BE=function(e,t,n){l(this,e,t,false,n);},f.prototype.writeInt8=function(e,t,n){n||(d(null!=e,"missing value"),d(null!=t,"missing offset"),d(t<this.length,"Trying to write beyond buffer length"),F(e,127,-128)),t>=this.length||(0<=e?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n));},f.prototype.writeInt16LE=function(e,t,n){B(this,e,t,true,n);},f.prototype.writeInt16BE=function(e,t,n){B(this,e,t,false,n);},f.prototype.writeInt32LE=function(e,t,n){L(this,e,t,true,n);},f.prototype.writeInt32BE=function(e,t,n){L(this,e,t,false,n);},f.prototype.writeFloatLE=function(e,t,n){U(this,e,t,true,n);},f.prototype.writeFloatBE=function(e,t,n){U(this,e,t,false,n);},f.prototype.writeDoubleLE=function(e,t,n){x(this,e,t,true,n);},f.prototype.writeDoubleBE=function(e,t,n){x(this,e,t,false,n);},f.prototype.fill=function(e,t,n){if(t=t||0,n=n||this.length,d("number"==typeof(e="string"==typeof(e=e||0)?e.charCodeAt(0):e)&&!isNaN(e),"value is not a number"),d(t<=n,"end < start"),n!==t&&0!==this.length){d(0<=t&&t<this.length,"start out of bounds"),d(0<=n&&n<=this.length,"end out of bounds");for(var r=t;r<n;r++)this[r]=e;}},f.prototype.inspect=function(){for(var e=[],t=this.length,n=0;n<t;n++)if(e[n]=k(this[n]),n===H.INSPECT_MAX_BYTES){e[n+1]="...";break}return "<Buffer "+e.join(" ")+">"},f.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(f._useTypedArrays)return new f(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;t<n;t+=1)e[t]=this[t];return e.buffer};var t=f.prototype;function S(e,t,n){return "number"!=typeof e?n:t<=(e=~~e)?t:0<=e||0<=(e+=t)?e:0}function j(e){return (e=~~Math.ceil(+e))<0?0:e}function C(e){return (Array.isArray||function(e){return "[object Array]"===Object.prototype.toString.call(e)})(e)}function k(e){return e<16?"0"+e.toString(16):e.toString(16)}function T(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t.push(e.charCodeAt(n));else for(var o=n,i=(55296<=r&&r<=57343&&n++,encodeURIComponent(e.slice(o,n+1)).substr(1).split("%")),u=0;u<i.length;u++)t.push(parseInt(i[u],16));}return t}function M(e){return a.toByteArray(e)}function c(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);o++)t[o+n]=e[o];return o}function N(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function Y(e,t){d("number"==typeof e,"cannot write a non-number as a number"),d(0<=e,"specified a negative value for writing an unsigned value"),d(e<=t,"value is larger than maximum value for type"),d(Math.floor(e)===e,"value has a fractional component");}function F(e,t,n){d("number"==typeof e,"cannot write a non-number as a number"),d(e<=t,"value larger than maximum allowed value"),d(n<=e,"value smaller than minimum allowed value"),d(Math.floor(e)===e,"value has a fractional component");}function D(e,t,n){d("number"==typeof e,"cannot write a non-number as a number"),d(e<=t,"value larger than maximum allowed value"),d(n<=e,"value smaller than minimum allowed value");}function d(e,t){if(!e)throw new Error(t||"Failed assertion")}f._augment=function(e){return e._isBuffer=true,e._get=e.get,e._set=e.set,e.get=t.get,e.set=t.set,e.write=t.write,e.toString=t.toString,e.toLocaleString=t.toString,e.toJSON=t.toJSON,e.copy=t.copy,e.slice=t.slice,e.readUInt8=t.readUInt8,e.readUInt16LE=t.readUInt16LE,e.readUInt16BE=t.readUInt16BE,e.readUInt32LE=t.readUInt32LE,e.readUInt32BE=t.readUInt32BE,e.readInt8=t.readInt8,e.readInt16LE=t.readInt16LE,e.readInt16BE=t.readInt16BE,e.readInt32LE=t.readInt32LE,e.readInt32BE=t.readInt32BE,e.readFloatLE=t.readFloatLE,e.readFloatBE=t.readFloatBE,e.readDoubleLE=t.readDoubleLE,e.readDoubleBE=t.readDoubleBE,e.writeUInt8=t.writeUInt8,e.writeUInt16LE=t.writeUInt16LE,e.writeUInt16BE=t.writeUInt16BE,e.writeUInt32LE=t.writeUInt32LE,e.writeUInt32BE=t.writeUInt32BE,e.writeInt8=t.writeInt8,e.writeInt16LE=t.writeInt16LE,e.writeInt16BE=t.writeInt16BE,e.writeInt32LE=t.writeInt32LE,e.writeInt32BE=t.writeInt32BE,e.writeFloatLE=t.writeFloatLE,e.writeFloatBE=t.writeFloatBE,e.writeDoubleLE=t.writeDoubleLE,e.writeDoubleBE=t.writeDoubleBE,e.fill=t.fill,e.inspect=t.inspect,e.toArrayBuffer=t.toArrayBuffer,e};}.call(this,O("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},O("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer");},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(c,d,e){!function(e,t,a,n,r,o,i,u,s){var a=c("buffer").Buffer,f=4,l=new a(f);l.fill(0);d.exports={hash:function(e,t,n,r){for(var o=t(function(e,t){e.length%f!=0&&(n=e.length+(f-e.length%f),e=a.concat([e,l],n));for(var n,r=[],o=t?e.readInt32BE:e.readInt32LE,i=0;i<e.length;i+=f)r.push(o.call(e,i));return r}(e=a.isBuffer(e)?e:new a(e),r),8*e.length),t=r,i=new a(n),u=t?i.writeInt32BE:i.writeInt32LE,s=0;s<o.length;s++)u.call(i,o[s],4*s,true);return i}};}.call(this,c("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},c("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify");},{buffer:3,lYpoI2:11}],5:[function(v,e,_){!function(l,c,u,d,h,p,g,y,w){var u=v("buffer").Buffer,e=v("./sha"),t=v("./sha256"),n=v("./rng"),b={sha1:e,sha256:t,md5:v("./md5")},s=64,a=new u(s);function r(e,n){var r=b[e=e||"sha1"],o=[];return r||i("algorithm:",e,"is not yet supported"),{update:function(e){return u.isBuffer(e)||(e=new u(e)),o.push(e),e.length,this},digest:function(e){var t=u.concat(o),t=n?function(e,t,n){u.isBuffer(t)||(t=new u(t)),u.isBuffer(n)||(n=new u(n)),t.length>s?t=e(t):t.length<s&&(t=u.concat([t,a],s));for(var r=new u(s),o=new u(s),i=0;i<s;i++)r[i]=54^t[i],o[i]=92^t[i];return n=e(u.concat([r,n])),e(u.concat([o,n]))}(r,n,t):r(t);return o=null,e?t.toString(e):t}}}function i(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}a.fill(0),_.createHash=function(e){return r(e)},_.createHmac=r,_.randomBytes=function(e,t){if(!t||!t.call)return new u(n(e));try{t.call(this,void 0,new u(n(e)));}catch(e){t(e);}};var o,f=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],m=function(e){_[e]=function(){i("sorry,",e,"is not implemented yet");};};for(o in f)m(f[o]);}.call(this,v("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify");},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(w,b,e){!function(e,r,o,i,u,a,f,l,y){var t=w("./helpers");function n(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,u=0;u<e.length;u+=16){var s=n,a=r,f=o,l=i,n=c(n,r,o,i,e[u+0],7,-680876936),i=c(i,n,r,o,e[u+1],12,-389564586),o=c(o,i,n,r,e[u+2],17,606105819),r=c(r,o,i,n,e[u+3],22,-1044525330);n=c(n,r,o,i,e[u+4],7,-176418897),i=c(i,n,r,o,e[u+5],12,1200080426),o=c(o,i,n,r,e[u+6],17,-1473231341),r=c(r,o,i,n,e[u+7],22,-45705983),n=c(n,r,o,i,e[u+8],7,1770035416),i=c(i,n,r,o,e[u+9],12,-1958414417),o=c(o,i,n,r,e[u+10],17,-42063),r=c(r,o,i,n,e[u+11],22,-1990404162),n=c(n,r,o,i,e[u+12],7,1804603682),i=c(i,n,r,o,e[u+13],12,-40341101),o=c(o,i,n,r,e[u+14],17,-1502002290),n=d(n,r=c(r,o,i,n,e[u+15],22,1236535329),o,i,e[u+1],5,-165796510),i=d(i,n,r,o,e[u+6],9,-1069501632),o=d(o,i,n,r,e[u+11],14,643717713),r=d(r,o,i,n,e[u+0],20,-373897302),n=d(n,r,o,i,e[u+5],5,-701558691),i=d(i,n,r,o,e[u+10],9,38016083),o=d(o,i,n,r,e[u+15],14,-660478335),r=d(r,o,i,n,e[u+4],20,-405537848),n=d(n,r,o,i,e[u+9],5,568446438),i=d(i,n,r,o,e[u+14],9,-1019803690),o=d(o,i,n,r,e[u+3],14,-187363961),r=d(r,o,i,n,e[u+8],20,1163531501),n=d(n,r,o,i,e[u+13],5,-1444681467),i=d(i,n,r,o,e[u+2],9,-51403784),o=d(o,i,n,r,e[u+7],14,1735328473),n=h(n,r=d(r,o,i,n,e[u+12],20,-1926607734),o,i,e[u+5],4,-378558),i=h(i,n,r,o,e[u+8],11,-2022574463),o=h(o,i,n,r,e[u+11],16,1839030562),r=h(r,o,i,n,e[u+14],23,-35309556),n=h(n,r,o,i,e[u+1],4,-1530992060),i=h(i,n,r,o,e[u+4],11,1272893353),o=h(o,i,n,r,e[u+7],16,-155497632),r=h(r,o,i,n,e[u+10],23,-1094730640),n=h(n,r,o,i,e[u+13],4,681279174),i=h(i,n,r,o,e[u+0],11,-358537222),o=h(o,i,n,r,e[u+3],16,-722521979),r=h(r,o,i,n,e[u+6],23,76029189),n=h(n,r,o,i,e[u+9],4,-640364487),i=h(i,n,r,o,e[u+12],11,-421815835),o=h(o,i,n,r,e[u+15],16,530742520),n=p(n,r=h(r,o,i,n,e[u+2],23,-995338651),o,i,e[u+0],6,-198630844),i=p(i,n,r,o,e[u+7],10,1126891415),o=p(o,i,n,r,e[u+14],15,-1416354905),r=p(r,o,i,n,e[u+5],21,-57434055),n=p(n,r,o,i,e[u+12],6,1700485571),i=p(i,n,r,o,e[u+3],10,-1894986606),o=p(o,i,n,r,e[u+10],15,-1051523),r=p(r,o,i,n,e[u+1],21,-2054922799),n=p(n,r,o,i,e[u+8],6,1873313359),i=p(i,n,r,o,e[u+15],10,-30611744),o=p(o,i,n,r,e[u+6],15,-1560198380),r=p(r,o,i,n,e[u+13],21,1309151649),n=p(n,r,o,i,e[u+4],6,-145523070),i=p(i,n,r,o,e[u+11],10,-1120210379),o=p(o,i,n,r,e[u+2],15,718787259),r=p(r,o,i,n,e[u+9],21,-343485551),n=g(n,s),r=g(r,a),o=g(o,f),i=g(i,l);}return Array(n,r,o,i)}function s(e,t,n,r,o,i){return g((t=g(g(t,e),g(r,i)))<<o|t>>>32-o,n)}function c(e,t,n,r,o,i,u){return s(t&n|~t&r,e,t,o,i,u)}function d(e,t,n,r,o,i,u){return s(t&r|n&~r,e,t,o,i,u)}function h(e,t,n,r,o,i,u){return s(t^n^r,e,t,o,i,u)}function p(e,t,n,r,o,i,u){return s(n^(t|~r),e,t,o,i,u)}function g(e,t){var n=(65535&e)+(65535&t);return (e>>16)+(t>>16)+(n>>16)<<16|65535&n}b.exports=function(e){return t.hash(e,n,16)};}.call(this,w("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify");},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(e,l,t){!function(e,t,n,r,o,i,u,s,f){l.exports=function(e){for(var t,n=new Array(e),r=0;r<e;r++)0==(3&r)&&(t=4294967296*Math.random()),n[r]=t>>>((3&r)<<3)&255;return n};}.call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify");},{buffer:3,lYpoI2:11}],8:[function(c,d,e){!function(e,t,n,r,o,s,a,f,l){var i=c("./helpers");function u(l,c){l[c>>5]|=128<<24-c%32,l[15+(c+64>>9<<4)]=c;for(var e,t,n,r=Array(80),o=1732584193,i=-271733879,u=-1732584194,s=271733878,d=-1009589776,h=0;h<l.length;h+=16){for(var p=o,g=i,y=u,w=s,b=d,a=0;a<80;a++){r[a]=a<16?l[h+a]:v(r[a-3]^r[a-8]^r[a-14]^r[a-16],1);var f=m(m(v(o,5),(f=i,t=u,n=s,(e=a)<20?f&t|~f&n:!(e<40)&&e<60?f&t|f&n|t&n:f^t^n)),m(m(d,r[a]),(e=a)<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514)),d=s,s=u,u=v(i,30),i=o,o=f;}o=m(o,p),i=m(i,g),u=m(u,y),s=m(s,w),d=m(d,b);}return Array(o,i,u,s,d)}function m(e,t){var n=(65535&e)+(65535&t);return (e>>16)+(t>>16)+(n>>16)<<16|65535&n}function v(e,t){return e<<t|e>>>32-t}d.exports=function(e){return i.hash(e,u,20,true)};}.call(this,c("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},c("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify");},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(c,d,e){!function(e,t,n,r,u,s,a,f,l){function b(e,t){var n=(65535&e)+(65535&t);return (e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,l){var c,d=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),t=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),n=new Array(64);e[l>>5]|=128<<24-l%32,e[15+(l+64>>9<<4)]=l;for(var r,o,h=0;h<e.length;h+=16){for(var i=t[0],u=t[1],s=t[2],p=t[3],a=t[4],g=t[5],y=t[6],w=t[7],f=0;f<64;f++)n[f]=f<16?e[f+h]:b(b(b((o=n[f-2],m(o,17)^m(o,19)^v(o,10)),n[f-7]),(o=n[f-15],m(o,7)^m(o,18)^v(o,3))),n[f-16]),c=b(b(b(b(w,m(o=a,6)^m(o,11)^m(o,25)),a&g^~a&y),d[f]),n[f]),r=b(m(r=i,2)^m(r,13)^m(r,22),i&u^i&s^u&s),w=y,y=g,g=a,a=b(p,c),p=s,s=u,u=i,i=b(c,r);t[0]=b(i,t[0]),t[1]=b(u,t[1]),t[2]=b(s,t[2]),t[3]=b(p,t[3]),t[4]=b(a,t[4]),t[5]=b(g,t[5]),t[6]=b(y,t[6]),t[7]=b(w,t[7]);}return t}var i=c("./helpers"),m=function(e,t){return e>>>t|e<<32-t},v=function(e,t){return e>>>t};d.exports=function(e){return i.hash(e,o,32,true)};}.call(this,c("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},c("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify");},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(e,t,f){!function(e,t,n,r,o,i,u,s,a){f.read=function(e,t,n,r,o){var i,u,l=8*o-r-1,c=(1<<l)-1,d=c>>1,s=-7,a=n?o-1:0,f=n?-1:1,o=e[t+a];for(a+=f,i=o&(1<<-s)-1,o>>=-s,s+=l;0<s;i=256*i+e[t+a],a+=f,s-=8);for(u=i&(1<<-s)-1,i>>=-s,s+=r;0<s;u=256*u+e[t+a],a+=f,s-=8);if(0===i)i=1-d;else {if(i===c)return u?NaN:1/0*(o?-1:1);u+=Math.pow(2,r),i-=d;}return (o?-1:1)*u*Math.pow(2,i-r)},f.write=function(e,t,l,n,r,c){var o,i,u=8*c-r-1,s=(1<<u)-1,a=s>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:c-1,h=n?1:-1,c=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,o=s):(o=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-o))<1&&(o--,n*=2),2<=(t+=1<=o+a?d/n:d*Math.pow(2,1-a))*n&&(o++,n/=2),s<=o+a?(i=0,o=s):1<=o+a?(i=(t*n-1)*Math.pow(2,r),o+=a):(i=t*Math.pow(2,a-1)*Math.pow(2,r),o=0));8<=r;e[l+f]=255&i,f+=h,i/=256,r-=8);for(o=o<<r|i,u+=r;0<u;e[l+f]=255&o,f+=h,o/=256,u-=8);e[l+f-h]|=128*c;};}.call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754");},{buffer:3,lYpoI2:11}],11:[function(e,h,t){!function(e,t,n,r,o,f,l,c,d){var i,u,s;function a(){}(e=h.exports={}).nextTick=(u="undefined"!=typeof window&&window.setImmediate,s="undefined"!=typeof window&&window.postMessage&&window.addEventListener,u?function(e){return window.setImmediate(e)}:s?(i=[],window.addEventListener("message",function(e){var t=e.source;t!==window&&null!==t||"process-tick"!==e.data||(e.stopPropagation(),0<i.length&&i.shift()());},true),function(e){i.push(e),window.postMessage("process-tick","*");}):function(e){setTimeout(e,0);}),e.title="browser",e.browser=true,e.env={},e.argv=[],e.on=a,e.addListener=a,e.once=a,e.off=a,e.removeListener=a,e.removeAllListeners=a,e.emit=a,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return "/"},e.chdir=function(e){throw new Error("process.chdir is not supported")};}.call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process");},{buffer:3,lYpoI2:11}]},{},[1])(1)});
2071
+ } (object_hash));
2072
+ return object_hash.exports;
2073
+ }
2074
+
2075
+ var object_hashExports = requireObject_hash();
2076
+ const objectHash = /*@__PURE__*/getDefaultExportFromCjs(object_hashExports);
2077
+
2078
+ export { n as $, getOrCreate as A, isNonEmptyArray as B, isString as C, DefaultMap as D, ifilter as E, iflat as F, imap as G, isIterable as H, isome as I, iunique as J, toArray as K, difference as L, equals as M, intersection as N, symmetricDifference as O, union as P, stringHash as Q, objectHash as R, Stack as S, C as T, s as U, a as V, getDefaultExportFromCjs as W, requireForeach as X, requireIterator as Y, u as Z, d as _, i$1 as a, hasIntersection as a0, t$1 as b, isSameHierarchy as c, t as d, defaultWeakMap as e, linkedList as f, commonHead as g, compareNatural as h, ifind as i, ancestorsFqn as j, commonAncestor as k, l, m, nameFromFqn as n, compareByFqnHierarchically as o, parentFqn as p, queue as q, compareFqnHierarchically as r, hierarchyDistance as s, toSet as t, hierarchyLevel as u, isAncestor as v, isDescendantOf as w, sortByFqnHierarchically as x, sortNaturalByFqn as y, sortParentsFirst as z };