@graphysdk/theme-halloween 0.0.0-stage → 0.1.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/LICENSE.md +17 -0
- package/README.md +61 -2
- package/dist/halloween.d.ts +17 -0
- package/dist/index.cjs +42 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +2156 -0
- package/dist/night.d.ts +10 -0
- package/dist/renderer/area.d.ts +5 -0
- package/dist/renderer/bar.d.ts +71 -0
- package/dist/renderer/candle.d.ts +41 -0
- package/dist/renderer/ghost.d.ts +11 -0
- package/dist/renderer/line.d.ts +9 -0
- package/dist/renderer/motion.d.ts +34 -0
- package/dist/renderer/plugins.d.ts +8 -0
- package/dist/renderer/point.d.ts +8 -0
- package/dist/renderer/pumpkin.d.ts +31 -0
- package/dist/renderer/railing.d.ts +45 -0
- package/dist/renderer/slice.d.ts +45 -0
- package/dist/renderer/utils/bar-box.d.ts +27 -0
- package/dist/renderer/utils/box-path.d.ts +7 -0
- package/dist/renderer/utils/ink.d.ts +17 -0
- package/dist/renderer/utils/paint.d.ts +21 -0
- package/dist/renderer/utils/paths.d.ts +7 -0
- package/dist/renderer/utils/projections.d.ts +16 -0
- package/dist/renderer/utils/trace.d.ts +19 -0
- package/dist/styles.d.ts +47 -0
- package/fonts.css +2 -0
- package/licenses/PolyForm-Free-Trial-1.0.0.md +93 -0
- package/licenses/PolyForm-NonCommercial-1.0.0.md +131 -0
- package/licenses/PolyForm-Small-Business-1.0.0.md +121 -0
- package/package.json +79 -3
- package/src/fonts.css.d.ts +2 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# License
|
|
2
|
+
|
|
3
|
+
This software is available under any of the following licenses, at your option,
|
|
4
|
+
depending on which one's conditions you meet:
|
|
5
|
+
|
|
6
|
+
- **PolyForm Noncommercial 1.0.0** — for noncommercial use (personal,
|
|
7
|
+
charitable, educational, research, government).
|
|
8
|
+
See [licenses/PolyForm-NonCommercial-1.0.0.md](licenses/PolyForm-NonCommercial-1.0.0.md)
|
|
9
|
+
|
|
10
|
+
- **PolyForm Small Business 1.0.0** — free commercial use for organizations
|
|
11
|
+
under the size thresholds defined in the license.
|
|
12
|
+
See [licenses/PolyForm-Small-Business-1.0.0.md](licenses/PolyForm-Small-Business-1.0.0.md)
|
|
13
|
+
|
|
14
|
+
- **PolyForm Free Trial 1.0.0** — a 32-day evaluation for anyone else.
|
|
15
|
+
See [licenses/PolyForm-Free-Trial-1.0.0.md](licenses/PolyForm-Free-Trial-1.0.0.md)
|
|
16
|
+
|
|
17
|
+
For commercial use beyond these terms, contact [hello@graphy.dev](mailto:hello@graphy.dev) or visit [https://graphy.dev](https://graphy.dev).
|
package/README.md
CHANGED
|
@@ -1,3 +1,62 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @graphysdk/theme-halloween
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
> **Beta.** This theme is on a `0.x` version line: a minor release may change its look. Use a caret range (`^0.1.0`) to take only patches.
|
|
4
|
+
|
|
5
|
+
A Halloween theme for the Graphy charting SDK: graphs in a churchyard on a moonlit night. Columns are headstones, candles or railing posts, chosen for the whole graph from the room its bars have, each ending exactly at its value. A pie or donut is a rose window lit by the moon, a line is a glowing trail with a little ghost riding its head, a scatter's readings are jack-o'-lanterns, and an area is a drift of mist.
|
|
6
|
+
|
|
7
|
+
Learn more at [graphy.dev](https://graphy.dev).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @graphysdk/theme-halloween @graphysdk/react
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires React 19. Its only peer is `@graphysdk/react`.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Pass the theme to `createGraphyKit` and import its fonts once. Every graph drawn through the kit's `GraphProvider` takes the theme; specs are written as usual.
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { createGraphyKit, GraphRenderer } from '@graphysdk/react';
|
|
23
|
+
import { halloween } from '@graphysdk/theme-halloween';
|
|
24
|
+
import '@graphysdk/theme-halloween/fonts.css';
|
|
25
|
+
|
|
26
|
+
const kit = createGraphyKit({ theme: halloween });
|
|
27
|
+
|
|
28
|
+
const spec = kit.pipe(
|
|
29
|
+
kit.createSpec({ x: 'quarter', y: 'revenue', color: 'region' }),
|
|
30
|
+
kit.geom.bar({ position: 'dodge' }),
|
|
31
|
+
kit.scale.x(),
|
|
32
|
+
kit.scale.y()
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export function Revenue({ data }) {
|
|
36
|
+
return (
|
|
37
|
+
<kit.GraphProvider spec={spec} data={data}>
|
|
38
|
+
<GraphRenderer />
|
|
39
|
+
</kit.GraphProvider>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
A spec's own `styles()`, scales and `config()` sit above the theme, so a graph can still change anything. The theme is drawn for a graph about 600 pixels wide; `style.graph({ textScale: 1.5 })` scales its type for a larger one.
|
|
45
|
+
|
|
46
|
+
When a graph plays its intro, columns rise into place, lines draw in with a ghost at their head, and lanterns light up in turn. A graph drawn with `animation={false}`, or for a viewer who prefers reduced motion, is drawn in its final state at once.
|
|
47
|
+
|
|
48
|
+
`fonts.css` loads Creepster, Cinzel and Nunito from Google Fonts. To host the fonts yourself, leave the import out and load families named `Creepster`, `Cinzel` and `Nunito` before the first graph is drawn.
|
|
49
|
+
|
|
50
|
+
## Docs
|
|
51
|
+
|
|
52
|
+
- [Halloween](https://docs.graphy.dev/sdk-next/themes/halloween)
|
|
53
|
+
|
|
54
|
+
## Feedback
|
|
55
|
+
|
|
56
|
+
This theme is released early to hear what works. Tell us on [Discord](https://discord.gg/yGmYCjkSr).
|
|
57
|
+
|
|
58
|
+
## Licence
|
|
59
|
+
|
|
60
|
+
This package is available under PolyForm Noncommercial, Small Business, or a 32-day Free Trial. Free Trial is local or internal evaluation only — it does not cover a public page. See [what you can do under the trial](https://docs.graphy.dev/licence/evaluation).
|
|
61
|
+
|
|
62
|
+
For a commercial licence, [talk to us](https://graphy.dev/license).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Theme } from '@graphysdk/react';
|
|
2
|
+
/**
|
|
3
|
+
* Graphs on a moonlit Halloween night: aubergine fading to black, a low moon with bats crossing it,
|
|
4
|
+
* faint stars and a cobweb in the corner. A bar is a pile of carved pumpkins glowing from inside, cut
|
|
5
|
+
* off flat at its value by its own rectangle. A pie or a donut is a pumpkin seen from above, its
|
|
6
|
+
* slices ribbed and its stem in the middle, with a candle glowing in a donut's hole. A line is a
|
|
7
|
+
* glowing trail with a little ghost riding its head as it draws in, a scatter's readings are
|
|
8
|
+
* jack-o'-lanterns, and an area is a drift of coloured mist. Groups take pumpkin, a witch's purple
|
|
9
|
+
* and slime first. Drawn for the dark scheme only.
|
|
10
|
+
*
|
|
11
|
+
* Titles are set in Creepster and everything else in Nunito. Import
|
|
12
|
+
* `@graphysdk/theme-halloween/fonts.css` once to load them.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const kit = createGraphyKit({ theme: halloween });
|
|
16
|
+
*/
|
|
17
|
+
export declare const halloween: Theme;
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let w=require("react"),u=require("@graphysdk/react"),n=require("react/jsx-runtime");var _e=/^#([0-9a-f]{6})$/iu,je=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/iu,ft=t=>{const e=_e.exec(t);if(e?.[1]!==void 0){const a=Number.parseInt(e[1],16);return[a>>16&255,a>>8&255,a&255]}const r=je.exec(t);return r?.[1]!==void 0&&r[2]!==void 0&&r[3]!==void 0?[Number(r[1]),Number(r[2]),Number(r[3])]:null},$=(t,e,r)=>{const a=ft(t),s=ft(e);if(a===null||s===null)return t;const[l,i,d]=a.map((o,c)=>Math.round(o+((s[c]??0)-o)*r));return`rgb(${l}, ${i}, ${d})`},W=t=>`${t}-${(0,w.useId)().replace(/[^a-zA-Z0-9]/gu,"")}`,pt=t=>{const e=W(t);return r=>`${e}-${r.replace(/[^a-zA-Z0-9]/gu,"")}`},mt=t=>{let e=2166136261;for(let r=0;r<t.length;r+=1)e^=t.charCodeAt(r),e=Math.imul(e,16777619);return e>>>0},at=t=>{let e=t||1;return()=>{e=e+1831565813|0;let r=Math.imul(e^e>>>15,1|e);return r=r+Math.imul(r^r>>>7,61|r)^r,((r^r>>>14)>>>0)/4294967296}},kt=t=>{const e=ft(t);if(e===null)return .5;const[r=0,a=0,s=0]=e.map(l=>{const i=l/255;return i<=.03928?i/12.92:((i+.055)/1.055)**2.4});return .2126*r+.7152*a+.0722*s},Re=(t,e)=>{const r=ft(t);if(r===null)return t;const[a,s,l]=r.map(j=>j/255),i=Math.max(a,s,l),d=Math.min(a,s,l),o=(i+d)/2;if(i===d)return t;const c=i-d,f=c/(1-Math.abs(2*o-1)),g=i===a?((s-l)/c+6)%6:i===s?(l-a)/c+2:(a-s)/c+4,p=(1-Math.abs(2*o-1))*Math.min(1,f*e),h=p*(1-Math.abs(g%2-1)),v=o-p/2,[m,x,S]=[[p,h,0],[h,p,0],[0,p,h],[0,h,p],[h,0,p],[p,0,h]][Math.floor(g)%6]??[0,0,0],E=j=>Math.round((j+v)*255);return`rgb(${E(m)}, ${E(x)}, ${E(S)})`},nt=t=>{const e=(0,u.useGeomStyleReader)(t);return(r,a)=>({color:(0,u.toPaintColor)(e.get("fill",r,a)),opacity:e.get("alpha",r,a),fillOpacity:e.get("fillAlpha",r,a),edge:e.get("stroke",r,a),edgeWidth:e.get("strokeWidth",r,a)})},he=t=>{const e=(0,u.useGeomStyleReader)(t);return(r,a)=>{const s=e.get("strokeWidth",r,a);return{color:e.get("stroke",r,a),opacity:e.get("alpha",r,a)*e.get("strokeAlpha",r,a),width:s,dashArray:(0,u.toStrokeDasharray)(e.get("dashArray",r,a),s)}}},$e=/[a-df-zA-DF-Z]|[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?/gu,ke=/^[a-zA-Z]$/u,Me=(t,e)=>t==="H"?"x":t==="V"?"y":e%2===0?"x":"y",$t=(t,e)=>{let r="",a=0;return(t.match($e)??[]).map(s=>{if(ke.test(s))return r=s.toUpperCase(),a=0,s;const l=Me(r,a);return a+=1,String(Number(s)*(l==="x"?e.width:e.height))}).join(" ")},Mt=(t,e)=>{const r=(0,u.getX)(t),a=(0,u.getY)(t)??(0,u.getYMax)(t);return r===null||a===null?null:{x:(0,u.toViewBoxX)(r)*e.width,y:(0,u.toViewBoxY)(a)*e.height}},xt=(t,e)=>{const r=(0,u.getX)(t),a=(0,u.getY)(t)??(0,u.getRadiusExtent)(t).outerRadius;if(r===null||a===null)return null;const s=(0,u.polarToUnit)(r,a),l=Math.min(e.width,e.height)/2;return{x:e.width/2+s.x*l,y:e.height/2-s.y*l}},Te=t=>`${t.map((e,r)=>`${r===0?"M":"L"}${e.x},${e.y}`).join(" ")} Z`,gt=(t,e)=>{const r=(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id),a=[];return t.data.groupBy(u.GROUP_VARIABLES.group).forEach(s=>{const l=[...s],[i]=l,d=e(l);i===void 0||d===null||a.push({key:r(i),observation:i,path:d})}),a},Le=(t,e)=>t.flatMap(r=>{const a=(0,u.getX)(r),s=xt(r,e);return a===null||s===null?[]:[{angle:a,point:s}]}).sort((r,a)=>r.angle-a.angle).map(({point:r})=>r),ue=(t,e)=>{const r=Le(t,e);return r.length===0?null:Te(r)},He=(t,e,r)=>{const a=(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id);return Array.from(t.data,s=>({observation:s,point:r(s,e)})).flatMap(({observation:s,point:l})=>l===null?[]:[{key:a(s),observation:s,point:l}])},Ce=.35,Ie=2,Oe=7,we=.2,Pe=6,fe=({layer:t,coordSystem:e,panel:r})=>{const a=nt(t),s=pt("mist"),l=(0,w.useMemo)(()=>{if(e===void 0)return gt(t,f=>ue(f,r)).map(f=>({...f,fill:f.path,edge:f.path}));const{areaGenerator:d,lineGenerator:o}=(0,u.createAreaPathGenerators)(e,t.params),c=new Map;return gt(t,f=>{const g=(0,u.prepareAreaObservations)(f,t.params.missingValues),p=d(g),h=o(g);if(!p)return null;const v=$t(p,r);return h&&c.set(v,$t(h,r)),v}).map(f=>({...f,fill:f.path,edge:c.get(f.path)??""}))},[t,e,r]);if(r.width<=0||r.height<=0)return null;const i=l.map(({observation:d})=>a(d));return(0,n.jsxs)("g",{"data-geom":"area",children:[(0,n.jsx)("defs",{children:[...new Map(i.map(d=>[d.color,d])).values()].map(d=>(0,n.jsxs)("linearGradient",{id:s(d.color),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,n.jsx)("stop",{offset:0,stopColor:d.color,stopOpacity:d.fillOpacity}),(0,n.jsx)("stop",{offset:1,stopColor:d.color,stopOpacity:d.fillOpacity*Ce})]},d.color))}),l.map(({key:d,fill:o,edge:c},f)=>{const g=i[f];return g===void 0?null:(0,n.jsxs)("g",{opacity:g.opacity,children:[(0,n.jsx)("path",{d:o,fill:`url(#${s(g.color)})`,"data-mist":""}),(0,n.jsx)("path",{d:c,fill:"none",stroke:g.color,strokeOpacity:we,strokeWidth:Oe,strokeLinejoin:"round",strokeLinecap:"round"}),(0,n.jsx)("path",{d:c,fill:"none",stroke:g.color,strokeWidth:Ie,strokeLinejoin:"round"})]},d)})]})},pe=({layer:t,observation:e,panel:r,project:a})=>{const s=nt(t)(e,"hovered"),l=a(e,r);return l===null?null:(0,n.jsx)("g",{"data-geom":"area",opacity:s.opacity,children:(0,n.jsx)("circle",{cx:l.x,cy:l.y,r:Pe,fill:s.color,stroke:s.edge,strokeWidth:1.5})})},De=(0,u.defineGeomRenderer)("area",{coord:"cartesian",guideMode:"crosshair",swatchShape:"area",render:({layer:t,coordSystem:e,panelRect:r})=>e.type!=="cartesian"?null:(0,n.jsx)(fe,{layer:t,coordSystem:e,panel:r}),renderHover:({layer:t,primary:e,panelRect:r})=>(0,n.jsx)(pe,{layer:t,observation:e.observation,panel:r,project:Mt}),renderHoverCompanions:()=>null}),Ge=(0,u.defineGeomRenderer)("area",{coord:"polar",guideMode:"crosshair",swatchShape:"area",render:({layer:t,panelRect:e})=>(0,n.jsx)(fe,{layer:t,panel:e}),renderHover:({layer:t,primary:e,panelRect:r})=>(0,n.jsx)(pe,{layer:t,observation:e.observation,panel:r,project:xt}),renderHoverCompanions:()=>null}),We={solo:{base:!0,value:!0},floor:{base:!0,value:!1},ceiling:{base:!1,value:!0},middle:{base:!1,value:!1}},Ne={top:"bottom",bottom:"top",left:"right",right:"left"},Fe={top:{x:0,y:-1},bottom:{x:0,y:1},right:{x:1,y:0},left:{x:-1,y:0}},Be=(t,e)=>e==="x"?((0,u.getYMax)(t)??(0,u.getY)(t)??0)>=((0,u.getYMin)(t)??0)?"top":"bottom":((0,u.getXMax)(t)??0)>=((0,u.getXMin)(t)??0)?"right":"left",be=(t,e,r)=>{const a=Math.max(0,t.width-r),s=Math.max(0,t.height-r);return e==="top"?{...t,y:t.y+t.height-s,height:s}:e==="bottom"?{...t,height:s}:e==="left"?{...t,x:t.x+t.width-a,width:a}:{...t,width:a}},Ue=(t,e,r,a)=>{const s=(0,u.getBarRectBounds)(e,t);if(!s||s.width<=0||s.height<=0)return null;const l=We[(0,u.getStackRole)(t)],i=Be(t,e),d={x:s.x*r.width,y:s.y*r.height,width:s.width*r.width,height:s.height*r.height},o=[l.value?[]:[i],l.base?[]:[Ne[i]]].flat().reduce((S,E)=>be(S,E,a/2),d),c=i==="top"||i==="bottom",f=c?o.width:o.height,g=c?o.height:o.width;if(f<=0||g<=0)return null;const p=Fe[i],h={x:o.x+o.width/2,y:o.y+o.height/2},v={x:h.x-p.x*o.width/2,y:h.y-p.y*o.height/2},m={x:Math.abs(p.y),y:Math.abs(p.x)},x=(S,E)=>({x:v.x+p.x*E+m.x*(S-f/2),y:v.y+p.y*E+m.y*(S-f/2)});return{rect:o,valueEdge:i,endsStack:l.value,startsStack:l.base,isColumn:c,breadth:f,length:g,foot:v,growth:p,at:x}},B=(t,e,r,a)=>[[[t,r]],[[t,a]],[[e,a]],[[e,r]]],k=(t,e,r=!0)=>{const a=e.map((s,l)=>{const i=s.map(([d,o])=>{const{x:c,y:f}=t.at(d,o);return`${Math.round(c*100)/100},${Math.round(f*100)/100}`});return l===0?`M${i.join(" ")}`:s.length===3?`C${i.join(" ")}`:`L${i.join(" ")}`}).join(" ");return r?`${a} Z`:a},L={rise:"halloween-rise",light:"halloween-light",kindle:"halloween-kindle",flicker:"halloween-flicker"},Ve=1.5,Ye=`
|
|
2
|
+
@keyframes ${L.rise} {
|
|
3
|
+
from { transform: translate(var(--halloween-from-x, 0px), var(--halloween-from-y, 0px)); opacity: 0.15; }
|
|
4
|
+
}
|
|
5
|
+
@keyframes ${L.light} {
|
|
6
|
+
from { transform: scale(0.15); opacity: 0; }
|
|
7
|
+
60% { opacity: 1; }
|
|
8
|
+
}
|
|
9
|
+
@keyframes ${L.kindle} {
|
|
10
|
+
from { opacity: 0; }
|
|
11
|
+
}
|
|
12
|
+
@keyframes ${L.flicker} {
|
|
13
|
+
0% { transform: scale(1, 1) skewX(0deg); }
|
|
14
|
+
30% { transform: scale(0.94, 1.06) skewX(-3deg); }
|
|
15
|
+
55% { transform: scale(1.04, 0.95) skewX(2deg); }
|
|
16
|
+
80% { transform: scale(0.97, 1.03) skewX(-1deg); }
|
|
17
|
+
100% { transform: scale(1, 1) skewX(0deg); }
|
|
18
|
+
}
|
|
19
|
+
.${L.rise} {
|
|
20
|
+
animation: ${L.rise} var(--halloween-duration, 0s) cubic-bezier(0.22, 0.75, 0.25, 1)
|
|
21
|
+
var(--halloween-delay, 0s) both;
|
|
22
|
+
}
|
|
23
|
+
.${L.light} {
|
|
24
|
+
transform-box: fill-box;
|
|
25
|
+
transform-origin: center;
|
|
26
|
+
animation: ${L.light} var(--halloween-duration, 0s) cubic-bezier(0.3, 1.4, 0.5, 1)
|
|
27
|
+
var(--halloween-delay, 0s) both;
|
|
28
|
+
}
|
|
29
|
+
.${L.flicker} {
|
|
30
|
+
transform-box: fill-box;
|
|
31
|
+
transform-origin: 50% 100%;
|
|
32
|
+
animation: ${L.flicker} 1.7s ease-in-out infinite;
|
|
33
|
+
}
|
|
34
|
+
.${L.kindle} {
|
|
35
|
+
animation: ${L.kindle} var(--halloween-duration, 0s) ease-in var(--halloween-delay, 0s) both;
|
|
36
|
+
}
|
|
37
|
+
@media (prefers-reduced-motion: reduce) {
|
|
38
|
+
.${L.rise}, .${L.light}, .${L.kindle}, .${L.flicker} {
|
|
39
|
+
animation: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`,Tt=()=>(0,n.jsx)("style",{children:Ye}),ge=(t,e)=>{if(t==null)return null;const r=t.type==="grow"?t.delayByKey[e]??0:0;return{duration:t.durationSeconds*Ve,delay:r}},Lt=(t,e={x:0,y:0})=>({"--halloween-duration":`${t.duration}s`,"--halloween-delay":`${t.delay}s`,"--halloween-from-x":`${e.x}px`,"--halloween-from-y":`${e.y}px`}),ze=t=>{const[e]=(0,w.useState)(()=>t!=null);return e},Ke=.66,Xe=30,Ot=1.4,Ze=.42,qe=4,Qe=.12,Je="#4A4352",tr="#8A8095",er="#1B1218",rr=.9,ar=7,nr=15,sr="#FF9F2E",or="#FFC94F",lr="#FFF6D6",Et="#FFD98A",ir="#0B0710",dr="#FFFFFF",wt="#FFF1D2",ve=t=>{const{breadth:e,length:r,startsStack:a}=t,s=Math.min(Xe,e*Ke),l=(e-s)/2,i=a?Math.min(qe,r*Qe):0,d=Math.max(2,Math.min(4,s*.3)),o=Math.max(ar,Math.min(nr,s*rr));return{left:l,right:l+s,dish:i,top:r,wick:d,flameFoot:r+d*.45,flameTip:r+d*.45+o}},cr=(t,e)=>{const r=at(mt(`${e}-drips`)),a=t.right-t.left,s=t.top-t.dish;if(a<5||s<10)return[];const l=2+Math.floor(r()*2);return Array.from({length:l},(i,d)=>{const o=d<2,c=Math.max(1.6,a*Ze*(.45+r()*.55)),f=o?d===0?t.left+c/2-Ot*r():t.right-c/2+Ot*r():t.left+c/2+r()*(a-c),g=r()<.3,p=Math.min(s*.55,(g?a*1.4:2)+r()*Math.max(4,a*(g?1.2:.6))),h=c/2,v=t.top-Math.max(p,h*1.6+1);return[[[f-h,t.top]],[[f-h,v+h]],[[f-h,v-h*.35],[f+h,v-h*.35],[f+h,v+h]],[[f+h,t.top]]]})},hr=({box:t,candleKey:e,color:r,fillOpacity:a,waxId:s})=>{const l=ve(t),{left:i,right:d,dish:o,top:c}=l,f=cr(l,e),g=$($(r,wt,.22),dr,.08),p=$(r,ir,.3);return(0,n.jsxs)("g",{"data-candle-wax":"",children:[(0,n.jsx)("path",{d:k(t,B(i,d,o,c)),fill:`url(#${s})`,fillOpacity:a,"data-outline":"candle","data-stone-color":r}),(0,n.jsx)("path",{d:k(t,[[[i+.5,c-.9]],[[d-.5,c-.9]]],!1),stroke:$(r,wt,.5),strokeWidth:1.8,strokeOpacity:.85}),f.map((h,v)=>(0,n.jsxs)("g",{"data-drip":"",children:[(0,n.jsx)("path",{d:k(t,h),fill:p,fillOpacity:.45,transform:"translate(0.7,0.5)"}),(0,n.jsx)("path",{d:k(t,h),fill:g,fillOpacity:a})]},v)),o>0&&(0,n.jsxs)("g",{"data-dish":"",children:[(0,n.jsx)("path",{d:k(t,B(0,t.breadth,0,o)),fill:Je}),(0,n.jsx)("path",{d:k(t,[[[.5,o-.5]],[[t.breadth-.5,o-.5]]],!1),stroke:tr,strokeWidth:1})]})]})},ur=({id:t})=>(0,n.jsxs)("radialGradient",{id:t,children:[(0,n.jsx)("stop",{offset:0,stopColor:Et,stopOpacity:.32}),(0,n.jsx)("stop",{offset:.45,stopColor:Et,stopOpacity:.1}),(0,n.jsx)("stop",{offset:1,stopColor:Et,stopOpacity:0})]}),fr=({box:t,haloId:e,isFlickering:r})=>{const{left:a,right:s,top:l,wick:i,flameFoot:d,flameTip:o}=ve(t),c=(a+s)/2,f=o-d,g=f*.24,p=(x,S=0)=>{const E=d+S,j=E+f*x;return k(t,[[[c,E]],[[c-g*x*1.35,E+f*x*.05],[c-g*x*1.05,E+f*x*.55],[c,j]],[[c+g*x*1.05,E+f*x*.55],[c+g*x*1.35,E+f*x*.05],[c,E]]])},h=t.at(c,d+f*.4),v=t.at(c,l),m=t.at(c,l+i);return(0,n.jsxs)("g",{"data-flame":"",children:[(0,n.jsx)("circle",{cx:h.x,cy:h.y,r:f*.9,fill:`url(#${e})`}),(0,n.jsx)("line",{x1:v.x,y1:v.y,x2:m.x,y2:m.y,stroke:er,strokeWidth:1.1}),(0,n.jsxs)("g",{className:r?L.flicker:void 0,children:[(0,n.jsx)("path",{d:p(1),fill:sr}),(0,n.jsx)("path",{d:p(.72,f*.04),fill:or}),(0,n.jsx)("path",{d:p(.4,f*.06),fill:lr})]})]})},pr=.34,gr=1.6,vr=3.4,mr=.8,xr=9,yr=1.8,Ar=1.6,Er=[4,13],ct=1.8,Sr="#5B4E66",_r="#8C7F99",Pt="#0B0710",Ht=t=>{const{breadth:e,length:r}=t,a=Math.min(e,Math.max(gr,Math.min(vr,e*pr))),s=Math.min(e,Math.max(a*2,Math.min(xr,e*mr)))/2,l=Math.min(s*2*yr,r*.6),i=(e-a)/2;return{left:i,right:i+a,neck:r-l,headHalf:s,tip:r}},Dt=(t,e)=>{const r=t.breadth/2,{neck:a,tip:s,headHalf:l,left:i,right:d}=e,o=s-a,c=a+o*.32;return[[[i,a]],[[r-l,c-o*.06]],[[r-l*.55,c+o*.06]],[[r,s]],[[r+l*.55,c+o*.06]],[[r+l,c-o*.06]],[[d,a]]]},jr=({box:t,color:e,fillOpacity:r,paintId:a})=>{const s=Ht(t),{left:l,right:i,neck:d}=s,o=Math.min(Ar,(d-0)*.3);return(0,n.jsxs)("g",{"data-railing-post":"",children:[(0,n.jsx)("path",{d:k(t,B(l,i,0,d)),fill:`url(#${a})`,fillOpacity:r,"data-outline":"railing","data-stone-color":e}),(0,n.jsx)("path",{d:k(t,Dt(t,s)),fill:e,fillOpacity:r,"data-spear":""}),(0,n.jsx)("path",{d:k(t,[[[t.breadth/2,d]],...Dt(t,s).slice(3)]),fill:$(e,Pt,.35),fillOpacity:r*.7}),o>.5&&(0,n.jsx)("path",{d:k(t,B(l-.6,i+.6,d-o,d)),fill:$(e,Pt,.25)})]})},Gt=(t,e)=>t>e+ct*1.5,Rr=({box:t,neighbours:e})=>{const{neck:r}=Ht(t),a=Er.flatMap(s=>{if(!Gt(r,s))return[];const l=o=>o!==null&&Gt(o.neck,s)?o.gap/2:null,i=l(e.before),d=l(e.after);return i===null&&d===null?[]:[{height:s,from:-(i??0),to:t.breadth+(d??0)}]});return a.length===0?null:(0,n.jsx)("g",{"data-rail":"",children:a.map(({height:s,from:l,to:i})=>(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:k(t,[[[l,s]],[[i,s]]],!1),stroke:Sr,strokeWidth:ct}),(0,n.jsx)("path",{d:k(t,[[[l,s+ct/2]],[[i,s+ct/2]]],!1),stroke:_r,strokeWidth:.6,strokeOpacity:.7})]},s))})},$r=2,kr=8,Mr=.16,Tr=.18,Wt=.78,Lr=.14,Hr=74,Cr=.85,Ir=30,Or=1.5,wr=.42,lt=.5523,Pr=12,Dr=.07,Gr=1.5,Wr=4,tt=1.6,V="#0B0710",et="#FFFFFF",Nr=.32,Fr=.18,me=.45,Nt=.7,Br=.12,br=.16,Ur=55,Vr=220,Ft=.22,Yr=.65,zr="#7F7B76",Kr=.22,Xr=.42,Zr=.3,qr="#F1E8D6",Qr=.62,Jr=.45,Bt=1.3,ta=20,ea=44,bt=[.52,.66,.4],Ut=70,ra="'Cinzel', 'Times New Roman', serif",Vt=8,Yt=17,zt=.7,aa=.72,it=4,na="#1E3A22",sa=4,oa=6,la=10,ia=.16,Kt="#E8E0D2",da=t=>{const{breadth:e,length:r,endsStack:a,startsStack:s,isColumn:l,valueEdge:i}=t;if(!a||!s||!l||i!=="top"||r<Pr)return null;const d=Math.min(kr,r*Mr,e*Tr),o=(e-Math.min(e*Wt,Math.max(Math.min(e*Wt,Ir),Math.min(Hr,r*Cr))))/2,c=e-o,f=(c-o)*(1-Lr*2)/2,g=Math.min(f,(r-d)*wr),p=Math.min(f,g*Or);return{plinth:d,left:o,right:c,step:(c-o)/2-p,shoulder:r-g}},Xt=(t,e)=>{const{plinth:r,left:a,right:s,step:l,shoulder:i}=e,{length:d}=t,o=a+l,c=s-l,f=(c-o)/2,g=o+f,p=d-i;return[[[a,r]],[[a,i]],[[o,i]],[[o,i+p*lt],[g-f*lt,d],[g,d]],[[g+f*lt,d],[c,i+p*lt],[c,i]],[[s,i]],[[s,r]]]},ca=(t,e,r)=>{const a=at(mt(`${e}-grain`)),s=Math.min(Vr,Math.floor(t.breadth*t.length/Ur)),l=Array.from({length:s},()=>{const{x:d,y:o}=t.at(a()*t.breadth,a()*t.length),c=.35+a()*.55;return{isDark:a()<.6,path:`M${d-c},${o} a${c},${c} 0 1 0 ${c*2},0 a${c},${c} 0 1 0 ${-c*2},0`}}),i=kt(r)>Yr?Array.from({length:2},()=>{const d=t.length*(.15+a()*.6),o=d+(a()-.5)*t.breadth*1.6,c=t.at(t.breadth*(.4+a()*.2),(d+o)/2+(a()-.5)*6),f=t.at(0,d),g=t.at(t.breadth,o);return`M${f.x},${f.y} Q${c.x},${c.y} ${g.x},${g.y}`}).join(" "):"";return{dark:l.filter(({isDark:d})=>d).map(({path:d})=>d).join(" "),light:l.filter(({isDark:d})=>!d).map(({path:d})=>d).join(" "),veins:i}},xe=(t,e)=>{const r=t.length-e.shoulder,a=Math.min((e.right-e.left-e.step*2)*.28,12);return{size:a,centre:e.shoulder+r*.3,isCut:r>=a*1.2}},ha=(t,e,r)=>{const{left:a,right:s,shoulder:l,plinth:i}=e,d=s-a;if(d<ta||t.length-i<ea)return null;const o=(a+s)/2,c=(S,E)=>{const j=t.at(...S),T=t.at(...E);return`M${j.x},${j.y} L${T.x},${T.y}`},{size:f,centre:g,isCut:p}=xe(t,e),h=Math.min(7,Math.max(4,d*.12)),v=r===null?bt:bt.slice(0,1),m=r===null?l-h*1.4:r.baseline-h*1.6,x=v.flatMap((S,E)=>{const j=m-h*E;return j>i+h*2?[c([o-Math.min(d*S,Ut*S)/2,j],[o+Math.min(d*S,Ut*S)/2,j])]:[]});return[...p?[c([o,g-f*.5],[o,g+f*.5]),c([o-f*.32,g+f*.18],[o+f*.32,g+f*.18])]:[],...x].join(" ")},ua=(t,e,r)=>{if(r==="")return null;const a=Math.max(1,r.length);if(e!==null){const d=e.right-e.left-it*2,o=Math.min(Yt,d/(a*zt)),c=xe(t,e),f=c.isCut?c.centre-c.size/2-it:e.shoulder,g=Math.min(e.shoulder-o*.35,f-o*aa);return o<Vt||g-o<e.plinth+it?null:{text:r,fontSize:o,baseline:g,across:(e.left+e.right)/2}}const s=t.isColumn?t.breadth:t.length,l=t.isColumn?t.length:t.breadth,i=Math.min(Yt,l*.6,(s-it*2)/(a*zt));return i<Vt?null:t.isColumn?{text:r,fontSize:i,baseline:t.length/2-i*.36,across:t.breadth/2}:{text:r,fontSize:i,baseline:t.length/2,across:t.breadth/2+i*.36}},fa=(t,e)=>{const r=at(mt(`${e}-grass`)),a=Math.max(2,Math.floor(t.breadth/oa));return Array.from({length:a},(s,l)=>{const i=(l+.3+r()*.4)*t.breadth/a,d=sa*(.5+r()*.6),o=(r()-.5)*3,c=t.at(i-1,0),f=t.at(i+o,d),g=t.at(i+1,0);return`M${c.x},${c.y} L${f.x},${f.y} L${g.x},${g.y} Z`}).join(" ")},pa=t=>kt(t)<Zr?{groove:$(t,qr,Qr),lip:$(t,V,Jr),isPale:!0}:{groove:$(t,V,Xr),lip:$(t,et,me),isPale:!1},ga=({box:t,stoneKey:e,color:r,fillOpacity:a,faceId:s,fogId:l,clipId:i,label:d})=>{const o=da(t),{breadth:c,length:f,startsStack:g,isColumn:p}=t,h=o===null?k(t,B(0,c,0,f)):k(t,Xt(t,o)),v=o!==null&&o.plinth>0?k(t,B(0,c,0,o.plinth)):null,m=Math.min(Wr,Math.max(Gr,c*Dr)),x=$(r,V,Nr),S=$(r,et,me),{groove:E,lip:j}=pa(r),T=ca(t,e,r),H=ua(t,o,d),O=o===null?null:ha(t,o,H),D=H===null?null:t.at(H.across,H.baseline),Z=g&&p,P=o===null?k(t,B(c-m,c,0,f)):k(t,B(o.right-m,o.right,o.plinth,o.shoulder)),Y=o===null?p?k(t,[[[0,f-tt/2]],[[c,f-tt/2]]],!1):k(t,[[[tt/2,0]],[[tt/2,f]]],!1):k(t,Xt(t,o).slice(1,-1),!1);return(0,n.jsxs)("g",{children:[(0,n.jsxs)("clipPath",{id:i,children:[(0,n.jsx)("path",{d:h}),v!==null&&(0,n.jsx)("path",{d:v})]}),v!==null&&(0,n.jsx)("path",{d:v,fill:$(r,V,Fr),fillOpacity:a,"data-plinth":""}),(0,n.jsx)("path",{d:h,fill:`url(#${s})`,fillOpacity:a,"data-outline":o===null?"slab":"headstone","data-stone-color":r}),(0,n.jsxs)("g",{clipPath:`url(#${i})`,children:[T.veins!==""&&(0,n.jsx)("path",{d:T.veins,fill:"none",stroke:zr,strokeOpacity:Kr,strokeWidth:.7}),(0,n.jsx)("path",{d:T.dark,fill:V,fillOpacity:Ft}),(0,n.jsx)("path",{d:T.light,fill:et,fillOpacity:Ft}),(0,n.jsx)("path",{d:P,fill:x,fillOpacity:.85}),(0,n.jsx)("path",{d:Y,fill:"none",stroke:S,strokeOpacity:Nt,strokeWidth:tt*2}),v!==null&&o!==null&&(0,n.jsx)("path",{d:k(t,[[[0,o.plinth-.6]],[[c,o.plinth-.6]]],!1),stroke:S,strokeOpacity:Nt,strokeWidth:1.2}),O!==null&&(0,n.jsxs)("g",{fill:"none",strokeLinecap:"round",children:[(0,n.jsx)("path",{d:O,stroke:j,strokeOpacity:.45,strokeWidth:Bt,transform:"translate(0,1)"}),(0,n.jsx)("path",{d:O,stroke:E,strokeWidth:Bt})]}),H!==null&&D!==null&&(0,n.jsxs)("g",{fontFamily:ra,fontWeight:700,fontSize:H.fontSize,textAnchor:"middle",letterSpacing:H.fontSize*.04,"data-carving":H.text,children:[(0,n.jsx)("text",{x:D.x,y:D.y+1,fill:j,fillOpacity:.5,children:H.text}),(0,n.jsx)("text",{x:D.x,y:D.y,fill:E,children:H.text})]}),Z&&(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:k(t,B(0,c,0,Math.min(la,f))),fill:`url(#${l})`}),(0,n.jsx)("path",{d:fa(t,e),fill:na})]})]})]})},va=t=>{const e=t.mapping.y,r=typeof e=="string"?e:e!==void 0&&"variable"in e?e.variable:null;return r!==null&&t.data.hasVariable(r)?r:null},ma=(t,e,r)=>{if(t===null||e===null)return"";const a=r[u.POSITION_VARIABLES.yRaw]??r[e];return a==null?"":t(a,r)};var xa=t=>t>=44?"headstone":t>=14?"candle":"railing",ya=t=>t.reduce((e,r)=>r!==null&&r.isColumn?Math.max(e,r.breadth):e,0),ht=t=>t.isColumn&&t.startsStack&&t.endsStack&&t.valueEdge==="top",Aa=t=>{const e=t.map((a,s)=>({box:a,index:s})).filter(a=>a.box!==null&&ht(a.box)).sort((a,s)=>a.box.rect.x-s.box.rect.x),r=(a,s)=>a===void 0?null:{gap:Math.max(0,s),neck:Ht(a).neck};return new Map(e.map(({box:a,index:s},l)=>{const i=e[l-1]?.box,d=e[l+1]?.box;return[s,{before:r(i,i===void 0?0:a.rect.x-(i.rect.x+i.rect.width)),after:r(d,d===void 0?0:d.rect.x-(a.rect.x+a.rect.width))}]}))},Zt=({layer:t,observations:e,mainAxis:r,panel:a,intro:s,state:l})=>{const i=nt(t),d=pt("face"),o=pt("round"),c=W("stone"),f=W("fog"),g=W("halo"),p=ze(s),h=(0,w.useMemo)(()=>(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id),[t.data,t.mapping,t.id]),v=(0,u.useSceneSelector)(y=>y.config.numberFormat),m=(0,u.useGraphLocale)(),x=va(t),S=(0,w.useMemo)(()=>x===null?null:(0,u.createValueFormatter)({valueFormat:t.data.getValueFormat(x),locale:m,numberFormat:v}),[t.data,x,m,v]);if(a.width<=0||a.height<=0)return null;const E=[...e].map((y,G)=>{const A=h(y);return{key:A,index:G,paint:i(y,l),box:Ue(y,r,a,$r),label:ma(S,x,y),timing:l===void 0?ge(s,A):null}}),j=E.map(({box:y})=>y),T=xa(ya(j)),H=y=>ht(y)?T:"slab",O=T==="candle"&&j.some(y=>y!==null&&ht(y)),D=T==="railing"&&l===void 0?Aa(j):new Map,Z=E.some(({timing:y})=>y!==null),P=O&&p&&l===void 0,Y=[...new Set(E.map(({paint:y})=>y.color))],st=(y,G)=>G===null?{}:{className:L.rise,style:Lt(G,{x:-y.growth.x*y.length,y:-y.growth.y*y.length})};return(0,n.jsxs)("g",{"data-geom":"bar","data-grave-object":T,children:[(Z||P)&&(0,n.jsx)(Tt,{}),(0,n.jsxs)("defs",{children:[Y.map(y=>(0,n.jsxs)("linearGradient",{id:d(y),x1:"0",y1:"0",x2:"0.35",y2:"1",children:[(0,n.jsx)("stop",{offset:0,stopColor:$(y,et,Br)}),(0,n.jsx)("stop",{offset:.5,stopColor:y}),(0,n.jsx)("stop",{offset:1,stopColor:$(y,V,br)})]},y)),T!=="headstone"&&Y.map(y=>(0,n.jsxs)("linearGradient",{id:o(y),x1:"0",y1:"0",x2:"1",y2:"0",children:[(0,n.jsx)("stop",{offset:0,stopColor:$(y,V,.22)}),(0,n.jsx)("stop",{offset:.28,stopColor:$(y,et,.2)}),(0,n.jsx)("stop",{offset:.5,stopColor:y}),(0,n.jsx)("stop",{offset:1,stopColor:$(y,V,.38)})]},y)),O&&(0,n.jsx)(ur,{id:g}),(0,n.jsxs)("linearGradient",{id:f,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,n.jsx)("stop",{offset:0,stopColor:Kt,stopOpacity:ia}),(0,n.jsx)("stop",{offset:1,stopColor:Kt,stopOpacity:0})]})]}),T==="railing"&&(0,n.jsx)("g",{"data-fence":"",children:E.map(({key:y,index:G,box:A,timing:R})=>A===null||!ht(A)?null:(0,n.jsx)("g",{...st(A,R),children:(0,n.jsx)(Rr,{box:A,neighbours:D.get(G)??{before:null,after:null}})},y))}),E.map(({key:y,index:G,paint:A,box:R,timing:M,label:N})=>{if(R===null)return null;const I=`${c}-${G}`,C=st(R,M),F=H(R);return(0,n.jsxs)("g",{opacity:A.opacity,"data-value-edge":R.valueEdge,children:[(0,n.jsx)("clipPath",{id:I,children:(0,n.jsx)("rect",{...R.rect})}),(0,n.jsx)("g",{clipPath:`url(#${I})`,children:(0,n.jsxs)("g",{...C,"data-stone":"",children:[F==="candle"&&(0,n.jsx)(hr,{box:R,candleKey:y,color:A.color,fillOpacity:A.fillOpacity,waxId:o(A.color)}),F==="railing"&&(0,n.jsx)(jr,{box:R,color:A.color,fillOpacity:A.fillOpacity,paintId:o(A.color)}),(F==="headstone"||F==="slab")&&(0,n.jsx)(ga,{box:R,stoneKey:y,color:A.color,fillOpacity:A.fillOpacity,faceId:d(A.color),fogId:f,clipId:`${I}-face`,label:N})]})}),F==="candle"&&(0,n.jsx)("g",{...C,children:(0,n.jsx)(fr,{box:R,haloId:g,isFlickering:P})}),l==="hovered"&&(0,n.jsx)("rect",{...R.rect,fill:"none",stroke:A.edge,strokeWidth:A.edgeWidth})]},y)})]})},Ea=(0,u.defineGeomRenderer)("bar",{coord:"cartesian",guideMode:"band",swatchShape:"square",render:({layer:t,coordSystem:e,panelRect:r,intro:a})=>(0,n.jsx)(Zt,{layer:t,observations:t.data,mainAxis:(0,u.readMainAxis)(e),panel:r,intro:a}),renderHover:({layer:t,coordSystem:e,primary:r,panelRect:a})=>(0,n.jsx)(Zt,{layer:t,observations:[r.observation],mainAxis:(0,u.readMainAxis)(e),panel:a,state:"hovered"}),renderHoverCompanions:()=>null}),Ct="#FFE9A3",ut="#2A1533",ye="#1A0C22",Sa="#6B7A35",_a=.45,ja=15,Ra=10,$a=.62,ka=.24,qt=.75,Ma=t=>kt(t)>_a?ut:Ct,Ta=t=>$(t,ye,.5),La=({id:t,color:e})=>(0,n.jsxs)("radialGradient",{id:t,cx:"0.5",cy:"0.58",r:"0.62",children:[(0,n.jsx)("stop",{offset:0,stopColor:$(e,Ct,.35)}),(0,n.jsx)("stop",{offset:.55,stopColor:e}),(0,n.jsx)("stop",{offset:1,stopColor:$(e,ye,.35)})]}),Ha=(t,e)=>{const r=Math.min(t*.16,e*.28),a=-e*.1,s=c=>`M${c-r/2},${a+r*.4} L${c+r/2},${a+r*.4} L${c},${a-r*.55} Z`,l=t*.26,i=e*.12,d=Math.max(1,t*.05),o=`M${-l},${i} Q${-l*.5},${i+e*.06} ${-d},${i+e*.05} L0,${i+e*.12} L${d},${i+e*.05} Q${l*.5},${i+e*.06} ${l},${i} Q0,${i+e*.36} ${-l},${i} Z`;return`${s(-t*.18)} ${s(t*.18)} ${o}`},Ca=({cx:t,cy:e,width:r,height:a,color:s,fill:l,hasStem:i=!1})=>{const d=r/2,o=a/2,c=Ta(s),f=Math.max(.7,Math.min(1.4,r/28)),g=r>=ja&&a>=Ra,p=Math.max(2,r*.12),h=Math.max(2,a*.24);return(0,n.jsxs)("g",{transform:`translate(${t},${e})`,children:[i&&(0,n.jsx)("path",{d:`M${-p/2},${-o+1} L${-p*.35},${-o-h} L${p*.55},${-o-h*.85} L${p/2},${-o+1} Z`,fill:Sa}),(0,n.jsx)("ellipse",{rx:d,ry:o,fill:l}),(0,n.jsx)("ellipse",{rx:d*$a,ry:o*.97,fill:"none",stroke:c,strokeWidth:f,strokeOpacity:qt}),(0,n.jsx)("ellipse",{rx:d*ka,ry:o*.99,fill:"none",stroke:c,strokeWidth:f,strokeOpacity:qt}),g&&(0,n.jsx)("path",{d:Ha(r,a),fill:Ma(s)})]})},Ia=-12,q=7.5,Oa="#F4EEE2",wa=.92,Pa=15,Da=.45,z=-6,vt=-15.5,Ga=`M-7.5,${z} L-7.5,${vt} A${q},${q} 0 0 1 ${q},${vt} L${q},${z} Q${q*.66},${z-3} ${q/3},${z} Q0,-3 ${-7.5/3},${z} Q${-7.5*.66},${z-3} -7.5,${z} Z`,Wa=({x:t,y:e,color:r,ghostRef:a})=>{const s=W("halo");return(0,n.jsxs)("g",{ref:a,transform:`translate(${t},${e})`,"data-ghost":"",pointerEvents:"none",children:[(0,n.jsx)("defs",{children:(0,n.jsxs)("radialGradient",{id:s,children:[(0,n.jsx)("stop",{offset:0,stopColor:r,stopOpacity:Da}),(0,n.jsx)("stop",{offset:1,stopColor:r,stopOpacity:0})]})}),(0,n.jsxs)("g",{transform:`translate(-15,0) rotate(${Ia})`,children:[(0,n.jsx)("circle",{cy:-12.5,r:Pa,fill:`url(#${s})`}),(0,n.jsx)("path",{d:Ga,fill:Oa,fillOpacity:wa,stroke:r,strokeWidth:1.2}),(0,n.jsx)("ellipse",{cx:-2.8,cy:vt,rx:1.3,ry:1.9,fill:ut}),(0,n.jsx)("ellipse",{cx:2.8,cy:vt,rx:1.3,ry:1.9,fill:ut}),(0,n.jsx)("ellipse",{cx:0,cy:-10.9,rx:1.2,ry:1.5,fill:ut})]})]})},Na=2.4,Fa=.55,St=3,Ba=3.6,ba=1.7,Qt=6,Ua=14,Va=2.2,Ya=(t,e,r)=>t.flatMap(a=>r(a,e)??[]).reduce((a,s)=>a===null||s.x>=a.x?s:a,null),za=(t,e,r)=>{const a=(0,w.useRef)(!1);(0,w.useLayoutEffect)(()=>{const s=t.current;if(a.current||!r||s===null||e===null||e===void 0)return;a.current=!0;const l=[...s.querySelectorAll("[data-trail]")];if(l.some(h=>typeof h.getTotalLength!="function"))return;const i=[...s.querySelectorAll("[data-ghost-for]")].flatMap(h=>{const v=h.querySelector("[data-ghost]");return v===null?[]:[{key:h.dataset.ghostFor,ghost:v}]}),d=[...s.querySelectorAll("[data-bead]")],o=e.durationSeconds*Va*1e3,c=h=>{let v=-1/0;l.forEach(m=>{const x=m.getTotalLength();m.style.strokeDasharray=`${x} ${x}`,m.style.strokeDashoffset=`${x*(1-h)}`;const S=m.getPointAtLength(x*h);v=Math.max(v,S.x);const E=i.find(({key:j})=>j===m.dataset.trail);E!==void 0&&(E.ghost.style.transform=`translate(${S.x}px, ${S.y}px)`)}),d.forEach(m=>{m.style.opacity=Number(m.dataset.x)<=v+.5?"":"0"})},f=()=>{for(const h of[...l,...i.map(({ghost:v})=>v),...d])h.removeAttribute("style")};c(0);const g=performance.now();let p=requestAnimationFrame(function h(v){const m=Math.min(1,(v-g)/o);if(m>=1){f();return}c(m),p=requestAnimationFrame(h)});return()=>{cancelAnimationFrame(p),f()}},[t,e,r])},Ka=({layer:t,panel:e,coord:r,project:a,intro:s})=>{const l=he(t),i=(0,w.useRef)(null),d=W("soften"),o=(0,w.useMemo)(()=>{if(r==="polar")return gt(t,m=>ue(m,e)).map(m=>({...m,end:null}));const h=(0,u.createLinePathGenerator)(t.params),v=new Map;return gt(t,m=>{const x=h((0,u.prepareLineObservations)(m,t.params.missingValues));if(!x)return null;const S=$t(x,e);return v.set(S,Ya(m,e,a)),S}).map(m=>({...m,end:v.get(m.path)??null}))},[t,e,r,a]),c=(0,w.useMemo)(()=>He(t,e,a),[t,e,a]),f=c.length/Math.max(1,o.length),g=e.width/Math.max(1,f)>=Ua,p=r==="cartesian"&&o.every(({observation:h})=>l(h).dashArray===void 0);return za(i,s,p),e.width<=0||e.height<=0?null:(0,n.jsxs)("g",{"data-geom":"line",ref:i,children:[(0,n.jsx)("defs",{children:(0,n.jsx)("filter",{id:d,filterUnits:"userSpaceOnUse",x:-12,y:-12,width:e.width+St*8,height:e.height+St*8,children:(0,n.jsx)("feGaussianBlur",{stdDeviation:St})})}),o.map(({key:h,path:v,observation:m})=>{const x=l(m);return(0,n.jsxs)("g",{opacity:x.opacity,children:[(0,n.jsx)("path",{d:v,fill:"none",stroke:x.color,strokeOpacity:Fa,strokeWidth:x.width*Na,filter:`url(#${d})`,strokeLinecap:"round",strokeLinejoin:"round","data-trail":h}),(0,n.jsx)("path",{d:v,fill:"none",stroke:x.color,strokeWidth:x.width,strokeDasharray:x.dashArray,strokeLinecap:"round",strokeLinejoin:"round","data-trail":h})]},h)}),g&&c.map(({key:h,observation:v,point:m})=>{const x=l(v);return(0,n.jsxs)("g",{opacity:x.opacity,"data-bead":"","data-x":m.x,children:[(0,n.jsx)("circle",{cx:m.x,cy:m.y,r:Ba,fill:x.color}),(0,n.jsx)("circle",{cx:m.x,cy:m.y,r:ba,fill:$(x.color,"#FFE9A3",.7)})]},h)}),o.map(({key:h,observation:v,end:m})=>m===null?null:(0,n.jsx)("g",{"data-ghost-for":h,children:(0,n.jsx)(Wa,{x:m.x,y:m.y,color:l(v).color})},h))]})},Xa=({layer:t,observation:e,panel:r,project:a})=>{const s=he(t)(e,"hovered"),l=a(e,r);return l===null?null:(0,n.jsxs)("g",{"data-geom":"line",opacity:s.opacity,children:[(0,n.jsx)("circle",{cx:l.x,cy:l.y,r:Qt,fill:s.color}),(0,n.jsx)("circle",{cx:l.x,cy:l.y,r:Qt/2,fill:$(s.color,Ct,.7)})]})},Ae=(t,e)=>(0,u.defineGeomRenderer)("line",{coord:t,guideMode:"crosshair",swatchShape:"line",render:({layer:r,panelRect:a,intro:s})=>(0,n.jsx)(Ka,{layer:r,panel:a,coord:t,project:e,intro:s}),renderHover:({layer:r,primary:a,panelRect:s})=>(0,n.jsx)(Xa,{layer:r,observation:a.observation,panel:s,project:e}),renderHoverCompanions:()=>null,getOverlayAnchor:({observation:r})=>{const a=(0,u.getX)(r),s=(0,u.getY)(r);return a===null||s===null?null:{x:a,y:s}}}),Za=Ae("cartesian",Mt),qa=Ae("polar",xt),Jt=2.3,te=1.8,Qa=4,ee=({layer:t,observations:e,panel:r,project:a,intro:s,state:l})=>{const i=(0,u.useGeomStyleReader)(t),d=nt(t),o=pt("lantern"),c=(0,w.useMemo)(()=>(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id),[t.data,t.mapping,t.id]),f=l==="hovered"?Qa:0,g=Array.from(e,p=>{const h=c(p);return{key:h,centre:a(p,r),paint:d(p,l),size:i.get("size",p,l)+f,timing:l===void 0?ge(s,h):null}});return(0,n.jsxs)("g",{"data-geom":"point",children:[g.some(({timing:p})=>p!==null)&&(0,n.jsx)(Tt,{}),(0,n.jsx)("defs",{children:[...new Set(g.map(({paint:p})=>p.color))].map(p=>(0,n.jsx)(La,{id:o(p),color:p},p))}),g.map(({key:p,centre:h,paint:v,size:m,timing:x})=>{if(h===null)return null;const S=x===null?{}:{className:L.light,style:Lt(x)};return(0,n.jsxs)("g",{opacity:v.opacity,"data-reading":`${h.x},${h.y}`,children:[(0,n.jsx)("g",{...S,children:(0,n.jsx)(Ca,{cx:h.x,cy:h.y,width:m*Jt,height:m*te,color:v.color,fill:`url(#${o(v.color)})`,hasStem:!0})}),l==="hovered"&&(0,n.jsx)("ellipse",{cx:h.x,cy:h.y,rx:m*Jt/2+1,ry:m*te/2+1,fill:"none",stroke:v.edge,strokeWidth:v.edgeWidth})]},p)})]})},Ee=(t,e)=>(0,u.defineGeomRenderer)("point",{coord:t,swatchShape:"circle",render:({layer:r,panelRect:a,intro:s})=>(0,n.jsx)(ee,{layer:r,observations:r.data,panel:a,project:e,intro:s}),renderHover:({layer:r,primary:a,panelRect:s})=>(0,n.jsx)(ee,{layer:r,observations:[a.observation],panel:s,project:e,state:"hovered"}),renderHoverCompanions:()=>null}),Ja=Ee("cartesian",Mt),tn=Ee("polar",xt),en=3,_t="#A39A8C",re="#E4DDD0",rt="#5E564C",U="#1A0C22",K="#FFF8E6",rn="#130A1A",an=.022,ae=2.4,nn=6,sn=.05,on=.2,ln=Math.PI/7,dn=6,cn=[.42,.74],hn=.62,un=26,fn=1.5,pn=.85,gn=.18,vn=1.6,mn=.5,xn=.85,yn=.08,An=.45,En=.08,Sn=.4,_n=40,jn=16,jt=22,Rn=.16,$n=.075,kn=.64,ne=.55,Se=(t,e,r)=>{const a=(0,u.polarToUnit)(e,1);return{x:t.x+a.x*r,y:t.y-a.y*r}},se=t=>{const{startAngle:e,endAngle:r}=(0,u.getAngleExtent)(t),{innerRadius:a,outerRadius:s}=(0,u.getRadiusExtent)(t);return e===null||r===null||a===null||s===null||s<=0||r<=e?null:{startAngle:e,endAngle:r,innerRadius:a,outerRadius:s}},Mn=(t,e=[])=>{const r=Math.min(nn,Math.max(ae,t*an)),a=e.map(({startAngle:l,endAngle:i,innerRadius:d,outerRadius:o})=>Math.min((i-l)*o*t*sn,(o-d)*t*on)).sort((l,i)=>l-i),s=a[Math.floor(a.length/2)];return s===void 0?r:Math.min(r,Math.max(ae,s))},Tn=18,Ln=.5,Hn=.62,Cn=(t,e,r)=>{const{startAngle:a,endAngle:s,innerRadius:l,outerRadius:i}=t,d=l*e,o=i*e,c=o-(o-d)*Ln,f=(a+s)/2,g=o-c,p=(s-a)*.3,h=(x,S)=>{const E=Se(r,x,S);return`${E.x.toFixed(2)},${E.y.toFixed(2)}`},v=6,m=Array.from({length:7},(x,S)=>h(s-(s-a)*S/v,d));return`M${h(a,c)} C${h(a,c+g*.55)} ${h(a+p,o-g*.12)} ${h(f,o)} C${h(s-p,o-g*.12)} ${h(s,c+g*.55)} ${h(s,c)} L${m.join(" L")} Z`},In=(t,e,r=!0)=>{const{startAngle:a,endAngle:s,innerRadius:l,outerRadius:i}=t,d=(i-l)*e>=un,o=d?l>0?[0,hn,1]:[0,...cn,1]:[0,1],c=!d||!r?-1:l>0?0:1,f=Math.min(dn,Math.max(1,Math.round((s-a)/ln)));return o.slice(1).flatMap((g,p)=>{const h=l+(i-l)*(o[p]??0),v=l+(i-l)*g,m=p===0&&l===0&&o.length>2?1:Math.max(1,f-1+Math.min(p,2)),x=Math.max(1,Math.floor((s-a)*((h+v)/2)*e/jn)),S=p===c,E=Math.max(1,Math.round((s-a)*((h+v)/2)/((v-h)*Hn))),j=Math.min(x,S?E:m),T=(s-a)/j;return Array.from({length:j},(H,O)=>({startAngle:a+T*O,endAngle:a+T*(O+1),innerRadius:h,outerRadius:v,isLancet:S&&T*((h+v)/2)*e>=Tn}))})},oe=({layer:t,observations:e,panel:r,intro:a,state:s})=>{const l=nt(t),i=W("glass"),d=W("pane"),o=W("stone"),c=W("halo"),f=(0,w.useMemo)(()=>(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id),[t.data,t.mapping,t.id]);if(r.width<=0||r.height<=0)return null;const g=Math.min(r.width,r.height)/2,p={x:r.width/2,y:r.height/2},h=[...t.data].flatMap(A=>se(A)??[]),v=Mn(g,h),m=h[0],x=m!==void 0&&h.every(({innerRadius:A,outerRadius:R})=>A===m.innerRadius&&R===m.outerRadius),S={centerX:p.x,centerY:p.y,radius:g,digits:en},E=[...e],j=E.flatMap((A,R)=>{const M=se(A),N=M===null?void 0:(0,u.buildPolarBarArcPath)(M,S);if(M===null||N===void 0)return[];const I=f(A),C=l(A,s),F=at(mt(I)),ot=In(M,g,x).flatMap(At=>{const It=At.isLancet?Cn(At,g,p):(0,u.buildPolarBarArcPath)(At,S);return It===void 0?[]:[{path:It,light:(F()*2-1)*gn}]}),J=(M.startAngle+M.endAngle)/2,yt=(M.innerRadius+(M.outerRadius-M.innerRadius)*.45)*g;return[{key:I,index:R,sector:M,path:N,pieces:ot,heart:M.endAngle-M.startAngle>=Math.PI*1.5?p:Se(p,J,yt),swatch:C.color,color:Re(C.color,vn),opacity:C.opacity,fillOpacity:C.fillOpacity}]});if(j.length===0)return null;const T=j.every(({sector:A})=>A.innerRadius===0),H=new Set(j.map(({sector:A})=>A.innerRadius)),O=H.size===1?[...H][0]??0:0,D=s===void 0&&E.length>1,Z=new Set(j.map(({sector:A})=>A.outerRadius)),P=D&&Z.size===1?([...Z][0]??0)*g:0,Y=s==="hovered"?xn:mn,st=s==="hovered"?An:yn,y=s==="hovered"?En:Sn,G=A=>a==null?{}:{className:L.kindle,style:Lt({duration:a.durationSeconds*(1-ne),delay:a.durationSeconds*ne*(A/Math.max(1,j.length))})};return(0,n.jsxs)("g",{"data-geom":"bar",children:[a!=null&&(0,n.jsx)(Tt,{}),(0,n.jsxs)("defs",{children:[j.map(({index:A,color:R,heart:M,sector:N})=>{const I=N.innerRadius*g,C=N.outerRadius*g;return C-I<_n&&I>0?(0,n.jsxs)("radialGradient",{id:`${i}-${A}`,gradientUnits:"userSpaceOnUse",cx:p.x,cy:p.y,r:C,children:[(0,n.jsx)("stop",{offset:I/C,stopColor:$(R,U,y/2)}),(0,n.jsx)("stop",{offset:(I+C)/2/C,stopColor:$(R,K,Y/2)}),(0,n.jsx)("stop",{offset:1,stopColor:$(R,U,y/2)})]},A):(0,n.jsxs)("radialGradient",{id:`${i}-${A}`,gradientUnits:"userSpaceOnUse",cx:M.x,cy:M.y,r:Math.max(12,(C-I)*.85),children:[(0,n.jsx)("stop",{offset:0,stopColor:$(R,K,Y)}),(0,n.jsx)("stop",{offset:.5,stopColor:$(R,K,st)}),(0,n.jsx)("stop",{offset:1,stopColor:$(R,U,y)})]},A)}),P>0&&(0,n.jsxs)("radialGradient",{id:c,gradientUnits:"userSpaceOnUse",cx:p.x,cy:p.y,r:P+jt,children:[(0,n.jsx)("stop",{offset:(P-v)/(P+jt),stopColor:K,stopOpacity:Rn}),(0,n.jsx)("stop",{offset:1,stopColor:K,stopOpacity:0})]}),(0,n.jsxs)("radialGradient",{id:o,cx:"0.38",cy:"0.32",r:"0.75",children:[(0,n.jsx)("stop",{offset:0,stopColor:$(_t,re,.4)}),(0,n.jsx)("stop",{offset:.6,stopColor:$(_t,rt,.3)}),(0,n.jsx)("stop",{offset:1,stopColor:rt})]})]}),P>0&&(0,n.jsx)("circle",{cx:p.x,cy:p.y,r:P+jt,fill:`url(#${c})`,"data-halo":""}),j.map(({key:A,index:R,path:M,pieces:N,swatch:I,color:C,opacity:F,fillOpacity:ot})=>(0,n.jsxs)("g",{opacity:F,"data-pane":I,children:[(0,n.jsx)("clipPath",{id:`${d}-${R}`,children:(0,n.jsx)("path",{d:M})}),(0,n.jsx)("path",{d:M,fill:$(C,U,.45),fillOpacity:ot}),(0,n.jsxs)("g",{...G(R),children:[(0,n.jsx)("path",{d:M,fill:`url(#${i}-${R})`,fillOpacity:ot,"data-glass":""}),(0,n.jsx)("g",{clipPath:`url(#${d}-${R})`,"data-leading":"",children:N.map((J,yt)=>(0,n.jsx)("path",{d:J.path,fill:J.light>=0?K:U,fillOpacity:Math.abs(J.light),stroke:U,strokeOpacity:pn,strokeWidth:fn,strokeLinejoin:"round"},yt))})]})]},A)),(0,n.jsx)("g",{fill:"none",strokeLinejoin:"round","data-tracery":"",children:j.map(({key:A,path:R})=>(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:R,stroke:U,strokeWidth:v+1.6,strokeOpacity:.8}),(0,n.jsx)("path",{d:R,stroke:_t,strokeWidth:v}),(0,n.jsx)("path",{d:R,stroke:re,strokeWidth:Math.max(.6,v*.25),strokeOpacity:.5})]},A))}),T&&(0,n.jsx)(On,{centre:p,radius:Math.max(v*1.8,g*$n),fill:`url(#${o})`}),D&&O>0&&(0,n.jsx)(Dn,{centre:p,radius:O*g,mullion:v,fill:`url(#${o})`})]})},On=({centre:t,radius:e,fill:r})=>(0,n.jsxs)("g",{"data-boss":"",children:[(0,n.jsx)("circle",{cx:t.x,cy:t.y,r:e+.8,fill:U,fillOpacity:.8}),(0,n.jsx)("circle",{cx:t.x,cy:t.y,r:e,fill:r}),(0,n.jsx)("circle",{cx:t.x,cy:t.y,r:e*.45,fill:"none",stroke:rt,strokeWidth:1})]}),wn=(t,e)=>{const r=e*.45,a=e-r,s=[0,1,2,3].map(d=>{const o=d*Math.PI/2+Math.PI/4,c=a*Math.SQRT1_2+Math.sqrt(r*r-(a*Math.SQRT1_2)**2);return{x:t.x+Math.cos(o)*c,y:t.y+Math.sin(o)*c}}),l=d=>d.toFixed(2),i=s[3]??t;return`M${l(i.x)},${l(i.y)} `+s.map(d=>`A${l(r)},${l(r)} 0 1 1 ${l(d.x)},${l(d.y)}`).join(" ")+" Z"},Pn=[[-.5,-.12,1.3],[.18,-.55,.9],[.42,.3,1.1],[-.1,.5,.8]],Dn=({centre:t,radius:e,mullion:r,fill:a})=>{const s=e*kn,l=wn(t,s);return(0,n.jsxs)("g",{"data-roundel":"",children:[(0,n.jsx)("circle",{cx:t.x,cy:t.y,r:e,fill:a}),(0,n.jsx)("circle",{cx:t.x,cy:t.y,r:e-r*1.6,fill:"none",stroke:rt,strokeWidth:1,strokeOpacity:.8}),(0,n.jsx)("path",{d:l,fill:rn,stroke:rt,strokeWidth:1.6,"data-quatrefoil":""}),Pn.map(([i,d,o],c)=>(0,n.jsx)("circle",{cx:t.x+i*s,cy:t.y+d*s,r:o,fill:K,fillOpacity:.85},c))]})},Gn=(0,u.defineGeomRenderer)("bar",{coord:"polar",guideMode:"band",swatchShape:"slice",render:({layer:t,panelRect:e,intro:r})=>(0,n.jsx)(oe,{layer:t,observations:t.data,panel:e,intro:r}),renderHover:({layer:t,primary:e,panelRect:r})=>(0,n.jsx)(oe,{layer:t,observations:[e.observation],panel:r,state:"hovered"}),renderHoverCompanions:()=>null}),Wn=[Ea,Gn,Za,qa,De,Ge,Ja,tn],Nn=34,Fn=.95,Bn=.42,bn=.42,Un=50,Vn=21,Yn=120,zn=.5,Rt=46,le=5,Kn=4,Xn=.16,ie="M0,-1.6 C1.2,-3 2.6,-1.4 3.4,-0.2 C5.2,-3.6 8.4,-4.2 11,-2.6 C9.6,-1.8 9.2,0 9.4,1.4 C7.8,0.2 6.4,0.6 5.6,2 C4.6,0.8 3.2,0.6 2,1.6 C1.4,2.8 0.6,3.4 0,4 C-0.6,3.4 -1.4,2.8 -2,1.6 C-3.2,0.6 -4.6,0.8 -5.6,2 C-6.4,0.6 -7.8,0.2 -9.4,1.4 C-9.2,0 -9.6,-1.8 -11,-2.6 C-8.4,-4.2 -5.2,-3.6 -3.4,-0.2 C-2.6,-1.4 -1.2,-3 0,-1.6 Z",Zn=t=>{const e=at(31);return Array.from({length:Nn},()=>{const r=4+e()*92,a=e()**2*bn*100,s=.35+e()**3*(Fn-.35),l=(.15+e()*(Bn-.15))*(1-a/100);return`<circle cx="${r.toFixed(2)}%" cy="${a.toFixed(2)}%" r="${s.toFixed(2)}" fill="${t}" fill-opacity="${l.toFixed(2)}"/>`}).join("")},qn=({moon:t,bat:e})=>`<svg x="100%" y="0" width="1" height="1" overflow="visible"><g transform="translate(-64,${Un})"><circle r="${Yn}" fill="url(#glow)"/><circle r="${Vn}" fill="${t}" fill-opacity="${zn}"/><circle cx="-6" cy="-5" r="4" fill="${e}" fill-opacity="0.08"/><circle cx="7" cy="6" r="2.6" fill="${e}" fill-opacity="0.08"/><path d="${ie}" fill="${e}" transform="translate(-40,10) scale(0.9) rotate(-8)"/><path d="${ie}" fill="${e}" transform="translate(-14,-30) scale(0.62) rotate(10)"/></g></svg>`,Qn=t=>{const e=Array.from({length:le},(s,l)=>{const i=Math.PI/2*(l/(le-1));return{x:-Math.cos(i),y:-Math.sin(i)}}),r=e.map(({x:s,y:l})=>`M0,0 L${(s*Rt).toFixed(1)},${(l*Rt).toFixed(1)}`),a=Array.from({length:Kn},(s,l)=>{const i=Rt*(l+1)/4.4;return e.map(({x:d,y:o},c)=>{const f=`${(d*i).toFixed(1)},${(o*i).toFixed(1)}`;if(c===0)return`M${f}`;const g=e[c-1]??{x:d,y:o},p=i*.78;return`Q${`${((g.x+d)/2*p).toFixed(1)},${((g.y+o)/2*p).toFixed(1)}`} ${f}`}).join(" ")});return`<svg x="100%" y="100%" width="1" height="1" overflow="visible"><g transform="translate(-6,-6)"><path d="${[...r,...a].join(" ")}" fill="none" stroke="${t}" stroke-opacity="${Xn}" stroke-width="0.8"/></g></svg>`},Jn=t=>{const e=`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><defs><linearGradient id="sky" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="${t.top}"/><stop offset="1" stop-color="${t.bottom}"/></linearGradient><radialGradient id="glow"><stop offset="0" stop-color="${t.moon}" stop-opacity="0.2"/><stop offset="0.35" stop-color="${t.moon}" stop-opacity="0.07"/><stop offset="1" stop-color="${t.moon}" stop-opacity="0"/></radialGradient></defs><rect width="100%" height="100%" fill="url(#sky)"/>`+Zn(t.star)+qn(t)+Qn(t.web)+"</svg>";return`data:image/svg+xml,${encodeURIComponent(e)}`},_={sky:"#24132F",ground:"#130A1A",raised:"#2C1A38",text:"#F1E8D6",secondary:"#BCA9CC",moon:"#F6EBC8",shadow:"#0A0510",grid:"rgba(241, 232, 214, 0.1)",baseline:"rgba(241, 232, 214, 0.55)",silk:"rgba(241, 232, 214, 0.85)",tag:"#EFE4CC",tagInk:"#2A1533"},de="'Creepster', 'Nunito', ui-sans-serif, system-ui, sans-serif",ts="'Nunito', ui-sans-serif, system-ui, sans-serif",ce={candle:"#FFD24A"},X={marble:"#E6E1D8",slate:"#56637A",sandstone:"#C9A677",moss:"#6E8058",rose:"#D6B3B0",granite:"#949089"},es=[X.marble,X.slate,X.sandstone,X.moss,X.rose,X.granite],rs=["#3A1E52","#A23C78","#FF7A1A","#FFE08A"],b={textColor:_.text},Q={textColor:_.secondary},dt={textColor:_.tagInk,fontWeight:700,fontSize:13,lineHeight:1.3,fill:_.tag,stroke:"transparent",strokeWidth:0,cornerRadius:2,shadow:{offsetX:2,offsetY:3,blur:0,color:"rgba(5, 2, 8, 0.7)"}},as=18,ns={tokens:{graphBackground:_.ground,graphBorder:_.baseline,geom:X.marble,geomBorder:_.secondary,textPrimary:_.text,textSecondary:_.secondary,ruleLine:_.silk,gridLine:_.grid,hoverAffordance:_.text,hoverGuideFill:"rgba(241, 232, 214, 0.06)",hoverGuideLine:_.baseline,tooltipBackground:_.raised,tooltipBorder:"rgba(241, 232, 214, 0.25)",tooltipPrimaryRow:"rgba(255, 122, 26, 0.16)",annotationShape:_.text,annotationArrow:_.silk,differenceLabelBackground:_.tag},defaults:[u.style.graph({fill:{image:Jn({top:_.sky,bottom:_.ground,moon:_.moon,bat:_.shadow,star:_.moon,web:_.text}),fit:"stretch",fallback:_.ground},strokeWidth:0,cornerRadius:16,fontFamily:ts,padding:28}),u.style.geom({shadow:"none"},{state:"hovered"}),u.style.geom.bar({stroke:_.text,strokeWidth:0,cornerRadius:"none"}),u.style.geom.bar({strokeWidth:1.5},{state:"hovered"}),u.style.geom.line({strokeWidth:2.5,dashArray:[],lineCap:"round",lineJoin:"round"}),u.style.geom.area({fillAlpha:.55,strokeWidth:2,dashArray:[]}),u.style.geom.point({size:9,stroke:_.text}),u.style.geom.tile({cornerRadius:4,stroke:_.ground,strokeWidth:2}),u.style.geom.tile({stroke:_.text,strokeWidth:1.5},{state:"hovered"}),u.style.geom.rule({stroke:_.silk,strokeWidth:1,dashArray:[]}),u.style.geom.rule.label({textColor:_.tagInk,fontWeight:800,fontSize:13}),u.style.gridLine({dashArray:[]}),u.style.gridLine.x({strokeWidth:0}),u.style.gridLine.y({strokeWidth:1}),u.style.panelBorder({strokeWidth:0}),u.style.panelBorder.bottom({stroke:_.baseline,strokeWidth:1.5,dashArray:[]}),u.style.tickLine({strokeWidth:0}),u.style.tickLabel({...Q,fontWeight:600,fontSize:13,lineHeight:1}),u.style.axisLabel({...Q,fontWeight:700,fontSize:13,lineHeight:1}),u.style.heading({...b}),u.style.heading.h1({...b,fontFamily:de,fontWeight:400,fontSize:30,lineHeight:1.05,letterSpacing:.6}),u.style.heading.h2({...Q,fontWeight:600,fontSize:15,lineHeight:1.25}),u.style.header({margin:{bottom:as}}),u.style.caption({...Q,fontWeight:400,fontSize:13}),u.style.source({...Q,fontWeight:400,fontSize:12}),u.style.dataLabel({...b,fontWeight:700,fontSize:13,fill:"transparent"}),u.style.legendItem({...b,fontWeight:700,fontSize:13,fill:"transparent",stroke:"transparent"}),u.style.directLabel({fontWeight:700,fontSize:13}),u.style.headlineItem.number({...b,fontFamily:de,fontWeight:400,fontSize:34}),u.style.tooltip({strokeWidth:1,cornerRadius:10,paddingInline:12,paddingBlock:9,shadow:"none"}),u.style.tooltip.heading({...b,fontWeight:800,fontSize:14,lineHeight:1.3}),u.style.tooltip.label({...Q,fontWeight:600,fontSize:13,lineHeight:1.35}),u.style.tooltip.value({...b,fontWeight:700,fontSize:13,lineHeight:1.35}),u.style.legend.popover({cornerRadius:10,shadow:"none"}),u.style.annotation.text({...dt,paddingInline:10,paddingBlock:6}),u.style.annotation.pinnedNumber({fill:ce.candle,stroke:_.ground,shadow:"none"}),u.style.annotation.pinnedNumber.label({...dt}),u.style.annotation.comment({fill:ce.candle,stroke:_.ground,shadow:"none"}),u.style.annotation.comment.label({...dt}),u.style.annotation.differenceArrow({stroke:_.silk,strokeWidth:1.25}),u.style.annotation.differenceArrow.label({...dt}),u.style.annotation.arrow({stroke:_.silk,strokeWidth:1.25,dashArray:[]}),u.style.annotation.arrow.outline({stroke:_.ground,strokeWidth:1.5}),u.style.annotation.shape({fill:_.text,fillAlpha:.09,stroke:"transparent",strokeWidth:0}),u.style.panelBorder.bottom({strokeWidth:0},{coord:"polar"}),u.style.tickLabel({...b,fontWeight:800,textOutlineColor:_.ground,textOutlineWidth:3},{coord:"polar"})]},ss={name:"halloween",styles:ns,palette:es,colormap:rs,colorScheme:"dark",plugins:Wn};exports.halloween=ss;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { halloween } from './halloween';
|