precision-dashwidgets 0.3.4 → 0.3.5

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,4 +1,4 @@
1
- import { defineComponent as _e, createElementBlock as O, openBlock as B, createElementVNode as N, ref as T, computed as j, watch as Q, onMounted as Ve, onBeforeUnmount as Tt, withDirectives as Re, vModelText as ln, Fragment as re, renderList as ve, toDisplayString as G, vModelSelect as _t, createCommentVNode as Ee, createBlock as sn, createVNode as oe, vShow as Vn, normalizeStyle as Wn, onUnmounted as jn, resolveComponent as bt, normalizeClass as Hn, withCtx as Pe, createTextVNode as At, inject as Xn, unref as we, watchEffect as Gn, renderSlot as Nt } from "vue";
1
+ import { defineComponent as _e, createElementBlock as O, openBlock as B, createElementVNode as N, ref as T, computed as j, watch as Q, onMounted as Ve, onBeforeUnmount as Tt, withDirectives as Re, vModelText as un, Fragment as re, renderList as de, toDisplayString as G, vModelSelect as _t, createCommentVNode as Ee, createBlock as sn, createVNode as oe, vShow as Vn, normalizeStyle as Wn, onUnmounted as jn, resolveComponent as bt, normalizeClass as Hn, withCtx as Pe, createTextVNode as At, inject as Xn, unref as we, watchEffect as Gn, renderSlot as Nt } from "vue";
2
2
  import { ElTooltip as Qn } from "element-plus";
3
3
  import { defineStore as Kn } from "pinia";
4
4
  /*! Element Plus Icons Vue v2.3.2 */
