@bicharts/chart-host 0.5.111 → 0.5.113

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.
@@ -22,8 +22,8 @@ var require_papaparse_min = __commonJS({
22
22
  "function" == typeof define && define.amd ? define([], t) : "object" == typeof module && "undefined" != typeof exports ? module.exports = t() : e.Papa = t();
23
23
  })(exports, function r() {
24
24
  var n = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== n ? n : {};
25
- var d2, s = !n.document && !!n.postMessage, a4 = n.IS_PAPA_WORKER || false, o = {}, h3 = 0, v2 = {};
26
- function P2(e) {
25
+ var d2, s = !n.document && !!n.postMessage, a4 = n.IS_PAPA_WORKER || false, o = {}, h4 = 0, v3 = {};
26
+ function P4(e) {
27
27
  return 65279 === e.charCodeAt(0) ? e.slice(1) : e;
28
28
  }
29
29
  function u2(e) {
@@ -41,7 +41,7 @@ var require_papaparse_min = __commonJS({
41
41
  var i2 = this._partialLine + t, r2 = (this._partialLine = "", this._handle.parse(i2, this._baseIndex, !this._finished));
42
42
  if (!this._handle.paused() && !this._handle.aborted()) {
43
43
  t = r2.meta.cursor, i2 = (this._finished || (this._partialLine = i2.substring(t - this._baseIndex), this._baseIndex = t), r2 && r2.data && (this._rowCount += r2.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview);
44
- if (a4) n.postMessage({ results: r2, workerId: v2.WORKER_ID, finished: i2 });
44
+ if (a4) n.postMessage({ results: r2, workerId: v3.WORKER_ID, finished: i2 });
45
45
  else if (q4(this._config.chunk) && !e2) {
46
46
  if (this._config.chunk(r2, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = true);
47
47
  this._completeResults = r2 = void 0;
@@ -50,12 +50,12 @@ var require_papaparse_min = __commonJS({
50
50
  }
51
51
  this._halted = true;
52
52
  }, this._sendError = function(e2) {
53
- q4(this._config.error) ? this._config.error(e2) : a4 && this._config.error && n.postMessage({ workerId: v2.WORKER_ID, error: e2, finished: false });
53
+ q4(this._config.error) ? this._config.error(e2) : a4 && this._config.error && n.postMessage({ workerId: v3.WORKER_ID, error: e2, finished: false });
54
54
  };
55
55
  }
56
56
  function f4(e) {
57
57
  var r2;
58
- (e = e || {}).chunkSize || (e.chunkSize = v2.RemoteChunkSize), u2.call(this, e), this._nextChunk = s ? function() {
58
+ (e = e || {}).chunkSize || (e.chunkSize = v3.RemoteChunkSize), u2.call(this, e), this._nextChunk = s ? function() {
59
59
  this._readChunk(), this._chunkLoaded();
60
60
  } : function() {
61
61
  this._readChunk();
@@ -85,7 +85,7 @@ var require_papaparse_min = __commonJS({
85
85
  };
86
86
  }
87
87
  function l(e) {
88
- (e = e || {}).chunkSize || (e.chunkSize = v2.LocalChunkSize), u2.call(this, e);
88
+ (e = e || {}).chunkSize || (e.chunkSize = v3.LocalChunkSize), u2.call(this, e);
89
89
  var i2, r2, n2 = "undefined" != typeof FileReader;
90
90
  this.stream = function(e2) {
91
91
  this._input = e2, r2 = e2.slice || e2.webkitSlice || e2.mozSlice, n2 ? ((i2 = new FileReader()).onload = y5(this._chunkLoaded, this), i2.onerror = y5(this._chunkError, this)) : i2 = new FileReaderSync(), this._nextChunk();
@@ -137,16 +137,16 @@ var require_papaparse_min = __commonJS({
137
137
  }, this);
138
138
  }
139
139
  function i(m4) {
140
- var n2, s2, a5, t, o2 = Math.pow(2, 53), h4 = -o2, u4 = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, d3 = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, i2 = this, r2 = 0, f5 = 0, l2 = false, e = false, c4 = [], p4 = { data: [], errors: [], meta: {} };
140
+ var n2, s2, a5, t, o2 = Math.pow(2, 53), h5 = -o2, u4 = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, d3 = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, i2 = this, r2 = 0, f5 = 0, l2 = false, e = false, c4 = [], p4 = { data: [], errors: [], meta: {} };
141
141
  function y6(e2) {
142
142
  return "greedy" === m4.skipEmptyLines ? "" === e2.join("").trim() : 1 === e2.length && 0 === e2[0].length;
143
143
  }
144
144
  function g4() {
145
- if (p4 && a5 && (k2("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + v2.DefaultDelimiter + "'"), a5 = false), m4.skipEmptyLines && (p4.data = p4.data.filter(function(e4) {
145
+ if (p4 && a5 && (k2("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + v3.DefaultDelimiter + "'"), a5 = false), m4.skipEmptyLines && (p4.data = p4.data.filter(function(e4) {
146
146
  return !y6(e4);
147
147
  })), _3()) {
148
148
  let t4 = function(e4, t5) {
149
- e4 = P2(e4), q4(m4.transformHeader) && (e4 = m4.transformHeader(e4, t5)), c4.push(e4);
149
+ e4 = P4(e4), q4(m4.transformHeader) && (e4 = m4.transformHeader(e4, t5)), c4.push(e4);
150
150
  };
151
151
  var t2 = t4;
152
152
  if (p4) if (Array.isArray(p4.data[0])) {
@@ -159,7 +159,7 @@ var require_papaparse_min = __commonJS({
159
159
  var n4 = r5, s4 = e4[r5], s4 = ((e5, t5) => ((e6) => (m4.dynamicTypingFunction && void 0 === m4.dynamicTyping[e6] && (m4.dynamicTyping[e6] = m4.dynamicTypingFunction(e6)), true === (m4.dynamicTyping[e6] || m4.dynamicTyping)))(e5) ? "true" === t5 || "TRUE" === t5 || "false" !== t5 && "FALSE" !== t5 && (((e6) => {
160
160
  if (u4.test(e6)) {
161
161
  e6 = parseFloat(e6);
162
- if (h4 < e6 && e6 < o2) return 1;
162
+ if (h5 < e6 && e6 < o2) return 1;
163
163
  }
164
164
  })(t5) ? parseFloat(t5) : d3.test(t5) ? new Date(t5) : "" === t5 ? null : t5) : t5)(n4 = m4.header ? r5 >= c4.length ? "__parsed_extra" : c4[r5] : n4, s4 = m4.transform ? m4.transform(s4, n4) : s4);
165
165
  "__parsed_extra" === n4 ? (i5[n4] = i5[n4] || [], i5[n4].push(s4)) : i5[n4] = s4;
@@ -180,15 +180,15 @@ var require_papaparse_min = __commonJS({
180
180
  p4 = e2, _3() ? g4() : (g4(), 0 !== p4.data.length && (r2 += e2.data.length, m4.preview && r2 > m4.preview ? s2.abort() : (p4.data = p4.data[0], t(p4, i2))));
181
181
  }), this.parse = function(e2, t2, i4) {
182
182
  var r4 = m4.quoteChar || '"', r4 = (m4.newline || (m4.newline = this.guessLineEndings(e2, r4)), a5 = false, m4.delimiter ? q4(m4.delimiter) && (m4.delimiter = m4.delimiter(e2), p4.meta.delimiter = m4.delimiter) : ((r4 = ((e4, t4, i5, r5, n4) => {
183
- var s4, a6, o4, h5;
184
- n4 = n4 || [",", " ", "|", ";", v2.RECORD_SEP, v2.UNIT_SEP];
183
+ var s4, a6, o4, h6;
184
+ n4 = n4 || [",", " ", "|", ";", v3.RECORD_SEP, v3.UNIT_SEP];
185
185
  for (var u5 = 0; u5 < n4.length; u5++) {
186
- for (var d4, f6 = n4[u5], l3 = 0, c5 = 0, p5 = 0, g5 = (o4 = void 0, new E2({ comments: r5, delimiter: f6, newline: t4, preview: 10 }).parse(e4)), _4 = 0; _4 < g5.data.length; _4++) i5 && y6(g5.data[_4]) ? p5++ : (d4 = g5.data[_4].length, c5 += d4, void 0 === o4 ? o4 = d4 : 0 < d4 && (l3 += Math.abs(d4 - o4), o4 = d4));
187
- 0 < g5.data.length && (c5 /= g5.data.length - p5), (void 0 === a6 || l3 <= a6) && (void 0 === h5 || h5 < c5) && 1.99 < c5 && (a6 = l3, s4 = f6, h5 = c5);
186
+ for (var d4, f6 = n4[u5], l3 = 0, c5 = 0, p5 = 0, g5 = (o4 = void 0, new E4({ comments: r5, delimiter: f6, newline: t4, preview: 10 }).parse(e4)), _4 = 0; _4 < g5.data.length; _4++) i5 && y6(g5.data[_4]) ? p5++ : (d4 = g5.data[_4].length, c5 += d4, void 0 === o4 ? o4 = d4 : 0 < d4 && (l3 += Math.abs(d4 - o4), o4 = d4));
187
+ 0 < g5.data.length && (c5 /= g5.data.length - p5), (void 0 === a6 || l3 <= a6) && (void 0 === h6 || h6 < c5) && 1.99 < c5 && (a6 = l3, s4 = f6, h6 = c5);
188
188
  }
189
189
  return { successful: !!(m4.delimiter = s4), bestDelimiter: s4 };
190
- })(e2, m4.newline, m4.skipEmptyLines, m4.comments, m4.delimitersToGuess)).successful ? m4.delimiter = r4.bestDelimiter : (a5 = true, m4.delimiter = v2.DefaultDelimiter), p4.meta.delimiter = m4.delimiter), b4(m4));
191
- return m4.preview && m4.header && r4.preview++, n2 = e2, s2 = new E2(r4), p4 = s2.parse(n2, t2, i4), g4(), l2 ? { meta: { paused: true } } : p4 || { meta: { paused: false } };
190
+ })(e2, m4.newline, m4.skipEmptyLines, m4.comments, m4.delimitersToGuess)).successful ? m4.delimiter = r4.bestDelimiter : (a5 = true, m4.delimiter = v3.DefaultDelimiter), p4.meta.delimiter = m4.delimiter), b4(m4));
191
+ return m4.preview && m4.header && r4.preview++, n2 = e2, s2 = new E4(r4), p4 = s2.parse(n2, t2, i4), g4(), l2 ? { meta: { paused: true } } : p4 || { meta: { paused: false } };
192
192
  }, this.paused = function() {
193
193
  return l2;
194
194
  }, this.pause = function() {
@@ -210,78 +210,78 @@ var require_papaparse_min = __commonJS({
210
210
  function U2(e) {
211
211
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
212
212
  }
213
- function E2(C2) {
214
- var S = (C2 = C2 || {}).delimiter, O2 = C2.newline, x3 = C2.comments, I2 = C2.step, A = C2.preview, T3 = C2.fastMode, D4 = null, L2 = false, F4 = null == C2.quoteChar ? '"' : C2.quoteChar, j3 = F4;
215
- if (void 0 !== C2.escapeChar && (j3 = C2.escapeChar), ("string" != typeof S || -1 < v2.BAD_DELIMITERS.indexOf(S)) && (S = ","), x3 === S) throw new Error("Comment character same as delimiter");
216
- true === x3 ? x3 = "#" : ("string" != typeof x3 || -1 < v2.BAD_DELIMITERS.indexOf(x3)) && (x3 = false), "\n" !== O2 && "\r" !== O2 && "\r\n" !== O2 && (O2 = "\n");
213
+ function E4(C) {
214
+ var S = (C = C || {}).delimiter, O2 = C.newline, x3 = C.comments, I2 = C.step, A = C.preview, T3 = C.fastMode, D4 = null, L2 = false, F4 = null == C.quoteChar ? '"' : C.quoteChar, j2 = F4;
215
+ if (void 0 !== C.escapeChar && (j2 = C.escapeChar), ("string" != typeof S || -1 < v3.BAD_DELIMITERS.indexOf(S)) && (S = ","), x3 === S) throw new Error("Comment character same as delimiter");
216
+ true === x3 ? x3 = "#" : ("string" != typeof x3 || -1 < v3.BAD_DELIMITERS.indexOf(x3)) && (x3 = false), "\n" !== O2 && "\r" !== O2 && "\r\n" !== O2 && (O2 = "\n");
217
217
  var z3 = 0, M2 = false;
218
218
  this.parse = function(i2, t, r2) {
219
219
  if ("string" != typeof i2) throw new Error("Input must be a string");
220
- var n2 = i2.length, e = S.length, s2 = O2.length, a5 = x3.length, o2 = q4(I2), h4 = [], u4 = [], d3 = [], f5 = z3 = 0;
221
- if (!i2) return w3();
220
+ var n2 = i2.length, e = S.length, s2 = O2.length, a5 = x3.length, o2 = q4(I2), h5 = [], u4 = [], d3 = [], f5 = z3 = 0;
221
+ if (!i2) return w2();
222
222
  if (T3 || false !== T3 && -1 === i2.indexOf(F4)) {
223
223
  for (var l2 = i2.split(O2), c4 = 0; c4 < l2.length; c4++) {
224
224
  if (d3 = l2[c4], z3 += d3.length, c4 !== l2.length - 1) z3 += O2.length;
225
- else if (r2) return w3();
225
+ else if (r2) return w2();
226
226
  if (!x3 || d3.substring(0, a5) !== x3) {
227
227
  if (o2) {
228
- if (h4 = [], k2(d3.split(S)), R3(), M2) return w3();
228
+ if (h5 = [], k2(d3.split(S)), R2(), M2) return w2();
229
229
  } else k2(d3.split(S));
230
- if (A && A <= c4) return h4 = h4.slice(0, A), w3(true);
230
+ if (A && A <= c4) return h5 = h5.slice(0, A), w2(true);
231
231
  }
232
232
  }
233
- return w3();
233
+ return w2();
234
234
  }
235
- for (var p4 = i2.indexOf(S, z3), g4 = i2.indexOf(O2, z3), _3 = new RegExp(U2(j3) + U2(F4), "g"), m4 = i2.indexOf(F4, z3); ; ) if (i2[z3] === F4) for (m4 = z3, z3++; ; ) {
236
- if (-1 === (m4 = i2.indexOf(F4, m4 + 1))) return r2 || u4.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h4.length, index: z3 }), E4();
237
- if (m4 === n2 - 1) return E4(i2.substring(z3, m4).replace(_3, F4));
238
- if (F4 === j3 && i2[m4 + 1] === j3) m4++;
239
- else if (F4 === j3 || 0 === m4 || i2[m4 - 1] !== j3) {
235
+ for (var p4 = i2.indexOf(S, z3), g4 = i2.indexOf(O2, z3), _3 = new RegExp(U2(j2) + U2(F4), "g"), m4 = i2.indexOf(F4, z3); ; ) if (i2[z3] === F4) for (m4 = z3, z3++; ; ) {
236
+ if (-1 === (m4 = i2.indexOf(F4, m4 + 1))) return r2 || u4.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h5.length, index: z3 }), E5();
237
+ if (m4 === n2 - 1) return E5(i2.substring(z3, m4).replace(_3, F4));
238
+ if (F4 === j2 && i2[m4 + 1] === j2) m4++;
239
+ else if (F4 === j2 || 0 === m4 || i2[m4 - 1] !== j2) {
240
240
  -1 !== p4 && p4 < m4 + 1 && (p4 = i2.indexOf(S, m4 + 1));
241
- var y6 = v3(-1 === (g4 = -1 !== g4 && g4 < m4 + 1 ? i2.indexOf(O2, m4 + 1) : g4) ? p4 : Math.min(p4, g4));
241
+ var y6 = v4(-1 === (g4 = -1 !== g4 && g4 < m4 + 1 ? i2.indexOf(O2, m4 + 1) : g4) ? p4 : Math.min(p4, g4));
242
242
  if (i2.substr(m4 + 1 + y6, e) === S) {
243
243
  d3.push(i2.substring(z3, m4).replace(_3, F4)), i2[z3 = m4 + 1 + y6 + e] !== F4 && (m4 = i2.indexOf(F4, z3)), p4 = i2.indexOf(S, z3), g4 = i2.indexOf(O2, z3);
244
244
  break;
245
245
  }
246
- y6 = v3(g4);
246
+ y6 = v4(g4);
247
247
  if (i2.substring(m4 + 1 + y6, m4 + 1 + y6 + s2) === O2) {
248
- if (d3.push(i2.substring(z3, m4).replace(_3, F4)), b5(m4 + 1 + y6 + s2), p4 = i2.indexOf(S, z3), m4 = i2.indexOf(F4, z3), o2 && (R3(), M2)) return w3();
249
- if (A && h4.length >= A) return w3(true);
248
+ if (d3.push(i2.substring(z3, m4).replace(_3, F4)), b5(m4 + 1 + y6 + s2), p4 = i2.indexOf(S, z3), m4 = i2.indexOf(F4, z3), o2 && (R2(), M2)) return w2();
249
+ if (A && h5.length >= A) return w2(true);
250
250
  break;
251
251
  }
252
- u4.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: h4.length, index: z3 }), m4++;
252
+ u4.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: h5.length, index: z3 }), m4++;
253
253
  }
254
254
  }
255
255
  else if (x3 && 0 === d3.length && i2.substring(z3, z3 + a5) === x3) {
256
- if (-1 === g4) return w3();
256
+ if (-1 === g4) return w2();
257
257
  z3 = g4 + s2, g4 = i2.indexOf(O2, z3), p4 = i2.indexOf(S, z3);
258
258
  } else if (-1 !== p4 && (p4 < g4 || -1 === g4)) d3.push(i2.substring(z3, p4)), z3 = p4 + e, p4 = i2.indexOf(S, z3);
259
259
  else {
260
260
  if (-1 === g4) break;
261
- if (d3.push(i2.substring(z3, g4)), b5(g4 + s2), o2 && (R3(), M2)) return w3();
262
- if (A && h4.length >= A) return w3(true);
261
+ if (d3.push(i2.substring(z3, g4)), b5(g4 + s2), o2 && (R2(), M2)) return w2();
262
+ if (A && h5.length >= A) return w2(true);
263
263
  }
264
- return E4();
264
+ return E5();
265
265
  function k2(e2) {
266
- h4.push(e2), f5 = z3;
266
+ h5.push(e2), f5 = z3;
267
267
  }
268
- function v3(e2) {
268
+ function v4(e2) {
269
269
  var t2 = 0;
270
270
  return t2 = -1 !== e2 && (e2 = i2.substring(m4 + 1, e2)) && "" === e2.trim() ? e2.length : t2;
271
271
  }
272
- function E4(e2) {
273
- return r2 || (void 0 === e2 && (e2 = i2.substring(z3)), d3.push(e2), z3 = n2, k2(d3), o2 && R3()), w3();
272
+ function E5(e2) {
273
+ return r2 || (void 0 === e2 && (e2 = i2.substring(z3)), d3.push(e2), z3 = n2, k2(d3), o2 && R2()), w2();
274
274
  }
275
275
  function b5(e2) {
276
276
  z3 = e2, k2(d3), d3 = [], g4 = i2.indexOf(O2, z3);
277
277
  }
278
- function w3(e2) {
279
- if (C2.header && !t && h4.length && !L2) {
280
- var s4 = h4[0], a6 = /* @__PURE__ */ Object.create(null), o4 = new Set(s4);
278
+ function w2(e2) {
279
+ if (C.header && !t && h5.length && !L2) {
280
+ var s4 = h5[0], a6 = /* @__PURE__ */ Object.create(null), o4 = new Set(s4);
281
281
  let n4 = false;
282
282
  for (let r4 = 0; r4 < s4.length; r4++) {
283
- let i4 = P2(s4[r4]);
284
- if (a6[i4 = q4(C2.transformHeader) ? C2.transformHeader(i4, r4) : i4]) {
283
+ let i4 = P4(s4[r4]);
284
+ if (a6[i4 = q4(C.transformHeader) ? C.transformHeader(i4, r4) : i4]) {
285
285
  let e4, t2 = a6[i4];
286
286
  for (; e4 = i4 + "_" + t2, t2++, o4.has(e4); ) ;
287
287
  o4.add(e4), s4[r4] = e4, a6[i4]++, n4 = true, (D4 = null === D4 ? {} : D4)[e4] = i4;
@@ -290,10 +290,10 @@ var require_papaparse_min = __commonJS({
290
290
  }
291
291
  n4 && console.warn("Duplicate headers found and renamed."), L2 = true;
292
292
  }
293
- return { data: h4, errors: u4, meta: { delimiter: S, linebreak: O2, aborted: M2, truncated: !!e2, cursor: f5 + (t || 0), renamedHeaders: D4 } };
293
+ return { data: h5, errors: u4, meta: { delimiter: S, linebreak: O2, aborted: M2, truncated: !!e2, cursor: f5 + (t || 0), renamedHeaders: D4 } };
294
294
  }
295
- function R3() {
296
- I2(w3()), h4 = [], u4 = [];
295
+ function R2() {
296
+ I2(w2()), h5 = [], u4 = [];
297
297
  }
298
298
  }, this.abort = function() {
299
299
  M2 = true;
@@ -336,27 +336,27 @@ var require_papaparse_min = __commonJS({
336
336
  function q4(e) {
337
337
  return "function" == typeof e;
338
338
  }
339
- return v2.parse = function(e, t) {
339
+ return v3.parse = function(e, t) {
340
340
  var i2 = (t = t || {}).dynamicTyping || false;
341
341
  q4(i2) && (t.dynamicTypingFunction = i2, i2 = {});
342
- if (t.dynamicTyping = i2, t.transform = !!q4(t.transform) && t.transform, !t.worker || !v2.WORKERS_SUPPORTED) return i2 = null, v2.NODE_STREAM_INPUT, "string" == typeof e ? (e = P2(e), i2 = new (t.download ? f4 : c2)(t)) : true === e.readable && q4(e.read) && q4(e.on) ? i2 = new p2(t) : (n.File && e instanceof File || e instanceof Object) && (i2 = new l(t)), i2.stream(e);
342
+ if (t.dynamicTyping = i2, t.transform = !!q4(t.transform) && t.transform, !t.worker || !v3.WORKERS_SUPPORTED) return i2 = null, v3.NODE_STREAM_INPUT, "string" == typeof e ? (e = P4(e), i2 = new (t.download ? f4 : c2)(t)) : true === e.readable && q4(e.read) && q4(e.on) ? i2 = new p2(t) : (n.File && e instanceof File || e instanceof Object) && (i2 = new l(t)), i2.stream(e);
343
343
  (i2 = (() => {
344
344
  var e2;
345
- return !!v2.WORKERS_SUPPORTED && (e2 = (() => {
345
+ return !!v3.WORKERS_SUPPORTED && (e2 = (() => {
346
346
  var e4 = n.URL || n.webkitURL || null, t2 = r.toString();
347
- return v2.BLOB_URL || (v2.BLOB_URL = e4.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", t2, ")();"], { type: "text/javascript" })));
348
- })(), (e2 = new n.Worker(e2)).onmessage = g3, e2.id = h3++, o[e2.id] = e2);
347
+ return v3.BLOB_URL || (v3.BLOB_URL = e4.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", t2, ")();"], { type: "text/javascript" })));
348
+ })(), (e2 = new n.Worker(e2)).onmessage = g3, e2.id = h4++, o[e2.id] = e2);
349
349
  })()).userStep = t.step, i2.userChunk = t.chunk, i2.userComplete = t.complete, i2.userError = t.error, t.step = q4(t.step), t.chunk = q4(t.chunk), t.complete = q4(t.complete), t.error = q4(t.error), delete t.worker, i2.postMessage({ input: e, config: t, workerId: i2.id });
350
- }, v2.unparse = function(e, t) {
351
- var s2 = false, _3 = true, m4 = ",", y6 = "\r\n", a5 = '"', o2 = a5 + a5, i2 = false, r2 = null, h4 = false, u4 = ((() => {
350
+ }, v3.unparse = function(e, t) {
351
+ var s2 = false, _3 = true, m4 = ",", y6 = "\r\n", a5 = '"', o2 = a5 + a5, i2 = false, r2 = null, h5 = false, u4 = ((() => {
352
352
  if ("object" == typeof t) {
353
- if ("string" != typeof t.delimiter || v2.BAD_DELIMITERS.filter(function(e2) {
353
+ if ("string" != typeof t.delimiter || v3.BAD_DELIMITERS.filter(function(e2) {
354
354
  return -1 !== t.delimiter.indexOf(e2);
355
355
  }).length || (m4 = t.delimiter), "boolean" != typeof t.quotes && "function" != typeof t.quotes && !Array.isArray(t.quotes) || (s2 = t.quotes), "boolean" != typeof t.skipEmptyLines && "string" != typeof t.skipEmptyLines || (i2 = t.skipEmptyLines), "string" == typeof t.newline && (y6 = t.newline), "string" == typeof t.quoteChar && (a5 = t.quoteChar, o2 = a5 + a5), "boolean" == typeof t.header && (_3 = t.header), Array.isArray(t.columns)) {
356
356
  if (0 === t.columns.length) throw new Error("Option columns is empty");
357
357
  r2 = t.columns;
358
358
  }
359
- void 0 !== t.escapeChar && (o2 = t.escapeChar + a5), t.escapeFormulae instanceof RegExp ? h4 = t.escapeFormulae : "boolean" == typeof t.escapeFormulae && t.escapeFormulae && (h4 = /^[=+\-@\t\r].*$/);
359
+ void 0 !== t.escapeChar && (o2 = t.escapeChar + a5), t.escapeFormulae instanceof RegExp ? h5 = t.escapeFormulae : "boolean" == typeof t.escapeFormulae && t.escapeFormulae && (h5 = /^[=+\-@\t\r].*$/);
360
360
  }
361
361
  })(), new RegExp(U2(a5), "g"));
362
362
  "string" == typeof e && (e = JSON.parse(e));
@@ -372,42 +372,42 @@ var require_papaparse_min = __commonJS({
372
372
  0 < t2.length && (r4 += y6);
373
373
  }
374
374
  for (var o4 = 0; o4 < t2.length; o4++) {
375
- var h5 = (n4 ? e2 : t2[o4]).length, u5 = false, d3 = n4 ? 0 === Object.keys(t2[o4]).length : 0 === t2[o4].length;
375
+ var h6 = (n4 ? e2 : t2[o4]).length, u5 = false, d3 = n4 ? 0 === Object.keys(t2[o4]).length : 0 === t2[o4].length;
376
376
  if (i4 && !n4 && (u5 = "greedy" === i4 ? "" === t2[o4].join("").trim() : 1 === t2[o4].length && 0 === t2[o4][0].length), "greedy" === i4 && n4) {
377
- for (var f5 = [], l2 = 0; l2 < h5; l2++) {
377
+ for (var f5 = [], l2 = 0; l2 < h6; l2++) {
378
378
  var c4 = s4 ? e2[l2] : l2;
379
379
  f5.push(t2[o4][c4]);
380
380
  }
381
381
  u5 = "" === f5.join("").trim();
382
382
  }
383
383
  if (!u5) {
384
- for (var p4 = 0; p4 < h5; p4++) {
384
+ for (var p4 = 0; p4 < h6; p4++) {
385
385
  0 < p4 && !d3 && (r4 += m4);
386
386
  var g4 = n4 && s4 ? e2[p4] : p4;
387
387
  r4 += k2(t2[o4][g4], p4);
388
388
  }
389
- o4 < t2.length - 1 && (!i4 || 0 < h5 && !d3) && (r4 += y6);
389
+ o4 < t2.length - 1 && (!i4 || 0 < h6 && !d3) && (r4 += y6);
390
390
  }
391
391
  }
392
392
  return r4;
393
393
  }
394
394
  function k2(e2, t2) {
395
395
  var i4, r4, n4;
396
- return null == e2 ? "" : e2.constructor === Date ? JSON.stringify(e2).slice(1, 25) : (n4 = false, h4 && "string" == typeof e2 && h4.test(e2) && (e2 = "'" + e2, n4 = true), r4 = (i4 = e2.toString()).replace(u4, o2), (n4 = n4 || true === s2 || "function" == typeof s2 && s2(e2, t2) || Array.isArray(s2) && s2[t2] || ((e4, t4) => {
396
+ return null == e2 ? "" : e2.constructor === Date ? JSON.stringify(e2).slice(1, 25) : (n4 = false, h5 && "string" == typeof e2 && h5.test(e2) && (e2 = "'" + e2, n4 = true), r4 = (i4 = e2.toString()).replace(u4, o2), (n4 = n4 || true === s2 || "function" == typeof s2 && s2(e2, t2) || Array.isArray(s2) && s2[t2] || ((e4, t4) => {
397
397
  for (var i5 = 0; i5 < t4.length; i5++) if (-1 < e4.indexOf(t4[i5])) return true;
398
398
  return false;
399
- })(r4, v2.BAD_DELIMITERS) || -1 < r4.indexOf(m4) || -1 < i4.indexOf(a5) || " " === r4.charAt(0) || " " === r4.charAt(r4.length - 1)) ? a5 + r4 + a5 : r4);
399
+ })(r4, v3.BAD_DELIMITERS) || -1 < r4.indexOf(m4) || -1 < i4.indexOf(a5) || " " === r4.charAt(0) || " " === r4.charAt(r4.length - 1)) ? a5 + r4 + a5 : r4);
400
400
  }
401
- }, v2.RECORD_SEP = String.fromCharCode(30), v2.UNIT_SEP = String.fromCharCode(31), v2.BYTE_ORDER_MARK = "\uFEFF", v2.BAD_DELIMITERS = ["\r", "\n", '"', v2.BYTE_ORDER_MARK], v2.WORKERS_SUPPORTED = !s && !!n.Worker, v2.NODE_STREAM_INPUT = 1, v2.LocalChunkSize = 10485760, v2.RemoteChunkSize = 5242880, v2.DefaultDelimiter = ",", v2.Parser = E2, v2.ParserHandle = i, v2.NetworkStreamer = f4, v2.FileStreamer = l, v2.StringStreamer = c2, v2.ReadableStreamStreamer = p2, n.jQuery && ((d2 = n.jQuery).fn.parse = function(o2) {
402
- var i2 = o2.config || {}, h4 = [];
401
+ }, v3.RECORD_SEP = String.fromCharCode(30), v3.UNIT_SEP = String.fromCharCode(31), v3.BYTE_ORDER_MARK = "\uFEFF", v3.BAD_DELIMITERS = ["\r", "\n", '"', v3.BYTE_ORDER_MARK], v3.WORKERS_SUPPORTED = !s && !!n.Worker, v3.NODE_STREAM_INPUT = 1, v3.LocalChunkSize = 10485760, v3.RemoteChunkSize = 5242880, v3.DefaultDelimiter = ",", v3.Parser = E4, v3.ParserHandle = i, v3.NetworkStreamer = f4, v3.FileStreamer = l, v3.StringStreamer = c2, v3.ReadableStreamStreamer = p2, n.jQuery && ((d2 = n.jQuery).fn.parse = function(o2) {
402
+ var i2 = o2.config || {}, h5 = [];
403
403
  return this.each(function(e2) {
404
404
  if (!("INPUT" === d2(this).prop("tagName").toUpperCase() && "file" === d2(this).attr("type").toLowerCase() && n.FileReader) || !this.files || 0 === this.files.length) return true;
405
- for (var t = 0; t < this.files.length; t++) h4.push({ file: this.files[t], inputElem: this, instanceConfig: d2.extend({}, i2) });
405
+ for (var t = 0; t < this.files.length; t++) h5.push({ file: this.files[t], inputElem: this, instanceConfig: d2.extend({}, i2) });
406
406
  }), e(), this;
407
407
  function e() {
408
- if (0 === h4.length) q4(o2.complete) && o2.complete();
408
+ if (0 === h5.length) q4(o2.complete) && o2.complete();
409
409
  else {
410
- var e2, t, i4, r2, n2 = h4[0];
410
+ var e2, t, i4, r2, n2 = h5[0];
411
411
  if (q4(o2.before)) {
412
412
  var s2 = o2.before(n2.file, n2.inputElem);
413
413
  if ("object" == typeof s2) {
@@ -419,17 +419,17 @@ var require_papaparse_min = __commonJS({
419
419
  var a5 = n2.instanceConfig.complete;
420
420
  n2.instanceConfig.complete = function(e4) {
421
421
  q4(a5) && a5(e4, n2.file, n2.inputElem), u4();
422
- }, v2.parse(n2.file, n2.instanceConfig);
422
+ }, v3.parse(n2.file, n2.instanceConfig);
423
423
  }
424
424
  }
425
425
  function u4() {
426
- h4.splice(0, 1), e();
426
+ h5.splice(0, 1), e();
427
427
  }
428
428
  }), a4 && (n.onmessage = function(e) {
429
429
  e = e.data;
430
- void 0 === v2.WORKER_ID && e && (v2.WORKER_ID = e.workerId);
431
- "string" == typeof e.input ? n.postMessage({ workerId: v2.WORKER_ID, results: v2.parse(e.input, e.config), finished: true }) : (n.File && e.input instanceof File || e.input instanceof Object) && (e = v2.parse(e.input, e.config)) && n.postMessage({ workerId: v2.WORKER_ID, results: e, finished: true });
432
- }), (f4.prototype = Object.create(u2.prototype)).constructor = f4, (l.prototype = Object.create(u2.prototype)).constructor = l, (c2.prototype = Object.create(c2.prototype)).constructor = c2, (p2.prototype = Object.create(u2.prototype)).constructor = p2, v2;
430
+ void 0 === v3.WORKER_ID && e && (v3.WORKER_ID = e.workerId);
431
+ "string" == typeof e.input ? n.postMessage({ workerId: v3.WORKER_ID, results: v3.parse(e.input, e.config), finished: true }) : (n.File && e.input instanceof File || e.input instanceof Object) && (e = v3.parse(e.input, e.config)) && n.postMessage({ workerId: v3.WORKER_ID, results: e, finished: true });
432
+ }), (f4.prototype = Object.create(u2.prototype)).constructor = f4, (l.prototype = Object.create(u2.prototype)).constructor = l, (c2.prototype = Object.create(c2.prototype)).constructor = c2, (p2.prototype = Object.create(u2.prototype)).constructor = p2, v3;
433
433
  });
434
434
  }
435
435
  });
@@ -487,8 +487,8 @@ var MAX_MAP_POINTS_DEFAULT = 2e3;
487
487
 
488
488
  // src/deltaE.ts
489
489
  function linearise(c2) {
490
- const v2 = c2 / 255;
491
- return v2 <= 0.04045 ? v2 / 12.92 : Math.pow((v2 + 0.055) / 1.055, 2.4);
490
+ const v3 = c2 / 255;
491
+ return v3 <= 0.04045 ? v3 / 12.92 : Math.pow((v3 + 0.055) / 1.055, 2.4);
492
492
  }
493
493
  var Xn = 0.95047;
494
494
  var Yn = 1;
@@ -499,18 +499,18 @@ function f(t) {
499
499
  return t > EPS ? Math.cbrt(t) : (KAPPA * t + 16) / 116;
500
500
  }
501
501
  function rgbToLab(r, g3, b4) {
502
- const R3 = linearise(r), G3 = linearise(g3), B2 = linearise(b4);
503
- const X2 = 0.4124564 * R3 + 0.3575761 * G3 + 0.1804375 * B2;
504
- const Y2 = 0.2126729 * R3 + 0.7151522 * G3 + 0.072175 * B2;
505
- const Z2 = 0.0193339 * R3 + 0.119192 * G3 + 0.9503041 * B2;
506
- const fx = f(X2 / Xn), fy = f(Y2 / Yn), fz = f(Z2 / Zn);
502
+ const R2 = linearise(r), G3 = linearise(g3), B2 = linearise(b4);
503
+ const X2 = 0.4124564 * R2 + 0.3575761 * G3 + 0.1804375 * B2;
504
+ const Y2 = 0.2126729 * R2 + 0.7151522 * G3 + 0.072175 * B2;
505
+ const Z3 = 0.0193339 * R2 + 0.119192 * G3 + 0.9503041 * B2;
506
+ const fx = f(X2 / Xn), fy = f(Y2 / Yn), fz = f(Z3 / Zn);
507
507
  return { L: 116 * fy - 16, a: 500 * (fx - fy), b: 200 * (fy - fz) };
508
508
  }
509
509
  function hexToLab(hex2) {
510
510
  const m2 = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(hex2.trim());
511
511
  if (!m2) return null;
512
- const h3 = m2[1].length === 3 ? m2[1][0] + m2[1][0] + m2[1][1] + m2[1][1] + m2[1][2] + m2[1][2] : m2[1];
513
- return rgbToLab(parseInt(h3.slice(0, 2), 16), parseInt(h3.slice(2, 4), 16), parseInt(h3.slice(4, 6), 16));
512
+ const h4 = m2[1].length === 3 ? m2[1][0] + m2[1][0] + m2[1][1] + m2[1][1] + m2[1][2] + m2[1][2] : m2[1];
513
+ return rgbToLab(parseInt(h4.slice(0, 2), 16), parseInt(h4.slice(2, 4), 16), parseInt(h4.slice(4, 6), 16));
514
514
  }
515
515
  var RAD = Math.PI / 180;
516
516
  var DEG = 180 / Math.PI;
@@ -560,14 +560,14 @@ function labToHex(lab) {
560
560
  const fy = (lab.L + 16) / 116, fx = fy + lab.a / 500, fz = fy - lab.b / 200;
561
561
  const X2 = Xn * finv(fx);
562
562
  const Y2 = Yn * (lab.L > KAPPA * EPS ? fy * fy * fy : lab.L / KAPPA);
563
- const Z2 = Zn * finv(fz);
563
+ const Z3 = Zn * finv(fz);
564
564
  const lin = [
565
- 3.2404542 * X2 - 1.5371385 * Y2 - 0.4985314 * Z2,
566
- -0.969266 * X2 + 1.8760108 * Y2 + 0.041556 * Z2,
567
- 0.0556434 * X2 - 0.2040259 * Y2 + 1.0572252 * Z2
565
+ 3.2404542 * X2 - 1.5371385 * Y2 - 0.4985314 * Z3,
566
+ -0.969266 * X2 + 1.8760108 * Y2 + 0.041556 * Z3,
567
+ 0.0556434 * X2 - 0.2040259 * Y2 + 1.0572252 * Z3
568
568
  ];
569
- return "#" + lin.map((v2) => {
570
- const c2 = Math.max(0, Math.min(1, v2));
569
+ return "#" + lin.map((v3) => {
570
+ const c2 = Math.max(0, Math.min(1, v3));
571
571
  const g3 = c2 <= 31308e-7 ? 12.92 * c2 : 1.055 * Math.pow(c2, 1 / 2.4) - 0.055;
572
572
  return Math.round(g3 * 255).toString(16).padStart(2, "0");
573
573
  }).join("");
@@ -605,8 +605,8 @@ function toRgb(raw) {
605
605
  if (!s || s === "none" || s === "transparent") return null;
606
606
  const hex2 = /^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(s);
607
607
  if (hex2) {
608
- const h3 = hex2[1];
609
- const full = h3.length === 3 ? h3[0] + h3[0] + h3[1] + h3[1] + h3[2] + h3[2] : h3;
608
+ const h4 = hex2[1];
609
+ const full = h4.length === 3 ? h4[0] + h4[0] + h4[1] + h4[1] + h4[2] + h4[2] : h4;
610
610
  return [
611
611
  parseInt(full.slice(0, 2), 16),
612
612
  parseInt(full.slice(2, 4), 16),
@@ -626,7 +626,7 @@ function cellKey(rgb) {
626
626
  ].join(",");
627
627
  }
628
628
  function hex(rgb) {
629
- return "#" + rgb.map((v2) => Math.max(0, Math.min(255, v2)).toString(16).padStart(2, "0")).join("");
629
+ return "#" + rgb.map((v3) => Math.max(0, Math.min(255, v3)).toString(16).padStart(2, "0")).join("");
630
630
  }
631
631
  function censusColourSpread(container, doc) {
632
632
  if (!container || typeof container.querySelectorAll !== "function") return EMPTY;
@@ -669,14 +669,14 @@ function censusColourSpread(container, doc) {
669
669
  const d2 = cs.map(() => new Array(cs.length).fill(0));
670
670
  let span = 0, lo = 0, hi = 1;
671
671
  for (let i = 0; i < cs.length; i++) {
672
- for (let j3 = i + 1; j3 < cs.length; j3++) {
673
- const v2 = deltaE2000(cs[i], cs[j3]);
674
- d2[i][j3] = v2;
675
- d2[j3][i] = v2;
676
- if (v2 > span) {
677
- span = v2;
672
+ for (let j2 = i + 1; j2 < cs.length; j2++) {
673
+ const v3 = deltaE2000(cs[i], cs[j2]);
674
+ d2[i][j2] = v3;
675
+ d2[j2][i] = v3;
676
+ if (v3 > span) {
677
+ span = v3;
678
678
  lo = i;
679
- hi = j3;
679
+ hi = j2;
680
680
  }
681
681
  }
682
682
  }
@@ -691,8 +691,8 @@ function censusColourSpread(container, doc) {
691
691
  let crowd = 0;
692
692
  for (let i = 0; i < cs.length; i++) {
693
693
  let n = 0;
694
- for (let j3 = 0; j3 < cs.length; j3++) {
695
- if (i === j3 || d2[i][j3] <= SAME_SHADE_DELTA_E) n += top[j3].n;
694
+ for (let j2 = 0; j2 < cs.length; j2++) {
695
+ if (i === j2 || d2[i][j2] <= SAME_SHADE_DELTA_E) n += top[j2].n;
696
696
  }
697
697
  if (n > crowd) crowd = n;
698
698
  }
@@ -722,8 +722,8 @@ function normHex(raw) {
722
722
  if (typeof raw !== "string") return null;
723
723
  const m2 = HEX.exec(raw.trim());
724
724
  if (!m2) return null;
725
- const h3 = m2[1].length === 3 ? m2[1].split("").map((c2) => c2 + c2).join("") : m2[1];
726
- return "#" + h3.toLowerCase();
725
+ const h4 = m2[1].length === 3 ? m2[1].split("").map((c2) => c2 + c2).join("") : m2[1];
726
+ return "#" + h4.toLowerCase();
727
727
  }
728
728
  function mixLab(a4, b4, t) {
729
729
  return { L: a4.L + (b4.L - a4.L) * t, a: a4.a + (b4.a - a4.a) * t, b: a4.b + (b4.b - a4.b) * t };
@@ -731,7 +731,7 @@ function mixLab(a4, b4, t) {
731
731
  function paintedOver(fg, canvas, alpha) {
732
732
  const f4 = [1, 3, 5].map((i) => parseInt(fg.slice(i, i + 2), 16));
733
733
  const c2 = [1, 3, 5].map((i) => parseInt(canvas.slice(i, i + 2), 16));
734
- const mixed = f4.map((v2, i) => Math.round(v2 * alpha + c2[i] * (1 - alpha))).map((v2) => v2.toString(16).padStart(2, "0"));
734
+ const mixed = f4.map((v3, i) => Math.round(v3 * alpha + c2[i] * (1 - alpha))).map((v3) => v3.toString(16).padStart(2, "0"));
735
735
  return hexToLab("#" + mixed.join(""));
736
736
  }
737
737
  function autoRampMinStep(low, high, canvas, classes = AUTO_RAMP_CLASSES, opacity = AUTO_RAMP_DRAWN_OPACITY) {
@@ -860,20 +860,20 @@ function resolveOptions(p2) {
860
860
  // never reach a chart as a live mode. Both of these are read on EVERY render, so a
861
861
  // reader can change their mind about a cached chart without regenerating it.
862
862
  approximatePositions: (() => {
863
- const v2 = (p2.approximatePositions == null ? "" : String(p2.approximatePositions)).toLowerCase();
864
- return v2 === "mark" || v2 === "aggregate" || v2 === "skip" ? v2 : APPROXIMATE_POSITIONS_DEFAULT;
863
+ const v3 = (p2.approximatePositions == null ? "" : String(p2.approximatePositions)).toLowerCase();
864
+ return v3 === "mark" || v3 === "aggregate" || v3 === "skip" ? v3 : APPROXIMATE_POSITIONS_DEFAULT;
865
865
  })(),
866
866
  valueAxisBaseline: (() => {
867
- const v2 = (p2.valueAxisBaseline == null ? "" : String(p2.valueAxisBaseline)).toLowerCase();
868
- return v2 === "zero" || v2 === "fit" || v2 === "auto" ? v2 : VALUE_AXIS_BASELINE_DEFAULT;
867
+ const v3 = (p2.valueAxisBaseline == null ? "" : String(p2.valueAxisBaseline)).toLowerCase();
868
+ return v3 === "zero" || v3 === "fit" || v3 === "auto" ? v3 : VALUE_AXIS_BASELINE_DEFAULT;
869
869
  })(),
870
870
  // Same shape, and the same reason for it: an unrecognised string must never reach a chart
871
871
  // as a live mode. Failing open to "auto" is the conservative direction here — "auto" is
872
872
  // the setting that makes the chart PROVE the grid before it names a period, so a garbled
873
873
  // value withdraws the claim rather than asserting one.
874
874
  seasonalMarkers: (() => {
875
- const v2 = (p2.seasonalMarkers == null ? "" : String(p2.seasonalMarkers)).toLowerCase();
876
- return v2 === "auto" || v2 === "always" || v2 === "never" ? v2 : SEASONAL_MARKERS_DEFAULT;
875
+ const v3 = (p2.seasonalMarkers == null ? "" : String(p2.seasonalMarkers)).toLowerCase();
876
+ return v3 === "auto" || v3 === "always" || v3 === "never" ? v3 : SEASONAL_MARKERS_DEFAULT;
877
877
  })(),
878
878
  // ---- animation: booleans, default+clamp numerics, "" default enum ----
879
879
  animAutoPlay: !!p2.animAutoPlay,
@@ -1226,10 +1226,10 @@ function A3(n) {
1226
1226
  if (r && i && c3(r) !== i && (r = null), n.city !== void 0 && n.city !== null) {
1227
1227
  let a4 = u(String(n.city)), s = O(a4), f4 = s ? F(s, n.mapKind) : null;
1228
1228
  if (f4 && f4.length) {
1229
- let d2 = n.state === void 0 || n.state === null ? "" : String(n.state).trim(), R3 = d2 ? u(d2) : "", g3 = d2 ? Y(d2) : null, S = [], m2 = -1;
1229
+ let d2 = n.state === void 0 || n.state === null ? "" : String(n.state).trim(), R2 = d2 ? u(d2) : "", g3 = d2 ? Y(d2) : null, S = [], m2 = -1;
1230
1230
  for (let c2 of f4) {
1231
1231
  let l = c2.row, A = 0;
1232
- if (d2 && l.a1 !== "") if (g3 && l.a1 === g3 || u(l.a1) === R3) A++;
1232
+ if (d2 && l.a1 !== "") if (g3 && l.a1 === g3 || u(l.a1) === R2) A++;
1233
1233
  else continue;
1234
1234
  if (i) if (T(l.cc) === i) A++;
1235
1235
  else continue;
@@ -1262,15 +1262,15 @@ function A3(n) {
1262
1262
  var G = { latlon: 0, city: 1, zip3: 2, state: 3, country: 4 };
1263
1263
  var x = 8;
1264
1264
  function y3(n, e) {
1265
- let t = new Array(n.length), o = new Array(n.length), i = new Array(n.length), r = /* @__PURE__ */ new Set(), a4 = [], s = /* @__PURE__ */ new Set(), f4 = [], d2 = /* @__PURE__ */ new Set(), R3 = [], g3 = { latlon: 0, city: 0, zip3: 0, state: 0, country: 0 }, S = 0, m2 = 0, p2 = null;
1265
+ let t = new Array(n.length), o = new Array(n.length), i = new Array(n.length), r = /* @__PURE__ */ new Set(), a4 = [], s = /* @__PURE__ */ new Set(), f4 = [], d2 = /* @__PURE__ */ new Set(), R2 = [], g3 = { latlon: 0, city: 0, zip3: 0, state: 0, country: 0 }, S = 0, m2 = 0, p2 = null;
1266
1266
  for (let l = 0; l < n.length; ++l) {
1267
- let A = n[l], C2 = A3({ ...A, mapKind: e });
1268
- if (S3(C2)) {
1267
+ let A = n[l], C = A3({ ...A, mapKind: e });
1268
+ if (S3(C)) {
1269
1269
  t[l] = null, o[l] = null, i[l] = null, m2++;
1270
1270
  let M2 = K(A);
1271
- M2 && !d2.has(M2.toLowerCase()) && (d2.add(M2.toLowerCase()), R3.length < x && R3.push(M2));
1272
- } else if (C2) {
1273
- if (t[l] = C2.lat, o[l] = C2.lon, i[l] = C2.precision, S++, g3[C2.precision]++, (p2 === null || G[C2.precision] > G[p2]) && (p2 = C2.precision), G[C2.precision] > G.city) {
1271
+ M2 && !d2.has(M2.toLowerCase()) && (d2.add(M2.toLowerCase()), R2.length < x && R2.push(M2));
1272
+ } else if (C) {
1273
+ if (t[l] = C.lat, o[l] = C.lon, i[l] = C.precision, S++, g3[C.precision]++, (p2 === null || G[C.precision] > G[p2]) && (p2 = C.precision), G[C.precision] > G.city) {
1274
1274
  let M2 = K(A);
1275
1275
  M2 && !s.has(M2.toLowerCase()) && (s.add(M2.toLowerCase()), f4.length < x && f4.push(M2));
1276
1276
  }
@@ -1281,7 +1281,7 @@ function y3(n, e) {
1281
1281
  }
1282
1282
  }
1283
1283
  let c2 = !n3() && n.some((l) => l.city !== null && l.city !== void 0 && String(l.city).trim() !== "");
1284
- return { lat: t, lon: o, precisions: i, precision: p2, precisionCounts: g3, coarseExamples: f4, unmatched: a4, ambiguousRows: m2, ambiguousExamples: R3, matchedRows: S, totalRows: n.length, ...c2 ? { cityTableMissing: true } : {} };
1284
+ return { lat: t, lon: o, precisions: i, precision: p2, precisionCounts: g3, coarseExamples: f4, unmatched: a4, ambiguousRows: m2, ambiguousExamples: R2, matchedRows: S, totalRows: n.length, ...c2 ? { cityTableMissing: true } : {} };
1285
1285
  }
1286
1286
  function K(n) {
1287
1287
  let e = [n.city, n.state, n.zip, n.country].filter((t) => t != null && String(t).trim() !== "").map((t) => String(t).trim()).join(", ");
@@ -1422,12 +1422,12 @@ function It(n, s) {
1422
1422
  return s === "us-zip5" ? w.has(n.slice(0, 3)) : true;
1423
1423
  }
1424
1424
  function Wt(n, s) {
1425
- let i = new Array(n.length), r = /* @__PURE__ */ new Set(), M2 = [], h3 = 0;
1426
- for (let N3 = 0; N3 < n.length; ++N3) {
1427
- let I2 = Mt(n[N3], s), O2 = I2 !== null && It(I2, s) ? I2 : null;
1428
- if (i[N3] = O2, O2 !== null) h3++;
1425
+ let i = new Array(n.length), r = /* @__PURE__ */ new Set(), M2 = [], h4 = 0;
1426
+ for (let N2 = 0; N2 < n.length; ++N2) {
1427
+ let I2 = Mt(n[N2], s), O2 = I2 !== null && It(I2, s) ? I2 : null;
1428
+ if (i[N2] = O2, O2 !== null) h4++;
1429
1429
  else {
1430
- let d2 = n[N3];
1430
+ let d2 = n[N2];
1431
1431
  if (d2 != null) {
1432
1432
  let p2 = String(d2).trim();
1433
1433
  if (p2.length > 0) {
@@ -1437,92 +1437,94 @@ function Wt(n, s) {
1437
1437
  }
1438
1438
  }
1439
1439
  }
1440
- return { iso: i, unmatched: M2, matchedRows: h3, totalRows: n.length };
1440
+ return { iso: i, unmatched: M2, matchedRows: h4, totalRows: n.length };
1441
1441
  }
1442
1442
 
1443
- // ../shape-core/dist/chunk-SV3JH46V.mjs
1443
+ // ../shape-core/dist/chunk-RS7LNZD7.mjs
1444
1444
  var import_papaparse = __toESM(require_papaparse_min(), 1);
1445
1445
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
1446
- var _e = { "north-america": "AG AI AW BB BL BM BQ BS BZ CA CR CU CW DM DO GD GL GP GT HN HT JM KN KY LC MF MQ MS MX NI PA PM PR SV SX TC TT US VC VG VI", "south-america": "AR BO BR CL CO EC FK GF GY PE PY SR UY VE", europe: "AD AL AT AX BA BE BG BY CH CY CZ DE DK EE ES FI FO FR GB GG GI GR HR HU IE IM IS IT JE LI LT LU LV MC MD ME MK MT NL NO PL PT RO RS RU SE SI SJ SK SM UA VA", africa: "AO BF BI BJ BW CD CF CG CI CM CV DJ DZ EG EH ER ET GA GH GM GN GQ GW KE KM LR LS LY MA MG ML MR MU MW MZ NA NE NG RE RW SC SD SH SL SN SO SS ST SZ TD TG TN TZ UG YT ZA ZM ZW", asia: "AE AF AM AZ BD BH BN BT CC CN CX GE HK ID IL IN IO IQ IR JO JP KG KH KP KR KW KZ LA LB LK MM MN MO MV MY NP OM PH PK PS QA SA SG SY TH TJ TL TM TR TW UZ VN YE", oceania: "AS AU CK FJ FM GU KI MH MP NC NF NR NU NZ PF PG PN PW SB TK TO TV UM VU WF WS", antarctica: "AQ BV GS HM TF" };
1447
- var q2 = (() => {
1446
+ var Se = { "north-america": "AG AI AW BB BL BM BQ BS BZ CA CR CU CW DM DO GD GL GP GT HN HT JM KN KY LC MF MQ MS MX NI PA PM PR SV SX TC TT US VC VG VI", "south-america": "AR BO BR CL CO EC FK GF GY PE PY SR UY VE", europe: "AD AL AT AX BA BE BG BY CH CY CZ DE DK EE ES FI FO FR GB GG GI GR HR HU IE IM IS IT JE LI LT LU LV MC MD ME MK MT NL NO PL PT RO RS RU SE SI SJ SK SM UA VA", africa: "AO BF BI BJ BW CD CF CG CI CM CV DJ DZ EG EH ER ET GA GH GM GN GQ GW KE KM LR LS LY MA MG ML MR MU MW MZ NA NE NG RE RW SC SD SH SL SN SO SS ST SZ TD TG TN TZ UG YT ZA ZM ZW", asia: "AE AF AM AZ BD BH BN BT CC CN CX GE HK ID IL IN IO IQ IR JO JP KG KH KP KR KW KZ LA LB LK MM MN MO MV MY NP OM PH PK PS QA SA SG SY TH TJ TL TM TR TW UZ VN YE", oceania: "AS AU CK FJ FM GU KI MH MP NC NF NR NU NZ PF PG PN PW SB TK TO TV UM VU WF WS", antarctica: "AQ BV GS HM TF" };
1447
+ var Q2 = (() => {
1448
1448
  let n = /* @__PURE__ */ new Map();
1449
- for (let e of Object.keys(_e)) for (let t of _e[e].split(/\s+/)) t && n.set(t, e);
1449
+ for (let e of Object.keys(Se)) for (let t of Se[e].split(/\s+/)) t && n.set(t, e);
1450
1450
  return n;
1451
1451
  })();
1452
- function Ve(n) {
1452
+ function $e(n) {
1453
1453
  for (let [e, t] of n) {
1454
- let i = q2.get(e);
1455
- i && !q2.has(t) && q2.set(t, i);
1454
+ let i = Q2.get(e);
1455
+ i && !Q2.has(t) && Q2.set(t, i);
1456
1456
  }
1457
1457
  }
1458
- Ve(N);
1459
- var Be = ["rate", "ratio", "pct", "percent", "percentage", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "z[_-]?score", "average", "avg", "mean", "median", "stddev", "variance", "gpa", "percentile", "quantile", "efficiency", "accuracy", "probability", "multiplier", "coefficient", "correlation", "occupancy", "age", "bmi", "temperature", "density", "pressure", "humidity", "ph", "velocity", "speed", "elevation", "altitude", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps", "temperatuur", "temperatur", "temperatura", "teplota", "lampotila", "homerseklet", "sicaklik", "pression", "presion", "pressao", "pressione", "druck", "tryck", "tlak", "paine", "nyomas", "presiune", "humidite", "humedad", "umidade", "umidita", "feuchtigkeit", "vochtigheid", "kosteus", "vlhkost", "vitesse", "velocidad", "velocidade", "velocita", "geschwindigkeit", "snelheid", "hastighet", "hastighed", "rychlost", "nopeus", "sebesseg", "brzina", "predkosc", "densite", "densidad", "densidade", "densita", "dichte", "dichtheid", "hustota", "tiheys", "gustoca", "moyenne", "mediane", "promedio", "mediana", "gemiddelde", "durchschnitt", "mittelwert", "genomsnitt", "gennemsnit", "gjennomsnitt", "keskiarvo", "atlag", "ortalama", "prosjek", "srednia", "prumer", "priemer", "medie", "taux", "tasa", "taxa", "tasso", "verhaltnis", "verhouding", "aandeel", "anteil", "andel", "osuus", "podil", "udzial", "udio", "pourcentage", "porcentaje", "percentual", "prozent", "procent", "prosentti", "szazalek", "yuzde", "participacion", "participacao", "pondere", "omjer", "arany", "oran", "rata", "leeftijd", "edad", "idade", "wiek", "eletkor", "varsta", "puntuacion", "pontuacao", "punteggio", "betyg", "ocena", "indice", "indeks", "wskaznik", "puan"];
1460
- var Ye = ["pct", "percent", "percentage", "rate", "ratio", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "gpa", "percentile", "quantile", "bmi", "density", "pressure", "humidity", "velocity", "efficiency", "occupancy", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps"];
1461
- var He = ["latitude", "longitude"];
1462
- var Ke = ["latitude", "longitude"];
1463
- function $2(n) {
1458
+ $e(N);
1459
+ var Ke = ["rate", "ratio", "pct", "percent", "percentage", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "z[_-]?score", "average", "avg", "mean", "median", "stddev", "variance", "gpa", "percentile", "quantile", "efficiency", "accuracy", "probability", "multiplier", "coefficient", "correlation", "occupancy", "age", "bmi", "temperature", "density", "pressure", "humidity", "ph", "velocity", "speed", "elevation", "altitude", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps", "temperatuur", "temperatur", "temperatura", "teplota", "lampotila", "homerseklet", "sicaklik", "pression", "presion", "pressao", "pressione", "druck", "tryck", "tlak", "paine", "nyomas", "presiune", "humidite", "humedad", "umidade", "umidita", "feuchtigkeit", "vochtigheid", "kosteus", "vlhkost", "vitesse", "velocidad", "velocidade", "velocita", "geschwindigkeit", "snelheid", "hastighet", "hastighed", "rychlost", "nopeus", "sebesseg", "brzina", "predkosc", "densite", "densidad", "densidade", "densita", "dichte", "dichtheid", "hustota", "tiheys", "gustoca", "moyenne", "mediane", "promedio", "mediana", "gemiddelde", "durchschnitt", "mittelwert", "genomsnitt", "gennemsnit", "gjennomsnitt", "keskiarvo", "atlag", "ortalama", "prosjek", "srednia", "prumer", "priemer", "medie", "taux", "tasa", "taxa", "tasso", "verhaltnis", "verhouding", "aandeel", "anteil", "andel", "osuus", "podil", "udzial", "udio", "pourcentage", "porcentaje", "percentual", "prozent", "procent", "prosentti", "szazalek", "yuzde", "participacion", "participacao", "pondere", "omjer", "arany", "oran", "rata", "leeftijd", "edad", "idade", "wiek", "eletkor", "varsta", "puntuacion", "pontuacao", "punteggio", "betyg", "ocena", "indice", "indeks", "wskaznik", "puan"];
1460
+ var Ze = ["pct", "percent", "percentage", "rate", "ratio", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "gpa", "percentile", "quantile", "bmi", "density", "pressure", "humidity", "velocity", "efficiency", "occupancy", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps"];
1461
+ var je = ["latitude", "longitude"];
1462
+ var Xe = ["latitude", "longitude"];
1463
+ function K2(n) {
1464
1464
  return Array.from(n).map((e) => {
1465
1465
  let t = e.normalize("NFD").replace(/[̀-ͯ]/g, "");
1466
1466
  return t.length === 1 ? t : e;
1467
1467
  }).join("");
1468
1468
  }
1469
- var ie = ["somme de", "suma de", "soma de", "summe von", "som van", "somma di", "summa av", "sum av", "sum af", "soucet z", "suma z", "totaal van", "total de", "toplam", "osszeg", "nombre de", "recuento de", "contagem de", "anzahl von", "aantal van", "conteggio di", "antal av", "lukumaara", "pocet z"];
1470
- function $e(n) {
1469
+ var se = ["somme de", "suma de", "soma de", "summe von", "som van", "somma di", "summa av", "sum av", "sum af", "soucet z", "suma z", "totaal van", "total de", "toplam", "osszeg", "nombre de", "recuento de", "contagem de", "anzahl von", "aantal van", "conteggio di", "antal av", "lukumaara", "pocet z"];
1470
+ function Qe(n) {
1471
1471
  return [...n].sort((e, t) => t.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|");
1472
1472
  }
1473
- var Ae = new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:" + $e(ie) + ")\\s+)", "i");
1474
- var Ze = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1475
- var Xe = new RegExp("\\b(" + Be.join("|") + ")\\b|(" + Ye.join("|") + ")$", "i");
1476
- var je = new RegExp("\\b(" + He.join("|") + ")\\b|(" + Ke.join("|") + ")$", "i");
1473
+ var Ne = new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:" + Qe(se) + ")\\s+)", "i");
1474
+ var qe = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1475
+ var Je = new RegExp("\\b(" + Ke.join("|") + ")\\b|(" + Ze.join("|") + ")$", "i");
1476
+ var et = new RegExp("\\b(" + je.join("|") + ")\\b|(" + Xe.join("|") + ")$", "i");
1477
1477
  function Te(n) {
1478
1478
  if (!n) return "";
1479
- let e = String(n), t = Ae.exec($2(e));
1479
+ let e = String(n), t = Ne.exec(K2(e));
1480
1480
  return (t ? e.slice(t[0].length) : e).trim();
1481
1481
  }
1482
- function qe(n) {
1483
- return !!n && Ae.test($2(String(n)));
1482
+ function tt(n) {
1483
+ return !!n && Ne.test(K2(String(n)));
1484
1484
  }
1485
- var Qe = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
1486
- var Me = new RegExp("^\\s*(" + [...Qe].sort((n, e) => e.length - n.length).map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
1487
- function Je(n) {
1485
+ var nt = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
1486
+ var Me = new RegExp("^\\s*(" + [...nt].sort((n, e) => e.length - n.length).map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
1487
+ var xe = { Sum: ["Sum of "], Avg: ["Average of "], Average: ["Average of "], Count: ["Count of "], CountNonNull: ["Count of "], Min: ["Min of ", "First ", "Earliest "], Max: ["Max of ", "Last ", "Latest "], Median: ["Median of "], StandardDeviation: ["Standard deviation of "], Variance: ["Variance of "] };
1488
+ var it = new RegExp("^(" + Object.keys(xe).join("|") + ")\\((.+)\\)$");
1489
+ function st(n) {
1488
1490
  let e = Te(n);
1489
- return e.length === 0 ? "" : e.replace(Ze, " ");
1491
+ return e.length === 0 ? "" : e.replace(qe, " ");
1490
1492
  }
1491
- function ve(n, e) {
1493
+ function Ie(n, e) {
1492
1494
  if (!e) return false;
1493
1495
  let t = Te(e);
1494
- return n.test($2(Je(e))) || n.test($2(t)) || n.test($2(T2(t).join(" ")));
1496
+ return n.test(K2(st(e))) || n.test(K2(t)) || n.test(K2(T2(t).join(" ")));
1495
1497
  }
1496
- function Ne(n) {
1497
- return ve(je, n);
1498
+ function Ee(n) {
1499
+ return Ie(et, n);
1498
1500
  }
1499
- function et(n) {
1500
- return ve(Xe, n) || Ne(n);
1501
+ function rt2(n) {
1502
+ return Ie(Je, n) || Ee(n);
1501
1503
  }
1502
- var xe = /int|double|decimal|single|float|number|currency|money/i;
1503
- function tt(n) {
1504
+ var De = /int|double|decimal|single|float|number|currency|money/i;
1505
+ function ot(n) {
1504
1506
  let e = String(n?.valueNature ?? "").trim().toLowerCase();
1505
- return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || n?.isMeasure === true || xe.test(String(n?.dataType ?? "")) ? "Continuous" : "Categorical";
1507
+ return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || n?.isMeasure === true || De.test(String(n?.dataType ?? "")) ? "Continuous" : "Categorical";
1506
1508
  }
1507
- function nt(n) {
1508
- return n?.isMeasure === true || xe.test(String(n?.dataType ?? ""));
1509
+ function at2(n) {
1510
+ return n?.isMeasure === true || De.test(String(n?.dataType ?? ""));
1509
1511
  }
1510
- function Ie(n) {
1511
- let e = n ?? {}, t = tt(e);
1512
+ function Oe(n) {
1513
+ let e = n ?? {}, t = ot(e);
1512
1514
  if (t !== "Continuous") return { nature: t, additivity: "unknown", basis: "role", suppressed: false };
1513
- if (Ne(e.name)) return { nature: t, additivity: "positional", basis: "name", suppressed: true };
1515
+ if (Ee(e.name)) return { nature: t, additivity: "positional", basis: "name", suppressed: true };
1514
1516
  let i = String(e.additivity ?? "").trim().toLowerCase();
1515
- if (!(i === "additive" && qe(e.name))) {
1517
+ if (!(i === "additive" && tt(e.name))) {
1516
1518
  if (i === "additive") return { nature: t, additivity: "additive", basis: "measured", suppressed: false };
1517
1519
  if (i === "part_of_whole") return { nature: t, additivity: "part_of_whole", basis: "measured", suppressed: false };
1518
1520
  if (i === "intensive_rate") return { nature: t, additivity: "intensive_rate", basis: "measured", suppressed: false };
1519
1521
  }
1520
- return e.discourageAggregationAcrossGroups === true ? { nature: t, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : et(e.name) ? { nature: t, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: t, additivity: "additive", basis: "default", suppressed: false };
1522
+ return e.discourageAggregationAcrossGroups === true ? { nature: t, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : rt2(e.name) ? { nature: t, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: t, additivity: "additive", basis: "default", suppressed: false };
1521
1523
  }
1522
- function Ee(n) {
1523
- let e = Ie(n), t = n ?? {};
1524
+ function Le(n) {
1525
+ let e = Oe(n), t = n ?? {};
1524
1526
  if (e.nature === "Categorical") return ["first", "distinctcount", "count"];
1525
- if (e.nature === "Ordinal") return nt(t) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1527
+ if (e.nature === "Ordinal") return at2(t) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1526
1528
  switch (e.additivity) {
1527
1529
  case "positional":
1528
1530
  return ["min", "max", "count", "distinctcount", "first"];
@@ -1532,161 +1534,161 @@ function Ee(n) {
1532
1534
  return ["sum", "average", "median", "min", "max", "count", "distinctcount", "first"];
1533
1535
  }
1534
1536
  }
1535
- function Vt(n) {
1536
- return Ee(n)[0];
1537
+ function Xt(n) {
1538
+ return Le(n)[0];
1537
1539
  }
1538
- function Yt(n, e) {
1540
+ function qt(n, e) {
1539
1541
  if (e !== "sum" && e !== "count") return false;
1540
1542
  if (e === "count") return true;
1541
- let t = Ie(n);
1543
+ let t = Oe(n);
1542
1544
  return t.additivity === "additive" || t.additivity === "part_of_whole" || t.additivity === "unknown";
1543
1545
  }
1546
+ var ct2 = new RegExp([String.raw`\bisMeasure\b`, String.raw`\bdataType\b`, String.raw`\bcolumns\s*\[\s*-?\d`, String.raw`\.iloc\s*\[[^\]]*,`, String.raw`\.iat\s*\[`, String.raw`\bselect_dtypes\b`, String.raw`\b_get_numeric_data\b`, String.raw`\bis_numeric_dtype\b`, String.raw`\bfor\s+\w+\s+in\s+(?:list\s*\(\s*)?df\.columns\b`, String.raw`\bdf\.columns\s*\.\s*(?:tolist|to_list|difference|drop)\b`, String.raw`\bdf\.dtypes\b`, String.raw`\bObject\s*\.\s*(?:keys|values|entries)\s*\(\s*(?:rows|data|df)?\s*\[\s*0\s*\]`, String.raw`\b(?:row|rw|r)\s*\[\s*\d+\s*\]`].join("|"));
1544
1547
 
1545
1548
  // ../shape-core/dist/index.mjs
1546
1549
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
1547
- var N2 = 2;
1548
- var j2 = 400;
1549
- function D3(o) {
1550
- return !!E(o);
1551
- }
1552
- function C(o) {
1553
- let e = /* @__PURE__ */ new Set();
1554
- for (let n of o) {
1555
- if (n == null) continue;
1556
- let s = u(String(n));
1557
- if (!V(s) && !e.has(s) && (e.add(s), e.size >= j2)) break;
1558
- }
1559
- return Array.from(e);
1560
- }
1561
- function R2(o) {
1562
- let e = C(o);
1563
- if (e.length === 0 || $3(o) < 95) return false;
1564
- let n = e.filter((u2) => D3(u2) && !Y(u2)).length, s = e.filter((u2) => !D3(u2) && !!Y(u2)).length;
1565
- return n >= 1 && n >= s;
1566
- }
1567
- function W2(o, e) {
1568
- if (!Y(o)) return false;
1569
- let n = E(o);
1570
- return n ? e === "world" ? true : s3.has(n) : false;
1571
- }
1572
- function $3(o) {
1573
- let e = C(o);
1574
- if (e.length === 0) return 0;
1575
- let n = 0;
1576
- for (let s of e) D3(s) && n++;
1577
- return Math.round(n / e.length * 1e3) / 10;
1578
- }
1579
- function w2(o) {
1580
- let e = C(o);
1581
- if (e.length === 0) return 0;
1582
- let n = 0;
1583
- for (let s of e) Y(s) && n++;
1584
- return Math.round(n / e.length * 1e3) / 10;
1585
- }
1586
- function F3(o) {
1587
- let e = /* @__PURE__ */ new Set();
1588
- for (let n of o) {
1589
- if (n == null) continue;
1590
- let s = String(n).trim();
1591
- if (!V(u(s)) && !e.has(s) && (e.add(s), e.size >= j2)) break;
1592
- }
1593
- return Array.from(e);
1594
- }
1595
- function G2(o) {
1596
- let e = F3(o);
1597
- if (e.length === 0) return 0;
1598
- let n = 0;
1599
- for (let s of e) Z(s).length > 0 && n++;
1600
- return Math.round(n / e.length * 1e3) / 10;
1601
- }
1602
- function q3(o, e) {
1603
- return y2(e, rt) ? true : F3(o).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
1604
- }
1605
- function de(o, e) {
1606
- let n = C(o);
1550
+ var E2 = 2;
1551
+ var Z2 = 400;
1552
+ function F3(i) {
1553
+ return !!E(i);
1554
+ }
1555
+ function P2(i) {
1556
+ let n = /* @__PURE__ */ new Set();
1557
+ for (let t of i) {
1558
+ if (t == null) continue;
1559
+ let s = u(String(t));
1560
+ if (!V(s) && !n.has(s) && (n.add(s), n.size >= Z2)) break;
1561
+ }
1562
+ return Array.from(n);
1563
+ }
1564
+ function h3(i) {
1565
+ let n = P2(i);
1566
+ if (n.length === 0 || G2(i) < 95) return false;
1567
+ let t = n.filter((l) => F3(l) && !Y(l)).length, s = n.filter((l) => !F3(l) && !!Y(l)).length;
1568
+ return t >= 1 && t >= s;
1569
+ }
1570
+ function W2(i, n) {
1571
+ if (!Y(i)) return false;
1572
+ let t = E(i);
1573
+ return t ? n === "world" ? true : s3.has(t) : false;
1574
+ }
1575
+ function G2(i) {
1576
+ let n = P2(i);
1577
+ if (n.length === 0) return 0;
1578
+ let t = 0;
1579
+ for (let s of n) F3(s) && t++;
1580
+ return Math.round(t / n.length * 1e3) / 10;
1581
+ }
1582
+ function v2(i) {
1583
+ let n = P2(i);
1584
+ if (n.length === 0) return 0;
1585
+ let t = 0;
1586
+ for (let s of n) Y(s) && t++;
1587
+ return Math.round(t / n.length * 1e3) / 10;
1588
+ }
1589
+ function $2(i) {
1590
+ let n = /* @__PURE__ */ new Set();
1591
+ for (let t of i) {
1592
+ if (t == null) continue;
1593
+ let s = String(t).trim();
1594
+ if (!V(u(s)) && !n.has(s) && (n.add(s), n.size >= Z2)) break;
1595
+ }
1596
+ return Array.from(n);
1597
+ }
1598
+ function z2(i) {
1599
+ let n = $2(i);
1607
1600
  if (n.length === 0) return 0;
1601
+ let t = 0;
1602
+ for (let s of n) Z(s).length > 0 && t++;
1603
+ return Math.round(t / n.length * 1e3) / 10;
1604
+ }
1605
+ function q3(i, n) {
1606
+ return y2(n, rt) ? true : $2(i).some((t) => /^\d{5}(-\d{4})?$/.test(t.replace(/\.0+$/, "")));
1607
+ }
1608
+ function gt(i, n) {
1609
+ let t = P2(i);
1610
+ if (t.length === 0) return 0;
1608
1611
  let s = 0;
1609
- for (let u2 of n) p3(u2, e) && s++;
1610
- return Math.round(s / n.length * 1e3) / 10;
1612
+ for (let l of t) p3(l, n) && s++;
1613
+ return Math.round(s / t.length * 1e3) / 10;
1611
1614
  }
1612
- function z2(o, e) {
1613
- let n = 0;
1614
- for (let s of C(o)) e(s) && n++;
1615
- return n;
1615
+ function D3(i, n) {
1616
+ let t = 0;
1617
+ for (let s of P2(i)) n(s) && t++;
1618
+ return t;
1616
1619
  }
1617
- function pe(o, e) {
1618
- let n = 0;
1619
- for (let s of F3(o)) e(s) && n++;
1620
- return n;
1620
+ function yt2(i, n) {
1621
+ let t = 0;
1622
+ for (let s of $2(i)) n(s) && t++;
1623
+ return t;
1621
1624
  }
1622
- function ge(o, e, n, s, u2) {
1623
- let b4 = [], c2 = [], r = {}, I2 = {}, M2 = new Set(o), l = (t) => e.map((i) => i[t]);
1624
- for (let t of ["city", "country"]) {
1625
- let i = n?.[t];
1626
- i && M2.has(i) && (r[t] = i);
1627
- }
1628
- let Y2 = new Set(u2 ?? o);
1629
- for (let t of ["lat", "lon"]) {
1630
- let i = n?.[t];
1631
- i && Y2.has(i) && (r[t] = i);
1632
- }
1633
- let g3 = n?.zip;
1634
- if (g3 && M2.has(g3)) {
1635
- let t = l(g3), i = G2(t);
1636
- i < 95 ? c2.push(`zip=${g3} (only ${i}% of values read as ZIPs)`) : q3(t, g3) ? r.zip = g3 : c2.push(`zip=${g3} (all values are 3-4 digits with nothing to say they are postal)`);
1637
- }
1638
- let d2 = n?.state;
1639
- if (d2 && M2.has(d2)) {
1640
- let t = l(d2), i = C(t);
1641
- i.length > 0 && i.every((a4) => W2(a4, s)) ? c2.push(`state=${d2} (every value is "CA", which is both Canada and California)`) : R2(t) ? (c2.push(`state=${d2} (every value is a country, not a state)`), r.country || (r.country = d2)) : w2(t) < 95 ? c2.push(`state=${d2} (only ${w2(t)}% of values are states/provinces)`) : r.state = d2;
1642
- }
1643
- let m2 = new Set(Object.values(r).filter(Boolean)), S = o.filter((t) => !m2.has(t) && !t.startsWith("__"));
1644
- if (!r.state) {
1645
- let t = null;
1646
- for (let i of S) {
1647
- let a4 = l(i);
1648
- if (R2(a4)) continue;
1649
- let f4 = w2(a4);
1625
+ function Ct(i, n, t, s, l) {
1626
+ let x3 = [], c2 = [], o = {}, I2 = {}, _2 = new Set(i), u2 = (e) => n.map((r) => r[e]);
1627
+ for (let e of ["city", "country"]) {
1628
+ let r = t?.[e];
1629
+ r && _2.has(r) && (o[e] = r);
1630
+ }
1631
+ let X2 = new Set(l ?? i);
1632
+ for (let e of ["lat", "lon"]) {
1633
+ let r = t?.[e];
1634
+ r && X2.has(r) && (o[e] = r);
1635
+ }
1636
+ let d2 = t?.zip;
1637
+ if (d2 && _2.has(d2)) {
1638
+ let e = u2(d2), r = z2(e);
1639
+ r < 95 ? c2.push(`zip=${d2} (only ${r}% of values read as ZIPs)`) : q3(e, d2) ? o.zip = d2 : c2.push(`zip=${d2} (all values are 3-4 digits with nothing to say they are postal)`);
1640
+ }
1641
+ let m2 = t?.state;
1642
+ if (m2 && _2.has(m2)) {
1643
+ let e = u2(m2), r = P2(e);
1644
+ r.length > 0 && r.every((a4) => W2(a4, s)) ? c2.push(`state=${m2} (every value is "CA", which is both Canada and California)`) : h3(e) ? (c2.push(`state=${m2} (every value is a country, not a state)`), o.country || (o.country = m2)) : v2(e) < 95 ? c2.push(`state=${m2} (only ${v2(e)}% of values are states/provinces)`) : o.state = m2;
1645
+ }
1646
+ let g3 = new Set(Object.values(o).filter(Boolean)), A = i.filter((e) => !g3.has(e) && !e.startsWith("__"));
1647
+ if (!o.state) {
1648
+ let e = null;
1649
+ for (let r of A) {
1650
+ let a4 = u2(r);
1651
+ if (h3(a4)) continue;
1652
+ let f4 = v2(a4);
1650
1653
  if (f4 < 95) continue;
1651
- let O2 = z2(a4, (A) => !!Y(A)), Q2 = z2(a4, (A) => !!Y(A) && !W2(A, s));
1652
- O2 < N2 && Q2 < 1 || (!t || f4 > t.pct) && (t = { name: i, pct: f4 });
1654
+ let k2 = D3(a4, (R2) => !!Y(R2)), J2 = D3(a4, (R2) => !!Y(R2) && !W2(R2, s));
1655
+ k2 < E2 && J2 < 1 || (!e || f4 > e.pct) && (e = { name: r, pct: f4 });
1653
1656
  }
1654
- t && (r.state = t.name, m2.add(t.name), b4.push(`state=${t.name} (${t.pct}% states/provinces)`));
1657
+ e && (o.state = e.name, g3.add(e.name), x3.push(`state=${e.name} (${e.pct}% states/provinces)`));
1655
1658
  }
1656
- if (!r.zip) for (let t of S) {
1657
- if (m2.has(t)) continue;
1658
- let i = l(t), a4 = G2(i);
1659
- if (!(a4 < 95) && q3(i, t) && !(pe(i, (f4) => Z(f4).length > 0) < N2)) {
1660
- r.zip = t, m2.add(t), b4.push(`zip=${t} (${a4}% ZIP codes)`);
1659
+ if (!o.zip) for (let e of A) {
1660
+ if (g3.has(e)) continue;
1661
+ let r = u2(e), a4 = z2(r);
1662
+ if (!(a4 < 95) && q3(r, e) && !(yt2(r, (f4) => Z(f4).length > 0) < E2)) {
1663
+ o.zip = e, g3.add(e), x3.push(`zip=${e} (${a4}% ZIP codes)`);
1661
1664
  break;
1662
1665
  }
1663
1666
  }
1664
- let h3 = r.country;
1665
- if (!h3 || !R2(l(h3))) {
1666
- let t = null;
1667
- for (let i of S) {
1668
- if (m2.has(i) || !R2(l(i))) continue;
1669
- let a4 = $3(l(i));
1670
- (!t || a4 > t.pct) && (t = { name: i, pct: a4 });
1667
+ let C = o.country;
1668
+ if (!C || !h3(u2(C))) {
1669
+ let e = null;
1670
+ for (let r of A) {
1671
+ if (g3.has(r) || !h3(u2(r))) continue;
1672
+ let a4 = G2(u2(r));
1673
+ (!e || a4 > e.pct) && (e = { name: r, pct: a4 });
1671
1674
  }
1672
- t && (h3 && (c2.push(`country=${h3} (only ${$3(l(h3))}% of values are country identifiers; using ${t.name} instead)`), I2.country = h3), r.country = t.name, m2.add(t.name), b4.push(`country=${t.name}`));
1675
+ e && (C && (c2.push(`country=${C} (only ${G2(u2(C))}% of values are country identifiers; using ${e.name} instead)`), I2.country = C), o.country = e.name, g3.add(e.name), x3.push(`country=${e.name}`));
1673
1676
  }
1674
- if (!r.city) {
1675
- let t = null;
1676
- for (let i of S) {
1677
- if (m2.has(i)) continue;
1678
- let a4 = l(i), f4 = de(a4, s);
1679
- f4 < m3 || z2(a4, (O2) => p3(O2, s)) < N2 || (!t || f4 > t.pct) && (t = { name: i, pct: f4 });
1677
+ if (!o.city) {
1678
+ let e = null;
1679
+ for (let r of A) {
1680
+ if (g3.has(r)) continue;
1681
+ let a4 = u2(r), f4 = gt(a4, s);
1682
+ f4 < m3 || D3(a4, (k2) => p3(k2, s)) < E2 || (!e || f4 > e.pct) && (e = { name: r, pct: f4 });
1680
1683
  }
1681
- t && (r.city = t.name, b4.push(`city=${t.name} (${t.pct}% known cities)`));
1684
+ e && (o.city = e.name, x3.push(`city=${e.name} (${e.pct}% known cities)`));
1682
1685
  }
1683
- let K2 = r.country ? l(r.country) : [], E2 = !!r.country && R2(K2), J2 = E2 ? new Set(K2.map((t) => E(t == null ? null : String(t))).filter(Boolean)).size : 0, H2 = E2 && J2 >= 2, v2 = !!(r.lat && r.lon) && e.some((t) => {
1684
- let i = +String(t[r.lat] ?? "").trim(), a4 = +String(t[r.lon] ?? "").trim();
1685
- return isFinite(i) && isFinite(a4) && i >= -90 && i <= 90 && a4 >= -180 && a4 <= 180 && String(t[r.lat] ?? "").trim() !== "" && String(t[r.lon] ?? "").trim() !== "";
1686
+ let B2 = o.country ? u2(o.country) : [], L2 = !!o.country && h3(B2), Y2 = L2 ? new Set(B2.map((e) => E(e == null ? null : String(e))).filter(Boolean)).size : 0, K3 = L2 && Y2 >= 2, N2 = !!(o.lat && o.lon) && n.some((e) => {
1687
+ let r = +String(e[o.lat] ?? "").trim(), a4 = +String(e[o.lon] ?? "").trim();
1688
+ return isFinite(r) && isFinite(a4) && r >= -90 && r <= 90 && a4 >= -180 && a4 <= 180 && String(e[o.lat] ?? "").trim() !== "" && String(e[o.lon] ?? "").trim() !== "";
1686
1689
  });
1687
- return r.lat && r.lon && !v2 && c2.push(`lat/lon=${r.lat}/${r.lon} (no row holds a usable coordinate pair)`), r.country && !H2 && !(r.city || r.state || r.zip || v2) && c2.push(E2 ? `country=${r.country} (every row resolves to the same country - nothing to place apart)` : `country=${r.country} (values are not country identifiers)`), { bind: !!(r.city || r.state || r.zip || H2 || v2) ? r : null, backfilled: b4, refused: c2, ...Object.keys(I2).length ? { labelFallback: I2 } : {} };
1690
+ return o.lat && o.lon && !N2 && c2.push(`lat/lon=${o.lat}/${o.lon} (no row holds a usable coordinate pair)`), o.country && !K3 && !(o.city || o.state || o.zip || N2) && c2.push(L2 ? `country=${o.country} (every row resolves to the same country - nothing to place apart)` : `country=${o.country} (values are not country identifiers)`), { bind: !!(o.city || o.state || o.zip || K3 || N2) ? o : null, backfilled: x3, refused: c2, ...Object.keys(I2).length ? { labelFallback: I2 } : {} };
1688
1691
  }
1689
- var he = new RegExp([String.raw`\bisMeasure\b`, String.raw`\bdataType\b`, String.raw`\bcolumns\s*\[\s*-?\d`, String.raw`\.iloc\s*\[[^\]]*,`, String.raw`\.iat\s*\[`, String.raw`\bselect_dtypes\b`, String.raw`\b_get_numeric_data\b`, String.raw`\bis_numeric_dtype\b`, String.raw`\bfor\s+\w+\s+in\s+(?:list\s*\(\s*)?df\.columns\b`, String.raw`\bdf\.columns\s*\.\s*(?:tolist|to_list|difference|drop)\b`, String.raw`\bdf\.dtypes\b`, String.raw`\bObject\s*\.\s*(?:keys|values|entries)\s*\(\s*(?:rows|data|df)?\s*\[\s*0\s*\]`, String.raw`\b(?:row|rw|r)\s*\[\s*\d+\s*\]`].join("|"));
1690
1692
 
1691
1693
  // src/payload.ts
1692
1694
  function resolvePointChannel(cols, rowObjs, point) {
@@ -1700,7 +1702,7 @@ function resolvePointChannel(cols, rowObjs, point) {
1700
1702
  let labelCol;
1701
1703
  if (bind) {
1702
1704
  const dims = cols.filter((c2) => !c2.isMeasure).map((c2) => c2.name);
1703
- const res = ge(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
1705
+ const res = Ct(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
1704
1706
  bind = res.bind;
1705
1707
  rolesBackfilled = res.backfilled;
1706
1708
  rolesRefused = res.refused;
@@ -1768,17 +1770,31 @@ function buildRenderPayload(cols, rowObjs, geo, point, destination, opts) {
1768
1770
  geoUnmatched = { count: built.totalRows - built.matchedRows, examples: built.unmatched.slice(0, 8) };
1769
1771
  geoUnmatchedDistinct = built.unmatched.length;
1770
1772
  }
1771
- const extra = 1 + (geoIso ? 1 : 0) + (pLat ? 3 : 0) + (dLat ? 3 : 0);
1773
+ const hostNames = ["__rowIdx__"];
1774
+ if (geoIso) hostNames.push("__geoIso__");
1775
+ if (pLat) hostNames.push("__geoLat__", "__geoLon__", "__geoPrecision__");
1776
+ if (dLat) hostNames.push("__geoLatD__", "__geoLonD__", "__geoPrecisionD__");
1777
+ const aliasCols = [];
1778
+ if (opts?.aliases && opts.aliases.length > 0) {
1779
+ const claimed = /* @__PURE__ */ new Set([...colNames, ...hostNames]);
1780
+ for (const a4 of opts.aliases) {
1781
+ const from = a4 ? colNames.indexOf(a4.name) : -1;
1782
+ if (from < 0 || !a4.alias || claimed.has(a4.alias)) continue;
1783
+ claimed.add(a4.alias);
1784
+ aliasCols.push({ from, name: a4.alias });
1785
+ }
1786
+ }
1787
+ const extra = hostNames.length + aliasCols.length;
1772
1788
  const out = new Array(rowObjs.length);
1773
1789
  for (let r = 0; r < rowObjs.length; r++) {
1774
1790
  const row = rowObjs[r];
1775
1791
  const a4 = new Array(cols.length + extra);
1776
1792
  for (let c2 = 0; c2 < cols.length; c2++) {
1777
- const v2 = row[colNames[c2]];
1778
- if (v2 instanceof Date) {
1779
- a4[c2] = v2.toISOString();
1793
+ const v3 = row[colNames[c2]];
1794
+ if (v3 instanceof Date) {
1795
+ a4[c2] = v3.toISOString();
1780
1796
  } else {
1781
- a4[c2] = v2 ?? null;
1797
+ a4[c2] = v3 ?? null;
1782
1798
  }
1783
1799
  }
1784
1800
  let k2 = cols.length;
@@ -1794,6 +1810,7 @@ function buildRenderPayload(cols, rowObjs, geo, point, destination, opts) {
1794
1810
  a4[k2++] = dLon[r];
1795
1811
  a4[k2++] = dPrec ? dPrec[r] : null;
1796
1812
  }
1813
+ for (const ac of aliasCols) a4[k2++] = a4[ac.from];
1797
1814
  out[r] = a4;
1798
1815
  }
1799
1816
  const colsOut = [...cols, { name: "__rowIdx__", dataType: "Integer", isMeasure: false, modelDesc: "" }];
@@ -1811,6 +1828,7 @@ function buildRenderPayload(cols, rowObjs, geo, point, destination, opts) {
1811
1828
  { name: "__geoLonD__", dataType: "Double", isMeasure: false, modelDesc: "" },
1812
1829
  { name: "__geoPrecisionD__", dataType: "String", isMeasure: false, modelDesc: "" }
1813
1830
  );
1831
+ for (const ac of aliasCols) colsOut.push({ ...cols[ac.from], name: ac.name, aliasOf: cols[ac.from].name });
1814
1832
  return {
1815
1833
  columns: colsOut,
1816
1834
  rows: out,
@@ -1831,8 +1849,8 @@ function buildRenderPayload(cols, rowObjs, geo, point, destination, opts) {
1831
1849
  function createMarkResolver(env) {
1832
1850
  const { root, doc, log } = env;
1833
1851
  const isElement = (t) => {
1834
- const E2 = doc?.defaultView?.Element ?? globalThis.Element;
1835
- if (E2 && t instanceof E2) return true;
1852
+ const E4 = doc?.defaultView?.Element ?? globalThis.Element;
1853
+ if (E4 && t instanceof E4) return true;
1836
1854
  return !!t && typeof t.closest === "function" && typeof t.getAttribute === "function";
1837
1855
  };
1838
1856
  const viewStyle = (n) => {
@@ -1857,9 +1875,9 @@ function createMarkResolver(env) {
1857
1875
  const m2 = el.getScreenCTM();
1858
1876
  if (!m2) return Number.MAX_VALUE;
1859
1877
  let best = Number.MAX_VALUE;
1860
- const N3 = 64;
1861
- for (let i = 0; i <= N3; i++) {
1862
- const pt = el.getPointAtLength(L2 * i / N3);
1878
+ const N2 = 64;
1879
+ for (let i = 0; i <= N2; i++) {
1880
+ const pt = el.getPointAtLength(L2 * i / N2);
1863
1881
  const dx = m2.a * pt.x + m2.c * pt.y + m2.e - x3;
1864
1882
  const dy = m2.b * pt.x + m2.d * pt.y + m2.f - y5;
1865
1883
  const d2 = dx * dx + dy * dy;
@@ -1958,8 +1976,8 @@ function createMarkResolver(env) {
1958
1976
  for (const n of all) {
1959
1977
  const tag = (n.tagName || "").toLowerCase();
1960
1978
  if (!SHAPE.test(tag)) continue;
1961
- const pe2 = viewStyle(n);
1962
- if (pe2 && pe2 !== "none") return true;
1979
+ const pe = viewStyle(n);
1980
+ if (pe && pe !== "none") return true;
1963
1981
  }
1964
1982
  return false;
1965
1983
  };
@@ -2141,13 +2159,13 @@ function censusHitBands(container, doc) {
2141
2159
  if (!OPEN_TAGS.has(tag)) continue;
2142
2160
  const cs = styleOf2(el, ownerDoc);
2143
2161
  const open = isUnfilled(attrOrComputed(el, "fill", cs));
2144
- const w3 = widthPx(attrOrComputed(el, "stroke-width", cs) || "1");
2162
+ const w2 = widthPx(attrOrComputed(el, "stroke-width", cs) || "1");
2145
2163
  const geom = String(el.getAttribute?.("d") ?? "") || `${tag}#${String(el.getAttribute?.(ROW_IDX_ATTR) ?? "")}`;
2146
2164
  const inert = String(cs?.pointerEvents ?? el.style?.pointerEvents ?? "") === "none";
2147
- rows.push({ el, geom, w: w3, open, inert });
2148
- if (isFinite(w3)) {
2165
+ rows.push({ el, geom, w: w2, open, inert });
2166
+ if (isFinite(w2)) {
2149
2167
  const prev = widestByGeom.get(geom);
2150
- if (prev === void 0 || w3 > prev) widestByGeom.set(geom, w3);
2168
+ if (prev === void 0 || w2 > prev) widestByGeom.set(geom, w2);
2151
2169
  }
2152
2170
  }
2153
2171
  const out = { ...EMPTY3 };
@@ -2180,9 +2198,9 @@ var VALUE_AXIS_MIN_FIT = 0.8;
2180
2198
  var MIN_AXIS_SPAN_PX = 40;
2181
2199
  var EMPTY4 = { marks: 0, axis: "", column: "", fit: 0, offShare: 0, medianOffRadii: 0 };
2182
2200
  function num(el, name) {
2183
- const v2 = el.getAttribute?.(name);
2184
- if (v2 === null || v2 === void 0 || String(v2).trim() === "") return NaN;
2185
- return parseFloat(String(v2));
2201
+ const v3 = el.getAttribute?.(name);
2202
+ if (v3 === null || v3 === void 0 || String(v3).trim() === "") return NaN;
2203
+ return parseFloat(String(v3));
2186
2204
  }
2187
2205
  function median(xs) {
2188
2206
  if (!xs.length) return NaN;
@@ -2190,15 +2208,15 @@ function median(xs) {
2190
2208
  const m2 = s.length >> 1;
2191
2209
  return s.length % 2 ? s[m2] : (s[m2 - 1] + s[m2]) / 2;
2192
2210
  }
2193
- function robustLine(v2, pos) {
2194
- const n = v2.length;
2211
+ function robustLine(v3, pos) {
2212
+ const n = v3.length;
2195
2213
  const step = Math.max(1, Math.floor(n / FIT_SAMPLE));
2196
2214
  const idx = [];
2197
2215
  for (let i = 0; i < n; i += step) idx.push(i);
2198
2216
  const slopes = [];
2199
2217
  for (let p2 = 0; p2 < idx.length; p2++) {
2200
2218
  for (let q4 = p2 + 1; q4 < idx.length; q4++) {
2201
- const dv = v2[idx[q4]] - v2[idx[p2]];
2219
+ const dv = v3[idx[q4]] - v3[idx[p2]];
2202
2220
  if (Math.abs(dv) < 1e-12) continue;
2203
2221
  slopes.push((pos[idx[q4]] - pos[idx[p2]]) / dv);
2204
2222
  }
@@ -2206,7 +2224,7 @@ function robustLine(v2, pos) {
2206
2224
  if (slopes.length < 3) return null;
2207
2225
  const b4 = median(slopes);
2208
2226
  if (!Number.isFinite(b4) || Math.abs(b4) < 1e-12) return null;
2209
- const a4 = median(pos.map((y5, i) => y5 - b4 * v2[i]));
2227
+ const a4 = median(pos.map((y5, i) => y5 - b4 * v3[i]));
2210
2228
  return Number.isFinite(a4) ? { a: a4, b: b4 } : null;
2211
2229
  }
2212
2230
  function censusValuePlacement(container, data) {
@@ -2234,30 +2252,30 @@ function censusValuePlacement(container, data) {
2234
2252
  for (let c2 = 0; c2 < columns.length; c2++) {
2235
2253
  if (/^__.*__$/.test(String(columns[c2]?.name ?? ""))) continue;
2236
2254
  const vals = dots.map((d2) => {
2237
- const v2 = d2.row[c2];
2238
- return v2 === null || v2 === void 0 || v2 === "" ? NaN : typeof v2 === "number" ? v2 : Number(v2);
2255
+ const v3 = d2.row[c2];
2256
+ return v3 === null || v3 === void 0 || v3 === "" ? NaN : typeof v3 === "number" ? v3 : Number(v3);
2239
2257
  });
2240
2258
  const finite = vals.filter(Number.isFinite);
2241
2259
  if (finite.length < dots.length * 0.9 || new Set(finite).size < 8) continue;
2242
- const logs = finite.every((v2) => v2 > 0) ? [false, true] : [false];
2260
+ const logs = finite.every((v3) => v3 > 0) ? [false, true] : [false];
2243
2261
  for (const log of logs) {
2244
2262
  for (const axis of ["x", "y"]) {
2245
2263
  const keep = [];
2246
- const v2 = [], pos = [];
2264
+ const v3 = [], pos = [];
2247
2265
  dots.forEach((d2, k2) => {
2248
2266
  if (!Number.isFinite(vals[k2])) return;
2249
2267
  keep.push(k2);
2250
- v2.push(log ? Math.log10(vals[k2]) : vals[k2]);
2268
+ v3.push(log ? Math.log10(vals[k2]) : vals[k2]);
2251
2269
  pos.push(axis === "x" ? d2.x : d2.y);
2252
2270
  });
2253
- const line = robustLine(v2, pos);
2271
+ const line = robustLine(v3, pos);
2254
2272
  if (!line) continue;
2255
2273
  const lo = Math.min(...pos), hi = Math.max(...pos);
2256
2274
  if (hi - lo < MIN_AXIS_SPAN_PX) continue;
2257
2275
  const mean = pos.reduce((s, p2) => s + p2, 0) / pos.length;
2258
2276
  let ssRes = 0, ssTot = 0;
2259
2277
  const res = pos.map((p2, k2) => {
2260
- const e = p2 - (line.a + line.b * v2[k2]);
2278
+ const e = p2 - (line.a + line.b * v3[k2]);
2261
2279
  ssRes += e * e;
2262
2280
  ssTot += (p2 - mean) ** 2;
2263
2281
  return e;
@@ -2266,8 +2284,8 @@ function censusValuePlacement(container, data) {
2266
2284
  const fit = 1 - ssRes / ssTot;
2267
2285
  if (fit >= VALUE_AXIS_MIN_FIT && (!best || fit > best.fit)) {
2268
2286
  const full = new Array(dots.length).fill(NaN);
2269
- keep.forEach((k2, j3) => {
2270
- full[k2] = res[j3];
2287
+ keep.forEach((k2, j2) => {
2288
+ full[k2] = res[j2];
2271
2289
  });
2272
2290
  best = { col: c2, axis, fit, res: full, log };
2273
2291
  }
@@ -2318,12 +2336,12 @@ function contentExtentOf(boxes) {
2318
2336
  if (usable.length === 0) return { w: 0, h: 0, source: "none" };
2319
2337
  const inFlow = usable.filter((b4) => !b4.floating);
2320
2338
  const counted = inFlow.length > 0 ? inFlow : usable;
2321
- let w3 = 0, h3 = 0;
2339
+ let w2 = 0, h4 = 0;
2322
2340
  for (const b4 of counted) {
2323
- if (b4.right > w3) w3 = b4.right;
2324
- if (b4.bottom > h3) h3 = b4.bottom;
2341
+ if (b4.right > w2) w2 = b4.right;
2342
+ if (b4.bottom > h4) h4 = b4.bottom;
2325
2343
  }
2326
- return { w: w3, h: h3, source: inFlow.length > 0 ? "in-flow" : "all-floating" };
2344
+ return { w: w2, h: h4, source: inFlow.length > 0 ? "in-flow" : "all-floating" };
2327
2345
  }
2328
2346
  function scrollFitFor(contentW, contentH, viewportW, viewportH, slackPx = SCROLL_SLACK_PX) {
2329
2347
  return {
@@ -2333,8 +2351,8 @@ function scrollFitFor(contentW, contentH, viewportW, viewportH, slackPx = SCROLL
2333
2351
  }
2334
2352
  var FIT_CONTENT_SELECTOR = "text, .d3-mark, .d3-legend-mark";
2335
2353
  var PHANTOM_FRACTION = 0.95;
2336
- function isPhantomBox(w3, h3, refW, refH) {
2337
- return w3 > refW * PHANTOM_FRACTION || h3 > refH * PHANTOM_FRACTION;
2354
+ function isPhantomBox(w2, h4, refW, refH) {
2355
+ return w2 > refW * PHANTOM_FRACTION || h4 > refH * PHANTOM_FRACTION;
2338
2356
  }
2339
2357
  var MAX_FRAME_GROW_FACTOR = 20;
2340
2358
  function planFrameGrow(inkBottomPx, elHeightPx, viewBoxH, ctmScale, slackPx = SCROLL_SLACK_PX, maxFactor = MAX_FRAME_GROW_FACTOR) {
@@ -2497,14 +2515,14 @@ var SVG_NS2 = "http://www.w3.org/2000/svg";
2497
2515
  var AXIS_PIN_MAX_CARRIED = 12;
2498
2516
  function unpinScrolledAxis(container) {
2499
2517
  if (!container) return;
2500
- const st = container[CONTAINER_SLOT_AXIS_PIN];
2501
- if (!st) return;
2518
+ const st2 = container[CONTAINER_SLOT_AXIS_PIN];
2519
+ if (!st2) return;
2502
2520
  try {
2503
- container.removeEventListener("scroll", st.onScroll);
2521
+ container.removeEventListener("scroll", st2.onScroll);
2504
2522
  } catch {
2505
2523
  }
2506
2524
  try {
2507
- if (st.overlay.parentNode) st.overlay.parentNode.removeChild(st.overlay);
2525
+ if (st2.overlay.parentNode) st2.overlay.parentNode.removeChild(st2.overlay);
2508
2526
  } catch {
2509
2527
  }
2510
2528
  try {
@@ -2633,8 +2651,8 @@ function pinScrolledAxis(container, svg) {
2633
2651
  }
2634
2652
  const pinSvg = doc.createElementNS(SVG_NS2, "svg");
2635
2653
  for (const a4 of ["font-family", "font-size", "font-weight", "font", "fill", "color", "text-rendering"]) {
2636
- const v2 = svg.getAttribute(a4);
2637
- if (v2) pinSvg.setAttribute(a4, v2);
2654
+ const v3 = svg.getAttribute(a4);
2655
+ if (v3) pinSvg.setAttribute(a4, v3);
2638
2656
  }
2639
2657
  const styles = svg.querySelectorAll("style");
2640
2658
  for (let i = 0; i < styles.length; i++) pinSvg.appendChild(styles[i].cloneNode(true));
@@ -2682,15 +2700,15 @@ function pinScrolledAxis(container, svg) {
2682
2700
  const svgTop = svgBox.top - cRect.top - container.clientTop + container.scrollTop;
2683
2701
  const contentBand = { top: svgTop + band.top, bottom: svgTop + band.bottom };
2684
2702
  const place = () => {
2685
- const st = container.scrollTop, vh = container.clientHeight;
2686
- const edge2 = axisPinPlacement(contentBand, st, vh);
2703
+ const st2 = container.scrollTop, vh = container.clientHeight;
2704
+ const edge2 = axisPinPlacement(contentBand, st2, vh);
2687
2705
  if (!edge2) {
2688
2706
  o.display = "none";
2689
2707
  return null;
2690
2708
  }
2691
2709
  o.display = "block";
2692
2710
  o.left = `${svgLeft}px`;
2693
- o.top = `${edge2 === "top" ? st : st + vh - bandPx}px`;
2711
+ o.top = `${edge2 === "top" ? st2 : st2 + vh - bandPx}px`;
2694
2712
  return edge2;
2695
2713
  };
2696
2714
  const onScroll = () => {
@@ -2815,10 +2833,10 @@ function parseRGBA(c2) {
2815
2833
  const s = c2.trim();
2816
2834
  const m2 = s.match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*(?:,\s*([\d.]+)\s*)?\)$/i);
2817
2835
  if (m2) return [parseFloat(m2[1]), parseFloat(m2[2]), parseFloat(m2[3]), m2[4] !== void 0 ? parseFloat(m2[4]) : 1];
2818
- let h3 = s.replace(/^#/, "");
2819
- if (h3.length === 3) h3 = h3.split("").map((ch) => ch + ch).join("");
2820
- if (h3.length === 6 && /^[0-9a-fA-F]{6}$/.test(h3)) {
2821
- return [parseInt(h3.slice(0, 2), 16), parseInt(h3.slice(2, 4), 16), parseInt(h3.slice(4, 6), 16), 1];
2836
+ let h4 = s.replace(/^#/, "");
2837
+ if (h4.length === 3) h4 = h4.split("").map((ch) => ch + ch).join("");
2838
+ if (h4.length === 6 && /^[0-9a-fA-F]{6}$/.test(h4)) {
2839
+ return [parseInt(h4.slice(0, 2), 16), parseInt(h4.slice(2, 4), 16), parseInt(h4.slice(4, 6), 16), 1];
2822
2840
  }
2823
2841
  return null;
2824
2842
  }
@@ -2866,8 +2884,8 @@ function compositeOver(fg, bg) {
2866
2884
  ];
2867
2885
  }
2868
2886
  function relativeLuminance(rgb) {
2869
- const lin = rgb.map((v2) => {
2870
- const s = v2 / 255;
2887
+ const lin = rgb.map((v3) => {
2888
+ const s = v3 / 255;
2871
2889
  return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
2872
2890
  });
2873
2891
  return 0.2126 * lin[0] + 0.7152 * lin[1] + 0.0722 * lin[2];
@@ -2906,18 +2924,18 @@ function glyphSampleGrid(box, n = GLYPH_SAMPLE_N) {
2906
2924
  if (!box || !(box.width > 0) || !(box.height > 0) || !(n >= 1)) return out;
2907
2925
  const k2 = Math.floor(n);
2908
2926
  for (let i = 0; i < k2; i++) {
2909
- for (let j3 = 0; j3 < k2; j3++) {
2927
+ for (let j2 = 0; j2 < k2; j2++) {
2910
2928
  out.push({
2911
2929
  x: box.left + box.width * (i + 0.5) / k2,
2912
- y: box.top + box.height * (j3 + 0.5) / k2
2930
+ y: box.top + box.height * (j2 + 0.5) / k2
2913
2931
  });
2914
2932
  }
2915
2933
  }
2916
2934
  return out;
2917
2935
  }
2918
- function clamp01(v2) {
2919
- if (typeof v2 !== "number" || !isFinite(v2)) return 1;
2920
- return Math.max(0, Math.min(1, v2));
2936
+ function clamp01(v3) {
2937
+ if (typeof v3 !== "number" || !isFinite(v3)) return 1;
2938
+ return Math.max(0, Math.min(1, v3));
2921
2939
  }
2922
2940
  function hexToRGB(hex2) {
2923
2941
  const p2 = toRGBA(hex2);
@@ -2930,10 +2948,10 @@ var LABEL_CONTRAST_CAP = 2e3;
2930
2948
  var EMPTY5 = { rects: 0, scanned: 0, fixed: 0, pillsBoosted: 0, offFill: 0, pageMajority: 0, paintedOver: 0 };
2931
2949
  function backedSamples(el, pts) {
2932
2950
  try {
2933
- const ge2 = el;
2934
- if (typeof ge2.isPointInFill !== "function" || typeof ge2.getScreenCTM !== "function") return null;
2935
- const m2 = ge2.getScreenCTM();
2936
- const svg = ge2.ownerSVGElement;
2951
+ const ge = el;
2952
+ if (typeof ge.isPointInFill !== "function" || typeof ge.getScreenCTM !== "function") return null;
2953
+ const m2 = ge.getScreenCTM();
2954
+ const svg = ge.ownerSVGElement;
2937
2955
  if (!m2 || !svg || typeof svg.createSVGPoint !== "function") return null;
2938
2956
  if (pts.length === 0) return null;
2939
2957
  const inv = m2.inverse();
@@ -2942,7 +2960,7 @@ function backedSamples(el, pts) {
2942
2960
  const p2 = svg.createSVGPoint();
2943
2961
  p2.x = pts[i].x;
2944
2962
  p2.y = pts[i].y;
2945
- hit.push(ge2.isPointInFill(p2.matrixTransform(inv)));
2963
+ hit.push(ge.isPointInFill(p2.matrixTransform(inv)));
2946
2964
  }
2947
2965
  return hit;
2948
2966
  } catch {
@@ -3204,7 +3222,7 @@ function createChartHost(container, config) {
3204
3222
  let data = config.data;
3205
3223
  {
3206
3224
  const stamped = config.data?.meta?.hostContract;
3207
- const major = (v2) => (v2 || "").split(".")[0];
3225
+ const major = (v3) => (v3 || "").split(".")[0];
3208
3226
  if (stamped && major(stamped) !== major(HOST_CONTRACT_VERSION)) {
3209
3227
  try {
3210
3228
  (win?.console ?? console)?.warn(
@@ -3251,9 +3269,9 @@ function createChartHost(container, config) {
3251
3269
  const ensureAffordanceStyles = () => {
3252
3270
  try {
3253
3271
  if (!doc || doc.getElementById("bic-chart-host-affordances")) return;
3254
- const st = doc.createElement("style");
3255
- st.id = "bic-chart-host-affordances";
3256
- st.textContent = `
3272
+ const st2 = doc.createElement("style");
3273
+ st2.id = "bic-chart-host-affordances";
3274
+ st2.textContent = `
3257
3275
  /* TYPOGRAPHY FIREWALL. Generated charts set font-size but almost never line-height or
3258
3276
  letter-spacing, so they INHERIT whatever the host page cascades in. A page with
3259
3277
  \`:root { font: 18px/145% }\` (the stock Vite template does exactly this) hands every
@@ -3302,7 +3320,7 @@ function createChartHost(container, config) {
3302
3320
  font-weight: 700 !important;
3303
3321
  text-decoration: underline !important;
3304
3322
  }`;
3305
- (doc.head || doc.documentElement)?.appendChild(st);
3323
+ (doc.head || doc.documentElement)?.appendChild(st2);
3306
3324
  } catch {
3307
3325
  }
3308
3326
  };
@@ -3612,10 +3630,10 @@ export {
3612
3630
  L3,
3613
3631
  M,
3614
3632
  a2 as a,
3615
- Ie,
3616
- Ee,
3617
- Vt,
3618
- Yt,
3633
+ Oe,
3634
+ Le,
3635
+ Xt,
3636
+ qt,
3619
3637
  buildRenderPayload,
3620
3638
  createMarkResolver,
3621
3639
  ensureCrossfilterHitTargets,