baselode 0.1.15 → 0.1.16
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/baselode.js +733 -687
- package/dist/baselode.js.map +1 -1
- package/package.json +1 -1
package/dist/baselode.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import te from "papaparse";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useRef as
|
|
2
|
+
import { jsx as P, jsxs as J } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as De, useState as Q, useEffect as se, useMemo as ne, useCallback as Ue } from "react";
|
|
4
4
|
import Fe from "plotly.js-dist-min";
|
|
5
|
-
import * as
|
|
5
|
+
import * as _ from "three";
|
|
6
6
|
import { OrbitControls as on } from "three/examples/jsm/controls/OrbitControls";
|
|
7
7
|
import { FlyControls as sn } from "three/examples/jsm/controls/FlyControls";
|
|
8
8
|
import { ViewportGizmo as ln } from "three-viewport-gizmo";
|
|
9
9
|
import { EffectComposer as an } from "three/examples/jsm/postprocessing/EffectComposer.js";
|
|
10
10
|
import { RenderPass as cn } from "three/examples/jsm/postprocessing/RenderPass.js";
|
|
11
11
|
import { OutlinePass as un } from "three/examples/jsm/postprocessing/OutlinePass.js";
|
|
12
|
-
const
|
|
12
|
+
const k = "hole_id", oe = "latitude", ie = "longitude", xe = "elevation", X = "azimuth", q = "dip", F = "from", $ = "to", Ie = "mid", me = "project_id", pe = "easting", be = "northing", Et = "crs", W = "depth", xt = "alpha", kt = "beta", dn = "strike", ae = "geology_code", ce = "geology_description", Fo = {
|
|
13
13
|
// A unique hole identifier across the entire dataset and all future data sets
|
|
14
|
-
[
|
|
14
|
+
[k]: "string",
|
|
15
15
|
// The hole ID from the original collar source
|
|
16
16
|
datasource_hole_id: "string",
|
|
17
17
|
// The project ID or project code from the original collar source, if available
|
|
@@ -30,35 +30,35 @@ const x = "hole_id", oe = "latitude", ie = "longitude", xe = "elevation", X = "a
|
|
|
30
30
|
[Et]: "string"
|
|
31
31
|
}, wo = {
|
|
32
32
|
// The unique hole id that maps to the collar and any other data tables
|
|
33
|
-
[
|
|
33
|
+
[k]: "string",
|
|
34
34
|
// The depth along the hole where the survey measurement was taken / started
|
|
35
35
|
[W]: "number",
|
|
36
36
|
// The depth along the hole where the survey measurement ended, if applicable (some surveys are point measurements and may not have a 'to' depth)
|
|
37
|
-
[
|
|
37
|
+
[$]: "number",
|
|
38
38
|
// The azimuth of the hole at the survey depth, in degrees from north
|
|
39
39
|
[X]: "number",
|
|
40
40
|
// The dip of the hole at the survey depth, in degrees from horizontal (negative values indicate downward inclination)
|
|
41
41
|
[q]: "number"
|
|
42
42
|
}, To = {
|
|
43
43
|
// The unique hole id that maps to the collar and any other data tables
|
|
44
|
-
[
|
|
44
|
+
[k]: "string",
|
|
45
45
|
// The depth along the hole where the assay interval starts
|
|
46
|
-
[
|
|
46
|
+
[F]: "number",
|
|
47
47
|
// The depth along the hole where the assay interval ends
|
|
48
|
-
[
|
|
48
|
+
[$]: "number",
|
|
49
49
|
// The midpoint depth of the assay interval
|
|
50
50
|
[Ie]: "number"
|
|
51
51
|
// assay value columns are variable and not standardized here.
|
|
52
52
|
// Assays may be flattened (one column per assay type) or long (one row per assay type with an additional 'assay_type' column)
|
|
53
53
|
}, mn = {
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
54
|
+
[k]: "string",
|
|
55
|
+
[F]: "number",
|
|
56
|
+
[$]: "number",
|
|
57
57
|
[Ie]: "number",
|
|
58
58
|
[ae]: "string",
|
|
59
59
|
[ce]: "string"
|
|
60
60
|
}, $o = {
|
|
61
|
-
[
|
|
61
|
+
[k]: "string",
|
|
62
62
|
[W]: "number",
|
|
63
63
|
[q]: "number",
|
|
64
64
|
[X]: "number",
|
|
@@ -66,7 +66,7 @@ const x = "hole_id", oe = "latitude", ie = "longitude", xe = "elevation", X = "a
|
|
|
66
66
|
[kt]: "number",
|
|
67
67
|
comments: "string"
|
|
68
68
|
}, fn = {
|
|
69
|
-
[
|
|
69
|
+
[k]: ["hole_id", "holeid", "hole id", "hole-id"],
|
|
70
70
|
datasource_hole_id: ["datasource_hole_id", "datasourceholeid", "datasource hole id", "datasource-hole-id", "company_hole_id", "companyholeid", "company hole id", "company-hole-id"],
|
|
71
71
|
[me]: ["project_id", "projectid", "project id", "project-id", "project_code", "projectcode", "project code", "project-code", "companyId", "company_id", "companyid", "company id", "company-id", "dataset", "project"],
|
|
72
72
|
[oe]: ["latitude", "lat"],
|
|
@@ -75,8 +75,8 @@ const x = "hole_id", oe = "latitude", ie = "longitude", xe = "elevation", X = "a
|
|
|
75
75
|
[pe]: ["easting", "x"],
|
|
76
76
|
[be]: ["northing", "y"],
|
|
77
77
|
[Et]: ["crs", "epsg", "projection"],
|
|
78
|
-
[
|
|
79
|
-
[
|
|
78
|
+
[F]: ["from", "depth_from", "from_depth", "samp_from", "sample_from", "sampfrom", "fromdepth"],
|
|
79
|
+
[$]: ["to", "depth_to", "to_depth", "samp_to", "sample_to", "sampto", "todepth"],
|
|
80
80
|
[ae]: [
|
|
81
81
|
"geology_code",
|
|
82
82
|
"geologycode",
|
|
@@ -114,7 +114,7 @@ for (const [e, t] of Object.entries(fn))
|
|
|
114
114
|
function we(e) {
|
|
115
115
|
return (e || "").toString().trim().toLowerCase().replace(/\s+/g, "_");
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function ge(e, t = null, n = null) {
|
|
118
118
|
const r = { ...At };
|
|
119
119
|
if (n) {
|
|
120
120
|
for (const [i, s] of Object.entries(n))
|
|
@@ -130,8 +130,8 @@ function ye(e, t = null, n = null) {
|
|
|
130
130
|
}
|
|
131
131
|
return o;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
return e.map((r) =>
|
|
133
|
+
function Ro(e, t = null, n = null) {
|
|
134
|
+
return e.map((r) => ge(r, t, n));
|
|
135
135
|
}
|
|
136
136
|
const hn = /* @__PURE__ */ new Set([
|
|
137
137
|
"hole_id",
|
|
@@ -175,7 +175,7 @@ function Y(e, t, n = "Operation failed") {
|
|
|
175
175
|
const r = pn(t, n), o = new Error(`${e}: ${r.message}`);
|
|
176
176
|
return o.cause = r, o;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function Bo(e, t) {
|
|
179
179
|
if (t !== void 0) {
|
|
180
180
|
console.warn(`${Ke} ${e}`, t);
|
|
181
181
|
return;
|
|
@@ -185,14 +185,14 @@ function Ro(e, t) {
|
|
|
185
185
|
function Vo(e) {
|
|
186
186
|
console.info(`${Ke} ${e}`);
|
|
187
187
|
}
|
|
188
|
-
const He = (e, t = null) =>
|
|
188
|
+
const He = (e, t = null) => ge(e, null, t);
|
|
189
189
|
function bn(e) {
|
|
190
|
-
return { holeId: e[
|
|
190
|
+
return { holeId: e[k] };
|
|
191
191
|
}
|
|
192
192
|
function It(e, t = null) {
|
|
193
|
-
const n = e[
|
|
193
|
+
const n = e[k], r = n !== void 0 ? `${n}`.trim() : "";
|
|
194
194
|
if (!r) return null;
|
|
195
|
-
const o = e[me] || e.project || e.project_code, i = Number(e[
|
|
195
|
+
const o = e[me] || e.project || e.project_code, i = Number(e[F]), s = Number(e[$]);
|
|
196
196
|
return !Number.isFinite(i) || !Number.isFinite(s) || s <= i ? null : {
|
|
197
197
|
holeId: r,
|
|
198
198
|
project: o,
|
|
@@ -209,7 +209,7 @@ function Ot(e, t) {
|
|
|
209
209
|
z: s,
|
|
210
210
|
from: s,
|
|
211
211
|
to: l,
|
|
212
|
-
[
|
|
212
|
+
[k]: e,
|
|
213
213
|
[me]: c,
|
|
214
214
|
...a
|
|
215
215
|
};
|
|
@@ -224,7 +224,7 @@ function Ho(e, t = null) {
|
|
|
224
224
|
dynamicTyping: !0,
|
|
225
225
|
skipEmptyLines: !0,
|
|
226
226
|
step: (i) => {
|
|
227
|
-
const l = He(i.data, t)[
|
|
227
|
+
const l = He(i.data, t)[k];
|
|
228
228
|
l !== void 0 && `${l}`.trim() !== "" && o.add(`${l}`.trim());
|
|
229
229
|
},
|
|
230
230
|
complete: () => n(Array.from(o)),
|
|
@@ -232,10 +232,10 @@ function Ho(e, t = null) {
|
|
|
232
232
|
});
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function gn(e) {
|
|
236
236
|
return Object.entries(e || {}).some(([t, n]) => !(hn.has(t) || n == null || typeof n == "string" && n.trim() === ""));
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function yn(e, t = null) {
|
|
239
239
|
return new Promise((n, r) => {
|
|
240
240
|
const o = /* @__PURE__ */ new Map();
|
|
241
241
|
te.parse(e, {
|
|
@@ -244,7 +244,7 @@ function gn(e, t = null) {
|
|
|
244
244
|
skipEmptyLines: !0,
|
|
245
245
|
step: (i) => {
|
|
246
246
|
const s = He(i.data, t);
|
|
247
|
-
if (!
|
|
247
|
+
if (!gn(s)) return;
|
|
248
248
|
const c = bn(s).holeId;
|
|
249
249
|
if (c !== void 0 && `${c}`.trim() !== "") {
|
|
250
250
|
const a = `${c}`.trim();
|
|
@@ -337,7 +337,7 @@ function Te({
|
|
|
337
337
|
} = {}) {
|
|
338
338
|
return e ? r.includes(e) ? "comment" : n.includes(e) ? "categorical" : e === "dip" ? "tadpole" : !t || t === "categorical" || t === "comment" || t === "tadpole" ? o : t : t || o;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function St({
|
|
341
341
|
holeIds: e = [],
|
|
342
342
|
focusedHoleId: t = "",
|
|
343
343
|
plotCount: n = Mn,
|
|
@@ -489,7 +489,7 @@ function Uo(e) {
|
|
|
489
489
|
const t = et(e);
|
|
490
490
|
return t.length ? e === Ae ? "line" : t[0].value : "markers+line";
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Re(e = []) {
|
|
493
493
|
const t = e.flatMap((l) => l.points || []), { numericCols: n, categoricalCols: r, commentCols: o, byType: i } = vn(t), s = n[0] || r[0] || "";
|
|
494
494
|
return {
|
|
495
495
|
numericProps: n,
|
|
@@ -500,14 +500,14 @@ function Be(e = []) {
|
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
502
|
async function En(e, t = null) {
|
|
503
|
-
return await
|
|
503
|
+
return await yn(e);
|
|
504
504
|
}
|
|
505
505
|
async function xn(e, t, n = null) {
|
|
506
506
|
return await _n(e, t);
|
|
507
507
|
}
|
|
508
508
|
function kn(e = [], t = "") {
|
|
509
509
|
if (!e.length) return null;
|
|
510
|
-
const { numericProps: n, categoricalProps: r, commentProps: o, columnMeta: i, defaultProp: s } =
|
|
510
|
+
const { numericProps: n, categoricalProps: r, commentProps: o, columnMeta: i, defaultProp: s } = Re(e), l = e.map((a) => a.id || a.holeId).filter(Boolean), c = St({
|
|
511
511
|
holeIds: l,
|
|
512
512
|
focusedHoleId: t,
|
|
513
513
|
plotCount: 4,
|
|
@@ -538,7 +538,7 @@ function Xo(e, t = null) {
|
|
|
538
538
|
dynamicTyping: !0,
|
|
539
539
|
skipEmptyLines: !0,
|
|
540
540
|
complete: (o) => {
|
|
541
|
-
const i = o.data.map((s) => An(s, t)).filter((s) => s[
|
|
541
|
+
const i = o.data.map((s) => An(s, t)).filter((s) => s[k] && Number.isFinite(s[W]) && Number.isFinite(s[q]) && Number.isFinite(s[X]));
|
|
542
542
|
n(i);
|
|
543
543
|
},
|
|
544
544
|
error: (o) => r(Y("parseSurveyCSV", o))
|
|
@@ -546,10 +546,10 @@ function Xo(e, t = null) {
|
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
548
|
function An(e, t = null) {
|
|
549
|
-
const n =
|
|
549
|
+
const n = ge(e, null, t), r = n[k], o = n[me] || n.project || n.project_code, i = ve(n[oe]), s = ve(n[ie]), l = ve(n[W]), c = ve(n[q]), a = ve(n[X]), u = ve(n.maxdepth);
|
|
550
550
|
return {
|
|
551
551
|
raw: n,
|
|
552
|
-
[
|
|
552
|
+
[k]: r,
|
|
553
553
|
[me]: o,
|
|
554
554
|
[oe]: i,
|
|
555
555
|
[ie]: s,
|
|
@@ -572,64 +572,64 @@ function qo(e, t) {
|
|
|
572
572
|
var a, u, m, d;
|
|
573
573
|
const n = /* @__PURE__ */ new Map();
|
|
574
574
|
e.forEach((f) => {
|
|
575
|
-
const h = (f[
|
|
575
|
+
const h = (f[k] || f.holeId || f.id || "").toString().trim();
|
|
576
576
|
if (!h) return;
|
|
577
|
-
const
|
|
578
|
-
n.has(
|
|
577
|
+
const g = h.toLowerCase();
|
|
578
|
+
n.has(g) || n.set(g, f);
|
|
579
579
|
});
|
|
580
580
|
const r = ((a = e[0]) == null ? void 0 : a.lat) ?? ((u = e[0]) == null ? void 0 : u[oe]) ?? 0, o = ((m = e[0]) == null ? void 0 : m.lng) ?? ((d = e[0]) == null ? void 0 : d[ie]) ?? 0, i = 111132, s = 111320 * Math.cos(r * Math.PI / 180), l = /* @__PURE__ */ new Map();
|
|
581
581
|
t.forEach((f) => {
|
|
582
|
-
const h = (f[
|
|
582
|
+
const h = (f[k] || "").toString().trim();
|
|
583
583
|
if (!h) return;
|
|
584
|
-
const
|
|
585
|
-
l.has(
|
|
584
|
+
const g = h.toLowerCase();
|
|
585
|
+
l.has(g) || l.set(g, []), l.get(g).push(f);
|
|
586
586
|
});
|
|
587
587
|
const c = [];
|
|
588
588
|
return l.forEach((f, h) => {
|
|
589
|
-
const
|
|
590
|
-
if (!
|
|
591
|
-
const
|
|
592
|
-
if (!
|
|
593
|
-
const p =
|
|
594
|
-
let
|
|
595
|
-
for (let
|
|
596
|
-
const V =
|
|
589
|
+
const g = n.get(h);
|
|
590
|
+
if (!g) return;
|
|
591
|
+
const y = f.filter((O) => Number.isFinite(O[W] ?? O.surveydepth)).sort((O, V) => (O[W] ?? O.surveydepth) - (V[W] ?? V.surveydepth));
|
|
592
|
+
if (!y.length) return;
|
|
593
|
+
const p = g.lat ?? g[oe], b = g.lng ?? g[ie], N = 111132, M = 111320 * Math.cos(p * Math.PI / 180), I = (b - o) * s, x = (p - r) * i, S = [];
|
|
594
|
+
let w = 0, D = 0, v = 0;
|
|
595
|
+
for (let O = 0; O < y.length; O += 1) {
|
|
596
|
+
const V = y[O], H = y[O - 1], A = V[W] ?? V.surveydepth, E = V[X] ?? V.azimuth, z = V[q] ?? V.dip;
|
|
597
597
|
if (!H) {
|
|
598
|
-
|
|
599
|
-
x:
|
|
600
|
-
y:
|
|
598
|
+
S.push({
|
|
599
|
+
x: I + w,
|
|
600
|
+
y: x + D,
|
|
601
601
|
z: 0,
|
|
602
602
|
md: A,
|
|
603
603
|
azimuth: E,
|
|
604
|
-
dip:
|
|
604
|
+
dip: z
|
|
605
605
|
});
|
|
606
606
|
continue;
|
|
607
607
|
}
|
|
608
|
-
const
|
|
608
|
+
const R = H[W] ?? H.surveydepth, C = H[X] ?? H.azimuth, G = H[q] ?? H.dip, U = A - R;
|
|
609
609
|
if (U <= 0) continue;
|
|
610
|
-
const j = ut(G), Z = ut(
|
|
610
|
+
const j = ut(G), Z = ut(z), K = Qe(C), le = Qe(E), ye = Math.acos(
|
|
611
611
|
Math.sin(j) * Math.sin(Z) * Math.cos(K - le) + Math.cos(j) * Math.cos(Z)
|
|
612
|
-
), fe =
|
|
613
|
-
|
|
614
|
-
x:
|
|
615
|
-
y:
|
|
612
|
+
), fe = ye > 1e-6 ? 2 / ye * Math.tan(ye / 2) : 1, Ce = 0.5 * U * (Math.sin(j) * Math.cos(K) + Math.sin(Z) * Math.cos(le)) * fe, he = 0.5 * U * (Math.sin(j) * Math.sin(K) + Math.sin(Z) * Math.sin(le)) * fe, Ge = 0.5 * U * (Math.cos(j) + Math.cos(Z)) * fe;
|
|
613
|
+
w += Ce, D += he, v += Ge, S.push({
|
|
614
|
+
x: I + w,
|
|
615
|
+
y: x + D,
|
|
616
616
|
z: -v,
|
|
617
617
|
// render with z up; depth down
|
|
618
618
|
md: A,
|
|
619
619
|
azimuth: E,
|
|
620
|
-
dip:
|
|
620
|
+
dip: z
|
|
621
621
|
});
|
|
622
622
|
}
|
|
623
|
-
const
|
|
624
|
-
...
|
|
625
|
-
lat: p +
|
|
626
|
-
lng:
|
|
623
|
+
const L = S.map((O) => ({
|
|
624
|
+
...O,
|
|
625
|
+
lat: p + O.y / N,
|
|
626
|
+
lng: b + O.x / M
|
|
627
627
|
}));
|
|
628
628
|
c.push({
|
|
629
|
-
id:
|
|
630
|
-
project:
|
|
631
|
-
points:
|
|
632
|
-
collar:
|
|
629
|
+
id: g[k] || g.holeId || h,
|
|
630
|
+
project: g[me] || g.project_id || g.project || "",
|
|
631
|
+
points: L,
|
|
632
|
+
collar: g
|
|
633
633
|
});
|
|
634
634
|
}), c;
|
|
635
635
|
}
|
|
@@ -711,40 +711,40 @@ function tt(e = [], t = [], n = {}) {
|
|
|
711
711
|
return u.forEach((d, f) => {
|
|
712
712
|
const h = a.get(f);
|
|
713
713
|
if (!h) return;
|
|
714
|
-
const
|
|
715
|
-
...
|
|
716
|
-
from: re(
|
|
717
|
-
azimuth: re(
|
|
718
|
-
dip: re(
|
|
719
|
-
})).filter((
|
|
720
|
-
if (!
|
|
721
|
-
let
|
|
722
|
-
const
|
|
714
|
+
const g = [...d].map((S) => ({
|
|
715
|
+
...S,
|
|
716
|
+
from: re(S.from),
|
|
717
|
+
azimuth: re(S.azimuth),
|
|
718
|
+
dip: re(S.dip)
|
|
719
|
+
})).filter((S) => Number.isFinite(S.from) && Number.isFinite(S.azimuth) && Number.isFinite(S.dip)).sort((S, w) => S.from - w.from);
|
|
720
|
+
if (!g.length) return;
|
|
721
|
+
let y = re(h.x, 0), p = re(h.y, 0), b = re(h.z, 0), N = g[0].from;
|
|
722
|
+
const M = g[0].azimuth, I = g[0].dip, x = {
|
|
723
723
|
hole_id: f,
|
|
724
|
-
md:
|
|
725
|
-
x:
|
|
724
|
+
md: N,
|
|
725
|
+
x: y,
|
|
726
726
|
y: p,
|
|
727
|
-
z:
|
|
728
|
-
azimuth:
|
|
729
|
-
dip:
|
|
727
|
+
z: b,
|
|
728
|
+
azimuth: M,
|
|
729
|
+
dip: I
|
|
730
730
|
};
|
|
731
|
-
l.aliasCol !== "hole_id" && h[l.aliasCol] !== void 0 && (
|
|
732
|
-
for (let
|
|
733
|
-
const
|
|
734
|
-
if (
|
|
735
|
-
const V = Math.max(1, Math.ceil(
|
|
731
|
+
l.aliasCol !== "hole_id" && h[l.aliasCol] !== void 0 && (x[l.aliasCol] = h[l.aliasCol]), m.push(x);
|
|
732
|
+
for (let S = 0; S < g.length - 1; S += 1) {
|
|
733
|
+
const w = g[S], D = g[S + 1], v = w.from, O = D.from - v;
|
|
734
|
+
if (O <= 0) continue;
|
|
735
|
+
const V = Math.max(1, Math.ceil(O / s)), H = O / V;
|
|
736
736
|
for (let A = 0; A < V; A += 1) {
|
|
737
|
-
|
|
738
|
-
const E = (
|
|
739
|
-
|
|
737
|
+
N += H;
|
|
738
|
+
const E = (N - v) / O, z = w.azimuth + E * (D.azimuth - w.azimuth), R = w.dip + E * (D.dip - w.dip), C = In(H, w.azimuth, w.dip, D.azimuth, D.dip, i);
|
|
739
|
+
y += C.dx, p += C.dy, b += C.dz;
|
|
740
740
|
const G = {
|
|
741
741
|
hole_id: f,
|
|
742
|
-
md:
|
|
743
|
-
x:
|
|
742
|
+
md: N,
|
|
743
|
+
x: y,
|
|
744
744
|
y: p,
|
|
745
|
-
z:
|
|
746
|
-
azimuth: i === "minimum_curvature" ?
|
|
747
|
-
dip: i === "minimum_curvature" ?
|
|
745
|
+
z: b,
|
|
746
|
+
azimuth: i === "minimum_curvature" ? z : C.azimuth,
|
|
747
|
+
dip: i === "minimum_curvature" ? R : C.dip
|
|
748
748
|
};
|
|
749
749
|
l.aliasCol !== "hole_id" && h[l.aliasCol] !== void 0 && (G[l.aliasCol] = h[l.aliasCol]), m.push(G);
|
|
750
750
|
}
|
|
@@ -802,11 +802,11 @@ function Qo(e, t = null) {
|
|
|
802
802
|
complete: (o) => {
|
|
803
803
|
const i = /* @__PURE__ */ new Map();
|
|
804
804
|
o.data.forEach((l, c) => {
|
|
805
|
-
const a =
|
|
805
|
+
const a = ge(l, null, t), u = a[k], m = u !== void 0 ? `${u}`.trim() : "", d = a[pe] ?? a.x, f = a[be] ?? a.y, h = a[xe] ?? a.z, g = a.order ?? c;
|
|
806
806
|
!m || d === null || d === void 0 || f === null || f === void 0 || h === null || h === void 0 || (i.has(m) || i.set(m, []), i.get(m).push({
|
|
807
807
|
...a,
|
|
808
808
|
holeId: m,
|
|
809
|
-
order:
|
|
809
|
+
order: g,
|
|
810
810
|
x: Number(d) ?? 0,
|
|
811
811
|
y: Number(f) ?? 0,
|
|
812
812
|
z: Number(h) ?? 0
|
|
@@ -845,11 +845,11 @@ function Pe(e = [], t = []) {
|
|
|
845
845
|
return 0;
|
|
846
846
|
}), n;
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function Sn(e = [], t = "Intervals") {
|
|
849
849
|
if (!e.length) return;
|
|
850
|
-
const n = Pe(e, [
|
|
850
|
+
const n = Pe(e, [k, F, $]), r = /* @__PURE__ */ new Map();
|
|
851
851
|
n.forEach((o) => {
|
|
852
|
-
const i = `${(o == null ? void 0 : o[
|
|
852
|
+
const i = `${(o == null ? void 0 : o[k]) ?? ""}`.trim(), s = Number(o == null ? void 0 : o[F]), l = Number(o == null ? void 0 : o[$]);
|
|
853
853
|
if (!i || !Number.isFinite(s) || !Number.isFinite(l)) return;
|
|
854
854
|
const c = r.get(i);
|
|
855
855
|
if (Number.isFinite(c) && s < c)
|
|
@@ -860,7 +860,7 @@ function Dn(e = [], t = "Intervals") {
|
|
|
860
860
|
r.set(i, l);
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function Dn(e, t = {}) {
|
|
864
864
|
return new Promise((n, r) => {
|
|
865
865
|
te.parse(e, {
|
|
866
866
|
header: !0,
|
|
@@ -873,7 +873,7 @@ function Sn(e, t = {}) {
|
|
|
873
873
|
});
|
|
874
874
|
}
|
|
875
875
|
function Ln(e = [], t = null, n = null) {
|
|
876
|
-
return e.map((r) =>
|
|
876
|
+
return e.map((r) => ge(r, t, n));
|
|
877
877
|
}
|
|
878
878
|
async function je(e, t = {}) {
|
|
879
879
|
const {
|
|
@@ -886,7 +886,7 @@ async function je(e, t = {}) {
|
|
|
886
886
|
if (Array.isArray(e))
|
|
887
887
|
s = Ee(e);
|
|
888
888
|
else if (n === "csv")
|
|
889
|
-
s = await
|
|
889
|
+
s = await Dn(e, i);
|
|
890
890
|
else throw n === "parquet" || n === "sql" ? Y("loadTable", new Error(`Unsupported kind in JS runtime: ${n}`)) : Y("loadTable", new Error(`Unsupported kind: ${n}`));
|
|
891
891
|
return Ln(s, r, o);
|
|
892
892
|
}
|
|
@@ -897,20 +897,20 @@ async function ei(e, t = {}) {
|
|
|
897
897
|
keepAll: o = !0,
|
|
898
898
|
...i
|
|
899
899
|
} = t, s = await je(e, { ...i, sourceColumnMap: r });
|
|
900
|
-
if (!s.some((d) =>
|
|
901
|
-
throw Y("loadCollars", new Error(`Collar table missing column: ${
|
|
900
|
+
if (!s.some((d) => k in d))
|
|
901
|
+
throw Y("loadCollars", new Error(`Collar table missing column: ${k}`));
|
|
902
902
|
const c = s.some((d) => pe in d && be in d), a = s.some((d) => oe in d && ie in d);
|
|
903
903
|
if (!c && !a)
|
|
904
904
|
throw Y("loadCollars", new Error("Collar table missing coordinate columns (need easting/northing or latitude/longitude)"));
|
|
905
905
|
const u = s.map((d) => {
|
|
906
906
|
const f = { ...d };
|
|
907
|
-
if (
|
|
908
|
-
const h = f[
|
|
909
|
-
f[
|
|
907
|
+
if (k in f) {
|
|
908
|
+
const h = f[k];
|
|
909
|
+
f[k] = h == null ? "" : `${h}`.trim();
|
|
910
910
|
}
|
|
911
|
-
return oe in f && (f[oe] = ee(f[oe])), ie in f && (f[ie] = ee(f[ie])), xe in f && (f[xe] = ee(f[xe])), pe in f && (f[pe] = ee(f[pe])), be in f && (f[be] = ee(f[be])), !("datasource_hole_id" in f) &&
|
|
911
|
+
return oe in f && (f[oe] = ee(f[oe])), ie in f && (f[ie] = ee(f[ie])), xe in f && (f[xe] = ee(f[xe])), pe in f && (f[pe] = ee(f[pe])), be in f && (f[be] = ee(f[be])), !("datasource_hole_id" in f) && k in f && (f.datasource_hole_id = f[k]), f;
|
|
912
912
|
});
|
|
913
|
-
if (!u.every((d) => !(!d[
|
|
913
|
+
if (!u.every((d) => !(!d[k] || a && (!Number.isFinite(d[oe]) || !Number.isFinite(d[ie])) || c && !a && (!Number.isFinite(d[pe]) || !Number.isFinite(d[be])))))
|
|
914
914
|
throw Y("loadCollars", new Error("Collar table has missing required values"));
|
|
915
915
|
return u;
|
|
916
916
|
}
|
|
@@ -919,80 +919,80 @@ async function ti(e, t = {}) {
|
|
|
919
919
|
sourceColumnMap: n = null,
|
|
920
920
|
keepAll: r = !0,
|
|
921
921
|
...o
|
|
922
|
-
} = t, i = await je(e, { ...o, sourceColumnMap: n }), s = [
|
|
922
|
+
} = t, i = await je(e, { ...o, sourceColumnMap: n }), s = [k, W, X, q];
|
|
923
923
|
for (const a of s)
|
|
924
924
|
if (!i.some((m) => a in m))
|
|
925
925
|
throw Y("loadSurveys", new Error(`Survey table missing column: ${a}`));
|
|
926
926
|
const l = i.map((a) => {
|
|
927
927
|
const u = { ...a };
|
|
928
|
-
if (
|
|
929
|
-
const m = u[
|
|
930
|
-
u[
|
|
928
|
+
if (k in u) {
|
|
929
|
+
const m = u[k];
|
|
930
|
+
u[k] = m == null ? "" : `${m}`.trim();
|
|
931
931
|
}
|
|
932
|
-
return W in u && (u[W] = ee(u[W])),
|
|
932
|
+
return W in u && (u[W] = ee(u[W])), $ in u && (u[$] = ee(u[$])), X in u && (u[X] = ee(u[X])), q in u && (u[q] = ee(u[q])), u;
|
|
933
933
|
});
|
|
934
|
-
if (!l.every((a) => !(!a[
|
|
934
|
+
if (!l.every((a) => !(!a[k] || !Number.isFinite(a[W]) || !Number.isFinite(a[X]) || !Number.isFinite(a[q]))))
|
|
935
935
|
throw Y("loadSurveys", new Error("Survey table has missing required values"));
|
|
936
|
-
return Pe(l, [
|
|
936
|
+
return Pe(l, [k, W]);
|
|
937
937
|
}
|
|
938
938
|
async function ni(e, t = {}) {
|
|
939
939
|
const {
|
|
940
940
|
sourceColumnMap: n = null,
|
|
941
941
|
keepAll: r = !0,
|
|
942
942
|
...o
|
|
943
|
-
} = t, i = await je(e, { ...o, sourceColumnMap: n }), s = [
|
|
943
|
+
} = t, i = await je(e, { ...o, sourceColumnMap: n }), s = [k, F, $];
|
|
944
944
|
for (const a of s)
|
|
945
945
|
if (!i.some((m) => a in m))
|
|
946
946
|
throw Y("loadAssays", new Error(`Assay table missing column: ${a}`));
|
|
947
947
|
const l = i.map((a) => {
|
|
948
948
|
const u = { ...a };
|
|
949
|
-
if (
|
|
950
|
-
const m = u[
|
|
951
|
-
u[
|
|
949
|
+
if (k in u) {
|
|
950
|
+
const m = u[k];
|
|
951
|
+
u[k] = m == null ? "" : `${m}`.trim();
|
|
952
952
|
}
|
|
953
|
-
return
|
|
953
|
+
return F in u && (u[F] = ee(u[F])), $ in u && (u[$] = ee(u[$])), F in u && $ in u && Number.isFinite(u[F]) && Number.isFinite(u[$]) && (u[Ie] = 0.5 * (u[F] + u[$])), u;
|
|
954
954
|
});
|
|
955
|
-
if (!l.every((a) => !(!a[
|
|
955
|
+
if (!l.every((a) => !(!a[k] || !Number.isFinite(a[F]) || !Number.isFinite(a[$]) || !(a[$] > a[F]))))
|
|
956
956
|
throw Y("loadAssays", new Error("Assay table has missing required values"));
|
|
957
|
-
return Pe(l, [
|
|
957
|
+
return Pe(l, [k, F, $]);
|
|
958
958
|
}
|
|
959
959
|
async function ri(e, t = {}) {
|
|
960
960
|
const {
|
|
961
961
|
sourceColumnMap: n = null,
|
|
962
962
|
keepAll: r = !0,
|
|
963
963
|
...o
|
|
964
|
-
} = t, i = await je(e, { ...o, sourceColumnMap: n }), s = [
|
|
964
|
+
} = t, i = await je(e, { ...o, sourceColumnMap: n }), s = [k, F, $];
|
|
965
965
|
for (const u of s)
|
|
966
966
|
if (!i.some((d) => u in d))
|
|
967
967
|
throw Y("loadGeology", new Error(`Geology table missing column: ${u}`));
|
|
968
968
|
const l = i.map((u) => {
|
|
969
969
|
const m = { ...u };
|
|
970
|
-
if (
|
|
971
|
-
const h = m[
|
|
972
|
-
m[
|
|
970
|
+
if (k in m) {
|
|
971
|
+
const h = m[k];
|
|
972
|
+
m[k] = h == null ? "" : `${h}`.trim();
|
|
973
973
|
}
|
|
974
|
-
|
|
974
|
+
F in m && (m[F] = ee(m[F])), $ in m && (m[$] = ee(m[$])), F in m && $ in m && Number.isFinite(m[F]) && Number.isFinite(m[$]) && (m[$] === m[F] && (m[F] = Math.round(m[F] * 1e3) / 1e3, m[$] = m[F] + 1e-3), m[Ie] = 0.5 * (m[F] + m[$]));
|
|
975
975
|
const d = m[ae] !== void 0 && m[ae] !== null && `${m[ae]}`.trim() !== "", f = m[ce] !== void 0 && m[ce] !== null && `${m[ce]}`.trim() !== "";
|
|
976
976
|
return !d && f && (m[ae] = m[ce]), d && !f && (m[ce] = m[ae]), m;
|
|
977
977
|
});
|
|
978
|
-
if (!l.every((u) => !(!u[
|
|
978
|
+
if (!l.every((u) => !(!u[k] || !Number.isFinite(u[F]) || !Number.isFinite(u[$]) || !(u[$] > u[F]))))
|
|
979
979
|
throw Y("loadGeology", new Error("Geology table has missing or invalid interval values"));
|
|
980
980
|
if (!l.some((u) => {
|
|
981
981
|
const m = u[ae], d = u[ce];
|
|
982
982
|
return m != null && `${m}`.trim() !== "" || d != null && `${d}`.trim() !== "";
|
|
983
983
|
}))
|
|
984
984
|
throw Y("loadGeology", new Error(`Geology table missing categorical columns: ${ae} or ${ce}`));
|
|
985
|
-
if (
|
|
985
|
+
if (Sn(l, "Geology"), !r) {
|
|
986
986
|
const u = new Set(Object.keys(mn));
|
|
987
987
|
return Pe(
|
|
988
988
|
l.map((m) => Object.fromEntries(Object.entries(m).filter(([d]) => u.has(d)))),
|
|
989
|
-
[
|
|
989
|
+
[k, F, $]
|
|
990
990
|
);
|
|
991
991
|
}
|
|
992
|
-
return Pe(l, [
|
|
992
|
+
return Pe(l, [k, F, $]);
|
|
993
993
|
}
|
|
994
994
|
function oi(e = [], t = [], n = {}) {
|
|
995
|
-
const r = Array.isArray(n.onCols) && n.onCols.length ? n.onCols : [
|
|
995
|
+
const r = Array.isArray(n.onCols) && n.onCols.length ? n.onCols : [k];
|
|
996
996
|
if (!t.length) return [...e];
|
|
997
997
|
const o = (s) => r.map((l) => `${(s == null ? void 0 : s[l]) ?? ""}`).join("|"), i = /* @__PURE__ */ new Map();
|
|
998
998
|
return t.forEach((s) => {
|
|
@@ -1036,7 +1036,7 @@ function li({
|
|
|
1036
1036
|
metadata: i || {}
|
|
1037
1037
|
};
|
|
1038
1038
|
}
|
|
1039
|
-
const
|
|
1039
|
+
const Dt = ["x", "y", "z", "dx", "dy", "dz"], Pn = {
|
|
1040
1040
|
x: ["x", "easting", "center_x", "xc", "xcentre", "xcenter", "x_centre", "x_center", "cx"],
|
|
1041
1041
|
y: ["y", "northing", "center_y", "yc", "ycentre", "ycenter", "y_centre", "y_center", "cy"],
|
|
1042
1042
|
z: ["z", "elevation", "center_z", "zc", "zcentre", "zcenter", "z_centre", "z_center", "cz"],
|
|
@@ -1066,7 +1066,7 @@ function ai(e) {
|
|
|
1066
1066
|
const i = (r.data || []).map(Fn).filter(
|
|
1067
1067
|
(l) => l.x !== null && l.y !== null && l.z !== null
|
|
1068
1068
|
), s = Object.keys(i[0] || {}).filter(
|
|
1069
|
-
(l) => !
|
|
1069
|
+
(l) => !Dt.includes(l)
|
|
1070
1070
|
);
|
|
1071
1071
|
t({ data: i, properties: s });
|
|
1072
1072
|
},
|
|
@@ -1097,7 +1097,7 @@ function wn(e, t) {
|
|
|
1097
1097
|
function ui(e) {
|
|
1098
1098
|
if (!e || e.length === 0) return {};
|
|
1099
1099
|
const t = Object.keys(e[0]).filter(
|
|
1100
|
-
(r) => !
|
|
1100
|
+
(r) => !Dt.includes(r)
|
|
1101
1101
|
), n = {};
|
|
1102
1102
|
return t.forEach((r) => {
|
|
1103
1103
|
n[r] = wn(e, r);
|
|
@@ -1126,10 +1126,10 @@ function $n(e, t, n) {
|
|
|
1126
1126
|
const o = t.categories.indexOf(e) / Math.max(t.categories.length, 1) * 360;
|
|
1127
1127
|
return new n.Color().setHSL(o / 360, 0.7, 0.5);
|
|
1128
1128
|
}
|
|
1129
|
-
const nt = (e, t = null) =>
|
|
1130
|
-
function
|
|
1129
|
+
const nt = (e, t = null) => ge(e, null, t);
|
|
1130
|
+
function Rn(e) {
|
|
1131
1131
|
if (!e.length) return null;
|
|
1132
|
-
const t = e[0], n =
|
|
1132
|
+
const t = e[0], n = F in t && $ in t, r = W in t && !n;
|
|
1133
1133
|
return n ? "interval" : r ? "point" : null;
|
|
1134
1134
|
}
|
|
1135
1135
|
function de(e) {
|
|
@@ -1137,11 +1137,11 @@ function de(e) {
|
|
|
1137
1137
|
return Number.isFinite(t) ? t : null;
|
|
1138
1138
|
}
|
|
1139
1139
|
function Pt(e) {
|
|
1140
|
-
const t = e[
|
|
1140
|
+
const t = e[k] !== void 0 ? `${e[k]}`.trim() : "";
|
|
1141
1141
|
if (!t) return null;
|
|
1142
1142
|
const n = de(e[W]);
|
|
1143
1143
|
return n === null ? null : {
|
|
1144
|
-
[
|
|
1144
|
+
[k]: t,
|
|
1145
1145
|
[W]: n,
|
|
1146
1146
|
[q]: de(e[q]),
|
|
1147
1147
|
[X]: de(e[X]),
|
|
@@ -1150,15 +1150,15 @@ function Pt(e) {
|
|
|
1150
1150
|
};
|
|
1151
1151
|
}
|
|
1152
1152
|
function Ft(e) {
|
|
1153
|
-
const t = e[
|
|
1153
|
+
const t = e[k] !== void 0 ? `${e[k]}`.trim() : "";
|
|
1154
1154
|
if (!t) return null;
|
|
1155
|
-
const n = de(e[
|
|
1155
|
+
const n = de(e[F]), r = de(e[$]);
|
|
1156
1156
|
if (n === null || r === null || r <= n) return null;
|
|
1157
1157
|
const o = 0.5 * (n + r);
|
|
1158
1158
|
return {
|
|
1159
|
-
[
|
|
1160
|
-
[
|
|
1161
|
-
[
|
|
1159
|
+
[k]: t,
|
|
1160
|
+
[F]: n,
|
|
1161
|
+
[$]: r,
|
|
1162
1162
|
mid: o,
|
|
1163
1163
|
[q]: de(e[q]),
|
|
1164
1164
|
[X]: de(e[X]),
|
|
@@ -1213,7 +1213,7 @@ function hi(e, t = null) {
|
|
|
1213
1213
|
});
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function Bn(e, t = k) {
|
|
1217
1217
|
const n = /* @__PURE__ */ new Map();
|
|
1218
1218
|
for (const r of e) {
|
|
1219
1219
|
const o = r[t] != null ? String(r[t]).trim() : "";
|
|
@@ -1228,7 +1228,7 @@ function Vn(e, t = null) {
|
|
|
1228
1228
|
dynamicTyping: !0,
|
|
1229
1229
|
skipEmptyLines: !0,
|
|
1230
1230
|
complete: (o) => {
|
|
1231
|
-
const i = o.data.map((c) => nt(c, t)), s =
|
|
1231
|
+
const i = o.data.map((c) => nt(c, t)), s = Rn(i);
|
|
1232
1232
|
if (!s) {
|
|
1233
1233
|
r(Y(
|
|
1234
1234
|
"parseStructuralCSV",
|
|
@@ -1256,15 +1256,15 @@ function Hn(e) {
|
|
|
1256
1256
|
complete: (n) => {
|
|
1257
1257
|
const r = /* @__PURE__ */ new Map();
|
|
1258
1258
|
for (const i of n.data) {
|
|
1259
|
-
const s =
|
|
1259
|
+
const s = ge(i), l = s[k] != null ? `${s[k]}`.trim() : "";
|
|
1260
1260
|
if (!l) continue;
|
|
1261
|
-
const c = Number(s[
|
|
1261
|
+
const c = Number(s[F]), a = Number(s[$]);
|
|
1262
1262
|
if (!Number.isFinite(c) || !Number.isFinite(a) || a <= c) continue;
|
|
1263
1263
|
const u = (c + a) / 2, { [q]: m, [X]: d, ...f } = s, h = {
|
|
1264
1264
|
...f,
|
|
1265
|
-
[
|
|
1266
|
-
[
|
|
1267
|
-
[
|
|
1265
|
+
[k]: l,
|
|
1266
|
+
[F]: c,
|
|
1267
|
+
[$]: a,
|
|
1268
1268
|
[Ie]: u,
|
|
1269
1269
|
[W]: u,
|
|
1270
1270
|
// unified depth field for y-axis rendering
|
|
@@ -1274,7 +1274,7 @@ function Hn(e) {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
const o = Array.from(r.entries()).map(([i, s]) => ({
|
|
1276
1276
|
holeId: i,
|
|
1277
|
-
points: s.sort((l, c) => l[
|
|
1277
|
+
points: s.sort((l, c) => l[F] - c[F])
|
|
1278
1278
|
}));
|
|
1279
1279
|
t(o);
|
|
1280
1280
|
}
|
|
@@ -1290,15 +1290,15 @@ function jn(e) {
|
|
|
1290
1290
|
complete: (n) => {
|
|
1291
1291
|
const r = /* @__PURE__ */ new Map();
|
|
1292
1292
|
for (const o of n.data) {
|
|
1293
|
-
const i =
|
|
1293
|
+
const i = ge(o), s = (i[k] ?? "").toString().trim();
|
|
1294
1294
|
if (!s) continue;
|
|
1295
|
-
const l = Number(i[
|
|
1295
|
+
const l = Number(i[F]), c = Number(i[$]);
|
|
1296
1296
|
if (!Number.isFinite(l) || !Number.isFinite(c) || c <= l) continue;
|
|
1297
1297
|
const a = (l + c) / 2, { [q]: u, [X]: m, ...d } = i, f = {
|
|
1298
1298
|
...d,
|
|
1299
|
-
[
|
|
1300
|
-
[
|
|
1301
|
-
[
|
|
1299
|
+
[k]: s,
|
|
1300
|
+
[F]: l,
|
|
1301
|
+
[$]: c,
|
|
1302
1302
|
[Ie]: a,
|
|
1303
1303
|
[W]: a,
|
|
1304
1304
|
_source: "geology"
|
|
@@ -1308,7 +1308,7 @@ function jn(e) {
|
|
|
1308
1308
|
t({
|
|
1309
1309
|
holes: Array.from(r.entries()).map(([o, i]) => ({
|
|
1310
1310
|
holeId: o,
|
|
1311
|
-
points: i.sort((s, l) => s[
|
|
1311
|
+
points: i.sort((s, l) => s[F] - l[F])
|
|
1312
1312
|
}))
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
@@ -1319,7 +1319,7 @@ async function pi({ assayCsv: e, structuralCsv: t, geologyCsv: n } = {}) {
|
|
|
1319
1319
|
const [r, o, i] = await Promise.all([
|
|
1320
1320
|
e ? Hn(e) : Promise.resolve([]),
|
|
1321
1321
|
t ? Vn(t).then(
|
|
1322
|
-
({ rows: l }) =>
|
|
1322
|
+
({ rows: l }) => Bn(l.map((c) => ({ ...c, _source: "structural" })))
|
|
1323
1323
|
) : Promise.resolve([]),
|
|
1324
1324
|
n ? jn(n).then(({ holes: l }) => l) : Promise.resolve([])
|
|
1325
1325
|
]), s = new Map(r.map((l) => [l.holeId, { ...l, points: [...l.points] }]));
|
|
@@ -1334,41 +1334,86 @@ async function pi({ assayCsv: e, structuralCsv: t, geologyCsv: n } = {}) {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
return { holes: Array.from(s.values()) };
|
|
1336
1336
|
}
|
|
1337
|
+
function bi(e, t, n, r, o = {}) {
|
|
1338
|
+
const i = o.fromCol || "from", s = o.toCol || "to", l = o.holeCol || "hole_id";
|
|
1339
|
+
if (!e || !e.length) return [];
|
|
1340
|
+
const c = {};
|
|
1341
|
+
for (const u of e) {
|
|
1342
|
+
const m = u[l];
|
|
1343
|
+
m != null && (c[m] || (c[m] = []), c[m].push(u));
|
|
1344
|
+
}
|
|
1345
|
+
const a = [];
|
|
1346
|
+
for (const [u, m] of Object.entries(c)) {
|
|
1347
|
+
const f = [...m].sort((p, b) => Number(p[i]) - Number(b[i])).filter((p) => {
|
|
1348
|
+
const b = Number(p[t]);
|
|
1349
|
+
return Number.isFinite(b) && b >= n;
|
|
1350
|
+
});
|
|
1351
|
+
if (!f.length) continue;
|
|
1352
|
+
const h = [];
|
|
1353
|
+
let g = [], y = null;
|
|
1354
|
+
for (const p of f) {
|
|
1355
|
+
const b = Number(p[i]), N = Number(p[s]);
|
|
1356
|
+
y === null || Math.abs(b - y) > 1e-6 ? (g.length && h.push(g), g = [p]) : g.push(p), y = N;
|
|
1357
|
+
}
|
|
1358
|
+
g.length && h.push(g);
|
|
1359
|
+
for (const p of h) {
|
|
1360
|
+
const b = Number(p[0][i]), N = Number(p[p.length - 1][s]), M = N - b;
|
|
1361
|
+
if (M < r) continue;
|
|
1362
|
+
let I = 0, x = 0;
|
|
1363
|
+
for (const v of p) {
|
|
1364
|
+
const L = Number(v[t]), O = Number(v[s]) - Number(v[i]);
|
|
1365
|
+
I += L * O, x += O;
|
|
1366
|
+
}
|
|
1367
|
+
const S = I / x, w = p.length, D = `${M.toFixed(1)} m @ ${S.toFixed(2)} ${t}`;
|
|
1368
|
+
a.push({
|
|
1369
|
+
[l]: u,
|
|
1370
|
+
assay_field: t,
|
|
1371
|
+
[i]: b,
|
|
1372
|
+
[s]: N,
|
|
1373
|
+
length: M,
|
|
1374
|
+
avg_grade: S,
|
|
1375
|
+
n_samples: w,
|
|
1376
|
+
label: D
|
|
1377
|
+
});
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
return a;
|
|
1381
|
+
}
|
|
1337
1382
|
function Gn(e, t) {
|
|
1338
1383
|
if (!e || e.length === 0 || !Number.isFinite(t)) return null;
|
|
1339
1384
|
const n = e.length;
|
|
1340
1385
|
if (n === 1) {
|
|
1341
|
-
const
|
|
1342
|
-
return { x: Number(
|
|
1386
|
+
const b = e[0];
|
|
1387
|
+
return { x: Number(b.x), y: Number(b.y), z: Number(b.z), dx: 0, dy: 0, dz: -1 };
|
|
1343
1388
|
}
|
|
1344
1389
|
let r = -1;
|
|
1345
|
-
for (let
|
|
1346
|
-
const
|
|
1347
|
-
if (t >=
|
|
1348
|
-
r =
|
|
1390
|
+
for (let b = 0; b < n - 1; b++) {
|
|
1391
|
+
const N = Number(e[b].md), M = Number(e[b + 1].md);
|
|
1392
|
+
if (t >= N && t <= M) {
|
|
1393
|
+
r = b;
|
|
1349
1394
|
break;
|
|
1350
1395
|
}
|
|
1351
1396
|
}
|
|
1352
1397
|
let o, i, s;
|
|
1353
1398
|
if (r === -1) {
|
|
1354
1399
|
t < Number(e[0].md) ? (o = e[0], i = e[1]) : (o = e[n - 2], i = e[n - 1]);
|
|
1355
|
-
const
|
|
1356
|
-
s =
|
|
1400
|
+
const b = Number(o.md), M = Number(i.md) - b;
|
|
1401
|
+
s = M > 0 ? (t - b) / M : t < b ? 0 : 1;
|
|
1357
1402
|
} else {
|
|
1358
1403
|
o = e[r], i = e[r + 1];
|
|
1359
|
-
const
|
|
1360
|
-
s =
|
|
1404
|
+
const b = Number(o.md), M = Number(i.md) - b;
|
|
1405
|
+
s = M > 0 ? (t - b) / M : 0;
|
|
1361
1406
|
}
|
|
1362
1407
|
const l = Number(o.x) + s * (Number(i.x) - Number(o.x)), c = Number(o.y) + s * (Number(i.y) - Number(o.y)), a = Number(o.z) + s * (Number(i.z) - Number(o.z));
|
|
1363
1408
|
let u, m, d;
|
|
1364
|
-
const f = Number(o.azimuth), h = Number(o.dip),
|
|
1409
|
+
const f = Number(o.azimuth), h = Number(o.dip), g = Number(i.azimuth), y = Number(i.dip);
|
|
1365
1410
|
if (Number.isFinite(f) && Number.isFinite(h)) {
|
|
1366
|
-
const
|
|
1367
|
-
u = Math.cos(
|
|
1411
|
+
const b = Number.isFinite(g) && Number.isFinite(y) ? f + s * (g - f) : f, N = Number.isFinite(g) && Number.isFinite(y) ? h + s * (y - h) : h, M = b * Math.PI / 180, I = N * Math.PI / 180;
|
|
1412
|
+
u = Math.cos(I) * Math.sin(M), m = Math.cos(I) * Math.cos(M), d = -Math.sin(I);
|
|
1368
1413
|
} else {
|
|
1369
|
-
const
|
|
1370
|
-
if (
|
|
1371
|
-
u =
|
|
1414
|
+
const b = Number(i.x) - Number(o.x), N = Number(i.y) - Number(o.y), M = Number(i.z) - Number(o.z), I = Math.sqrt(b * b + N * N + M * M);
|
|
1415
|
+
if (I < 1e-10) return { x: l, y: c, z: a, dx: 0, dy: 0, dz: -1 };
|
|
1416
|
+
u = b / I, m = N / I, d = M / I;
|
|
1372
1417
|
}
|
|
1373
1418
|
const p = Math.sqrt(u * u + m * m + d * d);
|
|
1374
1419
|
return p < 1e-10 ? { x: l, y: c, z: a, dx: 0, dy: 0, dz: -1 } : { x: l, y: c, z: a, dx: u / p, dy: m / p, dz: d / p };
|
|
@@ -1382,20 +1427,20 @@ function Un(e, t, n, r = {}) {
|
|
|
1382
1427
|
u[1] * a[2] - u[2] * a[1],
|
|
1383
1428
|
u[2] * a[0] - u[0] * a[2],
|
|
1384
1429
|
u[0] * a[1] - u[1] * a[0]
|
|
1385
|
-
], f = Math.sqrt(d[0] ** 2 + d[1] ** 2 + d[2] ** 2), h = f > 1e-10 ? [d[0] / f, d[1] / f, d[2] / f] : [1, 0, 0],
|
|
1430
|
+
], f = Math.sqrt(d[0] ** 2 + d[1] ** 2 + d[2] ** 2), h = f > 1e-10 ? [d[0] / f, d[1] / f, d[2] / f] : [1, 0, 0], g = [
|
|
1386
1431
|
a[1] * h[2] - a[2] * h[1],
|
|
1387
1432
|
a[2] * h[0] - a[0] * h[2],
|
|
1388
1433
|
a[0] * h[1] - a[1] * h[0]
|
|
1389
|
-
],
|
|
1390
|
-
a[1] *
|
|
1391
|
-
a[2] *
|
|
1392
|
-
a[0] *
|
|
1393
|
-
],
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
],
|
|
1398
|
-
return A < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx:
|
|
1434
|
+
], y = Math.sqrt(g[0] ** 2 + g[1] ** 2 + g[2] ** 2), p = y > 1e-10 ? [g[0] / y, g[1] / y, g[2] / y] : [0, 1, 0], b = o === "R" ? h : p, N = t * Math.PI / 180 * i, M = Math.cos(N), I = Math.sin(N), x = b[0] * a[0] + b[1] * a[1] + b[2] * a[2], S = [
|
|
1435
|
+
a[1] * b[2] - a[2] * b[1],
|
|
1436
|
+
a[2] * b[0] - a[0] * b[2],
|
|
1437
|
+
a[0] * b[1] - a[1] * b[0]
|
|
1438
|
+
], w = [
|
|
1439
|
+
b[0] * M + S[0] * I + a[0] * x * (1 - M),
|
|
1440
|
+
b[1] * M + S[1] * I + a[1] * x * (1 - M),
|
|
1441
|
+
b[2] * M + S[2] * I + a[2] * x * (1 - M)
|
|
1442
|
+
], D = (90 - e) * Math.PI / 180, v = Math.cos(D), L = Math.sin(D), O = v * w[0] + L * a[0], V = v * w[1] + L * a[1], H = v * w[2] + L * a[2], A = Math.sqrt(O * O + V * V + H * H);
|
|
1443
|
+
return A < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: O / A, ny: V / A, nz: H / A };
|
|
1399
1444
|
}
|
|
1400
1445
|
function Yn(e, t, n = {}) {
|
|
1401
1446
|
if (!(e != null && e.length) || !(t != null && t.length)) return [];
|
|
@@ -1416,23 +1461,23 @@ function Yn(e, t, n = {}) {
|
|
|
1416
1461
|
if (!Number.isFinite(c)) continue;
|
|
1417
1462
|
const a = Gn(l, c);
|
|
1418
1463
|
if (!a) continue;
|
|
1419
|
-
const { x: u, y: m, z: d, dx: f, dy: h, dz:
|
|
1420
|
-
let
|
|
1421
|
-
const
|
|
1422
|
-
if (Number.isFinite(
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1464
|
+
const { x: u, y: m, z: d, dx: f, dy: h, dz: g } = a;
|
|
1465
|
+
let y, p, b;
|
|
1466
|
+
const N = i.alpha != null ? Number(i.alpha) : null, M = i.beta != null ? Number(i.beta) : null;
|
|
1467
|
+
if (Number.isFinite(N)) {
|
|
1468
|
+
const I = Number.isFinite(M) ? M : 0, x = Un(N, I, { dx: f, dy: h, dz: g }, n);
|
|
1469
|
+
y = x.nx, p = x.ny, b = x.nz;
|
|
1425
1470
|
} else {
|
|
1426
|
-
const
|
|
1427
|
-
if (!Number.isFinite(
|
|
1428
|
-
const
|
|
1429
|
-
|
|
1471
|
+
const I = i.dip != null ? Number(i.dip) : null, x = i.azimuth != null ? Number(i.azimuth) : null;
|
|
1472
|
+
if (!Number.isFinite(I) || !Number.isFinite(x)) continue;
|
|
1473
|
+
const S = I * Math.PI / 180, w = x * Math.PI / 180;
|
|
1474
|
+
y = Math.sin(w) * Math.sin(S), p = Math.cos(w) * Math.sin(S), b = Math.cos(S);
|
|
1430
1475
|
}
|
|
1431
|
-
o.push({ ...i, x: u, y: m, z: d, nx:
|
|
1476
|
+
o.push({ ...i, x: u, y: m, z: d, nx: y, ny: p, nz: b });
|
|
1432
1477
|
}
|
|
1433
1478
|
return o;
|
|
1434
1479
|
}
|
|
1435
|
-
const Xn = "baselode",
|
|
1480
|
+
const Xn = "baselode", gi = Xn, qn = [
|
|
1436
1481
|
"#8b1e3f",
|
|
1437
1482
|
"#2563eb",
|
|
1438
1483
|
"#16a34a",
|
|
@@ -1443,7 +1488,7 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1443
1488
|
"#10b981",
|
|
1444
1489
|
"#f97316",
|
|
1445
1490
|
"#8b5cf6"
|
|
1446
|
-
],
|
|
1491
|
+
], B = {
|
|
1447
1492
|
bg: "#ffffff",
|
|
1448
1493
|
panel: "#f8fafc",
|
|
1449
1494
|
ink: "#1e293b",
|
|
@@ -1459,29 +1504,29 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1459
1504
|
primary_2: "#a8324f"
|
|
1460
1505
|
}, Oe = {
|
|
1461
1506
|
layout: {
|
|
1462
|
-
paper_bgcolor:
|
|
1463
|
-
plot_bgcolor:
|
|
1507
|
+
paper_bgcolor: B.bg,
|
|
1508
|
+
plot_bgcolor: B.bg,
|
|
1464
1509
|
colorway: qn,
|
|
1465
1510
|
font: {
|
|
1466
1511
|
family: "Inter, system-ui, sans-serif",
|
|
1467
1512
|
size: 12,
|
|
1468
|
-
color:
|
|
1513
|
+
color: B.ink
|
|
1469
1514
|
},
|
|
1470
1515
|
title: {
|
|
1471
|
-
font: { size: 14, color:
|
|
1516
|
+
font: { size: 14, color: B.ink },
|
|
1472
1517
|
x: 0.05
|
|
1473
1518
|
},
|
|
1474
1519
|
hovermode: "x unified",
|
|
1475
1520
|
hoverlabel: {
|
|
1476
|
-
bgcolor:
|
|
1477
|
-
bordercolor:
|
|
1478
|
-
font: { size: 12, color:
|
|
1521
|
+
bgcolor: B.bg,
|
|
1522
|
+
bordercolor: B.line,
|
|
1523
|
+
font: { size: 12, color: B.ink }
|
|
1479
1524
|
},
|
|
1480
1525
|
legend: {
|
|
1481
1526
|
bgcolor: "rgba(255,255,255,0.9)",
|
|
1482
|
-
bordercolor:
|
|
1527
|
+
bordercolor: B.muted_3,
|
|
1483
1528
|
borderwidth: 1,
|
|
1484
|
-
font: { size: 11, color:
|
|
1529
|
+
font: { size: 11, color: B.ink },
|
|
1485
1530
|
orientation: "h",
|
|
1486
1531
|
yanchor: "bottom",
|
|
1487
1532
|
y: 1.02,
|
|
@@ -1491,34 +1536,34 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1491
1536
|
xaxis: {
|
|
1492
1537
|
showline: !0,
|
|
1493
1538
|
linewidth: 1,
|
|
1494
|
-
linecolor:
|
|
1539
|
+
linecolor: B.line,
|
|
1495
1540
|
mirror: !1,
|
|
1496
1541
|
ticks: "outside",
|
|
1497
1542
|
tickwidth: 1,
|
|
1498
|
-
tickcolor:
|
|
1543
|
+
tickcolor: B.line,
|
|
1499
1544
|
ticklen: 4,
|
|
1500
1545
|
showgrid: !0,
|
|
1501
|
-
gridcolor:
|
|
1546
|
+
gridcolor: B.grid,
|
|
1502
1547
|
gridwidth: 1,
|
|
1503
1548
|
zeroline: !1,
|
|
1504
|
-
title_font: { color:
|
|
1505
|
-
tickfont: { color:
|
|
1549
|
+
title_font: { color: B.ink, size: 12 },
|
|
1550
|
+
tickfont: { color: B.ink_soft, size: 10 }
|
|
1506
1551
|
},
|
|
1507
1552
|
yaxis: {
|
|
1508
1553
|
showline: !0,
|
|
1509
1554
|
linewidth: 1,
|
|
1510
|
-
linecolor:
|
|
1555
|
+
linecolor: B.line,
|
|
1511
1556
|
mirror: !1,
|
|
1512
1557
|
ticks: "outside",
|
|
1513
1558
|
tickwidth: 1,
|
|
1514
|
-
tickcolor:
|
|
1559
|
+
tickcolor: B.line,
|
|
1515
1560
|
ticklen: 4,
|
|
1516
1561
|
showgrid: !0,
|
|
1517
|
-
gridcolor:
|
|
1562
|
+
gridcolor: B.grid,
|
|
1518
1563
|
gridwidth: 1,
|
|
1519
1564
|
zeroline: !1,
|
|
1520
|
-
title_font: { color:
|
|
1521
|
-
tickfont: { color:
|
|
1565
|
+
title_font: { color: B.ink, size: 12 },
|
|
1566
|
+
tickfont: { color: B.ink_soft, size: 10 }
|
|
1522
1567
|
},
|
|
1523
1568
|
modebar: {
|
|
1524
1569
|
remove: ["select2d", "lasso2d", "autoScale2d"]
|
|
@@ -1529,34 +1574,34 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1529
1574
|
data: {
|
|
1530
1575
|
scatter: [{
|
|
1531
1576
|
mode: "lines+markers",
|
|
1532
|
-
line: { width: 2, color:
|
|
1577
|
+
line: { width: 2, color: B.primary },
|
|
1533
1578
|
marker: {
|
|
1534
1579
|
size: 7,
|
|
1535
|
-
color:
|
|
1536
|
-
line: { width: 1.5, color:
|
|
1580
|
+
color: B.primary_2,
|
|
1581
|
+
line: { width: 1.5, color: B.bg }
|
|
1537
1582
|
}
|
|
1538
1583
|
}],
|
|
1539
1584
|
bar: [{
|
|
1540
1585
|
marker: {
|
|
1541
|
-
color:
|
|
1542
|
-
line: { color:
|
|
1586
|
+
color: B.primary,
|
|
1587
|
+
line: { color: B.bg, width: 0 }
|
|
1543
1588
|
}
|
|
1544
1589
|
}],
|
|
1545
1590
|
histogram: [{
|
|
1546
1591
|
marker: {
|
|
1547
|
-
color:
|
|
1548
|
-
line: { color:
|
|
1592
|
+
color: B.primary,
|
|
1593
|
+
line: { color: B.bg, width: 0 }
|
|
1549
1594
|
}
|
|
1550
1595
|
}],
|
|
1551
1596
|
box: [{
|
|
1552
|
-
fillcolor:
|
|
1553
|
-
line: { color:
|
|
1554
|
-
marker: { color:
|
|
1597
|
+
fillcolor: B.accent,
|
|
1598
|
+
line: { color: B.ink, width: 1.5 },
|
|
1599
|
+
marker: { color: B.ink }
|
|
1555
1600
|
}],
|
|
1556
1601
|
violin: [{
|
|
1557
|
-
fillcolor:
|
|
1558
|
-
line: { color:
|
|
1559
|
-
marker: { color:
|
|
1602
|
+
fillcolor: B.accent,
|
|
1603
|
+
line: { color: B.ink, width: 1.5 },
|
|
1604
|
+
marker: { color: B.ink }
|
|
1560
1605
|
}],
|
|
1561
1606
|
heatmap: [{
|
|
1562
1607
|
colorscale: [
|
|
@@ -1568,9 +1613,9 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1568
1613
|
[1, "#1e293b"]
|
|
1569
1614
|
],
|
|
1570
1615
|
colorbar: {
|
|
1571
|
-
outlinecolor:
|
|
1572
|
-
tickcolor:
|
|
1573
|
-
tickfont: { color:
|
|
1616
|
+
outlinecolor: B.line,
|
|
1617
|
+
tickcolor: B.line,
|
|
1618
|
+
tickfont: { color: B.ink_soft }
|
|
1574
1619
|
}
|
|
1575
1620
|
}],
|
|
1576
1621
|
contour: [{
|
|
@@ -1582,13 +1627,13 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1582
1627
|
[1, "#1e293b"]
|
|
1583
1628
|
],
|
|
1584
1629
|
colorbar: {
|
|
1585
|
-
outlinecolor:
|
|
1586
|
-
tickcolor:
|
|
1587
|
-
tickfont: { color:
|
|
1630
|
+
outlinecolor: B.line,
|
|
1631
|
+
tickcolor: B.line,
|
|
1632
|
+
tickfont: { color: B.ink_soft }
|
|
1588
1633
|
}
|
|
1589
1634
|
}]
|
|
1590
1635
|
}
|
|
1591
|
-
}, yi = Oe,
|
|
1636
|
+
}, yi = Oe, T = {
|
|
1592
1637
|
bg: "#1b1b1f",
|
|
1593
1638
|
panel: "#25252a",
|
|
1594
1639
|
ink: "#f0f0e4",
|
|
@@ -1600,11 +1645,11 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1600
1645
|
muted_1: "#8a8a80",
|
|
1601
1646
|
muted_2: "#5e5e56",
|
|
1602
1647
|
muted_3: "#3a3a34"
|
|
1603
|
-
},
|
|
1648
|
+
}, _i = "baselode-dark", Ni = {
|
|
1604
1649
|
layout: {
|
|
1605
1650
|
font: {
|
|
1606
1651
|
family: "Inter, Arial, sans-serif",
|
|
1607
|
-
color:
|
|
1652
|
+
color: T.ink,
|
|
1608
1653
|
size: 14
|
|
1609
1654
|
},
|
|
1610
1655
|
title: {
|
|
@@ -1613,37 +1658,37 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1613
1658
|
font: {
|
|
1614
1659
|
family: "Inter, Arial, sans-serif",
|
|
1615
1660
|
size: 22,
|
|
1616
|
-
color:
|
|
1661
|
+
color: T.ink
|
|
1617
1662
|
}
|
|
1618
1663
|
},
|
|
1619
|
-
paper_bgcolor:
|
|
1620
|
-
plot_bgcolor:
|
|
1664
|
+
paper_bgcolor: T.bg,
|
|
1665
|
+
plot_bgcolor: T.bg,
|
|
1621
1666
|
colorway: [
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1667
|
+
T.ink,
|
|
1668
|
+
T.accent,
|
|
1669
|
+
T.muted_1,
|
|
1670
|
+
T.accent_2,
|
|
1671
|
+
T.muted_2,
|
|
1672
|
+
T.muted_3
|
|
1628
1673
|
],
|
|
1629
1674
|
margin: { l: 70, r: 30, t: 70, b: 60 },
|
|
1630
1675
|
hovermode: "x unified",
|
|
1631
1676
|
hoverlabel: {
|
|
1632
|
-
bgcolor:
|
|
1633
|
-
bordercolor:
|
|
1677
|
+
bgcolor: T.panel,
|
|
1678
|
+
bordercolor: T.accent,
|
|
1634
1679
|
font: {
|
|
1635
1680
|
family: "Inter, Arial, sans-serif",
|
|
1636
|
-
color:
|
|
1681
|
+
color: T.ink,
|
|
1637
1682
|
size: 13
|
|
1638
1683
|
}
|
|
1639
1684
|
},
|
|
1640
1685
|
legend: {
|
|
1641
1686
|
bgcolor: "rgba(37,37,42,0.88)",
|
|
1642
|
-
bordercolor:
|
|
1687
|
+
bordercolor: T.line,
|
|
1643
1688
|
borderwidth: 1,
|
|
1644
1689
|
font: {
|
|
1645
1690
|
family: "Inter, Arial, sans-serif",
|
|
1646
|
-
color:
|
|
1691
|
+
color: T.ink,
|
|
1647
1692
|
size: 12
|
|
1648
1693
|
},
|
|
1649
1694
|
orientation: "h",
|
|
@@ -1656,27 +1701,27 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1656
1701
|
showline: !1,
|
|
1657
1702
|
ticks: "outside",
|
|
1658
1703
|
tickwidth: 1,
|
|
1659
|
-
tickcolor:
|
|
1704
|
+
tickcolor: T.muted_1,
|
|
1660
1705
|
ticklen: 6,
|
|
1661
1706
|
showgrid: !0,
|
|
1662
|
-
gridcolor:
|
|
1707
|
+
gridcolor: T.grid,
|
|
1663
1708
|
gridwidth: 1,
|
|
1664
1709
|
zeroline: !1,
|
|
1665
|
-
title_font: { color:
|
|
1666
|
-
tickfont: { color:
|
|
1710
|
+
title_font: { color: T.ink },
|
|
1711
|
+
tickfont: { color: T.ink_soft }
|
|
1667
1712
|
},
|
|
1668
1713
|
yaxis: {
|
|
1669
1714
|
showline: !1,
|
|
1670
1715
|
ticks: "outside",
|
|
1671
1716
|
tickwidth: 1,
|
|
1672
|
-
tickcolor:
|
|
1717
|
+
tickcolor: T.muted_1,
|
|
1673
1718
|
ticklen: 6,
|
|
1674
1719
|
showgrid: !0,
|
|
1675
|
-
gridcolor:
|
|
1720
|
+
gridcolor: T.grid,
|
|
1676
1721
|
gridwidth: 1,
|
|
1677
1722
|
zeroline: !1,
|
|
1678
|
-
title_font: { color:
|
|
1679
|
-
tickfont: { color:
|
|
1723
|
+
title_font: { color: T.ink },
|
|
1724
|
+
tickfont: { color: T.ink_soft }
|
|
1680
1725
|
},
|
|
1681
1726
|
bargap: 0.18,
|
|
1682
1727
|
bargroupgap: 0.08
|
|
@@ -1684,34 +1729,34 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1684
1729
|
data: {
|
|
1685
1730
|
scatter: [{
|
|
1686
1731
|
mode: "lines+markers",
|
|
1687
|
-
line: { width: 2.5, color:
|
|
1732
|
+
line: { width: 2.5, color: T.ink },
|
|
1688
1733
|
marker: {
|
|
1689
1734
|
size: 7,
|
|
1690
|
-
color:
|
|
1691
|
-
line: { width: 1.5, color:
|
|
1735
|
+
color: T.ink,
|
|
1736
|
+
line: { width: 1.5, color: T.bg }
|
|
1692
1737
|
}
|
|
1693
1738
|
}],
|
|
1694
1739
|
bar: [{
|
|
1695
1740
|
marker: {
|
|
1696
|
-
color:
|
|
1697
|
-
line: { color:
|
|
1741
|
+
color: T.ink,
|
|
1742
|
+
line: { color: T.bg, width: 0 }
|
|
1698
1743
|
}
|
|
1699
1744
|
}],
|
|
1700
1745
|
histogram: [{
|
|
1701
1746
|
marker: {
|
|
1702
|
-
color:
|
|
1703
|
-
line: { color:
|
|
1747
|
+
color: T.ink,
|
|
1748
|
+
line: { color: T.bg, width: 0 }
|
|
1704
1749
|
}
|
|
1705
1750
|
}],
|
|
1706
1751
|
box: [{
|
|
1707
|
-
fillcolor:
|
|
1708
|
-
line: { color:
|
|
1709
|
-
marker: { color:
|
|
1752
|
+
fillcolor: T.accent,
|
|
1753
|
+
line: { color: T.ink, width: 1.5 },
|
|
1754
|
+
marker: { color: T.ink }
|
|
1710
1755
|
}],
|
|
1711
1756
|
violin: [{
|
|
1712
|
-
fillcolor:
|
|
1713
|
-
line: { color:
|
|
1714
|
-
marker: { color:
|
|
1757
|
+
fillcolor: T.accent,
|
|
1758
|
+
line: { color: T.ink, width: 1.5 },
|
|
1759
|
+
marker: { color: T.ink }
|
|
1715
1760
|
}],
|
|
1716
1761
|
heatmap: [{
|
|
1717
1762
|
colorscale: [
|
|
@@ -1723,9 +1768,9 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1723
1768
|
[1, "#ffffbb"]
|
|
1724
1769
|
],
|
|
1725
1770
|
colorbar: {
|
|
1726
|
-
outlinecolor:
|
|
1727
|
-
tickcolor:
|
|
1728
|
-
tickfont: { color:
|
|
1771
|
+
outlinecolor: T.ink,
|
|
1772
|
+
tickcolor: T.ink,
|
|
1773
|
+
tickfont: { color: T.ink_soft }
|
|
1729
1774
|
}
|
|
1730
1775
|
}],
|
|
1731
1776
|
contour: [{
|
|
@@ -1737,13 +1782,13 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1737
1782
|
[1, "#ffffbb"]
|
|
1738
1783
|
],
|
|
1739
1784
|
colorbar: {
|
|
1740
|
-
outlinecolor:
|
|
1741
|
-
tickcolor:
|
|
1742
|
-
tickfont: { color:
|
|
1785
|
+
outlinecolor: T.ink,
|
|
1786
|
+
tickcolor: T.ink,
|
|
1787
|
+
tickfont: { color: T.ink_soft }
|
|
1743
1788
|
}
|
|
1744
1789
|
}]
|
|
1745
1790
|
}
|
|
1746
|
-
}, Zn = "#7f7f7f",
|
|
1791
|
+
}, Zn = "#7f7f7f", Be = {
|
|
1747
1792
|
Au: "#FFD700",
|
|
1748
1793
|
// gold
|
|
1749
1794
|
Ag: "#C0C0C0",
|
|
@@ -1820,7 +1865,7 @@ const Xn = "baselode", bi = Xn, qn = [
|
|
|
1820
1865
|
vein: "#FFFFFF",
|
|
1821
1866
|
unknown: "#9E9E9E"
|
|
1822
1867
|
}, Xe = {
|
|
1823
|
-
commodity:
|
|
1868
|
+
commodity: Be,
|
|
1824
1869
|
lithology: Wn
|
|
1825
1870
|
};
|
|
1826
1871
|
function Kn(e, t, n = Zn) {
|
|
@@ -1853,10 +1898,10 @@ function tr(e) {
|
|
|
1853
1898
|
if (!e) return null;
|
|
1854
1899
|
const t = e.split(/[_\-/\s]+/);
|
|
1855
1900
|
for (const n of t) {
|
|
1856
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1857
|
-
return
|
|
1901
|
+
if (Object.prototype.hasOwnProperty.call(Be, n))
|
|
1902
|
+
return Be[n];
|
|
1858
1903
|
const r = n.toLowerCase();
|
|
1859
|
-
for (const [o, i] of Object.entries(
|
|
1904
|
+
for (const [o, i] of Object.entries(Be))
|
|
1860
1905
|
if (o.toLowerCase() === r) return i;
|
|
1861
1906
|
}
|
|
1862
1907
|
return null;
|
|
@@ -2049,7 +2094,7 @@ function Tt({ points: e, isCategorical: t, property: n, chartType: r, colourMap:
|
|
|
2049
2094
|
const s = tr(n);
|
|
2050
2095
|
return lr(e, n, r, s, i);
|
|
2051
2096
|
}
|
|
2052
|
-
function
|
|
2097
|
+
function Mi(e = [], {
|
|
2053
2098
|
fromCol: t = "from",
|
|
2054
2099
|
toCol: n = "to",
|
|
2055
2100
|
categoryCol: r = "geology_code",
|
|
@@ -2089,8 +2134,8 @@ const $t = [
|
|
|
2089
2134
|
"#db2777",
|
|
2090
2135
|
"#65a30d",
|
|
2091
2136
|
"#9333ea"
|
|
2092
|
-
], ar = { l: 42, r: 4, t: 4, b: 30 }, bt = 10,
|
|
2093
|
-
function
|
|
2137
|
+
], ar = { l: 42, r: 4, t: 4, b: 30 }, bt = 10, gt = 12;
|
|
2138
|
+
function Rt(e = {}) {
|
|
2094
2139
|
return {
|
|
2095
2140
|
...e,
|
|
2096
2141
|
margin: ar,
|
|
@@ -2106,7 +2151,7 @@ function Bt(e = {}) {
|
|
|
2106
2151
|
...e.xaxis && e.xaxis.title || {},
|
|
2107
2152
|
font: {
|
|
2108
2153
|
...e.xaxis && e.xaxis.title && e.xaxis.title.font || {},
|
|
2109
|
-
size:
|
|
2154
|
+
size: gt
|
|
2110
2155
|
}
|
|
2111
2156
|
}
|
|
2112
2157
|
},
|
|
@@ -2121,7 +2166,7 @@ function Bt(e = {}) {
|
|
|
2121
2166
|
...e.yaxis && e.yaxis.title || {},
|
|
2122
2167
|
font: {
|
|
2123
2168
|
...e.yaxis && e.yaxis.title && e.yaxis.title.font || {},
|
|
2124
|
-
size:
|
|
2169
|
+
size: gt
|
|
2125
2170
|
}
|
|
2126
2171
|
}
|
|
2127
2172
|
}
|
|
@@ -2137,41 +2182,41 @@ function cr(e, {
|
|
|
2137
2182
|
template: l = void 0
|
|
2138
2183
|
} = {}) {
|
|
2139
2184
|
const c = e.filter(
|
|
2140
|
-
(
|
|
2185
|
+
(g) => g[o] != null && g[i] != null && g[s] != null
|
|
2141
2186
|
);
|
|
2142
2187
|
if (!c.length)
|
|
2143
2188
|
return { data: [], layout: {} };
|
|
2144
2189
|
const a = {};
|
|
2145
|
-
n && [...new Set(c.map((
|
|
2146
|
-
a[
|
|
2190
|
+
n && [...new Set(c.map((y) => y[n]).filter((y) => y != null))].sort().forEach((y, p) => {
|
|
2191
|
+
a[y] = r[p % r.length];
|
|
2147
2192
|
});
|
|
2148
2193
|
const u = /* @__PURE__ */ new Map(), m = [];
|
|
2149
|
-
for (const
|
|
2150
|
-
const
|
|
2151
|
-
u.has(
|
|
2152
|
-
const
|
|
2153
|
-
|
|
2154
|
-
const
|
|
2194
|
+
for (const g of c) {
|
|
2195
|
+
const y = Number(g[o]), p = Number(g[i]), b = Number(g[s]), N = n ? g[n] ?? "_default" : "_default", M = n ? a[N] ?? "#0f172a" : "#0f172a";
|
|
2196
|
+
u.has(N) || u.set(N, { xs: [], ys: [], dips: [], azs: [], color: M });
|
|
2197
|
+
const I = u.get(N);
|
|
2198
|
+
I.xs.push(p), I.ys.push(y), I.dips.push(p), I.azs.push(b);
|
|
2199
|
+
const x = b * Math.PI / 180, S = t * (Math.abs(p) / 90), w = Math.sin(x) * S, D = Math.cos(x) * S;
|
|
2155
2200
|
m.push({
|
|
2156
2201
|
type: "line",
|
|
2157
2202
|
x0: p,
|
|
2158
|
-
y0:
|
|
2159
|
-
x1: p +
|
|
2160
|
-
y1:
|
|
2161
|
-
line: { color:
|
|
2203
|
+
y0: y,
|
|
2204
|
+
x1: p + w,
|
|
2205
|
+
y1: y + D,
|
|
2206
|
+
line: { color: M, width: 2 }
|
|
2162
2207
|
});
|
|
2163
2208
|
}
|
|
2164
2209
|
const d = [], f = n && u.size > 1;
|
|
2165
|
-
for (const [
|
|
2210
|
+
for (const [g, y] of u.entries())
|
|
2166
2211
|
d.push({
|
|
2167
2212
|
type: "scatter",
|
|
2168
|
-
x:
|
|
2169
|
-
y:
|
|
2213
|
+
x: y.xs,
|
|
2214
|
+
y: y.ys,
|
|
2170
2215
|
mode: "markers",
|
|
2171
|
-
name:
|
|
2172
|
-
marker: { size: 8, color:
|
|
2173
|
-
showlegend: f &&
|
|
2174
|
-
customdata:
|
|
2216
|
+
name: g !== "_default" ? String(g) : void 0,
|
|
2217
|
+
marker: { size: 8, color: y.color },
|
|
2218
|
+
showlegend: f && g !== "_default",
|
|
2219
|
+
customdata: y.dips.map((p, b) => [p, y.azs[b]]),
|
|
2175
2220
|
hovertemplate: "Depth: %{y}<br>Dip: %{customdata[0]}<br>Az: %{customdata[1]}<extra></extra>"
|
|
2176
2221
|
});
|
|
2177
2222
|
return { data: d, layout: {
|
|
@@ -2190,11 +2235,11 @@ function cr(e, {
|
|
|
2190
2235
|
template: l !== void 0 ? l : Oe
|
|
2191
2236
|
} };
|
|
2192
2237
|
}
|
|
2193
|
-
function
|
|
2238
|
+
function zi(e, {
|
|
2194
2239
|
labelCol: t = "structure_type",
|
|
2195
2240
|
palette: n = $t,
|
|
2196
|
-
fromCol: r =
|
|
2197
|
-
toCol: o =
|
|
2241
|
+
fromCol: r = F,
|
|
2242
|
+
toCol: o = $,
|
|
2198
2243
|
template: i = void 0
|
|
2199
2244
|
} = {}) {
|
|
2200
2245
|
const s = e.filter((d) => d[r] != null && d[o] != null && Number(d[o]) > Number(d[r])).filter((d) => {
|
|
@@ -2228,7 +2273,7 @@ function Mi(e, {
|
|
|
2228
2273
|
textposition: "middle center",
|
|
2229
2274
|
showlegend: !1,
|
|
2230
2275
|
hoverinfo: "text"
|
|
2231
|
-
}], layout:
|
|
2276
|
+
}], layout: Rt({
|
|
2232
2277
|
shapes: l,
|
|
2233
2278
|
height: 400,
|
|
2234
2279
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
@@ -2237,7 +2282,7 @@ function Mi(e, {
|
|
|
2237
2282
|
template: i !== void 0 ? i : Oe
|
|
2238
2283
|
}) };
|
|
2239
2284
|
}
|
|
2240
|
-
function
|
|
2285
|
+
function yt(e, t) {
|
|
2241
2286
|
if (!e) return "";
|
|
2242
2287
|
const n = String(e).trim().split(/\s+/), r = [];
|
|
2243
2288
|
let o = "";
|
|
@@ -2247,8 +2292,8 @@ function gt(e, t) {
|
|
|
2247
2292
|
}
|
|
2248
2293
|
function ur(e, {
|
|
2249
2294
|
commentCol: t = "comments",
|
|
2250
|
-
fromCol: n =
|
|
2251
|
-
toCol: r =
|
|
2295
|
+
fromCol: n = F,
|
|
2296
|
+
toCol: r = $,
|
|
2252
2297
|
bgColor: o = "#f1f5f9",
|
|
2253
2298
|
borderColor: i = "#cbd5e1",
|
|
2254
2299
|
textColor: s = "#1e293b",
|
|
@@ -2256,14 +2301,14 @@ function ur(e, {
|
|
|
2256
2301
|
template: c = void 0
|
|
2257
2302
|
} = {}) {
|
|
2258
2303
|
const a = e.filter((p) => p[n] != null && p[r] != null && Number(p[r]) > Number(p[n])).map((p) => {
|
|
2259
|
-
const
|
|
2260
|
-
return { from: Number(p[n]), to: Number(p[r]), comment:
|
|
2261
|
-
}).sort((p,
|
|
2304
|
+
const b = p[t], N = b != null && String(b).trim() !== "" && String(b) !== "null" ? String(b).trim() : "";
|
|
2305
|
+
return { from: Number(p[n]), to: Number(p[r]), comment: N };
|
|
2306
|
+
}).sort((p, b) => p.from - b.from);
|
|
2262
2307
|
if (!a.length)
|
|
2263
2308
|
return { data: [], layout: {} };
|
|
2264
2309
|
const u = [], m = [], d = [], f = [], h = [];
|
|
2265
2310
|
for (const p of a) {
|
|
2266
|
-
const
|
|
2311
|
+
const b = 0.5 * (p.from + p.to), N = !!p.comment;
|
|
2267
2312
|
u.push({
|
|
2268
2313
|
type: "rect",
|
|
2269
2314
|
xref: "x",
|
|
@@ -2272,10 +2317,10 @@ function ur(e, {
|
|
|
2272
2317
|
x1: 1,
|
|
2273
2318
|
y0: p.from,
|
|
2274
2319
|
y1: p.to,
|
|
2275
|
-
fillcolor:
|
|
2320
|
+
fillcolor: N ? o : "rgba(0,0,0,0)",
|
|
2276
2321
|
line: { color: i, width: 1 },
|
|
2277
2322
|
layer: "below"
|
|
2278
|
-
}),
|
|
2323
|
+
}), N && (m.push(0.5), d.push(b), f.push(yt(p.comment, l)), h.push(`${p.from.toFixed(3)}–${p.to.toFixed(3)} m<br>${yt(p.comment, 40)}`));
|
|
2279
2324
|
}
|
|
2280
2325
|
return { data: m.length ? [{
|
|
2281
2326
|
type: "scatter",
|
|
@@ -2288,7 +2333,7 @@ function ur(e, {
|
|
|
2288
2333
|
hovertext: h,
|
|
2289
2334
|
hoverinfo: "text",
|
|
2290
2335
|
showlegend: !1
|
|
2291
|
-
}] : [], layout:
|
|
2336
|
+
}] : [], layout: Rt({
|
|
2292
2337
|
shapes: u,
|
|
2293
2338
|
height: 400,
|
|
2294
2339
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
@@ -2297,14 +2342,14 @@ function ur(e, {
|
|
|
2297
2342
|
template: c !== void 0 ? c : Oe
|
|
2298
2343
|
}) };
|
|
2299
2344
|
}
|
|
2300
|
-
function
|
|
2345
|
+
function vi(e, {
|
|
2301
2346
|
symbolSize: t = 10,
|
|
2302
2347
|
xCol: n = "easting",
|
|
2303
2348
|
yCol: r = "northing"
|
|
2304
2349
|
} = {}) {
|
|
2305
2350
|
const o = e[n] != null ? Number(e[n]) : null, i = e[r] != null ? Number(e[r]) : null, s = e[q] != null ? Number(e[q]) : null, l = e[X] != null ? Number(e[X]) : null;
|
|
2306
2351
|
if (o === null || i === null || s === null || l === null) return null;
|
|
2307
|
-
const c = (l - 90 + 360) % 360, a = c * Math.PI / 180, u = l * Math.PI / 180, m = t * Math.sin(a), d = t * Math.cos(a), f = t * 0.4 * (s / 90), h = f * Math.sin(u),
|
|
2352
|
+
const c = (l - 90 + 360) % 360, a = c * Math.PI / 180, u = l * Math.PI / 180, m = t * Math.sin(a), d = t * Math.cos(a), f = t * 0.4 * (s / 90), h = f * Math.sin(u), g = f * Math.cos(u);
|
|
2308
2353
|
return {
|
|
2309
2354
|
strike: c,
|
|
2310
2355
|
dipValue: s,
|
|
@@ -2315,106 +2360,106 @@ function zi(e, {
|
|
|
2315
2360
|
strikeX1: o + m,
|
|
2316
2361
|
strikeY1: i + d,
|
|
2317
2362
|
tickX1: o + h,
|
|
2318
|
-
tickY1: i +
|
|
2363
|
+
tickY1: i + g
|
|
2319
2364
|
};
|
|
2320
2365
|
}
|
|
2321
|
-
const
|
|
2366
|
+
const Bt = "markers+line";
|
|
2322
2367
|
function dr(e, t) {
|
|
2323
2368
|
var r;
|
|
2324
2369
|
const n = et(e);
|
|
2325
|
-
return n.some((o) => o.value === t) ? t : ((r = n[0]) == null ? void 0 : r.value) ||
|
|
2370
|
+
return n.some((o) => o.value === t) ? t : ((r = n[0]) == null ? void 0 : r.value) || Bt;
|
|
2326
2371
|
}
|
|
2327
|
-
function
|
|
2328
|
-
const s =
|
|
2372
|
+
function Ei({ config: e, graph: t, holeOptions: n = [], propertyOptions: r = [], onConfigChange: o, template: i }) {
|
|
2373
|
+
const s = De(null), l = t == null ? void 0 : t.hole, c = (t == null ? void 0 : t.points) || [], a = (e == null ? void 0 : e.property) || "", u = (e == null ? void 0 : e.chartType) || Bt, m = (e == null ? void 0 : e.holeId) || "", d = (t == null ? void 0 : t.displayType) || (t != null && t.isComment ? ke : t != null && t.isCategorical ? Le : Ae), f = et(d), h = dr(d, u), [g, y] = Q("");
|
|
2329
2374
|
return se(() => {
|
|
2330
|
-
const p = d === ke,
|
|
2331
|
-
if (!l || !a || !p && !
|
|
2332
|
-
const
|
|
2333
|
-
if (!
|
|
2334
|
-
let
|
|
2375
|
+
const p = d === ke, b = d === Je;
|
|
2376
|
+
if (!l || !a || !p && !b && c.length === 0) return;
|
|
2377
|
+
const N = s.current;
|
|
2378
|
+
if (!N) return;
|
|
2379
|
+
let M;
|
|
2335
2380
|
try {
|
|
2336
|
-
p ?
|
|
2381
|
+
p ? M = ur(c, { commentCol: a, fromCol: "from", toCol: "to" }) : b ? M = cr(c) : M = Tt({
|
|
2337
2382
|
points: c,
|
|
2338
2383
|
isCategorical: d === Le,
|
|
2339
2384
|
property: a,
|
|
2340
2385
|
chartType: h,
|
|
2341
2386
|
template: i
|
|
2342
2387
|
});
|
|
2343
|
-
} catch (
|
|
2344
|
-
console.error("Plot build error",
|
|
2388
|
+
} catch (x) {
|
|
2389
|
+
console.error("Plot build error", x), y((x == null ? void 0 : x.message) || "Plot build error");
|
|
2345
2390
|
return;
|
|
2346
2391
|
}
|
|
2347
|
-
if ((!(
|
|
2392
|
+
if ((!(M != null && M.data) || M.data.length === 0) && !p)
|
|
2348
2393
|
return;
|
|
2349
|
-
const
|
|
2394
|
+
const I = {
|
|
2350
2395
|
displayModeBar: !0,
|
|
2351
2396
|
responsive: !0,
|
|
2352
2397
|
useResizeHandler: !0,
|
|
2353
2398
|
modeBarButtonsToRemove: ["select2d", "lasso2d", "autoScale2d"]
|
|
2354
2399
|
};
|
|
2355
2400
|
try {
|
|
2356
|
-
|
|
2357
|
-
|
|
2401
|
+
y(""), Fe.react(N, M.data, M.layout, I), requestAnimationFrame(() => {
|
|
2402
|
+
N && N.parentElement && Fe.Plots.resize(N);
|
|
2358
2403
|
});
|
|
2359
|
-
} catch (
|
|
2360
|
-
console.error("Plot render error",
|
|
2404
|
+
} catch (x) {
|
|
2405
|
+
console.error("Plot render error", x), y((x == null ? void 0 : x.message) || "Plot render error");
|
|
2361
2406
|
}
|
|
2362
2407
|
return () => {
|
|
2363
|
-
if (
|
|
2408
|
+
if (N)
|
|
2364
2409
|
try {
|
|
2365
|
-
Fe.purge(
|
|
2366
|
-
} catch (
|
|
2367
|
-
console.warn("Plot purge error",
|
|
2410
|
+
Fe.purge(N);
|
|
2411
|
+
} catch (x) {
|
|
2412
|
+
console.warn("Plot purge error", x);
|
|
2368
2413
|
}
|
|
2369
2414
|
};
|
|
2370
2415
|
}, [l, a, h, d, c, i]), se(() => {
|
|
2371
2416
|
const p = s.current;
|
|
2372
2417
|
if (!p || typeof ResizeObserver > "u") return;
|
|
2373
|
-
const
|
|
2418
|
+
const b = new ResizeObserver(() => {
|
|
2374
2419
|
try {
|
|
2375
2420
|
p && p.data && Fe.Plots.resize(p);
|
|
2376
|
-
} catch (
|
|
2377
|
-
console.warn("Plot resize error",
|
|
2421
|
+
} catch (N) {
|
|
2422
|
+
console.warn("Plot resize error", N);
|
|
2378
2423
|
}
|
|
2379
2424
|
});
|
|
2380
|
-
return
|
|
2381
|
-
}, []), !l || !a ? /* @__PURE__ */
|
|
2425
|
+
return b.observe(p), () => b.disconnect();
|
|
2426
|
+
}, []), !l || !a ? /* @__PURE__ */ P("div", { className: "plot-card empty", children: /* @__PURE__ */ P("div", { className: "placeholder", children: e != null && e.holeId ? t != null && t.loading ? `Loading ${e.holeId}...` : "Select a property" : "Loading demo data..." }) }) : d !== ke && d !== Je && c.length === 0 ? /* @__PURE__ */ P("div", { className: "plot-card empty", children: /* @__PURE__ */ P("div", { className: "placeholder", children: "No data" }) }) : g ? /* @__PURE__ */ P("div", { className: "plot-card empty", children: /* @__PURE__ */ J("div", { className: "placeholder", children: [
|
|
2382
2427
|
"Plot error: ",
|
|
2383
|
-
|
|
2428
|
+
g
|
|
2384
2429
|
] }) }) : /* @__PURE__ */ J("div", { className: "plot-card", children: [
|
|
2385
|
-
/* @__PURE__ */
|
|
2430
|
+
/* @__PURE__ */ P("div", { className: "plot-title", children: /* @__PURE__ */ P(
|
|
2386
2431
|
"select",
|
|
2387
2432
|
{
|
|
2388
2433
|
className: "plot-select",
|
|
2389
2434
|
value: m,
|
|
2390
2435
|
onChange: (p) => o && o({ holeId: p.target.value }),
|
|
2391
2436
|
children: n.map((p) => {
|
|
2392
|
-
const
|
|
2393
|
-
return /* @__PURE__ */
|
|
2437
|
+
const b = typeof p == "string" ? p : p.holeId, N = typeof p == "string" ? p : p.label || p.holeId;
|
|
2438
|
+
return /* @__PURE__ */ P("option", { value: b, children: N }, b);
|
|
2394
2439
|
})
|
|
2395
2440
|
}
|
|
2396
2441
|
) }),
|
|
2397
2442
|
/* @__PURE__ */ J("div", { className: "plot-controls column", children: [
|
|
2398
|
-
r.length > 0 && /* @__PURE__ */
|
|
2443
|
+
r.length > 0 && /* @__PURE__ */ P(
|
|
2399
2444
|
"select",
|
|
2400
2445
|
{
|
|
2401
2446
|
className: "plot-select",
|
|
2402
2447
|
value: a,
|
|
2403
2448
|
onChange: (p) => o && o({ property: p.target.value }),
|
|
2404
|
-
children: r.map((p) => /* @__PURE__ */
|
|
2449
|
+
children: r.map((p) => /* @__PURE__ */ P("option", { value: p, children: p }, p))
|
|
2405
2450
|
}
|
|
2406
2451
|
),
|
|
2407
|
-
f.length > 1 && /* @__PURE__ */
|
|
2452
|
+
f.length > 1 && /* @__PURE__ */ P(
|
|
2408
2453
|
"select",
|
|
2409
2454
|
{
|
|
2410
2455
|
className: "plot-select",
|
|
2411
2456
|
value: h,
|
|
2412
2457
|
onChange: (p) => o && o({ chartType: p.target.value }),
|
|
2413
|
-
children: f.map((p) => /* @__PURE__ */
|
|
2458
|
+
children: f.map((p) => /* @__PURE__ */ P("option", { value: p.value, children: p.label }, p.value))
|
|
2414
2459
|
}
|
|
2415
2460
|
)
|
|
2416
2461
|
] }),
|
|
2417
|
-
/* @__PURE__ */
|
|
2462
|
+
/* @__PURE__ */ P("div", { className: "plotly-chart", ref: s })
|
|
2418
2463
|
] });
|
|
2419
2464
|
}
|
|
2420
2465
|
function _t(e, t) {
|
|
@@ -2442,20 +2487,20 @@ function mr(e, t) {
|
|
|
2442
2487
|
}
|
|
2443
2488
|
return r;
|
|
2444
2489
|
}
|
|
2445
|
-
function
|
|
2490
|
+
function xi({
|
|
2446
2491
|
initialFocusedHoleId: e = "",
|
|
2447
2492
|
sourceFile: t = null,
|
|
2448
2493
|
extraHoles: n = [],
|
|
2449
2494
|
plotCount: r = 4
|
|
2450
2495
|
} = {}) {
|
|
2451
|
-
const [o, i] = Q([]), [s, l] = Q([]), [c, a] = Q([]), [u, m] = Q([]), [d, f] = Q([]), [h,
|
|
2496
|
+
const [o, i] = Q([]), [s, l] = Q([]), [c, a] = Q([]), [u, m] = Q([]), [d, f] = Q([]), [h, g] = Q({}), [y, p] = Q(""), [b, N] = Q([]), [M, I] = Q(""), [x, S] = Q(e || ""), [w, D] = Q([]), v = De(null);
|
|
2452
2497
|
se(() => {
|
|
2453
2498
|
!t || v.current === t || (v.current = t, En(t).then((A) => {
|
|
2454
2499
|
if (!A) return;
|
|
2455
|
-
const E = Array.from(new Map(A.map((
|
|
2456
|
-
l(E),
|
|
2457
|
-
holeIds: E.map((
|
|
2458
|
-
focusedHoleId:
|
|
2500
|
+
const E = Array.from(new Map(A.map((z) => [z.holeId, z])).values());
|
|
2501
|
+
l(E), N(St({
|
|
2502
|
+
holeIds: E.map((z) => z.holeId),
|
|
2503
|
+
focusedHoleId: x,
|
|
2459
2504
|
plotCount: r,
|
|
2460
2505
|
defaultProp: "",
|
|
2461
2506
|
categoricalProps: u,
|
|
@@ -2465,24 +2510,24 @@ function Ei({
|
|
|
2465
2510
|
}).catch((A) => {
|
|
2466
2511
|
console.info("Assay metadata load skipped:", A.message);
|
|
2467
2512
|
}));
|
|
2468
|
-
}, [t,
|
|
2513
|
+
}, [t, x, r, u, d]), se(() => {
|
|
2469
2514
|
if (!(n != null && n.length)) return;
|
|
2470
2515
|
const A = n.map((E) => ({ holeId: E.id || E.holeId })).filter((E) => E.holeId);
|
|
2471
2516
|
l((E) => {
|
|
2472
|
-
const
|
|
2473
|
-
return
|
|
2517
|
+
const z = new Set(E.map((C) => C.holeId)), R = A.filter((C) => !z.has(C.holeId));
|
|
2518
|
+
return R.length ? [...E, ...R] : E;
|
|
2474
2519
|
});
|
|
2475
2520
|
}, [n]), se(() => {
|
|
2476
|
-
|
|
2477
|
-
}, [
|
|
2521
|
+
I((A) => A && A.startsWith("Loading ") && A.includes(" for hole ") ? A : "");
|
|
2522
|
+
}, [b]), se(() => {
|
|
2478
2523
|
if (!s.length) {
|
|
2479
|
-
|
|
2524
|
+
N([]);
|
|
2480
2525
|
return;
|
|
2481
2526
|
}
|
|
2482
|
-
const A = Ct(s.map((E) => E.holeId),
|
|
2483
|
-
|
|
2527
|
+
const A = Ct(s.map((E) => E.holeId), x);
|
|
2528
|
+
N((E) => Array.from({ length: r }).map((R, C) => {
|
|
2484
2529
|
var K;
|
|
2485
|
-
const G = E[
|
|
2530
|
+
const G = E[C] || {}, U = s.some((le) => le.holeId === G.holeId) ? G.holeId : A[C] || ((K = s[C]) == null ? void 0 : K.holeId) || "", j = G.property || y, Z = Te({
|
|
2486
2531
|
property: j,
|
|
2487
2532
|
chartType: G.chartType,
|
|
2488
2533
|
categoricalProps: u,
|
|
@@ -2491,17 +2536,17 @@ function Ei({
|
|
|
2491
2536
|
});
|
|
2492
2537
|
return { holeId: U, property: j, chartType: Z };
|
|
2493
2538
|
}));
|
|
2494
|
-
}, [s,
|
|
2539
|
+
}, [s, x, y, u, d, r]), se(() => {
|
|
2495
2540
|
if (!t) return;
|
|
2496
|
-
|
|
2497
|
-
const
|
|
2498
|
-
|
|
2499
|
-
|
|
2541
|
+
b.map((E) => E.holeId).filter(Boolean).forEach((E) => {
|
|
2542
|
+
const z = o.some((C) => (C.id || C.holeId) === E), R = w.includes(E);
|
|
2543
|
+
z || R || (D((C) => [...C, E]), xn(t, E).then((C) => {
|
|
2544
|
+
D((G) => G.filter((U) => U !== E)), C && i((G) => {
|
|
2500
2545
|
const U = _t(
|
|
2501
|
-
[...G.filter((Z) => (Z.id || Z.holeId) !== E),
|
|
2546
|
+
[...G.filter((Z) => (Z.id || Z.holeId) !== E), C],
|
|
2502
2547
|
n
|
|
2503
|
-
), j =
|
|
2504
|
-
return a(j.numericProps), m(j.categoricalProps), f(j.commentProps),
|
|
2548
|
+
), j = Re(U);
|
|
2549
|
+
return a(j.numericProps), m(j.categoricalProps), f(j.commentProps), g(j.columnMeta), !y && j.defaultProp && (p(j.defaultProp), N((Z) => Z.map((K) => ({
|
|
2505
2550
|
...K,
|
|
2506
2551
|
property: K.property || j.defaultProp,
|
|
2507
2552
|
chartType: Te({
|
|
@@ -2513,37 +2558,37 @@ function Ei({
|
|
|
2513
2558
|
})
|
|
2514
2559
|
})))), U;
|
|
2515
2560
|
});
|
|
2516
|
-
}).catch((
|
|
2517
|
-
console.error(
|
|
2561
|
+
}).catch((C) => {
|
|
2562
|
+
console.error(C), D((G) => G.filter((U) => U !== E)), I(C.message || `Error loading hole ${E}`);
|
|
2518
2563
|
}));
|
|
2519
2564
|
});
|
|
2520
|
-
}, [
|
|
2565
|
+
}, [b, t, o, w, y, n]), se(() => {
|
|
2521
2566
|
n != null && n.length && i((A) => {
|
|
2522
2567
|
if (!A.length) {
|
|
2523
|
-
const
|
|
2524
|
-
return a(
|
|
2568
|
+
const R = Re(n);
|
|
2569
|
+
return a(R.numericProps), m(R.categoricalProps), f(R.commentProps), g(R.columnMeta), !y && R.defaultProp && p(R.defaultProp), n;
|
|
2525
2570
|
}
|
|
2526
|
-
const E = _t(A, n),
|
|
2527
|
-
return a(
|
|
2571
|
+
const E = _t(A, n), z = Re(E);
|
|
2572
|
+
return a(z.numericProps), m(z.categoricalProps), f(z.commentProps), g(z.columnMeta), !y && z.defaultProp && p(z.defaultProp), E;
|
|
2528
2573
|
});
|
|
2529
2574
|
}, [n]);
|
|
2530
|
-
const
|
|
2575
|
+
const L = ne(
|
|
2531
2576
|
() => [...c, ...u, ...d],
|
|
2532
2577
|
[c, u, d]
|
|
2533
|
-
),
|
|
2578
|
+
), O = ne(
|
|
2534
2579
|
() => s.map((A) => ({ holeId: A.holeId, label: A.holeId })).sort((A, E) => A.label.localeCompare(E.label)),
|
|
2535
2580
|
[s]
|
|
2536
2581
|
), V = ne(() => {
|
|
2537
2582
|
const A = [...c, ...u, ...d];
|
|
2538
|
-
return Array.from({ length: r }).map((E,
|
|
2539
|
-
const
|
|
2540
|
-
let U =
|
|
2541
|
-
|
|
2542
|
-
const j = d.includes(U), Z = !j && u.includes(U), K = !j && !Z && U === "dip", le = j ? "comment" : K ? "tadpole" : Z ? "categorical" : "numeric",
|
|
2583
|
+
return Array.from({ length: r }).map((E, z) => {
|
|
2584
|
+
const R = b[z] || {}, C = o.find((he) => (he.id || he.holeId) === R.holeId) || null, G = C ? A.filter((he) => or(C, he)) : A;
|
|
2585
|
+
let U = R.property || y;
|
|
2586
|
+
C && !G.includes(U) && (U = G[0] || U);
|
|
2587
|
+
const j = d.includes(U), Z = !j && u.includes(U), K = !j && !Z && U === "dip", le = j ? "comment" : K ? "tadpole" : Z ? "categorical" : "numeric", ye = K ? "tadpole" : R.chartType || (j ? "comment" : Z ? "categorical" : "markers+line"), fe = R.holeId || (C == null ? void 0 : C.id) || (C == null ? void 0 : C.holeId) || "", Ce = K ? (C == null ? void 0 : C.points) || [] : j ? mr(C, U) : ir(C, U, Z);
|
|
2543
2588
|
return {
|
|
2544
|
-
config: { holeId: fe, property: U, chartType:
|
|
2545
|
-
hole:
|
|
2546
|
-
loading:
|
|
2589
|
+
config: { holeId: fe, property: U, chartType: ye },
|
|
2590
|
+
hole: C,
|
|
2591
|
+
loading: w.includes(R.holeId),
|
|
2547
2592
|
isCategorical: Z,
|
|
2548
2593
|
isComment: j,
|
|
2549
2594
|
isTadpole: K,
|
|
@@ -2553,30 +2598,30 @@ function Ei({
|
|
|
2553
2598
|
label: fe
|
|
2554
2599
|
};
|
|
2555
2600
|
});
|
|
2556
|
-
}, [
|
|
2557
|
-
|
|
2558
|
-
const
|
|
2601
|
+
}, [b, o, y, u, d, w, r, c]), H = (A, E) => {
|
|
2602
|
+
N((z) => {
|
|
2603
|
+
const R = [...z], G = { ...R[A] || {}, ...E };
|
|
2559
2604
|
return E.property && (G.chartType = Te({
|
|
2560
2605
|
property: E.property,
|
|
2561
2606
|
chartType: G.chartType,
|
|
2562
2607
|
categoricalProps: u,
|
|
2563
2608
|
commentProps: d,
|
|
2564
2609
|
numericDefaultChartType: "markers+line"
|
|
2565
|
-
})),
|
|
2610
|
+
})), R[A] = G, R;
|
|
2566
2611
|
});
|
|
2567
2612
|
};
|
|
2568
2613
|
return {
|
|
2569
|
-
error:
|
|
2570
|
-
focusedHoleId:
|
|
2571
|
-
setFocusedHoleId:
|
|
2572
|
-
setError:
|
|
2614
|
+
error: M,
|
|
2615
|
+
focusedHoleId: x,
|
|
2616
|
+
setFocusedHoleId: S,
|
|
2617
|
+
setError: I,
|
|
2573
2618
|
holeCount: s.length,
|
|
2574
2619
|
numericProps: c,
|
|
2575
2620
|
categoricalProps: u,
|
|
2576
2621
|
commentProps: d,
|
|
2577
2622
|
columnMeta: h,
|
|
2578
|
-
propertyOptions:
|
|
2579
|
-
labeledHoleOptions:
|
|
2623
|
+
propertyOptions: L,
|
|
2624
|
+
labeledHoleOptions: O,
|
|
2580
2625
|
traceGraphs: V,
|
|
2581
2626
|
handleConfigChange: H
|
|
2582
2627
|
};
|
|
@@ -2620,12 +2665,12 @@ function hr(e = [], t = fr) {
|
|
|
2620
2665
|
};
|
|
2621
2666
|
}
|
|
2622
2667
|
const l = t.map((a, u) => {
|
|
2623
|
-
const m = u / s, d = (u + 1) / s, f = Math.floor(m * r.length), h = Math.min(r.length - 1, Math.floor(d * r.length)),
|
|
2668
|
+
const m = u / s, d = (u + 1) / s, f = Math.floor(m * r.length), h = Math.min(r.length - 1, Math.floor(d * r.length)), g = r[f], y = u === s - 1 ? i : r[h];
|
|
2624
2669
|
return {
|
|
2625
2670
|
index: u,
|
|
2626
|
-
min:
|
|
2627
|
-
max:
|
|
2628
|
-
label: pr(
|
|
2671
|
+
min: g,
|
|
2672
|
+
max: y,
|
|
2673
|
+
label: pr(g, y)
|
|
2629
2674
|
};
|
|
2630
2675
|
}), c = (i - o) / s;
|
|
2631
2676
|
return {
|
|
@@ -2671,7 +2716,7 @@ function jt(e = {}) {
|
|
|
2671
2716
|
z: qe(e.z)
|
|
2672
2717
|
};
|
|
2673
2718
|
}
|
|
2674
|
-
function
|
|
2719
|
+
function gr(e = [], t = [0, 0], n = 0) {
|
|
2675
2720
|
const [r, o] = t, i = Number(n) * Math.PI / 180, s = Math.cos(i), l = Math.sin(i);
|
|
2676
2721
|
return Ht(e).map(jt).map((c) => {
|
|
2677
2722
|
if (!Number.isFinite(c.x) || !Number.isFinite(c.y)) return { ...c };
|
|
@@ -2683,11 +2728,11 @@ function yr(e = [], t = [0, 0], n = 0) {
|
|
|
2683
2728
|
};
|
|
2684
2729
|
});
|
|
2685
2730
|
}
|
|
2686
|
-
function
|
|
2687
|
-
const o =
|
|
2731
|
+
function yr(e = [], t = [0, 0], n = 0, r = 50) {
|
|
2732
|
+
const o = gr(e, t, n), i = 0.5 * Number(r || 0);
|
|
2688
2733
|
return !Number.isFinite(i) || i <= 0 ? o : o.filter((s) => Number.isFinite(s.across) && Math.abs(s.across) <= i);
|
|
2689
2734
|
}
|
|
2690
|
-
function
|
|
2735
|
+
function ki(e = [], t = null, n = null) {
|
|
2691
2736
|
let r = Ht(e).map(jt);
|
|
2692
2737
|
if (Array.isArray(t) && t.length === 2) {
|
|
2693
2738
|
const [o, i] = t;
|
|
@@ -2698,8 +2743,8 @@ function xi(e = [], t = null, n = null) {
|
|
|
2698
2743
|
color_value: o == null ? void 0 : o[n]
|
|
2699
2744
|
}))), r;
|
|
2700
2745
|
}
|
|
2701
|
-
function
|
|
2702
|
-
let i =
|
|
2746
|
+
function Ai(e = [], t = [0, 0], n = 0, r = 50, o = null) {
|
|
2747
|
+
let i = yr(e, t, n, r);
|
|
2703
2748
|
return o && (i = i.map((s) => ({
|
|
2704
2749
|
...s,
|
|
2705
2750
|
color_value: s == null ? void 0 : s[o]
|
|
@@ -2715,7 +2760,7 @@ function Ne(e, t = void 0) {
|
|
|
2715
2760
|
const n = Number(e);
|
|
2716
2761
|
return Number.isFinite(n) ? n : t;
|
|
2717
2762
|
}
|
|
2718
|
-
function
|
|
2763
|
+
function Ii(e = [], t = null) {
|
|
2719
2764
|
const n = /* @__PURE__ */ new Map();
|
|
2720
2765
|
rt(e).forEach((o) => {
|
|
2721
2766
|
const i = ot(o);
|
|
@@ -2735,7 +2780,7 @@ function Ai(e = [], t = null) {
|
|
|
2735
2780
|
t && (l.color = s.map((c) => c == null ? void 0 : c[t])), r.push(l);
|
|
2736
2781
|
}), r;
|
|
2737
2782
|
}
|
|
2738
|
-
function
|
|
2783
|
+
function Oi(e = [], t = 1, n = null) {
|
|
2739
2784
|
return rt(e).map((r) => ({
|
|
2740
2785
|
hole_id: ot(r),
|
|
2741
2786
|
from: r == null ? void 0 : r.from,
|
|
@@ -2745,7 +2790,7 @@ function Ii(e = [], t = 1, n = null) {
|
|
|
2745
2790
|
value: n ? r == null ? void 0 : r[n] : null
|
|
2746
2791
|
}));
|
|
2747
2792
|
}
|
|
2748
|
-
function
|
|
2793
|
+
function Ci(e = [], t = null) {
|
|
2749
2794
|
return t ? rt(e).filter((n) => Object.prototype.hasOwnProperty.call(n || {}, t)).map((n) => ({
|
|
2750
2795
|
hole_id: ot(n),
|
|
2751
2796
|
label: n == null ? void 0 : n[t],
|
|
@@ -2770,11 +2815,11 @@ const _r = {
|
|
|
2770
2815
|
};
|
|
2771
2816
|
function Nr(e, t) {
|
|
2772
2817
|
const n = t || _r, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
|
|
2773
|
-
return new
|
|
2818
|
+
return new _.Color(o).getHex();
|
|
2774
2819
|
}
|
|
2775
2820
|
function Mr(e, t) {
|
|
2776
2821
|
const n = e * Math.PI / 180, r = t * Math.PI / 180;
|
|
2777
|
-
return new
|
|
2822
|
+
return new _.Vector3(
|
|
2778
2823
|
Math.sin(r) * Math.sin(n),
|
|
2779
2824
|
// East component
|
|
2780
2825
|
Math.cos(r) * Math.sin(n),
|
|
@@ -2790,25 +2835,25 @@ function zr(e, t = {}) {
|
|
|
2790
2835
|
opacity: o = 0.7,
|
|
2791
2836
|
segments: i = 32,
|
|
2792
2837
|
colorMap: s = null
|
|
2793
|
-
} = t, l = new
|
|
2838
|
+
} = t, l = new _.Group(), c = new _.Vector3(0, 1, 0);
|
|
2794
2839
|
for (const a of e) {
|
|
2795
2840
|
const u = a.x != null ? a.x : a.easting != null ? a.easting : null, m = a.y != null ? a.y : a.northing != null ? a.northing : null, d = a.z != null ? a.z : a.elevation != null ? a.elevation : null;
|
|
2796
2841
|
if (u == null || m == null || d == null || !Number.isFinite(u) || !Number.isFinite(m) || !Number.isFinite(d)) continue;
|
|
2797
2842
|
const f = a[q] != null ? Number(a[q]) : null, h = a[X] != null ? Number(a[X]) : null;
|
|
2798
|
-
let
|
|
2843
|
+
let g;
|
|
2799
2844
|
if (a.nx != null && Number.isFinite(a.nx) && a.ny != null && Number.isFinite(a.ny) && a.nz != null && Number.isFinite(a.nz))
|
|
2800
|
-
|
|
2845
|
+
g = new _.Vector3(a.nx, a.ny, a.nz).normalize();
|
|
2801
2846
|
else {
|
|
2802
2847
|
if (f == null || h == null || !Number.isFinite(f) || !Number.isFinite(h)) continue;
|
|
2803
|
-
|
|
2848
|
+
g = Mr(f, h);
|
|
2804
2849
|
}
|
|
2805
|
-
const
|
|
2850
|
+
const y = new _.CylinderGeometry(n, n, r, i, 1, !1), p = new _.MeshStandardMaterial({
|
|
2806
2851
|
color: Nr(a.structure_type, s),
|
|
2807
2852
|
transparent: !0,
|
|
2808
2853
|
opacity: o,
|
|
2809
|
-
side:
|
|
2810
|
-
}),
|
|
2811
|
-
|
|
2854
|
+
side: _.DoubleSide
|
|
2855
|
+
}), b = new _.Mesh(y, p);
|
|
2856
|
+
b.position.set(u, m, d), b.quaternion.setFromUnitVectors(c, g), b.userData = {
|
|
2812
2857
|
type: "structure",
|
|
2813
2858
|
hole_id: a.hole_id,
|
|
2814
2859
|
depth: a.depth ?? a.mid,
|
|
@@ -2816,7 +2861,7 @@ function zr(e, t = {}) {
|
|
|
2816
2861
|
dip: f,
|
|
2817
2862
|
azimuth: h,
|
|
2818
2863
|
comments: a.comments
|
|
2819
|
-
}, l.add(
|
|
2864
|
+
}, l.add(b);
|
|
2820
2865
|
}
|
|
2821
2866
|
return l;
|
|
2822
2867
|
}
|
|
@@ -2874,7 +2919,7 @@ function Ar(e) {
|
|
|
2874
2919
|
new Error(`Unsupported raster source type: "${e.type}"`)
|
|
2875
2920
|
);
|
|
2876
2921
|
return new Promise((r, o) => {
|
|
2877
|
-
new
|
|
2922
|
+
new _.TextureLoader().load(
|
|
2878
2923
|
t,
|
|
2879
2924
|
(s) => {
|
|
2880
2925
|
n && URL.revokeObjectURL(t), r(s);
|
|
@@ -2890,21 +2935,21 @@ function Ar(e) {
|
|
|
2890
2935
|
);
|
|
2891
2936
|
});
|
|
2892
2937
|
}
|
|
2893
|
-
async function
|
|
2938
|
+
async function Si(e) {
|
|
2894
2939
|
const { source: t, bounds: n, elevation: r = 0, visible: o = !0, renderOrder: i = 0 } = e, s = e.id ?? `raster-overlay-${++xr}`, l = e.name ?? s;
|
|
2895
2940
|
let c = e.opacity ?? 1;
|
|
2896
2941
|
if ((c < 0 || c > 1) && (console.warn(
|
|
2897
2942
|
`[baselode] raster overlay "${s}": opacity ${c} is outside [0, 1] — clamped`
|
|
2898
2943
|
), c = Math.max(0, Math.min(1, c))), !t) throw new Error("raster overlay: options.source is required");
|
|
2899
2944
|
if (!n) throw new Error("raster overlay: options.bounds is required");
|
|
2900
|
-
const a = kr(n), { minX: u, minY: m, maxX: d, maxY: f } = a, h = d - u,
|
|
2901
|
-
map:
|
|
2945
|
+
const a = kr(n), { minX: u, minY: m, maxX: d, maxY: f } = a, h = d - u, g = f - m, y = (u + d) / 2, p = (m + f) / 2, b = await Ar(t), N = new _.PlaneGeometry(h, g), M = new _.MeshBasicMaterial({
|
|
2946
|
+
map: b,
|
|
2902
2947
|
transparent: !0,
|
|
2903
2948
|
opacity: c,
|
|
2904
|
-
side:
|
|
2949
|
+
side: _.DoubleSide,
|
|
2905
2950
|
depthWrite: !1
|
|
2906
|
-
}),
|
|
2907
|
-
return
|
|
2951
|
+
}), I = new _.Mesh(N, M);
|
|
2952
|
+
return I.position.set(y, p, r), I.renderOrder = i, I.visible = o, { id: s, name: l, mesh: I, texture: b, bounds: a, elevation: r, opacity: c, visible: o };
|
|
2908
2953
|
}
|
|
2909
2954
|
function Ir(e, t) {
|
|
2910
2955
|
e.scene && (e.rasterOverlays.has(t.id) && it(e, t.id), e.rasterOverlays.set(t.id, t), e.scene.add(t.mesh));
|
|
@@ -2924,11 +2969,11 @@ function Cr(e, t, n) {
|
|
|
2924
2969
|
const r = e.rasterOverlays.get(t);
|
|
2925
2970
|
r && (r.visible = !!n, r.mesh.visible = r.visible);
|
|
2926
2971
|
}
|
|
2927
|
-
function
|
|
2972
|
+
function Sr(e, t, n) {
|
|
2928
2973
|
const r = e.rasterOverlays.get(t);
|
|
2929
2974
|
r && (r.elevation = Number(n), r.mesh.position.setZ(r.elevation));
|
|
2930
2975
|
}
|
|
2931
|
-
function
|
|
2976
|
+
function Dr(e, t) {
|
|
2932
2977
|
return e.rasterOverlays.get(t);
|
|
2933
2978
|
}
|
|
2934
2979
|
function Lr(e) {
|
|
@@ -2997,10 +3042,10 @@ function Tr(e, t = 1e3) {
|
|
|
2997
3042
|
function $r(e, t = 2e3) {
|
|
2998
3043
|
!e.camera || !e.controls || (e.controls.target.set(0, 0, 0), e.camera.position.set(0, 0, t), e.camera.up.set(0, 1, 0), e.camera.lookAt(0, 0, 0), e.controls.update());
|
|
2999
3044
|
}
|
|
3000
|
-
function
|
|
3045
|
+
function Rr(e, t = 0, n = 0) {
|
|
3001
3046
|
e.controls && typeof e.controls.pan == "function" && (e.controls.pan(t, n), e.controls.update());
|
|
3002
3047
|
}
|
|
3003
|
-
function
|
|
3048
|
+
function Br(e, t = 1.1) {
|
|
3004
3049
|
!e.controls || typeof e.controls.dollyIn != "function" || typeof e.controls.dollyOut != "function" || (t > 1 ? e.controls.dollyOut(t) : e.controls.dollyIn(1 / t), e.controls.update());
|
|
3005
3050
|
}
|
|
3006
3051
|
function Vr(e, t = 1.2) {
|
|
@@ -3012,8 +3057,8 @@ function Vr(e, t = 1.2) {
|
|
|
3012
3057
|
maxY: i,
|
|
3013
3058
|
minZ: s,
|
|
3014
3059
|
maxZ: l
|
|
3015
|
-
} = e.lastBounds, c = (r - n) * t, a = (i - o) * t, u = (l - s) * t, m = (n + r) / 2, d = (o + i) / 2, f = (s + l) / 2,
|
|
3016
|
-
e.controls.target.set(m, d, f), e.camera.position.set(m +
|
|
3060
|
+
} = e.lastBounds, c = (r - n) * t, a = (i - o) * t, u = (l - s) * t, m = (n + r) / 2, d = (o + i) / 2, f = (s + l) / 2, g = Math.max(c, a, u, 1) * 2;
|
|
3061
|
+
e.controls.target.set(m, d, f), e.camera.position.set(m + g, d + g, f + g), e.camera.lookAt(m, d, f), e.controls.update();
|
|
3017
3062
|
}
|
|
3018
3063
|
const Hr = 1, jr = 120;
|
|
3019
3064
|
function Gr(e, t) {
|
|
@@ -3050,15 +3095,15 @@ function Yr(e, t, n) {
|
|
|
3050
3095
|
return Number.isFinite(i) ? i : null;
|
|
3051
3096
|
}
|
|
3052
3097
|
function Xr(e, t) {
|
|
3053
|
-
if (!Number.isFinite(e)) return new
|
|
3054
|
-
if (Vt(e, t) < 0) return new
|
|
3098
|
+
if (!Number.isFinite(e)) return new _.Color(ue);
|
|
3099
|
+
if (Vt(e, t) < 0) return new _.Color(ue);
|
|
3055
3100
|
const r = br(e, t, ue);
|
|
3056
|
-
return new
|
|
3101
|
+
return new _.Color(r);
|
|
3057
3102
|
}
|
|
3058
3103
|
function qr(e) {
|
|
3059
3104
|
if (!e || !String(e).trim()) return ue;
|
|
3060
3105
|
const t = Yt(String(e).toLowerCase().trim());
|
|
3061
|
-
return "#" + new
|
|
3106
|
+
return "#" + new _.Color().setHSL(t, 0.7, 0.5).getHexString();
|
|
3062
3107
|
}
|
|
3063
3108
|
function Zr(e = {}) {
|
|
3064
3109
|
return {
|
|
@@ -3088,7 +3133,7 @@ function Kr(e) {
|
|
|
3088
3133
|
return `${e ?? ""}`.trim().toLowerCase();
|
|
3089
3134
|
}
|
|
3090
3135
|
function Jr(e, t) {
|
|
3091
|
-
const n = `${e ?? ""}:${t ?? 0}`, r = Yt(n), o = (t ?? 0) % 14 / 14, i = (r * 0.15 + o * 0.85) % 1, s = new
|
|
3136
|
+
const n = `${e ?? ""}:${t ?? 0}`, r = Yt(n), o = (t ?? 0) % 14 / 14, i = (r * 0.15 + o * 0.85) % 1, s = new _.Color();
|
|
3092
3137
|
return s.setHSL(i, 1, 0.5), s;
|
|
3093
3138
|
}
|
|
3094
3139
|
function Yt(e) {
|
|
@@ -3125,21 +3170,21 @@ function to({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId
|
|
|
3125
3170
|
if (!e)
|
|
3126
3171
|
return Jr(r, o);
|
|
3127
3172
|
if (e === "__HAS_ASSAY__") {
|
|
3128
|
-
if (!(t != null && t.length)) return new
|
|
3173
|
+
if (!(t != null && t.length)) return new _.Color(ue);
|
|
3129
3174
|
const u = Nt(i, s);
|
|
3130
3175
|
return u ? t.some((d) => {
|
|
3131
3176
|
const f = Number(d == null ? void 0 : d.from), h = Number(d == null ? void 0 : d.to);
|
|
3132
3177
|
if (!Number.isFinite(f) || !Number.isFinite(h)) return !1;
|
|
3133
|
-
const
|
|
3134
|
-
return Math.min(u.segEnd, h) >
|
|
3135
|
-
}) ? new
|
|
3178
|
+
const g = Math.max(u.segStart, f);
|
|
3179
|
+
return Math.min(u.segEnd, h) > g;
|
|
3180
|
+
}) ? new _.Color("#ff8c42") : new _.Color(ue) : new _.Color(ue);
|
|
3136
3181
|
}
|
|
3137
|
-
if (!(t != null && t.length)) return new
|
|
3182
|
+
if (!(t != null && t.length)) return new _.Color(ue);
|
|
3138
3183
|
const c = Nt(i, s);
|
|
3139
|
-
if (!c) return new
|
|
3184
|
+
if (!c) return new _.Color(ue);
|
|
3140
3185
|
if (l) {
|
|
3141
3186
|
const u = Qr(t, c.segStart, c.segEnd);
|
|
3142
|
-
return new
|
|
3187
|
+
return new _.Color(qr(u));
|
|
3143
3188
|
}
|
|
3144
3189
|
const a = Yr(t, c.segStart, c.segEnd);
|
|
3145
3190
|
return Xr(a, n);
|
|
@@ -3148,48 +3193,48 @@ function no(e, t, n = {}) {
|
|
|
3148
3193
|
if (!e.scene || (Xt(e), !t || t.length === 0)) return;
|
|
3149
3194
|
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: s } = Zr(n), l = s ? [] : Wr(o, i), c = hr(l);
|
|
3150
3195
|
let a = 1 / 0, u = -1 / 0, m = 1 / 0, d = -1 / 0, f = 1 / 0, h = -1 / 0;
|
|
3151
|
-
const
|
|
3152
|
-
t.forEach((p,
|
|
3153
|
-
const
|
|
3154
|
-
a = Math.min(a,
|
|
3155
|
-
const v = new
|
|
3156
|
-
return v.md =
|
|
3196
|
+
const g = new _.Vector3(), y = new _.Vector3(0, 1, 0);
|
|
3197
|
+
t.forEach((p, b) => {
|
|
3198
|
+
const M = b * 137.5 % 360 / 360, I = new _.Color().setHSL(M, 0.75, 0.55), x = (p.points || []).map((D) => {
|
|
3199
|
+
a = Math.min(a, D.x), u = Math.max(u, D.x), m = Math.min(m, D.y), d = Math.max(d, D.y), f = Math.min(f, D.z), h = Math.max(h, D.z);
|
|
3200
|
+
const v = new _.Vector3(D.x, D.y, D.z);
|
|
3201
|
+
return v.md = D.md, v;
|
|
3157
3202
|
});
|
|
3158
|
-
if (
|
|
3159
|
-
if (
|
|
3160
|
-
const
|
|
3161
|
-
color:
|
|
3162
|
-
emissive:
|
|
3203
|
+
if (x.length < 2) {
|
|
3204
|
+
if (x.length === 1) {
|
|
3205
|
+
const D = new _.SphereGeometry(5, 12, 12), v = new _.MeshLambertMaterial({
|
|
3206
|
+
color: I,
|
|
3207
|
+
emissive: I,
|
|
3163
3208
|
emissiveIntensity: 0.2
|
|
3164
|
-
}),
|
|
3165
|
-
|
|
3209
|
+
}), L = new _.Mesh(D, v);
|
|
3210
|
+
L.position.copy(x[0]), L.userData = Ze(p), e.scene.add(L), e.drillLines.push(L), e.drillMeshes.push(L);
|
|
3166
3211
|
}
|
|
3167
3212
|
return;
|
|
3168
3213
|
}
|
|
3169
|
-
const
|
|
3170
|
-
|
|
3171
|
-
const
|
|
3172
|
-
for (let
|
|
3173
|
-
const v =
|
|
3214
|
+
const S = new _.Group();
|
|
3215
|
+
S.userData = Ze(p);
|
|
3216
|
+
const w = i ? eo(p, o) : [];
|
|
3217
|
+
for (let D = 0; D < x.length - 1; D += 1) {
|
|
3218
|
+
const v = x[D], L = x[D + 1], O = g.subVectors(L, v), V = O.length();
|
|
3174
3219
|
if (V <= 1e-3) continue;
|
|
3175
|
-
const H = 2.2, A = new
|
|
3220
|
+
const H = 2.2, A = new _.CylinderGeometry(H, H, V, 6, 1, !0), E = to({
|
|
3176
3221
|
selectedAssayVariable: i,
|
|
3177
|
-
assayIntervals:
|
|
3222
|
+
assayIntervals: w,
|
|
3178
3223
|
assayScale: c,
|
|
3179
3224
|
holeId: p.id,
|
|
3180
|
-
segmentIndex:
|
|
3225
|
+
segmentIndex: D,
|
|
3181
3226
|
p1: v,
|
|
3182
|
-
p2:
|
|
3227
|
+
p2: L,
|
|
3183
3228
|
isCategorical: s
|
|
3184
|
-
}),
|
|
3229
|
+
}), z = new _.MeshLambertMaterial({
|
|
3185
3230
|
color: E,
|
|
3186
3231
|
flatShading: !0,
|
|
3187
3232
|
emissive: E,
|
|
3188
3233
|
emissiveIntensity: 0.15
|
|
3189
|
-
}),
|
|
3190
|
-
|
|
3234
|
+
}), R = new _.Mesh(A, z);
|
|
3235
|
+
R.position.copy(v.clone().addScaledVector(O, 0.5)), R.quaternion.setFromUnitVectors(y, O.clone().normalize()), R.userData = Ze(p), S.add(R), e.drillMeshes.push(R);
|
|
3191
3236
|
}
|
|
3192
|
-
e.scene.add(
|
|
3237
|
+
e.scene.add(S), e.drillLines.push(S);
|
|
3193
3238
|
}), e.camera && e.controls && (e.lastBounds = { minX: a, maxX: u, minY: m, maxY: d, minZ: f, maxZ: h }, r || lt(e, { minX: a, maxX: u, minY: m, maxY: d, minZ: f, maxZ: h })), Me(e);
|
|
3194
3239
|
}
|
|
3195
3240
|
function Xt(e) {
|
|
@@ -3205,13 +3250,13 @@ function so(e) {
|
|
|
3205
3250
|
if (!t || !n || !r) return;
|
|
3206
3251
|
const i = (o == null ? void 0 : o.clientWidth) || t.domElement.clientWidth || 1, s = (o == null ? void 0 : o.clientHeight) || t.domElement.clientHeight || 1, l = new an(t), c = new cn(n, r);
|
|
3207
3252
|
l.addPass(c);
|
|
3208
|
-
const a = new
|
|
3253
|
+
const a = new _.Vector2(i, s), u = new un(a, n, r);
|
|
3209
3254
|
u.visibleEdgeColor.set(Mt), u.hiddenEdgeColor.set(Mt), u.edgeStrength = ro, u.edgeThickness = oo, u.edgeGlow = io, u.pulsePeriod = 0, u.selectedObjects = [], l.addPass(u), l.setSize(i, s), e._composer = l, e._outlinePass = u;
|
|
3210
3255
|
}
|
|
3211
3256
|
function lo(e, t, n) {
|
|
3212
3257
|
!e._composer || !e._outlinePass || (e._composer.setSize(t, n), e._outlinePass.resolution.set(t, n));
|
|
3213
3258
|
}
|
|
3214
|
-
function
|
|
3259
|
+
function Se(e, t) {
|
|
3215
3260
|
e._outlinePass && (e._outlinePass.selectedObjects = t ? [t] : [], e._selectedObject = t || null);
|
|
3216
3261
|
}
|
|
3217
3262
|
function zt(e) {
|
|
@@ -3229,36 +3274,36 @@ function co(e, t, n, r, o = {}) {
|
|
|
3229
3274
|
if (!e.scene || (qt(e), !t || !n || !r)) return;
|
|
3230
3275
|
const { autoCenter: i = !0, opacity: s = 1 } = o;
|
|
3231
3276
|
let l = 1 / 0, c = -1 / 0, a = 1 / 0, u = -1 / 0, m = 1 / 0, d = -1 / 0;
|
|
3232
|
-
t.forEach((
|
|
3233
|
-
const
|
|
3234
|
-
l = Math.min(l,
|
|
3277
|
+
t.forEach((z) => {
|
|
3278
|
+
const R = Number(z.x ?? z.center_x ?? 0), C = Number(z.y ?? z.center_y ?? 0), G = Number(z.z ?? z.center_z ?? 0), U = Number(z.dx ?? z.size_x ?? 1), j = Number(z.dy ?? z.size_y ?? 1), Z = Number(z.dz ?? z.size_z ?? 1);
|
|
3279
|
+
l = Math.min(l, R - U / 2), c = Math.max(c, R + U / 2), a = Math.min(a, C - j / 2), u = Math.max(u, C + j / 2), m = Math.min(m, G - Z / 2), d = Math.max(d, G + Z / 2);
|
|
3235
3280
|
});
|
|
3236
|
-
let f = 0, h = 0,
|
|
3237
|
-
o.offset ? (f = Number(o.offset.x ?? 0), h = Number(o.offset.y ?? 0),
|
|
3238
|
-
const
|
|
3239
|
-
t.map((
|
|
3240
|
-
),
|
|
3281
|
+
let f = 0, h = 0, g = 0;
|
|
3282
|
+
o.offset ? (f = Number(o.offset.x ?? 0), h = Number(o.offset.y ?? 0), g = Number(o.offset.z ?? 0)) : i && (f = -((l + c) / 2), h = -((a + u) / 2), g = -((m + d) / 2));
|
|
3283
|
+
const y = l + f, p = c + f, b = a + h, N = u + h, M = m + g, I = d + g, x = (z, R, C) => `${Math.round(z)},${Math.round(R)},${Math.round(C)}`, S = new Set(
|
|
3284
|
+
t.map((z) => x(Number(z.x ?? 0), Number(z.y ?? 0), Number(z.z ?? 0)))
|
|
3285
|
+
), w = [], D = [], v = [], L = [], O = [];
|
|
3241
3286
|
let V = 0;
|
|
3242
|
-
if (t.forEach((
|
|
3243
|
-
const
|
|
3287
|
+
if (t.forEach((z) => {
|
|
3288
|
+
const R = Number(z.x ?? z.center_x ?? 0), C = Number(z.y ?? z.center_y ?? 0), G = Number(z.z ?? z.center_z ?? 0), U = Number(z.dx ?? z.size_x ?? 1), j = Number(z.dy ?? z.size_y ?? 1), Z = Number(z.dz ?? z.size_z ?? 1), K = R + f, le = C + h, ye = G + g, fe = $n(z[n], r, _), { r: Ce, g: he, b: Ge } = fe;
|
|
3244
3289
|
ao.forEach((_e) => {
|
|
3245
|
-
const Jt =
|
|
3246
|
-
if (
|
|
3290
|
+
const Jt = R + _e.neibDir[0] * U, Qt = C + _e.neibDir[1] * j, en = G + _e.neibDir[2] * Z;
|
|
3291
|
+
if (S.has(x(Jt, Qt, en))) return;
|
|
3247
3292
|
const ze = V;
|
|
3248
3293
|
_e.verts.forEach(([tn, nn, rn]) => {
|
|
3249
|
-
|
|
3250
|
-
}),
|
|
3294
|
+
w.push(K + tn * U / 2, le + nn * j / 2, ye + rn * Z / 2), D.push(_e.normal[0], _e.normal[1], _e.normal[2]), v.push(Ce, he, Ge), V++;
|
|
3295
|
+
}), L.push(ze, ze + 1, ze + 2, ze, ze + 2, ze + 3), O.push(z);
|
|
3251
3296
|
});
|
|
3252
|
-
}),
|
|
3253
|
-
const H = new
|
|
3254
|
-
H.setAttribute("position", new
|
|
3255
|
-
const A = new
|
|
3297
|
+
}), w.length === 0) return;
|
|
3298
|
+
const H = new _.BufferGeometry();
|
|
3299
|
+
H.setAttribute("position", new _.Float32BufferAttribute(w, 3)), H.setAttribute("normal", new _.Float32BufferAttribute(D, 3)), H.setAttribute("color", new _.Float32BufferAttribute(v, 3)), H.setIndex(L);
|
|
3300
|
+
const A = new _.MeshLambertMaterial({
|
|
3256
3301
|
vertexColors: !0,
|
|
3257
3302
|
transparent: s < 1,
|
|
3258
3303
|
opacity: s,
|
|
3259
|
-
side:
|
|
3260
|
-
}), E = new
|
|
3261
|
-
E.userData._isMergedBlocks = !0, E.userData._quadToBlock =
|
|
3304
|
+
side: _.DoubleSide
|
|
3305
|
+
}), E = new _.Mesh(H, A);
|
|
3306
|
+
E.userData._isMergedBlocks = !0, E.userData._quadToBlock = O, E.userData._offset = { x: f, y: h, z: g }, e.scene.add(E), e.blocks.push(E), Me(e), e.camera && e.controls && (e.lastBounds = { minX: y, maxX: p, minY: b, maxY: N, minZ: M, maxZ: I }, lt(e, { minX: y, maxX: p, minY: b, maxY: N, minZ: M, maxZ: I }));
|
|
3262
3307
|
}
|
|
3263
3308
|
function qt(e) {
|
|
3264
3309
|
var t;
|
|
@@ -3275,89 +3320,89 @@ function uo(e, t) {
|
|
|
3275
3320
|
function mo(e, t, n) {
|
|
3276
3321
|
const r = (n == null ? void 0 : n.x) ?? 0, o = (n == null ? void 0 : n.y) ?? 0, i = (n == null ? void 0 : n.z) ?? 0, s = Number(t.x ?? t.center_x ?? 0) + r, l = Number(t.y ?? t.center_y ?? 0) + o, c = Number(t.z ?? t.center_z ?? 0) + i, a = Number(t.dx ?? t.size_x ?? 1), u = Number(t.dy ?? t.size_y ?? 1), m = Number(t.dz ?? t.size_z ?? 1);
|
|
3277
3322
|
if (!e._blockHighlightMesh) {
|
|
3278
|
-
const d = new
|
|
3279
|
-
e._blockHighlightMesh = new
|
|
3323
|
+
const d = new _.BoxGeometry(1, 1, 1), f = new _.MeshBasicMaterial({ transparent: !0, opacity: 0, depthWrite: !1 });
|
|
3324
|
+
e._blockHighlightMesh = new _.Mesh(d, f), e.scene.add(e._blockHighlightMesh);
|
|
3280
3325
|
}
|
|
3281
3326
|
return e._blockHighlightMesh.position.set(s, l, c), e._blockHighlightMesh.scale.set(a, u, m), e._blockHighlightMesh;
|
|
3282
3327
|
}
|
|
3283
3328
|
function Zt(e) {
|
|
3284
3329
|
var o, i;
|
|
3285
3330
|
if (!e._outlinePass || e.selectables.length === 0) {
|
|
3286
|
-
e._outlinePass &&
|
|
3331
|
+
e._outlinePass && Se(e, null);
|
|
3287
3332
|
return;
|
|
3288
3333
|
}
|
|
3289
3334
|
const t = e.raycaster.intersectObjects(e.selectables, !0);
|
|
3290
3335
|
if (t.length === 0) {
|
|
3291
|
-
|
|
3336
|
+
Se(e, null);
|
|
3292
3337
|
return;
|
|
3293
3338
|
}
|
|
3294
3339
|
const n = t[0], r = n.object;
|
|
3295
3340
|
if ((o = r == null ? void 0 : r.userData) != null && o._isMergedBlocks) {
|
|
3296
3341
|
const s = Math.floor(n.faceIndex / 2), l = (i = r.userData._quadToBlock) == null ? void 0 : i[s];
|
|
3297
3342
|
if (l) {
|
|
3298
|
-
|
|
3343
|
+
Se(e, mo(e, l, r.userData._offset));
|
|
3299
3344
|
return;
|
|
3300
3345
|
}
|
|
3301
3346
|
}
|
|
3302
|
-
|
|
3347
|
+
Se(e, r);
|
|
3303
3348
|
}
|
|
3304
3349
|
function fo(e) {
|
|
3305
3350
|
const t = e.renderer;
|
|
3306
3351
|
t && (e.handleCanvasClick = (n) => {
|
|
3307
|
-
var f, h,
|
|
3352
|
+
var f, h, g, y, p, b, N;
|
|
3308
3353
|
if (n.button !== 0) return;
|
|
3309
3354
|
if ((f = e.gizmo) != null && f.domElement) {
|
|
3310
|
-
const
|
|
3311
|
-
if (n.clientX >=
|
|
3355
|
+
const M = e.gizmo.domElement.getBoundingClientRect();
|
|
3356
|
+
if (n.clientX >= M.left && n.clientX <= M.right && n.clientY >= M.top && n.clientY <= M.bottom)
|
|
3312
3357
|
return;
|
|
3313
3358
|
}
|
|
3314
3359
|
const r = t.domElement.getBoundingClientRect(), o = n.clientX - r.left, i = n.clientY - r.top;
|
|
3315
3360
|
if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera), Zt(e), e.blocks.length > 0) {
|
|
3316
|
-
const
|
|
3317
|
-
if (
|
|
3318
|
-
const
|
|
3319
|
-
if ((h =
|
|
3320
|
-
const
|
|
3321
|
-
|
|
3361
|
+
const M = e.raycaster.intersectObjects(e.blocks, !1);
|
|
3362
|
+
if (M.length > 0) {
|
|
3363
|
+
const I = M[0], x = I.object;
|
|
3364
|
+
if ((h = x == null ? void 0 : x.userData) != null && h._isMergedBlocks && e.blockClickHandler) {
|
|
3365
|
+
const S = Math.floor(I.faceIndex / 2), w = x.userData._quadToBlock[S];
|
|
3366
|
+
w && e.blockClickHandler(w);
|
|
3322
3367
|
}
|
|
3323
3368
|
return;
|
|
3324
3369
|
}
|
|
3325
3370
|
}
|
|
3326
|
-
const s = e.raycaster.intersectObjects(e.drillMeshes, !0), l = e.raycaster.intersectObjects(e.structuralMeshes, !0), c = ((
|
|
3327
|
-
if ((((
|
|
3328
|
-
const
|
|
3329
|
-
e.drillholeClickHandler && e.drillholeClickHandler({ type: "structure", ...
|
|
3371
|
+
const s = e.raycaster.intersectObjects(e.drillMeshes, !0), l = e.raycaster.intersectObjects(e.structuralMeshes, !0), c = ((g = s[0]) == null ? void 0 : g.distance) ?? 1 / 0;
|
|
3372
|
+
if ((((y = l[0]) == null ? void 0 : y.distance) ?? 1 / 0) < c && l.length > 0) {
|
|
3373
|
+
const M = l[0].object;
|
|
3374
|
+
e.drillholeClickHandler && e.drillholeClickHandler({ type: "structure", ...M.userData });
|
|
3330
3375
|
return;
|
|
3331
3376
|
}
|
|
3332
3377
|
if (s.length === 0) return;
|
|
3333
3378
|
let u = s[0].object;
|
|
3334
3379
|
for (; u && u.parent && !((p = u.userData) != null && p.holeId); )
|
|
3335
3380
|
u = u.parent;
|
|
3336
|
-
const m = (
|
|
3381
|
+
const m = (b = u == null ? void 0 : u.userData) == null ? void 0 : b.holeId, d = (N = u == null ? void 0 : u.userData) == null ? void 0 : N.project;
|
|
3337
3382
|
m && e.drillholeClickHandler && e.drillholeClickHandler({ holeId: m, project: d });
|
|
3338
3383
|
}, t.domElement.addEventListener("click", e.handleCanvasClick));
|
|
3339
3384
|
}
|
|
3340
3385
|
class Di {
|
|
3341
3386
|
constructor() {
|
|
3342
|
-
this.container = null, this.scene = null, this.camera = null, this.renderer = null, this.controls = null, this.flyControls = null, this.gizmo = null, this.blocks = [], this.drillLines = [], this.drillMeshes = [], this.structuralGroup = null, this.structuralMeshes = [], this.frameId = null, this.clock = new
|
|
3387
|
+
this.container = null, this.scene = null, this.camera = null, this.renderer = null, this.controls = null, this.flyControls = null, this.gizmo = null, this.blocks = [], this.drillLines = [], this.drillMeshes = [], this.structuralGroup = null, this.structuralMeshes = [], this.frameId = null, this.clock = new _.Clock(), this.handleCanvasClick = null, this.raycaster = new _.Raycaster(), this.pointer = new _.Vector2(), this.drillholeClickHandler = null, this.blockClickHandler = null, this.controlMode = "orbit", this._tmpDir = new _.Vector3(), this.viewChangeHandler = null, this._lastViewSignature = "", this._lastViewEmitMs = 0, this.selectables = [], this._selectedObject = null, this._composer = null, this._blockHighlightMesh = null, this._outlinePass = null, this.rasterOverlays = /* @__PURE__ */ new Map();
|
|
3343
3388
|
}
|
|
3344
3389
|
init(t) {
|
|
3345
3390
|
if (!t) return;
|
|
3346
3391
|
this.container = t;
|
|
3347
3392
|
const n = t.clientWidth, r = t.clientHeight;
|
|
3348
|
-
this.scene = new
|
|
3349
|
-
const o = new
|
|
3393
|
+
this.scene = new _.Scene(), this.scene.background = new _.Color(16777215), this.camera = new _.PerspectiveCamera(28, n / r, 1e-3, 1e7), this.camera.up.set(0, 0, 1), this.camera.position.set(50, 50, 50), this.camera.lookAt(0, 0, 0), this.renderer = new _.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(n, r), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.autoClear = !1, t.appendChild(this.renderer.domElement);
|
|
3394
|
+
const o = new _.AmbientLight(16777215, 1.2);
|
|
3350
3395
|
this.scene.add(o);
|
|
3351
|
-
const i = new
|
|
3396
|
+
const i = new _.DirectionalLight(16777215, 1.5);
|
|
3352
3397
|
i.position.set(10, 10, 5), this.scene.add(i);
|
|
3353
|
-
const s = new
|
|
3398
|
+
const s = new _.AxesHelper(20);
|
|
3354
3399
|
this.scene.add(s), this.controls = new on(this.camera, this.renderer.domElement), this.controls.enableDamping = !1, this.controls.screenSpacePanning = !0, this.controls.enableZoom = !0, this.controls.zoomSpeed = 1.2, this.controls.minDistance = 3e-3, this.controls.maxDistance = 5e6, this.controls.mouseButtons = {
|
|
3355
|
-
LEFT:
|
|
3356
|
-
MIDDLE:
|
|
3357
|
-
RIGHT:
|
|
3400
|
+
LEFT: _.MOUSE.PAN,
|
|
3401
|
+
MIDDLE: _.MOUSE.DOLLY,
|
|
3402
|
+
RIGHT: _.MOUSE.ROTATE
|
|
3358
3403
|
}, this.controls.touches = {
|
|
3359
|
-
ONE:
|
|
3360
|
-
TWO:
|
|
3404
|
+
ONE: _.TOUCH.ROTATE,
|
|
3405
|
+
TWO: _.TOUCH.PAN
|
|
3361
3406
|
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new sn(this.camera, this.renderer.domElement), this.flyControls.movementSpeed = 2e3, this.flyControls.rollSpeed = Math.PI / 12, this.flyControls.dragToLook = !0, this.flyControls.enabled = !1, this.gizmo = new ln(this.camera, this.renderer, {
|
|
3362
3407
|
container: this.container,
|
|
3363
3408
|
placement: "top-right",
|
|
@@ -3452,10 +3497,10 @@ class Di {
|
|
|
3452
3497
|
$r(this, t);
|
|
3453
3498
|
}
|
|
3454
3499
|
pan(t = 0, n = 0) {
|
|
3455
|
-
|
|
3500
|
+
Rr(this, t, n);
|
|
3456
3501
|
}
|
|
3457
3502
|
dolly(t = 1.1) {
|
|
3458
|
-
|
|
3503
|
+
Br(this, t);
|
|
3459
3504
|
}
|
|
3460
3505
|
focusOnLastBounds(t = 1.2) {
|
|
3461
3506
|
Vr(this, t);
|
|
@@ -3488,7 +3533,7 @@ class Di {
|
|
|
3488
3533
|
* @param {THREE.Object3D|null} object
|
|
3489
3534
|
*/
|
|
3490
3535
|
selectObject(t) {
|
|
3491
|
-
|
|
3536
|
+
Se(this, t || null);
|
|
3492
3537
|
}
|
|
3493
3538
|
/**
|
|
3494
3539
|
* Return the currently selected object, or null if nothing is selected.
|
|
@@ -3546,7 +3591,7 @@ class Di {
|
|
|
3546
3591
|
* @param {number} elevation
|
|
3547
3592
|
*/
|
|
3548
3593
|
setRasterOverlayElevation(t, n) {
|
|
3549
|
-
|
|
3594
|
+
Sr(this, t, n);
|
|
3550
3595
|
}
|
|
3551
3596
|
/**
|
|
3552
3597
|
* Return a raster overlay by id, or undefined if not found.
|
|
@@ -3554,7 +3599,7 @@ class Di {
|
|
|
3554
3599
|
* @returns {object|undefined}
|
|
3555
3600
|
*/
|
|
3556
3601
|
getRasterOverlay(t) {
|
|
3557
|
-
return
|
|
3602
|
+
return Dr(this, t);
|
|
3558
3603
|
}
|
|
3559
3604
|
/**
|
|
3560
3605
|
* Return all raster overlay layers in insertion order.
|
|
@@ -3564,7 +3609,7 @@ class Di {
|
|
|
3564
3609
|
return Lr(this);
|
|
3565
3610
|
}
|
|
3566
3611
|
}
|
|
3567
|
-
function
|
|
3612
|
+
function Li({
|
|
3568
3613
|
controlMode: e = "orbit",
|
|
3569
3614
|
onToggleFly: t = () => {
|
|
3570
3615
|
},
|
|
@@ -3576,13 +3621,13 @@ function Si({
|
|
|
3576
3621
|
}
|
|
3577
3622
|
}) {
|
|
3578
3623
|
return /* @__PURE__ */ J("div", { className: "baselode-3d-controls", children: [
|
|
3579
|
-
/* @__PURE__ */
|
|
3580
|
-
/* @__PURE__ */
|
|
3581
|
-
/* @__PURE__ */
|
|
3582
|
-
/* @__PURE__ */
|
|
3624
|
+
/* @__PURE__ */ P("button", { type: "button", className: "ghost-button", onClick: n, children: "Recenter to (0,0,0)" }),
|
|
3625
|
+
/* @__PURE__ */ P("button", { type: "button", className: "ghost-button", onClick: r, children: "Look down" }),
|
|
3626
|
+
/* @__PURE__ */ P("button", { type: "button", className: "ghost-button", onClick: o, children: "Fit to scene" }),
|
|
3627
|
+
/* @__PURE__ */ P("button", { type: "button", className: "ghost-button", onClick: t, children: e === "orbit" ? "Enable fly controls" : "Disable fly controls" })
|
|
3583
3628
|
] });
|
|
3584
3629
|
}
|
|
3585
|
-
function
|
|
3630
|
+
function Pi({
|
|
3586
3631
|
properties: e = [],
|
|
3587
3632
|
selectedProperty: t = "",
|
|
3588
3633
|
onPropertyChange: n = () => {
|
|
@@ -3597,7 +3642,7 @@ function Li({
|
|
|
3597
3642
|
}) {
|
|
3598
3643
|
var c, a;
|
|
3599
3644
|
return /* @__PURE__ */ J("div", { className: "bm-widget", children: [
|
|
3600
|
-
/* @__PURE__ */
|
|
3645
|
+
/* @__PURE__ */ P("label", { className: "bm-widget__label", htmlFor: "bm-property-select", children: "Color by" }),
|
|
3601
3646
|
/* @__PURE__ */ J(
|
|
3602
3647
|
"select",
|
|
3603
3648
|
{
|
|
@@ -3606,19 +3651,19 @@ function Li({
|
|
|
3606
3651
|
value: t,
|
|
3607
3652
|
onChange: (u) => n(u.target.value),
|
|
3608
3653
|
children: [
|
|
3609
|
-
e.length === 0 && /* @__PURE__ */
|
|
3610
|
-
e.map((u) => /* @__PURE__ */
|
|
3654
|
+
e.length === 0 && /* @__PURE__ */ P("option", { value: "", children: "— no attributes —" }),
|
|
3655
|
+
e.map((u) => /* @__PURE__ */ P("option", { value: u, children: u }, u))
|
|
3611
3656
|
]
|
|
3612
3657
|
}
|
|
3613
3658
|
),
|
|
3614
3659
|
i && i.type === "numeric" && /* @__PURE__ */ J("div", { className: "bm-widget__scale", children: [
|
|
3615
|
-
/* @__PURE__ */
|
|
3616
|
-
/* @__PURE__ */
|
|
3617
|
-
/* @__PURE__ */
|
|
3660
|
+
/* @__PURE__ */ P("span", { className: "bm-widget__scale-label bm-widget__scale-label--min", children: ((c = i.min) == null ? void 0 : c.toFixed(2)) ?? "—" }),
|
|
3661
|
+
/* @__PURE__ */ P("div", { className: "bm-widget__scale-bar" }),
|
|
3662
|
+
/* @__PURE__ */ P("span", { className: "bm-widget__scale-label bm-widget__scale-label--max", children: ((a = i.max) == null ? void 0 : a.toFixed(2)) ?? "—" })
|
|
3618
3663
|
] }),
|
|
3619
|
-
i && i.type === "categorical" && /* @__PURE__ */
|
|
3664
|
+
i && i.type === "categorical" && /* @__PURE__ */ P("div", { className: "bm-widget__categories", children: (i.categories || []).map((u, m) => {
|
|
3620
3665
|
const d = Math.round(m / Math.max(i.categories.length, 1) * 360);
|
|
3621
|
-
return /* @__PURE__ */
|
|
3666
|
+
return /* @__PURE__ */ P(
|
|
3622
3667
|
"span",
|
|
3623
3668
|
{
|
|
3624
3669
|
className: "bm-widget__category-chip",
|
|
@@ -3633,7 +3678,7 @@ function Li({
|
|
|
3633
3678
|
Math.round(r * 100),
|
|
3634
3679
|
"%)"
|
|
3635
3680
|
] }),
|
|
3636
|
-
/* @__PURE__ */
|
|
3681
|
+
/* @__PURE__ */ P(
|
|
3637
3682
|
"input",
|
|
3638
3683
|
{
|
|
3639
3684
|
id: "bm-opacity-slider",
|
|
@@ -3648,8 +3693,8 @@ function Li({
|
|
|
3648
3693
|
),
|
|
3649
3694
|
s && /* @__PURE__ */ J("div", { className: "bm-widget__popup", children: [
|
|
3650
3695
|
/* @__PURE__ */ J("div", { className: "bm-widget__popup-header", children: [
|
|
3651
|
-
/* @__PURE__ */
|
|
3652
|
-
/* @__PURE__ */
|
|
3696
|
+
/* @__PURE__ */ P("span", { children: "Block attributes" }),
|
|
3697
|
+
/* @__PURE__ */ P(
|
|
3653
3698
|
"button",
|
|
3654
3699
|
{
|
|
3655
3700
|
type: "button",
|
|
@@ -3660,9 +3705,9 @@ function Li({
|
|
|
3660
3705
|
}
|
|
3661
3706
|
)
|
|
3662
3707
|
] }),
|
|
3663
|
-
/* @__PURE__ */
|
|
3664
|
-
/* @__PURE__ */
|
|
3665
|
-
/* @__PURE__ */
|
|
3708
|
+
/* @__PURE__ */ P("table", { className: "bm-widget__popup-table", children: /* @__PURE__ */ P("tbody", { children: Object.entries(s).map(([u, m]) => /* @__PURE__ */ J("tr", { children: [
|
|
3709
|
+
/* @__PURE__ */ P("th", { children: u }),
|
|
3710
|
+
/* @__PURE__ */ P("td", { children: m == null ? "—" : String(m) })
|
|
3666
3711
|
] }, u)) }) })
|
|
3667
3712
|
] })
|
|
3668
3713
|
] });
|
|
@@ -3685,7 +3730,7 @@ function po(e, t, n = ho) {
|
|
|
3685
3730
|
function bo(e) {
|
|
3686
3731
|
return [...e].sort((t, n) => (t.from_depth ?? 0) - (n.from_depth ?? 0));
|
|
3687
3732
|
}
|
|
3688
|
-
function
|
|
3733
|
+
function go(e) {
|
|
3689
3734
|
const t = {};
|
|
3690
3735
|
for (const n of e) {
|
|
3691
3736
|
const r = n.photo_set != null && n.photo_set !== "" ? String(n.photo_set) : "default";
|
|
@@ -3693,7 +3738,7 @@ function yo(e) {
|
|
|
3693
3738
|
}
|
|
3694
3739
|
return t;
|
|
3695
3740
|
}
|
|
3696
|
-
function
|
|
3741
|
+
function yo(e, t, n = 10) {
|
|
3697
3742
|
const r = [];
|
|
3698
3743
|
if (e >= t || n <= 0) return r;
|
|
3699
3744
|
const o = Math.ceil(e / n) * n, i = n * 1e-9;
|
|
@@ -3726,7 +3771,7 @@ function No(e, t, n, r, o = "Tray Images", i = Kt) {
|
|
|
3726
3771
|
};
|
|
3727
3772
|
});
|
|
3728
3773
|
}
|
|
3729
|
-
function
|
|
3774
|
+
function Fi(e, t, n = Wt) {
|
|
3730
3775
|
const r = t / 5;
|
|
3731
3776
|
return Math.max(1, Math.round(e * n * r));
|
|
3732
3777
|
}
|
|
@@ -3738,55 +3783,55 @@ function vo({
|
|
|
3738
3783
|
transform: r,
|
|
3739
3784
|
onTransformChange: o
|
|
3740
3785
|
}) {
|
|
3741
|
-
const [i, s] = Q({ scale: 1, tx: 0, ty: 0 }), l = r ?? i, c =
|
|
3786
|
+
const [i, s] = Q({ scale: 1, tx: 0, ty: 0 }), l = r ?? i, c = De(l);
|
|
3742
3787
|
c.current = l;
|
|
3743
3788
|
const a = Ue(
|
|
3744
3789
|
(v) => {
|
|
3745
|
-
const
|
|
3746
|
-
o ? o(
|
|
3790
|
+
const L = typeof v == "function" ? v(c.current) : v;
|
|
3791
|
+
o ? o(L) : s(L);
|
|
3747
3792
|
},
|
|
3748
3793
|
[o]
|
|
3749
|
-
), [u, m] = Q(!1), d =
|
|
3794
|
+
), [u, m] = Q(!1), d = De(null), f = De(null), h = ne(() => bo(e), [e]), g = ne(() => go(h), [h]), y = ne(() => {
|
|
3750
3795
|
const v = /* @__PURE__ */ new Set();
|
|
3751
|
-
for (const
|
|
3752
|
-
const
|
|
3753
|
-
v.add(
|
|
3796
|
+
for (const L of e) {
|
|
3797
|
+
const O = L.photo_set != null && L.photo_set !== "" ? String(L.photo_set) : "default";
|
|
3798
|
+
v.add(O);
|
|
3754
3799
|
}
|
|
3755
3800
|
return [...v];
|
|
3756
|
-
}, [e]), { minDepth: p, maxDepth:
|
|
3801
|
+
}, [e]), { minDepth: p, maxDepth: b } = ne(() => {
|
|
3757
3802
|
if (!h.length) return { minDepth: 0, maxDepth: 0 };
|
|
3758
|
-
const v = h.map((
|
|
3803
|
+
const v = h.map((L) => L.to_depth ?? L.from_depth ?? 0);
|
|
3759
3804
|
return {
|
|
3760
3805
|
minDepth: h[0].from_depth ?? 0,
|
|
3761
3806
|
maxDepth: Math.max(...v)
|
|
3762
3807
|
};
|
|
3763
|
-
}, [h]),
|
|
3764
|
-
() => Math.max(1, Math.round((
|
|
3765
|
-
[p,
|
|
3766
|
-
),
|
|
3808
|
+
}, [h]), N = Wt * We / 5, M = ne(
|
|
3809
|
+
() => Math.max(1, Math.round((b - p) * N)),
|
|
3810
|
+
[p, b, N]
|
|
3811
|
+
), I = ne(() => {
|
|
3767
3812
|
const v = _o(We);
|
|
3768
|
-
return
|
|
3769
|
-
}, [p,
|
|
3813
|
+
return yo(p, b, v);
|
|
3814
|
+
}, [p, b]), x = 540 * We / 5, S = ne(
|
|
3770
3815
|
() => Math.max(1, Math.min(10, Math.round(n * l.scale))),
|
|
3771
3816
|
[n, l.scale]
|
|
3772
|
-
),
|
|
3817
|
+
), w = Ue((v) => {
|
|
3773
3818
|
v.preventDefault();
|
|
3774
|
-
const
|
|
3819
|
+
const L = v.deltaY < 0 ? vt : 1 / vt, O = f.current.getBoundingClientRect(), V = v.clientX - O.left, H = v.clientY - O.top;
|
|
3775
3820
|
a((A) => {
|
|
3776
|
-
const E = Math.max(Mo, Math.min(zo, A.scale *
|
|
3821
|
+
const E = Math.max(Mo, Math.min(zo, A.scale * L)), z = E / A.scale;
|
|
3777
3822
|
return {
|
|
3778
3823
|
scale: E,
|
|
3779
|
-
tx: V - (V - A.tx) *
|
|
3780
|
-
ty: H - (H - A.ty) *
|
|
3824
|
+
tx: V - (V - A.tx) * z,
|
|
3825
|
+
ty: H - (H - A.ty) * z
|
|
3781
3826
|
};
|
|
3782
3827
|
});
|
|
3783
3828
|
}, [a]);
|
|
3784
3829
|
se(() => {
|
|
3785
3830
|
const v = f.current;
|
|
3786
3831
|
if (v)
|
|
3787
|
-
return v.addEventListener("wheel",
|
|
3788
|
-
}, [
|
|
3789
|
-
const
|
|
3832
|
+
return v.addEventListener("wheel", w, { passive: !1 }), () => v.removeEventListener("wheel", w);
|
|
3833
|
+
}, [w]);
|
|
3834
|
+
const D = Ue((v) => {
|
|
3790
3835
|
v.button === 0 && (v.preventDefault(), d.current = {
|
|
3791
3836
|
x: v.clientX,
|
|
3792
3837
|
y: v.clientY,
|
|
@@ -3795,28 +3840,28 @@ function vo({
|
|
|
3795
3840
|
}, m(!0));
|
|
3796
3841
|
}, []);
|
|
3797
3842
|
return se(() => {
|
|
3798
|
-
const v = (
|
|
3843
|
+
const v = (O) => {
|
|
3799
3844
|
if (!d.current) return;
|
|
3800
3845
|
const { tx: V, ty: H, x: A, y: E } = d.current;
|
|
3801
|
-
a((
|
|
3802
|
-
...
|
|
3803
|
-
tx: V + (
|
|
3804
|
-
ty: H + (
|
|
3846
|
+
a((z) => ({
|
|
3847
|
+
...z,
|
|
3848
|
+
tx: V + (O.clientX - A),
|
|
3849
|
+
ty: H + (O.clientY - E)
|
|
3805
3850
|
}));
|
|
3806
|
-
},
|
|
3851
|
+
}, L = () => {
|
|
3807
3852
|
d.current = null, m(!1);
|
|
3808
3853
|
};
|
|
3809
|
-
return window.addEventListener("mousemove", v), window.addEventListener("mouseup",
|
|
3810
|
-
window.removeEventListener("mousemove", v), window.removeEventListener("mouseup",
|
|
3854
|
+
return window.addEventListener("mousemove", v), window.addEventListener("mouseup", L), () => {
|
|
3855
|
+
window.removeEventListener("mousemove", v), window.removeEventListener("mouseup", L);
|
|
3811
3856
|
};
|
|
3812
3857
|
}, [a]), /* @__PURE__ */ J("div", { className: "core-photo-table", children: [
|
|
3813
3858
|
/* @__PURE__ */ J("div", { className: "core-photo-controls", children: [
|
|
3814
|
-
t && /* @__PURE__ */
|
|
3859
|
+
t && /* @__PURE__ */ P("span", { className: "core-photo-hole-id", children: t }),
|
|
3815
3860
|
/* @__PURE__ */ J("span", { className: "core-photo-zoom-label", children: [
|
|
3816
3861
|
Math.round(l.scale * 100),
|
|
3817
3862
|
"%"
|
|
3818
3863
|
] }),
|
|
3819
|
-
/* @__PURE__ */
|
|
3864
|
+
/* @__PURE__ */ P(
|
|
3820
3865
|
"button",
|
|
3821
3866
|
{
|
|
3822
3867
|
className: "core-photo-zoom-btn",
|
|
@@ -3828,87 +3873,87 @@ function vo({
|
|
|
3828
3873
|
)
|
|
3829
3874
|
] }),
|
|
3830
3875
|
e.length > 0 && /* @__PURE__ */ J("div", { className: "core-photo-col-headers", children: [
|
|
3831
|
-
/* @__PURE__ */
|
|
3832
|
-
|
|
3876
|
+
/* @__PURE__ */ P("div", { className: "core-photo-ruler-spacer" }),
|
|
3877
|
+
y.map((v) => /* @__PURE__ */ P(
|
|
3833
3878
|
"div",
|
|
3834
3879
|
{
|
|
3835
3880
|
className: "core-photo-set-header",
|
|
3836
|
-
style: { width:
|
|
3881
|
+
style: { width: x },
|
|
3837
3882
|
children: v
|
|
3838
3883
|
},
|
|
3839
3884
|
v
|
|
3840
3885
|
))
|
|
3841
3886
|
] }),
|
|
3842
|
-
e.length === 0 ? /* @__PURE__ */
|
|
3887
|
+
e.length === 0 ? /* @__PURE__ */ P("div", { className: "core-photo-empty", children: "No photos to display." }) : /* @__PURE__ */ P(
|
|
3843
3888
|
"div",
|
|
3844
3889
|
{
|
|
3845
3890
|
className: `core-photo-scroll${u ? " is-dragging" : ""}`,
|
|
3846
3891
|
ref: f,
|
|
3847
|
-
onMouseDown:
|
|
3892
|
+
onMouseDown: D,
|
|
3848
3893
|
children: /* @__PURE__ */ J(
|
|
3849
3894
|
"div",
|
|
3850
3895
|
{
|
|
3851
3896
|
className: "core-photo-inner",
|
|
3852
3897
|
style: {
|
|
3853
|
-
height:
|
|
3898
|
+
height: M,
|
|
3854
3899
|
transform: `translate(${l.tx}px, ${l.ty}px) scale(${l.scale})`,
|
|
3855
3900
|
transformOrigin: "0 0"
|
|
3856
3901
|
},
|
|
3857
3902
|
children: [
|
|
3858
|
-
/* @__PURE__ */
|
|
3903
|
+
/* @__PURE__ */ P(
|
|
3859
3904
|
"div",
|
|
3860
3905
|
{
|
|
3861
3906
|
className: "core-photo-depth-ruler",
|
|
3862
|
-
style: { height:
|
|
3863
|
-
children:
|
|
3907
|
+
style: { height: M },
|
|
3908
|
+
children: I.map(({ depth: v, label: L }) => /* @__PURE__ */ P(
|
|
3864
3909
|
"div",
|
|
3865
3910
|
{
|
|
3866
3911
|
className: "core-photo-depth-marker",
|
|
3867
3912
|
style: {
|
|
3868
|
-
top: Math.round((v - p) *
|
|
3913
|
+
top: Math.round((v - p) * N)
|
|
3869
3914
|
},
|
|
3870
|
-
children:
|
|
3915
|
+
children: L
|
|
3871
3916
|
},
|
|
3872
3917
|
v
|
|
3873
3918
|
))
|
|
3874
3919
|
}
|
|
3875
3920
|
),
|
|
3876
|
-
|
|
3921
|
+
y.map((v) => /* @__PURE__ */ P(
|
|
3877
3922
|
"div",
|
|
3878
3923
|
{
|
|
3879
3924
|
className: "core-photo-col-body",
|
|
3880
|
-
style: { height:
|
|
3881
|
-
children:
|
|
3882
|
-
const
|
|
3883
|
-
(
|
|
3925
|
+
style: { height: M, width: x },
|
|
3926
|
+
children: g[v].map((L) => {
|
|
3927
|
+
const O = L.from_depth ?? 0, V = L.to_depth ?? O, H = Math.round(
|
|
3928
|
+
(O - p) * N
|
|
3884
3929
|
), A = Math.max(
|
|
3885
3930
|
2,
|
|
3886
|
-
Math.round((V -
|
|
3887
|
-
), E = po(
|
|
3931
|
+
Math.round((V - O) * N)
|
|
3932
|
+
), E = po(L, S);
|
|
3888
3933
|
return /* @__PURE__ */ J(
|
|
3889
3934
|
"div",
|
|
3890
3935
|
{
|
|
3891
3936
|
className: "core-photo-item",
|
|
3892
|
-
style: { top: H, height: A, width:
|
|
3893
|
-
title: `${
|
|
3937
|
+
style: { top: H, height: A, width: x },
|
|
3938
|
+
title: `${O}–${V} m`,
|
|
3894
3939
|
children: [
|
|
3895
|
-
E ? /* @__PURE__ */
|
|
3940
|
+
E ? /* @__PURE__ */ P(
|
|
3896
3941
|
"img",
|
|
3897
3942
|
{
|
|
3898
3943
|
src: E,
|
|
3899
|
-
alt: `Core ${
|
|
3944
|
+
alt: `Core ${O}–${V} m`,
|
|
3900
3945
|
loading: "lazy"
|
|
3901
3946
|
}
|
|
3902
|
-
) : /* @__PURE__ */
|
|
3947
|
+
) : /* @__PURE__ */ P("div", { className: "core-photo-no-image" }),
|
|
3903
3948
|
A >= 18 && /* @__PURE__ */ J("span", { className: "core-photo-item-label", children: [
|
|
3904
|
-
|
|
3949
|
+
O,
|
|
3905
3950
|
"–",
|
|
3906
3951
|
V,
|
|
3907
3952
|
" m"
|
|
3908
3953
|
] })
|
|
3909
3954
|
]
|
|
3910
3955
|
},
|
|
3911
|
-
`${
|
|
3956
|
+
`${L.hole_id ?? ""}-${O}-${V}-${v}`
|
|
3912
3957
|
);
|
|
3913
3958
|
})
|
|
3914
3959
|
},
|
|
@@ -3921,7 +3966,7 @@ function vo({
|
|
|
3921
3966
|
)
|
|
3922
3967
|
] });
|
|
3923
3968
|
}
|
|
3924
|
-
function
|
|
3969
|
+
function wi({
|
|
3925
3970
|
holeId: e = "",
|
|
3926
3971
|
trays: t = [],
|
|
3927
3972
|
thumbBaseUrl: n = "",
|
|
@@ -3936,7 +3981,7 @@ function Fi({
|
|
|
3936
3981
|
() => No(e, t, n, r, o, i),
|
|
3937
3982
|
[e, t, n, r, o, i]
|
|
3938
3983
|
);
|
|
3939
|
-
return /* @__PURE__ */
|
|
3984
|
+
return /* @__PURE__ */ P(
|
|
3940
3985
|
vo,
|
|
3941
3986
|
{
|
|
3942
3987
|
photos: a,
|
|
@@ -3947,7 +3992,7 @@ function Fi({
|
|
|
3947
3992
|
}
|
|
3948
3993
|
);
|
|
3949
3994
|
}
|
|
3950
|
-
function
|
|
3995
|
+
function Ti(e) {
|
|
3951
3996
|
const t = typeof e == "string" ? JSON.parse(e) : e;
|
|
3952
3997
|
if (t.schema_version !== "1.0")
|
|
3953
3998
|
throw new Error(
|
|
@@ -3976,31 +4021,31 @@ function wi(e) {
|
|
|
3976
4021
|
};
|
|
3977
4022
|
}
|
|
3978
4023
|
function Eo(e) {
|
|
3979
|
-
const t = new
|
|
4024
|
+
const t = new _.BufferGeometry(), n = new Float32Array(e.vertices.length * 3);
|
|
3980
4025
|
e.vertices.forEach(([o, i, s], l) => {
|
|
3981
4026
|
n[l * 3] = o, n[l * 3 + 1] = i, n[l * 3 + 2] = s;
|
|
3982
|
-
}), t.setAttribute("position", new
|
|
4027
|
+
}), t.setAttribute("position", new _.BufferAttribute(n, 3));
|
|
3983
4028
|
const r = new Uint32Array(e.triangles.length * 3);
|
|
3984
4029
|
return e.triangles.forEach(([o, i, s], l) => {
|
|
3985
4030
|
r[l * 3] = o, r[l * 3 + 1] = i, r[l * 3 + 2] = s;
|
|
3986
|
-
}), t.setIndex(new
|
|
4031
|
+
}), t.setIndex(new _.BufferAttribute(r, 1)), t;
|
|
3987
4032
|
}
|
|
3988
|
-
function
|
|
3989
|
-
const { defaultOpacity: r = 1 } = n, o = new
|
|
4033
|
+
function $i(e, t, n = {}) {
|
|
4034
|
+
const { defaultOpacity: r = 1 } = n, o = new _.Group();
|
|
3990
4035
|
return t.blocks.forEach((i) => {
|
|
3991
|
-
var
|
|
3992
|
-
const s = Eo(i), l = ((
|
|
3993
|
-
color: new
|
|
4036
|
+
var g, y;
|
|
4037
|
+
const s = Eo(i), l = ((g = i.material) == null ? void 0 : g.color) ?? "#888888", c = ((y = i.material) == null ? void 0 : y.opacity) ?? r, a = c < 1, u = new _.MeshStandardMaterial({
|
|
4038
|
+
color: new _.Color(l),
|
|
3994
4039
|
opacity: c,
|
|
3995
4040
|
transparent: a,
|
|
3996
|
-
side:
|
|
4041
|
+
side: _.DoubleSide,
|
|
3997
4042
|
flatShading: !0
|
|
3998
|
-
}), m = new
|
|
4043
|
+
}), m = new _.Mesh(s, u);
|
|
3999
4044
|
m.userData = {
|
|
4000
4045
|
id: i.id,
|
|
4001
4046
|
attributes: i.attributes
|
|
4002
4047
|
};
|
|
4003
|
-
const d = new
|
|
4048
|
+
const d = new _.EdgesGeometry(s, 15), f = new _.LineBasicMaterial({ color: "#ffffbb", linewidth: 1 }), h = new _.LineSegments(d, f);
|
|
4004
4049
|
h.visible = !1, m.add(h), o.add(m);
|
|
4005
4050
|
}), e.add(o), o;
|
|
4006
4051
|
}
|
|
@@ -4009,30 +4054,30 @@ export {
|
|
|
4009
4054
|
hn as ASSAY_NON_VALUE_FIELDS,
|
|
4010
4055
|
X as AZIMUTH,
|
|
4011
4056
|
qn as BASELODE_COLORWAY,
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4057
|
+
T as BASELODE_DARK,
|
|
4058
|
+
Ni as BASELODE_DARK_TEMPLATE,
|
|
4059
|
+
_i as BASELODE_DARK_TEMPLATE_NAME,
|
|
4015
4060
|
To as BASELODE_DATA_MODEL_DRILL_ASSAY,
|
|
4016
4061
|
Fo as BASELODE_DATA_MODEL_DRILL_COLLAR,
|
|
4017
4062
|
mn as BASELODE_DATA_MODEL_DRILL_GEOLOGY,
|
|
4018
4063
|
wo as BASELODE_DATA_MODEL_DRILL_SURVEY,
|
|
4019
4064
|
$o as BASELODE_DATA_MODEL_STRUCTURAL_POINT,
|
|
4020
|
-
|
|
4065
|
+
B as BASELODE_LIGHT,
|
|
4021
4066
|
yi as BASELODE_LIGHT_TEMPLATE,
|
|
4022
|
-
|
|
4067
|
+
gi as BASELODE_LIGHT_TEMPLATE_NAME,
|
|
4023
4068
|
Oe as BASELODE_TEMPLATE,
|
|
4024
4069
|
Xn as BASELODE_TEMPLATE_NAME,
|
|
4025
4070
|
Wt as BASE_PIXELS_PER_METRE,
|
|
4026
4071
|
Xe as BUILTIN_COLOUR_MAPS,
|
|
4027
|
-
|
|
4072
|
+
Li as Baselode3DControls,
|
|
4028
4073
|
Di as Baselode3DScene,
|
|
4029
|
-
|
|
4074
|
+
Pi as BlockModelWidget,
|
|
4030
4075
|
at as CHART_OPTIONS,
|
|
4031
4076
|
zn as COMMENT_COLUMN_NAMES,
|
|
4032
|
-
|
|
4077
|
+
Be as COMMODITY_COLOURS,
|
|
4033
4078
|
Et as CRS,
|
|
4034
4079
|
vo as CorePhotoTable,
|
|
4035
|
-
|
|
4080
|
+
wi as CorePhotoViewer,
|
|
4036
4081
|
fn as DEFAULT_COLUMN_MAP,
|
|
4037
4082
|
ho as DEFAULT_LOD_BREAKPOINTS,
|
|
4038
4083
|
W as DEPTH,
|
|
@@ -4048,11 +4093,11 @@ export {
|
|
|
4048
4093
|
Zn as FALLBACK_COLOUR,
|
|
4049
4094
|
jr as FOV_MAX_DEG,
|
|
4050
4095
|
Hr as FOV_MIN_DEG,
|
|
4051
|
-
|
|
4096
|
+
F as FROM,
|
|
4052
4097
|
ae as GEOLOGY_CODE,
|
|
4053
4098
|
ce as GEOLOGY_DESCRIPTION,
|
|
4054
4099
|
ct as HIDDEN_COLUMNS,
|
|
4055
|
-
|
|
4100
|
+
k as HOLE_ID,
|
|
4056
4101
|
oe as LATITUDE,
|
|
4057
4102
|
Wn as LITHOLOGY_COLOURS,
|
|
4058
4103
|
ie as LONGITUDE,
|
|
@@ -4062,25 +4107,25 @@ export {
|
|
|
4062
4107
|
er as NUMERIC_MARKER_COLOR,
|
|
4063
4108
|
me as PROJECT_ID,
|
|
4064
4109
|
dn as STRIKE,
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4110
|
+
$ as TO,
|
|
4111
|
+
Ei as TracePlot,
|
|
4112
|
+
$i as addGradeBlocksToScene,
|
|
4068
4113
|
Ir as addRasterOverlay,
|
|
4069
4114
|
Un as alphaBetaToNormal,
|
|
4070
|
-
|
|
4115
|
+
Ci as annotationsFromIntervals,
|
|
4071
4116
|
li as assembleDataset,
|
|
4072
4117
|
Jo as attachAssayPositions,
|
|
4073
4118
|
Wo as balancedTangentialDesurvey,
|
|
4074
4119
|
kn as buildAssayState,
|
|
4075
|
-
|
|
4120
|
+
Mi as buildCategoricalStripLogConfig,
|
|
4076
4121
|
ur as buildCommentsConfig,
|
|
4077
|
-
|
|
4122
|
+
yo as buildDepthMarkers,
|
|
4078
4123
|
hr as buildEqualRangeColorScale,
|
|
4079
4124
|
ir as buildIntervalPoints,
|
|
4080
4125
|
Tt as buildPlotConfig,
|
|
4081
|
-
|
|
4126
|
+
vi as buildStrikeDipSymbol,
|
|
4082
4127
|
zr as buildStructuralDiscs,
|
|
4083
|
-
|
|
4128
|
+
zi as buildStructuralStripConfig,
|
|
4084
4129
|
cr as buildTadpoleConfig,
|
|
4085
4130
|
Ko as buildTraces,
|
|
4086
4131
|
No as buildTrayPhotos,
|
|
@@ -4091,15 +4136,15 @@ export {
|
|
|
4091
4136
|
Pr as clearRasterOverlays,
|
|
4092
4137
|
si as coerceNumeric,
|
|
4093
4138
|
Yn as computeStructuralPositions,
|
|
4094
|
-
|
|
4139
|
+
Si as createRasterOverlay,
|
|
4095
4140
|
Uo as defaultChartType,
|
|
4096
4141
|
Kt as defaultTrayFilename,
|
|
4097
|
-
|
|
4142
|
+
Fi as depthIntervalToPixels,
|
|
4098
4143
|
_o as depthMarkerInterval,
|
|
4099
|
-
|
|
4144
|
+
Re as deriveAssayProps,
|
|
4100
4145
|
qo as desurveyTraces,
|
|
4101
4146
|
Mr as dipAzimuthToNormal,
|
|
4102
|
-
|
|
4147
|
+
Br as dolly,
|
|
4103
4148
|
wr as emitViewChangeIfNeeded,
|
|
4104
4149
|
Tn as filterBlocks,
|
|
4105
4150
|
ii as filterByProject,
|
|
@@ -4112,14 +4157,14 @@ export {
|
|
|
4112
4157
|
Kn as getColour,
|
|
4113
4158
|
Vt as getEqualRangeBinIndex,
|
|
4114
4159
|
br as getEqualRangeColor,
|
|
4115
|
-
|
|
4160
|
+
Dr as getRasterOverlay,
|
|
4116
4161
|
Ut as getViewState,
|
|
4117
4162
|
Eo as gradeBlockToThreeGeometry,
|
|
4118
|
-
|
|
4119
|
-
|
|
4163
|
+
go as groupPhotosBySet,
|
|
4164
|
+
Bn as groupRowsByHole,
|
|
4120
4165
|
or as holeHasData,
|
|
4121
4166
|
Gn as interpolateTrace,
|
|
4122
|
-
|
|
4167
|
+
Oi as intervalsAsTubes,
|
|
4123
4168
|
oi as joinAssaysToTraces,
|
|
4124
4169
|
Lr as listRasterOverlays,
|
|
4125
4170
|
Yo as loadAssayFile,
|
|
@@ -4129,22 +4174,22 @@ export {
|
|
|
4129
4174
|
ci as loadBlockModelMetadata,
|
|
4130
4175
|
ei as loadCollars,
|
|
4131
4176
|
ri as loadGeology,
|
|
4132
|
-
|
|
4177
|
+
Ti as loadGradeBlocksFromJson,
|
|
4133
4178
|
ti as loadSurveys,
|
|
4134
4179
|
je as loadTable,
|
|
4135
4180
|
Vo as logDataInfo,
|
|
4136
|
-
|
|
4181
|
+
Bo as logDataWarning,
|
|
4137
4182
|
$r as lookDown,
|
|
4138
4183
|
On as minimumCurvatureDesurvey,
|
|
4139
4184
|
Fn as normalizeBlockRow,
|
|
4140
4185
|
kr as normalizeBounds,
|
|
4141
4186
|
jo as normalizeCsvRow,
|
|
4142
4187
|
we as normalizeFieldName,
|
|
4143
|
-
|
|
4188
|
+
Rr as pan,
|
|
4144
4189
|
Hn as parseAssayCsvTextToHoles,
|
|
4145
4190
|
_n as parseAssayHole,
|
|
4146
4191
|
Ho as parseAssayHoleIds,
|
|
4147
|
-
|
|
4192
|
+
yn as parseAssayHoleIdsWithAssays,
|
|
4148
4193
|
Nn as parseAssaysCSV,
|
|
4149
4194
|
ai as parseBlockModelCSV,
|
|
4150
4195
|
Qo as parseDrillholesCSV,
|
|
@@ -4155,28 +4200,29 @@ export {
|
|
|
4155
4200
|
Xo as parseSurveyCSV,
|
|
4156
4201
|
pi as parseUnifiedDataset,
|
|
4157
4202
|
Go as pickFirstPresent,
|
|
4158
|
-
|
|
4159
|
-
|
|
4203
|
+
ki as planView,
|
|
4204
|
+
gr as projectTraceToSection,
|
|
4160
4205
|
Tr as recenterCameraToOrigin,
|
|
4161
4206
|
it as removeRasterOverlay,
|
|
4162
4207
|
Ct as reorderHoleIds,
|
|
4163
4208
|
Jn as resolveColourMap,
|
|
4164
|
-
|
|
4165
|
-
|
|
4209
|
+
Ai as sectionView,
|
|
4210
|
+
yr as sectionWindow,
|
|
4166
4211
|
po as selectPhotoLodUrl,
|
|
4167
4212
|
Ur as setControlMode,
|
|
4168
4213
|
Gr as setFov,
|
|
4169
|
-
|
|
4214
|
+
Sr as setRasterOverlayElevation,
|
|
4170
4215
|
Or as setRasterOverlayOpacity,
|
|
4171
4216
|
Cr as setRasterOverlayVisibility,
|
|
4172
4217
|
Fr as setViewState,
|
|
4218
|
+
bi as significantIntercepts,
|
|
4173
4219
|
bo as sortPhotosByDepth,
|
|
4174
|
-
|
|
4175
|
-
|
|
4220
|
+
ge as standardizeColumns,
|
|
4221
|
+
Ro as standardizeRowArray,
|
|
4176
4222
|
Zo as tangentialDesurvey,
|
|
4177
4223
|
pn as toError,
|
|
4178
|
-
|
|
4179
|
-
|
|
4224
|
+
Ii as tracesAsSegments,
|
|
4225
|
+
xi as useDrillholeTraceGrid,
|
|
4180
4226
|
mi as validateStructuralPoints,
|
|
4181
4227
|
Y as withDataErrorContext
|
|
4182
4228
|
};
|