@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.
- package/README.md +28 -0
- package/dist/{agentApi-Cz0hCnVp.js → agentApi-DgopQbMV.js} +5019 -6824
- package/dist/agentApi.es.js +2757 -2852
- package/dist/agentShared.es.js +15 -14
- package/dist/canvas2d-8uxuN_vx.js +619 -0
- package/dist/canvas2d-BtQC7Xr8.js +619 -0
- package/dist/{arrayUtils-LJpQOu-U.js → clipOptions-BQfNhxgP.js} +625 -561
- package/dist/{paramUtils-BYI4rwyL.js → clipOptions-taFzEljc.js} +192 -128
- package/dist/{debug-BvCZWumf.js → debug-Bzc3SoRg.js} +8 -8
- package/dist/{debug-CgDtmspT.js → debug-D_VtWQ6l.js} +8 -8
- package/dist/index.es.js +2992 -2915
- package/dist/index.js +2006 -2004
- package/dist/indexer-qiFctgR3.js +72 -0
- package/dist/indexer-qy_dq5l5.js +72 -0
- package/dist/layoutResult-D50MSHXR.js +97 -0
- package/dist/{nativeText-m5AUINMq.js → nativeText-DFV5XIx8.js} +247 -193
- package/dist/{nativeText-DMO8gLt7.js → nativeText-vT3AWE14.js} +244 -190
- package/dist/performanceProfiler-CPLEjApa.js +20 -0
- package/dist/rasterExport-B8pVoOsj.js +44 -0
- package/dist/rasterExport-C4r4xjQT.js +44 -0
- package/dist/rasterImage-B4rPLaW9.js +18 -0
- package/dist/rasterization-CFogVB3B.js +50 -0
- package/dist/rectangle-DKnrAmKs.js +142 -0
- package/dist/renderCanvas2D-BQrRWp2Z.js +271 -0
- package/dist/renderCanvas2D-CHVNfIUz.js +271 -0
- package/dist/schema.json +71 -131
- package/dist/{svg-CCu8kYy2.js → svg-C-Sw6E6G.js} +286 -277
- package/dist/{svg-yFj875aX.js → svg-CKHwwKRt.js} +278 -269
- package/dist/svgRasterizer-BgD72AmG.js +40 -0
- package/dist/svgRasterizer-BgSNqI3L.js +40 -0
- package/dist/vega-scale-CK0_al6O.js +2700 -0
- package/dist/vega-scale-D46-iCaL.js +2700 -0
- package/dist/viewError-BiR9VCgL.js +29 -0
- package/dist/{viewIdentityRegistry-D3oPbN4O.js → viewIdentityRegistry-B-VGlez1.js} +1 -1
- package/dist/{viewIdentityRegistry-BUdkK9zT.js → viewIdentityRegistry-CDtVktJD.js} +1 -1
- package/dist/viewSelectors-CKfxF_LM.js +1817 -0
- package/dist/viewSelectors-D_imtq5Z.js +1817 -0
- package/dist/viewUtils-nCJ7AoaI.js +5782 -0
- package/dist/webgl-BaA3jSa2.js +4128 -0
- package/dist/webgl-FP-4EsBL.js +4128 -0
- package/package.json +7 -6
- package/dist/bmFontMetrics-CuNB-kNN.js +0 -31
- package/dist/canvas2d-DoAXEiF9.js +0 -309
- package/dist/canvas2d-f5jl4A5D.js +0 -310
- package/dist/clipOptions-gqdb3fvW.js +0 -43
- package/dist/color-W5zffv-z.js +0 -335
- package/dist/framebufferReadback-CCLOjStu.js +0 -148
- package/dist/framebufferReadback-THWwFqs8.js +0 -1994
- package/dist/twgl-full.module-DB2UdP1k.js +0 -1849
- package/dist/viewRenderingContext-HtpqwS_x.js +0 -120
- package/dist/viewSelectors-DGCspRN3.js +0 -4198
- package/dist/viewSelectors-U5oLCLHV.js +0 -4195
- package/dist/viewUtils-Dg4RA40Q.js +0 -7503
- package/dist/warning-DRGdb6BF.js +0 -59
- package/dist/webgl-Ci6ZhCCf.js +0 -54
- 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
|
|
360
|
-
function
|
|
359
|
+
var C = Array.isArray;
|
|
360
|
+
function Ae(e) {
|
|
361
361
|
return e === Object(e);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function w(e) {
|
|
364
364
|
return e[e.length - 1];
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function je(e) {
|
|
367
367
|
return e == null || e === "" ? null : +e;
|
|
368
368
|
}
|
|
369
|
-
var
|
|
370
|
-
function
|
|
371
|
-
let i = n(e[0]), a = n(
|
|
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
|
|
375
|
-
return
|
|
374
|
+
function Re(e, t) {
|
|
375
|
+
return Le(e, t, je, ke);
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function ze(e, t) {
|
|
378
378
|
var n = Math.sign(e[0]);
|
|
379
|
-
return
|
|
379
|
+
return Le(e, t, Ne(n), Me(n));
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
return
|
|
381
|
+
function Be(e, t, n) {
|
|
382
|
+
return Le(e, t, Ie(n), Ie(1 / n));
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
let a = r(e[0]), o = r(
|
|
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
|
|
389
|
-
return
|
|
388
|
+
function He(e, t, n) {
|
|
389
|
+
return Ve(e, t, n, je, ke);
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Ue(e, t, n) {
|
|
392
392
|
let r = Math.sign(e[0]);
|
|
393
|
-
return
|
|
393
|
+
return Ve(e, t, n, Ne(r), Me(r));
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
return
|
|
395
|
+
function We(e, t, n, r) {
|
|
396
|
+
return Ve(e, t, n, Ie(r), Ie(1 / r));
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
return
|
|
398
|
+
function Ge(e, t, n, r) {
|
|
399
|
+
return Ve(e, t, n, Pe(r), Fe(r));
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
return e == null ? [] :
|
|
401
|
+
function Ke(e) {
|
|
402
|
+
return e == null ? [] : C(e) ? e : [e];
|
|
403
403
|
}
|
|
404
|
-
function
|
|
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
|
|
408
|
+
function Je(e) {
|
|
409
409
|
return typeof e == "function";
|
|
410
410
|
}
|
|
411
|
-
var
|
|
412
|
-
function
|
|
413
|
-
n ||= {}, t =
|
|
414
|
-
let r = [], i = [], a = {}, o = n.comparator ||
|
|
415
|
-
return
|
|
416
|
-
e != null && (r.push(t[o] ===
|
|
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
|
|
420
|
-
return
|
|
421
|
-
},
|
|
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 =
|
|
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
|
|
426
|
+
function tt(e) {
|
|
427
427
|
return typeof e == "boolean";
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function nt(e) {
|
|
430
430
|
return typeof e == "number";
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function rt(e) {
|
|
433
433
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function T(e) {
|
|
436
436
|
return typeof e == "string";
|
|
437
437
|
}
|
|
438
|
-
function
|
|
439
|
-
let n = e[0], r =
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
612
|
+
function dt(e) {
|
|
613
613
|
return e.type == "file";
|
|
614
614
|
}
|
|
615
|
-
function
|
|
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
|
|
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
|
-
},
|
|
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[
|
|
650
|
+
e[E] = this.#e(), this._propagate(e);
|
|
651
651
|
}
|
|
652
652
|
#e() {
|
|
653
|
-
return ++this._id % 1e4 == 0 && (this._id = this.#t() *
|
|
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 =
|
|
660
|
-
return
|
|
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
|
|
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 ||
|
|
675
|
+
e in t || vt(t, e);
|
|
676
676
|
}), [e], t) : Oe(e);
|
|
677
677
|
}
|
|
678
|
-
function
|
|
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
|
|
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 =
|
|
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:
|
|
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 (
|
|
703
|
-
return r(
|
|
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 (
|
|
709
|
-
else if (
|
|
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
|
|
712
|
+
function bt(e) {
|
|
713
713
|
return e.scaleChannel !== void 0;
|
|
714
714
|
}
|
|
715
|
-
function
|
|
716
|
-
if (
|
|
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 (
|
|
724
|
+
if (It(e)) return {
|
|
725
725
|
kind: "datum",
|
|
726
726
|
value: e.datum
|
|
727
727
|
};
|
|
728
|
-
if (
|
|
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
|
|
735
|
-
let t =
|
|
736
|
-
return t.kind === "datum" || t.kind === "value" ? "constant|" +
|
|
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
|
|
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 + "|" +
|
|
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
|
|
747
|
-
let { domainKey: n, domainKeyBase: r } =
|
|
746
|
+
function wt(e, t) {
|
|
747
|
+
let { domainKey: n, domainKeyBase: r } = Ct({
|
|
748
748
|
scaleChannel: e.scaleChannel,
|
|
749
|
-
source:
|
|
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
|
|
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
|
|
760
|
+
case "value": return Et(e.value);
|
|
761
761
|
default: throw Error("Unknown domain key source.");
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
|
-
function
|
|
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
|
|
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 (
|
|
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 (
|
|
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
|
|
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:
|
|
810
|
-
predicate: s?.param ?
|
|
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
|
|
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
|
-
|
|
821
|
+
At(o) || (n[o] = Nt(Ot(o, a, t, e.paramRuntime), r));
|
|
822
822
|
}
|
|
823
823
|
return n;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function At(e) {
|
|
826
826
|
return e === "key" || e === "search" || e === "tooltip";
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function jt(e) {
|
|
829
829
|
return e.branches.map((e) => e.accessor);
|
|
830
830
|
}
|
|
831
|
-
function
|
|
831
|
+
function Mt(e) {
|
|
832
832
|
return e.branches.find((e) => !e.accessor.constant)?.accessor;
|
|
833
833
|
}
|
|
834
|
-
function
|
|
834
|
+
function Nt(e, t) {
|
|
835
835
|
if (e.length === 1) {
|
|
836
|
-
let n =
|
|
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) =>
|
|
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
|
|
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
|
|
862
|
+
function Ft(e) {
|
|
863
863
|
return e && "value" in e;
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function D(e) {
|
|
866
866
|
return e && "field" in e;
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function It(e) {
|
|
869
869
|
return e && "datum" in e;
|
|
870
870
|
}
|
|
871
871
|
function Lt(e) {
|
|
872
|
-
return
|
|
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 (
|
|
900
|
+
return (D(e) || It(e)) && "condition" in e;
|
|
901
901
|
}
|
|
902
902
|
function Wt(e) {
|
|
903
|
-
return
|
|
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
|
|
1771
|
+
return C(e) || ArrayBuffer.isView(e) ? e : null;
|
|
1772
1772
|
}
|
|
1773
1773
|
function ti(e) {
|
|
1774
|
-
return ei(e) || (
|
|
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
|
|
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:
|
|
1800
|
-
isBoolean:
|
|
1799
|
+
isArray: C,
|
|
1800
|
+
isBoolean: tt,
|
|
1801
1801
|
isDefined(e) {
|
|
1802
1802
|
return e !== void 0;
|
|
1803
1803
|
},
|
|
1804
|
-
isNumber:
|
|
1805
|
-
isObject:
|
|
1806
|
-
isRegExp:
|
|
1807
|
-
isString:
|
|
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:
|
|
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(
|
|
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
|
|
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?.[
|
|
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[
|
|
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) =>
|
|
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[
|
|
2023
|
-
for (let e of n ?? []) i.delete(e[
|
|
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[
|
|
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(
|
|
2036
|
-
if (Ei(t)) return `${r}.data.size == 0 ? ${n} : mapHasKey(${r}.data, datum[${JSON.stringify(
|
|
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 &&
|
|
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
|
-
|
|
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 };
|