@genome-spy/app 0.85.0 → 0.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +28 -0
  2. package/dist/{agentApi-Cz0hCnVp.js → agentApi-DgopQbMV.js} +5019 -6824
  3. package/dist/agentApi.es.js +2757 -2852
  4. package/dist/agentShared.es.js +15 -14
  5. package/dist/canvas2d-8uxuN_vx.js +619 -0
  6. package/dist/canvas2d-BtQC7Xr8.js +619 -0
  7. package/dist/{arrayUtils-LJpQOu-U.js → clipOptions-BQfNhxgP.js} +625 -561
  8. package/dist/{paramUtils-BYI4rwyL.js → clipOptions-taFzEljc.js} +192 -128
  9. package/dist/{debug-BvCZWumf.js → debug-Bzc3SoRg.js} +8 -8
  10. package/dist/{debug-CgDtmspT.js → debug-D_VtWQ6l.js} +8 -8
  11. package/dist/index.es.js +2992 -2915
  12. package/dist/index.js +2006 -2004
  13. package/dist/indexer-qiFctgR3.js +72 -0
  14. package/dist/indexer-qy_dq5l5.js +72 -0
  15. package/dist/layoutResult-D50MSHXR.js +97 -0
  16. package/dist/{nativeText-m5AUINMq.js → nativeText-DFV5XIx8.js} +247 -193
  17. package/dist/{nativeText-DMO8gLt7.js → nativeText-vT3AWE14.js} +244 -190
  18. package/dist/performanceProfiler-CPLEjApa.js +20 -0
  19. package/dist/rasterExport-B8pVoOsj.js +44 -0
  20. package/dist/rasterExport-C4r4xjQT.js +44 -0
  21. package/dist/rasterImage-B4rPLaW9.js +18 -0
  22. package/dist/rasterization-CFogVB3B.js +50 -0
  23. package/dist/rectangle-DKnrAmKs.js +142 -0
  24. package/dist/renderCanvas2D-BQrRWp2Z.js +271 -0
  25. package/dist/renderCanvas2D-CHVNfIUz.js +271 -0
  26. package/dist/schema.json +71 -131
  27. package/dist/{svg-CCu8kYy2.js → svg-C-Sw6E6G.js} +286 -277
  28. package/dist/{svg-yFj875aX.js → svg-CKHwwKRt.js} +278 -269
  29. package/dist/svgRasterizer-BgD72AmG.js +40 -0
  30. package/dist/svgRasterizer-BgSNqI3L.js +40 -0
  31. package/dist/vega-scale-CK0_al6O.js +2700 -0
  32. package/dist/vega-scale-D46-iCaL.js +2700 -0
  33. package/dist/viewError-BiR9VCgL.js +29 -0
  34. package/dist/{viewIdentityRegistry-D3oPbN4O.js → viewIdentityRegistry-B-VGlez1.js} +1 -1
  35. package/dist/{viewIdentityRegistry-BUdkK9zT.js → viewIdentityRegistry-CDtVktJD.js} +1 -1
  36. package/dist/viewSelectors-CKfxF_LM.js +1817 -0
  37. package/dist/viewSelectors-D_imtq5Z.js +1817 -0
  38. package/dist/viewUtils-nCJ7AoaI.js +5782 -0
  39. package/dist/webgl-BaA3jSa2.js +4128 -0
  40. package/dist/webgl-FP-4EsBL.js +4128 -0
  41. package/package.json +7 -6
  42. package/dist/bmFontMetrics-CuNB-kNN.js +0 -31
  43. package/dist/canvas2d-DoAXEiF9.js +0 -309
  44. package/dist/canvas2d-f5jl4A5D.js +0 -310
  45. package/dist/clipOptions-gqdb3fvW.js +0 -43
  46. package/dist/color-W5zffv-z.js +0 -335
  47. package/dist/framebufferReadback-CCLOjStu.js +0 -148
  48. package/dist/framebufferReadback-THWwFqs8.js +0 -1994
  49. package/dist/twgl-full.module-DB2UdP1k.js +0 -1849
  50. package/dist/viewRenderingContext-HtpqwS_x.js +0 -120
  51. package/dist/viewSelectors-DGCspRN3.js +0 -4198
  52. package/dist/viewSelectors-U5oLCLHV.js +0 -4195
  53. package/dist/viewUtils-Dg4RA40Q.js +0 -7503
  54. package/dist/warning-DRGdb6BF.js +0 -59
  55. package/dist/webgl-Ci6ZhCCf.js +0 -54
  56. package/dist/webgl-Dpz8a3TI.js +0 -53
