@abi-software/flatmapvuer 1.20.1-demo.2 → 1.21.1-demo.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/dist/flatmapvuer.js +334 -273
- package/dist/flatmapvuer.umd.cjs +14 -14
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/FlatmapVuer.vue +32 -6
- package/src/components/legends/DynamicLegends.vue +2 -0
- package/src/services/flatmapQueries.js +408 -353
package/dist/flatmapvuer.js
CHANGED
|
@@ -8378,7 +8378,10 @@ var v_ = /*#__PURE__*/ i_(m_, [["render", __], ["__scopeId", "data-v-c4555054"]]
|
|
|
8378
8378
|
name: "DynamicLegends",
|
|
8379
8379
|
components: { LegendItem: v_ },
|
|
8380
8380
|
directives: { helpMode: Pe },
|
|
8381
|
-
inject: {
|
|
8381
|
+
inject: {
|
|
8382
|
+
openHelpModeDrawer: { default: () => () => {} },
|
|
8383
|
+
restoreHelpModeDrawer: { default: () => () => {} }
|
|
8384
|
+
},
|
|
8382
8385
|
props: {
|
|
8383
8386
|
identifierKey: {
|
|
8384
8387
|
type: String,
|
|
@@ -8464,7 +8467,8 @@ function S_(e, n, r, i, a, o) {
|
|
|
8464
8467
|
title: "Featured dataset marker",
|
|
8465
8468
|
description: "Shows the location of the featured dataset on the map.",
|
|
8466
8469
|
placement: "right",
|
|
8467
|
-
onEnter: o.openHelpModeDrawer
|
|
8470
|
+
onEnter: o.openHelpModeDrawer,
|
|
8471
|
+
onLeave: o.restoreHelpModeDrawer
|
|
8468
8472
|
}]])]),
|
|
8469
8473
|
_: 2
|
|
8470
8474
|
}, 1032, ["visible"])) : (M(), c(s, {
|
|
@@ -8480,7 +8484,7 @@ function S_(e, n, r, i, a, o) {
|
|
|
8480
8484
|
"showStarInLegend"
|
|
8481
8485
|
]))], 8, x_))), 128))]);
|
|
8482
8486
|
}
|
|
8483
|
-
var C_ = /*#__PURE__*/ i_(y_, [["render", S_], ["__scopeId", "data-v-
|
|
8487
|
+
var C_ = /*#__PURE__*/ i_(y_, [["render", S_], ["__scopeId", "data-v-c6006932"]]), w_ = {
|
|
8484
8488
|
name: "FlatmapError",
|
|
8485
8489
|
props: { flatmapError: {
|
|
8486
8490
|
type: Object,
|
|
@@ -8509,83 +8513,142 @@ function j_(e, n, r, i, a, o) {
|
|
|
8509
8513
|
]);
|
|
8510
8514
|
}
|
|
8511
8515
|
var M_ = /*#__PURE__*/ i_(w_, [["render", j_], ["__scopeId", "data-v-3238f52a"]]), N_ = "<div class=\"flatmap-marker\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"28\" height=\"39\" viewBox=\"-1 -1 27 42\">\n <ellipse style=\"fill: rgb(0, 0, 0); fill-opacity: 0.2;\" cx=\"12\" cy=\"36\" rx=\"8\" ry=\"4\"></ellipse>\n <path d=\"M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0\n C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z\" style=\"fill:#EE5900;stroke:#fff;stroke-width:1\"></path>\n <circle cx=\"12.5\" cy=\"12.5\" r=\"9\" fill=\"#fff\"></circle>\n <text x=\"12\" y=\"17.5\" style=\"font-size:14px;fill:#000;text-anchor:middle\">2</text>\n </svg>\n</div>", P_ = function(e) {
|
|
8512
|
-
|
|
8516
|
+
if (!e) return [];
|
|
8517
|
+
let t = /* @__PURE__ */ new Set();
|
|
8518
|
+
return e.filter((e) => {
|
|
8519
|
+
let n = JSON.stringify(e);
|
|
8520
|
+
return !t.has(n) && (t.add(n), !0);
|
|
8521
|
+
});
|
|
8513
8522
|
}, F_ = function(e) {
|
|
8523
|
+
return new Set((e || []).map((e) => JSON.stringify(e)));
|
|
8524
|
+
}, I_ = function(e) {
|
|
8514
8525
|
if (!e) return [];
|
|
8515
8526
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
8516
8527
|
return e.forEach((e) => {
|
|
8517
8528
|
let { id: r, name: i } = e, a = `${r.toLowerCase()}:${i.toLowerCase()}`;
|
|
8518
8529
|
t.has(a) || (t.add(a), n.push(e));
|
|
8519
8530
|
}), n;
|
|
8520
|
-
},
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8531
|
+
}, L_ = /* @__PURE__ */ new Map(), R_ = /* @__PURE__ */ new Map(), z_ = 100, B_ = /* @__PURE__ */ new Map(), V_ = function(e, t) {
|
|
8532
|
+
if (B_.has(e)) {
|
|
8533
|
+
let t = B_.get(e);
|
|
8534
|
+
return B_.delete(e), B_.set(e, t), t;
|
|
8535
|
+
}
|
|
8536
|
+
let n = t().catch((t) => {
|
|
8537
|
+
throw B_.get(e) === n && B_.delete(e), t;
|
|
8538
|
+
});
|
|
8539
|
+
return B_.set(e, n), B_.size > z_ && B_.delete(B_.keys().next().value), n;
|
|
8540
|
+
}, H_ = async function(e, t) {
|
|
8541
|
+
let n = [...new Set(t)], r = n.filter((e) => !L_.has(e) && !R_.has(e));
|
|
8542
|
+
if (r.length) {
|
|
8543
|
+
let t = e.queryLabels(r).then((e) => {
|
|
8544
|
+
(e || []).forEach((e) => {
|
|
8545
|
+
let { entity: t, label: n } = e;
|
|
8546
|
+
n === "Mammalia" && (n = "Mammalia not otherwise specified"), L_.set(t, n);
|
|
8547
|
+
});
|
|
8548
|
+
}).finally(() => {
|
|
8549
|
+
r.forEach((e) => R_.delete(e));
|
|
8550
|
+
});
|
|
8551
|
+
r.forEach((e) => R_.set(e, t));
|
|
8552
|
+
}
|
|
8553
|
+
let i = new Set(n.map((e) => R_.get(e)).filter(Boolean));
|
|
8554
|
+
return await Promise.all(i), n.filter((e) => L_.has(e)).map((e) => ({
|
|
8555
|
+
taxon: e,
|
|
8556
|
+
label: L_.get(e)
|
|
8557
|
+
}));
|
|
8558
|
+
}, U_ = (e, t) => {
|
|
8539
8559
|
let n = e.name ?? e, r = t.name ?? t, i = n.toUpperCase(), a = r.toUpperCase();
|
|
8540
8560
|
return i < a ? -1 : +(i > a);
|
|
8541
|
-
},
|
|
8561
|
+
}, W_ = function() {
|
|
8562
|
+
return {
|
|
8563
|
+
destinations: [],
|
|
8564
|
+
origins: [],
|
|
8565
|
+
components: [],
|
|
8566
|
+
destinationsWithDatasets: [],
|
|
8567
|
+
originsWithDatasets: [],
|
|
8568
|
+
componentsWithDatasets: [],
|
|
8569
|
+
destinationsCombinations: [],
|
|
8570
|
+
originsCombinations: [],
|
|
8571
|
+
componentsCombinations: [],
|
|
8572
|
+
singleConnectivityList: [],
|
|
8573
|
+
rawURLs: [],
|
|
8574
|
+
expertConsultants: []
|
|
8575
|
+
};
|
|
8576
|
+
}, G_ = function(e, t, n, r) {
|
|
8577
|
+
let { sckanNodeId: i, sckanNodeLabel: a, mapNodeId: o, mapNodeLabel: s } = n;
|
|
8578
|
+
e.push({
|
|
8579
|
+
sckanId: i,
|
|
8580
|
+
sckanLabel: a,
|
|
8581
|
+
mapId: o,
|
|
8582
|
+
mapLabel: s
|
|
8583
|
+
}), o.forEach((e, n) => {
|
|
8584
|
+
let i = typeof e == "string" ? e : e[0];
|
|
8585
|
+
i && t.push({
|
|
8586
|
+
id: i,
|
|
8587
|
+
name: r[n]
|
|
8588
|
+
});
|
|
8589
|
+
});
|
|
8590
|
+
}, K_ = function() {
|
|
8542
8591
|
this.initialise = function(e) {
|
|
8543
|
-
this.flatmapAPI = e,
|
|
8544
|
-
}, this.
|
|
8545
|
-
let n;
|
|
8546
|
-
n = t.feature.hyperlinks && t.feature.hyperlinks.length > 0 ? t.feature.hyperlinks : this.rawURLs;
|
|
8592
|
+
this.flatmapAPI = e, Object.assign(this, W_()), this.hasSingleConnectivityList = !1, this.controller = void 0, this.uberons = [], this.lookUp = [], this.connectivitySource = "map", this.noMapConnectivity = !1, this._requestId = 0;
|
|
8593
|
+
}, this._buildTooltipData = async function(e, t, n) {
|
|
8547
8594
|
let r;
|
|
8548
|
-
|
|
8549
|
-
|
|
8595
|
+
r = n.feature?.hyperlinks && n.feature.hyperlinks.length > 0 ? n.feature.hyperlinks : e.rawURLs;
|
|
8596
|
+
let i;
|
|
8597
|
+
if (n.provenanceTaxonomy) {
|
|
8598
|
+
i = [];
|
|
8550
8599
|
try {
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
let { label: t } = e;
|
|
8554
|
-
r.push(t);
|
|
8600
|
+
(await H_(t, n.provenanceTaxonomy)).forEach((e) => {
|
|
8601
|
+
i.push(e.label);
|
|
8555
8602
|
});
|
|
8556
8603
|
} catch (e) {
|
|
8557
8604
|
console.log(e);
|
|
8558
8605
|
}
|
|
8559
8606
|
}
|
|
8560
8607
|
return {
|
|
8561
|
-
destinations:
|
|
8562
|
-
origins:
|
|
8563
|
-
components:
|
|
8564
|
-
destinationsWithDatasets:
|
|
8565
|
-
originsWithDatasets:
|
|
8566
|
-
componentsWithDatasets:
|
|
8567
|
-
destinationsCombinations:
|
|
8568
|
-
originsCombinations:
|
|
8569
|
-
componentsCombinations:
|
|
8570
|
-
hasSingleConnectivityList:
|
|
8571
|
-
title:
|
|
8572
|
-
featureId:
|
|
8573
|
-
hyperlinks:
|
|
8574
|
-
"expert-consultants":
|
|
8575
|
-
provenanceTaxonomy:
|
|
8576
|
-
provenanceTaxonomyLabel:
|
|
8577
|
-
connectivitySource:
|
|
8578
|
-
noMapConnectivity:
|
|
8608
|
+
destinations: e.destinations,
|
|
8609
|
+
origins: e.origins,
|
|
8610
|
+
components: e.components,
|
|
8611
|
+
destinationsWithDatasets: I_(e.destinationsWithDatasets),
|
|
8612
|
+
originsWithDatasets: I_(e.originsWithDatasets),
|
|
8613
|
+
componentsWithDatasets: I_(e.componentsWithDatasets),
|
|
8614
|
+
destinationsCombinations: e.destinationsCombinations,
|
|
8615
|
+
originsCombinations: e.originsCombinations,
|
|
8616
|
+
componentsCombinations: e.componentsCombinations,
|
|
8617
|
+
hasSingleConnectivityList: e.singleConnectivityList.length > 0,
|
|
8618
|
+
title: n.label,
|
|
8619
|
+
featureId: n.resource,
|
|
8620
|
+
hyperlinks: r,
|
|
8621
|
+
"expert-consultants": e.expertConsultants,
|
|
8622
|
+
provenanceTaxonomy: n.provenanceTaxonomy,
|
|
8623
|
+
provenanceTaxonomyLabel: i,
|
|
8624
|
+
connectivitySource: e.connectivitySource,
|
|
8625
|
+
noMapConnectivity: e.noMapConnectivity
|
|
8626
|
+
};
|
|
8627
|
+
}, this.createTooltipData = async function(e, t) {
|
|
8628
|
+
return this._buildTooltipData(this, e, t);
|
|
8629
|
+
}, this.queryTooltipData = async function(e, t) {
|
|
8630
|
+
let n = t.resource, r = {
|
|
8631
|
+
...W_(),
|
|
8632
|
+
connectivitySource: "map",
|
|
8633
|
+
noMapConnectivity: !1
|
|
8579
8634
|
};
|
|
8635
|
+
if (n && n.length > 0 && n[0]) {
|
|
8636
|
+
let { state: t } = await this._fetchConnectivity(e, n[0], "map", !0);
|
|
8637
|
+
r = {
|
|
8638
|
+
...r,
|
|
8639
|
+
...t
|
|
8640
|
+
};
|
|
8641
|
+
}
|
|
8642
|
+
return this._buildTooltipData(r, e, t);
|
|
8580
8643
|
}, this.updateTooltipData = function(e) {
|
|
8581
8644
|
return {
|
|
8582
8645
|
...e,
|
|
8583
8646
|
origins: this.origins,
|
|
8584
|
-
originsWithDatasets:
|
|
8647
|
+
originsWithDatasets: I_(this.originsWithDatasets),
|
|
8585
8648
|
components: this.components,
|
|
8586
|
-
componentsWithDatasets:
|
|
8649
|
+
componentsWithDatasets: I_(this.componentsWithDatasets),
|
|
8587
8650
|
destinations: this.destinations,
|
|
8588
|
-
destinationsWithDatasets:
|
|
8651
|
+
destinationsWithDatasets: I_(this.destinationsWithDatasets),
|
|
8589
8652
|
destinationsCombinations: this.destinationsCombinations,
|
|
8590
8653
|
originsCombinations: this.originsCombinations,
|
|
8591
8654
|
componentsCombinations: this.componentsCombinations,
|
|
@@ -8597,17 +8660,21 @@ var M_ = /*#__PURE__*/ i_(w_, [["render", j_], ["__scopeId", "data-v-3238f52a"]]
|
|
|
8597
8660
|
return e.forEach((e) => {
|
|
8598
8661
|
n.push(this.createLabelFromNeuralNode(e[0]), t), e.length === 2 && n.push(this.createLabelFromNeuralNode(e[1]), t);
|
|
8599
8662
|
}), n;
|
|
8600
|
-
}, this.
|
|
8601
|
-
let n = {};
|
|
8602
|
-
|
|
8603
|
-
|
|
8604
|
-
|
|
8605
|
-
let { taxon: t, label: r } = e;
|
|
8606
|
-
n[t] = r, this.uberons.push({
|
|
8663
|
+
}, this._buildLabelLookup = async function(e, t) {
|
|
8664
|
+
let n = {}, r = [];
|
|
8665
|
+
return (await H_(e, t)).forEach((e) => {
|
|
8666
|
+
let { taxon: t, label: i } = e;
|
|
8667
|
+
n[t] = i, r.push({
|
|
8607
8668
|
id: t,
|
|
8608
|
-
name:
|
|
8669
|
+
name: i
|
|
8609
8670
|
});
|
|
8610
|
-
}),
|
|
8671
|
+
}), {
|
|
8672
|
+
lookUp: n,
|
|
8673
|
+
uberons: r
|
|
8674
|
+
};
|
|
8675
|
+
}, this.createLabelLookup = async function(e, t) {
|
|
8676
|
+
let { lookUp: n, uberons: r } = await this._buildLabelLookup(e, t);
|
|
8677
|
+
return this.uberons = r, n;
|
|
8611
8678
|
}, this.buildConnectivitySqlStatement = function(e) {
|
|
8612
8679
|
let t = "select knowledge from knowledge where entity in (";
|
|
8613
8680
|
if (e.length === 1) t += `'${e[0]}')`;
|
|
@@ -8619,48 +8686,43 @@ var M_ = /*#__PURE__*/ i_(w_, [["render", j_], ["__scopeId", "data-v-3238f52a"]]
|
|
|
8619
8686
|
else if (e.length > 1) for (let n in e) t += `'${e[n]}'${n >= e.length - 1 ? ")" : ","} `;
|
|
8620
8687
|
return t;
|
|
8621
8688
|
}, this.findAllIdsFromConnectivity = function(e) {
|
|
8622
|
-
|
|
8623
|
-
return n.forEach((e) => {
|
|
8624
|
-
Array.isArray(e) ? r.push(e.flat()) : r.push(e);
|
|
8625
|
-
}), [...new Set(r.flat())];
|
|
8689
|
+
return [...new Set(e.connectivity.flat(3))];
|
|
8626
8690
|
}, this.flattenConnectivity = function(e) {
|
|
8627
|
-
|
|
8628
|
-
return n.forEach((e) => {
|
|
8629
|
-
Array.isArray(e) ? r.push(e.flat()) : r.push(e);
|
|
8630
|
-
}), r.flat();
|
|
8691
|
+
return e.flat(3);
|
|
8631
8692
|
}, this.findComponents = function(e, t, n, r) {
|
|
8632
|
-
let i = P_(e.connectivity.flat()), a = [
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8693
|
+
let i = P_(e.connectivity.flat()), a = [
|
|
8694
|
+
t,
|
|
8695
|
+
r,
|
|
8696
|
+
n
|
|
8697
|
+
].filter((e) => e).map((e) => JSON.stringify(e));
|
|
8698
|
+
return i.filter((e) => {
|
|
8699
|
+
let t = JSON.stringify(e);
|
|
8700
|
+
return !a.some((e) => e.indexOf(t) !== -1);
|
|
8701
|
+
});
|
|
8636
8702
|
}, this.retrieveFlatmapKnowledgeForEvent = async function(e, t) {
|
|
8637
|
-
this.controller && this.controller.abort(), this.controller = new AbortController()
|
|
8703
|
+
this.controller && this.controller.abort(), this.controller = new AbortController(), this._requestId++;
|
|
8638
8704
|
let n = t.resource;
|
|
8639
|
-
if (
|
|
8640
|
-
let r = await this.queryForConnectivityNew(e, n[0]);
|
|
8641
|
-
return await Promise.all([r]);
|
|
8705
|
+
if (Object.assign(this, W_()), !(!n || n.length === 0 || !n[0])) return [await this.queryForConnectivityNew(e, n[0])];
|
|
8642
8706
|
}, this.queryForConnectivityNew = async function(e, t, n = "map", r = !0) {
|
|
8643
|
-
let i =
|
|
8644
|
-
return this.
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
});
|
|
8663
|
-
});
|
|
8707
|
+
let i = ++this._requestId, { state: a, value: o } = await this._fetchConnectivity(e, t, n, r);
|
|
8708
|
+
return i === this._requestId && Object.assign(this, a), o;
|
|
8709
|
+
}, this._fetchConnectivity = async function(e, t, n, r) {
|
|
8710
|
+
let i = /^sckan-(\d{4})/.exec(e.knowledgeSource || ""), a = (i ? Number(i[1]) : 0) >= 2026, o = e.mapMetadata.uuid, s = this.flatmapAPI, c = W_();
|
|
8711
|
+
c.connectivitySource = a ? "sckan" : n;
|
|
8712
|
+
let l = a ? V_(`cq27|${s}|${o}|${t}`, () => Fe(s, o, t)).catch(() => []) : Promise.resolve([]), u = () => V_(`sckan|${s}|${o}|${t}`, () => e.queryKnowledge(t)), d = c.connectivitySource === "map" ? V_(`map|${s}|${o}|${t}`, () => this.queryMapConnectivity(o, t)) : u(), f = !1;
|
|
8713
|
+
try {
|
|
8714
|
+
let t = await d;
|
|
8715
|
+
if (c.singleConnectivityList = await l, this.checkConnectivityExists(t) ? c.connectivitySource === "map" && (c.noMapConnectivity = !1) : c.connectivitySource === "map" ? (c.connectivitySource = "sckan", c.noMapConnectivity = !0, t = await u().catch(() => void 0)) : t = void 0, this.checkConnectivityExists(t) && (f = t, r)) {
|
|
8716
|
+
let n = await this._processConnectivity(e, t, c.singleConnectivityList);
|
|
8717
|
+
Object.assign(c, n.state), f = n.value, t.references && (c.rawURLs = [...t.references]), t["expert-consultants"] && (c.expertConsultants = [...t["expert-consultants"]]);
|
|
8718
|
+
}
|
|
8719
|
+
} catch (e) {
|
|
8720
|
+
c.singleConnectivityList = await l, e.name === "AbortError" || console.warn(`Unable to get the knowledge for the entity ${t}.`), f = !1;
|
|
8721
|
+
}
|
|
8722
|
+
return {
|
|
8723
|
+
state: c,
|
|
8724
|
+
value: f
|
|
8725
|
+
};
|
|
8664
8726
|
}, this.queryMapConnectivity = async function(e, t) {
|
|
8665
8727
|
let n = this.flatmapAPI + `flatmap/${e}/connectivity/${t}`;
|
|
8666
8728
|
try {
|
|
@@ -8683,7 +8745,7 @@ var M_ = /*#__PURE__*/ i_(w_, [["render", j_], ["__scopeId", "data-v-3238f52a"]]
|
|
|
8683
8745
|
let i = JSON.parse(n.values[0][0]);
|
|
8684
8746
|
r ? this.processConnectivity(e, i).then((e) => {
|
|
8685
8747
|
t(e);
|
|
8686
|
-
}) : t(i);
|
|
8748
|
+
}).catch(() => t(!1)) : t(i);
|
|
8687
8749
|
} else t(!1);
|
|
8688
8750
|
}).catch((e) => {
|
|
8689
8751
|
e.name === "AbortError" || console.error("Error:", e), t(!1);
|
|
@@ -8692,7 +8754,11 @@ var M_ = /*#__PURE__*/ i_(w_, [["render", j_], ["__scopeId", "data-v-3238f52a"]]
|
|
|
8692
8754
|
}, this.checkConnectivityExists = function(e) {
|
|
8693
8755
|
return e && e.connectivity?.length;
|
|
8694
8756
|
}, this.connectivityExists = function(e) {
|
|
8695
|
-
|
|
8757
|
+
if (e.values && e.values.length > 0) {
|
|
8758
|
+
let t = JSON.parse(e.values[0][0]).connectivity;
|
|
8759
|
+
return !!(t && t.length > 0);
|
|
8760
|
+
}
|
|
8761
|
+
return !1;
|
|
8696
8762
|
}, this.findIfNodeIsSingle = function(e) {
|
|
8697
8763
|
return e.length === 1 ? (console.error("Server returns a single node", e), e[0]) : e.length === 2 && e[1].length === 0 && e[0];
|
|
8698
8764
|
}, this.createLabelFromNeuralNode = function(e, t) {
|
|
@@ -8702,69 +8768,57 @@ var M_ = /*#__PURE__*/ i_(w_, [["render", j_], ["__scopeId", "data-v-3238f52a"]]
|
|
|
8702
8768
|
return e.length === 2 && e[1].length > 0 && e[1].forEach((e) => {
|
|
8703
8769
|
t[e] == null ? r += `, ${e}` : r += `, ${t[e]}`;
|
|
8704
8770
|
}), r;
|
|
8705
|
-
}, this.
|
|
8706
|
-
let
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8710
|
-
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
|
|
8714
|
-
|
|
8715
|
-
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
});
|
|
8720
|
-
})), e.find((e) => JSON.stringify(e) === JSON.stringify(i)) && (this.originsCombinations.push({
|
|
8721
|
-
sckanId: i,
|
|
8722
|
-
sckanLabel: a,
|
|
8723
|
-
mapId: o,
|
|
8724
|
-
mapLabel: s
|
|
8725
|
-
}), o.forEach((e, t) => {
|
|
8726
|
-
let n = typeof e == "string" ? e : e[0];
|
|
8727
|
-
n && this.originsWithDatasets.push({
|
|
8728
|
-
id: n,
|
|
8729
|
-
name: s.split(",")[t]
|
|
8730
|
-
});
|
|
8731
|
-
})), t.find((e) => JSON.stringify(e) === JSON.stringify(i)) && (this.componentsCombinations.push({
|
|
8732
|
-
sckanId: i,
|
|
8733
|
-
sckanLabel: a,
|
|
8734
|
-
mapId: o,
|
|
8735
|
-
mapLabel: s
|
|
8736
|
-
}), o.forEach((e, t) => {
|
|
8737
|
-
let n = typeof e == "string" ? e : e[0];
|
|
8738
|
-
n && this.componentsWithDatasets.push({
|
|
8739
|
-
id: n,
|
|
8740
|
-
name: s.split(",")[t]
|
|
8741
|
-
});
|
|
8742
|
-
}));
|
|
8743
|
-
});
|
|
8744
|
-
}, this.processConnectivity = function(e, t) {
|
|
8745
|
-
return new Promise((n) => {
|
|
8746
|
-
let r = [], i = [], a;
|
|
8747
|
-
t && t["node-phenotypes"] ? (["ilxtr:hasSomaLocatedIn"].forEach((e) => {
|
|
8748
|
-
e in t["node-phenotypes"] && r.push(...t["node-phenotypes"][e]);
|
|
8749
|
-
}), r = P_(r), ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"].forEach((e) => {
|
|
8750
|
-
e in t["node-phenotypes"] && i.push(...t["node-phenotypes"][e]);
|
|
8751
|
-
}), i = P_(i)) : (i = P_(t.axons), t.somas && t.somas.length > 0 && r.push(...t.somas), t.dendrites && t.dendrites.length > 0 && r.push(...t.dendrites), r = P_(r), a = t.somas);
|
|
8752
|
-
let o = this.findComponents(t, i, r, a), s = this.findAllIdsFromConnectivity(t);
|
|
8753
|
-
this.createLabelLookup(e, s).then((e) => {
|
|
8754
|
-
this.origins = r.map((t) => this.createLabelFromNeuralNode(t, e)).sort(z_), this.components = o.map((t) => this.createLabelFromNeuralNode(t, e)).sort(z_), this.destinations = i.map((t) => this.createLabelFromNeuralNode(t, e)).sort(z_), this.flattenAndFindDatasets(r, o, i), n({
|
|
8755
|
-
ids: {
|
|
8756
|
-
dendrites: r,
|
|
8757
|
-
components: o,
|
|
8758
|
-
axons: i
|
|
8759
|
-
},
|
|
8760
|
-
labels: {
|
|
8761
|
-
origins: this.origins,
|
|
8762
|
-
components: this.components,
|
|
8763
|
-
destinations: this.destinations
|
|
8764
|
-
}
|
|
8765
|
-
});
|
|
8771
|
+
}, this._findDatasets = function(e, t, n, r, i) {
|
|
8772
|
+
let a = new Set(this.flattenConnectivity(e)), o = new Set(this.flattenConnectivity(t)), s = new Set(this.flattenConnectivity(n)), c = {
|
|
8773
|
+
originsWithDatasets: r.filter((e) => a.has(e.id)).sort(U_),
|
|
8774
|
+
componentsWithDatasets: r.filter((e) => o.has(e.id)).sort(U_),
|
|
8775
|
+
destinationsWithDatasets: r.filter((e) => s.has(e.id)).sort(U_),
|
|
8776
|
+
destinationsCombinations: [],
|
|
8777
|
+
originsCombinations: [],
|
|
8778
|
+
componentsCombinations: []
|
|
8779
|
+
};
|
|
8780
|
+
if (i.length > 0) {
|
|
8781
|
+
let r = F_(n), a = F_(e), o = F_(t);
|
|
8782
|
+
i.forEach((e) => {
|
|
8783
|
+
let t = JSON.stringify(e.sckanNodeId), n = e.mapNodeLabel.split(",");
|
|
8784
|
+
r.has(t) && G_(c.destinationsCombinations, c.destinationsWithDatasets, e, n), a.has(t) && G_(c.originsCombinations, c.originsWithDatasets, e, n), o.has(t) && G_(c.componentsCombinations, c.componentsWithDatasets, e, n);
|
|
8766
8785
|
});
|
|
8767
|
-
}
|
|
8786
|
+
}
|
|
8787
|
+
return c;
|
|
8788
|
+
}, this.flattenAndFindDatasets = function(e, t, n) {
|
|
8789
|
+
Object.assign(this, this._findDatasets(e, t, n, this.uberons, this.singleConnectivityList));
|
|
8790
|
+
}, this._processConnectivity = async function(e, t, n) {
|
|
8791
|
+
let r = [], i = [], a;
|
|
8792
|
+
t && t["node-phenotypes"] ? (["ilxtr:hasSomaLocatedIn"].forEach((e) => {
|
|
8793
|
+
e in t["node-phenotypes"] && r.push(...t["node-phenotypes"][e]);
|
|
8794
|
+
}), r = P_(r), ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"].forEach((e) => {
|
|
8795
|
+
e in t["node-phenotypes"] && i.push(...t["node-phenotypes"][e]);
|
|
8796
|
+
}), i = P_(i)) : (i = P_(t.axons), t.somas && t.somas.length > 0 && r.push(...t.somas), t.dendrites && t.dendrites.length > 0 && r.push(...t.dendrites), r = P_(r), a = t.somas);
|
|
8797
|
+
let o = this.findComponents(t, i, r, a), s = this.findAllIdsFromConnectivity(t), { lookUp: c, uberons: l } = await this._buildLabelLookup(e, s), u = r.map((e) => this.createLabelFromNeuralNode(e, c)).sort(U_), d = o.map((e) => this.createLabelFromNeuralNode(e, c)).sort(U_), f = i.map((e) => this.createLabelFromNeuralNode(e, c)).sort(U_);
|
|
8798
|
+
return {
|
|
8799
|
+
state: {
|
|
8800
|
+
uberons: l,
|
|
8801
|
+
origins: u,
|
|
8802
|
+
components: d,
|
|
8803
|
+
destinations: f,
|
|
8804
|
+
...this._findDatasets(r, o, i, l, n)
|
|
8805
|
+
},
|
|
8806
|
+
value: {
|
|
8807
|
+
ids: {
|
|
8808
|
+
dendrites: r,
|
|
8809
|
+
components: o,
|
|
8810
|
+
axons: i
|
|
8811
|
+
},
|
|
8812
|
+
labels: {
|
|
8813
|
+
origins: u,
|
|
8814
|
+
components: d,
|
|
8815
|
+
destinations: f
|
|
8816
|
+
}
|
|
8817
|
+
}
|
|
8818
|
+
};
|
|
8819
|
+
}, this.processConnectivity = async function(e, t) {
|
|
8820
|
+
let { state: n, value: r } = await this._processConnectivity(e, t, this.singleConnectivityList);
|
|
8821
|
+
return Object.assign(this, n), r;
|
|
8768
8822
|
}, this.buildPubmedSqlStatement = function(e) {
|
|
8769
8823
|
let t = "select distinct publication from publications where entity in (";
|
|
8770
8824
|
if (e.length === 1) t += `'${e[0]}')`;
|
|
@@ -8789,7 +8843,7 @@ var M_ = /*#__PURE__*/ i_(w_, [["render", j_], ["__scopeId", "data-v-3238f52a"]]
|
|
|
8789
8843
|
};
|
|
8790
8844
|
//#endregion
|
|
8791
8845
|
//#region src/services/flatmapKnowledge.js
|
|
8792
|
-
async function
|
|
8846
|
+
async function q_(e) {
|
|
8793
8847
|
let t = sessionStorage.getItem("flatmap-knowledge");
|
|
8794
8848
|
if (t) {
|
|
8795
8849
|
let n = JSON.parse(t).filter((e) => e.references && e.references.length).filter((t) => t.references.includes(e));
|
|
@@ -8797,16 +8851,16 @@ async function V_(e) {
|
|
|
8797
8851
|
}
|
|
8798
8852
|
return [];
|
|
8799
8853
|
}
|
|
8800
|
-
async function
|
|
8854
|
+
async function J_(e, t, n) {
|
|
8801
8855
|
let r = `select knowledge from knowledge
|
|
8802
|
-
where source="${
|
|
8856
|
+
where source="${Y_(e)}" and
|
|
8803
8857
|
knowledge like "%${t}%" order by source desc`;
|
|
8804
8858
|
return (await n.queryKnowledge(r)).map((e) => JSON.parse(e)).map((e) => e.id);
|
|
8805
8859
|
}
|
|
8806
|
-
function
|
|
8807
|
-
return
|
|
8860
|
+
function Y_(e) {
|
|
8861
|
+
return X_(e.mapMetadata);
|
|
8808
8862
|
}
|
|
8809
|
-
function
|
|
8863
|
+
function X_(e) {
|
|
8810
8864
|
let t = "";
|
|
8811
8865
|
if (e?.connectivity) {
|
|
8812
8866
|
let n = e.connectivity;
|
|
@@ -8814,23 +8868,23 @@ function W_(e) {
|
|
|
8814
8868
|
}
|
|
8815
8869
|
return t;
|
|
8816
8870
|
}
|
|
8817
|
-
async function
|
|
8818
|
-
let n =
|
|
8871
|
+
async function Z_(e, t) {
|
|
8872
|
+
let n = Y_(e), r = `select knowledge from knowledge
|
|
8819
8873
|
where source="${n}"
|
|
8820
8874
|
order by source desc`;
|
|
8821
|
-
|
|
8875
|
+
ev();
|
|
8822
8876
|
let i = sessionStorage.getItem("flatmap-knowledge"), a = sessionStorage.getItem("flatmap-knowledge-source");
|
|
8823
8877
|
if (!i || a !== n) {
|
|
8824
8878
|
let e = (await t.queryKnowledge(r)).map((e) => JSON.parse(e));
|
|
8825
|
-
return sessionStorage.setItem("flatmap-knowledge", JSON.stringify(e)), sessionStorage.setItem("flatmap-knowledge-source", n),
|
|
8879
|
+
return sessionStorage.setItem("flatmap-knowledge", JSON.stringify(e)), sessionStorage.setItem("flatmap-knowledge-source", n), Q_(), e;
|
|
8826
8880
|
}
|
|
8827
8881
|
return JSON.parse(i);
|
|
8828
8882
|
}
|
|
8829
|
-
function
|
|
8883
|
+
function Q_() {
|
|
8830
8884
|
let e = (/* @__PURE__ */ new Date()).getTime() + 864e5;
|
|
8831
8885
|
sessionStorage.setItem("flatmap-knowledge-expiry", e);
|
|
8832
8886
|
}
|
|
8833
|
-
function
|
|
8887
|
+
function $_() {
|
|
8834
8888
|
[
|
|
8835
8889
|
"flatmap-knowledge",
|
|
8836
8890
|
"flatmap-knowledge-expiry",
|
|
@@ -8839,26 +8893,26 @@ function q_() {
|
|
|
8839
8893
|
sessionStorage.removeItem(e);
|
|
8840
8894
|
});
|
|
8841
8895
|
}
|
|
8842
|
-
function
|
|
8896
|
+
function ev() {
|
|
8843
8897
|
let e = sessionStorage.getItem("flatmap-knowledge-expiry");
|
|
8844
|
-
(/* @__PURE__ */ new Date()).getTime() > e &&
|
|
8898
|
+
(/* @__PURE__ */ new Date()).getTime() > e && $_();
|
|
8845
8899
|
}
|
|
8846
8900
|
//#endregion
|
|
8847
8901
|
//#region src/components/utilities.js
|
|
8848
|
-
var
|
|
8902
|
+
var tv = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), nv = (e) => {
|
|
8849
8903
|
if (e == null) return [];
|
|
8850
|
-
if (Array.isArray(e)) return e.flatMap((e) =>
|
|
8904
|
+
if (Array.isArray(e)) return e.flatMap((e) => nv(e));
|
|
8851
8905
|
if (typeof e == "string") {
|
|
8852
8906
|
let t = e.trim();
|
|
8853
8907
|
if (!t) return [];
|
|
8854
8908
|
try {
|
|
8855
8909
|
let n = JSON.parse(t);
|
|
8856
|
-
if (n !== e) return
|
|
8910
|
+
if (n !== e) return nv(n);
|
|
8857
8911
|
} catch {}
|
|
8858
8912
|
return [t];
|
|
8859
8913
|
}
|
|
8860
8914
|
return typeof e == "number" || typeof e == "boolean" ? [String(e)] : [];
|
|
8861
|
-
},
|
|
8915
|
+
}, rv = "<svg width=\"195px\" height=\"24px\" viewBox=\"0 0 200 24\" fill=\"yellow\"><path d=\"M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z\" stroke=\"#000000\" stroke-width=\"2\"/><text x=\"47\" y=\"52%\" style=\"white-space: pre\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Asap, sans-serif\" font-size=\"12\" fill=\"#333333\">Featured dataset marker</text></svg>", iv = /* @__PURE__ */ Xe((/* @__PURE__ */ Je(((e, t) => {
|
|
8862
8916
|
(function(n, r) {
|
|
8863
8917
|
typeof define == "function" && define.amd ? define(r) : typeof e == "object" ? t.exports = r() : n.ResizeSensor = r();
|
|
8864
8918
|
})(typeof window < "u" ? window : e, function() {
|
|
@@ -9004,26 +9058,26 @@ var Y_ = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), X_ = (e) => {
|
|
|
9004
9058
|
}
|
|
9005
9059
|
return o;
|
|
9006
9060
|
});
|
|
9007
|
-
})))()),
|
|
9061
|
+
})))()), av = Re, ov = "#1b7f6b", sv = "#f4f1de", cv = "#12312b", lv = "99+", uv = function(e) {
|
|
9008
9062
|
return (Array.isArray(e) ? e : []).map((e) => ({
|
|
9009
9063
|
label: String(e?.label || "").trim(),
|
|
9010
9064
|
curie: String(e?.curie || "").trim(),
|
|
9011
9065
|
count: Number(e?.count || 0)
|
|
9012
9066
|
})).filter((e) => e.curie && e.count > 0);
|
|
9013
|
-
},
|
|
9014
|
-
return e > 99 ?
|
|
9015
|
-
},
|
|
9067
|
+
}, dv = function(e) {
|
|
9068
|
+
return e > 99 ? lv : String(e);
|
|
9069
|
+
}, fv = function(e) {
|
|
9016
9070
|
let t = document.createElement("div");
|
|
9017
9071
|
return t.className = "flatmapvuer-soma-location-marker", t.title = e.label || e.curie, t.style.width = "34px", t.style.height = "48px", t.style.display = "flex", t.style.alignItems = "center", t.style.justifyContent = "center", t.style.transform = "translate(-50%, -100%)", t.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 27 42" width="34" height="48" aria-hidden="true">
|
|
9018
9072
|
<ellipse style="fill: rgb(0, 0, 0); fill-opacity: 0.18;" cx="12" cy="36" rx="8" ry="4"/>
|
|
9019
9073
|
<path d="M12.25.25a12.254 12.254 0 0 0-12 12.494
|
|
9020
9074
|
c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0
|
|
9021
9075
|
C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z"
|
|
9022
|
-
style="fill:${
|
|
9023
|
-
<circle cx="12.5" cy="12.5" r="8" fill="${
|
|
9024
|
-
<text x="12.5" y="16.1" text-anchor="middle" style="font-size:7.5px;font-weight:700;fill:${
|
|
9076
|
+
style="fill:${ov};stroke:${sv};stroke-width:1.1"/>
|
|
9077
|
+
<circle cx="12.5" cy="12.5" r="8" fill="${sv}"/>
|
|
9078
|
+
<text x="12.5" y="16.1" text-anchor="middle" style="font-size:7.5px;font-weight:700;fill:${cv};font-family:Arial, sans-serif">${dv(e.count)}</text>
|
|
9025
9079
|
</svg>`, t;
|
|
9026
|
-
},
|
|
9080
|
+
}, pv = function(e, t) {
|
|
9027
9081
|
let n = Array.isArray(e?.modelFeatureIds?.(t)) ? e.modelFeatureIds(t) : [], r = [], i = /* @__PURE__ */ new Set();
|
|
9028
9082
|
for (let t of n) {
|
|
9029
9083
|
let n = e.annotation(t), a = String(n?.uri || "").trim();
|
|
@@ -9036,7 +9090,7 @@ var Y_ = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), X_ = (e) => {
|
|
|
9036
9090
|
type: "model",
|
|
9037
9091
|
value: t
|
|
9038
9092
|
}), r;
|
|
9039
|
-
},
|
|
9093
|
+
}, mv = function(e) {
|
|
9040
9094
|
if (!e || e.addSomaLocationMarkers) return e;
|
|
9041
9095
|
let t = [];
|
|
9042
9096
|
return e.clearSomaLocationMarkers = function() {
|
|
@@ -9044,13 +9098,13 @@ var Y_ = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), X_ = (e) => {
|
|
|
9044
9098
|
e.removeMarker(t);
|
|
9045
9099
|
}), t = [];
|
|
9046
9100
|
}, e.addSomaLocationMarkers = function(n) {
|
|
9047
|
-
let r =
|
|
9101
|
+
let r = uv(n), i = [];
|
|
9048
9102
|
return e.clearSomaLocationMarkers(), r.forEach((n) => {
|
|
9049
|
-
let r =
|
|
9103
|
+
let r = pv(e, n.curie);
|
|
9050
9104
|
if (!r.length) return;
|
|
9051
9105
|
let a = !1;
|
|
9052
9106
|
r.forEach((r) => {
|
|
9053
|
-
let i =
|
|
9107
|
+
let i = fv(n), o = [];
|
|
9054
9108
|
if (r.type === "feature-uri") o = e.addMarkerByFeatureUri(r.value, { element: i });
|
|
9055
9109
|
else if (r.type === "model") {
|
|
9056
9110
|
let t = e.addMarker(r.value, { element: i });
|
|
@@ -9060,7 +9114,7 @@ var Y_ = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), X_ = (e) => {
|
|
|
9060
9114
|
}), a && i.push(n);
|
|
9061
9115
|
}), i;
|
|
9062
9116
|
}, e;
|
|
9063
|
-
},
|
|
9117
|
+
}, hv = Be("main", {
|
|
9064
9118
|
state: () => ({ userProfile: { token: "" } }),
|
|
9065
9119
|
getters: { userToken(e) {
|
|
9066
9120
|
return e.userProfile.token;
|
|
@@ -9071,7 +9125,7 @@ var Y_ = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), X_ = (e) => {
|
|
|
9071
9125
|
});
|
|
9072
9126
|
//#endregion
|
|
9073
9127
|
//#region node_modules/mitt/dist/mitt.mjs
|
|
9074
|
-
function
|
|
9128
|
+
function gv(e) {
|
|
9075
9129
|
return {
|
|
9076
9130
|
all: e ||= /* @__PURE__ */ new Map(),
|
|
9077
9131
|
on: function(t, n) {
|
|
@@ -9094,7 +9148,7 @@ function uv(e) {
|
|
|
9094
9148
|
}
|
|
9095
9149
|
//#endregion
|
|
9096
9150
|
//#region src/components/EventBus.js
|
|
9097
|
-
var
|
|
9151
|
+
var _v = new gv(), vv = "cannot be found on the map.", yv = 500, bv = (e) => {
|
|
9098
9152
|
let t = {
|
|
9099
9153
|
lng: 0,
|
|
9100
9154
|
lat: 0
|
|
@@ -9102,17 +9156,17 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9102
9156
|
return e.type === "Polygon" ? e.coordinates.length && (n = e.coordinates[0]) : n = e.coordinates, n && (e.type === "Point" ? (t.lng += parseFloat(n[0]), t.lat += parseFloat(n[1])) : (n.map((e) => {
|
|
9103
9157
|
t.lng += parseFloat(e[0]), t.lat += parseFloat(e[1]);
|
|
9104
9158
|
}), t.lng /= n.length, t.lat /= n.length)), t;
|
|
9105
|
-
},
|
|
9159
|
+
}, xv = (e, t) => {
|
|
9106
9160
|
let n = [], r = e.organs ? e.organs : e.ftus, i = r ? r.filter((e, t) => r.findIndex((t) => t.label === e.label) === t) : void 0;
|
|
9107
9161
|
return i && i.forEach((e) => {
|
|
9108
9162
|
let r = {
|
|
9109
9163
|
label: e.label,
|
|
9110
9164
|
models: e.models,
|
|
9111
9165
|
key: `${t}.${e.label}`
|
|
9112
|
-
}, i =
|
|
9166
|
+
}, i = xv(e, r.key);
|
|
9113
9167
|
i.length > 0 && (r.children = i), n.push(r);
|
|
9114
9168
|
}), n;
|
|
9115
|
-
},
|
|
9169
|
+
}, Sv = {
|
|
9116
9170
|
name: "FlatmapVuer",
|
|
9117
9171
|
components: {
|
|
9118
9172
|
MapSvgIcon: Ie,
|
|
@@ -9289,13 +9343,13 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9289
9343
|
enabled: e.enabled,
|
|
9290
9344
|
label: e.id,
|
|
9291
9345
|
key: e.id
|
|
9292
|
-
}, r =
|
|
9346
|
+
}, r = xv(e, n.key);
|
|
9293
9347
|
r.length > 0 && (n.children = r), t.children.push(n);
|
|
9294
9348
|
}), this.systems.push(t);
|
|
9295
9349
|
}
|
|
9296
9350
|
},
|
|
9297
9351
|
processTaxon: function(e, t) {
|
|
9298
|
-
this.taxonConnectivity.length = 0,
|
|
9352
|
+
this.taxonConnectivity.length = 0, H_(this.mapImp, e).then((e) => {
|
|
9299
9353
|
e.length && e.forEach((e) => {
|
|
9300
9354
|
let n = !0;
|
|
9301
9355
|
t && (n = t.checkAll ? !0 : t.checked.includes(e.taxon)), this.taxonConnectivity.push({
|
|
@@ -9473,7 +9527,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9473
9527
|
else if (e === "context-restored") this.onContextRestored();
|
|
9474
9528
|
else if (e === "pan-zoom") this.$emit("pan-zoom-callback", t);
|
|
9475
9529
|
else {
|
|
9476
|
-
let r = t.label, i = [t.models], a = this.entry, o = this.biologicalSex, s =
|
|
9530
|
+
let r = t.label, i = [t.models], a = this.entry, o = this.biologicalSex, s = nv(t.alert), c = this.getTaxons(t), l = [{
|
|
9477
9531
|
dataset: t.dataset,
|
|
9478
9532
|
biologicalSex: o,
|
|
9479
9533
|
taxonomy: a,
|
|
@@ -9503,7 +9557,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9503
9557
|
userData: n,
|
|
9504
9558
|
eventType: e,
|
|
9505
9559
|
provenanceTaxonomy: d,
|
|
9506
|
-
alert:
|
|
9560
|
+
alert: nv(c.alert),
|
|
9507
9561
|
mapUUID: r
|
|
9508
9562
|
});
|
|
9509
9563
|
}
|
|
@@ -9535,7 +9589,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9535
9589
|
let n = document.createElement("div");
|
|
9536
9590
|
n.classList.add("flatmap-feature-label"), e.forEach((t, r) => {
|
|
9537
9591
|
let { label: i } = t;
|
|
9538
|
-
if (n.append(
|
|
9592
|
+
if (n.append(tv(i)), r + 1 < e.length) {
|
|
9539
9593
|
let e = document.createElement("hr");
|
|
9540
9594
|
n.appendChild(e);
|
|
9541
9595
|
}
|
|
@@ -9586,7 +9640,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9586
9640
|
},
|
|
9587
9641
|
searchConnectivitiesByReference: async function(e) {
|
|
9588
9642
|
let t = sessionStorage.getItem("flatmap-knowledge"), n;
|
|
9589
|
-
return n = t ? await
|
|
9643
|
+
return n = t ? await q_(e) : await J_(this.mapImp, e, this.flatmapQueries), n;
|
|
9590
9644
|
},
|
|
9591
9645
|
getFlatmapKnowledge: function() {
|
|
9592
9646
|
let e = [], t = sessionStorage.getItem("flatmap-knowledge");
|
|
@@ -9595,7 +9649,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9595
9649
|
emitConnectivityError: function(e) {
|
|
9596
9650
|
this.$emit("connectivity-error", { data: {
|
|
9597
9651
|
errorData: e,
|
|
9598
|
-
errorMessage:
|
|
9652
|
+
errorMessage: vv
|
|
9599
9653
|
} });
|
|
9600
9654
|
},
|
|
9601
9655
|
checkConnectivityTooltipEntry: function(e) {
|
|
@@ -9619,7 +9673,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9619
9673
|
featureId: e.featureId ? e.featureId : e.feature?.id,
|
|
9620
9674
|
offline: this.offlineAnnotationEnabled
|
|
9621
9675
|
});
|
|
9622
|
-
}), t[0].feature) this.activeDrawTool || this.activeDrawMode || this.isValidDrawnCreated ? (this.featureAnnotationSubmitted = !1, this.activeDrawTool && this.createConnectivityBody(), this.displayTooltip(t[0].feature.id,
|
|
9676
|
+
}), t[0].feature) this.activeDrawTool || this.activeDrawMode || this.isValidDrawnCreated ? (this.featureAnnotationSubmitted = !1, this.activeDrawTool && this.createConnectivityBody(), this.displayTooltip(t[0].feature.id, bv(t[0].feature.geometry))) : this.rollbackAnnotationEvent();
|
|
9623
9677
|
else {
|
|
9624
9678
|
let e = this.annotationEntry.filter((e) => e.featureId && e.models).map((e) => e.models);
|
|
9625
9679
|
e.length > 0 && this.displayTooltip(e);
|
|
@@ -9646,7 +9700,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9646
9700
|
let t = p.find((t) => t.id === f[e]);
|
|
9647
9701
|
t && m.push(t.label);
|
|
9648
9702
|
}
|
|
9649
|
-
let h =
|
|
9703
|
+
let h = tv(m.join(", ")), g = {
|
|
9650
9704
|
facet: JSON.stringify(c),
|
|
9651
9705
|
facetPropPath: `flatmap.connectivity.source.${this.connectionType.toLowerCase()}`,
|
|
9652
9706
|
tagLabel: h,
|
|
@@ -9660,7 +9714,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9660
9714
|
} else await this.openConnectivityInfo(e);
|
|
9661
9715
|
},
|
|
9662
9716
|
openConnectivityInfo: async function(e) {
|
|
9663
|
-
|
|
9717
|
+
Z_(this.mapImp, this.flatmapQueries);
|
|
9664
9718
|
let t = [];
|
|
9665
9719
|
if (this.tooltipEntry = e.filter((e) => e.resource[0] in this.mapImp.pathways.paths).map((e) => ({
|
|
9666
9720
|
title: e.label,
|
|
@@ -9682,7 +9736,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9682
9736
|
},
|
|
9683
9737
|
getKnowledgeTooltip: async function(e) {
|
|
9684
9738
|
let t = await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(this.mapImp, e), n = await this.flatmapQueries.createTooltipData(this.mapImp, e);
|
|
9685
|
-
return (t && t[0] || e.feature.hyperlinks && e.feature.hyperlinks.length > 0) && (n.featuresAlert =
|
|
9739
|
+
return (t && t[0] || e.feature.hyperlinks && e.feature.hyperlinks.length > 0) && (n.featuresAlert = nv(e.alert), n.knowledgeSource = Y_(this.mapImp), n.mapId = this.mapImp.mapMetadata.id, n.mapuuid = this.mapImp.mapMetadata.uuid), n.ready = !0, n;
|
|
9686
9740
|
},
|
|
9687
9741
|
popUpCssHacks: function() {
|
|
9688
9742
|
let e = document.querySelector(".flatmap-tooltip-popup"), t = document.querySelector(".maplibregl-popup-close-button");
|
|
@@ -9717,10 +9771,15 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9717
9771
|
return je(this.$el);
|
|
9718
9772
|
},
|
|
9719
9773
|
openHelpModeDrawer: function() {
|
|
9720
|
-
this.requiresDrawer && (this.drawerOpen = !0);
|
|
9774
|
+
clearTimeout(this.helpModeDrawerTimeout), this.requiresDrawer && (this.drawerOpen || (this.helpModeDrawerOpened = !0), this.drawerOpen = !0);
|
|
9775
|
+
},
|
|
9776
|
+
restoreHelpModeDrawer: function() {
|
|
9777
|
+
clearTimeout(this.helpModeDrawerTimeout), this.helpModeDrawerTimeout = setTimeout(() => {
|
|
9778
|
+
this.helpModeDrawerOpened && (this.drawerOpen = !1), this.helpModeDrawerOpened = !1;
|
|
9779
|
+
}, yv);
|
|
9721
9780
|
},
|
|
9722
9781
|
setHelpModeMarker: function(e) {
|
|
9723
|
-
e
|
|
9782
|
+
e ? this.openHelpModeDrawer() : this.restoreHelpModeDrawer(), this.helpModeMarkerVisible = e;
|
|
9724
9783
|
},
|
|
9725
9784
|
displayTooltip: function(e, t = void 0) {
|
|
9726
9785
|
let n, r = { className: "flatmapvuer-popover" };
|
|
@@ -9761,7 +9820,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9761
9820
|
}
|
|
9762
9821
|
},
|
|
9763
9822
|
closeFlatmapHelpPopup: function() {
|
|
9764
|
-
this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach((e) => {
|
|
9823
|
+
this.$el.querySelectorAll(".flatmap-popup-popper .maplibregl-popup-close-button").forEach((e) => {
|
|
9765
9824
|
e.click();
|
|
9766
9825
|
});
|
|
9767
9826
|
},
|
|
@@ -9834,13 +9893,13 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9834
9893
|
container: this.$refs.display,
|
|
9835
9894
|
tooltipDelay: 15
|
|
9836
9895
|
}).then((t) => {
|
|
9837
|
-
this.mapImp =
|
|
9896
|
+
this.mapImp = mv(t), this.serverURL = this.mapImp.makeServerUrl("").slice(0, -1);
|
|
9838
9897
|
let n = this.mapImp.details.version;
|
|
9839
9898
|
this.setFlightPathInfo(n);
|
|
9840
9899
|
let r = this._stateToBeSet ? this._stateToBeSet : e;
|
|
9841
9900
|
this.onFlatmapReady(r), this.$nextTick(() => this.restoreMapState(r));
|
|
9842
9901
|
}).catch((e) => {
|
|
9843
|
-
if (console.error("Flatmap loading error:", e), this.flatmapError = {}, e.message && e.message.indexOf("Unknown map") !== -1 ? (this.flatmapError.title = "Unknown Map!", this.flatmapError.messages = Object.keys(t).map((e) => `${e === "uuid" ? "UUID" :
|
|
9902
|
+
if (console.error("Flatmap loading error:", e), this.flatmapError = {}, e.message && e.message.indexOf("Unknown map") !== -1 ? (this.flatmapError.title = "Unknown Map!", this.flatmapError.messages = Object.keys(t).map((e) => `${e === "uuid" ? "UUID" : tv(e)}: ${t[e]}`)) : (this.flatmapError.title = "Error Loading Map!", this.flatmapError.messages = [e.message ? e.message : e.toString(), "Please try again later or contact support if the problem persists."]), this.$parent?.$refs?.multiContainer) {
|
|
9844
9903
|
let e = this.$parent;
|
|
9845
9904
|
this.flatmapError.button = {
|
|
9846
9905
|
text: "Load Default Map",
|
|
@@ -9896,7 +9955,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9896
9955
|
return await Ne(this.flatmapAPI, e, n, r);
|
|
9897
9956
|
},
|
|
9898
9957
|
onFlatmapReady: function(e) {
|
|
9899
|
-
this.sensor = S(new
|
|
9958
|
+
this.sensor = S(new iv.default(this.$refs.display, this.mapResize)), this.mapImp.options?.style === "functional" && (this.isFC = !0), this.mapImp.setBackgroundOpacity(1), this.backgroundChangeCallback(this.currentBackground), this.pathways = this.mapImp.pathTypes(), this.pathways = this.pathways.filter((e) => e.enabled && e.type !== "other"), this.processSystems(this.mapImp.getSystems()), this.processTaxon(this.mapImp.taxonIdentifiers, e ? e.taxonSelection : void 0), this.containsAlert = "alert" in this.mapImp.featureFilterRanges(), this.flatmapLegends = this.mapImp.flatmapLegend, this.loading = !1, this.computePathControlsMaximumHeight(), this.mapResize(), this.handleMapClick(), this.setInitMapState(), this.displayMinimap && (this.mapImp.createMinimap({ position: "top-right" }), this.addResizeButtonToMinimap()), this.$emit("ready", this);
|
|
9900
9959
|
},
|
|
9901
9960
|
handleMapClick: function() {
|
|
9902
9961
|
let e = this.mapImp.map;
|
|
@@ -9941,11 +10000,11 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9941
10000
|
feature: t,
|
|
9942
10001
|
label: t.label,
|
|
9943
10002
|
provenanceTaxonomy: t.taxons,
|
|
9944
|
-
alert:
|
|
10003
|
+
alert: nv(t.alert)
|
|
9945
10004
|
};
|
|
9946
10005
|
this.checkAndCreatePopups([r], n);
|
|
9947
10006
|
let i = t.id.startsWith("ilxtr:") || t.id.startsWith("ilx:");
|
|
9948
|
-
i ? (this.lastHoveredFeature = t, this.lastHoveredFeature.mapUUID = this.mapImp.uuid) : this.lastHoveredFeature = null, this.mapImp.showPopup(e,
|
|
10007
|
+
i ? (this.lastHoveredFeature = t, this.lastHoveredFeature.mapUUID = this.mapImp.uuid) : this.lastHoveredFeature = null, this.mapImp.showPopup(e, tv(t.label), {
|
|
9949
10008
|
className: i ? "flatmap-tooltip-popup" : "custom-popup",
|
|
9950
10009
|
positionAtLastClick: !1,
|
|
9951
10010
|
preserveSelection: !0
|
|
@@ -9969,7 +10028,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
9969
10028
|
return this.mapImp ? this.mapImp.search(e) : [];
|
|
9970
10029
|
},
|
|
9971
10030
|
onActionClick: function(e) {
|
|
9972
|
-
|
|
10031
|
+
_v.emit("onActionClick", e);
|
|
9973
10032
|
},
|
|
9974
10033
|
setConnectionType: function(e) {
|
|
9975
10034
|
this.connectionType = e;
|
|
@@ -10128,7 +10187,8 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
10128
10187
|
flatmapAPI: this.flatmapAPI,
|
|
10129
10188
|
sparcAPI: this.sparcAPI,
|
|
10130
10189
|
userApiKey: this.userToken,
|
|
10131
|
-
openHelpModeDrawer: this.openHelpModeDrawer
|
|
10190
|
+
openHelpModeDrawer: this.openHelpModeDrawer,
|
|
10191
|
+
restoreHelpModeDrawer: this.restoreHelpModeDrawer
|
|
10132
10192
|
};
|
|
10133
10193
|
},
|
|
10134
10194
|
data: function() {
|
|
@@ -10153,7 +10213,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
10153
10213
|
pathwaysMaxHeight: 1e3,
|
|
10154
10214
|
tooltipDelay: 500,
|
|
10155
10215
|
helpModeMarkerVisible: !1,
|
|
10156
|
-
yellowstar:
|
|
10216
|
+
yellowstar: rv,
|
|
10157
10217
|
isFC: !1,
|
|
10158
10218
|
currentBackground: "white",
|
|
10159
10219
|
availableBackground: [
|
|
@@ -10238,7 +10298,7 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
10238
10298
|
warningHelpDescription: function() {
|
|
10239
10299
|
return this.isLegacy ? "This is a legacy map. Click the link below the icon to view the latest map instead." : this.isFC ? "This map displays the connectivity of individual neurons which align with the neuron populations from the ApiNATOMY models available in SCKAN." : "This map displays the connectivity of neuron populations from the primarily rat-based ApiNATOMY models available in SCKAN. New connectivity and species specificity will be added as the SPARC program progresses.";
|
|
10240
10300
|
},
|
|
10241
|
-
...Ve(
|
|
10301
|
+
...Ve(hv, ["userToken"]),
|
|
10242
10302
|
isValidDrawnCreated: function() {
|
|
10243
10303
|
return Object.keys(this.drawnCreatedEvent).length > 0;
|
|
10244
10304
|
},
|
|
@@ -10308,10 +10368,10 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
10308
10368
|
}
|
|
10309
10369
|
},
|
|
10310
10370
|
created: function() {
|
|
10311
|
-
this.mapManager ? this.mapManagerRef = this.mapManager : (this.mapManagerRef = S(new
|
|
10371
|
+
this.mapManager ? this.mapManagerRef = this.mapManager : (this.mapManagerRef = S(new av.MapViewer(this.flatmapAPI, { container: void 0 })), this.$emit("mapmanager-loaded", this.mapManagerRef));
|
|
10312
10372
|
},
|
|
10313
10373
|
mounted: function() {
|
|
10314
|
-
this.openMapRef = ce(this.$refs.openMapRef), this.backgroundIconRef = ce(this.$refs.backgroundIconRef), this.flatmapQueries = S(new
|
|
10374
|
+
this.openMapRef = ce(this.$refs.openMapRef), this.backgroundIconRef = ce(this.$refs.backgroundIconRef), this.flatmapQueries = S(new K_()), this.flatmapQueries.initialise(this.flatmapAPI), this.state ? this.setStateRequired && this.setState(this.state) : this.renderAtMounted && this.createFlatmap(), ev(), this.tooltipContentProvider && this.$nextTick(() => {
|
|
10315
10375
|
let e = this.$refs.flatmapContainer || this.$el;
|
|
10316
10376
|
e && (this.tooltipObserver = new MutationObserver(this._handleTooltipMutation.bind(this)), this.tooltipObserver.observe(e, {
|
|
10317
10377
|
childList: !0,
|
|
@@ -10322,50 +10382,50 @@ var dv = new uv(), fv = "cannot be found on the map.", pv = (e) => {
|
|
|
10322
10382
|
beforeUnmount: function() {
|
|
10323
10383
|
this.tooltipObserver &&= (this.tooltipObserver.disconnect(), null);
|
|
10324
10384
|
}
|
|
10325
|
-
},
|
|
10385
|
+
}, Cv = {
|
|
10326
10386
|
class: "flatmap-container",
|
|
10327
10387
|
ref: "flatmapContainer",
|
|
10328
10388
|
"data-help-scope": "",
|
|
10329
10389
|
"element-loading-text": "Loading...",
|
|
10330
10390
|
"element-loading-background": "rgba(0, 0, 0, 0.3)"
|
|
10331
|
-
},
|
|
10391
|
+
}, wv = { style: {
|
|
10332
10392
|
height: "100%",
|
|
10333
10393
|
width: "100%",
|
|
10334
10394
|
position: "relative",
|
|
10335
10395
|
"overflow-y": "none"
|
|
10336
|
-
} },
|
|
10396
|
+
} }, Tv = {
|
|
10337
10397
|
style: {
|
|
10338
10398
|
height: "100%",
|
|
10339
10399
|
width: "100%"
|
|
10340
10400
|
},
|
|
10341
10401
|
ref: "display",
|
|
10342
10402
|
class: "flatmap-display"
|
|
10343
|
-
},
|
|
10403
|
+
}, Ev = { class: "beta-popovers" }, Dv = { key: 0 }, Ov = { key: 1 }, kv = { key: 2 }, Av = { class: "warning-icon" }, jv = {
|
|
10344
10404
|
key: 2,
|
|
10345
10405
|
class: "warning-text"
|
|
10346
|
-
},
|
|
10406
|
+
}, Mv = {
|
|
10347
10407
|
key: 0,
|
|
10348
10408
|
class: "latest-changesicon"
|
|
10349
|
-
},
|
|
10409
|
+
}, Nv = { class: "bottom-right-control" }, Pv = { class: "flatmap-marker-help" }, Fv = ["innerHTML"], Iv = { style: { "margin-bottom": "2px" } }, Lv = {
|
|
10350
10410
|
key: 0,
|
|
10351
10411
|
class: "viewing-mode-title"
|
|
10352
|
-
},
|
|
10412
|
+
}, Rv = ["onClick"], zv = ["onClick"], Bv = {
|
|
10353
10413
|
key: 0,
|
|
10354
10414
|
ref: "openMapRef",
|
|
10355
10415
|
class: "icon-button-container"
|
|
10356
|
-
},
|
|
10416
|
+
}, Vv = {
|
|
10357
10417
|
ref: "backgroundIconRef",
|
|
10358
10418
|
class: "icon-button-container"
|
|
10359
10419
|
};
|
|
10360
|
-
function
|
|
10420
|
+
function Hv(e, n, r, i, a, o) {
|
|
10361
10421
|
let s = L("map-svg-sprite-color"), f = M_, h = De, g = Pf, _ = Kg, v = ye, y = L("DrawToolbar"), b = L("map-svg-icon"), x = C_, S = L("tree-controls"), C = f_, w = be, D = mh, O = Ig, k = Lg, ee = Zh, A = Xh, j = jg, te = Mg, ne = L("Tooltip"), N = ae("help-mode"), re = r_;
|
|
10362
|
-
return U((M(), u("div",
|
|
10363
|
-
U(d("div",
|
|
10422
|
+
return U((M(), u("div", Cv, [m(s), d("div", wv, [
|
|
10423
|
+
U(d("div", Tv, null, 512), [[N, {
|
|
10364
10424
|
id: "flatmap-map-popup",
|
|
10365
10425
|
area: "map-info",
|
|
10366
10426
|
order: 1,
|
|
10367
10427
|
title: "Explore the map",
|
|
10368
|
-
description: "Hover over a feature on the map to see its name, click on it to see more information such as its connectivity.",
|
|
10428
|
+
description: "<b>Hover</b> over a feature on the map to see its name, <b>click</b> on it to see more information such as its connectivity.",
|
|
10369
10429
|
placement: "bottom",
|
|
10370
10430
|
target: () => e.$el.querySelector(".flatmap-popup-popper"),
|
|
10371
10431
|
onEnter: o.openFlatmapHelpPopup,
|
|
@@ -10375,7 +10435,7 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10375
10435
|
key: 0,
|
|
10376
10436
|
flatmapError: e.flatmapError
|
|
10377
10437
|
}, null, 8, ["flatmapError"])) : l("", !0),
|
|
10378
|
-
U(d("div",
|
|
10438
|
+
U(d("div", Ev, [d("div", null, [r.displayWarning || r.isLegacy ? (M(), c(_, {
|
|
10379
10439
|
key: 0,
|
|
10380
10440
|
placement: "right",
|
|
10381
10441
|
"popper-class": "warning-popper flatmap-popper",
|
|
@@ -10385,20 +10445,20 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10385
10445
|
"hide-after": e.tooltipDelay,
|
|
10386
10446
|
ref: "warningPopover"
|
|
10387
10447
|
}, {
|
|
10388
|
-
reference: H(() => [U((M(), u("div",
|
|
10448
|
+
reference: H(() => [U((M(), u("div", Av, [r.displayWarning || r.isLegacy ? (M(), c(g, { key: 0 }, {
|
|
10389
10449
|
default: H(() => [m(h)]),
|
|
10390
10450
|
_: 1
|
|
10391
10451
|
})) : l("", !0), r.isLegacy ? (M(), u(t, { key: 1 }, [n[11] ||= d("span", { class: "warning-text" }, "Legacy Map", -1), d("div", {
|
|
10392
10452
|
class: "latest-map-text",
|
|
10393
10453
|
onClick: n[0] ||= (...e) => o.viewLatestMap && o.viewLatestMap(...e)
|
|
10394
|
-
}, " Click here for the latest map ")], 64)) : r.displayWarning ? (M(), u("span",
|
|
10454
|
+
}, " Click here for the latest map ")], 64)) : r.displayWarning ? (M(), u("span", jv, "Beta")) : l("", !0)])), [[N, {
|
|
10395
10455
|
id: "flatmap-warning",
|
|
10396
10456
|
area: "map-info",
|
|
10397
10457
|
title: "About this map",
|
|
10398
10458
|
description: o.warningHelpDescription,
|
|
10399
10459
|
placement: "right"
|
|
10400
10460
|
}]])]),
|
|
10401
|
-
default: H(() => [r.isLegacy ? (M(), u("p",
|
|
10461
|
+
default: H(() => [r.isLegacy ? (M(), u("p", Dv, "This is a legacy map, you may view the latest map instead.")) : e.isFC ? (M(), u("p", Ov, [...n[9] ||= [
|
|
10402
10462
|
p(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the ", -1),
|
|
10403
10463
|
d("a", {
|
|
10404
10464
|
href: "https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",
|
|
@@ -10410,7 +10470,7 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10410
10470
|
target: "_blank"
|
|
10411
10471
|
}, " SCKAN ", -1),
|
|
10412
10472
|
p(" . ", -1)
|
|
10413
|
-
]])) : (M(), u("p",
|
|
10473
|
+
]])) : (M(), u("p", kv, [...n[10] ||= [
|
|
10414
10474
|
p(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based ", -1),
|
|
10415
10475
|
d("a", {
|
|
10416
10476
|
href: "https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",
|
|
@@ -10434,7 +10494,7 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10434
10494
|
"hide-after": e.tooltipDelay,
|
|
10435
10495
|
ref: "whatsNewPopover"
|
|
10436
10496
|
}, {
|
|
10437
|
-
reference: H(() => [r.displayLatestChanges ? U((M(), u("div",
|
|
10497
|
+
reference: H(() => [r.displayLatestChanges ? U((M(), u("div", Mv, [m(g, null, {
|
|
10438
10498
|
default: H(() => [m(h)]),
|
|
10439
10499
|
_: 1
|
|
10440
10500
|
}), n[12] ||= d("span", { class: "warning-text" }, "What's new?", -1)])), [[N, {
|
|
@@ -10491,7 +10551,7 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10491
10551
|
"onConfirmDrawn",
|
|
10492
10552
|
"onCancelDrawn"
|
|
10493
10553
|
])) : l("", !0),
|
|
10494
|
-
U(d("div",
|
|
10554
|
+
U(d("div", Nv, [
|
|
10495
10555
|
m(_, {
|
|
10496
10556
|
content: "Zoom in",
|
|
10497
10557
|
placement: "left",
|
|
@@ -10596,10 +10656,10 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10596
10656
|
ref: "featuredMarkerPopover",
|
|
10597
10657
|
class: "svg-legends-container"
|
|
10598
10658
|
}, null, 8, ["legends"])) : l("", !0),
|
|
10599
|
-
U((M(), u("div",
|
|
10659
|
+
U((M(), u("div", Pv, [d("div", {
|
|
10600
10660
|
class: "flatmap-marker-help-icon",
|
|
10601
10661
|
innerHTML: e.flatmapMarker
|
|
10602
|
-
}, null, 8,
|
|
10662
|
+
}, null, 8, Fv), n[15] ||= d("span", { class: "flatmap-marker-help-label" }, "Dataset markers", -1)])), [[ge, e.helpModeMarkerVisible], [N, {
|
|
10603
10663
|
id: "flatmap-marker",
|
|
10604
10664
|
area: "legends",
|
|
10605
10665
|
title: "Dataset markers",
|
|
@@ -10690,7 +10750,8 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10690
10750
|
title: r.showPathwayFilter ? "Pathways and legends" : "Legends",
|
|
10691
10751
|
description: r.showPathwayFilter ? "Show or hide pathways, systems and other map layers using the checkboxes in this panel." : "The legends explain the symbols and colours used on this map.",
|
|
10692
10752
|
placement: "right",
|
|
10693
|
-
onEnter: o.openHelpModeDrawer
|
|
10753
|
+
onEnter: o.openHelpModeDrawer,
|
|
10754
|
+
onLeave: o.restoreHelpModeDrawer
|
|
10694
10755
|
}]]), d("div", {
|
|
10695
10756
|
onClick: n[4] ||= (...e) => o.toggleDrawer && o.toggleDrawer(...e),
|
|
10696
10757
|
class: T(["drawer-button", {
|
|
@@ -10742,11 +10803,11 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10742
10803
|
}),
|
|
10743
10804
|
m(O, { class: "backgroundControl" }, {
|
|
10744
10805
|
default: H(() => [
|
|
10745
|
-
d("div",
|
|
10806
|
+
d("div", Iv, [(M(!0), u(t, null, F(e.viewingModes, (n, r) => (M(), u(t, { key: r }, [r === e.viewingMode ? (M(), u("span", Lv, [d("b", null, R(r), 1)])) : (M(), u("span", {
|
|
10746
10807
|
key: 1,
|
|
10747
10808
|
class: "viewing-mode-unselected",
|
|
10748
10809
|
onClick: (e) => o.changeViewingMode(r)
|
|
10749
|
-
}, R(r), 9,
|
|
10810
|
+
}, R(r), 9, Rv))], 64))), 128))]),
|
|
10750
10811
|
m(O, { class: "viewing-mode-description" }, {
|
|
10751
10812
|
default: H(() => [p(R(o.modeDescription), 1)]),
|
|
10752
10813
|
_: 1
|
|
@@ -10884,7 +10945,7 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10884
10945
|
t == e.currentBackground ? "active" : ""
|
|
10885
10946
|
]),
|
|
10886
10947
|
onClick: (e) => o.backgroundChangeCallback(t)
|
|
10887
|
-
}, null, 10,
|
|
10948
|
+
}, null, 10, zv))), 128))]),
|
|
10888
10949
|
_: 1
|
|
10889
10950
|
})
|
|
10890
10951
|
])]),
|
|
@@ -10904,7 +10965,7 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10904
10965
|
"popper-class": "flatmap-popper",
|
|
10905
10966
|
ref: "openMapPopover"
|
|
10906
10967
|
}, {
|
|
10907
|
-
reference: H(() => [r.enableOpenMapUI && r.openMapOptions.length > 0 ? U((M(), u("div",
|
|
10968
|
+
reference: H(() => [r.enableOpenMapUI && r.openMapOptions.length > 0 ? U((M(), u("div", Bv, [m(b, {
|
|
10908
10969
|
icon: "openMap",
|
|
10909
10970
|
class: "icon-button open-map-button"
|
|
10910
10971
|
})])), [[N, {
|
|
@@ -10928,7 +10989,7 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10928
10989
|
"popper-class": "flatmap-popper",
|
|
10929
10990
|
ref: "settingsPopover"
|
|
10930
10991
|
}, {
|
|
10931
|
-
reference: H(() => [U((M(), u("div",
|
|
10992
|
+
reference: H(() => [U((M(), u("div", Vv, [m(b, {
|
|
10932
10993
|
icon: "changeBckgd",
|
|
10933
10994
|
class: "icon-button"
|
|
10934
10995
|
})])), [[N, {
|
|
@@ -10960,23 +11021,23 @@ function Fv(e, n, r, i, a, o) {
|
|
|
10960
11021
|
])) : l("", !0)
|
|
10961
11022
|
])])), [[re, e.loading]]);
|
|
10962
11023
|
}
|
|
10963
|
-
var
|
|
11024
|
+
var Uv = /*#__PURE__*/ i_(Sv, [["render", Hv], ["__scopeId", "data-v-4eee1dfc"]]), Wv = {
|
|
10964
11025
|
"NCBITaxon:10114": "01fedbf9-d783-509c-a10c-827941ab13da",
|
|
10965
11026
|
"NCBITaxon:9823": "a336ac04-24db-561f-a25f-1c994fe17410",
|
|
10966
11027
|
"NCBITaxon:9606": "42ed6323-f645-5fbe-bada-9581819cf689",
|
|
10967
11028
|
"NCBITaxon:10090": "25285fab-48a0-5620-a6a0-f9a0374837d5",
|
|
10968
11029
|
"NCBITaxon:9685": "73060497-46a6-52bf-b975-cac511c127cb"
|
|
10969
|
-
},
|
|
11030
|
+
}, Gv = {
|
|
10970
11031
|
name: "MultiFlatmapVuer",
|
|
10971
|
-
components: { FlatmapVuer:
|
|
11032
|
+
components: { FlatmapVuer: Uv },
|
|
10972
11033
|
directives: { helpMode: Pe },
|
|
10973
11034
|
created: function() {
|
|
10974
11035
|
this.loadMapManager();
|
|
10975
11036
|
},
|
|
10976
11037
|
mounted: function() {
|
|
10977
|
-
this.initialise(),
|
|
11038
|
+
this.initialise(), _v.on("onActionClick", (e) => {
|
|
10978
11039
|
this.resourceSelected(e);
|
|
10979
|
-
}),
|
|
11040
|
+
}), _v.on("open-pubmed-url", (e) => {
|
|
10980
11041
|
this.$emit("open-pubmed-url", e);
|
|
10981
11042
|
});
|
|
10982
11043
|
},
|
|
@@ -11031,7 +11092,7 @@ var Iv = /*#__PURE__*/ i_(hv, [["render", Fv], ["__scopeId", "data-v-cedc8d1f"]]
|
|
|
11031
11092
|
});
|
|
11032
11093
|
},
|
|
11033
11094
|
loadMapManager: function() {
|
|
11034
|
-
this.mapManagerRef || (this.mapManager ? this.mapManagerRef = this.mapManager : (this.mapManagerRef = S(new
|
|
11095
|
+
this.mapManagerRef || (this.mapManager ? this.mapManagerRef = this.mapManager : (this.mapManagerRef = S(new av.MapViewer(this.flatmapAPI, { container: void 0 })), this.$emit("mapmanager-loaded", this.mapManagerRef)));
|
|
11035
11096
|
},
|
|
11036
11097
|
resourceSelected: function(e) {
|
|
11037
11098
|
this.$emit("resource-selected", e);
|
|
@@ -11127,7 +11188,7 @@ var Iv = /*#__PURE__*/ i_(hv, [["render", Fv], ["__scopeId", "data-v-cedc8d1f"]]
|
|
|
11127
11188
|
let n = e.state;
|
|
11128
11189
|
if (!n.uuid) {
|
|
11129
11190
|
if (n.entry) {
|
|
11130
|
-
let r = n.entry in
|
|
11191
|
+
let r = n.entry in Wv ? Wv[n.entry] : void 0;
|
|
11131
11192
|
t(this.createLegacyEntry(e, n.entry, r) || e);
|
|
11132
11193
|
}
|
|
11133
11194
|
} else if (n.entry) return new Promise(() => {
|
|
@@ -11309,23 +11370,23 @@ var Iv = /*#__PURE__*/ i_(hv, [["render", Fv], ["__scopeId", "data-v-cedc8d1f"]]
|
|
|
11309
11370
|
t && this.$refs[t][0].forceContextLoss();
|
|
11310
11371
|
} }
|
|
11311
11372
|
}
|
|
11312
|
-
},
|
|
11373
|
+
}, Kv = {
|
|
11313
11374
|
class: "multi-container",
|
|
11314
11375
|
ref: "multiContainer"
|
|
11315
|
-
},
|
|
11376
|
+
}, qv = {
|
|
11316
11377
|
key: 0,
|
|
11317
11378
|
style: {
|
|
11318
11379
|
position: "absolute",
|
|
11319
11380
|
"z-index": "100"
|
|
11320
11381
|
}
|
|
11321
|
-
},
|
|
11382
|
+
}, Jv = { class: "option-label" }, Yv = { class: "option-title" }, Xv = { class: "select-box-icon" }, Zv = {
|
|
11322
11383
|
key: 1,
|
|
11323
11384
|
class: "option-title active-species"
|
|
11324
|
-
},
|
|
11325
|
-
function
|
|
11326
|
-
let s = sm, f = Zh, m = Xh, h =
|
|
11327
|
-
return M(), u("div",
|
|
11328
|
-
r.disableUI ? l("", !0) : (M(), u("div",
|
|
11385
|
+
}, Qv = { class: "select-box-icon" }, $v = ["aria-label", "onClick"];
|
|
11386
|
+
function ey(e, n, r, i, a, o) {
|
|
11387
|
+
let s = sm, f = Zh, m = Xh, h = Uv, g = M_, _ = ae("help-mode");
|
|
11388
|
+
return M(), u("div", Kv, [
|
|
11389
|
+
r.disableUI ? l("", !0) : (M(), u("div", qv, [n[3] ||= d("div", { class: "species-display-text" }, "Species", -1), U((M(), c(m, {
|
|
11329
11390
|
id: "flatmap-select",
|
|
11330
11391
|
ref: "speciesSelect",
|
|
11331
11392
|
teleported: !1,
|
|
@@ -11341,7 +11402,7 @@ function qv(e, n, r, i, a, o) {
|
|
|
11341
11402
|
label: i,
|
|
11342
11403
|
value: i
|
|
11343
11404
|
}, {
|
|
11344
|
-
default: H(() => [d("span",
|
|
11405
|
+
default: H(() => [d("span", Jv, [e.activeSpecies === i ? (M(), u("span", Zv, [d("span", Qv, [d("i", { class: T(t.iconClass) }, null, 2)]), p(" " + R(i), 1)])) : (M(), c(s, {
|
|
11345
11406
|
key: 0,
|
|
11346
11407
|
content: `Change species to ${i}`,
|
|
11347
11408
|
placement: "top",
|
|
@@ -11349,7 +11410,7 @@ function qv(e, n, r, i, a, o) {
|
|
|
11349
11410
|
"show-after": 200,
|
|
11350
11411
|
"popper-class": "flatmap-species-option-tooltip"
|
|
11351
11412
|
}, {
|
|
11352
|
-
default: H(() => [d("span",
|
|
11413
|
+
default: H(() => [d("span", Yv, [d("span", Xv, [d("i", { class: T(t.iconClass) }, null, 2)]), p(" " + R(i), 1)])]),
|
|
11353
11414
|
_: 2
|
|
11354
11415
|
}, 1032, ["content"])), r.enableOpenMapUI ? (M(), c(s, {
|
|
11355
11416
|
key: 2,
|
|
@@ -11384,7 +11445,7 @@ function qv(e, n, r, i, a, o) {
|
|
|
11384
11445
|
}),
|
|
11385
11446
|
d("path", { d: "M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3" }),
|
|
11386
11447
|
d("path", { d: "M14.5 11.5v6M11.5 14.5h6" })
|
|
11387
|
-
], -1)]], 8,
|
|
11448
|
+
], -1)]], 8, $v)]),
|
|
11388
11449
|
_: 2
|
|
11389
11450
|
}, 1032, ["content"])) : l("", !0)])]),
|
|
11390
11451
|
_: 2
|
|
@@ -11447,6 +11508,6 @@ function qv(e, n, r, i, a, o) {
|
|
|
11447
11508
|
}, null, 8, ["flatmapError"])) : l("", !0)
|
|
11448
11509
|
], 512);
|
|
11449
11510
|
}
|
|
11450
|
-
var
|
|
11511
|
+
var ty = /*#__PURE__*/ i_(Gv, [["render", ey], ["__scopeId", "data-v-7bcc9c0b"]]);
|
|
11451
11512
|
//#endregion
|
|
11452
|
-
export {
|
|
11513
|
+
export { Uv as FlatmapVuer, ty as MultiFlatmapVuer };
|