@martinomagnifico/tablechart 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/README.md +7 -6
- package/dist/tablechart-additional-types.js +1 -1
- package/dist/tablechart-additional-types.mjs +142 -76
- package/dist/tablechart-core.d.mts +2 -2
- package/dist/tablechart-core.mjs +1 -1
- package/dist/tablechart-shared.d.mts +51 -21
- package/dist/tablechart-shared.mjs +1504 -1005
- package/dist/tablechart-summary.d.mts +35 -0
- package/dist/tablechart-summary.js +1 -0
- package/dist/tablechart-summary.mjs +269 -0
- package/dist/tablechart.css +1 -1
- package/dist/tablechart.d.mts +1 -1
- package/dist/tablechart.js +1 -1
- package/dist/tablechart.mjs +1 -1
- package/package.json +19 -4
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** The words that `{trend}`, `{change}` and `{side}` become. */
|
|
2
|
+
export interface SummaryWords {
|
|
3
|
+
up: string;
|
|
4
|
+
down: string;
|
|
5
|
+
flat: string;
|
|
6
|
+
unclear: string;
|
|
7
|
+
above: string;
|
|
8
|
+
below: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SummaryConfig {
|
|
11
|
+
/** The charts that may have a summary. */
|
|
12
|
+
selector: string;
|
|
13
|
+
/** Around a placeholder, such as `{highest.value}`. A template engine that uses single braces needs others, such as `["[[", "]]"]`. */
|
|
14
|
+
delimiters: [string, string];
|
|
15
|
+
/** The attribute for translation keys, as in Tablechart. A name in a sentence keeps its key. */
|
|
16
|
+
langattribute: string | false;
|
|
17
|
+
/** Locale for numbers and lists. Unset, the language of the page is used and followed when it changes. */
|
|
18
|
+
locale?: string;
|
|
19
|
+
/** A trend or a change of less than this percentage is flat. */
|
|
20
|
+
flat: number;
|
|
21
|
+
/** A value more than this percentage away from the trend is an outlier. */
|
|
22
|
+
outliers: number;
|
|
23
|
+
/** For `{trend}`, `{change}` and `{side}`. A sentence per outcome, with `data-when`, translates better. */
|
|
24
|
+
words: SummaryWords;
|
|
25
|
+
}
|
|
26
|
+
export declare const summaryDefaults: SummaryConfig;
|
|
27
|
+
/** Fills the sentences of one chart again, from its table as it is now. */
|
|
28
|
+
export declare const fill: (figure: HTMLElement, options?: Partial<SummaryConfig>) => void;
|
|
29
|
+
/** Fills the summary of every chart now, again when its table is ready or changes, and when a translation changes a sentence or the language. */
|
|
30
|
+
export declare const init: (options?: Partial<SummaryConfig>) => void;
|
|
31
|
+
export declare const Summary: {
|
|
32
|
+
init: (options?: Partial<SummaryConfig>) => void;
|
|
33
|
+
fill: (figure: HTMLElement, options?: Partial<SummaryConfig>) => void;
|
|
34
|
+
defaults: SummaryConfig;
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e){var t=e=>{const t=e.length,n=e.reduce((e,t)=>e+t.x,0)/t,a=e.reduce((e,t)=>e+t.y,0)/t,r=e.reduce((e,t)=>e+(t.x-n)**2,0),o=r?e.reduce((e,t)=>e+(t.x-n)*(t.y-a),0)/r:0,s=e=>a+o*(e-n),c=t>2?Math.sqrt(e.reduce((e,t)=>e+(t.y-s(t.x))**2,0)/(t-2)):0,l=r?c/Math.sqrt(r):0;return{at:s,spread:c,t:l?o/l:o?Number.POSITIVE_INFINITY:0,n:t}},n=[12.71,4.3,3.18,2.78,2.57,2.45,2.36,2.31,2.26,2.23,2.2,2.18,2.16,2.14,2.13],a=e=>{const t=e.map(e=>e.y),n=Math.min(...t),a=Math.max(...t),r=n<0&&a>0,o=a-n||1;return{mean:t.reduce((e,t)=>e+t,0)/t.length,share:(e,t)=>e/(r?o:Math.abs(t)||o)*100}},r={selector:"[data-chart]:not(th)",delimiters:["{","}"],langattribute:"data-i18n",flat:5,outliers:25,words:{up:"up",down:"down",flat:"flat",unclear:"unclear",above:"above",below:"below"}},o="chart-summary",s="data-summary-template",c="data-summary-text",l=["line","area"],u=["extremes","range","change","trend","outliers","notes"],i=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),d=0,f=new Set,h=t=>{f.has(t)||(f.add(t),console.warn(`[${e.LIBRARY_NAME}] ${t}`))},m=(r,o,s,c)=>{const u=(0,e.readTable)(r,s.langattribute).filter(e=>!e.isTotal),i=(0,e.readSeries)(r,u,s.langattribute)[o],d=(e,t)=>{if(!t||!s.langattribute)return e;const n=document.createElement("span");return n.setAttribute(s.langattribute,t),n.textContent=e,n},f=Math.max(0,...u.map(t=>(0,e.decimalsIn)(t.cells[o]?.number??""))),h=(t,n,a=f)=>{const[r,o]=(0,e.splitSign)(t,a,c);return n.prefix+r+o+n.suffix},m=e=>new Intl.NumberFormat(c,{style:"percent",maximumFractionDigits:Math.abs(e)<10?1:0}).format(e/100),g=e=>d(e.label,e.key),w=r.querySelector(":scope > figcaption"),b=w?.querySelector("b, strong")??w,p={values:{title:d((b?.textContent??"").trim(),s.langattribute&&b?.getAttribute(s.langattribute)||null),rows:(0,e.splitSign)(u.length,0,c).join(""),series:i?d(i.name,i.key):""},counts:{rows:u.length}},v=u.filter(e=>e.note),M=v.length?{values:{"notes.count":(0,e.splitSign)(v.length,0,c).join("")},counts:{"notes.count":v.length},items:v.map(e=>({name:g(e),note:d(e.note??"",e.noteKey)}))}:null,y=u.flatMap((e,t)=>{const n=e.cells[o];return n&&!n.missing?[{row:e,cell:n,x:t,y:n.value}]:[]});if(!y.length)return{chart:p,notes:M,extremes:null,range:null,change:null,trend:null,outliers:null};let $=y[0],x=y[0];for(const e of y)e.y>$.y&&($=e),e.y<x.y&&(x=e);const O={values:{"highest.name":g($.row),"highest.value":h($.y,$.cell),"lowest.name":g(x.row),"lowest.value":h(x.y,x.cell)}},j={values:{"range.from":h(x.y,x.cell),"range.to":h($.y,$.cell),"range.difference":h($.y-x.y,$.cell)}},A=r.getAttribute("data-chart")||"column";if(!l.includes(A)&&!r.hasAttribute("data-chart-ordered"))return{chart:p,notes:M,extremes:O,range:j};if(y.length<2)return{chart:p,notes:M,extremes:O,range:j,change:null,trend:null,outliers:null};const{share:F}=a(y),N=e=>Math.abs(e)<s.flat?"flat":e>0?"up":"down",S=y[0],I=y[y.length-1],k=F(I.y-S.y,S.y),D={values:{"first.name":g(S.row),"first.value":h(S.y,S.cell),"last.name":g(I.row),"last.value":h(I.y,I.cell),"change.difference":h(Math.abs(I.y-S.y),I.cell),"change.percent":m(Math.abs(k)),change:s.words[N(k)]},when:N(k)},E=((e,r=5,o=25)=>{if(e.length<4)return null;const{mean:s,share:c}=a(e),l=t=>e.filter(e=>Math.abs(c(e.y-t(e.x),t(e.x)))>o),u=t=>t.length<=e.length/5;let i=t(e),d=l(i.at);d.length&&u(d)&&(i=t(e.filter(e=>!d.includes(e))),d=l(i.at)),u(d)||(i=t(e),d=[]);const f=i.at,h=e[0],m=e[e.length-1],g=c(f(m.x)-f(h.x),s),w=Math.abs(i.t)>=(b=i.n-2,n[b-1]??(b<30?2.1:2));var b;const p=Math.abs(c(i.spread,s))<r,v=Math.abs(g)<r?"flat":g>0?"up":"down",M="flat"===v?p?"flat":"unclear":w?v:"unclear";return{course:M,line:f,outside:"unclear"===M?[]:d}})(y,s.flat,s.outliers);if(!E)return{chart:p,notes:M,extremes:O,range:j,change:D,trend:null,outliers:null};const{course:L,line:T,outside:q}=E,B={values:{trend:s.words[L],"trend.percent":m(Math.abs(F(T(I.x)-T(S.x),T(S.x)))),"trend.from":h(T(S.x),S.cell),"trend.to":h(T(I.x),I.cell),"flat.percent":m(s.flat),"outliers.percent":m(s.outliers)},when:L};return"unclear"===L?{chart:p,notes:M,extremes:O,range:j,change:D,trend:B}:{chart:p,notes:M,extremes:O,range:j,change:D,trend:B,outliers:q.length?{values:{"outliers.count":(0,e.splitSign)(q.length,0,c).join("")},counts:{"outliers.count":q.length},items:q.map(e=>({name:g(e.row),value:h(e.y,e.cell),expected:h(T(e.x),e.cell),deviation:m(Math.abs(F(e.y-T(e.x),T(e.x)))),side:s.words[e.y>T(e.x)?"above":"below"]}))}:null}},g=(e,t,n,a,r)=>{const[o,s]=a.delimiters,c=new RegExp(`${i(o)}([\\w.]+)(\\|.*?)?${i(s)}`,"g"),l=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),u=[];for(;l.nextNode();)u.push(l.currentNode);for(const i of u){const e=i.textContent??"",a=[];let o=0;for(const s of e.matchAll(c)){const[c,l,u]=s;let i=t[l];if(void 0!==i){if(u&&void 0!==n[l]){const e=Object.fromEntries(u.slice(1).split("|").map(e=>[e.slice(0,e.indexOf(":")),e.slice(e.indexOf(":")+1)])),t=e[new Intl.PluralRules(r).select(n[l])]??e.other;void 0!==t&&(i=t.replace("#","string"==typeof i?i:i.textContent??""))}a.push(e.slice(o,s.index),"string"==typeof i?i:i.cloneNode(!0)),o=(s.index??0)+c.length}else h(`A summary has the placeholder ${c}, which no analysis fills.`)}a.length&&(a.push(e.slice(o)),i.replaceWith(...a))}},w=(e,t)=>{const n=e.dataset.summary;if(void 0===n)return!0;if(u.includes(n)||h(`A summary asks for the analysis "${n}", which does not exist.`),!(n in t))return!1;const a=t[n],r=e.dataset.when;return e.hasAttribute("data-none")?!a:!(!a||r&&a.when!==r)},b=(e,t,n,a)=>{const r=e.cloneNode(!0);for(const c of[s,"hidden","id","data-summary","data-none","data-when","data-series",...n.langattribute?[n.langattribute]:[]])r.removeAttribute(c);r.setAttribute(c,"");const o=Object.values(t).filter(e=>!!e),l=Object.assign({},...o.map(e=>e.values)),u=Object.assign({},...o.map(e=>e.counts??{}));for(const s of r.querySelectorAll("[data-summary]"))if(w(s,t))for(const e of["data-summary","data-none","data-when"])s.removeAttribute(e);else s.remove();for(const s of r.querySelectorAll("[data-each]")){const e=(t[s.dataset.each??""]?.items??[]).map(e=>{const t=s.cloneNode(!0);return t.removeAttribute("data-each"),g(t,{...l,...e},u,n,a),t}),r=new Intl.ListFormat(a,{type:"conjunction"}).formatToParts(e.map((e,t)=>String(t)));s.replaceWith(...r.map(t=>"element"===t.type?e[Number(t.value)]:t.value))}return g(r,l,u,n,a),r},p=(e,t={})=>{const n={...r,...t},a=n.locale||document.documentElement.lang||void 0,l=e.querySelector(`:scope > .${o}`);if(!l||!e.querySelector("tbody tr"))return;l.id||(l.id="tablechart-summary-"+ ++d);const u=(e.getAttribute("aria-describedby")??"").split(/\s+/).filter(Boolean);u.includes(l.id)||e.setAttribute("aria-describedby",[...u,l.id].join(" "));for(const r of l.querySelectorAll(`:scope > [${c}]`))r.remove();const i=new Map;for(const r of l.querySelectorAll(":scope > *")){r.setAttribute(s,""),r.hidden=!0;const t=Math.max(1,Number.parseInt(r.dataset.series??"1",10)||1)-1;i.has(t)||i.set(t,m(e,t,n,a));const o=i.get(t);w(r,o)&&r.after(b(r,o,n,a))}},v=null,M={init:(e={})=>{const t={...r,...e,words:{...r.words,...e.words}};if(v)return;v=t;const n=()=>Array.from(document.querySelectorAll(t.selector)).filter(e=>e.querySelector(`:scope > .${o}`)),a=new Set,c=e=>{a.size||requestAnimationFrame(()=>{const e=[...a];a.clear();for(const n of e)p(n,t)}),a.add(e)},l=new WeakSet,u=e=>{p(e,t),(e=>{const t=[...e.querySelectorAll(`:scope > .${o} > [${s}]`),...e.querySelectorAll(":scope > table")];for(const n of t)l.has(n)||(l.add(n),new MutationObserver(()=>c(e)).observe(n,{subtree:!0,childList:!0,characterData:!0}))})(e)};for(const r of n())u(r);document.addEventListener("tablechart:table",e=>{const n=e.target;n instanceof HTMLElement&&n.matches(t.selector)&&n.querySelector(`:scope > .${o}`)&&u(n)}),t.locale||new MutationObserver(()=>{for(const e of n())c(e)}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]})},fill:p,defaults:r};window.Tablechart.Summary=M}(Tablechart.kit);
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { D as e, F as t, T as n, _ as r, g as i, v as a, y as o } from "./tablechart-shared.mjs";
|
|
2
|
+
// src/js/summary.ts
|
|
3
|
+
var s = {
|
|
4
|
+
selector: "[data-chart]:not(th)",
|
|
5
|
+
delimiters: ["{", "}"],
|
|
6
|
+
langattribute: "data-i18n",
|
|
7
|
+
flat: 5,
|
|
8
|
+
outliers: 25,
|
|
9
|
+
words: {
|
|
10
|
+
up: "up",
|
|
11
|
+
down: "down",
|
|
12
|
+
flat: "flat",
|
|
13
|
+
unclear: "unclear",
|
|
14
|
+
above: "above",
|
|
15
|
+
below: "below"
|
|
16
|
+
}
|
|
17
|
+
}, c = "chart-summary", l = "data-summary-template", u = "data-summary-text", d = ["line", "area"], f = [
|
|
18
|
+
"extremes",
|
|
19
|
+
"range",
|
|
20
|
+
"change",
|
|
21
|
+
"trend",
|
|
22
|
+
"outliers",
|
|
23
|
+
"notes"
|
|
24
|
+
], p = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), m = 0, h = /* @__PURE__ */ new Set(), g = (e) => {
|
|
25
|
+
h.has(e) || (h.add(e), console.warn(`[${t}] ${e}`));
|
|
26
|
+
}, _ = (t, s, c, l) => {
|
|
27
|
+
let u = r(t, c.langattribute).filter((e) => !e.isTotal), f = i(t, u, c.langattribute)[s], p = (e, t) => {
|
|
28
|
+
if (!t || !c.langattribute) return e;
|
|
29
|
+
let n = document.createElement("span");
|
|
30
|
+
return n.setAttribute(c.langattribute, t), n.textContent = e, n;
|
|
31
|
+
}, m = Math.max(0, ...u.map((e) => n(e.cells[s]?.number ?? ""))), h = (t, n, r = m) => {
|
|
32
|
+
let [i, a] = e(t, r, l);
|
|
33
|
+
return n.prefix + i + a + n.suffix;
|
|
34
|
+
}, g = (e) => new Intl.NumberFormat(l, {
|
|
35
|
+
style: "percent",
|
|
36
|
+
maximumFractionDigits: +(Math.abs(e) < 10)
|
|
37
|
+
}).format(e / 100), _ = (e) => p(e.label, e.key), v = t.querySelector(":scope > figcaption"), y = v?.querySelector("b, strong") ?? v, b = {
|
|
38
|
+
values: {
|
|
39
|
+
title: p((y?.textContent ?? "").trim(), c.langattribute && y?.getAttribute(c.langattribute) || null),
|
|
40
|
+
rows: e(u.length, 0, l).join(""),
|
|
41
|
+
series: f ? p(f.name, f.key) : ""
|
|
42
|
+
},
|
|
43
|
+
counts: { rows: u.length }
|
|
44
|
+
}, x = u.filter((e) => e.note), S = x.length ? {
|
|
45
|
+
values: { "notes.count": e(x.length, 0, l).join("") },
|
|
46
|
+
counts: { "notes.count": x.length },
|
|
47
|
+
items: x.map((e) => ({
|
|
48
|
+
name: _(e),
|
|
49
|
+
note: p(e.note ?? "", e.noteKey)
|
|
50
|
+
}))
|
|
51
|
+
} : null, C = u.flatMap((e, t) => {
|
|
52
|
+
let n = e.cells[s];
|
|
53
|
+
return n && !n.missing ? [{
|
|
54
|
+
row: e,
|
|
55
|
+
cell: n,
|
|
56
|
+
x: t,
|
|
57
|
+
y: n.value
|
|
58
|
+
}] : [];
|
|
59
|
+
});
|
|
60
|
+
if (!C.length) return {
|
|
61
|
+
chart: b,
|
|
62
|
+
notes: S,
|
|
63
|
+
extremes: null,
|
|
64
|
+
range: null,
|
|
65
|
+
change: null,
|
|
66
|
+
trend: null,
|
|
67
|
+
outliers: null
|
|
68
|
+
};
|
|
69
|
+
let w = C[0], T = C[0];
|
|
70
|
+
for (let e of C) e.y > w.y && (w = e), e.y < T.y && (T = e);
|
|
71
|
+
let E = { values: {
|
|
72
|
+
"highest.name": _(w.row),
|
|
73
|
+
"highest.value": h(w.y, w.cell),
|
|
74
|
+
"lowest.name": _(T.row),
|
|
75
|
+
"lowest.value": h(T.y, T.cell)
|
|
76
|
+
} }, D = { values: {
|
|
77
|
+
"range.from": h(T.y, T.cell),
|
|
78
|
+
"range.to": h(w.y, w.cell),
|
|
79
|
+
"range.difference": h(w.y - T.y, w.cell)
|
|
80
|
+
} }, O = t.getAttribute("data-chart") || "column";
|
|
81
|
+
if (!d.includes(O) && !t.hasAttribute("data-chart-ordered")) return {
|
|
82
|
+
chart: b,
|
|
83
|
+
notes: S,
|
|
84
|
+
extremes: E,
|
|
85
|
+
range: D
|
|
86
|
+
};
|
|
87
|
+
if (C.length < 2) return {
|
|
88
|
+
chart: b,
|
|
89
|
+
notes: S,
|
|
90
|
+
extremes: E,
|
|
91
|
+
range: D,
|
|
92
|
+
change: null,
|
|
93
|
+
trend: null,
|
|
94
|
+
outliers: null
|
|
95
|
+
};
|
|
96
|
+
let { share: k } = a(C), A = (e) => Math.abs(e) < c.flat ? "flat" : e > 0 ? "up" : "down", j = C[0], M = C[C.length - 1], N = k(M.y - j.y, j.y), P = {
|
|
97
|
+
values: {
|
|
98
|
+
"first.name": _(j.row),
|
|
99
|
+
"first.value": h(j.y, j.cell),
|
|
100
|
+
"last.name": _(M.row),
|
|
101
|
+
"last.value": h(M.y, M.cell),
|
|
102
|
+
"change.difference": h(Math.abs(M.y - j.y), M.cell),
|
|
103
|
+
"change.percent": g(Math.abs(N)),
|
|
104
|
+
change: c.words[A(N)]
|
|
105
|
+
},
|
|
106
|
+
when: A(N)
|
|
107
|
+
}, F = o(C, c.flat, c.outliers);
|
|
108
|
+
if (!F) return {
|
|
109
|
+
chart: b,
|
|
110
|
+
notes: S,
|
|
111
|
+
extremes: E,
|
|
112
|
+
range: D,
|
|
113
|
+
change: P,
|
|
114
|
+
trend: null,
|
|
115
|
+
outliers: null
|
|
116
|
+
};
|
|
117
|
+
let { course: I, line: L, outside: R } = F, z = {
|
|
118
|
+
values: {
|
|
119
|
+
trend: c.words[I],
|
|
120
|
+
"trend.percent": g(Math.abs(k(L(M.x) - L(j.x), L(j.x)))),
|
|
121
|
+
"trend.from": h(L(j.x), j.cell),
|
|
122
|
+
"trend.to": h(L(M.x), M.cell),
|
|
123
|
+
"flat.percent": g(c.flat),
|
|
124
|
+
"outliers.percent": g(c.outliers)
|
|
125
|
+
},
|
|
126
|
+
when: I
|
|
127
|
+
};
|
|
128
|
+
return I === "unclear" ? {
|
|
129
|
+
chart: b,
|
|
130
|
+
notes: S,
|
|
131
|
+
extremes: E,
|
|
132
|
+
range: D,
|
|
133
|
+
change: P,
|
|
134
|
+
trend: z
|
|
135
|
+
} : {
|
|
136
|
+
chart: b,
|
|
137
|
+
notes: S,
|
|
138
|
+
extremes: E,
|
|
139
|
+
range: D,
|
|
140
|
+
change: P,
|
|
141
|
+
trend: z,
|
|
142
|
+
outliers: R.length ? {
|
|
143
|
+
values: { "outliers.count": e(R.length, 0, l).join("") },
|
|
144
|
+
counts: { "outliers.count": R.length },
|
|
145
|
+
items: R.map((e) => ({
|
|
146
|
+
name: _(e.row),
|
|
147
|
+
value: h(e.y, e.cell),
|
|
148
|
+
expected: h(L(e.x), e.cell),
|
|
149
|
+
deviation: g(Math.abs(k(e.y - L(e.x), L(e.x)))),
|
|
150
|
+
side: c.words[e.y > L(e.x) ? "above" : "below"]
|
|
151
|
+
}))
|
|
152
|
+
} : null
|
|
153
|
+
};
|
|
154
|
+
}, v = (e, t, n, r, i) => {
|
|
155
|
+
let [a, o] = r.delimiters, s = RegExp(`${p(a)}([\\w.]+)(\\|.*?)?${p(o)}`, "g"), c = document.createTreeWalker(e, NodeFilter.SHOW_TEXT), l = [];
|
|
156
|
+
for (; c.nextNode();) l.push(c.currentNode);
|
|
157
|
+
for (let e of l) {
|
|
158
|
+
let r = e.textContent ?? "", a = [], o = 0;
|
|
159
|
+
for (let e of r.matchAll(s)) {
|
|
160
|
+
let [s, c, l] = e, u = t[c];
|
|
161
|
+
if (u === void 0) g(`A summary has the placeholder ${s}, which no analysis fills.`);
|
|
162
|
+
else {
|
|
163
|
+
if (l && n[c] !== void 0) {
|
|
164
|
+
let e = Object.fromEntries(l.slice(1).split("|").map((e) => [e.slice(0, e.indexOf(":")), e.slice(e.indexOf(":") + 1)])), t = e[new Intl.PluralRules(i).select(n[c])] ?? e.other;
|
|
165
|
+
t !== void 0 && (u = t.replace("#", typeof u == "string" ? u : u.textContent ?? ""));
|
|
166
|
+
}
|
|
167
|
+
a.push(r.slice(o, e.index), typeof u == "string" ? u : u.cloneNode(!0)), o = (e.index ?? 0) + s.length;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
a.length && (a.push(r.slice(o)), e.replaceWith(...a));
|
|
171
|
+
}
|
|
172
|
+
}, y = (e, t) => {
|
|
173
|
+
let n = e.dataset.summary;
|
|
174
|
+
if (n === void 0) return !0;
|
|
175
|
+
if (f.includes(n) || g(`A summary asks for the analysis "${n}", which does not exist.`), !(n in t)) return !1;
|
|
176
|
+
let r = t[n], i = e.dataset.when;
|
|
177
|
+
return e.hasAttribute("data-none") ? !r : !!r && (!i || r.when === i);
|
|
178
|
+
}, b = (e, t, n, r) => {
|
|
179
|
+
let i = e.cloneNode(!0);
|
|
180
|
+
for (let e of [
|
|
181
|
+
l,
|
|
182
|
+
"hidden",
|
|
183
|
+
"id",
|
|
184
|
+
"data-summary",
|
|
185
|
+
"data-none",
|
|
186
|
+
"data-when",
|
|
187
|
+
"data-series",
|
|
188
|
+
...n.langattribute ? [n.langattribute] : []
|
|
189
|
+
]) i.removeAttribute(e);
|
|
190
|
+
i.setAttribute(u, "");
|
|
191
|
+
let a = Object.values(t).filter((e) => !!e), o = Object.assign({}, ...a.map((e) => e.values)), s = Object.assign({}, ...a.map((e) => e.counts ?? {}));
|
|
192
|
+
for (let e of i.querySelectorAll("[data-summary]")) if (!y(e, t)) e.remove();
|
|
193
|
+
else for (let t of [
|
|
194
|
+
"data-summary",
|
|
195
|
+
"data-none",
|
|
196
|
+
"data-when"
|
|
197
|
+
]) e.removeAttribute(t);
|
|
198
|
+
for (let e of i.querySelectorAll("[data-each]")) {
|
|
199
|
+
let i = (t[e.dataset.each ?? ""]?.items ?? []).map((t) => {
|
|
200
|
+
let i = e.cloneNode(!0);
|
|
201
|
+
return i.removeAttribute("data-each"), v(i, {
|
|
202
|
+
...o,
|
|
203
|
+
...t
|
|
204
|
+
}, s, n, r), i;
|
|
205
|
+
}), a = new Intl.ListFormat(r, { type: "conjunction" }).formatToParts(i.map((e, t) => String(t)));
|
|
206
|
+
e.replaceWith(...a.map((e) => e.type === "element" ? i[Number(e.value)] : e.value));
|
|
207
|
+
}
|
|
208
|
+
return v(i, o, s, n, r), i;
|
|
209
|
+
}, x = (e, t = {}) => {
|
|
210
|
+
let n = {
|
|
211
|
+
...s,
|
|
212
|
+
...t
|
|
213
|
+
}, r = n.locale || document.documentElement.lang || void 0, i = e.querySelector(`:scope > .${c}`);
|
|
214
|
+
if (!i || !e.querySelector("tbody tr")) return;
|
|
215
|
+
i.id || (i.id = `tablechart-summary-${++m}`);
|
|
216
|
+
let a = (e.getAttribute("aria-describedby") ?? "").split(/\s+/).filter(Boolean);
|
|
217
|
+
a.includes(i.id) || e.setAttribute("aria-describedby", [...a, i.id].join(" "));
|
|
218
|
+
for (let e of i.querySelectorAll(`:scope > [${u}]`)) e.remove();
|
|
219
|
+
let o = /* @__PURE__ */ new Map();
|
|
220
|
+
for (let t of i.querySelectorAll(":scope > *")) {
|
|
221
|
+
t.setAttribute(l, ""), t.hidden = !0;
|
|
222
|
+
let i = Math.max(1, Number.parseInt(t.dataset.series ?? "1", 10) || 1) - 1;
|
|
223
|
+
o.has(i) || o.set(i, _(e, i, n, r));
|
|
224
|
+
let a = o.get(i);
|
|
225
|
+
y(t, a) && t.after(b(t, a, n, r));
|
|
226
|
+
}
|
|
227
|
+
}, S = null, C = (e = {}) => {
|
|
228
|
+
let t = {
|
|
229
|
+
...s,
|
|
230
|
+
...e,
|
|
231
|
+
words: {
|
|
232
|
+
...s.words,
|
|
233
|
+
...e.words
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
if (S) return;
|
|
237
|
+
S = t;
|
|
238
|
+
let n = () => Array.from(document.querySelectorAll(t.selector)).filter((e) => e.querySelector(`:scope > .${c}`)), r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
239
|
+
r.size || requestAnimationFrame(() => {
|
|
240
|
+
let e = [...r];
|
|
241
|
+
r.clear();
|
|
242
|
+
for (let n of e) x(n, t);
|
|
243
|
+
}), r.add(e);
|
|
244
|
+
}, a = /* @__PURE__ */ new WeakSet(), o = (e) => {
|
|
245
|
+
let t = [...e.querySelectorAll(`:scope > .${c} > [${l}]`), ...e.querySelectorAll(":scope > table")];
|
|
246
|
+
for (let n of t) a.has(n) || (a.add(n), new MutationObserver(() => i(e)).observe(n, {
|
|
247
|
+
subtree: !0,
|
|
248
|
+
childList: !0,
|
|
249
|
+
characterData: !0
|
|
250
|
+
}));
|
|
251
|
+
}, u = (e) => {
|
|
252
|
+
x(e, t), o(e);
|
|
253
|
+
};
|
|
254
|
+
for (let e of n()) u(e);
|
|
255
|
+
document.addEventListener("tablechart:table", (e) => {
|
|
256
|
+
let n = e.target;
|
|
257
|
+
n instanceof HTMLElement && n.matches(t.selector) && n.querySelector(`:scope > .${c}`) && u(n);
|
|
258
|
+
}), t.locale || new MutationObserver(() => {
|
|
259
|
+
for (let e of n()) i(e);
|
|
260
|
+
}).observe(document.documentElement, {
|
|
261
|
+
attributes: !0,
|
|
262
|
+
attributeFilter: ["lang"]
|
|
263
|
+
});
|
|
264
|
+
}, w = {
|
|
265
|
+
init: C,
|
|
266
|
+
fill: x,
|
|
267
|
+
defaults: s
|
|
268
|
+
};
|
|
269
|
+
export { w as Summary, x as fill, C as init, s as summaryDefaults };
|
package/dist/tablechart.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:root{--cssimported-tablechart:true}.tablechart,:where([data-chart]){margin:var(--tablechart-margin,0);color:var(--tablechart-color,currentColor);font-size:var(--tablechart-font-size,1em);line-height:var(--tablechart-line-height,1.25)}.tablechart :where(figcaption),:where([data-chart]) :where(figcaption){margin-bottom:var(--tablechart-caption-gap,.5em);text-align:var(--tablechart-caption-align,left)}.tablechart,:where([data-chart]){position:relative}.tablechart :where(table),.tablechart :where(.chart-annotations),:where([data-chart]) :where(table),:where([data-chart]) :where(.chart-annotations){inset-inline:0;clip-path:inset(50%);margin:0;position:absolute;top:0}.tablechart[data-table]>:where(table),:where([data-chart])[data-table]>:where(table){border-collapse:collapse;margin-top:.75em}.tablechart[data-table]>:where(table) :where(th,td),:where([data-chart])[data-table]>:where(table) :where(th,td){text-align:start;padding:.2em 1.25em .2em 0}.tablechart[data-table]>:where(table) :where(td,thead th:not(:first-child)),:where([data-chart])[data-table]>:where(table) :where(td,thead th:not(:first-child)){text-align:end;font-variant-numeric:tabular-nums}.tablechart[data-table=always]>:where(table),:where([data-chart])[data-table=always]>:where(table){clip-path:none;position:static}@media (scripting:none){.tablechart :where(table),.tablechart :where(.chart-annotations),:where([data-chart]) :where(table),:where([data-chart]) :where(.chart-annotations){clip-path:none;position:static}}@media (scripting:enabled){.tablechart:where(:not([data-chart-empty]):not(:has(>.tablechart-plot))):after,:where([data-chart]):where(:not([data-chart-empty]):not(:has(>.tablechart-plot))):after{content:"";height:0;padding-top:max(var(--tablechart-min-height,200px), var(--_room,.38) * 100%);padding-bottom:1.5em;display:block}.tablechart :where(.tablechart-plot:not(.is-placed)),:where([data-chart]) :where(.tablechart-plot:not(.is-placed)){height:0;padding-top:max(var(--tablechart-min-height,200px), var(--_room,.38) * 100%);overflow:hidden}}:where([data-chart=donut]){--_room:.66}:where([data-chart=bar]){--_room:.5}.tablechart-plot{position:relative}.tablechart-plot :where(svg){width:100%;height:auto;display:block;overflow:visible}.tablechart-plot:not(.is-placed) :where(.tablechart-value,.tablechart-badge,.tablechart-name){visibility:hidden}.tablechart-sr{white-space:nowrap;clip-path:inset(50%);width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.tablechart-value{white-space:nowrap;font-size:var(--tablechart-value-size,calc(var(--tablechart-name-size,.95em) * 1.3));position:absolute;transform:translate(-50%,-100%)}.tablechart-value[data-place=outside]{color:var(--tablechart-value-color,currentColor)}.tablechart-value:where([data-place=outside],[data-place=below]) :where(.tablechart-minus){position:absolute;right:100%}.tablechart-value[data-place=inside]{color:var(--tablechart-bar-value-color,oklch(from var(--tablechart-bar-color,currentColor) calc(.18 + .8 * clamp(0, (.68 - l) * 1000, 1)) 0 0));transform:translate(-50%,-50%)}.tablechart-value[data-place=around]{color:var(--tablechart-value-color,currentColor);transform:translate(-50%,-50%)}.tablechart-value[data-place=below]{color:var(--tablechart-value-color,currentColor);transform:translate(-50%)}.tablechart-value[data-place=middle]{color:var(--tablechart-value-color,currentColor);transform:translate(-50%,-50%)}.tablechart-value[data-place=after]{color:var(--tablechart-value-color,currentColor);transform:translateY(-50%)}.tablechart-value[data-place=before]{color:var(--tablechart-value-color,currentColor);transform:translate(-100%,-50%)}.tablechart-value[data-place=none]{display:none}.tablechart-value[data-left-out]{visibility:hidden}.tablechart-value[data-place=inside][data-kind=up]{color:var(--tablechart-up-value-color,oklch(from var(--tablechart-up-color,var(--tablechart-bar-color,currentColor)) calc(.18 + .8 * clamp(0, (.68 - l) * 1000, 1)) 0 0))}.tablechart-value[data-place=inside][data-kind=down]{color:var(--tablechart-down-value-color,oklch(from var(--tablechart-down-color,var(--tablechart-bar-color,currentColor)) calc(.18 + .8 * clamp(0, (.68 - l) * 1000, 1)) 0 0))}.tablechart-value[data-place=inside][data-series]{color:var(--tablechart-piece-value-color,oklch(from var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas))) calc(.18 + .8 * clamp(0, (.68 - l) * 1000, 1)) 0 0))}.tablechart-value[data-place=inside][data-kind=total]{color:var(--tablechart-total-value-color,oklch(from var(--tablechart-total-color,var(--tablechart-bar-color,currentColor)) calc(.18 + .8 * clamp(0, (.68 - l) * 1000, 1)) 0 0))}.tablechart-name{white-space:nowrap;font-size:var(--tablechart-name-size,.95em);color:var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas)));position:absolute;transform:translateY(-50%)}.tablechart-legend{box-sizing:border-box;width:fit-content;max-width:100%;padding:var(--tablechart-legend-padding,0);border:var(--tablechart-legend-border,none);border-radius:var(--tablechart-legend-radius,0);background:var(--tablechart-legend-surface,none);margin-inline:auto;margin-top:var(--tablechart-legend-gap,.6em);font-size:var(--tablechart-name-size,.95em);flex-wrap:wrap;justify-content:center;gap:.3em 1.2em;display:flex}.tablechart-name[data-place=legend]{color:inherit;font-size:inherit;position:static;transform:none}.tablechart-name[data-place=legend]:before{content:"";vertical-align:-.05em;background:var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas)));width:1.6em;height:.8em;mask-image:var(--_line), var(--_mark,none);margin-right:.4em;display:inline-block;mask-position:50%;mask-size:contain;mask-repeat:no-repeat}.tablechart-name[data-place=legend][data-swatch=box]:before{vertical-align:-.05em;background:var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas)));border-radius:.15em;width:.7em;height:.7em;mask:none}.tablechart-name[data-place=legend],.tablechart-tooltip-key[data-sample]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H24'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-line=dashed],.tablechart-tooltip-key[data-sample][data-line=dashed]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H24' stroke-dasharray='4 2.5' stroke-linecap='butt'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-line=dotted],.tablechart-tooltip-key[data-sample][data-line=dotted]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H24' stroke-dasharray='0 3'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=circle],.tablechart-tooltip-key[data-sample][data-marker=circle]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='6' r='3.4' fill='white'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=circle][data-open],.tablechart-tooltip-key[data-sample][data-marker=circle][data-open]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='6' r='3.4'/%3E%3C/svg%3E");--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H8.6 M15.4 6H24'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=circle][data-open][data-line=dashed],.tablechart-tooltip-key[data-sample][data-marker=circle][data-open][data-line=dashed]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H8.6 M15.4 6H24' stroke-dasharray='4 2.5' stroke-linecap='butt'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=circle][data-open][data-line=dotted],.tablechart-tooltip-key[data-sample][data-marker=circle][data-open][data-line=dotted]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H8.6 M15.4 6H24' stroke-dasharray='0 3'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=square],.tablechart-tooltip-key[data-sample][data-marker=square]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='6' stroke-linecap='butt' fill='white'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=square][data-open],.tablechart-tooltip-key[data-sample][data-marker=square][data-open]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='6' stroke-linecap='butt'/%3E%3C/svg%3E");--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H9 M15 6H24'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=square][data-open][data-line=dashed],.tablechart-tooltip-key[data-sample][data-marker=square][data-open][data-line=dashed]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H9 M15 6H24' stroke-dasharray='4 2.5' stroke-linecap='butt'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=square][data-open][data-line=dotted],.tablechart-tooltip-key[data-sample][data-marker=square][data-open][data-line=dotted]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H9 M15 6H24' stroke-dasharray='0 3'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=diamond],.tablechart-tooltip-key[data-sample][data-marker=diamond]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpolygon points='12,1.9 16.1,6 12,10.1 7.9,6' fill='white'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=diamond][data-open],.tablechart-tooltip-key[data-sample][data-marker=diamond][data-open]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpolygon points='12,1.9 16.1,6 12,10.1 7.9,6'/%3E%3C/svg%3E");--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H7.9 M16.1 6H24'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=diamond][data-open][data-line=dashed],.tablechart-tooltip-key[data-sample][data-marker=diamond][data-open][data-line=dashed]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H7.9 M16.1 6H24' stroke-dasharray='4 2.5' stroke-linecap='butt'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=diamond][data-open][data-line=dotted],.tablechart-tooltip-key[data-sample][data-marker=diamond][data-open][data-line=dotted]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H7.9 M16.1 6H24' stroke-dasharray='0 3'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-line=none]{--_line:none}.tablechart-name[data-place=legend][data-line=none][data-marker=triangle]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpolygon points='12,1.6 16.4,9.6 7.6,9.6' fill='white'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-line=none][data-marker=size]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.4'%3E%3Ccircle cx='6' cy='8' r='2.6'/%3E%3Ccircle cx='15.5' cy='6' r='4.8'/%3E%3C/svg%3E")}.tablechart-tick,.tablechart-axis-title{white-space:nowrap;font-size:var(--tablechart-axis-size,var(--tablechart-name-size,.95em));color:var(--tablechart-axis-text-color,inherit);position:absolute}.tablechart-tick[data-place=below]{transform:translate(-50%)}.tablechart-tick[data-place=before]{transform:translate(-100%,-50%)}.tablechart-tick[data-place=none]{display:none}.tablechart-axis-title{transform:translate(-50%)}.tablechart-axis-title[data-axis=y]{writing-mode:vertical-rl;transform:translateY(-50%)rotate(180deg)}.tablechart-categories :where(span[data-kind=total]){display:none}.tablechart-categories :where(span[data-kind=slice]):before{content:"";width:var(--tablechart-legend-key-size,.6em);height:var(--tablechart-legend-key-size,.6em);background:var(--palette,color-mix(in oklab, var(--tablechart-slice-color,currentColor) max(var(--tablechart-slice-min,20%), calc(100% - var(--n) * var(--tablechart-slice-fade,15%))), var(--tablechart-surface,Canvas)));border-radius:50%;margin-right:.4em;display:inline-block}.tablechart-categories[data-place=key]{box-sizing:border-box;width:fit-content;max-width:100%;padding:var(--tablechart-legend-padding,0);border:var(--tablechart-legend-border,none);border-radius:var(--tablechart-legend-radius,0);background:var(--tablechart-legend-surface,none);flex-wrap:wrap;justify-content:center;gap:.3em 1.2em;margin-inline:auto;display:flex}.tablechart-categories[data-place=key] :where(span){white-space:nowrap;padding:0}.tablechart-categories[data-place=beside]{pointer-events:none;margin:0;display:block;position:absolute;inset:0}.tablechart-categories[data-place=beside] :where(span){text-align:right;width:max-content;max-width:min(var(--tablechart-name-max,40%), var(--_beside,100%));text-wrap:balance;hyphens:auto;hyphenate-limit-chars:6 3 3;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;overflow-wrap:break-word;min-width:min-content;padding:0;position:absolute;transform:translate(-100%,-50%)}.tablechart-categories{grid-template-columns:repeat(var(--_columns,1), minmax(0, 1fr));margin-top:var(--tablechart-name-gap,.45em);display:grid}.tablechart-categories :where(span){color:var(--tablechart-name-color,inherit);text-align:center;padding:var(--tablechart-name-padding,0 .2em);font-size:calc(var(--tablechart-name-size,.95em) * var(--_name-fit,1));hyphens:manual;overflow-wrap:normal}:where([data-chart=scatter]) .tablechart-categories[data-place=beside] :where(span){text-align:left;max-width:12em;transform:none}:where([data-chart=scatter]) .tablechart-categories[data-place=beside] :where(span)[data-side=left]{text-align:right}:where([data-chart=scatter]) .tablechart-categories[data-place=beside] :where(span):is([data-side=above],[data-side=below]){text-align:center}:where([data-chart=scatter]) .tablechart-categories[data-place=beside] :where(span)[data-left-out]{visibility:hidden}:where([data-chart=scatter]) .tablechart-categories[data-place=beside] :where(span)[data-more]:after{content:" +" attr(data-more)}.tablechart-bar{fill:var(--tablechart-bar-color,currentColor)}.tablechart-bar[data-kind=up]{fill:var(--tablechart-up-color,var(--tablechart-bar-color,currentColor))}.tablechart-bar[data-kind=down]{fill:var(--tablechart-down-color,var(--tablechart-bar-color,currentColor))}.tablechart-bar[data-kind=total]{fill:var(--tablechart-total-color,var(--tablechart-bar-color,currentColor))}.tablechart-bar[data-series],.tablechart-piece{fill:var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas)))}.tablechart-plot[data-grouped] :where(.tablechart-value){font-size:calc(var(--tablechart-value-group-size,.95em) * var(--_fit,1))}.tablechart-rule{stroke:var(--tablechart-baseline-color,currentColor);stroke-width:var(--tablechart-baseline-width,1px);opacity:var(--tablechart-baseline-opacity,.45);vector-effect:non-scaling-stroke}.tablechart-connector{stroke:var(--tablechart-connector-color,currentColor);stroke-width:var(--tablechart-connector-width,1px);stroke-dasharray:var(--tablechart-connector-dash,2 3);opacity:var(--tablechart-connector-opacity,.55);fill:none;vector-effect:non-scaling-stroke}.tablechart-series{stroke:var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas)));stroke-width:var(--tablechart-series-width,2px);stroke-linecap:round;fill:none;vector-effect:non-scaling-stroke}.tablechart-area{fill:var(--tablechart-area-color,var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas))));opacity:var(--tablechart-area-opacity,.25)}.tablechart-area[data-muted]{opacity:calc(var(--tablechart-area-opacity,.25) / 2)}.tablechart-area[data-stacked]{opacity:var(--tablechart-area-opacity,.5)}.tablechart-area[data-stacked][data-muted]{opacity:calc(var(--tablechart-area-opacity,.5) / 2)}.tablechart-series[data-line=dashed]{stroke-dasharray:var(--tablechart-series-dash,6 4)}.tablechart-series[data-line=dotted]{stroke-dasharray:var(--tablechart-series-dot,0 4)}.tablechart-point{fill:var(--tablechart-point-color,var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas))))}.tablechart-point[data-open]{fill:none;stroke:var(--tablechart-point-color,var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas))));stroke-width:var(--tablechart-series-width,2px);vector-effect:non-scaling-stroke}:where([data-chart=scatter]) .tablechart-point{stroke:var(--tablechart-surface,Canvas);stroke-width:1px;vector-effect:non-scaling-stroke}.tablechart-axis{fill:none;stroke:var(--tablechart-axis-color,color-mix(in oklab, currentColor 55%, transparent));stroke-width:var(--tablechart-axis-width,1px);vector-effect:non-scaling-stroke}.tablechart-grid{fill:none;stroke:var(--tablechart-grid-color,currentColor);stroke-width:var(--tablechart-grid-width,1px);opacity:var(--tablechart-grid-opacity,.09);vector-effect:non-scaling-stroke}:where(.tablechart-grid[data-gap]){stroke-opacity:0}.tablechart-slice{fill:none;stroke:var(--palette,color-mix(in oklab, var(--tablechart-slice-color,currentColor) max(var(--tablechart-slice-min,20%), calc(100% - var(--n) * var(--tablechart-slice-fade,15%))), var(--tablechart-surface,Canvas)))}.tablechart-divide{stroke:#000;stroke-width:var(--tablechart-slice-gap,4);fill:none}.tablechart-leader{stroke:var(--tablechart-leader-color,currentColor);stroke-width:var(--tablechart-leader-width,1px);opacity:var(--tablechart-leader-opacity,.45);fill:none;vector-effect:non-scaling-stroke}.tablechart-centre{white-space:nowrap;text-align:center;font-size:var(--tablechart-centre-size,1.6em);color:var(--tablechart-centre-color,currentColor);position:absolute;transform:translate(-50%,-50%)}.tablechart-break[data-part=edge]{fill:none;stroke:var(--tablechart-break-color,currentColor);stroke-width:var(--tablechart-break-width,1px);opacity:var(--tablechart-break-opacity,1);stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.tablechart-line{stroke:var(--tablechart-annotation-color,currentColor);stroke-width:var(--tablechart-annotation-width,1.25px);fill:none;stroke-linecap:butt;stroke-linejoin:miter;vector-effect:non-scaling-stroke}.tablechart-reference{fill:none;stroke:var(--tablechart-annotation-color,currentColor);stroke-width:var(--tablechart-annotation-width,1.25px);stroke-dasharray:6 4;vector-effect:non-scaling-stroke}.tablechart-reference[data-line=dotted]{stroke-dasharray:0 4;stroke-linecap:round}.tablechart-badge[data-kind=reference]{white-space:nowrap;border:0;border-radius:0;padding:.2em .4em}.tablechart-head{fill:var(--tablechart-annotation-color,currentColor)}.tablechart-badge{background:var(--tablechart-badge-surface,none);color:var(--tablechart-annotation-color,currentColor);border:var(--tablechart-badge-border-width,1px) solid currentColor;border-radius:var(--tablechart-badge-radius,50%);padding:var(--tablechart-badge-padding,.5em 1.25em);white-space:nowrap;line-height:1;position:absolute;transform:translate(-50%,-50%)}.tablechart-badge :where(.tablechart-caption){color:var(--tablechart-color,currentColor);background:0 0;border:0;position:absolute;bottom:calc(100% + .45em);left:50%;transform:translate(-50%)}@media screen{:where([data-animate],[data-animate] .tablechart-plot){--_el:var(--tablechart-animation-element-duration,var(--_element,.5s));--_max:var(--tablechart-animation-max,calc(4 * var(--_el)));--_r:var(--tablechart-animation-stagger,var(--_ratio,.24));--_dur:min(var(--_el), calc(var(--_max) / (1 + var(--_keep,0) * (var(--count,1) - 1) * var(--_r))));--_stg:min(calc(var(--_r) * var(--_el)), max(0s, calc((var(--_max) - var(--_dur)) / max(var(--count,1) - 1, 1))));--_fade:min(var(--_dur), calc(var(--_max) / 4), .6s);--_ease:var(--tablechart-animation-ease,var(--_easing,cubic-bezier(.26, .86, .44, .985)));--_build:min(calc(.6 * var(--count,1) * var(--_dur)), calc(var(--_max) - var(--_fade)));--_steptime:min(calc(.65 * var(--_dur)), calc(var(--_max) / (var(--count,1) - .08)));--_rise:min(calc(var(--_el) * 1.6), calc(var(--_max) - var(--_fade)));--_ring:calc(var(--_dur) + (var(--count,1) - 1) * var(--_stg))}:where([data-animate]) :where(.tablechart-bar){transform-box:fill-box;transform-origin:bottom;transition:transform var(--_dur) var(--_ease);transition-delay:calc(var(--i) * var(--_stg));transform:scaleY(0)}:where([data-animate]) :where(.tablechart-bar[data-grow=down]){transform-origin:top}:where([data-animate]) :where(.tablechart-bar[data-grow=right]){transform-origin:0;transform:scaleX(0)}:where([data-animate]) :where(.tablechart-bar[data-grow=left]){transform-origin:100%;transform:scaleX(0)}:where([data-animate]) :where(.tablechart-series){clip-path:inset(-10px calc(100% + 10px) -10px -10px);transition:clip-path calc(var(--d,1) * var(--_stg)) linear;transition-delay:calc(max(var(--i) - 1, 0) * var(--_stg))}:where([data-animate]) :where(.tablechart-area-fill){opacity:0;transition:opacity calc(max(var(--rows) - 1, 1) * var(--_stg)) linear;transition-delay:calc(max(var(--i) - 1, 0) * var(--_stg))}:where([data-animate]) :where(.tablechart-point,.tablechart-hole){opacity:0;transition:opacity var(--_fade) ease;transition-delay:calc(var(--i) * var(--_stg) + .048 * var(--_dur))}:where([data-animate]) :where(.tablechart-hole[data-for=badge]){transition:opacity .3s;transition-delay:calc(var(--after) * var(--_stg) + .35s)}:where([data-animate]) :where([data-chart=scatter] .tablechart-point){transform-box:fill-box;transform-origin:50%;transition:transform var(--_dur) var(--_ease), opacity var(--_fade) ease;transition-delay:calc(var(--i) * var(--_stg));transform:scale(0)}:where([data-animate]) :where(.tablechart-value,.tablechart-name,[data-chart=scatter] .tablechart-categories span,.tablechart-hole[data-for=text]){opacity:0;transition:opacity var(--_fade) ease;transition-delay:calc(var(--i) * var(--_stg) + .096 * var(--_dur))}:where([data-animate]) :where(.tablechart-grid[data-gap]){stroke-opacity:1;transition:stroke-opacity var(--_fade) ease;transition-delay:calc(var(--i,0) * var(--_stg) + .096 * var(--_dur))}:where([data-animate]) :where(.tablechart-connector){clip-path:inset(-10px calc(100% + 10px) -10px -10px);transition:clip-path calc(var(--_dur) / 3) linear;transition-delay:calc(var(--i) * var(--_stg))}:where([data-animate]) :where(.tablechart-slice){stroke-dasharray:0 var(--circ);transition:stroke-dasharray var(--_dur) var(--_ease);transition-delay:calc(var(--i) * var(--_stg))}:where([data-animate]) :where(.tablechart-centre){opacity:0;transition:opacity var(--_fade) ease;transition-delay:calc(var(--i,0) * var(--_stg) + .5 * var(--_dur))}:where([data-animate]) :where(.tablechart-leader){stroke-opacity:0;transition:stroke-opacity var(--_fade) ease;transition-delay:calc(var(--i,0) * var(--_stg) + .5 * var(--_dur))}:where([data-animate]) :where([data-chart=donut] .tablechart-value){transition-delay:calc(var(--i,0) * var(--_stg) + .5 * var(--_dur))}:where([data-animate]) :where(.tablechart-break[data-part=edge]){stroke-opacity:0;transition:stroke-opacity .2s;transition-delay:calc((var(--after) + .9) * var(--_stg))}:where([data-animate]) :where(.tablechart-line){stroke-dasharray:var(--len);stroke-dashoffset:var(--len);transition:stroke-dashoffset var(--tablechart-annotation-duration,.6s) var(--_ease);transition-delay:calc(var(--after) * var(--_stg))}:where([data-animate]) :where(.tablechart-reference){opacity:0;transition:opacity .3s;transition-delay:calc(var(--after) * var(--_stg) + .35s)}:where([data-animate]) :where(.tablechart-head){opacity:0;transition:opacity .2s;transition-delay:calc(var(--after) * var(--_stg) + .55s)}:where([data-animate]) :where(.tablechart-badge){opacity:0;transition:opacity .3s;transition-delay:calc(var(--after) * var(--_stg) + .35s)}:where([data-chart=column],[data-chart=bar]){--_element:.8s;--_ratio:.06;--_easing:cubic-bezier(.37, 0, .63, 1)}:where([data-chart=waterfall]:not([data-animate=sweep])){--_ratio:.6;--_keep:1}:where([data-animate=sweep][data-chart=waterfall]:not([data-steps])) :where(.tablechart-bar,.tablechart-connector){transition-duration:calc(var(--span,1) * var(--_build));transition-timing-function:var(--ease,linear);transition-delay:calc(var(--start,0) * var(--_build))}:where([data-animate=sweep][data-chart=waterfall]:not([data-steps])) :where(.tablechart-value,.tablechart-grid[data-gap]){transition-delay:calc((var(--start,0) + .5 * var(--span,0)) * var(--_build))}:where([data-animate=sweep][data-chart=waterfall]:not([data-steps])) :where(.tablechart-badge,.tablechart-hole[data-for=badge]){transition-delay:calc(var(--_build) + .2s)}:where([data-animate=sweep][data-chart=waterfall]:not([data-steps])) :where(.tablechart-break[data-part=edge]){transition-delay:calc((var(--start,0) + var(--span,1)) * var(--_build))}:where([data-animate][data-chart=waterfall][data-steps]) :where(.tablechart-bar){transition-duration:calc(.923 * var(--_steptime));transition-delay:calc(var(--i) * var(--_steptime))}:where([data-animate][data-chart=waterfall][data-steps]) :where(.tablechart-connector){transition:clip-path calc(.308 * var(--_steptime)) linear;transition-delay:calc((var(--i) - 1) * var(--_steptime) + calc(.692 * var(--_steptime)))}:where([data-animate][data-chart=waterfall][data-steps]) :where(.tablechart-value,.tablechart-hole[data-for=text]){transition-delay:calc(var(--i) * var(--_steptime) + calc(.923 * var(--_steptime)) * .5)}:where([data-animate][data-chart=waterfall][data-steps]) :where(.tablechart-badge,.tablechart-hole[data-for=badge]){transition-delay:calc(var(--after) * var(--_steptime) + .2s)}:where([data-animate].is-shown) :where(.tablechart-bar){transform:scaleY(1)}:where([data-animate].is-shown) :where(.tablechart-bar:is([data-grow=right],[data-grow=left])){transform:scaleX(1)}:where([data-animate].is-shown) :where(.tablechart-series){clip-path:inset(-10px)}:where([data-animate].is-shown) :where(.tablechart-point),:where([data-animate].is-shown) :where(.tablechart-hole),:where([data-animate].is-shown) :where(.tablechart-area-fill){opacity:1}:where([data-animate].is-shown) :where([data-chart=scatter] .tablechart-point){transform:none}:where([data-animate].is-shown) :where(.tablechart-grid[data-gap]){stroke-opacity:0}:where([data-animate].is-shown) :where(.tablechart-reference),:where([data-animate].is-shown) :where(.tablechart-value),:where([data-animate].is-shown) :where(.tablechart-name),:where([data-animate].is-shown) :where([data-chart=scatter] .tablechart-categories span),:where([data-animate].is-shown) :where(.tablechart-head),:where([data-animate].is-shown) :where(.tablechart-badge),:where([data-animate].is-shown) :where(.tablechart-centre){opacity:1}:where([data-animate].is-shown) :where(.tablechart-leader),:where([data-animate].is-shown) :where(.tablechart-break[data-part=edge]){stroke-opacity:1}:where([data-animate].is-shown) :where(.tablechart-slice){stroke-dasharray:var(--arc) calc(var(--circ) - var(--arc))}:where([data-animate].is-shown) :where(.tablechart-connector){clip-path:inset(-10px)}:where([data-animate].is-shown) :where(.tablechart-line){stroke-dashoffset:0}:where([data-animate=grow]:is([data-chart=line],[data-chart=area])) :where(.tablechart-series,.tablechart-area){clip-path:none;transform-box:view-box;transform-origin:0 var(--_base);transition:transform var(--_rise) var(--_ease);transition-delay:0s;transform:scaleY(0)}:where([data-animate=grow]:is([data-chart=line],[data-chart=area])) :where(.tablechart-area-fill){opacity:1;transition:none}:where([data-animate=grow]:is([data-chart=line],[data-chart=area])) :where(.tablechart-point,.tablechart-hole:not([data-for])){opacity:0;transform:translateY(var(--rise,0));transition:transform var(--_rise) var(--_ease), opacity .15s ease;transition-delay:0s}:where([data-animate=grow]:is([data-chart=line],[data-chart=area])) :where(.tablechart-value,.tablechart-name,.tablechart-grid[data-gap]){transition-delay:var(--_rise)}:where([data-animate=grow]:is([data-chart=line],[data-chart=area]).is-shown) :where(.tablechart-series,.tablechart-area){transform:scaleY(1)}:where([data-animate=grow]:is([data-chart=line],[data-chart=area]).is-shown) :where(.tablechart-point,.tablechart-hole:not([data-for])){opacity:1;transform:none}:where([data-animate=sweep][data-chart=donut]) :where(.tablechart-slice){transition:stroke-dasharray calc(var(--span,1) * var(--_ring)) var(--ease,linear);transition-delay:calc(var(--start,0) * var(--_ring))}:where([data-animate=sweep][data-chart=donut]) :where(.tablechart-leader,.tablechart-value){transition-delay:calc((var(--start,0) + var(--span,0)) * var(--_ring))}:where([data-animate=sweep][data-chart=donut]) :where(.tablechart-centre){transition-delay:calc(.5 * var(--_ring))}:where([data-animate]:not([data-steps])) :where(.tablechart-values .tablechart-value,[data-chart=scatter] .tablechart-categories[data-place=beside] span){opacity:1;transition-property:color}:where([data-animate]:not([data-steps])) :where(.tablechart-name,.tablechart-badge,.tablechart-centre){opacity:1;transition-property:color,border-color,background-color}:where([data-animate]:not([data-steps])) :where(.tablechart-name):before{transition:background-color var(--_fade) ease;transition-delay:calc(var(--i) * var(--_stg) + .096 * var(--_dur))}:where([data-animate]:not([data-steps])) :where(.tablechart-reference){opacity:1;transition-property:stroke-opacity}:where([data-animate]:not([data-steps])) :where(.tablechart-head){opacity:1;transition-property:fill-opacity}:where([data-animate]:not([data-steps])) :where(.tablechart-hole[data-for=badge]){transition-duration:0s}:where([data-animate]:not([data-steps])) :where(.tablechart-hole:not([data-for])){transition:opacity linear;transition-delay:calc(var(--i) * var(--_stg) + .048 * var(--_dur) + .7 * var(--_fade))}[data-animate]:not([data-steps]):not(.is-shown) .tablechart-values .tablechart-value,[data-chart=scatter][data-animate]:not([data-steps]):not(.is-shown) .tablechart-categories[data-place=beside] span{color:#0000}[data-animate]:not([data-steps]):not(.is-shown) :is(.tablechart-name,.tablechart-badge,.tablechart-badge .tablechart-caption,.tablechart-centre){color:#0000;background-color:#0000;border-color:#0000}[data-animate]:not([data-steps]):not(.is-shown) .tablechart-name:before{background-color:#0000}[data-animate]:not([data-steps]):not(.is-shown) .tablechart-reference{stroke-opacity:0}[data-animate]:not([data-steps]):not(.is-shown) .tablechart-head{fill-opacity:0}:where([data-animate=grow]:is([data-chart=line],[data-chart=area]):not([data-steps])) :where(.tablechart-hole:not([data-for])){transition:transform var(--_rise) var(--_ease), opacity 0s linear var(--_rise)}:where([data-animate]){transition:opacity var(--tablechart-queue-duration,.4s) ease}:where([data-animate].tablechart-queued){opacity:0}}@media screen and (prefers-reduced-motion:reduce){:where([data-animate]) :where(*){transition-duration:1ms!important;transition-delay:0s!important}}@media screen{:where([data-animate][data-steps]) :where(.tablechart-series),:where([data-animate][data-steps]) :where(.tablechart-area-fill>*){clip-path:inset(-10px calc(100% + 10px) -10px -10px);transition:clip-path var(--_dur) ease}:where([data-animate][data-steps]) :where(.tablechart-area-fill){opacity:1;transition:none}:where([data-animate][data-steps]) :where(.tablechart-piece){transform-box:fill-box;transform-origin:bottom;transition:transform var(--_dur) var(--_ease);transition-delay:calc(var(--i,0) * var(--_stg))}:where([data-animate][data-steps]) :where(.tablechart-piece[data-grow=right]){transform-origin:0}:where([data-animate][data-steps]) :where(.tablechart-piece[data-grow=down]){transform-origin:top}:where([data-animate][data-steps]) :where(.tablechart-piece[data-grow=left]){transform-origin:100%}:where([data-animate][data-steps].is-shown) :where(.tablechart-bar){transform:scaleY(clamp(0, var(--_step,0) - var(--step,-1), 1))}:where([data-animate][data-steps].is-shown) :where(.tablechart-bar:is([data-grow=right],[data-grow=left])){transform:scaleX(clamp(0, var(--_step,0) - var(--step,-1), 1))}:where([data-animate][data-steps].is-shown) :where(.tablechart-piece){transform:scaleY(clamp(0, var(--_step,0) - var(--step,-1), 1))}:where([data-animate][data-steps].is-shown) :where(.tablechart-piece:is([data-grow=right],[data-grow=left])){transform:scaleX(clamp(0, var(--_step,0) - var(--step,-1), 1))}:where([data-animate][data-steps].is-shown) :where(.tablechart-value),:where([data-animate][data-steps].is-shown) :where(.tablechart-name),:where([data-animate][data-steps].is-shown) :where(.tablechart-head),:where([data-animate][data-steps].is-shown) :where(.tablechart-badge),:where([data-animate][data-steps].is-shown) :where(.tablechart-centre),:where([data-animate][data-steps].is-shown) :where(.tablechart-point),:where([data-animate][data-steps].is-shown) :where(.tablechart-hole){opacity:clamp(0, var(--_step,0) - var(--step,-1), 1)}:where([data-animate][data-steps].is-shown) :where(.tablechart-leader),:where([data-animate][data-steps].is-shown) :where(.tablechart-break[data-part=edge]){stroke-opacity:clamp(0, var(--_step,0) - var(--step,-1), 1)}:where([data-animate][data-steps].is-shown) :where(.tablechart-line){stroke-dashoffset:calc(var(--len) * (1 - clamp(0, var(--_step,0) - var(--step,-1), 1)))}:where([data-animate][data-steps].is-shown) :where(.tablechart-connector){clip-path:inset(-10px calc((1 - clamp(0, var(--_step,0) - var(--step,-1), 1)) * (100% + 20px) - 10px) -10px -10px)}:where([data-animate][data-steps].is-shown) :where(.tablechart-series),:where([data-animate][data-steps].is-shown) :where(.tablechart-area-fill>*){clip-path:inset(-10px calc((1 - var(--reveal,0)) * (100% + 20px) - 10px) -10px -10px)}:where([data-animate][data-steps].is-shown) :where(.tablechart-slice){stroke-dasharray:calc(var(--arc) * clamp(0, var(--_step,0) - var(--step,-1), 1)) calc(var(--circ) - var(--arc) * clamp(0, var(--_step,0) - var(--step,-1), 1))}}:where(.tablechart-controls){justify-content:var(--tablechart-control-justify,space-between);margin-top:var(--tablechart-control-gap,.75em);align-items:center;gap:.5em;display:flex}:where(.tablechart-controls) :where(button){padding:var(--tablechart-control-padding,.3em .7em);border:var(--tablechart-control-border,1px solid color-mix(in oklab, currentColor 30%, transparent));border-radius:var(--tablechart-control-radius,.4em);background:var(--tablechart-control-surface,none);color:inherit;font:inherit;cursor:pointer;align-items:center;gap:.35em;display:inline-flex}:where(.tablechart-controls) :where(button:disabled){opacity:.35;cursor:default}:where(.tablechart-controls) :where(.tablechart-control-icon svg){fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;width:.8em;height:.8em;display:block}@media print{:where([data-steps]){--_step:999!important}:where([data-steps] [data-from]){--reveal:1!important}:where(.tablechart-controls){display:none}}.tablechart-plot[data-hover]{cursor:default}.tablechart-plot[data-hover] :where(.tablechart-value){-webkit-user-select:none;user-select:none}.tablechart-tooltip{pointer-events:auto;text-align:start;z-index:1000;box-sizing:border-box;min-width:7em;max-width:min(18em,100vw - 16px);padding:var(--tablechart-tooltip-padding,.45em .7em);border:var(--tablechart-tooltip-border,1px solid color-mix(in oklab, currentColor 28%, transparent));border-radius:var(--tablechart-tooltip-radius,.4em);background:var(--tablechart-tooltip-surface,light-dark(#fff,oklch(from var(--tablechart-surface,Canvas) calc(l + .06) c h)));color:var(--tablechart-tooltip-color,var(--_color,CanvasText));box-shadow:var(--tablechart-tooltip-shadow,0 1px 3px #0000001f, 0 6px 18px #0000002e);line-height:1.35;position:fixed;top:0;left:0}.tablechart-tooltip[hidden]{display:none}.tablechart-tooltip-title{font-weight:600}.tablechart-tooltip-line{align-items:baseline;gap:.45em;display:flex}.tablechart-tooltip-name,.tablechart-tooltip-title{min-width:0}.tablechart-tooltip-value{white-space:nowrap;font-variant-numeric:tabular-nums;flex:none;margin-left:auto;padding-left:1em}.tablechart-tooltip-key{border-radius:50%;flex:none;align-self:center;width:.6em;height:.6em}.tablechart-tooltip-key[data-sample=line]{width:1.6em;height:.8em;mask-image:var(--_line), var(--_mark,none);border-radius:0;mask-position:50%;mask-size:contain;mask-repeat:no-repeat}.tablechart-tooltip-key[data-sample=box]{border-radius:.15em;width:.7em;height:.7em}.tablechart-tooltip-arrow{border:inherit;background:inherit;width:.6em;height:.6em;position:absolute;transform:translate(-50%,-50%)rotate(45deg)}[data-side=top]>.tablechart-tooltip-arrow{border-top-color:#0000;border-left-color:#0000;top:100%}[data-side=bottom]>.tablechart-tooltip-arrow{border-bottom-color:#0000;border-right-color:#0000;top:0}@media print{.tablechart-tooltip,:where(.tablechart,[data-chart]) :where(table,.chart-annotations){display:none}:where(.tablechart-plot){break-inside:avoid;page-break-inside:avoid}:where(.tablechart,[data-chart])>:where(figcaption){break-after:avoid;page-break-after:avoid}:where(.tablechart-categories,.tablechart-legend){break-before:avoid;page-break-before:avoid}[data-table=print]>:where(table),[data-table=always]>:where(table),[data-table=auto][data-left-out]>:where(table){clip-path:none;display:table;position:static}}.is-printing,.is-printing *{transition:none!important;animation:none!important}
|
|
1
|
+
:root{--cssimported-tablechart:true}.tablechart,:where([data-chart]){margin:var(--tablechart-margin,0);color:var(--tablechart-color,currentColor);font-size:var(--tablechart-font-size,1em);line-height:var(--tablechart-line-height,1.25)}.tablechart :where(figcaption),:where([data-chart]) :where(figcaption){margin-bottom:var(--tablechart-caption-gap,.5em);text-align:var(--tablechart-caption-align,left)}.tablechart,:where([data-chart]){position:relative}.tablechart :where(table),.tablechart :where(.chart-annotations),.tablechart :where(.chart-summary),:where([data-chart]) :where(table),:where([data-chart]) :where(.chart-annotations),:where([data-chart]) :where(.chart-summary){inset-inline:0;clip-path:inset(50%);margin:0;position:absolute;top:0}.tablechart[data-summary=always]>:where(.chart-summary),:where([data-chart])[data-summary=always]>:where(.chart-summary){clip-path:none;margin-top:var(--tablechart-summary-gap,1.5em);position:static}.tablechart[data-table]>:where(table),:where([data-chart])[data-table]>:where(table){border-collapse:collapse;margin-top:.75em}.tablechart[data-table]>:where(table) :where(th,td),:where([data-chart])[data-table]>:where(table) :where(th,td){text-align:start;padding:.2em 1.25em .2em 0}.tablechart[data-table]>:where(table) :where(td,thead th:not(:first-child)),:where([data-chart])[data-table]>:where(table) :where(td,thead th:not(:first-child)){text-align:end;font-variant-numeric:tabular-nums}.tablechart[data-table=always]>:where(table),:where([data-chart])[data-table=always]>:where(table){clip-path:none;position:static}@media (scripting:none){.tablechart :where(table),.tablechart :where(.chart-annotations),:where([data-chart]) :where(table),:where([data-chart]) :where(.chart-annotations){clip-path:none;position:static}.tablechart :where(.chart-summary),:where([data-chart]) :where(.chart-summary){display:none}}@media (scripting:enabled){.tablechart:where(:not([data-chart-empty]):not(:has(>.tablechart-plot))):after,:where([data-chart]):where(:not([data-chart-empty]):not(:has(>.tablechart-plot))):after{content:"";height:0;padding-top:max(var(--tablechart-min-height,200px), var(--_room,.38) * 100%);padding-bottom:1.5em;display:block}.tablechart :where(.tablechart-plot:not(.is-placed)),:where([data-chart]) :where(.tablechart-plot:not(.is-placed)){height:0;padding-top:max(var(--tablechart-min-height,200px), var(--_room,.38) * 100%);overflow:hidden}}:where([data-chart=donut]){--_room:.66}:where([data-chart=bar]){--_room:.5}.tablechart-plot{position:relative}.tablechart-plot :where(svg){width:100%;height:auto;display:block;overflow:visible}.tablechart-plot:not(.is-placed) :where(.tablechart-value,.tablechart-badge,.tablechart-name){visibility:hidden}.tablechart-sr{white-space:nowrap;clip-path:inset(50%);width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.tablechart-value{white-space:nowrap;font-size:var(--tablechart-value-size,calc(var(--tablechart-name-size,.95em) * 1.3));position:absolute;transform:translate(-50%,-100%)}.tablechart-value[data-place=outside]{color:var(--tablechart-value-color,currentColor)}.tablechart-value:where([data-place=outside],[data-place=below]) :where(.tablechart-minus){position:absolute;right:100%}.tablechart-value[data-place=inside]{color:var(--tablechart-bar-value-color,oklch(from var(--tablechart-bar-color,currentColor) calc(.18 + .8 * clamp(0, (.68 - l) * 1000, 1)) 0 0));transform:translate(-50%,-50%)}.tablechart-value[data-place=around]{color:var(--tablechart-value-color,currentColor);transform:translate(-50%,-50%)}.tablechart-value[data-place=below]{color:var(--tablechart-value-color,currentColor);transform:translate(-50%)}.tablechart-value[data-place=middle]{color:var(--tablechart-value-color,currentColor);transform:translate(-50%,-50%)}.tablechart-value[data-place=after]{color:var(--tablechart-value-color,currentColor);transform:translateY(-50%)}.tablechart-value[data-place=before]{color:var(--tablechart-value-color,currentColor);transform:translate(-100%,-50%)}.tablechart-value[data-place=none]{display:none}.tablechart-value[data-left-out]{visibility:hidden}.tablechart-value[data-place=inside][data-kind=up]{color:var(--tablechart-up-value-color,oklch(from var(--tablechart-up-color,var(--tablechart-bar-color,currentColor)) calc(.18 + .8 * clamp(0, (.68 - l) * 1000, 1)) 0 0))}.tablechart-value[data-place=inside][data-kind=down]{color:var(--tablechart-down-value-color,oklch(from var(--tablechart-down-color,var(--tablechart-bar-color,currentColor)) calc(.18 + .8 * clamp(0, (.68 - l) * 1000, 1)) 0 0))}.tablechart-value[data-place=inside][data-series]{color:var(--tablechart-piece-value-color,oklch(from var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas))) calc(.18 + .8 * clamp(0, (.68 - l) * 1000, 1)) 0 0))}.tablechart-value[data-place=inside][data-kind=total]{color:var(--tablechart-total-value-color,oklch(from var(--tablechart-total-color,var(--tablechart-bar-color,currentColor)) calc(.18 + .8 * clamp(0, (.68 - l) * 1000, 1)) 0 0))}.tablechart-name{white-space:nowrap;font-size:var(--tablechart-name-size,.95em);color:var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas)));position:absolute;transform:translateY(-50%)}.tablechart-legend{box-sizing:border-box;width:fit-content;max-width:100%;padding:var(--tablechart-legend-padding,0);border:var(--tablechart-legend-border,none);border-radius:var(--tablechart-legend-radius,0);background:var(--tablechart-legend-surface,none);margin-inline:auto;margin-top:var(--tablechart-legend-gap,.6em);font-size:var(--tablechart-name-size,.95em);flex-wrap:wrap;justify-content:center;gap:.3em 1.2em;display:flex}.tablechart-name[data-place=legend]{color:inherit;font-size:inherit;position:static;transform:none}.tablechart-name[data-place=legend]:before{content:"";vertical-align:-.05em;background:var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas)));width:1.6em;height:.8em;mask-image:var(--_line), var(--_mark,none);margin-right:.4em;display:inline-block;mask-position:50%;mask-size:contain;mask-repeat:no-repeat}.tablechart-name[data-place=legend][data-swatch=box]:before{vertical-align:-.05em;background:var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas)));border-radius:.15em;width:.7em;height:.7em;mask:none}.tablechart-name[data-place=legend],.tablechart-tooltip-key[data-sample]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H24'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-line=dashed],.tablechart-tooltip-key[data-sample][data-line=dashed]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H24' stroke-dasharray='4 2.5' stroke-linecap='butt'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-line=dotted],.tablechart-tooltip-key[data-sample][data-line=dotted]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H24' stroke-dasharray='0 3'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=circle],.tablechart-tooltip-key[data-sample][data-marker=circle]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='6' r='3.4' fill='white'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=circle][data-open],.tablechart-tooltip-key[data-sample][data-marker=circle][data-open]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='6' r='3.4'/%3E%3C/svg%3E");--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H8.6 M15.4 6H24'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=circle][data-open][data-line=dashed],.tablechart-tooltip-key[data-sample][data-marker=circle][data-open][data-line=dashed]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H8.6 M15.4 6H24' stroke-dasharray='4 2.5' stroke-linecap='butt'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=circle][data-open][data-line=dotted],.tablechart-tooltip-key[data-sample][data-marker=circle][data-open][data-line=dotted]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H8.6 M15.4 6H24' stroke-dasharray='0 3'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=square],.tablechart-tooltip-key[data-sample][data-marker=square]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='6' stroke-linecap='butt' fill='white'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=square][data-open],.tablechart-tooltip-key[data-sample][data-marker=square][data-open]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='6' stroke-linecap='butt'/%3E%3C/svg%3E");--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H9 M15 6H24'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=square][data-open][data-line=dashed],.tablechart-tooltip-key[data-sample][data-marker=square][data-open][data-line=dashed]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H9 M15 6H24' stroke-dasharray='4 2.5' stroke-linecap='butt'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=square][data-open][data-line=dotted],.tablechart-tooltip-key[data-sample][data-marker=square][data-open][data-line=dotted]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H9 M15 6H24' stroke-dasharray='0 3'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=diamond],.tablechart-tooltip-key[data-sample][data-marker=diamond]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpolygon points='12,1.9 16.1,6 12,10.1 7.9,6' fill='white'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=diamond][data-open],.tablechart-tooltip-key[data-sample][data-marker=diamond][data-open]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpolygon points='12,1.9 16.1,6 12,10.1 7.9,6'/%3E%3C/svg%3E");--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H7.9 M16.1 6H24'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=diamond][data-open][data-line=dashed],.tablechart-tooltip-key[data-sample][data-marker=diamond][data-open][data-line=dashed]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H7.9 M16.1 6H24' stroke-dasharray='4 2.5' stroke-linecap='butt'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-marker=diamond][data-open][data-line=dotted],.tablechart-tooltip-key[data-sample][data-marker=diamond][data-open][data-line=dotted]{--_line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6H7.9 M16.1 6H24' stroke-dasharray='0 3'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-line=none]{--_line:none}.tablechart-name[data-place=legend][data-line=none][data-marker=triangle]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpolygon points='12,1.6 16.4,9.6 7.6,9.6' fill='white'/%3E%3C/svg%3E")}.tablechart-name[data-place=legend][data-line=none][data-marker=size]{--_mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='white' stroke-width='1.4'%3E%3Ccircle cx='6' cy='8' r='2.6'/%3E%3Ccircle cx='15.5' cy='6' r='4.8'/%3E%3C/svg%3E")}.tablechart-tick,.tablechart-axis-title{white-space:nowrap;font-size:var(--tablechart-axis-size,var(--tablechart-name-size,.95em));color:var(--tablechart-axis-text-color,inherit);position:absolute}.tablechart-tick[data-place=below]{transform:translate(-50%)}.tablechart-tick[data-place=before]{transform:translate(-100%,-50%)}.tablechart-tick[data-place=none]{display:none}.tablechart-axis-title{transform:translate(-50%)}.tablechart-axis-title[data-axis=y]{writing-mode:vertical-rl;transform:translateY(-50%)rotate(180deg)}.tablechart-categories :where(span[data-kind=total]){display:none}.tablechart-categories :where(span[data-kind=slice]):before{content:"";width:var(--tablechart-legend-key-size,.6em);height:var(--tablechart-legend-key-size,.6em);background:var(--palette,color-mix(in oklab, var(--tablechart-slice-color,currentColor) max(var(--tablechart-slice-min,20%), calc(100% - var(--n) * var(--tablechart-slice-fade,15%))), var(--tablechart-surface,Canvas)));border-radius:50%;margin-right:.4em;display:inline-block}.tablechart-categories[data-place=key]{box-sizing:border-box;width:fit-content;max-width:100%;padding:var(--tablechart-legend-padding,0);border:var(--tablechart-legend-border,none);border-radius:var(--tablechart-legend-radius,0);background:var(--tablechart-legend-surface,none);flex-wrap:wrap;justify-content:center;gap:.3em 1.2em;margin-inline:auto;display:flex}.tablechart-categories[data-place=key] :where(span){white-space:nowrap;padding:0}.tablechart-categories[data-place=beside]{pointer-events:none;margin:0;display:block;position:absolute;inset:0}.tablechart-categories[data-place=beside] :where(span){text-align:right;width:max-content;max-width:min(var(--tablechart-name-max,40%), var(--_beside,100%));text-wrap:balance;hyphens:auto;hyphenate-limit-chars:6 3 3;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;overflow-wrap:break-word;min-width:min-content;padding:0;position:absolute;transform:translate(-100%,-50%)}.tablechart-categories{grid-template-columns:repeat(var(--_columns,1), minmax(0, 1fr));margin-top:var(--tablechart-name-gap,.45em);display:grid}.tablechart-categories :where(span){color:var(--tablechart-name-color,inherit);text-align:center;padding:var(--tablechart-name-padding,0 .2em);font-size:calc(var(--tablechart-name-size,.95em) * var(--_name-fit,1));hyphens:manual;overflow-wrap:normal}.tablechart-categories[data-thinned] :where(span){white-space:nowrap;justify-self:center;width:max-content}.tablechart-categories[data-thinned] :where(span[data-edge=start]){justify-self:start}.tablechart-categories[data-thinned] :where(span[data-edge=end]){justify-self:end}.tablechart-categories :where(span[data-left-out]){visibility:hidden}.tablechart-categories[data-ticks] :where(span:not([data-left-out])){position:relative}.tablechart-categories[data-ticks] :where(span:not([data-left-out])):before{content:"";bottom:100%;left:var(--_tick,50%);width:var(--tablechart-tick-width,var(--tablechart-grid-width,1px));height:var(--tablechart-tick-length,calc(var(--tablechart-name-gap,.45em) + var(--_tick-reach,0px)));background:var(--tablechart-tick-color,color-mix(in oklab, var(--tablechart-grid-color,currentColor) calc(var(--tablechart-tick-opacity,.22) * 100%), transparent));position:absolute;transform:translate(-50%)}:where([data-chart=scatter]) .tablechart-categories[data-place=beside] :where(span){text-align:left;max-width:12em;transform:none}:where([data-chart=scatter]) .tablechart-categories[data-place=beside] :where(span)[data-side=left]{text-align:right}:where([data-chart=scatter]) .tablechart-categories[data-place=beside] :where(span):is([data-side=above],[data-side=below]){text-align:center}:where([data-chart=scatter]) .tablechart-categories[data-place=beside] :where(span)[data-left-out]{visibility:hidden}:where([data-chart=scatter]) .tablechart-categories[data-place=beside] :where(span)[data-more]:after{content:" +" attr(data-more)}.tablechart-bar{fill:var(--tablechart-bar-color,currentColor)}.tablechart-bar[data-kind=up]{fill:var(--tablechart-up-color,var(--tablechart-bar-color,currentColor))}.tablechart-bar[data-kind=down]{fill:var(--tablechart-down-color,var(--tablechart-bar-color,currentColor))}.tablechart-bar[data-kind=total]{fill:var(--tablechart-total-color,var(--tablechart-bar-color,currentColor))}.tablechart-bar[data-series],.tablechart-piece{fill:var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas)))}.tablechart-plot[data-grouped] :where(.tablechart-value){font-size:calc(var(--tablechart-value-group-size,.95em) * var(--_fit,1))}.tablechart-rule{stroke:var(--tablechart-baseline-color,currentColor);stroke-width:var(--tablechart-baseline-width,1px);opacity:var(--tablechart-baseline-opacity,.45);vector-effect:non-scaling-stroke}.tablechart-connector{stroke:var(--tablechart-connector-color,currentColor);stroke-width:var(--tablechart-connector-width,1px);stroke-dasharray:var(--tablechart-connector-dash,2 3);opacity:var(--tablechart-connector-opacity,.55);fill:none;vector-effect:non-scaling-stroke}.tablechart-series{stroke:var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas)));stroke-width:var(--tablechart-series-width,2px);stroke-linecap:round;fill:none;vector-effect:non-scaling-stroke}.tablechart-area{fill:var(--tablechart-area-color,var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas))));opacity:var(--tablechart-area-opacity,.25)}.tablechart-area[data-muted]{opacity:calc(var(--tablechart-area-opacity,.25) / 2)}.tablechart-area[data-stacked]{opacity:var(--tablechart-area-opacity,.5)}.tablechart-area[data-stacked][data-muted]{opacity:calc(var(--tablechart-area-opacity,.5) / 2)}.tablechart-series[data-line=dashed]{stroke-dasharray:var(--tablechart-series-dash,6 4)}.tablechart-series[data-line=dotted]{stroke-dasharray:var(--tablechart-series-dot,0 4)}.tablechart-point{fill:var(--tablechart-point-color,var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas))))}.tablechart-point[data-open]{fill:none;stroke:var(--tablechart-point-color,var(--tablechart-series-own-color,color-mix(in oklab, var(--palette,color-mix(in oklab, var(--tablechart-series-color,var(--tablechart-bar-color,currentColor)) max(var(--tablechart-series-min,40%), calc((100% - var(--n,0) * min(var(--tablechart-series-fade,30%), calc((100% - var(--tablechart-series-min,40%)) / max(var(--_series-count,2) - 1, 1)))) * (1 - var(--m,0)) + var(--m,0) * 100%)), var(--tablechart-surface,Canvas))) calc(100% - var(--m,0) * (100% - var(--tablechart-series-muted-share,45%))), var(--tablechart-surface,Canvas))));stroke-width:var(--tablechart-series-width,2px);vector-effect:non-scaling-stroke}:where([data-chart=scatter]) .tablechart-point{stroke:var(--tablechart-surface,Canvas);stroke-width:calc(2 * var(--tablechart-marker-gap,2px));stroke-linejoin:round;paint-order:stroke;vector-effect:non-scaling-stroke}.tablechart-axis{fill:none;stroke:var(--tablechart-axis-color,color-mix(in oklab, currentColor 55%, transparent));stroke-width:var(--tablechart-axis-width,1px);vector-effect:non-scaling-stroke}.tablechart-grid{fill:none;stroke:var(--tablechart-grid-color,currentColor);stroke-width:var(--tablechart-grid-width,1px);opacity:var(--tablechart-grid-opacity,.09);vector-effect:non-scaling-stroke}:where(.tablechart-grid[data-gap],.tablechart-quadrant[data-gap]){stroke-opacity:0}.tablechart-slice{fill:none;stroke:var(--palette,color-mix(in oklab, var(--tablechart-slice-color,currentColor) max(var(--tablechart-slice-min,20%), calc(100% - var(--n) * var(--tablechart-slice-fade,15%))), var(--tablechart-surface,Canvas)))}.tablechart-divide{stroke:#000;stroke-width:var(--tablechart-slice-gap,4);fill:none}.tablechart-leader{stroke:var(--tablechart-leader-color,currentColor);stroke-width:var(--tablechart-leader-width,1px);opacity:var(--tablechart-leader-opacity,.45);fill:none;vector-effect:non-scaling-stroke}.tablechart-centre{white-space:nowrap;text-align:center;font-size:var(--tablechart-centre-size,1.6em);color:var(--tablechart-centre-color,currentColor);position:absolute;transform:translate(-50%,-50%)}.tablechart-break[data-part=edge]{fill:none;stroke:var(--tablechart-break-color,currentColor);stroke-width:var(--tablechart-break-width,1px);opacity:var(--tablechart-break-opacity,1);stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.tablechart-line{stroke:var(--tablechart-annotation-color,currentColor);stroke-width:var(--tablechart-annotation-width,1.25px);fill:none;stroke-linecap:butt;stroke-linejoin:miter;vector-effect:non-scaling-stroke}.tablechart-reference{fill:none;stroke:var(--tablechart-annotation-color,currentColor);stroke-width:var(--tablechart-annotation-width,1.25px);stroke-dasharray:6 4;vector-effect:non-scaling-stroke}.tablechart-reference[data-line=dotted]{stroke-dasharray:0 4;stroke-linecap:round}.tablechart-quadrant{fill:none;stroke:var(--tablechart-quadrant-color,var(--tablechart-annotation-color,currentColor));stroke-width:var(--tablechart-quadrant-width,1.5px);stroke-dasharray:var(--tablechart-quadrant-dash,6 4);opacity:var(--tablechart-quadrant-opacity,.7);vector-effect:non-scaling-stroke}.tablechart-quadrant-name{color:var(--tablechart-quadrant-name-color,color-mix(in oklab, currentColor 60%, transparent));font-size:var(--tablechart-quadrant-name-size,.85em);font-weight:var(--tablechart-quadrant-name-weight,600);white-space:nowrap;pointer-events:none;position:absolute}.tablechart-quadrant-name[data-corner~=right]{transform:translate(-100%)}.tablechart-quadrant-name[data-corner~=bottom]{transform:translateY(-100%)}.tablechart-quadrant-name[data-corner~=bottom][data-corner~=right]{transform:translate(-100%,-100%)}.tablechart-badge[data-kind=reference]{white-space:nowrap;border:0;border-radius:0;padding:.2em .4em}.tablechart-head{fill:var(--tablechart-annotation-color,currentColor)}.tablechart-badge{background:var(--tablechart-badge-surface,none);color:var(--tablechart-annotation-color,currentColor);border:var(--tablechart-badge-border-width,1px) solid currentColor;border-radius:var(--tablechart-badge-radius,.4em);padding:var(--tablechart-badge-padding,.4em .8em);white-space:nowrap;line-height:1;position:absolute;transform:translate(-50%,-50%)}.tablechart-badge :where(.tablechart-caption){color:var(--tablechart-color,currentColor);background:0 0;border:0;position:absolute;bottom:calc(100% + .45em);left:50%;transform:translate(-50%)}@media screen{:where([data-animate],[data-animate] .tablechart-plot){--_el:var(--tablechart-animation-element-duration,var(--_element,.5s));--_max:var(--tablechart-animation-max,calc(4 * var(--_el)));--_r:var(--tablechart-animation-stagger,var(--_ratio,.24));--_dur:min(var(--_el), calc(var(--_max) / (1 + var(--_keep,0) * (var(--count,1) - 1) * var(--_r))));--_stg:min(calc(var(--_r) * var(--_el)), max(0s, calc((var(--_max) - var(--_dur)) / max(var(--count,1) - 1, 1))));--_fade:min(var(--_dur), calc(var(--_max) / 4), .6s);--_ease:var(--tablechart-animation-ease,var(--_easing,cubic-bezier(.26, .86, .44, .985)));--_build:min(calc(.6 * var(--count,1) * var(--_dur)), calc(var(--_max) - var(--_fade)));--_steptime:min(calc(.65 * var(--_dur)), calc(var(--_max) / (var(--count,1) - .08)));--_rise:min(calc(var(--_el) * 1.6), calc(var(--_max) - var(--_fade)));--_ring:calc(var(--_dur) + (var(--count,1) - 1) * var(--_stg))}:where([data-animate]) :where(.tablechart-bar){transform-box:fill-box;transform-origin:bottom;transition:transform var(--_dur) var(--_ease);transition-delay:calc(var(--i) * var(--_stg));transform:scaleY(0)}:where([data-animate]) :where(.tablechart-bar[data-grow=down]){transform-origin:top}:where([data-animate]) :where(.tablechart-bar[data-grow=right]){transform-origin:0;transform:scaleX(0)}:where([data-animate]) :where(.tablechart-bar[data-grow=left]){transform-origin:100%;transform:scaleX(0)}:where([data-animate]) :where(.tablechart-series){clip-path:inset(-10px calc(100% + 10px) -10px -10px);transition:clip-path calc(var(--d,1) * var(--_stg)) linear;transition-delay:calc(max(var(--i) - 1, 0) * var(--_stg))}:where([data-animate]) :where(.tablechart-area-fill){opacity:0;transition:opacity calc(max(var(--rows) - 1, 1) * var(--_stg)) linear;transition-delay:calc(max(var(--i) - 1, 0) * var(--_stg))}:where([data-animate]) :where(.tablechart-point,.tablechart-hole){opacity:0;transition:opacity var(--_fade) ease;transition-delay:calc(var(--i) * var(--_stg) + .048 * var(--_dur))}:where([data-animate]) :where(.tablechart-hole[data-for=badge]){transition:opacity .3s;transition-delay:calc(var(--after) * var(--_stg) + .35s)}:where([data-animate]) :where([data-chart=scatter] .tablechart-point){transform-box:fill-box;transform-origin:50%;transition:transform var(--_dur) var(--_ease), opacity var(--_fade) ease;transition-delay:calc(var(--i) * var(--_stg));transform:scale(0)}:where([data-animate]) :where(.tablechart-value,.tablechart-name,.tablechart-legend,[data-chart=scatter] .tablechart-categories span,.tablechart-hole[data-for=text]){opacity:0;transition:opacity var(--_fade) ease;transition-delay:calc(var(--i) * var(--_stg) + var(--_lag,.096) * var(--_dur))}:where([data-animate]) :where(.tablechart-grid[data-gap],.tablechart-quadrant[data-gap]){stroke-opacity:1;transition:stroke-opacity var(--_fade) ease;transition-delay:calc(var(--i,0) * var(--_stg) + var(--_lag,.096) * var(--_dur))}:where([data-animate]) :where(.tablechart-grid[data-gap=badge]){transition-delay:calc(var(--after) * var(--_stg) + .35s)}:where([data-animate]) :where(.tablechart-connector){clip-path:inset(-10px calc(100% + 10px) -10px -10px);transition:clip-path calc(var(--_dur) / 3) linear;transition-delay:calc(var(--i) * var(--_stg))}:where([data-animate]) :where(.tablechart-slice){stroke-dasharray:0 var(--circ);transition:stroke-dasharray var(--_dur) var(--_ease);transition-delay:calc(var(--i) * var(--_stg))}:where([data-animate]) :where(.tablechart-centre){opacity:0;transition:opacity var(--_fade) ease;transition-delay:calc(var(--i,0) * var(--_stg) + .5 * var(--_dur))}:where([data-animate]) :where(.tablechart-leader){stroke-opacity:0;transition:stroke-opacity var(--_fade) ease;transition-delay:calc(var(--i,0) * var(--_stg) + .5 * var(--_dur))}:where([data-animate]) :where([data-chart=donut] .tablechart-value){transition-delay:calc(var(--i,0) * var(--_stg) + .5 * var(--_dur))}:where([data-animate]) :where(.tablechart-break[data-part=edge]){stroke-opacity:0;transition:stroke-opacity .2s;transition-delay:calc((var(--after) + .9) * var(--_stg))}:where([data-animate]) :where(.tablechart-line){stroke-dasharray:var(--len);stroke-dashoffset:var(--len);transition:stroke-dashoffset var(--tablechart-annotation-duration,.6s) var(--_ease);transition-delay:calc(var(--after) * var(--_stg))}:where([data-animate]) :where(.tablechart-reference){opacity:0;transition:opacity .3s;transition-delay:calc(var(--after) * var(--_stg) + .35s)}:where([data-animate]) :where(.tablechart-head){opacity:0;transition:opacity .2s;transition-delay:calc(var(--after) * var(--_stg) + .55s)}:where([data-animate]) :where(.tablechart-badge){opacity:0;transition:opacity .3s;transition-delay:calc(var(--after) * var(--_stg) + .35s)}:where([data-chart=column],[data-chart=bar]){--_element:.8s;--_ratio:clamp(.06, calc(2.4 / var(--count,1)), .24);--_easing:cubic-bezier(.37, 0, .63, 1)}:where([data-animate]:is([data-chart=column],[data-chart=bar])){--_lag:.8}:where([data-animate][data-chart=waterfall]){--_lag:.5}:where([data-chart=waterfall]:not([data-animate=sweep])){--_ratio:.6;--_keep:1}:where([data-animate=sweep][data-chart=waterfall]:not([data-steps])) :where(.tablechart-bar,.tablechart-connector){transition-duration:calc(var(--span,1) * var(--_build));transition-timing-function:var(--ease,linear);transition-delay:calc(var(--start,0) * var(--_build))}:where([data-animate=sweep][data-chart=waterfall]:not([data-steps])) :where(.tablechart-value,.tablechart-grid[data-gap],.tablechart-quadrant[data-gap]){transition-delay:calc((var(--start,0) + .5 * var(--span,0)) * var(--_build))}:where([data-animate=sweep][data-chart=waterfall]:not([data-steps])) :where(.tablechart-badge,.tablechart-hole[data-for=badge],.tablechart-grid[data-gap=badge]){transition-delay:calc(var(--_build) + .2s)}:where([data-animate=sweep][data-chart=waterfall]:not([data-steps])) :where(.tablechart-break[data-part=edge]){transition-delay:calc((var(--start,0) + var(--span,1)) * var(--_build))}:where([data-animate][data-chart=waterfall][data-steps]) :where(.tablechart-bar){transition-duration:calc(.923 * var(--_steptime));transition-delay:calc(var(--i) * var(--_steptime))}:where([data-animate][data-chart=waterfall][data-steps]) :where(.tablechart-connector){transition:clip-path calc(.308 * var(--_steptime)) linear;transition-delay:calc((var(--i) - 1) * var(--_steptime) + calc(.692 * var(--_steptime)))}:where([data-animate][data-chart=waterfall][data-steps]) :where(.tablechart-value,.tablechart-hole[data-for=text]){transition-delay:calc(var(--i) * var(--_steptime) + calc(.923 * var(--_steptime)) * .5)}:where([data-animate][data-chart=waterfall][data-steps]) :where(.tablechart-badge,.tablechart-hole[data-for=badge]){transition-delay:calc(var(--after) * var(--_steptime) + .2s)}:where([data-animate].is-shown) :where(.tablechart-bar){transform:scaleY(1)}:where([data-animate].is-shown) :where(.tablechart-bar:is([data-grow=right],[data-grow=left])){transform:scaleX(1)}:where([data-animate].is-shown) :where(.tablechart-series){clip-path:inset(-10px)}:where([data-animate].is-shown) :where(.tablechart-point),:where([data-animate].is-shown) :where(.tablechart-hole),:where([data-animate].is-shown) :where(.tablechart-area-fill){opacity:1}:where([data-animate].is-shown) :where([data-chart=scatter] .tablechart-point){transform:none}:where([data-animate].is-shown) :where(.tablechart-grid[data-gap],.tablechart-quadrant[data-gap]){stroke-opacity:0}:where([data-animate].is-shown) :where(.tablechart-reference),:where([data-animate].is-shown) :where(.tablechart-value),:where([data-animate].is-shown) :where(.tablechart-name),:where([data-animate].is-shown) :where(.tablechart-legend),:where([data-animate].is-shown) :where([data-chart=scatter] .tablechart-categories span),:where([data-animate].is-shown) :where(.tablechart-head),:where([data-animate].is-shown) :where(.tablechart-badge),:where([data-animate].is-shown) :where(.tablechart-centre){opacity:1}:where([data-animate].is-shown) :where(.tablechart-leader),:where([data-animate].is-shown) :where(.tablechart-break[data-part=edge]){stroke-opacity:1}:where([data-animate].is-shown) :where(.tablechart-slice){stroke-dasharray:var(--arc) calc(var(--circ) - var(--arc))}:where([data-animate].is-shown) :where(.tablechart-connector){clip-path:inset(-10px)}:where([data-animate].is-shown) :where(.tablechart-line){stroke-dashoffset:0}:where([data-animate=grow]:is([data-chart=line],[data-chart=area])) :where(.tablechart-series,.tablechart-area){clip-path:none;transform-box:view-box;transform-origin:0 var(--_base);transition:transform var(--_rise) var(--_ease);transition-delay:0s;transform:scaleY(0)}:where([data-animate=grow]:is([data-chart=line],[data-chart=area])) :where(.tablechart-area-fill){opacity:1;transition:none}:where([data-animate=grow]:is([data-chart=line],[data-chart=area])) :where(.tablechart-point,.tablechart-hole:not([data-for])){opacity:0;transform:translateY(var(--rise,0));transition:transform var(--_rise) var(--_ease), opacity .15s ease;transition-delay:0s}:where([data-animate=grow]:is([data-chart=line],[data-chart=area])) :where(.tablechart-value,.tablechart-name,.tablechart-grid[data-gap=""],.tablechart-quadrant[data-gap=""]){transition-delay:var(--_rise)}:where([data-animate=grow]:is([data-chart=line],[data-chart=area]).is-shown) :where(.tablechart-series,.tablechart-area){transform:scaleY(1)}:where([data-animate=grow]:is([data-chart=line],[data-chart=area]).is-shown) :where(.tablechart-point,.tablechart-hole:not([data-for])){opacity:1;transform:none}:where([data-animate=sweep][data-chart=donut]) :where(.tablechart-slice){transition:stroke-dasharray calc(var(--span,1) * var(--_ring)) var(--ease,linear);transition-delay:calc(var(--start,0) * var(--_ring))}:where([data-animate=sweep][data-chart=donut]) :where(.tablechart-leader,.tablechart-value){transition-delay:calc((var(--start,0) + var(--span,0)) * var(--_ring))}:where([data-animate=sweep][data-chart=donut]) :where(.tablechart-centre){transition-delay:calc(.5 * var(--_ring))}:where([data-animate]:not([data-steps])) :where(.tablechart-values .tablechart-value,[data-chart=scatter] .tablechart-categories[data-place=beside] span){opacity:1;transition-property:color}:where([data-animate]:not([data-steps])) :where(.tablechart-name,.tablechart-legend,.tablechart-badge,.tablechart-centre){opacity:1;transition-property:color,border-color,background-color}:where([data-animate]:not([data-steps])) :where(.tablechart-badge){transition-duration:.3s,.3s,0s}:where([data-animate]:not([data-steps])) :where(.tablechart-grid[data-gap=badge]){transition-duration:0s}:where([data-animate]:not([data-steps])) :where(.tablechart-name):before{transition:background-color var(--_fade) ease;transition-delay:calc(var(--i) * var(--_stg) + .096 * var(--_dur))}:where([data-animate]:not([data-steps])) :where(.tablechart-reference){opacity:1;transition-property:stroke-opacity}:where([data-animate]:not([data-steps])) :where(.tablechart-head){opacity:1;transition-property:fill-opacity}:where([data-animate]:not([data-steps])) :where(.tablechart-hole[data-for=badge]){transition-duration:0s}:where([data-animate]:not([data-steps])) :where(.tablechart-hole:not([data-for])){transition:opacity linear;transition-delay:calc(var(--i) * var(--_stg) + .048 * var(--_dur) + .7 * var(--_fade))}[data-animate]:not([data-steps]):not(.is-shown) .tablechart-values .tablechart-value,[data-chart=scatter][data-animate]:not([data-steps]):not(.is-shown) .tablechart-categories[data-place=beside] span{color:#0000}[data-animate]:not([data-steps]):not(.is-shown) :is(.tablechart-name,.tablechart-badge,.tablechart-badge .tablechart-caption,.tablechart-centre){color:#0000;background-color:#0000;border-color:#0000}[data-animate]:not([data-steps]):not(.is-shown) .tablechart-legend{background-color:#0000;border-color:#0000}[data-animate]:not([data-steps]):not(.is-shown) .tablechart-name:before{background-color:#0000}[data-animate]:not([data-steps]):not(.is-shown) .tablechart-reference{stroke-opacity:0}[data-animate]:not([data-steps]):not(.is-shown) .tablechart-head{fill-opacity:0}:where([data-animate=grow]:is([data-chart=line],[data-chart=area]):not([data-steps])) :where(.tablechart-hole:not([data-for])){transition:transform var(--_rise) var(--_ease), opacity 0s linear var(--_rise)}:where([data-animate]){transition:opacity var(--tablechart-queue-duration,.4s) ease}:where([data-animate].tablechart-queued){opacity:0}}@media screen and (prefers-reduced-motion:reduce){:where([data-animate]) :where(*){transition-duration:1ms!important;transition-delay:0s!important}}@media screen{:where([data-animate][data-steps]) :where(.tablechart-series),:where([data-animate][data-steps]) :where(.tablechart-area-fill>*){clip-path:inset(-10px calc(100% + 10px) -10px -10px);transition:clip-path var(--_dur) ease}:where([data-animate][data-steps]) :where(.tablechart-area-fill){opacity:1;transition:none}:where([data-animate][data-steps]) :where(.tablechart-piece){transform-box:fill-box;transform-origin:bottom;transition:transform var(--_dur) var(--_ease);transition-delay:calc(var(--i,0) * var(--_stg))}:where([data-animate][data-steps]) :where(.tablechart-piece[data-grow=right]){transform-origin:0}:where([data-animate][data-steps]) :where(.tablechart-piece[data-grow=down]){transform-origin:top}:where([data-animate][data-steps]) :where(.tablechart-piece[data-grow=left]){transform-origin:100%}:where([data-animate][data-steps].is-shown) :where(.tablechart-bar){transform:scaleY(clamp(0, var(--_step,0) - var(--step,-1), 1))}:where([data-animate][data-steps].is-shown) :where(.tablechart-bar:is([data-grow=right],[data-grow=left])){transform:scaleX(clamp(0, var(--_step,0) - var(--step,-1), 1))}:where([data-animate][data-steps].is-shown) :where(.tablechart-piece){transform:scaleY(clamp(0, var(--_step,0) - var(--step,-1), 1))}:where([data-animate][data-steps].is-shown) :where(.tablechart-piece:is([data-grow=right],[data-grow=left])){transform:scaleX(clamp(0, var(--_step,0) - var(--step,-1), 1))}:where([data-animate][data-steps].is-shown) :where(.tablechart-value),:where([data-animate][data-steps].is-shown) :where(.tablechart-name),:where([data-animate][data-steps].is-shown) :where(.tablechart-legend),:where([data-animate][data-steps].is-shown) :where([data-chart=scatter] .tablechart-categories span),:where([data-animate][data-steps].is-shown) :where(.tablechart-head),:where([data-animate][data-steps].is-shown) :where(.tablechart-badge),:where([data-animate][data-steps].is-shown) :where(.tablechart-centre),:where([data-animate][data-steps].is-shown) :where(.tablechart-point),:where([data-animate][data-steps].is-shown) :where(.tablechart-hole){opacity:clamp(0, var(--_step,0) - var(--step,-1), 1)}:where([data-animate][data-steps].is-shown) :where(.tablechart-leader),:where([data-animate][data-steps].is-shown) :where(.tablechart-break[data-part=edge]){stroke-opacity:clamp(0, var(--_step,0) - var(--step,-1), 1)}:where([data-animate][data-steps].is-shown) :where(.tablechart-line){stroke-dashoffset:calc(var(--len) * (1 - clamp(0, var(--_step,0) - var(--step,-1), 1)))}:where([data-animate][data-steps].is-shown) :where(.tablechart-connector){clip-path:inset(-10px calc((1 - clamp(0, var(--_step,0) - var(--step,-1), 1)) * (100% + 20px) - 10px) -10px -10px)}:where([data-animate][data-steps].is-shown) :where(.tablechart-series),:where([data-animate][data-steps].is-shown) :where(.tablechart-area-fill>*){clip-path:inset(-10px calc((1 - var(--reveal,0)) * (100% + 20px) - 10px) -10px -10px)}:where([data-animate][data-steps].is-shown) :where(.tablechart-slice){stroke-dasharray:calc(var(--arc) * clamp(0, var(--_step,0) - var(--step,-1), 1)) calc(var(--circ) - var(--arc) * clamp(0, var(--_step,0) - var(--step,-1), 1))}}:where(.tablechart-controls){justify-content:var(--tablechart-control-justify,space-between);margin-top:var(--tablechart-control-gap,.75em);align-items:center;gap:.5em;display:flex}:where(.tablechart-controls) :where(button){padding:var(--tablechart-control-padding,.3em .7em);border:var(--tablechart-control-border,1px solid color-mix(in oklab, currentColor 30%, transparent));border-radius:var(--tablechart-control-radius,.4em);background:var(--tablechart-control-surface,none);color:inherit;font:inherit;cursor:pointer;align-items:center;gap:.35em;display:inline-flex}:where(.tablechart-controls) :where(button:disabled){opacity:.35;cursor:default}:where(.tablechart-controls) :where(.tablechart-control-icon svg){fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;width:.8em;height:.8em;display:block}@media print{:where([data-steps]){--_step:999!important}:where([data-steps] [data-from]){--reveal:1!important}:where(.tablechart-controls){display:none}}.tablechart-plot[data-hover]{cursor:default}.tablechart-plot[data-hover] :where(.tablechart-value){-webkit-user-select:none;user-select:none}.tablechart-tooltip{pointer-events:auto;text-align:start;z-index:1000;box-sizing:border-box;min-width:7em;max-width:min(18em,100vw - 16px);padding:var(--tablechart-tooltip-padding,.45em .7em);border:var(--tablechart-tooltip-border,1px solid color-mix(in oklab, currentColor 28%, transparent));border-radius:var(--tablechart-tooltip-radius,.4em);background:var(--tablechart-tooltip-surface,light-dark(#fff,oklch(from var(--tablechart-surface,Canvas) calc(l + .06) c h)));color:var(--tablechart-tooltip-color,var(--_color,CanvasText));box-shadow:var(--tablechart-tooltip-shadow,0 1px 3px #0000001f, 0 6px 18px #0000002e);line-height:1.35;position:fixed;top:0;left:0}.tablechart-tooltip[hidden]{display:none}.tablechart-tooltip-title{font-weight:600}.tablechart-tooltip-line{align-items:baseline;gap:.45em;display:flex}.tablechart-tooltip-name,.tablechart-tooltip-title{min-width:0}.tablechart-tooltip-note{max-width:16em;margin-top:.3em;font-style:italic}.tablechart-tooltip-value{white-space:nowrap;font-variant-numeric:tabular-nums;flex:none;margin-left:auto;padding-left:1em}.tablechart-tooltip-key{border-radius:50%;flex:none;align-self:center;width:.6em;height:.6em}.tablechart-tooltip-key[data-sample=line]{width:1.6em;height:.8em;mask-image:var(--_line), var(--_mark,none);border-radius:0;mask-position:50%;mask-size:contain;mask-repeat:no-repeat}.tablechart-tooltip-key[data-sample=box]{border-radius:.15em;width:.7em;height:.7em}.tablechart-tooltip-arrow{border:inherit;background:inherit;width:.6em;height:.6em;position:absolute;transform:translate(-50%,-50%)rotate(45deg)}[data-side=top]>.tablechart-tooltip-arrow{border-top-color:#0000;border-left-color:#0000;top:100%}[data-side=bottom]>.tablechart-tooltip-arrow{border-bottom-color:#0000;border-right-color:#0000;top:0}@media print{.tablechart-tooltip,:where(.tablechart,[data-chart]) :where(table,.chart-annotations){display:none}:where(.tablechart-plot){break-inside:avoid;page-break-inside:avoid}:where(.tablechart,[data-chart])>:where(figcaption){break-after:avoid;page-break-after:avoid}:where(.tablechart-categories,.tablechart-legend){break-before:avoid;page-break-before:avoid}[data-table=print]>:where(table),[data-table=always]>:where(table),[data-table=auto][data-left-out]:not([data-long])>:where(table){clip-path:none;display:table;position:static}[data-summary=print]>:where(.chart-summary),[data-summary=always]>:where(.chart-summary),[data-summary=auto][data-left-out]:not([data-table=print],[data-table=always],[data-table=auto]:not([data-long]))>:where(.chart-summary){clip-path:none;margin-top:var(--tablechart-summary-gap,1.5em);position:static}}.is-printing,.is-printing *,.is-printing :before,.is-printing :after,.is-at-once,.is-at-once *,.is-at-once :before,.is-at-once :after{transition:none!important;animation:none!important}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/tablechart.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as Config, a as TablechartChart, d as addType, j as defaultConfig, l as init, o as TablechartInstance, s as create, y as ChartType } from "./tablechart-shared.mjs";
|
|
2
2
|
export { type ChartType, type TablechartChart, type Config as TablechartConfig, type TablechartInstance, addType, create, defaultConfig, init };
|