@fallen-8/studio 0.0.37 → 0.0.39

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 (46) hide show
  1. package/dist-lib/{Canvas3D-CmDAo5BT.js → Canvas3D-CafFy8T8.js} +1 -1
  2. package/dist-lib/{F8GraphCanvas-COQKIUas.js → F8GraphCanvas-CMXizZ4K.js} +904 -865
  3. package/dist-lib/canvas.js +1 -1
  4. package/dist-lib/{cssMode-Cm-p9yGb.js → cssMode-Dd6oqVGH.js} +1 -1
  5. package/dist-lib/f8-studio.css +1 -1
  6. package/dist-lib/f8-studio.js +2 -2
  7. package/dist-lib/{freemarker2-DU-Ctapi.js → freemarker2-_7Qea7qU.js} +1 -1
  8. package/dist-lib/{handlebars-BsqZtC5a.js → handlebars-BrjKnoRC.js} +1 -1
  9. package/dist-lib/{html-CUyknR5b.js → html-CZOSsAmT.js} +1 -1
  10. package/dist-lib/{htmlMode-DjyPljE2.js → htmlMode-DmeNRJyP.js} +1 -1
  11. package/dist-lib/{index-BQbFjItv.js → index-CGOXemLg.js} +27547 -26386
  12. package/dist-lib/{javascript-CVQBymBa.js → javascript-E9zK2eIG.js} +1 -1
  13. package/dist-lib/{jsonMode-B3hcJ0l3.js → jsonMode-BmT8sixk.js} +1 -1
  14. package/dist-lib/{liquid-DLrt4Cls.js → liquid-mEomZ5zY.js} +1 -1
  15. package/dist-lib/{mdx-DePkemui.js → mdx-poAEdYDh.js} +1 -1
  16. package/dist-lib/{python-CUe0bWsE.js → python-BkeUbXrt.js} +1 -1
  17. package/dist-lib/{razor-DD_zUh3z.js → razor-CSXbiZmb.js} +1 -1
  18. package/dist-lib/{tsMode-Ae3UtOmp.js → tsMode-jcKLVReC.js} +1 -1
  19. package/dist-lib/types/api/client.d.ts +49 -0
  20. package/dist-lib/types/api/endpoints.d.ts +56 -10
  21. package/dist-lib/types/api/types.d.ts +72 -3
  22. package/dist-lib/types/canvas/InteractPanel.d.ts +19 -0
  23. package/dist-lib/types/components/ConfigurationSurface.d.ts +23 -2
  24. package/dist-lib/types/components/ErrorBox.d.ts +6 -0
  25. package/dist-lib/types/components/SemanticBlockEditor.d.ts +4 -1
  26. package/dist-lib/types/components/SemanticQueryEditor.d.ts +8 -1
  27. package/dist-lib/types/components/SettingRow.d.ts +14 -0
  28. package/dist-lib/types/delegate/nl/NlDraftStats.d.ts +13 -0
  29. package/dist-lib/types/delegate/nl/config.d.ts +5 -4
  30. package/dist-lib/types/delegate/nl/generate.d.ts +6 -0
  31. package/dist-lib/types/lib/canvasCap.d.ts +10 -0
  32. package/dist-lib/types/lib/canvasInteract.d.ts +174 -0
  33. package/dist-lib/types/lib/fieldHelp.d.ts +10 -1
  34. package/dist-lib/types/lib/fileLimits.d.ts +69 -0
  35. package/dist-lib/types/lib/format.d.ts +8 -0
  36. package/dist-lib/types/lib/listCaps.d.ts +16 -2
  37. package/dist-lib/types/lib/modelProvenance.d.ts +26 -0
  38. package/dist-lib/types/lib/neighborhood.d.ts +1 -0
  39. package/dist-lib/types/lib/vectorIndexCreate.d.ts +49 -0
  40. package/dist-lib/types/lib/vectorSearch.d.ts +19 -0
  41. package/dist-lib/types/state/instanceStore.d.ts +59 -4
  42. package/dist-lib/types/state/integrations.d.ts +21 -1
  43. package/dist-lib/{typescript-LNGesWYR.js → typescript-BqWn12P7.js} +1 -1
  44. package/dist-lib/{xml-BuD_-6ib.js → xml-BkH9m6gQ.js} +1 -1
  45. package/dist-lib/{yaml-DCzPbyTS.js → yaml-DURIwCnM.js} +1 -1
  46. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { jsxs as ma, jsx as We } from "react/jsx-runtime";
