@smallwebco/tinypivot-vue 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
- import { ref as M, computed as T, watch as Ae, defineComponent as Qe, onMounted as xt, nextTick as Ue, onUnmounted as Tt, createElementBlock as u, openBlock as r, createElementVNode as e, toDisplayString as R, normalizeClass as q, withDirectives as it, createCommentVNode as A, vModelText as rt, createTextVNode as I, Fragment as W, renderList as J, withModifiers as Ke, unref as S, normalizeStyle as ve, createVNode as Ye, createBlock as io, Transition as ro, withCtx as uo, withKeys as vo, Teleport as co } from "vue";
2
- import { useVueTable as go, getFilteredRowModel as po, getSortedRowModel as fo, getCoreRowModel as mo } from "@tanstack/vue-table";
3
- function ho(t) {
4
- const a = t.filter((c) => c != null && c !== "");
1
+ import { ref as x, computed as T, watch as Ae, defineComponent as Qe, onMounted as Mt, nextTick as Ue, onUnmounted as Tt, createElementBlock as u, openBlock as r, createElementVNode as e, toDisplayString as R, normalizeClass as q, withDirectives as it, createCommentVNode as A, vModelText as rt, createTextVNode as I, Fragment as W, renderList as J, withModifiers as Ke, unref as S, normalizeStyle as ce, createVNode as Ye, createBlock as io, Transition as ro, withCtx as uo, withKeys as co, createStaticVNode as vo, Teleport as go } from "vue";
2
+ import { useVueTable as po, getFilteredRowModel as fo, getSortedRowModel as mo, getCoreRowModel as ho } from "@tanstack/vue-table";
3
+ function wo(t) {
4
+ const a = t.filter((v) => v != null && v !== "");
5
5
  if (a.length === 0)
6
6
  return "string";
7
7
  const n = a.slice(0, 100);
8
- let l = 0, v = 0, m = 0;
9
- for (const c of n)
10
- typeof c == "boolean" ? m++ : typeof c == "number" || !Number.isNaN(Number(c)) && c !== "" ? l++ : (c instanceof Date || !Number.isNaN(Date.parse(String(c)))) && v++;
8
+ let l = 0, c = 0, m = 0;
9
+ for (const v of n)
10
+ typeof v == "boolean" ? m++ : typeof v == "number" || !Number.isNaN(Number(v)) && v !== "" ? l++ : (v instanceof Date || !Number.isNaN(Date.parse(String(v)))) && c++;
11
11
  const y = n.length * 0.8;
12
- return m >= y ? "boolean" : l >= y ? "number" : v >= y ? "date" : "string";
12
+ return m >= y ? "boolean" : l >= y ? "number" : c >= y ? "date" : "string";
13
13
  }
14
- function wo(t, a) {
15
- const l = t.map((c) => c[a]).filter((c) => c != null && c !== "").slice(0, 100);
16
- let v = 0;
14
+ function ko(t, a) {
15
+ const l = t.map((v) => v[a]).filter((v) => v != null && v !== "").slice(0, 100);
16
+ let c = 0;
17
17
  const m = /* @__PURE__ */ new Set();
18
- for (const c of l)
19
- m.add(String(c)), (typeof c == "number" || !Number.isNaN(Number(c)) && c !== "") && v++;
20
- const y = v >= l.length * 0.8;
18
+ for (const v of l)
19
+ m.add(String(v)), (typeof v == "number" || !Number.isNaN(Number(v)) && v !== "") && c++;
20
+ const y = c >= l.length * 0.8;
21
21
  return {
22
22
  field: a,
23
23
  type: y ? "number" : "string",
@@ -25,28 +25,28 @@ function wo(t, a) {
25
25
  isNumeric: y
26
26
  };
27
27
  }
28
- function ko(t, a, n = 500) {
28
+ function Co(t, a, n = 500) {
29
29
  const l = [];
30
- let v = 0;
31
- for (const c of t) {
32
- const b = c[a];
33
- b == null || b === "" ? v++ : l.push(b);
30
+ let c = 0;
31
+ for (const v of t) {
32
+ const b = v[a];
33
+ b == null || b === "" ? c++ : l.push(b);
34
34
  }
35
35
  const m = /* @__PURE__ */ new Set();
36
- for (const c of l)
37
- if (m.add(String(c)), m.size >= n)
36
+ for (const v of l)
37
+ if (m.add(String(v)), m.size >= n)
38
38
  break;
39
39
  return {
40
- uniqueValues: Array.from(m).sort((c, b) => {
41
- const C = Number.parseFloat(c), D = Number.parseFloat(b);
42
- return !Number.isNaN(C) && !Number.isNaN(D) ? C - D : c.localeCompare(b);
40
+ uniqueValues: Array.from(m).sort((v, b) => {
41
+ const C = Number.parseFloat(v), D = Number.parseFloat(b);
42
+ return !Number.isNaN(C) && !Number.isNaN(D) ? C - D : v.localeCompare(b);
43
43
  }),
44
44
  totalCount: t.length,
45
- nullCount: v,
46
- type: ho(l)
45
+ nullCount: c,
46
+ type: wo(l)
47
47
  };
48
48
  }
49
- function Co(t, a) {
49
+ function yo(t, a) {
50
50
  if (t == null || t === "")
51
51
  return "";
52
52
  switch (a) {
@@ -107,40 +107,40 @@ function Rt(t) {
107
107
  countDistinct: "Count Distinct"
108
108
  }[t];
109
109
  }
110
- function yo(t) {
111
- return t.length === 0 ? [] : Object.keys(t[0]).map((n) => wo(t, n));
110
+ function bo(t) {
111
+ return t.length === 0 ? [] : Object.keys(t[0]).map((n) => ko(t, n));
112
112
  }
113
- function bo(t, a, n, l) {
114
- const v = /* @__PURE__ */ new Set([
113
+ function Fo(t, a, n, l) {
114
+ const c = /* @__PURE__ */ new Set([
115
115
  ...a,
116
116
  ...n,
117
117
  ...l.map((m) => m.field)
118
118
  ]);
119
- return t.filter((m) => !v.has(m.field));
119
+ return t.filter((m) => !c.has(m.field));
120
120
  }
121
121
  function Dt(t) {
122
122
  return (t.rowFields.length > 0 || t.columnFields.length > 0) && t.valueFields.length > 0;
123
123
  }
124
- function Fo(t, a) {
125
- const { rowFields: n, columnFields: l, valueFields: v, showRowTotals: m, showColumnTotals: y } = a;
124
+ function So(t, a) {
125
+ const { rowFields: n, columnFields: l, valueFields: c, showRowTotals: m, showColumnTotals: y } = a;
126
126
  if (!Dt(a) || t.length === 0)
127
127
  return null;
128
- const c = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Map();
128
+ const v = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Map();
129
129
  for (const f of t) {
130
130
  const s = n.length > 0 ? Ft(f, n) : "__all__", d = l.length > 0 ? Ft(f, l) : "__all__";
131
- c.add(s), b.add(d), C.has(s) || C.set(s, /* @__PURE__ */ new Map());
131
+ v.add(s), b.add(d), C.has(s) || C.set(s, /* @__PURE__ */ new Map());
132
132
  const F = C.get(s);
133
- F.has(d) || F.set(d, v.map(() => []));
133
+ F.has(d) || F.set(d, c.map(() => []));
134
134
  const g = F.get(d);
135
- for (let w = 0; w < v.length; w++) {
136
- const x = v[w], L = f[x.field];
135
+ for (let w = 0; w < c.length; w++) {
136
+ const M = c[w], L = f[M.field];
137
137
  if (L != null && L !== "") {
138
138
  const ee = typeof L == "number" ? L : Number.parseFloat(String(L));
139
- Number.isNaN(ee) ? (x.aggregation === "count" || x.aggregation === "countDistinct") && g[w].push(1) : g[w].push(ee);
139
+ Number.isNaN(ee) ? (M.aggregation === "count" || M.aggregation === "countDistinct") && g[w].push(1) : g[w].push(ee);
140
140
  }
141
141
  }
142
142
  }
143
- const D = Array.from(c).sort(), $ = Array.from(b).sort(), U = [];
143
+ const D = Array.from(v).sort(), $ = Array.from(b).sort(), U = [];
144
144
  if (l.length > 0)
145
145
  for (let f = 0; f < l.length; f++) {
146
146
  const s = [];
@@ -150,26 +150,26 @@ function Fo(t, a) {
150
150
  }
151
151
  U.push(s);
152
152
  }
153
- if (v.length > 1 || U.length === 0) {
153
+ if (c.length > 1 || U.length === 0) {
154
154
  const f = [];
155
155
  for (const s of $)
156
- for (const d of v)
156
+ for (const d of c)
157
157
  f.push(`${d.label || d.field} (${Rt(d.aggregation)})`);
158
- $.length === 1 && $[0] === "__all__" ? U.push(v.map((s) => `${s.label || s.field} (${Rt(s.aggregation)})`)) : U.push(f);
158
+ $.length === 1 && $[0] === "__all__" ? U.push(c.map((s) => `${s.label || s.field} (${Rt(s.aggregation)})`)) : U.push(f);
159
159
  }
160
160
  const V = D.map((f) => f === "__all__" ? ["Total"] : St(f)), H = [], O = [], _ = /* @__PURE__ */ new Map();
161
161
  for (const f of D) {
162
- const s = [], d = v.map(() => []);
162
+ const s = [], d = c.map(() => []);
163
163
  let F = 0;
164
164
  for (const g of $) {
165
- const w = C.get(f), x = (w == null ? void 0 : w.get(g)) || v.map(() => []);
166
- for (let L = 0; L < v.length; L++) {
167
- const ee = v[L], ie = x[L], me = Ze(ie, ee.aggregation);
165
+ const w = C.get(f), M = (w == null ? void 0 : w.get(g)) || c.map(() => []);
166
+ for (let L = 0; L < c.length; L++) {
167
+ const ee = c[L], ie = M[L], me = Ze(ie, ee.aggregation);
168
168
  s.push({
169
169
  value: me,
170
170
  count: ie.length,
171
171
  formattedValue: Je(me, ee.aggregation)
172
- }), d[L].push(...ie), _.has(F) || _.set(F, v.map(() => [])), _.get(F)[L].push(...ie), F++;
172
+ }), d[L].push(...ie), _.has(F) || _.set(F, c.map(() => [])), _.get(F)[L].push(...ie), F++;
173
173
  }
174
174
  }
175
175
  if (H.push(s), m && $.length > 1) {
@@ -178,19 +178,19 @@ function Fo(t, a) {
178
178
  count: 0,
179
179
  formattedValue: "-"
180
180
  };
181
- if (v.length > 0) {
182
- const w = v[0], x = d[0], L = Ze(x, w.aggregation);
183
- g.value = L, g.count = x.length, g.formattedValue = Je(L, w.aggregation);
181
+ if (c.length > 0) {
182
+ const w = c[0], M = d[0], L = Ze(M, w.aggregation);
183
+ g.value = L, g.count = M.length, g.formattedValue = Je(L, w.aggregation);
184
184
  }
185
185
  O.push(g);
186
186
  }
187
187
  }
188
188
  const X = [];
189
189
  if (y && D.length > 1)
190
- for (let f = 0; f < $.length * v.length; f++) {
191
- const s = f % v.length, d = v[s], F = [];
190
+ for (let f = 0; f < $.length * c.length; f++) {
191
+ const s = f % c.length, d = c[s], F = [];
192
192
  for (const w of D) {
193
- const x = C.get(w), L = $[Math.floor(f / v.length)], ee = (x == null ? void 0 : x.get(L)) || v.map(() => []);
193
+ const M = C.get(w), L = $[Math.floor(f / c.length)], ee = (M == null ? void 0 : M.get(L)) || c.map(() => []);
194
194
  F.push(...ee[s]);
195
195
  }
196
196
  const g = Ze(F, d.aggregation);
@@ -201,8 +201,8 @@ function Fo(t, a) {
201
201
  });
202
202
  }
203
203
  const B = { value: null, count: 0, formattedValue: "-" };
204
- if (m && y && v.length > 0) {
205
- const f = v[0], s = [];
204
+ if (m && y && c.length > 0) {
205
+ const f = c[0], s = [];
206
206
  for (const F of t) {
207
207
  const g = F[f.field];
208
208
  if (g != null && g !== "") {
@@ -222,12 +222,12 @@ function Fo(t, a) {
222
222
  grandTotal: B
223
223
  };
224
224
  }
225
- const So = "vpg-pivot-";
226
- function Ro(t) {
225
+ const Ro = "vpg-pivot-";
226
+ function $o(t) {
227
227
  const n = [...t].sort().join("|").substring(0, 100);
228
- return `${So}${n}`;
228
+ return `${Ro}${n}`;
229
229
  }
230
- function $o(t, a) {
230
+ function xo(t, a) {
231
231
  try {
232
232
  sessionStorage.setItem(t, JSON.stringify(a));
233
233
  } catch {
@@ -247,8 +247,8 @@ function lt(t, a) {
247
247
  return [
248
248
  ...t.rowFields,
249
249
  ...t.columnFields,
250
- ...t.valueFields.map((v) => v.field)
251
- ].every((v) => n.has(v));
250
+ ...t.valueFields.map((c) => c.field)
251
+ ].every((c) => n.has(c));
252
252
  }
253
253
  const Vt = {
254
254
  type: "free",
@@ -270,7 +270,7 @@ const Vt = {
270
270
  sessionPersistence: !1,
271
271
  noWatermark: !1
272
272
  }
273
- }, xo = {
273
+ }, To = {
274
274
  type: "free",
275
275
  isValid: !0,
276
276
  features: {
@@ -282,28 +282,28 @@ const Vt = {
282
282
  // Still show watermark in demo
283
283
  }
284
284
  };
285
- async function To(t, a, n) {
285
+ async function Do(t, a, n) {
286
286
  const l = globalThis.__TP_LICENSE_SECRET__;
287
287
  if (!l)
288
288
  return console.warn("[TinyPivot] License secret not configured. Call configureLicenseSecret() first."), !1;
289
- const v = `TP-${t}-${n}`;
289
+ const c = `TP-${t}-${n}`;
290
290
  try {
291
- const m = new TextEncoder(), y = m.encode(l), c = m.encode(v), b = await crypto.subtle.importKey("raw", y, { name: "HMAC", hash: "SHA-256" }, !1, ["sign"]), C = await crypto.subtle.sign("HMAC", b, c), $ = Array.from(new Uint8Array(C)).map((U) => U.toString(16).padStart(2, "0")).join("").slice(0, 12).toUpperCase();
291
+ const m = new TextEncoder(), y = m.encode(l), v = m.encode(c), b = await crypto.subtle.importKey("raw", y, { name: "HMAC", hash: "SHA-256" }, !1, ["sign"]), C = await crypto.subtle.sign("HMAC", b, v), $ = Array.from(new Uint8Array(C)).map((U) => U.toString(16).padStart(2, "0")).join("").slice(0, 12).toUpperCase();
292
292
  return a === $;
293
293
  } catch {
294
294
  return !1;
295
295
  }
296
296
  }
297
- async function Do(t) {
297
+ async function Vo(t) {
298
298
  if (!t || t === "")
299
299
  return Vt;
300
300
  const a = t.split("-");
301
301
  if (a.length !== 4 || a[0] !== "TP")
302
302
  return st;
303
- const n = a[1], l = a[2], v = a[3];
304
- if (!await To(n, l, v))
303
+ const n = a[1], l = a[2], c = a[3];
304
+ if (!await Do(n, l, c))
305
305
  return st;
306
- const y = Number.parseInt(v.slice(0, 4)), c = Number.parseInt(v.slice(4, 6)) - 1, b = Number.parseInt(v.slice(6, 8)), C = new Date(y, c, b);
306
+ const y = Number.parseInt(c.slice(0, 4)), v = Number.parseInt(c.slice(4, 6)) - 1, b = Number.parseInt(c.slice(6, 8)), C = new Date(y, v, b);
307
307
  if (C < /* @__PURE__ */ new Date())
308
308
  return { ...st, expiresAt: C };
309
309
  let D = "free";
@@ -320,11 +320,11 @@ async function Do(t) {
320
320
  }
321
321
  };
322
322
  }
323
- function Vo(t) {
323
+ function Ao(t) {
324
324
  globalThis.__TP_LICENSE_SECRET__ = t;
325
325
  }
326
- const Ao = "A48AA0618518D3E62F31FCFCA2DD2B86E7FE0863E2F90756FB0A960AE7A51583";
327
- async function zo(t) {
326
+ const zo = "A48AA0618518D3E62F31FCFCA2DD2B86E7FE0863E2F90756FB0A960AE7A51583";
327
+ async function Lo(t) {
328
328
  try {
329
329
  const n = new TextEncoder().encode(t), l = await crypto.subtle.digest("SHA-256", n);
330
330
  return Array.from(new Uint8Array(l)).map((m) => m.toString(16).padStart(2, "0")).join("").toUpperCase();
@@ -332,22 +332,22 @@ async function zo(t) {
332
332
  return "";
333
333
  }
334
334
  }
335
- async function Lo(t) {
336
- return !t || await zo(t) !== Ao ? null : xo;
335
+ async function Po(t) {
336
+ return !t || await Lo(t) !== zo ? null : To;
337
337
  }
338
- function Po() {
338
+ function Eo() {
339
339
  return Vt;
340
340
  }
341
- function Eo(t) {
341
+ function No(t) {
342
342
  return t.features.pivot;
343
343
  }
344
- function No(t) {
344
+ function Bo(t) {
345
345
  return t.isValid && t.type !== "free";
346
346
  }
347
- function Bo(t, a) {
347
+ function jo(t, a) {
348
348
  return a || !t.features.noWatermark;
349
349
  }
350
- function jo(t) {
350
+ function Ho(t) {
351
351
  console.warn(`[TinyPivot] "${t}" requires a Pro license. Visit https://tiny-pivot.com/#pricing to upgrade.`);
352
352
  }
353
353
  function le(t, a = ",") {
@@ -357,19 +357,19 @@ function le(t, a = ",") {
357
357
  return n.includes(a) || n.includes('"') || n.includes(`
358
358
  `) ? `"${n.replace(/"/g, '""')}"` : n;
359
359
  }
360
- function Ho(t, a, n = {}) {
361
- const { filename: l = "export.csv", includeHeaders: v = !0, delimiter: m = "," } = n, y = [];
362
- v && y.push(a.map((b) => le(b, m)).join(m));
360
+ function Uo(t, a, n = {}) {
361
+ const { filename: l = "export.csv", includeHeaders: c = !0, delimiter: m = "," } = n, y = [];
362
+ c && y.push(a.map((b) => le(b, m)).join(m));
363
363
  for (const b of t) {
364
364
  const C = a.map((D) => le(b[D], m));
365
365
  y.push(C.join(m));
366
366
  }
367
- const c = y.join(`
367
+ const v = y.join(`
368
368
  `);
369
- At(c, l, "text/csv;charset=utf-8;");
369
+ At(v, l, "text/csv;charset=utf-8;");
370
370
  }
371
- function Uo(t, a, n, l, v = {}) {
372
- const { filename: m = "pivot-export.csv", delimiter: y = "," } = v, c = [], { headers: b, rowHeaders: C, data: D, rowTotals: $, columnTotals: U, grandTotal: V, showRowTotals: H, showColumnTotals: O } = t, _ = a.length || 1;
371
+ function Ko(t, a, n, l, c = {}) {
372
+ const { filename: m = "pivot-export.csv", delimiter: y = "," } = c, v = [], { headers: b, rowHeaders: C, data: D, rowTotals: $, columnTotals: U, grandTotal: V, showRowTotals: H, showColumnTotals: O } = t, _ = a.length || 1;
373
373
  if (b.length > 0)
374
374
  for (let B = 0; B < b.length; B++) {
375
375
  const f = [];
@@ -384,7 +384,7 @@ function Uo(t, a, n, l, v = {}) {
384
384
  else
385
385
  for (let s = 0; s < l.length; s++)
386
386
  f.push("");
387
- c.push(f.join(y));
387
+ v.push(f.join(y));
388
388
  }
389
389
  else {
390
390
  const B = [];
@@ -392,7 +392,7 @@ function Uo(t, a, n, l, v = {}) {
392
392
  B.push(le(a[f] || "", y));
393
393
  for (const f of l)
394
394
  B.push(le(`${f.field} (${f.aggregation})`, y));
395
- H && $ && $.length > 0 && B.push(le("Total", y)), c.push(B.join(y));
395
+ H && $ && $.length > 0 && B.push(le("Total", y)), v.push(B.join(y));
396
396
  }
397
397
  for (let B = 0; B < C.length; B++) {
398
398
  const f = [], s = C[B] || [];
@@ -401,7 +401,7 @@ function Uo(t, a, n, l, v = {}) {
401
401
  const d = D[B] || [];
402
402
  for (const F of d)
403
403
  f.push(le((F == null ? void 0 : F.formattedValue) || "", y));
404
- H && $ && $[B] && f.push(le($[B].formattedValue || "", y)), c.push(f.join(y));
404
+ H && $ && $[B] && f.push(le($[B].formattedValue || "", y)), v.push(f.join(y));
405
405
  }
406
406
  if (O && U && U.length > 0) {
407
407
  const B = [];
@@ -410,22 +410,22 @@ function Uo(t, a, n, l, v = {}) {
410
410
  B.push("");
411
411
  for (const f of U)
412
412
  B.push(le((f == null ? void 0 : f.formattedValue) || "", y));
413
- H && V && B.push(le(V.formattedValue || "", y)), c.push(B.join(y));
413
+ H && V && B.push(le(V.formattedValue || "", y)), v.push(B.join(y));
414
414
  }
415
- const X = c.join(`
415
+ const X = v.join(`
416
416
  `);
417
417
  At(X, m, "text/csv;charset=utf-8;");
418
418
  }
419
419
  function At(t, a, n) {
420
- const l = new Blob([t], { type: n }), v = URL.createObjectURL(l), m = document.createElement("a");
421
- m.href = v, m.download = a, m.style.display = "none", document.body.appendChild(m), m.click(), document.body.removeChild(m), URL.revokeObjectURL(v);
420
+ const l = new Blob([t], { type: n }), c = URL.createObjectURL(l), m = document.createElement("a");
421
+ m.href = c, m.download = a, m.style.display = "none", document.body.appendChild(m), m.click(), document.body.removeChild(m), URL.revokeObjectURL(c);
422
422
  }
423
- function Ko(t, a, n) {
423
+ function Wo(t, a, n) {
424
424
  navigator.clipboard.writeText(t).then(a).catch(n);
425
425
  }
426
- function Wo(t, a, n) {
427
- const { minRow: l, maxRow: v, minCol: m, maxCol: y } = n, c = [];
428
- for (let b = l; b <= v; b++) {
426
+ function _o(t, a, n) {
427
+ const { minRow: l, maxRow: c, minCol: m, maxCol: y } = n, v = [];
428
+ for (let b = l; b <= c; b++) {
429
429
  const C = t[b];
430
430
  if (!C)
431
431
  continue;
@@ -437,22 +437,22 @@ function Wo(t, a, n) {
437
437
  const V = C[U];
438
438
  D.push(V == null ? "" : String(V));
439
439
  }
440
- c.push(D.join(" "));
440
+ v.push(D.join(" "));
441
441
  }
442
- return c.join(`
442
+ return v.join(`
443
443
  `);
444
444
  }
445
445
  const $t = (t, a, n) => {
446
446
  if (!n || !Array.isArray(n) || n.length === 0)
447
447
  return !0;
448
- const l = t.getValue(a), v = l == null || l === "" ? "(blank)" : String(l);
449
- return n.includes(v);
448
+ const l = t.getValue(a), c = l == null || l === "" ? "(blank)" : String(l);
449
+ return n.includes(c);
450
450
  };
451
- function _o(t) {
452
- const { data: a, enableSorting: n = !0, enableFiltering: l = !0 } = t, v = M([]), m = M([]), y = M({}), c = M(""), b = M({}), C = T(() => a.value.length === 0 ? [] : Object.keys(a.value[0]));
451
+ function qo(t) {
452
+ const { data: a, enableSorting: n = !0, enableFiltering: l = !0 } = t, c = x([]), m = x([]), y = x({}), v = x(""), b = x({}), C = T(() => a.value.length === 0 ? [] : Object.keys(a.value[0]));
453
453
  function D(g) {
454
454
  const w = `${g}-${a.value.length}`;
455
- return b.value[w] || (b.value[w] = ko(a.value, g)), b.value[w];
455
+ return b.value[w] || (b.value[w] = Co(a.value, g)), b.value[w];
456
456
  }
457
457
  function $() {
458
458
  b.value = {};
@@ -464,14 +464,14 @@ function _o(t) {
464
464
  accessorKey: g,
465
465
  header: g,
466
466
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
467
- cell: (x) => Co(x.getValue(), w.type),
467
+ cell: (M) => yo(M.getValue(), w.type),
468
468
  filterFn: $t,
469
469
  meta: {
470
470
  type: w.type,
471
471
  uniqueCount: w.uniqueValues.length
472
472
  }
473
473
  };
474
- })), V = go({
474
+ })), V = po({
475
475
  get data() {
476
476
  return a.value;
477
477
  },
@@ -480,7 +480,7 @@ function _o(t) {
480
480
  },
481
481
  state: {
482
482
  get sorting() {
483
- return v.value;
483
+ return c.value;
484
484
  },
485
485
  get columnFilters() {
486
486
  return m.value;
@@ -489,18 +489,18 @@ function _o(t) {
489
489
  return y.value;
490
490
  },
491
491
  get globalFilter() {
492
- return c.value;
492
+ return v.value;
493
493
  }
494
494
  },
495
495
  onSortingChange: (g) => {
496
- v.value = typeof g == "function" ? g(v.value) : g;
496
+ c.value = typeof g == "function" ? g(c.value) : g;
497
497
  },
498
498
  onColumnFiltersChange: (g) => {
499
499
  m.value = typeof g == "function" ? g(m.value) : g;
500
500
  },
501
- getCoreRowModel: mo(),
502
- getSortedRowModel: n ? fo() : void 0,
503
- getFilteredRowModel: l ? po() : void 0,
501
+ getCoreRowModel: ho(),
502
+ getSortedRowModel: n ? mo() : void 0,
503
+ getFilteredRowModel: l ? fo() : void 0,
504
504
  filterFns: {
505
505
  multiSelect: $t
506
506
  },
@@ -513,28 +513,28 @@ function _o(t) {
513
513
  function X(g) {
514
514
  const w = V.getColumn(g);
515
515
  if (!w) return !1;
516
- const x = w.getFilterValue();
517
- return x !== void 0 && Array.isArray(x) && x.length > 0;
516
+ const M = w.getFilterValue();
517
+ return M !== void 0 && Array.isArray(M) && M.length > 0;
518
518
  }
519
519
  function B(g, w) {
520
- const x = V.getColumn(g);
521
- x && (x.setFilterValue(w.length === 0 ? void 0 : w), m.value = V.getState().columnFilters);
520
+ const M = V.getColumn(g);
521
+ M && (M.setFilterValue(w.length === 0 ? void 0 : w), m.value = V.getState().columnFilters);
522
522
  }
523
523
  function f() {
524
- V.resetColumnFilters(), c.value = "", m.value = [];
524
+ V.resetColumnFilters(), v.value = "", m.value = [];
525
525
  }
526
526
  function s(g) {
527
527
  const w = V.getColumn(g);
528
528
  if (!w) return [];
529
- const x = w.getFilterValue();
530
- return Array.isArray(x) ? x : [];
529
+ const M = w.getFilterValue();
530
+ return Array.isArray(M) ? M : [];
531
531
  }
532
532
  function d(g) {
533
- const w = v.value.find((x) => x.id === g);
534
- w ? w.desc ? v.value = [] : v.value = [{ id: g, desc: !0 }] : v.value = [{ id: g, desc: !1 }];
533
+ const w = c.value.find((M) => M.id === g);
534
+ w ? w.desc ? c.value = [] : c.value = [{ id: g, desc: !0 }] : c.value = [{ id: g, desc: !1 }];
535
535
  }
536
536
  function F(g) {
537
- const w = v.value.find((x) => x.id === g);
537
+ const w = c.value.find((M) => M.id === g);
538
538
  return w ? w.desc ? "desc" : "asc" : null;
539
539
  }
540
540
  return Ae(a, () => {
@@ -543,10 +543,10 @@ function _o(t) {
543
543
  // Table instance
544
544
  table: V,
545
545
  // State
546
- sorting: v,
546
+ sorting: c,
547
547
  columnFilters: m,
548
548
  columnVisibility: y,
549
- globalFilter: c,
549
+ globalFilter: v,
550
550
  columnKeys: C,
551
551
  // Computed
552
552
  filteredRowCount: H,
@@ -563,56 +563,56 @@ function _o(t) {
563
563
  getSortDirection: F
564
564
  };
565
565
  }
566
- const qo = M(null), $e = M(!1), ce = M(Po());
566
+ const Oo = x(null), $e = x(!1), ve = x(Eo());
567
567
  let at = null;
568
- async function Ps(t) {
569
- qo.value = t, at = Do(t), ce.value = await at, at = null, ce.value.isValid ? ce.value.type !== "free" && console.info(`[TinyPivot] Pro license activated (${ce.value.type})`) : console.warn("[TinyPivot] Invalid or expired license key. Running in free mode.");
570
- }
571
568
  async function Es(t) {
572
- const a = await Lo(t);
573
- return a ? ($e.value = !0, ce.value = a, console.info("[TinyPivot] Demo mode enabled - all Pro features unlocked for evaluation"), !0) : (console.warn("[TinyPivot] Demo mode activation failed - invalid secret"), !1);
569
+ Oo.value = t, at = Vo(t), ve.value = await at, at = null, ve.value.isValid ? ve.value.type !== "free" && console.info(`[TinyPivot] Pro license activated (${ve.value.type})`) : console.warn("[TinyPivot] Invalid or expired license key. Running in free mode.");
570
+ }
571
+ async function Ns(t) {
572
+ const a = await Po(t);
573
+ return a ? ($e.value = !0, ve.value = a, console.info("[TinyPivot] Demo mode enabled - all Pro features unlocked for evaluation"), !0) : (console.warn("[TinyPivot] Demo mode activation failed - invalid secret"), !1);
574
574
  }
575
- function Ns(t) {
576
- Vo(t);
575
+ function Bs(t) {
576
+ Ao(t);
577
577
  }
578
578
  function Ie() {
579
- const t = T(() => $e.value), a = T(() => $e.value || No(ce.value)), n = T(() => $e.value || Eo(ce.value)), l = T(
580
- () => $e.value || ce.value.features.advancedAggregations
581
- ), v = T(
582
- () => $e.value || ce.value.features.percentageMode
583
- ), m = T(() => Bo(ce.value, $e.value));
584
- function y(c) {
585
- return a.value ? !0 : (jo(c), !1);
579
+ const t = T(() => $e.value), a = T(() => $e.value || Bo(ve.value)), n = T(() => $e.value || No(ve.value)), l = T(
580
+ () => $e.value || ve.value.features.advancedAggregations
581
+ ), c = T(
582
+ () => $e.value || ve.value.features.percentageMode
583
+ ), m = T(() => jo(ve.value, $e.value));
584
+ function y(v) {
585
+ return a.value ? !0 : (Ho(v), !1);
586
586
  }
587
587
  return {
588
- licenseInfo: T(() => ce.value),
588
+ licenseInfo: T(() => ve.value),
589
589
  isDemo: t,
590
590
  isPro: a,
591
591
  canUsePivot: n,
592
592
  canUseAdvancedAggregations: l,
593
- canUsePercentageMode: v,
593
+ canUsePercentageMode: c,
594
594
  showWatermark: m,
595
595
  requirePro: y
596
596
  };
597
597
  }
598
- function Oo(t) {
599
- const { canUsePivot: a, requirePro: n } = Ie(), l = M([]), v = M([]), m = M([]), y = M(!0), c = M(!0), b = M(null), C = T(() => yo(t.value)), D = T(() => bo(
598
+ function Go(t) {
599
+ const { canUsePivot: a, requirePro: n } = Ie(), l = x([]), c = x([]), m = x([]), y = x(!0), v = x(!0), b = x(null), C = T(() => bo(t.value)), D = T(() => Fo(
600
600
  C.value,
601
601
  l.value,
602
- v.value,
602
+ c.value,
603
603
  m.value
604
604
  )), $ = T(() => Dt({
605
605
  rowFields: l.value,
606
- columnFields: v.value,
606
+ columnFields: c.value,
607
607
  valueFields: m.value,
608
608
  showRowTotals: y.value,
609
- showColumnTotals: c.value
610
- })), U = T(() => !$.value || !a.value ? null : Fo(t.value, {
609
+ showColumnTotals: v.value
610
+ })), U = T(() => !$.value || !a.value ? null : So(t.value, {
611
611
  rowFields: l.value,
612
- columnFields: v.value,
612
+ columnFields: c.value,
613
613
  valueFields: m.value,
614
614
  showRowTotals: y.value,
615
- showColumnTotals: c.value
615
+ showColumnTotals: v.value
616
616
  }));
617
617
  function V(g) {
618
618
  n("Pivot Table - Row Fields") && (l.value.includes(g) || (l.value = [...l.value, g]));
@@ -621,94 +621,94 @@ function Oo(t) {
621
621
  l.value = l.value.filter((w) => w !== g);
622
622
  }
623
623
  function O(g) {
624
- n("Pivot Table - Column Fields") && (v.value.includes(g) || (v.value = [...v.value, g]));
624
+ n("Pivot Table - Column Fields") && (c.value.includes(g) || (c.value = [...c.value, g]));
625
625
  }
626
626
  function _(g) {
627
- v.value = v.value.filter((w) => w !== g);
627
+ c.value = c.value.filter((w) => w !== g);
628
628
  }
629
629
  function X(g, w = "sum") {
630
- n("Pivot Table - Value Fields") && (m.value.some((x) => x.field === g && x.aggregation === w) || (m.value = [...m.value, { field: g, aggregation: w }]));
630
+ n("Pivot Table - Value Fields") && (m.value.some((M) => M.field === g && M.aggregation === w) || (m.value = [...m.value, { field: g, aggregation: w }]));
631
631
  }
632
632
  function B(g, w) {
633
633
  w ? m.value = m.value.filter(
634
- (x) => !(x.field === g && x.aggregation === w)
635
- ) : m.value = m.value.filter((x) => x.field !== g);
634
+ (M) => !(M.field === g && M.aggregation === w)
635
+ ) : m.value = m.value.filter((M) => M.field !== g);
636
636
  }
637
- function f(g, w, x) {
638
- m.value = m.value.map((L) => L.field === g && L.aggregation === w ? { ...L, aggregation: x } : L);
637
+ function f(g, w, M) {
638
+ m.value = m.value.map((L) => L.field === g && L.aggregation === w ? { ...L, aggregation: M } : L);
639
639
  }
640
640
  function s() {
641
- l.value = [], v.value = [], m.value = [];
641
+ l.value = [], c.value = [], m.value = [];
642
642
  }
643
643
  function d(g, w) {
644
644
  if (g.area === w.area) {
645
645
  if (g.area === "row") {
646
- const x = [...l.value], [L] = x.splice(g.index, 1);
647
- x.splice(w.index, 0, L), l.value = x;
646
+ const M = [...l.value], [L] = M.splice(g.index, 1);
647
+ M.splice(w.index, 0, L), l.value = M;
648
648
  } else if (g.area === "column") {
649
- const x = [...v.value], [L] = x.splice(g.index, 1);
650
- x.splice(w.index, 0, L), v.value = x;
649
+ const M = [...c.value], [L] = M.splice(g.index, 1);
650
+ M.splice(w.index, 0, L), c.value = M;
651
651
  }
652
652
  }
653
653
  }
654
654
  function F() {
655
655
  if (!n("Pivot Table - Auto Suggest") || C.value.length === 0) return;
656
- const g = C.value.filter((x) => !x.isNumeric && x.uniqueCount < 50), w = C.value.filter((x) => x.isNumeric);
656
+ const g = C.value.filter((M) => !M.isNumeric && M.uniqueCount < 50), w = C.value.filter((M) => M.isNumeric);
657
657
  g.length > 0 && w.length > 0 && (l.value = [g[0].field], m.value = [{ field: w[0].field, aggregation: "sum" }]);
658
658
  }
659
659
  return Ae(
660
660
  t,
661
661
  (g) => {
662
662
  if (g.length === 0) return;
663
- const w = Object.keys(g[0]), x = Ro(w);
664
- if (x !== b.value) {
665
- b.value = x;
666
- const L = Mo(x);
663
+ const w = Object.keys(g[0]), M = $o(w);
664
+ if (M !== b.value) {
665
+ b.value = M;
666
+ const L = Mo(M);
667
667
  if (L && lt(L, w))
668
- l.value = L.rowFields, v.value = L.columnFields, m.value = L.valueFields, y.value = L.showRowTotals, c.value = L.showColumnTotals;
668
+ l.value = L.rowFields, c.value = L.columnFields, m.value = L.valueFields, y.value = L.showRowTotals, v.value = L.showColumnTotals;
669
669
  else {
670
670
  const ee = {
671
671
  rowFields: l.value,
672
- columnFields: v.value,
672
+ columnFields: c.value,
673
673
  valueFields: m.value,
674
674
  showRowTotals: y.value,
675
- showColumnTotals: c.value
675
+ showColumnTotals: v.value
676
676
  };
677
677
  lt(ee, w) || s();
678
678
  }
679
679
  } else {
680
680
  const L = {
681
681
  rowFields: l.value,
682
- columnFields: v.value,
682
+ columnFields: c.value,
683
683
  valueFields: m.value,
684
684
  showRowTotals: y.value,
685
- showColumnTotals: c.value
685
+ showColumnTotals: v.value
686
686
  };
687
687
  lt(L, w) || s();
688
688
  }
689
689
  },
690
690
  { immediate: !0 }
691
691
  ), Ae(
692
- [l, v, m, y, c],
692
+ [l, c, m, y, v],
693
693
  () => {
694
694
  if (!b.value) return;
695
695
  const g = {
696
696
  rowFields: l.value,
697
- columnFields: v.value,
697
+ columnFields: c.value,
698
698
  valueFields: m.value,
699
699
  showRowTotals: y.value,
700
- showColumnTotals: c.value
700
+ showColumnTotals: v.value
701
701
  };
702
- $o(b.value, g);
702
+ xo(b.value, g);
703
703
  },
704
704
  { deep: !0 }
705
705
  ), {
706
706
  // State
707
707
  rowFields: l,
708
- columnFields: v,
708
+ columnFields: c,
709
709
  valueFields: m,
710
710
  showRowTotals: y,
711
- showColumnTotals: c,
711
+ showColumnTotals: v,
712
712
  // Computed
713
713
  availableFields: C,
714
714
  unassignedFields: D,
@@ -727,32 +727,32 @@ function Oo(t) {
727
727
  autoSuggestConfig: F
728
728
  };
729
729
  }
730
- function Go(t, a, n) {
731
- Ho(t, a, n);
730
+ function Xo(t, a, n) {
731
+ Uo(t, a, n);
732
732
  }
733
- function Xo(t, a, n, l, v) {
734
- Uo(t, a, n, l, v);
735
- }
736
- function Yo(t, a, n) {
737
- Ko(t, a, n);
733
+ function Yo(t, a, n, l, c) {
734
+ Ko(t, a, n, l, c);
738
735
  }
739
736
  function Zo(t, a, n) {
740
- return Wo(t, a, n);
737
+ Wo(t, a, n);
738
+ }
739
+ function Jo(t, a, n) {
740
+ return _o(t, a, n);
741
741
  }
742
- function Bs(t, a = {}) {
743
- const n = M(a.pageSize ?? 50), l = M(a.currentPage ?? 1), v = T(
742
+ function js(t, a = {}) {
743
+ const n = x(a.pageSize ?? 50), l = x(a.currentPage ?? 1), c = T(
744
744
  () => Math.max(1, Math.ceil(t.value.length / n.value))
745
745
  ), m = T(() => {
746
746
  const H = (l.value - 1) * n.value, O = H + n.value;
747
747
  return t.value.slice(H, O);
748
- }), y = T(() => (l.value - 1) * n.value + 1), c = T(
748
+ }), y = T(() => (l.value - 1) * n.value + 1), v = T(
749
749
  () => Math.min(l.value * n.value, t.value.length)
750
750
  );
751
751
  function b(H) {
752
- l.value = Math.max(1, Math.min(H, v.value));
752
+ l.value = Math.max(1, Math.min(H, c.value));
753
753
  }
754
754
  function C() {
755
- l.value < v.value && l.value++;
755
+ l.value < c.value && l.value++;
756
756
  }
757
757
  function D() {
758
758
  l.value > 1 && l.value--;
@@ -761,7 +761,7 @@ function Bs(t, a = {}) {
761
761
  l.value = 1;
762
762
  }
763
763
  function U() {
764
- l.value = v.value;
764
+ l.value = c.value;
765
765
  }
766
766
  function V(H) {
767
767
  n.value = H, l.value = 1;
@@ -769,10 +769,10 @@ function Bs(t, a = {}) {
769
769
  return {
770
770
  pageSize: n,
771
771
  currentPage: l,
772
- totalPages: v,
772
+ totalPages: c,
773
773
  paginatedData: m,
774
774
  startIndex: y,
775
- endIndex: c,
775
+ endIndex: v,
776
776
  goToPage: b,
777
777
  nextPage: C,
778
778
  prevPage: D,
@@ -781,14 +781,14 @@ function Bs(t, a = {}) {
781
781
  setPageSize: V
782
782
  };
783
783
  }
784
- function js(t, a) {
785
- const n = M(""), l = M(!1), v = T(() => {
784
+ function Hs(t, a) {
785
+ const n = x(""), l = x(!1), c = T(() => {
786
786
  if (!n.value.trim())
787
787
  return t.value;
788
788
  const y = l.value ? n.value.trim() : n.value.trim().toLowerCase();
789
- return t.value.filter((c) => {
789
+ return t.value.filter((v) => {
790
790
  for (const b of a.value) {
791
- const C = c[b];
791
+ const C = v[b];
792
792
  if (C == null) continue;
793
793
  if ((l.value ? String(C) : String(C).toLowerCase()).includes(y))
794
794
  return !0;
@@ -802,19 +802,19 @@ function js(t, a) {
802
802
  return {
803
803
  searchTerm: n,
804
804
  caseSensitive: l,
805
- filteredData: v,
805
+ filteredData: c,
806
806
  clearSearch: m
807
807
  };
808
808
  }
809
- function Hs(t) {
810
- const a = M(/* @__PURE__ */ new Set()), n = T(() => Array.from(a.value).sort((V, H) => V - H).map((V) => t.value[V]).filter(Boolean)), l = T(() => t.value.length > 0 && a.value.size === t.value.length), v = T(() => a.value.size > 0 && a.value.size < t.value.length);
809
+ function Us(t) {
810
+ const a = x(/* @__PURE__ */ new Set()), n = T(() => Array.from(a.value).sort((V, H) => V - H).map((V) => t.value[V]).filter(Boolean)), l = T(() => t.value.length > 0 && a.value.size === t.value.length), c = T(() => a.value.size > 0 && a.value.size < t.value.length);
811
811
  function m(V) {
812
812
  a.value.has(V) ? a.value.delete(V) : a.value.add(V), a.value = new Set(a.value);
813
813
  }
814
814
  function y(V) {
815
815
  a.value.add(V), a.value = new Set(a.value);
816
816
  }
817
- function c(V) {
817
+ function v(V) {
818
818
  a.value.delete(V), a.value = new Set(a.value);
819
819
  }
820
820
  function b() {
@@ -839,10 +839,10 @@ function Hs(t) {
839
839
  selectedRowIndices: a,
840
840
  selectedRows: n,
841
841
  allSelected: l,
842
- someSelected: v,
842
+ someSelected: c,
843
843
  toggleRow: m,
844
844
  selectRow: y,
845
- deselectRow: c,
845
+ deselectRow: v,
846
846
  selectAll: b,
847
847
  deselectAll: C,
848
848
  toggleAll: D,
@@ -850,10 +850,10 @@ function Hs(t) {
850
850
  selectRange: U
851
851
  };
852
852
  }
853
- function Us(t, a = 60, n = 600) {
854
- const l = M({ ...t.value }), v = M(!1), m = M(null);
853
+ function Ks(t, a = 60, n = 600) {
854
+ const l = x({ ...t.value }), c = x(!1), m = x(null);
855
855
  function y(C, D) {
856
- v.value = !0, m.value = C;
856
+ c.value = !0, m.value = C;
857
857
  const $ = D.clientX, U = l.value[C] || 150, V = (O) => {
858
858
  const _ = O.clientX - $, X = Math.max(a, Math.min(n, U + _));
859
859
  l.value = {
@@ -861,11 +861,11 @@ function Us(t, a = 60, n = 600) {
861
861
  [C]: X
862
862
  };
863
863
  }, H = () => {
864
- v.value = !1, m.value = null, document.removeEventListener("mousemove", V), document.removeEventListener("mouseup", H);
864
+ c.value = !1, m.value = null, document.removeEventListener("mousemove", V), document.removeEventListener("mouseup", H);
865
865
  };
866
866
  document.addEventListener("mousemove", V), document.addEventListener("mouseup", H);
867
867
  }
868
- function c(C) {
868
+ function v(C) {
869
869
  t.value[C] && (l.value = {
870
870
  ...l.value,
871
871
  [C]: t.value[C]
@@ -876,17 +876,17 @@ function Us(t, a = 60, n = 600) {
876
876
  }
877
877
  return {
878
878
  columnWidths: l,
879
- isResizing: v,
879
+ isResizing: c,
880
880
  resizingColumn: m,
881
881
  startResize: y,
882
- resetColumnWidth: c,
882
+ resetColumnWidth: v,
883
883
  resetAllWidths: b
884
884
  };
885
885
  }
886
- const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, Io = { class: "vpg-filter-count" }, en = { class: "vpg-sort-controls" }, tn = { class: "vpg-search-container" }, on = { class: "vpg-values-list" }, nn = ["checked", "onChange"], ln = {
886
+ const Qo = { class: "vpg-filter-header" }, Io = { class: "vpg-filter-title" }, en = { class: "vpg-filter-count" }, tn = { class: "vpg-sort-controls" }, on = { class: "vpg-search-container" }, nn = { class: "vpg-values-list" }, ln = ["checked", "onChange"], sn = {
887
887
  key: 0,
888
888
  class: "vpg-no-results"
889
- }, sn = /* @__PURE__ */ Qe({
889
+ }, an = /* @__PURE__ */ Qe({
890
890
  __name: "ColumnFilter",
891
891
  props: {
892
892
  columnId: {},
@@ -897,35 +897,35 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
897
897
  },
898
898
  emits: ["filter", "sort", "close"],
899
899
  setup(t, { emit: a }) {
900
- const n = t, l = a, v = M(""), m = M(), y = M();
900
+ const n = t, l = a, c = x(""), m = x(), y = x();
901
901
  T(() => {
902
902
  const s = [...n.stats.uniqueValues];
903
903
  return n.stats.nullCount > 0 && s.unshift("(blank)"), s;
904
904
  });
905
- const c = M(new Set(n.selectedValues)), b = T(() => n.stats.nullCount > 0), C = T(() => {
905
+ const v = x(new Set(n.selectedValues)), b = T(() => n.stats.nullCount > 0), C = T(() => {
906
906
  const s = n.stats.uniqueValues;
907
- if (!v.value)
907
+ if (!c.value)
908
908
  return s;
909
- const d = v.value.toLowerCase();
909
+ const d = c.value.toLowerCase();
910
910
  return s.filter((F) => F.toLowerCase().includes(d));
911
911
  }), D = T(() => {
912
912
  const s = [...C.value];
913
- return b.value && (!v.value || "(blank)".includes(v.value.toLowerCase())) && s.unshift("(blank)"), s;
913
+ return b.value && (!c.value || "(blank)".includes(c.value.toLowerCase())) && s.unshift("(blank)"), s;
914
914
  });
915
- T(() => D.value.every((s) => c.value.has(s))), T(() => c.value.size === 0);
915
+ T(() => D.value.every((s) => v.value.has(s))), T(() => v.value.size === 0);
916
916
  function $(s) {
917
- c.value.has(s) ? c.value.delete(s) : c.value.add(s), c.value = new Set(c.value);
917
+ v.value.has(s) ? v.value.delete(s) : v.value.add(s), v.value = new Set(v.value);
918
918
  }
919
919
  function U() {
920
920
  for (const s of D.value)
921
- c.value.add(s);
922
- c.value = new Set(c.value);
921
+ v.value.add(s);
922
+ v.value = new Set(v.value);
923
923
  }
924
924
  function V() {
925
- c.value.clear(), c.value = new Set(c.value);
925
+ v.value.clear(), v.value = new Set(v.value);
926
926
  }
927
927
  function H() {
928
- c.value.size === 0 ? l("filter", []) : l("filter", Array.from(c.value)), l("close");
928
+ v.value.size === 0 ? l("filter", []) : l("filter", Array.from(v.value)), l("close");
929
929
  }
930
930
  function O() {
931
931
  l("sort", n.sortDirection === "asc" ? null : "asc");
@@ -934,7 +934,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
934
934
  l("sort", n.sortDirection === "desc" ? null : "desc");
935
935
  }
936
936
  function X() {
937
- c.value.clear(), c.value = new Set(c.value), l("filter", []), l("close");
937
+ v.value.clear(), v.value = new Set(v.value), l("filter", []), l("close");
938
938
  }
939
939
  function B(s) {
940
940
  m.value && !m.value.contains(s.target) && l("close");
@@ -942,7 +942,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
942
942
  function f(s) {
943
943
  s.key === "Escape" ? l("close") : s.key === "Enter" && s.ctrlKey && H();
944
944
  }
945
- return xt(() => {
945
+ return Mt(() => {
946
946
  Ue(() => {
947
947
  var s;
948
948
  (s = y.value) == null || s.focus();
@@ -950,17 +950,17 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
950
950
  }), Tt(() => {
951
951
  document.removeEventListener("mousedown", B), document.removeEventListener("keydown", f);
952
952
  }), Ae(() => n.selectedValues, (s) => {
953
- c.value = new Set(s);
953
+ v.value = new Set(s);
954
954
  }, { immediate: !0 }), (s, d) => (r(), u("div", {
955
955
  ref_key: "dropdownRef",
956
956
  ref: m,
957
957
  class: "vpg-filter-dropdown"
958
958
  }, [
959
- e("div", Jo, [
960
- e("span", Qo, R(t.columnName), 1),
961
- e("span", Io, R(t.stats.uniqueValues.length.toLocaleString()) + " unique ", 1)
959
+ e("div", Qo, [
960
+ e("span", Io, R(t.columnName), 1),
961
+ e("span", en, R(t.stats.uniqueValues.length.toLocaleString()) + " unique ", 1)
962
962
  ]),
963
- e("div", en, [
963
+ e("div", tn, [
964
964
  e("button", {
965
965
  class: q(["vpg-sort-btn", { active: t.sortDirection === "asc" }]),
966
966
  title: "Sort A to Z",
@@ -1003,7 +1003,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1003
1003
  ])], 2)
1004
1004
  ]),
1005
1005
  d[7] || (d[7] = e("div", { class: "vpg-divider" }, null, -1)),
1006
- e("div", tn, [
1006
+ e("div", on, [
1007
1007
  d[4] || (d[4] = e("svg", {
1008
1008
  class: "vpg-search-icon",
1009
1009
  fill: "none",
@@ -1020,17 +1020,17 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1020
1020
  it(e("input", {
1021
1021
  ref_key: "searchInputRef",
1022
1022
  ref: y,
1023
- "onUpdate:modelValue": d[0] || (d[0] = (F) => v.value = F),
1023
+ "onUpdate:modelValue": d[0] || (d[0] = (F) => c.value = F),
1024
1024
  type: "text",
1025
1025
  placeholder: "Search values...",
1026
1026
  class: "vpg-search-input"
1027
1027
  }, null, 512), [
1028
- [rt, v.value]
1028
+ [rt, c.value]
1029
1029
  ]),
1030
- v.value ? (r(), u("button", {
1030
+ c.value ? (r(), u("button", {
1031
1031
  key: 0,
1032
1032
  class: "vpg-clear-search",
1033
- onClick: d[1] || (d[1] = (F) => v.value = "")
1033
+ onClick: d[1] || (d[1] = (F) => c.value = "")
1034
1034
  }, " × ")) : A("", !0)
1035
1035
  ]),
1036
1036
  e("div", { class: "vpg-bulk-actions" }, [
@@ -1073,22 +1073,22 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1073
1073
  I(" Clear All ", -1)
1074
1074
  ])])
1075
1075
  ]),
1076
- e("div", on, [
1076
+ e("div", nn, [
1077
1077
  (r(!0), u(W, null, J(D.value, (F) => (r(), u("label", {
1078
1078
  key: F,
1079
- class: q(["vpg-value-item", { selected: c.value.has(F) }])
1079
+ class: q(["vpg-value-item", { selected: v.value.has(F) }])
1080
1080
  }, [
1081
1081
  e("input", {
1082
1082
  type: "checkbox",
1083
- checked: c.value.has(F),
1083
+ checked: v.value.has(F),
1084
1084
  class: "vpg-value-checkbox",
1085
1085
  onChange: (g) => $(F)
1086
- }, null, 40, nn),
1086
+ }, null, 40, ln),
1087
1087
  e("span", {
1088
1088
  class: q(["vpg-value-text", { "vpg-blank": F === "(blank)" }])
1089
1089
  }, R(F), 3)
1090
1090
  ], 2))), 128)),
1091
- D.value.length === 0 ? (r(), u("div", ln, " No matching values ")) : A("", !0)
1091
+ D.value.length === 0 ? (r(), u("div", sn, " No matching values ")) : A("", !0)
1092
1092
  ]),
1093
1093
  e("div", { class: "vpg-filter-footer" }, [
1094
1094
  e("button", {
@@ -1104,22 +1104,22 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1104
1104
  }
1105
1105
  }), et = (t, a) => {
1106
1106
  const n = t.__vccOpts || t;
1107
- for (const [l, v] of a)
1108
- n[l] = v;
1107
+ for (const [l, c] of a)
1108
+ n[l] = c;
1109
1109
  return n;
1110
- }, an = /* @__PURE__ */ et(sn, [["__scopeId", "data-v-0e340167"]]), rn = { class: "vpg-pivot-config" }, un = { class: "vpg-config-header" }, vn = { class: "vpg-header-actions" }, cn = {
1110
+ }, rn = /* @__PURE__ */ et(an, [["__scopeId", "data-v-0e340167"]]), un = { class: "vpg-pivot-config" }, cn = { class: "vpg-config-header" }, vn = { class: "vpg-header-actions" }, dn = {
1111
1111
  key: 0,
1112
1112
  class: "vpg-assigned-section"
1113
- }, dn = { class: "vpg-assigned-list" }, gn = ["title", "onDragstart"], pn = { class: "vpg-item-main" }, fn = { class: "vpg-item-name" }, mn = { class: "vpg-item-actions" }, hn = ["title", "onClick"], wn = ["value", "onChange"], kn = ["value"], Cn = ["onClick"], yn = { class: "vpg-unassigned-section" }, bn = { class: "vpg-section-header" }, Fn = { class: "vpg-section-label" }, Sn = { class: "vpg-count" }, Rn = { class: "vpg-field-search" }, $n = { class: "vpg-field-list" }, Mn = ["title", "onDragstart"], xn = ["title"], Tn = { class: "vpg-field-name" }, Dn = { class: "vpg-unique-count" }, Vn = {
1113
+ }, gn = { class: "vpg-assigned-list" }, pn = ["title", "onDragstart"], fn = { class: "vpg-item-main" }, mn = { class: "vpg-item-name" }, hn = { class: "vpg-item-actions" }, wn = ["title", "onClick"], kn = ["value", "onChange"], Cn = ["value"], yn = ["onClick"], bn = { class: "vpg-unassigned-section" }, Fn = { class: "vpg-section-header" }, Sn = { class: "vpg-section-label" }, Rn = { class: "vpg-count" }, $n = { class: "vpg-field-search" }, xn = { class: "vpg-field-list" }, Mn = ["title", "onDragstart"], Tn = ["title"], Dn = { class: "vpg-field-name" }, Vn = { class: "vpg-unique-count" }, An = {
1114
1114
  key: 0,
1115
1115
  class: "vpg-empty-hint"
1116
- }, An = {
1116
+ }, zn = {
1117
1117
  key: 1,
1118
1118
  class: "vpg-empty-hint"
1119
- }, zn = { class: "vpg-options-section" }, Ln = { class: "vpg-option-toggle" }, Pn = ["checked"], En = {
1119
+ }, Ln = { class: "vpg-options-section" }, Pn = { class: "vpg-option-toggle" }, En = ["checked"], Nn = {
1120
1120
  key: 1,
1121
1121
  class: "vpg-watermark"
1122
- }, Nn = /* @__PURE__ */ Qe({
1122
+ }, Bn = /* @__PURE__ */ Qe({
1123
1123
  __name: "PivotConfig",
1124
1124
  props: {
1125
1125
  availableFields: {},
@@ -1131,7 +1131,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1131
1131
  },
1132
1132
  emits: ["update:showRowTotals", "update:showColumnTotals", "clearConfig", "autoSuggest", "dragStart", "dragEnd", "updateAggregation", "addRowField", "removeRowField", "addColumnField", "removeColumnField", "addValueField", "removeValueField"],
1133
1133
  setup(t, { emit: a }) {
1134
- const n = t, l = a, { isPro: v, showWatermark: m } = Ie(), y = [
1134
+ const n = t, l = a, { isPro: c, showWatermark: m } = Ie(), y = [
1135
1135
  { value: "sum", label: "Sum", symbol: "Σ" },
1136
1136
  { value: "count", label: "Count", symbol: "#" },
1137
1137
  { value: "avg", label: "Avg", symbol: "x̄" },
@@ -1139,7 +1139,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1139
1139
  { value: "max", label: "Max", symbol: "↑" },
1140
1140
  { value: "countDistinct", label: "Unique", symbol: "◇" }
1141
1141
  ];
1142
- function c(f) {
1142
+ function v(f) {
1143
1143
  var s;
1144
1144
  return ((s = y.find((d) => d.value === f)) == null ? void 0 : s.symbol) || "Σ";
1145
1145
  }
@@ -1155,7 +1155,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1155
1155
  return n.availableFields.filter(
1156
1156
  (F) => !f.has(F.field) && !s.has(F.field) && !d.has(F.field)
1157
1157
  );
1158
- }), D = T(() => b.value.length), $ = M(""), U = T(() => {
1158
+ }), D = T(() => b.value.length), $ = x(""), U = T(() => {
1159
1159
  if (!$.value.trim())
1160
1160
  return C.value;
1161
1161
  const f = $.value.toLowerCase().trim();
@@ -1189,8 +1189,8 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1189
1189
  function B(f, s, d) {
1190
1190
  s === "row" ? l("removeRowField", f) : s === "column" ? l("removeColumnField", f) : d && l("removeValueField", f, d.aggregation);
1191
1191
  }
1192
- return (f, s) => (r(), u("div", rn, [
1193
- e("div", un, [
1192
+ return (f, s) => (r(), u("div", un, [
1193
+ e("div", cn, [
1194
1194
  s[7] || (s[7] = e("h3", { class: "vpg-config-title" }, [
1195
1195
  e("svg", {
1196
1196
  class: "vpg-icon",
@@ -1230,9 +1230,9 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1230
1230
  ])])) : A("", !0)
1231
1231
  ])
1232
1232
  ]),
1233
- D.value > 0 ? (r(), u("div", cn, [
1233
+ D.value > 0 ? (r(), u("div", dn, [
1234
1234
  s[9] || (s[9] = e("div", { class: "vpg-section-label" }, "Active", -1)),
1235
- e("div", dn, [
1235
+ e("div", gn, [
1236
1236
  (r(!0), u(W, null, J(b.value, (d) => {
1237
1237
  var F;
1238
1238
  return r(), u("div", {
@@ -1243,13 +1243,13 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1243
1243
  onDragstart: (g) => H(d.field, g),
1244
1244
  onDragend: O
1245
1245
  }, [
1246
- e("div", pn, [
1246
+ e("div", fn, [
1247
1247
  e("span", {
1248
1248
  class: q(["vpg-item-badge", d.assignedTo])
1249
- }, R(d.assignedTo === "row" ? "R" : d.assignedTo === "column" ? "C" : c(((F = d.valueConfig) == null ? void 0 : F.aggregation) || "sum")), 3),
1250
- e("span", fn, R(d.field), 1)
1249
+ }, R(d.assignedTo === "row" ? "R" : d.assignedTo === "column" ? "C" : v(((F = d.valueConfig) == null ? void 0 : F.aggregation) || "sum")), 3),
1250
+ e("span", mn, R(d.field), 1)
1251
1251
  ]),
1252
- e("div", mn, [
1252
+ e("div", hn, [
1253
1253
  d.assignedTo === "row" || d.assignedTo === "column" ? (r(), u("button", {
1254
1254
  key: 0,
1255
1255
  class: "vpg-toggle-btn",
@@ -1269,7 +1269,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1269
1269
  d: "M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"
1270
1270
  })
1271
1271
  ], -1)
1272
- ])], 8, hn)) : A("", !0),
1272
+ ])], 8, wn)) : A("", !0),
1273
1273
  d.assignedTo === "value" && d.valueConfig ? (r(), u("select", {
1274
1274
  key: 1,
1275
1275
  class: "vpg-agg-select",
@@ -1281,26 +1281,26 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1281
1281
  (r(), u(W, null, J(y, (g) => e("option", {
1282
1282
  key: g.value,
1283
1283
  value: g.value
1284
- }, R(g.symbol) + " " + R(g.label), 9, kn)), 64))
1285
- ], 40, wn)) : A("", !0),
1284
+ }, R(g.symbol) + " " + R(g.label), 9, Cn)), 64))
1285
+ ], 40, kn)) : A("", !0),
1286
1286
  e("button", {
1287
1287
  class: "vpg-remove-btn",
1288
1288
  title: "Remove",
1289
1289
  onClick: Ke((g) => B(d.field, d.assignedTo, d.valueConfig), ["stop"])
1290
- }, " × ", 8, Cn)
1290
+ }, " × ", 8, yn)
1291
1291
  ])
1292
- ], 42, gn);
1292
+ ], 42, pn);
1293
1293
  }), 128))
1294
1294
  ])
1295
1295
  ])) : A("", !0),
1296
- e("div", yn, [
1297
- e("div", bn, [
1298
- e("div", Fn, [
1296
+ e("div", bn, [
1297
+ e("div", Fn, [
1298
+ e("div", Sn, [
1299
1299
  s[10] || (s[10] = I(" Available ", -1)),
1300
- e("span", Sn, R(C.value.length), 1)
1300
+ e("span", Rn, R(C.value.length), 1)
1301
1301
  ])
1302
1302
  ]),
1303
- e("div", Rn, [
1303
+ e("div", $n, [
1304
1304
  s[12] || (s[12] = e("svg", {
1305
1305
  class: "vpg-search-icon",
1306
1306
  fill: "none",
@@ -1342,7 +1342,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1342
1342
  ], -1)
1343
1343
  ])])) : A("", !0)
1344
1344
  ]),
1345
- e("div", $n, [
1345
+ e("div", xn, [
1346
1346
  (r(!0), u(W, null, J(U.value, (d) => (r(), u("div", {
1347
1347
  key: d.field,
1348
1348
  class: q(["vpg-field-item", { "vpg-is-numeric": d.isNumeric }]),
@@ -1354,20 +1354,20 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1354
1354
  e("span", {
1355
1355
  class: "vpg-field-type-icon",
1356
1356
  title: d.type
1357
- }, R(V(d.type)), 9, xn),
1358
- e("span", Tn, R(d.field), 1),
1359
- e("span", Dn, R(d.uniqueCount), 1)
1357
+ }, R(V(d.type)), 9, Tn),
1358
+ e("span", Dn, R(d.field), 1),
1359
+ e("span", Vn, R(d.uniqueCount), 1)
1360
1360
  ], 42, Mn))), 128)),
1361
- U.value.length === 0 && $.value ? (r(), u("div", Vn, ' No fields match "' + R($.value) + '" ', 1)) : C.value.length === 0 ? (r(), u("div", An, " All fields assigned ")) : A("", !0)
1361
+ U.value.length === 0 && $.value ? (r(), u("div", An, ' No fields match "' + R($.value) + '" ', 1)) : C.value.length === 0 ? (r(), u("div", zn, " All fields assigned ")) : A("", !0)
1362
1362
  ])
1363
1363
  ]),
1364
- e("div", zn, [
1365
- e("label", Ln, [
1364
+ e("div", Ln, [
1365
+ e("label", Pn, [
1366
1366
  e("input", {
1367
1367
  type: "checkbox",
1368
1368
  checked: t.showRowTotals,
1369
1369
  onChange: s[4] || (s[4] = (d) => l("update:showRowTotals", d.target.checked))
1370
- }, null, 40, Pn),
1370
+ }, null, 40, En),
1371
1371
  s[13] || (s[13] = e("span", null, "Totals", -1))
1372
1372
  ]),
1373
1373
  e("button", {
@@ -1390,7 +1390,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1390
1390
  I(" Auto ", -1)
1391
1391
  ])])
1392
1392
  ]),
1393
- S(m) ? (r(), u("div", En, [...s[15] || (s[15] = [
1393
+ S(m) ? (r(), u("div", Nn, [...s[15] || (s[15] = [
1394
1394
  e("a", {
1395
1395
  href: "https://tiny-pivot.com",
1396
1396
  target: "_blank",
@@ -1399,60 +1399,60 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1399
1399
  ])])) : A("", !0)
1400
1400
  ]));
1401
1401
  }
1402
- }), Bn = /* @__PURE__ */ et(Nn, [["__scopeId", "data-v-6663dd14"]]), jn = { class: "vpg-skeleton-header" }, Hn = { class: "vpg-header-right" }, Un = { class: "vpg-filter-text" }, Kn = {
1402
+ }), jn = /* @__PURE__ */ et(Bn, [["__scopeId", "data-v-6663dd14"]]), Hn = { class: "vpg-skeleton-header" }, Un = { class: "vpg-header-right" }, Kn = { class: "vpg-filter-text" }, Wn = {
1403
1403
  key: 0,
1404
1404
  class: "vpg-filter-count"
1405
- }, Wn = {
1405
+ }, _n = {
1406
1406
  key: 0,
1407
1407
  class: "vpg-filter-tooltip"
1408
- }, _n = { class: "vpg-tooltip-column" }, qn = { class: "vpg-tooltip-values" }, On = {
1408
+ }, qn = { class: "vpg-tooltip-column" }, On = { class: "vpg-tooltip-values" }, Gn = {
1409
1409
  key: 0,
1410
1410
  class: "vpg-tooltip-more"
1411
- }, Gn = {
1411
+ }, Xn = {
1412
1412
  key: 0,
1413
1413
  class: "vpg-tooltip-summary"
1414
- }, Xn = {
1414
+ }, Yn = {
1415
1415
  key: 1,
1416
1416
  class: "vpg-config-summary"
1417
- }, Yn = { class: "vpg-summary-badge vpg-rows" }, Zn = { class: "vpg-summary-badge vpg-cols" }, Jn = { class: "vpg-summary-badge vpg-vals" }, Qn = {
1417
+ }, Zn = { class: "vpg-summary-badge vpg-rows" }, Jn = { class: "vpg-summary-badge vpg-cols" }, Qn = { class: "vpg-summary-badge vpg-vals" }, In = {
1418
1418
  key: 2,
1419
1419
  class: "vpg-font-size-toggle"
1420
- }, In = ["onClick"], el = {
1420
+ }, el = ["onClick"], tl = {
1421
1421
  key: 0,
1422
1422
  class: "vpg-pro-required"
1423
- }, tl = { class: "vpg-config-bar" }, ol = { class: "vpg-zone-chips" }, nl = ["onDragstart", "onDragover", "onDrop"], ll = { class: "vpg-mini-name" }, sl = ["onClick"], al = {
1423
+ }, ol = { class: "vpg-config-bar" }, nl = { class: "vpg-zone-chips" }, ll = ["onDragstart", "onDragover", "onDrop"], sl = { class: "vpg-mini-name" }, al = ["onClick"], il = {
1424
1424
  key: 0,
1425
1425
  class: "vpg-zone-hint"
1426
- }, il = { class: "vpg-zone-chips" }, rl = ["onDragstart", "onDragover", "onDrop"], ul = { class: "vpg-mini-name" }, vl = ["onClick"], cl = {
1426
+ }, rl = { class: "vpg-zone-chips" }, ul = ["onDragstart", "onDragover", "onDrop"], cl = { class: "vpg-mini-name" }, vl = ["onClick"], dl = {
1427
1427
  key: 0,
1428
1428
  class: "vpg-zone-hint"
1429
- }, dl = { class: "vpg-zone-chips" }, gl = { class: "vpg-agg-symbol" }, pl = { class: "vpg-mini-name" }, fl = ["onClick"], ml = {
1429
+ }, gl = { class: "vpg-zone-chips" }, pl = { class: "vpg-agg-symbol" }, fl = { class: "vpg-mini-name" }, ml = ["onClick"], hl = {
1430
1430
  key: 0,
1431
1431
  class: "vpg-zone-hint"
1432
- }, hl = {
1432
+ }, wl = {
1433
1433
  key: 0,
1434
1434
  class: "vpg-placeholder"
1435
- }, wl = { class: "vpg-placeholder-content" }, kl = { class: "vpg-placeholder-text" }, Cl = {
1435
+ }, kl = { class: "vpg-placeholder-content" }, Cl = { class: "vpg-placeholder-text" }, yl = {
1436
1436
  key: 1,
1437
1437
  class: "vpg-table-container"
1438
- }, yl = { class: "vpg-pivot-table" }, bl = ["rowspan"], Fl = { class: "vpg-header-content" }, Sl = ["colspan", "onClick"], Rl = { class: "vpg-header-content" }, $l = ["rowspan"], Ml = ["onClick"], xl = {
1438
+ }, bl = { class: "vpg-pivot-table" }, Fl = ["rowspan"], Sl = { class: "vpg-header-content" }, Rl = ["colspan", "onClick"], $l = { class: "vpg-header-content" }, xl = ["rowspan"], Ml = ["onClick"], Tl = {
1439
1439
  key: 0,
1440
1440
  class: "vpg-data-cell vpg-total-cell"
1441
- }, Tl = {
1441
+ }, Dl = {
1442
1442
  key: 0,
1443
1443
  class: "vpg-totals-row"
1444
- }, Dl = {
1444
+ }, Vl = {
1445
1445
  key: 0,
1446
1446
  class: "vpg-data-cell vpg-grand-total-cell"
1447
- }, Vl = {
1447
+ }, Al = {
1448
1448
  key: 2,
1449
1449
  class: "vpg-skeleton-footer"
1450
- }, Al = {
1450
+ }, zl = {
1451
1451
  key: 1,
1452
1452
  href: "https://tiny-pivot.com",
1453
1453
  target: "_blank",
1454
1454
  rel: "noopener"
1455
- }, zl = /* @__PURE__ */ Qe({
1455
+ }, Ll = /* @__PURE__ */ Qe({
1456
1456
  __name: "PivotSkeleton",
1457
1457
  props: {
1458
1458
  rowFields: {},
@@ -1468,7 +1468,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1468
1468
  },
1469
1469
  emits: ["addRowField", "removeRowField", "addColumnField", "removeColumnField", "addValueField", "removeValueField", "updateAggregation", "reorderRowFields", "reorderColumnFields"],
1470
1470
  setup(t, { emit: a }) {
1471
- const n = t, l = a, { showWatermark: v, canUsePivot: m, isDemo: y } = Ie(), c = M(null), b = M(null), C = M(null), D = {
1471
+ const n = t, l = a, { showWatermark: c, canUsePivot: m, isDemo: y } = Ie(), v = x(null), b = x(null), C = x(null), D = {
1472
1472
  sum: "Sum",
1473
1473
  count: "Count",
1474
1474
  avg: "Average",
@@ -1489,7 +1489,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1489
1489
  countDistinct: "◇"
1490
1490
  }[E] || "Σ";
1491
1491
  }
1492
- const V = M(n.fontSize || "xs"), H = [
1492
+ const V = x(n.fontSize || "xs"), H = [
1493
1493
  { value: "xs", label: "S" },
1494
1494
  { value: "sm", label: "M" },
1495
1495
  { value: "base", label: "L" }
@@ -1500,7 +1500,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1500
1500
  values: P,
1501
1501
  remaining: k > 0 ? k : 0
1502
1502
  };
1503
- })), B = M(!1), f = M("asc"), s = M("row");
1503
+ })), B = x(!1), f = x("asc"), s = x("row");
1504
1504
  function d(E = "row") {
1505
1505
  s.value === E ? f.value = f.value === "asc" ? "desc" : "asc" : (s.value = E, f.value = "asc");
1506
1506
  }
@@ -1509,10 +1509,10 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1509
1509
  return [];
1510
1510
  const E = n.pivotResult.rowHeaders.map((k, z) => z), p = n.pivotResult.rowHeaders, P = n.pivotResult.data;
1511
1511
  return E.sort((k, z) => {
1512
- var G, Me, Ee, Ne, Be, je;
1512
+ var G, xe, Ee, Ne, Be, je;
1513
1513
  let N;
1514
1514
  if (s.value === "row") {
1515
- const be = ((G = p[k]) == null ? void 0 : G.join(" / ")) || "", ke = ((Me = p[z]) == null ? void 0 : Me.join(" / ")) || "";
1515
+ const be = ((G = p[k]) == null ? void 0 : G.join(" / ")) || "", ke = ((xe = p[z]) == null ? void 0 : xe.join(" / ")) || "";
1516
1516
  N = be.localeCompare(ke, void 0, { numeric: !0, sensitivity: "base" });
1517
1517
  } else {
1518
1518
  const be = s.value, ke = ((Ne = (Ee = P[k]) == null ? void 0 : Ee[be]) == null ? void 0 : Ne.value) ?? null, He = ((je = (Be = P[z]) == null ? void 0 : Be[be]) == null ? void 0 : je.value) ?? null;
@@ -1540,8 +1540,8 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1540
1540
  E.push(k);
1541
1541
  }
1542
1542
  return E;
1543
- }), w = M(null);
1544
- function x(E, p) {
1543
+ }), w = x(null);
1544
+ function M(E, p) {
1545
1545
  w.value = { row: E, col: p };
1546
1546
  }
1547
1547
  function L(E, p) {
@@ -1549,17 +1549,17 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1549
1549
  return ((P = w.value) == null ? void 0 : P.row) === E && ((k = w.value) == null ? void 0 : k.col) === p;
1550
1550
  }
1551
1551
  function ee(E, p) {
1552
- p.preventDefault(), p.dataTransfer.dropEffect = "move", c.value = E;
1552
+ p.preventDefault(), p.dataTransfer.dropEffect = "move", v.value = E;
1553
1553
  }
1554
1554
  function ie() {
1555
- c.value = null;
1555
+ v.value = null;
1556
1556
  }
1557
1557
  function me(E, p) {
1558
1558
  var z;
1559
1559
  p.preventDefault();
1560
1560
  const P = (z = p.dataTransfer) == null ? void 0 : z.getData("text/plain");
1561
1561
  if (!P || P.startsWith("reorder:")) {
1562
- c.value = null;
1562
+ v.value = null;
1563
1563
  return;
1564
1564
  }
1565
1565
  n.rowFields.includes(P) && l("removeRowField", P), n.columnFields.includes(P) && l("removeColumnField", P);
@@ -1575,11 +1575,11 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1575
1575
  l("addValueField", P, "sum");
1576
1576
  break;
1577
1577
  }
1578
- c.value = null;
1578
+ v.value = null;
1579
1579
  }
1580
1580
  function We(E, p, P) {
1581
1581
  b.value = { zone: E, index: p }, P.dataTransfer.effectAllowed = "move", P.dataTransfer.setData("text/plain", `reorder:${E}:${p}`), requestAnimationFrame(() => {
1582
- c.value = null;
1582
+ v.value = null;
1583
1583
  });
1584
1584
  }
1585
1585
  function ye() {
@@ -1610,7 +1610,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1610
1610
  var P, k;
1611
1611
  return ((P = C.value) == null ? void 0 : P.zone) === E && ((k = C.value) == null ? void 0 : k.index) === p;
1612
1612
  }
1613
- const Pe = M(180), we = M(80);
1613
+ const Pe = x(180), we = x(80);
1614
1614
  return (E, p) => {
1615
1615
  var P;
1616
1616
  return r(), u("div", {
@@ -1619,7 +1619,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1619
1619
  { "vpg-is-dragging": t.draggingField }
1620
1620
  ]])
1621
1621
  }, [
1622
- e("div", jn, [
1622
+ e("div", Hn, [
1623
1623
  p[12] || (p[12] = e("div", { class: "vpg-skeleton-title" }, [
1624
1624
  e("svg", {
1625
1625
  class: "vpg-icon",
@@ -1636,7 +1636,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1636
1636
  ]),
1637
1637
  e("span", null, "Pivot Table")
1638
1638
  ], -1)),
1639
- e("div", Hn, [
1639
+ e("div", Un, [
1640
1640
  O.value ? (r(), u("div", {
1641
1641
  key: 0,
1642
1642
  class: "vpg-filter-indicator",
@@ -1656,47 +1656,47 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1656
1656
  d: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"
1657
1657
  })
1658
1658
  ], -1)),
1659
- e("span", Un, [
1659
+ e("span", Kn, [
1660
1660
  p[9] || (p[9] = I(" Filtered: ", -1)),
1661
1661
  e("strong", null, R(_.value), 1),
1662
- t.filteredRowCount !== void 0 && t.totalRowCount !== void 0 ? (r(), u("span", Kn, " (" + R(t.filteredRowCount.toLocaleString()) + " of " + R(t.totalRowCount.toLocaleString()) + " rows) ", 1)) : A("", !0)
1662
+ t.filteredRowCount !== void 0 && t.totalRowCount !== void 0 ? (r(), u("span", Wn, " (" + R(t.filteredRowCount.toLocaleString()) + " of " + R(t.totalRowCount.toLocaleString()) + " rows) ", 1)) : A("", !0)
1663
1663
  ]),
1664
- B.value ? (r(), u("div", Wn, [
1664
+ B.value ? (r(), u("div", _n, [
1665
1665
  p[10] || (p[10] = e("div", { class: "vpg-tooltip-header" }, "Active Filters", -1)),
1666
1666
  (r(!0), u(W, null, J(X.value, (k) => (r(), u("div", {
1667
1667
  key: k.column,
1668
1668
  class: "vpg-tooltip-filter"
1669
1669
  }, [
1670
- e("div", _n, R(k.column), 1),
1671
- e("div", qn, [
1670
+ e("div", qn, R(k.column), 1),
1671
+ e("div", On, [
1672
1672
  (r(!0), u(W, null, J(k.values, (z, N) => (r(), u("span", {
1673
1673
  key: N,
1674
1674
  class: "vpg-tooltip-value"
1675
1675
  }, R(z), 1))), 128)),
1676
- k.remaining > 0 ? (r(), u("span", On, " +" + R(k.remaining) + " more ", 1)) : A("", !0)
1676
+ k.remaining > 0 ? (r(), u("span", Gn, " +" + R(k.remaining) + " more ", 1)) : A("", !0)
1677
1677
  ])
1678
1678
  ]))), 128)),
1679
- t.filteredRowCount !== void 0 && t.totalRowCount !== void 0 ? (r(), u("div", Gn, " Showing " + R(t.filteredRowCount.toLocaleString()) + " of " + R(t.totalRowCount.toLocaleString()) + " rows ", 1)) : A("", !0)
1679
+ t.filteredRowCount !== void 0 && t.totalRowCount !== void 0 ? (r(), u("div", Xn, " Showing " + R(t.filteredRowCount.toLocaleString()) + " of " + R(t.totalRowCount.toLocaleString()) + " rows ", 1)) : A("", !0)
1680
1680
  ])) : A("", !0)
1681
1681
  ], 32)) : A("", !0),
1682
- t.isConfigured ? (r(), u("div", Xn, [
1683
- e("span", Yn, R(t.rowFields.length) + " row" + R(t.rowFields.length !== 1 ? "s" : ""), 1),
1684
- e("span", Zn, R(t.columnFields.length) + " col" + R(t.columnFields.length !== 1 ? "s" : ""), 1),
1685
- e("span", Jn, R(t.valueFields.length) + " val" + R(t.valueFields.length !== 1 ? "s" : ""), 1)
1682
+ t.isConfigured ? (r(), u("div", Yn, [
1683
+ e("span", Zn, R(t.rowFields.length) + " row" + R(t.rowFields.length !== 1 ? "s" : ""), 1),
1684
+ e("span", Jn, R(t.columnFields.length) + " col" + R(t.columnFields.length !== 1 ? "s" : ""), 1),
1685
+ e("span", Qn, R(t.valueFields.length) + " val" + R(t.valueFields.length !== 1 ? "s" : ""), 1)
1686
1686
  ])) : A("", !0),
1687
- t.isConfigured && t.pivotResult ? (r(), u("div", Qn, [
1687
+ t.isConfigured && t.pivotResult ? (r(), u("div", In, [
1688
1688
  (r(), u(W, null, J(H, (k) => e("button", {
1689
1689
  key: k.value,
1690
1690
  class: q(["vpg-font-size-btn", { active: V.value === k.value }]),
1691
1691
  onClick: (z) => V.value = k.value
1692
- }, R(k.label), 11, In)), 64))
1692
+ }, R(k.label), 11, el)), 64))
1693
1693
  ])) : A("", !0)
1694
1694
  ])
1695
1695
  ]),
1696
1696
  S(m) ? (r(), u(W, { key: 1 }, [
1697
- e("div", tl, [
1697
+ e("div", ol, [
1698
1698
  e("div", {
1699
- class: q(["vpg-drop-zone vpg-row-zone", { "vpg-drag-over": c.value === "row" }]),
1699
+ class: q(["vpg-drop-zone vpg-row-zone", { "vpg-drag-over": v.value === "row" }]),
1700
1700
  onDragover: p[2] || (p[2] = (k) => ee("row", k)),
1701
1701
  onDragleave: ie,
1702
1702
  onDrop: p[3] || (p[3] = (k) => me("row", k))
@@ -1705,7 +1705,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1705
1705
  e("span", { class: "vpg-zone-icon vpg-row-icon" }, "↓"),
1706
1706
  e("span", { class: "vpg-zone-label" }, "Rows")
1707
1707
  ], -1)),
1708
- e("div", ol, [
1708
+ e("div", nl, [
1709
1709
  (r(!0), u(W, null, J(t.rowFields, (k, z) => (r(), u("div", {
1710
1710
  key: k,
1711
1711
  class: q(["vpg-mini-chip vpg-row-chip", {
@@ -1720,17 +1720,17 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1720
1720
  onDrop: (N) => ze("row", z, N)
1721
1721
  }, [
1722
1722
  p[14] || (p[14] = e("span", { class: "vpg-drag-handle" }, "⋮⋮", -1)),
1723
- e("span", ll, R(k), 1),
1723
+ e("span", sl, R(k), 1),
1724
1724
  e("button", {
1725
1725
  class: "vpg-mini-remove",
1726
1726
  onClick: Ke((N) => l("removeRowField", k), ["stop"])
1727
- }, "×", 8, sl)
1728
- ], 42, nl))), 128)),
1729
- t.rowFields.length === 0 ? (r(), u("span", al, "Drop here")) : A("", !0)
1727
+ }, "×", 8, al)
1728
+ ], 42, ll))), 128)),
1729
+ t.rowFields.length === 0 ? (r(), u("span", il, "Drop here")) : A("", !0)
1730
1730
  ])
1731
1731
  ], 34),
1732
1732
  e("div", {
1733
- class: q(["vpg-drop-zone vpg-column-zone", { "vpg-drag-over": c.value === "column" }]),
1733
+ class: q(["vpg-drop-zone vpg-column-zone", { "vpg-drag-over": v.value === "column" }]),
1734
1734
  onDragover: p[4] || (p[4] = (k) => ee("column", k)),
1735
1735
  onDragleave: ie,
1736
1736
  onDrop: p[5] || (p[5] = (k) => me("column", k))
@@ -1739,7 +1739,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1739
1739
  e("span", { class: "vpg-zone-icon vpg-column-icon" }, "→"),
1740
1740
  e("span", { class: "vpg-zone-label" }, "Columns")
1741
1741
  ], -1)),
1742
- e("div", il, [
1742
+ e("div", rl, [
1743
1743
  (r(!0), u(W, null, J(t.columnFields, (k, z) => (r(), u("div", {
1744
1744
  key: k,
1745
1745
  class: q(["vpg-mini-chip vpg-column-chip", {
@@ -1754,17 +1754,17 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1754
1754
  onDrop: (N) => ze("column", z, N)
1755
1755
  }, [
1756
1756
  p[16] || (p[16] = e("span", { class: "vpg-drag-handle" }, "⋮⋮", -1)),
1757
- e("span", ul, R(k), 1),
1757
+ e("span", cl, R(k), 1),
1758
1758
  e("button", {
1759
1759
  class: "vpg-mini-remove",
1760
1760
  onClick: Ke((N) => l("removeColumnField", k), ["stop"])
1761
1761
  }, "×", 8, vl)
1762
- ], 42, rl))), 128)),
1763
- t.columnFields.length === 0 ? (r(), u("span", cl, "Drop here")) : A("", !0)
1762
+ ], 42, ul))), 128)),
1763
+ t.columnFields.length === 0 ? (r(), u("span", dl, "Drop here")) : A("", !0)
1764
1764
  ])
1765
1765
  ], 34),
1766
1766
  e("div", {
1767
- class: q(["vpg-drop-zone vpg-value-zone", { "vpg-drag-over": c.value === "value" }]),
1767
+ class: q(["vpg-drop-zone vpg-value-zone", { "vpg-drag-over": v.value === "value" }]),
1768
1768
  onDragover: p[6] || (p[6] = (k) => ee("value", k)),
1769
1769
  onDragleave: ie,
1770
1770
  onDrop: p[7] || (p[7] = (k) => me("value", k))
@@ -1773,24 +1773,24 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1773
1773
  e("span", { class: "vpg-zone-icon vpg-value-icon" }, "Σ"),
1774
1774
  e("span", { class: "vpg-zone-label" }, "Values")
1775
1775
  ], -1)),
1776
- e("div", dl, [
1776
+ e("div", gl, [
1777
1777
  (r(!0), u(W, null, J(t.valueFields, (k) => (r(), u("div", {
1778
1778
  key: `${k.field}-${k.aggregation}`,
1779
1779
  class: "vpg-mini-chip vpg-value-chip"
1780
1780
  }, [
1781
- e("span", gl, R(U(k.aggregation)), 1),
1782
- e("span", pl, R(k.field), 1),
1781
+ e("span", pl, R(U(k.aggregation)), 1),
1782
+ e("span", fl, R(k.field), 1),
1783
1783
  e("button", {
1784
1784
  class: "vpg-mini-remove",
1785
1785
  onClick: (z) => l("removeValueField", k.field, k.aggregation)
1786
- }, "×", 8, fl)
1786
+ }, "×", 8, ml)
1787
1787
  ]))), 128)),
1788
- t.valueFields.length === 0 ? (r(), u("span", ml, "Drop numeric")) : A("", !0)
1788
+ t.valueFields.length === 0 ? (r(), u("span", hl, "Drop numeric")) : A("", !0)
1789
1789
  ])
1790
1790
  ], 34)
1791
1791
  ]),
1792
- !t.isConfigured || !t.pivotResult ? (r(), u("div", hl, [
1793
- e("div", wl, [
1792
+ !t.isConfigured || !t.pivotResult ? (r(), u("div", wl, [
1793
+ e("div", kl, [
1794
1794
  p[27] || (p[27] = e("svg", {
1795
1795
  class: "vpg-placeholder-icon",
1796
1796
  fill: "none",
@@ -1804,7 +1804,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1804
1804
  d: "M3 10h18M3 14h18m-9-4v8m-7 0h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"
1805
1805
  })
1806
1806
  ], -1)),
1807
- e("span", kl, [
1807
+ e("span", Cl, [
1808
1808
  t.valueFields.length === 0 ? (r(), u(W, { key: 0 }, [
1809
1809
  p[19] || (p[19] = I(" Add a ", -1)),
1810
1810
  p[20] || (p[20] = e("strong", null, "Values", -1)),
@@ -1820,8 +1820,8 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1820
1820
  ], 64))
1821
1821
  ])
1822
1822
  ])
1823
- ])) : (r(), u("div", Cl, [
1824
- e("table", yl, [
1823
+ ])) : (r(), u("div", yl, [
1824
+ e("table", bl, [
1825
1825
  e("thead", null, [
1826
1826
  (r(!0), u(W, null, J(g.value, (k, z) => (r(), u("tr", {
1827
1827
  key: `header-${z}`,
@@ -1831,36 +1831,36 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1831
1831
  key: 0,
1832
1832
  class: "vpg-row-header-label",
1833
1833
  rowspan: g.value.length,
1834
- style: ve({ width: `${Pe.value}px` }),
1834
+ style: ce({ width: `${Pe.value}px` }),
1835
1835
  onClick: p[8] || (p[8] = (N) => d("row"))
1836
1836
  }, [
1837
- e("div", Fl, [
1837
+ e("div", Sl, [
1838
1838
  e("span", null, R(t.rowFields.join(" / ") || "Rows"), 1),
1839
1839
  e("span", {
1840
1840
  class: q(["vpg-sort-indicator", { active: s.value === "row" }])
1841
1841
  }, R(s.value === "row" ? f.value === "asc" ? "↑" : "↓" : "⇅"), 3)
1842
1842
  ])
1843
- ], 12, bl)) : A("", !0),
1843
+ ], 12, Fl)) : A("", !0),
1844
1844
  (r(!0), u(W, null, J(k, (N, G) => (r(), u("th", {
1845
1845
  key: G,
1846
1846
  class: "vpg-column-header-cell",
1847
1847
  colspan: N.colspan,
1848
- style: ve({ width: `${we.value * N.colspan}px` }),
1849
- onClick: (Me) => z === g.value.length - 1 && d(G)
1848
+ style: ce({ width: `${we.value * N.colspan}px` }),
1849
+ onClick: (xe) => z === g.value.length - 1 && d(G)
1850
1850
  }, [
1851
- e("div", Rl, [
1851
+ e("div", $l, [
1852
1852
  e("span", null, R(N.label), 1),
1853
1853
  z === g.value.length - 1 ? (r(), u("span", {
1854
1854
  key: 0,
1855
1855
  class: q(["vpg-sort-indicator", { active: s.value === G }])
1856
1856
  }, R(s.value === G ? f.value === "asc" ? "↑" : "↓" : "⇅"), 3)) : A("", !0)
1857
1857
  ])
1858
- ], 12, Sl))), 128)),
1858
+ ], 12, Rl))), 128)),
1859
1859
  t.pivotResult.rowTotals.length > 0 && z === 0 ? (r(), u("th", {
1860
1860
  key: 1,
1861
1861
  class: "vpg-total-header",
1862
1862
  rowspan: g.value.length
1863
- }, " Total ", 8, $l)) : A("", !0)
1863
+ }, " Total ", 8, xl)) : A("", !0)
1864
1864
  ]))), 128))
1865
1865
  ]),
1866
1866
  e("tbody", null, [
@@ -1870,7 +1870,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1870
1870
  }, [
1871
1871
  e("th", {
1872
1872
  class: "vpg-row-header-cell",
1873
- style: ve({ width: `${Pe.value}px` })
1873
+ style: ce({ width: `${Pe.value}px` })
1874
1874
  }, [
1875
1875
  (r(!0), u(W, null, J(t.pivotResult.rowHeaders[k], (z, N) => (r(), u("span", {
1876
1876
  key: N,
@@ -1883,30 +1883,30 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1883
1883
  L(k, N) && "selected",
1884
1884
  z.value === null && "vpg-is-null"
1885
1885
  ]]),
1886
- style: ve({ width: `${we.value}px` }),
1887
- onClick: (G) => x(k, N)
1886
+ style: ce({ width: `${we.value}px` }),
1887
+ onClick: (G) => M(k, N)
1888
1888
  }, R(z.formattedValue), 15, Ml))), 128)),
1889
- t.pivotResult.rowTotals[k] ? (r(), u("td", xl, R(t.pivotResult.rowTotals[k].formattedValue), 1)) : A("", !0)
1889
+ t.pivotResult.rowTotals[k] ? (r(), u("td", Tl, R(t.pivotResult.rowTotals[k].formattedValue), 1)) : A("", !0)
1890
1890
  ]))), 128)),
1891
- t.pivotResult.columnTotals.length > 0 ? (r(), u("tr", Tl, [
1891
+ t.pivotResult.columnTotals.length > 0 ? (r(), u("tr", Dl, [
1892
1892
  e("th", {
1893
1893
  class: "vpg-row-header-cell vpg-total-label",
1894
- style: ve({ width: `${Pe.value}px` })
1894
+ style: ce({ width: `${Pe.value}px` })
1895
1895
  }, " Total ", 4),
1896
1896
  (r(!0), u(W, null, J(t.pivotResult.columnTotals, (k, z) => (r(), u("td", {
1897
1897
  key: z,
1898
1898
  class: "vpg-data-cell vpg-total-cell",
1899
- style: ve({ width: `${we.value}px` })
1899
+ style: ce({ width: `${we.value}px` })
1900
1900
  }, R(k.formattedValue), 5))), 128)),
1901
- t.pivotResult.rowTotals.length > 0 ? (r(), u("td", Dl, R(t.pivotResult.grandTotal.formattedValue), 1)) : A("", !0)
1901
+ t.pivotResult.rowTotals.length > 0 ? (r(), u("td", Vl, R(t.pivotResult.grandTotal.formattedValue), 1)) : A("", !0)
1902
1902
  ])) : A("", !0)
1903
1903
  ])
1904
1904
  ])
1905
1905
  ])),
1906
- t.isConfigured && t.pivotResult ? (r(), u("div", Vl, [
1906
+ t.isConfigured && t.pivotResult ? (r(), u("div", Al, [
1907
1907
  e("span", null, R(t.pivotResult.rowHeaders.length) + " rows × " + R(((P = t.pivotResult.data[0]) == null ? void 0 : P.length) || 0) + " columns", 1)
1908
1908
  ])) : A("", !0)
1909
- ], 64)) : (r(), u("div", el, [...p[13] || (p[13] = [
1909
+ ], 64)) : (r(), u("div", tl, [...p[13] || (p[13] = [
1910
1910
  e("div", { class: "vpg-pro-content" }, [
1911
1911
  e("svg", {
1912
1912
  class: "vpg-pro-icon",
@@ -1930,7 +1930,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1930
1930
  }, " Get Pro License → ")
1931
1931
  ], -1)
1932
1932
  ])])),
1933
- S(v) && S(m) ? (r(), u("div", {
1933
+ S(c) && S(m) ? (r(), u("div", {
1934
1934
  key: 2,
1935
1935
  class: q(["vpg-watermark", { "vpg-demo-mode": S(y) }])
1936
1936
  }, [
@@ -1943,82 +1943,82 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
1943
1943
  rel: "noopener",
1944
1944
  class: "vpg-get-pro"
1945
1945
  }, " Get Pro License → ", -1))
1946
- ], 64)) : (r(), u("a", Al, " Powered by TinyPivot "))
1946
+ ], 64)) : (r(), u("a", zl, " Powered by TinyPivot "))
1947
1947
  ], 2)) : A("", !0)
1948
1948
  ], 2);
1949
1949
  };
1950
1950
  }
1951
- }), Ll = /* @__PURE__ */ et(zl, [["__scopeId", "data-v-7229d321"]]), Pl = {
1951
+ }), Pl = /* @__PURE__ */ et(Ll, [["__scopeId", "data-v-7229d321"]]), El = {
1952
1952
  key: 0,
1953
1953
  class: "vpg-toast"
1954
- }, El = { class: "vpg-toolbar" }, Nl = { class: "vpg-toolbar-left" }, Bl = {
1954
+ }, Nl = { class: "vpg-toolbar" }, Bl = { class: "vpg-toolbar-left" }, jl = {
1955
1955
  key: 0,
1956
1956
  class: "vpg-view-toggle"
1957
- }, jl = {
1957
+ }, Hl = {
1958
1958
  key: 0,
1959
1959
  class: "vpg-search-container"
1960
- }, Hl = {
1960
+ }, Ul = {
1961
1961
  key: 1,
1962
1962
  class: "vpg-search-box"
1963
- }, Ul = { class: "vpg-font-size-control" }, Kl = { class: "vpg-font-size-toggle" }, Wl = ["onClick"], _l = {
1963
+ }, Kl = { class: "vpg-font-size-control" }, Wl = { class: "vpg-font-size-toggle" }, _l = ["onClick"], ql = {
1964
1964
  key: 1,
1965
1965
  class: "vpg-filter-info"
1966
- }, ql = {
1966
+ }, Ol = {
1967
1967
  key: 2,
1968
1968
  class: "vpg-search-info"
1969
- }, Ol = {
1969
+ }, Gl = {
1970
1970
  key: 0,
1971
1971
  class: "vpg-pivot-status"
1972
- }, Gl = { class: "vpg-toolbar-right" }, Xl = ["title"], Yl = {
1972
+ }, Xl = { class: "vpg-toolbar-right" }, Yl = ["title"], Zl = {
1973
1973
  key: 0,
1974
1974
  class: "vpg-loading"
1975
- }, Zl = {
1975
+ }, Jl = {
1976
1976
  key: 1,
1977
1977
  class: "vpg-empty"
1978
- }, Jl = {
1978
+ }, Ql = {
1979
1979
  key: 2,
1980
1980
  class: "vpg-empty"
1981
- }, Ql = {
1981
+ }, Il = {
1982
1982
  key: 3,
1983
1983
  class: "vpg-table-wrapper"
1984
- }, Il = ["onClick"], es = { class: "vpg-header-content" }, ts = { class: "vpg-header-text" }, os = { class: "vpg-header-icons" }, ns = {
1984
+ }, es = ["onClick"], ts = { class: "vpg-header-content" }, os = { class: "vpg-header-text" }, ns = { class: "vpg-header-icons" }, ls = {
1985
1985
  key: 0,
1986
1986
  class: "vpg-sort-indicator"
1987
- }, ls = {
1987
+ }, ss = {
1988
1988
  key: 0,
1989
1989
  class: "vpg-icon-sm",
1990
1990
  fill: "currentColor",
1991
1991
  viewBox: "0 0 20 20"
1992
- }, ss = {
1992
+ }, as = {
1993
1993
  key: 1,
1994
1994
  class: "vpg-icon-sm",
1995
1995
  fill: "currentColor",
1996
1996
  viewBox: "0 0 20 20"
1997
- }, as = {
1997
+ }, is = {
1998
1998
  key: 1,
1999
1999
  class: "vpg-filter-indicator"
2000
- }, is = ["onMousedown"], rs = ["data-row", "data-col", "onMousedown", "onMouseenter"], us = {
2000
+ }, rs = ["onMousedown"], us = ["data-row", "data-col", "onMousedown", "onMouseenter"], cs = {
2001
2001
  key: 1,
2002
2002
  class: "vpg-pivot-container"
2003
2003
  }, vs = {
2004
2004
  key: 0,
2005
2005
  class: "vpg-pivot-config-panel"
2006
- }, cs = { class: "vpg-footer" }, ds = { class: "vpg-footer-left" }, gs = {
2006
+ }, ds = { class: "vpg-footer" }, gs = { class: "vpg-footer-left" }, ps = {
2007
2007
  key: 0,
2008
2008
  class: "vpg-filtered-note"
2009
- }, ps = { key: 1 }, fs = { class: "vpg-filtered-count" }, ms = {
2009
+ }, fs = { key: 1 }, ms = { class: "vpg-filtered-count" }, hs = {
2010
2010
  key: 0,
2011
2011
  class: "vpg-pagination"
2012
- }, hs = ["disabled"], ws = ["disabled"], ks = { class: "vpg-page-info" }, Cs = ["disabled"], ys = ["disabled"], bs = {
2012
+ }, ws = ["disabled"], ks = ["disabled"], Cs = { class: "vpg-page-info" }, ys = ["disabled"], bs = ["disabled"], Fs = {
2013
2013
  key: 1,
2014
2014
  class: "vpg-selection-stats"
2015
- }, Fs = { class: "vpg-stat" }, Ss = { class: "vpg-stat-value" }, Rs = { class: "vpg-stat" }, $s = { class: "vpg-stat-value" }, Ms = { class: "vpg-stat" }, xs = { class: "vpg-stat-value" }, Ts = { class: "vpg-footer-right" }, Ds = {
2015
+ }, Ss = { class: "vpg-stat" }, Rs = { class: "vpg-stat-value" }, $s = { class: "vpg-stat" }, xs = { class: "vpg-stat-value" }, Ms = { class: "vpg-stat" }, Ts = { class: "vpg-stat-value" }, Ds = { class: "vpg-footer-right" }, Vs = {
2016
2016
  key: 0,
2017
2017
  class: "vpg-demo-banner"
2018
- }, Vs = {
2018
+ }, As = {
2019
2019
  key: 1,
2020
2020
  class: "vpg-watermark-inline"
2021
- }, Ce = 120, Mt = 350, As = /* @__PURE__ */ Qe({
2021
+ }, Ce = 120, xt = 350, zs = /* @__PURE__ */ Qe({
2022
2022
  __name: "DataGrid",
2023
2023
  props: {
2024
2024
  data: {},
@@ -2043,17 +2043,17 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2043
2043
  },
2044
2044
  emits: ["cellClick", "selectionChange", "export", "copy"],
2045
2045
  setup(t, { emit: a }) {
2046
- const n = t, l = a, { showWatermark: v, canUsePivot: m, isDemo: y } = Ie(), c = T(() => {
2046
+ const n = t, l = a, { showWatermark: c, canUsePivot: m, isDemo: y } = Ie(), v = T(() => {
2047
2047
  var i;
2048
2048
  return n.theme === "auto" ? (i = window.matchMedia) != null && i.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light" : n.theme;
2049
- }), b = M(n.fontSize), C = M(""), D = M(!1), $ = M(1), U = M(null), V = M(0), H = M(0), O = M(n.initialHeight), _ = M(!1), X = M(0), B = M(0), f = M(!1), s = M(""), d = [
2049
+ }), b = x(n.fontSize), C = x(""), D = x(!1), $ = x(1), U = x(null), V = x(0), H = x(0), O = x(n.initialHeight), _ = x(!1), X = x(0), B = x(0), f = x(!1), s = x(""), d = [
2050
2050
  { value: "xs", label: "S" },
2051
2051
  { value: "sm", label: "M" },
2052
2052
  { value: "base", label: "L" }
2053
2053
  ], F = T(() => n.data), {
2054
2054
  table: g,
2055
2055
  columnKeys: w,
2056
- filteredRowCount: x,
2056
+ filteredRowCount: M,
2057
2057
  totalRowCount: L,
2058
2058
  getColumnStats: ee,
2059
2059
  hasActiveFilter: ie,
@@ -2064,7 +2064,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2064
2064
  getSortDirection: re,
2065
2065
  columnFilters: ze,
2066
2066
  activeFilters: Le
2067
- } = _o({ data: F }), _e = T(() => g.getFilteredRowModel().rows.map((o) => o.original)), Pe = T(() => Le.value.length === 0 ? null : Le.value.map((i) => {
2067
+ } = qo({ data: F }), _e = T(() => g.getFilteredRowModel().rows.map((o) => o.original)), Pe = T(() => Le.value.length === 0 ? null : Le.value.map((i) => {
2068
2068
  var o;
2069
2069
  return {
2070
2070
  column: i.column,
@@ -2080,7 +2080,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2080
2080
  availableFields: z,
2081
2081
  isConfigured: N,
2082
2082
  pivotResult: G,
2083
- addRowField: Me,
2083
+ addRowField: xe,
2084
2084
  removeRowField: Ee,
2085
2085
  addColumnField: Ne,
2086
2086
  removeColumnField: Be,
@@ -2089,7 +2089,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2089
2089
  updateValueFieldAggregation: ke,
2090
2090
  clearConfig: He,
2091
2091
  autoSuggestConfig: zt
2092
- } = Oo(_e), qe = T(() => {
2092
+ } = Go(_e), qe = T(() => {
2093
2093
  if (!C.value.trim() || !n.enableSearch)
2094
2094
  return Fe.value;
2095
2095
  const i = C.value.toLowerCase().trim();
@@ -2101,7 +2101,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2101
2101
  }
2102
2102
  return !1;
2103
2103
  });
2104
- }), de = T(() => qe.value.length), xe = T(() => n.enablePagination ? Math.max(1, Math.ceil(de.value / n.pageSize)) : 1), ut = T(() => {
2104
+ }), de = T(() => qe.value.length), Me = T(() => n.enablePagination ? Math.max(1, Math.ceil(de.value / n.pageSize)) : 1), ut = T(() => {
2105
2105
  if (!n.enablePagination) return qe.value;
2106
2106
  const i = ($.value - 1) * n.pageSize, o = i + n.pageSize;
2107
2107
  return qe.value.slice(i, o);
@@ -2109,7 +2109,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2109
2109
  () => Math.min($.value * n.pageSize, de.value)
2110
2110
  );
2111
2111
  function Et() {
2112
- $.value < xe.value && $.value++;
2112
+ $.value < Me.value && $.value++;
2113
2113
  }
2114
2114
  function Nt() {
2115
2115
  $.value > 1 && $.value--;
@@ -2123,7 +2123,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2123
2123
  return;
2124
2124
  }
2125
2125
  const i = n.enableSearch && C.value.trim() ? qe.value.map((o) => o.original) : Fe.value.map((o) => o.original);
2126
- Go(i, w.value, {
2126
+ Xo(i, w.value, {
2127
2127
  filename: n.exportFilename,
2128
2128
  includeHeaders: !0
2129
2129
  }), l("export", { rowCount: i.length, filename: n.exportFilename });
@@ -2131,7 +2131,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2131
2131
  function jt() {
2132
2132
  if (!G.value) return;
2133
2133
  const i = n.exportFilename.replace(".csv", "-pivot.csv");
2134
- Xo(
2134
+ Yo(
2135
2135
  {
2136
2136
  headers: G.value.headers,
2137
2137
  rowHeaders: G.value.rowHeaders,
@@ -2151,18 +2151,18 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2151
2151
  l("export", { rowCount: o, filename: i });
2152
2152
  }
2153
2153
  function Ht(i, o) {
2154
- n.enableColumnResize && (o.preventDefault(), o.stopPropagation(), U.value = i, V.value = o.clientX, H.value = ge.value[i] || Ce, document.addEventListener("mousemove", vt), document.addEventListener("mouseup", ct));
2154
+ n.enableColumnResize && (o.preventDefault(), o.stopPropagation(), U.value = i, V.value = o.clientX, H.value = ge.value[i] || Ce, document.addEventListener("mousemove", ct), document.addEventListener("mouseup", vt));
2155
2155
  }
2156
- function vt(i) {
2156
+ function ct(i) {
2157
2157
  if (!U.value) return;
2158
- const o = i.clientX - V.value, h = Math.max(Ce, Math.min(Mt, H.value + o));
2158
+ const o = i.clientX - V.value, h = Math.max(Ce, Math.min(xt, H.value + o));
2159
2159
  ge.value = {
2160
2160
  ...ge.value,
2161
2161
  [U.value]: h
2162
2162
  };
2163
2163
  }
2164
- function ct() {
2165
- U.value = null, document.removeEventListener("mousemove", vt), document.removeEventListener("mouseup", ct);
2164
+ function vt() {
2165
+ U.value = null, document.removeEventListener("mousemove", ct), document.removeEventListener("mouseup", vt);
2166
2166
  }
2167
2167
  function Ut(i) {
2168
2168
  n.enableVerticalResize && (i.preventDefault(), _.value = !0, X.value = i.clientY, B.value = O.value, document.addEventListener("mousemove", dt), document.addEventListener("mouseup", gt));
@@ -2180,12 +2180,12 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2180
2180
  }
2181
2181
  function pt() {
2182
2182
  if (!ae.value || !n.enableClipboard) return;
2183
- const i = Zo(
2183
+ const i = Jo(
2184
2184
  Fe.value.map((o) => o.original),
2185
2185
  w.value,
2186
2186
  ae.value
2187
2187
  );
2188
- Yo(
2188
+ Zo(
2189
2189
  i,
2190
2190
  () => {
2191
2191
  const o = (ae.value.maxRow - ae.value.minRow + 1) * (ae.value.maxCol - ae.value.minCol + 1);
@@ -2200,7 +2200,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2200
2200
  }
2201
2201
  );
2202
2202
  }
2203
- const te = M("grid"), Te = M(!0), tt = M(null);
2203
+ const te = x("grid"), Te = x(!0), tt = x(null);
2204
2204
  function Kt(i) {
2205
2205
  tt.value = i;
2206
2206
  }
@@ -2213,7 +2213,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2213
2213
  function qt(i) {
2214
2214
  E.value = i;
2215
2215
  }
2216
- const ot = M(), ft = M(), Fe = T(() => g.getRowModel().rows), ne = M(null), Oe = M({ top: 0, left: 0, maxHeight: 400 }), ge = M({});
2216
+ const ot = x(), ft = x(), Fe = T(() => g.getRowModel().rows), ne = x(null), Oe = x({ top: 0, left: 0, maxHeight: 400 }), ge = x({});
2217
2217
  function mt() {
2218
2218
  if (n.data.length === 0)
2219
2219
  return;
@@ -2226,7 +2226,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2226
2226
  const Y = n.data[Z][K], oe = Y == null ? "" : String(Y), fe = j.measureText(oe).width + 28;
2227
2227
  Q = Math.max(Q, fe);
2228
2228
  }
2229
- i[K] = Math.min(Math.max(Q, Ce), Mt);
2229
+ i[K] = Math.min(Math.max(Q, Ce), xt);
2230
2230
  }
2231
2231
  ge.value = i;
2232
2232
  }
@@ -2254,7 +2254,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2254
2254
  h === null ? (he(i), o === "desc" && re(i) === "asc" && he(i)) : h !== o && he(i);
2255
2255
  }
2256
2256
  }
2257
- const Xe = T(() => ze.value.length), pe = M(null), ue = M(null), se = M(null), nt = M(!1);
2257
+ const Xe = T(() => ze.value.length), pe = x(null), ue = x(null), se = x(null), nt = x(!1);
2258
2258
  function Yt(i) {
2259
2259
  const o = Fe.value.length - 1;
2260
2260
  o < 0 || (ue.value = { row: 0, col: i }, se.value = { row: o, col: i }, pe.value = { row: 0, col: i });
@@ -2398,7 +2398,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2398
2398
  Ge();
2399
2399
  }
2400
2400
  }
2401
- xt(() => {
2401
+ Mt(() => {
2402
2402
  mt(), document.addEventListener("keydown", wt), document.addEventListener("mouseup", kt), Ue(() => {
2403
2403
  var i;
2404
2404
  (i = ot.value) == null || i.addEventListener("scroll", Ct, { passive: !0 });
@@ -2416,17 +2416,17 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2416
2416
  return (i, o) => (r(), u("div", {
2417
2417
  class: q(["vpg-data-grid", [
2418
2418
  `vpg-font-${b.value}`,
2419
- `vpg-theme-${c.value}`,
2419
+ `vpg-theme-${v.value}`,
2420
2420
  { "vpg-striped": t.stripedRows },
2421
2421
  { "vpg-resizing": U.value },
2422
2422
  { "vpg-resizing-vertical": _.value }
2423
2423
  ]]),
2424
- style: ve({ height: `${O.value}px` }),
2424
+ style: ce({ height: `${O.value}px` }),
2425
2425
  onClick: ao
2426
2426
  }, [
2427
2427
  Ye(ro, { name: "vpg-toast" }, {
2428
2428
  default: uo(() => [
2429
- f.value ? (r(), u("div", Pl, [
2429
+ f.value ? (r(), u("div", El, [
2430
2430
  o[15] || (o[15] = e("svg", {
2431
2431
  class: "vpg-icon",
2432
2432
  fill: "none",
@@ -2445,9 +2445,9 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2445
2445
  ]),
2446
2446
  _: 1
2447
2447
  }),
2448
- e("div", El, [
2449
- e("div", Nl, [
2450
- t.showPivot ? (r(), u("div", Bl, [
2448
+ e("div", Nl, [
2449
+ e("div", Bl, [
2450
+ t.showPivot ? (r(), u("div", jl, [
2451
2451
  e("button", {
2452
2452
  class: q(["vpg-view-btn", { active: te.value === "grid" }]),
2453
2453
  onClick: o[0] || (o[0] = (h) => te.value = "grid")
@@ -2488,8 +2488,8 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2488
2488
  ])], 2)
2489
2489
  ])) : A("", !0),
2490
2490
  te.value === "grid" ? (r(), u(W, { key: 1 }, [
2491
- t.enableSearch ? (r(), u("div", jl, [
2492
- D.value ? (r(), u("div", Hl, [
2491
+ t.enableSearch ? (r(), u("div", Hl, [
2492
+ D.value ? (r(), u("div", Ul, [
2493
2493
  o[20] || (o[20] = e("svg", {
2494
2494
  class: "vpg-search-icon",
2495
2495
  fill: "none",
@@ -2508,7 +2508,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2508
2508
  type: "text",
2509
2509
  class: "vpg-search-input",
2510
2510
  placeholder: "Search all columns...",
2511
- onKeydown: o[4] || (o[4] = vo((h) => {
2511
+ onKeydown: o[4] || (o[4] = co((h) => {
2512
2512
  D.value = !1, C.value = "";
2513
2513
  }, ["escape"]))
2514
2514
  }, null, 544), [
@@ -2554,17 +2554,17 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2554
2554
  ], -1)
2555
2555
  ])]))
2556
2556
  ])) : A("", !0),
2557
- e("div", Ul, [
2557
+ e("div", Kl, [
2558
2558
  o[21] || (o[21] = e("span", { class: "vpg-label" }, "Size:", -1)),
2559
- e("div", Kl, [
2559
+ e("div", Wl, [
2560
2560
  (r(), u(W, null, J(d, (h) => e("button", {
2561
2561
  key: h.value,
2562
2562
  class: q(["vpg-font-size-btn", { active: b.value === h.value }]),
2563
2563
  onClick: (j) => b.value = h.value
2564
- }, R(h.label), 11, Wl)), 64))
2564
+ }, R(h.label), 11, _l)), 64))
2565
2565
  ])
2566
2566
  ]),
2567
- Xe.value > 0 ? (r(), u("div", _l, [
2567
+ Xe.value > 0 ? (r(), u("div", ql, [
2568
2568
  o[22] || (o[22] = e("svg", {
2569
2569
  class: "vpg-icon",
2570
2570
  fill: "currentColor",
@@ -2578,7 +2578,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2578
2578
  ], -1)),
2579
2579
  e("span", null, R(Xe.value) + " filter" + R(Xe.value > 1 ? "s" : ""), 1)
2580
2580
  ])) : A("", !0),
2581
- C.value ? (r(), u("div", ql, [
2581
+ C.value ? (r(), u("div", Ol, [
2582
2582
  e("span", null, R(de.value) + " match" + R(de.value !== 1 ? "es" : ""), 1)
2583
2583
  ])) : A("", !0)
2584
2584
  ], 64)) : A("", !0),
@@ -2602,7 +2602,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2602
2602
  ], -1)),
2603
2603
  I(" " + R(Te.value ? "Hide" : "Show") + " Config ", 1)
2604
2604
  ], 2),
2605
- S(N) ? (r(), u("div", Ol, [...o[24] || (o[24] = [
2605
+ S(N) ? (r(), u("div", Gl, [...o[24] || (o[24] = [
2606
2606
  e("svg", {
2607
2607
  class: "vpg-icon",
2608
2608
  fill: "currentColor",
@@ -2618,7 +2618,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2618
2618
  ])])) : A("", !0)
2619
2619
  ], 64)) : A("", !0)
2620
2620
  ]),
2621
- e("div", Gl, [
2621
+ e("div", Xl, [
2622
2622
  te.value === "grid" && Xe.value > 0 ? (r(), u("button", {
2623
2623
  key: 0,
2624
2624
  class: "vpg-clear-filters",
@@ -2680,7 +2680,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2680
2680
  })
2681
2681
  ], -1)),
2682
2682
  I(" Export" + R(te.value === "pivot" ? " Pivot" : ""), 1)
2683
- ], 8, Xl)) : A("", !0)
2683
+ ], 8, Yl)) : A("", !0)
2684
2684
  ])
2685
2685
  ]),
2686
2686
  te.value === "grid" ? (r(), u("div", {
@@ -2690,10 +2690,10 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2690
2690
  class: "vpg-grid-container",
2691
2691
  tabindex: "0"
2692
2692
  }, [
2693
- t.loading ? (r(), u("div", Yl, [...o[28] || (o[28] = [
2693
+ t.loading ? (r(), u("div", Zl, [...o[28] || (o[28] = [
2694
2694
  e("div", { class: "vpg-spinner" }, null, -1),
2695
2695
  e("span", null, "Loading data...", -1)
2696
- ])])) : t.data.length === 0 ? (r(), u("div", Zl, [...o[29] || (o[29] = [
2696
+ ])])) : t.data.length === 0 ? (r(), u("div", Jl, [...o[29] || (o[29] = [
2697
2697
  e("div", { class: "vpg-empty-icon" }, [
2698
2698
  e("svg", {
2699
2699
  class: "vpg-icon-lg",
@@ -2710,7 +2710,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2710
2710
  ])
2711
2711
  ], -1),
2712
2712
  e("span", null, "No data available", -1)
2713
- ])])) : S(x) === 0 ? (r(), u("div", Jl, [
2713
+ ])])) : S(M) === 0 ? (r(), u("div", Ql, [
2714
2714
  o[30] || (o[30] = e("div", { class: "vpg-empty-icon vpg-warning" }, [
2715
2715
  e("svg", {
2716
2716
  class: "vpg-icon-lg",
@@ -2732,10 +2732,10 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2732
2732
  onClick: o[8] || (o[8] = //@ts-ignore
2733
2733
  (...h) => S(ye) && S(ye)(...h))
2734
2734
  }, " Clear all filters ")
2735
- ])) : (r(), u("div", Ql, [
2735
+ ])) : (r(), u("div", Il, [
2736
2736
  e("table", {
2737
2737
  class: "vpg-table",
2738
- style: ve({ minWidth: `${so.value}px` })
2738
+ style: ce({ minWidth: `${so.value}px` })
2739
2739
  }, [
2740
2740
  e("thead", null, [
2741
2741
  e("tr", null, [
@@ -2746,20 +2746,20 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2746
2746
  "vpg-is-sorted": S(re)(h) !== null,
2747
2747
  "vpg-is-active": ne.value === h
2748
2748
  }]),
2749
- style: ve({ width: `${ge.value[h] || Ce}px`, minWidth: `${ge.value[h] || Ce}px` }),
2749
+ style: ce({ width: `${ge.value[h] || Ce}px`, minWidth: `${ge.value[h] || Ce}px` }),
2750
2750
  onClick: (K) => Zt(j, K)
2751
2751
  }, [
2752
- e("div", es, [
2753
- e("span", ts, R(h), 1),
2754
- e("div", os, [
2755
- S(re)(h) ? (r(), u("span", ns, [
2756
- S(re)(h) === "asc" ? (r(), u("svg", ls, [...o[32] || (o[32] = [
2752
+ e("div", ts, [
2753
+ e("span", os, R(h), 1),
2754
+ e("div", ns, [
2755
+ S(re)(h) ? (r(), u("span", ls, [
2756
+ S(re)(h) === "asc" ? (r(), u("svg", ss, [...o[32] || (o[32] = [
2757
2757
  e("path", {
2758
2758
  "fill-rule": "evenodd",
2759
2759
  d: "M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",
2760
2760
  "clip-rule": "evenodd"
2761
2761
  }, null, -1)
2762
- ])])) : (r(), u("svg", ss, [...o[33] || (o[33] = [
2762
+ ])])) : (r(), u("svg", as, [...o[33] || (o[33] = [
2763
2763
  e("path", {
2764
2764
  "fill-rule": "evenodd",
2765
2765
  d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
@@ -2767,7 +2767,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2767
2767
  }, null, -1)
2768
2768
  ])]))
2769
2769
  ])) : A("", !0),
2770
- S(ie)(h) ? (r(), u("span", as, [...o[34] || (o[34] = [
2770
+ S(ie)(h) ? (r(), u("span", is, [...o[34] || (o[34] = [
2771
2771
  e("svg", {
2772
2772
  class: "vpg-icon-xs",
2773
2773
  fill: "currentColor",
@@ -2804,8 +2804,8 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2804
2804
  key: 0,
2805
2805
  class: "vpg-resize-handle",
2806
2806
  onMousedown: (K) => Ht(h, K)
2807
- }, null, 40, is)) : A("", !0)
2808
- ], 14, Il))), 128))
2807
+ }, null, 40, rs)) : A("", !0)
2808
+ ], 14, es))), 128))
2809
2809
  ])
2810
2810
  ]),
2811
2811
  e("tbody", {
@@ -2824,17 +2824,17 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2824
2824
  }]),
2825
2825
  "data-row": j,
2826
2826
  "data-col": Q,
2827
- style: ve({ width: `${ge.value[K] || Ce}px`, minWidth: `${ge.value[K] || Ce}px` }),
2827
+ style: ce({ width: `${ge.value[K] || Ce}px`, minWidth: `${ge.value[K] || Ce}px` }),
2828
2828
  onMousedown: (Z) => It(j, Q, Z),
2829
2829
  onMouseenter: (Z) => eo(j, Q)
2830
- }, R(lo(h.original[K], K)), 47, rs))), 128))
2830
+ }, R(lo(h.original[K], K)), 47, us))), 128))
2831
2831
  ]))), 128))
2832
2832
  ], 512)
2833
2833
  ], 4)
2834
2834
  ]))
2835
- ], 512)) : (r(), u("div", us, [
2835
+ ], 512)) : (r(), u("div", cs, [
2836
2836
  Te.value && S(m) ? (r(), u("div", vs, [
2837
- Ye(Bn, {
2837
+ Ye(jn, {
2838
2838
  "available-fields": S(z),
2839
2839
  "row-fields": S(we),
2840
2840
  "column-fields": S(E),
@@ -2848,7 +2848,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2848
2848
  onDragStart: Kt,
2849
2849
  onDragEnd: Wt,
2850
2850
  onUpdateAggregation: S(ke),
2851
- onAddRowField: S(Me),
2851
+ onAddRowField: S(xe),
2852
2852
  onRemoveRowField: S(Ee),
2853
2853
  onAddColumnField: S(Ne),
2854
2854
  onRemoveColumnField: S(Be),
@@ -2859,7 +2859,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2859
2859
  e("div", {
2860
2860
  class: q(["vpg-pivot-main", { "vpg-full-width": !Te.value }])
2861
2861
  }, [
2862
- Ye(Ll, {
2862
+ Ye(Pl, {
2863
2863
  "row-fields": S(we),
2864
2864
  "column-fields": S(E),
2865
2865
  "value-fields": S(p),
@@ -2869,8 +2869,8 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2869
2869
  "font-size": b.value,
2870
2870
  "active-filters": Pe.value,
2871
2871
  "total-row-count": S(L),
2872
- "filtered-row-count": S(x),
2873
- onAddRowField: S(Me),
2872
+ "filtered-row-count": S(M),
2873
+ onAddRowField: S(xe),
2874
2874
  onRemoveRowField: S(Ee),
2875
2875
  onAddColumnField: S(Ne),
2876
2876
  onRemoveColumnField: S(Be),
@@ -2882,16 +2882,16 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2882
2882
  }, null, 8, ["row-fields", "column-fields", "value-fields", "is-configured", "dragging-field", "pivot-result", "font-size", "active-filters", "total-row-count", "filtered-row-count", "onAddRowField", "onRemoveRowField", "onAddColumnField", "onRemoveColumnField", "onAddValueField", "onRemoveValueField", "onUpdateAggregation"])
2883
2883
  ], 2)
2884
2884
  ])),
2885
- e("div", cs, [
2886
- e("div", ds, [
2885
+ e("div", ds, [
2886
+ e("div", gs, [
2887
2887
  te.value === "grid" ? (r(), u(W, { key: 0 }, [
2888
2888
  t.enablePagination ? (r(), u(W, { key: 0 }, [
2889
2889
  e("span", null, R(Lt.value.toLocaleString()) + "-" + R(Pt.value.toLocaleString()), 1),
2890
2890
  o[36] || (o[36] = e("span", { class: "vpg-separator" }, "of", -1)),
2891
2891
  e("span", null, R(de.value.toLocaleString()), 1),
2892
- de.value !== S(L) ? (r(), u("span", gs, " (" + R(S(L).toLocaleString()) + " total) ", 1)) : A("", !0)
2893
- ], 64)) : S(x) === S(L) && de.value === S(L) ? (r(), u("span", ps, R(S(L).toLocaleString()) + " records", 1)) : (r(), u(W, { key: 2 }, [
2894
- e("span", fs, R(de.value.toLocaleString()), 1),
2892
+ de.value !== S(L) ? (r(), u("span", ps, " (" + R(S(L).toLocaleString()) + " total) ", 1)) : A("", !0)
2893
+ ], 64)) : S(M) === S(L) && de.value === S(L) ? (r(), u("span", fs, R(S(L).toLocaleString()) + " records", 1)) : (r(), u(W, { key: 2 }, [
2894
+ e("span", ms, R(de.value.toLocaleString()), 1),
2895
2895
  o[37] || (o[37] = e("span", { class: "vpg-separator" }, "of", -1)),
2896
2896
  e("span", null, R(S(L).toLocaleString()), 1),
2897
2897
  o[38] || (o[38] = e("span", { class: "vpg-separator" }, "records", -1))
@@ -2902,7 +2902,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2902
2902
  e("span", null, R(S(L).toLocaleString()) + " source records", 1)
2903
2903
  ], 64))
2904
2904
  ]),
2905
- t.enablePagination && te.value === "grid" && xe.value > 1 ? (r(), u("div", ms, [
2905
+ t.enablePagination && te.value === "grid" && Me.value > 1 ? (r(), u("div", hs, [
2906
2906
  e("button", {
2907
2907
  class: "vpg-page-btn",
2908
2908
  disabled: $.value === 1,
@@ -2921,7 +2921,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2921
2921
  d: "M11 19l-7-7 7-7m8 14l-7-7 7-7"
2922
2922
  })
2923
2923
  ], -1)
2924
- ])], 8, hs),
2924
+ ])], 8, ws),
2925
2925
  e("button", {
2926
2926
  class: "vpg-page-btn",
2927
2927
  disabled: $.value === 1,
@@ -2940,11 +2940,11 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2940
2940
  d: "M15 19l-7-7 7-7"
2941
2941
  })
2942
2942
  ], -1)
2943
- ])], 8, ws),
2944
- e("span", ks, " Page " + R($.value) + " of " + R(xe.value), 1),
2943
+ ])], 8, ks),
2944
+ e("span", Cs, " Page " + R($.value) + " of " + R(Me.value), 1),
2945
2945
  e("button", {
2946
2946
  class: "vpg-page-btn",
2947
- disabled: $.value === xe.value,
2947
+ disabled: $.value === Me.value,
2948
2948
  onClick: Et
2949
2949
  }, [...o[43] || (o[43] = [
2950
2950
  e("svg", {
@@ -2960,11 +2960,11 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2960
2960
  d: "M9 5l7 7-7 7"
2961
2961
  })
2962
2962
  ], -1)
2963
- ])], 8, Cs),
2963
+ ])], 8, ys),
2964
2964
  e("button", {
2965
2965
  class: "vpg-page-btn",
2966
- disabled: $.value === xe.value,
2967
- onClick: o[12] || (o[12] = (h) => $.value = xe.value)
2966
+ disabled: $.value === Me.value,
2967
+ onClick: o[12] || (o[12] = (h) => $.value = Me.value)
2968
2968
  }, [...o[44] || (o[44] = [
2969
2969
  e("svg", {
2970
2970
  class: "vpg-icon-sm",
@@ -2979,28 +2979,28 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
2979
2979
  d: "M13 5l7 7-7 7M5 5l7 7-7 7"
2980
2980
  })
2981
2981
  ], -1)
2982
- ])], 8, ys)
2982
+ ])], 8, bs)
2983
2983
  ])) : A("", !0),
2984
- te.value === "grid" && De.value && De.value.count > 1 ? (r(), u("div", bs, [
2985
- e("span", Fs, [
2984
+ te.value === "grid" && De.value && De.value.count > 1 ? (r(), u("div", Fs, [
2985
+ e("span", Ss, [
2986
2986
  o[45] || (o[45] = e("span", { class: "vpg-stat-label" }, "Count:", -1)),
2987
- e("span", Ss, R(De.value.count), 1)
2987
+ e("span", Rs, R(De.value.count), 1)
2988
2988
  ]),
2989
2989
  De.value.numericCount > 0 ? (r(), u(W, { key: 0 }, [
2990
2990
  o[48] || (o[48] = e("span", { class: "vpg-stat-divider" }, "|", -1)),
2991
- e("span", Rs, [
2991
+ e("span", $s, [
2992
2992
  o[46] || (o[46] = e("span", { class: "vpg-stat-label" }, "Sum:", -1)),
2993
- e("span", $s, R(ht(De.value.sum)), 1)
2993
+ e("span", xs, R(ht(De.value.sum)), 1)
2994
2994
  ]),
2995
2995
  o[49] || (o[49] = e("span", { class: "vpg-stat-divider" }, "|", -1)),
2996
2996
  e("span", Ms, [
2997
2997
  o[47] || (o[47] = e("span", { class: "vpg-stat-label" }, "Avg:", -1)),
2998
- e("span", xs, R(ht(De.value.avg)), 1)
2998
+ e("span", Ts, R(ht(De.value.avg)), 1)
2999
2999
  ])
3000
3000
  ], 64)) : A("", !0)
3001
3001
  ])) : A("", !0),
3002
- e("div", Ts, [
3003
- S(y) ? (r(), u("div", Ds, [...o[50] || (o[50] = [
3002
+ e("div", Ds, [
3003
+ S(y) ? (r(), u("div", Vs, [...o[50] || (o[50] = [
3004
3004
  e("span", { class: "vpg-demo-badge" }, "DEMO", -1),
3005
3005
  e("span", null, "Pro features enabled", -1),
3006
3006
  e("a", {
@@ -3008,12 +3008,8 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
3008
3008
  target: "_blank",
3009
3009
  rel: "noopener"
3010
3010
  }, "Get License →", -1)
3011
- ])])) : S(v) ? (r(), u("span", Vs, [...o[51] || (o[51] = [
3012
- e("a", {
3013
- href: "https://tiny-pivot.com",
3014
- target: "_blank",
3015
- rel: "noopener"
3016
- }, "TinyPivot", -1)
3011
+ ])])) : S(c) ? (r(), u("span", As, [...o[51] || (o[51] = [
3012
+ vo('<a href="https://tiny-pivot.com" target="_blank" rel="noopener" data-v-f68a4c06><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-f68a4c06><rect x="3" y="3" width="7" height="7" data-v-f68a4c06></rect><rect x="14" y="3" width="7" height="7" data-v-f68a4c06></rect><rect x="14" y="14" width="7" height="7" data-v-f68a4c06></rect><rect x="3" y="14" width="7" height="7" data-v-f68a4c06></rect></svg> Powered by TinyPivot </a>', 1)
3017
3013
  ])])) : A("", !0)
3018
3014
  ])
3019
3015
  ]),
@@ -3028,11 +3024,11 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
3028
3024
  e("span")
3029
3025
  ], -1)
3030
3026
  ])], 32)) : A("", !0),
3031
- (r(), io(co, { to: "body" }, [
3027
+ (r(), io(go, { to: "body" }, [
3032
3028
  ne.value ? (r(), u("div", {
3033
3029
  key: 0,
3034
3030
  class: "vpg-filter-portal",
3035
- style: ve({
3031
+ style: ce({
3036
3032
  position: "fixed",
3037
3033
  top: `${Oe.value.top}px`,
3038
3034
  left: `${Oe.value.left}px`,
@@ -3040,7 +3036,7 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
3040
3036
  zIndex: 9999
3041
3037
  })
3042
3038
  }, [
3043
- Ye(an, {
3039
+ Ye(rn, {
3044
3040
  "column-id": ne.value,
3045
3041
  "column-name": ne.value,
3046
3042
  stats: S(ee)(ne.value),
@@ -3054,28 +3050,28 @@ const Jo = { class: "vpg-filter-header" }, Qo = { class: "vpg-filter-title" }, I
3054
3050
  ]))
3055
3051
  ], 6));
3056
3052
  }
3057
- }), Ks = /* @__PURE__ */ et(As, [["__scopeId", "data-v-cb5593bb"]]);
3053
+ }), Ws = /* @__PURE__ */ et(zs, [["__scopeId", "data-v-f68a4c06"]]);
3058
3054
  export {
3059
- an as ColumnFilter,
3060
- Ks as DataGrid,
3061
- Bn as PivotConfig,
3062
- Ll as PivotSkeleton,
3063
- Ns as configureLicenseSecret,
3064
- Yo as copyToClipboard,
3065
- Es as enableDemoMode,
3066
- Xo as exportPivotToCSV,
3067
- Go as exportToCSV,
3068
- Co as formatCellValue,
3069
- Zo as formatSelectionForClipboard,
3055
+ rn as ColumnFilter,
3056
+ Ws as DataGrid,
3057
+ jn as PivotConfig,
3058
+ Pl as PivotSkeleton,
3059
+ Bs as configureLicenseSecret,
3060
+ Zo as copyToClipboard,
3061
+ Ns as enableDemoMode,
3062
+ Yo as exportPivotToCSV,
3063
+ Xo as exportToCSV,
3064
+ yo as formatCellValue,
3065
+ Jo as formatSelectionForClipboard,
3070
3066
  Rt as getAggregationLabel,
3071
- ko as getColumnUniqueValues,
3072
- Ps as setLicenseKey,
3073
- Us as useColumnResize,
3074
- _o as useExcelGrid,
3075
- js as useGlobalSearch,
3067
+ Co as getColumnUniqueValues,
3068
+ Es as setLicenseKey,
3069
+ Ks as useColumnResize,
3070
+ qo as useExcelGrid,
3071
+ Hs as useGlobalSearch,
3076
3072
  Ie as useLicense,
3077
- Bs as usePagination,
3078
- Oo as usePivotTable,
3079
- Hs as useRowSelection
3073
+ js as usePagination,
3074
+ Go as usePivotTable,
3075
+ Us as useRowSelection
3080
3076
  };
3081
3077
  //# sourceMappingURL=tinypivot-vue.js.map