@@ -49,24 +49,24 @@ function er(e) {
49
49
  case 0:
50
50
  return t;
51
51
  case 1:
52
- return W(n) ? t : Me(function(i, u) {
53
- return e(n, i, u);
52
+ return W(n) ? t : Me(function(i, l) {
53
+ return e(n, i, l);
54
54
  });
55
55
  case 2:
56
- return W(n) && W(r) ? t : W(n) ? Me(function(i, u) {
57
- return e(i, r, u);
58
- }) : W(r) ? Me(function(i, u) {
59
- return e(n, i, u);
56
+ return W(n) && W(r) ? t : W(n) ? Me(function(i, l) {
57
+ return e(i, r, l);
58
+ }) : W(r) ? Me(function(i, l) {
59
+ return e(n, i, l);
60
60
  }) : Ce(function(i) {
61
61
  return e(n, r, i);
62
62
  });
63
63
  default:
64
- return W(n) && W(r) && W(a) ? t : W(n) && W(r) ? Me(function(i, u) {
65
- return e(i, u, a);
66
- }) : W(n) && W(a) ? Me(function(i, u) {
67
- return e(i, r, u);
68
- }) : W(r) && W(a) ? Me(function(i, u) {
69
- return e(n, i, u);
64
+ return W(n) && W(r) && W(a) ? t : W(n) && W(r) ? Me(function(i, l) {
65
+ return e(i, l, a);
66
+ }) : W(n) && W(a) ? Me(function(i, l) {
67
+ return e(i, r, l);
68
+ }) : W(r) && W(a) ? Me(function(i, l) {
69
+ return e(n, i, l);
70
70
  }) : W(n) ? Ce(function(i) {
71
71
  return e(i, r, a);
72
72
  }) : W(r) ? Ce(function(i) {
@@ -99,10 +99,10 @@ function ar(e, t) {
99
99
  var or = /* @__PURE__ */ er(function(e, t, n) {
100
100
  return rr(e, ar(t, n));
101
101
  });
102
- const Lt = Kn("duckdb", () => {
103
- const e = T(null), t = T(!1), n = T(!1), r = T(""), a = T(/* @__PURE__ */ new Map()), i = T(/* @__PURE__ */ new Map()), u = T(/* @__PURE__ */ new Map());
104
- let l = null;
105
- const f = j(() => t.value && !r.value), c = j(() => (_) => a.value.get(_)), d = j(() => (_) => {
102
+ const It = Kn("duckdb", () => {
103
+ const e = T(null), t = T(!1), n = T(!1), r = T(""), a = T(/* @__PURE__ */ new Map()), i = T(/* @__PURE__ */ new Map()), l = T(/* @__PURE__ */ new Map());
104
+ let u = null;
105
+ const f = j(() => t.value && !r.value), c = j(() => (_) => a.value.get(_)), p = j(() => (_) => {
106
106
  const M = a.value.get(_);
107
107
  return M && !M.isLoading && !M.error;
108
108
  }), y = j(() => i.value.size), w = j(() => i.value.size > 0), A = async () => {
@@ -110,7 +110,7 @@ const Lt = Kn("duckdb", () => {
110
110
  const _ = "DuckDB can only be initialized in the browser.";
111
111
  throw r.value = _, new Error(_);
112
112
  }
113
- return e.value ? e.value : l ? (await l, e.value) : (n.value = !0, r.value = "", l = (async () => {
113
+ return e.value ? e.value : u ? (await u, e.value) : (n.value = !0, r.value = "", u = (async () => {
114
114
  try {
115
115
  const _ = await import("./duckdb-browser-CI2dpY-v-CoCsU0kJ.mjs"), M = {
116
116
  mvp: {
@@ -121,14 +121,14 @@ const Lt = Kn("duckdb", () => {
121
121
  mainModule: "/static/duckdb/duckdb-eh.wasm",
122
122
  mainWorker: "/static/duckdb/duckdb-browser-eh.worker.js"
123
123
  }
124
- }, s = await _.selectBundle(M), p = new Worker(s.mainWorker), o = new _.ConsoleLogger(_.LogLevel.WARNING);
125
- return e.value = new _.AsyncDuckDB(o, p), await e.value.instantiate(s.mainModule), t.value = !0, e.value;
124
+ }, s = await _.selectBundle(M), v = new Worker(s.mainWorker), o = new _.ConsoleLogger(_.LogLevel.WARNING);
125
+ return e.value = new _.AsyncDuckDB(o, v), await e.value.instantiate(s.mainModule), t.value = !0, e.value;
126
126
  } catch (_) {
127
127
  throw r.value = `Failed to initialize DuckDB: ${(_ == null ? void 0 : _.message) || _}`, e.value = null, _;
128
128
  } finally {
129
- n.value = !1, l = null;
129
+ n.value = !1, u = null;
130
130
  }
131
- })(), await l, e.value);
131
+ })(), await u, e.value);
132
132
  }, C = async (_) => {
133
133
  e.value || await A();
134
134
  const M = await e.value.connect(), s = _ || `conn_${Date.now()}_${Math.random().toString(36).slice(2, 11)}`;
@@ -141,10 +141,10 @@ const Lt = Kn("duckdb", () => {
141
141
  const M = i.value.get(_);
142
142
  M && (await M.connection.close(), i.value.delete(_), $(_), i.value.size === 0 && console.log("No active connections remaining. Keeping DuckDB instance for potential reuse."));
143
143
  }, $ = (_) => {
144
- for (const [M, s] of u.value)
144
+ for (const [M, s] of l.value)
145
145
  s.delete(_), s.size === 0 && console.log(`File ${M} is no longer used by any viewers`);
146
146
  }, k = (_, M) => {
147
- u.value.has(_) || u.value.set(_, /* @__PURE__ */ new Set()), u.value.get(_).add(M);
147
+ l.value.has(_) || l.value.set(_, /* @__PURE__ */ new Set()), l.value.get(_).add(M);
148
148
  }, F = async (_) => {
149
149
  const M = a.value.get(_);
150
150
  if (M && M.tableName)
@@ -154,9 +154,9 @@ const Lt = Kn("duckdb", () => {
154
154
  } catch (s) {
155
155
  console.warn(`Failed to drop table ${M.tableName}:`, s);
156
156
  }
157
- a.value.delete(_), u.value.delete(_);
158
- }, D = async (_, M, s = "my_data", p = {}, o = null, v = null) => {
159
- const g = v || _, h = a.value.get(g);
157
+ a.value.delete(_), l.value.delete(_);
158
+ }, D = async (_, M, s = "my_data", v = {}, o = null, d = null) => {
159
+ const g = d || _, h = a.value.get(g);
160
160
  if (h && !h.isLoading && !h.error)
161
161
  return o && k(g, o), h.tableName;
162
162
  f.value || await A(), a.value.set(g, {
@@ -173,26 +173,26 @@ const Lt = Kn("duckdb", () => {
173
173
  throw new Error(`Failed to fetch file: ${m.status} ${m.statusText}`);
174
174
  let x;
175
175
  if (M === "csv") {
176
- const b = await m.text(), L = await new Blob([b], { type: "text/csv" }).arrayBuffer();
177
- x = new Uint8Array(L);
176
+ const b = await m.text(), I = await new Blob([b], { type: "text/csv" }).arrayBuffer();
177
+ x = new Uint8Array(I);
178
178
  } else {
179
179
  const b = await m.arrayBuffer();
180
180
  x = new Uint8Array(b);
181
181
  }
182
- const R = `${v || s}.${M}`;
182
+ const R = `${d || s}.${M}`;
183
183
  await e.value.registerFileBuffer(R, x);
184
184
  const E = await e.value.connect();
185
185
  try {
186
186
  let b;
187
187
  if (M === "csv") {
188
- const I = {
188
+ const L = {
189
189
  header: !0,
190
190
  delimiter: ",",
191
- ...p
191
+ ...v
192
192
  };
193
193
  b = `
194
194
  CREATE OR REPLACE TABLE ${s} AS
195
- SELECT * FROM read_csv('${R}', header=${I.header}, delim='${I.delimiter}');
195
+ SELECT * FROM read_csv('${R}', header=${L.header}, delim='${L.delimiter}');
196
196
  `;
197
197
  } else if (M === "parquet")
198
198
  b = `
@@ -202,7 +202,7 @@ const Lt = Kn("duckdb", () => {
202
202
  else
203
203
  throw new Error(`Unsupported file type: ${M}`);
204
204
  await E.query(b);
205
- const L = (await E.query(`SELECT COUNT(*) as count FROM ${s};`)).toArray()[0].count;
205
+ const I = (await E.query(`SELECT COUNT(*) as count FROM ${s};`)).toArray()[0].count;
206
206
  return a.value.set(g, {
207
207
  tableName: s,
208
208
  fileType: M,
@@ -210,7 +210,7 @@ const Lt = Kn("duckdb", () => {
210
210
  // Store current URL for reference
211
211
  isLoading: !1,
212
212
  error: null,
213
- rowCount: L,
213
+ rowCount: I,
214
214
  loadedAt: /* @__PURE__ */ new Date()
215
215
  }), o && k(g, o), s;
216
216
  } finally {
@@ -229,10 +229,10 @@ const Lt = Kn("duckdb", () => {
229
229
  const s = i.value.get(M);
230
230
  if (!s)
231
231
  throw new Error(`Connection not found: ${M}`);
232
- return (await s.connection.query(_)).toArray().map((p) => {
232
+ return (await s.connection.query(_)).toArray().map((v) => {
233
233
  const o = {};
234
- for (const [v, g] of Object.entries(p))
235
- o[v] = g;
234
+ for (const [d, g] of Object.entries(v))
235
+ o[d] = g;
236
236
  return o;
237
237
  });
238
238
  }, q = async () => {
@@ -250,7 +250,7 @@ const Lt = Kn("duckdb", () => {
250
250
  }
251
251
  e.value = null;
252
252
  }
253
- t.value = !1, a.value.clear(), u.value.clear(), r.value = "";
253
+ t.value = !1, a.value.clear(), l.value.clear(), r.value = "";
254
254
  }, H = async (_ = !1) => {
255
255
  _ || i.value.size === 0 ? await q() : console.log(`Skipping global cleanup. ${i.value.size} active connections remaining.`);
256
256
  }, V = () => {
@@ -264,15 +264,15 @@ const Lt = Kn("duckdb", () => {
264
264
  return _;
265
265
  }, K = () => {
266
266
  const _ = [];
267
- for (const [M, s] of u.value) {
268
- const p = a.value.get(M);
267
+ for (const [M, s] of l.value) {
268
+ const v = a.value.get(M);
269
269
  _.push({
270
270
  fileId: M,
271
- tableName: p == null ? void 0 : p.tableName,
272
- fileType: p == null ? void 0 : p.fileType,
273
- fileUrl: p == null ? void 0 : p.fileUrl,
274
- rowCount: p == null ? void 0 : p.rowCount,
275
- loadedAt: p == null ? void 0 : p.loadedAt,
271
+ tableName: v == null ? void 0 : v.tableName,
272
+ fileType: v == null ? void 0 : v.fileType,
273
+ fileUrl: v == null ? void 0 : v.fileUrl,
274
+ rowCount: v == null ? void 0 : v.rowCount,
275
+ loadedAt: v == null ? void 0 : v.loadedAt,
276
276
  usedByViewers: Array.from(s)
277
277
  });
278
278
  }
@@ -289,13 +289,13 @@ const Lt = Kn("duckdb", () => {
289
289
  initError: r,
290
290
  loadedFiles: a,
291
291
  connections: i,
292
- fileUsage: u,
292
+ fileUsage: l,
293
293
  sharedResultName: X,
294
294
  sharedVersion: P,
295
295
  // Getters
296
296
  isReady: f,
297
297
  getLoadedFile: c,
298
- isFileLoaded: d,
298
+ isFileLoaded: p,
299
299
  activeConnectionCount: y,
300
300
  hasActiveConnections: w,
301
301
  // Actions
@@ -312,31 +312,31 @@ const Lt = Kn("duckdb", () => {
312
312
  getConnectionInfo: V,
313
313
  getFileUsageInfo: K,
314
314
  publishViewFromQuery: async (_, M, s) => {
315
- var p;
316
- const o = (p = i.value.get(s)) == null ? void 0 : p.connection;
315
+ var v;
316
+ const o = (v = i.value.get(s)) == null ? void 0 : v.connection;
317
317
  if (!o) throw new Error(`Connection not found: ${s}`);
318
318
  await o.query(`CREATE OR REPLACE VIEW ${ne(_)} AS ${M}`), X.value = _, P.value++;
319
319
  },
320
320
  publishTableFromQuery: async (_, M, s) => {
321
- var p;
322
- const o = (p = i.value.get(s)) == null ? void 0 : p.connection;
321
+ var v;
322
+ const o = (v = i.value.get(s)) == null ? void 0 : v.connection;
323
323
  if (!o) throw new Error(`Connection not found: ${s}`);
324
324
  await o.query(`CREATE OR REPLACE TABLE ${ne(_)} AS ${M}`), X.value = _, P.value++;
325
325
  },
326
326
  formatIdFromUrl: (_) => "url_" + btoa(_).replace(/=+$/, "").replace(/[+/]/g, "_")
327
327
  };
328
- }), Ie = (e, t) => {
328
+ }), Le = (e, t) => {
329
329
  const n = e.__vccOpts || e;
330
330
  for (const [r, a] of t)
331
331
  n[r] = a;
332
332
  return n;
333
- }, ir = { class: "dashboard-container" }, ur = { class: "dashboard-header" }, lr = { class: "dashboard-content" }, sr = {
333
+ }, ir = { class: "dashboard-container" }, lr = { class: "dashboard-header" }, ur = { class: "dashboard-content" }, sr = {
334
334
  key: 0,
335
335
  class: "query-panel"
336
336
  }, cr = { class: "query-examples" }, fr = ["onClick"], hr = {
337
337
  key: 1,
338
338
  class: "results-panel"
339
- }, dr = { class: "results-controls" }, pr = { class: "left-controls" }, vr = { class: "right-controls" }, mr = {
339
+ }, pr = { class: "results-controls" }, vr = { class: "left-controls" }, dr = { class: "right-controls" }, mr = {
340
340
  key: 0,
341
341
  class: "table-container"
342
342
  }, gr = { class: "results-table" }, yr = {
@@ -372,11 +372,11 @@ const Lt = Kn("duckdb", () => {
372
372
  },
373
373
  emits: ["query-results"],
374
374
  setup(e, { emit: t }) {
375
- const n = e, r = t, a = Lt(), i = T({
375
+ const n = e, r = t, a = It(), i = T({
376
376
  header: !0,
377
377
  dynamicTyping: !0,
378
378
  delimiter: ","
379
- }), u = T(!1), l = T(!1), f = T(n.url), c = T("my_data"), d = T(""), y = T(null), w = T(""), A = T("table"), C = T(1), S = T(50), $ = T(null);
379
+ }), l = T(!1), u = T(!1), f = T(n.url), c = T("my_data"), p = T(""), y = T(null), w = T(""), A = T("table"), C = T(1), S = T(50), $ = T(null);
380
380
  Q(
381
381
  () => n.url,
382
382
  async (h) => {
@@ -389,7 +389,7 @@ const Lt = Kn("duckdb", () => {
389
389
  },
390
390
  { immediate: !0 }
391
391
  );
392
- const k = j(() => a.isReady && $.value && !u.value), F = j(() => a.formatIdFromUrl(n.url)), D = j(() => u.value ? "Loading..." : a.isInitializing ? "Initializing..." : a.isReady ? k.value ? "Connected" : "Not Connected" : "Not Ready"), z = j(() => !y.value || !Array.isArray(y.value) || y.value.length === 0 ? [] : Object.keys(y.value[0] || {})), q = j(() => !y.value || !Array.isArray(y.value) ? 0 : Math.ceil(y.value.length / S.value)), H = j(() => {
392
+ const k = j(() => a.isReady && $.value && !l.value), F = j(() => a.formatIdFromUrl(n.url)), D = j(() => l.value ? "Loading..." : a.isInitializing ? "Initializing..." : a.isReady ? k.value ? "Connected" : "Not Connected" : "Not Ready"), z = j(() => !y.value || !Array.isArray(y.value) || y.value.length === 0 ? [] : Object.keys(y.value[0] || {})), q = j(() => !y.value || !Array.isArray(y.value) ? 0 : Math.ceil(y.value.length / S.value)), H = j(() => {
393
393
  if (!y.value || !Array.isArray(y.value)) return [];
394
394
  const h = (C.value - 1) * S.value, m = h + S.value;
395
395
  return y.value.slice(h, m);
@@ -435,7 +435,7 @@ const Lt = Kn("duckdb", () => {
435
435
  w.value = "Please provide a valid S3 URL";
436
436
  return;
437
437
  }
438
- u.value = !0, w.value = "";
438
+ l.value = !0, w.value = "";
439
439
  try {
440
440
  const h = n.fileId ? `file_${n.fileId}` : `data_${Date.now()}`, m = await a.loadFile(
441
441
  f.value,
@@ -447,16 +447,16 @@ const Lt = Kn("duckdb", () => {
447
447
  // Pass viewer ID for tracking
448
448
  F.value
449
449
  );
450
- c.value = m, p("SELECT * FROM data;");
450
+ c.value = m, v("SELECT * FROM data;");
451
451
  } catch {
452
452
  } finally {
453
- u.value = !1;
453
+ l.value = !1;
454
454
  }
455
455
  }, ne = (h) => !c.value || !h ? h : h.replace(/\bFROM\s+data\b/gi, `FROM ${c.value}`).replace(/\bJOIN\s+data\b/gi, `JOIN ${c.value}`).replace(/\bUPDATE\s+data\b/gi, `UPDATE ${c.value}`).replace(/\bINSERT\s+INTO\s+data\b/gi, `INSERT INTO ${c.value}`).replace(/\bINTO\s+data\b/gi, `INTO ${c.value}`).replace(/\btable_info\(\s*data\s*\)/gi, `table_info(${c.value})`).replace(/\bDESCRIBE\s+data\b/gi, `DESCRIBE ${c.value}`).replace(
456
456
  /\bPRAGMA\s+table_info\(\s*data\s*\)/gi,
457
457
  `PRAGMA table_info(${c.value})`
458
458
  ), _ = async () => {
459
- if (!d.value || !$.value) {
459
+ if (!p.value || !$.value) {
460
460
  w.value = "Please provide a valid SQL query";
461
461
  return;
462
462
  }
@@ -464,9 +464,9 @@ const Lt = Kn("duckdb", () => {
464
464
  w.value = "No data table loaded";
465
465
  return;
466
466
  }
467
- l.value = !0, w.value = "", C.value = 1;
467
+ u.value = !0, w.value = "", C.value = 1;
468
468
  try {
469
- const h = ne(d.value.trim());
469
+ const h = ne(p.value.trim());
470
470
  y.value = await a.executeQuery(
471
471
  h,
472
472
  $.value
@@ -477,21 +477,21 @@ const Lt = Kn("duckdb", () => {
477
477
  } catch (h) {
478
478
  console.error("Query execution failed:", h), w.value = `Query execution failed: ${h.message}`, y.value = null;
479
479
  } finally {
480
- l.value = !1;
480
+ u.value = !1;
481
481
  }
482
482
  }, M = (h) => {
483
483
  C.value = h;
484
484
  }, s = (h) => {
485
485
  S.value = h, C.value = 1;
486
- }, p = (h) => {
487
- d.value = h;
488
- }, o = (h) => h == null ? "NULL" : typeof h == "number" ? Number.isInteger(h) ? h.toString() : h.toFixed(4) : typeof h == "string" && h.length > 100 ? h.substring(0, 100) + "..." : h.toString(), v = () => {
486
+ }, v = (h) => {
487
+ p.value = h;
488
+ }, o = (h) => h == null ? "NULL" : typeof h == "number" ? Number.isInteger(h) ? h.toString() : h.toFixed(4) : typeof h == "string" && h.length > 100 ? h.substring(0, 100) + "..." : h.toString(), d = () => {
489
489
  if (!y.value || y.value.length === 0) return;
490
490
  const h = Object.keys(y.value[0]), m = [
491
491
  h.join(","),
492
492
  ...y.value.map(
493
- (b) => h.map((L) => {
494
- const I = b[L], U = I == null ? "" : I.toString();
493
+ (b) => h.map((I) => {
494
+ const L = b[I], U = L == null ? "" : L.toString();
495
495
  return U.includes(",") ? `"${U}"` : U;
496
496
  }).join(",")
497
497
  )
@@ -508,49 +508,49 @@ const Lt = Kn("duckdb", () => {
508
508
  }), (h, m) => {
509
509
  const x = bt("bf-button"), R = bt("el-pagination");
510
510
  return B(), O("div", ir, [
511
- N("header", ur, [
511
+ N("header", lr, [
512
512
  m[3] || (m[3] = N("h1", null, "Data Explorer", -1)),
513
513
  N("div", {
514
- class: Hn(["status-indicator", { connected: k.value, loading: u.value }])
514
+ class: Hn(["status-indicator", { connected: k.value, loading: l.value }])
515
515
  }, G(D.value), 3)
516
516
  ]),
517
- N("div", lr, [
517
+ N("div", ur, [
518
518
  k.value ? (B(), O("div", sr, [
519
519
  m[5] || (m[5] = N("h3", null, "SQL Query", -1)),
520
520
  N("div", cr, [
521
521
  m[4] || (m[4] = N("span", null, "Quick queries:", -1)),
522
- (B(!0), O(re, null, ve(V.value, (E) => (B(), O("button", {
522
+ (B(!0), O(re, null, de(V.value, (E) => (B(), O("button", {
523
523
  key: E.name,
524
- onClick: (b) => p(E.query),
524
+ onClick: (b) => v(E.query),
525
525
  class: "example-btn"
526
526
  }, G(E.name), 9, fr))), 128))
527
527
  ]),
528
528
  Re(N("textarea", {
529
- "onUpdate:modelValue": m[0] || (m[0] = (E) => d.value = E),
529
+ "onUpdate:modelValue": m[0] || (m[0] = (E) => p.value = E),
530
530
  placeholder: "SELECT * FROM data;",
531
531
  class: "query-textarea",
532
532
  rows: "4"
533
533
  }, null, 512), [
534
- [ln, d.value]
534
+ [un, p.value]
535
535
  ]),
536
536
  oe(x, {
537
537
  class: "execute-query-button",
538
538
  onClick: _,
539
- disabled: l.value || !d.value
539
+ disabled: u.value || !p.value
540
540
  }, {
541
541
  default: Pe(() => [
542
- At(G(l.value ? "Running..." : "Execute Query"), 1)
542
+ At(G(u.value ? "Running..." : "Execute Query"), 1)
543
543
  ]),
544
544
  _: 1
545
545
  }, 8, ["disabled"])
546
546
  ])) : Ee("", !0),
547
547
  y.value ? (B(), O("div", hr, [
548
548
  N("h3", null, "Results (" + G(y.value.length) + " rows)", 1),
549
- N("div", dr, [
550
- N("div", pr, [
549
+ N("div", pr, [
550
+ N("div", vr, [
551
551
  oe(x, {
552
552
  class: "secondary",
553
- onClick: v
553
+ onClick: d
554
554
  }, {
555
555
  default: Pe(() => [...m[6] || (m[6] = [
556
556
  At("Export to CSV", -1)
@@ -558,7 +558,7 @@ const Lt = Kn("duckdb", () => {
558
558
  _: 1
559
559
  })
560
560
  ]),
561
- N("div", vr, [
561
+ N("div", dr, [
562
562
  A.value === "table" && q.value > 1 ? (B(), sn(R, {
563
563
  key: 0,
564
564
  "current-page": C.value,
@@ -576,12 +576,12 @@ const Lt = Kn("duckdb", () => {
576
576
  N("table", gr, [
577
577
  N("thead", null, [
578
578
  N("tr", null, [
579
- (B(!0), O(re, null, ve(z.value, (E) => (B(), O("th", { key: E }, G(E), 1))), 128))
579
+ (B(!0), O(re, null, de(z.value, (E) => (B(), O("th", { key: E }, G(E), 1))), 128))
580
580
  ])
581
581
  ]),
582
582
  N("tbody", null, [
583
- (B(!0), O(re, null, ve(H.value, (E, b) => (B(), O("tr", { key: b }, [
584
- (B(!0), O(re, null, ve(z.value, (L) => (B(), O("td", { key: L }, G(o(E[L])), 1))), 128))
583
+ (B(!0), O(re, null, de(H.value, (E, b) => (B(), O("tr", { key: b }, [
584
+ (B(!0), O(re, null, de(z.value, (I) => (B(), O("td", { key: I }, G(o(E[I])), 1))), 128))
585
585
  ]))), 128))
586
586
  ])
587
587
  ]),
@@ -613,7 +613,7 @@ const Lt = Kn("duckdb", () => {
613
613
  ]);
614
614
  };
615
615
  }
616
- }, Ar = /* @__PURE__ */ Ie(br, [["__scopeId", "data-v-b5de149e"]]), xr = { class: "app-container" }, Mr = /* @__PURE__ */ _e({
616
+ }, Ar = /* @__PURE__ */ Le(br, [["__scopeId", "data-v-b5de149e"]]), xr = { class: "app-container" }, Mr = /* @__PURE__ */ _e({
617
617
  __name: "DataExplorerWrap",
618
618
  props: {
619
619
  pkg: {},
@@ -624,11 +624,11 @@ const Lt = Kn("duckdb", () => {
624
624
  },
625
625
  emits: ["queryResults"],
626
626
  setup(e, { emit: t }) {
627
- const n = e, r = t, a = T([]), i = T(""), u = T("parquet"), l = T("");
627
+ const n = e, r = t, a = T([]), i = T(""), l = T("parquet"), u = T("");
628
628
  Ve(async () => {
629
629
  var w, A, C, S, $;
630
630
  if (n.srcUrl) {
631
- i.value = n.srcUrl, u.value = n.srcFileType ?? (n.srcUrl.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
631
+ i.value = n.srcUrl, l.value = n.srcFileType ?? (n.srcUrl.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
632
632
  return;
633
633
  }
634
634
  const k = or("", ["content", "id"], n.pkg);
@@ -637,15 +637,15 @@ const Lt = Kn("duckdb", () => {
637
637
  return;
638
638
  }
639
639
  try {
640
- await d(k);
640
+ await p(k);
641
641
  const F = (C = (A = (w = a.value) == null ? void 0 : w[0]) == null ? void 0 : A.content) == null ? void 0 : C.id;
642
642
  if (!F) {
643
643
  console.error("[DuckDBViewerWrapper] No files found in /view response.");
644
644
  return;
645
645
  }
646
- l.value = F, i.value = await y(k, F);
646
+ u.value = F, i.value = await y(k, F);
647
647
  const D = ($ = (S = n.pkg) == null ? void 0 : S.content) == null ? void 0 : $.packageType;
648
- u.value = D === "CSV" ? "csv" : "parquet";
648
+ l.value = D === "CSV" ? "csv" : "parquet";
649
649
  } catch (F) {
650
650
  console.error(F);
651
651
  }
@@ -657,7 +657,7 @@ const Lt = Kn("duckdb", () => {
657
657
  const { useGetToken: w } = await import("./useGetToken-DaxIvkvl-BZdrKpSJ.mjs");
658
658
  return w();
659
659
  }
660
- async function d(w) {
660
+ async function p(w) {
661
661
  const A = await c(), C = `${n.apiUrl}/packages/${w}/view?api_key=${A}`, S = await fetch(C);
662
662
  if (!S.ok) throw new Error(`view failed: ${S.status}`);
663
663
  a.value = await S.json();
@@ -670,16 +670,16 @@ const Lt = Kn("duckdb", () => {
670
670
  return (w, A) => (B(), O("div", xr, [
671
671
  oe(Ar, {
672
672
  url: i.value,
673
- "file-type": u.value,
674
- "file-id": l.value,
673
+ "file-type": l.value,
674
+ "file-id": u.value,
675
675
  onQueryResults: A[0] || (A[0] = (C) => f(C))
676
676
  }, null, 8, ["url", "file-type", "file-id"])
677
677
  ]));
678
678
  }
679
- }), Er = /* @__PURE__ */ Ie(Mr, [["__scopeId", "data-v-7298e5bf"]]);
679
+ }), Er = /* @__PURE__ */ Le(Mr, [["__scopeId", "data-v-7298e5bf"]]);
680
680
  var Cr = { value: () => {
681
681
  } };
682
- function It() {
682
+ function Lt() {
683
683
  for (var e = 0, t = arguments.length, n = {}, r; e < t; ++e) {
684
684
  if (!(r = arguments[e] + "") || r in n || /[\s.]/.test(r)) throw new Error("illegal type: " + r);
685
685
  n[r] = [];
@@ -696,16 +696,16 @@ function Sr(e, t) {
696
696
  return { type: n, name: r };
697
697
  });
698
698
  }
699
- Ke.prototype = It.prototype = {
699
+ Ke.prototype = Lt.prototype = {
700
700
  constructor: Ke,
701
701
  on: function(e, t) {
702
- var n = this._, r = Sr(e + "", n), a, i = -1, u = r.length;
702
+ var n = this._, r = Sr(e + "", n), a, i = -1, l = r.length;
703
703
  if (arguments.length < 2) {
704
- for (; ++i < u; ) if ((a = (e = r[i]).type) && (a = kr(n[a], e.name))) return a;
704
+ for (; ++i < l; ) if ((a = (e = r[i]).type) && (a = kr(n[a], e.name))) return a;
705
705
  return;
706
706
  }
707
707
  if (t != null && typeof t != "function") throw new Error("invalid callback: " + t);
708
- for (; ++i < u; )
708
+ for (; ++i < l; )
709
709
  if (a = (e = r[i]).type) n[a] = Yt(n[a], e.name, t);
710
710
  else if (t == null) for (a in n) n[a] = Yt(n[a], e.name, null);
711
711
  return this;
@@ -746,7 +746,7 @@ const Vt = {
746
746
  xml: "http://www.w3.org/XML/1998/namespace",
747
747
  xmlns: "http://www.w3.org/2000/xmlns/"
748
748
  };
749
- function lt(e) {
749
+ function ut(e) {
750
750
  var t = e += "", n = t.indexOf(":");
751
751
  return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), Vt.hasOwnProperty(t) ? { space: Vt[t], local: e } : e;
752
752
  }
@@ -762,7 +762,7 @@ function Rr(e) {
762
762
  };
763
763
  }
764
764
  function cn(e) {
765
- var t = lt(e);
765
+ var t = ut(e);
766
766
  return (t.local ? Rr : $r)(t);
767
767
  }
768
768
  function Tr() {
@@ -775,31 +775,31 @@ function Ut(e) {
775
775
  function Nr(e) {
776
776
  typeof e != "function" && (e = Ut(e));
777
777
  for (var t = this._groups, n = t.length, r = new Array(n), a = 0; a < n; ++a)
778
- for (var i = t[a], u = i.length, l = r[a] = new Array(u), f, c, d = 0; d < u; ++d)
779
- (f = i[d]) && (c = e.call(f, f.__data__, d, i)) && ("__data__" in f && (c.__data__ = f.__data__), l[d] = c);
778
+ for (var i = t[a], l = i.length, u = r[a] = new Array(l), f, c, p = 0; p < l; ++p)
779
+ (f = i[p]) && (c = e.call(f, f.__data__, p, i)) && ("__data__" in f && (c.__data__ = f.__data__), u[p] = c);
780
780
  return new te(r, this._parents);
781
781
  }
782
- function Lr(e) {
782
+ function Ir(e) {
783
783
  return e == null ? [] : Array.isArray(e) ? e : Array.from(e);
784
784
  }
785
- function Ir() {
785
+ function Lr() {
786
786
  return [];
787
787
  }
788
788
  function fn(e) {
789
- return e == null ? Ir : function() {
789
+ return e == null ? Lr : function() {
790
790
  return this.querySelectorAll(e);
791
791
  };
792
792
  }
793
793
  function Ur(e) {
794
794
  return function() {
795
- return Lr(e.apply(this, arguments));
795
+ return Ir(e.apply(this, arguments));
796
796
  };
797
797
  }
798
798
  function Br(e) {
799
799
  typeof e == "function" ? e = Ur(e) : e = fn(e);
800
800
  for (var t = this._groups, n = t.length, r = [], a = [], i = 0; i < n; ++i)
801
- for (var u = t[i], l = u.length, f, c = 0; c < l; ++c)
802
- (f = u[c]) && (r.push(e.call(f, f.__data__, c, u)), a.push(f));
801
+ for (var l = t[i], u = l.length, f, c = 0; c < u; ++c)
802
+ (f = l[c]) && (r.push(e.call(f, f.__data__, c, l)), a.push(f));
803
803
  return new te(r, a);
804
804
  }
805
805
  function hn(e) {
@@ -807,7 +807,7 @@ function hn(e) {
807
807
  return this.matches(e);
808
808
  };
809
809
  }
810
- function dn(e) {
810
+ function pn(e) {
811
811
  return function(t) {
812
812
  return t.matches(e);
813
813
  };
@@ -822,7 +822,7 @@ function Pr() {
822
822
  return this.firstElementChild;
823
823
  }
824
824
  function Dr(e) {
825
- return this.select(e == null ? Pr : Or(typeof e == "function" ? e : dn(e)));
825
+ return this.select(e == null ? Pr : Or(typeof e == "function" ? e : pn(e)));
826
826
  }
827
827
  var zr = Array.prototype.filter;
828
828
  function qr() {
@@ -834,20 +834,20 @@ function Yr(e) {
834
834
  };
835
835
  }
836
836
  function Vr(e) {
837
- return this.selectAll(e == null ? qr : Yr(typeof e == "function" ? e : dn(e)));
837
+ return this.selectAll(e == null ? qr : Yr(typeof e == "function" ? e : pn(e)));
838
838
  }
839
839
  function Wr(e) {
840
840
  typeof e != "function" && (e = hn(e));
841
841
  for (var t = this._groups, n = t.length, r = new Array(n), a = 0; a < n; ++a)
842
- for (var i = t[a], u = i.length, l = r[a] = [], f, c = 0; c < u; ++c)
843
- (f = i[c]) && e.call(f, f.__data__, c, i) && l.push(f);
842
+ for (var i = t[a], l = i.length, u = r[a] = [], f, c = 0; c < l; ++c)
843
+ (f = i[c]) && e.call(f, f.__data__, c, i) && u.push(f);
844
844
  return new te(r, this._parents);
845
845
  }
846
- function pn(e) {
846
+ function vn(e) {
847
847
  return new Array(e.length);
848
848
  }
849
849
  function jr() {
850
- return new te(this._enter || this._groups.map(pn), this._parents);
850
+ return new te(this._enter || this._groups.map(vn), this._parents);
851
851
  }
852
852
  function tt(e, t) {
853
853
  this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
@@ -873,19 +873,19 @@ function Hr(e) {
873
873
  };
874
874
  }
875
875
  function Xr(e, t, n, r, a, i) {
876
- for (var u = 0, l, f = t.length, c = i.length; u < c; ++u)
877
- (l = t[u]) ? (l.__data__ = i[u], r[u] = l) : n[u] = new tt(e, i[u]);
878
- for (; u < f; ++u)
879
- (l = t[u]) && (a[u] = l);
880
- }
881
- function Gr(e, t, n, r, a, i, u) {
882
- var l, f, c = /* @__PURE__ */ new Map(), d = t.length, y = i.length, w = new Array(d), A;
883
- for (l = 0; l < d; ++l)
884
- (f = t[l]) && (w[l] = A = u.call(f, f.__data__, l, t) + "", c.has(A) ? a[l] = f : c.set(A, f));
885
- for (l = 0; l < y; ++l)
886
- A = u.call(e, i[l], l, i) + "", (f = c.get(A)) ? (r[l] = f, f.__data__ = i[l], c.delete(A)) : n[l] = new tt(e, i[l]);
887
- for (l = 0; l < d; ++l)
888
- (f = t[l]) && c.get(w[l]) === f && (a[l] = f);
876
+ for (var l = 0, u, f = t.length, c = i.length; l < c; ++l)
877
+ (u = t[l]) ? (u.__data__ = i[l], r[l] = u) : n[l] = new tt(e, i[l]);
878
+ for (; l < f; ++l)
879
+ (u = t[l]) && (a[l] = u);
880
+ }
881
+ function Gr(e, t, n, r, a, i, l) {
882
+ var u, f, c = /* @__PURE__ */ new Map(), p = t.length, y = i.length, w = new Array(p), A;
883
+ for (u = 0; u < p; ++u)
884
+ (f = t[u]) && (w[u] = A = l.call(f, f.__data__, u, t) + "", c.has(A) ? a[u] = f : c.set(A, f));
885
+ for (u = 0; u < y; ++u)
886
+ A = l.call(e, i[u], u, i) + "", (f = c.get(A)) ? (r[u] = f, f.__data__ = i[u], c.delete(A)) : n[u] = new tt(e, i[u]);
887
+ for (u = 0; u < p; ++u)
888
+ (f = t[u]) && c.get(w[u]) === f && (a[u] = f);
889
889
  }
890
890
  function Qr(e) {
891
891
  return e.__data__;
@@ -894,39 +894,39 @@ function Kr(e, t) {
894
894
  if (!arguments.length) return Array.from(this, Qr);
895
895
  var n = t ? Gr : Xr, r = this._parents, a = this._groups;
896
896
  typeof e != "function" && (e = Hr(e));
897
- for (var i = a.length, u = new Array(i), l = new Array(i), f = new Array(i), c = 0; c < i; ++c) {
898
- var d = r[c], y = a[c], w = y.length, A = Jr(e.call(d, d && d.__data__, c, r)), C = A.length, S = l[c] = new Array(C), $ = u[c] = new Array(C), k = f[c] = new Array(w);
899
- n(d, y, S, $, k, A, t);
897
+ for (var i = a.length, l = new Array(i), u = new Array(i), f = new Array(i), c = 0; c < i; ++c) {
898
+ var p = r[c], y = a[c], w = y.length, A = Jr(e.call(p, p && p.__data__, c, r)), C = A.length, S = u[c] = new Array(C), $ = l[c] = new Array(C), k = f[c] = new Array(w);
899
+ n(p, y, S, $, k, A, t);
900
900
  for (var F = 0, D = 0, z, q; F < C; ++F)
901
901
  if (z = S[F]) {
902
902
  for (F >= D && (D = F + 1); !(q = $[D]) && ++D < C; ) ;
903
903
  z._next = q || null;
904
904
  }
905
905
  }
906
- return u = new te(u, r), u._enter = l, u._exit = f, u;
906
+ return l = new te(l, r), l._enter = u, l._exit = f, l;
907
907
  }
908
908
  function Jr(e) {
909
909
  return typeof e == "object" && "length" in e ? e : Array.from(e);
910
910
  }
911
911
  function Zr() {
912
- return new te(this._exit || this._groups.map(pn), this._parents);
912
+ return new te(this._exit || this._groups.map(vn), this._parents);
913
913
  }
914
914
  function ea(e, t, n) {
915
915
  var r = this.enter(), a = this, i = this.exit();
916
916
  return typeof e == "function" ? (r = e(r), r && (r = r.selection())) : r = r.append(e + ""), t != null && (a = t(a), a && (a = a.selection())), n == null ? i.remove() : n(i), r && a ? r.merge(a).order() : a;
917
917
  }
918
918
  function ta(e) {
919
- for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, a = n.length, i = r.length, u = Math.min(a, i), l = new Array(a), f = 0; f < u; ++f)
920
- for (var c = n[f], d = r[f], y = c.length, w = l[f] = new Array(y), A, C = 0; C < y; ++C)
921
- (A = c[C] || d[C]) && (w[C] = A);
919
+ for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, a = n.length, i = r.length, l = Math.min(a, i), u = new Array(a), f = 0; f < l; ++f)
920
+ for (var c = n[f], p = r[f], y = c.length, w = u[f] = new Array(y), A, C = 0; C < y; ++C)
921
+ (A = c[C] || p[C]) && (w[C] = A);
922
922
  for (; f < a; ++f)
923
- l[f] = n[f];
924
- return new te(l, this._parents);
923
+ u[f] = n[f];
924
+ return new te(u, this._parents);
925
925
  }
926
926
  function na() {
927
927
  for (var e = this._groups, t = -1, n = e.length; ++t < n; )
928
- for (var r = e[t], a = r.length - 1, i = r[a], u; --a >= 0; )
929
- (u = r[a]) && (i && u.compareDocumentPosition(i) ^ 4 && i.parentNode.insertBefore(u, i), i = u);
928
+ for (var r = e[t], a = r.length - 1, i = r[a], l; --a >= 0; )
929
+ (l = r[a]) && (i && l.compareDocumentPosition(i) ^ 4 && i.parentNode.insertBefore(l, i), i = l);
930
930
  return this;
931
931
  }
932
932
  function ra(e) {
@@ -935,8 +935,8 @@ function ra(e) {
935
935
  return y && w ? e(y.__data__, w.__data__) : !y - !w;
936
936
  }
937
937
  for (var n = this._groups, r = n.length, a = new Array(r), i = 0; i < r; ++i) {
938
- for (var u = n[i], l = u.length, f = a[i] = new Array(l), c, d = 0; d < l; ++d)
939
- (c = u[d]) && (f[d] = c);
938
+ for (var l = n[i], u = l.length, f = a[i] = new Array(u), c, p = 0; p < u; ++p)
939
+ (c = l[p]) && (f[p] = c);
940
940
  f.sort(t);
941
941
  }
942
942
  return new te(a, this._parents).order();
@@ -951,15 +951,15 @@ function oa() {
951
951
  function ia() {
952
952
  return Array.from(this);
953
953
  }
954
- function ua() {
954
+ function la() {
955
955
  for (var e = this._groups, t = 0, n = e.length; t < n; ++t)
956
956
  for (var r = e[t], a = 0, i = r.length; a < i; ++a) {
957
- var u = r[a];
958
- if (u) return u;
957
+ var l = r[a];
958
+ if (l) return l;
959
959
  }
960
960
  return null;
961
961
  }
962
- function la() {
962
+ function ua() {
963
963
  let e = 0;
964
964
  for (const t of this) ++e;
965
965
  return e;
@@ -969,8 +969,8 @@ function sa() {
969
969
  }
970
970
  function ca(e) {
971
971
  for (var t = this._groups, n = 0, r = t.length; n < r; ++n)
972
- for (var a = t[n], i = 0, u = a.length, l; i < u; ++i)
973
- (l = a[i]) && e.call(l, l.__data__, i, a);
972
+ for (var a = t[n], i = 0, l = a.length, u; i < l; ++i)
973
+ (u = a[i]) && e.call(u, u.__data__, i, a);
974
974
  return this;
975
975
  }
976
976
  function fa(e) {
@@ -983,17 +983,17 @@ function ha(e) {
983
983
  this.removeAttributeNS(e.space, e.local);
984
984
  };
985
985
  }
986
- function da(e, t) {
986
+ function pa(e, t) {
987
987
  return function() {
988
988
  this.setAttribute(e, t);
989
989
  };
990
990
  }
991
- function pa(e, t) {
991
+ function va(e, t) {
992
992
  return function() {
993
993
  this.setAttributeNS(e.space, e.local, t);
994
994
  };
995
995
  }
996
- function va(e, t) {
996
+ function da(e, t) {
997
997
  return function() {
998
998
  var n = t.apply(this, arguments);
999
999
  n == null ? this.removeAttribute(e) : this.setAttribute(e, n);
@@ -1006,14 +1006,14 @@ function ma(e, t) {
1006
1006
  };
1007
1007
  }
1008
1008
  function ga(e, t) {
1009
- var n = lt(e);
1009
+ var n = ut(e);
1010
1010
  if (arguments.length < 2) {
1011
1011
  var r = this.node();
1012
1012
  return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
1013
1013
  }
1014
- return this.each((t == null ? n.local ? ha : fa : typeof t == "function" ? n.local ? ma : va : n.local ? pa : da)(n, t));
1014
+ return this.each((t == null ? n.local ? ha : fa : typeof t == "function" ? n.local ? ma : da : n.local ? va : pa)(n, t));
1015
1015
  }
1016
- function vn(e) {
1016
+ function dn(e) {
1017
1017
  return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
1018
1018
  }
1019
1019
  function ya(e) {
@@ -1036,7 +1036,7 @@ function ba(e, t, n) {
1036
1036
  return arguments.length > 1 ? this.each((t == null ? ya : typeof t == "function" ? _a : wa)(e, t, n ?? "")) : Ne(this.node(), e);
1037
1037
  }
1038
1038
  function Ne(e, t) {
1039
- return e.style.getPropertyValue(t) || vn(e).getComputedStyle(e, null).getPropertyValue(t);
1039
+ return e.style.getPropertyValue(t) || dn(e).getComputedStyle(e, null).getPropertyValue(t);
1040
1040
  }
1041
1041
  function Aa(e) {
1042
1042
  return function() {
@@ -1122,10 +1122,10 @@ function Na(e) {
1122
1122
  this.textContent = t ?? "";
1123
1123
  };
1124
1124
  }
1125
- function La(e) {
1125
+ function Ia(e) {
1126
1126
  return arguments.length ? this.each(e == null ? Ra : (typeof e == "function" ? Na : Ta)(e)) : this.node().textContent;
1127
1127
  }
1128
- function Ia() {
1128
+ function La() {
1129
1129
  this.innerHTML = "";
1130
1130
  }
1131
1131
  function Ua(e) {
@@ -1140,7 +1140,7 @@ function Ba(e) {
1140
1140
  };
1141
1141
  }
1142
1142
  function Fa(e) {
1143
- return arguments.length ? this.each(e == null ? Ia : (typeof e == "function" ? Ba : Ua)(e)) : this.node().innerHTML;
1143
+ return arguments.length ? this.each(e == null ? La : (typeof e == "function" ? Ba : Ua)(e)) : this.node().innerHTML;
1144
1144
  }
1145
1145
  function Oa() {
1146
1146
  this.nextSibling && this.parentNode.appendChild(this);
@@ -1215,8 +1215,8 @@ function eo(e, t, n) {
1215
1215
  return function() {
1216
1216
  var r = this.__on, a, i = Ka(t);
1217
1217
  if (r) {
1218
- for (var u = 0, l = r.length; u < l; ++u)
1219
- if ((a = r[u]).type === e.type && a.name === e.name) {
1218
+ for (var l = 0, u = r.length; l < u; ++l)
1219
+ if ((a = r[l]).type === e.type && a.name === e.name) {
1220
1220
  this.removeEventListener(a.type, a.listener, a.options), this.addEventListener(a.type, a.listener = i, a.options = n), a.value = t;
1221
1221
  return;
1222
1222
  }
@@ -1225,22 +1225,22 @@ function eo(e, t, n) {
1225
1225
  };
1226
1226
  }
1227
1227
  function to(e, t, n) {
1228
- var r = Ja(e + ""), a, i = r.length, u;
1228
+ var r = Ja(e + ""), a, i = r.length, l;
1229
1229
  if (arguments.length < 2) {
1230
- var l = this.node().__on;
1231
- if (l) {
1232
- for (var f = 0, c = l.length, d; f < c; ++f)
1233
- for (a = 0, d = l[f]; a < i; ++a)
1234
- if ((u = r[a]).type === d.type && u.name === d.name)
1235
- return d.value;
1230
+ var u = this.node().__on;
1231
+ if (u) {
1232
+ for (var f = 0, c = u.length, p; f < c; ++f)
1233
+ for (a = 0, p = u[f]; a < i; ++a)
1234
+ if ((l = r[a]).type === p.type && l.name === p.name)
1235
+ return p.value;
1236
1236
  }
1237
1237
  return;
1238
1238
  }
1239
- for (l = t ? eo : Za, a = 0; a < i; ++a) this.each(l(r[a], t, n));
1239
+ for (u = t ? eo : Za, a = 0; a < i; ++a) this.each(u(r[a], t, n));
1240
1240
  return this;
1241
1241
  }
1242
1242
  function _n(e, t, n) {
1243
- var r = vn(e), a = r.CustomEvent;
1243
+ var r = dn(e), a = r.CustomEvent;
1244
1244
  typeof a == "function" ? a = new a(t, n) : (a = r.document.createEvent("Event"), n ? (a.initEvent(t, n.bubbles, n.cancelable), a.detail = n.detail) : a.initEvent(t, !1, !1)), e.dispatchEvent(a);
1245
1245
  }
1246
1246
  function no(e, t) {
@@ -1258,8 +1258,8 @@ function ao(e, t) {
1258
1258
  }
1259
1259
  function* oo() {
1260
1260
  for (var e = this._groups, t = 0, n = e.length; t < n; ++t)
1261
- for (var r = e[t], a = 0, i = r.length, u; a < i; ++a)
1262
- (u = r[a]) && (yield u);
1261
+ for (var r = e[t], a = 0, i = r.length, l; a < i; ++a)
1262
+ (l = r[a]) && (yield l);
1263
1263
  }
1264
1264
  var bn = [null];
1265
1265
  function te(e, t) {
@@ -1288,15 +1288,15 @@ te.prototype = We.prototype = {
1288
1288
  sort: ra,
1289
1289
  call: oa,
1290
1290
  nodes: ia,
1291
- node: ua,
1292
- size: la,
1291
+ node: la,
1292
+ size: ua,
1293
1293
  empty: sa,
1294
1294
  each: ca,
1295
1295
  attr: ga,
1296
1296
  style: ba,
1297
1297
  property: Ea,
1298
1298
  classed: $a,
1299
- text: La,
1299
+ text: Ia,
1300
1300
  html: Fa,
1301
1301
  raise: Pa,
1302
1302
  lower: za,
@@ -1309,16 +1309,16 @@ te.prototype = We.prototype = {
1309
1309
  dispatch: ao,
1310
1310
  [Symbol.iterator]: oo
1311
1311
  };
1312
- function pe(e) {
1312
+ function ve(e) {
1313
1313
  return typeof e == "string" ? new te([[document.querySelector(e)]], [document.documentElement]) : new te([[e]], bn);
1314
1314
  }
1315
- function uo(e) {
1315
+ function lo(e) {
1316
1316
  let t;
1317
1317
  for (; t = e.sourceEvent; ) e = t;
1318
1318
  return e;
1319
1319
  }
1320
1320
  function xe(e, t) {
1321
- if (e = uo(e), t === void 0 && (t = e.currentTarget), t) {
1321
+ if (e = lo(e), t === void 0 && (t = e.currentTarget), t) {
1322
1322
  var n = t.ownerSVGElement || t;
1323
1323
  if (n.createSVGPoint) {
1324
1324
  var r = n.createSVGPoint();
@@ -1335,12 +1335,12 @@ const Mt = { capture: !0, passive: !1 };
1335
1335
  function Et(e) {
1336
1336
  e.preventDefault(), e.stopImmediatePropagation();
1337
1337
  }
1338
- function lo(e) {
1339
- var t = e.document.documentElement, n = pe(e).on("dragstart.drag", Et, Mt);
1338
+ function uo(e) {
1339
+ var t = e.document.documentElement, n = ve(e).on("dragstart.drag", Et, Mt);
1340
1340
  "onselectstart" in t ? n.on("selectstart.drag", Et, Mt) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
1341
1341
  }
1342
1342
  function so(e, t) {
1343
- var n = e.document.documentElement, r = pe(e).on("dragstart.drag", null);
1343
+ var n = e.document.documentElement, r = ve(e).on("dragstart.drag", null);
1344
1344
  t && (r.on("click.drag", Et, Mt), setTimeout(function() {
1345
1345
  r.on("click.drag", null);
1346
1346
  }, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
@@ -1601,8 +1601,8 @@ function xn(e) {
1601
1601
  if (e instanceof je || (e = qe(e)), !e) return new ae();
1602
1602
  if (e instanceof ae) return e;
1603
1603
  e = e.rgb();
1604
- var t = e.r / 255, n = e.g / 255, r = e.b / 255, a = Math.min(t, n, r), i = Math.max(t, n, r), u = NaN, l = i - a, f = (i + a) / 2;
1605
- return l ? (t === i ? u = (n - r) / l + (n < r) * 6 : n === i ? u = (r - t) / l + 2 : u = (t - n) / l + 4, l /= f < 0.5 ? i + a : 2 - i - a, u *= 60) : l = f > 0 && f < 1 ? 0 : u, new ae(u, l, f, e.opacity);
1604
+ var t = e.r / 255, n = e.g / 255, r = e.b / 255, a = Math.min(t, n, r), i = Math.max(t, n, r), l = NaN, u = i - a, f = (i + a) / 2;
1605
+ return u ? (t === i ? l = (n - r) / u + (n < r) * 6 : n === i ? l = (r - t) / u + 2 : l = (t - n) / u + 4, u /= f < 0.5 ? i + a : 2 - i - a, l *= 60) : u = f > 0 && f < 1 ? 0 : l, new ae(l, u, f, e.opacity);
1606
1606
  }
1607
1607
  function Ao(e, t, n, r) {
1608
1608
  return arguments.length === 1 ? xn(e) : new ae(e, t, n, r ?? 1);
@@ -1669,9 +1669,9 @@ function En(e, t) {
1669
1669
  const Zt = (function e(t) {
1670
1670
  var n = Eo(t);
1671
1671
  function r(a, i) {
1672
- var u = n((a = Ct(a)).r, (i = Ct(i)).r), l = n(a.g, i.g), f = n(a.b, i.b), c = En(a.opacity, i.opacity);
1673
- return function(d) {
1674
- return a.r = u(d), a.g = l(d), a.b = f(d), a.opacity = c(d), a + "";
1672
+ var l = n((a = Ct(a)).r, (i = Ct(i)).r), u = n(a.g, i.g), f = n(a.b, i.b), c = En(a.opacity, i.opacity);
1673
+ return function(p) {
1674
+ return a.r = l(p), a.g = u(p), a.b = f(p), a.opacity = c(p), a + "";
1675
1675
  };
1676
1676
  }
1677
1677
  return r.gamma = e, r;
@@ -1681,7 +1681,7 @@ function ye(e, t) {
1681
1681
  return e * (1 - n) + t * n;
1682
1682
  };
1683
1683
  }
1684
- var St = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, dt = new RegExp(St.source, "g");
1684
+ var St = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, pt = new RegExp(St.source, "g");
1685
1685
  function Co(e) {
1686
1686
  return function() {
1687
1687
  return e;
@@ -1693,12 +1693,12 @@ function So(e) {
1693
1693
  };
1694
1694
  }
1695
1695
  function ko(e, t) {
1696
- var n = St.lastIndex = dt.lastIndex = 0, r, a, i, u = -1, l = [], f = [];
1697
- for (e = e + "", t = t + ""; (r = St.exec(e)) && (a = dt.exec(t)); )
1698
- (i = a.index) > n && (i = t.slice(n, i), l[u] ? l[u] += i : l[++u] = i), (r = r[0]) === (a = a[0]) ? l[u] ? l[u] += a : l[++u] = a : (l[++u] = null, f.push({ i: u, x: ye(r, a) })), n = dt.lastIndex;
1699
- return n < t.length && (i = t.slice(n), l[u] ? l[u] += i : l[++u] = i), l.length < 2 ? f[0] ? So(f[0].x) : Co(t) : (t = f.length, function(c) {
1700
- for (var d = 0, y; d < t; ++d) l[(y = f[d]).i] = y.x(c);
1701
- return l.join("");
1696
+ var n = St.lastIndex = pt.lastIndex = 0, r, a, i, l = -1, u = [], f = [];
1697
+ for (e = e + "", t = t + ""; (r = St.exec(e)) && (a = pt.exec(t)); )
1698
+ (i = a.index) > n && (i = t.slice(n, i), u[l] ? u[l] += i : u[++l] = i), (r = r[0]) === (a = a[0]) ? u[l] ? u[l] += a : u[++l] = a : (u[++l] = null, f.push({ i: l, x: ye(r, a) })), n = pt.lastIndex;
1699
+ return n < t.length && (i = t.slice(n), u[l] ? u[l] += i : u[++l] = i), u.length < 2 ? f[0] ? So(f[0].x) : Co(t) : (t = f.length, function(c) {
1700
+ for (var p = 0, y; p < t; ++p) u[(y = f[p]).i] = y.x(c);
1701
+ return u.join("");
1702
1702
  });
1703
1703
  }
1704
1704
  var en = 180 / Math.PI, Cn = {
@@ -1710,14 +1710,14 @@ var en = 180 / Math.PI, Cn = {
1710
1710
  scaleY: 1
1711
1711
  };
1712
1712
  function Sn(e, t, n, r, a, i) {
1713
- var u, l, f;
1714
- return (u = Math.sqrt(e * e + t * t)) && (e /= u, t /= u), (f = e * n + t * r) && (n -= e * f, r -= t * f), (l = Math.sqrt(n * n + r * r)) && (n /= l, r /= l, f /= l), e * r < t * n && (e = -e, t = -t, f = -f, u = -u), {
1713
+ var l, u, f;
1714
+ return (l = Math.sqrt(e * e + t * t)) && (e /= l, t /= l), (f = e * n + t * r) && (n -= e * f, r -= t * f), (u = Math.sqrt(n * n + r * r)) && (n /= u, r /= u, f /= u), e * r < t * n && (e = -e, t = -t, f = -f, l = -l), {
1715
1715
  translateX: a,
1716
1716
  translateY: i,
1717
1717
  rotate: Math.atan2(t, e) * en,
1718
1718
  skewX: Math.atan(f) * en,
1719
- scaleX: u,
1720
- scaleY: l
1719
+ scaleX: l,
1720
+ scaleY: u
1721
1721
  };
1722
1722
  }
1723
1723
  var Ge;
@@ -1732,49 +1732,49 @@ function kn(e, t, n, r) {
1732
1732
  function a(c) {
1733
1733
  return c.length ? c.pop() + " " : "";
1734
1734
  }
1735
- function i(c, d, y, w, A, C) {
1736
- if (c !== y || d !== w) {
1735
+ function i(c, p, y, w, A, C) {
1736
+ if (c !== y || p !== w) {
1737
1737
  var S = A.push("translate(", null, t, null, n);
1738
- C.push({ i: S - 4, x: ye(c, y) }, { i: S - 2, x: ye(d, w) });
1738
+ C.push({ i: S - 4, x: ye(c, y) }, { i: S - 2, x: ye(p, w) });
1739
1739
  } else (y || w) && A.push("translate(" + y + t + w + n);
1740
1740
  }
1741
- function u(c, d, y, w) {
1742
- c !== d ? (c - d > 180 ? d += 360 : d - c > 180 && (c += 360), w.push({ i: y.push(a(y) + "rotate(", null, r) - 2, x: ye(c, d) })) : d && y.push(a(y) + "rotate(" + d + r);
1741
+ function l(c, p, y, w) {
1742
+ c !== p ? (c - p > 180 ? p += 360 : p - c > 180 && (c += 360), w.push({ i: y.push(a(y) + "rotate(", null, r) - 2, x: ye(c, p) })) : p && y.push(a(y) + "rotate(" + p + r);
1743
1743
  }
1744
- function l(c, d, y, w) {
1745
- c !== d ? w.push({ i: y.push(a(y) + "skewX(", null, r) - 2, x: ye(c, d) }) : d && y.push(a(y) + "skewX(" + d + r);
1744
+ function u(c, p, y, w) {
1745
+ c !== p ? w.push({ i: y.push(a(y) + "skewX(", null, r) - 2, x: ye(c, p) }) : p && y.push(a(y) + "skewX(" + p + r);
1746
1746
  }
1747
- function f(c, d, y, w, A, C) {
1748
- if (c !== y || d !== w) {
1747
+ function f(c, p, y, w, A, C) {
1748
+ if (c !== y || p !== w) {
1749
1749
  var S = A.push(a(A) + "scale(", null, ",", null, ")");
1750
- C.push({ i: S - 4, x: ye(c, y) }, { i: S - 2, x: ye(d, w) });
1750
+ C.push({ i: S - 4, x: ye(c, y) }, { i: S - 2, x: ye(p, w) });
1751
1751
  } else (y !== 1 || w !== 1) && A.push(a(A) + "scale(" + y + "," + w + ")");
1752
1752
  }
1753
- return function(c, d) {
1753
+ return function(c, p) {
1754
1754
  var y = [], w = [];
1755
- return c = e(c), d = e(d), i(c.translateX, c.translateY, d.translateX, d.translateY, y, w), u(c.rotate, d.rotate, y, w), l(c.skewX, d.skewX, y, w), f(c.scaleX, c.scaleY, d.scaleX, d.scaleY, y, w), c = d = null, function(A) {
1755
+ return c = e(c), p = e(p), i(c.translateX, c.translateY, p.translateX, p.translateY, y, w), l(c.rotate, p.rotate, y, w), u(c.skewX, p.skewX, y, w), f(c.scaleX, c.scaleY, p.scaleX, p.scaleY, y, w), c = p = null, function(A) {
1756
1756
  for (var C = -1, S = w.length, $; ++C < S; ) y[($ = w[C]).i] = $.x(A);
1757
1757
  return y.join("");
1758
1758
  };
1759
1759
  };
1760
1760
  }
1761
- var To = kn($o, "px, ", "px)", "deg)"), No = kn(Ro, ", ", ")", ")"), Lo = 1e-12;
1761
+ var To = kn($o, "px, ", "px)", "deg)"), No = kn(Ro, ", ", ")", ")"), Io = 1e-12;
1762
1762
  function tn(e) {
1763
1763
  return ((e = Math.exp(e)) + 1 / e) / 2;
1764
1764
  }
1765
- function Io(e) {
1765
+ function Lo(e) {
1766
1766
  return ((e = Math.exp(e)) - 1 / e) / 2;
1767
1767
  }
1768
1768
  function Uo(e) {
1769
1769
  return ((e = Math.exp(2 * e)) - 1) / (e + 1);
1770
1770
  }
1771
1771
  const Bo = (function e(t, n, r) {
1772
- function a(i, u) {
1773
- var l = i[0], f = i[1], c = i[2], d = u[0], y = u[1], w = u[2], A = d - l, C = y - f, S = A * A + C * C, $, k;
1774
- if (S < Lo)
1772
+ function a(i, l) {
1773
+ var u = i[0], f = i[1], c = i[2], p = l[0], y = l[1], w = l[2], A = p - u, C = y - f, S = A * A + C * C, $, k;
1774
+ if (S < Io)
1775
1775
  k = Math.log(w / c) / t, $ = function(V) {
1776
1776
  return [
1777
- l + V * A,
1777
+ u + V * A,
1778
1778
  f + V * C,
1779
1779
  c * Math.exp(t * V * k)
1780
1780
  ];
@@ -1782,9 +1782,9 @@ const Bo = (function e(t, n, r) {
1782
1782
  else {
1783
1783
  var F = Math.sqrt(S), D = (w * w - c * c + r * S) / (2 * c * n * F), z = (w * w - c * c - r * S) / (2 * w * n * F), q = Math.log(Math.sqrt(D * D + 1) - D), H = Math.log(Math.sqrt(z * z + 1) - z);
1784
1784
  k = (H - q) / t, $ = function(V) {
1785
- var K = V * k, X = tn(q), P = c / (n * F) * (X * Uo(t * K + q) - Io(q));
1785
+ var K = V * k, X = tn(q), P = c / (n * F) * (X * Uo(t * K + q) - Lo(q));
1786
1786
  return [
1787
- l + P * A,
1787
+ u + P * A,
1788
1788
  f + P * C,
1789
1789
  c * X / tn(t * K + q)
1790
1790
  ];
@@ -1793,11 +1793,11 @@ const Bo = (function e(t, n, r) {
1793
1793
  return $.duration = k * 1e3 * t / Math.SQRT2, $;
1794
1794
  }
1795
1795
  return a.rho = function(i) {
1796
- var u = Math.max(1e-3, +i), l = u * u, f = l * l;
1797
- return e(u, l, f);
1796
+ var l = Math.max(1e-3, +i), u = l * l, f = u * u;
1797
+ return e(l, u, f);
1798
1798
  }, a;
1799
1799
  })(Math.SQRT2, 2, 4);
1800
- var Le = 0, Fe = 0, Ue = 0, $n = 1e3, at, Oe, ot = 0, $e = 0, st = 0, Ye = typeof performance == "object" && performance.now ? performance : Date, Rn = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
1800
+ var Ie = 0, Fe = 0, Ue = 0, $n = 1e3, at, Oe, ot = 0, $e = 0, st = 0, Ye = typeof performance == "object" && performance.now ? performance : Date, Rn = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
1801
1801
  setTimeout(e, 17);
1802
1802
  };
1803
1803
  function Ot() {
@@ -1824,17 +1824,17 @@ function Tn(e, t, n) {
1824
1824
  return r.restart(e, t, n), r;
1825
1825
  }
1826
1826
  function Oo() {
1827
- Ot(), ++Le;
1827
+ Ot(), ++Ie;
1828
1828
  for (var e = at, t; e; )
1829
1829
  (t = $e - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
1830
- --Le;
1830
+ --Ie;
1831
1831
  }
1832
1832
  function nn() {
1833
- $e = (ot = Ye.now()) + st, Le = Fe = 0;
1833
+ $e = (ot = Ye.now()) + st, Ie = Fe = 0;
1834
1834
  try {
1835
1835
  Oo();
1836
1836
  } finally {
1837
- Le = 0, Do(), $e = 0;
1837
+ Ie = 0, Do(), $e = 0;
1838
1838
  }
1839
1839
  }
1840
1840
  function Po() {
@@ -1847,10 +1847,10 @@ function Do() {
1847
1847
  Oe = e, kt(r);
1848
1848
  }
1849
1849
  function kt(e) {
1850
- if (!Le) {
1850
+ if (!Ie) {
1851
1851
  Fe && (Fe = clearTimeout(Fe));
1852
1852
  var t = e - $e;
1853
- t > 24 ? (e < 1 / 0 && (Fe = setTimeout(nn, e - Ye.now() - st)), Ue && (Ue = clearInterval(Ue))) : (Ue || (ot = Ye.now(), Ue = setInterval(Po, $n)), Le = 1, Rn(nn));
1853
+ t > 24 ? (e < 1 / 0 && (Fe = setTimeout(nn, e - Ye.now() - st)), Ue && (Ue = clearInterval(Ue))) : (Ue || (ot = Ye.now(), Ue = setInterval(Po, $n)), Ie = 1, Rn(nn));
1854
1854
  }
1855
1855
  }
1856
1856
  function rn(e, t, n) {
@@ -1859,11 +1859,11 @@ function rn(e, t, n) {
1859
1859
  r.stop(), e(a + t);
1860
1860
  }, t, n), r;
1861
1861
  }
1862
- var zo = It("start", "end", "cancel", "interrupt"), qo = [], Nn = 0, an = 1, $t = 2, Je = 3, on = 4, Rt = 5, Ze = 6;
1862
+ var zo = Lt("start", "end", "cancel", "interrupt"), qo = [], Nn = 0, an = 1, $t = 2, Je = 3, on = 4, Rt = 5, Ze = 6;
1863
1863
  function ct(e, t, n, r, a, i) {
1864
- var u = e.__transition;
1865
- if (!u) e.__transition = {};
1866
- else if (n in u) return;
1864
+ var l = e.__transition;
1865
+ if (!l) e.__transition = {};
1866
+ else if (n in l) return;
1867
1867
  Yo(e, n, {
1868
1868
  name: t,
1869
1869
  index: r,
@@ -1899,27 +1899,27 @@ function Yo(e, t, n) {
1899
1899
  var r = e.__transition, a;
1900
1900
  r[t] = n, n.timer = Tn(i, 0, n.time);
1901
1901
  function i(c) {
1902
- n.state = an, n.timer.restart(u, n.delay, n.time), n.delay <= c && u(c - n.delay);
1902
+ n.state = an, n.timer.restart(l, n.delay, n.time), n.delay <= c && l(c - n.delay);
1903
1903
  }
1904
- function u(c) {
1905
- var d, y, w, A;
1904
+ function l(c) {
1905
+ var p, y, w, A;
1906
1906
  if (n.state !== an) return f();
1907
- for (d in r)
1908
- if (A = r[d], A.name === n.name) {
1909
- if (A.state === Je) return rn(u);
1910
- A.state === on ? (A.state = Ze, A.timer.stop(), A.on.call("interrupt", e, e.__data__, A.index, A.group), delete r[d]) : +d < t && (A.state = Ze, A.timer.stop(), A.on.call("cancel", e, e.__data__, A.index, A.group), delete r[d]);
1907
+ for (p in r)
1908
+ if (A = r[p], A.name === n.name) {
1909
+ if (A.state === Je) return rn(l);
1910
+ A.state === on ? (A.state = Ze, A.timer.stop(), A.on.call("interrupt", e, e.__data__, A.index, A.group), delete r[p]) : +p < t && (A.state = Ze, A.timer.stop(), A.on.call("cancel", e, e.__data__, A.index, A.group), delete r[p]);
1911
1911
  }
1912
1912
  if (rn(function() {
1913
- n.state === Je && (n.state = on, n.timer.restart(l, n.delay, n.time), l(c));
1913
+ n.state === Je && (n.state = on, n.timer.restart(u, n.delay, n.time), u(c));
1914
1914
  }), n.state = $t, n.on.call("start", e, e.__data__, n.index, n.group), n.state === $t) {
1915
- for (n.state = Je, a = new Array(w = n.tween.length), d = 0, y = -1; d < w; ++d)
1916
- (A = n.tween[d].value.call(e, e.__data__, n.index, n.group)) && (a[++y] = A);
1915
+ for (n.state = Je, a = new Array(w = n.tween.length), p = 0, y = -1; p < w; ++p)
1916
+ (A = n.tween[p].value.call(e, e.__data__, n.index, n.group)) && (a[++y] = A);
1917
1917
  a.length = y + 1;
1918
1918
  }
1919
1919
  }
1920
- function l(c) {
1921
- for (var d = c < n.duration ? n.ease.call(null, c / n.duration) : (n.timer.restart(f), n.state = Rt, 1), y = -1, w = a.length; ++y < w; )
1922
- a[y].call(e, d);
1920
+ function u(c) {
1921
+ for (var p = c < n.duration ? n.ease.call(null, c / n.duration) : (n.timer.restart(f), n.state = Rt, 1), y = -1, w = a.length; ++y < w; )
1922
+ a[y].call(e, p);
1923
1923
  n.state === Rt && (n.on.call("end", e, e.__data__, n.index, n.group), f());
1924
1924
  }
1925
1925
  function f() {
@@ -1929,15 +1929,15 @@ function Yo(e, t, n) {
1929
1929
  }
1930
1930
  }
1931
1931
  function et(e, t) {
1932
- var n = e.__transition, r, a, i = !0, u;
1932
+ var n = e.__transition, r, a, i = !0, l;
1933
1933
  if (n) {
1934
1934
  t = t == null ? null : t + "";
1935
- for (u in n) {
1936
- if ((r = n[u]).name !== t) {
1935
+ for (l in n) {
1936
+ if ((r = n[l]).name !== t) {
1937
1937
  i = !1;
1938
1938
  continue;
1939
1939
  }
1940
- a = r.state > $t && r.state < Rt, r.state = Ze, r.timer.stop(), r.on.call(a ? "interrupt" : "cancel", e, e.__data__, r.index, r.group), delete n[u];
1940
+ a = r.state > $t && r.state < Rt, r.state = Ze, r.timer.stop(), r.on.call(a ? "interrupt" : "cancel", e, e.__data__, r.index, r.group), delete n[l];
1941
1941
  }
1942
1942
  i && delete e.__transition;
1943
1943
  }
@@ -1953,9 +1953,9 @@ function Wo(e, t) {
1953
1953
  var a = ce(this, e), i = a.tween;
1954
1954
  if (i !== n) {
1955
1955
  r = n = i;
1956
- for (var u = 0, l = r.length; u < l; ++u)
1957
- if (r[u].name === t) {
1958
- r = r.slice(), r.splice(u, 1);
1956
+ for (var l = 0, u = r.length; l < u; ++l)
1957
+ if (r[l].name === t) {
1958
+ r = r.slice(), r.splice(l, 1);
1959
1959
  break;
1960
1960
  }
1961
1961
  }
@@ -1966,15 +1966,15 @@ function jo(e, t, n) {
1966
1966
  var r, a;
1967
1967
  if (typeof n != "function") throw new Error();
1968
1968
  return function() {
1969
- var i = ce(this, e), u = i.tween;
1970
- if (u !== r) {
1971
- a = (r = u).slice();
1972
- for (var l = { name: t, value: n }, f = 0, c = a.length; f < c; ++f)
1969
+ var i = ce(this, e), l = i.tween;
1970
+ if (l !== r) {
1971
+ a = (r = l).slice();
1972
+ for (var u = { name: t, value: n }, f = 0, c = a.length; f < c; ++f)
1973
1973
  if (a[f].name === t) {
1974
- a[f] = l;
1974
+ a[f] = u;
1975
1975
  break;
1976
1976
  }
1977
- f === c && a.push(l);
1977
+ f === c && a.push(u);
1978
1978
  }
1979
1979
  i.tween = a;
1980
1980
  };
@@ -1982,9 +1982,9 @@ function jo(e, t, n) {
1982
1982
  function Ho(e, t) {
1983
1983
  var n = this._id;
1984
1984
  if (e += "", arguments.length < 2) {
1985
- for (var r = ie(this.node(), n).tween, a = 0, i = r.length, u; a < i; ++a)
1986
- if ((u = r[a]).name === e)
1987
- return u.value;
1985
+ for (var r = ie(this.node(), n).tween, a = 0, i = r.length, l; a < i; ++a)
1986
+ if ((l = r[a]).name === e)
1987
+ return l.value;
1988
1988
  return null;
1989
1989
  }
1990
1990
  return this.each((t == null ? Wo : jo)(n, e, t));
@@ -1998,7 +1998,7 @@ function Dt(e, t, n) {
1998
1998
  return ie(a, r).value[t];
1999
1999
  };
2000
2000
  }
2001
- function Ln(e, t) {
2001
+ function In(e, t) {
2002
2002
  var n;
2003
2003
  return (typeof t == "number" ? ye : t instanceof qe ? Zt : (n = qe(t)) ? (t = n, Zt) : ko)(e, t);
2004
2004
  }
@@ -2015,33 +2015,33 @@ function Go(e) {
2015
2015
  function Qo(e, t, n) {
2016
2016
  var r, a = n + "", i;
2017
2017
  return function() {
2018
- var u = this.getAttribute(e);
2019
- return u === a ? null : u === r ? i : i = t(r = u, n);
2018
+ var l = this.getAttribute(e);
2019
+ return l === a ? null : l === r ? i : i = t(r = l, n);
2020
2020
  };
2021
2021
  }
2022
2022
  function Ko(e, t, n) {
2023
2023
  var r, a = n + "", i;
2024
2024
  return function() {
2025
- var u = this.getAttributeNS(e.space, e.local);
2026
- return u === a ? null : u === r ? i : i = t(r = u, n);
2025
+ var l = this.getAttributeNS(e.space, e.local);
2026
+ return l === a ? null : l === r ? i : i = t(r = l, n);
2027
2027
  };
2028
2028
  }
2029
2029
  function Jo(e, t, n) {
2030
2030
  var r, a, i;
2031
2031
  return function() {
2032
- var u, l = n(this), f;
2033
- return l == null ? void this.removeAttribute(e) : (u = this.getAttribute(e), f = l + "", u === f ? null : u === r && f === a ? i : (a = f, i = t(r = u, l)));
2032
+ var l, u = n(this), f;
2033
+ return u == null ? void this.removeAttribute(e) : (l = this.getAttribute(e), f = u + "", l === f ? null : l === r && f === a ? i : (a = f, i = t(r = l, u)));
2034
2034
  };
2035
2035
  }
2036
2036
  function Zo(e, t, n) {
2037
2037
  var r, a, i;
2038
2038
  return function() {
2039
- var u, l = n(this), f;
2040
- return l == null ? void this.removeAttributeNS(e.space, e.local) : (u = this.getAttributeNS(e.space, e.local), f = l + "", u === f ? null : u === r && f === a ? i : (a = f, i = t(r = u, l)));
2039
+ var l, u = n(this), f;
2040
+ return u == null ? void this.removeAttributeNS(e.space, e.local) : (l = this.getAttributeNS(e.space, e.local), f = u + "", l === f ? null : l === r && f === a ? i : (a = f, i = t(r = l, u)));
2041
2041
  };
2042
2042
  }
2043
2043
  function ei(e, t) {
2044
- var n = lt(e), r = n === "transform" ? No : Ln;
2044
+ var n = ut(e), r = n === "transform" ? No : In;
2045
2045
  return this.attrTween(e, typeof t == "function" ? (n.local ? Zo : Jo)(n, r, Dt(this, "attr." + e, t)) : t == null ? (n.local ? Go : Xo)(n) : (n.local ? Ko : Qo)(n, r, t));
2046
2046
  }
2047
2047
  function ti(e, t) {
@@ -2075,7 +2075,7 @@ function oi(e, t) {
2075
2075
  if (arguments.length < 2) return (n = this.tween(n)) && n._value;
2076
2076
  if (t == null) return this.tween(n, null);
2077
2077
  if (typeof t != "function") throw new Error();
2078
- var r = lt(e);
2078
+ var r = ut(e);
2079
2079
  return this.tween(n, (r.local ? ri : ai)(r, t));
2080
2080
  }
2081
2081
  function ii(e, t) {
@@ -2083,14 +2083,14 @@ function ii(e, t) {
2083
2083
  Pt(this, e).delay = +t.apply(this, arguments);
2084
2084
  };
2085
2085
  }
2086
- function ui(e, t) {
2086
+ function li(e, t) {
2087
2087
  return t = +t, function() {
2088
2088
  Pt(this, e).delay = t;
2089
2089
  };
2090
2090
  }
2091
- function li(e) {
2091
+ function ui(e) {
2092
2092
  var t = this._id;
2093
- return arguments.length ? this.each((typeof e == "function" ? ii : ui)(t, e)) : ie(this.node(), t).delay;
2093
+ return arguments.length ? this.each((typeof e == "function" ? ii : li)(t, e)) : ie(this.node(), t).delay;
2094
2094
  }
2095
2095
  function si(e, t) {
2096
2096
  return function() {
@@ -2112,36 +2112,36 @@ function hi(e, t) {
2112
2112
  ce(this, e).ease = t;
2113
2113
  };
2114
2114
  }
2115
- function di(e) {
2115
+ function pi(e) {
2116
2116
  var t = this._id;
2117
2117
  return arguments.length ? this.each(hi(t, e)) : ie(this.node(), t).ease;
2118
2118
  }
2119
- function pi(e, t) {
2119
+ function vi(e, t) {
2120
2120
  return function() {
2121
2121
  var n = t.apply(this, arguments);
2122
2122
  if (typeof n != "function") throw new Error();
2123
2123
  ce(this, e).ease = n;
2124
2124
  };
2125
2125
  }
2126
- function vi(e) {
2126
+ function di(e) {
2127
2127
  if (typeof e != "function") throw new Error();
2128
- return this.each(pi(this._id, e));
2128
+ return this.each(vi(this._id, e));
2129
2129
  }
2130
2130
  function mi(e) {
2131
2131
  typeof e != "function" && (e = hn(e));
2132
2132
  for (var t = this._groups, n = t.length, r = new Array(n), a = 0; a < n; ++a)
2133
- for (var i = t[a], u = i.length, l = r[a] = [], f, c = 0; c < u; ++c)
2134
- (f = i[c]) && e.call(f, f.__data__, c, i) && l.push(f);
2133
+ for (var i = t[a], l = i.length, u = r[a] = [], f, c = 0; c < l; ++c)
2134
+ (f = i[c]) && e.call(f, f.__data__, c, i) && u.push(f);
2135
2135
  return new ge(r, this._parents, this._name, this._id);
2136
2136
  }
2137
2137
  function gi(e) {
2138
2138
  if (e._id !== this._id) throw new Error();
2139
- for (var t = this._groups, n = e._groups, r = t.length, a = n.length, i = Math.min(r, a), u = new Array(r), l = 0; l < i; ++l)
2140
- for (var f = t[l], c = n[l], d = f.length, y = u[l] = new Array(d), w, A = 0; A < d; ++A)
2139
+ for (var t = this._groups, n = e._groups, r = t.length, a = n.length, i = Math.min(r, a), l = new Array(r), u = 0; u < i; ++u)
2140
+ for (var f = t[u], c = n[u], p = f.length, y = l[u] = new Array(p), w, A = 0; A < p; ++A)
2141
2141
  (w = f[A] || c[A]) && (y[A] = w);
2142
- for (; l < r; ++l)
2143
- u[l] = t[l];
2144
- return new ge(u, this._parents, this._name, this._id);
2142
+ for (; u < r; ++u)
2143
+ l[u] = t[u];
2144
+ return new ge(l, this._parents, this._name, this._id);
2145
2145
  }
2146
2146
  function yi(e) {
2147
2147
  return (e + "").trim().split(/^|\s+/).every(function(t) {
@@ -2152,8 +2152,8 @@ function yi(e) {
2152
2152
  function wi(e, t, n) {
2153
2153
  var r, a, i = yi(t) ? Pt : ce;
2154
2154
  return function() {
2155
- var u = i(this, e), l = u.on;
2156
- l !== r && (a = (r = l).copy()).on(t, n), u.on = a;
2155
+ var l = i(this, e), u = l.on;
2156
+ u !== r && (a = (r = u).copy()).on(t, n), l.on = a;
2157
2157
  };
2158
2158
  }
2159
2159
  function _i(e, t) {
@@ -2173,22 +2173,22 @@ function Ai() {
2173
2173
  function xi(e) {
2174
2174
  var t = this._name, n = this._id;
2175
2175
  typeof e != "function" && (e = Ut(e));
2176
- for (var r = this._groups, a = r.length, i = new Array(a), u = 0; u < a; ++u)
2177
- for (var l = r[u], f = l.length, c = i[u] = new Array(f), d, y, w = 0; w < f; ++w)
2178
- (d = l[w]) && (y = e.call(d, d.__data__, w, l)) && ("__data__" in d && (y.__data__ = d.__data__), c[w] = y, ct(c[w], t, n, w, c, ie(d, n)));
2176
+ for (var r = this._groups, a = r.length, i = new Array(a), l = 0; l < a; ++l)
2177
+ for (var u = r[l], f = u.length, c = i[l] = new Array(f), p, y, w = 0; w < f; ++w)
2178
+ (p = u[w]) && (y = e.call(p, p.__data__, w, u)) && ("__data__" in p && (y.__data__ = p.__data__), c[w] = y, ct(c[w], t, n, w, c, ie(p, n)));
2179
2179
  return new ge(i, this._parents, t, n);
2180
2180
  }
2181
2181
  function Mi(e) {
2182
2182
  var t = this._name, n = this._id;
2183
2183
  typeof e != "function" && (e = fn(e));
2184
- for (var r = this._groups, a = r.length, i = [], u = [], l = 0; l < a; ++l)
2185
- for (var f = r[l], c = f.length, d, y = 0; y < c; ++y)
2186
- if (d = f[y]) {
2187
- for (var w = e.call(d, d.__data__, y, f), A, C = ie(d, n), S = 0, $ = w.length; S < $; ++S)
2184
+ for (var r = this._groups, a = r.length, i = [], l = [], u = 0; u < a; ++u)
2185
+ for (var f = r[u], c = f.length, p, y = 0; y < c; ++y)
2186
+ if (p = f[y]) {
2187
+ for (var w = e.call(p, p.__data__, y, f), A, C = ie(p, n), S = 0, $ = w.length; S < $; ++S)
2188
2188
  (A = w[S]) && ct(A, t, n, S, w, C);
2189
- i.push(w), u.push(d);
2189
+ i.push(w), l.push(p);
2190
2190
  }
2191
- return new ge(i, u, t, n);
2191
+ return new ge(i, l, t, n);
2192
2192
  }
2193
2193
  var Ei = We.prototype.constructor;
2194
2194
  function Ci() {
@@ -2197,11 +2197,11 @@ function Ci() {
2197
2197
  function Si(e, t) {
2198
2198
  var n, r, a;
2199
2199
  return function() {
2200
- var i = Ne(this, e), u = (this.style.removeProperty(e), Ne(this, e));
2201
- return i === u ? null : i === n && u === r ? a : a = t(n = i, r = u);
2200
+ var i = Ne(this, e), l = (this.style.removeProperty(e), Ne(this, e));
2201
+ return i === l ? null : i === n && l === r ? a : a = t(n = i, r = l);
2202
2202
  };
2203
2203
  }
2204
- function In(e) {
2204
+ function Ln(e) {
2205
2205
  return function() {
2206
2206
  this.style.removeProperty(e);
2207
2207
  };
@@ -2209,47 +2209,47 @@ function In(e) {
2209
2209
  function ki(e, t, n) {
2210
2210
  var r, a = n + "", i;
2211
2211
  return function() {
2212
- var u = Ne(this, e);
2213
- return u === a ? null : u === r ? i : i = t(r = u, n);
2212
+ var l = Ne(this, e);
2213
+ return l === a ? null : l === r ? i : i = t(r = l, n);
2214
2214
  };
2215
2215
  }
2216
2216
  function $i(e, t, n) {
2217
2217
  var r, a, i;
2218
2218
  return function() {
2219
- var u = Ne(this, e), l = n(this), f = l + "";
2220
- return l == null && (f = l = (this.style.removeProperty(e), Ne(this, e))), u === f ? null : u === r && f === a ? i : (a = f, i = t(r = u, l));
2219
+ var l = Ne(this, e), u = n(this), f = u + "";
2220
+ return u == null && (f = u = (this.style.removeProperty(e), Ne(this, e))), l === f ? null : l === r && f === a ? i : (a = f, i = t(r = l, u));
2221
2221
  };
2222
2222
  }
2223
2223
  function Ri(e, t) {
2224
- var n, r, a, i = "style." + t, u = "end." + i, l;
2224
+ var n, r, a, i = "style." + t, l = "end." + i, u;
2225
2225
  return function() {
2226
- var f = ce(this, e), c = f.on, d = f.value[i] == null ? l || (l = In(t)) : void 0;
2227
- (c !== n || a !== d) && (r = (n = c).copy()).on(u, a = d), f.on = r;
2226
+ var f = ce(this, e), c = f.on, p = f.value[i] == null ? u || (u = Ln(t)) : void 0;
2227
+ (c !== n || a !== p) && (r = (n = c).copy()).on(l, a = p), f.on = r;
2228
2228
  };
2229
2229
  }
2230
2230
  function Ti(e, t, n) {
2231
- var r = (e += "") == "transform" ? To : Ln;
2232
- return t == null ? this.styleTween(e, Si(e, r)).on("end.style." + e, In(e)) : typeof t == "function" ? this.styleTween(e, $i(e, r, Dt(this, "style." + e, t))).each(Ri(this._id, e)) : this.styleTween(e, ki(e, r, t), n).on("end.style." + e, null);
2231
+ var r = (e += "") == "transform" ? To : In;
2232
+ return t == null ? this.styleTween(e, Si(e, r)).on("end.style." + e, Ln(e)) : typeof t == "function" ? this.styleTween(e, $i(e, r, Dt(this, "style." + e, t))).each(Ri(this._id, e)) : this.styleTween(e, ki(e, r, t), n).on("end.style." + e, null);
2233
2233
  }
2234
2234
  function Ni(e, t, n) {
2235
2235
  return function(r) {
2236
2236
  this.style.setProperty(e, t.call(this, r), n);
2237
2237
  };
2238
2238
  }
2239
- function Li(e, t, n) {
2239
+ function Ii(e, t, n) {
2240
2240
  var r, a;
2241
2241
  function i() {
2242
- var u = t.apply(this, arguments);
2243
- return u !== a && (r = (a = u) && Ni(e, u, n)), r;
2242
+ var l = t.apply(this, arguments);
2243
+ return l !== a && (r = (a = l) && Ni(e, l, n)), r;
2244
2244
  }
2245
2245
  return i._value = t, i;
2246
2246
  }
2247
- function Ii(e, t, n) {
2247
+ function Li(e, t, n) {
2248
2248
  var r = "style." + (e += "");
2249
2249
  if (arguments.length < 2) return (r = this.tween(r)) && r._value;
2250
2250
  if (t == null) return this.tween(r, null);
2251
2251
  if (typeof t != "function") throw new Error();
2252
- return this.tween(r, Li(e, t, n ?? ""));
2252
+ return this.tween(r, Ii(e, t, n ?? ""));
2253
2253
  }
2254
2254
  function Ui(e) {
2255
2255
  return function() {
@@ -2287,27 +2287,27 @@ function Di(e) {
2287
2287
  }
2288
2288
  function zi() {
2289
2289
  for (var e = this._name, t = this._id, n = Un(), r = this._groups, a = r.length, i = 0; i < a; ++i)
2290
- for (var u = r[i], l = u.length, f, c = 0; c < l; ++c)
2291
- if (f = u[c]) {
2292
- var d = ie(f, t);
2293
- ct(f, e, n, c, u, {
2294
- time: d.time + d.delay + d.duration,
2290
+ for (var l = r[i], u = l.length, f, c = 0; c < u; ++c)
2291
+ if (f = l[c]) {
2292
+ var p = ie(f, t);
2293
+ ct(f, e, n, c, l, {
2294
+ time: p.time + p.delay + p.duration,
2295
2295
  delay: 0,
2296
- duration: d.duration,
2297
- ease: d.ease
2296
+ duration: p.duration,
2297
+ ease: p.ease
2298
2298
  });
2299
2299
  }
2300
2300
  return new ge(r, this._parents, e, n);
2301
2301
  }
2302
2302
  function qi() {
2303
2303
  var e, t, n = this, r = n._id, a = n.size();
2304
- return new Promise(function(i, u) {
2305
- var l = { value: u }, f = { value: function() {
2304
+ return new Promise(function(i, l) {
2305
+ var u = { value: l }, f = { value: function() {
2306
2306
  --a === 0 && i();
2307
2307
  } };
2308
2308
  n.each(function() {
2309
- var c = ce(this, r), d = c.on;
2310
- d !== e && (t = (e = d).copy(), t._.cancel.push(l), t._.interrupt.push(l), t._.end.push(f)), c.on = t;
2309
+ var c = ce(this, r), p = c.on;
2310
+ p !== e && (t = (e = p).copy(), t._.cancel.push(u), t._.interrupt.push(u), t._.end.push(f)), c.on = t;
2311
2311
  }), a === 0 && i();
2312
2312
  });
2313
2313
  }
@@ -2318,38 +2318,38 @@ function ge(e, t, n, r) {
2318
2318
  function Un() {
2319
2319
  return ++Yi;
2320
2320
  }
2321
- var de = We.prototype;
2321
+ var pe = We.prototype;
2322
2322
  ge.prototype = {
2323
2323
  constructor: ge,
2324
2324
  select: xi,
2325
2325
  selectAll: Mi,
2326
- selectChild: de.selectChild,
2327
- selectChildren: de.selectChildren,
2326
+ selectChild: pe.selectChild,
2327
+ selectChildren: pe.selectChildren,
2328
2328
  filter: mi,
2329
2329
  merge: gi,
2330
2330
  selection: Ci,
2331
2331
  transition: zi,
2332
- call: de.call,
2333
- nodes: de.nodes,
2334
- node: de.node,
2335
- size: de.size,
2336
- empty: de.empty,
2337
- each: de.each,
2332
+ call: pe.call,
2333
+ nodes: pe.nodes,
2334
+ node: pe.node,
2335
+ size: pe.size,
2336
+ empty: pe.empty,
2337
+ each: pe.each,
2338
2338
  on: _i,
2339
2339
  attr: ei,
2340
2340
  attrTween: oi,
2341
2341
  style: Ti,
2342
- styleTween: Ii,
2342
+ styleTween: Li,
2343
2343
  text: Fi,
2344
2344
  textTween: Di,
2345
2345
  remove: Ai,
2346
2346
  tween: Ho,
2347
- delay: li,
2347
+ delay: ui,
2348
2348
  duration: fi,
2349
- ease: di,
2350
- easeVarying: vi,
2349
+ ease: pi,
2350
+ easeVarying: di,
2351
2351
  end: qi,
2352
- [Symbol.iterator]: de[Symbol.iterator]
2352
+ [Symbol.iterator]: pe[Symbol.iterator]
2353
2353
  };
2354
2354
  function Vi(e) {
2355
2355
  return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;
@@ -2371,8 +2371,8 @@ function Hi(e) {
2371
2371
  var t, n;
2372
2372
  e instanceof ge ? (t = e._id, e = e._name) : (t = Un(), (n = Wi).time = Ot(), e = e == null ? null : e + "");
2373
2373
  for (var r = this._groups, a = r.length, i = 0; i < a; ++i)
2374
- for (var u = r[i], l = u.length, f, c = 0; c < l; ++c)
2375
- (f = u[c]) && ct(f, e, t, c, u, n || ji(f, t));
2374
+ for (var l = r[i], u = l.length, f, c = 0; c < u; ++c)
2375
+ (f = l[c]) && ct(f, e, t, c, l, n || ji(f, t));
2376
2376
  return new ge(r, this._parents, e, t);
2377
2377
  }
2378
2378
  We.prototype.interrupt = Vo;
@@ -2431,9 +2431,9 @@ me.prototype = {
2431
2431
  return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
2432
2432
  }
2433
2433
  };
2434
- var ut = new me(1, 0, 0);
2434
+ var lt = new me(1, 0, 0);
2435
2435
  me.prototype;
2436
- function pt(e) {
2436
+ function vt(e) {
2437
2437
  e.stopImmediatePropagation();
2438
2438
  }
2439
2439
  function Be(e) {
@@ -2446,8 +2446,8 @@ function Qi() {
2446
2446
  var e = this;
2447
2447
  return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute("viewBox") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];
2448
2448
  }
2449
- function un() {
2450
- return this.__zoom || ut;
2449
+ function ln() {
2450
+ return this.__zoom || lt;
2451
2451
  }
2452
2452
  function Ki(e) {
2453
2453
  return -e.deltaY * (e.deltaMode === 1 ? 0.05 : e.deltaMode ? 1 : 2e-3) * (e.ctrlKey ? 10 : 1);
@@ -2456,80 +2456,80 @@ function Ji() {
2456
2456
  return navigator.maxTouchPoints || "ontouchstart" in this;
2457
2457
  }
2458
2458
  function Zi(e, t, n) {
2459
- var r = e.invertX(t[0][0]) - n[0][0], a = e.invertX(t[1][0]) - n[1][0], i = e.invertY(t[0][1]) - n[0][1], u = e.invertY(t[1][1]) - n[1][1];
2459
+ var r = e.invertX(t[0][0]) - n[0][0], a = e.invertX(t[1][0]) - n[1][0], i = e.invertY(t[0][1]) - n[0][1], l = e.invertY(t[1][1]) - n[1][1];
2460
2460
  return e.translate(
2461
2461
  a > r ? (r + a) / 2 : Math.min(0, r) || Math.max(0, a),
2462
- u > i ? (i + u) / 2 : Math.min(0, i) || Math.max(0, u)
2462
+ l > i ? (i + l) / 2 : Math.min(0, i) || Math.max(0, l)
2463
2463
  );
2464
2464
  }
2465
- function eu() {
2466
- var e = Gi, t = Qi, n = Zi, r = Ki, a = Ji, i = [0, 1 / 0], u = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], l = 250, f = Bo, c = It("start", "zoom", "end"), d, y, w, A = 500, C = 150, S = 0, $ = 10;
2465
+ function el() {
2466
+ var e = Gi, t = Qi, n = Zi, r = Ki, a = Ji, i = [0, 1 / 0], l = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], u = 250, f = Bo, c = Lt("start", "zoom", "end"), p, y, w, A = 500, C = 150, S = 0, $ = 10;
2467
2467
  function k(s) {
2468
- s.property("__zoom", un).on("wheel.zoom", K, { passive: !1 }).on("mousedown.zoom", X).on("dblclick.zoom", P).filter(a).on("touchstart.zoom", ne).on("touchmove.zoom", _).on("touchend.zoom touchcancel.zoom", M).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2468
+ s.property("__zoom", ln).on("wheel.zoom", K, { passive: !1 }).on("mousedown.zoom", X).on("dblclick.zoom", P).filter(a).on("touchstart.zoom", ne).on("touchmove.zoom", _).on("touchend.zoom touchcancel.zoom", M).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2469
2469
  }
2470
- k.transform = function(s, p, o, v) {
2470
+ k.transform = function(s, v, o, d) {
2471
2471
  var g = s.selection ? s.selection() : s;
2472
- g.property("__zoom", un), s !== g ? q(s, p, o, v) : g.interrupt().each(function() {
2473
- H(this, arguments).event(v).start().zoom(null, typeof p == "function" ? p.apply(this, arguments) : p).end();
2472
+ g.property("__zoom", ln), s !== g ? q(s, v, o, d) : g.interrupt().each(function() {
2473
+ H(this, arguments).event(d).start().zoom(null, typeof v == "function" ? v.apply(this, arguments) : v).end();
2474
2474
  });
2475
- }, k.scaleBy = function(s, p, o, v) {
2475
+ }, k.scaleBy = function(s, v, o, d) {
2476
2476
  k.scaleTo(s, function() {
2477
- var g = this.__zoom.k, h = typeof p == "function" ? p.apply(this, arguments) : p;
2477
+ var g = this.__zoom.k, h = typeof v == "function" ? v.apply(this, arguments) : v;
2478
2478
  return g * h;
2479
- }, o, v);
2480
- }, k.scaleTo = function(s, p, o, v) {
2479
+ }, o, d);
2480
+ }, k.scaleTo = function(s, v, o, d) {
2481
2481
  k.transform(s, function() {
2482
- var g = t.apply(this, arguments), h = this.__zoom, m = o == null ? z(g) : typeof o == "function" ? o.apply(this, arguments) : o, x = h.invert(m), R = typeof p == "function" ? p.apply(this, arguments) : p;
2483
- return n(D(F(h, R), m, x), g, u);
2484
- }, o, v);
2485
- }, k.translateBy = function(s, p, o, v) {
2482
+ var g = t.apply(this, arguments), h = this.__zoom, m = o == null ? z(g) : typeof o == "function" ? o.apply(this, arguments) : o, x = h.invert(m), R = typeof v == "function" ? v.apply(this, arguments) : v;
2483
+ return n(D(F(h, R), m, x), g, l);
2484
+ }, o, d);
2485
+ }, k.translateBy = function(s, v, o, d) {
2486
2486
  k.transform(s, function() {
2487
2487
  return n(this.__zoom.translate(
2488
- typeof p == "function" ? p.apply(this, arguments) : p,
2488
+ typeof v == "function" ? v.apply(this, arguments) : v,
2489
2489
  typeof o == "function" ? o.apply(this, arguments) : o
2490
- ), t.apply(this, arguments), u);
2491
- }, null, v);
2492
- }, k.translateTo = function(s, p, o, v, g) {
2490
+ ), t.apply(this, arguments), l);
2491
+ }, null, d);
2492
+ }, k.translateTo = function(s, v, o, d, g) {
2493
2493
  k.transform(s, function() {
2494
- var h = t.apply(this, arguments), m = this.__zoom, x = v == null ? z(h) : typeof v == "function" ? v.apply(this, arguments) : v;
2495
- return n(ut.translate(x[0], x[1]).scale(m.k).translate(
2496
- typeof p == "function" ? -p.apply(this, arguments) : -p,
2494
+ var h = t.apply(this, arguments), m = this.__zoom, x = d == null ? z(h) : typeof d == "function" ? d.apply(this, arguments) : d;
2495
+ return n(lt.translate(x[0], x[1]).scale(m.k).translate(
2496
+ typeof v == "function" ? -v.apply(this, arguments) : -v,
2497
2497
  typeof o == "function" ? -o.apply(this, arguments) : -o
2498
- ), h, u);
2499
- }, v, g);
2498
+ ), h, l);
2499
+ }, d, g);
2500
2500
  };
2501
- function F(s, p) {
2502
- return p = Math.max(i[0], Math.min(i[1], p)), p === s.k ? s : new me(p, s.x, s.y);
2501
+ function F(s, v) {
2502
+ return v = Math.max(i[0], Math.min(i[1], v)), v === s.k ? s : new me(v, s.x, s.y);
2503
2503
  }
2504
- function D(s, p, o) {
2505
- var v = p[0] - o[0] * s.k, g = p[1] - o[1] * s.k;
2506
- return v === s.x && g === s.y ? s : new me(s.k, v, g);
2504
+ function D(s, v, o) {
2505
+ var d = v[0] - o[0] * s.k, g = v[1] - o[1] * s.k;
2506
+ return d === s.x && g === s.y ? s : new me(s.k, d, g);
2507
2507
  }
2508
2508
  function z(s) {
2509
2509
  return [(+s[0][0] + +s[1][0]) / 2, (+s[0][1] + +s[1][1]) / 2];
2510
2510
  }
2511
- function q(s, p, o, v) {
2511
+ function q(s, v, o, d) {
2512
2512
  s.on("start.zoom", function() {
2513
- H(this, arguments).event(v).start();
2513
+ H(this, arguments).event(d).start();
2514
2514
  }).on("interrupt.zoom end.zoom", function() {
2515
- H(this, arguments).event(v).end();
2515
+ H(this, arguments).event(d).end();
2516
2516
  }).tween("zoom", function() {
2517
- var g = this, h = arguments, m = H(g, h).event(v), x = t.apply(g, h), R = o == null ? z(x) : typeof o == "function" ? o.apply(g, h) : o, E = Math.max(x[1][0] - x[0][0], x[1][1] - x[0][1]), b = g.__zoom, L = typeof p == "function" ? p.apply(g, h) : p, I = f(b.invert(R).concat(E / b.k), L.invert(R).concat(E / L.k));
2517
+ var g = this, h = arguments, m = H(g, h).event(d), x = t.apply(g, h), R = o == null ? z(x) : typeof o == "function" ? o.apply(g, h) : o, E = Math.max(x[1][0] - x[0][0], x[1][1] - x[0][1]), b = g.__zoom, I = typeof v == "function" ? v.apply(g, h) : v, L = f(b.invert(R).concat(E / b.k), I.invert(R).concat(E / I.k));
2518
2518
  return function(U) {
2519
- if (U === 1) U = L;
2519
+ if (U === 1) U = I;
2520
2520
  else {
2521
- var Y = I(U), ue = E / Y[2];
2522
- U = new me(ue, R[0] - Y[0] * ue, R[1] - Y[1] * ue);
2521
+ var Y = L(U), le = E / Y[2];
2522
+ U = new me(le, R[0] - Y[0] * le, R[1] - Y[1] * le);
2523
2523
  }
2524
2524
  m.zoom(null, U);
2525
2525
  };
2526
2526
  });
2527
2527
  }
2528
- function H(s, p, o) {
2529
- return !o && s.__zooming || new V(s, p);
2528
+ function H(s, v, o) {
2529
+ return !o && s.__zooming || new V(s, v);
2530
2530
  }
2531
- function V(s, p) {
2532
- this.that = s, this.args = p, this.active = 0, this.sourceEvent = null, this.extent = t.apply(s, p), this.taps = 0;
2531
+ function V(s, v) {
2532
+ this.that = s, this.args = v, this.active = 0, this.sourceEvent = null, this.extent = t.apply(s, v), this.taps = 0;
2533
2533
  }
2534
2534
  V.prototype = {
2535
2535
  event: function(s) {
@@ -2538,14 +2538,14 @@ function eu() {
2538
2538
  start: function() {
2539
2539
  return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
2540
2540
  },
2541
- zoom: function(s, p) {
2542
- return this.mouse && s !== "mouse" && (this.mouse[1] = p.invert(this.mouse[0])), this.touch0 && s !== "touch" && (this.touch0[1] = p.invert(this.touch0[0])), this.touch1 && s !== "touch" && (this.touch1[1] = p.invert(this.touch1[0])), this.that.__zoom = p, this.emit("zoom"), this;
2541
+ zoom: function(s, v) {
2542
+ return this.mouse && s !== "mouse" && (this.mouse[1] = v.invert(this.mouse[0])), this.touch0 && s !== "touch" && (this.touch0[1] = v.invert(this.touch0[0])), this.touch1 && s !== "touch" && (this.touch1[1] = v.invert(this.touch1[0])), this.that.__zoom = v, this.emit("zoom"), this;
2543
2543
  },
2544
2544
  end: function() {
2545
2545
  return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
2546
2546
  },
2547
2547
  emit: function(s) {
2548
- var p = pe(this.that).datum();
2548
+ var v = ve(this.that).datum();
2549
2549
  c.call(
2550
2550
  s,
2551
2551
  this.that,
@@ -2555,78 +2555,78 @@ function eu() {
2555
2555
  transform: this.that.__zoom,
2556
2556
  dispatch: c
2557
2557
  }),
2558
- p
2558
+ v
2559
2559
  );
2560
2560
  }
2561
2561
  };
2562
- function K(s, ...p) {
2562
+ function K(s, ...v) {
2563
2563
  if (!e.apply(this, arguments)) return;
2564
- var o = H(this, p).event(s), v = this.__zoom, g = Math.max(i[0], Math.min(i[1], v.k * Math.pow(2, r.apply(this, arguments)))), h = xe(s);
2564
+ var o = H(this, v).event(s), d = this.__zoom, g = Math.max(i[0], Math.min(i[1], d.k * Math.pow(2, r.apply(this, arguments)))), h = xe(s);
2565
2565
  if (o.wheel)
2566
- (o.mouse[0][0] !== h[0] || o.mouse[0][1] !== h[1]) && (o.mouse[1] = v.invert(o.mouse[0] = h)), clearTimeout(o.wheel);
2566
+ (o.mouse[0][0] !== h[0] || o.mouse[0][1] !== h[1]) && (o.mouse[1] = d.invert(o.mouse[0] = h)), clearTimeout(o.wheel);
2567
2567
  else {
2568
- if (v.k === g) return;
2569
- o.mouse = [h, v.invert(h)], et(this), o.start();
2568
+ if (d.k === g) return;
2569
+ o.mouse = [h, d.invert(h)], et(this), o.start();
2570
2570
  }
2571
- Be(s), o.wheel = setTimeout(m, C), o.zoom("mouse", n(D(F(v, g), o.mouse[0], o.mouse[1]), o.extent, u));
2571
+ Be(s), o.wheel = setTimeout(m, C), o.zoom("mouse", n(D(F(d, g), o.mouse[0], o.mouse[1]), o.extent, l));
2572
2572
  function m() {
2573
2573
  o.wheel = null, o.end();
2574
2574
  }
2575
2575
  }
2576
- function X(s, ...p) {
2576
+ function X(s, ...v) {
2577
2577
  if (w || !e.apply(this, arguments)) return;
2578
- var o = s.currentTarget, v = H(this, p, !0).event(s), g = pe(s.view).on("mousemove.zoom", R, !0).on("mouseup.zoom", E, !0), h = xe(s, o), m = s.clientX, x = s.clientY;
2579
- lo(s.view), pt(s), v.mouse = [h, this.__zoom.invert(h)], et(this), v.start();
2578
+ var o = s.currentTarget, d = H(this, v, !0).event(s), g = ve(s.view).on("mousemove.zoom", R, !0).on("mouseup.zoom", E, !0), h = xe(s, o), m = s.clientX, x = s.clientY;
2579
+ uo(s.view), vt(s), d.mouse = [h, this.__zoom.invert(h)], et(this), d.start();
2580
2580
  function R(b) {
2581
- if (Be(b), !v.moved) {
2582
- var L = b.clientX - m, I = b.clientY - x;
2583
- v.moved = L * L + I * I > S;
2581
+ if (Be(b), !d.moved) {
2582
+ var I = b.clientX - m, L = b.clientY - x;
2583
+ d.moved = I * I + L * L > S;
2584
2584
  }
2585
- v.event(b).zoom("mouse", n(D(v.that.__zoom, v.mouse[0] = xe(b, o), v.mouse[1]), v.extent, u));
2585
+ d.event(b).zoom("mouse", n(D(d.that.__zoom, d.mouse[0] = xe(b, o), d.mouse[1]), d.extent, l));
2586
2586
  }
2587
2587
  function E(b) {
2588
- g.on("mousemove.zoom mouseup.zoom", null), so(b.view, v.moved), Be(b), v.event(b).end();
2588
+ g.on("mousemove.zoom mouseup.zoom", null), so(b.view, d.moved), Be(b), d.event(b).end();
2589
2589
  }
2590
2590
  }
2591
- function P(s, ...p) {
2591
+ function P(s, ...v) {
2592
2592
  if (e.apply(this, arguments)) {
2593
- var o = this.__zoom, v = xe(s.changedTouches ? s.changedTouches[0] : s, this), g = o.invert(v), h = o.k * (s.shiftKey ? 0.5 : 2), m = n(D(F(o, h), v, g), t.apply(this, p), u);
2594
- Be(s), l > 0 ? pe(this).transition().duration(l).call(q, m, v, s) : pe(this).call(k.transform, m, v, s);
2593
+ var o = this.__zoom, d = xe(s.changedTouches ? s.changedTouches[0] : s, this), g = o.invert(d), h = o.k * (s.shiftKey ? 0.5 : 2), m = n(D(F(o, h), d, g), t.apply(this, v), l);
2594
+ Be(s), u > 0 ? ve(this).transition().duration(u).call(q, m, d, s) : ve(this).call(k.transform, m, d, s);
2595
2595
  }
2596
2596
  }
2597
- function ne(s, ...p) {
2597
+ function ne(s, ...v) {
2598
2598
  if (e.apply(this, arguments)) {
2599
- var o = s.touches, v = o.length, g = H(this, p, s.changedTouches.length === v).event(s), h, m, x, R;
2600
- for (pt(s), m = 0; m < v; ++m)
2601
- x = o[m], R = xe(x, this), R = [R, this.__zoom.invert(R), x.identifier], g.touch0 ? !g.touch1 && g.touch0[2] !== R[2] && (g.touch1 = R, g.taps = 0) : (g.touch0 = R, h = !0, g.taps = 1 + !!d);
2602
- d && (d = clearTimeout(d)), h && (g.taps < 2 && (y = R[0], d = setTimeout(function() {
2603
- d = null;
2599
+ var o = s.touches, d = o.length, g = H(this, v, s.changedTouches.length === d).event(s), h, m, x, R;
2600
+ for (vt(s), m = 0; m < d; ++m)
2601
+ x = o[m], R = xe(x, this), R = [R, this.__zoom.invert(R), x.identifier], g.touch0 ? !g.touch1 && g.touch0[2] !== R[2] && (g.touch1 = R, g.taps = 0) : (g.touch0 = R, h = !0, g.taps = 1 + !!p);
2602
+ p && (p = clearTimeout(p)), h && (g.taps < 2 && (y = R[0], p = setTimeout(function() {
2603
+ p = null;
2604
2604
  }, A)), et(this), g.start());
2605
2605
  }
2606
2606
  }
2607
- function _(s, ...p) {
2607
+ function _(s, ...v) {
2608
2608
  if (this.__zooming) {
2609
- var o = H(this, p).event(s), v = s.changedTouches, g = v.length, h, m, x, R;
2609
+ var o = H(this, v).event(s), d = s.changedTouches, g = d.length, h, m, x, R;
2610
2610
  for (Be(s), h = 0; h < g; ++h)
2611
- m = v[h], x = xe(m, this), o.touch0 && o.touch0[2] === m.identifier ? o.touch0[0] = x : o.touch1 && o.touch1[2] === m.identifier && (o.touch1[0] = x);
2611
+ m = d[h], x = xe(m, this), o.touch0 && o.touch0[2] === m.identifier ? o.touch0[0] = x : o.touch1 && o.touch1[2] === m.identifier && (o.touch1[0] = x);
2612
2612
  if (m = o.that.__zoom, o.touch1) {
2613
- var E = o.touch0[0], b = o.touch0[1], L = o.touch1[0], I = o.touch1[1], U = (U = L[0] - E[0]) * U + (U = L[1] - E[1]) * U, Y = (Y = I[0] - b[0]) * Y + (Y = I[1] - b[1]) * Y;
2614
- m = F(m, Math.sqrt(U / Y)), x = [(E[0] + L[0]) / 2, (E[1] + L[1]) / 2], R = [(b[0] + I[0]) / 2, (b[1] + I[1]) / 2];
2613
+ var E = o.touch0[0], b = o.touch0[1], I = o.touch1[0], L = o.touch1[1], U = (U = I[0] - E[0]) * U + (U = I[1] - E[1]) * U, Y = (Y = L[0] - b[0]) * Y + (Y = L[1] - b[1]) * Y;
2614
+ m = F(m, Math.sqrt(U / Y)), x = [(E[0] + I[0]) / 2, (E[1] + I[1]) / 2], R = [(b[0] + L[0]) / 2, (b[1] + L[1]) / 2];
2615
2615
  } else if (o.touch0) x = o.touch0[0], R = o.touch0[1];
2616
2616
  else return;
2617
- o.zoom("touch", n(D(m, x, R), o.extent, u));
2617
+ o.zoom("touch", n(D(m, x, R), o.extent, l));
2618
2618
  }
2619
2619
  }
2620
- function M(s, ...p) {
2620
+ function M(s, ...v) {
2621
2621
  if (this.__zooming) {
2622
- var o = H(this, p).event(s), v = s.changedTouches, g = v.length, h, m;
2623
- for (pt(s), w && clearTimeout(w), w = setTimeout(function() {
2622
+ var o = H(this, v).event(s), d = s.changedTouches, g = d.length, h, m;
2623
+ for (vt(s), w && clearTimeout(w), w = setTimeout(function() {
2624
2624
  w = null;
2625
2625
  }, A), h = 0; h < g; ++h)
2626
- m = v[h], o.touch0 && o.touch0[2] === m.identifier ? delete o.touch0 : o.touch1 && o.touch1[2] === m.identifier && delete o.touch1;
2626
+ m = d[h], o.touch0 && o.touch0[2] === m.identifier ? delete o.touch0 : o.touch1 && o.touch1[2] === m.identifier && delete o.touch1;
2627
2627
  if (o.touch1 && !o.touch0 && (o.touch0 = o.touch1, delete o.touch1), o.touch0) o.touch0[1] = this.__zoom.invert(o.touch0[0]);
2628
2628
  else if (o.end(), o.taps === 2 && (m = xe(m, this), Math.hypot(y[0] - m[0], y[1] - m[1]) < $)) {
2629
- var x = pe(this).on("dblclick.zoom");
2629
+ var x = ve(this).on("dblclick.zoom");
2630
2630
  x && x.apply(this, arguments);
2631
2631
  }
2632
2632
  }
@@ -2642,11 +2642,11 @@ function eu() {
2642
2642
  }, k.scaleExtent = function(s) {
2643
2643
  return arguments.length ? (i[0] = +s[0], i[1] = +s[1], k) : [i[0], i[1]];
2644
2644
  }, k.translateExtent = function(s) {
2645
- return arguments.length ? (u[0][0] = +s[0][0], u[1][0] = +s[1][0], u[0][1] = +s[0][1], u[1][1] = +s[1][1], k) : [[u[0][0], u[0][1]], [u[1][0], u[1][1]]];
2645
+ return arguments.length ? (l[0][0] = +s[0][0], l[1][0] = +s[1][0], l[0][1] = +s[0][1], l[1][1] = +s[1][1], k) : [[l[0][0], l[0][1]], [l[1][0], l[1][1]]];
2646
2646
  }, k.constrain = function(s) {
2647
2647
  return arguments.length ? (n = s, k) : n;
2648
2648
  }, k.duration = function(s) {
2649
- return arguments.length ? (l = +s, k) : l;
2649
+ return arguments.length ? (u = +s, k) : u;
2650
2650
  }, k.interpolate = function(s) {
2651
2651
  return arguments.length ? (f = s, k) : f;
2652
2652
  }, k.on = function() {
@@ -2658,7 +2658,7 @@ function eu() {
2658
2658
  return arguments.length ? ($ = +s, k) : $;
2659
2659
  }, k;
2660
2660
  }
2661
- const tu = /* @__PURE__ */ _e({
2661
+ const tl = /* @__PURE__ */ _e({
2662
2662
  __name: "scatterplot",
2663
2663
  props: {
2664
2664
  pointCount: { type: Number, default: 5e3 },
@@ -2674,46 +2674,46 @@ const tu = /* @__PURE__ */ _e({
2674
2674
  },
2675
2675
  emits: ["updateColorMap"],
2676
2676
  setup(e, { emit: t }) {
2677
- const n = e, r = T(null), a = T(null), i = T(null), u = T(null);
2678
- let l = null, f = null, c = null, d = [], y = null, w = null, A = null, C = 0, S = 0, $ = 1;
2679
- Q(() => n.colorMap, p, { deep: !0 });
2677
+ const n = e, r = T(null), a = T(null), i = T(null), l = T(null);
2678
+ let u = null, f = null, c = null, p = [], y = null, w = null, A = null, C = 0, S = 0, $ = 1;
2679
+ Q(() => n.colorMap, v, { deep: !0 });
2680
2680
  function k(o) {
2681
2681
  if (!o || o.length < 7) return [1, 0, 0];
2682
- const v = parseInt(o.slice(1, 3), 16) / 255, g = parseInt(o.slice(3, 5), 16) / 255, h = parseInt(o.slice(5, 7), 16) / 255;
2683
- return [v, g, h].some(Number.isNaN) ? [1, 0, 0] : [v, g, h];
2682
+ const d = parseInt(o.slice(1, 3), 16) / 255, g = parseInt(o.slice(3, 5), 16) / 255, h = parseInt(o.slice(5, 7), 16) / 255;
2683
+ return [d, g, h].some(Number.isNaN) ? [1, 0, 0] : [d, g, h];
2684
2684
  }
2685
- const F = (o, v, g) => o + (v - o) * g;
2686
- function D(o, v) {
2685
+ const F = (o, d, g) => o + (d - o) * g;
2686
+ function D(o, d) {
2687
2687
  const g = o.parentElement;
2688
- g && ($ = window.devicePixelRatio || 1, C = g.clientWidth || 800, S = g.clientHeight || 400, o.style.width = `${C}px`, o.style.height = `${S}px`, o.width = Math.round(C * $), o.height = Math.round(S * $), v.viewport(0, 0, o.width, o.height));
2688
+ g && ($ = window.devicePixelRatio || 1, C = g.clientWidth || 800, S = g.clientHeight || 400, o.style.width = `${C}px`, o.style.height = `${S}px`, o.width = Math.round(C * $), o.height = Math.round(S * $), d.viewport(0, 0, o.width, o.height));
2689
2689
  }
2690
- function z(o, v) {
2691
- var g, h, m, x, R, E, b, L, I, U, Y, ue;
2692
- const J = (E = (R = (x = (m = (h = (g = n.metaData) == null ? void 0 : g.row_groups) == null ? void 0 : h[0]) == null ? void 0 : m.columns) == null ? void 0 : x[0]) == null ? void 0 : R.meta_data) == null ? void 0 : E.statistics, le = (ue = (Y = (U = (I = (L = (b = n.metaData) == null ? void 0 : b.row_groups) == null ? void 0 : L[0]) == null ? void 0 : I.columns) == null ? void 0 : U[1]) == null ? void 0 : Y.meta_data) == null ? void 0 : ue.statistics, fe = Number((J == null ? void 0 : J.min_value) ?? -1), be = Number((J == null ? void 0 : J.max_value) ?? 1), Z = Number((le == null ? void 0 : le.min_value) ?? -1), he = Number((le == null ? void 0 : le.max_value) ?? 1), Ae = (fe + be) / 2, Bn = (Z + he) / 2, Fn = Math.max(1e-9, be - fe), On = Math.max(1e-9, he - Z), Pn = 2 / Math.max(Fn, On), Dn = y.x / o * 2 - 1, zn = -y.y / v * 2 + 1, ft = y.k * Pn, qn = Dn - ft * Ae, Yn = zn - ft * Bn;
2690
+ function z(o, d) {
2691
+ var g, h, m, x, R, E, b, I, L, U, Y, le;
2692
+ const J = (E = (R = (x = (m = (h = (g = n.metaData) == null ? void 0 : g.row_groups) == null ? void 0 : h[0]) == null ? void 0 : m.columns) == null ? void 0 : x[0]) == null ? void 0 : R.meta_data) == null ? void 0 : E.statistics, ue = (le = (Y = (U = (L = (I = (b = n.metaData) == null ? void 0 : b.row_groups) == null ? void 0 : I[0]) == null ? void 0 : L.columns) == null ? void 0 : U[1]) == null ? void 0 : Y.meta_data) == null ? void 0 : le.statistics, fe = Number((J == null ? void 0 : J.min_value) ?? -1), be = Number((J == null ? void 0 : J.max_value) ?? 1), Z = Number((ue == null ? void 0 : ue.min_value) ?? -1), he = Number((ue == null ? void 0 : ue.max_value) ?? 1), Ae = (fe + be) / 2, Bn = (Z + he) / 2, Fn = Math.max(1e-9, be - fe), On = Math.max(1e-9, he - Z), Pn = 2 / Math.max(Fn, On), Dn = y.x / o * 2 - 1, zn = -y.y / d * 2 + 1, ft = y.k * Pn, qn = Dn - ft * Ae, Yn = zn - ft * Bn;
2693
2693
  return { s: ft, tx: qn, ty: Yn };
2694
2694
  }
2695
- function q(o, v, g, h) {
2696
- const { s: m, tx: x, ty: R } = z(g, h), E = o / g * 2 - 1, b = -(v / h * 2 - 1), L = (E - x) / m, I = (b - R) / m;
2697
- return { x: L, y: I };
2695
+ function q(o, d, g, h) {
2696
+ const { s: m, tx: x, ty: R } = z(g, h), E = o / g * 2 - 1, b = -(d / h * 2 - 1), I = (E - x) / m, L = (b - R) / m;
2697
+ return { x: I, y: L };
2698
2698
  }
2699
- function H(o, v, g, h, m) {
2699
+ function H(o, d, g, h, m) {
2700
2700
  if (!o.length || !y) return null;
2701
- const x = q(v, g, h, m);
2701
+ const x = q(d, g, h, m);
2702
2702
  let R = 1 / 0, E = null;
2703
2703
  for (const b of o) {
2704
- const L = b.x - x.x, I = b.y - x.y, U = Math.hypot(L, I), Y = 3 / (y.k / 2);
2704
+ const I = b.x - x.x, L = b.y - x.y, U = Math.hypot(I, L), Y = 3 / (y.k / 2);
2705
2705
  U < R && U < Y && (R = U, E = b);
2706
2706
  }
2707
2707
  return E;
2708
2708
  }
2709
2709
  function V() {
2710
- var o, v;
2710
+ var o, d;
2711
2711
  const g = [], h = ((o = n.metaData) == null ? void 0 : o.schema) || [], m = n.data;
2712
2712
  for (let x = 0; x < m.length; x++) {
2713
- const R = m[x], E = Number(R[0]), b = Number(R[1]), L = {};
2714
- for (let I = 0; I < h.length; I++) {
2715
- const U = ((v = h[I]) == null ? void 0 : v.name) ?? `col_${I}`;
2716
- L[U] = R[I];
2713
+ const R = m[x], E = Number(R[0]), b = Number(R[1]), I = {};
2714
+ for (let L = 0; L < h.length; L++) {
2715
+ const U = ((d = h[L]) == null ? void 0 : d.name) ?? `col_${L}`;
2716
+ I[U] = R[L];
2717
2717
  }
2718
2718
  g.push({
2719
2719
  x: E,
@@ -2722,14 +2722,14 @@ const tu = /* @__PURE__ */ _e({
2722
2722
  rawY: b,
2723
2723
  color: [0.5, 0.5, 0.5],
2724
2724
  id: x,
2725
- attrs: L
2725
+ attrs: I
2726
2726
  });
2727
2727
  }
2728
2728
  return g;
2729
2729
  }
2730
- function K(o, v, g) {
2730
+ function K(o, d, g) {
2731
2731
  const h = o.createShader(o.VERTEX_SHADER);
2732
- if (o.shaderSource(h, v), o.compileShader(h), !o.getShaderParameter(h, o.COMPILE_STATUS))
2732
+ if (o.shaderSource(h, d), o.compileShader(h), !o.getShaderParameter(h, o.COMPILE_STATUS))
2733
2733
  return console.error("Vertex shader error:", o.getShaderInfoLog(h)), null;
2734
2734
  const m = o.createShader(o.FRAGMENT_SHADER);
2735
2735
  if (o.shaderSource(m, g), o.compileShader(m), !o.getShaderParameter(m, o.COMPILE_STATUS))
@@ -2737,7 +2737,7 @@ const tu = /* @__PURE__ */ _e({
2737
2737
  const x = o.createProgram();
2738
2738
  return o.attachShader(x, h), o.attachShader(x, m), o.linkProgram(x), o.getProgramParameter(x, o.LINK_STATUS) ? (o.validateProgram(x), o.getProgramParameter(x, o.VALIDATE_STATUS) ? x : (console.error("Program validate error:", o.getProgramInfoLog(x)), null)) : (console.error("Program link error:", o.getProgramInfoLog(x)), null);
2739
2739
  }
2740
- function X(o, v, g) {
2740
+ function X(o, d, g) {
2741
2741
  if (!g.length) return null;
2742
2742
  const h = o.createBuffer();
2743
2743
  o.bindBuffer(o.ARRAY_BUFFER, h);
@@ -2747,32 +2747,32 @@ const tu = /* @__PURE__ */ _e({
2747
2747
  o.bindBuffer(o.ARRAY_BUFFER, x);
2748
2748
  const R = new Float32Array(g.flatMap((U) => U.color));
2749
2749
  o.bufferData(o.ARRAY_BUFFER, R, o.STATIC_DRAW);
2750
- const E = o.getAttribLocation(v, "a_position"), b = o.getAttribLocation(v, "a_color"), L = o.getUniformLocation(v, "u_viewMatrix"), I = o.getUniformLocation(v, "u_pointSize");
2750
+ const E = o.getAttribLocation(d, "a_position"), b = o.getAttribLocation(d, "a_color"), I = o.getUniformLocation(d, "u_viewMatrix"), L = o.getUniformLocation(d, "u_pointSize");
2751
2751
  return {
2752
- program: v,
2752
+ program: d,
2753
2753
  positionBuffer: h,
2754
2754
  colorBuffer: x,
2755
2755
  positionAttributeLocation: E,
2756
2756
  colorAttributeLocation: b,
2757
- viewMatrixLocation: L,
2758
- pointSizeLocation: I,
2757
+ viewMatrixLocation: I,
2758
+ pointSizeLocation: L,
2759
2759
  count: g.length
2760
2760
  };
2761
2761
  }
2762
- function P(o, v, g, h = null) {
2763
- if (!o || !v || !y) return;
2762
+ function P(o, d, g, h = null) {
2763
+ if (!o || !d || !y) return;
2764
2764
  const {
2765
2765
  program: m,
2766
2766
  positionBuffer: x,
2767
2767
  colorBuffer: R,
2768
2768
  positionAttributeLocation: E,
2769
2769
  colorAttributeLocation: b,
2770
- viewMatrixLocation: L,
2771
- pointSizeLocation: I,
2770
+ viewMatrixLocation: I,
2771
+ pointSizeLocation: L,
2772
2772
  count: U
2773
- } = v;
2773
+ } = d;
2774
2774
  o.clearColor(0, 0, 0, 1), o.clear(o.COLOR_BUFFER_BIT), o.useProgram(m), o.enableVertexAttribArray(E), o.bindBuffer(o.ARRAY_BUFFER, x), o.vertexAttribPointer(E, 2, o.FLOAT, !1, 0, 0), o.enableVertexAttribArray(b), o.bindBuffer(o.ARRAY_BUFFER, R), o.vertexAttribPointer(b, 3, o.FLOAT, !1, 0, 0);
2775
- const Y = o.canvas.clientWidth, ue = o.canvas.clientHeight, { s: J, tx: le, ty: fe } = z(Y, ue), be = new Float32Array([
2775
+ const Y = o.canvas.clientWidth, le = o.canvas.clientHeight, { s: J, tx: ue, ty: fe } = z(Y, le), be = new Float32Array([
2776
2776
  J,
2777
2777
  0,
2778
2778
  0,
@@ -2785,31 +2785,31 @@ const tu = /* @__PURE__ */ _e({
2785
2785
  0,
2786
2786
  1,
2787
2787
  0,
2788
- le,
2788
+ ue,
2789
2789
  fe,
2790
2790
  0,
2791
2791
  1
2792
2792
  ]);
2793
- if (o.uniformMatrix4fv(L, !1, be), o.uniform1f(I, Math.max(1.5, g * Math.sqrt(y.k) * $)), o.enable(o.BLEND), o.blendFunc(o.SRC_ALPHA, o.ONE_MINUS_SRC_ALPHA), o.drawArrays(o.POINTS, 0, U), h) {
2793
+ if (o.uniformMatrix4fv(I, !1, be), o.uniform1f(L, Math.max(1.5, g * Math.sqrt(y.k) * $)), o.enable(o.BLEND), o.blendFunc(o.SRC_ALPHA, o.ONE_MINUS_SRC_ALPHA), o.drawArrays(o.POINTS, 0, U), h) {
2794
2794
  const Z = o.createBuffer();
2795
2795
  o.bindBuffer(o.ARRAY_BUFFER, Z), o.bufferData(o.ARRAY_BUFFER, new Float32Array([h.x, h.y]), o.STATIC_DRAW), o.vertexAttribPointer(E, 2, o.FLOAT, !1, 0, 0);
2796
2796
  const he = o.createBuffer();
2797
- o.bindBuffer(o.ARRAY_BUFFER, he), o.bufferData(o.ARRAY_BUFFER, new Float32Array([1, 1, 0.5]), o.STATIC_DRAW), o.vertexAttribPointer(b, 3, o.FLOAT, !1, 0, 0), o.uniform1f(I, Math.max(2.5, g * Math.sqrt(y.k) * 2.5 * $)), o.drawArrays(o.POINTS, 0, 1);
2797
+ o.bindBuffer(o.ARRAY_BUFFER, he), o.bufferData(o.ARRAY_BUFFER, new Float32Array([1, 1, 0.5]), o.STATIC_DRAW), o.vertexAttribPointer(b, 3, o.FLOAT, !1, 0, 0), o.uniform1f(L, Math.max(2.5, g * Math.sqrt(y.k) * 2.5 * $)), o.drawArrays(o.POINTS, 0, 1);
2798
2798
  const Ae = o.createBuffer();
2799
- o.bindBuffer(o.ARRAY_BUFFER, Ae), o.bufferData(o.ARRAY_BUFFER, new Float32Array([1, 0.8, 0.2]), o.STATIC_DRAW), o.vertexAttribPointer(b, 3, o.FLOAT, !1, 0, 0), o.uniform1f(I, Math.max(3, g * Math.sqrt(y.k) * 3 * $)), o.drawArrays(o.POINTS, 0, 1), o.deleteBuffer(Z), o.deleteBuffer(he), o.deleteBuffer(Ae);
2799
+ o.bindBuffer(o.ARRAY_BUFFER, Ae), o.bufferData(o.ARRAY_BUFFER, new Float32Array([1, 0.8, 0.2]), o.STATIC_DRAW), o.vertexAttribPointer(b, 3, o.FLOAT, !1, 0, 0), o.uniform1f(L, Math.max(3, g * Math.sqrt(y.k) * 3 * $)), o.drawArrays(o.POINTS, 0, 1), o.deleteBuffer(Z), o.deleteBuffer(he), o.deleteBuffer(Ae);
2800
2800
  }
2801
2801
  }
2802
2802
  function ne() {
2803
2803
  if (!(!a.value || !r.value)) {
2804
- if (l = a.value.getContext("webgl", {
2804
+ if (u = a.value.getContext("webgl", {
2805
2805
  preserveDrawingBuffer: !0,
2806
2806
  antialias: !0,
2807
2807
  alpha: !0
2808
- }) || a.value.getContext("experimental-webgl"), !l) {
2808
+ }) || a.value.getContext("experimental-webgl"), !u) {
2809
2809
  console.error("WebGL not supported");
2810
2810
  return;
2811
2811
  }
2812
- D(a.value, l), f = K(l, `
2812
+ D(a.value, u), f = K(u, `
2813
2813
  attribute vec2 a_position;
2814
2814
  attribute vec3 a_color;
2815
2815
  uniform mat4 u_viewMatrix;
@@ -2830,54 +2830,54 @@ const tu = /* @__PURE__ */ _e({
2830
2830
  if (dist > 0.4) { alpha = 1.0 - (dist - 0.4) * 2.0; }
2831
2831
  gl_FragColor = vec4(v_color, alpha);
2832
2832
  }
2833
- `), f && (l.useProgram(f), d = V(), c = X(l, f, d), y = ut.translate(C / 2, S / 2).scale(1), w = eu().scaleExtent([0.1, 100]).on("zoom", (o) => {
2834
- y = o.transform, P(l, c, 2, A);
2835
- }), pe(a.value).call(w), requestAnimationFrame(() => P(l, c, 2, null)), a.value.addEventListener("mousemove", _), a.value.addEventListener("mouseleave", M));
2833
+ `), f && (u.useProgram(f), p = V(), c = X(u, f, p), y = lt.translate(C / 2, S / 2).scale(1), w = el().scaleExtent([0.1, 100]).on("zoom", (o) => {
2834
+ y = o.transform, P(u, c, 2, A);
2835
+ }), ve(a.value).call(w), requestAnimationFrame(() => P(u, c, 2, null)), a.value.addEventListener("mousemove", _), a.value.addEventListener("mouseleave", M));
2836
2836
  }
2837
2837
  }
2838
2838
  function _(o) {
2839
- var v, g, h, m, x;
2839
+ var d, g, h, m, x;
2840
2840
  if (!a.value) return;
2841
- const R = a.value.getBoundingClientRect(), E = o.clientX - R.left, b = o.clientY - R.top, L = H(d, E, b, C, S);
2842
- if (L) {
2843
- const I = i.value;
2844
- I.style.left = `${o.clientX + 15}px`, I.style.top = `${o.clientY - 15}px`, I.style.opacity = "1";
2845
- const U = ((v = n.metaData) == null ? void 0 : v.schema) || [], Y = U.findIndex((Z) => (Z == null ? void 0 : Z.name) === n.colorMode), ue = n.colorMode, J = Y >= 0 ? (h = L.attrs) == null ? void 0 : h[((g = U[Y]) == null ? void 0 : g.name) || ""] : void 0;
2846
- let le = "";
2841
+ const R = a.value.getBoundingClientRect(), E = o.clientX - R.left, b = o.clientY - R.top, I = H(p, E, b, C, S);
2842
+ if (I) {
2843
+ const L = i.value;
2844
+ L.style.left = `${o.clientX + 15}px`, L.style.top = `${o.clientY - 15}px`, L.style.opacity = "1";
2845
+ const U = ((d = n.metaData) == null ? void 0 : d.schema) || [], Y = U.findIndex((Z) => (Z == null ? void 0 : Z.name) === n.colorMode), le = n.colorMode, J = Y >= 0 ? (h = I.attrs) == null ? void 0 : h[((g = U[Y]) == null ? void 0 : g.name) || ""] : void 0;
2846
+ let ue = "";
2847
2847
  const fe = n.selectedMapEntries;
2848
- J !== void 0 && (fe instanceof Map ? le = fe.has(J) ? String(J) : "" : Array.isArray(fe) && (le = fe.some(([Z]) => Z === J) ? String(J) : ""));
2848
+ J !== void 0 && (fe instanceof Map ? ue = fe.has(J) ? String(J) : "" : Array.isArray(fe) && (ue = fe.some(([Z]) => Z === J) ? String(J) : ""));
2849
2849
  const be = [];
2850
2850
  for (let Z = 2; Z < Math.min(U.length, 7); Z++) {
2851
2851
  const he = (m = U[Z]) == null ? void 0 : m.name;
2852
2852
  if (!he) continue;
2853
- const Ae = (x = L.attrs) == null ? void 0 : x[he];
2853
+ const Ae = (x = I.attrs) == null ? void 0 : x[he];
2854
2854
  be.push(`<div><em>${he}</em>: ${Ae === void 0 ? "—" : String(Ae)}</div>`);
2855
2855
  }
2856
- I.innerHTML = `
2857
- <strong>(${L.rawX.toFixed(2)}, ${L.rawY.toFixed(2)})</strong>
2858
- ${Y >= 0 ? `<div><b>${ue}</b>: ${le || String(J)}</div>` : ""}
2856
+ L.innerHTML = `
2857
+ <strong>(${I.rawX.toFixed(2)}, ${I.rawY.toFixed(2)})</strong>
2858
+ ${Y >= 0 ? `<div><b>${le}</b>: ${ue || String(J)}</div>` : ""}
2859
2859
  ${be.join("")}
2860
- `, A = L, P(l, c, 2, A);
2860
+ `, A = I, P(u, c, 2, A);
2861
2861
  } else
2862
- i.value && (i.value.style.opacity = "0"), A !== null && (A = null, P(l, c, 2, null));
2862
+ i.value && (i.value.style.opacity = "0"), A !== null && (A = null, P(u, c, 2, null));
2863
2863
  }
2864
2864
  function M() {
2865
- i.value && (i.value.style.opacity = "0"), A !== null && (A = null, P(l, c, 2, null));
2865
+ i.value && (i.value.style.opacity = "0"), A !== null && (A = null, P(u, c, 2, null));
2866
2866
  }
2867
2867
  function s() {
2868
- !a.value || !l || (D(a.value, l), P(l, c, 2, A));
2868
+ !a.value || !u || (D(a.value, u), P(u, c, 2, A));
2869
2869
  }
2870
- function p() {
2870
+ function v() {
2871
2871
  var o;
2872
- if (!l || !c || !n.data.length) return;
2873
- const v = (((o = n.metaData) == null ? void 0 : o.schema) || []).findIndex((E) => (E == null ? void 0 : E.name) === n.colorMode), g = v >= 0 ? v : -1, h = k(n.startColor), m = k(n.endColor);
2872
+ if (!u || !c || !n.data.length) return;
2873
+ const d = (((o = n.metaData) == null ? void 0 : o.schema) || []).findIndex((E) => (E == null ? void 0 : E.name) === n.colorMode), g = d >= 0 ? d : -1, h = k(n.startColor), m = k(n.endColor);
2874
2874
  let x = [];
2875
2875
  if (n.colorMap && n.colorMap.size > 0 && g >= 0)
2876
2876
  x = n.data.flatMap((E) => n.colorMap.get(E[g]) || [0.6, 0.6, 0.6]);
2877
2877
  else if (g >= 0) {
2878
- const E = n.data.map((I) => Number(I[g])).filter(Number.isFinite), b = Math.min(...E), L = Math.max(...E) - b || 1;
2879
- x = n.data.flatMap((I) => {
2880
- const U = Number(I[g]), Y = Math.max(0, Math.min(1, (U - b) / L));
2878
+ const E = n.data.map((L) => Number(L[g])).filter(Number.isFinite), b = Math.min(...E), I = Math.max(...E) - b || 1;
2879
+ x = n.data.flatMap((L) => {
2880
+ const U = Number(L[g]), Y = Math.max(0, Math.min(1, (U - b) / I));
2881
2881
  return [
2882
2882
  F(h[0], m[0], Y),
2883
2883
  F(h[1], m[1], Y),
@@ -2888,25 +2888,25 @@ const tu = /* @__PURE__ */ _e({
2888
2888
  const E = k(n.singleColor);
2889
2889
  x = n.data.flatMap(() => E);
2890
2890
  }
2891
- l.deleteBuffer(c.colorBuffer);
2892
- const R = l.createBuffer();
2893
- l.bindBuffer(l.ARRAY_BUFFER, R), l.bufferData(l.ARRAY_BUFFER, new Float32Array(x), l.STATIC_DRAW), c.colorBuffer = R, P(l, c, 2, A);
2891
+ u.deleteBuffer(c.colorBuffer);
2892
+ const R = u.createBuffer();
2893
+ u.bindBuffer(u.ARRAY_BUFFER, R), u.bufferData(u.ARRAY_BUFFER, new Float32Array(x), u.STATIC_DRAW), c.colorBuffer = R, P(u, c, 2, A);
2894
2894
  }
2895
2895
  return Q(() => n.forceRegenerate, () => {
2896
- !l || !f || (d = V(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = X(l, f, d), y = ut, a.value && w && pe(a.value).call(w.transform, y), p(), P(l, c, 2, null));
2896
+ !u || !f || (p = V(), c && (u.deleteBuffer(c.positionBuffer), u.deleteBuffer(c.colorBuffer)), c = X(u, f, p), y = lt, a.value && w && ve(a.value).call(w.transform, y), v(), P(u, c, 2, null));
2897
2897
  }), Q(() => n.data, () => {
2898
- if (!l || !f) {
2898
+ if (!u || !f) {
2899
2899
  ne();
2900
2900
  return;
2901
2901
  }
2902
- d = V(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = X(l, f, d), p(), P(l, c, 2, null);
2903
- }), Q(() => n.colorMode, p), Q([() => n.startColor, () => n.endColor, () => n.singleColor], p), Q(() => n.pointCount, (o) => {
2904
- !l || !f || (d = V(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = X(l, f, d), p(), P(l, c, 2, null));
2902
+ p = V(), c && (u.deleteBuffer(c.positionBuffer), u.deleteBuffer(c.colorBuffer)), c = X(u, f, p), v(), P(u, c, 2, null);
2903
+ }), Q(() => n.colorMode, v), Q([() => n.startColor, () => n.endColor, () => n.singleColor], v), Q(() => n.pointCount, (o) => {
2904
+ !u || !f || (p = V(), c && (u.deleteBuffer(c.positionBuffer), u.deleteBuffer(c.colorBuffer)), c = X(u, f, p), v(), P(u, c, 2, null));
2905
2905
  }), Ve(() => {
2906
2906
  window.addEventListener("resize", s);
2907
2907
  }), Tt(() => {
2908
- a.value && (a.value.removeEventListener("mousemove", _), a.value.removeEventListener("mouseleave", M)), window.removeEventListener("resize", s), l && c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer), f && l.deleteProgram(f));
2909
- }), (o, v) => (B(), O("div", {
2908
+ a.value && (a.value.removeEventListener("mousemove", _), a.value.removeEventListener("mouseleave", M)), window.removeEventListener("resize", s), u && c && (u.deleteBuffer(c.positionBuffer), u.deleteBuffer(c.colorBuffer), f && u.deleteProgram(f));
2909
+ }), (o, d) => (B(), O("div", {
2910
2910
  class: "scatterplot-container",
2911
2911
  ref_key: "containerRef",
2912
2912
  ref: r
@@ -2923,16 +2923,16 @@ const tu = /* @__PURE__ */ _e({
2923
2923
  Re(N("div", {
2924
2924
  id: "debug",
2925
2925
  ref_key: "debugRef",
2926
- ref: u
2926
+ ref: l
2927
2927
  }, null, 512), [
2928
2928
  [Vn, !1]
2929
2929
  ])
2930
2930
  ], 512));
2931
2931
  }
2932
- }), nu = /* @__PURE__ */ Ie(tu, [["__scopeId", "data-v-aa7d57bd"]]), ru = { class: "control-panel" }, au = { class: "color-option" }, ou = ["value"], iu = {
2932
+ }), nl = /* @__PURE__ */ Le(tl, [["__scopeId", "data-v-aa7d57bd"]]), rl = { class: "control-panel" }, al = { class: "color-option" }, ol = ["value"], il = {
2933
2933
  key: 0,
2934
2934
  class: "color-option"
2935
- }, uu = { class: "legend" }, lu = { class: "legend-label" }, su = /* @__PURE__ */ _e({
2935
+ }, ll = { class: "legend" }, ul = { class: "legend-label" }, sl = /* @__PURE__ */ _e({
2936
2936
  __name: "control",
2937
2937
  props: {
2938
2938
  pointCount: { type: Number, default: 5e3 },
@@ -2954,42 +2954,42 @@ const tu = /* @__PURE__ */ _e({
2954
2954
  "updateColorMap"
2955
2955
  ],
2956
2956
  setup(e, { emit: t }) {
2957
- const n = e, r = t, a = T(n.pointCount), i = T(n.colorMode), u = T(n.startColor), l = T(n.endColor), f = T(n.singleColor), c = j(
2957
+ const n = e, r = t, a = T(n.pointCount), i = T(n.colorMode), l = T(n.startColor), u = T(n.endColor), f = T(n.singleColor), c = j(
2958
2958
  () => n.colorMapMap instanceof Map ? Array.from(n.colorMapMap.keys()) : []
2959
- ), d = j(
2959
+ ), p = j(
2960
2960
  () => n.colorMapMap instanceof Map ? n.colorMapMap.get(i.value) : void 0
2961
- ), y = j(() => d.value ? Array.from(d.value.entries()) : []);
2961
+ ), y = j(() => p.value ? Array.from(p.value.entries()) : []);
2962
2962
  function w(C) {
2963
2963
  if (!C) return "rgb(150,150,150)";
2964
2964
  const [S, $, k] = C;
2965
2965
  return `rgb(${Math.round(S * 255)}, ${Math.round($ * 255)}, ${Math.round(k * 255)})`;
2966
2966
  }
2967
2967
  function A() {
2968
- r("update:colorMode", i.value), r("updateColorMap", [i.value, d.value ?? /* @__PURE__ */ new Map()]), r("update:startColor", u.value), r("update:endColor", l.value), r("update:singleColor", f.value);
2968
+ r("update:colorMode", i.value), r("updateColorMap", [i.value, p.value ?? /* @__PURE__ */ new Map()]), r("update:startColor", l.value), r("update:endColor", u.value), r("update:singleColor", f.value);
2969
2969
  }
2970
- return Q(() => n.pointCount, (C) => a.value = C), Q(() => n.colorMode, (C) => i.value = C), Q(() => n.startColor, (C) => u.value = C), Q(() => n.endColor, (C) => l.value = C), Q(() => n.singleColor, (C) => f.value = C), Q(i, A), Q(() => n.colorMapMap, () => {
2970
+ return Q(() => n.pointCount, (C) => a.value = C), Q(() => n.colorMode, (C) => i.value = C), Q(() => n.startColor, (C) => l.value = C), Q(() => n.endColor, (C) => u.value = C), Q(() => n.singleColor, (C) => f.value = C), Q(i, A), Q(() => n.colorMapMap, () => {
2971
2971
  n.colorMapMap instanceof Map && (i.value !== "random" && !n.colorMapMap.has(i.value) && (i.value = "random"), A());
2972
- }), (C, S) => (B(), O("div", ru, [
2972
+ }), (C, S) => (B(), O("div", rl, [
2973
2973
  S[4] || (S[4] = N("h3", null, "Color Controls", -1)),
2974
- N("div", au, [
2974
+ N("div", al, [
2975
2975
  S[2] || (S[2] = N("label", { for: "colorMode" }, "Color Mode:", -1)),
2976
2976
  Re(N("select", {
2977
2977
  id: "colorMode",
2978
2978
  "onUpdate:modelValue": S[0] || (S[0] = ($) => i.value = $)
2979
2979
  }, [
2980
2980
  S[1] || (S[1] = N("option", { value: "random" }, "all", -1)),
2981
- (B(!0), O(re, null, ve(c.value, ($) => (B(), O("option", {
2981
+ (B(!0), O(re, null, de(c.value, ($) => (B(), O("option", {
2982
2982
  key: $,
2983
2983
  value: $
2984
- }, G($), 9, ou))), 128))
2984
+ }, G($), 9, ol))), 128))
2985
2985
  ], 512), [
2986
2986
  [_t, i.value]
2987
2987
  ])
2988
2988
  ]),
2989
- y.value.length ? (B(), O("div", iu, [
2990
- N("div", uu, [
2989
+ y.value.length ? (B(), O("div", il, [
2990
+ N("div", ll, [
2991
2991
  S[3] || (S[3] = N("h4", null, "Legend", -1)),
2992
- (B(!0), O(re, null, ve(y.value, ([$, k], F) => (B(), O("div", {
2992
+ (B(!0), O(re, null, de(y.value, ([$, k], F) => (B(), O("div", {
2993
2993
  class: "legend-item",
2994
2994
  key: `${$}-${F}`
2995
2995
  }, [
@@ -2997,13 +2997,13 @@ const tu = /* @__PURE__ */ _e({
2997
2997
  class: "legend-color",
2998
2998
  style: Wn({ backgroundColor: w(k) })
2999
2999
  }, null, 4),
3000
- N("div", lu, G($), 1)
3000
+ N("div", ul, G($), 1)
3001
3001
  ]))), 128))
3002
3002
  ])
3003
3003
  ])) : Ee("", !0)
3004
3004
  ]));
3005
3005
  }
3006
- }), cu = /* @__PURE__ */ Ie(su, [["__scopeId", "data-v-832c88a6"]]), fu = { class: "app-container" }, vt = "UMAP_1", mt = "UMAP_2", hu = /* @__PURE__ */ _e({
3006
+ }), cl = /* @__PURE__ */ Le(sl, [["__scopeId", "data-v-832c88a6"]]), fl = { class: "app-container" }, dt = "UMAP_1", mt = "UMAP_2", hl = /* @__PURE__ */ _e({
3007
3007
  __name: "wrapper",
3008
3008
  props: {
3009
3009
  apiUrl: {},
@@ -3013,33 +3013,33 @@ const tu = /* @__PURE__ */ _e({
3013
3013
  srcFileId: {}
3014
3014
  },
3015
3015
  setup(e) {
3016
- const t = e, n = T(5e3), r = T("random"), a = T("#ff0000"), i = T("#0000ff"), u = T("#4285f4"), l = T(!1), f = T(0), c = T([]), d = T(null), y = T(/* @__PURE__ */ new Map()), w = T(/* @__PURE__ */ new Map()), A = T([]), C = Lt(), S = T(null), $ = T(null), k = j(() => C.formatIdFromUrl(t.srcUrl));
3016
+ const t = e, n = T(5e3), r = T("random"), a = T("#ff0000"), i = T("#0000ff"), l = T("#4285f4"), u = T(!1), f = T(0), c = T([]), p = T(null), y = T(/* @__PURE__ */ new Map()), w = T(/* @__PURE__ */ new Map()), A = T([]), C = It(), S = T(null), $ = T(null), k = j(() => C.formatIdFromUrl(t.srcUrl));
3017
3017
  Q(
3018
3018
  () => {
3019
- var p, o, v, g;
3019
+ var v, o, d, g;
3020
3020
  return {
3021
3021
  srcUrl: t.srcUrl,
3022
3022
  srcFileType: t.srcFileType,
3023
3023
  srcFileId: t.srcFileId,
3024
- pkgId: ((o = (p = t.pkg) == null ? void 0 : p.content) == null ? void 0 : o.id) || "",
3025
- pkgType: ((g = (v = t.pkg) == null ? void 0 : v.content) == null ? void 0 : g.packageType) || "",
3024
+ pkgId: ((o = (v = t.pkg) == null ? void 0 : v.content) == null ? void 0 : o.id) || "",
3025
+ pkgType: ((g = (d = t.pkg) == null ? void 0 : d.content) == null ? void 0 : g.packageType) || "",
3026
3026
  apiUrl: t.apiUrl || ""
3027
3027
  };
3028
3028
  },
3029
- async ({ srcUrl: p, srcFileType: o, srcFileId: v, pkgId: g, pkgType: h, apiUrl: m }) => {
3029
+ async ({ srcUrl: v, srcFileType: o, srcFileId: d, pkgId: g, pkgType: h, apiUrl: m }) => {
3030
3030
  var x, R, E;
3031
3031
  try {
3032
- if (c.value = [], d.value = null, await F(), p) {
3033
- const b = o ?? (p.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
3034
- await D(p, b, k.value), await z();
3032
+ if (c.value = [], p.value = null, await F(), v) {
3033
+ const b = o ?? (v.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
3034
+ await D(v, b, k.value), await z();
3035
3035
  return;
3036
3036
  }
3037
3037
  if (g && m) {
3038
3038
  await K(g, m);
3039
3039
  const b = (E = (R = (x = A.value) == null ? void 0 : x[0]) == null ? void 0 : R.content) == null ? void 0 : E.id;
3040
3040
  if (!b) return;
3041
- const L = await X(g, b, m);
3042
- await D(L, h === "CSV" ? "csv" : "parquet", b), await z();
3041
+ const I = await X(g, b, m);
3042
+ await D(I, h === "CSV" ? "csv" : "parquet", b), await z();
3043
3043
  }
3044
3044
  } catch (b) {
3045
3045
  console.error("[UMAP Wrapper] Load failed:", (b == null ? void 0 : b.message) || b);
@@ -3053,35 +3053,35 @@ const tu = /* @__PURE__ */ _e({
3053
3053
  });
3054
3054
  async function F() {
3055
3055
  if (S.value) return;
3056
- const { connectionId: p } = await C.createConnection(`umap_${Date.now()}`);
3057
- S.value = p;
3056
+ const { connectionId: v } = await C.createConnection(`umap_${Date.now()}`);
3057
+ S.value = v;
3058
3058
  }
3059
- async function D(p, o, v) {
3060
- const g = `umap_${v.replace(/[^a-zA-Z0-9_]/g, "_")}`;
3061
- $.value = await C.loadFile(p, o, g, {}, S.value, v);
3059
+ async function D(v, o, d) {
3060
+ const g = `umap_${d.replace(/[^a-zA-Z0-9_]/g, "_")}`;
3061
+ $.value = await C.loadFile(v, o, g, {}, S.value, d);
3062
3062
  }
3063
3063
  async function z() {
3064
- var p, o, v, g;
3064
+ var v, o, d, g;
3065
3065
  if (!$.value || !S.value) return;
3066
- const h = await s($.value), m = h.filter((E) => /DOUBLE|HUGEINT|BIGINT|INTEGER|DECIMAL|FLOAT|REAL/i.test(E.type)), x = h.some((E) => E.name === vt) ? vt : ((p = m[0]) == null ? void 0 : p.name) || ((o = h[0]) == null ? void 0 : o.name), R = h.some((E) => E.name === mt) ? mt : ((v = m[1]) == null ? void 0 : v.name) || ((g = h[1]) == null ? void 0 : g.name) || x;
3066
+ const h = await s($.value), m = h.filter((E) => /DOUBLE|HUGEINT|BIGINT|INTEGER|DECIMAL|FLOAT|REAL/i.test(E.type)), x = h.some((E) => E.name === dt) ? dt : ((v = m[0]) == null ? void 0 : v.name) || ((o = h[0]) == null ? void 0 : o.name), R = h.some((E) => E.name === mt) ? mt : ((d = m[1]) == null ? void 0 : d.name) || ((g = h[1]) == null ? void 0 : g.name) || x;
3067
3067
  await q(x, R, h.map((E) => E.name)), await H(h, x, R);
3068
3068
  }
3069
- async function q(p = vt, o = mt, v) {
3069
+ async function q(v = dt, o = mt, d) {
3070
3070
  var g;
3071
3071
  if (!$.value || !S.value) return;
3072
- const h = (v || (await s($.value)).map((b) => b.name)).filter((b) => b !== p && b !== o), m = `SELECT ${[
3073
- `CAST(${P(p)} AS DOUBLE) AS __x`,
3072
+ const h = (d || (await s($.value)).map((b) => b.name)).filter((b) => b !== v && b !== o), m = `SELECT ${[
3073
+ `CAST(${P(v)} AS DOUBLE) AS __x`,
3074
3074
  `CAST(${P(o)} AS DOUBLE) AS __y`,
3075
3075
  ...h.map((b) => P(b))
3076
3076
  ].join(", ")} FROM ${$.value} LIMIT ${n.value}`, x = await C.executeQuery(m, S.value);
3077
- c.value = x.map((b) => [b.__x, b.__y, ...h.map((L) => b[L])]);
3077
+ c.value = x.map((b) => [b.__x, b.__y, ...h.map((I) => b[I])]);
3078
3078
  const R = `
3079
- SELECT min(${P(p)}) AS xmin, max(${P(p)}) AS xmax,
3079
+ SELECT min(${P(v)}) AS xmin, max(${P(v)}) AS xmax,
3080
3080
  min(${P(o)}) AS ymin, max(${P(o)}) AS ymax
3081
3081
  FROM ${$.value}
3082
3082
  `, E = ((g = await C.executeQuery(R, S.value)) == null ? void 0 : g[0]) || { xmin: -1, xmax: 1, ymin: -1, ymax: 1 };
3083
- d.value = {
3084
- schema: [{ name: p }, { name: o }, ...h.map((b) => ({ name: b }))],
3083
+ p.value = {
3084
+ schema: [{ name: v }, { name: o }, ...h.map((b) => ({ name: b }))],
3085
3085
  row_groups: [
3086
3086
  {
3087
3087
  columns: [
@@ -3092,11 +3092,11 @@ const tu = /* @__PURE__ */ _e({
3092
3092
  ]
3093
3093
  };
3094
3094
  }
3095
- async function H(p, o, v) {
3095
+ async function H(v, o, d) {
3096
3096
  w.value = /* @__PURE__ */ new Map();
3097
3097
  const g = ["#4269d0", "#efb118", "#ff725c", "#6cc5b0", "#3ca951", "#ff8ab7", "#a463f2", "#97bbf5", "#9c6b4e", "#9498a0"], h = (m) => /DOUBLE|HUGEINT|BIGINT|INTEGER|DECIMAL|FLOAT|REAL/i.test(m);
3098
- for (const m of p) {
3099
- if (m.name === o || m.name === v) {
3098
+ for (const m of v) {
3099
+ if (m.name === o || m.name === d) {
3100
3100
  w.value.set(m.name, /* @__PURE__ */ new Map());
3101
3101
  continue;
3102
3102
  }
@@ -3104,10 +3104,10 @@ const tu = /* @__PURE__ */ _e({
3104
3104
  w.value.set(m.name, /* @__PURE__ */ new Map());
3105
3105
  else {
3106
3106
  const x = `SELECT DISTINCT ${P(m.name)} AS v FROM ${$.value} LIMIT 10000`, R = (await C.executeQuery(x, S.value)).map((b) => b.v).filter((b) => b != null), E = /* @__PURE__ */ new Map();
3107
- R.forEach((b, L) => E.set(b, _(g[L % g.length]))), w.value.set(m.name, E);
3107
+ R.forEach((b, I) => E.set(b, _(g[I % g.length]))), w.value.set(m.name, E);
3108
3108
  }
3109
3109
  }
3110
- (d.value || (d.value = {})).key_value_metadata = Array.from(w.value.keys()).map((m) => {
3110
+ (p.value || (p.value = {})).key_value_metadata = Array.from(w.value.keys()).map((m) => {
3111
3111
  var x;
3112
3112
  return {
3113
3113
  key: m,
@@ -3116,69 +3116,69 @@ const tu = /* @__PURE__ */ _e({
3116
3116
  }), r.value !== "random" && !w.value.has(r.value) && (r.value = "random");
3117
3117
  }
3118
3118
  async function V() {
3119
- const { useGetToken: p } = await import("./useGetToken-DaxIvkvl-BZdrKpSJ.mjs");
3120
- return p();
3119
+ const { useGetToken: v } = await import("./useGetToken-DaxIvkvl-BZdrKpSJ.mjs");
3120
+ return v();
3121
3121
  }
3122
- async function K(p, o) {
3123
- const v = await V(), g = `${o}/packages/${p}/view?api_key=${v}`, h = await fetch(g);
3122
+ async function K(v, o) {
3123
+ const d = await V(), g = `${o}/packages/${v}/view?api_key=${d}`, h = await fetch(g);
3124
3124
  if (!h.ok) throw new Error(`view failed: ${h.status}`);
3125
3125
  A.value = await h.json();
3126
3126
  }
3127
- async function X(p, o, v) {
3128
- const g = await V(), h = `${v}/packages/${p}/files/${o}?api_key=${g}`, m = await fetch(h);
3127
+ async function X(v, o, d) {
3128
+ const g = await V(), h = `${d}/packages/${v}/files/${o}?api_key=${g}`, m = await fetch(h);
3129
3129
  if (!m.ok) throw new Error(`file url failed: ${m.status}`);
3130
3130
  return (await m.json()).url;
3131
3131
  }
3132
- function P(p) {
3133
- return `"${p.replace(/"/g, '""')}"`;
3132
+ function P(v) {
3133
+ return `"${v.replace(/"/g, '""')}"`;
3134
3134
  }
3135
3135
  function ne() {
3136
- l.value = !l.value, f.value++;
3136
+ u.value = !u.value, f.value++;
3137
3137
  }
3138
- function _(p) {
3138
+ function _(v) {
3139
3139
  try {
3140
- if (!p || p.length < 7) return [1, 0, 0];
3141
- const o = parseInt(p.slice(1, 3), 16) / 255, v = parseInt(p.slice(3, 5), 16) / 255, g = parseInt(p.slice(5, 7), 16) / 255;
3142
- return Number.isNaN(o) || Number.isNaN(v) || Number.isNaN(g) ? [1, 0, 0] : [o, v, g];
3140
+ if (!v || v.length < 7) return [1, 0, 0];
3141
+ const o = parseInt(v.slice(1, 3), 16) / 255, d = parseInt(v.slice(3, 5), 16) / 255, g = parseInt(v.slice(5, 7), 16) / 255;
3142
+ return Number.isNaN(o) || Number.isNaN(d) || Number.isNaN(g) ? [1, 0, 0] : [o, d, g];
3143
3143
  } catch {
3144
3144
  return [1, 0, 0];
3145
3145
  }
3146
3146
  }
3147
- function M(p) {
3148
- y.value = p[1];
3147
+ function M(v) {
3148
+ y.value = v[1];
3149
3149
  }
3150
- async function s(p) {
3151
- return (await C.executeQuery(`PRAGMA table_info(${p});`, S.value)).map((o) => ({ name: o.name, type: o.type }));
3150
+ async function s(v) {
3151
+ return (await C.executeQuery(`PRAGMA table_info(${v});`, S.value)).map((o) => ({ name: o.name, type: o.type }));
3152
3152
  }
3153
3153
  return Ve(async () => {
3154
3154
  await F();
3155
3155
  }), Tt(async () => {
3156
3156
  S.value && await C.closeConnection(S.value);
3157
- }), (p, o) => (B(), O("div", fu, [
3158
- (B(), sn(nu, {
3157
+ }), (v, o) => (B(), O("div", fl, [
3158
+ (B(), sn(nl, {
3159
3159
  data: c.value,
3160
- metaData: d.value,
3160
+ metaData: p.value,
3161
3161
  pointCount: n.value,
3162
3162
  "color-map": y.value,
3163
3163
  colorMode: r.value,
3164
3164
  startColor: a.value,
3165
3165
  endColor: i.value,
3166
- singleColor: u.value,
3166
+ singleColor: l.value,
3167
3167
  selectedMapEntries: Array.from(y.value),
3168
- forceRegenerate: l.value,
3168
+ forceRegenerate: u.value,
3169
3169
  key: f.value
3170
3170
  }, null, 8, ["data", "metaData", "pointCount", "color-map", "colorMode", "startColor", "endColor", "singleColor", "selectedMapEntries", "forceRegenerate"])),
3171
- oe(cu, {
3171
+ oe(cl, {
3172
3172
  pointCount: n.value,
3173
- "onUpdate:pointCount": o[0] || (o[0] = (v) => n.value = v),
3173
+ "onUpdate:pointCount": o[0] || (o[0] = (d) => n.value = d),
3174
3174
  colorMode: r.value,
3175
- "onUpdate:colorMode": o[1] || (o[1] = (v) => r.value = v),
3175
+ "onUpdate:colorMode": o[1] || (o[1] = (d) => r.value = d),
3176
3176
  startColor: a.value,
3177
- "onUpdate:startColor": o[2] || (o[2] = (v) => a.value = v),
3177
+ "onUpdate:startColor": o[2] || (o[2] = (d) => a.value = d),
3178
3178
  endColor: i.value,
3179
- "onUpdate:endColor": o[3] || (o[3] = (v) => i.value = v),
3180
- singleColor: u.value,
3181
- "onUpdate:singleColor": o[4] || (o[4] = (v) => u.value = v),
3179
+ "onUpdate:endColor": o[3] || (o[3] = (d) => i.value = d),
3180
+ singleColor: l.value,
3181
+ "onUpdate:singleColor": o[4] || (o[4] = (d) => l.value = d),
3182
3182
  "color-scheme": y.value,
3183
3183
  "color-map-map": w.value,
3184
3184
  onRegenerate: ne,
@@ -3186,10 +3186,10 @@ const tu = /* @__PURE__ */ _e({
3186
3186
  }, null, 8, ["pointCount", "colorMode", "startColor", "endColor", "singleColor", "color-scheme", "color-map-map"])
3187
3187
  ]));
3188
3188
  }
3189
- }), du = /* @__PURE__ */ Ie(hu, [["__scopeId", "data-v-1515ae28"]]), pu = { class: "pp-container" }, vu = { class: "pp-header" }, mu = { class: "pp-controls" }, gu = { class: "pp-field" }, yu = ["disabled"], wu = { class: "pp-field" }, _u = ["disabled"], bu = ["value"], Au = ["value"], xu = ["disabled"], Mu = ["value"], Eu = { class: "pp-field" }, Cu = ["disabled"], Su = {
3189
+ }), pl = /* @__PURE__ */ Le(hl, [["__scopeId", "data-v-1515ae28"]]), vl = { class: "pp-container" }, dl = { class: "pp-header" }, ml = { class: "pp-controls" }, gl = { class: "pp-field" }, yl = ["disabled"], wl = { class: "pp-field" }, _l = ["disabled"], bl = ["value"], Al = ["value"], xl = ["disabled"], Ml = ["value"], El = { class: "pp-field" }, Cl = ["disabled"], Sl = {
3190
3190
  key: 0,
3191
3191
  class: "pp-message"
3192
- }, gt = 100, yt = 12, wt = "(other)", ku = /* @__PURE__ */ _e({
3192
+ }, gt = 100, yt = 12, wt = "(other)", kl = /* @__PURE__ */ _e({
3193
3193
  __name: "proportionPlot",
3194
3194
  props: {
3195
3195
  apiUrl: {},
@@ -3202,25 +3202,25 @@ const tu = /* @__PURE__ */ _e({
3202
3202
  setup(e) {
3203
3203
  const t = e;
3204
3204
  let n;
3205
- const r = Lt(), a = T(null), i = T(null), u = T(
3205
+ const r = It(), a = T(null), i = T(null), l = T(
3206
3206
  t.srcUrl || "https://temp-precision-dashboard-data.s3.us-east-1.amazonaws.com/precision_human_drg_data.parquet"
3207
- ), l = j(() => r.formatIdFromUrl(u.value)), f = T(!1), c = T(""), d = T([]), y = T(""), w = T(""), A = `proportion-plot-${Math.random().toString(36).slice(2)}`;
3207
+ ), u = j(() => r.formatIdFromUrl(l.value)), f = T(!1), c = T(""), p = T([]), y = T(""), w = T(""), A = `proportion-plot-${Math.random().toString(36).slice(2)}`;
3208
3208
  Q(
3209
3209
  () => ({ srcUrl: t.srcUrl, srcFileType: t.srcFileType, srcFileId: t.srcFileId, pkg: t.pkg, apiUrl: t.apiUrl }),
3210
- async ({ srcUrl: _, srcFileType: M, srcFileId: s, pkg: p, apiUrl: o }) => {
3211
- var v, g;
3210
+ async ({ srcUrl: _, srcFileType: M, srcFileId: s, pkg: v, apiUrl: o }) => {
3211
+ var d, g;
3212
3212
  try {
3213
- if (_ && (u.value = _), await k(), u.value) {
3214
- const x = M ?? (u.value.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
3215
- await D(x, l.value);
3213
+ if (_ && (l.value = _), await k(), l.value) {
3214
+ const x = M ?? (l.value.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
3215
+ await D(x, u.value);
3216
3216
  return;
3217
3217
  }
3218
- const h = (v = p == null ? void 0 : p.content) == null ? void 0 : v.id, m = (g = p == null ? void 0 : p.content) == null ? void 0 : g.packageType;
3218
+ const h = (d = v == null ? void 0 : v.content) == null ? void 0 : d.id, m = (g = v == null ? void 0 : v.content) == null ? void 0 : g.packageType;
3219
3219
  if (h && o) {
3220
3220
  const x = await K(h, o);
3221
3221
  if (!x) return;
3222
3222
  const R = await X(h, x, o), E = m === "CSV" ? "csv" : "parquet", b = x.replace(/[^a-zA-Z0-9_.-]/g, "_");
3223
- u.value = R, await D(E, b);
3223
+ l.value = R, await D(E, b);
3224
3224
  }
3225
3225
  } catch (h) {
3226
3226
  console.error("[ProportionPlot] Load failed:", (h == null ? void 0 : h.message) || h), c.value = `Load failed: ${(h == null ? void 0 : h.message) || h}`;
@@ -3228,7 +3228,7 @@ const tu = /* @__PURE__ */ _e({
3228
3228
  },
3229
3229
  { immediate: !0 }
3230
3230
  );
3231
- const C = /* @__PURE__ */ new Set(["VARCHAR", "STRING", "TEXT", "BOOL", "BOOLEAN", "DATE", "TIMESTAMP"]), S = j(() => d.value.filter((_) => C.has(_.type) || _.type.startsWith("VARCHAR"))), $ = j(() => d.value.filter((_) => !C.has(_.type)));
3231
+ const C = /* @__PURE__ */ new Set(["VARCHAR", "STRING", "TEXT", "BOOL", "BOOLEAN", "DATE", "TIMESTAMP"]), S = j(() => p.value.filter((_) => C.has(_.type) || _.type.startsWith("VARCHAR"))), $ = j(() => p.value.filter((_) => !C.has(_.type)));
3232
3232
  async function k() {
3233
3233
  if (a.value) return;
3234
3234
  const { connectionId: _ } = await r.createConnection(`prop_${Date.now()}`);
@@ -3240,18 +3240,18 @@ const tu = /* @__PURE__ */ _e({
3240
3240
  }
3241
3241
  async function D(_, M) {
3242
3242
  a.value || await k();
3243
- const s = (M || t.srcFileId || u.value || "file").replace(/[^A-Za-z0-9]/g, "_");
3243
+ const s = (M || t.srcFileId || l.value || "file").replace(/[^A-Za-z0-9]/g, "_");
3244
3244
  f.value = !0, c.value = "Loading file into DuckDB…";
3245
3245
  try {
3246
- const p = _ ?? (u.value.toLowerCase().endsWith(".csv") ? "csv" : "parquet"), o = t.tableNameOverride || F(`file_${s.slice(0, 48)}`), v = await r.loadFile(
3247
- u.value,
3248
- p,
3246
+ const v = _ ?? (l.value.toLowerCase().endsWith(".csv") ? "csv" : "parquet"), o = t.tableNameOverride || F(`file_${s.slice(0, 48)}`), d = await r.loadFile(
3247
+ l.value,
3248
+ v,
3249
3249
  o,
3250
3250
  {},
3251
3251
  a.value,
3252
3252
  s
3253
3253
  );
3254
- i.value = v, await q(!0);
3254
+ i.value = d, await q(!0);
3255
3255
  } finally {
3256
3256
  f.value = !1;
3257
3257
  }
@@ -3260,14 +3260,14 @@ const tu = /* @__PURE__ */ _e({
3260
3260
  return '"' + String(_).replace(/"/g, '""') + '"';
3261
3261
  }
3262
3262
  async function q(_ = !1) {
3263
- var M, s, p, o;
3263
+ var M, s, v, o;
3264
3264
  if (!i.value || !a.value) return;
3265
- const v = `PRAGMA table_info(${z(i.value)})`, g = await r.executeQuery(v, a.value);
3266
- if (d.value = g.map((h) => ({ name: String(h.name), type: String(h.type).toUpperCase() })), _ || !y.value || !w.value) {
3267
- const h = d.value.filter((m) => C.has(m.type) || m.type.startsWith("VARCHAR"));
3268
- y.value = ((M = h[0]) == null ? void 0 : M.name) || ((s = d.value[0]) == null ? void 0 : s.name) || "", w.value = ((p = h[1]) == null ? void 0 : p.name) || ((o = h[0]) == null ? void 0 : o.name) || "";
3265
+ const d = `PRAGMA table_info(${z(i.value)})`, g = await r.executeQuery(d, a.value);
3266
+ if (p.value = g.map((h) => ({ name: String(h.name), type: String(h.type).toUpperCase() })), _ || !y.value || !w.value) {
3267
+ const h = p.value.filter((m) => C.has(m.type) || m.type.startsWith("VARCHAR"));
3268
+ y.value = ((M = h[0]) == null ? void 0 : M.name) || ((s = p.value[0]) == null ? void 0 : s.name) || "", w.value = ((v = h[1]) == null ? void 0 : v.name) || ((o = h[0]) == null ? void 0 : o.name) || "";
3269
3269
  }
3270
- c.value = `Columns: ${d.value.length}.`;
3270
+ c.value = `Columns: ${p.value.length}.`;
3271
3271
  }
3272
3272
  async function H() {
3273
3273
  if (!(!i.value || !a.value)) {
@@ -3277,7 +3277,7 @@ const tu = /* @__PURE__ */ _e({
3277
3277
  }
3278
3278
  f.value = !0, c.value = "Computing proportions…";
3279
3279
  try {
3280
- const _ = z(i.value), M = z(y.value), s = z(w.value), p = `
3280
+ const _ = z(i.value), M = z(y.value), s = z(w.value), v = `
3281
3281
  WITH xf AS (
3282
3282
  SELECT ${M} AS x, COUNT(*) AS c
3283
3283
  FROM ${_}
@@ -3322,18 +3322,18 @@ const tu = /* @__PURE__ */ _e({
3322
3322
  JOIN denom d USING (x)
3323
3323
  )
3324
3324
  SELECT * FROM props ORDER BY x, y;
3325
- `, o = await r.executeQuery(p, a.value);
3325
+ `, o = await r.executeQuery(v, a.value);
3326
3326
  if (!o.length) {
3327
3327
  c.value = "No rows returned. Try different columns.", n.purge(A);
3328
3328
  return;
3329
3329
  }
3330
- const v = Array.from(new Set(o.map((b) => String(b.x)))), g = Array.from(new Set(o.map((b) => String(b.y)))), h = (b, L) => `${b}\0${L}`, m = /* @__PURE__ */ new Map();
3330
+ const d = Array.from(new Set(o.map((b) => String(b.x)))), g = Array.from(new Set(o.map((b) => String(b.y)))), h = (b, I) => `${b}\0${I}`, m = /* @__PURE__ */ new Map();
3331
3331
  for (const b of o) m.set(h(String(b.x), String(b.y)), Number(b.p ?? 0));
3332
3332
  const x = g.map((b) => ({
3333
3333
  type: "bar",
3334
3334
  name: b,
3335
- x: v,
3336
- y: v.map((L) => m.get(h(L, b)) ?? 0),
3335
+ x: d,
3336
+ y: d.map((I) => m.get(h(I, b)) ?? 0),
3337
3337
  hovertemplate: `${w.value}=%{fullData.name}<br>${y.value}=%{x}<br>Proportion=%{y:.1%}<extra></extra>`
3338
3338
  })), R = {
3339
3339
  title: `${w.value} proportions within ${y.value}`,
@@ -3344,8 +3344,8 @@ const tu = /* @__PURE__ */ _e({
3344
3344
  margin: { t: 48, r: 16, b: 96, l: 56 }
3345
3345
  };
3346
3346
  await n.newPlot(A, x, R, { responsive: !0 });
3347
- const E = (v.length >= gt ? ` Limited to top ${gt} ${y.value}.` : "") + (g.length >= yt || g.includes(wt) ? ` Limited to top ${yt} ${w.value} (+ ${wt}).` : "");
3348
- c.value = `Plotted ${g.length} categories across ${v.length} groups.${E}`;
3347
+ const E = (d.length >= gt ? ` Limited to top ${gt} ${y.value}.` : "") + (g.length >= yt || g.includes(wt) ? ` Limited to top ${yt} ${w.value} (+ ${wt}).` : "");
3348
+ c.value = `Plotted ${g.length} categories across ${d.length} groups.${E}`;
3349
3349
  } catch (_) {
3350
3350
  console.error(_), c.value = `Error: ${(_ == null ? void 0 : _.message) || _}`;
3351
3351
  } finally {
@@ -3356,66 +3356,66 @@ const tu = /* @__PURE__ */ _e({
3356
3356
  async function V() {
3357
3357
  }
3358
3358
  async function K(_, M) {
3359
- var s, p;
3360
- const o = await V(), v = `${M}/packages/${_}/view?api_key=${o}`, g = await fetch(v);
3359
+ var s, v;
3360
+ const o = await V(), d = `${M}/packages/${_}/view?api_key=${o}`, g = await fetch(d);
3361
3361
  if (!g.ok) return null;
3362
3362
  const h = await g.json();
3363
- return (p = (s = h == null ? void 0 : h[0]) == null ? void 0 : s.content) == null ? void 0 : p.id;
3363
+ return (v = (s = h == null ? void 0 : h[0]) == null ? void 0 : s.content) == null ? void 0 : v.id;
3364
3364
  }
3365
3365
  async function X(_, M, s) {
3366
- const p = await V(), o = `${s}/packages/${_}/files/${M}?api_key=${p}`, v = await fetch(o);
3367
- if (!v.ok) throw new Error(`file url failed: ${v.status}`);
3368
- return (await v.json()).url;
3366
+ const v = await V(), o = `${s}/packages/${_}/files/${M}?api_key=${v}`, d = await fetch(o);
3367
+ if (!d.ok) throw new Error(`file url failed: ${d.status}`);
3368
+ return (await d.json()).url;
3369
3369
  }
3370
3370
  function P() {
3371
3371
  return typeof window < "u" && typeof document < "u";
3372
3372
  }
3373
3373
  async function ne() {
3374
- if (!P()) return null;
3375
- if (n) return n;
3376
- const _ = await import("./plotly.min-C6i-CQY9-Buq8XTFA.mjs").then((M) => M.p);
3377
- return n = _.default ?? _, n;
3374
+ return P() ? n || (await new Promise((_, M) => {
3375
+ const s = document.createElement("script");
3376
+ s.src = "https://cdn.plot.ly/plotly-2.35.3.min.js", s.onload = () => _(), s.onerror = () => M(new Error("Failed to load Plotly CDN")), document.head.appendChild(s);
3377
+ }), n = window.Plotly, console.log(n), n) : null;
3378
3378
  }
3379
3379
  return Ve(async () => {
3380
3380
  await k(), await ne();
3381
3381
  }), Tt(async () => {
3382
3382
  a.value && await r.closeConnection(a.value);
3383
- }), (_, M) => (B(), O("div", pu, [
3384
- N("div", vu, [
3385
- N("div", mu, [
3386
- N("div", gu, [
3383
+ }), (_, M) => (B(), O("div", vl, [
3384
+ N("div", dl, [
3385
+ N("div", ml, [
3386
+ N("div", gl, [
3387
3387
  M[3] || (M[3] = N("label", null, "Data URL", -1)),
3388
3388
  Re(N("input", {
3389
- "onUpdate:modelValue": M[0] || (M[0] = (s) => u.value = s),
3389
+ "onUpdate:modelValue": M[0] || (M[0] = (s) => l.value = s),
3390
3390
  type: "text",
3391
3391
  class: "pp-input pp-input--url",
3392
3392
  disabled: f.value,
3393
3393
  placeholder: "https://.../file.parquet"
3394
- }, null, 8, yu), [
3395
- [ln, u.value]
3394
+ }, null, 8, yl), [
3395
+ [un, l.value]
3396
3396
  ])
3397
3397
  ]),
3398
- N("div", wu, [
3398
+ N("div", wl, [
3399
3399
  N("div", null, [
3400
3400
  M[5] || (M[5] = N("label", null, "X (group) column", -1)),
3401
3401
  Re(N("select", {
3402
3402
  "onUpdate:modelValue": M[1] || (M[1] = (s) => y.value = s),
3403
3403
  class: "pp-select",
3404
- disabled: f.value || d.value.length === 0
3404
+ disabled: f.value || p.value.length === 0
3405
3405
  }, [
3406
3406
  M[4] || (M[4] = N("option", {
3407
3407
  disabled: "",
3408
3408
  value: ""
3409
3409
  }, "— choose —", -1)),
3410
- (B(!0), O(re, null, ve(S.value, (s) => (B(), O("option", {
3410
+ (B(!0), O(re, null, de(S.value, (s) => (B(), O("option", {
3411
3411
  key: s.name,
3412
3412
  value: s.name
3413
- }, G(s.name) + " (" + G(s.type) + ")", 9, bu))), 128)),
3414
- (B(!0), O(re, null, ve($.value, (s) => (B(), O("option", {
3413
+ }, G(s.name) + " (" + G(s.type) + ")", 9, bl))), 128)),
3414
+ (B(!0), O(re, null, de($.value, (s) => (B(), O("option", {
3415
3415
  key: s.name + "-num",
3416
3416
  value: s.name
3417
- }, G(s.name) + " (" + G(s.type) + ")", 9, Au))), 128))
3418
- ], 8, _u), [
3417
+ }, G(s.name) + " (" + G(s.type) + ")", 9, Al))), 128))
3418
+ ], 8, _l), [
3419
3419
  [_t, y.value]
3420
3420
  ])
3421
3421
  ]),
@@ -3424,28 +3424,28 @@ const tu = /* @__PURE__ */ _e({
3424
3424
  Re(N("select", {
3425
3425
  "onUpdate:modelValue": M[2] || (M[2] = (s) => w.value = s),
3426
3426
  class: "pp-select",
3427
- disabled: f.value || d.value.length === 0
3427
+ disabled: f.value || p.value.length === 0
3428
3428
  }, [
3429
3429
  M[6] || (M[6] = N("option", {
3430
3430
  disabled: "",
3431
3431
  value: ""
3432
3432
  }, "— choose —", -1)),
3433
- (B(!0), O(re, null, ve(S.value, (s) => (B(), O("option", {
3433
+ (B(!0), O(re, null, de(S.value, (s) => (B(), O("option", {
3434
3434
  key: s.name + "-y",
3435
3435
  value: s.name
3436
- }, G(s.name) + " (" + G(s.type) + ")", 9, Mu))), 128))
3437
- ], 8, xu), [
3436
+ }, G(s.name) + " (" + G(s.type) + ")", 9, Ml))), 128))
3437
+ ], 8, xl), [
3438
3438
  [_t, w.value]
3439
3439
  ])
3440
3440
  ])
3441
3441
  ]),
3442
- N("div", Eu, [
3442
+ N("div", El, [
3443
3443
  N("button", {
3444
3444
  class: "pp-btn pp-btn--primary",
3445
3445
  disabled: !y.value || !w.value || f.value || !a.value || !i.value,
3446
3446
  onClick: H
3447
- }, G(f.value ? "Working…" : "Plot"), 9, Cu),
3448
- c.value ? (B(), O("div", Su, G(c.value), 1)) : Ee("", !0)
3447
+ }, G(f.value ? "Working…" : "Plot"), 9, Cl),
3448
+ c.value ? (B(), O("div", Sl, G(c.value), 1)) : Ee("", !0)
3449
3449
  ])
3450
3450
  ])
3451
3451
  ]),
@@ -3455,29 +3455,29 @@ const tu = /* @__PURE__ */ _e({
3455
3455
  })
3456
3456
  ]));
3457
3457
  }
3458
- }), $u = /* @__PURE__ */ Ie(ku, [["__scopeId", "data-v-53bd6454"]]), Ru = "dashboard:globalVars";
3458
+ }), $l = /* @__PURE__ */ Le(kl, [["__scopeId", "data-v-1e3cf8a1"]]), Rl = "dashboard:globalVars";
3459
3459
  function zt(e = !1) {
3460
- const t = Xn(Ru, null);
3460
+ const t = Xn(Rl, null);
3461
3461
  return !t && e && console.warn("[Widget] dashboard:globalVars not provided."), t;
3462
3462
  }
3463
- const Tu = { class: "data-explorer-wrap" }, Nu = { class: "data-explorer-info" }, Lu = /* @__PURE__ */ _e({
3463
+ const Tl = { class: "data-explorer-wrap" }, Nl = { class: "data-explorer-info" }, Il = /* @__PURE__ */ _e({
3464
3464
  inheritAttrs: !1,
3465
3465
  __name: "DataExplorer",
3466
3466
  setup(e) {
3467
3467
  const t = zt(), n = T("Data Explorer"), r = j(() => we(t.s3Url));
3468
3468
  return Gn(() => {
3469
3469
  }), (a, i) => {
3470
- const u = bt("el-icon");
3470
+ const l = bt("el-icon");
3471
3471
  return B(), O(re, null, [
3472
3472
  Nt(a.$slots, "default", { widgetName: n.value }, void 0, !0),
3473
- N("div", Tu, [
3474
- N("div", Nu, [
3473
+ N("div", Tl, [
3474
+ N("div", Nl, [
3475
3475
  oe(we(Qn), { placement: "top-start" }, {
3476
3476
  content: Pe(() => [...i[0] || (i[0] = [
3477
3477
  At("Type in a query or use the suggested query buttons to run on your csv file", -1)
3478
3478
  ])]),
3479
3479
  default: Pe(() => [
3480
- oe(u, { color: "#8300BF" }, {
3480
+ oe(l, { color: "#8300BF" }, {
3481
3481
  default: Pe(() => [
3482
3482
  oe(we(Zn))
3483
3483
  ]),
@@ -3497,7 +3497,7 @@ const Tu = { class: "data-explorer-wrap" }, Nu = { class: "data-explorer-info" }
3497
3497
  for (const [r, a] of t)
3498
3498
  n[r] = a;
3499
3499
  return n;
3500
- }, zu = /* @__PURE__ */ qt(Lu, [["__scopeId", "data-v-e47a9f7d"]]), Iu = { class: "umap-wrap" }, Uu = /* @__PURE__ */ Object.assign({
3500
+ }, zl = /* @__PURE__ */ qt(Il, [["__scopeId", "data-v-e47a9f7d"]]), Ll = { class: "umap-wrap" }, Ul = /* @__PURE__ */ Object.assign({
3501
3501
  inheritAttrs: !1
3502
3502
  }, {
3503
3503
  __name: "Umap",
@@ -3505,26 +3505,26 @@ const Tu = { class: "data-explorer-wrap" }, Nu = { class: "data-explorer-info" }
3505
3505
  const t = zt(), n = T("Data Explorer"), r = j(() => we(t == null ? void 0 : t.s3Url));
3506
3506
  return (a, i) => (B(), O(re, null, [
3507
3507
  Nt(a.$slots, "default", { widgetName: n.value }, void 0, !0),
3508
- N("div", Iu, [
3509
- oe(we(du), { srcUrl: r.value }, null, 8, ["srcUrl"])
3508
+ N("div", Ll, [
3509
+ oe(we(pl), { srcUrl: r.value }, null, 8, ["srcUrl"])
3510
3510
  ])
3511
3511
  ], 64));
3512
3512
  }
3513
- }), qu = /* @__PURE__ */ qt(Uu, [["__scopeId", "data-v-d8a1dc37"]]), Bu = { class: "proportion-plot-wrap" }, Fu = /* @__PURE__ */ _e({
3513
+ }), ql = /* @__PURE__ */ qt(Ul, [["__scopeId", "data-v-d8a1dc37"]]), Bl = { class: "proportion-plot-wrap" }, Fl = /* @__PURE__ */ _e({
3514
3514
  inheritAttrs: !1,
3515
3515
  __name: "Proportion",
3516
3516
  setup(e) {
3517
3517
  const t = zt(), n = j(() => we(t.s3Url));
3518
3518
  return (r, a) => (B(), O(re, null, [
3519
3519
  Nt(r.$slots, "default", {}, void 0, !0),
3520
- N("div", Bu, [
3521
- oe(we($u), { srcUrl: n.value }, null, 8, ["srcUrl"])
3520
+ N("div", Bl, [
3521
+ oe(we($l), { srcUrl: n.value }, null, 8, ["srcUrl"])
3522
3522
  ])
3523
3523
  ], 64));
3524
3524
  }
3525
- }), Yu = /* @__PURE__ */ qt(Fu, [["__scopeId", "data-v-96c1c44d"]]);
3525
+ }), Yl = /* @__PURE__ */ qt(Fl, [["__scopeId", "data-v-96c1c44d"]]);
3526
3526
  export {
3527
- zu as DataExplorer,
3528
- Yu as ProportionPlot,
3529
- qu as UMAP
3527
+ zl as DataExplorer,
3528
+ Yl as ProportionPlot,
3529
+ ql as UMAP
3530
3530
  };