2
- import Dt, { createContext as di, useContext as fi, useRef as Be, useEffect as Qe, useImperativeHandle as gi, lazy as ya, useMemo as an, Suspense as ba } from "react";
3
- const on = (n) => {
2
+ import Dt, { createContext as di, useContext as fi, useRef as Be, useEffect as Qe, useImperativeHandle as gi, lazy as ya, useMemo as on, Suspense as ba } from "react";
3
+ const sn = (n) => {
4
4
  let r;
5
5
  const t = /* @__PURE__ */ new Set(), e = (l, c) => {
6
6
  const h = typeof l == "function" ? l(r) : l;
@@ -10,7 +10,7 @@ const on = (n) => {
10
10
  }
11
11
  }, i = () => r, s = { setState: e, getState: i, getInitialState: () => u, subscribe: (l) => (t.add(l), () => t.delete(l)) }, u = r = n(e, i, s);
12
12
  return s;
13
- }, wa = ((n) => n ? on(n) : on), Ea = (n) => n;
13
+ }, wa = ((n) => n ? sn(n) : sn), Ea = (n) => n;
14
14
  function _a(n, r = Ea) {
15
15
  const t = Dt.useSyncExternalStore(
16
16
  n.subscribe,
@@ -40,12 +40,12 @@ function Sa(n, r) {
40
40
  removeItem: (i) => t.removeItem(i)
41
41
  };
42
42
  }
43
- const _r = (n) => (r) => {
43
+ const Tr = (n) => (r) => {
44
44
  try {
45
45
  const t = n(r);
46
46
  return t instanceof Promise ? t : {
47
47
  then(e) {
48
- return _r(e)(t);
48
+ return Tr(e)(t);
49
49
  },
50
50
  catch(e) {
51
51
  return this;
@@ -57,7 +57,7 @@ const _r = (n) => (r) => {
57
57
  return this;
58
58
  },
59
59
  catch(e) {
60
- return _r(e)(t);
60
+ return Tr(e)(t);
61
61
  }
62
62
  };
63
63
  }
@@ -108,7 +108,7 @@ const _r = (n) => (r) => {
108
108
  return p((C = e()) != null ? C : y);
109
109
  });
110
110
  const m = ((k = a.onRehydrateStorage) == null ? void 0 : k.call(a, (w = e()) != null ? w : y)) || void 0;
111
- return _r(c.getItem.bind(c))(a.name).then((p) => {
111
+ return Tr(c.getItem.bind(c))(a.name).then((p) => {
112
112
  if (p)
113
113
  if (typeof p.version == "number" && p.version !== a.version) {
114
114
  if (a.migrate) {
@@ -160,7 +160,7 @@ const _r = (n) => (r) => {
160
160
  l.delete(w);
161
161
  })
162
162
  }, a.skipHydration || R(), b || y;
163
- }, Aa = Ra, Tr = {
163
+ }, Aa = Ra, Sr = {
164
164
  renderer: "2d",
165
165
  layout2d: "force",
166
166
  layout3d: "force",
@@ -205,23 +205,23 @@ function ka(n) {
205
205
  }
206
206
  return { ok: !0, vector: e };
207
207
  }
208
- const $r = {
208
+ const Mr = {
209
209
  source: "vector",
210
210
  vectorText: "",
211
211
  queryText: "",
212
212
  embeddingName: "default",
213
213
  metric: "Cosine"
214
214
  }, vi = {
215
- ...$r,
215
+ ...Mr,
216
216
  enabled: !1,
217
217
  minScoreEnabled: !1,
218
218
  minScore: "0.7",
219
219
  costBySimilarity: !1
220
220
  };
221
- function nc(n) {
221
+ function sc(n) {
222
222
  return n.enabled && (n.minScoreEnabled || n.costBySimilarity);
223
223
  }
224
- function ic(n) {
224
+ function uc(n) {
225
225
  return n.enabled && n.costBySimilarity;
226
226
  }
227
227
  function Ca(n, r) {
@@ -246,21 +246,23 @@ function Ca(n, r) {
246
246
  }
247
247
  return { ok: !0, spec: t };
248
248
  }
249
- function ac(n) {
249
+ function lc(n) {
250
250
  const r = n.trim();
251
251
  if (!r)
252
252
  return;
253
253
  const t = Number(r);
254
254
  return Number.isFinite(t) ? t : void 0;
255
255
  }
256
- function oc(n) {
256
+ function cc(n) {
257
257
  const r = n.metric === "L2" ? "≤" : "≥", t = [`${n.metric} over '${n.embeddingName}' (d=${n.dimension})`];
258
258
  n.minScore != null && t.push(`pre-filter ${r} ${n.minScore}`);
259
259
  for (const e of n.patternThresholds ?? [])
260
260
  t.push(`step ${e.pattern} ${r} ${e.minScore}`);
261
- return n.queryText && t.push(`from text "${n.queryText}"`), t.push("bound at creation — recalculate reuses the stored vector"), t.join(" · ");
261
+ return n.queryText && t.push(`from text "${n.queryText}"`), n.embeddingBackend && t.push(
262
+ n.embeddingIdentity ? `via ${n.embeddingBackend} · ${n.embeddingIdentity}` : `via ${n.embeddingBackend}`
263
+ ), t.push("bound at creation — recalculate reuses the stored vector"), t.join(" · ");
262
264
  }
263
- function sc(n, r) {
265
+ function hc(n, r) {
264
266
  if (!n.enabled)
265
267
  return { ok: !0, spec: void 0 };
266
268
  const t = Ca(n, { providerEnabled: r.providerEnabled });
@@ -285,29 +287,29 @@ function sc(n, r) {
285
287
  }
286
288
  return { ok: !0, spec: e };
287
289
  }
288
- const Sr = [
290
+ const Rr = [
289
291
  "vertexCreated",
290
292
  "vertexRemoved",
291
293
  "edgeCreated",
292
294
  "edgeRemoved",
293
295
  "propertySet",
294
296
  "propertyRemoved"
295
- ], Rr = ["vertex", "edge"], sn = {
296
- kinds: [...Sr],
297
- elements: [...Rr],
297
+ ], Ar = ["vertex", "edge"], un = {
298
+ kinds: [...Rr],
299
+ elements: [...Ar],
298
300
  labels: [],
299
301
  keys: []
300
302
  };
301
- function uc(n, r) {
303
+ function dc(n, r) {
302
304
  return n.kind === "resync" ? !0 : !(!r.kinds.includes(n.kind) || n.element !== void 0 && !r.elements.includes(n.element) || r.labels.length > 0 && (n.label === void 0 || !r.labels.includes(n.label)) || r.keys.length > 0 && (n.key === void 0 || !r.keys.includes(n.key)));
303
305
  }
304
- function lc(n) {
306
+ function fc(n) {
305
307
  return n.kinds.length > 0 && n.elements.length > 0;
306
308
  }
307
- function cc(n) {
309
+ function gc(n) {
308
310
  return {
309
- kinds: n.kinds.length === Sr.length ? void 0 : Sr.filter((r) => n.kinds.includes(r)),
310
- elements: n.elements.length === Rr.length ? void 0 : Rr.filter((r) => n.elements.includes(r)),
311
+ kinds: n.kinds.length === Rr.length ? void 0 : Rr.filter((r) => n.kinds.includes(r)),
312
+ elements: n.elements.length === Ar.length ? void 0 : Ar.filter((r) => n.elements.includes(r)),
311
313
  labels: n.labels.length > 0 ? n.labels : void 0,
312
314
  keys: n.keys.length > 0 ? n.keys : void 0
313
315
  };
@@ -339,7 +341,7 @@ function La() {
339
341
  }));
340
342
  }
341
343
  const xe = /* @__PURE__ */ new Map();
342
- function hc(n, r) {
344
+ function pc(n, r) {
343
345
  const t = He(n, r);
344
346
  let e = xe.get(t);
345
347
  return e || (e = La(), xe.set(t, e)), e;
@@ -348,11 +350,11 @@ function Ga(n, r) {
348
350
  const t = He(n, r);
349
351
  xe.get(t)?.getState().clear(), xe.delete(t);
350
352
  }
351
- function Pa(n) {
353
+ function Ia(n) {
352
354
  for (const [r, t] of [...xe.entries()])
353
355
  (r === n || r.startsWith(`${n}/`)) && (t.getState().clear(), xe.delete(r));
354
356
  }
355
- function Ia(n, r, t) {
357
+ function Pa(n, r, t) {
356
358
  const e = He(n, r), i = He(n, t);
357
359
  if (e === i) return;
358
360
  const a = xe.get(e);
@@ -373,17 +375,17 @@ const Fa = {
373
375
  fontMono: "--font-mono"
374
376
  };
375
377
  let _t = {}, wt = 0;
376
- function dc() {
378
+ function vc() {
377
379
  return _t;
378
380
  }
379
- function fc(n) {
381
+ function mc(n) {
380
382
  if (wt > 0 && n !== _t)
381
383
  throw new Error(
382
384
  "F8 Studio is already mounted. Two simultaneous Studio embeds are not supported (they share one instance registry and one set of persisted keys); unmount the first, or run the second in its own realm (iframe/worker)."
383
385
  );
384
386
  _t = n;
385
387
  }
386
- function gc() {
388
+ function yc() {
387
389
  if (wt > 0)
388
390
  throw new Error(
389
391
  "F8 Studio is already mounted. Two simultaneous Studio embeds are not supported (they share one instance registry and one set of persisted keys); unmount the first, or run the second in its own realm (iframe/worker)."
@@ -394,7 +396,7 @@ function gc() {
394
396
  n || (n = !0, wt -= 1);
395
397
  };
396
398
  }
397
- function pc() {
399
+ function bc() {
398
400
  wt === 0 && (_t = {});
399
401
  }
400
402
  function Oa(n) {
@@ -408,11 +410,11 @@ function za(n) {
408
410
  return r;
409
411
  }
410
412
  const Na = di({});
411
- function vc() {
413
+ function wc() {
412
414
  return fi(Na);
413
415
  }
414
416
  const Ua = di(void 0);
415
- function mc() {
417
+ function Ec() {
416
418
  return fi(Ua);
417
419
  }
418
420
  function Ke(n) {
@@ -421,12 +423,12 @@ function Ke(n) {
421
423
  function mi(n) {
422
424
  return n.label ?? n.edgePropertyId ?? null;
423
425
  }
424
- const un = 200;
425
- function ln(n) {
426
+ const ln = 200;
427
+ function cn(n) {
426
428
  const r = {};
427
429
  for (const t of n ?? []) {
428
430
  const e = t.propertyValue;
429
- typeof e == "number" || typeof e == "boolean" ? r[t.propertyId] = e : typeof e == "string" && (r[t.propertyId] = e.length > un ? e.slice(0, un) : e);
431
+ typeof e == "number" || typeof e == "boolean" ? r[t.propertyId] = e : typeof e == "string" && (r[t.propertyId] = e.length > ln ? e.slice(0, ln) : e);
430
432
  }
431
433
  return r;
432
434
  }
@@ -436,7 +438,7 @@ function $a(n, r, t) {
436
438
  e[a.id] = {
437
439
  id: a.id,
438
440
  label: a.label ?? null,
439
- props: ln(a.properties)
441
+ props: cn(a.properties)
440
442
  };
441
443
  for (const a of r)
442
444
  e[a.sourceVertex] || (e[a.sourceVertex] = { id: a.sourceVertex, label: null }), e[a.targetVertex] || (e[a.targetVertex] = { id: a.targetVertex, label: null }), i[a.id] = {
@@ -445,11 +447,11 @@ function $a(n, r, t) {
445
447
  target: a.targetVertex,
446
448
  edgePropertyId: a.edgePropertyId ?? null,
447
449
  label: a.label ?? null,
448
- props: ln(a.properties)
450
+ props: cn(a.properties)
449
451
  };
450
452
  return { nodes: e, edges: i };
451
453
  }
452
- const Ma = ["path", "subgraph", "stored"], cn = "path", Ba = (n) => typeof n == "string" && Ma.includes(n), yc = (n) => n === "SubGraph" ? "subgraph" : "path", qt = {
454
+ const Ma = ["path", "subgraph", "stored"], hn = "path", Ba = (n) => typeof n == "string" && Ma.includes(n), _c = (n) => n === "SubGraph" ? "subgraph" : "path", Kt = {
453
455
  from: "",
454
456
  to: "",
455
457
  algorithm: "BLS",
@@ -464,13 +466,14 @@ const Ma = ["path", "subgraph", "stored"], cn = "path", Ba = (n) => typeof n ==
464
466
  filterSource: "inline",
465
467
  storedQuery: "",
466
468
  semantic: { ...vi }
467
- }, Kt = {
469
+ }, Wa = ["property", "index", "semantic"], Mt = {
468
470
  mode: "property",
469
471
  propertyScope: "key",
470
472
  propertyId: "",
471
473
  searchTerm: "",
472
474
  searchLabel: "",
473
475
  indexId: "",
476
+ semanticIndexId: "",
474
477
  form: "equality",
475
478
  operator: "Equals",
476
479
  resultType: "Both",
@@ -486,9 +489,13 @@ const Ma = ["path", "subgraph", "stored"], cn = "path", Ba = (n) => typeof n ==
486
489
  vectorK: "10",
487
490
  vectorKind: "any",
488
491
  vectorLabel: "",
489
- vectorSource: "vector",
490
492
  vectorSearchText: ""
491
- }, Lt = {
493
+ };
494
+ function Ha(n) {
495
+ const { vectorSource: r, ...t } = n ?? {}, e = { ...Mt, ...t };
496
+ return Wa.includes(e.mode) || (e.mode = Mt.mode), r === "text" && e.mode === "index" && e.form === "vector" ? { ...e, mode: "semantic", semanticIndexId: e.semanticIndexId || e.indexId } : e;
497
+ }
498
+ const Lt = {
492
499
  name: "",
493
500
  fromSubGraph: "",
494
501
  vertexFilterMode: "everything",
@@ -498,7 +505,7 @@ const Ma = ["path", "subgraph", "stored"], cn = "path", Ba = (n) => typeof n ==
498
505
  patterns: [],
499
506
  filterSource: "inline",
500
507
  storedQuery: "",
501
- semanticQuery: { ...$r }
508
+ semanticQuery: { ...Mr }
502
509
  }, Xt = {
503
510
  idInput: "",
504
511
  lookupKind: "graphelement",
@@ -518,33 +525,44 @@ const Ma = ["path", "subgraph", "stored"], cn = "path", Ba = (n) => typeof n ==
518
525
  showWriteBack: !1,
519
526
  writeBack: !1,
520
527
  writeBackKey: ""
521
- }, hn = {
528
+ }, ja = ["style", "find", "connect", "interact"], Va = (n) => typeof n == "string" && ja.includes(n), Zt = {
522
529
  tab: "style",
523
530
  findTerm: "",
524
531
  findLabel: "",
525
532
  findResultType: "Both",
526
533
  connectMaxDepth: 3,
527
- connectScope: "all"
534
+ connectScope: "all",
535
+ interactLabel: "",
536
+ interactPropKey: "",
537
+ interactPropTerm: "",
538
+ interactDegreeSource: "database",
539
+ interactDegreeDirection: "total",
540
+ interactDegreeOp: "over",
541
+ interactDegreeValue: "",
542
+ interactSemanticText: "",
543
+ interactSemanticIndexId: "",
544
+ interactSemanticDirection: "closer",
545
+ interactSemanticThreshold: ""
528
546
  };
529
- function Wa(n) {
547
+ function qa(n) {
530
548
  return pi()(
531
549
  Aa(
532
550
  (r) => ({
533
551
  canvasNodes: {},
534
552
  canvasEdges: {},
535
- styleConfig: { ...Tr },
553
+ styleConfig: { ...Sr },
536
554
  pathOverlay: null,
537
555
  wholeGraphTruncation: null,
538
556
  resultSets: [],
539
- pathDraft: { ...qt },
540
- queryDraft: { ...Kt },
557
+ pathDraft: { ...Kt },
558
+ queryDraft: { ...Mt },
541
559
  subgraphDraft: { ...Lt },
542
560
  browserDraft: { ...Xt },
543
561
  analyticsDraft: { ...Yt },
544
- canvasToolsDraft: { ...hn },
545
- traverseTab: cn,
562
+ canvasToolsDraft: { ...Zt },
563
+ traverseTab: hn,
546
564
  scanPrefill: null,
547
- feedFilter: { ...sn },
565
+ feedFilter: { ...un },
548
566
  inspectPrefill: null,
549
567
  integrationWatch: null,
550
568
  mergeIntoCanvas: (t, e) => r((i) => {
@@ -568,6 +586,16 @@ function Wa(n) {
568
586
  );
569
587
  return { canvasNodes: a, canvasEdges: o };
570
588
  }),
589
+ removeManyFromCanvas: (t) => r((e) => {
590
+ if (t.length === 0) return {};
591
+ const i = new Set(t), a = {};
592
+ for (const [s, u] of Object.entries(e.canvasNodes))
593
+ i.has(Number(s)) || (a[Number(s)] = u);
594
+ const o = {};
595
+ for (const [s, u] of Object.entries(e.canvasEdges))
596
+ !i.has(u.source) && !i.has(u.target) && (o[Number(s)] = u);
597
+ return { canvasNodes: a, canvasEdges: o };
598
+ }),
571
599
  clearCanvas: () => r({
572
600
  canvasNodes: {},
573
601
  canvasEdges: {},
@@ -590,9 +618,9 @@ function Wa(n) {
590
618
  })),
591
619
  removeResultSet: (t) => r((e) => ({ resultSets: e.resultSets.filter((i) => i.id !== t) })),
592
620
  setPathDraft: (t) => r((e) => ({ pathDraft: { ...e.pathDraft, ...t } })),
593
- resetPathDraft: () => r({ pathDraft: { ...qt } }),
621
+ resetPathDraft: () => r({ pathDraft: { ...Kt } }),
594
622
  setQueryDraft: (t) => r((e) => ({ queryDraft: { ...e.queryDraft, ...t } })),
595
- resetQueryDraft: () => r({ queryDraft: { ...Kt } }),
623
+ resetQueryDraft: () => r({ queryDraft: { ...Mt } }),
596
624
  setSubgraphDraft: (t) => r((e) => ({ subgraphDraft: { ...e.subgraphDraft, ...t } })),
597
625
  resetSubgraphDraft: () => r({ subgraphDraft: { ...Lt } }),
598
626
  setBrowserDraft: (t) => r((e) => ({ browserDraft: { ...e.browserDraft, ...t } })),
@@ -619,13 +647,13 @@ function Wa(n) {
619
647
  ...t,
620
648
  ...e,
621
649
  pathDraft: {
622
- ...qt,
650
+ ...Kt,
623
651
  ...e.pathDraft ?? {},
624
652
  // Nested draft added after some state was persisted: deep-default it too, so
625
653
  // an older pathDraft picks up every semantic field instead of a partial.
626
654
  semantic: { ...vi, ...e.pathDraft?.semantic ?? {} }
627
655
  },
628
- queryDraft: { ...Kt, ...e.queryDraft ?? {} },
656
+ queryDraft: Ha(e.queryDraft),
629
657
  // A subgraph draft persisted before the slot-mode restructure (feature
630
658
  // subgraph-semantic-thresholds) carried a block-local `semantic` object and no
631
659
  // slot modes; it is RESET rather than migrated - a draft is a session
@@ -634,18 +662,26 @@ function Wa(n) {
634
662
  ...Lt,
635
663
  ...e.subgraphDraft ?? {},
636
664
  semanticQuery: {
637
- ...$r,
665
+ ...Mr,
638
666
  ...e.subgraphDraft?.semanticQuery ?? {}
639
667
  }
640
668
  },
641
669
  browserDraft: { ...Xt, ...e.browserDraft ?? {} },
642
670
  analyticsDraft: { ...Yt, ...e.analyticsDraft ?? {} },
643
- canvasToolsDraft: { ...hn, ...e.canvasToolsDraft ?? {} },
671
+ canvasToolsDraft: {
672
+ ...Zt,
673
+ ...e.canvasToolsDraft ?? {},
674
+ // Normalized for the same reason as traverseTab below: the canvas tool strip renders
675
+ // one panel per known id, so a tab this build does not know (a workspace persisted by
676
+ // a newer Studio, a rolled-back container, hand-edited storage) would show a strip
677
+ // with nothing selected and an empty area under it.
678
+ tab: Va(e.canvasToolsDraft?.tab) ? e.canvasToolsDraft.tab : Zt.tab
679
+ },
644
680
  // Normalized, not trusted: a tab id this build does not know (hand-edited storage,
645
681
  // a renamed tab) would leave the Traverse screen with every panel hidden.
646
- traverseTab: Ba(e.traverseTab) ? e.traverseTab : cn,
647
- styleConfig: { ...Tr, ...e.styleConfig ?? {} },
648
- feedFilter: { ...sn, ...e.feedFilter ?? {} },
682
+ traverseTab: Ba(e.traverseTab) ? e.traverseTab : hn,
683
+ styleConfig: { ...Sr, ...e.styleConfig ?? {} },
684
+ feedFilter: { ...un, ...e.feedFilter ?? {} },
649
685
  // One-shots never rehydrate (see partialize); this also drops values
650
686
  // persisted before the partialize existed.
651
687
  scanPrefill: null,
@@ -661,31 +697,31 @@ function Wa(n) {
661
697
  );
662
698
  }
663
699
  const je = /* @__PURE__ */ new Map();
664
- function bc(n, r) {
700
+ function Tc(n, r) {
665
701
  const t = He(n, r);
666
702
  let e = je.get(t);
667
- return e || (e = Wa(t), je.set(t, e)), e;
703
+ return e || (e = qa(t), je.set(t, e)), e;
668
704
  }
669
- function wc(n, r) {
705
+ function Sc(n, r) {
670
706
  const t = He(n, r);
671
707
  je.delete(t), localStorage.removeItem(Ke(t)), Ga(n, r);
672
708
  }
673
- function Ec(n) {
709
+ function Rc(n) {
674
710
  for (const r of [...je.keys()])
675
711
  (r === n || r.startsWith(`${n}/`)) && je.delete(r);
676
712
  for (let r = localStorage.length - 1; r >= 0; r--) {
677
713
  const t = localStorage.key(r);
678
714
  (t === Ke(n) || t?.startsWith(Ke(`${n}/`))) && localStorage.removeItem(t);
679
715
  }
680
- Pa(n);
716
+ Ia(n);
681
717
  }
682
- function _c(n, r, t) {
718
+ function Ac(n, r, t) {
683
719
  const e = He(n, r), i = He(n, t);
684
720
  if (e === i) return;
685
721
  const a = localStorage.getItem(Ke(e));
686
- a !== null && (localStorage.setItem(Ke(i), a), localStorage.removeItem(Ke(e))), je.delete(e), je.delete(i), Ia(n, r, t);
722
+ a !== null && (localStorage.setItem(Ke(i), a), localStorage.removeItem(Ke(e))), je.delete(e), je.delete(i), Pa(n, r, t);
687
723
  }
688
- function Tc() {
724
+ function kc() {
689
725
  je.clear();
690
726
  }
691
727
  const dn = [
@@ -710,7 +746,7 @@ const dn = [
710
746
  "#79c0ff"
711
747
  // light blue
712
748
  ], Tt = "#55647a";
713
- function Mt(n) {
749
+ function Bt(n) {
714
750
  if (!n) return Tt;
715
751
  let r = 0;
716
752
  for (let t = 0; t < n.length; t++)
@@ -718,19 +754,19 @@ function Mt(n) {
718
754
  return dn[Math.abs(r) % dn.length];
719
755
  }
720
756
  function yi(n) {
721
- return n == null || n === "" ? Tt : Mt(String(n));
757
+ return n == null || n === "" ? Tt : Bt(String(n));
722
758
  }
723
- const Sc = "#39c5cf", Rc = "#f778ba";
724
- function Ha(n) {
759
+ const Cc = "#39c5cf", xc = "#f778ba";
760
+ function Ka(n) {
725
761
  const r = Math.min(1, Math.max(0, n)), t = [57, 197, 207], e = [247, 120, 186];
726
762
  return `#${t.map((a, o) => Math.round(a + (e[o] - a) * r)).map((a) => a.toString(16).padStart(2, "0")).join("")}`;
727
763
  }
728
- const ja = 5e3, Va = {
764
+ const Xa = 5e3, Ya = {
729
765
  nodeIds: /* @__PURE__ */ new Set(),
730
766
  edgeIds: /* @__PURE__ */ new Set(),
731
767
  active: !1,
732
768
  dim: !1
733
- }, Mr = 5, qa = [3, 14], Ka = 1, Xa = [0.5, 5], Ya = 11, Za = 9, Qa = 8, Ja = 3, eo = "#4cc38a", to = "#2a3240", ro = "#1a2029", no = "#2c3543";
769
+ }, Br = 5, Za = [3, 14], Qa = 1, Ja = [0.5, 5], eo = 11, to = 9, ro = 8, no = 3, io = "#4cc38a", ao = "#2a3240", oo = "#1a2029", so = "#2c3543";
734
770
  function tt(n, r) {
735
771
  return (n.props ?? {})[r];
736
772
  }
@@ -742,12 +778,12 @@ function St(n) {
742
778
  }
743
779
  return null;
744
780
  }
745
- function io(n) {
781
+ function uo(n) {
746
782
  if (n == null || typeof n == "boolean") return null;
747
783
  const r = String(n).trim();
748
784
  return r ? /^(https?:\/\/|data:)/i.test(r) ? { kind: "url", value: r } : { kind: "emoji", value: [...r].slice(0, 8).join("") } : null;
749
785
  }
750
- function Ar(n, r, t) {
786
+ function kr(n, r, t) {
751
787
  if (r !== "property" || !t) return { kind: "label" };
752
788
  const e = n.map((i) => tt(i, t)).filter((i) => i !== void 0 && i !== "");
753
789
  if (e.length > 0 && e.every((i) => St(i) !== null)) {
@@ -769,7 +805,7 @@ function fn(n, r, t) {
769
805
  const i = St(e);
770
806
  if (i === null) return Tt;
771
807
  const a = n.max - n.min;
772
- return Ha(a === 0 ? 0.5 : (i - n.min) / a);
808
+ return Ka(a === 0 ? 0.5 : (i - n.min) / a);
773
809
  }
774
810
  return yi(e);
775
811
  }
@@ -794,15 +830,15 @@ function pn(n, r) {
794
830
  const [t, e] = n;
795
831
  return Rt(t) && Rt(e) ? n : r;
796
832
  }
797
- function ao(n, r) {
833
+ function lo(n, r) {
798
834
  const [t, e] = r;
799
835
  return Math.min(Math.max(n, Math.min(t, e)), Math.max(t, e));
800
836
  }
801
837
  function vn(n, r, t) {
802
- return Rt(n) ? r : ao(r, t);
838
+ return Rt(n) ? r : lo(r, t);
803
839
  }
804
- function oo(n) {
805
- const r = Gt(n.nodeSize, Mr), t = pn(n.nodeSizeRange, qa), e = Gt(n.edgeWidth, Ka), i = pn(n.edgeWidthRange, Xa);
840
+ function co(n) {
841
+ const r = Gt(n.nodeSize, Br), t = pn(n.nodeSizeRange, Za), e = Gt(n.edgeWidth, Qa), i = pn(n.edgeWidthRange, Ja);
806
842
  return {
807
843
  nodeSize: r,
808
844
  nodeSizeRange: t,
@@ -810,11 +846,11 @@ function oo(n) {
810
846
  edgeWidth: e,
811
847
  edgeWidthRange: i,
812
848
  edgeWidthFallback: vn(n.edgeWidth, e, i),
813
- labelSize: Gt(n.labelSize, Ya),
814
- edgeLabelSize: Gt(n.edgeLabelSize, Za)
849
+ labelSize: Gt(n.labelSize, eo),
850
+ edgeLabelSize: Gt(n.edgeLabelSize, to)
815
851
  };
816
852
  }
817
- function so(n) {
853
+ function ho(n) {
818
854
  const r = /* @__PURE__ */ new Map(), t = (e) => {
819
855
  let i = r.get(e);
820
856
  return i || (i = { in: 0, out: 0 }, r.set(e, i)), i;
@@ -823,8 +859,8 @@ function so(n) {
823
859
  t(e.source).out++, t(e.target).in++;
824
860
  return r;
825
861
  }
826
- function uo(n, r, t, e) {
827
- const i = Object.values(n), a = Object.values(r), o = oo(e), s = Ar(i, e.nodeColorMode, e.nodeColorProperty), u = Ar(a, e.edgeColorMode, e.edgeColorProperty), l = e.nodeSizeMode === "in-degree" || e.nodeSizeMode === "out-degree" || e.nodeSizeMode === "degree" ? so(a) : null, c = (w) => {
862
+ function fo(n, r, t, e) {
863
+ const i = Object.values(n), a = Object.values(r), o = co(e), s = kr(i, e.nodeColorMode, e.nodeColorProperty), u = kr(a, e.edgeColorMode, e.edgeColorProperty), l = e.nodeSizeMode === "in-degree" || e.nodeSizeMode === "out-degree" || e.nodeSizeMode === "degree" ? ho(a) : null, c = (w) => {
828
864
  switch (e.nodeSizeMode) {
829
865
  case "property":
830
866
  return e.nodeSizeProperty ? St(tt(w, e.nodeSizeProperty)) : null;
@@ -841,10 +877,10 @@ function uo(n, r, t, e) {
841
877
  }
842
878
  }, h = e.nodeSizeMode === "fixed" ? () => o.nodeSize : gn(i.map(c), o.nodeSizeRange, o.nodeSizeFallback), v = (w) => e.edgeWidthMode === "property" && e.edgeWidthProperty ? St(tt(w, e.edgeWidthProperty)) : null, y = e.edgeWidthMode === "fixed" ? () => o.edgeWidth : gn(a.map(v), o.edgeWidthRange, o.edgeWidthFallback), b = {};
843
879
  for (const w of i) {
844
- const k = t.nodeIds.has(w.id), E = t.active && t.dim && !k, m = h(c(w)), p = e.nodeImageProperty ? io(tt(w, e.nodeImageProperty)) : null;
880
+ const k = t.nodeIds.has(w.id), E = t.active && t.dim && !k, m = h(c(w)), p = e.nodeImageProperty ? uo(tt(w, e.nodeImageProperty)) : null;
845
881
  b[w.id] = {
846
- color: E ? to : fn(s, w, Mt(w.label)),
847
- size: k ? Math.max(m, Qa) : m,
882
+ color: E ? ao : fn(s, w, Bt(w.label)),
883
+ size: k ? Math.max(m, ro) : m,
848
884
  // A dimmed image would still pop against the dim palette — suppress it (FR-9).
849
885
  image: E ? null : p,
850
886
  zIndex: k ? 2 : 1,
@@ -853,19 +889,19 @@ function uo(n, r, t, e) {
853
889
  }
854
890
  const R = {};
855
891
  for (const w of a) {
856
- const k = t.edgeIds.has(w.id), E = t.active && t.dim && !k, m = y(v(w)), p = mi(w), C = p ? Mt(p) : no;
892
+ const k = t.edgeIds.has(w.id), E = t.active && t.dim && !k, m = y(v(w)), p = mi(w), C = p ? Bt(p) : so;
857
893
  R[w.id] = {
858
- color: k ? eo : E ? ro : fn(u, w, C),
859
- width: k ? Math.max(m, Ja) : m,
894
+ color: k ? io : E ? oo : fn(u, w, C),
895
+ width: k ? Math.max(m, no) : m,
860
896
  zIndex: k ? 2 : 0,
861
897
  dimmed: E
862
898
  };
863
899
  }
864
900
  return { nodes: b, edges: R, magnitudes: o };
865
901
  }
866
- const lo = 12;
867
- function Ac(n, r) {
868
- const t = Object.values(n), e = Ar(t, r.nodeColorMode, r.nodeColorProperty);
902
+ const go = 12;
903
+ function Dc(n, r) {
904
+ const t = Object.values(n), e = kr(t, r.nodeColorMode, r.nodeColorProperty);
869
905
  if (e.kind === "gradient")
870
906
  return { kind: "gradient", title: e.property, min: e.min, max: e.max };
871
907
  const i = /* @__PURE__ */ new Map();
@@ -875,29 +911,29 @@ function Ac(n, r) {
875
911
  const c = tt(o, e.property);
876
912
  s = c === void 0 || c === "" ? "(missing)" : String(c), u = c === void 0 || c === "" ? Tt : yi(c);
877
913
  } else
878
- s = o.label ?? "(unlabeled)", u = Mt(o.label);
914
+ s = o.label ?? "(unlabeled)", u = Bt(o.label);
879
915
  const l = i.get(s);
880
916
  l ? l.count++ : i.set(s, { color: u, count: 1 });
881
917
  }
882
- const a = [...i.entries()].map(([o, { color: s, count: u }]) => ({ key: o, color: s, count: u })).sort((o, s) => s.count - o.count).slice(0, lo);
918
+ const a = [...i.entries()].map(([o, { color: s, count: u }]) => ({ key: o, color: s, count: u })).sort((o, s) => s.count - o.count).slice(0, go);
883
919
  return {
884
920
  kind: "categorical",
885
921
  title: e.kind === "categorical" ? e.property : "labels",
886
922
  entries: a
887
923
  };
888
924
  }
889
- function kc(n) {
925
+ function Lc(n) {
890
926
  const r = /* @__PURE__ */ new Set();
891
927
  for (const t of n)
892
928
  for (const e of Object.keys(t.props ?? {})) r.add(e);
893
929
  return [...r].sort();
894
930
  }
895
- function Br(n) {
931
+ function Wr(n) {
896
932
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
897
933
  }
898
- var Pt = { exports: {} }, mn;
899
- function co() {
900
- if (mn) return Pt.exports;
934
+ var It = { exports: {} }, mn;
935
+ function po() {
936
+ if (mn) return It.exports;
901
937
  mn = 1;
902
938
  var n = typeof Reflect == "object" ? Reflect : null, r = n && typeof n.apply == "function" ? n.apply : function(C, L, g) {
903
939
  return Function.prototype.apply.call(C, L, g);
@@ -916,7 +952,7 @@ function co() {
916
952
  function a() {
917
953
  a.init.call(this);
918
954
  }
919
- Pt.exports = a, Pt.exports.once = k, a.EventEmitter = a, a.prototype._events = void 0, a.prototype._eventsCount = 0, a.prototype._maxListeners = void 0;
955
+ It.exports = a, It.exports.once = k, a.EventEmitter = a, a.prototype._events = void 0, a.prototype._eventsCount = 0, a.prototype._maxListeners = void 0;
920
956
  var o = 10;
921
957
  function s(p) {
922
958
  if (typeof p != "function")
@@ -958,13 +994,13 @@ function co() {
958
994
  var O = new Error("Unhandled error." + (D ? " (" + D.message + ")" : ""));
959
995
  throw O.context = D, O;
960
996
  }
961
- var I = S[C];
962
- if (I === void 0)
997
+ var P = S[C];
998
+ if (P === void 0)
963
999
  return !1;
964
- if (typeof I == "function")
965
- r(I, this, L);
1000
+ if (typeof P == "function")
1001
+ r(P, this, L);
966
1002
  else
967
- for (var _ = I.length, W = b(I, _), g = 0; g < _; ++g)
1003
+ for (var _ = P.length, W = b(P, _), g = 0; g < _; ++g)
968
1004
  r(W[g], this, L);
969
1005
  return !0;
970
1006
  };
@@ -1105,17 +1141,17 @@ function co() {
1105
1141
  else
1106
1142
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof p);
1107
1143
  }
1108
- return Pt.exports;
1144
+ return It.exports;
1109
1145
  }
1110
- var Wr = co();
1111
- function ho() {
1146
+ var Hr = po();
1147
+ function vo() {
1112
1148
  const n = arguments[0];
1113
1149
  for (let r = 1, t = arguments.length; r < t; r++)
1114
1150
  if (arguments[r])
1115
1151
  for (const e in arguments[r]) n[e] = arguments[r][e];
1116
1152
  return n;
1117
1153
  }
1118
- let ue = ho;
1154
+ let ue = vo;
1119
1155
  typeof Object.assign == "function" && (ue = Object.assign);
1120
1156
  function _e(n, r, t, e) {
1121
1157
  const i = n._nodes.get(r);
@@ -1148,7 +1184,7 @@ function Ae(n, r, t) {
1148
1184
  function yn(n) {
1149
1185
  return !(!he(n) || n.attributes && !Array.isArray(n.attributes));
1150
1186
  }
1151
- function fo() {
1187
+ function mo() {
1152
1188
  let n = Math.floor(Math.random() * 256) & 255;
1153
1189
  return () => n++;
1154
1190
  }
@@ -1186,12 +1222,12 @@ function st() {
1186
1222
  }
1187
1223
  };
1188
1224
  }
1189
- class Hr extends Error {
1225
+ class jr extends Error {
1190
1226
  constructor(r) {
1191
1227
  super(), this.name = "GraphError", this.message = r;
1192
1228
  }
1193
1229
  }
1194
- class H extends Hr {
1230
+ class H extends jr {
1195
1231
  constructor(r) {
1196
1232
  super(r), this.name = "InvalidArgumentsGraphError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(
1197
1233
  this,
@@ -1199,12 +1235,12 @@ class H extends Hr {
1199
1235
  );
1200
1236
  }
1201
1237
  }
1202
- class M extends Hr {
1238
+ class M extends jr {
1203
1239
  constructor(r) {
1204
1240
  super(r), this.name = "NotFoundGraphError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, M.prototype.constructor);
1205
1241
  }
1206
1242
  }
1207
- class Q extends Hr {
1243
+ class Q extends jr {
1208
1244
  constructor(r) {
1209
1245
  super(r), this.name = "UsageGraphError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, Q.prototype.constructor);
1210
1246
  }
@@ -1257,7 +1293,7 @@ ut.prototype.detachMulti = function() {
1257
1293
  let t = "out", e = "in";
1258
1294
  this.undirected && (t = e = "undirected"), this.previous === void 0 ? this.next === void 0 ? (delete this.source[t][r], delete this.target[e][n]) : (this.next.previous = void 0, this.source[t][r] = this.next, this.target[e][n] = this.next) : (this.previous.next = this.next, this.next !== void 0 && (this.next.previous = this.previous));
1259
1295
  };
1260
- const Ti = 0, Si = 1, go = 2, Ri = 3;
1296
+ const Ti = 0, Si = 1, yo = 2, Ri = 3;
1261
1297
  function Ne(n, r, t, e, i, a, o) {
1262
1298
  let s, u, l, c;
1263
1299
  if (e = "" + e, t === Ti) {
@@ -1290,7 +1326,7 @@ function Ne(n, r, t, e, i, a, o) {
1290
1326
  }
1291
1327
  return [s, l, c];
1292
1328
  }
1293
- function po(n, r, t) {
1329
+ function bo(n, r, t) {
1294
1330
  n.prototype[r] = function(e, i, a) {
1295
1331
  const [o, s] = Ne(
1296
1332
  this,
@@ -1303,7 +1339,7 @@ function po(n, r, t) {
1303
1339
  return o.attributes[s];
1304
1340
  };
1305
1341
  }
1306
- function vo(n, r, t) {
1342
+ function wo(n, r, t) {
1307
1343
  n.prototype[r] = function(e, i) {
1308
1344
  const [a] = Ne(
1309
1345
  this,
@@ -1315,7 +1351,7 @@ function vo(n, r, t) {
1315
1351
  return a.attributes;
1316
1352
  };
1317
1353
  }
1318
- function mo(n, r, t) {
1354
+ function Eo(n, r, t) {
1319
1355
  n.prototype[r] = function(e, i, a) {
1320
1356
  const [o, s] = Ne(
1321
1357
  this,
@@ -1328,7 +1364,7 @@ function mo(n, r, t) {
1328
1364
  return o.attributes.hasOwnProperty(s);
1329
1365
  };
1330
1366
  }
1331
- function yo(n, r, t) {
1367
+ function _o(n, r, t) {
1332
1368
  n.prototype[r] = function(e, i, a, o) {
1333
1369
  const [s, u, l] = Ne(
1334
1370
  this,
@@ -1347,7 +1383,7 @@ function yo(n, r, t) {
1347
1383
  }), this;
1348
1384
  };
1349
1385
  }
1350
- function bo(n, r, t) {
1386
+ function To(n, r, t) {
1351
1387
  n.prototype[r] = function(e, i, a, o) {
1352
1388
  const [s, u, l] = Ne(
1353
1389
  this,
@@ -1371,7 +1407,7 @@ function bo(n, r, t) {
1371
1407
  }), this;
1372
1408
  };
1373
1409
  }
1374
- function wo(n, r, t) {
1410
+ function So(n, r, t) {
1375
1411
  n.prototype[r] = function(e, i, a) {
1376
1412
  const [o, s] = Ne(
1377
1413
  this,
@@ -1389,7 +1425,7 @@ function wo(n, r, t) {
1389
1425
  }), this;
1390
1426
  };
1391
1427
  }
1392
- function Eo(n, r, t) {
1428
+ function Ro(n, r, t) {
1393
1429
  n.prototype[r] = function(e, i, a) {
1394
1430
  const [o, s] = Ne(
1395
1431
  this,
@@ -1410,7 +1446,7 @@ function Eo(n, r, t) {
1410
1446
  }), this;
1411
1447
  };
1412
1448
  }
1413
- function _o(n, r, t) {
1449
+ function Ao(n, r, t) {
1414
1450
  n.prototype[r] = function(e, i, a) {
1415
1451
  const [o, s] = Ne(
1416
1452
  this,
@@ -1432,7 +1468,7 @@ function _o(n, r, t) {
1432
1468
  }), this;
1433
1469
  };
1434
1470
  }
1435
- function To(n, r, t) {
1471
+ function ko(n, r, t) {
1436
1472
  n.prototype[r] = function(e, i, a) {
1437
1473
  const [o, s] = Ne(
1438
1474
  this,
@@ -1453,50 +1489,50 @@ function To(n, r, t) {
1453
1489
  }), this;
1454
1490
  };
1455
1491
  }
1456
- const So = [
1492
+ const Co = [
1457
1493
  {
1458
1494
  name: (n) => `get${n}Attribute`,
1459
- attacher: po
1495
+ attacher: bo
1460
1496
  },
1461
1497
  {
1462
1498
  name: (n) => `get${n}Attributes`,
1463
- attacher: vo
1499
+ attacher: wo
1464
1500
  },
1465
1501
  {
1466
1502
  name: (n) => `has${n}Attribute`,
1467
- attacher: mo
1503
+ attacher: Eo
1468
1504
  },
1469
1505
  {
1470
1506
  name: (n) => `set${n}Attribute`,
1471
- attacher: yo
1507
+ attacher: _o
1472
1508
  },
1473
1509
  {
1474
1510
  name: (n) => `update${n}Attribute`,
1475
- attacher: bo
1511
+ attacher: To
1476
1512
  },
1477
1513
  {
1478
1514
  name: (n) => `remove${n}Attribute`,
1479
- attacher: wo
1515
+ attacher: So
1480
1516
  },
1481
1517
  {
1482
1518
  name: (n) => `replace${n}Attributes`,
1483
- attacher: Eo
1519
+ attacher: Ro
1484
1520
  },
1485
1521
  {
1486
1522
  name: (n) => `merge${n}Attributes`,
1487
- attacher: _o
1523
+ attacher: Ao
1488
1524
  },
1489
1525
  {
1490
1526
  name: (n) => `update${n}Attributes`,
1491
- attacher: To
1527
+ attacher: ko
1492
1528
  }
1493
1529
  ];
1494
- function Ro(n) {
1495
- So.forEach(function({ name: r, attacher: t }) {
1496
- t(n, r("Node"), Ti), t(n, r("Source"), Si), t(n, r("Target"), go), t(n, r("Opposite"), Ri);
1530
+ function xo(n) {
1531
+ Co.forEach(function({ name: r, attacher: t }) {
1532
+ t(n, r("Node"), Ti), t(n, r("Source"), Si), t(n, r("Target"), yo), t(n, r("Opposite"), Ri);
1497
1533
  });
1498
1534
  }
1499
- function Ao(n, r, t) {
1535
+ function Do(n, r, t) {
1500
1536
  n.prototype[r] = function(e, i) {
1501
1537
  let a;
1502
1538
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1526,7 +1562,7 @@ function Ao(n, r, t) {
1526
1562
  return a.attributes[i];
1527
1563
  };
1528
1564
  }
1529
- function ko(n, r, t) {
1565
+ function Lo(n, r, t) {
1530
1566
  n.prototype[r] = function(e) {
1531
1567
  let i;
1532
1568
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1556,7 +1592,7 @@ function ko(n, r, t) {
1556
1592
  return i.attributes;
1557
1593
  };
1558
1594
  }
1559
- function Co(n, r, t) {
1595
+ function Go(n, r, t) {
1560
1596
  n.prototype[r] = function(e, i) {
1561
1597
  let a;
1562
1598
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1586,7 +1622,7 @@ function Co(n, r, t) {
1586
1622
  return a.attributes.hasOwnProperty(i);
1587
1623
  };
1588
1624
  }
1589
- function xo(n, r, t) {
1625
+ function Io(n, r, t) {
1590
1626
  n.prototype[r] = function(e, i, a) {
1591
1627
  let o;
1592
1628
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1621,7 +1657,7 @@ function xo(n, r, t) {
1621
1657
  }), this;
1622
1658
  };
1623
1659
  }
1624
- function Do(n, r, t) {
1660
+ function Po(n, r, t) {
1625
1661
  n.prototype[r] = function(e, i, a) {
1626
1662
  let o;
1627
1663
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1660,7 +1696,7 @@ function Do(n, r, t) {
1660
1696
  }), this;
1661
1697
  };
1662
1698
  }
1663
- function Lo(n, r, t) {
1699
+ function Fo(n, r, t) {
1664
1700
  n.prototype[r] = function(e, i) {
1665
1701
  let a;
1666
1702
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1695,7 +1731,7 @@ function Lo(n, r, t) {
1695
1731
  }), this;
1696
1732
  };
1697
1733
  }
1698
- function Go(n, r, t) {
1734
+ function Oo(n, r, t) {
1699
1735
  n.prototype[r] = function(e, i) {
1700
1736
  let a;
1701
1737
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1733,7 +1769,7 @@ function Go(n, r, t) {
1733
1769
  }), this;
1734
1770
  };
1735
1771
  }
1736
- function Po(n, r, t) {
1772
+ function zo(n, r, t) {
1737
1773
  n.prototype[r] = function(e, i) {
1738
1774
  let a;
1739
1775
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1772,7 +1808,7 @@ function Po(n, r, t) {
1772
1808
  }), this;
1773
1809
  };
1774
1810
  }
1775
- function Io(n, r, t) {
1811
+ function No(n, r, t) {
1776
1812
  n.prototype[r] = function(e, i) {
1777
1813
  let a;
1778
1814
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1810,50 +1846,50 @@ function Io(n, r, t) {
1810
1846
  }), this;
1811
1847
  };
1812
1848
  }
1813
- const Fo = [
1849
+ const Uo = [
1814
1850
  {
1815
1851
  name: (n) => `get${n}Attribute`,
1816
- attacher: Ao
1852
+ attacher: Do
1817
1853
  },
1818
1854
  {
1819
1855
  name: (n) => `get${n}Attributes`,
1820
- attacher: ko
1856
+ attacher: Lo
1821
1857
  },
1822
1858
  {
1823
1859
  name: (n) => `has${n}Attribute`,
1824
- attacher: Co
1860
+ attacher: Go
1825
1861
  },
1826
1862
  {
1827
1863
  name: (n) => `set${n}Attribute`,
1828
- attacher: xo
1864
+ attacher: Io
1829
1865
  },
1830
1866
  {
1831
1867
  name: (n) => `update${n}Attribute`,
1832
- attacher: Do
1868
+ attacher: Po
1833
1869
  },
1834
1870
  {
1835
1871
  name: (n) => `remove${n}Attribute`,
1836
- attacher: Lo
1872
+ attacher: Fo
1837
1873
  },
1838
1874
  {
1839
1875
  name: (n) => `replace${n}Attributes`,
1840
- attacher: Go
1876
+ attacher: Oo
1841
1877
  },
1842
1878
  {
1843
1879
  name: (n) => `merge${n}Attributes`,
1844
- attacher: Po
1880
+ attacher: zo
1845
1881
  },
1846
1882
  {
1847
1883
  name: (n) => `update${n}Attributes`,
1848
- attacher: Io
1884
+ attacher: No
1849
1885
  }
1850
1886
  ];
1851
- function Oo(n) {
1852
- Fo.forEach(function({ name: r, attacher: t }) {
1887
+ function $o(n) {
1888
+ Uo.forEach(function({ name: r, attacher: t }) {
1853
1889
  t(n, r("Edge"), "mixed"), t(n, r("DirectedEdge"), "directed"), t(n, r("UndirectedEdge"), "undirected");
1854
1890
  });
1855
1891
  }
1856
- const zo = [
1892
+ const Mo = [
1857
1893
  {
1858
1894
  name: "edges",
1859
1895
  type: "mixed"
@@ -1887,7 +1923,7 @@ const zo = [
1887
1923
  type: "undirected"
1888
1924
  }
1889
1925
  ];
1890
- function No(n, r, t, e) {
1926
+ function Bo(n, r, t, e) {
1891
1927
  let i = !1;
1892
1928
  for (const a in r) {
1893
1929
  if (a === e) continue;
@@ -1903,7 +1939,7 @@ function No(n, r, t, e) {
1903
1939
  ), n && i) return o.key;
1904
1940
  }
1905
1941
  }
1906
- function Uo(n, r, t, e) {
1942
+ function Wo(n, r, t, e) {
1907
1943
  let i, a, o, s = !1;
1908
1944
  for (const u in r)
1909
1945
  if (u !== e) {
@@ -1922,7 +1958,7 @@ function Uo(n, r, t, e) {
1922
1958
  } while (i !== void 0);
1923
1959
  }
1924
1960
  }
1925
- function Zt(n, r) {
1961
+ function Qt(n, r) {
1926
1962
  const t = Object.keys(n), e = t.length;
1927
1963
  let i, a = 0;
1928
1964
  return {
@@ -1958,7 +1994,7 @@ function Zt(n, r) {
1958
1994
  }
1959
1995
  };
1960
1996
  }
1961
- function $o(n, r, t, e) {
1997
+ function Ho(n, r, t, e) {
1962
1998
  const i = r[t];
1963
1999
  if (!i) return;
1964
2000
  const a = i.source, o = i.target;
@@ -1973,7 +2009,7 @@ function $o(n, r, t, e) {
1973
2009
  ) && n)
1974
2010
  return i.key;
1975
2011
  }
1976
- function Mo(n, r, t, e) {
2012
+ function jo(n, r, t, e) {
1977
2013
  let i = r[t];
1978
2014
  if (!i) return;
1979
2015
  let a = !1;
@@ -1990,7 +2026,7 @@ function Mo(n, r, t, e) {
1990
2026
  i = i.next;
1991
2027
  } while (i !== void 0);
1992
2028
  }
1993
- function Qt(n, r) {
2029
+ function Jt(n, r) {
1994
2030
  let t = n[r];
1995
2031
  if (t.next !== void 0)
1996
2032
  return {
@@ -2035,7 +2071,7 @@ function Qt(n, r) {
2035
2071
  }
2036
2072
  };
2037
2073
  }
2038
- function Bo(n, r) {
2074
+ function Vo(n, r) {
2039
2075
  if (n.size === 0) return [];
2040
2076
  if (r === "mixed" || r === n.type)
2041
2077
  return Array.from(n._edges.keys());
@@ -2064,7 +2100,7 @@ function Ai(n, r, t, e) {
2064
2100
  ), n && u) return c;
2065
2101
  }
2066
2102
  }
2067
- function Wo(n, r) {
2103
+ function qo(n, r) {
2068
2104
  if (n.size === 0) return st();
2069
2105
  const t = r !== "mixed" && r !== n.type, e = r === "undirected", i = n._edges.values();
2070
2106
  return {
@@ -2090,8 +2126,8 @@ function Wo(n, r) {
2090
2126
  }
2091
2127
  };
2092
2128
  }
2093
- function jr(n, r, t, e, i, a) {
2094
- const o = r ? Uo : No;
2129
+ function Vr(n, r, t, e, i, a) {
2130
+ const o = r ? Wo : Bo;
2095
2131
  let s;
2096
2132
  if (t !== "undirected" && (e !== "out" && (s = o(n, i.in, a), n && s) || e !== "in" && (s = o(
2097
2133
  n,
@@ -2101,28 +2137,28 @@ function jr(n, r, t, e, i, a) {
2101
2137
  ), n && s)) || t !== "directed" && (s = o(n, i.undirected, a), n && s))
2102
2138
  return s;
2103
2139
  }
2104
- function Ho(n, r, t, e) {
2140
+ function Ko(n, r, t, e) {
2105
2141
  const i = [];
2106
- return jr(!1, n, r, t, e, function(a) {
2142
+ return Vr(!1, n, r, t, e, function(a) {
2107
2143
  i.push(a);
2108
2144
  }), i;
2109
2145
  }
2110
- function jo(n, r, t) {
2146
+ function Xo(n, r, t) {
2111
2147
  let e = st();
2112
- return n !== "undirected" && (r !== "out" && typeof t.in < "u" && (e = ze(e, Zt(t.in))), r !== "in" && typeof t.out < "u" && (e = ze(
2148
+ return n !== "undirected" && (r !== "out" && typeof t.in < "u" && (e = ze(e, Qt(t.in))), r !== "in" && typeof t.out < "u" && (e = ze(
2113
2149
  e,
2114
- Zt(t.out, r ? void 0 : t.key)
2115
- ))), n !== "directed" && typeof t.undirected < "u" && (e = ze(e, Zt(t.undirected))), e;
2150
+ Qt(t.out, r ? void 0 : t.key)
2151
+ ))), n !== "directed" && typeof t.undirected < "u" && (e = ze(e, Qt(t.undirected))), e;
2116
2152
  }
2117
- function Vr(n, r, t, e, i, a, o) {
2118
- const s = t ? Mo : $o;
2153
+ function qr(n, r, t, e, i, a, o) {
2154
+ const s = t ? jo : Ho;
2119
2155
  let u;
2120
2156
  if (r !== "undirected" && (typeof i.in < "u" && e !== "out" && (u = s(n, i.in, a, o), n && u) || typeof i.out < "u" && e !== "in" && (e || i.key !== a) && (u = s(n, i.out, a, o), n && u)) || r !== "directed" && typeof i.undirected < "u" && (u = s(n, i.undirected, a, o), n && u))
2121
2157
  return u;
2122
2158
  }
2123
- function Vo(n, r, t, e, i) {
2159
+ function Yo(n, r, t, e, i) {
2124
2160
  const a = [];
2125
- return Vr(
2161
+ return qr(
2126
2162
  !1,
2127
2163
  n,
2128
2164
  r,
@@ -2134,19 +2170,19 @@ function Vo(n, r, t, e, i) {
2134
2170
  }
2135
2171
  ), a;
2136
2172
  }
2137
- function qo(n, r, t, e) {
2173
+ function Zo(n, r, t, e) {
2138
2174
  let i = st();
2139
- return n !== "undirected" && (typeof t.in < "u" && r !== "out" && e in t.in && (i = ze(i, Qt(t.in, e))), typeof t.out < "u" && r !== "in" && e in t.out && (r || t.key !== e) && (i = ze(i, Qt(t.out, e)))), n !== "directed" && typeof t.undirected < "u" && e in t.undirected && (i = ze(
2175
+ return n !== "undirected" && (typeof t.in < "u" && r !== "out" && e in t.in && (i = ze(i, Jt(t.in, e))), typeof t.out < "u" && r !== "in" && e in t.out && (r || t.key !== e) && (i = ze(i, Jt(t.out, e)))), n !== "directed" && typeof t.undirected < "u" && e in t.undirected && (i = ze(
2140
2176
  i,
2141
- Qt(t.undirected, e)
2177
+ Jt(t.undirected, e)
2142
2178
  )), i;
2143
2179
  }
2144
- function Ko(n, r) {
2180
+ function Qo(n, r) {
2145
2181
  const { name: t, type: e, direction: i } = r;
2146
2182
  n.prototype[t] = function(a, o) {
2147
2183
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
2148
2184
  return [];
2149
- if (!arguments.length) return Bo(this, e);
2185
+ if (!arguments.length) return Vo(this, e);
2150
2186
  if (arguments.length === 1) {
2151
2187
  a = "" + a;
2152
2188
  const s = this._nodes.get(a);
@@ -2154,7 +2190,7 @@ function Ko(n, r) {
2154
2190
  throw new M(
2155
2191
  `Graph.${t}: could not find the "${a}" node in the graph.`
2156
2192
  );
2157
- return Ho(
2193
+ return Ko(
2158
2194
  this.multi,
2159
2195
  e === "mixed" ? this.type : e,
2160
2196
  i,
@@ -2172,7 +2208,7 @@ function Ko(n, r) {
2172
2208
  throw new M(
2173
2209
  `Graph.${t}: could not find the "${o}" target node in the graph.`
2174
2210
  );
2175
- return Vo(
2211
+ return Yo(
2176
2212
  e,
2177
2213
  this.multi,
2178
2214
  i,
@@ -2185,7 +2221,7 @@ function Ko(n, r) {
2185
2221
  );
2186
2222
  };
2187
2223
  }
2188
- function Xo(n, r) {
2224
+ function Jo(n, r) {
2189
2225
  const { name: t, type: e, direction: i } = r, a = "forEach" + t[0].toUpperCase() + t.slice(1, -1);
2190
2226
  n.prototype[a] = function(l, c, h) {
2191
2227
  if (!(e !== "mixed" && this.type !== "mixed" && e !== this.type)) {
@@ -2198,7 +2234,7 @@ function Xo(n, r) {
2198
2234
  throw new M(
2199
2235
  `Graph.${a}: could not find the "${l}" node in the graph.`
2200
2236
  );
2201
- return jr(
2237
+ return Vr(
2202
2238
  !1,
2203
2239
  this.multi,
2204
2240
  e === "mixed" ? this.type : e,
@@ -2218,7 +2254,7 @@ function Xo(n, r) {
2218
2254
  throw new M(
2219
2255
  `Graph.${a}: could not find the "${c}" target node in the graph.`
2220
2256
  );
2221
- return Vr(
2257
+ return qr(
2222
2258
  !1,
2223
2259
  e,
2224
2260
  this.multi,
@@ -2276,7 +2312,7 @@ function Xo(n, r) {
2276
2312
  }), this[a].apply(this, l), v;
2277
2313
  };
2278
2314
  }
2279
- function Yo(n, r) {
2315
+ function es(n, r) {
2280
2316
  const { name: t, type: e, direction: i } = r, a = "find" + t[0].toUpperCase() + t.slice(1, -1);
2281
2317
  n.prototype[a] = function(u, l, c) {
2282
2318
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
@@ -2290,7 +2326,7 @@ function Yo(n, r) {
2290
2326
  throw new M(
2291
2327
  `Graph.${a}: could not find the "${u}" node in the graph.`
2292
2328
  );
2293
- return jr(
2329
+ return Vr(
2294
2330
  !0,
2295
2331
  this.multi,
2296
2332
  e === "mixed" ? this.type : e,
@@ -2310,7 +2346,7 @@ function Yo(n, r) {
2310
2346
  throw new M(
2311
2347
  `Graph.${a}: could not find the "${l}" target node in the graph.`
2312
2348
  );
2313
- return Vr(
2349
+ return qr(
2314
2350
  !0,
2315
2351
  e,
2316
2352
  this.multi,
@@ -2335,12 +2371,12 @@ function Yo(n, r) {
2335
2371
  return u.push((h, v, y, b, R, w, k) => !l(h, v, y, b, R, w, k)), !this[a].apply(this, u);
2336
2372
  };
2337
2373
  }
2338
- function Zo(n, r) {
2374
+ function ts(n, r) {
2339
2375
  const { name: t, type: e, direction: i } = r, a = t.slice(0, -1) + "Entries";
2340
2376
  n.prototype[a] = function(o, s) {
2341
2377
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
2342
2378
  return st();
2343
- if (!arguments.length) return Wo(this, e);
2379
+ if (!arguments.length) return qo(this, e);
2344
2380
  if (arguments.length === 1) {
2345
2381
  o = "" + o;
2346
2382
  const u = this._nodes.get(o);
@@ -2348,7 +2384,7 @@ function Zo(n, r) {
2348
2384
  throw new M(
2349
2385
  `Graph.${a}: could not find the "${o}" node in the graph.`
2350
2386
  );
2351
- return jo(e, i, u);
2387
+ return Xo(e, i, u);
2352
2388
  }
2353
2389
  if (arguments.length === 2) {
2354
2390
  o = "" + o, s = "" + s;
@@ -2361,19 +2397,19 @@ function Zo(n, r) {
2361
2397
  throw new M(
2362
2398
  `Graph.${a}: could not find the "${s}" target node in the graph.`
2363
2399
  );
2364
- return qo(e, i, u, s);
2400
+ return Zo(e, i, u, s);
2365
2401
  }
2366
2402
  throw new H(
2367
2403
  `Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`
2368
2404
  );
2369
2405
  };
2370
2406
  }
2371
- function Qo(n) {
2372
- zo.forEach((r) => {
2373
- Ko(n, r), Xo(n, r), Yo(n, r), Zo(n, r);
2407
+ function rs(n) {
2408
+ Mo.forEach((r) => {
2409
+ Qo(n, r), Jo(n, r), es(n, r), ts(n, r);
2374
2410
  });
2375
2411
  }
2376
- const Jo = [
2412
+ const ns = [
2377
2413
  {
2378
2414
  name: "neighbors",
2379
2415
  type: "mixed"
@@ -2407,13 +2443,13 @@ const Jo = [
2407
2443
  type: "undirected"
2408
2444
  }
2409
2445
  ];
2410
- function Wt() {
2446
+ function Ht() {
2411
2447
  this.A = null, this.B = null;
2412
2448
  }
2413
- Wt.prototype.wrap = function(n) {
2449
+ Ht.prototype.wrap = function(n) {
2414
2450
  this.A === null ? this.A = n : this.B === null && (this.B = n);
2415
2451
  };
2416
- Wt.prototype.has = function(n) {
2452
+ Ht.prototype.has = function(n) {
2417
2453
  return this.A !== null && n in this.A || this.B !== null && n in this.B;
2418
2454
  };
2419
2455
  function ht(n, r, t, e, i) {
@@ -2424,7 +2460,7 @@ function ht(n, r, t, e, i) {
2424
2460
  if (n && c) return l.key;
2425
2461
  }
2426
2462
  }
2427
- function qr(n, r, t, e, i) {
2463
+ function Kr(n, r, t, e, i) {
2428
2464
  if (r !== "mixed") {
2429
2465
  if (r === "undirected")
2430
2466
  return ht(
@@ -2443,7 +2479,7 @@ function qr(n, r, t, e, i) {
2443
2479
  i
2444
2480
  );
2445
2481
  }
2446
- const a = new Wt();
2482
+ const a = new Ht();
2447
2483
  let o;
2448
2484
  if (r !== "undirected") {
2449
2485
  if (t !== "out") {
@@ -2476,13 +2512,13 @@ function qr(n, r, t, e, i) {
2476
2512
  ), n && o))
2477
2513
  return o;
2478
2514
  }
2479
- function es(n, r, t) {
2515
+ function is(n, r, t) {
2480
2516
  if (n !== "mixed") {
2481
2517
  if (n === "undirected") return Object.keys(t.undirected);
2482
2518
  if (typeof r == "string") return Object.keys(t[r]);
2483
2519
  }
2484
2520
  const e = [];
2485
- return qr(!1, n, r, t, function(i) {
2521
+ return Kr(!1, n, r, t, function(i) {
2486
2522
  e.push(i);
2487
2523
  }), e;
2488
2524
  }
@@ -2511,7 +2547,7 @@ function dt(n, r, t) {
2511
2547
  }
2512
2548
  };
2513
2549
  }
2514
- function ts(n, r, t) {
2550
+ function as(n, r, t) {
2515
2551
  if (n !== "mixed") {
2516
2552
  if (n === "undirected")
2517
2553
  return dt(null, t, t.undirected);
@@ -2519,7 +2555,7 @@ function ts(n, r, t) {
2519
2555
  return dt(null, t, t[r]);
2520
2556
  }
2521
2557
  let e = st();
2522
- const i = new Wt();
2558
+ const i = new Ht();
2523
2559
  return n !== "undirected" && (r !== "out" && (e = ze(
2524
2560
  e,
2525
2561
  dt(i, t, t.in)
@@ -2531,7 +2567,7 @@ function ts(n, r, t) {
2531
2567
  dt(i, t, t.undirected)
2532
2568
  )), e;
2533
2569
  }
2534
- function rs(n, r) {
2570
+ function os(n, r) {
2535
2571
  const { name: t, type: e, direction: i } = r;
2536
2572
  n.prototype[t] = function(a) {
2537
2573
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
@@ -2542,14 +2578,14 @@ function rs(n, r) {
2542
2578
  throw new M(
2543
2579
  `Graph.${t}: could not find the "${a}" node in the graph.`
2544
2580
  );
2545
- return es(
2581
+ return is(
2546
2582
  e === "mixed" ? this.type : e,
2547
2583
  i,
2548
2584
  o
2549
2585
  );
2550
2586
  };
2551
2587
  }
2552
- function ns(n, r) {
2588
+ function ss(n, r) {
2553
2589
  const { name: t, type: e, direction: i } = r, a = "forEach" + t[0].toUpperCase() + t.slice(1, -1);
2554
2590
  n.prototype[a] = function(l, c) {
2555
2591
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type) return;
@@ -2559,7 +2595,7 @@ function ns(n, r) {
2559
2595
  throw new M(
2560
2596
  `Graph.${a}: could not find the "${l}" node in the graph.`
2561
2597
  );
2562
- qr(
2598
+ Kr(
2563
2599
  !1,
2564
2600
  e === "mixed" ? this.type : e,
2565
2601
  i,
@@ -2593,7 +2629,7 @@ function ns(n, r) {
2593
2629
  }), v;
2594
2630
  };
2595
2631
  }
2596
- function is(n, r) {
2632
+ function us(n, r) {
2597
2633
  const { name: t, type: e, direction: i } = r, a = t[0].toUpperCase() + t.slice(1, -1), o = "find" + a;
2598
2634
  n.prototype[o] = function(l, c) {
2599
2635
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type) return;
@@ -2603,7 +2639,7 @@ function is(n, r) {
2603
2639
  throw new M(
2604
2640
  `Graph.${o}: could not find the "${l}" node in the graph.`
2605
2641
  );
2606
- return qr(
2642
+ return Kr(
2607
2643
  !0,
2608
2644
  e === "mixed" ? this.type : e,
2609
2645
  i,
@@ -2620,7 +2656,7 @@ function is(n, r) {
2620
2656
  return !this[o](l, (v, y) => !c(v, y));
2621
2657
  };
2622
2658
  }
2623
- function as(n, r) {
2659
+ function ls(n, r) {
2624
2660
  const { name: t, type: e, direction: i } = r, a = t.slice(0, -1) + "Entries";
2625
2661
  n.prototype[a] = function(o) {
2626
2662
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
@@ -2631,19 +2667,19 @@ function as(n, r) {
2631
2667
  throw new M(
2632
2668
  `Graph.${a}: could not find the "${o}" node in the graph.`
2633
2669
  );
2634
- return ts(
2670
+ return as(
2635
2671
  e === "mixed" ? this.type : e,
2636
2672
  i,
2637
2673
  s
2638
2674
  );
2639
2675
  };
2640
2676
  }
2641
- function os(n) {
2642
- Jo.forEach((r) => {
2643
- rs(n, r), ns(n, r), is(n, r), as(n, r);
2677
+ function cs(n) {
2678
+ ns.forEach((r) => {
2679
+ os(n, r), ss(n, r), us(n, r), ls(n, r);
2644
2680
  });
2645
2681
  }
2646
- function It(n, r, t, e, i) {
2682
+ function Pt(n, r, t, e, i) {
2647
2683
  const a = e._nodes.values(), o = e.type;
2648
2684
  let s, u, l, c, h, v;
2649
2685
  for (; s = a.next(), s.done !== !0; ) {
@@ -2694,11 +2730,11 @@ function It(n, r, t, e, i) {
2694
2730
  );
2695
2731
  }
2696
2732
  }
2697
- function ss(n, r) {
2733
+ function hs(n, r) {
2698
2734
  const t = { key: n };
2699
2735
  return bi(r.attributes) || (t.attributes = ue({}, r.attributes)), t;
2700
2736
  }
2701
- function us(n, r, t) {
2737
+ function ds(n, r, t) {
2702
2738
  const e = {
2703
2739
  key: r,
2704
2740
  source: t.source.key,
@@ -2706,7 +2742,7 @@ function us(n, r, t) {
2706
2742
  };
2707
2743
  return bi(t.attributes) || (e.attributes = ue({}, t.attributes)), n === "mixed" && t.undirected && (e.undirected = !0), e;
2708
2744
  }
2709
- function ls(n) {
2745
+ function fs(n) {
2710
2746
  if (!he(n))
2711
2747
  throw new H(
2712
2748
  'Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.'
@@ -2720,7 +2756,7 @@ function ls(n) {
2720
2756
  "Graph.import: invalid attributes. Attributes should be a plain object, null or omitted."
2721
2757
  );
2722
2758
  }
2723
- function cs(n) {
2759
+ function gs(n) {
2724
2760
  if (!he(n))
2725
2761
  throw new H(
2726
2762
  'Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.'
@@ -2742,12 +2778,12 @@ function cs(n) {
2742
2778
  "Graph.import: invalid undirectedness information. Undirected should be boolean or omitted."
2743
2779
  );
2744
2780
  }
2745
- const hs = fo(), ds = /* @__PURE__ */ new Set(["directed", "undirected", "mixed"]), bn = /* @__PURE__ */ new Set([
2781
+ const ps = mo(), vs = /* @__PURE__ */ new Set(["directed", "undirected", "mixed"]), bn = /* @__PURE__ */ new Set([
2746
2782
  "domain",
2747
2783
  "_events",
2748
2784
  "_eventsCount",
2749
2785
  "_maxListeners"
2750
- ]), fs = [
2786
+ ]), ms = [
2751
2787
  {
2752
2788
  name: (n) => `${n}Edge`,
2753
2789
  generateKey: !0
@@ -2773,12 +2809,12 @@ const hs = fo(), ds = /* @__PURE__ */ new Set(["directed", "undirected", "mixed"
2773
2809
  name: (n) => `${n}UndirectedEdgeWithKey`,
2774
2810
  type: "undirected"
2775
2811
  }
2776
- ], gs = {
2812
+ ], ys = {
2777
2813
  allowSelfLoops: !0,
2778
2814
  multi: !1,
2779
2815
  type: "mixed"
2780
2816
  };
2781
- function ps(n, r, t) {
2817
+ function bs(n, r, t) {
2782
2818
  if (t && !he(t))
2783
2819
  throw new H(
2784
2820
  `Graph.addNode: invalid attributes. Expecting an object but got "${t}"`
@@ -2854,7 +2890,7 @@ function ki(n, r, t, e, i, a, o, s) {
2854
2890
  const v = a === o;
2855
2891
  return e ? (u.undirectedDegree++, l.undirectedDegree++, v && (u.undirectedLoops++, n._undirectedSelfLoopCount++)) : (u.outDegree++, l.inDegree++, v && (u.directedLoops++, n._directedSelfLoopCount++)), n.multi ? h.attachMulti() : h.attach(), e ? n._undirectedSize++ : n._directedSize++, c.key = i, n.emit("edgeAdded", c), i;
2856
2892
  }
2857
- function vs(n, r, t, e, i, a, o, s, u) {
2893
+ function ws(n, r, t, e, i, a, o, s, u) {
2858
2894
  if (!e && n.type === "undirected")
2859
2895
  throw new Q(
2860
2896
  `Graph.${r}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`
@@ -2937,13 +2973,13 @@ function Je(n, r) {
2937
2973
  undirected: a
2938
2974
  });
2939
2975
  }
2940
- class ae extends Wr.EventEmitter {
2976
+ class ae extends Hr.EventEmitter {
2941
2977
  constructor(r) {
2942
- if (super(), r = ue({}, gs, r), typeof r.multi != "boolean")
2978
+ if (super(), r = ue({}, ys, r), typeof r.multi != "boolean")
2943
2979
  throw new H(
2944
2980
  `Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${r.multi}".`
2945
2981
  );
2946
- if (!ds.has(r.type))
2982
+ if (!vs.has(r.type))
2947
2983
  throw new H(
2948
2984
  `Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${r.type}".`
2949
2985
  );
@@ -2953,7 +2989,7 @@ class ae extends Wr.EventEmitter {
2953
2989
  );
2954
2990
  const t = r.type === "mixed" ? wi : r.type === "directed" ? Ei : _i;
2955
2991
  Ee(this, "NodeDataClass", t);
2956
- const e = "geid_" + hs() + "_";
2992
+ const e = "geid_" + ps() + "_";
2957
2993
  let i = 0;
2958
2994
  const a = () => {
2959
2995
  let o;
@@ -3691,7 +3727,7 @@ class ae extends Wr.EventEmitter {
3691
3727
  * @throws {Error} - Will throw if the given attributes are not an object.
3692
3728
  */
3693
3729
  addNode(r, t) {
3694
- return ps(this, r, t).key;
3730
+ return bs(this, r, t).key;
3695
3731
  }
3696
3732
  /**
3697
3733
  * Method used to merge a node into the graph.
@@ -4091,14 +4127,14 @@ class ae extends Wr.EventEmitter {
4091
4127
  throw new H(
4092
4128
  "Graph.forEachAdjacencyEntry: expecting a callback."
4093
4129
  );
4094
- It(!1, !1, !1, this, r);
4130
+ Pt(!1, !1, !1, this, r);
4095
4131
  }
4096
4132
  forEachAdjacencyEntryWithOrphans(r) {
4097
4133
  if (typeof r != "function")
4098
4134
  throw new H(
4099
4135
  "Graph.forEachAdjacencyEntryWithOrphans: expecting a callback."
4100
4136
  );
4101
- It(!1, !1, !0, this, r);
4137
+ Pt(!1, !1, !0, this, r);
4102
4138
  }
4103
4139
  /**
4104
4140
  * Method iterating over the graph's assymetric adjacency using the given callback.
@@ -4110,14 +4146,14 @@ class ae extends Wr.EventEmitter {
4110
4146
  throw new H(
4111
4147
  "Graph.forEachAssymetricAdjacencyEntry: expecting a callback."
4112
4148
  );
4113
- It(!1, !0, !1, this, r);
4149
+ Pt(!1, !0, !1, this, r);
4114
4150
  }
4115
4151
  forEachAssymetricAdjacencyEntryWithOrphans(r) {
4116
4152
  if (typeof r != "function")
4117
4153
  throw new H(
4118
4154
  "Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback."
4119
4155
  );
4120
- It(!1, !0, !0, this, r);
4156
+ Pt(!1, !0, !0, this, r);
4121
4157
  }
4122
4158
  /**
4123
4159
  * Method returning the list of the graph's nodes.
@@ -4281,11 +4317,11 @@ class ae extends Wr.EventEmitter {
4281
4317
  const r = new Array(this._nodes.size);
4282
4318
  let t = 0;
4283
4319
  this._nodes.forEach((i, a) => {
4284
- r[t++] = ss(a, i);
4320
+ r[t++] = hs(a, i);
4285
4321
  });
4286
4322
  const e = new Array(this._edges.size);
4287
4323
  return t = 0, this._edges.forEach((i, a) => {
4288
- e[t++] = us(this.type, a, i);
4324
+ e[t++] = ds(this.type, a, i);
4289
4325
  }), {
4290
4326
  options: {
4291
4327
  type: this.type,
@@ -4329,7 +4365,7 @@ class ae extends Wr.EventEmitter {
4329
4365
  "Graph.import: invalid nodes. Expecting an array."
4330
4366
  );
4331
4367
  for (e = 0, i = a.length; e < i; e++) {
4332
- o = a[e], ls(o);
4368
+ o = a[e], fs(o);
4333
4369
  const { key: u, attributes: l } = o;
4334
4370
  t ? this.mergeNode(u, l) : this.addNode(u, l);
4335
4371
  }
@@ -4341,7 +4377,7 @@ class ae extends Wr.EventEmitter {
4341
4377
  "Graph.import: invalid edges. Expecting an array."
4342
4378
  );
4343
4379
  for (e = 0, i = a.length; e < i; e++) {
4344
- s = a[e], cs(s);
4380
+ s = a[e], gs(s);
4345
4381
  const {
4346
4382
  source: l,
4347
4383
  target: c,
@@ -4460,9 +4496,9 @@ class ae extends Wr.EventEmitter {
4460
4496
  }
4461
4497
  }
4462
4498
  typeof Symbol < "u" && (ae.prototype[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = ae.prototype.inspect);
4463
- fs.forEach((n) => {
4499
+ ms.forEach((n) => {
4464
4500
  ["add", "merge", "update"].forEach((r) => {
4465
- const t = n.name(r), e = r === "add" ? ki : vs;
4501
+ const t = n.name(r), e = r === "add" ? ki : ws;
4466
4502
  n.generateKey ? ae.prototype[t] = function(i, a, o) {
4467
4503
  return e(
4468
4504
  this,
@@ -4490,10 +4526,10 @@ fs.forEach((n) => {
4490
4526
  };
4491
4527
  });
4492
4528
  });
4493
- Ro(ae);
4494
- Oo(ae);
4495
- Qo(ae);
4496
- os(ae);
4529
+ xo(ae);
4530
+ $o(ae);
4531
+ rs(ae);
4532
+ cs(ae);
4497
4533
  class Ci extends ae {
4498
4534
  constructor(r) {
4499
4535
  const t = ue({ type: "directed" }, r);
@@ -4581,7 +4617,7 @@ ae.MultiUndirectedGraph = Gi;
4581
4617
  ae.InvalidArgumentsGraphError = H;
4582
4618
  ae.NotFoundGraphError = M;
4583
4619
  ae.UsageGraphError = Q;
4584
- function ms(n, r) {
4620
+ function Es(n, r) {
4585
4621
  if (typeof n != "object" || !n) return n;
4586
4622
  var t = n[Symbol.toPrimitive];
4587
4623
  if (t !== void 0) {
@@ -4592,7 +4628,7 @@ function ms(n, r) {
4592
4628
  return String(n);
4593
4629
  }
4594
4630
  function Et(n) {
4595
- var r = ms(n, "string");
4631
+ var r = Es(n, "string");
4596
4632
  return typeof r == "symbol" ? r : r + "";
4597
4633
  }
4598
4634
  function ge(n, r) {
@@ -4614,32 +4650,32 @@ function nt(n) {
4614
4650
  return r.__proto__ || Object.getPrototypeOf(r);
4615
4651
  }, nt(n);
4616
4652
  }
4617
- function Pi() {
4653
+ function Ii() {
4618
4654
  try {
4619
4655
  var n = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
4620
4656
  }));
4621
4657
  } catch {
4622
4658
  }
4623
- return (Pi = function() {
4659
+ return (Ii = function() {
4624
4660
  return !!n;
4625
4661
  })();
4626
4662
  }
4627
- function ys(n) {
4663
+ function _s(n) {
4628
4664
  if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4629
4665
  return n;
4630
4666
  }
4631
- function bs(n, r) {
4667
+ function Ts(n, r) {
4632
4668
  if (r && (typeof r == "object" || typeof r == "function")) return r;
4633
4669
  if (r !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
4634
- return ys(n);
4670
+ return _s(n);
4635
4671
  }
4636
4672
  function Te(n, r, t) {
4637
- return r = nt(r), bs(n, Pi() ? Reflect.construct(r, t || [], nt(n).constructor) : r.apply(n, t));
4673
+ return r = nt(r), Ts(n, Ii() ? Reflect.construct(r, t || [], nt(n).constructor) : r.apply(n, t));
4638
4674
  }
4639
- function kr(n, r) {
4640
- return kr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
4675
+ function Cr(n, r) {
4676
+ return Cr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
4641
4677
  return t.__proto__ = e, t;
4642
- }, kr(n, r);
4678
+ }, Cr(n, r);
4643
4679
  }
4644
4680
  function Se(n, r) {
4645
4681
  if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function");
@@ -4651,12 +4687,12 @@ function Se(n, r) {
4651
4687
  }
4652
4688
  }), Object.defineProperty(n, "prototype", {
4653
4689
  writable: !1
4654
- }), r && kr(n, r);
4690
+ }), r && Cr(n, r);
4655
4691
  }
4656
- function ws(n) {
4692
+ function Ss(n) {
4657
4693
  if (Array.isArray(n)) return n;
4658
4694
  }
4659
- function Es(n, r) {
4695
+ function Rs(n, r) {
4660
4696
  var t = n == null ? null : typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
4661
4697
  if (t != null) {
4662
4698
  var e, i, a, o, s = [], u = !0, l = !1;
@@ -4677,26 +4713,26 @@ function Es(n, r) {
4677
4713
  return s;
4678
4714
  }
4679
4715
  }
4680
- function Cr(n, r) {
4716
+ function xr(n, r) {
4681
4717
  (r == null || r > n.length) && (r = n.length);
4682
4718
  for (var t = 0, e = Array(r); t < r; t++) e[t] = n[t];
4683
4719
  return e;
4684
4720
  }
4685
- function Ii(n, r) {
4721
+ function Pi(n, r) {
4686
4722
  if (n) {
4687
- if (typeof n == "string") return Cr(n, r);
4723
+ if (typeof n == "string") return xr(n, r);
4688
4724
  var t = {}.toString.call(n).slice(8, -1);
4689
- return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Cr(n, r) : void 0;
4725
+ return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? xr(n, r) : void 0;
4690
4726
  }
4691
4727
  }
4692
- function _s() {
4728
+ function As() {
4693
4729
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4694
4730
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
4695
4731
  }
4696
4732
  function it(n, r) {
4697
- return ws(n) || Es(n, r) || Ii(n, r) || _s();
4733
+ return Ss(n) || Rs(n, r) || Pi(n, r) || As();
4698
4734
  }
4699
- var Jt = {
4735
+ var er = {
4700
4736
  black: "#000000",
4701
4737
  silver: "#C0C0C0",
4702
4738
  gray: "#808080",
@@ -4845,13 +4881,13 @@ var Jt = {
4845
4881
  snow: "#FFFAFA",
4846
4882
  lightyellow: "#FFFFE0",
4847
4883
  ivory: "#FFFFF0"
4848
- }, Fi = new Int8Array(4), er = new Int32Array(Fi.buffer, 0, 1), Ts = new Float32Array(Fi.buffer, 0, 1), Ss = /^\s*rgba?\s*\(/, Rs = /^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;
4849
- function As(n) {
4884
+ }, Fi = new Int8Array(4), tr = new Int32Array(Fi.buffer, 0, 1), ks = new Float32Array(Fi.buffer, 0, 1), Cs = /^\s*rgba?\s*\(/, xs = /^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;
4885
+ function Ds(n) {
4850
4886
  var r = 0, t = 0, e = 0, i = 1;
4851
4887
  if (n[0] === "#")
4852
4888
  n.length === 4 ? (r = parseInt(n.charAt(1) + n.charAt(1), 16), t = parseInt(n.charAt(2) + n.charAt(2), 16), e = parseInt(n.charAt(3) + n.charAt(3), 16)) : (r = parseInt(n.charAt(1) + n.charAt(2), 16), t = parseInt(n.charAt(3) + n.charAt(4), 16), e = parseInt(n.charAt(5) + n.charAt(6), 16)), n.length === 9 && (i = parseInt(n.charAt(7) + n.charAt(8), 16) / 255);
4853
- else if (Ss.test(n)) {
4854
- var a = n.match(Rs);
4889
+ else if (Cs.test(n)) {
4890
+ var a = n.match(xs);
4855
4891
  a && (r = +a[1], t = +a[2], e = +a[3], a[4] && (i = +a[4]));
4856
4892
  }
4857
4893
  return {
@@ -4862,23 +4898,23 @@ function As(n) {
4862
4898
  };
4863
4899
  }
4864
4900
  var rt = {};
4865
- for (var Ft in Jt)
4866
- rt[Ft] = Ye(Jt[Ft]), rt[Jt[Ft]] = rt[Ft];
4901
+ for (var Ft in er)
4902
+ rt[Ft] = Ye(er[Ft]), rt[er[Ft]] = rt[Ft];
4867
4903
  function Oi(n, r, t, e, i) {
4868
- return er[0] = e << 24 | t << 16 | r << 8 | n, er[0] = er[0] & 4278190079, Ts[0];
4904
+ return tr[0] = e << 24 | t << 16 | r << 8 | n, tr[0] = tr[0] & 4278190079, ks[0];
4869
4905
  }
4870
4906
  function Ye(n) {
4871
4907
  if (n = n.toLowerCase(), typeof rt[n] < "u") return rt[n];
4872
- var r = As(n), t = r.r, e = r.g, i = r.b, a = r.a;
4908
+ var r = Ds(n), t = r.r, e = r.g, i = r.b, a = r.a;
4873
4909
  a = a * 255 | 0;
4874
4910
  var o = Oi(t, e, i, a);
4875
4911
  return rt[n] = o, o;
4876
4912
  }
4877
- var tr = {};
4913
+ var rr = {};
4878
4914
  function zi(n) {
4879
- if (typeof tr[n] < "u") return tr[n];
4915
+ if (typeof rr[n] < "u") return rr[n];
4880
4916
  var r = (n & 16711680) >>> 16, t = (n & 65280) >>> 8, e = n & 255, i = 255, a = Oi(r, t, e, i);
4881
- return tr[n] = a, a;
4917
+ return rr[n] = a, a;
4882
4918
  }
4883
4919
  function _n(n, r, t, e) {
4884
4920
  return t + (r << 8) + (n << 16);
@@ -4918,32 +4954,32 @@ function j(n) {
4918
4954
  }
4919
4955
  return n;
4920
4956
  }
4921
- function ks(n, r) {
4957
+ function Ls(n, r) {
4922
4958
  for (; !{}.hasOwnProperty.call(n, r) && (n = nt(n)) !== null; ) ;
4923
4959
  return n;
4924
4960
  }
4925
- function xr() {
4926
- return xr = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(n, r, t) {
4927
- var e = ks(n, r);
4961
+ function Dr() {
4962
+ return Dr = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(n, r, t) {
4963
+ var e = Ls(n, r);
4928
4964
  if (e) {
4929
4965
  var i = Object.getOwnPropertyDescriptor(e, r);
4930
4966
  return i.get ? i.get.call(arguments.length < 3 ? n : t) : i.value;
4931
4967
  }
4932
- }, xr.apply(null, arguments);
4968
+ }, Dr.apply(null, arguments);
4933
4969
  }
4934
4970
  function Ni(n, r, t, e) {
4935
- var i = xr(nt(n.prototype), r, t);
4971
+ var i = Dr(nt(n.prototype), r, t);
4936
4972
  return typeof i == "function" ? function(a) {
4937
4973
  return i.apply(t, a);
4938
4974
  } : i;
4939
4975
  }
4940
- function Cs(n) {
4976
+ function Gs(n) {
4941
4977
  return n.normalized ? 1 : n.size;
4942
4978
  }
4943
- function rr(n) {
4979
+ function nr(n) {
4944
4980
  var r = 0;
4945
4981
  return n.forEach(function(t) {
4946
- return r += Cs(t);
4982
+ return r += Gs(t);
4947
4983
  }), r;
4948
4984
  }
4949
4985
  function Ui(n, r, t) {
@@ -4960,13 +4996,13 @@ function Ui(n, r, t) {
4960
4996
  }
4961
4997
  return i;
4962
4998
  }
4963
- function xs(n, r) {
4999
+ function Is(n, r) {
4964
5000
  return Ui("VERTEX", n, r);
4965
5001
  }
4966
- function Ds(n, r) {
5002
+ function Ps(n, r) {
4967
5003
  return Ui("FRAGMENT", n, r);
4968
5004
  }
4969
- function Ls(n, r) {
5005
+ function Fs(n, r) {
4970
5006
  var t = n.createProgram();
4971
5007
  if (t === null)
4972
5008
  throw new Error("loadProgram: error while creating the program.");
@@ -4985,12 +5021,12 @@ function Rn(n) {
4985
5021
  r.deleteShader(i), r.deleteShader(a), r.deleteProgram(e), r.deleteBuffer(t);
4986
5022
  }
4987
5023
  var An = `#define PICKING_MODE
4988
- `, Gs = N(N(N(N(N(N(N(N({}, WebGL2RenderingContext.BOOL, 1), WebGL2RenderingContext.BYTE, 1), WebGL2RenderingContext.UNSIGNED_BYTE, 1), WebGL2RenderingContext.SHORT, 2), WebGL2RenderingContext.UNSIGNED_SHORT, 2), WebGL2RenderingContext.INT, 4), WebGL2RenderingContext.UNSIGNED_INT, 4), WebGL2RenderingContext.FLOAT, 4), $i = /* @__PURE__ */ (function() {
5024
+ `, Os = N(N(N(N(N(N(N(N({}, WebGL2RenderingContext.BOOL, 1), WebGL2RenderingContext.BYTE, 1), WebGL2RenderingContext.UNSIGNED_BYTE, 1), WebGL2RenderingContext.SHORT, 2), WebGL2RenderingContext.UNSIGNED_SHORT, 2), WebGL2RenderingContext.INT, 4), WebGL2RenderingContext.UNSIGNED_INT, 4), WebGL2RenderingContext.FLOAT, 4), $i = /* @__PURE__ */ (function() {
4989
5025
  function n(r, t, e) {
4990
5026
  ge(this, n), N(this, "array", new Float32Array()), N(this, "constantArray", new Float32Array()), N(this, "capacity", 0), N(this, "verticesCount", 0);
4991
5027
  var i = this.getDefinition();
4992
- if (this.VERTICES = i.VERTICES, this.VERTEX_SHADER_SOURCE = i.VERTEX_SHADER_SOURCE, this.FRAGMENT_SHADER_SOURCE = i.FRAGMENT_SHADER_SOURCE, this.UNIFORMS = i.UNIFORMS, this.ATTRIBUTES = i.ATTRIBUTES, this.METHOD = i.METHOD, this.CONSTANT_ATTRIBUTES = "CONSTANT_ATTRIBUTES" in i ? i.CONSTANT_ATTRIBUTES : [], this.CONSTANT_DATA = "CONSTANT_DATA" in i ? i.CONSTANT_DATA : [], this.isInstanced = "CONSTANT_ATTRIBUTES" in i, this.ATTRIBUTES_ITEMS_COUNT = rr(this.ATTRIBUTES), this.STRIDE = this.VERTICES * this.ATTRIBUTES_ITEMS_COUNT, this.renderer = e, this.normalProgram = this.getProgramInfo("normal", r, i.VERTEX_SHADER_SOURCE, i.FRAGMENT_SHADER_SOURCE, null), this.pickProgram = t ? this.getProgramInfo("pick", r, An + i.VERTEX_SHADER_SOURCE, An + i.FRAGMENT_SHADER_SOURCE, t) : null, this.isInstanced) {
4993
- var a = rr(this.CONSTANT_ATTRIBUTES);
5028
+ if (this.VERTICES = i.VERTICES, this.VERTEX_SHADER_SOURCE = i.VERTEX_SHADER_SOURCE, this.FRAGMENT_SHADER_SOURCE = i.FRAGMENT_SHADER_SOURCE, this.UNIFORMS = i.UNIFORMS, this.ATTRIBUTES = i.ATTRIBUTES, this.METHOD = i.METHOD, this.CONSTANT_ATTRIBUTES = "CONSTANT_ATTRIBUTES" in i ? i.CONSTANT_ATTRIBUTES : [], this.CONSTANT_DATA = "CONSTANT_DATA" in i ? i.CONSTANT_DATA : [], this.isInstanced = "CONSTANT_ATTRIBUTES" in i, this.ATTRIBUTES_ITEMS_COUNT = nr(this.ATTRIBUTES), this.STRIDE = this.VERTICES * this.ATTRIBUTES_ITEMS_COUNT, this.renderer = e, this.normalProgram = this.getProgramInfo("normal", r, i.VERTEX_SHADER_SOURCE, i.FRAGMENT_SHADER_SOURCE, null), this.pickProgram = t ? this.getProgramInfo("pick", r, An + i.VERTEX_SHADER_SOURCE, An + i.FRAGMENT_SHADER_SOURCE, t) : null, this.isInstanced) {
5029
+ var a = nr(this.CONSTANT_ATTRIBUTES);
4994
5030
  if (this.CONSTANT_DATA.length !== this.VERTICES) throw new Error("Program: error while getting constant data (expected ".concat(this.VERTICES, " items, received ").concat(this.CONSTANT_DATA.length, " instead)"));
4995
5031
  this.constantArray = new Float32Array(this.CONSTANT_DATA.length * a);
4996
5032
  for (var o = 0; o < this.CONSTANT_DATA.length; o++) {
@@ -5011,7 +5047,7 @@ var An = `#define PICKING_MODE
5011
5047
  value: function(t, e, i, a, o) {
5012
5048
  var s = this.getDefinition(), u = e.createBuffer();
5013
5049
  if (u === null) throw new Error("Program: error while creating the WebGL buffer.");
5014
- var l = xs(e, i), c = Ds(e, a), h = Ls(e, [l, c]), v = {};
5050
+ var l = Is(e, i), c = Ps(e, a), h = Fs(e, [l, c]), v = {};
5015
5051
  s.UNIFORMS.forEach(function(R) {
5016
5052
  var w = e.getUniformLocation(h, R);
5017
5053
  w && (v[R] = w);
@@ -5066,12 +5102,12 @@ var An = `#define PICKING_MODE
5066
5102
  }, {
5067
5103
  key: "bindAttribute",
5068
5104
  value: function(t, e, i, a) {
5069
- var o = Gs[t.type];
5105
+ var o = Os[t.type];
5070
5106
  if (typeof o != "number") throw new Error('Program.bind: yet unsupported attribute type "'.concat(t.type, '"'));
5071
5107
  var s = e.attributeLocations[t.name], u = e.gl;
5072
5108
  if (s !== -1) {
5073
5109
  u.enableVertexAttribArray(s);
5074
- var l = this.isInstanced ? (a ? this.ATTRIBUTES_ITEMS_COUNT : rr(this.CONSTANT_ATTRIBUTES)) * Float32Array.BYTES_PER_ELEMENT : this.ATTRIBUTES_ITEMS_COUNT * Float32Array.BYTES_PER_ELEMENT;
5110
+ var l = this.isInstanced ? (a ? this.ATTRIBUTES_ITEMS_COUNT : nr(this.CONSTANT_ATTRIBUTES)) * Float32Array.BYTES_PER_ELEMENT : this.ATTRIBUTES_ITEMS_COUNT * Float32Array.BYTES_PER_ELEMENT;
5075
5111
  if (u.vertexAttribPointer(s, t.size, t.type, t.normalized || !1, l, i), this.isInstanced && a)
5076
5112
  if (u instanceof WebGL2RenderingContext)
5077
5113
  u.vertexAttribDivisor(s, 1);
@@ -5152,7 +5188,7 @@ var An = `#define PICKING_MODE
5152
5188
  return this.processVisibleItem(zi(e), o, a);
5153
5189
  }
5154
5190
  }]);
5155
- })($i), Ht = /* @__PURE__ */ (function(n) {
5191
+ })($i), jt = /* @__PURE__ */ (function(n) {
5156
5192
  function r() {
5157
5193
  var t;
5158
5194
  ge(this, r);
@@ -5178,7 +5214,7 @@ var An = `#define PICKING_MODE
5178
5214
  }
5179
5215
  }]);
5180
5216
  })($i);
5181
- function Ps(n, r) {
5217
+ function zs(n, r) {
5182
5218
  return /* @__PURE__ */ (function() {
5183
5219
  function t(e, i, a) {
5184
5220
  ge(this, t), N(this, "drawLabel", r), this.programs = n.map(function(o) {
@@ -5216,7 +5252,7 @@ function Ps(n, r) {
5216
5252
  }]);
5217
5253
  })();
5218
5254
  }
5219
- function Is(n, r, t, e, i) {
5255
+ function Ns(n, r, t, e, i) {
5220
5256
  var a = i.edgeLabelSize, o = i.edgeLabelFont, s = i.edgeLabelWeight, u = i.edgeLabelColor.attribute ? r[i.edgeLabelColor.attribute] || i.edgeLabelColor.color || "#000" : i.edgeLabelColor.color, l = r.label;
5221
5257
  if (l) {
5222
5258
  n.fillStyle = u, n.font = "".concat(s, " ").concat(a, "px ").concat(o);
@@ -5241,7 +5277,7 @@ function Bi(n, r, t) {
5241
5277
  n.fillStyle = o, n.font = "".concat(a, " ").concat(e, "px ").concat(i), n.fillText(r.label, r.x + r.size + 3, r.y + e / 3);
5242
5278
  }
5243
5279
  }
5244
- function Fs(n, r, t) {
5280
+ function Us(n, r, t) {
5245
5281
  var e = t.labelSize, i = t.labelFont, a = t.labelWeight;
5246
5282
  n.font = "".concat(a, " ").concat(e, "px ").concat(i), n.fillStyle = "#FFF", n.shadowOffsetX = 0, n.shadowOffsetY = 0, n.shadowBlur = 8, n.shadowColor = "#000";
5247
5283
  var o = 2;
@@ -5252,7 +5288,7 @@ function Fs(n, r, t) {
5252
5288
  n.beginPath(), n.arc(r.x, r.y, r.size + o, 0, Math.PI * 2), n.closePath(), n.fill();
5253
5289
  n.shadowOffsetX = 0, n.shadowOffsetY = 0, n.shadowBlur = 0, Bi(n, r, t);
5254
5290
  }
5255
- var Os = (
5291
+ var $s = (
5256
5292
  /*glsl*/
5257
5293
  `
5258
5294
  precision highp float;
@@ -5287,7 +5323,7 @@ void main(void) {
5287
5323
  #endif
5288
5324
  }
5289
5325
  `
5290
- ), zs = Os, Ns = (
5326
+ ), Ms = $s, Bs = (
5291
5327
  /*glsl*/
5292
5328
  `
5293
5329
  attribute vec4 a_id;
@@ -5331,7 +5367,7 @@ void main() {
5331
5367
  v_color.a *= bias;
5332
5368
  }
5333
5369
  `
5334
- ), Us = Ns, Wi = WebGLRenderingContext, kn = Wi.UNSIGNED_BYTE, nr = Wi.FLOAT, $s = ["u_sizeRatio", "u_correctionRatio", "u_matrix"], At = /* @__PURE__ */ (function(n) {
5370
+ ), Ws = Bs, Wi = WebGLRenderingContext, kn = Wi.UNSIGNED_BYTE, ir = Wi.FLOAT, Hs = ["u_sizeRatio", "u_correctionRatio", "u_matrix"], At = /* @__PURE__ */ (function(n) {
5335
5371
  function r() {
5336
5372
  return ge(this, r), Te(this, r, arguments);
5337
5373
  }
@@ -5340,18 +5376,18 @@ void main() {
5340
5376
  value: function() {
5341
5377
  return {
5342
5378
  VERTICES: 3,
5343
- VERTEX_SHADER_SOURCE: Us,
5344
- FRAGMENT_SHADER_SOURCE: zs,
5379
+ VERTEX_SHADER_SOURCE: Ws,
5380
+ FRAGMENT_SHADER_SOURCE: Ms,
5345
5381
  METHOD: WebGLRenderingContext.TRIANGLES,
5346
- UNIFORMS: $s,
5382
+ UNIFORMS: Hs,
5347
5383
  ATTRIBUTES: [{
5348
5384
  name: "a_position",
5349
5385
  size: 2,
5350
- type: nr
5386
+ type: ir
5351
5387
  }, {
5352
5388
  name: "a_size",
5353
5389
  size: 1,
5354
- type: nr
5390
+ type: ir
5355
5391
  }, {
5356
5392
  name: "a_color",
5357
5393
  size: 4,
@@ -5366,7 +5402,7 @@ void main() {
5366
5402
  CONSTANT_ATTRIBUTES: [{
5367
5403
  name: "a_angle",
5368
5404
  size: 1,
5369
- type: nr
5405
+ type: ir
5370
5406
  }],
5371
5407
  CONSTANT_DATA: [[r.ANGLE_1], [r.ANGLE_2], [r.ANGLE_3]]
5372
5408
  };
@@ -5388,7 +5424,7 @@ void main() {
5388
5424
  N(At, "ANGLE_1", 0);
5389
5425
  N(At, "ANGLE_2", 2 * Math.PI / 3);
5390
5426
  N(At, "ANGLE_3", 4 * Math.PI / 3);
5391
- var Ms = (
5427
+ var js = (
5392
5428
  /*glsl*/
5393
5429
  `
5394
5430
  precision mediump float;
@@ -5399,7 +5435,7 @@ void main(void) {
5399
5435
  gl_FragColor = v_color;
5400
5436
  }
5401
5437
  `
5402
- ), Bs = Ms, Ws = (
5438
+ ), Vs = js, qs = (
5403
5439
  /*glsl*/
5404
5440
  `
5405
5441
  attribute vec2 a_position;
@@ -5468,13 +5504,13 @@ void main() {
5468
5504
  v_color.a *= bias;
5469
5505
  }
5470
5506
  `
5471
- ), Hs = Ws, Hi = WebGLRenderingContext, Cn = Hi.UNSIGNED_BYTE, Ot = Hi.FLOAT, js = ["u_matrix", "u_sizeRatio", "u_correctionRatio", "u_minEdgeThickness", "u_lengthToThicknessRatio", "u_widenessToThicknessRatio"], jt = {
5507
+ ), Ks = qs, Hi = WebGLRenderingContext, Cn = Hi.UNSIGNED_BYTE, Ot = Hi.FLOAT, Xs = ["u_matrix", "u_sizeRatio", "u_correctionRatio", "u_minEdgeThickness", "u_lengthToThicknessRatio", "u_widenessToThicknessRatio"], Vt = {
5472
5508
  extremity: "target",
5473
5509
  lengthToThicknessRatio: 2.5,
5474
5510
  widenessToThicknessRatio: 2
5475
5511
  };
5476
5512
  function ji(n) {
5477
- var r = j(j({}, jt), {});
5513
+ var r = j(j({}, Vt), {});
5478
5514
  return /* @__PURE__ */ (function(t) {
5479
5515
  function e() {
5480
5516
  return ge(this, e), Te(this, e, arguments);
@@ -5484,10 +5520,10 @@ function ji(n) {
5484
5520
  value: function() {
5485
5521
  return {
5486
5522
  VERTICES: 3,
5487
- VERTEX_SHADER_SOURCE: Hs,
5488
- FRAGMENT_SHADER_SOURCE: Bs,
5523
+ VERTEX_SHADER_SOURCE: Ks,
5524
+ FRAGMENT_SHADER_SOURCE: Vs,
5489
5525
  METHOD: WebGLRenderingContext.TRIANGLES,
5490
- UNIFORMS: js,
5526
+ UNIFORMS: Xs,
5491
5527
  ATTRIBUTES: [{
5492
5528
  name: "a_position",
5493
5529
  size: 2,
@@ -5538,10 +5574,10 @@ function ji(n) {
5538
5574
  s.uniformMatrix3fv(l, !1, a.matrix), s.uniform1f(c, a.sizeRatio), s.uniform1f(h, a.correctionRatio), s.uniform1f(v, a.minEdgeThickness), s.uniform1f(y, r.lengthToThicknessRatio), s.uniform1f(b, r.widenessToThicknessRatio);
5539
5575
  }
5540
5576
  }]);
5541
- })(Ht);
5577
+ })(jt);
5542
5578
  }
5543
5579
  ji();
5544
- var Vs = (
5580
+ var Ys = (
5545
5581
  /*glsl*/
5546
5582
  `
5547
5583
  precision mediump float;
@@ -5570,7 +5606,7 @@ void main(void) {
5570
5606
  #endif
5571
5607
  }
5572
5608
  `
5573
- ), Vi = Vs, qs = (
5609
+ ), Vi = Ys, Zs = (
5574
5610
  /*glsl*/
5575
5611
  `
5576
5612
  attribute vec4 a_id;
@@ -5641,11 +5677,11 @@ void main() {
5641
5677
  v_color.a *= bias;
5642
5678
  }
5643
5679
  `
5644
- ), Ks = qs, qi = WebGLRenderingContext, xn = qi.UNSIGNED_BYTE, qe = qi.FLOAT, Xs = ["u_matrix", "u_zoomRatio", "u_sizeRatio", "u_correctionRatio", "u_pixelRatio", "u_feather", "u_minEdgeThickness", "u_lengthToThicknessRatio"], Ys = {
5645
- lengthToThicknessRatio: jt.lengthToThicknessRatio
5680
+ ), Qs = Zs, qi = WebGLRenderingContext, xn = qi.UNSIGNED_BYTE, qe = qi.FLOAT, Js = ["u_matrix", "u_zoomRatio", "u_sizeRatio", "u_correctionRatio", "u_pixelRatio", "u_feather", "u_minEdgeThickness", "u_lengthToThicknessRatio"], eu = {
5681
+ lengthToThicknessRatio: Vt.lengthToThicknessRatio
5646
5682
  };
5647
5683
  function Ki(n) {
5648
- var r = j(j({}, Ys), {});
5684
+ var r = j(j({}, eu), {});
5649
5685
  return /* @__PURE__ */ (function(t) {
5650
5686
  function e() {
5651
5687
  return ge(this, e), Te(this, e, arguments);
@@ -5655,10 +5691,10 @@ function Ki(n) {
5655
5691
  value: function() {
5656
5692
  return {
5657
5693
  VERTICES: 6,
5658
- VERTEX_SHADER_SOURCE: Ks,
5694
+ VERTEX_SHADER_SOURCE: Qs,
5659
5695
  FRAGMENT_SHADER_SOURCE: Vi,
5660
5696
  METHOD: WebGLRenderingContext.TRIANGLES,
5661
- UNIFORMS: Xs,
5697
+ UNIFORMS: Js,
5662
5698
  ATTRIBUTES: [{
5663
5699
  name: "a_positionStart",
5664
5700
  size: 2,
@@ -5723,13 +5759,13 @@ function Ki(n) {
5723
5759
  s.uniformMatrix3fv(l, !1, a.matrix), s.uniform1f(c, a.zoomRatio), s.uniform1f(b, a.sizeRatio), s.uniform1f(y, a.correctionRatio), s.uniform1f(v, a.pixelRatio), s.uniform1f(h, a.antiAliasingFeather), s.uniform1f(R, a.minEdgeThickness), s.uniform1f(w, r.lengthToThicknessRatio);
5724
5760
  }
5725
5761
  }]);
5726
- })(Ht);
5762
+ })(jt);
5727
5763
  }
5728
5764
  Ki();
5729
- function Zs(n) {
5730
- return Ps([Ki(), ji()]);
5765
+ function tu(n) {
5766
+ return zs([Ki(), ji()]);
5731
5767
  }
5732
- var Qs = Zs(), Xi = Qs, Js = (
5768
+ var ru = tu(), Xi = ru, nu = (
5733
5769
  /*glsl*/
5734
5770
  `
5735
5771
  attribute vec4 a_id;
@@ -5797,7 +5833,7 @@ void main() {
5797
5833
  v_color.a *= bias;
5798
5834
  }
5799
5835
  `
5800
- ), eu = Js, Yi = WebGLRenderingContext, Dn = Yi.UNSIGNED_BYTE, ft = Yi.FLOAT, tu = ["u_matrix", "u_zoomRatio", "u_sizeRatio", "u_correctionRatio", "u_pixelRatio", "u_feather", "u_minEdgeThickness"], Zi = /* @__PURE__ */ (function(n) {
5836
+ ), iu = nu, Yi = WebGLRenderingContext, Dn = Yi.UNSIGNED_BYTE, ft = Yi.FLOAT, au = ["u_matrix", "u_zoomRatio", "u_sizeRatio", "u_correctionRatio", "u_pixelRatio", "u_feather", "u_minEdgeThickness"], Zi = /* @__PURE__ */ (function(n) {
5801
5837
  function r() {
5802
5838
  return ge(this, r), Te(this, r, arguments);
5803
5839
  }
@@ -5806,10 +5842,10 @@ void main() {
5806
5842
  value: function() {
5807
5843
  return {
5808
5844
  VERTICES: 6,
5809
- VERTEX_SHADER_SOURCE: eu,
5845
+ VERTEX_SHADER_SOURCE: iu,
5810
5846
  FRAGMENT_SHADER_SOURCE: Vi,
5811
5847
  METHOD: WebGLRenderingContext.TRIANGLES,
5812
- UNIFORMS: tu,
5848
+ UNIFORMS: au,
5813
5849
  ATTRIBUTES: [{
5814
5850
  name: "a_positionStart",
5815
5851
  size: 2,
@@ -5865,43 +5901,43 @@ void main() {
5865
5901
  a.uniformMatrix3fv(s, !1, e.matrix), a.uniform1f(u, e.zoomRatio), a.uniform1f(v, e.sizeRatio), a.uniform1f(h, e.correctionRatio), a.uniform1f(c, e.pixelRatio), a.uniform1f(l, e.antiAliasingFeather), a.uniform1f(y, e.minEdgeThickness);
5866
5902
  }
5867
5903
  }]);
5868
- })(Ht), Kr = /* @__PURE__ */ (function(n) {
5904
+ })(jt), Xr = /* @__PURE__ */ (function(n) {
5869
5905
  function r() {
5870
5906
  var t;
5871
5907
  return ge(this, r), t = Te(this, r), t.rawEmitter = t, t;
5872
5908
  }
5873
5909
  return Se(r, n), pe(r);
5874
- })(Wr.EventEmitter), ir, Ln;
5910
+ })(Hr.EventEmitter), ar, Ln;
5875
5911
  function Ze() {
5876
- return Ln || (Ln = 1, ir = function(r) {
5912
+ return Ln || (Ln = 1, ar = function(r) {
5877
5913
  return r !== null && typeof r == "object" && typeof r.addUndirectedEdgeWithKey == "function" && typeof r.dropNode == "function" && typeof r.multi == "boolean";
5878
- }), ir;
5914
+ }), ar;
5879
5915
  }
5880
- var ru = Ze();
5881
- const nu = /* @__PURE__ */ Br(ru);
5882
- var iu = function(r) {
5916
+ var ou = Ze();
5917
+ const su = /* @__PURE__ */ Wr(ou);
5918
+ var uu = function(r) {
5883
5919
  return r;
5884
- }, au = function(r) {
5920
+ }, lu = function(r) {
5885
5921
  return r * r;
5886
- }, ou = function(r) {
5922
+ }, cu = function(r) {
5887
5923
  return r * (2 - r);
5888
- }, su = function(r) {
5924
+ }, hu = function(r) {
5889
5925
  return (r *= 2) < 1 ? 0.5 * r * r : -0.5 * (--r * (r - 2) - 1);
5890
- }, uu = function(r) {
5926
+ }, du = function(r) {
5891
5927
  return r * r * r;
5892
- }, lu = function(r) {
5928
+ }, fu = function(r) {
5893
5929
  return --r * r * r + 1;
5894
- }, cu = function(r) {
5930
+ }, gu = function(r) {
5895
5931
  return (r *= 2) < 1 ? 0.5 * r * r * r : 0.5 * ((r -= 2) * r * r + 2);
5896
- }, hu = {
5897
- linear: iu,
5898
- quadraticIn: au,
5899
- quadraticOut: ou,
5900
- quadraticInOut: su,
5901
- cubicIn: uu,
5902
- cubicOut: lu,
5903
- cubicInOut: cu
5904
- }, du = {
5932
+ }, pu = {
5933
+ linear: uu,
5934
+ quadraticIn: lu,
5935
+ quadraticOut: cu,
5936
+ quadraticInOut: hu,
5937
+ cubicIn: du,
5938
+ cubicOut: fu,
5939
+ cubicInOut: gu
5940
+ }, vu = {
5905
5941
  easing: "quadraticInOut",
5906
5942
  duration: 150
5907
5943
  };
@@ -5915,36 +5951,36 @@ function Gn(n, r) {
5915
5951
  var t = Math.sin(r), e = Math.cos(r);
5916
5952
  return n[0] = e, n[1] = t, n[3] = -t, n[4] = e, n;
5917
5953
  }
5918
- function Pn(n, r, t) {
5954
+ function In(n, r, t) {
5919
5955
  return n[6] = r, n[7] = t, n;
5920
5956
  }
5921
5957
  function $e(n, r) {
5922
5958
  var t = n[0], e = n[1], i = n[2], a = n[3], o = n[4], s = n[5], u = n[6], l = n[7], c = n[8], h = r[0], v = r[1], y = r[2], b = r[3], R = r[4], w = r[5], k = r[6], E = r[7], m = r[8];
5923
5959
  return n[0] = h * t + v * a + y * u, n[1] = h * e + v * o + y * l, n[2] = h * i + v * s + y * c, n[3] = b * t + R * a + w * u, n[4] = b * e + R * o + w * l, n[5] = b * i + R * s + w * c, n[6] = k * t + E * a + m * u, n[7] = k * e + E * o + m * l, n[8] = k * i + E * s + m * c, n;
5924
5960
  }
5925
- function Dr(n, r) {
5961
+ function Lr(n, r) {
5926
5962
  var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, e = n[0], i = n[1], a = n[3], o = n[4], s = n[6], u = n[7], l = r.x, c = r.y;
5927
5963
  return {
5928
5964
  x: l * e + c * a + s * t,
5929
5965
  y: l * i + c * o + u * t
5930
5966
  };
5931
5967
  }
5932
- function fu(n, r) {
5968
+ function mu(n, r) {
5933
5969
  var t = n.height / n.width, e = r.height / r.width;
5934
5970
  return t < 1 && e > 1 || t > 1 && e < 1 ? 1 : Math.min(Math.max(e, 1 / e), Math.max(1 / t, t));
5935
5971
  }
5936
5972
  function gt(n, r, t, e, i) {
5937
- var a = n.angle, o = n.ratio, s = n.x, u = n.y, l = r.width, c = r.height, h = ke(), v = Math.min(l, c) - 2 * e, y = fu(r, t);
5938
- return i ? ($e(h, Pn(ke(), s, u)), $e(h, zt(ke(), o)), $e(h, Gn(ke(), a)), $e(h, zt(ke(), l / v / 2 / y, c / v / 2 / y))) : ($e(h, zt(ke(), 2 * (v / l) * y, 2 * (v / c) * y)), $e(h, Gn(ke(), -a)), $e(h, zt(ke(), 1 / o)), $e(h, Pn(ke(), -s, -u))), h;
5973
+ var a = n.angle, o = n.ratio, s = n.x, u = n.y, l = r.width, c = r.height, h = ke(), v = Math.min(l, c) - 2 * e, y = mu(r, t);
5974
+ return i ? ($e(h, In(ke(), s, u)), $e(h, zt(ke(), o)), $e(h, Gn(ke(), a)), $e(h, zt(ke(), l / v / 2 / y, c / v / 2 / y))) : ($e(h, zt(ke(), 2 * (v / l) * y, 2 * (v / c) * y)), $e(h, Gn(ke(), -a)), $e(h, zt(ke(), 1 / o)), $e(h, In(ke(), -s, -u))), h;
5939
5975
  }
5940
- function gu(n, r, t) {
5941
- var e = Dr(n, {
5976
+ function yu(n, r, t) {
5977
+ var e = Lr(n, {
5942
5978
  x: Math.cos(r.angle),
5943
5979
  y: Math.sin(r.angle)
5944
5980
  }, 0), i = e.x, a = e.y;
5945
5981
  return 1 / Math.sqrt(Math.pow(i, 2) + Math.pow(a, 2)) / t.width;
5946
5982
  }
5947
- function pu(n) {
5983
+ function bu(n) {
5948
5984
  if (!n.order) return {
5949
5985
  x: [0, 1],
5950
5986
  y: [0, 1]
@@ -5958,14 +5994,14 @@ function pu(n) {
5958
5994
  y: [e, i]
5959
5995
  };
5960
5996
  }
5961
- function vu(n) {
5962
- if (!nu(n)) throw new Error("Sigma: invalid graph instance.");
5997
+ function wu(n) {
5998
+ if (!su(n)) throw new Error("Sigma: invalid graph instance.");
5963
5999
  n.forEachNode(function(r, t) {
5964
6000
  if (!Number.isFinite(t.x) || !Number.isFinite(t.y))
5965
6001
  throw new Error("Sigma: Coordinates of node ".concat(r, " are invalid. A node must have a numeric 'x' and 'y' attribute."));
5966
6002
  });
5967
6003
  }
5968
- function mu(n, r, t) {
6004
+ function Eu(n, r, t) {
5969
6005
  var e = document.createElement(n);
5970
6006
  if (r)
5971
6007
  for (var i in r)
@@ -5975,7 +6011,7 @@ function mu(n, r, t) {
5975
6011
  e.setAttribute(a, t[a]);
5976
6012
  return e;
5977
6013
  }
5978
- function In() {
6014
+ function Pn() {
5979
6015
  return typeof window.devicePixelRatio < "u" ? window.devicePixelRatio : 1;
5980
6016
  }
5981
6017
  function Fn(n, r, t) {
@@ -6002,13 +6038,13 @@ function On(n) {
6002
6038
  };
6003
6039
  }, c.ratio = s, c;
6004
6040
  }
6005
- function Lr(n) {
6041
+ function Gr(n) {
6006
6042
  "@babel/helpers - typeof";
6007
- return Lr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
6043
+ return Gr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
6008
6044
  return typeof r;
6009
6045
  } : function(r) {
6010
6046
  return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
6011
- }, Lr(n);
6047
+ }, Gr(n);
6012
6048
  }
6013
6049
  function zn(n, r) {
6014
6050
  var t = r.size;
@@ -6021,7 +6057,7 @@ function zn(n, r) {
6021
6057
  });
6022
6058
  }
6023
6059
  }
6024
- function ar(n) {
6060
+ function or(n) {
6025
6061
  n = n || {};
6026
6062
  for (var r = 0, t = arguments.length <= 1 ? 0 : arguments.length - 1; r < t; r++) {
6027
6063
  var e = r + 1 < 1 || arguments.length <= r + 1 ? void 0 : arguments[r + 1];
@@ -6029,7 +6065,7 @@ function ar(n) {
6029
6065
  }
6030
6066
  return n;
6031
6067
  }
6032
- var Xr = {
6068
+ var Yr = {
6033
6069
  // Performance
6034
6070
  hideEdgesOnMove: !1,
6035
6071
  hideLabelsOnMove: !1,
@@ -6054,9 +6090,9 @@ var Xr = {
6054
6090
  attribute: "color"
6055
6091
  },
6056
6092
  stagePadding: 30,
6057
- defaultDrawEdgeLabel: Is,
6093
+ defaultDrawEdgeLabel: Ns,
6058
6094
  defaultDrawNodeLabel: Bi,
6059
- defaultDrawNodeHover: Fs,
6095
+ defaultDrawNodeHover: Us,
6060
6096
  minEdgeThickness: 1.7,
6061
6097
  antiAliasingFeather: 1,
6062
6098
  // Mouse and touch settings
@@ -6096,22 +6132,22 @@ var Xr = {
6096
6132
  nodeProgramClasses: {},
6097
6133
  nodeHoverProgramClasses: {},
6098
6134
  edgeProgramClasses: {}
6099
- }, yu = {
6135
+ }, _u = {
6100
6136
  circle: At
6101
- }, bu = {
6137
+ }, Tu = {
6102
6138
  arrow: Xi,
6103
6139
  line: Zi
6104
6140
  };
6105
- function or(n) {
6141
+ function sr(n) {
6106
6142
  if (typeof n.labelDensity != "number" || n.labelDensity < 0)
6107
6143
  throw new Error("Settings: invalid `labelDensity`. Expecting a positive number.");
6108
6144
  var r = n.minCameraRatio, t = n.maxCameraRatio;
6109
6145
  if (typeof r == "number" && typeof t == "number" && t < r)
6110
6146
  throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.");
6111
6147
  }
6112
- function wu(n) {
6113
- var r = ar({}, Xr, n);
6114
- return r.nodeProgramClasses = ar({}, yu, r.nodeProgramClasses), r.edgeProgramClasses = ar({}, bu, r.edgeProgramClasses), r;
6148
+ function Su(n) {
6149
+ var r = or({}, Yr, n);
6150
+ return r.nodeProgramClasses = or({}, _u, r.nodeProgramClasses), r.edgeProgramClasses = or({}, Tu, r.edgeProgramClasses), r;
6115
6151
  }
6116
6152
  var Nt = 1.5, Nn = /* @__PURE__ */ (function(n) {
6117
6153
  function r() {
@@ -6227,7 +6263,7 @@ var Nt = 1.5, Nn = /* @__PURE__ */ (function(n) {
6227
6263
  return i.animate(e, a, y);
6228
6264
  });
6229
6265
  if (this.enabled) {
6230
- var s = j(j({}, du), a), u = this.validateState(e), l = typeof s.easing == "function" ? s.easing : hu[s.easing], c = Date.now(), h = this.getState(), v = function() {
6266
+ var s = j(j({}, vu), a), u = this.validateState(e), l = typeof s.easing == "function" ? s.easing : pu[s.easing], c = Date.now(), h = this.getState(), v = function() {
6231
6267
  var b = (Date.now() - c) / s.duration;
6232
6268
  if (b >= 1) {
6233
6269
  i.nextFrame = null, i.setState(u), i.animationCallback && (i.animationCallback.call(null), i.animationCallback = void 0);
@@ -6295,7 +6331,7 @@ var Nt = 1.5, Nn = /* @__PURE__ */ (function(n) {
6295
6331
  return i.setState(e);
6296
6332
  }
6297
6333
  }]);
6298
- })(Kr);
6334
+ })(Xr);
6299
6335
  function De(n, r) {
6300
6336
  var t = r.getBoundingClientRect();
6301
6337
  return {
@@ -6323,14 +6359,14 @@ function pt(n) {
6323
6359
  });
6324
6360
  return r;
6325
6361
  }
6326
- function Eu(n, r) {
6362
+ function Ru(n, r) {
6327
6363
  return j(j({}, Fe(n, r)), {}, {
6328
6364
  delta: Qi(n)
6329
6365
  });
6330
6366
  }
6331
- var _u = 2;
6367
+ var Au = 2;
6332
6368
  function Ut(n) {
6333
- for (var r = [], t = 0, e = Math.min(n.length, _u); t < e; t++) r.push(n[t]);
6369
+ for (var r = [], t = 0, e = Math.min(n.length, Au); t < e; t++) r.push(n[t]);
6334
6370
  return r;
6335
6371
  }
6336
6372
  function vt(n, r, t) {
@@ -6360,12 +6396,12 @@ var Ji = /* @__PURE__ */ (function(n) {
6360
6396
  return ge(this, r), i = Te(this, r), i.container = t, i.renderer = e, i;
6361
6397
  }
6362
6398
  return Se(r, n), pe(r);
6363
- })(Kr), Tu = ["doubleClickTimeout", "doubleClickZoomingDuration", "doubleClickZoomingRatio", "dragTimeout", "draggedEventsTolerance", "inertiaDuration", "inertiaRatio", "zoomDuration", "zoomingRatio"], Su = Tu.reduce(function(n, r) {
6364
- return j(j({}, n), {}, N({}, r, Xr[r]));
6365
- }, {}), Ru = /* @__PURE__ */ (function(n) {
6399
+ })(Xr), ku = ["doubleClickTimeout", "doubleClickZoomingDuration", "doubleClickZoomingRatio", "dragTimeout", "draggedEventsTolerance", "inertiaDuration", "inertiaRatio", "zoomDuration", "zoomingRatio"], Cu = ku.reduce(function(n, r) {
6400
+ return j(j({}, n), {}, N({}, r, Yr[r]));
6401
+ }, {}), xu = /* @__PURE__ */ (function(n) {
6366
6402
  function r(t, e) {
6367
6403
  var i;
6368
- return ge(this, r), i = Te(this, r, [t, e]), N(i, "enabled", !0), N(i, "draggedEvents", 0), N(i, "downStartTime", null), N(i, "lastMouseX", null), N(i, "lastMouseY", null), N(i, "isMouseDown", !1), N(i, "isMoving", !1), N(i, "movingTimeout", null), N(i, "startCameraState", null), N(i, "clicks", 0), N(i, "doubleClickTimeout", null), N(i, "currentWheelDirection", 0), N(i, "settings", Su), i.handleClick = i.handleClick.bind(i), i.handleRightClick = i.handleRightClick.bind(i), i.handleDown = i.handleDown.bind(i), i.handleUp = i.handleUp.bind(i), i.handleMove = i.handleMove.bind(i), i.handleWheel = i.handleWheel.bind(i), i.handleLeave = i.handleLeave.bind(i), i.handleEnter = i.handleEnter.bind(i), t.addEventListener("click", i.handleClick, {
6404
+ return ge(this, r), i = Te(this, r, [t, e]), N(i, "enabled", !0), N(i, "draggedEvents", 0), N(i, "downStartTime", null), N(i, "lastMouseX", null), N(i, "lastMouseY", null), N(i, "isMouseDown", !1), N(i, "isMoving", !1), N(i, "movingTimeout", null), N(i, "startCameraState", null), N(i, "clicks", 0), N(i, "doubleClickTimeout", null), N(i, "currentWheelDirection", 0), N(i, "settings", Cu), i.handleClick = i.handleClick.bind(i), i.handleRightClick = i.handleRightClick.bind(i), i.handleDown = i.handleDown.bind(i), i.handleUp = i.handleUp.bind(i), i.handleMove = i.handleMove.bind(i), i.handleWheel = i.handleWheel.bind(i), i.handleLeave = i.handleLeave.bind(i), i.handleEnter = i.handleEnter.bind(i), t.addEventListener("click", i.handleClick, {
6369
6405
  capture: !1
6370
6406
  }), t.addEventListener("contextmenu", i.handleRightClick, {
6371
6407
  capture: !1
@@ -6500,7 +6536,7 @@ var Ji = /* @__PURE__ */ (function(n) {
6500
6536
  if (!(!this.enabled || !a.enabledZooming)) {
6501
6537
  var o = Qi(e);
6502
6538
  if (o) {
6503
- var s = Eu(e, this.container);
6539
+ var s = Ru(e, this.container);
6504
6540
  if (this.emit("wheel", s), s.sigmaDefaultPrevented) {
6505
6541
  e.preventDefault(), e.stopPropagation();
6506
6542
  return;
@@ -6521,12 +6557,12 @@ var Ji = /* @__PURE__ */ (function(n) {
6521
6557
  this.settings = e;
6522
6558
  }
6523
6559
  }]);
6524
- })(Ji), Au = ["dragTimeout", "inertiaDuration", "inertiaRatio", "doubleClickTimeout", "doubleClickZoomingRatio", "doubleClickZoomingDuration", "tapMoveTolerance"], ku = Au.reduce(function(n, r) {
6525
- return j(j({}, n), {}, N({}, r, Xr[r]));
6526
- }, {}), Cu = /* @__PURE__ */ (function(n) {
6560
+ })(Ji), Du = ["dragTimeout", "inertiaDuration", "inertiaRatio", "doubleClickTimeout", "doubleClickZoomingRatio", "doubleClickZoomingDuration", "tapMoveTolerance"], Lu = Du.reduce(function(n, r) {
6561
+ return j(j({}, n), {}, N({}, r, Yr[r]));
6562
+ }, {}), Gu = /* @__PURE__ */ (function(n) {
6527
6563
  function r(t, e) {
6528
6564
  var i;
6529
- return ge(this, r), i = Te(this, r, [t, e]), N(i, "enabled", !0), N(i, "isMoving", !1), N(i, "hasMoved", !1), N(i, "touchMode", 0), N(i, "startTouchesPositions", []), N(i, "lastTouches", []), N(i, "lastTap", null), N(i, "settings", ku), i.handleStart = i.handleStart.bind(i), i.handleLeave = i.handleLeave.bind(i), i.handleMove = i.handleMove.bind(i), t.addEventListener("touchstart", i.handleStart, {
6565
+ return ge(this, r), i = Te(this, r, [t, e]), N(i, "enabled", !0), N(i, "isMoving", !1), N(i, "hasMoved", !1), N(i, "touchMode", 0), N(i, "startTouchesPositions", []), N(i, "lastTouches", []), N(i, "lastTap", null), N(i, "settings", Lu), i.handleStart = i.handleStart.bind(i), i.handleLeave = i.handleLeave.bind(i), i.handleMove = i.handleMove.bind(i), t.addEventListener("touchstart", i.handleStart, {
6530
6566
  capture: !1
6531
6567
  }), t.addEventListener("touchcancel", i.handleLeave, {
6532
6568
  capture: !1
@@ -6627,14 +6663,14 @@ var Ji = /* @__PURE__ */ (function(n) {
6627
6663
  var i = this;
6628
6664
  if (!(!this.enabled || !this.startTouchesPositions.length)) {
6629
6665
  e.preventDefault();
6630
- var a = Ut(e.touches), o = a.map(function(P) {
6631
- return De(P, i.container);
6666
+ var a = Ut(e.touches), o = a.map(function(I) {
6667
+ return De(I, i.container);
6632
6668
  }), s = this.lastTouches;
6633
6669
  this.lastTouches = a, this.lastTouchesPositions = o;
6634
6670
  var u = vt(e, s, this.container);
6635
- if (this.emit("touchmove", u), !u.sigmaDefaultPrevented && (this.hasMoved || (this.hasMoved = o.some(function(P, A) {
6671
+ if (this.emit("touchmove", u), !u.sigmaDefaultPrevented && (this.hasMoved || (this.hasMoved = o.some(function(I, A) {
6636
6672
  var z = i.startTouchesPositions[A];
6637
- return z && (P.x !== z.x || P.y !== z.y);
6673
+ return z && (I.x !== z.x || I.y !== z.y);
6638
6674
  })), !!this.hasMoved)) {
6639
6675
  this.isMoving = !0, this.movingTimeout && clearTimeout(this.movingTimeout), this.movingTimeout = window.setTimeout(function() {
6640
6676
  i.isMoving = !1;
@@ -6657,9 +6693,9 @@ var Ji = /* @__PURE__ */ (function(n) {
6657
6693
  ratio: 1
6658
6694
  }, m = o[0], p = m.x, C = m.y, L = o[1], g = L.x, x = L.y, S = Math.atan2(x - C, g - p) - this.startTouchesAngle, D = Math.hypot(x - C, g - p) / this.startTouchesDistance, O = l.getBoundedRatio(c.ratio / D);
6659
6695
  E.ratio = O, E.angle = c.angle + S;
6660
- var I = this.getDimensions(), _ = this.renderer.viewportToFramedGraph((this.startTouchesPositions || [])[0], {
6696
+ var P = this.getDimensions(), _ = this.renderer.viewportToFramedGraph((this.startTouchesPositions || [])[0], {
6661
6697
  cameraState: c
6662
- }), W = Math.min(I.width, I.height) - 2 * h, K = W / I.width, T = W / I.height, f = O / W, d = p - W / 2 / K, U = C - W / 2 / T, $ = [d * Math.cos(-E.angle) - U * Math.sin(-E.angle), U * Math.cos(-E.angle) + d * Math.sin(-E.angle)];
6698
+ }), W = Math.min(P.width, P.height) - 2 * h, K = W / P.width, T = W / P.height, f = O / W, d = p - W / 2 / K, U = C - W / 2 / T, $ = [d * Math.cos(-E.angle) - U * Math.sin(-E.angle), U * Math.cos(-E.angle) + d * Math.sin(-E.angle)];
6663
6699
  d = $[0], U = $[1], E.x = _.x - d * f, E.y = _.y + U * f, l.setState(E);
6664
6700
  break;
6665
6701
  }
@@ -6674,20 +6710,20 @@ var Ji = /* @__PURE__ */ (function(n) {
6674
6710
  }
6675
6711
  }]);
6676
6712
  })(Ji);
6677
- function xu(n) {
6678
- if (Array.isArray(n)) return Cr(n);
6713
+ function Iu(n) {
6714
+ if (Array.isArray(n)) return xr(n);
6679
6715
  }
6680
- function Du(n) {
6716
+ function Pu(n) {
6681
6717
  if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
6682
6718
  }
6683
- function Lu() {
6719
+ function Fu() {
6684
6720
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
6685
6721
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
6686
6722
  }
6687
6723
  function Un(n) {
6688
- return xu(n) || Du(n) || Ii(n) || Lu();
6724
+ return Iu(n) || Pu(n) || Pi(n) || Fu();
6689
6725
  }
6690
- function Gu(n, r) {
6726
+ function Ou(n, r) {
6691
6727
  if (n == null) return {};
6692
6728
  var t = {};
6693
6729
  for (var e in n) if ({}.hasOwnProperty.call(n, e)) {
@@ -6696,9 +6732,9 @@ function Gu(n, r) {
6696
6732
  }
6697
6733
  return t;
6698
6734
  }
6699
- function sr(n, r) {
6735
+ function ur(n, r) {
6700
6736
  if (n == null) return {};
6701
- var t, e, i = Gu(n, r);
6737
+ var t, e, i = Ou(n, r);
6702
6738
  if (Object.getOwnPropertySymbols) {
6703
6739
  var a = Object.getOwnPropertySymbols(n);
6704
6740
  for (e = 0; e < a.length; e++) t = a[e], r.indexOf(t) === -1 && {}.propertyIsEnumerable.call(n, t) && (i[t] = n[t]);
@@ -6755,21 +6791,21 @@ var $n = /* @__PURE__ */ (function() {
6755
6791
  }
6756
6792
  }]);
6757
6793
  })();
6758
- function Pu(n) {
6794
+ function zu(n) {
6759
6795
  var r = n.graph, t = n.hoveredNode, e = n.highlightedNodes, i = n.displayedNodeLabels, a = [];
6760
6796
  return r.forEachEdge(function(o, s, u, l) {
6761
6797
  (u === t || l === t || e.has(u) || e.has(l) || i.has(u) && i.has(l)) && a.push(o);
6762
6798
  }), a;
6763
6799
  }
6764
6800
  var Bn = 150, Wn = 50, Oe = Object.prototype.hasOwnProperty;
6765
- function Iu(n, r, t) {
6801
+ function Nu(n, r, t) {
6766
6802
  if (!Oe.call(t, "x") || !Oe.call(t, "y")) throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(r, '". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));
6767
6803
  return t.color || (t.color = n.defaultNodeColor), !t.label && t.label !== "" && (t.label = null), t.label !== void 0 && t.label !== null ? t.label = "" + t.label : t.label = null, t.size || (t.size = 2), Oe.call(t, "hidden") || (t.hidden = !1), Oe.call(t, "highlighted") || (t.highlighted = !1), Oe.call(t, "forceLabel") || (t.forceLabel = !1), (!t.type || t.type === "") && (t.type = n.defaultNodeType), t.zIndex || (t.zIndex = 0), t;
6768
6804
  }
6769
- function Fu(n, r, t) {
6805
+ function Uu(n, r, t) {
6770
6806
  return t.color || (t.color = n.defaultEdgeColor), t.label || (t.label = ""), t.size || (t.size = 0.5), Oe.call(t, "hidden") || (t.hidden = !1), Oe.call(t, "forceLabel") || (t.forceLabel = !1), (!t.type || t.type === "") && (t.type = n.defaultEdgeType), t.zIndex || (t.zIndex = 0), t;
6771
6807
  }
6772
- var Ou = /* @__PURE__ */ (function(n) {
6808
+ var $u = /* @__PURE__ */ (function(n) {
6773
6809
  function r(t, e) {
6774
6810
  var i, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
6775
6811
  if (ge(this, r), i = Te(this, r), N(i, "elements", {}), N(i, "canvasContexts", {}), N(i, "webGLContexts", {}), N(i, "pickingLayers", /* @__PURE__ */ new Set()), N(i, "textures", {}), N(i, "frameBuffers", {}), N(i, "activeListeners", {}), N(i, "labelGrid", new Mn()), N(i, "nodeDataCache", {}), N(i, "edgeDataCache", {}), N(i, "nodeProgramIndex", {}), N(i, "edgeProgramIndex", {}), N(i, "nodesWithForcedLabels", /* @__PURE__ */ new Set()), N(i, "edgesWithForcedLabels", /* @__PURE__ */ new Set()), N(i, "nodeExtent", {
@@ -6778,7 +6814,7 @@ var Ou = /* @__PURE__ */ (function(n) {
6778
6814
  }), N(i, "nodeZExtent", [1 / 0, -1 / 0]), N(i, "edgeZExtent", [1 / 0, -1 / 0]), N(i, "matrix", ke()), N(i, "invMatrix", ke()), N(i, "correctionRatio", 1), N(i, "customBBox", null), N(i, "normalizationFunction", On({
6779
6815
  x: [0, 1],
6780
6816
  y: [0, 1]
6781
- })), N(i, "graphToViewportRatio", 1), N(i, "itemIDsIndex", {}), N(i, "nodeIndices", {}), N(i, "edgeIndices", {}), N(i, "width", 0), N(i, "height", 0), N(i, "pixelRatio", In()), N(i, "pickingDownSizingRatio", 2 * i.pixelRatio), N(i, "displayedNodeLabels", /* @__PURE__ */ new Set()), N(i, "displayedEdgeLabels", /* @__PURE__ */ new Set()), N(i, "highlightedNodes", /* @__PURE__ */ new Set()), N(i, "hoveredNode", null), N(i, "hoveredEdge", null), N(i, "renderFrame", null), N(i, "renderHighlightedNodesFrame", null), N(i, "needToProcess", !1), N(i, "checkEdgesEventsFrame", null), N(i, "nodePrograms", {}), N(i, "nodeHoverPrograms", {}), N(i, "edgePrograms", {}), i.settings = wu(a), or(i.settings), vu(t), !(e instanceof HTMLElement)) throw new Error("Sigma: container should be an html element.");
6817
+ })), N(i, "graphToViewportRatio", 1), N(i, "itemIDsIndex", {}), N(i, "nodeIndices", {}), N(i, "edgeIndices", {}), N(i, "width", 0), N(i, "height", 0), N(i, "pixelRatio", Pn()), N(i, "pickingDownSizingRatio", 2 * i.pixelRatio), N(i, "displayedNodeLabels", /* @__PURE__ */ new Set()), N(i, "displayedEdgeLabels", /* @__PURE__ */ new Set()), N(i, "highlightedNodes", /* @__PURE__ */ new Set()), N(i, "hoveredNode", null), N(i, "hoveredEdge", null), N(i, "renderFrame", null), N(i, "renderHighlightedNodesFrame", null), N(i, "needToProcess", !1), N(i, "checkEdgesEventsFrame", null), N(i, "nodePrograms", {}), N(i, "nodeHoverPrograms", {}), N(i, "edgePrograms", {}), i.settings = Su(a), sr(i.settings), wu(t), !(e instanceof HTMLElement)) throw new Error("Sigma: container should be an html element.");
6782
6818
  i.graph = t, i.container = e, i.createWebGLContext("edges", {
6783
6819
  picking: a.enableEdgeEvents
6784
6820
  }), i.createCanvasContext("edgeLabels"), i.createWebGLContext("nodes", {
@@ -6793,7 +6829,7 @@ var Ou = /* @__PURE__ */ (function(n) {
6793
6829
  i.registerNodeProgram(o, i.settings.nodeProgramClasses[o], i.settings.nodeHoverProgramClasses[o]);
6794
6830
  for (var s in i.settings.edgeProgramClasses)
6795
6831
  i.registerEdgeProgram(s, i.settings.edgeProgramClasses[s]);
6796
- return i.camera = new Nn(), i.bindCameraHandlers(), i.mouseCaptor = new Ru(i.elements.mouse, i), i.mouseCaptor.setSettings(i.settings), i.touchCaptor = new Cu(i.elements.mouse, i), i.touchCaptor.setSettings(i.settings), i.bindEventHandlers(), i.bindGraphHandlers(), i.handleSettingsUpdate(), i.refresh(), i;
6832
+ return i.camera = new Nn(), i.bindCameraHandlers(), i.mouseCaptor = new xu(i.elements.mouse, i), i.mouseCaptor.setSettings(i.settings), i.touchCaptor = new Gu(i.elements.mouse, i), i.touchCaptor.setSettings(i.settings), i.bindEventHandlers(), i.bindGraphHandlers(), i.handleSettingsUpdate(), i.refresh(), i;
6797
6833
  }
6798
6834
  return Se(r, n), pe(r, [{
6799
6835
  key: "registerNodeProgram",
@@ -6822,11 +6858,11 @@ var Ou = /* @__PURE__ */ (function(n) {
6822
6858
  key: "unregisterNodeProgram",
6823
6859
  value: function(e) {
6824
6860
  if (this.nodePrograms[e]) {
6825
- var i = this.nodePrograms, a = i[e], o = sr(i, [e].map(Et));
6861
+ var i = this.nodePrograms, a = i[e], o = ur(i, [e].map(Et));
6826
6862
  a.kill(), this.nodePrograms = o;
6827
6863
  }
6828
6864
  if (this.nodeHoverPrograms[e]) {
6829
- var s = this.nodeHoverPrograms, u = s[e], l = sr(s, [e].map(Et));
6865
+ var s = this.nodeHoverPrograms, u = s[e], l = ur(s, [e].map(Et));
6830
6866
  u.kill(), this.nodePrograms = l;
6831
6867
  }
6832
6868
  return this;
@@ -6841,7 +6877,7 @@ var Ou = /* @__PURE__ */ (function(n) {
6841
6877
  key: "unregisterEdgeProgram",
6842
6878
  value: function(e) {
6843
6879
  if (this.edgePrograms[e]) {
6844
- var i = this.edgePrograms, a = i[e], o = sr(i, [e].map(Et));
6880
+ var i = this.edgePrograms, a = i[e], o = ur(i, [e].map(Et));
6845
6881
  a.kill(), this.edgePrograms = o;
6846
6882
  }
6847
6883
  return this;
@@ -7113,7 +7149,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7113
7149
  var e = this;
7114
7150
  this.emit("beforeProcess");
7115
7151
  var i = this.graph, a = this.settings, o = this.getDimensions();
7116
- if (this.nodeExtent = pu(this.graph), !this.settings.autoRescale) {
7152
+ if (this.nodeExtent = bu(this.graph), !this.settings.autoRescale) {
7117
7153
  var s = o.width, u = o.height, l = this.nodeExtent, c = l.x, h = l.y;
7118
7154
  this.nodeExtent = {
7119
7155
  x: [(c[0] + c[1]) / 2 - s / 2, (c[0] + c[1]) / 2 + s / 2],
@@ -7139,13 +7175,13 @@ var Ou = /* @__PURE__ */ (function(n) {
7139
7175
  return e.nodeDataCache[te].zIndex;
7140
7176
  }, m));
7141
7177
  for (var D = 0, O = m.length; D < O; D++) {
7142
- var I = m[D];
7143
- R[I] = E, k[R[I]] = {
7178
+ var P = m[D];
7179
+ R[P] = E, k[R[P]] = {
7144
7180
  type: "node",
7145
- id: I
7181
+ id: P
7146
7182
  }, E++;
7147
- var _ = this.nodeDataCache[I];
7148
- this.addNodeToProgram(I, R[I], b[_.type]++);
7183
+ var _ = this.nodeDataCache[P];
7184
+ this.addNodeToProgram(P, R[P], b[_.type]++);
7149
7185
  }
7150
7186
  for (var W = {}, K = i.edges(), T = 0, f = K.length; T < f; T++) {
7151
7187
  var d = K[T], U = this.edgeDataCache[d];
@@ -7159,8 +7195,8 @@ var Ou = /* @__PURE__ */ (function(n) {
7159
7195
  throw new Error('Sigma: could not find a suitable program for edge type "'.concat($, '"!'));
7160
7196
  this.edgePrograms[$].reallocate(W[$] || 0), W[$] = 0;
7161
7197
  }
7162
- for (var P = 0, A = K.length; P < A; P++) {
7163
- var z = K[P];
7198
+ for (var I = 0, A = K.length; I < A; I++) {
7199
+ var z = K[I];
7164
7200
  w[z] = E, k[w[z]] = {
7165
7201
  type: "edge",
7166
7202
  id: z
@@ -7179,7 +7215,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7179
7215
  value: function(e) {
7180
7216
  var i = this, a = this.settings;
7181
7217
  if (this.camera.minRatio = a.minCameraRatio, this.camera.maxRatio = a.maxCameraRatio, this.camera.enabledZooming = a.enableCameraZooming, this.camera.enabledPanning = a.enableCameraPanning, this.camera.enabledRotation = a.enableCameraRotation, a.cameraPanBoundaries ? this.camera.clean = function(c) {
7182
- return i.cleanCameraState(c, a.cameraPanBoundaries && Lr(a.cameraPanBoundaries) === "object" ? a.cameraPanBoundaries : {});
7218
+ return i.cleanCameraState(c, a.cameraPanBoundaries && Gr(a.cameraPanBoundaries) === "object" ? a.cameraPanBoundaries : {});
7183
7219
  } : this.camera.clean = null, this.camera.setState(this.camera.validateState(this.camera.getState())), e) {
7184
7220
  if (e.edgeProgramClasses !== a.edgeProgramClasses) {
7185
7221
  for (var o in a.edgeProgramClasses)
@@ -7226,7 +7262,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7226
7262
  });
7227
7263
  var C = E - k, L = p - m, g = this.getDimensions(), x = g.width, S = g.height, D = 0, O = 0;
7228
7264
  if (C >= x ? E < x - o ? D = E - (x - o) : k > o && (D = k - o) : E > x + o ? D = E - (x + o) : k < -o && (D = k + o), L >= S ? p < S - o ? O = p - (S - o) : m > o && (O = m - o) : p > S + o ? O = p - (S + o) : m < -o && (O = m + o), D || O) {
7229
- var I = this.viewportToFramedGraph({
7265
+ var P = this.viewportToFramedGraph({
7230
7266
  x: 0,
7231
7267
  y: 0
7232
7268
  }, {
@@ -7237,7 +7273,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7237
7273
  }, {
7238
7274
  cameraState: e
7239
7275
  });
7240
- D = _.x - I.x, O = _.y - I.y, u.x += D, u.y += O;
7276
+ D = _.x - P.x, O = _.y - P.y, u.x += D, u.y += O;
7241
7277
  }
7242
7278
  return u;
7243
7279
  }
@@ -7283,7 +7319,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7283
7319
  if (!this.settings.renderEdgeLabels) return this;
7284
7320
  var e = this.canvasContexts.edgeLabels;
7285
7321
  e.clearRect(0, 0, this.width, this.height);
7286
- var i = Pu({
7322
+ var i = zu({
7287
7323
  graph: this.graph,
7288
7324
  hoveredNode: this.hoveredNode,
7289
7325
  displayedNodeLabels: this.displayedNodeLabels,
@@ -7382,7 +7418,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7382
7418
  return e.resetWebGLTexture(w);
7383
7419
  }), !this.graph.order) return i();
7384
7420
  var a = this.mouseCaptor, o = this.camera.isAnimated() || a.isMoving || a.draggedEvents || a.currentWheelDirection, s = this.camera.getState(), u = this.getDimensions(), l = this.getGraphDimensions(), c = this.getStagePadding();
7385
- this.matrix = gt(s, u, l, c), this.invMatrix = gt(s, u, l, c, !0), this.correctionRatio = gu(this.matrix, s, u), this.graphToViewportRatio = this.getGraphToViewportRatio();
7421
+ this.matrix = gt(s, u, l, c), this.invMatrix = gt(s, u, l, c, !0), this.correctionRatio = yu(this.matrix, s, u), this.graphToViewportRatio = this.getGraphToViewportRatio();
7386
7422
  var h = this.getRenderParams();
7387
7423
  for (var v in this.nodePrograms) {
7388
7424
  var y = this.nodePrograms[v];
@@ -7405,7 +7441,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7405
7441
  value: function(e) {
7406
7442
  var i = Object.assign({}, this.graph.getNodeAttributes(e));
7407
7443
  this.settings.nodeReducer && (i = this.settings.nodeReducer(e, i));
7408
- var a = Iu(this.settings, e, i);
7444
+ var a = Nu(this.settings, e, i);
7409
7445
  this.nodeDataCache[e] = a, this.nodesWithForcedLabels.delete(e), a.forceLabel && !a.hidden && this.nodesWithForcedLabels.add(e), this.highlightedNodes.delete(e), a.highlighted && !a.hidden && this.highlightedNodes.add(e), this.settings.zIndex && (a.zIndex < this.nodeZExtent[0] && (this.nodeZExtent[0] = a.zIndex), a.zIndex > this.nodeZExtent[1] && (this.nodeZExtent[1] = a.zIndex));
7410
7446
  }
7411
7447
  /**
@@ -7440,7 +7476,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7440
7476
  value: function(e) {
7441
7477
  var i = Object.assign({}, this.graph.getEdgeAttributes(e));
7442
7478
  this.settings.edgeReducer && (i = this.settings.edgeReducer(e, i));
7443
- var a = Fu(this.settings, e, i);
7479
+ var a = Uu(this.settings, e, i);
7444
7480
  this.edgeDataCache[e] = a, this.edgesWithForcedLabels.delete(e), a.forceLabel && !a.hidden && this.edgesWithForcedLabels.add(e), this.settings.zIndex && (a.zIndex < this.edgeZExtent[0] && (this.edgeZExtent[0] = a.zIndex), a.zIndex > this.edgeZExtent[1] && (this.edgeZExtent[1] = a.zIndex));
7445
7481
  }
7446
7482
  /**
@@ -7600,7 +7636,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7600
7636
  value: function(e, i) {
7601
7637
  var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
7602
7638
  if (this.elements[e]) throw new Error('Sigma: a layer named "'.concat(e, '" already exists'));
7603
- var o = mu(i, {
7639
+ var o = Eu(i, {
7604
7640
  position: "absolute"
7605
7641
  }, {
7606
7642
  class: "sigma-".concat(e)
@@ -7858,7 +7894,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7858
7894
  key: "setSetting",
7859
7895
  value: function(e, i) {
7860
7896
  var a = j({}, this.settings);
7861
- return this.settings[e] = i, or(this.settings), this.handleSettingsUpdate(a), this.scheduleRefresh(), this;
7897
+ return this.settings[e] = i, sr(this.settings), this.handleSettingsUpdate(a), this.scheduleRefresh(), this;
7862
7898
  }
7863
7899
  /**
7864
7900
  * Method updating the value of a given setting key using the provided function.
@@ -7883,7 +7919,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7883
7919
  key: "setSettings",
7884
7920
  value: function(e) {
7885
7921
  var i = j({}, this.settings);
7886
- return this.settings = j(j({}, this.settings), e), or(this.settings), this.handleSettingsUpdate(i), this.scheduleRefresh(), this;
7922
+ return this.settings = j(j({}, this.settings), e), sr(this.settings), this.handleSettingsUpdate(i), this.scheduleRefresh(), this;
7887
7923
  }
7888
7924
  /**
7889
7925
  * Method used to resize the renderer.
@@ -7895,7 +7931,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7895
7931
  key: "resize",
7896
7932
  value: function(e) {
7897
7933
  var i = this.width, a = this.height;
7898
- if (this.width = this.container.offsetWidth, this.height = this.container.offsetHeight, this.pixelRatio = In(), this.width === 0)
7934
+ if (this.width = this.container.offsetWidth, this.height = this.container.offsetHeight, this.pixelRatio = Pn(), this.width === 0)
7899
7935
  if (this.settings.allowInvalidContainer) this.width = 1;
7900
7936
  else throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");
7901
7937
  if (this.height === 0)
@@ -8058,7 +8094,7 @@ var Ou = /* @__PURE__ */ (function(n) {
8058
8094
  }, {
8059
8095
  key: "framedGraphToViewport",
8060
8096
  value: function(e) {
8061
- var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = !!i.cameraState || !!i.viewportDimensions || !!i.graphDimensions, o = i.matrix ? i.matrix : a ? gt(i.cameraState || this.camera.getState(), i.viewportDimensions || this.getDimensions(), i.graphDimensions || this.getGraphDimensions(), i.padding || this.getStagePadding()) : this.matrix, s = Dr(o, e);
8097
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = !!i.cameraState || !!i.viewportDimensions || !!i.graphDimensions, o = i.matrix ? i.matrix : a ? gt(i.cameraState || this.camera.getState(), i.viewportDimensions || this.getDimensions(), i.graphDimensions || this.getGraphDimensions(), i.padding || this.getStagePadding()) : this.matrix, s = Lr(o, e);
8062
8098
  return {
8063
8099
  x: (1 + s.x) * this.width / 2,
8064
8100
  y: (1 - s.y) * this.height / 2
@@ -8074,7 +8110,7 @@ var Ou = /* @__PURE__ */ (function(n) {
8074
8110
  }, {
8075
8111
  key: "viewportToFramedGraph",
8076
8112
  value: function(e) {
8077
- var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = !!i.cameraState || !!i.viewportDimensions || !i.graphDimensions, o = i.matrix ? i.matrix : a ? gt(i.cameraState || this.camera.getState(), i.viewportDimensions || this.getDimensions(), i.graphDimensions || this.getGraphDimensions(), i.padding || this.getStagePadding(), !0) : this.invMatrix, s = Dr(o, {
8113
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = !!i.cameraState || !!i.viewportDimensions || !i.graphDimensions, o = i.matrix ? i.matrix : a ? gt(i.cameraState || this.camera.getState(), i.viewportDimensions || this.getDimensions(), i.graphDimensions || this.getGraphDimensions(), i.padding || this.getStagePadding(), !0) : this.invMatrix, s = Lr(o, {
8078
8114
  x: e.x / this.width * 2 - 1,
8079
8115
  y: 1 - e.y / this.height * 2
8080
8116
  });
@@ -8215,36 +8251,36 @@ var Ou = /* @__PURE__ */ (function(n) {
8215
8251
  return e;
8216
8252
  }
8217
8253
  }]);
8218
- })(Kr), zu = Ou;
8219
- function Gr(n, r) {
8254
+ })(Xr), Mu = $u;
8255
+ function Ir(n, r) {
8220
8256
  (r == null || r > n.length) && (r = n.length);
8221
8257
  for (var t = 0, e = Array(r); t < r; t++) e[t] = n[t];
8222
8258
  return e;
8223
8259
  }
8224
- function Nu(n) {
8225
- if (Array.isArray(n)) return Gr(n);
8260
+ function Bu(n) {
8261
+ if (Array.isArray(n)) return Ir(n);
8226
8262
  }
8227
- function Uu(n) {
8263
+ function Wu(n) {
8228
8264
  if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
8229
8265
  }
8230
- function $u(n, r) {
8266
+ function Hu(n, r) {
8231
8267
  if (n) {
8232
- if (typeof n == "string") return Gr(n, r);
8268
+ if (typeof n == "string") return Ir(n, r);
8233
8269
  var t = {}.toString.call(n).slice(8, -1);
8234
- return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Gr(n, r) : void 0;
8270
+ return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Ir(n, r) : void 0;
8235
8271
  }
8236
8272
  }
8237
- function Mu() {
8273
+ function ju() {
8238
8274
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
8239
8275
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
8240
8276
  }
8241
- function Yr(n) {
8242
- return Nu(n) || Uu(n) || $u(n) || Mu();
8277
+ function Zr(n) {
8278
+ return Bu(n) || Wu(n) || Hu(n) || ju();
8243
8279
  }
8244
- function Zr(n, r) {
8280
+ function Qr(n, r) {
8245
8281
  if (!(n instanceof r)) throw new TypeError("Cannot call a class as a function");
8246
8282
  }
8247
- function Bu(n, r) {
8283
+ function Vu(n, r) {
8248
8284
  if (typeof n != "object" || !n) return n;
8249
8285
  var t = n[Symbol.toPrimitive];
8250
8286
  if (t !== void 0) {
@@ -8255,17 +8291,17 @@ function Bu(n, r) {
8255
8291
  return (r === "string" ? String : Number)(n);
8256
8292
  }
8257
8293
  function ea(n) {
8258
- var r = Bu(n, "string");
8294
+ var r = Vu(n, "string");
8259
8295
  return typeof r == "symbol" ? r : r + "";
8260
8296
  }
8261
- function Wu(n, r) {
8297
+ function qu(n, r) {
8262
8298
  for (var t = 0; t < r.length; t++) {
8263
8299
  var e = r[t];
8264
8300
  e.enumerable = e.enumerable || !1, e.configurable = !0, "value" in e && (e.writable = !0), Object.defineProperty(n, ea(e.key), e);
8265
8301
  }
8266
8302
  }
8267
- function Qr(n, r, t) {
8268
- return r && Wu(n.prototype, r), Object.defineProperty(n, "prototype", {
8303
+ function Jr(n, r, t) {
8304
+ return r && qu(n.prototype, r), Object.defineProperty(n, "prototype", {
8269
8305
  writable: !1
8270
8306
  }), n;
8271
8307
  }
@@ -8288,21 +8324,21 @@ function Ce(n) {
8288
8324
  if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8289
8325
  return n;
8290
8326
  }
8291
- function Hu(n, r) {
8327
+ function Ku(n, r) {
8292
8328
  if (r && (typeof r == "object" || typeof r == "function")) return r;
8293
8329
  if (r !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
8294
8330
  return Ce(n);
8295
8331
  }
8296
8332
  function ra(n, r, t) {
8297
- return r = at(r), Hu(n, ta() ? Reflect.construct(r, t || [], at(n).constructor) : r.apply(n, t));
8333
+ return r = at(r), Ku(n, ta() ? Reflect.construct(r, t || [], at(n).constructor) : r.apply(n, t));
8298
8334
  }
8299
- function ju(n, r) {
8335
+ function Xu(n, r) {
8300
8336
  for (; !{}.hasOwnProperty.call(n, r) && (n = at(n)) !== null; ) ;
8301
8337
  return n;
8302
8338
  }
8303
8339
  function Pr() {
8304
8340
  return Pr = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(n, r, t) {
8305
- var e = ju(n, r);
8341
+ var e = Xu(n, r);
8306
8342
  if (e) {
8307
8343
  var i = Object.getOwnPropertyDescriptor(e, r);
8308
8344
  return i.get ? i.get.call(arguments.length < 3 ? n : t) : i.value;
@@ -8315,10 +8351,10 @@ function Hn(n, r, t, e) {
8315
8351
  return i.apply(t, a);
8316
8352
  } : i;
8317
8353
  }
8318
- function Ir(n, r) {
8319
- return Ir = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
8354
+ function Fr(n, r) {
8355
+ return Fr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
8320
8356
  return t.__proto__ = e, t;
8321
- }, Ir(n, r);
8357
+ }, Fr(n, r);
8322
8358
  }
8323
8359
  function na(n, r) {
8324
8360
  if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function");
@@ -8330,7 +8366,7 @@ function na(n, r) {
8330
8366
  }
8331
8367
  }), Object.defineProperty(n, "prototype", {
8332
8368
  writable: !1
8333
- }), r && Ir(n, r);
8369
+ }), r && Fr(n, r);
8334
8370
  }
8335
8371
  function fe(n, r, t) {
8336
8372
  return (r = ea(r)) in n ? Object.defineProperty(n, r, {
@@ -8340,7 +8376,7 @@ function fe(n, r, t) {
8340
8376
  writable: !0
8341
8377
  }) : n[r] = t, n;
8342
8378
  }
8343
- function Vu(n, r) {
8379
+ function Yu(n, r) {
8344
8380
  if (n == null) return {};
8345
8381
  var t = {};
8346
8382
  for (var e in n) if ({}.hasOwnProperty.call(n, e)) {
@@ -8349,9 +8385,9 @@ function Vu(n, r) {
8349
8385
  }
8350
8386
  return t;
8351
8387
  }
8352
- function qu(n, r) {
8388
+ function Zu(n, r) {
8353
8389
  if (n == null) return {};
8354
- var t, e, i = Vu(n, r);
8390
+ var t, e, i = Yu(n, r);
8355
8391
  if (Object.getOwnPropertySymbols) {
8356
8392
  var a = Object.getOwnPropertySymbols(n);
8357
8393
  for (e = 0; e < a.length; e++) t = a[e], r.includes(t) || {}.propertyIsEnumerable.call(n, t) && (i[t] = n[t]);
@@ -8379,7 +8415,7 @@ function me(n) {
8379
8415
  }
8380
8416
  return n;
8381
8417
  }
8382
- function Ku(n) {
8418
+ function Qu(n) {
8383
8419
  var r = n.texturesCount, t = (
8384
8420
  /*glsl*/
8385
8421
  `
@@ -8434,7 +8470,7 @@ void main(void) {
8434
8470
  bool noTextureFound = false;
8435
8471
  vec4 texel;
8436
8472
 
8437
- `).concat(Yr(new Array(r)).map(function(e, i) {
8473
+ `).concat(Zr(new Array(r)).map(function(e, i) {
8438
8474
  return "if (index == ".concat(i, ") texel = texture2D(u_atlas[").concat(i, "], (v_texture.xy + coordinateInTexture * v_texture.zw), -1.0);");
8439
8475
  }).join(`
8440
8476
  else `) + `else {
@@ -8486,7 +8522,7 @@ void main(void) {
8486
8522
  );
8487
8523
  return t;
8488
8524
  }
8489
- var Xu = (
8525
+ var Ju = (
8490
8526
  /*glsl*/
8491
8527
  `
8492
8528
  attribute vec4 a_id;
@@ -8538,7 +8574,7 @@ void main() {
8538
8574
  v_color.a *= bias;
8539
8575
  }
8540
8576
  `
8541
- ), Yu = Xu;
8577
+ ), el = Ju;
8542
8578
  function Xe() {
8543
8579
  Xe = function() {
8544
8580
  return r;
@@ -8562,10 +8598,10 @@ function Xe() {
8562
8598
  };
8563
8599
  }
8564
8600
  function c(T, f, d, U) {
8565
- var $ = f && f.prototype instanceof k ? f : k, P = Object.create($.prototype), A = new W(U || []);
8566
- return i(P, "_invoke", {
8601
+ var $ = f && f.prototype instanceof k ? f : k, I = Object.create($.prototype), A = new W(U || []);
8602
+ return i(I, "_invoke", {
8567
8603
  value: D(T, d, A)
8568
- }), P;
8604
+ }), I;
8569
8605
  }
8570
8606
  function h(T, f, d) {
8571
8607
  try {
@@ -8603,8 +8639,8 @@ function Xe() {
8603
8639
  });
8604
8640
  }
8605
8641
  function S(T, f) {
8606
- function d($, P, A, z) {
8607
- var Z = h(T[$], T, P);
8642
+ function d($, I, A, z) {
8643
+ var Z = h(T[$], T, I);
8608
8644
  if (Z.type !== "throw") {
8609
8645
  var te = Z.arg, oe = te.value;
8610
8646
  return oe && typeof oe == "object" && e.call(oe, "__await") ? f.resolve(oe.__await).then(function(ne) {
@@ -8621,10 +8657,10 @@ function Xe() {
8621
8657
  }
8622
8658
  var U;
8623
8659
  i(this, "_invoke", {
8624
- value: function($, P) {
8660
+ value: function($, I) {
8625
8661
  function A() {
8626
8662
  return new f(function(z, Z) {
8627
- d($, P, z, Z);
8663
+ d($, I, z, Z);
8628
8664
  });
8629
8665
  }
8630
8666
  return U = U ? U.then(A, A) : A();
@@ -8633,16 +8669,16 @@ function Xe() {
8633
8669
  }
8634
8670
  function D(T, f, d) {
8635
8671
  var U = v;
8636
- return function($, P) {
8672
+ return function($, I) {
8637
8673
  if (U === b) throw Error("Generator is already running");
8638
8674
  if (U === R) {
8639
- if ($ === "throw") throw P;
8675
+ if ($ === "throw") throw I;
8640
8676
  return {
8641
8677
  value: n,
8642
8678
  done: !0
8643
8679
  };
8644
8680
  }
8645
- for (d.method = $, d.arg = P; ; ) {
8681
+ for (d.method = $, d.arg = I; ; ) {
8646
8682
  var A = d.delegate;
8647
8683
  if (A) {
8648
8684
  var z = O(A, d);
@@ -8674,10 +8710,10 @@ function Xe() {
8674
8710
  if (U === n) return f.delegate = null, d === "throw" && T.iterator.return && (f.method = "return", f.arg = n, O(T, f), f.method === "throw") || d !== "return" && (f.method = "throw", f.arg = new TypeError("The iterator does not provide a '" + d + "' method")), w;
8675
8711
  var $ = h(U, T.iterator, f.arg);
8676
8712
  if ($.type === "throw") return f.method = "throw", f.arg = $.arg, f.delegate = null, w;
8677
- var P = $.arg;
8678
- return P ? P.done ? (f[T.resultName] = P.value, f.next = T.nextLoc, f.method !== "return" && (f.method = "next", f.arg = n), f.delegate = null, w) : P : (f.method = "throw", f.arg = new TypeError("iterator result is not an object"), f.delegate = null, w);
8713
+ var I = $.arg;
8714
+ return I ? I.done ? (f[T.resultName] = I.value, f.next = T.nextLoc, f.method !== "return" && (f.method = "next", f.arg = n), f.delegate = null, w) : I : (f.method = "throw", f.arg = new TypeError("iterator result is not an object"), f.delegate = null, w);
8679
8715
  }
8680
- function I(T) {
8716
+ function P(T) {
8681
8717
  var f = {
8682
8718
  tryLoc: T[0]
8683
8719
  };
@@ -8690,7 +8726,7 @@ function Xe() {
8690
8726
  function W(T) {
8691
8727
  this.tryEntries = [{
8692
8728
  tryLoc: "root"
8693
- }], T.forEach(I, this), this.reset(!0);
8729
+ }], T.forEach(P, this), this.reset(!0);
8694
8730
  }
8695
8731
  function K(T) {
8696
8732
  if (T || T === "") {
@@ -8726,9 +8762,9 @@ function Xe() {
8726
8762
  return this;
8727
8763
  }), r.AsyncIterator = S, r.async = function(T, f, d, U, $) {
8728
8764
  $ === void 0 && ($ = Promise);
8729
- var P = new S(c(T, f, d, U), $);
8730
- return r.isGeneratorFunction(f) ? P : P.next().then(function(A) {
8731
- return A.done ? A.value : P.next();
8765
+ var I = new S(c(T, f, d, U), $);
8766
+ return r.isGeneratorFunction(f) ? I : I.next().then(function(A) {
8767
+ return A.done ? A.value : I.next();
8732
8768
  });
8733
8769
  }, x(g), l(g, u, "Generator"), l(g, o, function() {
8734
8770
  return this;
@@ -8739,8 +8775,8 @@ function Xe() {
8739
8775
  for (var U in f) d.push(U);
8740
8776
  return d.reverse(), function $() {
8741
8777
  for (; d.length; ) {
8742
- var P = d.pop();
8743
- if (P in f) return $.value = P, $.done = !1, $;
8778
+ var I = d.pop();
8779
+ if (I in f) return $.value = I, $.done = !1, $;
8744
8780
  }
8745
8781
  return $.done = !0, $;
8746
8782
  };
@@ -8759,10 +8795,10 @@ function Xe() {
8759
8795
  if (this.done) throw T;
8760
8796
  var f = this;
8761
8797
  function d(Z, te) {
8762
- return P.type = "throw", P.arg = T, f.next = Z, te && (f.method = "next", f.arg = n), !!te;
8798
+ return I.type = "throw", I.arg = T, f.next = Z, te && (f.method = "next", f.arg = n), !!te;
8763
8799
  }
8764
8800
  for (var U = this.tryEntries.length - 1; U >= 0; --U) {
8765
- var $ = this.tryEntries[U], P = $.completion;
8801
+ var $ = this.tryEntries[U], I = $.completion;
8766
8802
  if ($.tryLoc === "root") return d("end");
8767
8803
  if ($.tryLoc <= this.prev) {
8768
8804
  var A = e.call($, "catchLoc"), z = e.call($, "finallyLoc");
@@ -8787,8 +8823,8 @@ function Xe() {
8787
8823
  }
8788
8824
  }
8789
8825
  $ && (T === "break" || T === "continue") && $.tryLoc <= f && f <= $.finallyLoc && ($ = null);
8790
- var P = $ ? $.completion : {};
8791
- return P.type = T, P.arg = f, $ ? (this.method = "next", this.next = $.finallyLoc, w) : this.complete(P);
8826
+ var I = $ ? $.completion : {};
8827
+ return I.type = T, I.arg = f, $ ? (this.method = "next", this.next = $.finallyLoc, w) : this.complete(I);
8792
8828
  },
8793
8829
  complete: function(T, f) {
8794
8830
  if (T.type === "throw") throw T.arg;
@@ -8831,7 +8867,7 @@ function Vn(n, r, t, e, i, a, o) {
8831
8867
  }
8832
8868
  s.done ? r(u) : Promise.resolve(u).then(e, i);
8833
8869
  }
8834
- function Jr(n) {
8870
+ function en(n) {
8835
8871
  return function() {
8836
8872
  var r = this, t = arguments;
8837
8873
  return new Promise(function(e, i) {
@@ -8846,7 +8882,7 @@ function Jr(n) {
8846
8882
  });
8847
8883
  };
8848
8884
  }
8849
- var en = {
8885
+ var tn = {
8850
8886
  size: {
8851
8887
  mode: "max",
8852
8888
  value: 512
@@ -8856,8 +8892,8 @@ var en = {
8856
8892
  maxTextureSize: 4096,
8857
8893
  debounceTimeout: 500,
8858
8894
  crossOrigin: "anonymous"
8859
- }, Zu = 1;
8860
- function Fr(n) {
8895
+ }, tl = 1;
8896
+ function Or(n) {
8861
8897
  var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = r.crossOrigin;
8862
8898
  return new Promise(function(e, i) {
8863
8899
  var a = new Image();
@@ -8872,11 +8908,11 @@ function Fr(n) {
8872
8908
  }), t && a.setAttribute("crossOrigin", t), a.src = n;
8873
8909
  });
8874
8910
  }
8875
- function Qu(n) {
8876
- return Or.apply(this, arguments);
8911
+ function rl(n) {
8912
+ return zr.apply(this, arguments);
8877
8913
  }
8878
- function Or() {
8879
- return Or = Jr(/* @__PURE__ */ Xe().mark(function n(r) {
8914
+ function zr() {
8915
+ return zr = en(/* @__PURE__ */ Xe().mark(function n(r) {
8880
8916
  var t, e, i, a, o, s, u, l, c, h, v, y, b, R = arguments;
8881
8917
  return Xe().wrap(function(k) {
8882
8918
  for (; ; ) switch (k.prev = k.next) {
@@ -8906,7 +8942,7 @@ function Or() {
8906
8942
  case 19:
8907
8943
  return typeof e == "number" && (u.setAttribute("width", "" + e), u.setAttribute("height", "" + e)), h = new XMLSerializer().serializeToString(s), v = new Blob([h], {
8908
8944
  type: "image/svg+xml"
8909
- }), y = URL.createObjectURL(v), b = Fr(y), b.finally(function() {
8945
+ }), y = URL.createObjectURL(v), b = Or(y), b.finally(function() {
8910
8946
  return URL.revokeObjectURL(y);
8911
8947
  }), k.abrupt("return", b);
8912
8948
  case 26:
@@ -8914,13 +8950,13 @@ function Or() {
8914
8950
  return k.stop();
8915
8951
  }
8916
8952
  }, n);
8917
- })), Or.apply(this, arguments);
8953
+ })), zr.apply(this, arguments);
8918
8954
  }
8919
- function Ju(n) {
8920
- return zr.apply(this, arguments);
8955
+ function nl(n) {
8956
+ return Nr.apply(this, arguments);
8921
8957
  }
8922
- function zr() {
8923
- return zr = Jr(/* @__PURE__ */ Xe().mark(function n(r) {
8958
+ function Nr() {
8959
+ return Nr = en(/* @__PURE__ */ Xe().mark(function n(r) {
8924
8960
  var t, e, i, a, o, s, u = arguments;
8925
8961
  return Xe().wrap(function(c) {
8926
8962
  for (; ; ) switch (c.prev = c.next) {
@@ -8929,7 +8965,7 @@ function zr() {
8929
8965
  c.next = 16;
8930
8966
  break;
8931
8967
  }
8932
- return c.prev = 3, c.next = 6, Qu(r, {
8968
+ return c.prev = 3, c.next = 6, rl(r, {
8933
8969
  size: i,
8934
8970
  crossOrigin: a
8935
8971
  });
@@ -8937,7 +8973,7 @@ function zr() {
8937
8973
  s = c.sent, c.next = 14;
8938
8974
  break;
8939
8975
  case 9:
8940
- return c.prev = 9, c.t0 = c.catch(3), c.next = 13, Fr(r, {
8976
+ return c.prev = 9, c.t0 = c.catch(3), c.next = 13, Or(r, {
8941
8977
  crossOrigin: a
8942
8978
  });
8943
8979
  case 13:
@@ -8946,7 +8982,7 @@ function zr() {
8946
8982
  c.next = 19;
8947
8983
  break;
8948
8984
  case 16:
8949
- return c.next = 18, Fr(r, {
8985
+ return c.next = 18, Or(r, {
8950
8986
  crossOrigin: a
8951
8987
  });
8952
8988
  case 18:
@@ -8958,9 +8994,9 @@ function zr() {
8958
8994
  return c.stop();
8959
8995
  }
8960
8996
  }, n, null, [[3, 9]]);
8961
- })), zr.apply(this, arguments);
8997
+ })), Nr.apply(this, arguments);
8962
8998
  }
8963
- function el(n, r, t) {
8999
+ function il(n, r, t) {
8964
9000
  var e = t.objectFit, i = t.size, a = t.correctCentering, o = e === "contain" ? Math.max(n.width, n.height) : Math.min(n.width, n.height), s = i.mode === "auto" ? o : i.mode === "force" ? i.value : Math.min(i.value, o), u = (n.width - o) / 2, l = (n.height - o) / 2;
8965
9001
  if (a) {
8966
9002
  var c = r.getCorrectionOffset(n, o);
@@ -8973,9 +9009,9 @@ function el(n, r, t) {
8973
9009
  destinationSize: s
8974
9010
  };
8975
9011
  }
8976
- function tl(n, r, t) {
9012
+ function al(n, r, t) {
8977
9013
  for (var e = r.canvas, i = e.width, a = e.height, o = [], s = t.x, u = t.y, l = t.rowHeight, c = t.maxRowWidth, h = {}, v = 0, y = n.length; v < y; v++) {
8978
- var b = n[v], R = b.key, w = b.image, k = b.sourceSize, E = b.sourceX, m = b.sourceY, p = b.destinationSize, C = p + Zu;
9014
+ var b = n[v], R = b.key, w = b.image, k = b.sourceSize, E = b.sourceX, m = b.sourceY, p = b.destinationSize, C = p + tl;
8979
9015
  u + C > a || s + C > i && u + C + l > a || (s + C > i && (c = Math.max(c, s), s = 0, u += l, l = C), o.push({
8980
9016
  key: R,
8981
9017
  image: w,
@@ -8993,8 +9029,8 @@ function tl(n, r, t) {
8993
9029
  }
8994
9030
  c = Math.max(c, s);
8995
9031
  for (var L = c, g = u + l, x = 0, S = o.length; x < S; x++) {
8996
- var D = o[x], O = D.image, I = D.sourceSize, _ = D.sourceX, W = D.sourceY, K = D.destinationSize, T = D.destinationX, f = D.destinationY;
8997
- r.drawImage(O, _, W, I, I, T, f, K, K);
9032
+ var D = o[x], O = D.image, P = D.sourceSize, _ = D.sourceX, W = D.sourceY, K = D.destinationSize, T = D.destinationX, f = D.destinationY;
9033
+ r.drawImage(O, _, W, P, P, T, f, K, K);
8998
9034
  }
8999
9035
  return {
9000
9036
  atlas: h,
@@ -9007,10 +9043,10 @@ function tl(n, r, t) {
9007
9043
  }
9008
9044
  };
9009
9045
  }
9010
- function rl(n, r, t) {
9046
+ function ol(n, r, t) {
9011
9047
  var e = n.atlas, i = n.textures, a = n.cursor, o = {
9012
9048
  atlas: me({}, e),
9013
- textures: Yr(i.slice(0, -1)),
9049
+ textures: Zr(i.slice(0, -1)),
9014
9050
  cursor: me({}, a)
9015
9051
  }, s = [];
9016
9052
  for (var u in r) {
@@ -9023,7 +9059,7 @@ function rl(n, r, t) {
9023
9059
  }
9024
9060
  }
9025
9061
  for (var v = function() {
9026
- var b = tl(s, t, o.cursor), R = b.atlas, w = b.texture, k = b.cursor;
9062
+ var b = al(s, t, o.cursor), R = b.atlas, w = b.texture, k = b.cursor;
9027
9063
  o.cursor = k;
9028
9064
  var E = [];
9029
9065
  s.forEach(function(m) {
@@ -9040,13 +9076,13 @@ function rl(n, r, t) {
9040
9076
  v();
9041
9077
  return o;
9042
9078
  }
9043
- var nl = /* @__PURE__ */ (function() {
9079
+ var sl = /* @__PURE__ */ (function() {
9044
9080
  function n() {
9045
- Zr(this, n), this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d", {
9081
+ Qr(this, n), this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d", {
9046
9082
  willReadFrequently: !0
9047
9083
  });
9048
9084
  }
9049
- return Qr(n, [{
9085
+ return Jr(n, [{
9050
9086
  key: "getCorrectionOffset",
9051
9087
  value: function(t, e) {
9052
9088
  this.canvas.width = e, this.canvas.height = e, this.context.clearRect(0, 0, e, e), this.context.drawImage(t, 0, 0, e, e);
@@ -9068,16 +9104,16 @@ var nl = /* @__PURE__ */ (function() {
9068
9104
  na(r, n);
9069
9105
  function r() {
9070
9106
  var t, e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
9071
- return Zr(this, r), t = ra(this, r), fe(Ce(t), "canvas", document.createElement("canvas")), fe(Ce(t), "ctx", t.canvas.getContext("2d", {
9107
+ return Qr(this, r), t = ra(this, r), fe(Ce(t), "canvas", document.createElement("canvas")), fe(Ce(t), "ctx", t.canvas.getContext("2d", {
9072
9108
  willReadFrequently: !0
9073
- })), fe(Ce(t), "corrector", new nl()), fe(Ce(t), "imageStates", {}), fe(Ce(t), "textures", [t.ctx.getImageData(0, 0, 1, 1)]), fe(Ce(t), "lastTextureCursor", {
9109
+ })), fe(Ce(t), "corrector", new sl()), fe(Ce(t), "imageStates", {}), fe(Ce(t), "textures", [t.ctx.getImageData(0, 0, 1, 1)]), fe(Ce(t), "lastTextureCursor", {
9074
9110
  x: 0,
9075
9111
  y: 0,
9076
9112
  rowHeight: 0,
9077
9113
  maxRowWidth: 0
9078
- }), fe(Ce(t), "atlas", {}), t.options = me(me({}, en), e), t.canvas.width = t.options.maxTextureSize, t.canvas.height = t.options.maxTextureSize, t;
9114
+ }), fe(Ce(t), "atlas", {}), t.options = me(me({}, tn), e), t.canvas.width = t.options.maxTextureSize, t.canvas.height = t.options.maxTextureSize, t;
9079
9115
  }
9080
- return Qr(r, [{
9116
+ return Jr(r, [{
9081
9117
  key: "scheduleGenerateTexture",
9082
9118
  value: function() {
9083
9119
  var e = this;
@@ -9088,7 +9124,7 @@ var nl = /* @__PURE__ */ (function() {
9088
9124
  }, {
9089
9125
  key: "generateTextures",
9090
9126
  value: function() {
9091
- var e = rl({
9127
+ var e = ol({
9092
9128
  atlas: this.atlas,
9093
9129
  textures: this.textures,
9094
9130
  cursor: this.lastTextureCursor
@@ -9102,7 +9138,7 @@ var nl = /* @__PURE__ */ (function() {
9102
9138
  }, {
9103
9139
  key: "registerImage",
9104
9140
  value: (function() {
9105
- var t = Jr(/* @__PURE__ */ Xe().mark(function i(a) {
9141
+ var t = en(/* @__PURE__ */ Xe().mark(function i(a) {
9106
9142
  var o, s;
9107
9143
  return Xe().wrap(function(l) {
9108
9144
  for (; ; ) switch (l.prev = l.next) {
@@ -9115,7 +9151,7 @@ var nl = /* @__PURE__ */ (function() {
9115
9151
  case 2:
9116
9152
  return this.imageStates[a] = {
9117
9153
  status: "loading"
9118
- }, l.prev = 3, o = this.options.size, l.next = 7, Ju(a, {
9154
+ }, l.prev = 3, o = this.options.size, l.next = 7, nl(a, {
9119
9155
  size: o.mode === "force" ? o.value : void 0,
9120
9156
  crossOrigin: this.options.crossOrigin || void 0
9121
9157
  });
@@ -9123,7 +9159,7 @@ var nl = /* @__PURE__ */ (function() {
9123
9159
  s = l.sent, this.imageStates[a] = me({
9124
9160
  status: "ready",
9125
9161
  image: s
9126
- }, el(s, this.corrector, this.options)), this.scheduleGenerateTexture(), l.next = 15;
9162
+ }, il(s, this.corrector, this.options)), this.scheduleGenerateTexture(), l.next = 15;
9127
9163
  break;
9128
9164
  case 12:
9129
9165
  l.prev = 12, l.t0 = l.catch(3), this.imageStates[a] = {
@@ -9151,9 +9187,9 @@ var nl = /* @__PURE__ */ (function() {
9151
9187
  return this.textures;
9152
9188
  }
9153
9189
  }]), r;
9154
- })(Wr.EventEmitter);
9190
+ })(Hr.EventEmitter);
9155
9191
  fe($t, "NEW_TEXTURE_EVENT", "newTexture");
9156
- var il = ["drawHover", "drawLabel", "drawingMode", "keepWithinCircle", "padding", "colorAttribute", "imageAttribute"], ia = WebGLRenderingContext, qn = ia.UNSIGNED_BYTE, mt = ia.FLOAT, al = me(me({}, en), {}, {
9192
+ var ul = ["drawHover", "drawLabel", "drawingMode", "keepWithinCircle", "padding", "colorAttribute", "imageAttribute"], ia = WebGLRenderingContext, qn = ia.UNSIGNED_BYTE, mt = ia.FLOAT, ll = me(me({}, tn), {}, {
9157
9193
  drawingMode: "background",
9158
9194
  keepWithinCircle: !0,
9159
9195
  drawLabel: void 0,
@@ -9161,35 +9197,35 @@ var il = ["drawHover", "drawLabel", "drawingMode", "keepWithinCircle", "padding"
9161
9197
  padding: 0,
9162
9198
  colorAttribute: "color",
9163
9199
  imageAttribute: "image"
9164
- }), ol = ["u_sizeRatio", "u_correctionRatio", "u_cameraAngle", "u_percentagePadding", "u_matrix", "u_colorizeImages", "u_keepWithinCircle", "u_atlas"];
9165
- function tn(n) {
9166
- var r, t = document.createElement("canvas").getContext("webgl"), e = Math.min(t.getParameter(t.MAX_TEXTURE_SIZE), en.maxTextureSize);
9200
+ }), cl = ["u_sizeRatio", "u_correctionRatio", "u_cameraAngle", "u_percentagePadding", "u_matrix", "u_colorizeImages", "u_keepWithinCircle", "u_atlas"];
9201
+ function rn(n) {
9202
+ var r, t = document.createElement("canvas").getContext("webgl"), e = Math.min(t.getParameter(t.MAX_TEXTURE_SIZE), tn.maxTextureSize);
9167
9203
  t.canvas.remove();
9168
- var i = me(me(me({}, al), {
9204
+ var i = me(me(me({}, ll), {
9169
9205
  maxTextureSize: e
9170
- }), n || {}), a = i.drawHover, o = i.drawLabel, s = i.drawingMode, u = i.keepWithinCircle, l = i.padding, c = i.colorAttribute, h = i.imageAttribute, v = qu(i, il), y = new $t(v);
9206
+ }), n || {}), a = i.drawHover, o = i.drawLabel, s = i.drawingMode, u = i.keepWithinCircle, l = i.padding, c = i.colorAttribute, h = i.imageAttribute, v = Zu(i, ul), y = new $t(v);
9171
9207
  return r = /* @__PURE__ */ (function(b) {
9172
9208
  na(R, b);
9173
9209
  function R(w, k, E) {
9174
9210
  var m;
9175
- return Zr(this, R), m = ra(this, R, [w, k, E]), fe(Ce(m), "drawLabel", o), fe(Ce(m), "drawHover", a), fe(Ce(m), "textureManagerCallback", null), m.textureManagerCallback = function(p) {
9211
+ return Qr(this, R), m = ra(this, R, [w, k, E]), fe(Ce(m), "drawLabel", o), fe(Ce(m), "drawHover", a), fe(Ce(m), "textureManagerCallback", null), m.textureManagerCallback = function(p) {
9176
9212
  var C = p.atlas, L = p.textures, g = L.length !== m.textures.length;
9177
9213
  m.atlas = C, m.textureImages = L, g && m.upgradeShaders(), m.bindTextures(), m.latestRenderParams && m.render(m.latestRenderParams), m.renderer && m.renderer.refresh && m.renderer.refresh();
9178
9214
  }, y.on($t.NEW_TEXTURE_EVENT, m.textureManagerCallback), m.atlas = y.getAtlas(), m.textureImages = y.getTextures(), m.textures = m.textureImages.map(function() {
9179
9215
  return w.createTexture();
9180
9216
  }), m.bindTextures(), m;
9181
9217
  }
9182
- return Qr(R, [{
9218
+ return Jr(R, [{
9183
9219
  key: "getDefinition",
9184
9220
  value: function() {
9185
9221
  return {
9186
9222
  VERTICES: 3,
9187
- VERTEX_SHADER_SOURCE: Yu,
9188
- FRAGMENT_SHADER_SOURCE: Ku({
9223
+ VERTEX_SHADER_SOURCE: el,
9224
+ FRAGMENT_SHADER_SOURCE: Qu({
9189
9225
  texturesCount: y.getTextures().length
9190
9226
  }),
9191
9227
  METHOD: WebGLRenderingContext.TRIANGLES,
9192
- UNIFORMS: ol,
9228
+ UNIFORMS: cl,
9193
9229
  ATTRIBUTES: [{
9194
9230
  name: "a_position",
9195
9231
  size: 2,
@@ -9272,16 +9308,16 @@ function tn(n) {
9272
9308
  }, {
9273
9309
  key: "setUniforms",
9274
9310
  value: function(k, E) {
9275
- var m = E.gl, p = E.uniformLocations, C = p.u_sizeRatio, L = p.u_correctionRatio, g = p.u_matrix, x = p.u_atlas, S = p.u_colorizeImages, D = p.u_keepWithinCircle, O = p.u_cameraAngle, I = p.u_percentagePadding;
9276
- this.latestRenderParams = k, m.uniform1f(L, k.correctionRatio), m.uniform1f(C, u ? k.sizeRatio : k.sizeRatio / Math.SQRT2), m.uniform1f(O, k.cameraAngle), m.uniform1f(I, l), m.uniformMatrix3fv(g, !1, k.matrix), m.uniform1iv(x, Yr(new Array(this.textureImages.length)).map(function(_, W) {
9311
+ var m = E.gl, p = E.uniformLocations, C = p.u_sizeRatio, L = p.u_correctionRatio, g = p.u_matrix, x = p.u_atlas, S = p.u_colorizeImages, D = p.u_keepWithinCircle, O = p.u_cameraAngle, P = p.u_percentagePadding;
9312
+ this.latestRenderParams = k, m.uniform1f(L, k.correctionRatio), m.uniform1f(C, u ? k.sizeRatio : k.sizeRatio / Math.SQRT2), m.uniform1f(O, k.cameraAngle), m.uniform1f(P, l), m.uniformMatrix3fv(g, !1, k.matrix), m.uniform1iv(x, Zr(new Array(this.textureImages.length)).map(function(_, W) {
9277
9313
  return W;
9278
9314
  })), m.uniform1i(S, s === "color" ? 1 : 0), m.uniform1i(D, u ? 1 : 0);
9279
9315
  }
9280
9316
  }]), R;
9281
9317
  })(Mi), fe(r, "ANGLE_1", 0), fe(r, "ANGLE_2", 2 * Math.PI / 3), fe(r, "ANGLE_3", 4 * Math.PI / 3), fe(r, "textureManager", y), r;
9282
9318
  }
9283
- tn();
9284
- tn({
9319
+ rn();
9320
+ rn({
9285
9321
  keepWithinCircle: !1,
9286
9322
  size: {
9287
9323
  mode: "force",
@@ -9290,7 +9326,7 @@ tn({
9290
9326
  drawingMode: "color",
9291
9327
  correctCentering: !0
9292
9328
  });
9293
- function sl(n, r) {
9329
+ function hl(n, r) {
9294
9330
  if (typeof n != "object" || !n) return n;
9295
9331
  var t = n[Symbol.toPrimitive];
9296
9332
  if (t !== void 0) {
@@ -9301,7 +9337,7 @@ function sl(n, r) {
9301
9337
  return (r === "string" ? String : Number)(n);
9302
9338
  }
9303
9339
  function aa(n) {
9304
- var r = sl(n, "string");
9340
+ var r = hl(n, "string");
9305
9341
  return typeof r == "symbol" ? r : r + "";
9306
9342
  }
9307
9343
  function oa(n, r, t) {
@@ -9333,24 +9369,24 @@ function ot(n) {
9333
9369
  }
9334
9370
  return n;
9335
9371
  }
9336
- function ul(n, r) {
9372
+ function dl(n, r) {
9337
9373
  if (!(n instanceof r)) throw new TypeError("Cannot call a class as a function");
9338
9374
  }
9339
- function ll(n, r) {
9375
+ function fl(n, r) {
9340
9376
  for (var t = 0; t < r.length; t++) {
9341
9377
  var e = r[t];
9342
9378
  e.enumerable = e.enumerable || !1, e.configurable = !0, "value" in e && (e.writable = !0), Object.defineProperty(n, aa(e.key), e);
9343
9379
  }
9344
9380
  }
9345
- function cl(n, r, t) {
9346
- return r && ll(n.prototype, r), Object.defineProperty(n, "prototype", {
9381
+ function gl(n, r, t) {
9382
+ return r && fl(n.prototype, r), Object.defineProperty(n, "prototype", {
9347
9383
  writable: !1
9348
9384
  }), n;
9349
9385
  }
9350
- function Bt(n) {
9351
- return Bt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
9386
+ function Wt(n) {
9387
+ return Wt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
9352
9388
  return r.__proto__ || Object.getPrototypeOf(r);
9353
- }, Bt(n);
9389
+ }, Wt(n);
9354
9390
  }
9355
9391
  function sa() {
9356
9392
  try {
@@ -9366,20 +9402,20 @@ function ua(n) {
9366
9402
  if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
9367
9403
  return n;
9368
9404
  }
9369
- function hl(n, r) {
9405
+ function pl(n, r) {
9370
9406
  if (r && (typeof r == "object" || typeof r == "function")) return r;
9371
9407
  if (r !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
9372
9408
  return ua(n);
9373
9409
  }
9374
- function dl(n, r, t) {
9375
- return r = Bt(r), hl(n, sa() ? Reflect.construct(r, t || [], Bt(n).constructor) : r.apply(n, t));
9410
+ function vl(n, r, t) {
9411
+ return r = Wt(r), pl(n, sa() ? Reflect.construct(r, t || [], Wt(n).constructor) : r.apply(n, t));
9376
9412
  }
9377
- function Nr(n, r) {
9378
- return Nr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
9413
+ function Ur(n, r) {
9414
+ return Ur = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
9379
9415
  return t.__proto__ = e, t;
9380
- }, Nr(n, r);
9416
+ }, Ur(n, r);
9381
9417
  }
9382
- function fl(n, r) {
9418
+ function ml(n, r) {
9383
9419
  if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function");
9384
9420
  n.prototype = Object.create(r && r.prototype, {
9385
9421
  constructor: {
@@ -9389,32 +9425,32 @@ function fl(n, r) {
9389
9425
  }
9390
9426
  }), Object.defineProperty(n, "prototype", {
9391
9427
  writable: !1
9392
- }), r && Nr(n, r);
9428
+ }), r && Ur(n, r);
9393
9429
  }
9394
- function Ur(n, r) {
9430
+ function $r(n, r) {
9395
9431
  (r == null || r > n.length) && (r = n.length);
9396
9432
  for (var t = 0, e = Array(r); t < r; t++) e[t] = n[t];
9397
9433
  return e;
9398
9434
  }
9399
- function gl(n) {
9400
- if (Array.isArray(n)) return Ur(n);
9435
+ function yl(n) {
9436
+ if (Array.isArray(n)) return $r(n);
9401
9437
  }
9402
- function pl(n) {
9438
+ function bl(n) {
9403
9439
  if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
9404
9440
  }
9405
- function vl(n, r) {
9441
+ function wl(n, r) {
9406
9442
  if (n) {
9407
- if (typeof n == "string") return Ur(n, r);
9443
+ if (typeof n == "string") return $r(n, r);
9408
9444
  var t = {}.toString.call(n).slice(8, -1);
9409
- return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Ur(n, r) : void 0;
9445
+ return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? $r(n, r) : void 0;
9410
9446
  }
9411
9447
  }
9412
- function ml() {
9448
+ function El() {
9413
9449
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
9414
9450
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
9415
9451
  }
9416
- function ur(n) {
9417
- return gl(n) || pl(n) || vl(n) || ml();
9452
+ function lr(n) {
9453
+ return yl(n) || bl(n) || wl(n) || El();
9418
9454
  }
9419
9455
  function la(n, r, t, e) {
9420
9456
  var i = Math.pow(1 - n, 2) * r.x + 2 * (1 - n) * n * t.x + Math.pow(n, 2) * e.x, a = Math.pow(1 - n, 2) * r.y + 2 * (1 - n) * n * t.y + Math.pow(n, 2) * e.y;
@@ -9423,39 +9459,39 @@ function la(n, r, t, e) {
9423
9459
  y: a
9424
9460
  };
9425
9461
  }
9426
- function yl(n, r, t) {
9462
+ function _l(n, r, t) {
9427
9463
  for (var e = 20, i = 0, a = n, o = 0; o < e; o++) {
9428
9464
  var s = la((o + 1) / e, n, r, t);
9429
9465
  i += Math.sqrt(Math.pow(a.x - s.x, 2) + Math.pow(a.y - s.y, 2)), a = s;
9430
9466
  }
9431
9467
  return i;
9432
9468
  }
9433
- function bl(n) {
9469
+ function Tl(n) {
9434
9470
  var r = n.curvatureAttribute, t = n.defaultCurvature, e = n.keepLabelUpright, i = e === void 0 ? !0 : e;
9435
9471
  return function(a, o, s, u, l) {
9436
9472
  var c = l.edgeLabelSize, h = o[r] || t, v = l.edgeLabelFont, y = l.edgeLabelWeight, b = l.edgeLabelColor.attribute ? o[l.edgeLabelColor.attribute] || l.edgeLabelColor.color || "#000" : l.edgeLabelColor.color, R = o.label;
9437
9473
  if (R) {
9438
9474
  a.fillStyle = b, a.font = "".concat(y, " ").concat(c, "px ").concat(v);
9439
- var w = !i || s.x < u.x, k = w ? s.x : u.x, E = w ? s.y : u.y, m = w ? u.x : s.x, p = w ? u.y : s.y, C = (k + m) / 2, L = (E + p) / 2, g = m - k, x = p - E, S = Math.sqrt(Math.pow(g, 2) + Math.pow(x, 2)), D = w ? 1 : -1, O = C + x * h * D, I = L - g * h * D, _ = o.size * 0.7 + 5, W = {
9440
- x: I - E,
9475
+ var w = !i || s.x < u.x, k = w ? s.x : u.x, E = w ? s.y : u.y, m = w ? u.x : s.x, p = w ? u.y : s.y, C = (k + m) / 2, L = (E + p) / 2, g = m - k, x = p - E, S = Math.sqrt(Math.pow(g, 2) + Math.pow(x, 2)), D = w ? 1 : -1, O = C + x * h * D, P = L - g * h * D, _ = o.size * 0.7 + 5, W = {
9476
+ x: P - E,
9441
9477
  y: -(O - k)
9442
9478
  }, K = Math.sqrt(Math.pow(W.x, 2) + Math.pow(W.y, 2)), T = {
9443
- x: p - I,
9479
+ x: p - P,
9444
9480
  y: -(m - O)
9445
9481
  }, f = Math.sqrt(Math.pow(T.x, 2) + Math.pow(T.y, 2));
9446
- k += _ * W.x / K, E += _ * W.y / K, m += _ * T.x / f, p += _ * T.y / f, O += _ * x / S, I -= _ * g / S;
9482
+ k += _ * W.x / K, E += _ * W.y / K, m += _ * T.x / f, p += _ * T.y / f, O += _ * x / S, P -= _ * g / S;
9447
9483
  var d = {
9448
9484
  x: O,
9449
- y: I
9485
+ y: P
9450
9486
  }, U = {
9451
9487
  x: k,
9452
9488
  y: E
9453
9489
  }, $ = {
9454
9490
  x: m,
9455
9491
  y: p
9456
- }, P = yl(U, d, $);
9457
- if (!(P < s.size + u.size)) {
9458
- var A = a.measureText(R).width, z = P - s.size - u.size;
9492
+ }, I = _l(U, d, $);
9493
+ if (!(I < s.size + u.size)) {
9494
+ var A = a.measureText(R).width, z = I - s.size - u.size;
9459
9495
  if (A > z) {
9460
9496
  var Z = "…";
9461
9497
  for (R = R + Z, A = a.measureText(R).width; A > z && R.length > 1; )
@@ -9466,15 +9502,15 @@ function bl(n) {
9466
9502
  var V = R[oe];
9467
9503
  te[V] || (te[V] = a.measureText(V).width * (1 + h * 0.35));
9468
9504
  }
9469
- for (var se = 0.5 - A / P / 2, ee = 0, re = R.length; ee < re; ee++) {
9470
- var J = R[ee], le = la(se, U, d, $), q = 2 * (1 - se) * (O - k) + 2 * se * (m - O), B = 2 * (1 - se) * (I - E) + 2 * se * (p - I), G = Math.atan2(B, q);
9471
- a.save(), a.translate(le.x, le.y), a.rotate(G), a.fillText(J, 0, 0), a.restore(), se += te[J] / P;
9505
+ for (var se = 0.5 - A / I / 2, ee = 0, re = R.length; ee < re; ee++) {
9506
+ var J = R[ee], le = la(se, U, d, $), q = 2 * (1 - se) * (O - k) + 2 * se * (m - O), B = 2 * (1 - se) * (P - E) + 2 * se * (p - P), G = Math.atan2(B, q);
9507
+ a.save(), a.translate(le.x, le.y), a.rotate(G), a.fillText(J, 0, 0), a.restore(), se += te[J] / I;
9472
9508
  }
9473
9509
  }
9474
9510
  }
9475
9511
  };
9476
9512
  }
9477
- function wl(n) {
9513
+ function Sl(n) {
9478
9514
  var r = n.arrowHead, t = r?.extremity === "target" || r?.extremity === "both", e = r?.extremity === "source" || r?.extremity === "both", i = (
9479
9515
  /*glsl*/
9480
9516
  `
@@ -9556,7 +9592,7 @@ void main(void) {
9556
9592
  );
9557
9593
  return i;
9558
9594
  }
9559
- function El(n) {
9595
+ function Rl(n) {
9560
9596
  var r = n.arrowHead, t = r?.extremity === "target" || r?.extremity === "both", e = r?.extremity === "source" || r?.extremity === "both", i = (
9561
9597
  /*glsl*/
9562
9598
  `
@@ -9673,22 +9709,22 @@ void main() {
9673
9709
  );
9674
9710
  return i;
9675
9711
  }
9676
- var rn = 0.25, _l = {
9712
+ var nn = 0.25, Al = {
9677
9713
  arrowHead: null,
9678
9714
  curvatureAttribute: "curvature",
9679
- defaultCurvature: rn
9680
- }, Tl = {
9715
+ defaultCurvature: nn
9716
+ }, kl = {
9681
9717
  edgeIndexAttribute: "parallelIndex",
9682
9718
  edgeMinIndexAttribute: "parallelMinIndex",
9683
9719
  edgeMaxIndexAttribute: "parallelMaxIndex"
9684
9720
  };
9685
- function Sl(n, r) {
9686
- var t = ot(ot({}, Tl), {}), e = {}, i = {}, a = {}, o = 0;
9721
+ function Cl(n, r) {
9722
+ var t = ot(ot({}, kl), {}), e = {}, i = {}, a = {}, o = 0;
9687
9723
  n.forEachNode(function(L) {
9688
9724
  e[L] = ++o + "";
9689
9725
  }), n.forEachEdge(function(L, g, x, S) {
9690
- var D = e[x], O = e[S], I = [D, O].join("-");
9691
- i[L] = I, a[I] = [D, O].sort().join("-");
9726
+ var D = e[x], O = e[S], P = [D, O].join("-");
9727
+ i[L] = P, a[P] = [D, O].sort().join("-");
9692
9728
  });
9693
9729
  var s = {}, u = {};
9694
9730
  n.forEachEdge(function(L) {
@@ -9716,24 +9752,24 @@ function Sl(n, r) {
9716
9752
  }
9717
9753
  }
9718
9754
  var ca = WebGLRenderingContext, Xn = ca.UNSIGNED_BYTE, Me = ca.FLOAT;
9719
- function nn(n) {
9720
- var r = ot(ot({}, _l), n || {}), t = r, e = t.arrowHead, i = t.curvatureAttribute, a = t.drawLabel, o = e?.extremity === "target" || e?.extremity === "both", s = e?.extremity === "source" || e?.extremity === "both", u = ["u_matrix", "u_sizeRatio", "u_dimensions", "u_pixelRatio", "u_feather", "u_minEdgeThickness"].concat(ur(e ? ["u_lengthToThicknessRatio", "u_widenessToThicknessRatio"] : []));
9755
+ function an(n) {
9756
+ var r = ot(ot({}, Al), n || {}), t = r, e = t.arrowHead, i = t.curvatureAttribute, a = t.drawLabel, o = e?.extremity === "target" || e?.extremity === "both", s = e?.extremity === "source" || e?.extremity === "both", u = ["u_matrix", "u_sizeRatio", "u_dimensions", "u_pixelRatio", "u_feather", "u_minEdgeThickness"].concat(lr(e ? ["u_lengthToThicknessRatio", "u_widenessToThicknessRatio"] : []));
9721
9757
  return /* @__PURE__ */ (function(l) {
9722
- fl(c, l);
9758
+ ml(c, l);
9723
9759
  function c() {
9724
9760
  var h;
9725
- ul(this, c);
9761
+ dl(this, c);
9726
9762
  for (var v = arguments.length, y = new Array(v), b = 0; b < v; b++)
9727
9763
  y[b] = arguments[b];
9728
- return h = dl(this, c, [].concat(y)), oa(ua(h), "drawLabel", a || bl(r)), h;
9764
+ return h = vl(this, c, [].concat(y)), oa(ua(h), "drawLabel", a || Tl(r)), h;
9729
9765
  }
9730
- return cl(c, [{
9766
+ return gl(c, [{
9731
9767
  key: "getDefinition",
9732
9768
  value: function() {
9733
9769
  return {
9734
9770
  VERTICES: 6,
9735
- VERTEX_SHADER_SOURCE: El(r),
9736
- FRAGMENT_SHADER_SOURCE: wl(r),
9771
+ VERTEX_SHADER_SOURCE: Rl(r),
9772
+ FRAGMENT_SHADER_SOURCE: Sl(r),
9737
9773
  METHOD: WebGLRenderingContext.TRIANGLES,
9738
9774
  UNIFORMS: u,
9739
9775
  ATTRIBUTES: [{
@@ -9744,11 +9780,11 @@ function nn(n) {
9744
9780
  name: "a_target",
9745
9781
  size: 2,
9746
9782
  type: Me
9747
- }].concat(ur(o ? [{
9783
+ }].concat(lr(o ? [{
9748
9784
  name: "a_targetSize",
9749
9785
  size: 1,
9750
9786
  type: Me
9751
- }] : []), ur(s ? [{
9787
+ }] : []), lr(s ? [{
9752
9788
  name: "a_sourceSize",
9753
9789
  size: 1,
9754
9790
  type: Me
@@ -9791,7 +9827,7 @@ function nn(n) {
9791
9827
  }, {
9792
9828
  key: "processVisibleItem",
9793
9829
  value: function(v, y, b, R, w) {
9794
- var k, E = w.size || 1, m = b.x, p = b.y, C = R.x, L = R.y, g = Ye(w.color), x = (k = w[i]) !== null && k !== void 0 ? k : rn, S = this.array;
9830
+ var k, E = w.size || 1, m = b.x, p = b.y, C = R.x, L = R.y, g = Ye(w.color), x = (k = w[i]) !== null && k !== void 0 ? k : nn, S = this.array;
9795
9831
  S[y++] = m, S[y++] = p, S[y++] = C, S[y++] = L, o && (S[y++] = R.size), s && (S[y++] = b.size), S[y++] = E, S[y++] = x, S[y++] = g, S[y++] = v;
9796
9832
  }
9797
9833
  }, {
@@ -9804,19 +9840,19 @@ function nn(n) {
9804
9840
  }
9805
9841
  }
9806
9842
  }]), c;
9807
- })(Ht);
9843
+ })(jt);
9808
9844
  }
9809
- var Rl = nn(), Al = nn({
9810
- arrowHead: jt
9845
+ var xl = an(), Dl = an({
9846
+ arrowHead: Vt
9811
9847
  });
9812
- nn({
9813
- arrowHead: ot(ot({}, jt), {}, {
9848
+ an({
9849
+ arrowHead: ot(ot({}, Vt), {}, {
9814
9850
  extremity: "both"
9815
9851
  })
9816
9852
  });
9817
- var et = {}, lr, Yn;
9818
- function Vt() {
9819
- if (Yn) return lr;
9853
+ var et = {}, cr, Yn;
9854
+ function qt() {
9855
+ if (Yn) return cr;
9820
9856
  Yn = 1;
9821
9857
  function n(t) {
9822
9858
  return !t || typeof t != "object" || typeof t == "function" || Array.isArray(t) || t instanceof Set || t instanceof Map || t instanceof RegExp || t instanceof Date;
@@ -9834,11 +9870,11 @@ function Vt() {
9834
9870
  }
9835
9871
  return i;
9836
9872
  }
9837
- return lr = r, lr;
9873
+ return cr = r, cr;
9838
9874
  }
9839
- var cr, Zn;
9840
- function kl() {
9841
- if (Zn) return cr;
9875
+ var hr, Zn;
9876
+ function Ll() {
9877
+ if (Zn) return hr;
9842
9878
  Zn = 1;
9843
9879
  function n(t) {
9844
9880
  return function(e, i) {
@@ -9846,13 +9882,13 @@ function kl() {
9846
9882
  };
9847
9883
  }
9848
9884
  var r = n(Math.random);
9849
- return r.createRandom = n, cr = r, cr;
9885
+ return r.createRandom = n, hr = r, hr;
9850
9886
  }
9851
- var hr, Qn;
9852
- function Cl() {
9853
- if (Qn) return hr;
9887
+ var dr, Qn;
9888
+ function Gl() {
9889
+ if (Qn) return dr;
9854
9890
  Qn = 1;
9855
- var n = kl().createRandom;
9891
+ var n = Ll().createRandom;
9856
9892
  function r(e) {
9857
9893
  var i = n(e);
9858
9894
  return function(a) {
@@ -9863,13 +9899,13 @@ function Cl() {
9863
9899
  };
9864
9900
  }
9865
9901
  var t = r(Math.random);
9866
- return t.createShuffleInPlace = r, hr = t, hr;
9902
+ return t.createShuffleInPlace = r, dr = t, dr;
9867
9903
  }
9868
- var dr, Jn;
9869
- function xl() {
9870
- if (Jn) return dr;
9904
+ var fr, Jn;
9905
+ function Il() {
9906
+ if (Jn) return fr;
9871
9907
  Jn = 1;
9872
- var n = Vt(), r = Ze(), t = Cl(), e = {
9908
+ var n = qt(), r = Ze(), t = Gl(), e = {
9873
9909
  attributes: {
9874
9910
  x: "x",
9875
9911
  y: "y"
@@ -9925,16 +9961,16 @@ function xl() {
9925
9961
  return new i(null, g.x, g.y, g.r);
9926
9962
  }
9927
9963
  function c(g, x) {
9928
- var S = g.x, D = g.y, O = g.r, I = x.x, _ = x.y, W = x.r, K = I - S, T = _ - D, f = W - O, d = Math.sqrt(K * K + T * T);
9964
+ var S = g.x, D = g.y, O = g.r, P = x.x, _ = x.y, W = x.r, K = P - S, T = _ - D, f = W - O, d = Math.sqrt(K * K + T * T);
9929
9965
  return new i(
9930
9966
  null,
9931
- (S + I + K / d * f) / 2,
9967
+ (S + P + K / d * f) / 2,
9932
9968
  (D + _ + T / d * f) / 2,
9933
9969
  (d + O + W) / 2
9934
9970
  );
9935
9971
  }
9936
9972
  function h(g, x, S) {
9937
- var D = g.x, O = g.y, I = g.r, _ = x.x, W = x.y, K = x.r, T = S.x, f = S.y, d = S.r, U = D - _, $ = D - T, P = O - W, A = O - f, z = K - I, Z = d - I, te = D * D + O * O - I * I, oe = te - _ * _ - W * W + K * K, ne = te - T * T - f * f + d * d, V = $ * P - U * A, se = (P * ne - A * oe) / (V * 2) - D, ee = (A * z - P * Z) / V, re = ($ * oe - U * ne) / (V * 2) - O, J = (U * Z - $ * z) / V, le = ee * ee + J * J - 1, q = 2 * (I + se * ee + re * J), B = se * se + re * re - I * I, G = -(le ? (q + Math.sqrt(q * q - 4 * le * B)) / (2 * le) : B / q);
9973
+ var D = g.x, O = g.y, P = g.r, _ = x.x, W = x.y, K = x.r, T = S.x, f = S.y, d = S.r, U = D - _, $ = D - T, I = O - W, A = O - f, z = K - P, Z = d - P, te = D * D + O * O - P * P, oe = te - _ * _ - W * W + K * K, ne = te - T * T - f * f + d * d, V = $ * I - U * A, se = (I * ne - A * oe) / (V * 2) - D, ee = (A * z - I * Z) / V, re = ($ * oe - U * ne) / (V * 2) - O, J = (U * Z - $ * z) / V, le = ee * ee + J * J - 1, q = 2 * (P + se * ee + re * J), B = se * se + re * re - P * P, G = -(le ? (q + Math.sqrt(q * q - 4 * le * B)) / (2 * le) : B / q);
9938
9974
  return new i(null, D + se + ee * G, O + re + J * G, G);
9939
9975
  }
9940
9976
  function v(g) {
@@ -9964,18 +10000,18 @@ function xl() {
9964
10000
  throw new Error("graphology-layout/circlepack: extendBasis failure !");
9965
10001
  }
9966
10002
  function b(g) {
9967
- var x = g.wrappedCircle, S = g.next.wrappedCircle, D = x.r + S.r, O = (x.x * S.r + S.x * x.r) / D, I = (x.y * S.r + S.y * x.r) / D;
9968
- return O * O + I * I;
10003
+ var x = g.wrappedCircle, S = g.next.wrappedCircle, D = x.r + S.r, O = (x.x * S.r + S.x * x.r) / D, P = (x.y * S.r + S.y * x.r) / D;
10004
+ return O * O + P * P;
9969
10005
  }
9970
10006
  function R(g, x) {
9971
- var S = 0, D = g.slice(), O = g.length, I = [], _, W;
10007
+ var S = 0, D = g.slice(), O = g.length, P = [], _, W;
9972
10008
  for (x(D); S < O; )
9973
- _ = D[S], W && s(W, _) ? ++S : (I = y(I, _), W = v(I), S = 0);
10009
+ _ = D[S], W && s(W, _) ? ++S : (P = y(P, _), W = v(P), S = 0);
9974
10010
  return W;
9975
10011
  }
9976
10012
  function w(g, x, S) {
9977
- var D = g.x - x.x, O, I, _ = g.y - x.y, W, K, T = D * D + _ * _;
9978
- T ? (I = x.r + S.r, I *= I, K = g.r + S.r, K *= K, I > K ? (O = (T + K - I) / (2 * T), W = Math.sqrt(Math.max(0, K / T - O * O)), S.x = g.x - O * D - W * _, S.y = g.y - O * _ + W * D) : (O = (T + I - K) / (2 * T), W = Math.sqrt(Math.max(0, I / T - O * O)), S.x = x.x + O * D - W * _, S.y = x.y + O * _ + W * D)) : (S.x = x.x + S.r, S.y = x.y);
10013
+ var D = g.x - x.x, O, P, _ = g.y - x.y, W, K, T = D * D + _ * _;
10014
+ T ? (P = x.r + S.r, P *= P, K = g.r + S.r, K *= K, P > K ? (O = (T + K - P) / (2 * T), W = Math.sqrt(Math.max(0, K / T - O * O)), S.x = g.x - O * D - W * _, S.y = g.y - O * _ + W * D) : (O = (T + P - K) / (2 * T), W = Math.sqrt(Math.max(0, P / T - O * O)), S.x = x.x + O * D - W * _, S.y = x.y + O * _ + W * D)) : (S.x = x.x + S.r, S.y = x.y);
9979
10015
  }
9980
10016
  function k(g, x) {
9981
10017
  var S = g.r + x.r - 1e-6, D = x.x - g.x, O = x.y - g.y;
@@ -9984,37 +10020,37 @@ function xl() {
9984
10020
  function E(g, x) {
9985
10021
  var S = g.length;
9986
10022
  if (S === 0) return 0;
9987
- var D, O, I, _, W, K, T, f, d, U;
10023
+ var D, O, P, _, W, K, T, f, d, U;
9988
10024
  if (D = g[0], D.x = 0, D.y = 0, S <= 1) return D.r;
9989
10025
  if (O = g[1], D.x = -O.r, O.x = D.r, O.y = 0, S <= 2) return D.r + O.r;
9990
- I = g[2], w(O, D, I), D = new i(null, null, null, null, D), O = new i(null, null, null, null, O), I = new i(null, null, null, null, I), D.next = I.previous = O, O.next = D.previous = I, I.next = O.previous = D;
10026
+ P = g[2], w(O, D, P), D = new i(null, null, null, null, D), O = new i(null, null, null, null, O), P = new i(null, null, null, null, P), D.next = P.previous = O, O.next = D.previous = P, P.next = O.previous = D;
9991
10027
  e: for (K = 3; K < S; ++K) {
9992
- I = g[K], w(D.wrappedCircle, O.wrappedCircle, I), I = new i(null, null, null, null, I), T = O.next, f = D.previous, d = O.wrappedCircle.r, U = D.wrappedCircle.r;
10028
+ P = g[K], w(D.wrappedCircle, O.wrappedCircle, P), P = new i(null, null, null, null, P), T = O.next, f = D.previous, d = O.wrappedCircle.r, U = D.wrappedCircle.r;
9993
10029
  do
9994
10030
  if (d <= U) {
9995
- if (k(T.wrappedCircle, I.wrappedCircle)) {
10031
+ if (k(T.wrappedCircle, P.wrappedCircle)) {
9996
10032
  O = T, D.next = O, O.previous = D, --K;
9997
10033
  continue e;
9998
10034
  }
9999
10035
  d += T.wrappedCircle.r, T = T.next;
10000
10036
  } else {
10001
- if (k(f.wrappedCircle, I.wrappedCircle)) {
10037
+ if (k(f.wrappedCircle, P.wrappedCircle)) {
10002
10038
  D = f, D.next = O, O.previous = D, --K;
10003
10039
  continue e;
10004
10040
  }
10005
10041
  U += f.wrappedCircle.r, f = f.previous;
10006
10042
  }
10007
10043
  while (T !== f.next);
10008
- for (I.previous = D, I.next = O, D.next = O.previous = O = I, _ = b(D); (I = I.next) !== O; )
10009
- (W = b(I)) < _ && (D = I, _ = W);
10044
+ for (P.previous = D, P.next = O, D.next = O.previous = O = P, _ = b(D); (P = P.next) !== O; )
10045
+ (W = b(P)) < _ && (D = P, _ = W);
10010
10046
  O = D.next;
10011
10047
  }
10012
- D = [O.wrappedCircle], I = O;
10013
- for (var $ = 1e4; (I = I.next) !== O && --$ !== 0; )
10014
- D.push(I.wrappedCircle);
10015
- for (I = R(D, x), K = 0; K < S; ++K)
10016
- D = g[K], D.x -= I.x, D.y -= I.y;
10017
- return I.r;
10048
+ D = [O.wrappedCircle], P = O;
10049
+ for (var $ = 1e4; (P = P.next) !== O && --$ !== 0; )
10050
+ D.push(P.wrappedCircle);
10051
+ for (P = R(D, x), K = 0; K < S; ++K)
10052
+ D = g[K], D.x -= P.x, D.y -= P.y;
10053
+ return P.r;
10018
10054
  }
10019
10055
  function m(g, x) {
10020
10056
  var S = 0;
@@ -10040,7 +10076,7 @@ function xl() {
10040
10076
  "graphology-layout/circlepack: the given graph is not a valid graphology instance."
10041
10077
  );
10042
10078
  S = n(S, e);
10043
- var D = {}, O = {}, I = x.nodes(), _ = S.center, W = S.hierarchyAttributes, K = t.createShuffleInPlace(S.rng), T = S.scale, f = new i();
10079
+ var D = {}, O = {}, P = x.nodes(), _ = S.center, W = S.hierarchyAttributes, K = t.createShuffleInPlace(S.rng), T = S.scale, f = new i();
10044
10080
  x.forEachNode(function(z, Z) {
10045
10081
  var te = Z.size ? Z.size : 1, oe = new i(z, null, null, te), ne = f;
10046
10082
  W.forEach(function(V) {
@@ -10048,9 +10084,9 @@ function xl() {
10048
10084
  ne = ne.getChild(se);
10049
10085
  }), ne.addChild(z, oe);
10050
10086
  }), p(f, K), a(x, f, D);
10051
- var d = I.length, U, $, P;
10052
- for (P = 0; P < d; P++) {
10053
- var A = I[P];
10087
+ var d = P.length, U, $, I;
10088
+ for (I = 0; I < d; I++) {
10089
+ var A = P[I];
10054
10090
  U = _ + T * D[A].x, $ = _ + T * D[A].y, O[A] = {
10055
10091
  x: U,
10056
10092
  y: $
@@ -10059,13 +10095,13 @@ function xl() {
10059
10095
  return O;
10060
10096
  }
10061
10097
  var L = C.bind(null, !1);
10062
- return L.assign = C.bind(null, !0), dr = L, dr;
10098
+ return L.assign = C.bind(null, !0), fr = L, fr;
10063
10099
  }
10064
- var fr, ei;
10065
- function Dl() {
10066
- if (ei) return fr;
10100
+ var gr, ei;
10101
+ function Pl() {
10102
+ if (ei) return gr;
10067
10103
  ei = 1;
10068
- var n = Vt(), r = Ze(), t = {
10104
+ var n = qt(), r = Ze(), t = {
10069
10105
  dimensions: ["x", "y"],
10070
10106
  center: 0.5,
10071
10107
  scale: 1
@@ -10100,13 +10136,13 @@ function Dl() {
10100
10136
  );
10101
10137
  }
10102
10138
  var i = e.bind(null, !1);
10103
- return i.assign = e.bind(null, !0), fr = i, fr;
10139
+ return i.assign = e.bind(null, !0), gr = i, gr;
10104
10140
  }
10105
- var gr, ti;
10106
- function Ll() {
10107
- if (ti) return gr;
10141
+ var pr, ti;
10142
+ function Fl() {
10143
+ if (ti) return pr;
10108
10144
  ti = 1;
10109
- var n = Vt(), r = Ze(), t = {
10145
+ var n = qt(), r = Ze(), t = {
10110
10146
  dimensions: ["x", "y"],
10111
10147
  center: 0.5,
10112
10148
  rng: Math.random,
@@ -10143,13 +10179,13 @@ function Ll() {
10143
10179
  );
10144
10180
  }
10145
10181
  var i = e.bind(null, !1);
10146
- return i.assign = e.bind(null, !0), gr = i, gr;
10182
+ return i.assign = e.bind(null, !0), pr = i, pr;
10147
10183
  }
10148
- var pr, ri;
10149
- function Gl() {
10150
- if (ri) return pr;
10184
+ var vr, ri;
10185
+ function Ol() {
10186
+ if (ri) return vr;
10151
10187
  ri = 1;
10152
- var n = Vt(), r = Ze(), t = Math.PI / 180, e = {
10188
+ var n = qt(), r = Ze(), t = Math.PI / 180, e = {
10153
10189
  dimensions: ["x", "y"],
10154
10190
  centeredOnZero: !1,
10155
10191
  degrees: !1
@@ -10195,44 +10231,44 @@ function Gl() {
10195
10231
  );
10196
10232
  }
10197
10233
  var a = i.bind(null, !1);
10198
- return a.assign = i.bind(null, !0), pr = a, pr;
10234
+ return a.assign = i.bind(null, !0), vr = a, vr;
10199
10235
  }
10200
10236
  var ni;
10201
- function Pl() {
10202
- return ni || (ni = 1, et.circlepack = xl(), et.circular = Dl(), et.random = Ll(), et.rotation = Gl()), et;
10237
+ function zl() {
10238
+ return ni || (ni = 1, et.circlepack = Il(), et.circular = Pl(), et.random = Fl(), et.rotation = Ol()), et;
10203
10239
  }
10204
- var vr = Pl(), mr, ii;
10205
- function Il() {
10206
- return ii || (ii = 1, mr = function() {
10240
+ var mr = zl(), yr, ii;
10241
+ function Nl() {
10242
+ return ii || (ii = 1, yr = function() {
10207
10243
  var r, t, e = {};
10208
10244
  (function() {
10209
- var a = 0, o = 1, s = 2, u = 3, l = 4, c = 5, h = 6, v = 7, y = 8, b = 9, R = 0, w = 1, k = 2, E = 0, m = 1, p = 2, C = 3, L = 4, g = 5, x = 6, S = 7, D = 8, O = 3, I = 10, _ = 3, W = 9, K = 10;
10245
+ var a = 0, o = 1, s = 2, u = 3, l = 4, c = 5, h = 6, v = 7, y = 8, b = 9, R = 0, w = 1, k = 2, E = 0, m = 1, p = 2, C = 3, L = 4, g = 5, x = 6, S = 7, D = 8, O = 3, P = 10, _ = 3, W = 9, K = 10;
10210
10246
  e.exports = function(f, d, U) {
10211
- var $, P, A, z, Z, te, oe, ne, V, se, ee = d.length, re = U.length, J = f.adjustSizes, le = f.barnesHutTheta * f.barnesHutTheta, q, B, G, ie, de, Y, X, F = [];
10212
- for (A = 0; A < ee; A += I)
10247
+ var $, I, A, z, Z, te, oe, ne, V, se, ee = d.length, re = U.length, J = f.adjustSizes, le = f.barnesHutTheta * f.barnesHutTheta, q, B, G, ie, de, Y, X, F = [];
10248
+ for (A = 0; A < ee; A += P)
10213
10249
  d[A + l] = d[A + s], d[A + c] = d[A + u], d[A + s] = 0, d[A + u] = 0;
10214
10250
  if (f.outboundAttractionDistribution) {
10215
- for (q = 0, A = 0; A < ee; A += I)
10251
+ for (q = 0, A = 0; A < ee; A += P)
10216
10252
  q += d[A + h];
10217
- q /= ee / I;
10253
+ q /= ee / P;
10218
10254
  }
10219
10255
  if (f.barnesHutOptimize) {
10220
10256
  var ve = 1 / 0, Le = -1 / 0, ye = 1 / 0, Re = -1 / 0, ce, be, Ue;
10221
- for (A = 0; A < ee; A += I)
10257
+ for (A = 0; A < ee; A += P)
10222
10258
  ve = Math.min(ve, d[A + a]), Le = Math.max(Le, d[A + a]), ye = Math.min(ye, d[A + o]), Re = Math.max(Re, d[A + o]);
10223
10259
  var we = Le - ve, Ge = Re - ye;
10224
- for (we > Ge ? (ye -= (we - Ge) / 2, Re = ye + we) : (ve -= (Ge - we) / 2, Le = ve + Ge), F[0 + E] = -1, F[0 + m] = (ve + Le) / 2, F[0 + p] = (ye + Re) / 2, F[0 + C] = Math.max(Le - ve, Re - ye), F[0 + L] = -1, F[0 + g] = -1, F[0 + x] = 0, F[0 + S] = 0, F[0 + D] = 0, $ = 1, A = 0; A < ee; A += I)
10225
- for (P = 0, Ue = O; ; )
10226
- if (F[P + g] >= 0) {
10227
- d[A + a] < F[P + m] ? d[A + o] < F[P + p] ? ce = F[P + g] : ce = F[P + g] + W : d[A + o] < F[P + p] ? ce = F[P + g] + W * 2 : ce = F[P + g] + W * 3, F[P + S] = (F[P + S] * F[P + x] + d[A + a] * d[A + h]) / (F[P + x] + d[A + h]), F[P + D] = (F[P + D] * F[P + x] + d[A + o] * d[A + h]) / (F[P + x] + d[A + h]), F[P + x] += d[A + h], P = ce;
10260
+ for (we > Ge ? (ye -= (we - Ge) / 2, Re = ye + we) : (ve -= (Ge - we) / 2, Le = ve + Ge), F[0 + E] = -1, F[0 + m] = (ve + Le) / 2, F[0 + p] = (ye + Re) / 2, F[0 + C] = Math.max(Le - ve, Re - ye), F[0 + L] = -1, F[0 + g] = -1, F[0 + x] = 0, F[0 + S] = 0, F[0 + D] = 0, $ = 1, A = 0; A < ee; A += P)
10261
+ for (I = 0, Ue = O; ; )
10262
+ if (F[I + g] >= 0) {
10263
+ d[A + a] < F[I + m] ? d[A + o] < F[I + p] ? ce = F[I + g] : ce = F[I + g] + W : d[A + o] < F[I + p] ? ce = F[I + g] + W * 2 : ce = F[I + g] + W * 3, F[I + S] = (F[I + S] * F[I + x] + d[A + a] * d[A + h]) / (F[I + x] + d[A + h]), F[I + D] = (F[I + D] * F[I + x] + d[A + o] * d[A + h]) / (F[I + x] + d[A + h]), F[I + x] += d[A + h], I = ce;
10228
10264
  continue;
10229
- } else if (F[P + E] < 0) {
10230
- F[P + E] = A;
10265
+ } else if (F[I + E] < 0) {
10266
+ F[I + E] = A;
10231
10267
  break;
10232
10268
  } else {
10233
- if (F[P + g] = $ * W, ne = F[P + C] / 2, V = F[P + g], F[V + E] = -1, F[V + m] = F[P + m] - ne, F[V + p] = F[P + p] - ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[P + m] - ne, F[V + p] = F[P + p] + ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[P + m] + ne, F[V + p] = F[P + p] - ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[P + m] + ne, F[V + p] = F[P + p] + ne, F[V + C] = ne, F[V + L] = F[P + L], F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, $ += 4, d[F[P + E] + a] < F[P + m] ? d[F[P + E] + o] < F[P + p] ? ce = F[P + g] : ce = F[P + g] + W : d[F[P + E] + o] < F[P + p] ? ce = F[P + g] + W * 2 : ce = F[P + g] + W * 3, F[P + x] = d[F[P + E] + h], F[P + S] = d[F[P + E] + a], F[P + D] = d[F[P + E] + o], F[ce + E] = F[P + E], F[P + E] = -1, d[A + a] < F[P + m] ? d[A + o] < F[P + p] ? be = F[P + g] : be = F[P + g] + W : d[A + o] < F[P + p] ? be = F[P + g] + W * 2 : be = F[P + g] + W * 3, ce === be)
10269
+ if (F[I + g] = $ * W, ne = F[I + C] / 2, V = F[I + g], F[V + E] = -1, F[V + m] = F[I + m] - ne, F[V + p] = F[I + p] - ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[I + m] - ne, F[V + p] = F[I + p] + ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[I + m] + ne, F[V + p] = F[I + p] - ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[I + m] + ne, F[V + p] = F[I + p] + ne, F[V + C] = ne, F[V + L] = F[I + L], F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, $ += 4, d[F[I + E] + a] < F[I + m] ? d[F[I + E] + o] < F[I + p] ? ce = F[I + g] : ce = F[I + g] + W : d[F[I + E] + o] < F[I + p] ? ce = F[I + g] + W * 2 : ce = F[I + g] + W * 3, F[I + x] = d[F[I + E] + h], F[I + S] = d[F[I + E] + a], F[I + D] = d[F[I + E] + o], F[ce + E] = F[I + E], F[I + E] = -1, d[A + a] < F[I + m] ? d[A + o] < F[I + p] ? be = F[I + g] : be = F[I + g] + W : d[A + o] < F[I + p] ? be = F[I + g] + W * 2 : be = F[I + g] + W * 3, ce === be)
10234
10270
  if (Ue--) {
10235
- P = ce;
10271
+ I = ce;
10236
10272
  continue;
10237
10273
  } else {
10238
10274
  Ue = O;
@@ -10243,46 +10279,46 @@ function Il() {
10243
10279
  }
10244
10280
  }
10245
10281
  if (f.barnesHutOptimize)
10246
- for (B = f.scalingRatio, A = 0; A < ee; A += I)
10247
- for (P = 0; ; )
10248
- if (F[P + g] >= 0)
10282
+ for (B = f.scalingRatio, A = 0; A < ee; A += P)
10283
+ for (I = 0; ; )
10284
+ if (F[I + g] >= 0)
10249
10285
  if (Y = Math.pow(
10250
- d[A + a] - F[P + S],
10286
+ d[A + a] - F[I + S],
10251
10287
  2
10252
10288
  ) + Math.pow(
10253
- d[A + o] - F[P + D],
10289
+ d[A + o] - F[I + D],
10254
10290
  2
10255
- ), se = F[P + C], 4 * se * se / Y < le) {
10256
- if (G = d[A + a] - F[P + S], ie = d[A + o] - F[P + D], J === !0 ? Y > 0 ? (X = B * d[A + h] * F[P + x] / Y, d[A + s] += G * X, d[A + u] += ie * X) : Y < 0 && (X = -B * d[A + h] * F[P + x] / Math.sqrt(Y), d[A + s] += G * X, d[A + u] += ie * X) : Y > 0 && (X = B * d[A + h] * F[P + x] / Y, d[A + s] += G * X, d[A + u] += ie * X), P = F[P + L], P < 0) break;
10291
+ ), se = F[I + C], 4 * se * se / Y < le) {
10292
+ if (G = d[A + a] - F[I + S], ie = d[A + o] - F[I + D], J === !0 ? Y > 0 ? (X = B * d[A + h] * F[I + x] / Y, d[A + s] += G * X, d[A + u] += ie * X) : Y < 0 && (X = -B * d[A + h] * F[I + x] / Math.sqrt(Y), d[A + s] += G * X, d[A + u] += ie * X) : Y > 0 && (X = B * d[A + h] * F[I + x] / Y, d[A + s] += G * X, d[A + u] += ie * X), I = F[I + L], I < 0) break;
10257
10293
  continue;
10258
10294
  } else {
10259
- P = F[P + g];
10295
+ I = F[I + g];
10260
10296
  continue;
10261
10297
  }
10262
10298
  else {
10263
- if (te = F[P + E], te >= 0 && te !== A && (G = d[A + a] - d[te + a], ie = d[A + o] - d[te + o], Y = G * G + ie * ie, J === !0 ? Y > 0 ? (X = B * d[A + h] * d[te + h] / Y, d[A + s] += G * X, d[A + u] += ie * X) : Y < 0 && (X = -B * d[A + h] * d[te + h] / Math.sqrt(Y), d[A + s] += G * X, d[A + u] += ie * X) : Y > 0 && (X = B * d[A + h] * d[te + h] / Y, d[A + s] += G * X, d[A + u] += ie * X)), P = F[P + L], P < 0) break;
10299
+ if (te = F[I + E], te >= 0 && te !== A && (G = d[A + a] - d[te + a], ie = d[A + o] - d[te + o], Y = G * G + ie * ie, J === !0 ? Y > 0 ? (X = B * d[A + h] * d[te + h] / Y, d[A + s] += G * X, d[A + u] += ie * X) : Y < 0 && (X = -B * d[A + h] * d[te + h] / Math.sqrt(Y), d[A + s] += G * X, d[A + u] += ie * X) : Y > 0 && (X = B * d[A + h] * d[te + h] / Y, d[A + s] += G * X, d[A + u] += ie * X)), I = F[I + L], I < 0) break;
10264
10300
  continue;
10265
10301
  }
10266
10302
  else
10267
- for (B = f.scalingRatio, z = 0; z < ee; z += I)
10268
- for (Z = 0; Z < z; Z += I)
10303
+ for (B = f.scalingRatio, z = 0; z < ee; z += P)
10304
+ for (Z = 0; Z < z; Z += P)
10269
10305
  G = d[z + a] - d[Z + a], ie = d[z + o] - d[Z + o], J === !0 ? (Y = Math.sqrt(G * G + ie * ie) - d[z + y] - d[Z + y], Y > 0 ? (X = B * d[z + h] * d[Z + h] / Y / Y, d[z + s] += G * X, d[z + u] += ie * X, d[Z + s] -= G * X, d[Z + u] -= ie * X) : Y < 0 && (X = 100 * B * d[z + h] * d[Z + h], d[z + s] += G * X, d[z + u] += ie * X, d[Z + s] -= G * X, d[Z + u] -= ie * X)) : (Y = Math.sqrt(G * G + ie * ie), Y > 0 && (X = B * d[z + h] * d[Z + h] / Y / Y, d[z + s] += G * X, d[z + u] += ie * X, d[Z + s] -= G * X, d[Z + u] -= ie * X));
10270
- for (V = f.gravity / f.scalingRatio, B = f.scalingRatio, A = 0; A < ee; A += I)
10306
+ for (V = f.gravity / f.scalingRatio, B = f.scalingRatio, A = 0; A < ee; A += P)
10271
10307
  X = 0, G = d[A + a], ie = d[A + o], Y = Math.sqrt(Math.pow(G, 2) + Math.pow(ie, 2)), f.strongGravityMode ? Y > 0 && (X = B * d[A + h] * V) : Y > 0 && (X = B * d[A + h] * V / Y), d[A + s] -= G * X, d[A + u] -= ie * X;
10272
10308
  for (B = 1 * (f.outboundAttractionDistribution ? q : 1), oe = 0; oe < re; oe += _)
10273
10309
  z = U[oe + R], Z = U[oe + w], ne = U[oe + k], de = Math.pow(ne, f.edgeWeightInfluence), G = d[z + a] - d[Z + a], ie = d[z + o] - d[Z + o], J === !0 ? (Y = Math.sqrt(G * G + ie * ie) - d[z + y] - d[Z + y], f.linLogMode ? f.outboundAttractionDistribution ? Y > 0 && (X = -B * de * Math.log(1 + Y) / Y / d[z + h]) : Y > 0 && (X = -B * de * Math.log(1 + Y) / Y) : f.outboundAttractionDistribution ? Y > 0 && (X = -B * de / d[z + h]) : Y > 0 && (X = -B * de)) : (Y = Math.sqrt(Math.pow(G, 2) + Math.pow(ie, 2)), f.linLogMode ? f.outboundAttractionDistribution ? Y > 0 && (X = -B * de * Math.log(1 + Y) / Y / d[z + h]) : Y > 0 && (X = -B * de * Math.log(1 + Y) / Y) : f.outboundAttractionDistribution ? (Y = 1, X = -B * de / d[z + h]) : (Y = 1, X = -B * de)), Y > 0 && (d[z + s] += G * X, d[z + u] += ie * X, d[Z + s] -= G * X, d[Z + u] -= ie * X);
10274
- var Pe, ct, kt, Ve, Ct, xt;
10310
+ var Ie, ct, kt, Ve, Ct, xt;
10275
10311
  if (J === !0)
10276
- for (A = 0; A < ee; A += I)
10277
- d[A + b] !== 1 && (Pe = Math.sqrt(
10312
+ for (A = 0; A < ee; A += P)
10313
+ d[A + b] !== 1 && (Ie = Math.sqrt(
10278
10314
  Math.pow(d[A + s], 2) + Math.pow(d[A + u], 2)
10279
- ), Pe > K && (d[A + s] = d[A + s] * K / Pe, d[A + u] = d[A + u] * K / Pe), ct = d[A + h] * Math.sqrt(
10315
+ ), Ie > K && (d[A + s] = d[A + s] * K / Ie, d[A + u] = d[A + u] * K / Ie), ct = d[A + h] * Math.sqrt(
10280
10316
  (d[A + l] - d[A + s]) * (d[A + l] - d[A + s]) + (d[A + c] - d[A + u]) * (d[A + c] - d[A + u])
10281
10317
  ), kt = Math.sqrt(
10282
10318
  (d[A + l] + d[A + s]) * (d[A + l] + d[A + s]) + (d[A + c] + d[A + u]) * (d[A + c] + d[A + u])
10283
10319
  ) / 2, Ve = 0.1 * Math.log(1 + kt) / (1 + Math.sqrt(ct)), Ct = d[A + a] + d[A + s] * (Ve / f.slowDown), d[A + a] = Ct, xt = d[A + o] + d[A + u] * (Ve / f.slowDown), d[A + o] = xt);
10284
10320
  else
10285
- for (A = 0; A < ee; A += I)
10321
+ for (A = 0; A < ee; A += P)
10286
10322
  d[A + b] !== 1 && (ct = d[A + h] * Math.sqrt(
10287
10323
  (d[A + l] - d[A + s]) * (d[A + l] - d[A + s]) + (d[A + c] - d[A + u]) * (d[A + c] - d[A + u])
10288
10324
  ), kt = Math.sqrt(
@@ -10306,7 +10342,7 @@ function Il() {
10306
10342
  [r.buffer]
10307
10343
  );
10308
10344
  });
10309
- }), mr;
10345
+ }), yr;
10310
10346
  }
10311
10347
  var yt = {}, ai;
10312
10348
  function ha() {
@@ -10384,25 +10420,25 @@ function ha() {
10384
10420
  return t(e, n);
10385
10421
  }, yt;
10386
10422
  }
10387
- var Ie = {}, oi;
10423
+ var Pe = {}, oi;
10388
10424
  function da() {
10389
- if (oi) return Ie;
10425
+ if (oi) return Pe;
10390
10426
  oi = 1;
10391
10427
  var n = 10, r = 3;
10392
- return Ie.assign = function(t) {
10428
+ return Pe.assign = function(t) {
10393
10429
  t = t || {};
10394
10430
  var e = Array.prototype.slice.call(arguments).slice(1), i, a, o;
10395
10431
  for (i = 0, o = e.length; i < o; i++)
10396
10432
  if (e[i])
10397
10433
  for (a in e[i]) t[a] = e[i][a];
10398
10434
  return t;
10399
- }, Ie.validateSettings = function(t) {
10435
+ }, Pe.validateSettings = function(t) {
10400
10436
  return "linLogMode" in t && typeof t.linLogMode != "boolean" ? { message: "the `linLogMode` setting should be a boolean." } : "outboundAttractionDistribution" in t && typeof t.outboundAttractionDistribution != "boolean" ? {
10401
10437
  message: "the `outboundAttractionDistribution` setting should be a boolean."
10402
10438
  } : "adjustSizes" in t && typeof t.adjustSizes != "boolean" ? { message: "the `adjustSizes` setting should be a boolean." } : "edgeWeightInfluence" in t && typeof t.edgeWeightInfluence != "number" ? {
10403
10439
  message: "the `edgeWeightInfluence` setting should be a number."
10404
10440
  } : "scalingRatio" in t && !(typeof t.scalingRatio == "number" && t.scalingRatio >= 0) ? { message: "the `scalingRatio` setting should be a number >= 0." } : "strongGravityMode" in t && typeof t.strongGravityMode != "boolean" ? { message: "the `strongGravityMode` setting should be a boolean." } : "gravity" in t && !(typeof t.gravity == "number" && t.gravity >= 0) ? { message: "the `gravity` setting should be a number >= 0." } : "slowDown" in t && !(typeof t.slowDown == "number" || t.slowDown >= 0) ? { message: "the `slowDown` setting should be a number >= 0." } : "barnesHutOptimize" in t && typeof t.barnesHutOptimize != "boolean" ? { message: "the `barnesHutOptimize` setting should be a boolean." } : "barnesHutTheta" in t && !(typeof t.barnesHutTheta == "number" && t.barnesHutTheta >= 0) ? { message: "the `barnesHutTheta` setting should be a number >= 0." } : null;
10405
- }, Ie.graphToByteArrays = function(t, e) {
10441
+ }, Pe.graphToByteArrays = function(t, e) {
10406
10442
  var i = t.order, a = t.size, o = {}, s, u = new Float32Array(i * n), l = new Float32Array(a * r);
10407
10443
  return s = 0, t.forEachNode(function(c, h) {
10408
10444
  o[c] = s, u[s] = h.x, u[s + 1] = h.y, u[s + 2] = 0, u[s + 3] = 0, u[s + 4] = 0, u[s + 5] = 0, u[s + 6] = 1, u[s + 7] = 1, u[s + 8] = h.size || 1, u[s + 9] = h.fixed ? 1 : 0, s += n;
@@ -10413,17 +10449,17 @@ function da() {
10413
10449
  nodes: u,
10414
10450
  edges: l
10415
10451
  };
10416
- }, Ie.assignLayoutChanges = function(t, e, i) {
10452
+ }, Pe.assignLayoutChanges = function(t, e, i) {
10417
10453
  var a = 0;
10418
10454
  t.updateEachNodeAttributes(function(o, s) {
10419
10455
  return s.x = e[a], s.y = e[a + 1], a += n, i ? i(o, s) : s;
10420
10456
  });
10421
- }, Ie.readGraphPositions = function(t, e) {
10457
+ }, Pe.readGraphPositions = function(t, e) {
10422
10458
  var i = 0;
10423
10459
  t.forEachNode(function(a, o) {
10424
10460
  e[i] = o.x, e[i + 1] = o.y, i += n;
10425
10461
  });
10426
- }, Ie.collectLayoutChanges = function(t, e, i) {
10462
+ }, Pe.collectLayoutChanges = function(t, e, i) {
10427
10463
  for (var a = t.nodes(), o = {}, s = 0, u = 0, l = e.length; s < l; s += n) {
10428
10464
  if (i) {
10429
10465
  var c = Object.assign({}, t.getNodeAttributes(a[u]));
@@ -10439,16 +10475,16 @@ function da() {
10439
10475
  u++;
10440
10476
  }
10441
10477
  return o;
10442
- }, Ie.createWorker = function(e) {
10478
+ }, Pe.createWorker = function(e) {
10443
10479
  var i = window.URL || window.webkitURL, a = e.toString(), o = i.createObjectURL(
10444
10480
  new Blob(["(" + a + ").call(this);"], { type: "text/javascript" })
10445
10481
  ), s = new Worker(o);
10446
10482
  return i.revokeObjectURL(o), s;
10447
- }, Ie;
10483
+ }, Pe;
10448
10484
  }
10449
- var yr, si;
10485
+ var br, si;
10450
10486
  function fa() {
10451
- return si || (si = 1, yr = {
10487
+ return si || (si = 1, br = {
10452
10488
  linLogMode: !1,
10453
10489
  outboundAttractionDistribution: !1,
10454
10490
  adjustSizes: !1,
@@ -10459,13 +10495,13 @@ function fa() {
10459
10495
  slowDown: 1,
10460
10496
  barnesHutOptimize: !1,
10461
10497
  barnesHutTheta: 0.5
10462
- }), yr;
10498
+ }), br;
10463
10499
  }
10464
- var br, ui;
10465
- function Fl() {
10466
- if (ui) return br;
10500
+ var wr, ui;
10501
+ function Ul() {
10502
+ if (ui) return wr;
10467
10503
  ui = 1;
10468
- var n = Il(), r = Ze(), t = ha().createEdgeWeightGetter, e = da(), i = fa();
10504
+ var n = Nl(), r = Ze(), t = ha().createEdgeWeightGetter, e = da(), i = fa();
10469
10505
  function a(o, s) {
10470
10506
  if (s = s || {}, !r(o))
10471
10507
  throw new Error(
@@ -10512,25 +10548,25 @@ function Fl() {
10512
10548
  }, a.prototype.kill = function() {
10513
10549
  if (this.killed) return this;
10514
10550
  this.running = !1, this.killed = !0, this.matrices = null, this.worker.terminate(), this.graph.removeListener("nodeAdded", this.handleGraphUpdate), this.graph.removeListener("edgeAdded", this.handleGraphUpdate), this.graph.removeListener("nodeDropped", this.handleGraphUpdate), this.graph.removeListener("edgeDropped", this.handleGraphUpdate);
10515
- }, br = a, br;
10551
+ }, wr = a, wr;
10516
10552
  }
10517
- var Ol = Fl();
10518
- const zl = /* @__PURE__ */ Br(Ol);
10519
- var wr, li;
10520
- function Nl() {
10521
- if (li) return wr;
10553
+ var $l = Ul();
10554
+ const Ml = /* @__PURE__ */ Wr($l);
10555
+ var Er, li;
10556
+ function Bl() {
10557
+ if (li) return Er;
10522
10558
  li = 1;
10523
10559
  var n = 0, r = 1, t = 2, e = 3, i = 4, a = 5, o = 6, s = 7, u = 8, l = 9, c = 0, h = 1, v = 2, y = 0, b = 1, R = 2, w = 3, k = 4, E = 5, m = 6, p = 7, C = 8, L = 3, g = 10, x = 3, S = 9, D = 10;
10524
- return wr = function(I, _, W) {
10525
- var K, T, f, d, U, $, P, A, z, Z, te = _.length, oe = W.length, ne = I.adjustSizes, V = I.barnesHutTheta * I.barnesHutTheta, se, ee, re, J, le, q, B, G = [];
10560
+ return Er = function(P, _, W) {
10561
+ var K, T, f, d, U, $, I, A, z, Z, te = _.length, oe = W.length, ne = P.adjustSizes, V = P.barnesHutTheta * P.barnesHutTheta, se, ee, re, J, le, q, B, G = [];
10526
10562
  for (f = 0; f < te; f += g)
10527
10563
  _[f + i] = _[f + t], _[f + a] = _[f + e], _[f + t] = 0, _[f + e] = 0;
10528
- if (I.outboundAttractionDistribution) {
10564
+ if (P.outboundAttractionDistribution) {
10529
10565
  for (se = 0, f = 0; f < te; f += g)
10530
10566
  se += _[f + o];
10531
10567
  se /= te / g;
10532
10568
  }
10533
- if (I.barnesHutOptimize) {
10569
+ if (P.barnesHutOptimize) {
10534
10570
  var ie = 1 / 0, de = -1 / 0, Y = 1 / 0, X = -1 / 0, F, ve, Le;
10535
10571
  for (f = 0; f < te; f += g)
10536
10572
  ie = Math.min(ie, _[f + n]), de = Math.max(de, _[f + n]), Y = Math.min(Y, _[f + r]), X = Math.max(X, _[f + r]);
@@ -10556,8 +10592,8 @@ function Nl() {
10556
10592
  break;
10557
10593
  }
10558
10594
  }
10559
- if (I.barnesHutOptimize)
10560
- for (ee = I.scalingRatio, f = 0; f < te; f += g)
10595
+ if (P.barnesHutOptimize)
10596
+ for (ee = P.scalingRatio, f = 0; f < te; f += g)
10561
10597
  for (T = 0; ; )
10562
10598
  if (G[T + E] >= 0)
10563
10599
  if (q = Math.pow(
@@ -10578,14 +10614,14 @@ function Nl() {
10578
10614
  continue;
10579
10615
  }
10580
10616
  else
10581
- for (ee = I.scalingRatio, d = 0; d < te; d += g)
10617
+ for (ee = P.scalingRatio, d = 0; d < te; d += g)
10582
10618
  for (U = 0; U < d; U += g)
10583
10619
  re = _[d + n] - _[U + n], J = _[d + r] - _[U + r], ne === !0 ? (q = Math.sqrt(re * re + J * J) - _[d + u] - _[U + u], q > 0 ? (B = ee * _[d + o] * _[U + o] / q / q, _[d + t] += re * B, _[d + e] += J * B, _[U + t] -= re * B, _[U + e] -= J * B) : q < 0 && (B = 100 * ee * _[d + o] * _[U + o], _[d + t] += re * B, _[d + e] += J * B, _[U + t] -= re * B, _[U + e] -= J * B)) : (q = Math.sqrt(re * re + J * J), q > 0 && (B = ee * _[d + o] * _[U + o] / q / q, _[d + t] += re * B, _[d + e] += J * B, _[U + t] -= re * B, _[U + e] -= J * B));
10584
- for (z = I.gravity / I.scalingRatio, ee = I.scalingRatio, f = 0; f < te; f += g)
10585
- B = 0, re = _[f + n], J = _[f + r], q = Math.sqrt(Math.pow(re, 2) + Math.pow(J, 2)), I.strongGravityMode ? q > 0 && (B = ee * _[f + o] * z) : q > 0 && (B = ee * _[f + o] * z / q), _[f + t] -= re * B, _[f + e] -= J * B;
10586
- for (ee = 1 * (I.outboundAttractionDistribution ? se : 1), P = 0; P < oe; P += x)
10587
- d = W[P + c], U = W[P + h], A = W[P + v], le = Math.pow(A, I.edgeWeightInfluence), re = _[d + n] - _[U + n], J = _[d + r] - _[U + r], ne === !0 ? (q = Math.sqrt(re * re + J * J) - _[d + u] - _[U + u], I.linLogMode ? I.outboundAttractionDistribution ? q > 0 && (B = -ee * le * Math.log(1 + q) / q / _[d + o]) : q > 0 && (B = -ee * le * Math.log(1 + q) / q) : I.outboundAttractionDistribution ? q > 0 && (B = -ee * le / _[d + o]) : q > 0 && (B = -ee * le)) : (q = Math.sqrt(Math.pow(re, 2) + Math.pow(J, 2)), I.linLogMode ? I.outboundAttractionDistribution ? q > 0 && (B = -ee * le * Math.log(1 + q) / q / _[d + o]) : q > 0 && (B = -ee * le * Math.log(1 + q) / q) : I.outboundAttractionDistribution ? (q = 1, B = -ee * le / _[d + o]) : (q = 1, B = -ee * le)), q > 0 && (_[d + t] += re * B, _[d + e] += J * B, _[U + t] -= re * B, _[U + e] -= J * B);
10588
- var ce, be, Ue, we, Ge, Pe;
10620
+ for (z = P.gravity / P.scalingRatio, ee = P.scalingRatio, f = 0; f < te; f += g)
10621
+ B = 0, re = _[f + n], J = _[f + r], q = Math.sqrt(Math.pow(re, 2) + Math.pow(J, 2)), P.strongGravityMode ? q > 0 && (B = ee * _[f + o] * z) : q > 0 && (B = ee * _[f + o] * z / q), _[f + t] -= re * B, _[f + e] -= J * B;
10622
+ for (ee = 1 * (P.outboundAttractionDistribution ? se : 1), I = 0; I < oe; I += x)
10623
+ d = W[I + c], U = W[I + h], A = W[I + v], le = Math.pow(A, P.edgeWeightInfluence), re = _[d + n] - _[U + n], J = _[d + r] - _[U + r], ne === !0 ? (q = Math.sqrt(re * re + J * J) - _[d + u] - _[U + u], P.linLogMode ? P.outboundAttractionDistribution ? q > 0 && (B = -ee * le * Math.log(1 + q) / q / _[d + o]) : q > 0 && (B = -ee * le * Math.log(1 + q) / q) : P.outboundAttractionDistribution ? q > 0 && (B = -ee * le / _[d + o]) : q > 0 && (B = -ee * le)) : (q = Math.sqrt(Math.pow(re, 2) + Math.pow(J, 2)), P.linLogMode ? P.outboundAttractionDistribution ? q > 0 && (B = -ee * le * Math.log(1 + q) / q / _[d + o]) : q > 0 && (B = -ee * le * Math.log(1 + q) / q) : P.outboundAttractionDistribution ? (q = 1, B = -ee * le / _[d + o]) : (q = 1, B = -ee * le)), q > 0 && (_[d + t] += re * B, _[d + e] += J * B, _[U + t] -= re * B, _[U + e] -= J * B);
10624
+ var ce, be, Ue, we, Ge, Ie;
10589
10625
  if (ne === !0)
10590
10626
  for (f = 0; f < te; f += g)
10591
10627
  _[f + l] !== 1 && (ce = Math.sqrt(
@@ -10594,7 +10630,7 @@ function Nl() {
10594
10630
  (_[f + i] - _[f + t]) * (_[f + i] - _[f + t]) + (_[f + a] - _[f + e]) * (_[f + a] - _[f + e])
10595
10631
  ), Ue = Math.sqrt(
10596
10632
  (_[f + i] + _[f + t]) * (_[f + i] + _[f + t]) + (_[f + a] + _[f + e]) * (_[f + a] + _[f + e])
10597
- ) / 2, we = 0.1 * Math.log(1 + Ue) / (1 + Math.sqrt(be)), Ge = _[f + n] + _[f + t] * (we / I.slowDown), _[f + n] = Ge, Pe = _[f + r] + _[f + e] * (we / I.slowDown), _[f + r] = Pe);
10633
+ ) / 2, we = 0.1 * Math.log(1 + Ue) / (1 + Math.sqrt(be)), Ge = _[f + n] + _[f + t] * (we / P.slowDown), _[f + n] = Ge, Ie = _[f + r] + _[f + e] * (we / P.slowDown), _[f + r] = Ie);
10598
10634
  else
10599
10635
  for (f = 0; f < te; f += g)
10600
10636
  _[f + l] !== 1 && (be = _[f + o] * Math.sqrt(
@@ -10606,15 +10642,15 @@ function Nl() {
10606
10642
  Math.sqrt(
10607
10643
  we * (Math.pow(_[f + t], 2) + Math.pow(_[f + e], 2)) / (1 + Math.sqrt(be))
10608
10644
  )
10609
- ), Ge = _[f + n] + _[f + t] * (we / I.slowDown), _[f + n] = Ge, Pe = _[f + r] + _[f + e] * (we / I.slowDown), _[f + r] = Pe);
10645
+ ), Ge = _[f + n] + _[f + t] * (we / P.slowDown), _[f + n] = Ge, Ie = _[f + r] + _[f + e] * (we / P.slowDown), _[f + r] = Ie);
10610
10646
  return {};
10611
- }, wr;
10647
+ }, Er;
10612
10648
  }
10613
- var Er, ci;
10614
- function Ul() {
10615
- if (ci) return Er;
10649
+ var _r, ci;
10650
+ function Wl() {
10651
+ if (ci) return _r;
10616
10652
  ci = 1;
10617
- var n = Ze(), r = ha().createEdgeWeightGetter, t = Nl(), e = da(), i = fa();
10653
+ var n = Ze(), r = ha().createEdgeWeightGetter, t = Bl(), e = da(), i = fa();
10618
10654
  function a(u, l, c) {
10619
10655
  if (!n(l))
10620
10656
  throw new Error(
@@ -10657,11 +10693,11 @@ function Ul() {
10657
10693
  };
10658
10694
  }
10659
10695
  var s = a.bind(null, !1);
10660
- return s.assign = a.bind(null, !0), s.inferSettings = o, Er = s, Er;
10696
+ return s.assign = a.bind(null, !0), s.inferSettings = o, _r = s, _r;
10661
10697
  }
10662
- var $l = Ul();
10663
- const Ml = /* @__PURE__ */ Br($l), bt = 64, hi = /* @__PURE__ */ new Map();
10664
- function Bl(n) {
10698
+ var Hl = Wl();
10699
+ const jl = /* @__PURE__ */ Wr(Hl), bt = 64, hi = /* @__PURE__ */ new Map();
10700
+ function Vl(n) {
10665
10701
  const r = document.createElement("canvas");
10666
10702
  r.width = bt, r.height = bt;
10667
10703
  const t = r.getContext("2d");
@@ -10669,39 +10705,39 @@ function Bl(n) {
10669
10705
  const e = [...n].length, i = Math.floor(bt * (e <= 2 ? 0.78 : e <= 4 ? 0.4 : 0.22));
10670
10706
  return t.font = `${i}px "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif`, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = "#cdd6e4", t.fillText(n, bt / 2, bt / 2 + 2), r.toDataURL("image/png");
10671
10707
  }
10672
- function Wl(n) {
10708
+ function ql(n) {
10673
10709
  if (n.kind === "url") return n.value;
10674
10710
  let r = hi.get(n.value);
10675
- return r === void 0 && (r = Bl(n.value), hi.set(n.value, r)), r;
10711
+ return r === void 0 && (r = Vl(n.value), hi.set(n.value, r)), r;
10676
10712
  }
10677
- const Hl = 9;
10678
- function jl(n) {
10679
- return Math.max(n, Hl);
10713
+ const Kl = 9;
10714
+ function Xl(n) {
10715
+ return Math.max(n, Kl);
10680
10716
  }
10681
10717
  const ga = 4;
10682
- function Vl(n) {
10718
+ function Yl(n) {
10683
10719
  return Math.cbrt(Math.max(n, 0)) * ga;
10684
10720
  }
10685
- function Cc(n, r, t, e) {
10721
+ function Gc(n, r, t, e) {
10686
10722
  if (n <= 0) return 0;
10687
10723
  const i = t * Math.PI / 360, a = e / (2 * Math.tan(i));
10688
10724
  return r / n * a;
10689
10725
  }
10690
- function xc(n) {
10691
- return Math.pow(n / Mr, 3);
10726
+ function Ic(n) {
10727
+ return Math.pow(n / Br, 3);
10692
10728
  }
10693
- const Dc = 2 * ga / Mr, Lc = 50, ql = 60;
10694
- function Kl(n, r, t) {
10729
+ const Pc = 2 * ga / Br, Fc = 50, Zl = 60;
10730
+ function Ql(n, r, t) {
10695
10731
  const e = Math.min(n.width, n.height), i = Number.isFinite(t) ? t : r, a = Math.min(Math.max(i, 0), Math.max(r, pa(e))), o = e - 2 * r, s = e - 2 * a;
10696
10732
  return o > 0 && s > 0 ? o / s : 1;
10697
10733
  }
10698
- function Gc(n, r, t, e, i) {
10734
+ function Oc(n, r, t, e, i) {
10699
10735
  if (!(t > 0) || !(e > 0)) return 0;
10700
10736
  let a = 0;
10701
10737
  for (const l of n) {
10702
10738
  const { x: c = Number.NaN, y: h = Number.NaN, z: v = Number.NaN } = l;
10703
10739
  if (!Number.isFinite(c) || !Number.isFinite(h) || !Number.isFinite(v)) continue;
10704
- const y = Vl(l.val);
10740
+ const y = Yl(l.val);
10705
10741
  a = Math.max(
10706
10742
  a,
10707
10743
  Math.abs(c) + y,
@@ -10718,7 +10754,7 @@ function Gc(n, r, t, e, i) {
10718
10754
  );
10719
10755
  return Number.isFinite(u) ? u : 0;
10720
10756
  }
10721
- function Pc(n, r) {
10757
+ function zc(n, r) {
10722
10758
  const t = Math.hypot(n.x, n.y, n.z);
10723
10759
  if (!(t > 0)) return { x: 0, y: 0, z: r };
10724
10760
  const e = r / t;
@@ -10727,23 +10763,23 @@ function Pc(n, r) {
10727
10763
  function pa(n) {
10728
10764
  return Math.max(n, 0) * 0.4;
10729
10765
  }
10730
- function Ic(n, r) {
10731
- const t = Number.isFinite(n) ? n : ql;
10766
+ function Nc(n, r) {
10767
+ const t = Number.isFinite(n) ? n : Zl;
10732
10768
  return Math.min(Math.max(t, 0), pa(r));
10733
10769
  }
10734
- function Xl(n, r, t) {
10770
+ function Jl(n, r, t) {
10735
10771
  const e = Number.isFinite(n) ? n : r;
10736
10772
  return Math.max(e, t);
10737
10773
  }
10738
- function Yl(n) {
10774
+ function ec(n) {
10739
10775
  return Rt(n);
10740
10776
  }
10741
10777
  function va(n, r) {
10742
10778
  if (n < 0) return -va(-n, r);
10743
- const t = 3.5, e = t * (1 - Math.exp(-r / t)) * rn;
10779
+ const t = 3.5, e = t * (1 - Math.exp(-r / t)) * nn;
10744
10780
  return r === 0 ? 0 : e * n / r;
10745
10781
  }
10746
- function Zl({
10782
+ function tc({
10747
10783
  nodes: n,
10748
10784
  edges: r,
10749
10785
  styles: t,
@@ -10758,7 +10794,7 @@ function Zl({
10758
10794
  }, [a]), Qe(() => {
10759
10795
  const b = s.current;
10760
10796
  if (!b) return;
10761
- const R = h.current, w = new zu(R, b, {
10797
+ const R = h.current, w = new Mu(R, b, {
10762
10798
  allowInvalidContainer: !0,
10763
10799
  // Off by default in Sigma v3 - without it clickEdge never fires, breaking edge
10764
10800
  // selection on the canvas and edge hops in the adjacency preview.
@@ -10777,13 +10813,13 @@ function Zl({
10777
10813
  zIndex: !0,
10778
10814
  nodeProgramClasses: {
10779
10815
  circle: At,
10780
- image: tn()
10816
+ image: rn()
10781
10817
  },
10782
10818
  edgeProgramClasses: {
10783
10819
  line: Zi,
10784
10820
  arrow: Xi,
10785
- curved: Rl,
10786
- curvedArrow: Al
10821
+ curved: xl,
10822
+ curvedArrow: Dl
10787
10823
  }
10788
10824
  });
10789
10825
  u.current = w, w.on("clickNode", ({ node: E }) => v.current({ kind: "node", id: Number(E) })), w.on("clickEdge", ({ edge: E }) => {
@@ -10795,11 +10831,11 @@ function Zl({
10795
10831
  k.disconnect(), l.current?.kill(), l.current = null, w.kill(), u.current = null;
10796
10832
  };
10797
10833
  }, []), Qe(() => {
10798
- const b = h.current, w = Object.keys(n).length + Object.keys(r).length <= ja, k = /* @__PURE__ */ new Set();
10834
+ const b = h.current, w = Object.keys(n).length + Object.keys(r).length <= Xa, k = /* @__PURE__ */ new Set();
10799
10835
  for (const m of Object.values(n)) {
10800
10836
  const p = String(m.id);
10801
10837
  k.add(p);
10802
- const C = t.nodes[m.id], L = C.image ? Wl(C.image) : null, g = {
10838
+ const C = t.nodes[m.id], L = C.image ? ql(C.image) : null, g = {
10803
10839
  label: w && e.showNodeLabels ? m.label ? `${m.label} #${m.id}` : `#${m.id}` : null,
10804
10840
  color: C.color,
10805
10841
  size: C.size,
@@ -10833,7 +10869,7 @@ function Zl({
10833
10869
  }
10834
10870
  for (const m of b.edges())
10835
10871
  E.has(m) || b.dropEdge(m);
10836
- Sl(b), b.forEachEdge((m, p) => {
10872
+ Cl(b), b.forEachEdge((m, p) => {
10837
10873
  const C = p.parallelIndex, L = p.parallelMaxIndex;
10838
10874
  typeof C == "number" ? b.mergeEdgeAttributes(m, {
10839
10875
  type: e.edgeArrows ? "curvedArrow" : "curved",
@@ -10850,16 +10886,16 @@ function Zl({
10850
10886
  const w = u.current;
10851
10887
  if (!w) return;
10852
10888
  w.resize();
10853
- const k = w.getStagePadding(), E = Kl(w.getDimensions(), k, R ?? k);
10889
+ const k = w.getStagePadding(), E = Ql(w.getDimensions(), k, R ?? k);
10854
10890
  w.getCamera().animate(
10855
10891
  { x: 0.5, y: 0.5, ratio: E, angle: 0 },
10856
10892
  // Floor of 1: sigma cannot take a zero duration (fitDurationMs says why).
10857
- { duration: Xl(b, Ql, 1) }
10893
+ { duration: Jl(b, rc, 1) }
10858
10894
  ), w.scheduleRender();
10859
10895
  },
10860
10896
  getCameraRatio: () => u.current?.getCamera().ratio ?? 1,
10861
10897
  setCameraRatio: (b) => {
10862
- Yl(b) && u.current?.getCamera().animate({ ratio: b }, { duration: 1 });
10898
+ ec(b) && u.current?.getCamera().animate({ ratio: b }, { duration: 1 });
10863
10899
  }
10864
10900
  }),
10865
10901
  []
@@ -10877,13 +10913,13 @@ function Zl({
10877
10913
  if (l.current?.stop(), b.order > 0)
10878
10914
  switch (e.layout2d) {
10879
10915
  case "circular":
10880
- vr.circular.assign(b, { scale: 100 });
10916
+ mr.circular.assign(b, { scale: 100 });
10881
10917
  break;
10882
10918
  case "circlepack":
10883
- vr.circlepack.assign(b, { hierarchyAttributes: ["group"] });
10919
+ mr.circlepack.assign(b, { hierarchyAttributes: ["group"] });
10884
10920
  break;
10885
10921
  case "random":
10886
- vr.random.assign(b, { scale: 100 });
10922
+ mr.random.assign(b, { scale: 100 });
10887
10923
  break;
10888
10924
  case "grid": {
10889
10925
  const w = [...b.nodes()].sort((E, m) => Number(E) - Number(m)), k = Math.max(1, Math.ceil(Math.sqrt(w.length)));
@@ -10898,8 +10934,8 @@ function Zl({
10898
10934
  }
10899
10935
  if (b.order === 0) return;
10900
10936
  if (!l.current) {
10901
- const w = Ml.inferSettings(b);
10902
- l.current = new zl(b, { settings: w });
10937
+ const w = jl.inferSettings(b);
10938
+ l.current = new Ml(b, { settings: w });
10903
10939
  }
10904
10940
  l.current.start();
10905
10941
  const R = window.setTimeout(() => l.current?.stop(), 5e3);
@@ -10916,7 +10952,7 @@ function Zl({
10916
10952
  if (!k || !E)
10917
10953
  b.style.display = "none";
10918
10954
  else {
10919
- const { x: m, y: p } = k.framedGraphToViewport({ x: E.x, y: E.y }), C = jl(k.scaleSize(E.size));
10955
+ const { x: m, y: p } = k.framedGraphToViewport({ x: E.x, y: E.y }), C = Xl(k.scaleSize(E.size));
10920
10956
  b.style.display = "block", b.style.left = `${m}px`, b.style.top = `${p}px`, b.style.setProperty("--eclipse-r", `${C}px`);
10921
10957
  }
10922
10958
  R = requestAnimationFrame(w);
@@ -10938,8 +10974,8 @@ function Zl({
10938
10974
  /* @__PURE__ */ We("div", { ref: c, className: "eclipse-highlight", style: { display: "none" }, "aria-hidden": !0 })
10939
10975
  ] });
10940
10976
  }
10941
- const Ql = 600, Jl = ya(() => import("./Canvas3D-CmDAo5BT.js").then((n) => ({ default: n.Canvas3D })));
10942
- function ec({
10977
+ const rc = 600, nc = ya(() => import("./Canvas3D-CafFy8T8.js").then((n) => ({ default: n.Canvas3D })));
10978
+ function ic({
10943
10979
  nodes: n,
10944
10980
  edges: r,
10945
10981
  config: t,
@@ -10949,7 +10985,7 @@ function ec({
10949
10985
  onSelect: o,
10950
10986
  ref: s
10951
10987
  }) {
10952
- const u = a && a.kind === "node" ? a.id : null, l = an(() => {
10988
+ const u = a && a.kind === "node" ? a.id : null, l = on(() => {
10953
10989
  if (e) {
10954
10990
  const h = /* @__PURE__ */ new Set(), v = /* @__PURE__ */ new Set();
10955
10991
  for (const y of e.pathElements)
@@ -10961,9 +10997,9 @@ function ec({
10961
10997
  edgeIds: new Set(i.edgeIds),
10962
10998
  active: !0,
10963
10999
  dim: !1
10964
- } : Va;
10965
- }, [e, i]), c = an(
10966
- () => uo(n, r, l, t),
11000
+ } : Ya;
11001
+ }, [e, i]), c = on(
11002
+ () => fo(n, r, l, t),
10967
11003
  [n, r, l, t]
10968
11004
  );
10969
11005
  return t.renderer === "3d" ? /* @__PURE__ */ We(
@@ -10971,7 +11007,7 @@ function ec({
10971
11007
  {
10972
11008
  fallback: /* @__PURE__ */ We("div", { className: "bg-ink text-fg-faint flex h-full w-full items-center justify-center text-[11px]", children: "loading 3D renderer…" }),
10973
11009
  children: /* @__PURE__ */ We(
10974
- Jl,
11010
+ nc,
10975
11011
  {
10976
11012
  nodes: n,
10977
11013
  edges: r,
@@ -10984,7 +11020,7 @@ function ec({
10984
11020
  )
10985
11021
  }
10986
11022
  ) : /* @__PURE__ */ We(
10987
- Zl,
11023
+ tc,
10988
11024
  {
10989
11025
  nodes: n,
10990
11026
  edges: r,
@@ -10996,10 +11032,10 @@ function ec({
10996
11032
  }
10997
11033
  );
10998
11034
  }
10999
- function Fc({
11035
+ function Uc({
11000
11036
  nodes: n,
11001
11037
  edges: r,
11002
- config: t = Tr,
11038
+ config: t = Sr,
11003
11039
  pathOverlay: e = null,
11004
11040
  highlight: i = null,
11005
11041
  onSelect: a,
@@ -11016,7 +11052,7 @@ function Fc({
11016
11052
  }),
11017
11053
  []
11018
11054
  ), /* @__PURE__ */ We("div", { className: "f8-studio", style: za(o), children: /* @__PURE__ */ We(
11019
- ec,
11055
+ ic,
11020
11056
  {
11021
11057
  nodes: n,
11022
11058
  edges: r,
@@ -11030,70 +11066,73 @@ function Fc({
11030
11066
  ) });
11031
11067
  }
11032
11068
  export {
11033
- Ma as $,
11034
- cc as A,
11035
- lc as B,
11036
- mc as C,
11037
- Tr as D,
11038
- Za as E,
11039
- Fc as F,
11040
- Sr as G,
11041
- Rr as H,
11069
+ Ba as $,
11070
+ gc as A,
11071
+ fc as B,
11072
+ Ec as C,
11073
+ Sr as D,
11074
+ to as E,
11075
+ Uc as F,
11076
+ Rr as G,
11077
+ Ar as H,
11042
11078
  xa as I,
11043
- vc as J,
11044
- wc as K,
11045
- Ya as L,
11046
- _c as M,
11047
- Mr as N,
11048
- Ec as O,
11049
- Ja as P,
11079
+ wc as J,
11080
+ Sc as K,
11081
+ eo as L,
11082
+ Ac as M,
11083
+ Br as N,
11084
+ Rc as O,
11085
+ no as P,
11050
11086
  $a as Q,
11051
- ec as R,
11052
- Dc as S,
11087
+ ic as R,
11088
+ Pc as S,
11053
11089
  ka as T,
11054
- ac as U,
11055
- sc as V,
11056
- nc as W,
11057
- ic as X,
11058
- Ca as Y,
11059
- oc as Z,
11060
- Ba as _,
11061
- Ka as a,
11062
- yc as a0,
11063
- Ac as a1,
11064
- kc as a2,
11065
- Sc as a3,
11066
- Rc as a4,
11067
- fc as a5,
11068
- Tc as a6,
11069
- pc as a7,
11070
- gc as a8,
11071
- Na as a9,
11072
- Ua as aa,
11073
- za as ab,
11074
- Xa as b,
11075
- qa as c,
11076
- Qa as d,
11077
- Gc as e,
11078
- Ic as f,
11079
- Br as g,
11080
- ql as h,
11081
- Lc as i,
11082
- Xl as j,
11083
- Yl as k,
11084
- xc as l,
11085
- Wl as m,
11090
+ Wa as U,
11091
+ lc as V,
11092
+ hc as W,
11093
+ sc as X,
11094
+ uc as Y,
11095
+ Ca as Z,
11096
+ cc as _,
11097
+ Qa as a,
11098
+ Ma as a0,
11099
+ _c as a1,
11100
+ ho as a2,
11101
+ Dc as a3,
11102
+ Lc as a4,
11103
+ Cc as a5,
11104
+ xc as a6,
11105
+ ja as a7,
11106
+ mc as a8,
11107
+ kc as a9,
11108
+ bc as aa,
11109
+ yc as ab,
11110
+ Na as ac,
11111
+ Ua as ad,
11112
+ za as ae,
11113
+ Ja as b,
11114
+ Za as c,
11115
+ ro as d,
11116
+ Oc as e,
11117
+ Nc as f,
11118
+ Wr as g,
11119
+ Zl as h,
11120
+ Fc as i,
11121
+ Jl as j,
11122
+ ec as k,
11123
+ Ic as l,
11124
+ ql as m,
11086
11125
  mi as n,
11087
- Ql as o,
11088
- jl as p,
11089
- Cc as q,
11126
+ rc as o,
11127
+ Xl as p,
11128
+ Gc as q,
11090
11129
  pi as r,
11091
- Pc as s,
11130
+ zc as s,
11092
11131
  Aa as t,
11093
11132
  Oa as u,
11094
- dc as v,
11095
- Vl as w,
11096
- bc as x,
11097
- hc as y,
11098
- uc as z
11133
+ vc as v,
11134
+ Yl as w,
11135
+ Tc as x,
11136
+ pc as y,
11137
+ dc as z
11099
11138
  };