baselode 0.1.15 → 0.1.16

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