baselode 0.1.13 → 0.1.14
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 +1467 -1175
- package/dist/baselode.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/baselode.js
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
6
|
-
import { OrbitControls as
|
|
7
|
-
import { FlyControls as
|
|
8
|
-
import { ViewportGizmo as
|
|
9
|
-
import { EffectComposer as
|
|
10
|
-
import { RenderPass as
|
|
11
|
-
import { OutlinePass as
|
|
12
|
-
const
|
|
1
|
+
import te from "papaparse";
|
|
2
|
+
import { jsx as S, jsxs as J } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as Le, useState as Q, useEffect as se, useMemo as ne, useCallback as Ue } from "react";
|
|
4
|
+
import Fe from "plotly.js-dist-min";
|
|
5
|
+
import * as _ from "three";
|
|
6
|
+
import { OrbitControls as rn } from "three/examples/jsm/controls/OrbitControls";
|
|
7
|
+
import { FlyControls as on } from "three/examples/jsm/controls/FlyControls";
|
|
8
|
+
import { ViewportGizmo as sn } from "three-viewport-gizmo";
|
|
9
|
+
import { EffectComposer as ln } from "three/examples/jsm/postprocessing/EffectComposer.js";
|
|
10
|
+
import { RenderPass as an } from "three/examples/jsm/postprocessing/RenderPass.js";
|
|
11
|
+
import { OutlinePass as cn } from "three/examples/jsm/postprocessing/OutlinePass.js";
|
|
12
|
+
const A = "hole_id", oe = "latitude", ie = "longitude", Ae = "elevation", q = "azimuth", X = "dip", L = "from", w = "to", Ie = "mid", me = "project_id", pe = "easting", be = "northing", Et = "crs", W = "depth", kt = "alpha", At = "beta", un = "strike", ae = "geology_code", ce = "geology_description", ko = {
|
|
13
13
|
// A unique hole identifier across the entire dataset and all future data sets
|
|
14
|
-
[
|
|
14
|
+
[A]: "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
|
|
18
|
-
[
|
|
18
|
+
[me]: "string",
|
|
19
19
|
// The latitude of the collar, in decimal degrees (WGS84)
|
|
20
|
-
[re]: "number",
|
|
21
|
-
// The longitude of the collar, in decimal degrees (WGS84)
|
|
22
20
|
[oe]: "number",
|
|
21
|
+
// The longitude of the collar, in decimal degrees (WGS84)
|
|
22
|
+
[ie]: "number",
|
|
23
23
|
// The elevation of the collar, in meters above sea level (WGS84)
|
|
24
|
-
[
|
|
24
|
+
[Ae]: "number",
|
|
25
25
|
// The easting coordinate of the collar, in meters (projected CRS)
|
|
26
|
-
[he]: "number",
|
|
27
|
-
// The northing coordinate of the collar, in meters (projected CRS)
|
|
28
26
|
[pe]: "number",
|
|
27
|
+
// The northing coordinate of the collar, in meters (projected CRS)
|
|
28
|
+
[be]: "number",
|
|
29
29
|
// The coordinate reference system of the collar coordinates for easting/northing, as an EPSG code or proj string
|
|
30
|
-
[
|
|
31
|
-
},
|
|
30
|
+
[Et]: "string"
|
|
31
|
+
}, Ao = {
|
|
32
32
|
// The unique hole id that maps to the collar and any other data tables
|
|
33
|
-
[
|
|
33
|
+
[A]: "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
|
+
[w]: "number",
|
|
38
38
|
// The azimuth of the hole at the survey depth, in degrees from north
|
|
39
|
-
[
|
|
39
|
+
[q]: "number",
|
|
40
40
|
// The dip of the hole at the survey depth, in degrees from horizontal (negative values indicate downward inclination)
|
|
41
|
-
[
|
|
42
|
-
},
|
|
41
|
+
[X]: "number"
|
|
42
|
+
}, xo = {
|
|
43
43
|
// The unique hole id that maps to the collar and any other data tables
|
|
44
|
-
[
|
|
44
|
+
[A]: "string",
|
|
45
45
|
// The depth along the hole where the assay interval starts
|
|
46
|
-
[
|
|
46
|
+
[L]: "number",
|
|
47
47
|
// The depth along the hole where the assay interval ends
|
|
48
|
-
[
|
|
48
|
+
[w]: "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
|
-
},
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
53
|
+
}, dn = {
|
|
54
|
+
[A]: "string",
|
|
55
|
+
[L]: "number",
|
|
56
|
+
[w]: "number",
|
|
57
57
|
[Ie]: "number",
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
},
|
|
61
|
-
[
|
|
58
|
+
[ae]: "string",
|
|
59
|
+
[ce]: "string"
|
|
60
|
+
}, vo = {
|
|
61
|
+
[A]: "string",
|
|
62
62
|
[W]: "number",
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
63
|
+
[X]: "number",
|
|
64
|
+
[q]: "number",
|
|
65
|
+
[kt]: "number",
|
|
66
|
+
[At]: "number",
|
|
67
67
|
comments: "string"
|
|
68
|
-
},
|
|
69
|
-
[
|
|
68
|
+
}, mn = {
|
|
69
|
+
[A]: ["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
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
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
|
+
[oe]: ["latitude", "lat"],
|
|
73
|
+
[ie]: ["longitude", "lon"],
|
|
74
|
+
[Ae]: ["elevation", "rl", "elev", "z"],
|
|
75
|
+
[pe]: ["easting", "x"],
|
|
76
|
+
[be]: ["northing", "y"],
|
|
77
|
+
[Et]: ["crs", "epsg", "projection"],
|
|
78
|
+
[L]: ["from", "depth_from", "from_depth", "samp_from", "sample_from", "sampfrom", "fromdepth"],
|
|
79
|
+
[w]: ["to", "depth_to", "to_depth", "samp_to", "sample_to", "sampto", "todepth"],
|
|
80
|
+
[ae]: [
|
|
81
81
|
"geology_code",
|
|
82
82
|
"geologycode",
|
|
83
83
|
"lith1",
|
|
@@ -87,7 +87,7 @@ const z = "hole_id", re = "latitude", oe = "longitude", ke = "elevation", G = "a
|
|
|
87
87
|
"plot_lithology",
|
|
88
88
|
"rock1"
|
|
89
89
|
],
|
|
90
|
-
[
|
|
90
|
+
[ce]: [
|
|
91
91
|
"geology_description",
|
|
92
92
|
"geologydescription",
|
|
93
93
|
"geology_comment",
|
|
@@ -98,42 +98,42 @@ const z = "hole_id", re = "latitude", oe = "longitude", ke = "elevation", G = "a
|
|
|
98
98
|
"description",
|
|
99
99
|
"comments"
|
|
100
100
|
],
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
[
|
|
104
|
-
[
|
|
101
|
+
[q]: ["azimuth", "az", "dip_direction", "dipdir", "dip direction", "dipdrn", "dipdirection", "dip_dir", "computed_plane_azimuth", "calc_dipdir", "calc_dipdir_deg", "dipdir_calc", "dipdirect_calc"],
|
|
102
|
+
[X]: ["dip", "computed_plane_dip", "calc_dip", "calc_dip_deg", "dip_calc"],
|
|
103
|
+
[kt]: ["alpha", "alpha_angle", "alpha_angle_deg", "alpha_2"],
|
|
104
|
+
[At]: ["beta", "beta_angle", "beta_angle_deg", "beta_2"],
|
|
105
105
|
declination: ["declination", "dec"],
|
|
106
106
|
[W]: ["depth", "survey_depth", "surveydepth"],
|
|
107
|
-
[
|
|
108
|
-
},
|
|
109
|
-
for (const [e, t] of Object.entries(
|
|
107
|
+
[un]: ["strike", "str"]
|
|
108
|
+
}, xt = {};
|
|
109
|
+
for (const [e, t] of Object.entries(mn))
|
|
110
110
|
for (const n of t) {
|
|
111
111
|
const r = n.toLowerCase().trim();
|
|
112
|
-
|
|
112
|
+
xt[r] = e;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Te(e) {
|
|
115
115
|
return (e || "").toString().trim().toLowerCase().replace(/\s+/g, "_");
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
const r = { ...
|
|
117
|
+
function ge(e, t = null, n = null) {
|
|
118
|
+
const r = { ...xt };
|
|
119
119
|
if (n) {
|
|
120
120
|
for (const [i, s] of Object.entries(n))
|
|
121
121
|
if (i != null && s != null) {
|
|
122
|
-
const l =
|
|
122
|
+
const l = Te(i), u = Te(s);
|
|
123
123
|
r[l] = u;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
const o = {};
|
|
127
127
|
for (const [i, s] of Object.entries(e)) {
|
|
128
|
-
const l =
|
|
128
|
+
const l = Te(i), u = r[l] || l;
|
|
129
129
|
o[u] = s;
|
|
130
130
|
}
|
|
131
131
|
return o;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
return e.map((r) =>
|
|
133
|
+
function Io(e, t = null, n = null) {
|
|
134
|
+
return e.map((r) => ge(r, t, n));
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const fn = /* @__PURE__ */ new Set([
|
|
137
137
|
"hole_id",
|
|
138
138
|
"holeid",
|
|
139
139
|
"id",
|
|
@@ -165,34 +165,34 @@ const an = /* @__PURE__ */ new Set([
|
|
|
165
165
|
"todepth",
|
|
166
166
|
"comment",
|
|
167
167
|
"z"
|
|
168
|
-
]),
|
|
169
|
-
function
|
|
168
|
+
]), Ke = "[baselode:data]";
|
|
169
|
+
function hn(e, t = "Unknown error") {
|
|
170
170
|
if (e instanceof Error) return e;
|
|
171
171
|
const n = typeof e == "string" && e.trim() ? e : t;
|
|
172
172
|
return new Error(n);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
const r =
|
|
174
|
+
function Y(e, t, n = "Operation failed") {
|
|
175
|
+
const r = hn(t, n), o = new Error(`${e}: ${r.message}`);
|
|
176
176
|
return o.cause = r, o;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function Co(e, t) {
|
|
179
179
|
if (t !== void 0) {
|
|
180
|
-
console.warn(`${
|
|
180
|
+
console.warn(`${Ke} ${e}`, t);
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
|
-
console.warn(`${
|
|
183
|
+
console.warn(`${Ke} ${e}`);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
console.info(`${
|
|
185
|
+
function Do(e) {
|
|
186
|
+
console.info(`${Ke} ${e}`);
|
|
187
187
|
}
|
|
188
|
-
const
|
|
189
|
-
function
|
|
190
|
-
return { holeId: e[
|
|
188
|
+
const Re = (e, t = null) => ge(e, null, t);
|
|
189
|
+
function pn(e) {
|
|
190
|
+
return { holeId: e[A] };
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
const n = e[
|
|
192
|
+
function vt(e, t = null) {
|
|
193
|
+
const n = e[A], r = n !== void 0 ? `${n}`.trim() : "";
|
|
194
194
|
if (!r) return null;
|
|
195
|
-
const o = e[
|
|
195
|
+
const o = e[me] || e.project || e.project_code, i = Number(e[L]), s = Number(e[w]);
|
|
196
196
|
return !Number.isFinite(i) || !Number.isFinite(s) || s <= i ? null : {
|
|
197
197
|
holeId: r,
|
|
198
198
|
project: o,
|
|
@@ -201,7 +201,7 @@ function kt(e, t = null) {
|
|
|
201
201
|
...e
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function It(e, t) {
|
|
205
205
|
var o;
|
|
206
206
|
const n = t.sort((i, s) => i.from - s.from), r = [];
|
|
207
207
|
return n.forEach((i) => {
|
|
@@ -209,43 +209,43 @@ function At(e, t) {
|
|
|
209
209
|
z: s,
|
|
210
210
|
from: s,
|
|
211
211
|
to: l,
|
|
212
|
-
[
|
|
213
|
-
[
|
|
212
|
+
[A]: e,
|
|
213
|
+
[me]: u,
|
|
214
214
|
...a
|
|
215
215
|
};
|
|
216
216
|
r.push(c), r.push({ ...c, z: l });
|
|
217
217
|
}), { id: e, project: (o = n[0]) == null ? void 0 : o.project, points: r };
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function So(e, t = null) {
|
|
220
220
|
return new Promise((n, r) => {
|
|
221
221
|
const o = /* @__PURE__ */ new Set();
|
|
222
|
-
|
|
222
|
+
te.parse(e, {
|
|
223
223
|
header: !0,
|
|
224
224
|
dynamicTyping: !0,
|
|
225
225
|
skipEmptyLines: !0,
|
|
226
226
|
step: (i) => {
|
|
227
|
-
const l =
|
|
227
|
+
const l = Re(i.data, t)[A];
|
|
228
228
|
l !== void 0 && `${l}`.trim() !== "" && o.add(`${l}`.trim());
|
|
229
229
|
},
|
|
230
230
|
complete: () => n(Array.from(o)),
|
|
231
|
-
error: (i) => r(
|
|
231
|
+
error: (i) => r(Y("parseAssayHoleIds", i))
|
|
232
232
|
});
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
return Object.entries(e || {}).some(([t, n]) => !(
|
|
235
|
+
function bn(e) {
|
|
236
|
+
return Object.entries(e || {}).some(([t, n]) => !(fn.has(t) || n == null || typeof n == "string" && n.trim() === ""));
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function gn(e, t = null) {
|
|
239
239
|
return new Promise((n, r) => {
|
|
240
240
|
const o = /* @__PURE__ */ new Map();
|
|
241
|
-
|
|
241
|
+
te.parse(e, {
|
|
242
242
|
header: !0,
|
|
243
243
|
dynamicTyping: !0,
|
|
244
244
|
skipEmptyLines: !0,
|
|
245
245
|
step: (i) => {
|
|
246
|
-
const s =
|
|
247
|
-
if (!
|
|
248
|
-
const u =
|
|
246
|
+
const s = Re(i.data, t);
|
|
247
|
+
if (!bn(s)) return;
|
|
248
|
+
const u = pn(s).holeId;
|
|
249
249
|
if (u !== void 0 && `${u}`.trim() !== "") {
|
|
250
250
|
const a = `${u}`.trim();
|
|
251
251
|
o.has(a) || o.set(a, {
|
|
@@ -254,24 +254,24 @@ function mn(e, t = null) {
|
|
|
254
254
|
}
|
|
255
255
|
},
|
|
256
256
|
complete: () => n(Array.from(o.values())),
|
|
257
|
-
error: (i) => r(
|
|
257
|
+
error: (i) => r(Y("parseAssayHoleIdsWithAssays", i))
|
|
258
258
|
});
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function yn(e, t, n = null, r = null) {
|
|
262
262
|
return new Promise((o, i) => {
|
|
263
263
|
const s = `${t}`.trim();
|
|
264
264
|
if (!s) {
|
|
265
|
-
i(
|
|
265
|
+
i(Y("parseAssayHole", new Error("Missing hole id")));
|
|
266
266
|
return;
|
|
267
267
|
}
|
|
268
268
|
const l = [];
|
|
269
|
-
|
|
269
|
+
te.parse(e, {
|
|
270
270
|
header: !0,
|
|
271
271
|
dynamicTyping: !0,
|
|
272
272
|
skipEmptyLines: !0,
|
|
273
273
|
step: (u) => {
|
|
274
|
-
const a =
|
|
274
|
+
const a = Re(u.data, r), c = vt(a, r);
|
|
275
275
|
c && `${c.holeId}`.trim() === s && l.push(c);
|
|
276
276
|
},
|
|
277
277
|
complete: () => {
|
|
@@ -279,39 +279,39 @@ function fn(e, t, n = null, r = null) {
|
|
|
279
279
|
o(null);
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
|
-
const u =
|
|
282
|
+
const u = It(s, l);
|
|
283
283
|
o(u);
|
|
284
284
|
},
|
|
285
|
-
error: (u) => i(
|
|
285
|
+
error: (u) => i(Y("parseAssayHole", u))
|
|
286
286
|
});
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function _n(e, t = null, n = null) {
|
|
290
290
|
return new Promise((r, o) => {
|
|
291
|
-
|
|
291
|
+
te.parse(e, {
|
|
292
292
|
header: !0,
|
|
293
293
|
dynamicTyping: !0,
|
|
294
294
|
skipEmptyLines: !0,
|
|
295
295
|
complete: (i) => {
|
|
296
296
|
const s = /* @__PURE__ */ new Map();
|
|
297
297
|
i.data.forEach((u) => {
|
|
298
|
-
const a =
|
|
298
|
+
const a = Re(u, n), c = vt(a, n);
|
|
299
299
|
c && (s.has(c.holeId) || s.set(c.holeId, []), s.get(c.holeId).push(c));
|
|
300
300
|
});
|
|
301
|
-
const l = Array.from(s.entries()).map(([u, a]) =>
|
|
301
|
+
const l = Array.from(s.entries()).map(([u, a]) => It(u, a));
|
|
302
302
|
r({ holes: l });
|
|
303
303
|
},
|
|
304
|
-
error: (i) => o(
|
|
304
|
+
error: (i) => o(Y("parseAssaysCSV", i))
|
|
305
305
|
});
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function Lo(e = {}) {
|
|
309
309
|
const t = {};
|
|
310
310
|
return Object.entries(e || {}).forEach(([n, r]) => {
|
|
311
|
-
n && (t[
|
|
311
|
+
n && (t[Te(n)] = r);
|
|
312
312
|
}), t;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function Oo(e = {}, t = [], n) {
|
|
315
315
|
for (const r of t) {
|
|
316
316
|
const o = e[r];
|
|
317
317
|
if (o != null && `${o}`.trim() !== "")
|
|
@@ -319,8 +319,8 @@ function yo(e = {}, t = [], n) {
|
|
|
319
319
|
}
|
|
320
320
|
return n;
|
|
321
321
|
}
|
|
322
|
-
const
|
|
323
|
-
function
|
|
322
|
+
const Nn = 4;
|
|
323
|
+
function Ct(e = [], t = "") {
|
|
324
324
|
if (!e.length) return [];
|
|
325
325
|
if (!t) return e;
|
|
326
326
|
const n = e.findIndex((i) => i === t);
|
|
@@ -328,7 +328,7 @@ function xt(e = [], t = "") {
|
|
|
328
328
|
const r = e[n], o = e.filter((i, s) => s !== n);
|
|
329
329
|
return [r, ...o];
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function we({
|
|
332
332
|
property: e = "",
|
|
333
333
|
chartType: t = "",
|
|
334
334
|
categoricalProps: n = [],
|
|
@@ -337,18 +337,18 @@ function Pe({
|
|
|
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 Dt({
|
|
341
341
|
holeIds: e = [],
|
|
342
342
|
focusedHoleId: t = "",
|
|
343
|
-
plotCount: n =
|
|
343
|
+
plotCount: n = Nn,
|
|
344
344
|
defaultProp: r = "",
|
|
345
345
|
categoricalProps: o = [],
|
|
346
346
|
commentProps: i = [],
|
|
347
347
|
numericDefaultChartType: s = "markers+line"
|
|
348
348
|
} = {}) {
|
|
349
|
-
const l =
|
|
349
|
+
const l = Ct(e, t);
|
|
350
350
|
return Array.from({ length: n }).map((u, a) => {
|
|
351
|
-
const c = l[a] || e[a] || "", m =
|
|
351
|
+
const c = l[a] || e[a] || "", m = we({
|
|
352
352
|
property: r,
|
|
353
353
|
chartType: "",
|
|
354
354
|
categoricalProps: o,
|
|
@@ -362,24 +362,24 @@ function It({
|
|
|
362
362
|
};
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
-
const
|
|
366
|
-
[
|
|
365
|
+
const ve = "numeric", Oe = "categorical", xe = "comment", $e = "hidden", Je = "tadpole", lt = {
|
|
366
|
+
[ve]: [
|
|
367
367
|
{ value: "bar", label: "Bars" },
|
|
368
368
|
{ value: "markers", label: "Markers" },
|
|
369
369
|
{ value: "markers+line", label: "Markers + Line" },
|
|
370
370
|
{ value: "line", label: "Line only" }
|
|
371
371
|
],
|
|
372
|
-
[
|
|
372
|
+
[Oe]: [
|
|
373
373
|
{ value: "categorical", label: "Categorical bands" }
|
|
374
374
|
],
|
|
375
|
-
[
|
|
375
|
+
[xe]: [
|
|
376
376
|
{ value: "comment", label: "Comments" }
|
|
377
377
|
],
|
|
378
|
-
[
|
|
378
|
+
[Je]: [
|
|
379
379
|
{ value: "tadpole", label: "Tadpole" }
|
|
380
380
|
],
|
|
381
|
-
[
|
|
382
|
-
},
|
|
381
|
+
[$e]: []
|
|
382
|
+
}, at = /* @__PURE__ */ new Set([
|
|
383
383
|
// Hole identifiers
|
|
384
384
|
"hole_id",
|
|
385
385
|
"holeid",
|
|
@@ -434,7 +434,7 @@ const xe = "numeric", De = "categorical", Ae = "comment", Te = "hidden", We = "t
|
|
|
434
434
|
"data_source",
|
|
435
435
|
"_hole_key",
|
|
436
436
|
"_hole_id_key"
|
|
437
|
-
]),
|
|
437
|
+
]), Mn = /* @__PURE__ */ new Set([
|
|
438
438
|
"comments",
|
|
439
439
|
"comment",
|
|
440
440
|
"notes",
|
|
@@ -447,22 +447,22 @@ const xe = "numeric", De = "categorical", Ae = "comment", Te = "hidden", We = "t
|
|
|
447
447
|
"structcomment",
|
|
448
448
|
"geology_description"
|
|
449
449
|
]);
|
|
450
|
-
function
|
|
450
|
+
function zn(e) {
|
|
451
451
|
if (!(e != null && e.length))
|
|
452
452
|
return { byType: {}, numericCols: [], categoricalCols: [], commentCols: [] };
|
|
453
453
|
const t = new Set(e.flatMap((r) => Object.keys(r || {}))), n = {};
|
|
454
454
|
for (const r of t) {
|
|
455
455
|
const o = r.toLowerCase().trim();
|
|
456
|
-
if (
|
|
457
|
-
n[r] =
|
|
456
|
+
if (at.has(o) || at.has(r)) {
|
|
457
|
+
n[r] = $e;
|
|
458
458
|
continue;
|
|
459
459
|
}
|
|
460
|
-
if (
|
|
460
|
+
if (Mn.has(o)) {
|
|
461
461
|
const l = e.some((u) => {
|
|
462
462
|
const a = u[r];
|
|
463
463
|
return a != null && String(a).trim() !== "" && String(a) !== "null";
|
|
464
464
|
});
|
|
465
|
-
n[r] = l ?
|
|
465
|
+
n[r] = l ? xe : $e;
|
|
466
466
|
continue;
|
|
467
467
|
}
|
|
468
468
|
let i = !1, s = !1;
|
|
@@ -473,24 +473,24 @@ function gn(e) {
|
|
|
473
473
|
break;
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
s ? i ? n[r] =
|
|
476
|
+
s ? i ? n[r] = ve : n[r] = Oe : n[r] = $e;
|
|
477
477
|
}
|
|
478
478
|
return {
|
|
479
479
|
byType: n,
|
|
480
|
-
numericCols: Object.entries(n).filter(([, r]) => r ===
|
|
481
|
-
categoricalCols: Object.entries(n).filter(([, r]) => r ===
|
|
482
|
-
commentCols: Object.entries(n).filter(([, r]) => r ===
|
|
480
|
+
numericCols: Object.entries(n).filter(([, r]) => r === ve).map(([r]) => r),
|
|
481
|
+
categoricalCols: Object.entries(n).filter(([, r]) => r === Oe).map(([r]) => r),
|
|
482
|
+
commentCols: Object.entries(n).filter(([, r]) => r === xe).map(([r]) => r)
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
485
|
+
function et(e) {
|
|
486
|
+
return lt[e] ?? lt[ve];
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
const t =
|
|
490
|
-
return t.length ? e ===
|
|
488
|
+
function Po(e) {
|
|
489
|
+
const t = et(e);
|
|
490
|
+
return t.length ? e === ve ? "line" : t[0].value : "markers+line";
|
|
491
491
|
}
|
|
492
|
-
function
|
|
493
|
-
const t = e.flatMap((l) => l.points || []), { numericCols: n, categoricalCols: r, commentCols: o, byType: i } =
|
|
492
|
+
function Be(e = []) {
|
|
493
|
+
const t = e.flatMap((l) => l.points || []), { numericCols: n, categoricalCols: r, commentCols: o, byType: i } = zn(t), s = n[0] || r[0] || "";
|
|
494
494
|
return {
|
|
495
495
|
numericProps: n,
|
|
496
496
|
categoricalProps: r,
|
|
@@ -499,15 +499,15 @@ function we(e = []) {
|
|
|
499
499
|
defaultProp: s
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
|
-
async function
|
|
503
|
-
return await
|
|
502
|
+
async function En(e, t = null) {
|
|
503
|
+
return await gn(e);
|
|
504
504
|
}
|
|
505
|
-
async function
|
|
506
|
-
return await
|
|
505
|
+
async function kn(e, t, n = null) {
|
|
506
|
+
return await yn(e, t);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function An(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 } = Be(e), l = e.map((a) => a.id || a.holeId).filter(Boolean), u = Dt({
|
|
511
511
|
holeIds: l,
|
|
512
512
|
focusedHoleId: t,
|
|
513
513
|
plotCount: 4,
|
|
@@ -526,36 +526,36 @@ function Nn(e = [], t = "") {
|
|
|
526
526
|
traceConfigs: u
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
|
-
async function
|
|
530
|
-
const { holes: r } = await
|
|
529
|
+
async function Fo(e, t = "", n = null) {
|
|
530
|
+
const { holes: r } = await _n(e, n), o = An(r, t);
|
|
531
531
|
if (!o) throw new Error("No valid assay intervals found.");
|
|
532
532
|
return o;
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function To(e, t = null) {
|
|
535
535
|
return new Promise((n, r) => {
|
|
536
|
-
|
|
536
|
+
te.parse(e, {
|
|
537
537
|
header: !0,
|
|
538
538
|
dynamicTyping: !0,
|
|
539
539
|
skipEmptyLines: !0,
|
|
540
540
|
complete: (o) => {
|
|
541
|
-
const i = o.data.map((s) =>
|
|
541
|
+
const i = o.data.map((s) => xn(s, t)).filter((s) => s[A] && Number.isFinite(s[W]) && Number.isFinite(s[X]) && Number.isFinite(s[q]));
|
|
542
542
|
n(i);
|
|
543
543
|
},
|
|
544
|
-
error: (o) => r(
|
|
544
|
+
error: (o) => r(Y("parseSurveyCSV", o))
|
|
545
545
|
});
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
const n =
|
|
548
|
+
function xn(e, t = null) {
|
|
549
|
+
const n = ge(e, null, t), r = n[A], o = n[me] || n.project || n.project_code, i = Ee(n[oe]), s = Ee(n[ie]), l = Ee(n[W]), u = Ee(n[X]), a = Ee(n[q]), c = Ee(n.maxdepth);
|
|
550
550
|
return {
|
|
551
551
|
raw: n,
|
|
552
|
-
[
|
|
553
|
-
[
|
|
554
|
-
[
|
|
555
|
-
[
|
|
552
|
+
[A]: r,
|
|
553
|
+
[me]: o,
|
|
554
|
+
[oe]: i,
|
|
555
|
+
[ie]: s,
|
|
556
556
|
[W]: l,
|
|
557
|
-
[
|
|
558
|
-
[
|
|
557
|
+
[X]: u,
|
|
558
|
+
[q]: a,
|
|
559
559
|
maxdepth: c,
|
|
560
560
|
// Legacy field names for backwards compatibility
|
|
561
561
|
project_code: o,
|
|
@@ -564,22 +564,22 @@ function zn(e, t = null) {
|
|
|
564
564
|
surveydepth: l
|
|
565
565
|
};
|
|
566
566
|
}
|
|
567
|
-
const
|
|
567
|
+
const Ee = (e) => {
|
|
568
568
|
const t = Number(e);
|
|
569
569
|
return Number.isFinite(t) ? t : void 0;
|
|
570
570
|
};
|
|
571
|
-
function
|
|
571
|
+
function wo(e, t) {
|
|
572
572
|
var a, c, m, d;
|
|
573
573
|
const n = /* @__PURE__ */ new Map();
|
|
574
574
|
e.forEach((f) => {
|
|
575
|
-
const h = (f[
|
|
575
|
+
const h = (f[A] || f.holeId || f.id || "").toString().trim();
|
|
576
576
|
if (!h) return;
|
|
577
577
|
const b = h.toLowerCase();
|
|
578
578
|
n.has(b) || n.set(b, f);
|
|
579
579
|
});
|
|
580
|
-
const r = ((a = e[0]) == null ? void 0 : a.lat) ?? ((c = e[0]) == null ? void 0 : c[
|
|
580
|
+
const r = ((a = e[0]) == null ? void 0 : a.lat) ?? ((c = e[0]) == null ? void 0 : c[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[A] || "").toString().trim();
|
|
583
583
|
if (!h) return;
|
|
584
584
|
const b = h.toLowerCase();
|
|
585
585
|
l.has(b) || l.set(b, []), l.get(b).push(f);
|
|
@@ -588,83 +588,83 @@ function Mo(e, t) {
|
|
|
588
588
|
return l.forEach((f, h) => {
|
|
589
589
|
const b = n.get(h);
|
|
590
590
|
if (!b) return;
|
|
591
|
-
const
|
|
592
|
-
if (!
|
|
593
|
-
const p = b.lat ?? b[
|
|
594
|
-
let
|
|
595
|
-
for (let
|
|
596
|
-
const
|
|
591
|
+
const y = f.filter((C) => Number.isFinite(C[W] ?? C.surveydepth)).sort((C, H) => (C[W] ?? C.surveydepth) - (H[W] ?? H.surveydepth));
|
|
592
|
+
if (!y.length) return;
|
|
593
|
+
const p = b.lat ?? b[oe], g = b.lng ?? b[ie], M = 111132, z = 111320 * Math.cos(p * Math.PI / 180), D = (g - o) * s, x = (p - r) * i, O = [];
|
|
594
|
+
let $ = 0, P = 0, E = 0;
|
|
595
|
+
for (let C = 0; C < y.length; C += 1) {
|
|
596
|
+
const H = y[C], R = y[C - 1], v = H[W] ?? H.surveydepth, k = H[q] ?? H.azimuth, N = H[X] ?? H.dip;
|
|
597
597
|
if (!R) {
|
|
598
|
-
|
|
599
|
-
x:
|
|
600
|
-
y:
|
|
598
|
+
O.push({
|
|
599
|
+
x: D + $,
|
|
600
|
+
y: x + P,
|
|
601
601
|
z: 0,
|
|
602
|
-
md:
|
|
603
|
-
azimuth:
|
|
602
|
+
md: v,
|
|
603
|
+
azimuth: k,
|
|
604
604
|
dip: N
|
|
605
605
|
});
|
|
606
606
|
continue;
|
|
607
607
|
}
|
|
608
|
-
const
|
|
609
|
-
if (
|
|
610
|
-
const
|
|
611
|
-
Math.sin(
|
|
612
|
-
),
|
|
613
|
-
|
|
614
|
-
x:
|
|
615
|
-
y:
|
|
616
|
-
z: -
|
|
608
|
+
const B = R[W] ?? R.surveydepth, I = R[q] ?? R.azimuth, G = R[X] ?? R.dip, U = v - B;
|
|
609
|
+
if (U <= 0) continue;
|
|
610
|
+
const j = ct(G), Z = ct(N), K = Qe(I), le = Qe(k), ye = Math.acos(
|
|
611
|
+
Math.sin(j) * Math.sin(Z) * Math.cos(K - le) + Math.cos(j) * Math.cos(Z)
|
|
612
|
+
), fe = ye > 1e-6 ? 2 / ye * Math.tan(ye / 2) : 1, De = 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
|
+
$ += De, P += he, E += Ge, O.push({
|
|
614
|
+
x: D + $,
|
|
615
|
+
y: x + P,
|
|
616
|
+
z: -E,
|
|
617
617
|
// render with z up; depth down
|
|
618
|
-
md:
|
|
619
|
-
azimuth:
|
|
618
|
+
md: v,
|
|
619
|
+
azimuth: k,
|
|
620
620
|
dip: N
|
|
621
621
|
});
|
|
622
622
|
}
|
|
623
|
-
const
|
|
624
|
-
...
|
|
625
|
-
lat: p +
|
|
626
|
-
lng: g +
|
|
623
|
+
const F = O.map((C) => ({
|
|
624
|
+
...C,
|
|
625
|
+
lat: p + C.y / M,
|
|
626
|
+
lng: g + C.x / z
|
|
627
627
|
}));
|
|
628
628
|
u.push({
|
|
629
|
-
id: b[
|
|
630
|
-
project: b[
|
|
631
|
-
points:
|
|
629
|
+
id: b[A] || b.holeId || h,
|
|
630
|
+
project: b[me] || b.project_id || b.project || "",
|
|
631
|
+
points: F,
|
|
632
632
|
collar: b
|
|
633
633
|
});
|
|
634
634
|
}), u;
|
|
635
635
|
}
|
|
636
|
-
const
|
|
636
|
+
const Qe = (e) => e * Math.PI / 180, ct = (e) => {
|
|
637
637
|
const t = Number(e), n = 90 + (Number.isFinite(t) ? t : 0), r = Math.min(180, Math.max(0, n));
|
|
638
|
-
return
|
|
638
|
+
return Qe(r);
|
|
639
639
|
};
|
|
640
|
-
function
|
|
640
|
+
function re(e, t = void 0) {
|
|
641
641
|
const n = Number(e);
|
|
642
642
|
return Number.isFinite(n) ? n : t;
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function ut(e) {
|
|
645
645
|
return e == null ? "" : `${e}`.trim();
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
const n = t || "hole_id", o = [n, "hole_id", "holeId", "id"].find((i) => e.some((s) =>
|
|
647
|
+
function He(e = [], t = null) {
|
|
648
|
+
const n = t || "hole_id", o = [n, "hole_id", "holeId", "id"].find((i) => e.some((s) => ut(s == null ? void 0 : s[i])));
|
|
649
649
|
if (!o)
|
|
650
|
-
throw
|
|
650
|
+
throw Y("canonicalizeHoleIdRows", new Error(`hole id column '${n}' not found`));
|
|
651
651
|
return {
|
|
652
652
|
aliasCol: o,
|
|
653
653
|
rows: e.map((i) => ({
|
|
654
654
|
...i,
|
|
655
|
-
hole_id:
|
|
655
|
+
hole_id: ut(i == null ? void 0 : i[o])
|
|
656
656
|
}))
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function dt(e) {
|
|
660
660
|
return Number(e) * Math.PI / 180;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
const n =
|
|
662
|
+
function Ye(e, t) {
|
|
663
|
+
const n = dt(e), r = dt(t), o = Math.cos(r) * Math.sin(n), i = Math.cos(r) * Math.cos(n), s = Math.sin(r) * -1;
|
|
664
664
|
return { ca: o, cb: i, cc: s };
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
const s =
|
|
666
|
+
function vn(e, t, n, r, o, i = "minimum_curvature") {
|
|
667
|
+
const s = Ye(t, n), l = Ye(r, o);
|
|
668
668
|
if (i === "tangential")
|
|
669
669
|
return {
|
|
670
670
|
dx: e * s.ca,
|
|
@@ -674,7 +674,7 @@ function Mn(e, t, n, r, o, i = "minimum_curvature") {
|
|
|
674
674
|
dip: n
|
|
675
675
|
};
|
|
676
676
|
if (i === "balanced_tangential") {
|
|
677
|
-
const m = 0.5 * (t + r), d = 0.5 * (n + o), f =
|
|
677
|
+
const m = 0.5 * (t + r), d = 0.5 * (n + o), f = Ye(m, d);
|
|
678
678
|
return {
|
|
679
679
|
dx: e * f.ca,
|
|
680
680
|
dy: e * f.cb,
|
|
@@ -692,12 +692,12 @@ function Mn(e, t, n, r, o, i = "minimum_curvature") {
|
|
|
692
692
|
dip: o
|
|
693
693
|
};
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function tt(e = [], t = [], n = {}) {
|
|
696
696
|
const {
|
|
697
697
|
step: r = 1,
|
|
698
698
|
holeIdCol: o = null,
|
|
699
699
|
method: i = "minimum_curvature"
|
|
700
|
-
} = n, s = Number.isFinite(Number(r)) && Number(r) > 0 ? Number(r) : 1, l =
|
|
700
|
+
} = n, s = Number.isFinite(Number(r)) && Number(r) > 0 ? Number(r) : 1, l = He(e, o), u = He(t, o || l.aliasCol);
|
|
701
701
|
if (!l.rows.length || !u.rows.length) return [];
|
|
702
702
|
const a = /* @__PURE__ */ new Map();
|
|
703
703
|
l.rows.forEach((d) => {
|
|
@@ -711,81 +711,81 @@ function Je(e = [], t = [], n = {}) {
|
|
|
711
711
|
return c.forEach((d, f) => {
|
|
712
712
|
const h = a.get(f);
|
|
713
713
|
if (!h) return;
|
|
714
|
-
const b = [...d].map((
|
|
715
|
-
...
|
|
716
|
-
from:
|
|
717
|
-
azimuth:
|
|
718
|
-
dip:
|
|
719
|
-
})).filter((
|
|
714
|
+
const b = [...d].map((O) => ({
|
|
715
|
+
...O,
|
|
716
|
+
from: re(O.from),
|
|
717
|
+
azimuth: re(O.azimuth),
|
|
718
|
+
dip: re(O.dip)
|
|
719
|
+
})).filter((O) => Number.isFinite(O.from) && Number.isFinite(O.azimuth) && Number.isFinite(O.dip)).sort((O, $) => O.from - $.from);
|
|
720
720
|
if (!b.length) return;
|
|
721
|
-
let
|
|
722
|
-
const
|
|
721
|
+
let y = re(h.x, 0), p = re(h.y, 0), g = re(h.z, 0), M = b[0].from;
|
|
722
|
+
const z = b[0].azimuth, D = b[0].dip, x = {
|
|
723
723
|
hole_id: f,
|
|
724
|
-
md:
|
|
725
|
-
x:
|
|
724
|
+
md: M,
|
|
725
|
+
x: y,
|
|
726
726
|
y: p,
|
|
727
727
|
z: g,
|
|
728
|
-
azimuth:
|
|
729
|
-
dip:
|
|
728
|
+
azimuth: z,
|
|
729
|
+
dip: D
|
|
730
730
|
};
|
|
731
|
-
l.aliasCol !== "hole_id" && h[l.aliasCol] !== void 0 && (
|
|
732
|
-
for (let
|
|
733
|
-
const
|
|
734
|
-
if (
|
|
735
|
-
const
|
|
736
|
-
for (let
|
|
737
|
-
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
const
|
|
731
|
+
l.aliasCol !== "hole_id" && h[l.aliasCol] !== void 0 && (x[l.aliasCol] = h[l.aliasCol]), m.push(x);
|
|
732
|
+
for (let O = 0; O < b.length - 1; O += 1) {
|
|
733
|
+
const $ = b[O], P = b[O + 1], E = $.from, C = P.from - E;
|
|
734
|
+
if (C <= 0) continue;
|
|
735
|
+
const H = Math.max(1, Math.ceil(C / s)), R = C / H;
|
|
736
|
+
for (let v = 0; v < H; v += 1) {
|
|
737
|
+
M += R;
|
|
738
|
+
const k = (M - E) / C, N = $.azimuth + k * (P.azimuth - $.azimuth), B = $.dip + k * (P.dip - $.dip), I = vn(R, $.azimuth, $.dip, P.azimuth, P.dip, i);
|
|
739
|
+
y += I.dx, p += I.dy, g += I.dz;
|
|
740
|
+
const G = {
|
|
741
741
|
hole_id: f,
|
|
742
|
-
md:
|
|
743
|
-
x:
|
|
742
|
+
md: M,
|
|
743
|
+
x: y,
|
|
744
744
|
y: p,
|
|
745
745
|
z: g,
|
|
746
|
-
azimuth: i === "minimum_curvature" ? N :
|
|
747
|
-
dip: i === "minimum_curvature" ?
|
|
746
|
+
azimuth: i === "minimum_curvature" ? N : I.azimuth,
|
|
747
|
+
dip: i === "minimum_curvature" ? B : I.dip
|
|
748
748
|
};
|
|
749
|
-
l.aliasCol !== "hole_id" && h[l.aliasCol] !== void 0 && (
|
|
749
|
+
l.aliasCol !== "hole_id" && h[l.aliasCol] !== void 0 && (G[l.aliasCol] = h[l.aliasCol]), m.push(G);
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
752
|
}), m;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
755
|
-
return
|
|
754
|
+
function In(e, t, n = {}) {
|
|
755
|
+
return tt(e, t, { ...n, method: "minimum_curvature" });
|
|
756
756
|
}
|
|
757
|
-
function
|
|
758
|
-
return
|
|
757
|
+
function $o(e, t, n = {}) {
|
|
758
|
+
return tt(e, t, { ...n, method: "tangential" });
|
|
759
759
|
}
|
|
760
|
-
function
|
|
761
|
-
return
|
|
760
|
+
function Bo(e, t, n = {}) {
|
|
761
|
+
return tt(e, t, { ...n, method: "balanced_tangential" });
|
|
762
762
|
}
|
|
763
|
-
function
|
|
764
|
-
return
|
|
763
|
+
function Vo(e, t, n = {}) {
|
|
764
|
+
return In(e, t, n);
|
|
765
765
|
}
|
|
766
|
-
function
|
|
766
|
+
function Cn(e, t) {
|
|
767
767
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
768
768
|
let n = null, r = 1 / 0;
|
|
769
769
|
for (let o = 0; o < e.length; o += 1) {
|
|
770
|
-
const i = e[o], s =
|
|
770
|
+
const i = e[o], s = re(i.md);
|
|
771
771
|
if (!Number.isFinite(s)) continue;
|
|
772
772
|
const l = Math.abs(s - t);
|
|
773
773
|
l < r && (r = l, n = i);
|
|
774
774
|
}
|
|
775
775
|
return n;
|
|
776
776
|
}
|
|
777
|
-
function
|
|
778
|
-
const r = n.holeIdCol || "hole_id", o =
|
|
777
|
+
function Ho(e = [], t = [], n = {}) {
|
|
778
|
+
const r = n.holeIdCol || "hole_id", o = He(e, r), i = He(t, r);
|
|
779
779
|
if (!o.rows.length || !i.rows.length) return [...o.rows];
|
|
780
780
|
const s = /* @__PURE__ */ new Map();
|
|
781
781
|
return i.rows.forEach((l) => {
|
|
782
782
|
l.hole_id && (s.has(l.hole_id) || s.set(l.hole_id, []), s.get(l.hole_id).push(l));
|
|
783
783
|
}), s.forEach((l, u) => {
|
|
784
|
-
s.set(u, [...l].sort((a, c) =>
|
|
784
|
+
s.set(u, [...l].sort((a, c) => re(a.md, 0) - re(c.md, 0)));
|
|
785
785
|
}), o.rows.map((l) => {
|
|
786
|
-
const u =
|
|
786
|
+
const u = re(l.from), a = re(l.to), c = Number.isFinite(u) && Number.isFinite(a) ? 0.5 * (u + a) : void 0;
|
|
787
787
|
if (!l.hole_id || !Number.isFinite(c)) return { ...l };
|
|
788
|
-
const m =
|
|
788
|
+
const m = Cn(s.get(l.hole_id) || [], c);
|
|
789
789
|
if (!m) return { ...l };
|
|
790
790
|
const d = { ...l };
|
|
791
791
|
return ["md", "x", "y", "z", "azimuth", "dip"].forEach((f) => {
|
|
@@ -793,16 +793,16 @@ function xo(e = [], t = [], n = {}) {
|
|
|
793
793
|
}), d;
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Ro(e, t = null) {
|
|
797
797
|
return new Promise((n, r) => {
|
|
798
|
-
|
|
798
|
+
te.parse(e, {
|
|
799
799
|
header: !0,
|
|
800
800
|
dynamicTyping: !0,
|
|
801
801
|
skipEmptyLines: !0,
|
|
802
802
|
complete: (o) => {
|
|
803
803
|
const i = /* @__PURE__ */ new Map();
|
|
804
804
|
o.data.forEach((l, u) => {
|
|
805
|
-
const a =
|
|
805
|
+
const a = ge(l, null, t), c = a[A], m = c !== void 0 ? `${c}`.trim() : "", d = a[pe] ?? a.x, f = a[be] ?? a.y, h = a[Ae] ?? a.z, b = a.order ?? u;
|
|
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,
|
|
@@ -823,18 +823,18 @@ function Io(e, t = null) {
|
|
|
823
823
|
}));
|
|
824
824
|
n({ holes: s });
|
|
825
825
|
},
|
|
826
|
-
error: (o) => r(
|
|
826
|
+
error: (o) => r(Y("parseDrillholesCSV", o))
|
|
827
827
|
});
|
|
828
828
|
});
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function ke(e) {
|
|
831
831
|
return e ? Array.isArray(e) ? [...e] : [] : [];
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function ee(e) {
|
|
834
834
|
const t = Number(e);
|
|
835
835
|
return Number.isFinite(t) ? t : void 0;
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function Pe(e = [], t = []) {
|
|
838
838
|
const n = [...e];
|
|
839
839
|
return n.sort((r, o) => {
|
|
840
840
|
for (let i = 0; i < t.length; i += 1) {
|
|
@@ -845,37 +845,37 @@ function Fe(e = [], t = []) {
|
|
|
845
845
|
return 0;
|
|
846
846
|
}), n;
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function Dn(e = [], t = "Intervals") {
|
|
849
849
|
if (!e.length) return;
|
|
850
|
-
const n =
|
|
850
|
+
const n = Pe(e, [A, L, w]), 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[A]) ?? ""}`.trim(), s = Number(o == null ? void 0 : o[L]), l = Number(o == null ? void 0 : o[w]);
|
|
853
853
|
if (!i || !Number.isFinite(s) || !Number.isFinite(l)) return;
|
|
854
854
|
const u = r.get(i);
|
|
855
855
|
if (Number.isFinite(u) && s < u)
|
|
856
|
-
throw
|
|
856
|
+
throw Y(
|
|
857
857
|
"validateNoOverlappingIntervals",
|
|
858
858
|
new Error(`${t} intervals overlap for hole '${i}': from=${s} is less than previous to=${u}`)
|
|
859
859
|
);
|
|
860
860
|
r.set(i, l);
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function Sn(e, t = {}) {
|
|
864
864
|
return new Promise((n, r) => {
|
|
865
|
-
|
|
865
|
+
te.parse(e, {
|
|
866
866
|
header: !0,
|
|
867
867
|
dynamicTyping: !0,
|
|
868
868
|
skipEmptyLines: !0,
|
|
869
869
|
...t,
|
|
870
870
|
complete: (o) => n(Array.isArray(o == null ? void 0 : o.data) ? o.data : []),
|
|
871
|
-
error: (o) => r(
|
|
871
|
+
error: (o) => r(Y("loadTable(csv)", o))
|
|
872
872
|
});
|
|
873
873
|
});
|
|
874
874
|
}
|
|
875
|
-
function
|
|
876
|
-
return e.map((r) =>
|
|
875
|
+
function Ln(e = [], t = null, n = null) {
|
|
876
|
+
return e.map((r) => ge(r, t, n));
|
|
877
877
|
}
|
|
878
|
-
async function
|
|
878
|
+
async function je(e, t = {}) {
|
|
879
879
|
const {
|
|
880
880
|
kind: n = "csv",
|
|
881
881
|
columnMap: r = null,
|
|
@@ -884,115 +884,115 @@ async function He(e, t = {}) {
|
|
|
884
884
|
} = t;
|
|
885
885
|
let s;
|
|
886
886
|
if (Array.isArray(e))
|
|
887
|
-
s =
|
|
887
|
+
s = ke(e);
|
|
888
888
|
else if (n === "csv")
|
|
889
|
-
s = await
|
|
890
|
-
else throw n === "parquet" || n === "sql" ?
|
|
891
|
-
return
|
|
889
|
+
s = await Sn(e, i);
|
|
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
|
+
return Ln(s, r, o);
|
|
892
892
|
}
|
|
893
|
-
async function
|
|
893
|
+
async function jo(e, t = {}) {
|
|
894
894
|
const {
|
|
895
895
|
crs: n = null,
|
|
896
896
|
sourceColumnMap: r = null,
|
|
897
897
|
keepAll: o = !0,
|
|
898
898
|
...i
|
|
899
|
-
} = t, s = await
|
|
900
|
-
if (!s.some((d) =>
|
|
901
|
-
throw
|
|
902
|
-
const u = s.some((d) =>
|
|
899
|
+
} = t, s = await je(e, { ...i, sourceColumnMap: r });
|
|
900
|
+
if (!s.some((d) => A in d))
|
|
901
|
+
throw Y("loadCollars", new Error(`Collar table missing column: ${A}`));
|
|
902
|
+
const u = s.some((d) => pe in d && be in d), a = s.some((d) => oe in d && ie in d);
|
|
903
903
|
if (!u && !a)
|
|
904
|
-
throw
|
|
904
|
+
throw Y("loadCollars", new Error("Collar table missing coordinate columns (need easting/northing or latitude/longitude)"));
|
|
905
905
|
const c = s.map((d) => {
|
|
906
906
|
const f = { ...d };
|
|
907
|
-
if (
|
|
908
|
-
const h = f[
|
|
909
|
-
f[
|
|
907
|
+
if (A in f) {
|
|
908
|
+
const h = f[A];
|
|
909
|
+
f[A] = h == null ? "" : `${h}`.trim();
|
|
910
910
|
}
|
|
911
|
-
return
|
|
911
|
+
return oe in f && (f[oe] = ee(f[oe])), ie in f && (f[ie] = ee(f[ie])), Ae in f && (f[Ae] = ee(f[Ae])), pe in f && (f[pe] = ee(f[pe])), be in f && (f[be] = ee(f[be])), !("datasource_hole_id" in f) && A in f && (f.datasource_hole_id = f[A]), f;
|
|
912
912
|
});
|
|
913
|
-
if (!c.every((d) => !(!d[
|
|
914
|
-
throw
|
|
913
|
+
if (!c.every((d) => !(!d[A] || a && (!Number.isFinite(d[oe]) || !Number.isFinite(d[ie])) || u && !a && (!Number.isFinite(d[pe]) || !Number.isFinite(d[be])))))
|
|
914
|
+
throw Y("loadCollars", new Error("Collar table has missing required values"));
|
|
915
915
|
return c;
|
|
916
916
|
}
|
|
917
|
-
async function
|
|
917
|
+
async function Go(e, t = {}) {
|
|
918
918
|
const {
|
|
919
919
|
sourceColumnMap: n = null,
|
|
920
920
|
keepAll: r = !0,
|
|
921
921
|
...o
|
|
922
|
-
} = t, i = await
|
|
922
|
+
} = t, i = await je(e, { ...o, sourceColumnMap: n }), s = [A, W, q, X];
|
|
923
923
|
for (const a of s)
|
|
924
924
|
if (!i.some((m) => a in m))
|
|
925
|
-
throw
|
|
925
|
+
throw Y("loadSurveys", new Error(`Survey table missing column: ${a}`));
|
|
926
926
|
const l = i.map((a) => {
|
|
927
927
|
const c = { ...a };
|
|
928
|
-
if (
|
|
929
|
-
const m = c[
|
|
930
|
-
c[
|
|
928
|
+
if (A in c) {
|
|
929
|
+
const m = c[A];
|
|
930
|
+
c[A] = m == null ? "" : `${m}`.trim();
|
|
931
931
|
}
|
|
932
|
-
return W in c && (c[W] =
|
|
932
|
+
return W in c && (c[W] = ee(c[W])), w in c && (c[w] = ee(c[w])), q in c && (c[q] = ee(c[q])), X in c && (c[X] = ee(c[X])), c;
|
|
933
933
|
});
|
|
934
|
-
if (!l.every((a) => !(!a[
|
|
935
|
-
throw
|
|
936
|
-
return
|
|
934
|
+
if (!l.every((a) => !(!a[A] || !Number.isFinite(a[W]) || !Number.isFinite(a[q]) || !Number.isFinite(a[X]))))
|
|
935
|
+
throw Y("loadSurveys", new Error("Survey table has missing required values"));
|
|
936
|
+
return Pe(l, [A, W]);
|
|
937
937
|
}
|
|
938
|
-
async function
|
|
938
|
+
async function Uo(e, t = {}) {
|
|
939
939
|
const {
|
|
940
940
|
sourceColumnMap: n = null,
|
|
941
941
|
keepAll: r = !0,
|
|
942
942
|
...o
|
|
943
|
-
} = t, i = await
|
|
943
|
+
} = t, i = await je(e, { ...o, sourceColumnMap: n }), s = [A, L, w];
|
|
944
944
|
for (const a of s)
|
|
945
945
|
if (!i.some((m) => a in m))
|
|
946
|
-
throw
|
|
946
|
+
throw Y("loadAssays", new Error(`Assay table missing column: ${a}`));
|
|
947
947
|
const l = i.map((a) => {
|
|
948
948
|
const c = { ...a };
|
|
949
|
-
if (
|
|
950
|
-
const m = c[
|
|
951
|
-
c[
|
|
949
|
+
if (A in c) {
|
|
950
|
+
const m = c[A];
|
|
951
|
+
c[A] = m == null ? "" : `${m}`.trim();
|
|
952
952
|
}
|
|
953
|
-
return
|
|
953
|
+
return L in c && (c[L] = ee(c[L])), w in c && (c[w] = ee(c[w])), L in c && w in c && Number.isFinite(c[L]) && Number.isFinite(c[w]) && (c[Ie] = 0.5 * (c[L] + c[w])), c;
|
|
954
954
|
});
|
|
955
|
-
if (!l.every((a) => !(!a[
|
|
956
|
-
throw
|
|
957
|
-
return
|
|
955
|
+
if (!l.every((a) => !(!a[A] || !Number.isFinite(a[L]) || !Number.isFinite(a[w]) || !(a[w] > a[L]))))
|
|
956
|
+
throw Y("loadAssays", new Error("Assay table has missing required values"));
|
|
957
|
+
return Pe(l, [A, L, w]);
|
|
958
958
|
}
|
|
959
|
-
async function
|
|
959
|
+
async function Yo(e, t = {}) {
|
|
960
960
|
const {
|
|
961
961
|
sourceColumnMap: n = null,
|
|
962
962
|
keepAll: r = !0,
|
|
963
963
|
...o
|
|
964
|
-
} = t, i = await
|
|
964
|
+
} = t, i = await je(e, { ...o, sourceColumnMap: n }), s = [A, L, w];
|
|
965
965
|
for (const c of s)
|
|
966
966
|
if (!i.some((d) => c in d))
|
|
967
|
-
throw
|
|
967
|
+
throw Y("loadGeology", new Error(`Geology table missing column: ${c}`));
|
|
968
968
|
const l = i.map((c) => {
|
|
969
969
|
const m = { ...c };
|
|
970
|
-
if (
|
|
971
|
-
const h = m[
|
|
972
|
-
m[
|
|
970
|
+
if (A in m) {
|
|
971
|
+
const h = m[A];
|
|
972
|
+
m[A] = h == null ? "" : `${h}`.trim();
|
|
973
973
|
}
|
|
974
|
-
|
|
975
|
-
const d = m[
|
|
976
|
-
return !d && f && (m[
|
|
974
|
+
L in m && (m[L] = ee(m[L])), w in m && (m[w] = ee(m[w])), L in m && w in m && Number.isFinite(m[L]) && Number.isFinite(m[w]) && (m[w] === m[L] && (m[L] = Math.round(m[L] * 1e3) / 1e3, m[w] = m[L] + 1e-3), m[Ie] = 0.5 * (m[L] + m[w]));
|
|
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
|
+
return !d && f && (m[ae] = m[ce]), d && !f && (m[ce] = m[ae]), m;
|
|
977
977
|
});
|
|
978
|
-
if (!l.every((c) => !(!c[
|
|
979
|
-
throw
|
|
978
|
+
if (!l.every((c) => !(!c[A] || !Number.isFinite(c[L]) || !Number.isFinite(c[w]) || !(c[w] > c[L]))))
|
|
979
|
+
throw Y("loadGeology", new Error("Geology table has missing or invalid interval values"));
|
|
980
980
|
if (!l.some((c) => {
|
|
981
|
-
const m = c[
|
|
981
|
+
const m = c[ae], d = c[ce];
|
|
982
982
|
return m != null && `${m}`.trim() !== "" || d != null && `${d}`.trim() !== "";
|
|
983
983
|
}))
|
|
984
|
-
throw
|
|
985
|
-
if (
|
|
986
|
-
const c = new Set(Object.keys(
|
|
987
|
-
return
|
|
984
|
+
throw Y("loadGeology", new Error(`Geology table missing categorical columns: ${ae} or ${ce}`));
|
|
985
|
+
if (Dn(l, "Geology"), !r) {
|
|
986
|
+
const c = new Set(Object.keys(dn));
|
|
987
|
+
return Pe(
|
|
988
988
|
l.map((m) => Object.fromEntries(Object.entries(m).filter(([d]) => c.has(d)))),
|
|
989
|
-
[
|
|
989
|
+
[A, L, w]
|
|
990
990
|
);
|
|
991
991
|
}
|
|
992
|
-
return
|
|
992
|
+
return Pe(l, [A, L, w]);
|
|
993
993
|
}
|
|
994
|
-
function
|
|
995
|
-
const r = Array.isArray(n.onCols) && n.onCols.length ? n.onCols : [
|
|
994
|
+
function qo(e = [], t = [], n = {}) {
|
|
995
|
+
const r = Array.isArray(n.onCols) && n.onCols.length ? n.onCols : [A];
|
|
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) => {
|
|
@@ -1006,20 +1006,20 @@ function Fo(e = [], t = [], n = {}) {
|
|
|
1006
1006
|
}), u;
|
|
1007
1007
|
});
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1010
|
-
return t == null ? [...e] : e.length ? e.some((r) =>
|
|
1009
|
+
function Xo(e = [], t = null) {
|
|
1010
|
+
return t == null ? [...e] : e.length ? e.some((r) => me in r) ? e.filter((r) => (r == null ? void 0 : r[me]) === t) : [...e] : [];
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function Zo(e = [], t = []) {
|
|
1013
1013
|
return e.map((n) => {
|
|
1014
1014
|
const r = { ...n };
|
|
1015
1015
|
return t.forEach((o) => {
|
|
1016
1016
|
if (!(o in r)) return;
|
|
1017
|
-
const i =
|
|
1017
|
+
const i = ee(r[o]);
|
|
1018
1018
|
r[o] = i;
|
|
1019
1019
|
}), r;
|
|
1020
1020
|
});
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function Wo({
|
|
1023
1023
|
collars: e = [],
|
|
1024
1024
|
surveys: t = [],
|
|
1025
1025
|
assays: n = [],
|
|
@@ -1028,65 +1028,65 @@ function Po({
|
|
|
1028
1028
|
metadata: i = {}
|
|
1029
1029
|
} = {}) {
|
|
1030
1030
|
return {
|
|
1031
|
-
collars:
|
|
1032
|
-
surveys:
|
|
1033
|
-
assays:
|
|
1034
|
-
geology:
|
|
1035
|
-
structures:
|
|
1031
|
+
collars: ke(e),
|
|
1032
|
+
surveys: ke(t),
|
|
1033
|
+
assays: ke(n),
|
|
1034
|
+
geology: ke(r),
|
|
1035
|
+
structures: ke(o),
|
|
1036
1036
|
metadata: i || {}
|
|
1037
1037
|
};
|
|
1038
1038
|
}
|
|
1039
|
-
const
|
|
1039
|
+
const St = ["x", "y", "z", "dx", "dy", "dz"], On = {
|
|
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"],
|
|
1043
1043
|
dx: ["dx", "size_x", "sx", "sizex", "dim_x", "block_size_x"],
|
|
1044
1044
|
dy: ["dy", "size_y", "sy", "sizey", "dim_y", "block_size_y"],
|
|
1045
1045
|
dz: ["dz", "size_z", "sz", "sizez", "dim_z", "block_size_z"]
|
|
1046
|
-
},
|
|
1047
|
-
Object.entries(
|
|
1046
|
+
}, Lt = {};
|
|
1047
|
+
Object.entries(On).forEach(([e, t]) => {
|
|
1048
1048
|
t.forEach((n) => {
|
|
1049
|
-
|
|
1049
|
+
Lt[n.toLowerCase()] = e;
|
|
1050
1050
|
});
|
|
1051
1051
|
});
|
|
1052
|
-
function
|
|
1052
|
+
function Pn(e) {
|
|
1053
1053
|
const t = {};
|
|
1054
1054
|
return Object.entries(e).forEach(([n, r]) => {
|
|
1055
|
-
const o =
|
|
1055
|
+
const o = Lt[n.toLowerCase().trim()] || n;
|
|
1056
1056
|
t[o] = r;
|
|
1057
1057
|
}), t;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function Ko(e) {
|
|
1060
1060
|
return new Promise((t, n) => {
|
|
1061
|
-
|
|
1061
|
+
te.parse(e, {
|
|
1062
1062
|
header: !0,
|
|
1063
1063
|
dynamicTyping: !0,
|
|
1064
1064
|
skipEmptyLines: !0,
|
|
1065
1065
|
complete: (r) => {
|
|
1066
|
-
const i = (r.data || []).map(
|
|
1066
|
+
const i = (r.data || []).map(Pn).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) => !St.includes(l)
|
|
1070
1070
|
);
|
|
1071
1071
|
t({ data: i, properties: s });
|
|
1072
1072
|
},
|
|
1073
1073
|
error: (r) => {
|
|
1074
|
-
n(
|
|
1074
|
+
n(Y("parseBlockModelCSV", r));
|
|
1075
1075
|
}
|
|
1076
1076
|
});
|
|
1077
1077
|
});
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function Jo(e) {
|
|
1080
1080
|
if (typeof e == "string")
|
|
1081
1081
|
try {
|
|
1082
1082
|
return JSON.parse(e);
|
|
1083
1083
|
} catch (t) {
|
|
1084
|
-
throw
|
|
1084
|
+
throw Y("loadBlockModelMetadata", t);
|
|
1085
1085
|
}
|
|
1086
1086
|
if (e && typeof e == "object") return e;
|
|
1087
|
-
throw
|
|
1087
|
+
throw Y("loadBlockModelMetadata", new Error("Invalid metadata source"));
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function Fn(e, t) {
|
|
1090
1090
|
const n = e.map((i) => i[t]).filter((i) => i != null);
|
|
1091
1091
|
if (n.length > 0 && n.every((i) => typeof i == "number")) {
|
|
1092
1092
|
const i = Math.min(...n), s = Math.max(...n);
|
|
@@ -1094,16 +1094,16 @@ function Sn(e, t) {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
return { type: "categorical", categories: [...new Set(n)], values: n };
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function Qo(e) {
|
|
1098
1098
|
if (!e || e.length === 0) return {};
|
|
1099
1099
|
const t = Object.keys(e[0]).filter(
|
|
1100
|
-
(r) => !
|
|
1100
|
+
(r) => !St.includes(r)
|
|
1101
1101
|
), n = {};
|
|
1102
1102
|
return t.forEach((r) => {
|
|
1103
|
-
n[r] =
|
|
1103
|
+
n[r] = Fn(e, r);
|
|
1104
1104
|
}), n;
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1106
|
+
function Tn(e, t) {
|
|
1107
1107
|
return !t || typeof t != "object" ? e : e.filter(
|
|
1108
1108
|
(n) => Object.entries(t).every(([r, o]) => {
|
|
1109
1109
|
const i = n[r];
|
|
@@ -1111,13 +1111,13 @@ function Dn(e, t) {
|
|
|
1111
1111
|
})
|
|
1112
1112
|
);
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1115
|
-
return (t ?
|
|
1114
|
+
function ei(e, t = null) {
|
|
1115
|
+
return (t ? Tn(e, t) : e).reduce((r, o) => {
|
|
1116
1116
|
const i = Number(o.dx) || 0, s = Number(o.dy) || 0, l = Number(o.dz) || 0;
|
|
1117
1117
|
return r + i * s * l;
|
|
1118
1118
|
}, 0);
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function wn(e, t, n) {
|
|
1121
1121
|
if (!t) return new n.Color("#888888");
|
|
1122
1122
|
if (t.type === "numeric") {
|
|
1123
1123
|
const i = t.max - t.min, l = (1 - (i === 0 ? 0.5 : (e - t.min) / i)) * 240;
|
|
@@ -1126,56 +1126,56 @@ function Fn(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
|
|
1130
|
-
function
|
|
1129
|
+
const nt = (e, t = null) => ge(e, null, t);
|
|
1130
|
+
function $n(e) {
|
|
1131
1131
|
if (!e.length) return null;
|
|
1132
|
-
const t = e[0], n =
|
|
1132
|
+
const t = e[0], n = L in t && w in t, r = W in t && !n;
|
|
1133
1133
|
return n ? "interval" : r ? "point" : null;
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1135
|
+
function de(e) {
|
|
1136
1136
|
const t = Number(e);
|
|
1137
1137
|
return Number.isFinite(t) ? t : null;
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1140
|
-
const t = e[
|
|
1139
|
+
function Ot(e) {
|
|
1140
|
+
const t = e[A] !== void 0 ? `${e[A]}`.trim() : "";
|
|
1141
1141
|
if (!t) return null;
|
|
1142
|
-
const n =
|
|
1142
|
+
const n = de(e[W]);
|
|
1143
1143
|
return n === null ? null : {
|
|
1144
|
-
[
|
|
1144
|
+
[A]: t,
|
|
1145
1145
|
[W]: n,
|
|
1146
|
-
[
|
|
1147
|
-
[
|
|
1146
|
+
[X]: de(e[X]),
|
|
1147
|
+
[q]: de(e[q]),
|
|
1148
1148
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
1149
1149
|
...e
|
|
1150
1150
|
};
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1153
|
-
const t = e[
|
|
1152
|
+
function Pt(e) {
|
|
1153
|
+
const t = e[A] !== void 0 ? `${e[A]}`.trim() : "";
|
|
1154
1154
|
if (!t) return null;
|
|
1155
|
-
const n =
|
|
1155
|
+
const n = de(e[L]), r = de(e[w]);
|
|
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
|
+
[A]: t,
|
|
1160
|
+
[L]: n,
|
|
1161
|
+
[w]: r,
|
|
1162
1162
|
mid: o,
|
|
1163
|
-
[
|
|
1164
|
-
[
|
|
1163
|
+
[X]: de(e[X]),
|
|
1164
|
+
[q]: de(e[q]),
|
|
1165
1165
|
classification: e.classification != null ? `${e.classification}` : null,
|
|
1166
1166
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
1167
1167
|
...e
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function ti(e) {
|
|
1171
1171
|
const t = [], n = [];
|
|
1172
1172
|
for (const r of e) {
|
|
1173
|
-
const o = [], i =
|
|
1173
|
+
const o = [], i = de(r[X]), s = de(r[q]);
|
|
1174
1174
|
i !== null && (i < 0 || i > 90) && o.push(`dip ${i} out of range [0, 90]`), s !== null && (s < 0 || s >= 360) && o.push(`azimuth ${s} out of range [0, 360)`), o.length ? n.push({ row: r, message: o.join("; ") }) : t.push(r);
|
|
1175
1175
|
}
|
|
1176
1176
|
return { valid: t, errors: n };
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function ni(e, t = null) {
|
|
1179
1179
|
return new Promise((n, r) => {
|
|
1180
1180
|
const o = {
|
|
1181
1181
|
header: !0,
|
|
@@ -1184,36 +1184,36 @@ function Ho(e, t = null) {
|
|
|
1184
1184
|
complete: (i) => {
|
|
1185
1185
|
const s = [];
|
|
1186
1186
|
for (const l of i.data) {
|
|
1187
|
-
const u =
|
|
1187
|
+
const u = nt(l, t), a = Ot(u);
|
|
1188
1188
|
a && s.push(a);
|
|
1189
1189
|
}
|
|
1190
1190
|
n(s);
|
|
1191
1191
|
},
|
|
1192
|
-
error: (i) => r(
|
|
1192
|
+
error: (i) => r(Y("parseStructuralPointsCSV", i))
|
|
1193
1193
|
};
|
|
1194
1194
|
typeof e == "string" && !e.startsWith("data:") && e.includes(`
|
|
1195
|
-
`) ?
|
|
1195
|
+
`) ? te.parse(e, o) : te.parse(e, o);
|
|
1196
1196
|
});
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function ri(e, t = null) {
|
|
1199
1199
|
return new Promise((n, r) => {
|
|
1200
|
-
|
|
1200
|
+
te.parse(e, {
|
|
1201
1201
|
header: !0,
|
|
1202
1202
|
dynamicTyping: !0,
|
|
1203
1203
|
skipEmptyLines: !0,
|
|
1204
1204
|
complete: (o) => {
|
|
1205
1205
|
const i = [];
|
|
1206
1206
|
for (const s of o.data) {
|
|
1207
|
-
const l =
|
|
1207
|
+
const l = nt(s, t), u = Pt(l);
|
|
1208
1208
|
u && i.push(u);
|
|
1209
1209
|
}
|
|
1210
1210
|
n(i);
|
|
1211
1211
|
},
|
|
1212
|
-
error: (o) => r(
|
|
1212
|
+
error: (o) => r(Y("parseStructuralIntervalsCSV", o))
|
|
1213
1213
|
});
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function Bn(e, t = A) {
|
|
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() : "";
|
|
@@ -1221,16 +1221,16 @@ function On(e, t = z) {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
return Array.from(n.values());
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function Vn(e, t = null) {
|
|
1225
1225
|
return new Promise((n, r) => {
|
|
1226
|
-
|
|
1226
|
+
te.parse(e, {
|
|
1227
1227
|
header: !0,
|
|
1228
1228
|
dynamicTyping: !0,
|
|
1229
1229
|
skipEmptyLines: !0,
|
|
1230
1230
|
complete: (o) => {
|
|
1231
|
-
const i = o.data.map((u) =>
|
|
1231
|
+
const i = o.data.map((u) => nt(u, t)), s = $n(i);
|
|
1232
1232
|
if (!s) {
|
|
1233
|
-
r(
|
|
1233
|
+
r(Y(
|
|
1234
1234
|
"parseStructuralCSV",
|
|
1235
1235
|
new Error("Structural CSV requires either 'depth' (point) or 'from'/'to' (interval) columns")
|
|
1236
1236
|
));
|
|
@@ -1238,33 +1238,33 @@ function Pn(e, t = null) {
|
|
|
1238
1238
|
}
|
|
1239
1239
|
const l = [];
|
|
1240
1240
|
for (const u of i) {
|
|
1241
|
-
const a = s === "interval" ?
|
|
1241
|
+
const a = s === "interval" ? Pt(u) : Ot(u);
|
|
1242
1242
|
a && l.push(a);
|
|
1243
1243
|
}
|
|
1244
1244
|
n({ schema: s, rows: l });
|
|
1245
1245
|
},
|
|
1246
|
-
error: (o) => r(
|
|
1246
|
+
error: (o) => r(Y("parseStructuralCSV", o))
|
|
1247
1247
|
});
|
|
1248
1248
|
});
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function Hn(e) {
|
|
1251
1251
|
return new Promise((t) => {
|
|
1252
|
-
|
|
1252
|
+
te.parse(e, {
|
|
1253
1253
|
header: !0,
|
|
1254
1254
|
dynamicTyping: !0,
|
|
1255
1255
|
skipEmptyLines: !0,
|
|
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[A] != null ? `${s[A]}`.trim() : "";
|
|
1260
1260
|
if (!l) continue;
|
|
1261
|
-
const u = Number(s[
|
|
1261
|
+
const u = Number(s[L]), a = Number(s[w]);
|
|
1262
1262
|
if (!Number.isFinite(u) || !Number.isFinite(a) || a <= u) continue;
|
|
1263
|
-
const c = (u + a) / 2, { [
|
|
1263
|
+
const c = (u + a) / 2, { [X]: m, [q]: d, ...f } = s, h = {
|
|
1264
1264
|
...f,
|
|
1265
|
-
[
|
|
1266
|
-
[
|
|
1267
|
-
[
|
|
1265
|
+
[A]: l,
|
|
1266
|
+
[L]: u,
|
|
1267
|
+
[w]: a,
|
|
1268
1268
|
[Ie]: c,
|
|
1269
1269
|
[W]: c,
|
|
1270
1270
|
// unified depth field for y-axis rendering
|
|
@@ -1274,31 +1274,31 @@ function Tn(e) {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
const o = Array.from(r.entries()).map(([i, s]) => ({
|
|
1276
1276
|
holeId: i,
|
|
1277
|
-
points: s.sort((l, u) => l[
|
|
1277
|
+
points: s.sort((l, u) => l[L] - u[L])
|
|
1278
1278
|
}));
|
|
1279
1279
|
t(o);
|
|
1280
1280
|
}
|
|
1281
1281
|
});
|
|
1282
1282
|
});
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function Rn(e) {
|
|
1285
1285
|
return new Promise((t) => {
|
|
1286
|
-
|
|
1286
|
+
te.parse(e, {
|
|
1287
1287
|
header: !0,
|
|
1288
1288
|
dynamicTyping: !0,
|
|
1289
1289
|
skipEmptyLines: !0,
|
|
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[A] ?? "").toString().trim();
|
|
1294
1294
|
if (!s) continue;
|
|
1295
|
-
const l = Number(i[
|
|
1295
|
+
const l = Number(i[L]), u = Number(i[w]);
|
|
1296
1296
|
if (!Number.isFinite(l) || !Number.isFinite(u) || u <= l) continue;
|
|
1297
|
-
const a = (l + u) / 2, { [
|
|
1297
|
+
const a = (l + u) / 2, { [X]: c, [q]: m, ...d } = i, f = {
|
|
1298
1298
|
...d,
|
|
1299
|
-
[
|
|
1300
|
-
[
|
|
1301
|
-
[
|
|
1299
|
+
[A]: s,
|
|
1300
|
+
[L]: l,
|
|
1301
|
+
[w]: u,
|
|
1302
1302
|
[Ie]: a,
|
|
1303
1303
|
[W]: a,
|
|
1304
1304
|
_source: "geology"
|
|
@@ -1308,20 +1308,20 @@ function wn(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[L] - l[L])
|
|
1312
1312
|
}))
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
1315
1315
|
});
|
|
1316
1316
|
});
|
|
1317
1317
|
}
|
|
1318
|
-
async function
|
|
1318
|
+
async function oi({ assayCsv: e, structuralCsv: t, geologyCsv: n } = {}) {
|
|
1319
1319
|
const [r, o, i] = await Promise.all([
|
|
1320
|
-
e ?
|
|
1321
|
-
t ?
|
|
1322
|
-
({ rows: l }) =>
|
|
1320
|
+
e ? Hn(e) : Promise.resolve([]),
|
|
1321
|
+
t ? Vn(t).then(
|
|
1322
|
+
({ rows: l }) => Bn(l.map((u) => ({ ...u, _source: "structural" })))
|
|
1323
1323
|
) : Promise.resolve([]),
|
|
1324
|
-
n ?
|
|
1324
|
+
n ? Rn(n).then(({ holes: l }) => l) : Promise.resolve([])
|
|
1325
1325
|
]), s = new Map(r.map((l) => [l.holeId, { ...l, points: [...l.points] }]));
|
|
1326
1326
|
for (const l of [...o, ...i]) {
|
|
1327
1327
|
const u = l.holeId;
|
|
@@ -1334,7 +1334,7 @@ async function Ro({ assayCsv: e, structuralCsv: t, geologyCsv: n } = {}) {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
return { holes: Array.from(s.values()) };
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function jn(e, t) {
|
|
1338
1338
|
if (!e || e.length === 0 || !Number.isFinite(t)) return null;
|
|
1339
1339
|
const n = e.length;
|
|
1340
1340
|
if (n === 1) {
|
|
@@ -1343,8 +1343,8 @@ function Bn(e, t) {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
let r = -1;
|
|
1345
1345
|
for (let g = 0; g < n - 1; g++) {
|
|
1346
|
-
const
|
|
1347
|
-
if (t >=
|
|
1346
|
+
const M = Number(e[g].md), z = Number(e[g + 1].md);
|
|
1347
|
+
if (t >= M && t <= z) {
|
|
1348
1348
|
r = g;
|
|
1349
1349
|
break;
|
|
1350
1350
|
}
|
|
@@ -1352,28 +1352,28 @@ function Bn(e, t) {
|
|
|
1352
1352
|
let o, i, s;
|
|
1353
1353
|
if (r === -1) {
|
|
1354
1354
|
t < Number(e[0].md) ? (o = e[0], i = e[1]) : (o = e[n - 2], i = e[n - 1]);
|
|
1355
|
-
const g = Number(o.md),
|
|
1356
|
-
s =
|
|
1355
|
+
const g = Number(o.md), z = Number(i.md) - g;
|
|
1356
|
+
s = z > 0 ? (t - g) / z : t < g ? 0 : 1;
|
|
1357
1357
|
} else {
|
|
1358
1358
|
o = e[r], i = e[r + 1];
|
|
1359
|
-
const g = Number(o.md),
|
|
1360
|
-
s =
|
|
1359
|
+
const g = Number(o.md), z = Number(i.md) - g;
|
|
1360
|
+
s = z > 0 ? (t - g) / z : 0;
|
|
1361
1361
|
}
|
|
1362
1362
|
const l = Number(o.x) + s * (Number(i.x) - Number(o.x)), u = Number(o.y) + s * (Number(i.y) - Number(o.y)), a = Number(o.z) + s * (Number(i.z) - Number(o.z));
|
|
1363
1363
|
let c, m, d;
|
|
1364
|
-
const f = Number(o.azimuth), h = Number(o.dip), b = Number(i.azimuth),
|
|
1364
|
+
const f = Number(o.azimuth), h = Number(o.dip), b = Number(i.azimuth), y = Number(i.dip);
|
|
1365
1365
|
if (Number.isFinite(f) && Number.isFinite(h)) {
|
|
1366
|
-
const g = Number.isFinite(b) && Number.isFinite(
|
|
1367
|
-
c = Math.cos(
|
|
1366
|
+
const g = Number.isFinite(b) && Number.isFinite(y) ? f + s * (b - f) : f, M = Number.isFinite(b) && Number.isFinite(y) ? h + s * (y - h) : h, z = g * Math.PI / 180, D = M * Math.PI / 180;
|
|
1367
|
+
c = Math.cos(D) * Math.sin(z), m = Math.cos(D) * Math.cos(z), d = -Math.sin(D);
|
|
1368
1368
|
} else {
|
|
1369
|
-
const g = Number(i.x) - Number(o.x),
|
|
1370
|
-
if (
|
|
1371
|
-
c = g /
|
|
1369
|
+
const g = Number(i.x) - Number(o.x), M = Number(i.y) - Number(o.y), z = Number(i.z) - Number(o.z), D = Math.sqrt(g * g + M * M + z * z);
|
|
1370
|
+
if (D < 1e-10) return { x: l, y: u, z: a, dx: 0, dy: 0, dz: -1 };
|
|
1371
|
+
c = g / D, m = M / D, d = z / D;
|
|
1372
1372
|
}
|
|
1373
1373
|
const p = Math.sqrt(c * c + m * m + d * d);
|
|
1374
1374
|
return p < 1e-10 ? { x: l, y: u, z: a, dx: 0, dy: 0, dz: -1 } : { x: l, y: u, z: a, dx: c / p, dy: m / p, dz: d / p };
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function Gn(e, t, n, r = {}) {
|
|
1377
1377
|
const { betaZeroAxis: o = "B", betaHandedness: i = 1 } = r, { dx: s, dy: l, dz: u } = n, a = [s, l, u];
|
|
1378
1378
|
let c = [0, 0, 1];
|
|
1379
1379
|
const m = a[0] * c[0] + a[1] * c[1] + a[2] * c[2];
|
|
@@ -1386,18 +1386,18 @@ function $n(e, t, n, r = {}) {
|
|
|
1386
1386
|
a[1] * h[2] - a[2] * h[1],
|
|
1387
1387
|
a[2] * h[0] - a[0] * h[2],
|
|
1388
1388
|
a[0] * h[1] - a[1] * h[0]
|
|
1389
|
-
],
|
|
1389
|
+
], y = Math.sqrt(b[0] ** 2 + b[1] ** 2 + b[2] ** 2), p = y > 1e-10 ? [b[0] / y, b[1] / y, b[2] / y] : [0, 1, 0], g = o === "R" ? h : p, M = t * Math.PI / 180 * i, z = Math.cos(M), D = Math.sin(M), x = g[0] * a[0] + g[1] * a[1] + g[2] * a[2], O = [
|
|
1390
1390
|
a[1] * g[2] - a[2] * g[1],
|
|
1391
1391
|
a[2] * g[0] - a[0] * g[2],
|
|
1392
1392
|
a[0] * g[1] - a[1] * g[0]
|
|
1393
|
-
],
|
|
1394
|
-
g[0] *
|
|
1395
|
-
g[1] *
|
|
1396
|
-
g[2] *
|
|
1397
|
-
],
|
|
1398
|
-
return
|
|
1399
|
-
}
|
|
1400
|
-
function
|
|
1393
|
+
], $ = [
|
|
1394
|
+
g[0] * z + O[0] * D + a[0] * x * (1 - z),
|
|
1395
|
+
g[1] * z + O[1] * D + a[1] * x * (1 - z),
|
|
1396
|
+
g[2] * z + O[2] * D + a[2] * x * (1 - z)
|
|
1397
|
+
], P = (90 - e) * Math.PI / 180, E = Math.cos(P), F = Math.sin(P), C = E * $[0] + F * a[0], H = E * $[1] + F * a[1], R = E * $[2] + F * a[2], v = Math.sqrt(C * C + H * H + R * R);
|
|
1398
|
+
return v < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: C / v, ny: H / v, nz: R / v };
|
|
1399
|
+
}
|
|
1400
|
+
function Un(e, t, n = {}) {
|
|
1401
1401
|
if (!(e != null && e.length) || !(t != null && t.length)) return [];
|
|
1402
1402
|
const r = /* @__PURE__ */ new Map();
|
|
1403
1403
|
for (const i of t) {
|
|
@@ -1414,25 +1414,25 @@ function Vn(e, t, n = {}) {
|
|
|
1414
1414
|
if (!l || l.length === 0) continue;
|
|
1415
1415
|
const u = i.depth != null ? Number(i.depth) : i.mid != null ? Number(i.mid) : null;
|
|
1416
1416
|
if (!Number.isFinite(u)) continue;
|
|
1417
|
-
const a =
|
|
1417
|
+
const a = jn(l, u);
|
|
1418
1418
|
if (!a) continue;
|
|
1419
1419
|
const { x: c, y: m, z: d, dx: f, dy: h, dz: b } = a;
|
|
1420
|
-
let
|
|
1421
|
-
const
|
|
1422
|
-
if (Number.isFinite(
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1420
|
+
let y, p, g;
|
|
1421
|
+
const M = i.alpha != null ? Number(i.alpha) : null, z = i.beta != null ? Number(i.beta) : null;
|
|
1422
|
+
if (Number.isFinite(M)) {
|
|
1423
|
+
const D = Number.isFinite(z) ? z : 0, x = Gn(M, D, { dx: f, dy: h, dz: b }, n);
|
|
1424
|
+
y = x.nx, p = x.ny, g = x.nz;
|
|
1425
1425
|
} else {
|
|
1426
|
-
const
|
|
1427
|
-
if (!Number.isFinite(
|
|
1428
|
-
const
|
|
1429
|
-
|
|
1426
|
+
const D = i.dip != null ? Number(i.dip) : null, x = i.azimuth != null ? Number(i.azimuth) : null;
|
|
1427
|
+
if (!Number.isFinite(D) || !Number.isFinite(x)) continue;
|
|
1428
|
+
const O = D * Math.PI / 180, $ = x * Math.PI / 180;
|
|
1429
|
+
y = Math.sin($) * Math.sin(O), p = Math.cos($) * Math.sin(O), g = Math.cos(O);
|
|
1430
1430
|
}
|
|
1431
|
-
o.push({ ...i, x: c, y: m, z: d, nx:
|
|
1431
|
+
o.push({ ...i, x: c, y: m, z: d, nx: y, ny: p, nz: g });
|
|
1432
1432
|
}
|
|
1433
1433
|
return o;
|
|
1434
1434
|
}
|
|
1435
|
-
const
|
|
1435
|
+
const Yn = "baselode", ii = Yn, qn = [
|
|
1436
1436
|
"#8b1e3f",
|
|
1437
1437
|
"#2563eb",
|
|
1438
1438
|
"#16a34a",
|
|
@@ -1443,7 +1443,7 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1443
1443
|
"#10b981",
|
|
1444
1444
|
"#f97316",
|
|
1445
1445
|
"#8b5cf6"
|
|
1446
|
-
],
|
|
1446
|
+
], V = {
|
|
1447
1447
|
bg: "#ffffff",
|
|
1448
1448
|
panel: "#f8fafc",
|
|
1449
1449
|
ink: "#1e293b",
|
|
@@ -1459,29 +1459,29 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1459
1459
|
primary_2: "#a8324f"
|
|
1460
1460
|
}, Ce = {
|
|
1461
1461
|
layout: {
|
|
1462
|
-
paper_bgcolor:
|
|
1463
|
-
plot_bgcolor:
|
|
1464
|
-
colorway:
|
|
1462
|
+
paper_bgcolor: V.bg,
|
|
1463
|
+
plot_bgcolor: V.bg,
|
|
1464
|
+
colorway: qn,
|
|
1465
1465
|
font: {
|
|
1466
1466
|
family: "Inter, system-ui, sans-serif",
|
|
1467
1467
|
size: 12,
|
|
1468
|
-
color:
|
|
1468
|
+
color: V.ink
|
|
1469
1469
|
},
|
|
1470
1470
|
title: {
|
|
1471
|
-
font: { size: 14, color:
|
|
1471
|
+
font: { size: 14, color: V.ink },
|
|
1472
1472
|
x: 0.05
|
|
1473
1473
|
},
|
|
1474
1474
|
hovermode: "x unified",
|
|
1475
1475
|
hoverlabel: {
|
|
1476
|
-
bgcolor:
|
|
1477
|
-
bordercolor:
|
|
1478
|
-
font: { size: 12, color:
|
|
1476
|
+
bgcolor: V.bg,
|
|
1477
|
+
bordercolor: V.line,
|
|
1478
|
+
font: { size: 12, color: V.ink }
|
|
1479
1479
|
},
|
|
1480
1480
|
legend: {
|
|
1481
1481
|
bgcolor: "rgba(255,255,255,0.9)",
|
|
1482
|
-
bordercolor:
|
|
1482
|
+
bordercolor: V.muted_3,
|
|
1483
1483
|
borderwidth: 1,
|
|
1484
|
-
font: { size: 11, color:
|
|
1484
|
+
font: { size: 11, color: V.ink },
|
|
1485
1485
|
orientation: "h",
|
|
1486
1486
|
yanchor: "bottom",
|
|
1487
1487
|
y: 1.02,
|
|
@@ -1491,34 +1491,34 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1491
1491
|
xaxis: {
|
|
1492
1492
|
showline: !0,
|
|
1493
1493
|
linewidth: 1,
|
|
1494
|
-
linecolor:
|
|
1494
|
+
linecolor: V.line,
|
|
1495
1495
|
mirror: !1,
|
|
1496
1496
|
ticks: "outside",
|
|
1497
1497
|
tickwidth: 1,
|
|
1498
|
-
tickcolor:
|
|
1498
|
+
tickcolor: V.line,
|
|
1499
1499
|
ticklen: 4,
|
|
1500
1500
|
showgrid: !0,
|
|
1501
|
-
gridcolor:
|
|
1501
|
+
gridcolor: V.grid,
|
|
1502
1502
|
gridwidth: 1,
|
|
1503
1503
|
zeroline: !1,
|
|
1504
|
-
title_font: { color:
|
|
1505
|
-
tickfont: { color:
|
|
1504
|
+
title_font: { color: V.ink, size: 12 },
|
|
1505
|
+
tickfont: { color: V.ink_soft, size: 10 }
|
|
1506
1506
|
},
|
|
1507
1507
|
yaxis: {
|
|
1508
1508
|
showline: !0,
|
|
1509
1509
|
linewidth: 1,
|
|
1510
|
-
linecolor:
|
|
1510
|
+
linecolor: V.line,
|
|
1511
1511
|
mirror: !1,
|
|
1512
1512
|
ticks: "outside",
|
|
1513
1513
|
tickwidth: 1,
|
|
1514
|
-
tickcolor:
|
|
1514
|
+
tickcolor: V.line,
|
|
1515
1515
|
ticklen: 4,
|
|
1516
1516
|
showgrid: !0,
|
|
1517
|
-
gridcolor:
|
|
1517
|
+
gridcolor: V.grid,
|
|
1518
1518
|
gridwidth: 1,
|
|
1519
1519
|
zeroline: !1,
|
|
1520
|
-
title_font: { color:
|
|
1521
|
-
tickfont: { color:
|
|
1520
|
+
title_font: { color: V.ink, size: 12 },
|
|
1521
|
+
tickfont: { color: V.ink_soft, size: 10 }
|
|
1522
1522
|
},
|
|
1523
1523
|
modebar: {
|
|
1524
1524
|
remove: ["select2d", "lasso2d", "autoScale2d"]
|
|
@@ -1529,34 +1529,34 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1529
1529
|
data: {
|
|
1530
1530
|
scatter: [{
|
|
1531
1531
|
mode: "lines+markers",
|
|
1532
|
-
line: { width: 2, color:
|
|
1532
|
+
line: { width: 2, color: V.primary },
|
|
1533
1533
|
marker: {
|
|
1534
1534
|
size: 7,
|
|
1535
|
-
color:
|
|
1536
|
-
line: { width: 1.5, color:
|
|
1535
|
+
color: V.primary_2,
|
|
1536
|
+
line: { width: 1.5, color: V.bg }
|
|
1537
1537
|
}
|
|
1538
1538
|
}],
|
|
1539
1539
|
bar: [{
|
|
1540
1540
|
marker: {
|
|
1541
|
-
color:
|
|
1542
|
-
line: { color:
|
|
1541
|
+
color: V.primary,
|
|
1542
|
+
line: { color: V.bg, width: 0 }
|
|
1543
1543
|
}
|
|
1544
1544
|
}],
|
|
1545
1545
|
histogram: [{
|
|
1546
1546
|
marker: {
|
|
1547
|
-
color:
|
|
1548
|
-
line: { color:
|
|
1547
|
+
color: V.primary,
|
|
1548
|
+
line: { color: V.bg, width: 0 }
|
|
1549
1549
|
}
|
|
1550
1550
|
}],
|
|
1551
1551
|
box: [{
|
|
1552
|
-
fillcolor:
|
|
1553
|
-
line: { color:
|
|
1554
|
-
marker: { color:
|
|
1552
|
+
fillcolor: V.accent,
|
|
1553
|
+
line: { color: V.ink, width: 1.5 },
|
|
1554
|
+
marker: { color: V.ink }
|
|
1555
1555
|
}],
|
|
1556
1556
|
violin: [{
|
|
1557
|
-
fillcolor:
|
|
1558
|
-
line: { color:
|
|
1559
|
-
marker: { color:
|
|
1557
|
+
fillcolor: V.accent,
|
|
1558
|
+
line: { color: V.ink, width: 1.5 },
|
|
1559
|
+
marker: { color: V.ink }
|
|
1560
1560
|
}],
|
|
1561
1561
|
heatmap: [{
|
|
1562
1562
|
colorscale: [
|
|
@@ -1568,9 +1568,9 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1568
1568
|
[1, "#1e293b"]
|
|
1569
1569
|
],
|
|
1570
1570
|
colorbar: {
|
|
1571
|
-
outlinecolor:
|
|
1572
|
-
tickcolor:
|
|
1573
|
-
tickfont: { color:
|
|
1571
|
+
outlinecolor: V.line,
|
|
1572
|
+
tickcolor: V.line,
|
|
1573
|
+
tickfont: { color: V.ink_soft }
|
|
1574
1574
|
}
|
|
1575
1575
|
}],
|
|
1576
1576
|
contour: [{
|
|
@@ -1582,13 +1582,13 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1582
1582
|
[1, "#1e293b"]
|
|
1583
1583
|
],
|
|
1584
1584
|
colorbar: {
|
|
1585
|
-
outlinecolor:
|
|
1586
|
-
tickcolor:
|
|
1587
|
-
tickfont: { color:
|
|
1585
|
+
outlinecolor: V.line,
|
|
1586
|
+
tickcolor: V.line,
|
|
1587
|
+
tickfont: { color: V.ink_soft }
|
|
1588
1588
|
}
|
|
1589
1589
|
}]
|
|
1590
1590
|
}
|
|
1591
|
-
},
|
|
1591
|
+
}, si = Ce, T = {
|
|
1592
1592
|
bg: "#1b1b1f",
|
|
1593
1593
|
panel: "#25252a",
|
|
1594
1594
|
ink: "#f0f0e4",
|
|
@@ -1600,11 +1600,11 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1600
1600
|
muted_1: "#8a8a80",
|
|
1601
1601
|
muted_2: "#5e5e56",
|
|
1602
1602
|
muted_3: "#3a3a34"
|
|
1603
|
-
},
|
|
1603
|
+
}, li = "baselode-dark", ai = {
|
|
1604
1604
|
layout: {
|
|
1605
1605
|
font: {
|
|
1606
1606
|
family: "Inter, Arial, sans-serif",
|
|
1607
|
-
color:
|
|
1607
|
+
color: T.ink,
|
|
1608
1608
|
size: 14
|
|
1609
1609
|
},
|
|
1610
1610
|
title: {
|
|
@@ -1613,37 +1613,37 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1613
1613
|
font: {
|
|
1614
1614
|
family: "Inter, Arial, sans-serif",
|
|
1615
1615
|
size: 22,
|
|
1616
|
-
color:
|
|
1616
|
+
color: T.ink
|
|
1617
1617
|
}
|
|
1618
1618
|
},
|
|
1619
|
-
paper_bgcolor:
|
|
1620
|
-
plot_bgcolor:
|
|
1619
|
+
paper_bgcolor: T.bg,
|
|
1620
|
+
plot_bgcolor: T.bg,
|
|
1621
1621
|
colorway: [
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1622
|
+
T.ink,
|
|
1623
|
+
T.accent,
|
|
1624
|
+
T.muted_1,
|
|
1625
|
+
T.accent_2,
|
|
1626
|
+
T.muted_2,
|
|
1627
|
+
T.muted_3
|
|
1628
1628
|
],
|
|
1629
1629
|
margin: { l: 70, r: 30, t: 70, b: 60 },
|
|
1630
1630
|
hovermode: "x unified",
|
|
1631
1631
|
hoverlabel: {
|
|
1632
|
-
bgcolor:
|
|
1633
|
-
bordercolor:
|
|
1632
|
+
bgcolor: T.panel,
|
|
1633
|
+
bordercolor: T.accent,
|
|
1634
1634
|
font: {
|
|
1635
1635
|
family: "Inter, Arial, sans-serif",
|
|
1636
|
-
color:
|
|
1636
|
+
color: T.ink,
|
|
1637
1637
|
size: 13
|
|
1638
1638
|
}
|
|
1639
1639
|
},
|
|
1640
1640
|
legend: {
|
|
1641
1641
|
bgcolor: "rgba(37,37,42,0.88)",
|
|
1642
|
-
bordercolor:
|
|
1642
|
+
bordercolor: T.line,
|
|
1643
1643
|
borderwidth: 1,
|
|
1644
1644
|
font: {
|
|
1645
1645
|
family: "Inter, Arial, sans-serif",
|
|
1646
|
-
color:
|
|
1646
|
+
color: T.ink,
|
|
1647
1647
|
size: 12
|
|
1648
1648
|
},
|
|
1649
1649
|
orientation: "h",
|
|
@@ -1656,27 +1656,27 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1656
1656
|
showline: !1,
|
|
1657
1657
|
ticks: "outside",
|
|
1658
1658
|
tickwidth: 1,
|
|
1659
|
-
tickcolor:
|
|
1659
|
+
tickcolor: T.muted_1,
|
|
1660
1660
|
ticklen: 6,
|
|
1661
1661
|
showgrid: !0,
|
|
1662
|
-
gridcolor:
|
|
1662
|
+
gridcolor: T.grid,
|
|
1663
1663
|
gridwidth: 1,
|
|
1664
1664
|
zeroline: !1,
|
|
1665
|
-
title_font: { color:
|
|
1666
|
-
tickfont: { color:
|
|
1665
|
+
title_font: { color: T.ink },
|
|
1666
|
+
tickfont: { color: T.ink_soft }
|
|
1667
1667
|
},
|
|
1668
1668
|
yaxis: {
|
|
1669
1669
|
showline: !1,
|
|
1670
1670
|
ticks: "outside",
|
|
1671
1671
|
tickwidth: 1,
|
|
1672
|
-
tickcolor:
|
|
1672
|
+
tickcolor: T.muted_1,
|
|
1673
1673
|
ticklen: 6,
|
|
1674
1674
|
showgrid: !0,
|
|
1675
|
-
gridcolor:
|
|
1675
|
+
gridcolor: T.grid,
|
|
1676
1676
|
gridwidth: 1,
|
|
1677
1677
|
zeroline: !1,
|
|
1678
|
-
title_font: { color:
|
|
1679
|
-
tickfont: { color:
|
|
1678
|
+
title_font: { color: T.ink },
|
|
1679
|
+
tickfont: { color: T.ink_soft }
|
|
1680
1680
|
},
|
|
1681
1681
|
bargap: 0.18,
|
|
1682
1682
|
bargroupgap: 0.08
|
|
@@ -1684,34 +1684,34 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1684
1684
|
data: {
|
|
1685
1685
|
scatter: [{
|
|
1686
1686
|
mode: "lines+markers",
|
|
1687
|
-
line: { width: 2.5, color:
|
|
1687
|
+
line: { width: 2.5, color: T.ink },
|
|
1688
1688
|
marker: {
|
|
1689
1689
|
size: 7,
|
|
1690
|
-
color:
|
|
1691
|
-
line: { width: 1.5, color:
|
|
1690
|
+
color: T.ink,
|
|
1691
|
+
line: { width: 1.5, color: T.bg }
|
|
1692
1692
|
}
|
|
1693
1693
|
}],
|
|
1694
1694
|
bar: [{
|
|
1695
1695
|
marker: {
|
|
1696
|
-
color:
|
|
1697
|
-
line: { color:
|
|
1696
|
+
color: T.ink,
|
|
1697
|
+
line: { color: T.bg, width: 0 }
|
|
1698
1698
|
}
|
|
1699
1699
|
}],
|
|
1700
1700
|
histogram: [{
|
|
1701
1701
|
marker: {
|
|
1702
|
-
color:
|
|
1703
|
-
line: { color:
|
|
1702
|
+
color: T.ink,
|
|
1703
|
+
line: { color: T.bg, width: 0 }
|
|
1704
1704
|
}
|
|
1705
1705
|
}],
|
|
1706
1706
|
box: [{
|
|
1707
|
-
fillcolor:
|
|
1708
|
-
line: { color:
|
|
1709
|
-
marker: { color:
|
|
1707
|
+
fillcolor: T.accent,
|
|
1708
|
+
line: { color: T.ink, width: 1.5 },
|
|
1709
|
+
marker: { color: T.ink }
|
|
1710
1710
|
}],
|
|
1711
1711
|
violin: [{
|
|
1712
|
-
fillcolor:
|
|
1713
|
-
line: { color:
|
|
1714
|
-
marker: { color:
|
|
1712
|
+
fillcolor: T.accent,
|
|
1713
|
+
line: { color: T.ink, width: 1.5 },
|
|
1714
|
+
marker: { color: T.ink }
|
|
1715
1715
|
}],
|
|
1716
1716
|
heatmap: [{
|
|
1717
1717
|
colorscale: [
|
|
@@ -1723,9 +1723,9 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1723
1723
|
[1, "#ffffbb"]
|
|
1724
1724
|
],
|
|
1725
1725
|
colorbar: {
|
|
1726
|
-
outlinecolor:
|
|
1727
|
-
tickcolor:
|
|
1728
|
-
tickfont: { color:
|
|
1726
|
+
outlinecolor: T.ink,
|
|
1727
|
+
tickcolor: T.ink,
|
|
1728
|
+
tickfont: { color: T.ink_soft }
|
|
1729
1729
|
}
|
|
1730
1730
|
}],
|
|
1731
1731
|
contour: [{
|
|
@@ -1737,13 +1737,13 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1737
1737
|
[1, "#ffffbb"]
|
|
1738
1738
|
],
|
|
1739
1739
|
colorbar: {
|
|
1740
|
-
outlinecolor:
|
|
1741
|
-
tickcolor:
|
|
1742
|
-
tickfont: { color:
|
|
1740
|
+
outlinecolor: T.ink,
|
|
1741
|
+
tickcolor: T.ink,
|
|
1742
|
+
tickfont: { color: T.ink_soft }
|
|
1743
1743
|
}
|
|
1744
1744
|
}]
|
|
1745
1745
|
}
|
|
1746
|
-
},
|
|
1746
|
+
}, Xn = "#7f7f7f", Ve = {
|
|
1747
1747
|
Au: "#FFD700",
|
|
1748
1748
|
// gold
|
|
1749
1749
|
Ag: "#C0C0C0",
|
|
@@ -1780,7 +1780,7 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1780
1780
|
// aluminium / yellow
|
|
1781
1781
|
U: "#8BC34A"
|
|
1782
1782
|
// uranium / lime green
|
|
1783
|
-
},
|
|
1783
|
+
}, Zn = {
|
|
1784
1784
|
// Sedimentary
|
|
1785
1785
|
shale: "#607D8B",
|
|
1786
1786
|
mudstone: "#78909C",
|
|
@@ -1819,11 +1819,11 @@ const Hn = "baselode", Go = Hn, jn = [
|
|
|
1819
1819
|
calcite: "#F9FBE7",
|
|
1820
1820
|
vein: "#FFFFFF",
|
|
1821
1821
|
unknown: "#9E9E9E"
|
|
1822
|
-
},
|
|
1823
|
-
commodity:
|
|
1824
|
-
lithology:
|
|
1822
|
+
}, qe = {
|
|
1823
|
+
commodity: Ve,
|
|
1824
|
+
lithology: Zn
|
|
1825
1825
|
};
|
|
1826
|
-
function
|
|
1826
|
+
function Wn(e, t, n = Xn) {
|
|
1827
1827
|
if (!t || e == null) return n;
|
|
1828
1828
|
const r = String(e).trim();
|
|
1829
1829
|
if (Object.prototype.hasOwnProperty.call(t, r)) return t[r];
|
|
@@ -1832,13 +1832,13 @@ function Un(e, t, n = Rn) {
|
|
|
1832
1832
|
if (String(i).trim().toLowerCase() === o) return s;
|
|
1833
1833
|
return n;
|
|
1834
1834
|
}
|
|
1835
|
-
function
|
|
1835
|
+
function Kn(e) {
|
|
1836
1836
|
if (e == null) return {};
|
|
1837
1837
|
if (typeof e == "string") {
|
|
1838
1838
|
const t = e.trim().toLowerCase();
|
|
1839
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1840
|
-
return
|
|
1841
|
-
const n = Object.keys(
|
|
1839
|
+
if (Object.prototype.hasOwnProperty.call(qe, t))
|
|
1840
|
+
return qe[t];
|
|
1841
|
+
const n = Object.keys(qe).sort().join(", ");
|
|
1842
1842
|
throw new RangeError(
|
|
1843
1843
|
`Unknown built-in colour map '${e}'. Available maps: ${n}`
|
|
1844
1844
|
);
|
|
@@ -1848,39 +1848,39 @@ function Yn(e) {
|
|
|
1848
1848
|
`colourMap must be null, a string, or a plain object; got ${Array.isArray(e) ? "Array" : Object.prototype.toString.call(e)}`
|
|
1849
1849
|
);
|
|
1850
1850
|
}
|
|
1851
|
-
const
|
|
1852
|
-
function
|
|
1851
|
+
const Jn = "#8b1e3f", Qn = "#a8324f";
|
|
1852
|
+
function er(e) {
|
|
1853
1853
|
if (!e) return null;
|
|
1854
1854
|
const t = e.split(/[_\-/\s]+/);
|
|
1855
1855
|
for (const n of t) {
|
|
1856
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1857
|
-
return
|
|
1856
|
+
if (Object.prototype.hasOwnProperty.call(Ve, n))
|
|
1857
|
+
return Ve[n];
|
|
1858
1858
|
const r = n.toLowerCase();
|
|
1859
|
-
for (const [o, i] of Object.entries(
|
|
1859
|
+
for (const [o, i] of Object.entries(Ve))
|
|
1860
1860
|
if (o.toLowerCase() === r) return i;
|
|
1861
1861
|
}
|
|
1862
1862
|
return null;
|
|
1863
1863
|
}
|
|
1864
|
-
const
|
|
1865
|
-
function
|
|
1864
|
+
const tr = "#6b7280", nr = { l: 42, r: 4, t: 4, b: 30 }, mt = 10, ft = 12;
|
|
1865
|
+
function ht(e) {
|
|
1866
1866
|
return e ? typeof e == "string" ? { text: e } : e : {};
|
|
1867
1867
|
}
|
|
1868
1868
|
function Ft(e = {}) {
|
|
1869
|
-
const t =
|
|
1869
|
+
const t = ht(e.xaxis && e.xaxis.title), n = ht(e.yaxis && e.yaxis.title);
|
|
1870
1870
|
return {
|
|
1871
1871
|
...e,
|
|
1872
|
-
margin:
|
|
1872
|
+
margin: nr,
|
|
1873
1873
|
autosize: !0,
|
|
1874
1874
|
width: void 0,
|
|
1875
1875
|
xaxis: {
|
|
1876
1876
|
...e.xaxis || {},
|
|
1877
1877
|
tickfont: {
|
|
1878
1878
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
1879
|
-
size:
|
|
1879
|
+
size: mt
|
|
1880
1880
|
},
|
|
1881
1881
|
title: {
|
|
1882
1882
|
...t,
|
|
1883
|
-
font: { ...t.font || {}, size:
|
|
1883
|
+
font: { ...t.font || {}, size: ft }
|
|
1884
1884
|
}
|
|
1885
1885
|
},
|
|
1886
1886
|
yaxis: {
|
|
@@ -1888,16 +1888,16 @@ function Ft(e = {}) {
|
|
|
1888
1888
|
automargin: !0,
|
|
1889
1889
|
tickfont: {
|
|
1890
1890
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
1891
|
-
size:
|
|
1891
|
+
size: mt
|
|
1892
1892
|
},
|
|
1893
1893
|
title: {
|
|
1894
1894
|
...n,
|
|
1895
|
-
font: { ...n.font || {}, size:
|
|
1895
|
+
font: { ...n.font || {}, size: ft }
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
1898
1898
|
};
|
|
1899
1899
|
}
|
|
1900
|
-
function
|
|
1900
|
+
function rr(e, t) {
|
|
1901
1901
|
var r;
|
|
1902
1902
|
if (!e || !t) return !1;
|
|
1903
1903
|
const n = e.points || [];
|
|
@@ -1908,7 +1908,7 @@ function Jn(e, t) {
|
|
|
1908
1908
|
}
|
|
1909
1909
|
return !1;
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1911
|
+
function or(e, t, n) {
|
|
1912
1912
|
if (!e || !t) return [];
|
|
1913
1913
|
const r = (e == null ? void 0 : e.points) || [], o = [], i = /* @__PURE__ */ new Set();
|
|
1914
1914
|
return r.forEach((s) => {
|
|
@@ -1937,11 +1937,11 @@ function Qn(e, t, n) {
|
|
|
1937
1937
|
});
|
|
1938
1938
|
}), o.sort((s, l) => l.z - s.z);
|
|
1939
1939
|
}
|
|
1940
|
-
function
|
|
1940
|
+
function ir(e, t, n, r) {
|
|
1941
1941
|
if (!e.length) return { data: [], layout: {} };
|
|
1942
1942
|
const o = e.filter((d) => Number.isFinite(d == null ? void 0 : d.from) && Number.isFinite(d == null ? void 0 : d.to) && d.to > d.from).map((d) => ({ ...d, category: `${(d == null ? void 0 : d.val) ?? ""}`.trim() })).filter((d) => d.category !== "" && !/^(nan|null|none)$/i.test(d.category)).sort((d, f) => d.from - f.from || d.to - f.to);
|
|
1943
1943
|
if (!o.length) return { data: [], layout: {} };
|
|
1944
|
-
const i =
|
|
1944
|
+
const i = Kn(n), s = [
|
|
1945
1945
|
"#1f77b4",
|
|
1946
1946
|
// blue
|
|
1947
1947
|
"#ff7f0e",
|
|
@@ -1973,7 +1973,7 @@ function er(e, t, n, r) {
|
|
|
1973
1973
|
], l = [...new Set(o.map((d) => d.category))];
|
|
1974
1974
|
function u(d, f) {
|
|
1975
1975
|
if (i && Object.keys(i).length > 0) {
|
|
1976
|
-
const h =
|
|
1976
|
+
const h = Wn(d, i, null);
|
|
1977
1977
|
if (h !== null) return h;
|
|
1978
1978
|
}
|
|
1979
1979
|
return s[f % s.length];
|
|
@@ -2005,9 +2005,9 @@ function er(e, t, n, r) {
|
|
|
2005
2005
|
template: r !== void 0 ? r : Ce
|
|
2006
2006
|
}) };
|
|
2007
2007
|
}
|
|
2008
|
-
function
|
|
2008
|
+
function sr(e, t, n, r, o) {
|
|
2009
2009
|
if (!e.length) return { data: [], layout: {} };
|
|
2010
|
-
const i = n === "bar", s = n === "markers", l = n === "line", u = r ||
|
|
2010
|
+
const i = n === "bar", s = n === "markers", l = n === "line", u = r || Jn, a = r || Qn, c = {
|
|
2011
2011
|
x: e.map((h) => h.val),
|
|
2012
2012
|
y: e.map((h) => h.z),
|
|
2013
2013
|
hovertemplate: `${t}: %{x}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`,
|
|
@@ -2019,7 +2019,7 @@ function tr(e, t, n, r, o) {
|
|
|
2019
2019
|
arrayminus: e.map((h) => h.errorMinus),
|
|
2020
2020
|
thickness: 1.5,
|
|
2021
2021
|
width: 2,
|
|
2022
|
-
color:
|
|
2022
|
+
color: tr
|
|
2023
2023
|
};
|
|
2024
2024
|
return { data: [i ? {
|
|
2025
2025
|
...c,
|
|
@@ -2042,14 +2042,14 @@ function tr(e, t, n, r, o) {
|
|
|
2042
2042
|
template: o !== void 0 ? o : Ce
|
|
2043
2043
|
}) };
|
|
2044
2044
|
}
|
|
2045
|
-
function
|
|
2045
|
+
function Tt({ points: e, isCategorical: t, property: n, chartType: r, colourMap: o, template: i }) {
|
|
2046
2046
|
if (!e || !e.length || !n) return { data: [], layout: {} };
|
|
2047
2047
|
if (t || r === "categorical")
|
|
2048
|
-
return
|
|
2049
|
-
const s =
|
|
2050
|
-
return
|
|
2048
|
+
return ir(e, n, o, i);
|
|
2049
|
+
const s = er(n);
|
|
2050
|
+
return sr(e, n, r, s, i);
|
|
2051
2051
|
}
|
|
2052
|
-
function
|
|
2052
|
+
function ci(e = [], {
|
|
2053
2053
|
fromCol: t = "from",
|
|
2054
2054
|
toCol: n = "to",
|
|
2055
2055
|
categoryCol: r = "geology_code",
|
|
@@ -2069,7 +2069,7 @@ function Xo(e = [], {
|
|
|
2069
2069
|
errorPlus: a - m,
|
|
2070
2070
|
errorMinus: m - u
|
|
2071
2071
|
});
|
|
2072
|
-
}), s.sort((l, u) => u.z - l.z),
|
|
2072
|
+
}), s.sort((l, u) => u.z - l.z), Tt({
|
|
2073
2073
|
points: s,
|
|
2074
2074
|
isCategorical: !0,
|
|
2075
2075
|
property: r,
|
|
@@ -2078,7 +2078,7 @@ function Xo(e = [], {
|
|
|
2078
2078
|
template: i
|
|
2079
2079
|
});
|
|
2080
2080
|
}
|
|
2081
|
-
const
|
|
2081
|
+
const wt = [
|
|
2082
2082
|
"#0f172a",
|
|
2083
2083
|
"#1e3a5f",
|
|
2084
2084
|
"#7c3aed",
|
|
@@ -2089,24 +2089,24 @@ const Ot = [
|
|
|
2089
2089
|
"#db2777",
|
|
2090
2090
|
"#65a30d",
|
|
2091
2091
|
"#9333ea"
|
|
2092
|
-
],
|
|
2093
|
-
function
|
|
2092
|
+
], lr = { l: 42, r: 4, t: 4, b: 30 }, pt = 10, bt = 12;
|
|
2093
|
+
function $t(e = {}) {
|
|
2094
2094
|
return {
|
|
2095
2095
|
...e,
|
|
2096
|
-
margin:
|
|
2096
|
+
margin: lr,
|
|
2097
2097
|
autosize: !0,
|
|
2098
2098
|
width: void 0,
|
|
2099
2099
|
xaxis: {
|
|
2100
2100
|
...e.xaxis || {},
|
|
2101
2101
|
tickfont: {
|
|
2102
2102
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
2103
|
-
size:
|
|
2103
|
+
size: pt
|
|
2104
2104
|
},
|
|
2105
2105
|
title: {
|
|
2106
2106
|
...e.xaxis && e.xaxis.title || {},
|
|
2107
2107
|
font: {
|
|
2108
2108
|
...e.xaxis && e.xaxis.title && e.xaxis.title.font || {},
|
|
2109
|
-
size:
|
|
2109
|
+
size: bt
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
2112
|
},
|
|
@@ -2115,25 +2115,25 @@ function Pt(e = {}) {
|
|
|
2115
2115
|
automargin: !0,
|
|
2116
2116
|
tickfont: {
|
|
2117
2117
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
2118
|
-
size:
|
|
2118
|
+
size: pt
|
|
2119
2119
|
},
|
|
2120
2120
|
title: {
|
|
2121
2121
|
...e.yaxis && e.yaxis.title || {},
|
|
2122
2122
|
font: {
|
|
2123
2123
|
...e.yaxis && e.yaxis.title && e.yaxis.title.font || {},
|
|
2124
|
-
size:
|
|
2124
|
+
size: bt
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
2127
|
}
|
|
2128
2128
|
};
|
|
2129
2129
|
}
|
|
2130
|
-
function
|
|
2130
|
+
function ar(e, {
|
|
2131
2131
|
tailScale: t = 5,
|
|
2132
2132
|
colorBy: n = null,
|
|
2133
|
-
palette: r =
|
|
2133
|
+
palette: r = wt,
|
|
2134
2134
|
depthCol: o = W,
|
|
2135
|
-
dipCol: i =
|
|
2136
|
-
azCol: s =
|
|
2135
|
+
dipCol: i = X,
|
|
2136
|
+
azCol: s = q,
|
|
2137
2137
|
template: l = void 0
|
|
2138
2138
|
} = {}) {
|
|
2139
2139
|
const u = e.filter(
|
|
@@ -2142,36 +2142,36 @@ function rr(e, {
|
|
|
2142
2142
|
if (!u.length)
|
|
2143
2143
|
return { data: [], layout: {} };
|
|
2144
2144
|
const a = {};
|
|
2145
|
-
n && [...new Set(u.map((
|
|
2146
|
-
a[
|
|
2145
|
+
n && [...new Set(u.map((y) => y[n]).filter((y) => y != null))].sort().forEach((y, p) => {
|
|
2146
|
+
a[y] = r[p % r.length];
|
|
2147
2147
|
});
|
|
2148
2148
|
const c = /* @__PURE__ */ new Map(), m = [];
|
|
2149
2149
|
for (const b of u) {
|
|
2150
|
-
const
|
|
2151
|
-
c.has(
|
|
2152
|
-
const
|
|
2153
|
-
|
|
2154
|
-
const
|
|
2150
|
+
const y = Number(b[o]), p = Number(b[i]), g = Number(b[s]), M = n ? b[n] ?? "_default" : "_default", z = n ? a[M] ?? "#0f172a" : "#0f172a";
|
|
2151
|
+
c.has(M) || c.set(M, { xs: [], ys: [], dips: [], azs: [], color: z });
|
|
2152
|
+
const D = c.get(M);
|
|
2153
|
+
D.xs.push(p), D.ys.push(y), D.dips.push(p), D.azs.push(g);
|
|
2154
|
+
const x = g * Math.PI / 180, O = t * (Math.abs(p) / 90), $ = Math.sin(x) * O, P = Math.cos(x) * O;
|
|
2155
2155
|
m.push({
|
|
2156
2156
|
type: "line",
|
|
2157
2157
|
x0: p,
|
|
2158
|
-
y0:
|
|
2159
|
-
x1: p +
|
|
2160
|
-
y1:
|
|
2161
|
-
line: { color:
|
|
2158
|
+
y0: y,
|
|
2159
|
+
x1: p + $,
|
|
2160
|
+
y1: y + P,
|
|
2161
|
+
line: { color: z, width: 2 }
|
|
2162
2162
|
});
|
|
2163
2163
|
}
|
|
2164
2164
|
const d = [], f = n && c.size > 1;
|
|
2165
|
-
for (const [b,
|
|
2165
|
+
for (const [b, y] of c.entries())
|
|
2166
2166
|
d.push({
|
|
2167
2167
|
type: "scatter",
|
|
2168
|
-
x:
|
|
2169
|
-
y:
|
|
2168
|
+
x: y.xs,
|
|
2169
|
+
y: y.ys,
|
|
2170
2170
|
mode: "markers",
|
|
2171
2171
|
name: b !== "_default" ? String(b) : void 0,
|
|
2172
|
-
marker: { size: 8, color:
|
|
2172
|
+
marker: { size: 8, color: y.color },
|
|
2173
2173
|
showlegend: f && b !== "_default",
|
|
2174
|
-
customdata:
|
|
2174
|
+
customdata: y.dips.map((p, g) => [p, y.azs[g]]),
|
|
2175
2175
|
hovertemplate: "Depth: %{y}<br>Dip: %{customdata[0]}<br>Az: %{customdata[1]}<extra></extra>"
|
|
2176
2176
|
});
|
|
2177
2177
|
return { data: d, layout: {
|
|
@@ -2190,11 +2190,11 @@ function rr(e, {
|
|
|
2190
2190
|
template: l !== void 0 ? l : Ce
|
|
2191
2191
|
} };
|
|
2192
2192
|
}
|
|
2193
|
-
function
|
|
2193
|
+
function ui(e, {
|
|
2194
2194
|
labelCol: t = "structure_type",
|
|
2195
|
-
palette: n =
|
|
2196
|
-
fromCol: r =
|
|
2197
|
-
toCol: o =
|
|
2195
|
+
palette: n = wt,
|
|
2196
|
+
fromCol: r = L,
|
|
2197
|
+
toCol: o = w,
|
|
2198
2198
|
template: i = void 0
|
|
2199
2199
|
} = {}) {
|
|
2200
2200
|
const s = e.filter((d) => d[r] != null && d[o] != null && Number(d[o]) > Number(d[r])).filter((d) => {
|
|
@@ -2228,7 +2228,7 @@ function Wo(e, {
|
|
|
2228
2228
|
textposition: "middle center",
|
|
2229
2229
|
showlegend: !1,
|
|
2230
2230
|
hoverinfo: "text"
|
|
2231
|
-
}], layout:
|
|
2231
|
+
}], layout: $t({
|
|
2232
2232
|
shapes: l,
|
|
2233
2233
|
height: 400,
|
|
2234
2234
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
@@ -2237,7 +2237,7 @@ function Wo(e, {
|
|
|
2237
2237
|
template: i !== void 0 ? i : Ce
|
|
2238
2238
|
}) };
|
|
2239
2239
|
}
|
|
2240
|
-
function
|
|
2240
|
+
function gt(e, t) {
|
|
2241
2241
|
if (!e) return "";
|
|
2242
2242
|
const n = String(e).trim().split(/\s+/), r = [];
|
|
2243
2243
|
let o = "";
|
|
@@ -2245,10 +2245,10 @@ function ht(e, t) {
|
|
|
2245
2245
|
o && o.length + 1 + i.length > t ? (r.push(o), o = i) : o = o ? `${o} ${i}` : i;
|
|
2246
2246
|
return o && r.push(o), r.join("<br>");
|
|
2247
2247
|
}
|
|
2248
|
-
function
|
|
2248
|
+
function cr(e, {
|
|
2249
2249
|
commentCol: t = "comments",
|
|
2250
|
-
fromCol: n =
|
|
2251
|
-
toCol: r =
|
|
2250
|
+
fromCol: n = L,
|
|
2251
|
+
toCol: r = w,
|
|
2252
2252
|
bgColor: o = "#f1f5f9",
|
|
2253
2253
|
borderColor: i = "#cbd5e1",
|
|
2254
2254
|
textColor: s = "#1e293b",
|
|
@@ -2256,14 +2256,14 @@ function or(e, {
|
|
|
2256
2256
|
template: u = void 0
|
|
2257
2257
|
} = {}) {
|
|
2258
2258
|
const a = e.filter((p) => p[n] != null && p[r] != null && Number(p[r]) > Number(p[n])).map((p) => {
|
|
2259
|
-
const g = p[t],
|
|
2260
|
-
return { from: Number(p[n]), to: Number(p[r]), comment:
|
|
2259
|
+
const g = p[t], M = g != null && String(g).trim() !== "" && String(g) !== "null" ? String(g).trim() : "";
|
|
2260
|
+
return { from: Number(p[n]), to: Number(p[r]), comment: M };
|
|
2261
2261
|
}).sort((p, g) => p.from - g.from);
|
|
2262
2262
|
if (!a.length)
|
|
2263
2263
|
return { data: [], layout: {} };
|
|
2264
2264
|
const c = [], m = [], d = [], f = [], h = [];
|
|
2265
2265
|
for (const p of a) {
|
|
2266
|
-
const g = 0.5 * (p.from + p.to),
|
|
2266
|
+
const g = 0.5 * (p.from + p.to), M = !!p.comment;
|
|
2267
2267
|
c.push({
|
|
2268
2268
|
type: "rect",
|
|
2269
2269
|
xref: "x",
|
|
@@ -2272,10 +2272,10 @@ function or(e, {
|
|
|
2272
2272
|
x1: 1,
|
|
2273
2273
|
y0: p.from,
|
|
2274
2274
|
y1: p.to,
|
|
2275
|
-
fillcolor:
|
|
2275
|
+
fillcolor: M ? o : "rgba(0,0,0,0)",
|
|
2276
2276
|
line: { color: i, width: 1 },
|
|
2277
2277
|
layer: "below"
|
|
2278
|
-
}),
|
|
2278
|
+
}), M && (m.push(0.5), d.push(g), f.push(gt(p.comment, l)), h.push(`${p.from.toFixed(3)}–${p.to.toFixed(3)} m<br>${gt(p.comment, 40)}`));
|
|
2279
2279
|
}
|
|
2280
2280
|
return { data: m.length ? [{
|
|
2281
2281
|
type: "scatter",
|
|
@@ -2288,7 +2288,7 @@ function or(e, {
|
|
|
2288
2288
|
hovertext: h,
|
|
2289
2289
|
hoverinfo: "text",
|
|
2290
2290
|
showlegend: !1
|
|
2291
|
-
}] : [], layout:
|
|
2291
|
+
}] : [], layout: $t({
|
|
2292
2292
|
shapes: c,
|
|
2293
2293
|
height: 400,
|
|
2294
2294
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
@@ -2297,12 +2297,12 @@ function or(e, {
|
|
|
2297
2297
|
template: u !== void 0 ? u : Ce
|
|
2298
2298
|
}) };
|
|
2299
2299
|
}
|
|
2300
|
-
function
|
|
2300
|
+
function di(e, {
|
|
2301
2301
|
symbolSize: t = 10,
|
|
2302
2302
|
xCol: n = "easting",
|
|
2303
2303
|
yCol: r = "northing"
|
|
2304
2304
|
} = {}) {
|
|
2305
|
-
const o = e[n] != null ? Number(e[n]) : null, i = e[r] != null ? Number(e[r]) : null, s = e[
|
|
2305
|
+
const o = e[n] != null ? Number(e[n]) : null, i = e[r] != null ? Number(e[r]) : null, s = e[X] != null ? Number(e[X]) : null, l = e[q] != null ? Number(e[q]) : null;
|
|
2306
2306
|
if (o === null || i === null || s === null || l === null) return null;
|
|
2307
2307
|
const u = (l - 90 + 360) % 360, a = u * Math.PI / 180, c = l * Math.PI / 180, m = t * Math.sin(a), d = t * Math.cos(a), f = t * 0.4 * (s / 90), h = f * Math.sin(c), b = f * Math.cos(c);
|
|
2308
2308
|
return {
|
|
@@ -2318,106 +2318,106 @@ function Zo(e, {
|
|
|
2318
2318
|
tickY1: i + b
|
|
2319
2319
|
};
|
|
2320
2320
|
}
|
|
2321
|
-
const
|
|
2322
|
-
function
|
|
2321
|
+
const Bt = "markers+line";
|
|
2322
|
+
function ur(e, t) {
|
|
2323
2323
|
var r;
|
|
2324
|
-
const n =
|
|
2325
|
-
return n.some((o) => o.value === t) ? t : ((r = n[0]) == null ? void 0 : r.value) ||
|
|
2324
|
+
const n = et(e);
|
|
2325
|
+
return n.some((o) => o.value === t) ? t : ((r = n[0]) == null ? void 0 : r.value) || Bt;
|
|
2326
2326
|
}
|
|
2327
|
-
function
|
|
2328
|
-
const s =
|
|
2329
|
-
return
|
|
2330
|
-
const p = d ===
|
|
2327
|
+
function mi({ config: e, graph: t, holeOptions: n = [], propertyOptions: r = [], onConfigChange: o, template: i }) {
|
|
2328
|
+
const s = Le(null), l = t == null ? void 0 : t.hole, u = (t == null ? void 0 : t.points) || [], a = (e == null ? void 0 : e.property) || "", c = (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 ? xe : t != null && t.isCategorical ? Oe : ve), f = et(d), h = ur(d, c), [b, y] = Q("");
|
|
2329
|
+
return se(() => {
|
|
2330
|
+
const p = d === xe, g = d === Je;
|
|
2331
2331
|
if (!l || !a || !p && !g && u.length === 0) return;
|
|
2332
|
-
const
|
|
2333
|
-
if (!
|
|
2334
|
-
let
|
|
2332
|
+
const M = s.current;
|
|
2333
|
+
if (!M) return;
|
|
2334
|
+
let z;
|
|
2335
2335
|
try {
|
|
2336
|
-
p ?
|
|
2336
|
+
p ? z = cr(u, { commentCol: a, fromCol: "from", toCol: "to" }) : g ? z = ar(u) : z = Tt({
|
|
2337
2337
|
points: u,
|
|
2338
|
-
isCategorical: d ===
|
|
2338
|
+
isCategorical: d === Oe,
|
|
2339
2339
|
property: a,
|
|
2340
2340
|
chartType: h,
|
|
2341
2341
|
template: i
|
|
2342
2342
|
});
|
|
2343
|
-
} catch (
|
|
2344
|
-
console.error("Plot build error",
|
|
2343
|
+
} catch (x) {
|
|
2344
|
+
console.error("Plot build error", x), y((x == null ? void 0 : x.message) || "Plot build error");
|
|
2345
2345
|
return;
|
|
2346
2346
|
}
|
|
2347
|
-
if ((!(
|
|
2347
|
+
if ((!(z != null && z.data) || z.data.length === 0) && !p)
|
|
2348
2348
|
return;
|
|
2349
|
-
const
|
|
2349
|
+
const D = {
|
|
2350
2350
|
displayModeBar: !0,
|
|
2351
2351
|
responsive: !0,
|
|
2352
2352
|
useResizeHandler: !0,
|
|
2353
2353
|
modeBarButtonsToRemove: ["select2d", "lasso2d", "autoScale2d"]
|
|
2354
2354
|
};
|
|
2355
2355
|
try {
|
|
2356
|
-
|
|
2357
|
-
|
|
2356
|
+
y(""), Fe.react(M, z.data, z.layout, D), requestAnimationFrame(() => {
|
|
2357
|
+
M && M.parentElement && Fe.Plots.resize(M);
|
|
2358
2358
|
});
|
|
2359
|
-
} catch (
|
|
2360
|
-
console.error("Plot render error",
|
|
2359
|
+
} catch (x) {
|
|
2360
|
+
console.error("Plot render error", x), y((x == null ? void 0 : x.message) || "Plot render error");
|
|
2361
2361
|
}
|
|
2362
2362
|
return () => {
|
|
2363
|
-
if (
|
|
2363
|
+
if (M)
|
|
2364
2364
|
try {
|
|
2365
|
-
|
|
2366
|
-
} catch (
|
|
2367
|
-
console.warn("Plot purge error",
|
|
2365
|
+
Fe.purge(M);
|
|
2366
|
+
} catch (x) {
|
|
2367
|
+
console.warn("Plot purge error", x);
|
|
2368
2368
|
}
|
|
2369
2369
|
};
|
|
2370
|
-
}, [l, a, h, d, u, i]),
|
|
2370
|
+
}, [l, a, h, d, u, i]), se(() => {
|
|
2371
2371
|
const p = s.current;
|
|
2372
2372
|
if (!p || typeof ResizeObserver > "u") return;
|
|
2373
2373
|
const g = new ResizeObserver(() => {
|
|
2374
2374
|
try {
|
|
2375
|
-
p && p.data &&
|
|
2376
|
-
} catch (
|
|
2377
|
-
console.warn("Plot resize error",
|
|
2375
|
+
p && p.data && Fe.Plots.resize(p);
|
|
2376
|
+
} catch (M) {
|
|
2377
|
+
console.warn("Plot resize error", M);
|
|
2378
2378
|
}
|
|
2379
2379
|
});
|
|
2380
2380
|
return g.observe(p), () => g.disconnect();
|
|
2381
|
-
}, []), !l || !a ? /* @__PURE__ */
|
|
2381
|
+
}, []), !l || !a ? /* @__PURE__ */ S("div", { className: "plot-card empty", children: /* @__PURE__ */ S("div", { className: "placeholder", children: e != null && e.holeId ? t != null && t.loading ? `Loading ${e.holeId}...` : "Select a property" : "Loading demo data..." }) }) : d !== xe && d !== Je && u.length === 0 ? /* @__PURE__ */ S("div", { className: "plot-card empty", children: /* @__PURE__ */ S("div", { className: "placeholder", children: "No data" }) }) : b ? /* @__PURE__ */ S("div", { className: "plot-card empty", children: /* @__PURE__ */ J("div", { className: "placeholder", children: [
|
|
2382
2382
|
"Plot error: ",
|
|
2383
2383
|
b
|
|
2384
|
-
] }) }) : /* @__PURE__ */
|
|
2385
|
-
/* @__PURE__ */
|
|
2384
|
+
] }) }) : /* @__PURE__ */ J("div", { className: "plot-card", children: [
|
|
2385
|
+
/* @__PURE__ */ S("div", { className: "plot-title", children: /* @__PURE__ */ S(
|
|
2386
2386
|
"select",
|
|
2387
2387
|
{
|
|
2388
2388
|
className: "plot-select",
|
|
2389
2389
|
value: m,
|
|
2390
2390
|
onChange: (p) => o && o({ holeId: p.target.value }),
|
|
2391
2391
|
children: n.map((p) => {
|
|
2392
|
-
const g = typeof p == "string" ? p : p.holeId,
|
|
2393
|
-
return /* @__PURE__ */
|
|
2392
|
+
const g = typeof p == "string" ? p : p.holeId, M = typeof p == "string" ? p : p.label || p.holeId;
|
|
2393
|
+
return /* @__PURE__ */ S("option", { value: g, children: M }, g);
|
|
2394
2394
|
})
|
|
2395
2395
|
}
|
|
2396
2396
|
) }),
|
|
2397
|
-
/* @__PURE__ */
|
|
2398
|
-
r.length > 0 && /* @__PURE__ */
|
|
2397
|
+
/* @__PURE__ */ J("div", { className: "plot-controls column", children: [
|
|
2398
|
+
r.length > 0 && /* @__PURE__ */ S(
|
|
2399
2399
|
"select",
|
|
2400
2400
|
{
|
|
2401
2401
|
className: "plot-select",
|
|
2402
2402
|
value: a,
|
|
2403
2403
|
onChange: (p) => o && o({ property: p.target.value }),
|
|
2404
|
-
children: r.map((p) => /* @__PURE__ */
|
|
2404
|
+
children: r.map((p) => /* @__PURE__ */ S("option", { value: p, children: p }, p))
|
|
2405
2405
|
}
|
|
2406
2406
|
),
|
|
2407
|
-
f.length > 1 && /* @__PURE__ */
|
|
2407
|
+
f.length > 1 && /* @__PURE__ */ S(
|
|
2408
2408
|
"select",
|
|
2409
2409
|
{
|
|
2410
2410
|
className: "plot-select",
|
|
2411
2411
|
value: h,
|
|
2412
2412
|
onChange: (p) => o && o({ chartType: p.target.value }),
|
|
2413
|
-
children: f.map((p) => /* @__PURE__ */
|
|
2413
|
+
children: f.map((p) => /* @__PURE__ */ S("option", { value: p.value, children: p.label }, p.value))
|
|
2414
2414
|
}
|
|
2415
2415
|
)
|
|
2416
2416
|
] }),
|
|
2417
|
-
/* @__PURE__ */
|
|
2417
|
+
/* @__PURE__ */ S("div", { className: "plotly-chart", ref: s })
|
|
2418
2418
|
] });
|
|
2419
2419
|
}
|
|
2420
|
-
function
|
|
2420
|
+
function yt(e, t) {
|
|
2421
2421
|
if (!(t != null && t.length)) return e;
|
|
2422
2422
|
const n = new Map(e.map((r) => [r.id || r.holeId, { ...r }]));
|
|
2423
2423
|
for (const r of t) {
|
|
@@ -2431,7 +2431,7 @@ function pt(e, t) {
|
|
|
2431
2431
|
}
|
|
2432
2432
|
return Array.from(n.values());
|
|
2433
2433
|
}
|
|
2434
|
-
function
|
|
2434
|
+
function dr(e, t) {
|
|
2435
2435
|
if (!e || !t) return [];
|
|
2436
2436
|
const n = /* @__PURE__ */ new Set(), r = [];
|
|
2437
2437
|
for (const o of e.points || []) {
|
|
@@ -2442,146 +2442,146 @@ function sr(e, t) {
|
|
|
2442
2442
|
}
|
|
2443
2443
|
return r;
|
|
2444
2444
|
}
|
|
2445
|
-
function
|
|
2445
|
+
function fi({
|
|
2446
2446
|
initialFocusedHoleId: e = "",
|
|
2447
2447
|
sourceFile: t = null,
|
|
2448
2448
|
extraHoles: n = [],
|
|
2449
2449
|
plotCount: r = 4
|
|
2450
2450
|
} = {}) {
|
|
2451
|
-
const [o, i] =
|
|
2452
|
-
|
|
2453
|
-
!t ||
|
|
2454
|
-
if (!
|
|
2455
|
-
const
|
|
2456
|
-
l(
|
|
2457
|
-
holeIds:
|
|
2458
|
-
focusedHoleId:
|
|
2451
|
+
const [o, i] = Q([]), [s, l] = Q([]), [u, a] = Q([]), [c, m] = Q([]), [d, f] = Q([]), [h, b] = Q({}), [y, p] = Q(""), [g, M] = Q([]), [z, D] = Q(""), [x, O] = Q(e || ""), [$, P] = Q([]), E = Le(null);
|
|
2452
|
+
se(() => {
|
|
2453
|
+
!t || E.current === t || (E.current = t, En(t).then((v) => {
|
|
2454
|
+
if (!v) return;
|
|
2455
|
+
const k = Array.from(new Map(v.map((N) => [N.holeId, N])).values());
|
|
2456
|
+
l(k), M(Dt({
|
|
2457
|
+
holeIds: k.map((N) => N.holeId),
|
|
2458
|
+
focusedHoleId: x,
|
|
2459
2459
|
plotCount: r,
|
|
2460
2460
|
defaultProp: "",
|
|
2461
2461
|
categoricalProps: c,
|
|
2462
2462
|
commentProps: d,
|
|
2463
2463
|
numericDefaultChartType: "markers+line"
|
|
2464
2464
|
}));
|
|
2465
|
-
}).catch((
|
|
2466
|
-
console.info("Assay metadata load skipped:",
|
|
2465
|
+
}).catch((v) => {
|
|
2466
|
+
console.info("Assay metadata load skipped:", v.message);
|
|
2467
2467
|
}));
|
|
2468
|
-
}, [t,
|
|
2468
|
+
}, [t, x, r, c, d]), se(() => {
|
|
2469
2469
|
if (!(n != null && n.length)) return;
|
|
2470
|
-
const
|
|
2471
|
-
l((
|
|
2472
|
-
const N = new Set(
|
|
2473
|
-
return
|
|
2470
|
+
const v = n.map((k) => ({ holeId: k.id || k.holeId })).filter((k) => k.holeId);
|
|
2471
|
+
l((k) => {
|
|
2472
|
+
const N = new Set(k.map((I) => I.holeId)), B = v.filter((I) => !N.has(I.holeId));
|
|
2473
|
+
return B.length ? [...k, ...B] : k;
|
|
2474
2474
|
});
|
|
2475
|
-
}, [n]),
|
|
2476
|
-
|
|
2477
|
-
}, [g]),
|
|
2475
|
+
}, [n]), se(() => {
|
|
2476
|
+
D((v) => v && v.startsWith("Loading ") && v.includes(" for hole ") ? v : "");
|
|
2477
|
+
}, [g]), se(() => {
|
|
2478
2478
|
if (!s.length) {
|
|
2479
|
-
|
|
2479
|
+
M([]);
|
|
2480
2480
|
return;
|
|
2481
2481
|
}
|
|
2482
|
-
const
|
|
2483
|
-
|
|
2482
|
+
const v = Ct(s.map((k) => k.holeId), x);
|
|
2483
|
+
M((k) => Array.from({ length: r }).map((B, I) => {
|
|
2484
2484
|
var K;
|
|
2485
|
-
const
|
|
2486
|
-
property:
|
|
2487
|
-
chartType:
|
|
2485
|
+
const G = k[I] || {}, U = s.some((le) => le.holeId === G.holeId) ? G.holeId : v[I] || ((K = s[I]) == null ? void 0 : K.holeId) || "", j = G.property || y, Z = we({
|
|
2486
|
+
property: j,
|
|
2487
|
+
chartType: G.chartType,
|
|
2488
2488
|
categoricalProps: c,
|
|
2489
2489
|
commentProps: d,
|
|
2490
2490
|
numericDefaultChartType: "markers+line"
|
|
2491
2491
|
});
|
|
2492
|
-
return { holeId:
|
|
2492
|
+
return { holeId: U, property: j, chartType: Z };
|
|
2493
2493
|
}));
|
|
2494
|
-
}, [s,
|
|
2494
|
+
}, [s, x, y, c, d, r]), se(() => {
|
|
2495
2495
|
if (!t) return;
|
|
2496
|
-
g.map((
|
|
2497
|
-
const N = o.some((
|
|
2498
|
-
N ||
|
|
2499
|
-
|
|
2500
|
-
const
|
|
2501
|
-
[...
|
|
2496
|
+
g.map((k) => k.holeId).filter(Boolean).forEach((k) => {
|
|
2497
|
+
const N = o.some((I) => (I.id || I.holeId) === k), B = $.includes(k);
|
|
2498
|
+
N || B || (P((I) => [...I, k]), kn(t, k).then((I) => {
|
|
2499
|
+
P((G) => G.filter((U) => U !== k)), I && i((G) => {
|
|
2500
|
+
const U = yt(
|
|
2501
|
+
[...G.filter((Z) => (Z.id || Z.holeId) !== k), I],
|
|
2502
2502
|
n
|
|
2503
|
-
),
|
|
2504
|
-
return a(
|
|
2503
|
+
), j = Be(U);
|
|
2504
|
+
return a(j.numericProps), m(j.categoricalProps), f(j.commentProps), b(j.columnMeta), !y && j.defaultProp && (p(j.defaultProp), M((Z) => Z.map((K) => ({
|
|
2505
2505
|
...K,
|
|
2506
|
-
property: K.property ||
|
|
2507
|
-
chartType:
|
|
2508
|
-
property: K.property ||
|
|
2506
|
+
property: K.property || j.defaultProp,
|
|
2507
|
+
chartType: we({
|
|
2508
|
+
property: K.property || j.defaultProp,
|
|
2509
2509
|
chartType: K.chartType,
|
|
2510
|
-
categoricalProps:
|
|
2511
|
-
commentProps:
|
|
2510
|
+
categoricalProps: j.categoricalProps,
|
|
2511
|
+
commentProps: j.commentProps,
|
|
2512
2512
|
numericDefaultChartType: "markers+line"
|
|
2513
2513
|
})
|
|
2514
|
-
})))),
|
|
2514
|
+
})))), U;
|
|
2515
2515
|
});
|
|
2516
|
-
}).catch((
|
|
2517
|
-
console.error(
|
|
2516
|
+
}).catch((I) => {
|
|
2517
|
+
console.error(I), P((G) => G.filter((U) => U !== k)), D(I.message || `Error loading hole ${k}`);
|
|
2518
2518
|
}));
|
|
2519
2519
|
});
|
|
2520
|
-
}, [g, t, o,
|
|
2521
|
-
n != null && n.length && i((
|
|
2522
|
-
if (!
|
|
2523
|
-
const
|
|
2524
|
-
return a(
|
|
2520
|
+
}, [g, t, o, $, y, n]), se(() => {
|
|
2521
|
+
n != null && n.length && i((v) => {
|
|
2522
|
+
if (!v.length) {
|
|
2523
|
+
const B = Be(n);
|
|
2524
|
+
return a(B.numericProps), m(B.categoricalProps), f(B.commentProps), b(B.columnMeta), !y && B.defaultProp && p(B.defaultProp), n;
|
|
2525
2525
|
}
|
|
2526
|
-
const
|
|
2527
|
-
return a(N.numericProps), m(N.categoricalProps), f(N.commentProps), b(N.columnMeta), !
|
|
2526
|
+
const k = yt(v, n), N = Be(k);
|
|
2527
|
+
return a(N.numericProps), m(N.categoricalProps), f(N.commentProps), b(N.columnMeta), !y && N.defaultProp && p(N.defaultProp), k;
|
|
2528
2528
|
});
|
|
2529
2529
|
}, [n]);
|
|
2530
|
-
const
|
|
2530
|
+
const F = ne(
|
|
2531
2531
|
() => [...u, ...c, ...d],
|
|
2532
2532
|
[u, c, d]
|
|
2533
|
-
),
|
|
2534
|
-
() => s.map((
|
|
2533
|
+
), C = ne(
|
|
2534
|
+
() => s.map((v) => ({ holeId: v.holeId, label: v.holeId })).sort((v, k) => v.label.localeCompare(k.label)),
|
|
2535
2535
|
[s]
|
|
2536
|
-
),
|
|
2537
|
-
const
|
|
2538
|
-
return Array.from({ length: r }).map((
|
|
2539
|
-
const
|
|
2540
|
-
let
|
|
2541
|
-
|
|
2542
|
-
const
|
|
2536
|
+
), H = ne(() => {
|
|
2537
|
+
const v = [...u, ...c, ...d];
|
|
2538
|
+
return Array.from({ length: r }).map((k, N) => {
|
|
2539
|
+
const B = g[N] || {}, I = o.find((he) => (he.id || he.holeId) === B.holeId) || null, G = I ? v.filter((he) => rr(I, he)) : v;
|
|
2540
|
+
let U = B.property || y;
|
|
2541
|
+
I && !G.includes(U) && (U = G[0] || U);
|
|
2542
|
+
const j = d.includes(U), Z = !j && c.includes(U), K = !j && !Z && U === "dip", le = j ? "comment" : K ? "tadpole" : Z ? "categorical" : "numeric", ye = K ? "tadpole" : B.chartType || (j ? "comment" : Z ? "categorical" : "markers+line"), fe = B.holeId || (I == null ? void 0 : I.id) || (I == null ? void 0 : I.holeId) || "", De = K ? (I == null ? void 0 : I.points) || [] : j ? dr(I, U) : or(I, U, Z);
|
|
2543
2543
|
return {
|
|
2544
|
-
config: { holeId:
|
|
2545
|
-
hole:
|
|
2546
|
-
loading:
|
|
2547
|
-
isCategorical:
|
|
2548
|
-
isComment:
|
|
2544
|
+
config: { holeId: fe, property: U, chartType: ye },
|
|
2545
|
+
hole: I,
|
|
2546
|
+
loading: $.includes(B.holeId),
|
|
2547
|
+
isCategorical: Z,
|
|
2548
|
+
isComment: j,
|
|
2549
2549
|
isTadpole: K,
|
|
2550
|
-
displayType:
|
|
2551
|
-
points:
|
|
2552
|
-
propertyOptions:
|
|
2553
|
-
label:
|
|
2550
|
+
displayType: le,
|
|
2551
|
+
points: De,
|
|
2552
|
+
propertyOptions: G,
|
|
2553
|
+
label: fe
|
|
2554
2554
|
};
|
|
2555
2555
|
});
|
|
2556
|
-
}, [g, o,
|
|
2557
|
-
|
|
2558
|
-
const
|
|
2559
|
-
return
|
|
2560
|
-
property:
|
|
2561
|
-
chartType:
|
|
2556
|
+
}, [g, o, y, c, d, $, r, u]), R = (v, k) => {
|
|
2557
|
+
M((N) => {
|
|
2558
|
+
const B = [...N], G = { ...B[v] || {}, ...k };
|
|
2559
|
+
return k.property && (G.chartType = we({
|
|
2560
|
+
property: k.property,
|
|
2561
|
+
chartType: G.chartType,
|
|
2562
2562
|
categoricalProps: c,
|
|
2563
2563
|
commentProps: d,
|
|
2564
2564
|
numericDefaultChartType: "markers+line"
|
|
2565
|
-
})),
|
|
2565
|
+
})), B[v] = G, B;
|
|
2566
2566
|
});
|
|
2567
2567
|
};
|
|
2568
2568
|
return {
|
|
2569
|
-
error:
|
|
2570
|
-
focusedHoleId:
|
|
2571
|
-
setFocusedHoleId:
|
|
2572
|
-
setError:
|
|
2569
|
+
error: z,
|
|
2570
|
+
focusedHoleId: x,
|
|
2571
|
+
setFocusedHoleId: O,
|
|
2572
|
+
setError: D,
|
|
2573
2573
|
holeCount: s.length,
|
|
2574
2574
|
numericProps: u,
|
|
2575
2575
|
categoricalProps: c,
|
|
2576
2576
|
commentProps: d,
|
|
2577
2577
|
columnMeta: h,
|
|
2578
|
-
propertyOptions:
|
|
2579
|
-
labeledHoleOptions:
|
|
2580
|
-
traceGraphs:
|
|
2578
|
+
propertyOptions: F,
|
|
2579
|
+
labeledHoleOptions: C,
|
|
2580
|
+
traceGraphs: H,
|
|
2581
2581
|
handleConfigChange: R
|
|
2582
2582
|
};
|
|
2583
2583
|
}
|
|
2584
|
-
const
|
|
2584
|
+
const mr = [
|
|
2585
2585
|
"#313695",
|
|
2586
2586
|
"#4575b4",
|
|
2587
2587
|
"#74add1",
|
|
@@ -2593,7 +2593,7 @@ const lr = [
|
|
|
2593
2593
|
"#d73027",
|
|
2594
2594
|
"#a50026"
|
|
2595
2595
|
];
|
|
2596
|
-
function
|
|
2596
|
+
function fr(e = [], t = mr) {
|
|
2597
2597
|
const n = e.filter((a) => Number.isFinite(a));
|
|
2598
2598
|
if (!n.length)
|
|
2599
2599
|
return {
|
|
@@ -2620,12 +2620,12 @@ function ar(e = [], t = lr) {
|
|
|
2620
2620
|
};
|
|
2621
2621
|
}
|
|
2622
2622
|
const l = t.map((a, c) => {
|
|
2623
|
-
const m = c / s, d = (c + 1) / s, f = Math.floor(m * r.length), h = Math.min(r.length - 1, Math.floor(d * r.length)), b = r[f],
|
|
2623
|
+
const m = c / s, d = (c + 1) / s, f = Math.floor(m * r.length), h = Math.min(r.length - 1, Math.floor(d * r.length)), b = r[f], y = c === s - 1 ? i : r[h];
|
|
2624
2624
|
return {
|
|
2625
2625
|
index: c,
|
|
2626
2626
|
min: b,
|
|
2627
|
-
max:
|
|
2628
|
-
label:
|
|
2627
|
+
max: y,
|
|
2628
|
+
label: hr(b, y)
|
|
2629
2629
|
};
|
|
2630
2630
|
}), u = (i - o) / s;
|
|
2631
2631
|
return {
|
|
@@ -2636,11 +2636,11 @@ function ar(e = [], t = lr) {
|
|
|
2636
2636
|
colors: t
|
|
2637
2637
|
};
|
|
2638
2638
|
}
|
|
2639
|
-
function
|
|
2639
|
+
function hr(e, t) {
|
|
2640
2640
|
const n = (r) => Number.isFinite(r) ? Math.abs(r) >= 1e3 ? r.toFixed(0) : Math.abs(r) >= 10 ? r.toFixed(1) : Math.abs(r) >= 0.1 ? r.toFixed(2) : r.toFixed(3) : "n/a";
|
|
2641
2641
|
return `${n(e)} – ${n(t)}`;
|
|
2642
2642
|
}
|
|
2643
|
-
function
|
|
2643
|
+
function Vt(e, t) {
|
|
2644
2644
|
if (!Number.isFinite(e) || !t || !Array.isArray(t.bins) || !t.bins.length)
|
|
2645
2645
|
return -1;
|
|
2646
2646
|
if (t.max === t.min)
|
|
@@ -2652,28 +2652,28 @@ function wt(e, t) {
|
|
|
2652
2652
|
}
|
|
2653
2653
|
return -1;
|
|
2654
2654
|
}
|
|
2655
|
-
function
|
|
2656
|
-
const r =
|
|
2655
|
+
function pr(e, t, n = "#8b1e3f") {
|
|
2656
|
+
const r = Vt(e, t);
|
|
2657
2657
|
return r < 0 ? n : t.colors[r] || n;
|
|
2658
2658
|
}
|
|
2659
|
-
function
|
|
2659
|
+
function Ht(e) {
|
|
2660
2660
|
return Array.isArray(e) ? e : [];
|
|
2661
2661
|
}
|
|
2662
|
-
function
|
|
2662
|
+
function Xe(e) {
|
|
2663
2663
|
const t = Number(e);
|
|
2664
2664
|
return Number.isFinite(t) ? t : void 0;
|
|
2665
2665
|
}
|
|
2666
|
-
function
|
|
2666
|
+
function Rt(e = {}) {
|
|
2667
2667
|
return {
|
|
2668
2668
|
...e,
|
|
2669
|
-
x:
|
|
2670
|
-
y:
|
|
2671
|
-
z:
|
|
2669
|
+
x: Xe(e.x),
|
|
2670
|
+
y: Xe(e.y),
|
|
2671
|
+
z: Xe(e.z)
|
|
2672
2672
|
};
|
|
2673
2673
|
}
|
|
2674
|
-
function
|
|
2674
|
+
function br(e = [], t = [0, 0], n = 0) {
|
|
2675
2675
|
const [r, o] = t, i = Number(n) * Math.PI / 180, s = Math.cos(i), l = Math.sin(i);
|
|
2676
|
-
return
|
|
2676
|
+
return Ht(e).map(Rt).map((u) => {
|
|
2677
2677
|
if (!Number.isFinite(u.x) || !Number.isFinite(u.y)) return { ...u };
|
|
2678
2678
|
const a = u.x - r, c = u.y - o;
|
|
2679
2679
|
return {
|
|
@@ -2683,12 +2683,12 @@ function dr(e = [], t = [0, 0], n = 0) {
|
|
|
2683
2683
|
};
|
|
2684
2684
|
});
|
|
2685
2685
|
}
|
|
2686
|
-
function
|
|
2687
|
-
const o =
|
|
2686
|
+
function gr(e = [], t = [0, 0], n = 0, r = 50) {
|
|
2687
|
+
const o = br(e, t, n), i = 0.5 * Number(r || 0);
|
|
2688
2688
|
return !Number.isFinite(i) || i <= 0 ? o : o.filter((s) => Number.isFinite(s.across) && Math.abs(s.across) <= i);
|
|
2689
2689
|
}
|
|
2690
|
-
function
|
|
2691
|
-
let r =
|
|
2690
|
+
function hi(e = [], t = null, n = null) {
|
|
2691
|
+
let r = Ht(e).map(Rt);
|
|
2692
2692
|
if (Array.isArray(t) && t.length === 2) {
|
|
2693
2693
|
const [o, i] = t;
|
|
2694
2694
|
r = r.filter((s) => Number.isFinite(s.z) && s.z <= Number(o) && s.z >= Number(i));
|
|
@@ -2698,46 +2698,46 @@ function Qo(e = [], t = null, n = null) {
|
|
|
2698
2698
|
color_value: o == null ? void 0 : o[n]
|
|
2699
2699
|
}))), r;
|
|
2700
2700
|
}
|
|
2701
|
-
function
|
|
2702
|
-
let i =
|
|
2701
|
+
function pi(e = [], t = [0, 0], n = 0, r = 50, o = null) {
|
|
2702
|
+
let i = gr(e, t, n, r);
|
|
2703
2703
|
return o && (i = i.map((s) => ({
|
|
2704
2704
|
...s,
|
|
2705
2705
|
color_value: s == null ? void 0 : s[o]
|
|
2706
2706
|
}))), i;
|
|
2707
2707
|
}
|
|
2708
|
-
function
|
|
2708
|
+
function rt(e) {
|
|
2709
2709
|
return Array.isArray(e) ? e : [];
|
|
2710
2710
|
}
|
|
2711
|
-
function
|
|
2711
|
+
function ot(e = {}) {
|
|
2712
2712
|
return e.hole_id ?? e.holeId ?? e.id;
|
|
2713
2713
|
}
|
|
2714
|
-
function
|
|
2714
|
+
function Ne(e, t = void 0) {
|
|
2715
2715
|
const n = Number(e);
|
|
2716
2716
|
return Number.isFinite(n) ? n : t;
|
|
2717
2717
|
}
|
|
2718
|
-
function
|
|
2718
|
+
function bi(e = [], t = null) {
|
|
2719
2719
|
const n = /* @__PURE__ */ new Map();
|
|
2720
|
-
|
|
2721
|
-
const i =
|
|
2720
|
+
rt(e).forEach((o) => {
|
|
2721
|
+
const i = ot(o);
|
|
2722
2722
|
if (i == null || `${i}`.trim() === "") return;
|
|
2723
2723
|
const s = `${i}`;
|
|
2724
2724
|
n.has(s) || n.set(s, []), n.get(s).push(o);
|
|
2725
2725
|
});
|
|
2726
2726
|
const r = [];
|
|
2727
2727
|
return n.forEach((o, i) => {
|
|
2728
|
-
const s = [...o].sort((u, a) =>
|
|
2728
|
+
const s = [...o].sort((u, a) => Ne(u.md, 0) - Ne(a.md, 0)), l = {
|
|
2729
2729
|
hole_id: i,
|
|
2730
|
-
x: s.map((u) =>
|
|
2731
|
-
y: s.map((u) =>
|
|
2732
|
-
z: s.map((u) =>
|
|
2730
|
+
x: s.map((u) => Ne(u.x, 0)),
|
|
2731
|
+
y: s.map((u) => Ne(u.y, 0)),
|
|
2732
|
+
z: s.map((u) => Ne(u.z, 0)),
|
|
2733
2733
|
color: null
|
|
2734
2734
|
};
|
|
2735
2735
|
t && (l.color = s.map((u) => u == null ? void 0 : u[t])), r.push(l);
|
|
2736
2736
|
}), r;
|
|
2737
2737
|
}
|
|
2738
|
-
function
|
|
2739
|
-
return
|
|
2740
|
-
hole_id:
|
|
2738
|
+
function gi(e = [], t = 1, n = null) {
|
|
2739
|
+
return rt(e).map((r) => ({
|
|
2740
|
+
hole_id: ot(r),
|
|
2741
2741
|
from: r == null ? void 0 : r.from,
|
|
2742
2742
|
to: r == null ? void 0 : r.to,
|
|
2743
2743
|
radius: t,
|
|
@@ -2745,21 +2745,21 @@ function ni(e = [], t = 1, n = null) {
|
|
|
2745
2745
|
value: n ? r == null ? void 0 : r[n] : null
|
|
2746
2746
|
}));
|
|
2747
2747
|
}
|
|
2748
|
-
function
|
|
2749
|
-
return t ?
|
|
2750
|
-
hole_id:
|
|
2748
|
+
function yi(e = [], t = null) {
|
|
2749
|
+
return t ? rt(e).filter((n) => Object.prototype.hasOwnProperty.call(n || {}, t)).map((n) => ({
|
|
2750
|
+
hole_id: ot(n),
|
|
2751
2751
|
label: n == null ? void 0 : n[t],
|
|
2752
|
-
depth: 0.5 * (
|
|
2752
|
+
depth: 0.5 * (Ne(n == null ? void 0 : n.from, 0) + Ne(n == null ? void 0 : n.to, 0))
|
|
2753
2753
|
})) : [];
|
|
2754
2754
|
}
|
|
2755
|
-
function
|
|
2755
|
+
function Me(e) {
|
|
2756
2756
|
e.selectables = [
|
|
2757
2757
|
...e.blocks,
|
|
2758
2758
|
...e.drillMeshes,
|
|
2759
2759
|
...e.structuralMeshes
|
|
2760
2760
|
];
|
|
2761
2761
|
}
|
|
2762
|
-
const
|
|
2762
|
+
const yr = {
|
|
2763
2763
|
bedding: "#2563eb",
|
|
2764
2764
|
foliation: "#16a34a",
|
|
2765
2765
|
joint: "#9333ea",
|
|
@@ -2768,13 +2768,13 @@ const fr = {
|
|
|
2768
2768
|
"shear zone": "#0ea5e9",
|
|
2769
2769
|
"fault zone": "#ef4444"
|
|
2770
2770
|
};
|
|
2771
|
-
function
|
|
2772
|
-
const n = t ||
|
|
2773
|
-
return new
|
|
2771
|
+
function _r(e, t) {
|
|
2772
|
+
const n = t || yr, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
|
|
2773
|
+
return new _.Color(o).getHex();
|
|
2774
2774
|
}
|
|
2775
|
-
function
|
|
2775
|
+
function Nr(e, t) {
|
|
2776
2776
|
const n = e * Math.PI / 180, r = t * Math.PI / 180;
|
|
2777
|
-
return new
|
|
2777
|
+
return new _.Vector3(
|
|
2778
2778
|
Math.sin(r) * Math.sin(n),
|
|
2779
2779
|
// East component
|
|
2780
2780
|
Math.cos(r) * Math.sin(n),
|
|
@@ -2783,31 +2783,31 @@ function pr(e, t) {
|
|
|
2783
2783
|
// Up component
|
|
2784
2784
|
).normalize();
|
|
2785
2785
|
}
|
|
2786
|
-
function
|
|
2786
|
+
function Mr(e, t = {}) {
|
|
2787
2787
|
const {
|
|
2788
2788
|
radius: n = 5,
|
|
2789
2789
|
discThickness: r = 0.2,
|
|
2790
2790
|
opacity: o = 0.7,
|
|
2791
2791
|
segments: i = 32,
|
|
2792
2792
|
colorMap: s = null
|
|
2793
|
-
} = t, l = new
|
|
2793
|
+
} = t, l = new _.Group(), u = new _.Vector3(0, 1, 0);
|
|
2794
2794
|
for (const a of e) {
|
|
2795
2795
|
const c = 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
2796
|
if (c == null || m == null || d == null || !Number.isFinite(c) || !Number.isFinite(m) || !Number.isFinite(d)) continue;
|
|
2797
|
-
const f = a[
|
|
2797
|
+
const f = a[X] != null ? Number(a[X]) : null, h = a[q] != null ? Number(a[q]) : null;
|
|
2798
2798
|
let b;
|
|
2799
2799
|
if (a.nx != null && Number.isFinite(a.nx) && a.ny != null && Number.isFinite(a.ny) && a.nz != null && Number.isFinite(a.nz))
|
|
2800
|
-
b = new
|
|
2800
|
+
b = new _.Vector3(a.nx, a.ny, a.nz).normalize();
|
|
2801
2801
|
else {
|
|
2802
2802
|
if (f == null || h == null || !Number.isFinite(f) || !Number.isFinite(h)) continue;
|
|
2803
|
-
b =
|
|
2803
|
+
b = Nr(f, h);
|
|
2804
2804
|
}
|
|
2805
|
-
const
|
|
2806
|
-
color:
|
|
2805
|
+
const y = new _.CylinderGeometry(n, n, r, i, 1, !1), p = new _.MeshStandardMaterial({
|
|
2806
|
+
color: _r(a.structure_type, s),
|
|
2807
2807
|
transparent: !0,
|
|
2808
2808
|
opacity: o,
|
|
2809
|
-
side:
|
|
2810
|
-
}), g = new
|
|
2809
|
+
side: _.DoubleSide
|
|
2810
|
+
}), g = new _.Mesh(y, p);
|
|
2811
2811
|
g.position.set(c, m, d), g.quaternion.setFromUnitVectors(u, b), g.userData = {
|
|
2812
2812
|
type: "structure",
|
|
2813
2813
|
hole_id: a.hole_id,
|
|
@@ -2820,8 +2820,8 @@ function br(e, t = {}) {
|
|
|
2820
2820
|
}
|
|
2821
2821
|
return l;
|
|
2822
2822
|
}
|
|
2823
|
-
function
|
|
2824
|
-
if (!e.scene || (
|
|
2823
|
+
function zr(e, t, n, r = {}) {
|
|
2824
|
+
if (!e.scene || (jt(e), !(t != null && t.length) || !(n != null && n.length))) return;
|
|
2825
2825
|
const { maxDiscs: o = 3e3 } = r;
|
|
2826
2826
|
let i = t;
|
|
2827
2827
|
if (i.length > o) {
|
|
@@ -2830,20 +2830,20 @@ function gr(e, t, n, r = {}) {
|
|
|
2830
2830
|
a.push(i[Math.floor(c * u)]);
|
|
2831
2831
|
i = a;
|
|
2832
2832
|
}
|
|
2833
|
-
const s = n.flatMap((u) => (u.points || []).map((a) => ({ ...a, hole_id: u.id }))), l =
|
|
2834
|
-
l.length && (e.structuralGroup =
|
|
2833
|
+
const s = n.flatMap((u) => (u.points || []).map((a) => ({ ...a, hole_id: u.id }))), l = Un(i, s, r);
|
|
2834
|
+
l.length && (e.structuralGroup = Mr(l, r), e.scene.add(e.structuralGroup), e.structuralGroup.traverse((u) => {
|
|
2835
2835
|
u.isMesh && e.structuralMeshes.push(u);
|
|
2836
|
-
}),
|
|
2836
|
+
}), Me(e));
|
|
2837
2837
|
}
|
|
2838
|
-
function
|
|
2838
|
+
function jt(e) {
|
|
2839
2839
|
e.structuralGroup && (e.scene.remove(e.structuralGroup), e.structuralGroup.traverse((t) => {
|
|
2840
2840
|
t.isMesh && (t.geometry.dispose(), t.material.dispose());
|
|
2841
|
-
}), e.structuralGroup = null), e.structuralMeshes = [],
|
|
2841
|
+
}), e.structuralGroup = null), e.structuralMeshes = [], Me(e);
|
|
2842
2842
|
}
|
|
2843
|
-
function
|
|
2843
|
+
function Er(e, t) {
|
|
2844
2844
|
e.structuralGroup && (e.structuralGroup.visible = !!t);
|
|
2845
2845
|
}
|
|
2846
|
-
function
|
|
2846
|
+
function it(e) {
|
|
2847
2847
|
var n, r, o, i, s, l, u, a, c;
|
|
2848
2848
|
if (!e) return "";
|
|
2849
2849
|
const t = (m) => Number.isFinite(m) ? m.toFixed(3) : "nan";
|
|
@@ -2859,7 +2859,7 @@ function nt(e) {
|
|
|
2859
2859
|
t((c = e.up) == null ? void 0 : c.z)
|
|
2860
2860
|
].join("|");
|
|
2861
2861
|
}
|
|
2862
|
-
function
|
|
2862
|
+
function Gt(e) {
|
|
2863
2863
|
return !e.camera || !e.controls ? null : {
|
|
2864
2864
|
camera: {
|
|
2865
2865
|
x: e.camera.position.x,
|
|
@@ -2878,37 +2878,37 @@ function Ht(e) {
|
|
|
2878
2878
|
}
|
|
2879
2879
|
};
|
|
2880
2880
|
}
|
|
2881
|
-
function
|
|
2881
|
+
function kr(e, t) {
|
|
2882
2882
|
if (!e.camera || !e.controls || !t) return !1;
|
|
2883
2883
|
const n = t.camera || {}, r = t.target || {}, o = t.up || {};
|
|
2884
|
-
return [n.x, n.y, n.z, r.x, r.y, r.z, o.x, o.y, o.z].every(Number.isFinite) ? (e.camera.position.set(n.x, n.y, n.z), e.controls.target.set(r.x, r.y, r.z), e.camera.up.set(o.x, o.y, o.z), e.camera.lookAt(r.x, r.y, r.z), e.controls.update(), e._lastViewSignature =
|
|
2884
|
+
return [n.x, n.y, n.z, r.x, r.y, r.z, o.x, o.y, o.z].every(Number.isFinite) ? (e.camera.position.set(n.x, n.y, n.z), e.controls.target.set(r.x, r.y, r.z), e.camera.up.set(o.x, o.y, o.z), e.camera.lookAt(r.x, r.y, r.z), e.controls.update(), e._lastViewSignature = it(t), !0) : !1;
|
|
2885
2885
|
}
|
|
2886
|
-
function
|
|
2886
|
+
function Ar(e) {
|
|
2887
2887
|
if (!e.viewChangeHandler) return;
|
|
2888
2888
|
const t = Date.now();
|
|
2889
2889
|
if (t - e._lastViewEmitMs < 250) return;
|
|
2890
|
-
const n =
|
|
2890
|
+
const n = Gt(e);
|
|
2891
2891
|
if (!n) return;
|
|
2892
|
-
const r =
|
|
2892
|
+
const r = it(n);
|
|
2893
2893
|
r !== e._lastViewSignature && (e._lastViewSignature = r, e._lastViewEmitMs = t, e.viewChangeHandler(n));
|
|
2894
2894
|
}
|
|
2895
|
-
function
|
|
2895
|
+
function st(e, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: s }) {
|
|
2896
2896
|
const l = (t + n) / 2, u = (r + o) / 2, a = (i + s) / 2, c = n - t, m = o - r, d = s - i, h = Math.max(c, m, d, 1) * 2;
|
|
2897
2897
|
e.controls.target.set(l, u, a), e.camera.position.set(l + h, u + h, a + h), e.camera.lookAt(l, u, a), e.controls.update();
|
|
2898
2898
|
}
|
|
2899
|
-
function
|
|
2899
|
+
function xr(e, t = 1e3) {
|
|
2900
2900
|
!e.camera || !e.controls || (e.controls.target.set(0, 0, 0), e.camera.position.set(t, t, t), e.camera.lookAt(0, 0, 0), e.controls.update());
|
|
2901
2901
|
}
|
|
2902
|
-
function
|
|
2902
|
+
function vr(e, t = 2e3) {
|
|
2903
2903
|
!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());
|
|
2904
2904
|
}
|
|
2905
|
-
function
|
|
2905
|
+
function Ir(e, t = 0, n = 0) {
|
|
2906
2906
|
e.controls && typeof e.controls.pan == "function" && (e.controls.pan(t, n), e.controls.update());
|
|
2907
2907
|
}
|
|
2908
|
-
function
|
|
2908
|
+
function Cr(e, t = 1.1) {
|
|
2909
2909
|
!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());
|
|
2910
2910
|
}
|
|
2911
|
-
function
|
|
2911
|
+
function Dr(e, t = 1.2) {
|
|
2912
2912
|
if (!e.lastBounds) return;
|
|
2913
2913
|
const {
|
|
2914
2914
|
minX: n,
|
|
@@ -2920,13 +2920,13 @@ function Ar(e, t = 1.2) {
|
|
|
2920
2920
|
} = e.lastBounds, u = (r - n) * t, a = (i - o) * t, c = (l - s) * t, m = (n + r) / 2, d = (o + i) / 2, f = (s + l) / 2, b = Math.max(u, a, c, 1) * 2;
|
|
2921
2921
|
e.controls.target.set(m, d, f), e.camera.position.set(m + b, d + b, f + b), e.camera.lookAt(m, d, f), e.controls.update();
|
|
2922
2922
|
}
|
|
2923
|
-
const
|
|
2924
|
-
function
|
|
2923
|
+
const Sr = 1, Lr = 120;
|
|
2924
|
+
function Or(e, t) {
|
|
2925
2925
|
if (!e.camera || !e.controls || !Number.isFinite(t)) return !1;
|
|
2926
|
-
const n = Math.min(
|
|
2926
|
+
const n = Math.min(Lr, Math.max(Sr, t)), r = e.controls.target, o = e.camera.position.distanceTo(r), i = e.camera.fov * Math.PI / 180, s = 2 * o * Math.tan(i / 2), l = n * Math.PI / 180, u = s / (2 * Math.tan(l / 2)), a = e.camera.position.clone().sub(r).normalize();
|
|
2927
2927
|
return e.camera.position.copy(r).addScaledVector(a, u), e.camera.fov = n, e.camera.updateProjectionMatrix(), e.controls.update(), !0;
|
|
2928
2928
|
}
|
|
2929
|
-
function
|
|
2929
|
+
function Pr(e, t = "orbit") {
|
|
2930
2930
|
if (e.controlMode = t === "fly" ? "fly" : "orbit", e.controlMode === "fly")
|
|
2931
2931
|
e.controls && (e.controls.enabled = !1), e.flyControls && (e.flyControls.enabled = !0);
|
|
2932
2932
|
else if (e.flyControls && (e.flyControls.enabled = !1), e.controls) {
|
|
@@ -2935,14 +2935,14 @@ function vr(e, t = "orbit") {
|
|
|
2935
2935
|
e.controls.target.copy(n), e.controls.update();
|
|
2936
2936
|
}
|
|
2937
2937
|
}
|
|
2938
|
-
const
|
|
2939
|
-
function
|
|
2938
|
+
const ue = "#9ca3af";
|
|
2939
|
+
function _t(e, t) {
|
|
2940
2940
|
const n = Number(e == null ? void 0 : e.md), r = Number(t == null ? void 0 : t.md);
|
|
2941
2941
|
if (!Number.isFinite(n) || !Number.isFinite(r)) return null;
|
|
2942
2942
|
const o = Math.min(n, r), i = Math.max(n, r);
|
|
2943
2943
|
return i <= o ? null : { segStart: o, segEnd: i };
|
|
2944
2944
|
}
|
|
2945
|
-
function
|
|
2945
|
+
function Fr(e, t, n) {
|
|
2946
2946
|
let r = 0, o = 0;
|
|
2947
2947
|
for (let s = 0; s < e.length; s += 1) {
|
|
2948
2948
|
const l = e[s], u = Number(l == null ? void 0 : l.from), a = Number(l == null ? void 0 : l.to), c = Number(l == null ? void 0 : l.value);
|
|
@@ -2954,18 +2954,18 @@ function Sr(e, t, n) {
|
|
|
2954
2954
|
const i = r / o;
|
|
2955
2955
|
return Number.isFinite(i) ? i : null;
|
|
2956
2956
|
}
|
|
2957
|
-
function
|
|
2958
|
-
if (!Number.isFinite(e)) return new
|
|
2959
|
-
if (
|
|
2960
|
-
const r =
|
|
2961
|
-
return new
|
|
2957
|
+
function Tr(e, t) {
|
|
2958
|
+
if (!Number.isFinite(e)) return new _.Color(ue);
|
|
2959
|
+
if (Vt(e, t) < 0) return new _.Color(ue);
|
|
2960
|
+
const r = pr(e, t, ue);
|
|
2961
|
+
return new _.Color(r);
|
|
2962
2962
|
}
|
|
2963
|
-
function
|
|
2964
|
-
if (!e || !String(e).trim()) return
|
|
2965
|
-
const t =
|
|
2966
|
-
return "#" + new
|
|
2963
|
+
function wr(e) {
|
|
2964
|
+
if (!e || !String(e).trim()) return ue;
|
|
2965
|
+
const t = Ut(String(e).toLowerCase().trim());
|
|
2966
|
+
return "#" + new _.Color().setHSL(t, 0.7, 0.5).getHexString();
|
|
2967
2967
|
}
|
|
2968
|
-
function
|
|
2968
|
+
function $r(e = {}) {
|
|
2969
2969
|
return {
|
|
2970
2970
|
preserveView: !!e.preserveView,
|
|
2971
2971
|
assayIntervalsByHole: e.assayIntervalsByHole || null,
|
|
@@ -2973,7 +2973,7 @@ function Lr(e = {}) {
|
|
|
2973
2973
|
isCategoricalVariable: !!e.isCategoricalVariable
|
|
2974
2974
|
};
|
|
2975
2975
|
}
|
|
2976
|
-
function
|
|
2976
|
+
function Br(e, t) {
|
|
2977
2977
|
if (!e || !t) return [];
|
|
2978
2978
|
const n = [];
|
|
2979
2979
|
return Object.values(e).forEach((r) => {
|
|
@@ -2983,27 +2983,27 @@ function Or(e, t) {
|
|
|
2983
2983
|
});
|
|
2984
2984
|
}), n;
|
|
2985
2985
|
}
|
|
2986
|
-
function
|
|
2986
|
+
function Ze(e) {
|
|
2987
2987
|
return {
|
|
2988
2988
|
holeId: e.id,
|
|
2989
2989
|
project: e.project
|
|
2990
2990
|
};
|
|
2991
2991
|
}
|
|
2992
|
-
function
|
|
2992
|
+
function Vr(e) {
|
|
2993
2993
|
return `${e ?? ""}`.trim().toLowerCase();
|
|
2994
2994
|
}
|
|
2995
|
-
function
|
|
2996
|
-
const n = `${e ?? ""}:${t ?? 0}`, r =
|
|
2995
|
+
function Hr(e, t) {
|
|
2996
|
+
const n = `${e ?? ""}:${t ?? 0}`, r = Ut(n), o = (t ?? 0) % 14 / 14, i = (r * 0.15 + o * 0.85) % 1, s = new _.Color();
|
|
2997
2997
|
return s.setHSL(i, 1, 0.5), s;
|
|
2998
2998
|
}
|
|
2999
|
-
function
|
|
2999
|
+
function Ut(e) {
|
|
3000
3000
|
const t = `${e ?? ""}`;
|
|
3001
3001
|
let n = 2166136261;
|
|
3002
3002
|
for (let r = 0; r < t.length; r += 1)
|
|
3003
3003
|
n ^= t.charCodeAt(r), n = Math.imul(n, 16777619);
|
|
3004
3004
|
return (n >>> 0) / 4294967295;
|
|
3005
3005
|
}
|
|
3006
|
-
function
|
|
3006
|
+
function Rr(e, t, n) {
|
|
3007
3007
|
let r = null, o = 0;
|
|
3008
3008
|
for (const i of e) {
|
|
3009
3009
|
const s = Number(i == null ? void 0 : i.from), l = Number(i == null ? void 0 : i.to);
|
|
@@ -3013,116 +3013,116 @@ function wr(e, t, n) {
|
|
|
3013
3013
|
}
|
|
3014
3014
|
return r;
|
|
3015
3015
|
}
|
|
3016
|
-
function
|
|
3016
|
+
function jr(e, t) {
|
|
3017
3017
|
if (!t || !e) return [];
|
|
3018
3018
|
const n = e.id || e.holeId;
|
|
3019
3019
|
if (!n) return [];
|
|
3020
3020
|
const r = t[n];
|
|
3021
3021
|
if (Array.isArray(r) && r.length) return r;
|
|
3022
|
-
const o =
|
|
3022
|
+
const o = Vr(n);
|
|
3023
3023
|
if (o) {
|
|
3024
3024
|
const i = t[o];
|
|
3025
3025
|
if (Array.isArray(i) && i.length) return i;
|
|
3026
3026
|
}
|
|
3027
3027
|
return [];
|
|
3028
3028
|
}
|
|
3029
|
-
function
|
|
3029
|
+
function Gr({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId: r, segmentIndex: o, p1: i, p2: s, isCategorical: l }) {
|
|
3030
3030
|
if (!e)
|
|
3031
|
-
return
|
|
3031
|
+
return Hr(r, o);
|
|
3032
3032
|
if (e === "__HAS_ASSAY__") {
|
|
3033
|
-
if (!(t != null && t.length)) return new
|
|
3034
|
-
const c =
|
|
3033
|
+
if (!(t != null && t.length)) return new _.Color(ue);
|
|
3034
|
+
const c = _t(i, s);
|
|
3035
3035
|
return c ? t.some((d) => {
|
|
3036
3036
|
const f = Number(d == null ? void 0 : d.from), h = Number(d == null ? void 0 : d.to);
|
|
3037
3037
|
if (!Number.isFinite(f) || !Number.isFinite(h)) return !1;
|
|
3038
3038
|
const b = Math.max(c.segStart, f);
|
|
3039
3039
|
return Math.min(c.segEnd, h) > b;
|
|
3040
|
-
}) ? new
|
|
3040
|
+
}) ? new _.Color("#ff8c42") : new _.Color(ue) : new _.Color(ue);
|
|
3041
3041
|
}
|
|
3042
|
-
if (!(t != null && t.length)) return new
|
|
3043
|
-
const u =
|
|
3044
|
-
if (!u) return new
|
|
3042
|
+
if (!(t != null && t.length)) return new _.Color(ue);
|
|
3043
|
+
const u = _t(i, s);
|
|
3044
|
+
if (!u) return new _.Color(ue);
|
|
3045
3045
|
if (l) {
|
|
3046
|
-
const c =
|
|
3047
|
-
return new
|
|
3046
|
+
const c = Rr(t, u.segStart, u.segEnd);
|
|
3047
|
+
return new _.Color(wr(c));
|
|
3048
3048
|
}
|
|
3049
|
-
const a =
|
|
3050
|
-
return
|
|
3049
|
+
const a = Fr(t, u.segStart, u.segEnd);
|
|
3050
|
+
return Tr(a, n);
|
|
3051
3051
|
}
|
|
3052
|
-
function
|
|
3053
|
-
if (!e.scene || (
|
|
3054
|
-
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: s } =
|
|
3052
|
+
function Ur(e, t, n = {}) {
|
|
3053
|
+
if (!e.scene || (Yt(e), !t || t.length === 0)) return;
|
|
3054
|
+
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: s } = $r(n), l = s ? [] : Br(o, i), u = fr(l);
|
|
3055
3055
|
let a = 1 / 0, c = -1 / 0, m = 1 / 0, d = -1 / 0, f = 1 / 0, h = -1 / 0;
|
|
3056
|
-
const b = new
|
|
3056
|
+
const b = new _.Vector3(), y = new _.Vector3(0, 1, 0);
|
|
3057
3057
|
t.forEach((p, g) => {
|
|
3058
|
-
const
|
|
3059
|
-
a = Math.min(a,
|
|
3060
|
-
const
|
|
3061
|
-
return
|
|
3058
|
+
const z = g * 137.5 % 360 / 360, D = new _.Color().setHSL(z, 0.75, 0.55), x = (p.points || []).map((P) => {
|
|
3059
|
+
a = Math.min(a, P.x), c = Math.max(c, P.x), m = Math.min(m, P.y), d = Math.max(d, P.y), f = Math.min(f, P.z), h = Math.max(h, P.z);
|
|
3060
|
+
const E = new _.Vector3(P.x, P.y, P.z);
|
|
3061
|
+
return E.md = P.md, E;
|
|
3062
3062
|
});
|
|
3063
|
-
if (
|
|
3064
|
-
if (
|
|
3065
|
-
const
|
|
3066
|
-
color:
|
|
3067
|
-
emissive:
|
|
3063
|
+
if (x.length < 2) {
|
|
3064
|
+
if (x.length === 1) {
|
|
3065
|
+
const P = new _.SphereGeometry(5, 12, 12), E = new _.MeshLambertMaterial({
|
|
3066
|
+
color: D,
|
|
3067
|
+
emissive: D,
|
|
3068
3068
|
emissiveIntensity: 0.2
|
|
3069
|
-
}),
|
|
3070
|
-
|
|
3069
|
+
}), F = new _.Mesh(P, E);
|
|
3070
|
+
F.position.copy(x[0]), F.userData = Ze(p), e.scene.add(F), e.drillLines.push(F), e.drillMeshes.push(F);
|
|
3071
3071
|
}
|
|
3072
3072
|
return;
|
|
3073
3073
|
}
|
|
3074
|
-
const
|
|
3075
|
-
|
|
3076
|
-
const
|
|
3077
|
-
for (let
|
|
3078
|
-
const
|
|
3079
|
-
if (
|
|
3080
|
-
const R = 2.2,
|
|
3074
|
+
const O = new _.Group();
|
|
3075
|
+
O.userData = Ze(p);
|
|
3076
|
+
const $ = i ? jr(p, o) : [];
|
|
3077
|
+
for (let P = 0; P < x.length - 1; P += 1) {
|
|
3078
|
+
const E = x[P], F = x[P + 1], C = b.subVectors(F, E), H = C.length();
|
|
3079
|
+
if (H <= 1e-3) continue;
|
|
3080
|
+
const R = 2.2, v = new _.CylinderGeometry(R, R, H, 6, 1, !0), k = Gr({
|
|
3081
3081
|
selectedAssayVariable: i,
|
|
3082
|
-
assayIntervals:
|
|
3082
|
+
assayIntervals: $,
|
|
3083
3083
|
assayScale: u,
|
|
3084
3084
|
holeId: p.id,
|
|
3085
|
-
segmentIndex:
|
|
3086
|
-
p1:
|
|
3087
|
-
p2:
|
|
3085
|
+
segmentIndex: P,
|
|
3086
|
+
p1: E,
|
|
3087
|
+
p2: F,
|
|
3088
3088
|
isCategorical: s
|
|
3089
|
-
}), N = new
|
|
3090
|
-
color:
|
|
3089
|
+
}), N = new _.MeshLambertMaterial({
|
|
3090
|
+
color: k,
|
|
3091
3091
|
flatShading: !0,
|
|
3092
|
-
emissive:
|
|
3092
|
+
emissive: k,
|
|
3093
3093
|
emissiveIntensity: 0.15
|
|
3094
|
-
}),
|
|
3095
|
-
|
|
3094
|
+
}), B = new _.Mesh(v, N);
|
|
3095
|
+
B.position.copy(E.clone().addScaledVector(C, 0.5)), B.quaternion.setFromUnitVectors(y, C.clone().normalize()), B.userData = Ze(p), O.add(B), e.drillMeshes.push(B);
|
|
3096
3096
|
}
|
|
3097
|
-
e.scene.add(
|
|
3098
|
-
}), e.camera && e.controls && (e.lastBounds = { minX: a, maxX: c, minY: m, maxY: d, minZ: f, maxZ: h }, r ||
|
|
3097
|
+
e.scene.add(O), e.drillLines.push(O);
|
|
3098
|
+
}), e.camera && e.controls && (e.lastBounds = { minX: a, maxX: c, minY: m, maxY: d, minZ: f, maxZ: h }, r || st(e, { minX: a, maxX: c, minY: m, maxY: d, minZ: f, maxZ: h })), Me(e);
|
|
3099
3099
|
}
|
|
3100
|
-
function
|
|
3100
|
+
function Yt(e) {
|
|
3101
3101
|
e.drillLines.forEach((t) => {
|
|
3102
3102
|
e.scene.remove(t), t.isGroup ? t.traverse((n) => {
|
|
3103
3103
|
n.isMesh && (n.geometry.dispose(), n.material.dispose());
|
|
3104
3104
|
}) : t.isMesh && (t.geometry.dispose(), t.material.dispose());
|
|
3105
|
-
}), e.drillLines = [], e.drillMeshes = [],
|
|
3105
|
+
}), e.drillLines = [], e.drillMeshes = [], Me(e);
|
|
3106
3106
|
}
|
|
3107
|
-
const
|
|
3108
|
-
function
|
|
3107
|
+
const Nt = "#ffffbb", Yr = 2, qr = 1.5, Xr = 1;
|
|
3108
|
+
function Zr(e) {
|
|
3109
3109
|
const { renderer: t, scene: n, camera: r, container: o } = e;
|
|
3110
3110
|
if (!t || !n || !r) return;
|
|
3111
|
-
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
|
|
3111
|
+
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 ln(t), u = new an(n, r);
|
|
3112
3112
|
l.addPass(u);
|
|
3113
|
-
const a = new
|
|
3114
|
-
c.visibleEdgeColor.set(
|
|
3113
|
+
const a = new _.Vector2(i, s), c = new cn(a, n, r);
|
|
3114
|
+
c.visibleEdgeColor.set(Nt), c.hiddenEdgeColor.set(Nt), c.edgeStrength = Yr, c.edgeThickness = qr, c.edgeGlow = Xr, c.pulsePeriod = 0, c.selectedObjects = [], l.addPass(c), l.setSize(i, s), e._composer = l, e._outlinePass = c;
|
|
3115
3115
|
}
|
|
3116
|
-
function
|
|
3116
|
+
function Wr(e, t, n) {
|
|
3117
3117
|
!e._composer || !e._outlinePass || (e._composer.setSize(t, n), e._outlinePass.resolution.set(t, n));
|
|
3118
3118
|
}
|
|
3119
3119
|
function Se(e, t) {
|
|
3120
3120
|
e._outlinePass && (e._outlinePass.selectedObjects = t ? [t] : [], e._selectedObject = t || null);
|
|
3121
3121
|
}
|
|
3122
|
-
function
|
|
3122
|
+
function Mt(e) {
|
|
3123
3123
|
e._composer && (e._composer.dispose(), e._composer = null), e._outlinePass = null, e._selectedObject = null, e.selectables = [];
|
|
3124
3124
|
}
|
|
3125
|
-
const
|
|
3125
|
+
const Kr = [
|
|
3126
3126
|
{ normal: [1, 0, 0], neibDir: [1, 0, 0], verts: [[1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1]] },
|
|
3127
3127
|
{ normal: [-1, 0, 0], neibDir: [-1, 0, 0], verts: [[-1, -1, 1], [-1, 1, 1], [-1, 1, -1], [-1, -1, -1]] },
|
|
3128
3128
|
{ normal: [0, 1, 0], neibDir: [0, 1, 0], verts: [[-1, 1, 1], [1, 1, 1], [1, 1, -1], [-1, 1, -1]] },
|
|
@@ -3130,62 +3130,62 @@ const Yr = [
|
|
|
3130
3130
|
{ normal: [0, 0, 1], neibDir: [0, 0, 1], verts: [[-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1]] },
|
|
3131
3131
|
{ normal: [0, 0, -1], neibDir: [0, 0, -1], verts: [[1, -1, -1], [-1, -1, -1], [-1, 1, -1], [1, 1, -1]] }
|
|
3132
3132
|
];
|
|
3133
|
-
function
|
|
3134
|
-
if (!e.scene || (
|
|
3133
|
+
function Jr(e, t, n, r, o = {}) {
|
|
3134
|
+
if (!e.scene || (qt(e), !t || !n || !r)) return;
|
|
3135
3135
|
const { autoCenter: i = !0, opacity: s = 1 } = o;
|
|
3136
3136
|
let l = 1 / 0, u = -1 / 0, a = 1 / 0, c = -1 / 0, m = 1 / 0, d = -1 / 0;
|
|
3137
3137
|
t.forEach((N) => {
|
|
3138
|
-
const
|
|
3139
|
-
l = Math.min(l,
|
|
3138
|
+
const B = Number(N.x ?? N.center_x ?? 0), I = Number(N.y ?? N.center_y ?? 0), G = Number(N.z ?? N.center_z ?? 0), U = Number(N.dx ?? N.size_x ?? 1), j = Number(N.dy ?? N.size_y ?? 1), Z = Number(N.dz ?? N.size_z ?? 1);
|
|
3139
|
+
l = Math.min(l, B - U / 2), u = Math.max(u, B + U / 2), a = Math.min(a, I - j / 2), c = Math.max(c, I + j / 2), m = Math.min(m, G - Z / 2), d = Math.max(d, G + Z / 2);
|
|
3140
3140
|
});
|
|
3141
3141
|
let f = 0, h = 0, b = 0;
|
|
3142
3142
|
o.offset ? (f = Number(o.offset.x ?? 0), h = Number(o.offset.y ?? 0), b = Number(o.offset.z ?? 0)) : i && (f = -((l + u) / 2), h = -((a + c) / 2), b = -((m + d) / 2));
|
|
3143
|
-
const
|
|
3144
|
-
t.map((N) =>
|
|
3145
|
-
),
|
|
3146
|
-
let
|
|
3143
|
+
const y = l + f, p = u + f, g = a + h, M = c + h, z = m + b, D = d + b, x = (N, B, I) => `${Math.round(N)},${Math.round(B)},${Math.round(I)}`, O = new Set(
|
|
3144
|
+
t.map((N) => x(Number(N.x ?? 0), Number(N.y ?? 0), Number(N.z ?? 0)))
|
|
3145
|
+
), $ = [], P = [], E = [], F = [], C = [];
|
|
3146
|
+
let H = 0;
|
|
3147
3147
|
if (t.forEach((N) => {
|
|
3148
|
-
const
|
|
3149
|
-
|
|
3150
|
-
const
|
|
3151
|
-
if (
|
|
3152
|
-
const ze =
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
}),
|
|
3148
|
+
const B = Number(N.x ?? N.center_x ?? 0), I = Number(N.y ?? N.center_y ?? 0), G = Number(N.z ?? N.center_z ?? 0), U = Number(N.dx ?? N.size_x ?? 1), j = Number(N.dy ?? N.size_y ?? 1), Z = Number(N.dz ?? N.size_z ?? 1), K = B + f, le = I + h, ye = G + b, fe = wn(N[n], r, _), { r: De, g: he, b: Ge } = fe;
|
|
3149
|
+
Kr.forEach((_e) => {
|
|
3150
|
+
const Kt = B + _e.neibDir[0] * U, Jt = I + _e.neibDir[1] * j, Qt = G + _e.neibDir[2] * Z;
|
|
3151
|
+
if (O.has(x(Kt, Jt, Qt))) return;
|
|
3152
|
+
const ze = H;
|
|
3153
|
+
_e.verts.forEach(([en, tn, nn]) => {
|
|
3154
|
+
$.push(K + en * U / 2, le + tn * j / 2, ye + nn * Z / 2), P.push(_e.normal[0], _e.normal[1], _e.normal[2]), E.push(De, he, Ge), H++;
|
|
3155
|
+
}), F.push(ze, ze + 1, ze + 2, ze, ze + 2, ze + 3), C.push(N);
|
|
3156
3156
|
});
|
|
3157
|
-
}),
|
|
3158
|
-
const R = new
|
|
3159
|
-
R.setAttribute("position", new
|
|
3160
|
-
const
|
|
3157
|
+
}), $.length === 0) return;
|
|
3158
|
+
const R = new _.BufferGeometry();
|
|
3159
|
+
R.setAttribute("position", new _.Float32BufferAttribute($, 3)), R.setAttribute("normal", new _.Float32BufferAttribute(P, 3)), R.setAttribute("color", new _.Float32BufferAttribute(E, 3)), R.setIndex(F);
|
|
3160
|
+
const v = new _.MeshLambertMaterial({
|
|
3161
3161
|
vertexColors: !0,
|
|
3162
3162
|
transparent: s < 1,
|
|
3163
3163
|
opacity: s,
|
|
3164
|
-
side:
|
|
3165
|
-
}),
|
|
3166
|
-
|
|
3164
|
+
side: _.DoubleSide
|
|
3165
|
+
}), k = new _.Mesh(R, v);
|
|
3166
|
+
k.userData._isMergedBlocks = !0, k.userData._quadToBlock = C, k.userData._offset = { x: f, y: h, z: b }, e.scene.add(k), e.blocks.push(k), Me(e), e.camera && e.controls && (e.lastBounds = { minX: y, maxX: p, minY: g, maxY: M, minZ: z, maxZ: D }, st(e, { minX: y, maxX: p, minY: g, maxY: M, minZ: z, maxZ: D }));
|
|
3167
3167
|
}
|
|
3168
|
-
function
|
|
3168
|
+
function qt(e) {
|
|
3169
3169
|
var t;
|
|
3170
3170
|
e.blocks.forEach((n) => {
|
|
3171
3171
|
e.scene.remove(n), n.geometry.dispose(), n.material.dispose();
|
|
3172
|
-
}), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null),
|
|
3172
|
+
}), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null), Me(e);
|
|
3173
3173
|
}
|
|
3174
|
-
function
|
|
3174
|
+
function Qr(e, t) {
|
|
3175
3175
|
const n = Math.max(0, Math.min(1, Number(t)));
|
|
3176
3176
|
e.blocks.forEach((r) => {
|
|
3177
3177
|
r.material && (r.material.opacity = n, r.material.transparent = n < 1, r.material.needsUpdate = !0);
|
|
3178
3178
|
});
|
|
3179
3179
|
}
|
|
3180
|
-
function
|
|
3180
|
+
function eo(e, t, n) {
|
|
3181
3181
|
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, u = Number(t.z ?? t.center_z ?? 0) + i, a = Number(t.dx ?? t.size_x ?? 1), c = Number(t.dy ?? t.size_y ?? 1), m = Number(t.dz ?? t.size_z ?? 1);
|
|
3182
3182
|
if (!e._blockHighlightMesh) {
|
|
3183
|
-
const d = new
|
|
3184
|
-
e._blockHighlightMesh = new
|
|
3183
|
+
const d = new _.BoxGeometry(1, 1, 1), f = new _.MeshBasicMaterial({ transparent: !0, opacity: 0, depthWrite: !1 });
|
|
3184
|
+
e._blockHighlightMesh = new _.Mesh(d, f), e.scene.add(e._blockHighlightMesh);
|
|
3185
3185
|
}
|
|
3186
3186
|
return e._blockHighlightMesh.position.set(s, l, u), e._blockHighlightMesh.scale.set(a, c, m), e._blockHighlightMesh;
|
|
3187
3187
|
}
|
|
3188
|
-
function
|
|
3188
|
+
function Xt(e) {
|
|
3189
3189
|
var o, i;
|
|
3190
3190
|
if (!e._outlinePass || e.selectables.length === 0) {
|
|
3191
3191
|
e._outlinePass && Se(e, null);
|
|
@@ -3200,77 +3200,77 @@ function Ut(e) {
|
|
|
3200
3200
|
if ((o = r == null ? void 0 : r.userData) != null && o._isMergedBlocks) {
|
|
3201
3201
|
const s = Math.floor(n.faceIndex / 2), l = (i = r.userData._quadToBlock) == null ? void 0 : i[s];
|
|
3202
3202
|
if (l) {
|
|
3203
|
-
Se(e,
|
|
3203
|
+
Se(e, eo(e, l, r.userData._offset));
|
|
3204
3204
|
return;
|
|
3205
3205
|
}
|
|
3206
3206
|
}
|
|
3207
3207
|
Se(e, r);
|
|
3208
3208
|
}
|
|
3209
|
-
function
|
|
3209
|
+
function to(e) {
|
|
3210
3210
|
const t = e.renderer;
|
|
3211
3211
|
t && (e.handleCanvasClick = (n) => {
|
|
3212
|
-
var f, h, b,
|
|
3212
|
+
var f, h, b, y, p, g, M;
|
|
3213
3213
|
if (n.button !== 0) return;
|
|
3214
3214
|
if ((f = e.gizmo) != null && f.domElement) {
|
|
3215
|
-
const
|
|
3216
|
-
if (n.clientX >=
|
|
3215
|
+
const z = e.gizmo.domElement.getBoundingClientRect();
|
|
3216
|
+
if (n.clientX >= z.left && n.clientX <= z.right && n.clientY >= z.top && n.clientY <= z.bottom)
|
|
3217
3217
|
return;
|
|
3218
3218
|
}
|
|
3219
3219
|
const r = t.domElement.getBoundingClientRect(), o = n.clientX - r.left, i = n.clientY - r.top;
|
|
3220
|
-
if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera),
|
|
3221
|
-
const
|
|
3222
|
-
if (
|
|
3223
|
-
const
|
|
3224
|
-
if ((h =
|
|
3225
|
-
const
|
|
3226
|
-
|
|
3220
|
+
if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera), Xt(e), e.blocks.length > 0) {
|
|
3221
|
+
const z = e.raycaster.intersectObjects(e.blocks, !1);
|
|
3222
|
+
if (z.length > 0) {
|
|
3223
|
+
const D = z[0], x = D.object;
|
|
3224
|
+
if ((h = x == null ? void 0 : x.userData) != null && h._isMergedBlocks && e.blockClickHandler) {
|
|
3225
|
+
const O = Math.floor(D.faceIndex / 2), $ = x.userData._quadToBlock[O];
|
|
3226
|
+
$ && e.blockClickHandler($);
|
|
3227
3227
|
}
|
|
3228
3228
|
return;
|
|
3229
3229
|
}
|
|
3230
3230
|
}
|
|
3231
3231
|
const s = e.raycaster.intersectObjects(e.drillMeshes, !0), l = e.raycaster.intersectObjects(e.structuralMeshes, !0), u = ((b = s[0]) == null ? void 0 : b.distance) ?? 1 / 0;
|
|
3232
|
-
if ((((
|
|
3233
|
-
const
|
|
3234
|
-
e.drillholeClickHandler && e.drillholeClickHandler({ type: "structure", ...
|
|
3232
|
+
if ((((y = l[0]) == null ? void 0 : y.distance) ?? 1 / 0) < u && l.length > 0) {
|
|
3233
|
+
const z = l[0].object;
|
|
3234
|
+
e.drillholeClickHandler && e.drillholeClickHandler({ type: "structure", ...z.userData });
|
|
3235
3235
|
return;
|
|
3236
3236
|
}
|
|
3237
3237
|
if (s.length === 0) return;
|
|
3238
3238
|
let c = s[0].object;
|
|
3239
3239
|
for (; c && c.parent && !((p = c.userData) != null && p.holeId); )
|
|
3240
3240
|
c = c.parent;
|
|
3241
|
-
const m = (g = c == null ? void 0 : c.userData) == null ? void 0 : g.holeId, d = (
|
|
3241
|
+
const m = (g = c == null ? void 0 : c.userData) == null ? void 0 : g.holeId, d = (M = c == null ? void 0 : c.userData) == null ? void 0 : M.project;
|
|
3242
3242
|
m && e.drillholeClickHandler && e.drillholeClickHandler({ holeId: m, project: d });
|
|
3243
3243
|
}, t.domElement.addEventListener("click", e.handleCanvasClick));
|
|
3244
3244
|
}
|
|
3245
|
-
class
|
|
3245
|
+
class _i {
|
|
3246
3246
|
constructor() {
|
|
3247
|
-
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
|
|
3247
|
+
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;
|
|
3248
3248
|
}
|
|
3249
3249
|
init(t) {
|
|
3250
3250
|
if (!t) return;
|
|
3251
3251
|
this.container = t;
|
|
3252
3252
|
const n = t.clientWidth, r = t.clientHeight;
|
|
3253
|
-
this.scene = new
|
|
3254
|
-
const o = new
|
|
3253
|
+
this.scene = new _.Scene(), this.scene.background = new _.Color(16777215), this.camera = new _.PerspectiveCamera(28, n / r, 1e-3, 1e5), 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);
|
|
3254
|
+
const o = new _.AmbientLight(16777215, 1.2);
|
|
3255
3255
|
this.scene.add(o);
|
|
3256
|
-
const i = new
|
|
3256
|
+
const i = new _.DirectionalLight(16777215, 1.5);
|
|
3257
3257
|
i.position.set(10, 10, 5), this.scene.add(i);
|
|
3258
|
-
const s = new
|
|
3259
|
-
this.scene.add(s), this.controls = new
|
|
3260
|
-
LEFT:
|
|
3261
|
-
MIDDLE:
|
|
3262
|
-
RIGHT:
|
|
3258
|
+
const s = new _.AxesHelper(20);
|
|
3259
|
+
this.scene.add(s), this.controls = new rn(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 = 4e4, this.controls.mouseButtons = {
|
|
3260
|
+
LEFT: _.MOUSE.PAN,
|
|
3261
|
+
MIDDLE: _.MOUSE.DOLLY,
|
|
3262
|
+
RIGHT: _.MOUSE.ROTATE
|
|
3263
3263
|
}, this.controls.touches = {
|
|
3264
|
-
ONE:
|
|
3265
|
-
TWO:
|
|
3266
|
-
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new
|
|
3264
|
+
ONE: _.TOUCH.ROTATE,
|
|
3265
|
+
TWO: _.TOUCH.PAN
|
|
3266
|
+
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new on(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 sn(this.camera, this.renderer, {
|
|
3267
3267
|
container: this.container,
|
|
3268
3268
|
placement: "top-right",
|
|
3269
3269
|
size: 110,
|
|
3270
3270
|
offset: { top: 12, right: 12 },
|
|
3271
3271
|
animated: !0,
|
|
3272
3272
|
speed: 1.5
|
|
3273
|
-
}), this.gizmo.attachControls(this.controls),
|
|
3273
|
+
}), this.gizmo.attachControls(this.controls), to(this), Zr(this);
|
|
3274
3274
|
const l = () => {
|
|
3275
3275
|
var a;
|
|
3276
3276
|
this.frameId = requestAnimationFrame(l);
|
|
@@ -3282,16 +3282,16 @@ class oi {
|
|
|
3282
3282
|
resize() {
|
|
3283
3283
|
if (!this.container || !this.camera || !this.renderer) return;
|
|
3284
3284
|
const t = this.container.clientWidth, n = this.container.clientHeight;
|
|
3285
|
-
this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(),
|
|
3285
|
+
this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(), Wr(this, t, n);
|
|
3286
3286
|
}
|
|
3287
3287
|
dispose() {
|
|
3288
|
-
this.frameId && cancelAnimationFrame(this.frameId), this.renderer && this.handleCanvasClick && this.renderer.domElement.removeEventListener("click", this.handleCanvasClick), this.gizmo && (this.gizmo.dispose(), this.gizmo = null), this.viewChangeHandler = null,
|
|
3288
|
+
this.frameId && cancelAnimationFrame(this.frameId), this.renderer && this.handleCanvasClick && this.renderer.domElement.removeEventListener("click", this.handleCanvasClick), this.gizmo && (this.gizmo.dispose(), this.gizmo = null), this.viewChangeHandler = null, qt(this), Yt(this), jt(this), Mt(this), this.controls && this.controls.dispose(), this.flyControls && this.flyControls.dispose(), this.renderer && (this.renderer.dispose(), this.container && this.renderer.domElement && this.container.removeChild(this.renderer.domElement));
|
|
3289
3289
|
}
|
|
3290
3290
|
// ---------------------------------------------------------------------------
|
|
3291
3291
|
// Data renderers — delegate to domain modules
|
|
3292
3292
|
// ---------------------------------------------------------------------------
|
|
3293
3293
|
setDrillholes(t, n = {}) {
|
|
3294
|
-
|
|
3294
|
+
Ur(this, t, n);
|
|
3295
3295
|
}
|
|
3296
3296
|
/**
|
|
3297
3297
|
* Render block model data as a single merged mesh of exterior faces only.
|
|
@@ -3301,20 +3301,20 @@ class oi {
|
|
|
3301
3301
|
* @param {Object} [options]
|
|
3302
3302
|
*/
|
|
3303
3303
|
setBlocks(t, n, r, o = {}) {
|
|
3304
|
-
|
|
3304
|
+
Jr(this, t, n, r, o);
|
|
3305
3305
|
}
|
|
3306
3306
|
/**
|
|
3307
3307
|
* Update the opacity of all currently rendered blocks.
|
|
3308
3308
|
* @param {number} opacity - New opacity value between 0 and 1
|
|
3309
3309
|
*/
|
|
3310
3310
|
setBlockOpacity(t) {
|
|
3311
|
-
|
|
3311
|
+
Qr(this, t);
|
|
3312
3312
|
}
|
|
3313
3313
|
setStructuralDiscs(t, n, r = {}) {
|
|
3314
|
-
|
|
3314
|
+
zr(this, t, n, r);
|
|
3315
3315
|
}
|
|
3316
3316
|
setStructuralDiscsVisible(t) {
|
|
3317
|
-
|
|
3317
|
+
Er(this, t);
|
|
3318
3318
|
}
|
|
3319
3319
|
// ---------------------------------------------------------------------------
|
|
3320
3320
|
// Click handlers
|
|
@@ -3336,50 +3336,50 @@ class oi {
|
|
|
3336
3336
|
this.viewChangeHandler = typeof t == "function" ? t : null;
|
|
3337
3337
|
}
|
|
3338
3338
|
getViewState() {
|
|
3339
|
-
return
|
|
3339
|
+
return Gt(this);
|
|
3340
3340
|
}
|
|
3341
3341
|
setViewState(t) {
|
|
3342
|
-
return
|
|
3342
|
+
return kr(this, t);
|
|
3343
3343
|
}
|
|
3344
3344
|
_buildViewSignature(t) {
|
|
3345
|
-
return
|
|
3345
|
+
return it(t);
|
|
3346
3346
|
}
|
|
3347
3347
|
_emitViewChangeIfNeeded() {
|
|
3348
|
-
|
|
3348
|
+
Ar(this);
|
|
3349
3349
|
}
|
|
3350
3350
|
_fitCameraToBounds({ minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: s }) {
|
|
3351
|
-
|
|
3351
|
+
st(this, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: s });
|
|
3352
3352
|
}
|
|
3353
3353
|
recenterCameraToOrigin(t = 1e3) {
|
|
3354
|
-
|
|
3354
|
+
xr(this, t);
|
|
3355
3355
|
}
|
|
3356
3356
|
lookDown(t = 2e3) {
|
|
3357
|
-
|
|
3357
|
+
vr(this, t);
|
|
3358
3358
|
}
|
|
3359
3359
|
pan(t = 0, n = 0) {
|
|
3360
|
-
|
|
3360
|
+
Ir(this, t, n);
|
|
3361
3361
|
}
|
|
3362
3362
|
dolly(t = 1.1) {
|
|
3363
|
-
|
|
3363
|
+
Cr(this, t);
|
|
3364
3364
|
}
|
|
3365
3365
|
focusOnLastBounds(t = 1.2) {
|
|
3366
|
-
|
|
3366
|
+
Dr(this, t);
|
|
3367
3367
|
}
|
|
3368
3368
|
/**
|
|
3369
3369
|
* Change the camera field-of-view while keeping the visible scene the same apparent size.
|
|
3370
3370
|
* @param {number} fovDeg - Desired FOV in degrees
|
|
3371
3371
|
*/
|
|
3372
3372
|
setCameraFov(t) {
|
|
3373
|
-
|
|
3373
|
+
Or(this, t);
|
|
3374
3374
|
}
|
|
3375
3375
|
setControlMode(t = "orbit") {
|
|
3376
|
-
|
|
3376
|
+
Pr(this, t);
|
|
3377
3377
|
}
|
|
3378
3378
|
// ---------------------------------------------------------------------------
|
|
3379
3379
|
// Selection glow public API
|
|
3380
3380
|
// ---------------------------------------------------------------------------
|
|
3381
3381
|
_syncSelectables() {
|
|
3382
|
-
|
|
3382
|
+
Me(this);
|
|
3383
3383
|
}
|
|
3384
3384
|
/**
|
|
3385
3385
|
* Register the objects that are candidates for click-select glow.
|
|
@@ -3406,14 +3406,14 @@ class oi {
|
|
|
3406
3406
|
* Dispose the effect composer and all GPU resources used by the selection glow.
|
|
3407
3407
|
*/
|
|
3408
3408
|
disposeGlow() {
|
|
3409
|
-
|
|
3409
|
+
Mt(this);
|
|
3410
3410
|
}
|
|
3411
3411
|
/** @private */
|
|
3412
3412
|
_updateSelectionFromPointer() {
|
|
3413
|
-
|
|
3413
|
+
Xt(this);
|
|
3414
3414
|
}
|
|
3415
3415
|
}
|
|
3416
|
-
function
|
|
3416
|
+
function Ni({
|
|
3417
3417
|
controlMode: e = "orbit",
|
|
3418
3418
|
onToggleFly: t = () => {
|
|
3419
3419
|
},
|
|
@@ -3424,14 +3424,14 @@ function ii({
|
|
|
3424
3424
|
onFit: o = () => {
|
|
3425
3425
|
}
|
|
3426
3426
|
}) {
|
|
3427
|
-
return /* @__PURE__ */
|
|
3428
|
-
/* @__PURE__ */
|
|
3429
|
-
/* @__PURE__ */
|
|
3430
|
-
/* @__PURE__ */
|
|
3431
|
-
/* @__PURE__ */
|
|
3427
|
+
return /* @__PURE__ */ J("div", { className: "baselode-3d-controls", children: [
|
|
3428
|
+
/* @__PURE__ */ S("button", { type: "button", className: "ghost-button", onClick: n, children: "Recenter to (0,0,0)" }),
|
|
3429
|
+
/* @__PURE__ */ S("button", { type: "button", className: "ghost-button", onClick: r, children: "Look down" }),
|
|
3430
|
+
/* @__PURE__ */ S("button", { type: "button", className: "ghost-button", onClick: o, children: "Fit to scene" }),
|
|
3431
|
+
/* @__PURE__ */ S("button", { type: "button", className: "ghost-button", onClick: t, children: e === "orbit" ? "Enable fly controls" : "Disable fly controls" })
|
|
3432
3432
|
] });
|
|
3433
3433
|
}
|
|
3434
|
-
function
|
|
3434
|
+
function Mi({
|
|
3435
3435
|
properties: e = [],
|
|
3436
3436
|
selectedProperty: t = "",
|
|
3437
3437
|
onPropertyChange: n = () => {
|
|
@@ -3445,9 +3445,9 @@ function si({
|
|
|
3445
3445
|
}
|
|
3446
3446
|
}) {
|
|
3447
3447
|
var u, a;
|
|
3448
|
-
return /* @__PURE__ */
|
|
3449
|
-
/* @__PURE__ */
|
|
3450
|
-
/* @__PURE__ */
|
|
3448
|
+
return /* @__PURE__ */ J("div", { className: "bm-widget", children: [
|
|
3449
|
+
/* @__PURE__ */ S("label", { className: "bm-widget__label", htmlFor: "bm-property-select", children: "Color by" }),
|
|
3450
|
+
/* @__PURE__ */ J(
|
|
3451
3451
|
"select",
|
|
3452
3452
|
{
|
|
3453
3453
|
id: "bm-property-select",
|
|
@@ -3455,19 +3455,19 @@ function si({
|
|
|
3455
3455
|
value: t,
|
|
3456
3456
|
onChange: (c) => n(c.target.value),
|
|
3457
3457
|
children: [
|
|
3458
|
-
e.length === 0 && /* @__PURE__ */
|
|
3459
|
-
e.map((c) => /* @__PURE__ */
|
|
3458
|
+
e.length === 0 && /* @__PURE__ */ S("option", { value: "", children: "— no attributes —" }),
|
|
3459
|
+
e.map((c) => /* @__PURE__ */ S("option", { value: c, children: c }, c))
|
|
3460
3460
|
]
|
|
3461
3461
|
}
|
|
3462
3462
|
),
|
|
3463
|
-
i && i.type === "numeric" && /* @__PURE__ */
|
|
3464
|
-
/* @__PURE__ */
|
|
3465
|
-
/* @__PURE__ */
|
|
3466
|
-
/* @__PURE__ */
|
|
3463
|
+
i && i.type === "numeric" && /* @__PURE__ */ J("div", { className: "bm-widget__scale", children: [
|
|
3464
|
+
/* @__PURE__ */ S("span", { className: "bm-widget__scale-label bm-widget__scale-label--min", children: ((u = i.min) == null ? void 0 : u.toFixed(2)) ?? "—" }),
|
|
3465
|
+
/* @__PURE__ */ S("div", { className: "bm-widget__scale-bar" }),
|
|
3466
|
+
/* @__PURE__ */ S("span", { className: "bm-widget__scale-label bm-widget__scale-label--max", children: ((a = i.max) == null ? void 0 : a.toFixed(2)) ?? "—" })
|
|
3467
3467
|
] }),
|
|
3468
|
-
i && i.type === "categorical" && /* @__PURE__ */
|
|
3468
|
+
i && i.type === "categorical" && /* @__PURE__ */ S("div", { className: "bm-widget__categories", children: (i.categories || []).map((c, m) => {
|
|
3469
3469
|
const d = Math.round(m / Math.max(i.categories.length, 1) * 360);
|
|
3470
|
-
return /* @__PURE__ */
|
|
3470
|
+
return /* @__PURE__ */ S(
|
|
3471
3471
|
"span",
|
|
3472
3472
|
{
|
|
3473
3473
|
className: "bm-widget__category-chip",
|
|
@@ -3477,12 +3477,12 @@ function si({
|
|
|
3477
3477
|
c
|
|
3478
3478
|
);
|
|
3479
3479
|
}) }),
|
|
3480
|
-
/* @__PURE__ */
|
|
3480
|
+
/* @__PURE__ */ J("label", { className: "bm-widget__label", htmlFor: "bm-opacity-slider", children: [
|
|
3481
3481
|
"Opacity (",
|
|
3482
3482
|
Math.round(r * 100),
|
|
3483
3483
|
"%)"
|
|
3484
3484
|
] }),
|
|
3485
|
-
/* @__PURE__ */
|
|
3485
|
+
/* @__PURE__ */ S(
|
|
3486
3486
|
"input",
|
|
3487
3487
|
{
|
|
3488
3488
|
id: "bm-opacity-slider",
|
|
@@ -3495,10 +3495,10 @@ function si({
|
|
|
3495
3495
|
onChange: (c) => o(parseFloat(c.target.value))
|
|
3496
3496
|
}
|
|
3497
3497
|
),
|
|
3498
|
-
s && /* @__PURE__ */
|
|
3499
|
-
/* @__PURE__ */
|
|
3500
|
-
/* @__PURE__ */
|
|
3501
|
-
/* @__PURE__ */
|
|
3498
|
+
s && /* @__PURE__ */ J("div", { className: "bm-widget__popup", children: [
|
|
3499
|
+
/* @__PURE__ */ J("div", { className: "bm-widget__popup-header", children: [
|
|
3500
|
+
/* @__PURE__ */ S("span", { children: "Block attributes" }),
|
|
3501
|
+
/* @__PURE__ */ S(
|
|
3502
3502
|
"button",
|
|
3503
3503
|
{
|
|
3504
3504
|
type: "button",
|
|
@@ -3509,14 +3509,294 @@ function si({
|
|
|
3509
3509
|
}
|
|
3510
3510
|
)
|
|
3511
3511
|
] }),
|
|
3512
|
-
/* @__PURE__ */
|
|
3513
|
-
/* @__PURE__ */
|
|
3514
|
-
/* @__PURE__ */
|
|
3512
|
+
/* @__PURE__ */ S("table", { className: "bm-widget__popup-table", children: /* @__PURE__ */ S("tbody", { children: Object.entries(s).map(([c, m]) => /* @__PURE__ */ J("tr", { children: [
|
|
3513
|
+
/* @__PURE__ */ S("th", { children: c }),
|
|
3514
|
+
/* @__PURE__ */ S("td", { children: m == null ? "—" : String(m) })
|
|
3515
3515
|
] }, c)) }) })
|
|
3516
3516
|
] })
|
|
3517
3517
|
] });
|
|
3518
3518
|
}
|
|
3519
|
-
|
|
3519
|
+
const no = [
|
|
3520
|
+
{ minZoom: 0, lodKey: "thumb" },
|
|
3521
|
+
{ minZoom: 4, lodKey: "medium" },
|
|
3522
|
+
{ minZoom: 7, lodKey: "full" }
|
|
3523
|
+
], Zt = 50;
|
|
3524
|
+
function ro(e, t, n = no) {
|
|
3525
|
+
var i;
|
|
3526
|
+
const r = e.lod_urls;
|
|
3527
|
+
if (!r || typeof r != "object" || Array.isArray(r))
|
|
3528
|
+
return e.image_url || "";
|
|
3529
|
+
let o = ((i = n[0]) == null ? void 0 : i.lodKey) ?? "thumb";
|
|
3530
|
+
for (const s of n)
|
|
3531
|
+
t >= s.minZoom && (o = s.lodKey);
|
|
3532
|
+
return r[o] || e.image_url || "";
|
|
3533
|
+
}
|
|
3534
|
+
function oo(e) {
|
|
3535
|
+
return [...e].sort((t, n) => (t.from_depth ?? 0) - (n.from_depth ?? 0));
|
|
3536
|
+
}
|
|
3537
|
+
function io(e) {
|
|
3538
|
+
const t = {};
|
|
3539
|
+
for (const n of e) {
|
|
3540
|
+
const r = n.photo_set != null && n.photo_set !== "" ? String(n.photo_set) : "default";
|
|
3541
|
+
t[r] || (t[r] = []), t[r].push(n);
|
|
3542
|
+
}
|
|
3543
|
+
return t;
|
|
3544
|
+
}
|
|
3545
|
+
function so(e, t, n = 10) {
|
|
3546
|
+
const r = [];
|
|
3547
|
+
if (e >= t || n <= 0) return r;
|
|
3548
|
+
const o = Math.ceil(e / n) * n, i = n * 1e-9;
|
|
3549
|
+
for (let s = o; s <= t + i; s += n) {
|
|
3550
|
+
const l = Math.round(s * 1e6) / 1e6;
|
|
3551
|
+
r.push({ depth: l, label: `${l} m` });
|
|
3552
|
+
}
|
|
3553
|
+
return r;
|
|
3554
|
+
}
|
|
3555
|
+
function lo(e) {
|
|
3556
|
+
return e >= 9 ? 1 : e >= 7 ? 2 : e >= 5 ? 5 : e >= 3 ? 10 : 20;
|
|
3557
|
+
}
|
|
3558
|
+
function Wt(e) {
|
|
3559
|
+
return `tray_${String(e).padStart(3, "0")}.jpg`;
|
|
3560
|
+
}
|
|
3561
|
+
function ao(e, t, n, r, o = "Tray Images", i = Wt) {
|
|
3562
|
+
const s = (n ?? "").replace(/\/$/, ""), l = (r ?? "").replace(/\/$/, "");
|
|
3563
|
+
return t.map((u, a) => {
|
|
3564
|
+
const c = u.filename ?? i(a), m = u.photoSet ?? o;
|
|
3565
|
+
return {
|
|
3566
|
+
hole_id: e,
|
|
3567
|
+
from_depth: u.fromDepth,
|
|
3568
|
+
to_depth: u.toDepth,
|
|
3569
|
+
photo_set: m,
|
|
3570
|
+
image_url: `${s}/${c}`,
|
|
3571
|
+
lod_urls: {
|
|
3572
|
+
thumb: `${s}/${c}`,
|
|
3573
|
+
full: `${l}/${c}`
|
|
3574
|
+
}
|
|
3575
|
+
};
|
|
3576
|
+
});
|
|
3577
|
+
}
|
|
3578
|
+
function zi(e, t, n = Zt) {
|
|
3579
|
+
const r = t / 5;
|
|
3580
|
+
return Math.max(1, Math.round(e * n * r));
|
|
3581
|
+
}
|
|
3582
|
+
const We = 5, zt = 1.12, co = 0.05, uo = 40;
|
|
3583
|
+
function mo({
|
|
3584
|
+
photos: e = [],
|
|
3585
|
+
holeId: t = "",
|
|
3586
|
+
initialZoom: n = 5,
|
|
3587
|
+
transform: r,
|
|
3588
|
+
onTransformChange: o
|
|
3589
|
+
}) {
|
|
3590
|
+
const [i, s] = Q({ scale: 1, tx: 0, ty: 0 }), l = r ?? i, u = Le(l);
|
|
3591
|
+
u.current = l;
|
|
3592
|
+
const a = Ue(
|
|
3593
|
+
(E) => {
|
|
3594
|
+
const F = typeof E == "function" ? E(u.current) : E;
|
|
3595
|
+
o ? o(F) : s(F);
|
|
3596
|
+
},
|
|
3597
|
+
[o]
|
|
3598
|
+
), [c, m] = Q(!1), d = Le(null), f = Le(null), h = ne(() => oo(e), [e]), b = ne(() => io(h), [h]), y = ne(() => {
|
|
3599
|
+
const E = /* @__PURE__ */ new Set();
|
|
3600
|
+
for (const F of e) {
|
|
3601
|
+
const C = F.photo_set != null && F.photo_set !== "" ? String(F.photo_set) : "default";
|
|
3602
|
+
E.add(C);
|
|
3603
|
+
}
|
|
3604
|
+
return [...E];
|
|
3605
|
+
}, [e]), { minDepth: p, maxDepth: g } = ne(() => {
|
|
3606
|
+
if (!h.length) return { minDepth: 0, maxDepth: 0 };
|
|
3607
|
+
const E = h.map((F) => F.to_depth ?? F.from_depth ?? 0);
|
|
3608
|
+
return {
|
|
3609
|
+
minDepth: h[0].from_depth ?? 0,
|
|
3610
|
+
maxDepth: Math.max(...E)
|
|
3611
|
+
};
|
|
3612
|
+
}, [h]), M = Zt * We / 5, z = ne(
|
|
3613
|
+
() => Math.max(1, Math.round((g - p) * M)),
|
|
3614
|
+
[p, g, M]
|
|
3615
|
+
), D = ne(() => {
|
|
3616
|
+
const E = lo(We);
|
|
3617
|
+
return so(p, g, E);
|
|
3618
|
+
}, [p, g]), x = 540 * We / 5, O = ne(
|
|
3619
|
+
() => Math.max(1, Math.min(10, Math.round(n * l.scale))),
|
|
3620
|
+
[n, l.scale]
|
|
3621
|
+
), $ = Ue((E) => {
|
|
3622
|
+
E.preventDefault();
|
|
3623
|
+
const F = E.deltaY < 0 ? zt : 1 / zt, C = f.current.getBoundingClientRect(), H = E.clientX - C.left, R = E.clientY - C.top;
|
|
3624
|
+
a((v) => {
|
|
3625
|
+
const k = Math.max(co, Math.min(uo, v.scale * F)), N = k / v.scale;
|
|
3626
|
+
return {
|
|
3627
|
+
scale: k,
|
|
3628
|
+
tx: H - (H - v.tx) * N,
|
|
3629
|
+
ty: R - (R - v.ty) * N
|
|
3630
|
+
};
|
|
3631
|
+
});
|
|
3632
|
+
}, [a]);
|
|
3633
|
+
se(() => {
|
|
3634
|
+
const E = f.current;
|
|
3635
|
+
if (E)
|
|
3636
|
+
return E.addEventListener("wheel", $, { passive: !1 }), () => E.removeEventListener("wheel", $);
|
|
3637
|
+
}, [$]);
|
|
3638
|
+
const P = Ue((E) => {
|
|
3639
|
+
E.button === 0 && (E.preventDefault(), d.current = {
|
|
3640
|
+
x: E.clientX,
|
|
3641
|
+
y: E.clientY,
|
|
3642
|
+
tx: u.current.tx,
|
|
3643
|
+
ty: u.current.ty
|
|
3644
|
+
}, m(!0));
|
|
3645
|
+
}, []);
|
|
3646
|
+
return se(() => {
|
|
3647
|
+
const E = (C) => {
|
|
3648
|
+
if (!d.current) return;
|
|
3649
|
+
const { tx: H, ty: R, x: v, y: k } = d.current;
|
|
3650
|
+
a((N) => ({
|
|
3651
|
+
...N,
|
|
3652
|
+
tx: H + (C.clientX - v),
|
|
3653
|
+
ty: R + (C.clientY - k)
|
|
3654
|
+
}));
|
|
3655
|
+
}, F = () => {
|
|
3656
|
+
d.current = null, m(!1);
|
|
3657
|
+
};
|
|
3658
|
+
return window.addEventListener("mousemove", E), window.addEventListener("mouseup", F), () => {
|
|
3659
|
+
window.removeEventListener("mousemove", E), window.removeEventListener("mouseup", F);
|
|
3660
|
+
};
|
|
3661
|
+
}, [a]), /* @__PURE__ */ J("div", { className: "core-photo-table", children: [
|
|
3662
|
+
/* @__PURE__ */ J("div", { className: "core-photo-controls", children: [
|
|
3663
|
+
t && /* @__PURE__ */ S("span", { className: "core-photo-hole-id", children: t }),
|
|
3664
|
+
/* @__PURE__ */ J("span", { className: "core-photo-zoom-label", children: [
|
|
3665
|
+
Math.round(l.scale * 100),
|
|
3666
|
+
"%"
|
|
3667
|
+
] }),
|
|
3668
|
+
/* @__PURE__ */ S(
|
|
3669
|
+
"button",
|
|
3670
|
+
{
|
|
3671
|
+
className: "core-photo-zoom-btn",
|
|
3672
|
+
onClick: () => a({ scale: 1, tx: 0, ty: 0 }),
|
|
3673
|
+
"aria-label": "Reset view",
|
|
3674
|
+
title: "Reset view",
|
|
3675
|
+
children: "⌂"
|
|
3676
|
+
}
|
|
3677
|
+
)
|
|
3678
|
+
] }),
|
|
3679
|
+
e.length > 0 && /* @__PURE__ */ J("div", { className: "core-photo-col-headers", children: [
|
|
3680
|
+
/* @__PURE__ */ S("div", { className: "core-photo-ruler-spacer" }),
|
|
3681
|
+
y.map((E) => /* @__PURE__ */ S(
|
|
3682
|
+
"div",
|
|
3683
|
+
{
|
|
3684
|
+
className: "core-photo-set-header",
|
|
3685
|
+
style: { width: x },
|
|
3686
|
+
children: E
|
|
3687
|
+
},
|
|
3688
|
+
E
|
|
3689
|
+
))
|
|
3690
|
+
] }),
|
|
3691
|
+
e.length === 0 ? /* @__PURE__ */ S("div", { className: "core-photo-empty", children: "No photos to display." }) : /* @__PURE__ */ S(
|
|
3692
|
+
"div",
|
|
3693
|
+
{
|
|
3694
|
+
className: `core-photo-scroll${c ? " is-dragging" : ""}`,
|
|
3695
|
+
ref: f,
|
|
3696
|
+
onMouseDown: P,
|
|
3697
|
+
children: /* @__PURE__ */ J(
|
|
3698
|
+
"div",
|
|
3699
|
+
{
|
|
3700
|
+
className: "core-photo-inner",
|
|
3701
|
+
style: {
|
|
3702
|
+
height: z,
|
|
3703
|
+
transform: `translate(${l.tx}px, ${l.ty}px) scale(${l.scale})`,
|
|
3704
|
+
transformOrigin: "0 0"
|
|
3705
|
+
},
|
|
3706
|
+
children: [
|
|
3707
|
+
/* @__PURE__ */ S(
|
|
3708
|
+
"div",
|
|
3709
|
+
{
|
|
3710
|
+
className: "core-photo-depth-ruler",
|
|
3711
|
+
style: { height: z },
|
|
3712
|
+
children: D.map(({ depth: E, label: F }) => /* @__PURE__ */ S(
|
|
3713
|
+
"div",
|
|
3714
|
+
{
|
|
3715
|
+
className: "core-photo-depth-marker",
|
|
3716
|
+
style: {
|
|
3717
|
+
top: Math.round((E - p) * M)
|
|
3718
|
+
},
|
|
3719
|
+
children: F
|
|
3720
|
+
},
|
|
3721
|
+
E
|
|
3722
|
+
))
|
|
3723
|
+
}
|
|
3724
|
+
),
|
|
3725
|
+
y.map((E) => /* @__PURE__ */ S(
|
|
3726
|
+
"div",
|
|
3727
|
+
{
|
|
3728
|
+
className: "core-photo-col-body",
|
|
3729
|
+
style: { height: z, width: x },
|
|
3730
|
+
children: b[E].map((F) => {
|
|
3731
|
+
const C = F.from_depth ?? 0, H = F.to_depth ?? C, R = Math.round(
|
|
3732
|
+
(C - p) * M
|
|
3733
|
+
), v = Math.max(
|
|
3734
|
+
2,
|
|
3735
|
+
Math.round((H - C) * M)
|
|
3736
|
+
), k = ro(F, O);
|
|
3737
|
+
return /* @__PURE__ */ J(
|
|
3738
|
+
"div",
|
|
3739
|
+
{
|
|
3740
|
+
className: "core-photo-item",
|
|
3741
|
+
style: { top: R, height: v, width: x },
|
|
3742
|
+
title: `${C}–${H} m`,
|
|
3743
|
+
children: [
|
|
3744
|
+
k ? /* @__PURE__ */ S(
|
|
3745
|
+
"img",
|
|
3746
|
+
{
|
|
3747
|
+
src: k,
|
|
3748
|
+
alt: `Core ${C}–${H} m`,
|
|
3749
|
+
loading: "lazy"
|
|
3750
|
+
}
|
|
3751
|
+
) : /* @__PURE__ */ S("div", { className: "core-photo-no-image" }),
|
|
3752
|
+
v >= 18 && /* @__PURE__ */ J("span", { className: "core-photo-item-label", children: [
|
|
3753
|
+
C,
|
|
3754
|
+
"–",
|
|
3755
|
+
H,
|
|
3756
|
+
" m"
|
|
3757
|
+
] })
|
|
3758
|
+
]
|
|
3759
|
+
},
|
|
3760
|
+
`${F.hole_id ?? ""}-${C}-${H}-${E}`
|
|
3761
|
+
);
|
|
3762
|
+
})
|
|
3763
|
+
},
|
|
3764
|
+
E
|
|
3765
|
+
))
|
|
3766
|
+
]
|
|
3767
|
+
}
|
|
3768
|
+
)
|
|
3769
|
+
}
|
|
3770
|
+
)
|
|
3771
|
+
] });
|
|
3772
|
+
}
|
|
3773
|
+
function Ei({
|
|
3774
|
+
holeId: e = "",
|
|
3775
|
+
trays: t = [],
|
|
3776
|
+
thumbBaseUrl: n = "",
|
|
3777
|
+
fullBaseUrl: r = "",
|
|
3778
|
+
photoSet: o = "Tray Images",
|
|
3779
|
+
getFilename: i = Wt,
|
|
3780
|
+
initialZoom: s = 5,
|
|
3781
|
+
transform: l,
|
|
3782
|
+
onTransformChange: u
|
|
3783
|
+
}) {
|
|
3784
|
+
const a = ne(
|
|
3785
|
+
() => ao(e, t, n, r, o, i),
|
|
3786
|
+
[e, t, n, r, o, i]
|
|
3787
|
+
);
|
|
3788
|
+
return /* @__PURE__ */ S(
|
|
3789
|
+
mo,
|
|
3790
|
+
{
|
|
3791
|
+
photos: a,
|
|
3792
|
+
holeId: e,
|
|
3793
|
+
initialZoom: s,
|
|
3794
|
+
transform: l,
|
|
3795
|
+
onTransformChange: u
|
|
3796
|
+
}
|
|
3797
|
+
);
|
|
3798
|
+
}
|
|
3799
|
+
function ki(e) {
|
|
3520
3800
|
const t = typeof e == "string" ? JSON.parse(e) : e;
|
|
3521
3801
|
if (t.schema_version !== "1.0")
|
|
3522
3802
|
throw new Error(
|
|
@@ -3544,187 +3824,199 @@ function li(e) {
|
|
|
3544
3824
|
blocks: n
|
|
3545
3825
|
};
|
|
3546
3826
|
}
|
|
3547
|
-
function
|
|
3548
|
-
const t = new
|
|
3827
|
+
function fo(e) {
|
|
3828
|
+
const t = new _.BufferGeometry(), n = new Float32Array(e.vertices.length * 3);
|
|
3549
3829
|
e.vertices.forEach(([o, i, s], l) => {
|
|
3550
3830
|
n[l * 3] = o, n[l * 3 + 1] = i, n[l * 3 + 2] = s;
|
|
3551
|
-
}), t.setAttribute("position", new
|
|
3831
|
+
}), t.setAttribute("position", new _.BufferAttribute(n, 3));
|
|
3552
3832
|
const r = new Uint32Array(e.triangles.length * 3);
|
|
3553
3833
|
return e.triangles.forEach(([o, i, s], l) => {
|
|
3554
3834
|
r[l * 3] = o, r[l * 3 + 1] = i, r[l * 3 + 2] = s;
|
|
3555
|
-
}), t.setIndex(new
|
|
3835
|
+
}), t.setIndex(new _.BufferAttribute(r, 1)), t;
|
|
3556
3836
|
}
|
|
3557
|
-
function
|
|
3558
|
-
const { defaultOpacity: r = 1 } = n, o = new
|
|
3837
|
+
function Ai(e, t, n = {}) {
|
|
3838
|
+
const { defaultOpacity: r = 1 } = n, o = new _.Group();
|
|
3559
3839
|
return t.blocks.forEach((i) => {
|
|
3560
|
-
var b,
|
|
3561
|
-
const s =
|
|
3562
|
-
color: new
|
|
3840
|
+
var b, y;
|
|
3841
|
+
const s = fo(i), l = ((b = i.material) == null ? void 0 : b.color) ?? "#888888", u = ((y = i.material) == null ? void 0 : y.opacity) ?? r, a = u < 1, c = new _.MeshStandardMaterial({
|
|
3842
|
+
color: new _.Color(l),
|
|
3563
3843
|
opacity: u,
|
|
3564
3844
|
transparent: a,
|
|
3565
|
-
side:
|
|
3845
|
+
side: _.DoubleSide,
|
|
3566
3846
|
flatShading: !0
|
|
3567
|
-
}), m = new
|
|
3847
|
+
}), m = new _.Mesh(s, c);
|
|
3568
3848
|
m.userData = {
|
|
3569
3849
|
id: i.id,
|
|
3570
3850
|
attributes: i.attributes
|
|
3571
3851
|
};
|
|
3572
|
-
const d = new
|
|
3852
|
+
const d = new _.EdgesGeometry(s, 15), f = new _.LineBasicMaterial({ color: "#ffffbb", linewidth: 1 }), h = new _.LineSegments(d, f);
|
|
3573
3853
|
h.visible = !1, m.add(h), o.add(m);
|
|
3574
3854
|
}), e.add(o), o;
|
|
3575
3855
|
}
|
|
3576
3856
|
export {
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3857
|
+
mr as ASSAY_COLOR_PALETTE_10,
|
|
3858
|
+
fn as ASSAY_NON_VALUE_FIELDS,
|
|
3859
|
+
q as AZIMUTH,
|
|
3860
|
+
qn as BASELODE_COLORWAY,
|
|
3861
|
+
T as BASELODE_DARK,
|
|
3862
|
+
ai as BASELODE_DARK_TEMPLATE,
|
|
3863
|
+
li as BASELODE_DARK_TEMPLATE_NAME,
|
|
3864
|
+
xo as BASELODE_DATA_MODEL_DRILL_ASSAY,
|
|
3865
|
+
ko as BASELODE_DATA_MODEL_DRILL_COLLAR,
|
|
3866
|
+
dn as BASELODE_DATA_MODEL_DRILL_GEOLOGY,
|
|
3867
|
+
Ao as BASELODE_DATA_MODEL_DRILL_SURVEY,
|
|
3868
|
+
vo as BASELODE_DATA_MODEL_STRUCTURAL_POINT,
|
|
3869
|
+
V as BASELODE_LIGHT,
|
|
3870
|
+
si as BASELODE_LIGHT_TEMPLATE,
|
|
3871
|
+
ii as BASELODE_LIGHT_TEMPLATE_NAME,
|
|
3592
3872
|
Ce as BASELODE_TEMPLATE,
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3873
|
+
Yn as BASELODE_TEMPLATE_NAME,
|
|
3874
|
+
Zt as BASE_PIXELS_PER_METRE,
|
|
3875
|
+
qe as BUILTIN_COLOUR_MAPS,
|
|
3876
|
+
Ni as Baselode3DControls,
|
|
3877
|
+
_i as Baselode3DScene,
|
|
3878
|
+
Mi as BlockModelWidget,
|
|
3879
|
+
lt as CHART_OPTIONS,
|
|
3880
|
+
Mn as COMMENT_COLUMN_NAMES,
|
|
3881
|
+
Ve as COMMODITY_COLOURS,
|
|
3882
|
+
Et as CRS,
|
|
3883
|
+
mo as CorePhotoTable,
|
|
3884
|
+
Ei as CorePhotoViewer,
|
|
3885
|
+
mn as DEFAULT_COLUMN_MAP,
|
|
3886
|
+
no as DEFAULT_LOD_BREAKPOINTS,
|
|
3603
3887
|
W as DEPTH,
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3888
|
+
X as DIP,
|
|
3889
|
+
Oe as DISPLAY_CATEGORICAL,
|
|
3890
|
+
xe as DISPLAY_COMMENT,
|
|
3891
|
+
$e as DISPLAY_HIDDEN,
|
|
3892
|
+
ve as DISPLAY_NUMERIC,
|
|
3893
|
+
Je as DISPLAY_TADPOLE,
|
|
3894
|
+
pe as EASTING,
|
|
3895
|
+
Ae as ELEVATION,
|
|
3896
|
+
tr as ERROR_COLOR,
|
|
3897
|
+
Xn as FALLBACK_COLOUR,
|
|
3898
|
+
Lr as FOV_MAX_DEG,
|
|
3899
|
+
Sr as FOV_MIN_DEG,
|
|
3900
|
+
L as FROM,
|
|
3901
|
+
ae as GEOLOGY_CODE,
|
|
3902
|
+
ce as GEOLOGY_DESCRIPTION,
|
|
3903
|
+
at as HIDDEN_COLUMNS,
|
|
3904
|
+
A as HOLE_ID,
|
|
3905
|
+
oe as LATITUDE,
|
|
3906
|
+
Zn as LITHOLOGY_COLOURS,
|
|
3907
|
+
ie as LONGITUDE,
|
|
3624
3908
|
Ie as MID,
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
Ro as
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3909
|
+
be as NORTHING,
|
|
3910
|
+
Jn as NUMERIC_LINE_COLOR,
|
|
3911
|
+
Qn as NUMERIC_MARKER_COLOR,
|
|
3912
|
+
me as PROJECT_ID,
|
|
3913
|
+
un as STRIKE,
|
|
3914
|
+
w as TO,
|
|
3915
|
+
mi as TracePlot,
|
|
3916
|
+
Ai as addGradeBlocksToScene,
|
|
3917
|
+
Gn as alphaBetaToNormal,
|
|
3918
|
+
yi as annotationsFromIntervals,
|
|
3919
|
+
Wo as assembleDataset,
|
|
3920
|
+
Ho as attachAssayPositions,
|
|
3921
|
+
Bo as balancedTangentialDesurvey,
|
|
3922
|
+
An as buildAssayState,
|
|
3923
|
+
ci as buildCategoricalStripLogConfig,
|
|
3924
|
+
cr as buildCommentsConfig,
|
|
3925
|
+
so as buildDepthMarkers,
|
|
3926
|
+
fr as buildEqualRangeColorScale,
|
|
3927
|
+
or as buildIntervalPoints,
|
|
3928
|
+
Tt as buildPlotConfig,
|
|
3929
|
+
di as buildStrikeDipSymbol,
|
|
3930
|
+
Mr as buildStructuralDiscs,
|
|
3931
|
+
ui as buildStructuralStripConfig,
|
|
3932
|
+
ar as buildTadpoleConfig,
|
|
3933
|
+
Vo as buildTraces,
|
|
3934
|
+
ao as buildTrayPhotos,
|
|
3935
|
+
it as buildViewSignature,
|
|
3936
|
+
ei as calculateBlockVolume,
|
|
3937
|
+
Fn as calculatePropertyStats,
|
|
3938
|
+
zn as classifyColumns,
|
|
3939
|
+
Zo as coerceNumeric,
|
|
3940
|
+
Un as computeStructuralPositions,
|
|
3941
|
+
Po as defaultChartType,
|
|
3942
|
+
Wt as defaultTrayFilename,
|
|
3943
|
+
zi as depthIntervalToPixels,
|
|
3944
|
+
lo as depthMarkerInterval,
|
|
3945
|
+
Be as deriveAssayProps,
|
|
3946
|
+
wo as desurveyTraces,
|
|
3947
|
+
Nr as dipAzimuthToNormal,
|
|
3948
|
+
Cr as dolly,
|
|
3949
|
+
Ar as emitViewChangeIfNeeded,
|
|
3950
|
+
Tn as filterBlocks,
|
|
3951
|
+
Xo as filterByProject,
|
|
3952
|
+
st as fitCameraToBounds,
|
|
3953
|
+
Dr as focusOnLastBounds,
|
|
3954
|
+
Qo as getBlockStats,
|
|
3955
|
+
wr as getCategoryHexColor,
|
|
3956
|
+
et as getChartOptions,
|
|
3957
|
+
wn as getColorForValue,
|
|
3958
|
+
Wn as getColour,
|
|
3959
|
+
Vt as getEqualRangeBinIndex,
|
|
3960
|
+
pr as getEqualRangeColor,
|
|
3961
|
+
Gt as getViewState,
|
|
3962
|
+
fo as gradeBlockToThreeGeometry,
|
|
3963
|
+
io as groupPhotosBySet,
|
|
3964
|
+
Bn as groupRowsByHole,
|
|
3965
|
+
rr as holeHasData,
|
|
3966
|
+
jn as interpolateTrace,
|
|
3967
|
+
gi as intervalsAsTubes,
|
|
3968
|
+
qo as joinAssaysToTraces,
|
|
3969
|
+
Fo as loadAssayFile,
|
|
3970
|
+
kn as loadAssayHole,
|
|
3971
|
+
En as loadAssayMetadata,
|
|
3972
|
+
Uo as loadAssays,
|
|
3973
|
+
Jo as loadBlockModelMetadata,
|
|
3974
|
+
jo as loadCollars,
|
|
3975
|
+
Yo as loadGeology,
|
|
3976
|
+
ki as loadGradeBlocksFromJson,
|
|
3977
|
+
Go as loadSurveys,
|
|
3978
|
+
je as loadTable,
|
|
3979
|
+
Do as logDataInfo,
|
|
3980
|
+
Co as logDataWarning,
|
|
3981
|
+
vr as lookDown,
|
|
3982
|
+
In as minimumCurvatureDesurvey,
|
|
3983
|
+
Pn as normalizeBlockRow,
|
|
3984
|
+
Lo as normalizeCsvRow,
|
|
3985
|
+
Te as normalizeFieldName,
|
|
3986
|
+
Ir as pan,
|
|
3987
|
+
Hn as parseAssayCsvTextToHoles,
|
|
3988
|
+
yn as parseAssayHole,
|
|
3989
|
+
So as parseAssayHoleIds,
|
|
3990
|
+
gn as parseAssayHoleIdsWithAssays,
|
|
3991
|
+
_n as parseAssaysCSV,
|
|
3992
|
+
Ko as parseBlockModelCSV,
|
|
3993
|
+
Ro as parseDrillholesCSV,
|
|
3994
|
+
Rn as parseGeologyCsvText,
|
|
3995
|
+
Vn as parseStructuralCSV,
|
|
3996
|
+
ri as parseStructuralIntervalsCSV,
|
|
3997
|
+
ni as parseStructuralPointsCSV,
|
|
3998
|
+
To as parseSurveyCSV,
|
|
3999
|
+
oi as parseUnifiedDataset,
|
|
4000
|
+
Oo as pickFirstPresent,
|
|
4001
|
+
hi as planView,
|
|
4002
|
+
br as projectTraceToSection,
|
|
4003
|
+
xr as recenterCameraToOrigin,
|
|
4004
|
+
Ct as reorderHoleIds,
|
|
4005
|
+
Kn as resolveColourMap,
|
|
4006
|
+
pi as sectionView,
|
|
4007
|
+
gr as sectionWindow,
|
|
4008
|
+
ro as selectPhotoLodUrl,
|
|
4009
|
+
Pr as setControlMode,
|
|
4010
|
+
Or as setFov,
|
|
4011
|
+
kr as setViewState,
|
|
4012
|
+
oo as sortPhotosByDepth,
|
|
4013
|
+
ge as standardizeColumns,
|
|
4014
|
+
Io as standardizeRowArray,
|
|
4015
|
+
$o as tangentialDesurvey,
|
|
4016
|
+
hn as toError,
|
|
4017
|
+
bi as tracesAsSegments,
|
|
4018
|
+
fi as useDrillholeTraceGrid,
|
|
4019
|
+
ti as validateStructuralPoints,
|
|
4020
|
+
Y as withDataErrorContext
|
|
3729
4021
|
};
|
|
3730
4022
|
//# sourceMappingURL=baselode.js.map
|