@@ -356,103 +356,103 @@ function Oe(e, t, n) {
356
356
  Oe("id");
357
357
  var ke = S((e) => e, [], "identity");
358
358
  S(() => 0, [], "zero"), S(() => 1, [], "one"), S(() => !0, [], "true"), S(() => !1, [], "false"), [...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")];
359
- var Ae = Array.isArray;
360
- function je(e) {
359
+ var C = Array.isArray;
360
+ function Ae(e) {
361
361
  return e === Object(e);
362
362
  }
363
- function C(e) {
363
+ function w(e) {
364
364
  return e[e.length - 1];
365
365
  }
366
- function Me(e) {
366
+ function je(e) {
367
367
  return e == null || e === "" ? null : +e;
368
368
  }
369
- var Ne = (e) => (t) => e * Math.exp(t), Pe = (e) => (t) => Math.log(e * t), Fe = (e) => (t) => Math.sign(t) * Math.log1p(Math.abs(t / e)), Ie = (e) => (t) => Math.sign(t) * Math.expm1(Math.abs(t)) * e, Le = (e) => (t) => t < 0 ? -((-t) ** +e) : t ** +e;
370
- function Re(e, t, n, r) {
371
- let i = n(e[0]), a = n(C(e)), o = (a - i) * t;
369
+ var Me = (e) => (t) => e * Math.exp(t), Ne = (e) => (t) => Math.log(e * t), Pe = (e) => (t) => Math.sign(t) * Math.log1p(Math.abs(t / e)), Fe = (e) => (t) => Math.sign(t) * Math.expm1(Math.abs(t)) * e, Ie = (e) => (t) => t < 0 ? -((-t) ** +e) : t ** +e;
370
+ function Le(e, t, n, r) {
371
+ let i = n(e[0]), a = n(w(e)), o = (a - i) * t;
372
372
  return [r(i - o), r(a - o)];
373
373
  }
374
- function ze(e, t) {
375
- return Re(e, t, Me, ke);
374
+ function Re(e, t) {
375
+ return Le(e, t, je, ke);
376
376
  }
377
- function Be(e, t) {
377
+ function ze(e, t) {
378
378
  var n = Math.sign(e[0]);
379
- return Re(e, t, Pe(n), Ne(n));
379
+ return Le(e, t, Ne(n), Me(n));
380
380
  }
381
- function Ve(e, t, n) {
382
- return Re(e, t, Le(n), Le(1 / n));
381
+ function Be(e, t, n) {
382
+ return Le(e, t, Ie(n), Ie(1 / n));
383
383
  }
384
- function He(e, t, n, r, i) {
385
- let a = r(e[0]), o = r(C(e)), s = t == null ? (a + o) / 2 : r(t);
384
+ function Ve(e, t, n, r, i) {
385
+ let a = r(e[0]), o = r(w(e)), s = t == null ? (a + o) / 2 : r(t);
386
386
  return [i(s + (a - s) * n), i(s + (o - s) * n)];
387
387
  }
388
- function Ue(e, t, n) {
389
- return He(e, t, n, Me, ke);
388
+ function He(e, t, n) {
389
+ return Ve(e, t, n, je, ke);
390
390
  }
391
- function We(e, t, n) {
391
+ function Ue(e, t, n) {
392
392
  let r = Math.sign(e[0]);
393
- return He(e, t, n, Pe(r), Ne(r));
393
+ return Ve(e, t, n, Ne(r), Me(r));
394
394
  }
395
- function Ge(e, t, n, r) {
396
- return He(e, t, n, Le(r), Le(1 / r));
395
+ function We(e, t, n, r) {
396
+ return Ve(e, t, n, Ie(r), Ie(1 / r));
397
397
  }
398
- function Ke(e, t, n, r) {
399
- return He(e, t, n, Fe(r), Ie(r));
398
+ function Ge(e, t, n, r) {
399
+ return Ve(e, t, n, Pe(r), Fe(r));
400
400
  }
401
- function qe(e) {
402
- return e == null ? [] : Ae(e) ? e : [e];
401
+ function Ke(e) {
402
+ return e == null ? [] : C(e) ? e : [e];
403
403
  }
404
- function Je(e, t, n) {
404
+ function qe(e, t, n) {
405
405
  let r = e[0], i = e[1], a;
406
406
  return i < r && (a = i, i = r, r = a), a = i - r, a >= n - t ? [t, n] : [r = Math.min(Math.max(r, t), n - a), r + a];
407
407
  }
408
- function Ye(e) {
408
+ function Je(e) {
409
409
  return typeof e == "function";
410
410
  }
411
- var Xe = "descending";
412
- function Ze(e, t, n) {
413
- n ||= {}, t = qe(t) || [];
414
- let r = [], i = [], a = {}, o = n.comparator || $e;
415
- return qe(e).forEach((e, o) => {
416
- e != null && (r.push(t[o] === Xe ? -1 : 1), i.push(e = Ye(e) ? e : Oe(e, null, n)), (Se(e) || []).forEach((e) => a[e] = 1));
411
+ var Ye = "descending";
412
+ function Xe(e, t, n) {
413
+ n ||= {}, t = Ke(t) || [];
414
+ let r = [], i = [], a = {}, o = n.comparator || Qe;
415
+ return Ke(e).forEach((e, o) => {
416
+ e != null && (r.push(t[o] === Ye ? -1 : 1), i.push(e = Je(e) ? e : Oe(e, null, n)), (Se(e) || []).forEach((e) => a[e] = 1));
417
417
  }), i.length === 0 ? null : S(o(i, r), Object.keys(a));
418
418
  }
419
- var Qe = (e, t) => (e < t || e == null) && t != null ? -1 : (e > t || t == null) && e != null ? 1 : (t = t instanceof Date ? +t : t, e = e instanceof Date ? +e : e) !== e && t === t ? -1 : +(t !== t && e === e), $e = (e, t) => e.length === 1 ? et(e[0], t[0]) : tt(e, t, e.length), et = (e, t) => function(n, r) {
420
- return Qe(e(n), e(r)) * t;
421
- }, tt = (e, t, n) => (t.push(0), function(r, i) {
419
+ var Ze = (e, t) => (e < t || e == null) && t != null ? -1 : (e > t || t == null) && e != null ? 1 : (t = t instanceof Date ? +t : t, e = e instanceof Date ? +e : e) !== e && t === t ? -1 : +(t !== t && e === e), Qe = (e, t) => e.length === 1 ? $e(e[0], t[0]) : et(e, t, e.length), $e = (e, t) => function(n, r) {
420
+ return Ze(e(n), e(r)) * t;
421
+ }, et = (e, t, n) => (t.push(0), function(r, i) {
422
422
  let a, o = 0, s = -1;
423
- for (; o === 0 && ++s < n;) a = e[s], o = Qe(a(r), a(i));
423
+ for (; o === 0 && ++s < n;) a = e[s], o = Ze(a(r), a(i));
424
424
  return o * t[s];
425
425
  });
426
- function nt(e) {
426
+ function tt(e) {
427
427
  return typeof e == "boolean";
428
428
  }
429
- function rt(e) {
429
+ function nt(e) {
430
430
  return typeof e == "number";
431
431
  }
432
- function it(e) {
432
+ function rt(e) {
433
433
  return Object.prototype.toString.call(e) === "[object RegExp]";
434
434
  }
435
- function w(e) {
435
+ function T(e) {
436
436
  return typeof e == "string";
437
437
  }
438
- function at(e, t) {
439
- let n = e[0], r = C(e), i = +t;
438
+ function it(e, t) {
439
+ let n = e[0], r = w(e), i = +t;
440
440
  return i ? i === 1 ? r : n + i * (r - n) : n;
441
441
  }
442
+ function at(e) {
443
+ return e && w(e) - e[0] || 0;
444
+ }
442
445
  function ot(e) {
443
- return e && C(e) - e[0] || 0;
446
+ return C(e) ? `[${e.map((e) => e === null ? "null" : ot(e))}]` : Ae(e) || T(e) ? JSON.stringify(e).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029") : e;
444
447
  }
445
448
  function st(e) {
446
- return Ae(e) ? `[${e.map((e) => e === null ? "null" : st(e))}]` : je(e) || w(e) ? JSON.stringify(e).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029") : e;
447
- }
448
- function ct(e) {
449
449
  let t = {}, n = e.length;
450
450
  for (let r = 0; r < n; ++r) t[e[r]] = !0;
451
451
  return t;
452
452
  }
453
453
  //#endregion
454
454
  //#region ../core/src/data/flowNode.js
455
- var lt = class {
455
+ var ct = class {
456
456
  stats = {
457
457
  count: 0,
458
458
  first: null
@@ -490,7 +490,7 @@ var lt = class {
490
490
  initialized: this.#e,
491
491
  disposed: this.#t,
492
492
  params: "params" in e ? structuredClone(e.params) : void 0,
493
- view: ut(e, this.paramRuntimeProvider),
493
+ view: lt(e, this.paramRuntimeProvider),
494
494
  domainSensitiveScaleChannels: this.domainSensitiveScaleChannels
495
495
  };
496
496
  }
@@ -597,11 +597,11 @@ var lt = class {
597
597
  }
598
598
  _propagate(e) {}
599
599
  };
600
- function ut(e, t) {
600
+ function lt(e, t) {
601
601
  if ("view" in e) return e.view;
602
602
  if (t && "getPathString" in t) return t;
603
603
  }
604
- function dt(e) {
604
+ function ut(e) {
605
605
  let t = /* @__PURE__ */ new Set();
606
606
  for (; e;) {
607
607
  for (let n of e.domainSensitiveScaleChannels) t.add(n);
@@ -609,15 +609,15 @@ function dt(e) {
609
609
  }
610
610
  return t;
611
611
  }
612
- function ft(e) {
612
+ function dt(e) {
613
613
  return e.type == "file";
614
614
  }
615
- function pt(e) {
615
+ function ft(e) {
616
616
  return e.type == "facet";
617
617
  }
618
618
  //#endregion
619
619
  //#region ../core/src/data/transforms/transform.js
620
- var mt = class extends lt {
620
+ var pt = class extends ct {
621
621
  #e;
622
622
  constructor(e, t) {
623
623
  super(t), this.#e = e.type;
@@ -635,7 +635,7 @@ var mt = class extends lt {
635
635
  }
636
636
  return (() => e);
637
637
  }
638
- }, T = "__uniqueId", ht = 1e4, gt = [null], _t = class extends mt {
638
+ }, E = "__uniqueId", mt = 1e4, ht = [null], gt = class extends pt {
639
639
  get behavior() {
640
640
  return 2;
641
641
  }
@@ -647,22 +647,22 @@ var mt = class extends lt {
647
647
  super.reset(), this._usedBlocks = 0, this._id = -1;
648
648
  }
649
649
  handle(e) {
650
- e[T] = this.#e(), this._propagate(e);
650
+ e[E] = this.#e(), this._propagate(e);
651
651
  }
652
652
  #e() {
653
- return ++this._id % 1e4 == 0 && (this._id = this.#t() * ht), this._id;
653
+ return ++this._id % 1e4 == 0 && (this._id = this.#t() * mt), this._id;
654
654
  }
655
655
  #t() {
656
656
  return this._usedBlocks < this._blocks.length ? this._blocks[this._usedBlocks++] : this.#n();
657
657
  }
658
658
  #n() {
659
- let e = gt.length;
660
- return gt[e] = this, this._blocks.push(e), this._usedBlocks++, e;
659
+ let e = ht.length;
660
+ return ht[e] = this, this._blocks.push(e), this._usedBlocks++, e;
661
661
  }
662
662
  };
663
663
  //#endregion
664
664
  //#region ../core/src/utils/field.js
665
- function vt(e, t = e) {
665
+ function _t(e, t = e) {
666
666
  return /^[A-Za-z0-9_]+$/.test(e) ? S(Function("validator", `
667
667
  let validated = !validator;
668
668
  return function accessField(datum) {
@@ -672,21 +672,21 @@ function vt(e, t = e) {
672
672
  }
673
673
  return datum[${JSON.stringify(e)}];
674
674
  }`)(function(t) {
675
- e in t || yt(t, e);
675
+ e in t || vt(t, e);
676
676
  }), [e], t) : Oe(e);
677
677
  }
678
- function yt(e, t) {
678
+ function vt(e, t) {
679
679
  throw Error(`Invalid field "${t}". Available fields or properties: ${Object.keys(e).join(", ")}`);
680
680
  }
681
681
  //#endregion
682
682
  //#region ../core/src/encoder/accessor.js
683
- function bt(e, t, n) {
683
+ function yt(e, t, n) {
684
684
  if (!e) throw Error("Cannot create an accessor without a channel.");
685
685
  function r(n) {
686
686
  let r = n;
687
- return r.fields ??= [], r.constant = r.fields.length === 0, r.channelDef = t, r.channel = e, r.sourceKey = Ct(t), r.scaleChannel = ((Lt(t) && t.resolutionChannel) ?? (cn(e) && e)) || void 0, r.scaleChannel !== void 0 && (r.domainKeyBase = wt({
687
+ return r.fields ??= [], r.constant = r.fields.length === 0, r.channelDef = t, r.channel = e, r.sourceKey = St(t), r.scaleChannel = ((Lt(t) && t.resolutionChannel) ?? (cn(e) && e)) || void 0, r.scaleChannel !== void 0 && (r.domainKeyBase = Ct({
688
688
  scaleChannel: r.scaleChannel,
689
- source: St(t)
689
+ source: xt(t)
690
690
  }).domainKeyBase), r.equals = (e) => e ? r === e || r.sourceKey !== void 0 && r.sourceKey === e.sourceKey : !1, r.asNumberAccessor = () => r, r;
691
691
  }
692
692
  function i(e) {
@@ -699,21 +699,21 @@ function bt(e, t, n) {
699
699
  return r(() => t);
700
700
  }
701
701
  }
702
- if (E(t)) try {
703
- return r(vt(t.field));
702
+ if (D(t)) try {
703
+ return r(_t(t.field));
704
704
  } catch (e) {
705
705
  throw Error(`Invalid field definition: ${e.message}`, { cause: e });
706
706
  }
707
707
  else if (Ht(t)) return r(n.createExpression(t.expr));
708
- else if (D(t)) return i(t.datum);
709
- else if (It(t)) return i(t.value);
708
+ else if (It(t)) return i(t.datum);
709
+ else if (Ft(t)) return i(t.value);
710
710
  else throw Error(`Invalid channel definition: "${e}": ${JSON.stringify(t)}! The channel definition must contain one of the following properties: "field", "datum", "value" or "expr".`);
711
711
  }
712
- function xt(e) {
712
+ function bt(e) {
713
713
  return e.scaleChannel !== void 0;
714
714
  }
715
- function St(e) {
716
- if (E(e)) return {
715
+ function xt(e) {
716
+ if (D(e)) return {
717
717
  kind: "field",
718
718
  value: e.field
719
719
  };
@@ -721,52 +721,52 @@ function St(e) {
721
721
  kind: "expr",
722
722
  value: e.expr
723
723
  };
724
- if (D(e)) return {
724
+ if (It(e)) return {
725
725
  kind: "datum",
726
726
  value: e.datum
727
727
  };
728
- if (It(e)) return {
728
+ if (Ft(e)) return {
729
729
  kind: "value",
730
730
  value: e.value
731
731
  };
732
732
  throw Error("Cannot derive a domain key from channel definition: " + JSON.stringify(e));
733
733
  }
734
- function Ct(e) {
735
- let t = St(e);
736
- return t.kind === "datum" || t.kind === "value" ? "constant|" + Dt(t.value) : t.kind + "|" + Et(t);
734
+ function St(e) {
735
+ let t = xt(e);
736
+ return t.kind === "datum" || t.kind === "value" ? "constant|" + Et(t.value) : t.kind + "|" + Tt(t);
737
737
  }
738
- function wt({ scaleChannel: e, source: t, type: n }) {
738
+ function Ct({ scaleChannel: e, source: t, type: n }) {
739
739
  if (!e) throw Error("Cannot build a domain key without a scale channel.");
740
- let r = e + "|" + t.kind + "|" + Et(t);
740
+ let r = e + "|" + t.kind + "|" + Tt(t);
741
741
  return {
742
742
  domainKeyBase: r,
743
743
  domainKey: n ? n + "|" + r : void 0
744
744
  };
745
745
  }
746
- function Tt(e, t) {
747
- let { domainKey: n, domainKeyBase: r } = wt({
746
+ function wt(e, t) {
747
+ let { domainKey: n, domainKeyBase: r } = Ct({
748
748
  scaleChannel: e.scaleChannel,
749
- source: St(e.channelDef),
749
+ source: xt(e.channelDef),
750
750
  type: t
751
751
  });
752
752
  if (!n) throw Error("Cannot finalize a domain key without a resolved type.");
753
753
  return e.domainKeyBase = r, e.domainKey = n, n;
754
754
  }
755
- function Et(e) {
755
+ function Tt(e) {
756
756
  switch (e.kind) {
757
757
  case "field":
758
758
  case "expr": return e.value;
759
759
  case "datum":
760
- case "value": return Dt(e.value);
760
+ case "value": return Et(e.value);
761
761
  default: throw Error("Unknown domain key source.");
762
762
  }
763
763
  }
764
- function Dt(e) {
764
+ function Et(e) {
765
765
  return $(e) ? "expr:" + e.expr : e === void 0 ? "undefined" : JSON.stringify(e);
766
766
  }
767
767
  //#endregion
768
768
  //#region ../core/src/encoder/encoder.js
769
- function Ot(e, t, n, r) {
769
+ function Dt(e, t, n, r) {
770
770
  let i, a = Vi(!1), o = () => {
771
771
  if (i) return i;
772
772
  let o = n.findValue(e);
@@ -776,12 +776,12 @@ function Ot(e, t, n, r) {
776
776
  let n = Object.keys(o.intervals);
777
777
  for (let r of n) {
778
778
  let n = t[r];
779
- if (E(n)) {
779
+ if (D(n)) {
780
780
  s[r] = n.field;
781
781
  continue;
782
782
  } else if (n && "condition" in n) {
783
783
  let e = n.condition;
784
- if (E(e)) {
784
+ if (D(e)) {
785
785
  s[r] = e.field;
786
786
  continue;
787
787
  }
@@ -802,41 +802,41 @@ function Ot(e, t, n, r) {
802
802
  empty: r ?? !0
803
803
  });
804
804
  }
805
- function kt(e, t, n, r) {
805
+ function Ot(e, t, n, r) {
806
806
  let i = Ut(t) || Wt(t) ? Array.isArray(t.condition) ? t.condition : [t.condition] : [], a = [...i, t], o = a.map((t, o) => {
807
807
  let s = i[o];
808
808
  return {
809
- accessor: bt(e, t, r),
810
- predicate: s?.param ? Ot(s.param, n, r, s.empty) : Object.assign(Vi(o === a.length - 1), { empty: !1 })
809
+ accessor: yt(e, t, r),
810
+ predicate: s?.param ? Dt(s.param, n, r, s.empty) : Object.assign(Vi(o === a.length - 1), { empty: !1 })
811
811
  };
812
812
  });
813
813
  if (o.filter((e) => !e.accessor.constant).length > 1) throw Error("Only one accessor can be non-constant. Channel: " + e);
814
814
  return o;
815
815
  }
816
- function At(e, t) {
816
+ function kt(e, t) {
817
817
  let n = {}, r = (t) => e.getScaleResolution(t)?.getScale();
818
818
  for (let [i, a] of Object.entries(t)) {
819
819
  if (!a) continue;
820
820
  let o = i;
821
- jt(o) || (n[o] = Pt(kt(o, a, t, e.paramRuntime), r));
821
+ At(o) || (n[o] = Nt(Ot(o, a, t, e.paramRuntime), r));
822
822
  }
823
823
  return n;
824
824
  }
825
- function jt(e) {
825
+ function At(e) {
826
826
  return e === "key" || e === "search" || e === "tooltip";
827
827
  }
828
- function Mt(e) {
828
+ function jt(e) {
829
829
  return e.branches.map((e) => e.accessor);
830
830
  }
831
- function Nt(e) {
831
+ function Mt(e) {
832
832
  return e.branches.find((e) => !e.accessor.constant)?.accessor;
833
833
  }
834
- function Pt(e, t) {
834
+ function Nt(e, t) {
835
835
  if (e.length === 1) {
836
- let n = Ft(e[0].accessor, t);
836
+ let n = Pt(e[0].accessor, t);
837
837
  return Object.assign(n, { branches: e });
838
838
  }
839
- let n = e.map((e) => e.predicate), r = e.map((e) => Ft(e.accessor, t));
839
+ let n = e.map((e) => e.predicate), r = e.map((e) => Pt(e.accessor, t));
840
840
  return Object.assign((e) => {
841
841
  for (let t = 0; t < r.length; t++) if (n[t](e)) return r[t](e);
842
842
  }, {
@@ -846,7 +846,7 @@ function Pt(e, t) {
846
846
  channelDef: e.at(-1).accessor.channelDef
847
847
  });
848
848
  }
849
- function Ft(e, t) {
849
+ function Pt(e, t) {
850
850
  let { channel: n, scaleChannel: r, channelDef: i } = e, a = e.scaleChannel ? t(r) : void 0;
851
851
  if (r && !a) throw Error(`Missing scale! "${n}": ${JSON.stringify(i)}`);
852
852
  return Object.assign(a ? (t) => a(e(t)) : (t) => e(t), {
@@ -859,17 +859,17 @@ function Ft(e, t) {
859
859
  channelDef: i
860
860
  });
861
861
  }
862
- function It(e) {
862
+ function Ft(e) {
863
863
  return e && "value" in e;
864
864
  }
865
- function E(e) {
865
+ function D(e) {
866
866
  return e && "field" in e;
867
867
  }
868
- function D(e) {
868
+ function It(e) {
869
869
  return e && "datum" in e;
870
870
  }
871
871
  function Lt(e) {
872
- return E(e) || D(e) || Ht(e) || Vt(e);
872
+ return D(e) || It(e) || Ht(e) || Vt(e);
873
873
  }
874
874
  function Rt(e) {
875
875
  if (Wt(e)) {
@@ -897,10 +897,10 @@ function Ht(e) {
897
897
  return e && "expr" in e;
898
898
  }
899
899
  function Ut(e) {
900
- return (E(e) || D(e)) && "condition" in e;
900
+ return (D(e) || It(e)) && "condition" in e;
901
901
  }
902
902
  function Wt(e) {
903
- return It(e) && "condition" in e;
903
+ return Ft(e) && "condition" in e;
904
904
  }
905
905
  var Gt = ["x", "y"], Kt = ["x2", "y2"], qt = ["xOffset", "yOffset"], Jt = [...Gt, ...Kt];
906
906
  function Yt(e) {
@@ -1768,10 +1768,10 @@ function $r(e, t, n) {
1768
1768
  //#endregion
1769
1769
  //#region ../core/src/utils/expression.js
1770
1770
  function ei(e) {
1771
- return Ae(e) || ArrayBuffer.isView(e) ? e : null;
1771
+ return C(e) || ArrayBuffer.isView(e) ? e : null;
1772
1772
  }
1773
1773
  function ti(e) {
1774
- return ei(e) || (w(e) ? e : null);
1774
+ return ei(e) || (T(e) ? e : null);
1775
1775
  }
1776
1776
  var ni = {
1777
1777
  clamp: Qr,
@@ -1788,7 +1788,7 @@ var ni = {
1788
1788
  return ti(e).lastIndexOf(t, n);
1789
1789
  },
1790
1790
  reverse(e) {
1791
- return w(e) ? Array.from(e).reverse().join("") : ei(e).slice().reverse();
1791
+ return T(e) ? Array.from(e).reverse().join("") : ei(e).slice().reverse();
1792
1792
  },
1793
1793
  slice(e, t, n) {
1794
1794
  return ti(e).slice(t, n);
@@ -1796,32 +1796,32 @@ var ni = {
1796
1796
  mapHasKey(e, t) {
1797
1797
  return e.has(t);
1798
1798
  },
1799
- isArray: Ae,
1800
- isBoolean: nt,
1799
+ isArray: C,
1800
+ isBoolean: tt,
1801
1801
  isDefined(e) {
1802
1802
  return e !== void 0;
1803
1803
  },
1804
- isNumber: rt,
1805
- isObject: je,
1806
- isRegExp: it,
1807
- isString: w,
1804
+ isNumber: nt,
1805
+ isObject: Ae,
1806
+ isRegExp: rt,
1807
+ isString: T,
1808
1808
  isValid(e) {
1809
1809
  return e != null && e === e;
1810
1810
  },
1811
- lerp: at,
1811
+ lerp: it,
1812
1812
  linearstep: $r,
1813
1813
  replace(e, t, n) {
1814
1814
  return String(e).replace(t, n);
1815
1815
  },
1816
1816
  sort(e) {
1817
- return ei(e).slice().sort(Qe);
1817
+ return ei(e).slice().sort(Ze);
1818
1818
  },
1819
1819
  center(e) {
1820
1820
  let t = ei(e);
1821
1821
  return (t[0] + t[t.length - 1]) / 2;
1822
1822
  },
1823
1823
  span(e) {
1824
- return ot(e);
1824
+ return at(e);
1825
1825
  },
1826
1826
  smoothstep: Zr
1827
1827
  };
@@ -1982,18 +1982,18 @@ function _i(e) {
1982
1982
  return {
1983
1983
  type: "single",
1984
1984
  datum: e,
1985
- uniqueId: e?.[T]
1985
+ uniqueId: e?.[E]
1986
1986
  };
1987
1987
  }
1988
1988
  function vi(e) {
1989
1989
  return e ??= [], {
1990
1990
  type: "multi",
1991
- data: new Map(e.map((e) => [e[T], e]))
1991
+ data: new Map(e.map((e) => [e[E], e]))
1992
1992
  };
1993
1993
  }
1994
1994
  function yi(e, t) {
1995
1995
  if (!t || t.length === 0) return;
1996
- let n = t.map((e) => vt(e)), r = (e) => n.map((t) => t(e));
1996
+ let n = t.map((e) => _t(e)), r = (e) => n.map((t) => t(e));
1997
1997
  if (Ti(e)) return e.datum ? [r(e.datum)] : [];
1998
1998
  if (Ei(e)) return [...e.data.values()].map(r);
1999
1999
  throw Error(`Expected a point selection, got: ${JSON.stringify(e)}`);
@@ -2019,10 +2019,10 @@ function xi(e) {
2019
2019
  }
2020
2020
  function Si(e, { add: t, remove: n, toggle: r }) {
2021
2021
  let i = e.data;
2022
- for (let e of t ?? []) i.set(e[T], e);
2023
- for (let e of n ?? []) i.delete(e[T]);
2022
+ for (let e of t ?? []) i.set(e[E], e);
2023
+ for (let e of n ?? []) i.delete(e[E]);
2024
2024
  for (let e of r ?? []) {
2025
- let t = e[T];
2025
+ let t = e[E];
2026
2026
  i.has(t) ? i.delete(t) : i.set(t, e);
2027
2027
  }
2028
2028
  return {
@@ -2032,8 +2032,8 @@ function Si(e, { add: t, remove: n, toggle: r }) {
2032
2032
  }
2033
2033
  function Ci(e, t) {
2034
2034
  let n = !!(e.empty ?? !0), r = Li(e.param), i = e.fields ?? {};
2035
- if (Ti(t)) return `${r}.uniqueId == null ? ${n} : ${r}.uniqueId === datum[${JSON.stringify(T)}]`;
2036
- if (Ei(t)) return `${r}.data.size == 0 ? ${n} : mapHasKey(${r}.data, datum[${JSON.stringify(T)}])`;
2035
+ if (Ti(t)) return `${r}.uniqueId == null ? ${n} : ${r}.uniqueId === datum[${JSON.stringify(E)}]`;
2036
+ if (Ei(t)) return `${r}.data.size == 0 ? ${n} : mapHasKey(${r}.data, datum[${JSON.stringify(E)}])`;
2037
2037
  if (wi(t)) {
2038
2038
  let a = Object.keys(t.intervals), o = Object.keys(i).filter(Yt);
2039
2039
  if (o.length === 0) throw Error("Filtering using interval selections requires at least one primary positional channel in the config! " + JSON.stringify(e));
@@ -2083,7 +2083,7 @@ function Mi(e = ["x"], t = {}) {
2083
2083
  //#endregion
2084
2084
  //#region ../core/src/paramRuntime/paramUtils.js
2085
2085
  function $(e) {
2086
- return typeof e == "object" && !!e && "expr" in e && w(e.expr);
2086
+ return typeof e == "object" && !!e && "expr" in e && T(e.expr);
2087
2087
  }
2088
2088
  function Ni(e) {
2089
2089
  if ($(e)) throw Error("ExprRef " + JSON.stringify(e) + " not allowed here. Expected a scalar value.");
@@ -2192,4 +2192,68 @@ function Vi(e) {
2192
2192
  });
2193
2193
  }
2194
2194
  //#endregion
2195
- export { Xt as $, d as $t, di as A, Ve as At, Qt as B, be as Bt, bi as C, Ye as Ct, hi as D, at as Dt, mi as E, w as Et, Rt as F, Ue as Ft, Vt as G, y as Gt, rn as H, _e as Ht, Bt as I, We as It, sn as J, g as Jt, on as K, te as Kt, un as L, Ge as Lt, Qr as M, ot as Mt, Zr as N, De as Nt, gi as O, ze as Ot, At as P, ct as Pt, Zt as Q, f as Qt, Mt as R, Ke as Rt, Ci as S, nt as St, Si as T, je as Tt, Lt as U, me as Ut, an as V, ye as Vt, cn as W, he as Wt, E as X, m as Xt, Ht as Y, h as Yt, zt as Z, p as Zt, wi as _, xe as _t, Fi as a, bt as at, Oi as b, Ee as bt, Li as c, vt as ct, Di as d, mt as dt, u as en, Yt as et, xi as f, lt as ft, Ai as g, st as gt, yi as h, ft as ht, Ii as i, i as in, $t as it, $r as j, C as jt, ri as k, Be as kt, Ni as l, _t as lt, _i as m, pt as mt, Ri as n, s as nn, It as nt, Pi as o, Tt as ot, vi as p, dt as pt, D as q, _ as qt, $ as r, o as rn, Gt as rt, Bi as s, xt as st, zi as t, l as tn, nn as tt, Mi as u, T as ut, ki as v, Je as vt, ji as w, rt as wt, Ti as x, Ae as xt, Ei as y, Ze as yt, Nt as z, ve as zt };
2195
+ //#region ../core/src/view/renderingContext/clipOptions.js
2196
+ function Hi(e) {
2197
+ if (e.clip) return e.clip;
2198
+ if (e.clipRect) return {
2199
+ rect: e.clipRect,
2200
+ clipX: !0,
2201
+ clipY: !0
2202
+ };
2203
+ }
2204
+ function Ui(e, t) {
2205
+ return e === t ? !0 : !e || !t ? !1 : e.clipX === t.clipX && e.clipY === t.clipY && e.rect.equals(t.rect);
2206
+ }
2207
+ function Wi(e, t, n) {
2208
+ return t || n ? {
2209
+ rect: e,
2210
+ clipX: t,
2211
+ clipY: n
2212
+ } : void 0;
2213
+ }
2214
+ function Gi(e, t) {
2215
+ return t ? t.clipX && t.clipY ? e.intersect(t.rect) : t.clipX ? e.intersectX(t.rect) : t.clipY ? e.intersectY(t.rect) : e : e;
2216
+ }
2217
+ function Ki(e, t) {
2218
+ if (!e) return t;
2219
+ if (!t) return e;
2220
+ let n = e.clipX || t.clipX, r = e.clipY || t.clipY, i = e.clipX && t.clipX ? e.rect.intersectX(t.rect) : t.clipX ? t.rect : e.rect, a = e.clipY && t.clipY ? e.rect.intersectY(t.rect) : t.clipY ? t.rect : e.rect;
2221
+ return Wi(e.rect.modify({
2222
+ x: () => i.x,
2223
+ y: () => a.y,
2224
+ width: () => i.width,
2225
+ height: () => a.height
2226
+ }), n, r);
2227
+ }
2228
+ function qi(e, t) {
2229
+ if (e === !0) return Wi(t, !0, !0);
2230
+ if (e === "x") return Wi(t, !0, !1);
2231
+ if (e === "y") return Wi(t, !1, !0);
2232
+ }
2233
+ function Ji(e) {
2234
+ let t = e.mark;
2235
+ if (t) {
2236
+ let e = t.properties.clip;
2237
+ return {
2238
+ clipX: e === !0 || e === "x",
2239
+ clipY: e === !0 || e === "y"
2240
+ };
2241
+ }
2242
+ let n = !1, r = !0, i = !0;
2243
+ return e.visit((e) => {
2244
+ let t = e.mark;
2245
+ if (t) {
2246
+ n = !0;
2247
+ let e = t.properties.clip;
2248
+ r &&= e === !0 || e === "x", i &&= e === !0 || e === "y";
2249
+ }
2250
+ }), {
2251
+ clipX: n && r,
2252
+ clipY: n && i
2253
+ };
2254
+ }
2255
+ function Yi(e, t, n) {
2256
+ if (t !== "never") return Ki(e, qi(t, n));
2257
+ }
2258
+ //#endregion
2259
+ export { on as $, te as $t, bi as A, Je as At, Zr as B, De as Bt, Ai as C, ot as Ct, Oi as D, Ee as Dt, Ei as E, Xe as Et, gi as F, Re as Ft, jt as G, Ge as Gt, Rt as H, He as Ht, ri as I, ze as It, an as J, ye as Jt, Mt as K, ve as Kt, di as L, Be as Lt, Si as M, Ae as Mt, mi as N, T as Nt, Ti as O, C as Ot, hi as P, it as Pt, Vt as Q, y as Qt, $r as R, w as Rt, yi as S, dt as St, ki as T, qe as Tt, Bt as U, Ue as Ut, kt as V, st as Vt, un as W, We as Wt, Lt as X, me as Xt, rn as Y, _e as Yt, cn as Z, he as Zt, Mi as _, E as _t, Ji as a, f as an, Zt as at, vi as b, ut as bt, zi as c, l as cn, nn as ct, Ii as d, i as dn, $t as dt, _ as en, It as et, Fi as f, yt as ft, Ni as g, gt, Li as h, _t as ht, Wi as i, p as in, zt as it, ji as j, nt as jt, Ci as k, tt as kt, Ri as l, s as ln, Ft as lt, Bi as m, bt as mt, Ui as n, h as nn, Ht as nt, Hi as o, d as on, Xt as ot, Pi as p, wt as pt, Qt as q, be as qt, Ki as r, m as rn, D as rt, Yi as s, u as sn, Yt as st, Gi as t, g as tn, sn as tt, $ as u, o as un, Gt as ut, Di as v, pt as vt, wi as w, xe as wt, _i as x, ft as xt, xi as y, ct as yt, Qr as z, at as zt };