baselode 0.1.19 → 0.1.21

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.
@@ -1,86 +1,121 @@
1
1
  import * as f from "three";
2
- import { OrbitControls as rt } from "three/examples/jsm/controls/OrbitControls";
3
- import { FlyControls as ot } from "three/examples/jsm/controls/FlyControls";
4
- import { ViewportGizmo as it } from "three-viewport-gizmo";
5
- import { EffectComposer as st } from "three/examples/jsm/postprocessing/EffectComposer.js";
6
- import { RenderPass as at } from "three/examples/jsm/postprocessing/RenderPass.js";
7
- import { OutlinePass as lt } from "three/examples/jsm/postprocessing/OutlinePass.js";
8
- import ct from "papaparse";
9
- const H = "hole_id", Ne = "latitude", ke = "longitude", Oe = "elevation", Z = "azimuth", W = "dip", te = "from", J = "to", ce = "mid", Le = "project_id", De = "easting", Ae = "northing", we = "crs", ue = "depth", xe = "alpha", Se = "beta", ut = "strike", ve = "geology_code", Fe = "geology_description", Qn = {
2
+ import { OrbitControls as it } from "three/examples/jsm/controls/OrbitControls";
3
+ import { FlyControls as st } from "three/examples/jsm/controls/FlyControls";
4
+ import { ViewportGizmo as at } from "three-viewport-gizmo";
5
+ import { EffectComposer as lt } from "three/examples/jsm/postprocessing/EffectComposer.js";
6
+ import { RenderPass as ct } from "three/examples/jsm/postprocessing/RenderPass.js";
7
+ import { OutlinePass as ut } from "three/examples/jsm/postprocessing/OutlinePass.js";
8
+ import mt from "papaparse";
9
+ const lr = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole_id", cr = "hole_type", ur = "max_depth", mr = "surface_sample_id", ft = "surface_sample_type", ht = "datasource_surface_sample_id", xe = "project_id", bt = "report_number", ue = "latitude", me = "longitude", de = "elevation", fe = "easting", he = "northing", be = "crs", dr = "date_start", fr = "date_end", W = "azimuth", K = "dip", hr = "survey_type", pt = "sample_id", br = "datasource_sample_id", ne = "from", Q = "to", pe = "mid", ge = "depth", gt = "strike", Fe = "alpha", ve = "beta", Ie = "geology_code", Ce = "geology_description", yt = "comments", G = "extra", pr = -999.25, gr = -999.25, yr = {
10
10
  // A unique hole identifier across the entire dataset and all future data sets
11
11
  [H]: "string",
12
12
  // The hole ID from the original collar source
13
- datasource_hole_id: "string",
13
+ [we]: "string",
14
14
  // The project ID or project code from the original collar source, if available
15
- [Le]: "string",
15
+ [xe]: "string",
16
16
  // The latitude of the collar, in decimal degrees (WGS84)
17
- [Ne]: "number",
17
+ [ue]: "number",
18
18
  // The longitude of the collar, in decimal degrees (WGS84)
19
- [ke]: "number",
19
+ [me]: "number",
20
20
  // The elevation of the collar, in meters above sea level (WGS84)
21
- [Oe]: "number",
21
+ [de]: "number",
22
22
  // The easting coordinate of the collar, in meters (projected CRS)
23
- [De]: "number",
23
+ [fe]: "number",
24
24
  // The northing coordinate of the collar, in meters (projected CRS)
25
- [Ae]: "number",
26
- // The coordinate reference system of the collar coordinates for easting/northing, as an EPSG code or proj string
27
- [we]: "string"
28
- }, er = {
25
+ [he]: "number",
26
+ // The coordinate reference system of the collar coordinates for easting/northing,
27
+ // as an EPSG code or proj string
28
+ [be]: "string",
29
+ // Internal join key used by source schemas (e.g. raw_gswa) — distinct from
30
+ // the public hole_id.
31
+ [dt]: "string",
32
+ // Per-row dict of source-specific fields outside the canonical schema
33
+ // (populated by `bundleExtras`; empty object when the source had nothing extra).
34
+ [G]: "object"
35
+ }, _r = {
29
36
  // The unique hole id that maps to the collar and any other data tables
30
37
  [H]: "string",
31
38
  // The depth along the hole where the survey measurement was taken / started
32
- [ue]: "number",
33
- // The depth along the hole where the survey measurement ended, if applicable (some surveys are point measurements and may not have a 'to' depth)
34
- [J]: "number",
39
+ [ge]: "number",
40
+ // The depth along the hole where the survey measurement ended, if applicable
41
+ // (some surveys are point measurements and may not have a 'to' depth)
42
+ [Q]: "number",
35
43
  // The azimuth of the hole at the survey depth, in degrees from north
36
- [Z]: "number",
37
- // The dip of the hole at the survey depth, in degrees from horizontal (negative values indicate downward inclination)
38
- [W]: "number"
39
- }, tr = {
44
+ [W]: "number",
45
+ // The dip of the hole at the survey depth, in degrees from horizontal
46
+ // (negative values indicate downward inclination)
47
+ [K]: "number",
48
+ // Per-row dict of source-specific fields outside the canonical schema.
49
+ [G]: "object"
50
+ }, Mr = {
40
51
  // The unique hole id that maps to the collar and any other data tables
41
52
  [H]: "string",
42
53
  // The depth along the hole where the assay interval starts
43
- [te]: "number",
54
+ [ne]: "number",
44
55
  // The depth along the hole where the assay interval ends
45
- [J]: "number",
56
+ [Q]: "number",
46
57
  // The midpoint depth of the assay interval
47
- [ce]: "number"
48
- // assay value columns are variable and not standardized here.
49
- // Assays may be flattened (one column per assay type) or long (one row per assay type with an additional 'assay_type' column)
50
- }, nr = {
58
+ [pe]: "number",
59
+ // assay value columns are variable and not standardized here.
60
+ // Assays may be flattened (one column per assay type) or long
61
+ // (one row per assay type with an additional 'assay_type' column).
62
+ // Per-row dict of source-specific fields outside the canonical schema
63
+ // (sample identifiers, lab metadata, detection-limit flags, etc.).
64
+ [G]: "object"
65
+ }, Er = {
51
66
  [H]: "string",
52
- [te]: "number",
53
- [J]: "number",
54
- [ce]: "number",
55
- [ve]: "string",
56
- [Fe]: "string"
57
- }, rr = {
67
+ [ne]: "number",
68
+ [Q]: "number",
69
+ [pe]: "number",
70
+ [Ie]: "string",
71
+ [Ce]: "string",
72
+ // Per-row dict of source-specific fields outside the canonical schema.
73
+ [G]: "object"
74
+ }, zr = {
58
75
  [H]: "string",
59
- [ue]: "number",
76
+ [ge]: "number",
77
+ [K]: "number",
60
78
  [W]: "number",
61
- [Z]: "number",
62
- [xe]: "number",
63
- [Se]: "number",
64
- comments: "string"
65
- }, or = {
79
+ [Fe]: "number",
80
+ [ve]: "number",
81
+ [yt]: "string",
82
+ // Per-row dict of source-specific fields outside the canonical schema.
83
+ [G]: "object"
84
+ }, Nr = {
66
85
  [H]: "string",
67
- [te]: "number",
68
- [J]: "number",
69
- [ce]: "number"
86
+ [ne]: "number",
87
+ [Q]: "number",
88
+ [pe]: "number",
70
89
  // value columns are variable — not standardized here
71
- }, ir = -999.25, mt = {
90
+ // Per-row dict of source-specific fields outside the canonical schema.
91
+ [G]: "object"
92
+ }, Or = {
93
+ [pt]: "string",
94
+ [ht]: "string",
95
+ [bt]: "string",
96
+ [ue]: "number",
97
+ [me]: "number",
98
+ [de]: "number",
99
+ [fe]: "number",
100
+ [he]: "number",
101
+ [be]: "string",
102
+ [ft]: "string",
103
+ // Per-row dict of source-specific fields outside the canonical schema
104
+ // (analyte values, lab metadata, detection-limit flags, anumber, ...).
105
+ [G]: "object"
106
+ }, _t = {
72
107
  [H]: ["hole_id", "holeid", "hole id", "hole-id"],
73
- datasource_hole_id: ["datasource_hole_id", "datasourceholeid", "datasource hole id", "datasource-hole-id", "company_hole_id", "companyholeid", "company hole id", "company-hole-id"],
74
- [Le]: ["project_id", "projectid", "project id", "project-id", "project_code", "projectcode", "project code", "project-code", "companyId", "company_id", "companyid", "company id", "company-id", "dataset", "project"],
75
- [Ne]: ["latitude", "lat"],
76
- [ke]: ["longitude", "lon"],
77
- [Oe]: ["elevation", "rl", "elev", "z"],
78
- [De]: ["easting", "x"],
79
- [Ae]: ["northing", "y"],
80
- [we]: ["crs", "epsg", "projection"],
81
- [te]: ["from", "depth_from", "from_depth", "samp_from", "sample_from", "sampfrom", "fromdepth"],
82
- [J]: ["to", "depth_to", "to_depth", "samp_to", "sample_to", "sampto", "todepth"],
83
- [ve]: [
108
+ [we]: ["datasource_hole_id", "datasourceholeid", "datasource hole id", "datasource-hole-id", "company_hole_id", "companyholeid", "company hole id", "company-hole-id"],
109
+ [xe]: ["project_id", "projectid", "project id", "project-id", "project_code", "projectcode", "project code", "project-code", "companyId", "company_id", "companyid", "company id", "company-id", "dataset", "project"],
110
+ [ue]: ["latitude", "lat"],
111
+ [me]: ["longitude", "lon"],
112
+ [de]: ["elevation", "rl", "elev", "z"],
113
+ [fe]: ["easting", "x"],
114
+ [he]: ["northing", "y"],
115
+ [be]: ["crs", "epsg", "projection"],
116
+ [ne]: ["from", "depth_from", "from_depth", "samp_from", "sample_from", "sampfrom", "fromdepth"],
117
+ [Q]: ["to", "depth_to", "to_depth", "samp_to", "sample_to", "sampto", "todepth"],
118
+ [Ie]: [
84
119
  "geology_code",
85
120
  "geologycode",
86
121
  "lith1",
@@ -90,7 +125,7 @@ const H = "hole_id", Ne = "latitude", ke = "longitude", Oe = "elevation", Z = "a
90
125
  "plot_lithology",
91
126
  "rock1"
92
127
  ],
93
- [Fe]: [
128
+ [Ce]: [
94
129
  "geology_description",
95
130
  "geologydescription",
96
131
  "geology_comment",
@@ -101,57 +136,57 @@ const H = "hole_id", Ne = "latitude", ke = "longitude", Oe = "elevation", Z = "a
101
136
  "description",
102
137
  "comments"
103
138
  ],
104
- [Z]: ["azimuth", "az", "dip_direction", "dipdir", "dip direction", "dipdrn", "dipdirection", "dip_dir", "computed_plane_azimuth", "calc_dipdir", "calc_dipdir_deg", "dipdir_calc", "dipdirect_calc"],
105
- [W]: ["dip", "computed_plane_dip", "calc_dip", "calc_dip_deg", "dip_calc"],
106
- [xe]: ["alpha", "alpha_angle", "alpha_angle_deg", "alpha_2"],
107
- [Se]: ["beta", "beta_angle", "beta_angle_deg", "beta_2"],
139
+ [W]: ["azimuth", "az", "dip_direction", "dipdir", "dip direction", "dipdrn", "dipdirection", "dip_dir", "computed_plane_azimuth", "calc_dipdir", "calc_dipdir_deg", "dipdir_calc", "dipdirect_calc"],
140
+ [K]: ["dip", "computed_plane_dip", "calc_dip", "calc_dip_deg", "dip_calc"],
141
+ [Fe]: ["alpha", "alpha_angle", "alpha_angle_deg", "alpha_2"],
142
+ [ve]: ["beta", "beta_angle", "beta_angle_deg", "beta_2"],
108
143
  declination: ["declination", "dec"],
109
- [ue]: ["depth", "survey_depth", "surveydepth", "md", "measured_depth", "dept"],
110
- [ut]: ["strike", "str"]
111
- }, dt = {};
112
- for (const [e, t] of Object.entries(mt))
144
+ [ge]: ["depth", "survey_depth", "surveydepth", "md", "measured_depth", "dept"],
145
+ [gt]: ["strike", "str"]
146
+ }, Mt = {};
147
+ for (const [e, t] of Object.entries(_t))
113
148
  for (const n of t) {
114
149
  const r = n.toLowerCase().trim();
115
- dt[r] = e;
150
+ Mt[r] = e;
116
151
  }
117
- const oe = "[baselode:data]";
118
- function ft(e, t = "Unknown error") {
152
+ const ie = "[baselode:data]";
153
+ function Et(e, t = "Unknown error") {
119
154
  if (e instanceof Error) return e;
120
155
  const n = typeof e == "string" && e.trim() ? e : t;
121
156
  return new Error(n);
122
157
  }
123
- function ie(e, t, n = "Operation failed") {
124
- const r = ft(t, n), o = new Error(`${e}: ${r.message}`);
158
+ function se(e, t, n = "Operation failed") {
159
+ const r = Et(t, n), o = new Error(`${e}: ${r.message}`);
125
160
  return o.cause = r, o;
126
161
  }
127
- function sr(e, t) {
162
+ function kr(e, t) {
128
163
  if (t !== void 0) {
129
- console.warn(`${oe} ${e}`, t);
164
+ console.warn(`${ie} ${e}`, t);
130
165
  return;
131
166
  }
132
- console.warn(`${oe} ${e}`);
167
+ console.warn(`${ie} ${e}`);
133
168
  }
134
- function ar(e) {
135
- console.info(`${oe} ${e}`);
169
+ function Lr(e) {
170
+ console.info(`${ie} ${e}`);
136
171
  }
137
- const K = "numeric", se = "categorical", ae = "comment", Q = "hidden", ht = "tadpole", be = {
138
- [K]: [
172
+ const J = "numeric", ae = "categorical", le = "comment", ee = "hidden", zt = "tadpole", ze = {
173
+ [J]: [
139
174
  { value: "bar", label: "Bars" },
140
175
  { value: "markers", label: "Markers" },
141
176
  { value: "markers+line", label: "Markers + Line" },
142
177
  { value: "line", label: "Line only" }
143
178
  ],
144
- [se]: [
179
+ [ae]: [
145
180
  { value: "categorical", label: "Categorical bands" }
146
181
  ],
147
- [ae]: [
182
+ [le]: [
148
183
  { value: "comment", label: "Comments" }
149
184
  ],
150
- [ht]: [
185
+ [zt]: [
151
186
  { value: "tadpole", label: "Tadpole" }
152
187
  ],
153
- [Q]: []
154
- }, ge = /* @__PURE__ */ new Set([
188
+ [ee]: []
189
+ }, Ne = /* @__PURE__ */ new Set([
155
190
  // Hole identifiers
156
191
  "hole_id",
157
192
  "holeid",
@@ -206,7 +241,7 @@ const K = "numeric", se = "categorical", ae = "comment", Q = "hidden", ht = "tad
206
241
  "data_source",
207
242
  "_hole_key",
208
243
  "_hole_id_key"
209
- ]), bt = /* @__PURE__ */ new Set([
244
+ ]), Nt = /* @__PURE__ */ new Set([
210
245
  "comments",
211
246
  "comment",
212
247
  "notes",
@@ -219,22 +254,22 @@ const K = "numeric", se = "categorical", ae = "comment", Q = "hidden", ht = "tad
219
254
  "structcomment",
220
255
  "geology_description"
221
256
  ]);
222
- function lr(e) {
257
+ function Ar(e) {
223
258
  if (!(e != null && e.length))
224
259
  return { byType: {}, numericCols: [], categoricalCols: [], commentCols: [] };
225
260
  const t = new Set(e.flatMap((r) => Object.keys(r || {}))), n = {};
226
261
  for (const r of t) {
227
262
  const o = r.toLowerCase().trim();
228
- if (ge.has(o) || ge.has(r)) {
229
- n[r] = Q;
263
+ if (Ne.has(o) || Ne.has(r)) {
264
+ n[r] = ee;
230
265
  continue;
231
266
  }
232
- if (bt.has(o)) {
267
+ if (Nt.has(o)) {
233
268
  const c = e.some((l) => {
234
269
  const s = l[r];
235
270
  return s != null && String(s).trim() !== "" && String(s) !== "null";
236
271
  });
237
- n[r] = c ? ae : Q;
272
+ n[r] = c ? le : ee;
238
273
  continue;
239
274
  }
240
275
  let i = !1, a = !1;
@@ -245,73 +280,73 @@ function lr(e) {
245
280
  break;
246
281
  }
247
282
  }
248
- a ? i ? n[r] = K : n[r] = se : n[r] = Q;
283
+ a ? i ? n[r] = J : n[r] = ae : n[r] = ee;
249
284
  }
250
285
  return {
251
286
  byType: n,
252
- numericCols: Object.entries(n).filter(([, r]) => r === K).map(([r]) => r),
253
- categoricalCols: Object.entries(n).filter(([, r]) => r === se).map(([r]) => r),
254
- commentCols: Object.entries(n).filter(([, r]) => r === ae).map(([r]) => r)
287
+ numericCols: Object.entries(n).filter(([, r]) => r === J).map(([r]) => r),
288
+ categoricalCols: Object.entries(n).filter(([, r]) => r === ae).map(([r]) => r),
289
+ commentCols: Object.entries(n).filter(([, r]) => r === le).map(([r]) => r)
255
290
  };
256
291
  }
257
- function gt(e) {
258
- return be[e] ?? be[K];
292
+ function Ot(e) {
293
+ return ze[e] ?? ze[J];
259
294
  }
260
- function cr(e) {
261
- const t = gt(e);
262
- return t.length ? e === K ? "line" : t[0].value : "markers+line";
295
+ function Dr(e) {
296
+ const t = Ot(e);
297
+ return t.length ? e === J ? "line" : t[0].value : "markers+line";
263
298
  }
264
- const Ie = ["x", "y", "z", "dx", "dy", "dz"], pt = {
299
+ const Te = ["x", "y", "z", "dx", "dy", "dz"], kt = {
265
300
  x: ["x", "easting", "center_x", "xc", "xcentre", "xcenter", "x_centre", "x_center", "cx"],
266
301
  y: ["y", "northing", "center_y", "yc", "ycentre", "ycenter", "y_centre", "y_center", "cy"],
267
302
  z: ["z", "elevation", "center_z", "zc", "zcentre", "zcenter", "z_centre", "z_center", "cz"],
268
303
  dx: ["dx", "size_x", "sx", "sizex", "dim_x", "block_size_x"],
269
304
  dy: ["dy", "size_y", "sy", "sizey", "dim_y", "block_size_y"],
270
305
  dz: ["dz", "size_z", "sz", "sizez", "dim_z", "block_size_z"]
271
- }, Ce = {};
272
- Object.entries(pt).forEach(([e, t]) => {
306
+ }, Pe = {};
307
+ Object.entries(kt).forEach(([e, t]) => {
273
308
  t.forEach((n) => {
274
- Ce[n.toLowerCase()] = e;
309
+ Pe[n.toLowerCase()] = e;
275
310
  });
276
311
  });
277
- function yt(e) {
312
+ function Lt(e) {
278
313
  const t = {};
279
314
  return Object.entries(e).forEach(([n, r]) => {
280
- const o = Ce[n.toLowerCase().trim()] || n;
315
+ const o = Pe[n.toLowerCase().trim()] || n;
281
316
  t[o] = r;
282
317
  }), t;
283
318
  }
284
- function ur(e) {
319
+ function Sr(e) {
285
320
  return new Promise((t, n) => {
286
- ct.parse(e, {
321
+ mt.parse(e, {
287
322
  header: !0,
288
323
  dynamicTyping: !0,
289
324
  skipEmptyLines: !0,
290
325
  complete: (r) => {
291
- const i = (r.data || []).map(yt).filter(
326
+ const i = (r.data || []).map(Lt).filter(
292
327
  (c) => c.x !== null && c.y !== null && c.z !== null
293
328
  ), a = Object.keys(i[0] || {}).filter(
294
- (c) => !Ie.includes(c)
329
+ (c) => !Te.includes(c)
295
330
  );
296
331
  t({ data: i, properties: a });
297
332
  },
298
333
  error: (r) => {
299
- n(ie("parseBlockModelCSV", r));
334
+ n(se("parseBlockModelCSV", r));
300
335
  }
301
336
  });
302
337
  });
303
338
  }
304
- function mr(e) {
339
+ function wr(e) {
305
340
  if (typeof e == "string")
306
341
  try {
307
342
  return JSON.parse(e);
308
343
  } catch (t) {
309
- throw ie("loadBlockModelMetadata", t);
344
+ throw se("loadBlockModelMetadata", t);
310
345
  }
311
346
  if (e && typeof e == "object") return e;
312
- throw ie("loadBlockModelMetadata", new Error("Invalid metadata source"));
347
+ throw se("loadBlockModelMetadata", new Error("Invalid metadata source"));
313
348
  }
314
- function _t(e, t) {
349
+ function At(e, t) {
315
350
  const n = e.map((i) => i[t]).filter((i) => i != null);
316
351
  if (n.length > 0 && n.every((i) => typeof i == "number")) {
317
352
  const i = Math.min(...n), a = Math.max(...n);
@@ -319,16 +354,16 @@ function _t(e, t) {
319
354
  }
320
355
  return { type: "categorical", categories: [...new Set(n)], values: n };
321
356
  }
322
- function dr(e) {
357
+ function xr(e) {
323
358
  if (!e || e.length === 0) return {};
324
359
  const t = Object.keys(e[0]).filter(
325
- (r) => !Ie.includes(r)
360
+ (r) => !Te.includes(r)
326
361
  ), n = {};
327
362
  return t.forEach((r) => {
328
- n[r] = _t(e, r);
363
+ n[r] = At(e, r);
329
364
  }), n;
330
365
  }
331
- function Mt(e, t) {
366
+ function Dt(e, t) {
332
367
  return !t || typeof t != "object" ? e : e.filter(
333
368
  (n) => Object.entries(t).every(([r, o]) => {
334
369
  const i = n[r];
@@ -336,13 +371,13 @@ function Mt(e, t) {
336
371
  })
337
372
  );
338
373
  }
339
- function fr(e, t = null) {
340
- return (t ? Mt(e, t) : e).reduce((r, o) => {
374
+ function Fr(e, t = null) {
375
+ return (t ? Dt(e, t) : e).reduce((r, o) => {
341
376
  const i = Number(o.dx) || 0, a = Number(o.dy) || 0, c = Number(o.dz) || 0;
342
377
  return r + i * a * c;
343
378
  }, 0);
344
379
  }
345
- function zt(e, t, n) {
380
+ function St(e, t, n) {
346
381
  if (!t) return new n.Color("#888888");
347
382
  if (t.type === "numeric") {
348
383
  const i = t.max - t.min, c = (1 - (i === 0 ? 0.5 : (e - t.min) / i)) * 240;
@@ -351,7 +386,7 @@ function zt(e, t, n) {
351
386
  const o = t.categories.indexOf(e) / Math.max(t.categories.length, 1) * 360;
352
387
  return new n.Color().setHSL(o / 360, 0.7, 0.5);
353
388
  }
354
- function Et(e, t) {
389
+ function wt(e, t) {
355
390
  if (!e || e.length === 0 || !Number.isFinite(t)) return null;
356
391
  const n = e.length;
357
392
  if (n === 1) {
@@ -377,44 +412,44 @@ function Et(e, t) {
377
412
  a = y > 0 ? (t - b) / y : 0;
378
413
  }
379
414
  const c = Number(o.x) + a * (Number(i.x) - Number(o.x)), l = Number(o.y) + a * (Number(i.y) - Number(o.y)), s = Number(o.z) + a * (Number(i.z) - Number(o.z));
380
- let u, g, m;
381
- const h = Number(o.azimuth), d = Number(o.dip), p = Number(i.azimuth), N = Number(i.dip);
415
+ let u, p, m;
416
+ const h = Number(o.azimuth), d = Number(o.dip), g = Number(i.azimuth), N = Number(i.dip);
382
417
  if (Number.isFinite(h) && Number.isFinite(d)) {
383
- const b = Number.isFinite(p) && Number.isFinite(N) ? h + a * (p - h) : h, L = Number.isFinite(p) && Number.isFinite(N) ? d + a * (N - d) : d, y = b * Math.PI / 180, z = L * Math.PI / 180;
384
- u = Math.cos(z) * Math.sin(y), g = Math.cos(z) * Math.cos(y), m = -Math.sin(z);
418
+ const b = Number.isFinite(g) && Number.isFinite(N) ? h + a * (g - h) : h, L = Number.isFinite(g) && Number.isFinite(N) ? d + a * (N - d) : d, y = b * Math.PI / 180, E = L * Math.PI / 180;
419
+ u = Math.cos(E) * Math.sin(y), p = Math.cos(E) * Math.cos(y), m = -Math.sin(E);
385
420
  } else {
386
- const b = Number(i.x) - Number(o.x), L = Number(i.y) - Number(o.y), y = Number(i.z) - Number(o.z), z = Math.sqrt(b * b + L * L + y * y);
387
- if (z < 1e-10) return { x: c, y: l, z: s, dx: 0, dy: 0, dz: -1 };
388
- u = b / z, g = L / z, m = y / z;
421
+ const b = Number(i.x) - Number(o.x), L = Number(i.y) - Number(o.y), y = Number(i.z) - Number(o.z), E = Math.sqrt(b * b + L * L + y * y);
422
+ if (E < 1e-10) return { x: c, y: l, z: s, dx: 0, dy: 0, dz: -1 };
423
+ u = b / E, p = L / E, m = y / E;
389
424
  }
390
- const k = Math.sqrt(u * u + g * g + m * m);
391
- return k < 1e-10 ? { x: c, y: l, z: s, dx: 0, dy: 0, dz: -1 } : { x: c, y: l, z: s, dx: u / k, dy: g / k, dz: m / k };
425
+ const O = Math.sqrt(u * u + p * p + m * m);
426
+ return O < 1e-10 ? { x: c, y: l, z: s, dx: 0, dy: 0, dz: -1 } : { x: c, y: l, z: s, dx: u / O, dy: p / O, dz: m / O };
392
427
  }
393
- function Nt(e, t, n, r = {}) {
428
+ function xt(e, t, n, r = {}) {
394
429
  const { betaZeroAxis: o = "B", betaHandedness: i = 1 } = r, { dx: a, dy: c, dz: l } = n, s = [a, c, l];
395
430
  let u = [0, 0, 1];
396
- const g = s[0] * u[0] + s[1] * u[1] + s[2] * u[2];
397
- Math.abs(g) > 0.99 && (u = [0, 1, 0]);
431
+ const p = s[0] * u[0] + s[1] * u[1] + s[2] * u[2];
432
+ Math.abs(p) > 0.99 && (u = [0, 1, 0]);
398
433
  const m = [
399
434
  u[1] * s[2] - u[2] * s[1],
400
435
  u[2] * s[0] - u[0] * s[2],
401
436
  u[0] * s[1] - u[1] * s[0]
402
- ], h = Math.sqrt(m[0] ** 2 + m[1] ** 2 + m[2] ** 2), d = h > 1e-10 ? [m[0] / h, m[1] / h, m[2] / h] : [1, 0, 0], p = [
437
+ ], h = Math.sqrt(m[0] ** 2 + m[1] ** 2 + m[2] ** 2), d = h > 1e-10 ? [m[0] / h, m[1] / h, m[2] / h] : [1, 0, 0], g = [
403
438
  s[1] * d[2] - s[2] * d[1],
404
439
  s[2] * d[0] - s[0] * d[2],
405
440
  s[0] * d[1] - s[1] * d[0]
406
- ], N = Math.sqrt(p[0] ** 2 + p[1] ** 2 + p[2] ** 2), k = N > 1e-10 ? [p[0] / N, p[1] / N, p[2] / N] : [0, 1, 0], b = o === "R" ? d : k, L = t * Math.PI / 180 * i, y = Math.cos(L), z = Math.sin(L), O = b[0] * s[0] + b[1] * s[1] + b[2] * s[2], A = [
441
+ ], N = Math.sqrt(g[0] ** 2 + g[1] ** 2 + g[2] ** 2), O = N > 1e-10 ? [g[0] / N, g[1] / N, g[2] / N] : [0, 1, 0], b = o === "R" ? d : O, L = t * Math.PI / 180 * i, y = Math.cos(L), E = Math.sin(L), k = b[0] * s[0] + b[1] * s[1] + b[2] * s[2], D = [
407
442
  s[1] * b[2] - s[2] * b[1],
408
443
  s[2] * b[0] - s[0] * b[2],
409
444
  s[0] * b[1] - s[1] * b[0]
410
- ], x = [
411
- b[0] * y + A[0] * z + s[0] * O * (1 - y),
412
- b[1] * y + A[1] * z + s[1] * O * (1 - y),
413
- b[2] * y + A[2] * z + s[2] * O * (1 - y)
414
- ], D = (90 - e) * Math.PI / 180, S = Math.cos(D), w = Math.sin(D), F = S * x[0] + w * s[0], C = S * x[1] + w * s[1], I = S * x[2] + w * s[2], T = Math.sqrt(F * F + C * C + I * I);
415
- return T < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: F / T, ny: C / T, nz: I / T };
416
- }
417
- function kt(e, t, n = {}) {
445
+ ], w = [
446
+ b[0] * y + D[0] * E + s[0] * k * (1 - y),
447
+ b[1] * y + D[1] * E + s[1] * k * (1 - y),
448
+ b[2] * y + D[2] * E + s[2] * k * (1 - y)
449
+ ], A = (90 - e) * Math.PI / 180, x = Math.cos(A), S = Math.sin(A), v = x * w[0] + S * s[0], C = x * w[1] + S * s[1], I = x * w[2] + S * s[2], P = Math.sqrt(v * v + C * C + I * I);
450
+ return P < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: v / P, ny: C / P, nz: I / P };
451
+ }
452
+ function Ft(e, t, n = {}) {
418
453
  if (!(e != null && e.length) || !(t != null && t.length)) return [];
419
454
  const r = /* @__PURE__ */ new Map();
420
455
  for (const i of t) {
@@ -431,25 +466,25 @@ function kt(e, t, n = {}) {
431
466
  if (!c || c.length === 0) continue;
432
467
  const l = i.depth != null ? Number(i.depth) : i.mid != null ? Number(i.mid) : null;
433
468
  if (!Number.isFinite(l)) continue;
434
- const s = Et(c, l);
469
+ const s = wt(c, l);
435
470
  if (!s) continue;
436
- const { x: u, y: g, z: m, dx: h, dy: d, dz: p } = s;
437
- let N, k, b;
471
+ const { x: u, y: p, z: m, dx: h, dy: d, dz: g } = s;
472
+ let N, O, b;
438
473
  const L = i.alpha != null ? Number(i.alpha) : null, y = i.beta != null ? Number(i.beta) : null;
439
474
  if (Number.isFinite(L)) {
440
- const z = Number.isFinite(y) ? y : 0, O = Nt(L, z, { dx: h, dy: d, dz: p }, n);
441
- N = O.nx, k = O.ny, b = O.nz;
475
+ const E = Number.isFinite(y) ? y : 0, k = xt(L, E, { dx: h, dy: d, dz: g }, n);
476
+ N = k.nx, O = k.ny, b = k.nz;
442
477
  } else {
443
- const z = i.dip != null ? Number(i.dip) : null, O = i.azimuth != null ? Number(i.azimuth) : null;
444
- if (!Number.isFinite(z) || !Number.isFinite(O)) continue;
445
- const A = z * Math.PI / 180, x = O * Math.PI / 180;
446
- N = Math.sin(x) * Math.sin(A), k = Math.cos(x) * Math.sin(A), b = Math.cos(A);
478
+ const E = i.dip != null ? Number(i.dip) : null, k = i.azimuth != null ? Number(i.azimuth) : null;
479
+ if (!Number.isFinite(E) || !Number.isFinite(k)) continue;
480
+ const D = E * Math.PI / 180, w = k * Math.PI / 180;
481
+ N = Math.sin(w) * Math.sin(D), O = Math.cos(w) * Math.sin(D), b = Math.cos(D);
447
482
  }
448
- o.push({ ...i, x: u, y: g, z: m, nx: N, ny: k, nz: b });
483
+ o.push({ ...i, x: u, y: p, z: m, nx: N, ny: O, nz: b });
449
484
  }
450
485
  return o;
451
486
  }
452
- const Ot = "baselode", hr = Ot, Lt = [
487
+ const vt = "baselode", vr = vt, It = [
453
488
  "#8b1e3f",
454
489
  "#2563eb",
455
490
  "#16a34a",
@@ -474,11 +509,11 @@ const Ot = "baselode", hr = Ot, Lt = [
474
509
  muted_3: "#e2e8f0",
475
510
  primary: "#8b1e3f",
476
511
  primary_2: "#a8324f"
477
- }, me = {
512
+ }, ye = {
478
513
  layout: {
479
514
  paper_bgcolor: M.bg,
480
515
  plot_bgcolor: M.bg,
481
- colorway: Lt,
516
+ colorway: It,
482
517
  font: {
483
518
  family: "Inter, system-ui, sans-serif",
484
519
  size: 12,
@@ -605,7 +640,7 @@ const Ot = "baselode", hr = Ot, Lt = [
605
640
  }
606
641
  }]
607
642
  }
608
- }, br = me, _ = {
643
+ }, Ir = ye, _ = {
609
644
  bg: "#1b1b1f",
610
645
  panel: "#25252a",
611
646
  ink: "#f0f0e4",
@@ -617,19 +652,18 @@ const Ot = "baselode", hr = Ot, Lt = [
617
652
  muted_1: "#8a8a80",
618
653
  muted_2: "#5e5e56",
619
654
  muted_3: "#3a3a34"
620
- }, gr = "baselode-dark", pr = {
655
+ }, Cr = "baselode-dark", Tr = {
621
656
  layout: {
622
657
  font: {
623
- family: "Inter, Arial, sans-serif",
658
+ family: "Inter, system-ui, sans-serif",
624
659
  color: _.ink,
625
- size: 14
660
+ size: 12
626
661
  },
627
662
  title: {
628
- x: 0.02,
629
- xanchor: "left",
663
+ x: 0.05,
630
664
  font: {
631
- family: "Inter, Arial, sans-serif",
632
- size: 22,
665
+ family: "Inter, system-ui, sans-serif",
666
+ size: 14,
633
667
  color: _.ink
634
668
  }
635
669
  },
@@ -649,9 +683,9 @@ const Ot = "baselode", hr = Ot, Lt = [
649
683
  bgcolor: _.panel,
650
684
  bordercolor: _.accent,
651
685
  font: {
652
- family: "Inter, Arial, sans-serif",
686
+ family: "Inter, system-ui, sans-serif",
653
687
  color: _.ink,
654
- size: 13
688
+ size: 12
655
689
  }
656
690
  },
657
691
  legend: {
@@ -659,9 +693,9 @@ const Ot = "baselode", hr = Ot, Lt = [
659
693
  bordercolor: _.line,
660
694
  borderwidth: 1,
661
695
  font: {
662
- family: "Inter, Arial, sans-serif",
696
+ family: "Inter, system-ui, sans-serif",
663
697
  color: _.ink,
664
- size: 12
698
+ size: 11
665
699
  },
666
700
  orientation: "h",
667
701
  yanchor: "bottom",
@@ -670,7 +704,10 @@ const Ot = "baselode", hr = Ot, Lt = [
670
704
  x: 0
671
705
  },
672
706
  xaxis: {
673
- showline: !1,
707
+ showline: !0,
708
+ linewidth: 1,
709
+ linecolor: _.line,
710
+ mirror: !1,
674
711
  ticks: "outside",
675
712
  tickwidth: 1,
676
713
  tickcolor: _.muted_1,
@@ -679,11 +716,14 @@ const Ot = "baselode", hr = Ot, Lt = [
679
716
  gridcolor: _.grid,
680
717
  gridwidth: 1,
681
718
  zeroline: !1,
682
- title_font: { color: _.ink },
683
- tickfont: { color: _.ink_soft }
719
+ title_font: { color: _.ink, size: 12 },
720
+ tickfont: { color: _.ink_soft, size: 10 }
684
721
  },
685
722
  yaxis: {
686
- showline: !1,
723
+ showline: !0,
724
+ linewidth: 1,
725
+ linecolor: _.line,
726
+ mirror: !1,
687
727
  ticks: "outside",
688
728
  tickwidth: 1,
689
729
  tickcolor: _.muted_1,
@@ -692,8 +732,8 @@ const Ot = "baselode", hr = Ot, Lt = [
692
732
  gridcolor: _.grid,
693
733
  gridwidth: 1,
694
734
  zeroline: !1,
695
- title_font: { color: _.ink },
696
- tickfont: { color: _.ink_soft }
735
+ title_font: { color: _.ink, size: 12 },
736
+ tickfont: { color: _.ink_soft, size: 10 }
697
737
  },
698
738
  bargap: 0.18,
699
739
  bargroupgap: 0.08
@@ -760,7 +800,7 @@ const Ot = "baselode", hr = Ot, Lt = [
760
800
  }
761
801
  }]
762
802
  }
763
- }, Dt = "#7f7f7f", ee = {
803
+ }, Ct = "#7f7f7f", te = {
764
804
  Au: "#FFD700",
765
805
  // gold
766
806
  Ag: "#C0C0C0",
@@ -797,7 +837,7 @@ const Ot = "baselode", hr = Ot, Lt = [
797
837
  // aluminium / yellow
798
838
  U: "#8BC34A"
799
839
  // uranium / lime green
800
- }, At = {
840
+ }, Tt = {
801
841
  // Sedimentary
802
842
  shale: "#607D8B",
803
843
  mudstone: "#78909C",
@@ -836,11 +876,11 @@ const Ot = "baselode", hr = Ot, Lt = [
836
876
  calcite: "#F9FBE7",
837
877
  vein: "#FFFFFF",
838
878
  unknown: "#9E9E9E"
839
- }, ne = {
840
- commodity: ee,
841
- lithology: At
879
+ }, re = {
880
+ commodity: te,
881
+ lithology: Tt
842
882
  };
843
- function wt(e, t, n = Dt) {
883
+ function Pt(e, t, n = Ct) {
844
884
  if (!t || e == null) return n;
845
885
  const r = String(e).trim();
846
886
  if (Object.prototype.hasOwnProperty.call(t, r)) return t[r];
@@ -849,13 +889,13 @@ function wt(e, t, n = Dt) {
849
889
  if (String(i).trim().toLowerCase() === o) return a;
850
890
  return n;
851
891
  }
852
- function xt(e) {
892
+ function Bt(e) {
853
893
  if (e == null) return {};
854
894
  if (typeof e == "string") {
855
895
  const t = e.trim().toLowerCase();
856
- if (Object.prototype.hasOwnProperty.call(ne, t))
857
- return ne[t];
858
- const n = Object.keys(ne).sort().join(", ");
896
+ if (Object.prototype.hasOwnProperty.call(re, t))
897
+ return re[t];
898
+ const n = Object.keys(re).sort().join(", ");
859
899
  throw new RangeError(
860
900
  `Unknown built-in colour map '${e}'. Available maps: ${n}`
861
901
  );
@@ -865,39 +905,40 @@ function xt(e) {
865
905
  `colourMap must be null, a string, or a plain object; got ${Array.isArray(e) ? "Array" : Object.prototype.toString.call(e)}`
866
906
  );
867
907
  }
868
- const St = "#8b1e3f", vt = "#a8324f";
869
- function Ft(e) {
908
+ const Rt = "#8b1e3f", Vt = "#a8324f";
909
+ function Ht(e) {
870
910
  if (!e) return null;
871
911
  const t = e.split(/[_\-/\s]+/);
872
912
  for (const n of t) {
873
- if (Object.prototype.hasOwnProperty.call(ee, n))
874
- return ee[n];
913
+ if (Object.prototype.hasOwnProperty.call(te, n))
914
+ return te[n];
875
915
  const r = n.toLowerCase();
876
- for (const [o, i] of Object.entries(ee))
916
+ for (const [o, i] of Object.entries(te))
877
917
  if (o.toLowerCase() === r) return i;
878
918
  }
879
919
  return null;
880
920
  }
881
- const It = "#6b7280", Ct = { l: 42, r: 4, t: 4, b: 30 }, pe = 10, ye = 12;
882
- function _e(e) {
921
+ const Gt = "#6b7280", jt = { l: 42, r: 4, t: 4, b: 36 }, Oe = 10, ke = 11, Ut = 6;
922
+ function Le(e) {
883
923
  return e ? typeof e == "string" ? { text: e } : e : {};
884
924
  }
885
925
  function Be(e = {}) {
886
- const t = _e(e.xaxis && e.xaxis.title), n = _e(e.yaxis && e.yaxis.title);
926
+ const t = Le(e.xaxis && e.xaxis.title), n = Le(e.yaxis && e.yaxis.title);
887
927
  return {
888
928
  ...e,
889
- margin: Ct,
929
+ margin: jt,
890
930
  autosize: !0,
891
931
  width: void 0,
892
932
  xaxis: {
893
933
  ...e.xaxis || {},
894
934
  tickfont: {
895
935
  ...e.xaxis && e.xaxis.tickfont || {},
896
- size: pe
936
+ size: Oe
897
937
  },
898
938
  title: {
899
939
  ...t,
900
- font: { ...t.font || {}, size: ye }
940
+ font: { ...t.font || {}, size: ke },
941
+ standoff: t.standoff ?? Ut
901
942
  }
902
943
  },
903
944
  yaxis: {
@@ -905,16 +946,16 @@ function Be(e = {}) {
905
946
  automargin: !0,
906
947
  tickfont: {
907
948
  ...e.yaxis && e.yaxis.tickfont || {},
908
- size: pe
949
+ size: Oe
909
950
  },
910
951
  title: {
911
952
  ...n,
912
- font: { ...n.font || {}, size: ye }
953
+ font: { ...n.font || {}, size: ke }
913
954
  }
914
955
  }
915
956
  };
916
957
  }
917
- function yr(e, t) {
958
+ function Pr(e, t) {
918
959
  var r;
919
960
  if (!e || !t) return !1;
920
961
  const n = e.points || [];
@@ -925,7 +966,7 @@ function yr(e, t) {
925
966
  }
926
967
  return !1;
927
968
  }
928
- function _r(e, t, n) {
969
+ function Br(e, t, n) {
929
970
  if (!e || !t) return [];
930
971
  const r = (e == null ? void 0 : e.points) || [], o = [], i = /* @__PURE__ */ new Set();
931
972
  return r.forEach((a) => {
@@ -943,22 +984,22 @@ function _r(e, t, n) {
943
984
  const u = `${t}:${c}-${l}:${String(s)}`;
944
985
  if (i.has(u)) return;
945
986
  i.add(u);
946
- const g = (c + l) / 2, m = n ? s : Number(s);
987
+ const p = (c + l) / 2, m = n ? s : Number(s);
947
988
  !n && !Number.isFinite(m) || o.push({
948
- z: g,
989
+ z: p,
949
990
  val: m,
950
991
  from: c,
951
992
  to: l,
952
- errorPlus: l - g,
953
- errorMinus: g - c
993
+ errorPlus: l - p,
994
+ errorMinus: p - c
954
995
  });
955
996
  }), o.sort((a, c) => c.z - a.z);
956
997
  }
957
- function Bt(e, t, n, r) {
998
+ function Yt(e, t, n, r) {
958
999
  if (!e.length) return { data: [], layout: {} };
959
1000
  const o = e.filter((m) => Number.isFinite(m == null ? void 0 : m.from) && Number.isFinite(m == null ? void 0 : m.to) && m.to > m.from).map((m) => ({ ...m, category: `${(m == null ? void 0 : m.val) ?? ""}`.trim() })).filter((m) => m.category !== "" && !/^(nan|null|none)$/i.test(m.category)).sort((m, h) => m.from - h.from || m.to - h.to);
960
1001
  if (!o.length) return { data: [], layout: {} };
961
- const i = xt(n), a = [
1002
+ const i = Bt(n), a = [
962
1003
  "#1f77b4",
963
1004
  // blue
964
1005
  "#ff7f0e",
@@ -990,7 +1031,7 @@ function Bt(e, t, n, r) {
990
1031
  ], c = [...new Set(o.map((m) => m.category))];
991
1032
  function l(m, h) {
992
1033
  if (i && Object.keys(i).length > 0) {
993
- const d = wt(m, i, null);
1034
+ const d = Pt(m, i, null);
994
1035
  if (d !== null) return d;
995
1036
  }
996
1037
  return a[h % a.length];
@@ -1019,54 +1060,54 @@ function Bt(e, t, n, r) {
1019
1060
  yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
1020
1061
  showlegend: !1,
1021
1062
  title: t || void 0,
1022
- template: r !== void 0 ? r : me
1063
+ template: r !== void 0 ? r : ye
1023
1064
  }) };
1024
1065
  }
1025
- function Tt(e, t, n, r, o) {
1066
+ function $t(e, t, n, r, o) {
1026
1067
  if (!e.length) return { data: [], layout: {} };
1027
- const i = n === "bar", a = n === "markers", c = n === "line", l = r || St, s = r || vt, u = {
1068
+ const i = n === "bar", a = n === "markers", c = n === "line", l = r || Rt, s = r || Vt, u = {
1028
1069
  x: e.map((d) => d.val),
1029
1070
  y: e.map((d) => d.z),
1030
1071
  hovertemplate: `${t}: %{x}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`,
1031
1072
  customdata: e.map((d) => [Math.min(d.from, d.to), Math.max(d.from, d.to)])
1032
- }, g = {
1073
+ }, p = {
1033
1074
  type: "data",
1034
1075
  symmetric: !1,
1035
1076
  array: e.map((d) => d.errorPlus),
1036
1077
  arrayminus: e.map((d) => d.errorMinus),
1037
1078
  thickness: 1.5,
1038
1079
  width: 2,
1039
- color: It
1080
+ color: Gt
1040
1081
  };
1041
1082
  return { data: [i ? {
1042
1083
  ...u,
1043
1084
  type: "bar",
1044
1085
  orientation: "h",
1045
1086
  marker: { color: l },
1046
- error_y: g
1087
+ error_y: p
1047
1088
  } : {
1048
1089
  ...u,
1049
1090
  type: "scatter",
1050
1091
  mode: a ? "markers" : c ? "lines" : "lines+markers",
1051
1092
  line: { color: l, width: 2 },
1052
1093
  marker: { size: 7, color: s },
1053
- error_y: c ? void 0 : g
1094
+ error_y: c ? void 0 : p
1054
1095
  }], layout: Be({
1055
1096
  xaxis: { title: t, zeroline: !1 },
1056
1097
  yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
1057
1098
  barmode: "overlay",
1058
1099
  showlegend: !1,
1059
- template: o !== void 0 ? o : me
1100
+ template: o !== void 0 ? o : ye
1060
1101
  }) };
1061
1102
  }
1062
- function Pt({ points: e, isCategorical: t, property: n, chartType: r, colourMap: o, template: i }) {
1103
+ function Xt({ points: e, isCategorical: t, property: n, chartType: r, colourMap: o, template: i }) {
1063
1104
  if (!e || !e.length || !n) return { data: [], layout: {} };
1064
1105
  if (t || r === "categorical")
1065
- return Bt(e, n, o, i);
1066
- const a = Ft(n);
1067
- return Tt(e, n, r, a, i);
1106
+ return Yt(e, n, o, i);
1107
+ const a = Ht(n);
1108
+ return $t(e, n, r, a, i);
1068
1109
  }
1069
- function Mr(e = [], {
1110
+ function Rr(e = [], {
1070
1111
  fromCol: t = "from",
1071
1112
  toCol: n = "to",
1072
1113
  categoryCol: r = "geology_code",
@@ -1077,16 +1118,16 @@ function Mr(e = [], {
1077
1118
  return e.forEach((c) => {
1078
1119
  const l = Number(c == null ? void 0 : c[t]), s = Number(c == null ? void 0 : c[n]), u = c == null ? void 0 : c[r];
1079
1120
  if (!Number.isFinite(l) || !Number.isFinite(s) || s <= l || u == null || `${u}`.trim() === "") return;
1080
- const g = (l + s) / 2;
1121
+ const p = (l + s) / 2;
1081
1122
  a.push({
1082
- z: g,
1123
+ z: p,
1083
1124
  val: `${u}`,
1084
1125
  from: l,
1085
1126
  to: s,
1086
- errorPlus: s - g,
1087
- errorMinus: g - l
1127
+ errorPlus: s - p,
1128
+ errorMinus: p - l
1088
1129
  });
1089
- }), a.sort((c, l) => l.z - c.z), Pt({
1130
+ }), a.sort((c, l) => l.z - c.z), Xt({
1090
1131
  points: a,
1091
1132
  isCategorical: !0,
1092
1133
  property: r,
@@ -1095,7 +1136,7 @@ function Mr(e = [], {
1095
1136
  template: i
1096
1137
  });
1097
1138
  }
1098
- const Rt = [
1139
+ const qt = [
1099
1140
  "#313695",
1100
1141
  "#4575b4",
1101
1142
  "#74add1",
@@ -1107,7 +1148,7 @@ const Rt = [
1107
1148
  "#d73027",
1108
1149
  "#a50026"
1109
1150
  ];
1110
- function Vt(e = [], t = Rt) {
1151
+ function Zt(e = [], t = qt) {
1111
1152
  const n = e.filter((s) => Number.isFinite(s));
1112
1153
  if (!n.length)
1113
1154
  return {
@@ -1119,8 +1160,8 @@ function Vt(e = [], t = Rt) {
1119
1160
  };
1120
1161
  const r = n.slice().sort((s, u) => s - u), o = r[0], i = r[r.length - 1], a = t.length;
1121
1162
  if (i === o) {
1122
- const s = t.map((u, g) => ({
1123
- index: g,
1163
+ const s = t.map((u, p) => ({
1164
+ index: p,
1124
1165
  min: o,
1125
1166
  max: i,
1126
1167
  label: `${o}`
@@ -1134,12 +1175,12 @@ function Vt(e = [], t = Rt) {
1134
1175
  };
1135
1176
  }
1136
1177
  const c = t.map((s, u) => {
1137
- const g = u / a, m = (u + 1) / a, h = Math.floor(g * r.length), d = Math.min(r.length - 1, Math.floor(m * r.length)), p = r[h], N = u === a - 1 ? i : r[d];
1178
+ const p = u / a, m = (u + 1) / a, h = Math.floor(p * r.length), d = Math.min(r.length - 1, Math.floor(m * r.length)), g = r[h], N = u === a - 1 ? i : r[d];
1138
1179
  return {
1139
1180
  index: u,
1140
- min: p,
1181
+ min: g,
1141
1182
  max: N,
1142
- label: Ht(p, N)
1183
+ label: Wt(g, N)
1143
1184
  };
1144
1185
  }), l = (i - o) / a;
1145
1186
  return {
@@ -1150,11 +1191,11 @@ function Vt(e = [], t = Rt) {
1150
1191
  colors: t
1151
1192
  };
1152
1193
  }
1153
- function Ht(e, t) {
1194
+ function Wt(e, t) {
1154
1195
  const n = (r) => Number.isFinite(r) ? Math.abs(r) >= 1e3 ? r.toFixed(0) : Math.abs(r) >= 10 ? r.toFixed(1) : Math.abs(r) >= 0.1 ? r.toFixed(2) : r.toFixed(3) : "n/a";
1155
1196
  return `${n(e)} – ${n(t)}`;
1156
1197
  }
1157
- function Te(e, t) {
1198
+ function Re(e, t) {
1158
1199
  if (!Number.isFinite(e) || !t || !Array.isArray(t.bins) || !t.bins.length)
1159
1200
  return -1;
1160
1201
  if (t.max === t.min)
@@ -1166,18 +1207,18 @@ function Te(e, t) {
1166
1207
  }
1167
1208
  return -1;
1168
1209
  }
1169
- function Gt(e, t, n = "#8b1e3f") {
1170
- const r = Te(e, t);
1210
+ function Kt(e, t, n = "#8b1e3f") {
1211
+ const r = Re(e, t);
1171
1212
  return r < 0 ? n : t.colors[r] || n;
1172
1213
  }
1173
- function G(e) {
1214
+ function j(e) {
1174
1215
  e.selectables = [
1175
1216
  ...e.blocks,
1176
1217
  ...e.drillMeshes,
1177
1218
  ...e.structuralMeshes
1178
1219
  ];
1179
1220
  }
1180
- const jt = {
1221
+ const Jt = {
1181
1222
  bedding: "#2563eb",
1182
1223
  foliation: "#16a34a",
1183
1224
  joint: "#9333ea",
@@ -1186,11 +1227,11 @@ const jt = {
1186
1227
  "shear zone": "#0ea5e9",
1187
1228
  "fault zone": "#ef4444"
1188
1229
  };
1189
- function Yt(e, t) {
1190
- const n = t || jt, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
1230
+ function Qt(e, t) {
1231
+ const n = t || Jt, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
1191
1232
  return new f.Color(o).getHex();
1192
1233
  }
1193
- function Ut(e, t) {
1234
+ function en(e, t) {
1194
1235
  const n = e * Math.PI / 180, r = t * Math.PI / 180;
1195
1236
  return new f.Vector3(
1196
1237
  Math.sin(r) * Math.sin(n),
@@ -1201,7 +1242,7 @@ function Ut(e, t) {
1201
1242
  // Up component
1202
1243
  ).normalize();
1203
1244
  }
1204
- function $t(e, t = {}) {
1245
+ function tn(e, t = {}) {
1205
1246
  const {
1206
1247
  radius: n = 5,
1207
1248
  discThickness: r = 0.2,
@@ -1210,23 +1251,23 @@ function $t(e, t = {}) {
1210
1251
  colorMap: a = null
1211
1252
  } = t, c = new f.Group(), l = new f.Vector3(0, 1, 0);
1212
1253
  for (const s of e) {
1213
- const u = s.x != null ? s.x : s.easting != null ? s.easting : null, g = s.y != null ? s.y : s.northing != null ? s.northing : null, m = s.z != null ? s.z : s.elevation != null ? s.elevation : null;
1214
- if (u == null || g == null || m == null || !Number.isFinite(u) || !Number.isFinite(g) || !Number.isFinite(m)) continue;
1215
- const h = s[W] != null ? Number(s[W]) : null, d = s[Z] != null ? Number(s[Z]) : null;
1216
- let p;
1254
+ const u = s.x != null ? s.x : s.easting != null ? s.easting : null, p = s.y != null ? s.y : s.northing != null ? s.northing : null, m = s.z != null ? s.z : s.elevation != null ? s.elevation : null;
1255
+ if (u == null || p == null || m == null || !Number.isFinite(u) || !Number.isFinite(p) || !Number.isFinite(m)) continue;
1256
+ const h = s[K] != null ? Number(s[K]) : null, d = s[W] != null ? Number(s[W]) : null;
1257
+ let g;
1217
1258
  if (s.nx != null && Number.isFinite(s.nx) && s.ny != null && Number.isFinite(s.ny) && s.nz != null && Number.isFinite(s.nz))
1218
- p = new f.Vector3(s.nx, s.ny, s.nz).normalize();
1259
+ g = new f.Vector3(s.nx, s.ny, s.nz).normalize();
1219
1260
  else {
1220
1261
  if (h == null || d == null || !Number.isFinite(h) || !Number.isFinite(d)) continue;
1221
- p = Ut(h, d);
1262
+ g = en(h, d);
1222
1263
  }
1223
- const N = new f.CylinderGeometry(n, n, r, i, 1, !1), k = new f.MeshStandardMaterial({
1224
- color: Yt(s.structure_type, a),
1264
+ const N = new f.CylinderGeometry(n, n, r, i, 1, !1), O = new f.MeshStandardMaterial({
1265
+ color: Qt(s.structure_type, a),
1225
1266
  transparent: !0,
1226
1267
  opacity: o,
1227
1268
  side: f.DoubleSide
1228
- }), b = new f.Mesh(N, k);
1229
- b.position.set(u, g, m), b.quaternion.setFromUnitVectors(l, p), b.userData = {
1269
+ }), b = new f.Mesh(N, O);
1270
+ b.position.set(u, p, m), b.quaternion.setFromUnitVectors(l, g), b.userData = {
1230
1271
  type: "structure",
1231
1272
  hole_id: s.hole_id,
1232
1273
  depth: s.depth ?? s.mid,
@@ -1238,8 +1279,8 @@ function $t(e, t = {}) {
1238
1279
  }
1239
1280
  return c;
1240
1281
  }
1241
- function Xt(e, t, n, r = {}) {
1242
- if (!e.scene || (Pe(e), !(t != null && t.length) || !(n != null && n.length))) return;
1282
+ function nn(e, t, n, r = {}) {
1283
+ if (!e.scene || (Ve(e), !(t != null && t.length) || !(n != null && n.length))) return;
1243
1284
  const { maxDiscs: o = 3e3 } = r;
1244
1285
  let i = t;
1245
1286
  if (i.length > o) {
@@ -1248,21 +1289,21 @@ function Xt(e, t, n, r = {}) {
1248
1289
  s.push(i[Math.floor(u * l)]);
1249
1290
  i = s;
1250
1291
  }
1251
- const a = n.flatMap((l) => (l.points || []).map((s) => ({ ...s, hole_id: l.id }))), c = kt(i, a, r);
1252
- c.length && (e.structuralGroup = $t(c, r), e.scene.add(e.structuralGroup), e.structuralGroup.traverse((l) => {
1292
+ const a = n.flatMap((l) => (l.points || []).map((s) => ({ ...s, hole_id: l.id }))), c = Ft(i, a, r);
1293
+ c.length && (e.structuralGroup = tn(c, r), e.scene.add(e.structuralGroup), e.structuralGroup.traverse((l) => {
1253
1294
  l.isMesh && e.structuralMeshes.push(l);
1254
- }), G(e));
1295
+ }), j(e));
1255
1296
  }
1256
- function Pe(e) {
1297
+ function Ve(e) {
1257
1298
  e.structuralGroup && (e.scene.remove(e.structuralGroup), e.structuralGroup.traverse((t) => {
1258
1299
  t.isMesh && (t.geometry.dispose(), t.material.dispose());
1259
- }), e.structuralGroup = null), e.structuralMeshes = [], G(e);
1300
+ }), e.structuralGroup = null), e.structuralMeshes = [], j(e);
1260
1301
  }
1261
- function qt(e, t) {
1302
+ function rn(e, t) {
1262
1303
  e.structuralGroup && (e.structuralGroup.visible = !!t);
1263
1304
  }
1264
- let Zt = 0;
1265
- function Wt(e) {
1305
+ let on = 0;
1306
+ function sn(e) {
1266
1307
  let t, n, r, o;
1267
1308
  if ("width" in e || "height" in e || "x" in e && !("maxX" in e)) {
1268
1309
  const i = Number(e.x ?? 0), a = Number(e.y ?? 0), c = Number(e.width ?? 0), l = Number(e.height ?? 0);
@@ -1279,7 +1320,7 @@ function Wt(e) {
1279
1320
  );
1280
1321
  return { minX: t, minY: n, maxX: r, maxY: o };
1281
1322
  }
1282
- function Kt(e) {
1323
+ function an(e) {
1283
1324
  if (e.type === "texture")
1284
1325
  return Promise.resolve(e.texture);
1285
1326
  let t, n = !1;
@@ -1308,58 +1349,58 @@ function Kt(e) {
1308
1349
  );
1309
1350
  });
1310
1351
  }
1311
- async function zr(e) {
1312
- const { source: t, bounds: n, elevation: r = 0, visible: o = !0, renderOrder: i = 0 } = e, a = e.id ?? `raster-overlay-${++Zt}`, c = e.name ?? a;
1352
+ async function Vr(e) {
1353
+ const { source: t, bounds: n, elevation: r = 0, visible: o = !0, renderOrder: i = 0 } = e, a = e.id ?? `raster-overlay-${++on}`, c = e.name ?? a;
1313
1354
  let l = e.opacity ?? 1;
1314
1355
  if ((l < 0 || l > 1) && (console.warn(
1315
1356
  `[baselode] raster overlay "${a}": opacity ${l} is outside [0, 1] — clamped`
1316
1357
  ), l = Math.max(0, Math.min(1, l))), !t) throw new Error("raster overlay: options.source is required");
1317
1358
  if (!n) throw new Error("raster overlay: options.bounds is required");
1318
- const s = Wt(n), { minX: u, minY: g, maxX: m, maxY: h } = s, d = m - u, p = h - g, N = (u + m) / 2, k = (g + h) / 2, b = await Kt(t), L = new f.PlaneGeometry(d, p), y = new f.MeshBasicMaterial({
1359
+ const s = sn(n), { minX: u, minY: p, maxX: m, maxY: h } = s, d = m - u, g = h - p, N = (u + m) / 2, O = (p + h) / 2, b = await an(t), L = new f.PlaneGeometry(d, g), y = new f.MeshBasicMaterial({
1319
1360
  map: b,
1320
1361
  transparent: !0,
1321
1362
  opacity: l,
1322
1363
  side: f.DoubleSide,
1323
1364
  depthWrite: !1
1324
- }), z = new f.Mesh(L, y);
1325
- return z.position.set(N, k, r), z.renderOrder = i, z.visible = o, { id: a, name: c, mesh: z, texture: b, bounds: s, elevation: r, opacity: l, visible: o };
1365
+ }), E = new f.Mesh(L, y);
1366
+ return E.position.set(N, O, r), E.renderOrder = i, E.visible = o, { id: a, name: c, mesh: E, texture: b, bounds: s, elevation: r, opacity: l, visible: o };
1326
1367
  }
1327
- function Jt(e, t) {
1328
- e.scene && (e.rasterOverlays.has(t.id) && de(e, t.id), e.rasterOverlays.set(t.id, t), e.scene.add(t.mesh));
1368
+ function ln(e, t) {
1369
+ e.scene && (e.rasterOverlays.has(t.id) && _e(e, t.id), e.rasterOverlays.set(t.id, t), e.scene.add(t.mesh));
1329
1370
  }
1330
- function de(e, t) {
1371
+ function _e(e, t) {
1331
1372
  var r;
1332
1373
  const n = e.rasterOverlays.get(t);
1333
1374
  n && ((r = e.scene) == null || r.remove(n.mesh), n.mesh.geometry.dispose(), n.mesh.material.dispose(), n.texture && n.texture.dispose(), e.rasterOverlays.delete(t));
1334
1375
  }
1335
- function Qt(e, t, n) {
1376
+ function cn(e, t, n) {
1336
1377
  const r = e.rasterOverlays.get(t);
1337
1378
  if (!r) return;
1338
1379
  const o = Math.max(0, Math.min(1, Number(n)));
1339
1380
  r.opacity = o, r.mesh.material.opacity = o, r.mesh.material.needsUpdate = !0;
1340
1381
  }
1341
- function en(e, t, n) {
1382
+ function un(e, t, n) {
1342
1383
  const r = e.rasterOverlays.get(t);
1343
1384
  r && (r.visible = !!n, r.mesh.visible = r.visible);
1344
1385
  }
1345
- function tn(e, t, n) {
1386
+ function mn(e, t, n) {
1346
1387
  const r = e.rasterOverlays.get(t);
1347
1388
  r && (r.elevation = Number(n), r.mesh.position.setZ(r.elevation));
1348
1389
  }
1349
- function nn(e, t) {
1390
+ function dn(e, t) {
1350
1391
  return e.rasterOverlays.get(t);
1351
1392
  }
1352
- function rn(e) {
1393
+ function fn(e) {
1353
1394
  return Array.from(e.rasterOverlays.values());
1354
1395
  }
1355
- function on(e) {
1396
+ function hn(e) {
1356
1397
  for (const t of [...e.rasterOverlays.keys()])
1357
- de(e, t);
1398
+ _e(e, t);
1358
1399
  }
1359
- function fe(e) {
1400
+ function Me(e) {
1360
1401
  var n, r, o, i, a, c, l, s, u;
1361
1402
  if (!e) return "";
1362
- const t = (g) => Number.isFinite(g) ? g.toFixed(3) : "nan";
1403
+ const t = (p) => Number.isFinite(p) ? p.toFixed(3) : "nan";
1363
1404
  return [
1364
1405
  t((n = e.camera) == null ? void 0 : n.x),
1365
1406
  t((r = e.camera) == null ? void 0 : r.y),
@@ -1372,7 +1413,7 @@ function fe(e) {
1372
1413
  t((u = e.up) == null ? void 0 : u.z)
1373
1414
  ].join("|");
1374
1415
  }
1375
- function Re(e) {
1416
+ function He(e) {
1376
1417
  return !e.camera || !e.controls ? null : {
1377
1418
  camera: {
1378
1419
  x: e.camera.position.x,
@@ -1391,37 +1432,37 @@ function Re(e) {
1391
1432
  }
1392
1433
  };
1393
1434
  }
1394
- function sn(e, t) {
1435
+ function bn(e, t) {
1395
1436
  if (!e.camera || !e.controls || !t) return !1;
1396
1437
  const n = t.camera || {}, r = t.target || {}, o = t.up || {};
1397
- return [n.x, n.y, n.z, r.x, r.y, r.z, o.x, o.y, o.z].every(Number.isFinite) ? (e.camera.position.set(n.x, n.y, n.z), e.controls.target.set(r.x, r.y, r.z), e.camera.up.set(o.x, o.y, o.z), e.camera.lookAt(r.x, r.y, r.z), e.controls.update(), e._lastViewSignature = fe(t), !0) : !1;
1438
+ return [n.x, n.y, n.z, r.x, r.y, r.z, o.x, o.y, o.z].every(Number.isFinite) ? (e.camera.position.set(n.x, n.y, n.z), e.controls.target.set(r.x, r.y, r.z), e.camera.up.set(o.x, o.y, o.z), e.camera.lookAt(r.x, r.y, r.z), e.controls.update(), e._lastViewSignature = Me(t), !0) : !1;
1398
1439
  }
1399
- function an(e) {
1440
+ function pn(e) {
1400
1441
  if (!e.viewChangeHandler) return;
1401
1442
  const t = Date.now();
1402
1443
  if (t - e._lastViewEmitMs < 250) return;
1403
- const n = Re(e);
1444
+ const n = He(e);
1404
1445
  if (!n) return;
1405
- const r = fe(n);
1446
+ const r = Me(n);
1406
1447
  r !== e._lastViewSignature && (e._lastViewSignature = r, e._lastViewEmitMs = t, e.viewChangeHandler(n));
1407
1448
  }
1408
- function he(e, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
1409
- const c = (t + n) / 2, l = (r + o) / 2, s = (i + a) / 2, u = n - t, g = o - r, m = a - i, d = Math.max(u, g, m, 1) * 2;
1449
+ function Ee(e, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
1450
+ const c = (t + n) / 2, l = (r + o) / 2, s = (i + a) / 2, u = n - t, p = o - r, m = a - i, d = Math.max(u, p, m, 1) * 2;
1410
1451
  e.controls.target.set(c, l, s), e.camera.position.set(c + d, l + d, s + d), e.camera.lookAt(c, l, s), e.controls.update();
1411
1452
  }
1412
- function ln(e, t = 1e3) {
1453
+ function gn(e, t = 1e3) {
1413
1454
  !e.camera || !e.controls || (e.controls.target.set(0, 0, 0), e.camera.position.set(t, t, t), e.camera.lookAt(0, 0, 0), e.controls.update());
1414
1455
  }
1415
- function cn(e, t = 2e3) {
1456
+ function yn(e, t = 2e3) {
1416
1457
  !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());
1417
1458
  }
1418
- function un(e, t = 0, n = 0) {
1459
+ function _n(e, t = 0, n = 0) {
1419
1460
  e.controls && typeof e.controls.pan == "function" && (e.controls.pan(t, n), e.controls.update());
1420
1461
  }
1421
- function mn(e, t = 1.1) {
1462
+ function Mn(e, t = 1.1) {
1422
1463
  !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());
1423
1464
  }
1424
- function dn(e, t = 1.2) {
1465
+ function En(e, t = 1.2) {
1425
1466
  if (!e.lastBounds) return;
1426
1467
  const {
1427
1468
  minX: n,
@@ -1430,16 +1471,16 @@ function dn(e, t = 1.2) {
1430
1471
  maxY: i,
1431
1472
  minZ: a,
1432
1473
  maxZ: c
1433
- } = e.lastBounds, l = (r - n) * t, s = (i - o) * t, u = (c - a) * t, g = (n + r) / 2, m = (o + i) / 2, h = (a + c) / 2, p = Math.max(l, s, u, 1) * 2;
1434
- e.controls.target.set(g, m, h), e.camera.position.set(g + p, m + p, h + p), e.camera.lookAt(g, m, h), e.controls.update();
1474
+ } = e.lastBounds, l = (r - n) * t, s = (i - o) * t, u = (c - a) * t, p = (n + r) / 2, m = (o + i) / 2, h = (a + c) / 2, g = Math.max(l, s, u, 1) * 2;
1475
+ e.controls.target.set(p, m, h), e.camera.position.set(p + g, m + g, h + g), e.camera.lookAt(p, m, h), e.controls.update();
1435
1476
  }
1436
- const fn = 1, hn = 120;
1437
- function bn(e, t) {
1477
+ const zn = 1, Nn = 120;
1478
+ function On(e, t) {
1438
1479
  if (!e.camera || !e.controls || !Number.isFinite(t)) return !1;
1439
- const n = Math.min(hn, Math.max(fn, t)), r = e.controls.target, o = e.camera.position.distanceTo(r), i = e.camera.fov * Math.PI / 180, a = 2 * o * Math.tan(i / 2), c = n * Math.PI / 180, l = a / (2 * Math.tan(c / 2)), s = e.camera.position.clone().sub(r).normalize();
1480
+ const n = Math.min(Nn, Math.max(zn, t)), r = e.controls.target, o = e.camera.position.distanceTo(r), i = e.camera.fov * Math.PI / 180, a = 2 * o * Math.tan(i / 2), c = n * Math.PI / 180, l = a / (2 * Math.tan(c / 2)), s = e.camera.position.clone().sub(r).normalize();
1440
1481
  return e.camera.position.copy(r).addScaledVector(s, l), e.camera.fov = n, e.camera.updateProjectionMatrix(), e.controls.update(), !0;
1441
1482
  }
1442
- function gn(e, t = "orbit") {
1483
+ function kn(e, t = "orbit") {
1443
1484
  if (e.controlMode = t === "fly" ? "fly" : "orbit", e.controlMode === "fly")
1444
1485
  e.controls && (e.controls.enabled = !1), e.flyControls && (e.flyControls.enabled = !0);
1445
1486
  else if (e.flyControls && (e.flyControls.enabled = !1), e.controls) {
@@ -1448,37 +1489,37 @@ function gn(e, t = "orbit") {
1448
1489
  e.controls.target.copy(n), e.controls.update();
1449
1490
  }
1450
1491
  }
1451
- const B = "#9ca3af";
1452
- function Me(e, t) {
1492
+ const T = "#9ca3af";
1493
+ function Ae(e, t) {
1453
1494
  const n = Number(e == null ? void 0 : e.md), r = Number(t == null ? void 0 : t.md);
1454
1495
  if (!Number.isFinite(n) || !Number.isFinite(r)) return null;
1455
1496
  const o = Math.min(n, r), i = Math.max(n, r);
1456
1497
  return i <= o ? null : { segStart: o, segEnd: i };
1457
1498
  }
1458
- function pn(e, t, n) {
1499
+ function Ln(e, t, n) {
1459
1500
  let r = 0, o = 0;
1460
1501
  for (let a = 0; a < e.length; a += 1) {
1461
1502
  const c = e[a], l = Number(c == null ? void 0 : c.from), s = Number(c == null ? void 0 : c.to), u = Number(c == null ? void 0 : c.value);
1462
1503
  if (!Number.isFinite(l) || !Number.isFinite(s) || !Number.isFinite(u) || s <= l) continue;
1463
- const g = Math.max(t, l), h = Math.min(n, s) - g;
1504
+ const p = Math.max(t, l), h = Math.min(n, s) - p;
1464
1505
  h <= 0 || (r += u * h, o += h);
1465
1506
  }
1466
1507
  if (o <= 0) return null;
1467
1508
  const i = r / o;
1468
1509
  return Number.isFinite(i) ? i : null;
1469
1510
  }
1470
- function yn(e, t) {
1471
- if (!Number.isFinite(e)) return new f.Color(B);
1472
- if (Te(e, t) < 0) return new f.Color(B);
1473
- const r = Gt(e, t, B);
1511
+ function An(e, t) {
1512
+ if (!Number.isFinite(e)) return new f.Color(T);
1513
+ if (Re(e, t) < 0) return new f.Color(T);
1514
+ const r = Kt(e, t, T);
1474
1515
  return new f.Color(r);
1475
1516
  }
1476
- function _n(e) {
1477
- if (!e || !String(e).trim()) return B;
1478
- const t = Ve(String(e).toLowerCase().trim());
1517
+ function Dn(e) {
1518
+ if (!e || !String(e).trim()) return T;
1519
+ const t = Ge(String(e).toLowerCase().trim());
1479
1520
  return "#" + new f.Color().setHSL(t, 0.7, 0.5).getHexString();
1480
1521
  }
1481
- function Mn(e = {}) {
1522
+ function Sn(e = {}) {
1482
1523
  return {
1483
1524
  preserveView: !!e.preserveView,
1484
1525
  assayIntervalsByHole: e.assayIntervalsByHole || null,
@@ -1486,7 +1527,7 @@ function Mn(e = {}) {
1486
1527
  isCategoricalVariable: !!e.isCategoricalVariable
1487
1528
  };
1488
1529
  }
1489
- function zn(e, t) {
1530
+ function wn(e, t) {
1490
1531
  if (!e || !t) return [];
1491
1532
  const n = [];
1492
1533
  return Object.values(e).forEach((r) => {
@@ -1496,27 +1537,27 @@ function zn(e, t) {
1496
1537
  });
1497
1538
  }), n;
1498
1539
  }
1499
- function re(e) {
1540
+ function oe(e) {
1500
1541
  return {
1501
1542
  holeId: e.id,
1502
1543
  project: e.project
1503
1544
  };
1504
1545
  }
1505
- function En(e) {
1546
+ function xn(e) {
1506
1547
  return `${e ?? ""}`.trim().toLowerCase();
1507
1548
  }
1508
- function Nn(e, t) {
1509
- const n = `${e ?? ""}:${t ?? 0}`, r = Ve(n), o = (t ?? 0) % 14 / 14, i = (r * 0.15 + o * 0.85) % 1, a = new f.Color();
1549
+ function Fn(e, t) {
1550
+ const n = `${e ?? ""}:${t ?? 0}`, r = Ge(n), o = (t ?? 0) % 14 / 14, i = (r * 0.15 + o * 0.85) % 1, a = new f.Color();
1510
1551
  return a.setHSL(i, 1, 0.5), a;
1511
1552
  }
1512
- function Ve(e) {
1553
+ function Ge(e) {
1513
1554
  const t = `${e ?? ""}`;
1514
1555
  let n = 2166136261;
1515
1556
  for (let r = 0; r < t.length; r += 1)
1516
1557
  n ^= t.charCodeAt(r), n = Math.imul(n, 16777619);
1517
1558
  return (n >>> 0) / 4294967295;
1518
1559
  }
1519
- function kn(e, t, n) {
1560
+ function vn(e, t, n) {
1520
1561
  let r = null, o = 0;
1521
1562
  for (const i of e) {
1522
1563
  const a = Number(i == null ? void 0 : i.from), c = Number(i == null ? void 0 : i.to);
@@ -1526,108 +1567,108 @@ function kn(e, t, n) {
1526
1567
  }
1527
1568
  return r;
1528
1569
  }
1529
- function On(e, t) {
1570
+ function In(e, t) {
1530
1571
  if (!t || !e) return [];
1531
1572
  const n = e.id || e.holeId;
1532
1573
  if (!n) return [];
1533
1574
  const r = t[n];
1534
1575
  if (Array.isArray(r) && r.length) return r;
1535
- const o = En(n);
1576
+ const o = xn(n);
1536
1577
  if (o) {
1537
1578
  const i = t[o];
1538
1579
  if (Array.isArray(i) && i.length) return i;
1539
1580
  }
1540
1581
  return [];
1541
1582
  }
1542
- function Ln({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId: r, segmentIndex: o, p1: i, p2: a, isCategorical: c }) {
1583
+ function Cn({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId: r, segmentIndex: o, p1: i, p2: a, isCategorical: c }) {
1543
1584
  if (!e)
1544
- return Nn(r, o);
1585
+ return Fn(r, o);
1545
1586
  if (e === "__HAS_ASSAY__") {
1546
- if (!(t != null && t.length)) return new f.Color(B);
1547
- const u = Me(i, a);
1587
+ if (!(t != null && t.length)) return new f.Color(T);
1588
+ const u = Ae(i, a);
1548
1589
  return u ? t.some((m) => {
1549
1590
  const h = Number(m == null ? void 0 : m.from), d = Number(m == null ? void 0 : m.to);
1550
1591
  if (!Number.isFinite(h) || !Number.isFinite(d)) return !1;
1551
- const p = Math.max(u.segStart, h);
1552
- return Math.min(u.segEnd, d) > p;
1553
- }) ? new f.Color("#ff8c42") : new f.Color(B) : new f.Color(B);
1592
+ const g = Math.max(u.segStart, h);
1593
+ return Math.min(u.segEnd, d) > g;
1594
+ }) ? new f.Color("#ff8c42") : new f.Color(T) : new f.Color(T);
1554
1595
  }
1555
- if (!(t != null && t.length)) return new f.Color(B);
1556
- const l = Me(i, a);
1557
- if (!l) return new f.Color(B);
1596
+ if (!(t != null && t.length)) return new f.Color(T);
1597
+ const l = Ae(i, a);
1598
+ if (!l) return new f.Color(T);
1558
1599
  if (c) {
1559
- const u = kn(t, l.segStart, l.segEnd);
1560
- return new f.Color(_n(u));
1561
- }
1562
- const s = pn(t, l.segStart, l.segEnd);
1563
- return yn(s, n);
1564
- }
1565
- function Dn(e, t, n = {}) {
1566
- if (!e.scene || (He(e), !t || t.length === 0)) return;
1567
- const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: a } = Mn(n), c = a ? [] : zn(o, i), l = Vt(c);
1568
- let s = 1 / 0, u = -1 / 0, g = 1 / 0, m = -1 / 0, h = 1 / 0, d = -1 / 0;
1569
- const p = new f.Vector3(), N = new f.Vector3(0, 1, 0);
1570
- t.forEach((k, b) => {
1571
- const y = b * 137.5 % 360 / 360, z = new f.Color().setHSL(y, 0.75, 0.55), O = (k.points || []).map((D) => {
1572
- s = Math.min(s, D.x), u = Math.max(u, D.x), g = Math.min(g, D.y), m = Math.max(m, D.y), h = Math.min(h, D.z), d = Math.max(d, D.z);
1573
- const S = new f.Vector3(D.x, D.y, D.z);
1574
- return S.md = D.md, S;
1600
+ const u = vn(t, l.segStart, l.segEnd);
1601
+ return new f.Color(Dn(u));
1602
+ }
1603
+ const s = Ln(t, l.segStart, l.segEnd);
1604
+ return An(s, n);
1605
+ }
1606
+ function Tn(e, t, n = {}) {
1607
+ if (!e.scene || (je(e), !t || t.length === 0)) return;
1608
+ const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: a } = Sn(n), c = a ? [] : wn(o, i), l = Zt(c);
1609
+ let s = 1 / 0, u = -1 / 0, p = 1 / 0, m = -1 / 0, h = 1 / 0, d = -1 / 0;
1610
+ const g = new f.Vector3(), N = new f.Vector3(0, 1, 0);
1611
+ t.forEach((O, b) => {
1612
+ const y = b * 137.5 % 360 / 360, E = new f.Color().setHSL(y, 0.75, 0.55), k = (O.points || []).map((A) => {
1613
+ s = Math.min(s, A.x), u = Math.max(u, A.x), p = Math.min(p, A.y), m = Math.max(m, A.y), h = Math.min(h, A.z), d = Math.max(d, A.z);
1614
+ const x = new f.Vector3(A.x, A.y, A.z);
1615
+ return x.md = A.md, x;
1575
1616
  });
1576
- if (O.length < 2) {
1577
- if (O.length === 1) {
1578
- const D = new f.SphereGeometry(5, 12, 12), S = new f.MeshLambertMaterial({
1579
- color: z,
1580
- emissive: z,
1617
+ if (k.length < 2) {
1618
+ if (k.length === 1) {
1619
+ const A = new f.SphereGeometry(5, 12, 12), x = new f.MeshLambertMaterial({
1620
+ color: E,
1621
+ emissive: E,
1581
1622
  emissiveIntensity: 0.2
1582
- }), w = new f.Mesh(D, S);
1583
- w.position.copy(O[0]), w.userData = re(k), e.scene.add(w), e.drillLines.push(w), e.drillMeshes.push(w);
1623
+ }), S = new f.Mesh(A, x);
1624
+ S.position.copy(k[0]), S.userData = oe(O), e.scene.add(S), e.drillLines.push(S), e.drillMeshes.push(S);
1584
1625
  }
1585
1626
  return;
1586
1627
  }
1587
- const A = new f.Group();
1588
- A.userData = re(k);
1589
- const x = i ? On(k, o) : [];
1590
- for (let D = 0; D < O.length - 1; D += 1) {
1591
- const S = O[D], w = O[D + 1], F = p.subVectors(w, S), C = F.length();
1628
+ const D = new f.Group();
1629
+ D.userData = oe(O);
1630
+ const w = i ? In(O, o) : [];
1631
+ for (let A = 0; A < k.length - 1; A += 1) {
1632
+ const x = k[A], S = k[A + 1], v = g.subVectors(S, x), C = v.length();
1592
1633
  if (C <= 1e-3) continue;
1593
- const I = 2.2, T = new f.CylinderGeometry(I, I, C, 6, 1, !0), P = Ln({
1634
+ const I = 2.2, P = new f.CylinderGeometry(I, I, C, 6, 1, !0), B = Cn({
1594
1635
  selectedAssayVariable: i,
1595
- assayIntervals: x,
1636
+ assayIntervals: w,
1596
1637
  assayScale: l,
1597
- holeId: k.id,
1598
- segmentIndex: D,
1599
- p1: S,
1600
- p2: w,
1638
+ holeId: O.id,
1639
+ segmentIndex: A,
1640
+ p1: x,
1641
+ p2: S,
1601
1642
  isCategorical: a
1602
- }), E = new f.MeshLambertMaterial({
1603
- color: P,
1643
+ }), z = new f.MeshLambertMaterial({
1644
+ color: B,
1604
1645
  flatShading: !0,
1605
- emissive: P,
1646
+ emissive: B,
1606
1647
  emissiveIntensity: 0.15
1607
- }), v = new f.Mesh(T, E);
1608
- v.position.copy(S.clone().addScaledVector(F, 0.5)), v.quaternion.setFromUnitVectors(N, F.clone().normalize()), v.userData = re(k), A.add(v), e.drillMeshes.push(v);
1648
+ }), F = new f.Mesh(P, z);
1649
+ F.position.copy(x.clone().addScaledVector(v, 0.5)), F.quaternion.setFromUnitVectors(N, v.clone().normalize()), F.userData = oe(O), D.add(F), e.drillMeshes.push(F);
1609
1650
  }
1610
- e.scene.add(A), e.drillLines.push(A);
1611
- }), e.camera && e.controls && (e.lastBounds = { minX: s, maxX: u, minY: g, maxY: m, minZ: h, maxZ: d }, r || he(e, { minX: s, maxX: u, minY: g, maxY: m, minZ: h, maxZ: d })), G(e);
1651
+ e.scene.add(D), e.drillLines.push(D);
1652
+ }), e.camera && e.controls && (e.lastBounds = { minX: s, maxX: u, minY: p, maxY: m, minZ: h, maxZ: d }, r || Ee(e, { minX: s, maxX: u, minY: p, maxY: m, minZ: h, maxZ: d })), j(e);
1612
1653
  }
1613
- function He(e) {
1654
+ function je(e) {
1614
1655
  e.drillLines.forEach((t) => {
1615
1656
  e.scene.remove(t), t.isGroup ? t.traverse((n) => {
1616
1657
  n.isMesh && (n.geometry.dispose(), n.material.dispose());
1617
1658
  }) : t.isMesh && (t.geometry.dispose(), t.material.dispose());
1618
- }), e.drillLines = [], e.drillMeshes = [], G(e);
1659
+ }), e.drillLines = [], e.drillMeshes = [], j(e);
1619
1660
  }
1620
- const An = 20, wn = 15, xn = "#00bcd4";
1621
- function Sn(e = {}) {
1661
+ const Pn = 20, Bn = 15, Rn = "#00bcd4";
1662
+ function Vn(e = {}) {
1622
1663
  return {
1623
- panelWidth: e.panelWidth != null ? Number(e.panelWidth) : An,
1624
- lateralOffset: e.lateralOffset != null ? Number(e.lateralOffset) : wn,
1625
- color: e.color || xn,
1664
+ panelWidth: e.panelWidth != null ? Number(e.panelWidth) : Pn,
1665
+ lateralOffset: e.lateralOffset != null ? Number(e.lateralOffset) : Bn,
1666
+ color: e.color || Rn,
1626
1667
  valueMin: e.valueMin != null ? Number(e.valueMin) : null,
1627
1668
  valueMax: e.valueMax != null ? Number(e.valueMax) : null
1628
1669
  };
1629
1670
  }
1630
- function Er(e) {
1671
+ function Hr(e) {
1631
1672
  if (!e || e.length < 2) return null;
1632
1673
  let t = -1 / 0, n = 1 / 0;
1633
1674
  for (const o of e)
@@ -1635,47 +1676,47 @@ function Er(e) {
1635
1676
  const r = t - n;
1636
1677
  return r < 1e-3 ? null : { topZ: t, botZ: n, height: r };
1637
1678
  }
1638
- function vn(e, t, n, r, o, i, a) {
1679
+ function Hn(e, t, n, r, o, i, a) {
1639
1680
  if (!Array.isArray(e) || !Array.isArray(t)) return [];
1640
1681
  const c = Math.min(e.length, t.length), l = [];
1641
1682
  for (let b = 0; b < c; b++)
1642
1683
  Number.isFinite(e[b]) && Number.isFinite(t[b]) && l.push({ d: e[b], v: t[b] });
1643
1684
  if (l.length < 2) return [];
1644
- const s = a != null && a > 0 ? a : null, u = s != null ? 0 : Math.min(...l.map((b) => b.d)), m = (s ?? Math.max(...l.map((b) => b.d))) - u || 1, h = Math.min(...l.map((b) => b.v)), d = Math.max(...l.map((b) => b.v)), p = o ?? h, k = (i ?? d) - p || 1;
1685
+ const s = a != null && a > 0 ? a : null, u = s != null ? 0 : Math.min(...l.map((b) => b.d)), m = (s ?? Math.max(...l.map((b) => b.d))) - u || 1, h = Math.min(...l.map((b) => b.v)), d = Math.max(...l.map((b) => b.v)), g = o ?? h, O = (i ?? d) - g || 1;
1645
1686
  return l.map(({ d: b, v: L }) => {
1646
- const y = (b - u) / m, z = Math.max(0, Math.min(1, (L - p) / k)), O = -n / 2 + z * n, A = y * r;
1647
- return new f.Vector3(O, A, 0.01);
1687
+ const y = (b - u) / m, E = Math.max(0, Math.min(1, (L - g) / O)), k = -n / 2 + E * n, D = y * r;
1688
+ return new f.Vector3(k, D, 0.01);
1648
1689
  });
1649
1690
  }
1650
- function Fn(e, t) {
1691
+ function Gn(e, t) {
1651
1692
  const n = e.length;
1652
1693
  if (n < 2) return null;
1653
1694
  const r = [], o = [];
1654
1695
  let i = 0;
1655
1696
  for (let c = 0; c < n - 1; c++) {
1656
- const l = e[c], s = e[c + 1], u = s.x - l.x, g = s.y - l.y, m = Math.sqrt(u * u + g * g);
1697
+ const l = e[c], s = e[c + 1], u = s.x - l.x, p = s.y - l.y, m = Math.sqrt(u * u + p * p);
1657
1698
  if (m < 1e-6) continue;
1658
- const h = -g / m * t, d = u / m * t, p = 0.01;
1699
+ const h = -p / m * t, d = u / m * t, g = 0.01;
1659
1700
  r.push(
1660
1701
  l.x + h,
1661
1702
  l.y + d,
1662
- p,
1703
+ g,
1663
1704
  l.x - h,
1664
1705
  l.y - d,
1665
- p,
1706
+ g,
1666
1707
  s.x + h,
1667
1708
  s.y + d,
1668
- p,
1709
+ g,
1669
1710
  s.x - h,
1670
1711
  s.y - d,
1671
- p
1712
+ g
1672
1713
  ), o.push(i, i + 1, i + 2, i + 1, i + 3, i + 2), i += 4;
1673
1714
  }
1674
1715
  if (r.length === 0) return null;
1675
1716
  const a = new f.BufferGeometry();
1676
1717
  return a.setAttribute("position", new f.Float32BufferAttribute(r, 3)), a.setIndex(o), a;
1677
1718
  }
1678
- function In(e, t) {
1719
+ function jn(e, t) {
1679
1720
  const n = e.points || [];
1680
1721
  if (n.length < 2) return null;
1681
1722
  const r = n[0], o = n[n.length - 1], i = new f.Vector3(
@@ -1684,67 +1725,67 @@ function In(e, t) {
1684
1725
  o.z - r.z
1685
1726
  ), a = i.length();
1686
1727
  if (a < 1e-3) return null;
1687
- const c = i.clone().normalize(), l = Sn(t.options), { panelWidth: s, lateralOffset: u, color: g, valueMin: m, valueMax: h } = l, d = new f.Vector3(0, 0, 1);
1688
- let p = new f.Vector3().crossVectors(c, d);
1689
- p.lengthSq() < 1e-6 ? p.set(1, 0, 0) : p.normalize();
1690
- const N = new f.Vector3().crossVectors(p, c).normalize(), k = new f.Vector3(r.x, r.y, r.z).addScaledVector(p, u), b = new f.Matrix4().makeBasis(p, c, N), L = new f.Quaternion().setFromRotationMatrix(b), y = n.map((F) => F.md).filter(Number.isFinite), z = y.length > 0 ? Math.max(...y) : a, O = vn(
1728
+ const c = i.clone().normalize(), l = Vn(t.options), { panelWidth: s, lateralOffset: u, color: p, valueMin: m, valueMax: h } = l, d = new f.Vector3(0, 0, 1);
1729
+ let g = new f.Vector3().crossVectors(c, d);
1730
+ g.lengthSq() < 1e-6 ? g.set(1, 0, 0) : g.normalize();
1731
+ const N = new f.Vector3().crossVectors(g, c).normalize(), O = new f.Vector3(r.x, r.y, r.z).addScaledVector(g, u), b = new f.Matrix4().makeBasis(g, c, N), L = new f.Quaternion().setFromRotationMatrix(b), y = n.map((v) => v.md).filter(Number.isFinite), E = y.length > 0 ? Math.max(...y) : a, k = Hn(
1691
1732
  t.depths,
1692
1733
  t.values,
1693
1734
  s,
1694
1735
  a,
1695
1736
  m,
1696
1737
  h,
1697
- z
1738
+ E
1698
1739
  );
1699
- if (O.length < 2) return null;
1700
- const A = new f.Group();
1701
- A.userData = { holeId: e.id, isStripLog: !0 };
1702
- const x = s * 0.025, D = Fn(O, x);
1703
- if (!D) return null;
1704
- const S = new f.MeshBasicMaterial({
1705
- color: new f.Color(g),
1740
+ if (k.length < 2) return null;
1741
+ const D = new f.Group();
1742
+ D.userData = { holeId: e.id, isStripLog: !0 };
1743
+ const w = s * 0.025, A = Gn(k, w);
1744
+ if (!A) return null;
1745
+ const x = new f.MeshBasicMaterial({
1746
+ color: new f.Color(p),
1706
1747
  side: f.DoubleSide
1707
- }), w = new f.Mesh(D, S);
1708
- return w.position.copy(k), w.quaternion.copy(L), A.add(w), A;
1748
+ }), S = new f.Mesh(A, x);
1749
+ return S.position.copy(O), S.quaternion.copy(L), D.add(S), D;
1709
1750
  }
1710
- function Cn(e, t, n) {
1711
- if (!e.scene || (le(e), !n || n.length === 0) || !t || t.length === 0) return;
1751
+ function Un(e, t, n) {
1752
+ if (!e.scene || (ce(e), !n || n.length === 0) || !t || t.length === 0) return;
1712
1753
  const r = /* @__PURE__ */ new Map();
1713
1754
  t.forEach((o) => {
1714
1755
  o.id != null && r.set(o.id, o);
1715
1756
  }), n.forEach((o) => {
1716
1757
  const i = r.get(o.holeId);
1717
1758
  if (!i) return;
1718
- const a = In(i, o);
1759
+ const a = jn(i, o);
1719
1760
  a && (e.scene.add(a), e.stripLogGroups.push(a));
1720
1761
  });
1721
1762
  }
1722
- function le(e) {
1763
+ function ce(e) {
1723
1764
  e.stripLogGroups && (e.stripLogGroups.forEach((t) => {
1724
1765
  e.scene && e.scene.remove(t), t.traverse((n) => {
1725
1766
  n.geometry && n.geometry.dispose(), n.material && n.material.dispose();
1726
1767
  });
1727
1768
  }), e.stripLogGroups = []);
1728
1769
  }
1729
- const ze = "#ffffbb", Bn = 2, Tn = 1.5, Pn = 1;
1730
- function Rn(e) {
1770
+ const De = "#ffffbb", Yn = 2, $n = 1.5, Xn = 1;
1771
+ function qn(e) {
1731
1772
  const { renderer: t, scene: n, camera: r, container: o } = e;
1732
1773
  if (!t || !n || !r) return;
1733
- const i = (o == null ? void 0 : o.clientWidth) || t.domElement.clientWidth || 1, a = (o == null ? void 0 : o.clientHeight) || t.domElement.clientHeight || 1, c = new st(t), l = new at(n, r);
1774
+ const i = (o == null ? void 0 : o.clientWidth) || t.domElement.clientWidth || 1, a = (o == null ? void 0 : o.clientHeight) || t.domElement.clientHeight || 1, c = new lt(t), l = new ct(n, r);
1734
1775
  c.addPass(l);
1735
- const s = new f.Vector2(i, a), u = new lt(s, n, r);
1736
- u.visibleEdgeColor.set(ze), u.hiddenEdgeColor.set(ze), u.edgeStrength = Bn, u.edgeThickness = Tn, u.edgeGlow = Pn, u.pulsePeriod = 0, u.selectedObjects = [], c.addPass(u), c.setSize(i, a), e._composer = c, e._outlinePass = u;
1776
+ const s = new f.Vector2(i, a), u = new ut(s, n, r);
1777
+ u.visibleEdgeColor.set(De), u.hiddenEdgeColor.set(De), u.edgeStrength = Yn, u.edgeThickness = $n, u.edgeGlow = Xn, u.pulsePeriod = 0, u.selectedObjects = [], c.addPass(u), c.setSize(i, a), e._composer = c, e._outlinePass = u;
1737
1778
  }
1738
- function Vn(e, t, n) {
1779
+ function Zn(e, t, n) {
1739
1780
  !e._composer || !e._outlinePass || (e._composer.setSize(t, n), e._outlinePass.resolution.set(t, n));
1740
1781
  }
1741
- function q(e, t) {
1782
+ function Z(e, t) {
1742
1783
  e._outlinePass && (e._outlinePass.selectedObjects = t ? [t] : [], e._selectedObject = t || null);
1743
1784
  }
1744
- function Ee(e) {
1785
+ function Se(e) {
1745
1786
  e._composer && (e._composer.dispose(), e._composer = null), e._outlinePass = null, e._selectedObject = null, e.selectables = [];
1746
1787
  }
1747
- const Hn = [
1788
+ const Wn = [
1748
1789
  { normal: [1, 0, 0], neibDir: [1, 0, 0], verts: [[1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1]] },
1749
1790
  { normal: [-1, 0, 0], neibDir: [-1, 0, 0], verts: [[-1, -1, 1], [-1, 1, 1], [-1, 1, -1], [-1, -1, -1]] },
1750
1791
  { normal: [0, 1, 0], neibDir: [0, 1, 0], verts: [[-1, 1, 1], [1, 1, 1], [1, 1, -1], [-1, 1, -1]] },
@@ -1752,86 +1793,86 @@ const Hn = [
1752
1793
  { normal: [0, 0, 1], neibDir: [0, 0, 1], verts: [[-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1]] },
1753
1794
  { normal: [0, 0, -1], neibDir: [0, 0, -1], verts: [[1, -1, -1], [-1, -1, -1], [-1, 1, -1], [1, 1, -1]] }
1754
1795
  ];
1755
- function Gn(e, t, n, r, o = {}) {
1756
- if (!e.scene || (Ge(e), !t || !n || !r)) return;
1796
+ function Kn(e, t, n, r, o = {}) {
1797
+ if (!e.scene || (Ue(e), !t || !n || !r)) return;
1757
1798
  const { autoCenter: i = !0, opacity: a = 1 } = o;
1758
- let c = 1 / 0, l = -1 / 0, s = 1 / 0, u = -1 / 0, g = 1 / 0, m = -1 / 0;
1759
- t.forEach((E) => {
1760
- const v = Number(E.x ?? E.center_x ?? 0), R = Number(E.y ?? E.center_y ?? 0), Y = Number(E.z ?? E.center_z ?? 0), U = Number(E.dx ?? E.size_x ?? 1), $ = Number(E.dy ?? E.size_y ?? 1), X = Number(E.dz ?? E.size_z ?? 1);
1761
- c = Math.min(c, v - U / 2), l = Math.max(l, v + U / 2), s = Math.min(s, R - $ / 2), u = Math.max(u, R + $ / 2), g = Math.min(g, Y - X / 2), m = Math.max(m, Y + X / 2);
1799
+ let c = 1 / 0, l = -1 / 0, s = 1 / 0, u = -1 / 0, p = 1 / 0, m = -1 / 0;
1800
+ t.forEach((z) => {
1801
+ const F = Number(z.x ?? z.center_x ?? 0), R = Number(z.y ?? z.center_y ?? 0), Y = Number(z.z ?? z.center_z ?? 0), $ = Number(z.dx ?? z.size_x ?? 1), X = Number(z.dy ?? z.size_y ?? 1), q = Number(z.dz ?? z.size_z ?? 1);
1802
+ c = Math.min(c, F - $ / 2), l = Math.max(l, F + $ / 2), s = Math.min(s, R - X / 2), u = Math.max(u, R + X / 2), p = Math.min(p, Y - q / 2), m = Math.max(m, Y + q / 2);
1762
1803
  });
1763
- let h = 0, d = 0, p = 0;
1764
- o.offset ? (h = Number(o.offset.x ?? 0), d = Number(o.offset.y ?? 0), p = Number(o.offset.z ?? 0)) : i && (h = -((c + l) / 2), d = -((s + u) / 2), p = -((g + m) / 2));
1765
- const N = c + h, k = l + h, b = s + d, L = u + d, y = g + p, z = m + p, O = (E, v, R) => `${Math.round(E)},${Math.round(v)},${Math.round(R)}`, A = new Set(
1766
- t.map((E) => O(Number(E.x ?? 0), Number(E.y ?? 0), Number(E.z ?? 0)))
1767
- ), x = [], D = [], S = [], w = [], F = [];
1804
+ let h = 0, d = 0, g = 0;
1805
+ o.offset ? (h = Number(o.offset.x ?? 0), d = Number(o.offset.y ?? 0), g = Number(o.offset.z ?? 0)) : i && (h = -((c + l) / 2), d = -((s + u) / 2), g = -((p + m) / 2));
1806
+ const N = c + h, O = l + h, b = s + d, L = u + d, y = p + g, E = m + g, k = (z, F, R) => `${Math.round(z)},${Math.round(F)},${Math.round(R)}`, D = new Set(
1807
+ t.map((z) => k(Number(z.x ?? 0), Number(z.y ?? 0), Number(z.z ?? 0)))
1808
+ ), w = [], A = [], x = [], S = [], v = [];
1768
1809
  let C = 0;
1769
- if (t.forEach((E) => {
1770
- const v = Number(E.x ?? E.center_x ?? 0), R = Number(E.y ?? E.center_y ?? 0), Y = Number(E.z ?? E.center_z ?? 0), U = Number(E.dx ?? E.size_x ?? 1), $ = Number(E.dy ?? E.size_y ?? 1), X = Number(E.dz ?? E.size_z ?? 1), Ye = v + h, Ue = R + d, $e = Y + p, Xe = zt(E[n], r, f), { r: qe, g: Ze, b: We } = Xe;
1771
- Hn.forEach((V) => {
1772
- const Ke = v + V.neibDir[0] * U, Je = R + V.neibDir[1] * $, Qe = Y + V.neibDir[2] * X;
1773
- if (A.has(O(Ke, Je, Qe))) return;
1774
- const j = C;
1775
- V.verts.forEach(([et, tt, nt]) => {
1776
- x.push(Ye + et * U / 2, Ue + tt * $ / 2, $e + nt * X / 2), D.push(V.normal[0], V.normal[1], V.normal[2]), S.push(qe, Ze, We), C++;
1777
- }), w.push(j, j + 1, j + 2, j, j + 2, j + 3), F.push(E);
1810
+ if (t.forEach((z) => {
1811
+ const F = Number(z.x ?? z.center_x ?? 0), R = Number(z.y ?? z.center_y ?? 0), Y = Number(z.z ?? z.center_z ?? 0), $ = Number(z.dx ?? z.size_x ?? 1), X = Number(z.dy ?? z.size_y ?? 1), q = Number(z.dz ?? z.size_z ?? 1), $e = F + h, Xe = R + d, qe = Y + g, Ze = St(z[n], r, f), { r: We, g: Ke, b: Je } = Ze;
1812
+ Wn.forEach((V) => {
1813
+ const Qe = F + V.neibDir[0] * $, et = R + V.neibDir[1] * X, tt = Y + V.neibDir[2] * q;
1814
+ if (D.has(k(Qe, et, tt))) return;
1815
+ const U = C;
1816
+ V.verts.forEach(([nt, rt, ot]) => {
1817
+ w.push($e + nt * $ / 2, Xe + rt * X / 2, qe + ot * q / 2), A.push(V.normal[0], V.normal[1], V.normal[2]), x.push(We, Ke, Je), C++;
1818
+ }), S.push(U, U + 1, U + 2, U, U + 2, U + 3), v.push(z);
1778
1819
  });
1779
- }), x.length === 0) return;
1820
+ }), w.length === 0) return;
1780
1821
  const I = new f.BufferGeometry();
1781
- I.setAttribute("position", new f.Float32BufferAttribute(x, 3)), I.setAttribute("normal", new f.Float32BufferAttribute(D, 3)), I.setAttribute("color", new f.Float32BufferAttribute(S, 3)), I.setIndex(w);
1782
- const T = new f.MeshLambertMaterial({
1822
+ I.setAttribute("position", new f.Float32BufferAttribute(w, 3)), I.setAttribute("normal", new f.Float32BufferAttribute(A, 3)), I.setAttribute("color", new f.Float32BufferAttribute(x, 3)), I.setIndex(S);
1823
+ const P = new f.MeshLambertMaterial({
1783
1824
  vertexColors: !0,
1784
1825
  transparent: a < 1,
1785
1826
  opacity: a,
1786
1827
  side: f.DoubleSide
1787
- }), P = new f.Mesh(I, T);
1788
- P.userData._isMergedBlocks = !0, P.userData._quadToBlock = F, P.userData._offset = { x: h, y: d, z: p }, e.scene.add(P), e.blocks.push(P), G(e), e.camera && e.controls && (e.lastBounds = { minX: N, maxX: k, minY: b, maxY: L, minZ: y, maxZ: z }, he(e, { minX: N, maxX: k, minY: b, maxY: L, minZ: y, maxZ: z }));
1828
+ }), B = new f.Mesh(I, P);
1829
+ B.userData._isMergedBlocks = !0, B.userData._quadToBlock = v, B.userData._offset = { x: h, y: d, z: g }, e.scene.add(B), e.blocks.push(B), j(e), e.camera && e.controls && (e.lastBounds = { minX: N, maxX: O, minY: b, maxY: L, minZ: y, maxZ: E }, Ee(e, { minX: N, maxX: O, minY: b, maxY: L, minZ: y, maxZ: E }));
1789
1830
  }
1790
- function Ge(e) {
1831
+ function Ue(e) {
1791
1832
  var t;
1792
1833
  e.blocks.forEach((n) => {
1793
1834
  e.scene.remove(n), n.geometry.dispose(), n.material.dispose();
1794
- }), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null), G(e);
1835
+ }), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null), j(e);
1795
1836
  }
1796
- function jn(e, t) {
1837
+ function Jn(e, t) {
1797
1838
  const n = Math.max(0, Math.min(1, Number(t)));
1798
1839
  e.blocks.forEach((r) => {
1799
1840
  r.material && (r.material.opacity = n, r.material.transparent = n < 1, r.material.needsUpdate = !0);
1800
1841
  });
1801
1842
  }
1802
- function Yn(e, t, n) {
1803
- 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, a = Number(t.x ?? t.center_x ?? 0) + r, c = Number(t.y ?? t.center_y ?? 0) + o, l = Number(t.z ?? t.center_z ?? 0) + i, s = Number(t.dx ?? t.size_x ?? 1), u = Number(t.dy ?? t.size_y ?? 1), g = Number(t.dz ?? t.size_z ?? 1);
1843
+ function Qn(e, t, n) {
1844
+ 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, a = Number(t.x ?? t.center_x ?? 0) + r, c = Number(t.y ?? t.center_y ?? 0) + o, l = Number(t.z ?? t.center_z ?? 0) + i, s = Number(t.dx ?? t.size_x ?? 1), u = Number(t.dy ?? t.size_y ?? 1), p = Number(t.dz ?? t.size_z ?? 1);
1804
1845
  if (!e._blockHighlightMesh) {
1805
1846
  const m = new f.BoxGeometry(1, 1, 1), h = new f.MeshBasicMaterial({ transparent: !0, opacity: 0, depthWrite: !1 });
1806
1847
  e._blockHighlightMesh = new f.Mesh(m, h), e.scene.add(e._blockHighlightMesh);
1807
1848
  }
1808
- return e._blockHighlightMesh.position.set(a, c, l), e._blockHighlightMesh.scale.set(s, u, g), e._blockHighlightMesh;
1849
+ return e._blockHighlightMesh.position.set(a, c, l), e._blockHighlightMesh.scale.set(s, u, p), e._blockHighlightMesh;
1809
1850
  }
1810
- function je(e) {
1851
+ function Ye(e) {
1811
1852
  var o, i;
1812
1853
  if (!e._outlinePass || e.selectables.length === 0) {
1813
- e._outlinePass && q(e, null);
1854
+ e._outlinePass && Z(e, null);
1814
1855
  return;
1815
1856
  }
1816
1857
  const t = e.raycaster.intersectObjects(e.selectables, !0);
1817
1858
  if (t.length === 0) {
1818
- q(e, null);
1859
+ Z(e, null);
1819
1860
  return;
1820
1861
  }
1821
1862
  const n = t[0], r = n.object;
1822
1863
  if ((o = r == null ? void 0 : r.userData) != null && o._isMergedBlocks) {
1823
1864
  const a = Math.floor(n.faceIndex / 2), c = (i = r.userData._quadToBlock) == null ? void 0 : i[a];
1824
1865
  if (c) {
1825
- q(e, Yn(e, c, r.userData._offset));
1866
+ Z(e, Qn(e, c, r.userData._offset));
1826
1867
  return;
1827
1868
  }
1828
1869
  }
1829
- q(e, r);
1870
+ Z(e, r);
1830
1871
  }
1831
- function Un(e) {
1872
+ function er(e) {
1832
1873
  const t = e.renderer;
1833
1874
  t && (e.handleCanvasClick = (n) => {
1834
- var h, d, p, N, k, b, L;
1875
+ var h, d, g, N, O, b, L;
1835
1876
  if (n.button !== 0) return;
1836
1877
  if ((h = e.gizmo) != null && h.domElement) {
1837
1878
  const y = e.gizmo.domElement.getBoundingClientRect();
@@ -1839,18 +1880,18 @@ function Un(e) {
1839
1880
  return;
1840
1881
  }
1841
1882
  const r = t.domElement.getBoundingClientRect(), o = n.clientX - r.left, i = n.clientY - r.top;
1842
- if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera), je(e), e.blocks.length > 0) {
1883
+ if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera), Ye(e), e.blocks.length > 0) {
1843
1884
  const y = e.raycaster.intersectObjects(e.blocks, !1);
1844
1885
  if (y.length > 0) {
1845
- const z = y[0], O = z.object;
1846
- if ((d = O == null ? void 0 : O.userData) != null && d._isMergedBlocks && e.blockClickHandler) {
1847
- const A = Math.floor(z.faceIndex / 2), x = O.userData._quadToBlock[A];
1848
- x && e.blockClickHandler(x);
1886
+ const E = y[0], k = E.object;
1887
+ if ((d = k == null ? void 0 : k.userData) != null && d._isMergedBlocks && e.blockClickHandler) {
1888
+ const D = Math.floor(E.faceIndex / 2), w = k.userData._quadToBlock[D];
1889
+ w && e.blockClickHandler(w);
1849
1890
  }
1850
1891
  return;
1851
1892
  }
1852
1893
  }
1853
- const a = e.raycaster.intersectObjects(e.drillMeshes, !0), c = e.raycaster.intersectObjects(e.structuralMeshes, !0), l = ((p = a[0]) == null ? void 0 : p.distance) ?? 1 / 0;
1894
+ const a = e.raycaster.intersectObjects(e.drillMeshes, !0), c = e.raycaster.intersectObjects(e.structuralMeshes, !0), l = ((g = a[0]) == null ? void 0 : g.distance) ?? 1 / 0;
1854
1895
  if ((((N = c[0]) == null ? void 0 : N.distance) ?? 1 / 0) < l && c.length > 0) {
1855
1896
  const y = c[0].object;
1856
1897
  e.drillholeClickHandler && e.drillholeClickHandler({ type: "structure", ...y.userData });
@@ -1858,13 +1899,13 @@ function Un(e) {
1858
1899
  }
1859
1900
  if (a.length === 0) return;
1860
1901
  let u = a[0].object;
1861
- for (; u && u.parent && !((k = u.userData) != null && k.holeId); )
1902
+ for (; u && u.parent && !((O = u.userData) != null && O.holeId); )
1862
1903
  u = u.parent;
1863
- const g = (b = u == null ? void 0 : u.userData) == null ? void 0 : b.holeId, m = (L = u == null ? void 0 : u.userData) == null ? void 0 : L.project;
1864
- g && e.drillholeClickHandler && e.drillholeClickHandler({ holeId: g, project: m });
1904
+ const p = (b = u == null ? void 0 : u.userData) == null ? void 0 : b.holeId, m = (L = u == null ? void 0 : u.userData) == null ? void 0 : L.project;
1905
+ p && e.drillholeClickHandler && e.drillholeClickHandler({ holeId: p, project: m });
1865
1906
  }, t.domElement.addEventListener("click", e.handleCanvasClick));
1866
1907
  }
1867
- class Nr {
1908
+ class Gr {
1868
1909
  constructor() {
1869
1910
  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.stripLogGroups = [], this.frameId = null, this.clock = new f.Clock(), this.handleCanvasClick = null, this.raycaster = new f.Raycaster(), this.pointer = new f.Vector2(), this.drillholeClickHandler = null, this.blockClickHandler = null, this.controlMode = "orbit", this._tmpDir = new f.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();
1870
1911
  }
@@ -1878,21 +1919,21 @@ class Nr {
1878
1919
  const i = new f.DirectionalLight(16777215, 1.5);
1879
1920
  i.position.set(10, 10, 5), this.scene.add(i);
1880
1921
  const a = new f.AxesHelper(20);
1881
- this.scene.add(a), this.controls = new rt(this.camera, this.renderer.domElement), this.controls.enableDamping = !1, this.controls.screenSpacePanning = !0, this.controls.enableZoom = !0, this.controls.zoomSpeed = 10, this.controls.minDistance = 1e-4, this.controls.maxDistance = 5e6, this.controls.mouseButtons = {
1922
+ this.scene.add(a), this.controls = new it(this.camera, this.renderer.domElement), this.controls.enableDamping = !1, this.controls.screenSpacePanning = !0, this.controls.enableZoom = !0, this.controls.zoomSpeed = 10, this.controls.minDistance = 1e-4, this.controls.maxDistance = 5e6, this.controls.mouseButtons = {
1882
1923
  LEFT: f.MOUSE.PAN,
1883
1924
  MIDDLE: f.MOUSE.DOLLY,
1884
1925
  RIGHT: f.MOUSE.ROTATE
1885
1926
  }, this.controls.touches = {
1886
1927
  ONE: f.TOUCH.ROTATE,
1887
1928
  TWO: f.TOUCH.DOLLY_PAN
1888
- }, this.controls.maxPolarAngle = Math.PI, this.flyControls = new ot(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 it(this.camera, this.renderer, {
1929
+ }, this.controls.maxPolarAngle = Math.PI, this.flyControls = new st(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 at(this.camera, this.renderer, {
1889
1930
  container: this.container,
1890
1931
  placement: "top-right",
1891
1932
  size: 110,
1892
1933
  offset: { top: 12, right: 12 },
1893
1934
  animated: !0,
1894
1935
  speed: 1.5
1895
- }), this.gizmo.attachControls(this.controls), Un(this), this._wheelRelay = (l) => {
1936
+ }), this.gizmo.attachControls(this.controls), er(this), this._wheelRelay = (l) => {
1896
1937
  l.target !== this.renderer.domElement && (l.preventDefault(), this.renderer.domElement.dispatchEvent(new WheelEvent("wheel", {
1897
1938
  clientX: l.clientX,
1898
1939
  clientY: l.clientY,
@@ -1905,7 +1946,7 @@ class Nr {
1905
1946
  altKey: l.altKey,
1906
1947
  bubbles: !1
1907
1948
  })));
1908
- }, this.container.addEventListener("wheel", this._wheelRelay, { passive: !1 }), Rn(this);
1949
+ }, this.container.addEventListener("wheel", this._wheelRelay, { passive: !1 }), qn(this);
1909
1950
  const c = () => {
1910
1951
  var s;
1911
1952
  this.frameId = requestAnimationFrame(c);
@@ -1917,16 +1958,16 @@ class Nr {
1917
1958
  resize() {
1918
1959
  if (!this.container || !this.camera || !this.renderer) return;
1919
1960
  const t = this.container.clientWidth, n = this.container.clientHeight;
1920
- this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(), Vn(this, t, n);
1961
+ this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(), Zn(this, t, n);
1921
1962
  }
1922
1963
  dispose() {
1923
- this.frameId && cancelAnimationFrame(this.frameId), this.renderer && this.handleCanvasClick && this.renderer.domElement.removeEventListener("click", this.handleCanvasClick), this.gizmo && (this.gizmo.dispose(), this.gizmo = null), this.viewChangeHandler = null, Ge(this), He(this), le(this), Pe(this), on(this), Ee(this), this.container && this._wheelRelay && this.container.removeEventListener("wheel", this._wheelRelay), this.controls && this.controls.dispose(), this.flyControls && this.flyControls.dispose(), this.renderer && (this.renderer.dispose(), this.container && this.renderer.domElement && this.container.removeChild(this.renderer.domElement));
1964
+ this.frameId && cancelAnimationFrame(this.frameId), this.renderer && this.handleCanvasClick && this.renderer.domElement.removeEventListener("click", this.handleCanvasClick), this.gizmo && (this.gizmo.dispose(), this.gizmo = null), this.viewChangeHandler = null, Ue(this), je(this), ce(this), Ve(this), hn(this), Se(this), this.container && this._wheelRelay && this.container.removeEventListener("wheel", this._wheelRelay), this.controls && this.controls.dispose(), this.flyControls && this.flyControls.dispose(), this.renderer && (this.renderer.dispose(), this.container && this.renderer.domElement && this.container.removeChild(this.renderer.domElement));
1924
1965
  }
1925
1966
  // ---------------------------------------------------------------------------
1926
1967
  // Data renderers — delegate to domain modules
1927
1968
  // ---------------------------------------------------------------------------
1928
1969
  setDrillholes(t, n = {}) {
1929
- Dn(this, t, n);
1970
+ Tn(this, t, n);
1930
1971
  }
1931
1972
  /**
1932
1973
  * Add floating 2D strip log panels beside drillholes in the 3D scene.
@@ -1941,13 +1982,13 @@ class Nr {
1941
1982
  * - `options` {object} — optional: panelWidth, lateralOffset, color, valueMin, valueMax
1942
1983
  */
1943
1984
  setStripLogs(t, n) {
1944
- Cn(this, t, n);
1985
+ Un(this, t, n);
1945
1986
  }
1946
1987
  /**
1947
1988
  * Remove all strip log panels from the scene and free GPU resources.
1948
1989
  */
1949
1990
  clearStripLogs() {
1950
- le(this);
1991
+ ce(this);
1951
1992
  }
1952
1993
  /**
1953
1994
  * Render block model data as a single merged mesh of exterior faces only.
@@ -1957,20 +1998,20 @@ class Nr {
1957
1998
  * @param {Object} [options]
1958
1999
  */
1959
2000
  setBlocks(t, n, r, o = {}) {
1960
- Gn(this, t, n, r, o);
2001
+ Kn(this, t, n, r, o);
1961
2002
  }
1962
2003
  /**
1963
2004
  * Update the opacity of all currently rendered blocks.
1964
2005
  * @param {number} opacity - New opacity value between 0 and 1
1965
2006
  */
1966
2007
  setBlockOpacity(t) {
1967
- jn(this, t);
2008
+ Jn(this, t);
1968
2009
  }
1969
2010
  setStructuralDiscs(t, n, r = {}) {
1970
- Xt(this, t, n, r);
2011
+ nn(this, t, n, r);
1971
2012
  }
1972
2013
  setStructuralDiscsVisible(t) {
1973
- qt(this, t);
2014
+ rn(this, t);
1974
2015
  }
1975
2016
  // ---------------------------------------------------------------------------
1976
2017
  // Click handlers
@@ -1992,41 +2033,41 @@ class Nr {
1992
2033
  this.viewChangeHandler = typeof t == "function" ? t : null;
1993
2034
  }
1994
2035
  getViewState() {
1995
- return Re(this);
2036
+ return He(this);
1996
2037
  }
1997
2038
  setViewState(t) {
1998
- return sn(this, t);
2039
+ return bn(this, t);
1999
2040
  }
2000
2041
  _buildViewSignature(t) {
2001
- return fe(t);
2042
+ return Me(t);
2002
2043
  }
2003
2044
  _emitViewChangeIfNeeded() {
2004
- an(this);
2045
+ pn(this);
2005
2046
  }
2006
2047
  _fitCameraToBounds({ minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
2007
- he(this, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a });
2048
+ Ee(this, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a });
2008
2049
  }
2009
2050
  recenterCameraToOrigin(t = 1e3) {
2010
- ln(this, t);
2051
+ gn(this, t);
2011
2052
  }
2012
2053
  lookDown(t = 2e3) {
2013
- cn(this, t);
2054
+ yn(this, t);
2014
2055
  }
2015
2056
  pan(t = 0, n = 0) {
2016
- un(this, t, n);
2057
+ _n(this, t, n);
2017
2058
  }
2018
2059
  dolly(t = 1.1) {
2019
- mn(this, t);
2060
+ Mn(this, t);
2020
2061
  }
2021
2062
  focusOnLastBounds(t = 1.2) {
2022
- dn(this, t);
2063
+ En(this, t);
2023
2064
  }
2024
2065
  /**
2025
2066
  * Change the camera field-of-view while keeping the visible scene the same apparent size.
2026
2067
  * @param {number} fovDeg - Desired FOV in degrees
2027
2068
  */
2028
2069
  setCameraFov(t) {
2029
- bn(this, t);
2070
+ On(this, t);
2030
2071
  }
2031
2072
  /**
2032
2073
  * Set the scene background colour.
@@ -2036,13 +2077,13 @@ class Nr {
2036
2077
  this.scene && (this.scene.background = new f.Color(t === "black" ? 0 : 16777215));
2037
2078
  }
2038
2079
  setControlMode(t = "orbit") {
2039
- gn(this, t);
2080
+ kn(this, t);
2040
2081
  }
2041
2082
  // ---------------------------------------------------------------------------
2042
2083
  // Selection glow public API
2043
2084
  // ---------------------------------------------------------------------------
2044
2085
  _syncSelectables() {
2045
- G(this);
2086
+ j(this);
2046
2087
  }
2047
2088
  /**
2048
2089
  * Register the objects that are candidates for click-select glow.
@@ -2056,7 +2097,7 @@ class Nr {
2056
2097
  * @param {THREE.Object3D|null} object
2057
2098
  */
2058
2099
  selectObject(t) {
2059
- q(this, t || null);
2100
+ Z(this, t || null);
2060
2101
  }
2061
2102
  /**
2062
2103
  * Return the currently selected object, or null if nothing is selected.
@@ -2069,11 +2110,11 @@ class Nr {
2069
2110
  * Dispose the effect composer and all GPU resources used by the selection glow.
2070
2111
  */
2071
2112
  disposeGlow() {
2072
- Ee(this);
2113
+ Se(this);
2073
2114
  }
2074
2115
  /** @private */
2075
2116
  _updateSelectionFromPointer() {
2076
- je(this);
2117
+ Ye(this);
2077
2118
  }
2078
2119
  // ---------------------------------------------------------------------------
2079
2120
  // Raster overlay API — delegate to rasterOverlayScene
@@ -2083,14 +2124,14 @@ class Nr {
2083
2124
  * @param {object} layer - Layer descriptor returned by createRasterOverlay()
2084
2125
  */
2085
2126
  addRasterOverlay(t) {
2086
- Jt(this, t);
2127
+ ln(this, t);
2087
2128
  }
2088
2129
  /**
2089
2130
  * Remove a raster overlay from the scene and dispose its GPU resources.
2090
2131
  * @param {string} id - Overlay id
2091
2132
  */
2092
2133
  removeRasterOverlay(t) {
2093
- de(this, t);
2134
+ _e(this, t);
2094
2135
  }
2095
2136
  /**
2096
2137
  * Set the opacity of a raster overlay at runtime.
@@ -2098,7 +2139,7 @@ class Nr {
2098
2139
  * @param {number} opacity - New opacity [0, 1]
2099
2140
  */
2100
2141
  setRasterOverlayOpacity(t, n) {
2101
- Qt(this, t, n);
2142
+ cn(this, t, n);
2102
2143
  }
2103
2144
  /**
2104
2145
  * Show or hide a raster overlay.
@@ -2106,7 +2147,7 @@ class Nr {
2106
2147
  * @param {boolean} visible
2107
2148
  */
2108
2149
  setRasterOverlayVisibility(t, n) {
2109
- en(this, t, n);
2150
+ un(this, t, n);
2110
2151
  }
2111
2152
  /**
2112
2153
  * Update the elevation (Z position) of a raster overlay.
@@ -2114,7 +2155,7 @@ class Nr {
2114
2155
  * @param {number} elevation
2115
2156
  */
2116
2157
  setRasterOverlayElevation(t, n) {
2117
- tn(this, t, n);
2158
+ mn(this, t, n);
2118
2159
  }
2119
2160
  /**
2120
2161
  * Return a raster overlay by id, or undefined if not found.
@@ -2122,131 +2163,151 @@ class Nr {
2122
2163
  * @returns {object|undefined}
2123
2164
  */
2124
2165
  getRasterOverlay(t) {
2125
- return nn(this, t);
2166
+ return dn(this, t);
2126
2167
  }
2127
2168
  /**
2128
2169
  * Return all raster overlay layers in insertion order.
2129
2170
  * @returns {object[]}
2130
2171
  */
2131
2172
  listRasterOverlays() {
2132
- return rn(this);
2173
+ return fn(this);
2133
2174
  }
2134
2175
  }
2135
2176
  export {
2136
- hn as $,
2137
- Z as A,
2138
- nr as B,
2139
- M as C,
2140
- ue as D,
2141
- De as E,
2142
- te as F,
2143
- ve as G,
2177
+ be as $,
2178
+ W as A,
2179
+ Er as B,
2180
+ zr as C,
2181
+ ge as D,
2182
+ fe as E,
2183
+ ne as F,
2184
+ Ie as G,
2144
2185
  H,
2145
- br as I,
2146
- hr as J,
2147
- Ot as K,
2148
- Ne as L,
2149
- ce as M,
2150
- Ae as N,
2151
- ne as O,
2152
- Le as P,
2153
- Nr as Q,
2154
- be as R,
2155
- bt as S,
2156
- J as T,
2157
- ee as U,
2158
- we as V,
2159
- mt as W,
2160
- Q as X,
2161
- It as Y,
2162
- Dt as Z,
2163
- dt as _,
2164
- ke as a,
2165
- fn as a0,
2166
- ge as a1,
2167
- At as a2,
2168
- St as a3,
2169
- vt as a4,
2170
- ut as a5,
2171
- xn as a6,
2172
- wn as a7,
2173
- An as a8,
2174
- Jt as a9,
2175
- Er as aA,
2176
- nn as aB,
2177
- Re as aC,
2178
- Et as aD,
2179
- rn as aE,
2180
- mr as aF,
2181
- ar as aG,
2182
- sr as aH,
2183
- cn as aI,
2184
- yt as aJ,
2185
- Wt as aK,
2186
- Sn as aL,
2187
- un as aM,
2188
- ur as aN,
2189
- ln as aO,
2190
- de as aP,
2191
- xt as aQ,
2192
- gn as aR,
2193
- bn as aS,
2194
- tn as aT,
2195
- Qt as aU,
2196
- en as aV,
2197
- Cn as aW,
2198
- sn as aX,
2199
- ft as aY,
2200
- Nt as aa,
2201
- Mr as ab,
2202
- Vt as ac,
2203
- In as ad,
2204
- vn as ae,
2205
- $t as af,
2206
- fe as ag,
2207
- fr as ah,
2208
- _t as ai,
2209
- on as aj,
2210
- le as ak,
2211
- kt as al,
2212
- zr as am,
2213
- cr as an,
2214
- Ut as ao,
2215
- mn as ap,
2216
- an as aq,
2217
- Mt as ar,
2218
- he as as,
2219
- dn as at,
2220
- dr as au,
2221
- _n as av,
2222
- zt as aw,
2223
- wt as ax,
2224
- Te as ay,
2225
- Gt as az,
2226
- W as b,
2227
- lr as c,
2228
- Oe as d,
2229
- Fe as e,
2230
- ir as f,
2231
- me as g,
2232
- ae as h,
2233
- se as i,
2234
- K as j,
2235
- gt as k,
2236
- Pt as l,
2237
- ht as m,
2238
- yr as n,
2239
- _r as o,
2240
- Rt as p,
2241
- Lt as q,
2242
- _ as r,
2243
- pr as s,
2244
- gr as t,
2245
- tr as u,
2246
- Qn as v,
2247
- ie as w,
2248
- er as x,
2249
- or as y,
2250
- rr as z
2186
+ Or as I,
2187
+ M as J,
2188
+ Ir as K,
2189
+ ue as L,
2190
+ pe as M,
2191
+ he as N,
2192
+ vr as O,
2193
+ xe as P,
2194
+ vt as Q,
2195
+ ve as R,
2196
+ re as S,
2197
+ Q as T,
2198
+ Gr as U,
2199
+ ze as V,
2200
+ dt as W,
2201
+ yt as X,
2202
+ Nt as Y,
2203
+ te as Z,
2204
+ Mt as _,
2205
+ me as a,
2206
+ kr as a$,
2207
+ lr as a0,
2208
+ we as a1,
2209
+ br as a2,
2210
+ ht as a3,
2211
+ fr as a4,
2212
+ dr as a5,
2213
+ _t as a6,
2214
+ ee as a7,
2215
+ Gt as a8,
2216
+ G as a9,
2217
+ Me as aA,
2218
+ Fr as aB,
2219
+ At as aC,
2220
+ hn as aD,
2221
+ ce as aE,
2222
+ Ft as aF,
2223
+ Vr as aG,
2224
+ Dr as aH,
2225
+ en as aI,
2226
+ Mn as aJ,
2227
+ pn as aK,
2228
+ Dt as aL,
2229
+ Ee as aM,
2230
+ En as aN,
2231
+ xr as aO,
2232
+ Dn as aP,
2233
+ St as aQ,
2234
+ Pt as aR,
2235
+ Re as aS,
2236
+ Kt as aT,
2237
+ Hr as aU,
2238
+ dn as aV,
2239
+ He as aW,
2240
+ wt as aX,
2241
+ fn as aY,
2242
+ wr as aZ,
2243
+ Lr as a_,
2244
+ Ct as aa,
2245
+ Nn as ab,
2246
+ zn as ac,
2247
+ gr as ad,
2248
+ Ne as ae,
2249
+ cr as af,
2250
+ Tt as ag,
2251
+ ur as ah,
2252
+ Rt as ai,
2253
+ Vt as aj,
2254
+ bt as ak,
2255
+ pt as al,
2256
+ gt as am,
2257
+ Rn as an,
2258
+ Bn as ao,
2259
+ Pn as ap,
2260
+ mr as aq,
2261
+ ft as ar,
2262
+ hr as as,
2263
+ ln as at,
2264
+ xt as au,
2265
+ Rr as av,
2266
+ Zt as aw,
2267
+ jn as ax,
2268
+ Hn as ay,
2269
+ tn as az,
2270
+ K as b,
2271
+ yn as b0,
2272
+ Lt as b1,
2273
+ sn as b2,
2274
+ Vn as b3,
2275
+ _n as b4,
2276
+ Sr as b5,
2277
+ gn as b6,
2278
+ _e as b7,
2279
+ Bt as b8,
2280
+ kn as b9,
2281
+ On as ba,
2282
+ mn as bb,
2283
+ cn as bc,
2284
+ un as bd,
2285
+ Un as be,
2286
+ bn as bf,
2287
+ Et as bg,
2288
+ Ar as c,
2289
+ de as d,
2290
+ Ce as e,
2291
+ pr as f,
2292
+ ye as g,
2293
+ le as h,
2294
+ zt as i,
2295
+ ae as j,
2296
+ J as k,
2297
+ Ot as l,
2298
+ Xt as m,
2299
+ Pr as n,
2300
+ Br as o,
2301
+ Fe as p,
2302
+ qt as q,
2303
+ It as r,
2304
+ _ as s,
2305
+ Tr as t,
2306
+ Cr as u,
2307
+ Mr as v,
2308
+ se as w,
2309
+ yr as x,
2310
+ _r as y,
2311
+ Nr as z
2251
2312
  };
2252
- //# sourceMappingURL=baselode3dScene-DbELmWnr.js.map
2313
+ //# sourceMappingURL=baselode3dScene-CLEvddGM.js.map