@toclocoinc/lattice-grid 1.88.2 → 1.88.3
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 +6 -0
- package/README.md +1 -1
- package/angular/fesm2022/toclocoinc-lattice-grid-angular.mjs +6 -2
- package/angular/package.json +1 -1
- package/angular/types/toclocoinc-lattice-grid-angular.d.ts +3 -1
- package/docs/API.html +62 -6
- package/docs/api/adapters.html +1 -1
- package/docs/api/ai.html +1 -1
- package/docs/api/alarms.html +1 -1
- package/docs/api/calendar.html +1 -1
- package/docs/api/charts.html +1 -1
- package/docs/api/dashboard.html +1 -1
- package/docs/api/data-router.html +1 -1
- package/docs/api/deckgl.html +1 -1
- package/docs/api/gantt.html +58 -2
- package/docs/api/geometry.html +1 -1
- package/docs/api/grid.html +2 -2
- package/docs/api/index.html +2 -2
- package/docs/api/kanban.html +1 -1
- package/docs/api/kpi.html +1 -1
- package/docs/api/layout.html +1 -1
- package/docs/api/leaflet.html +1 -1
- package/docs/api/list.html +1 -1
- package/docs/api/mapview.html +1 -1
- package/docs/api/mock-socket.html +1 -1
- package/docs/api/presets.html +1 -1
- package/docs/api/tabs.html +1 -1
- package/docs/api/types.html +2 -2
- package/docs/api-detail.html +4 -4
- package/docs/warnings.json +1 -1
- package/lattice-grid.d.ts +1 -1
- package/lattice-grid.esm.min.js +3 -3
- package/lattice-grid.min.cjs +3 -3
- package/lattice-grid.min.js +3 -3
- package/modules/ai.d.ts +1 -1
- package/modules/ai.esm.min.js +2 -2
- package/modules/ai.min.cjs +2 -2
- package/modules/ai.min.js +2 -2
- package/modules/alarms.d.ts +1 -1
- package/modules/alarms.esm.min.js +2 -2
- package/modules/alarms.min.cjs +2 -2
- package/modules/alarms.min.js +2 -2
- package/modules/angular.d.ts +1 -1
- package/modules/angular.esm.min.js +2 -2
- package/modules/angular.min.cjs +2 -2
- package/modules/angular.min.js +2 -2
- package/modules/calendar.d.ts +1 -1
- package/modules/calendar.esm.min.js +2 -2
- package/modules/calendar.min.cjs +2 -2
- package/modules/calendar.min.js +2 -2
- package/modules/chart-alluvial.d.ts +1 -1
- package/modules/chart-alluvial.esm.min.js +1 -1
- package/modules/chart-alluvial.min.cjs +1 -1
- package/modules/chart-alluvial.min.js +1 -1
- package/modules/chart-arc.d.ts +1 -1
- package/modules/chart-arc.esm.min.js +1 -1
- package/modules/chart-arc.min.cjs +1 -1
- package/modules/chart-arc.min.js +1 -1
- package/modules/chart-barrace.d.ts +1 -1
- package/modules/chart-barrace.esm.min.js +1 -1
- package/modules/chart-barrace.min.cjs +1 -1
- package/modules/chart-barrace.min.js +1 -1
- package/modules/chart-bubblemap.d.ts +1 -1
- package/modules/chart-bubblemap.esm.min.js +1 -1
- package/modules/chart-bubblemap.min.cjs +1 -1
- package/modules/chart-bubblemap.min.js +1 -1
- package/modules/chart-bump.d.ts +1 -1
- package/modules/chart-bump.esm.min.js +1 -1
- package/modules/chart-bump.min.cjs +1 -1
- package/modules/chart-bump.min.js +1 -1
- package/modules/chart-calendar.d.ts +1 -1
- package/modules/chart-calendar.esm.min.js +1 -1
- package/modules/chart-calendar.min.cjs +1 -1
- package/modules/chart-calendar.min.js +1 -1
- package/modules/chart-choropleth.d.ts +1 -1
- package/modules/chart-choropleth.esm.min.js +1 -1
- package/modules/chart-choropleth.min.cjs +1 -1
- package/modules/chart-choropleth.min.js +1 -1
- package/modules/chart-decomposition.d.ts +1 -1
- package/modules/chart-decomposition.esm.min.js +1 -1
- package/modules/chart-decomposition.min.cjs +1 -1
- package/modules/chart-decomposition.min.js +1 -1
- package/modules/chart-diverging.d.ts +1 -1
- package/modules/chart-diverging.esm.min.js +1 -1
- package/modules/chart-diverging.min.cjs +1 -1
- package/modules/chart-diverging.min.js +1 -1
- package/modules/chart-dumbbell.d.ts +1 -1
- package/modules/chart-dumbbell.esm.min.js +1 -1
- package/modules/chart-dumbbell.min.cjs +1 -1
- package/modules/chart-dumbbell.min.js +1 -1
- package/modules/chart-fan.d.ts +1 -1
- package/modules/chart-fan.esm.min.js +1 -1
- package/modules/chart-fan.min.cjs +1 -1
- package/modules/chart-fan.min.js +1 -1
- package/modules/chart-forcetree.d.ts +1 -1
- package/modules/chart-forcetree.esm.min.js +1 -1
- package/modules/chart-forcetree.min.cjs +1 -1
- package/modules/chart-forcetree.min.js +1 -1
- package/modules/chart-hexbin.d.ts +1 -1
- package/modules/chart-hexbin.esm.min.js +1 -1
- package/modules/chart-hexbin.min.cjs +1 -1
- package/modules/chart-hexbin.min.js +1 -1
- package/modules/chart-hexmap.d.ts +1 -1
- package/modules/chart-hexmap.esm.min.js +1 -1
- package/modules/chart-hexmap.min.cjs +1 -1
- package/modules/chart-hexmap.min.js +1 -1
- package/modules/chart-icicle.d.ts +1 -1
- package/modules/chart-icicle.esm.min.js +1 -1
- package/modules/chart-icicle.min.cjs +1 -1
- package/modules/chart-icicle.min.js +1 -1
- package/modules/chart-markermap.d.ts +1 -1
- package/modules/chart-markermap.esm.min.js +1 -1
- package/modules/chart-markermap.min.cjs +1 -1
- package/modules/chart-markermap.min.js +1 -1
- package/modules/chart-motion.d.ts +1 -1
- package/modules/chart-motion.esm.min.js +1 -1
- package/modules/chart-motion.min.cjs +1 -1
- package/modules/chart-motion.min.js +1 -1
- package/modules/chart-pack.d.ts +1 -1
- package/modules/chart-pack.esm.min.js +1 -1
- package/modules/chart-pack.min.cjs +1 -1
- package/modules/chart-pack.min.js +1 -1
- package/modules/chart-parallel.d.ts +1 -1
- package/modules/chart-parallel.esm.min.js +1 -1
- package/modules/chart-parallel.min.cjs +1 -1
- package/modules/chart-parallel.min.js +1 -1
- package/modules/chart-pictorial.d.ts +1 -1
- package/modules/chart-pictorial.esm.min.js +1 -1
- package/modules/chart-pictorial.min.cjs +1 -1
- package/modules/chart-pictorial.min.js +1 -1
- package/modules/chart-polararea.d.ts +1 -1
- package/modules/chart-polararea.esm.min.js +1 -1
- package/modules/chart-polararea.min.cjs +1 -1
- package/modules/chart-polararea.min.js +1 -1
- package/modules/chart-polarscatter.d.ts +1 -1
- package/modules/chart-polarscatter.esm.min.js +1 -1
- package/modules/chart-polarscatter.min.cjs +1 -1
- package/modules/chart-polarscatter.min.js +1 -1
- package/modules/chart-pyramid.d.ts +1 -1
- package/modules/chart-pyramid.esm.min.js +1 -1
- package/modules/chart-pyramid.min.cjs +1 -1
- package/modules/chart-pyramid.min.js +1 -1
- package/modules/chart-radialbar.d.ts +1 -1
- package/modules/chart-radialbar.esm.min.js +1 -1
- package/modules/chart-radialbar.min.cjs +1 -1
- package/modules/chart-radialbar.min.js +1 -1
- package/modules/chart-ridgeline.d.ts +1 -1
- package/modules/chart-ridgeline.esm.min.js +1 -1
- package/modules/chart-ridgeline.min.cjs +1 -1
- package/modules/chart-ridgeline.min.js +1 -1
- package/modules/chart-roc.d.ts +1 -1
- package/modules/chart-roc.esm.min.js +1 -1
- package/modules/chart-roc.min.cjs +1 -1
- package/modules/chart-roc.min.js +1 -1
- package/modules/chart-serpentine.d.ts +1 -1
- package/modules/chart-serpentine.esm.min.js +1 -1
- package/modules/chart-serpentine.min.cjs +1 -1
- package/modules/chart-serpentine.min.js +1 -1
- package/modules/chart-slope.d.ts +1 -1
- package/modules/chart-slope.esm.min.js +1 -1
- package/modules/chart-slope.min.cjs +1 -1
- package/modules/chart-slope.min.js +1 -1
- package/modules/chart-spiral.d.ts +1 -1
- package/modules/chart-spiral.esm.min.js +1 -1
- package/modules/chart-spiral.min.cjs +1 -1
- package/modules/chart-spiral.min.js +1 -1
- package/modules/chart-splom.d.ts +1 -1
- package/modules/chart-splom.esm.min.js +1 -1
- package/modules/chart-splom.min.cjs +1 -1
- package/modules/chart-splom.min.js +1 -1
- package/modules/chart-tree.d.ts +1 -1
- package/modules/chart-tree.esm.min.js +1 -1
- package/modules/chart-tree.min.cjs +1 -1
- package/modules/chart-tree.min.js +1 -1
- package/modules/chart-venn.d.ts +1 -1
- package/modules/chart-venn.esm.min.js +1 -1
- package/modules/chart-venn.min.cjs +1 -1
- package/modules/chart-venn.min.js +1 -1
- package/modules/chart-voronoi.d.ts +1 -1
- package/modules/chart-voronoi.esm.min.js +1 -1
- package/modules/chart-voronoi.min.cjs +1 -1
- package/modules/chart-voronoi.min.js +1 -1
- package/modules/chart-waffle.d.ts +1 -1
- package/modules/chart-waffle.esm.min.js +1 -1
- package/modules/chart-waffle.min.cjs +1 -1
- package/modules/chart-waffle.min.js +1 -1
- package/modules/chart-wordcloud.d.ts +1 -1
- package/modules/chart-wordcloud.esm.min.js +1 -1
- package/modules/chart-wordcloud.min.cjs +1 -1
- package/modules/chart-wordcloud.min.js +1 -1
- package/modules/charts.d.ts +1 -1
- package/modules/charts.esm.min.js +2 -2
- package/modules/charts.min.cjs +2 -2
- package/modules/charts.min.js +2 -2
- package/modules/dashboard.d.ts +1 -1
- package/modules/dashboard.esm.min.js +2 -2
- package/modules/dashboard.min.cjs +2 -2
- package/modules/dashboard.min.js +2 -2
- package/modules/data-router.d.ts +1 -1
- package/modules/data-router.esm.min.js +2 -2
- package/modules/data-router.min.cjs +2 -2
- package/modules/data-router.min.js +2 -2
- package/modules/deckgl.d.ts +1 -1
- package/modules/deckgl.esm.min.js +2 -2
- package/modules/deckgl.min.cjs +2 -2
- package/modules/deckgl.min.js +2 -2
- package/modules/devtools.d.ts +1 -1
- package/modules/devtools.esm.min.js +1 -1
- package/modules/devtools.min.cjs +1 -1
- package/modules/devtools.min.js +1 -1
- package/modules/dhtmlx-compat.d.ts +1 -1
- package/modules/dhtmlx-compat.esm.min.js +2 -2
- package/modules/dhtmlx-compat.min.cjs +2 -2
- package/modules/dhtmlx-compat.min.js +2 -2
- package/modules/gantt.d.ts +58 -3
- package/modules/gantt.esm.min.js +223 -217
- package/modules/gantt.esm.min.js.map +2 -2
- package/modules/gantt.min.cjs +222 -216
- package/modules/gantt.min.js +222 -216
- package/modules/gantt.min.js.map +2 -2
- package/modules/geo-europe-nuts.d.ts +1 -1
- package/modules/geo-europe-nuts.esm.min.js +1 -1
- package/modules/geo-europe-nuts.min.cjs +1 -1
- package/modules/geo-europe-nuts.min.js +1 -1
- package/modules/geo-uk.d.ts +1 -1
- package/modules/geo-uk.esm.min.js +1 -1
- package/modules/geo-uk.min.cjs +1 -1
- package/modules/geo-uk.min.js +1 -1
- package/modules/geo-us-states.d.ts +1 -1
- package/modules/geo-us-states.esm.min.js +1 -1
- package/modules/geo-us-states.min.cjs +1 -1
- package/modules/geo-us-states.min.js +1 -1
- package/modules/geo-world-110m.d.ts +1 -1
- package/modules/geo-world-110m.esm.min.js +1 -1
- package/modules/geo-world-110m.min.cjs +1 -1
- package/modules/geo-world-110m.min.js +1 -1
- package/modules/geo-world-50m.d.ts +1 -1
- package/modules/geo-world-50m.esm.min.js +1 -1
- package/modules/geo-world-50m.min.cjs +1 -1
- package/modules/geo-world-50m.min.js +1 -1
- package/modules/geometry.d.ts +1 -1
- package/modules/geometry.esm.min.js +2 -2
- package/modules/geometry.min.cjs +2 -2
- package/modules/geometry.min.js +2 -2
- package/modules/htmx.d.ts +1 -1
- package/modules/htmx.esm.min.js +3 -3
- package/modules/htmx.min.cjs +3 -3
- package/modules/htmx.min.js +3 -3
- package/modules/kanban.d.ts +1 -1
- package/modules/kanban.esm.min.js +2 -2
- package/modules/kanban.min.cjs +2 -2
- package/modules/kanban.min.js +2 -2
- package/modules/kpi.d.ts +1 -1
- package/modules/kpi.esm.min.js +2 -2
- package/modules/kpi.min.cjs +2 -2
- package/modules/kpi.min.js +2 -2
- package/modules/layout.d.ts +1 -1
- package/modules/layout.esm.min.js +2 -2
- package/modules/layout.min.cjs +2 -2
- package/modules/layout.min.js +2 -2
- package/modules/leaflet.d.ts +1 -1
- package/modules/leaflet.esm.min.js +2 -2
- package/modules/leaflet.min.cjs +2 -2
- package/modules/leaflet.min.js +2 -2
- package/modules/list.d.ts +1 -1
- package/modules/list.esm.min.js +2 -2
- package/modules/list.min.cjs +2 -2
- package/modules/list.min.js +2 -2
- package/modules/mapview.d.ts +1 -1
- package/modules/mapview.esm.min.js +2 -2
- package/modules/mapview.min.cjs +2 -2
- package/modules/mapview.min.js +2 -2
- package/modules/mock-socket.d.ts +1 -1
- package/modules/mock-socket.esm.min.js +1 -1
- package/modules/mock-socket.min.cjs +1 -1
- package/modules/mock-socket.min.js +1 -1
- package/modules/presets.d.ts +1 -1
- package/modules/presets.esm.min.js +2 -2
- package/modules/presets.min.cjs +2 -2
- package/modules/presets.min.js +2 -2
- package/modules/react.d.ts +1 -1
- package/modules/react.esm.min.js +2 -2
- package/modules/react.esm.min.js.map +1 -1
- package/modules/react.min.cjs +2 -2
- package/modules/react.min.js +2 -2
- package/modules/react.min.js.map +1 -1
- package/modules/svelte.d.ts +1 -1
- package/modules/svelte.esm.min.js +3 -3
- package/modules/svelte.esm.min.js.map +1 -1
- package/modules/svelte.min.cjs +2 -2
- package/modules/svelte.min.js +2 -2
- package/modules/svelte.min.js.map +1 -1
- package/modules/tabs.d.ts +1 -1
- package/modules/tabs.esm.min.js +2 -2
- package/modules/tabs.min.cjs +2 -2
- package/modules/tabs.min.js +2 -2
- package/modules/vue.d.ts +1 -1
- package/modules/vue.esm.min.js +2 -2
- package/modules/vue.esm.min.js.map +1 -1
- package/modules/vue.min.cjs +2 -2
- package/modules/vue.min.js +2 -2
- package/modules/vue.min.js.map +1 -1
- package/modules/webcomponent.d.ts +1 -1
- package/modules/webcomponent.esm.min.js +4 -4
- package/modules/webcomponent.esm.min.js.map +1 -1
- package/modules/webcomponent.min.cjs +4 -4
- package/modules/webcomponent.min.js +4 -4
- package/modules/webcomponent.min.js.map +1 -1
- package/package.json +1 -1
package/modules/chart-roc.d.ts
CHANGED
package/modules/chart-roc.min.js
CHANGED
package/modules/chart-slope.d.ts
CHANGED
package/modules/chart-splom.d.ts
CHANGED
package/modules/chart-tree.d.ts
CHANGED
package/modules/chart-venn.d.ts
CHANGED
package/modules/charts.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.88.
|
|
2
|
+
* Lattice Grid 1.88.3, charts module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
6
|
-
var fo=Object.create(null),ho=Object.create(null);function at(r,ie){fo[r]=ie}function mo(r){var ie=ho[r];if(ie)return ie;var Oe=Object.create(null);ho[r]=Oe;var ue=fo[r];if(!ue)throw new Error("[lattice] missing module: "+r);return ue(Oe,mo),Oe}at("packages/modules/charts/svg.js",function(r,ie){"use strict";Object.defineProperty(r,"SVG_NS",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(r,"el",{enumerable:!0,get:function(){return j}}),Object.defineProperty(r,"svg",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(r,"attr",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(r,"attrs",{enumerable:!0,get:function(){return he}}),Object.defineProperty(r,"setText",{enumerable:!0,get:function(){return se}}),Object.defineProperty(r,"clear",{enumerable:!0,get:function(){return J}}),Object.defineProperty(r,"append",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(r,"path",{enumerable:!0,get:function(){return _}}),Object.defineProperty(r,"ribbonPath",{enumerable:!0,get:function(){return v}}),Object.defineProperty(r,"round",{enumerable:!0,get:function(){return C}}),Object.defineProperty(r,"pathRings",{enumerable:!0,get:function(){return h}}),Object.defineProperty(r,"insideRings",{enumerable:!0,get:function(){return V}});const Oe="http://www.w3.org/2000/svg";function ue(Y){const k=Y.indexOf(")");return k<0?Y:Y.slice(k+1).trim()||"#0072b2"}function j(Y,k,g){const u=Y.createElement(k);return g&&u.setAttribute("class",g),u}function Se(Y,k,g){const u=Y.createElementNS(Oe,k);if(g)for(const y of Object.keys(g))u.setAttribute(y,String(g[y]));return u}function Ae(Y,k,g){if(!Y)return;if(g==null){Y.removeAttribute(k);return}let u=String(g);u.startsWith("url(#")&&(k==="stroke"||k==="fill"&&Y.localName==="text")&&(u=ue(u)),Y.setAttribute(k,u)}function he(Y,k){if(Y)for(const g of Object.keys(k))Ae(Y,g,k[g])}function se(Y,k){Y&&(Y.textContent=k==null?"":String(k))}function J(Y){if(Y)for(;Y.firstChild;)Y.removeChild(Y.firstChild)}function ae(Y,k){for(const g of k)g&&Y.appendChild(g);return Y}function _(Y){return Y.join(" ")}function v(Y){if(!Y||Y.length<2)return"";const k=["M",Y[0].x,Y[0].upper];for(let g=1;g<Y.length;g++)k.push("L",Y[g].x,Y[g].upper);for(let g=Y.length-1;g>=0;g--)k.push("L",Y[g].x,Y[g].lower);return k.push("Z"),_(k)}function C(Y){return Math.round(Y*100)/100}function h(Y){const k=[];let g=[];const u=String(Y||"").match(/[A-Za-z]|-?\d*\.?\d+(?:e[-+]?\d+)?/gi)||[];let y="",N=[];const ee=()=>{if(!y||!N.length){N=[];return}if(y==="M"||y==="L")for(let p=0;p+1<N.length;p+=2)g.push([N[p],N[p+1]]);else y!=="Z"&&N.length>=2&&g.push([N[N.length-2],N[N.length-1]]);N=[]};for(const p of u){if(/[A-Za-z]/.test(p)){if(ee(),p==="Z"||p==="z"){g.length>2&&k.push(g),g=[],y="";continue}p==="M"&&g.length>2&&(k.push(g),g=[]),y=p;continue}N.push(Number(p))}return ee(),g.length>2&&k.push(g),k}function V(Y,k,g){let u=!1;for(const y of Y)for(let N=0,ee=y.length-1;N<y.length;ee=N++){const[p,I]=y[N],[a,A]=y[ee];I>g!=A>g&&k<(a-p)*(g-I)/(A-I||1e-12)+p&&(u=!u)}return u}}),at("packages/modules/charts/typography.js",function(r,ie){"use strict";Object.defineProperty(r,"BASE_SIZE",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(r,"BASE_FAMILY",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(r,"CHAR_RATIO",{enumerable:!0,get:function(){return j}}),Object.defineProperty(r,"resolveType",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(r,"textWidth",{enumerable:!0,get:function(){return he}}),Object.defineProperty(r,"widestLabel",{enumerable:!0,get:function(){return se}}),Object.defineProperty(r,"truncateTo",{enumerable:!0,get:function(){return J}}),Object.defineProperty(r,"applySize",{enumerable:!0,get:function(){return ae}});const Oe=12,ue="var(--lattice-font-family, system-ui, -apple-system, sans-serif)",j=.62;function Se(_){const v=_&&_.font,C=typeof v=="number"?{size:v}:v||{},h=Ae(C.size,Oe);return{family:C.family||ue,size:h,small:Ae(C.small??C.tickSize,Math.max(9,h-1)),title:Ae(C.title,Math.round(h*1.15)),axisTitle:Ae(C.axisTitle,Math.max(10,h-1)),weight:C.weight||"inherit"}}function Ae(_,v){const C=Number(_);return Number.isFinite(C)&&C>0?C:v}function he(_,v){return String(_??"").length*v*j}function se(_,v){let C=0;for(const h of _||[]){const V=he(h,v);V>C&&(C=V)}return C}function J(_,v,C){const h=String(_??""),V=Math.floor(v/(C*j));return V<=0?"":h.length<=V?h:V===1?"…":`${h.slice(0,V-1)}…`}function ae(_,v){!_||!Number.isFinite(v)||(_.style?_.style.fontSize=`${v}px`:_.setAttribute("style",`font-size:${v}px`))}}),at("packages/modules/charts/frame.js",function(r,ie){"use strict";Object.defineProperty(r,"LABEL_GAP",{enumerable:!0,get:function(){return se}}),Object.defineProperty(r,"LABEL_GUTTER_SHARE",{enumerable:!0,get:function(){return J}}),Object.defineProperty(r,"resolveMargin",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(r,"plotRect",{enumerable:!0,get:function(){return _}}),Object.defineProperty(r,"shouldRotate",{enumerable:!0,get:function(){return v}}),Object.defineProperty(r,"Pool",{enumerable:!0,get:function(){return C}});const ue=ie("packages/modules/charts/svg.js").SVG_NS,j=ie("packages/modules/charts/typography.js"),Se=j.textWidth,Ae=j.widestLabel,he=8,se=6,J=.4;function ae(h,V){const Y=typeof h=="number"?h:V,k=h&&typeof h=="object"?h:{},g=u=>Number.isFinite(u)&&u>=0?Number(u):Y;return{base:Y,top:g(k.top),right:g(k.right),bottom:g(k.bottom),left:g(k.left)}}function _(h){const V=ae(h.margin,typeof h.padding=="number"?h.padding:8),Y=V.base,k=h.fontSize||12,g=h.yLabels||[],u=h.xLabels||[],y=h.ySide==="right"?"right":"left",N=y==="right"?"left":"right",ee=h.titles||{},p=h.titleSize||k,I=te=>te?p+se:0,a=Ae(g,k),A=g.length?Math.min(h.width*J,V[y]+a+se):Math.max(he,V[y]),E=V[N]+(h.rightGutter||0),m=(y==="left"?A:E)+I(ee.left),f=Ae(u.map(te=>String(te).slice(0,14)),k),L=(u.length?h.rotated?Math.min(h.height*J,se+f):k+se+V.bottom:Math.max(he,V.bottom))+I(ee.bottom),q=(y==="right"?A:E)+I(ee.right),Q=V.top+(h.topGutter||0),pe=Math.max(0,h.width-m-q),ce=Math.max(0,h.height-Q-L);return{left:m,top:Q,width:pe,height:ce,right:m+pe,bottom:Q+ce,gutter:{left:m,bottom:L,right:q,top:Q}}}function v(h,V,Y,k){if(!h.length||V<=0)return!1;const g=Number.isFinite(k)&&k>0?Number(k):1;return Ae(h,Y)>V*g-4}class C{#r;#n=0;static#i="data-pool-key";constructor(V,Y=0){this.#r=V,this.#n=Y>0?Y:0}next(V,Y,k){if(k!=null)return this.#e(V,Y,String(k));const g=this.#r.childNodes[this.#n],u=g&&g.tagName,y=/(^|\s)\S*__axis-title(\s|$)/,N=u&&y.test(String(g.getAttribute("class")||"")),ee=!!Y&&y.test(String(Y));if(u&&(!N||ee)&&String(u).toLowerCase()===V.toLowerCase())return Y&&g.setAttribute("class",Y),this.#n++,g;const p=this.#r.ownerDocument.createElementNS(ue,V);return Y&&p.setAttribute("class",Y),g?this.#r.insertBefore(p,g):this.#r.appendChild(p),this.#n++,p}#e(V,Y,k){const g=V.toLowerCase();for(let N=this.#n;N<this.#r.childNodes.length;N++){const ee=this.#r.childNodes[N],p=ee&&ee.tagName;if(p&&String(p).toLowerCase()===g&&ee.getAttribute(C.#i)===k)return N!==this.#n&&this.#r.insertBefore(ee,this.#r.childNodes[this.#n]),Y&&ee.setAttribute("class",Y),this.#n++,ee}const u=this.#r.ownerDocument.createElementNS(ue,V);u.setAttribute(C.#i,k),Y&&u.setAttribute("class",Y);const y=this.#r.childNodes[this.#n];return y?this.#r.insertBefore(u,y):this.#r.appendChild(u),this.#n++,u}finish(){for(;this.#r.childNodes.length>this.#n;)this.#r.removeChild(this.#r.lastChild);this.#n=0}}}),at("packages/core/src/internal/util.js",function(r,ie){"use strict";Object.defineProperty(r,"VERSION",{enumerable:!0,get:function(){return j}}),Object.defineProperty(r,"reportedWarnings",{enumerable:!0,get:function(){return v}}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return h}}),Object.defineProperty(r,"infoOnce",{enumerable:!0,get:function(){return V}}),Object.defineProperty(r,"resetWarnings",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(r,"fail",{enumerable:!0,get:function(){return k}}),Object.defineProperty(r,"invariant",{enumerable:!0,get:function(){return g}}),Object.defineProperty(r,"DEV",{enumerable:!0,get:function(){return u}}),Object.defineProperty(r,"isObject",{enumerable:!0,get:function(){return y}}),Object.defineProperty(r,"isFunction",{enumerable:!0,get:function(){return N}}),Object.defineProperty(r,"isNil",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(r,"isBlank",{enumerable:!0,get:function(){return p}}),Object.defineProperty(r,"isCtor",{enumerable:!0,get:function(){return I}}),Object.defineProperty(r,"pathGetter",{enumerable:!0,get:function(){return A}}),Object.defineProperty(r,"pathSetter",{enumerable:!0,get:function(){return m}}),Object.defineProperty(r,"getPath",{enumerable:!0,get:function(){return f}}),Object.defineProperty(r,"setPath",{enumerable:!0,get:function(){return L}}),Object.defineProperty(r,"humanise",{enumerable:!0,get:function(){return q}}),Object.defineProperty(r,"escapeHtml",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(r,"titleCase",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(r,"expand",{enumerable:!0,get:function(){return te}}),Object.defineProperty(r,"toArray",{enumerable:!0,get:function(){return H}}),Object.defineProperty(r,"merge",{enumerable:!0,get:function(){return l}}),Object.defineProperty(r,"mergeRow",{enumerable:!0,get:function(){return t}}),Object.defineProperty(r,"Lru",{enumerable:!0,get:function(){return e}}),Object.defineProperty(r,"collator",{enumerable:!0,get:function(){return P}}),Object.defineProperty(r,"defaultCompare",{enumerable:!0,get:function(){return O}}),Object.defineProperty(r,"now",{enumerable:!0,get:function(){return T}}),Object.defineProperty(r,"nextFrame",{enumerable:!0,get:function(){return R}}),Object.defineProperty(r,"cancelFrame",{enumerable:!0,get:function(){return b}}),Object.defineProperty(r,"frameBatched",{enumerable:!0,get:function(){return U}}),Object.defineProperty(r,"settleDebounce",{enumerable:!0,get:function(){return re}}),Object.defineProperty(r,"whenIdle",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(r,"uid",{enumerable:!0,get:function(){return le}});const Oe="1.88.2";async function ue(){return Oe}const j="1.88.2",Se=new Set,Ae=2e3;function he($){if(Se.add($),Se.size>Ae){const B=Se.values().next().value;B!==void 0&&Se.delete(B)}}const se=[],J=500;function ae($,B,oe){se.push({key:$,level:B,message:oe.map(i=>typeof i=="string"?i:_(i)).join(" "),at:Date.now()}),se.length>J&&se.shift()}function _($){if($ instanceof Error)return $.message;try{return JSON.stringify($)}catch{return String($)}}function v(){return se.map($=>({...$}))}function C($){if($.length===0||typeof $[0]!="string")return $;const B=$[0].replace(/^\[lattice\]\s*/,"");return B===$[0]?$:[B,...$.slice(1)]}function h($,...B){if(Se.has($))return;he($);const oe=C(B);ae($,"warn",oe),console.warn("[lattice]",...oe)}function V($,...B){if(Se.has($))return;he($);const oe=C(B);ae($,"info",oe),console.info("[lattice]",...oe)}function Y(){Se.clear(),se.length=0}function k($,B){const oe=new Error(`[lattice] ${$}`);throw B!==void 0&&(oe.cause=B),oe}function g($,B){$||k(B)}const u=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function y($){return $!==null&&typeof $=="object"&&!Array.isArray($)}function N($){return typeof $=="function"}function ee($){return $==null}function p($){return $==null||$===""}function I($){return typeof $!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call($))?!0:!!($.prototype&&Object.getOwnPropertyNames($.prototype).length>1)}const a=new Map;function A($){let B=a.get($);if(B)return B;if(!$.includes("."))B=oe=>oe?.[$];else{const oe=$.split("."),i=oe.length;B=s=>{let n=s;for(let M=0;M<i;M++){if(n==null)return;n=n[oe[M]]}return n}}return a.set($,B),B}const E=new Map;function m($){let B=E.get($);if(B)return B;if(!$.includes("."))B=(oe,i)=>{oe!=null&&(oe[$]=i)};else{const oe=$.split("."),i=oe.length-1;B=(s,n)=>{let M=s;for(let o=0;o<i;o++){if(M==null)return;const x=oe[o];M[x]==null&&(M[x]={}),M=M[x]}M!=null&&(M[oe[i]]=n)}}return E.set($,B),B}function f($,B){return A(B)($)}function L($,B,oe){m(B)($,oe)}function q($){return $?($.includes(".")?$.slice($.lastIndexOf(".")+1):$).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,oe=>oe.toUpperCase()):""}const Q={"&":"&","<":"<",">":">",'"':""","'":"'"};function pe($){const B=$==null?"":String($);return/[&<>"']/.test(B)?B.replace(/[&<>"']/g,oe=>Q[oe]):B}function ce($){return String($).replace(/\w\S*/g,B=>B[0].toUpperCase()+B.slice(1).toLowerCase())}function te($,B,oe){if($!==void 0)return $===!0?{enabled:!0,...oe}:$===!1?{enabled:!1}:y($)?$:{[B]:$,enabled:!0}}function H($){return $==null?[]:Array.isArray($)?$:[$]}const D=Object.freeze(new Set(["__proto__","constructor","prototype"]));function l($,B){if(!y($))return y(B)?{...B}:B;if(!y(B))return B===void 0?$:B;const oe={...$};for(const i of Object.keys(B)){if(D.has(i))continue;const s=B[i];s!==void 0&&(oe[i]=y(s)&&y(oe[i])?l(oe[i],s):s)}return oe}function t($,B){if(!y($)||!y(B)||$===B)return B;const oe=Object.create(Object.getPrototypeOf($));return Object.assign(oe,$,B),oe}class e{#r;#n=new Map;#i;constructor(B=256,oe=null){this.#r=B,this.#i=oe}get size(){return this.#n.size}get max(){return this.#r}set max(B){this.#r=B,this.#e()}has(B){return this.#n.has(B)}get(B){const oe=this.#n;if(!oe.has(B))return;const i=oe.get(B);return oe.delete(B),oe.set(B,i),i}peek(B){return this.#n.get(B)}set(B,oe){const i=this.#n;return i.has(B)&&i.delete(B),i.set(B,oe),this.#e(),oe}delete(B){const oe=this.#n.get(B);return this.#n.delete(B)&&this.#i&&this.#i(oe,B),oe}clear(){if(this.#i)for(const[B,oe]of this.#n)this.#i(oe,B);this.#n.clear()}keys(){return this.#n.keys()}values(){return this.#n.values()}#e(){const B=this.#n;for(;B.size>this.#r;){const oe=B.keys().next().value,i=B.get(oe);B.delete(oe),this.#i&&this.#i(i,oe)}}}const d=new Map;function P($,B){const oe=`${$||""}|${B?JSON.stringify(B):""}`;let i=d.get(oe);return i||(i=new Intl.Collator($||void 0,{numeric:!0,sensitivity:"variant",...B}),d.set(oe,i)),i}function O($,B){if($===B)return 0;if($==null)return 1;if(B==null)return-1;if(typeof $=="number"&&typeof B=="number")return Number.isNaN($)?Number.isNaN(B)?0:1:Number.isNaN(B)||$<B?-1:$>B?1:0;const oe=String($),i=String(B);return oe<i?-1:oe>i?1:0}function T(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const W=typeof requestAnimationFrame=="function";function R($){return W?requestAnimationFrame($):setTimeout(()=>$(T()),16)}function b($){$!=null&&(W?cancelAnimationFrame($):clearTimeout($))}function U($){let B=null,oe=null;const i=()=>{B=null;const n=oe;oe=null,$(...n||[])},s=(...n)=>{oe=n,B===null&&(B=R(i))};return s.cancel=()=>{b(B),B=null,oe=null},s.flush=()=>{B!==null&&(b(B),i())},s}function re($,B){let oe=null,i=null;const s=()=>{if(oe=null,i===null)return;const o=i;i=null,$(...o),n()},n=()=>{oe=setTimeout(s,B),typeof oe?.unref=="function"&&oe.unref()},M=(...o)=>{oe===null?($(...o),n()):(i=o,clearTimeout(oe),n())};return M.flush=()=>{if(oe!==null&&clearTimeout(oe),oe=null,i===null)return;const o=i;i=null,$(...o)},M.cancel=()=>{oe!==null&&clearTimeout(oe),oe=null,i=null},M.pending=()=>oe!==null||i!==null,M}function ne($,B=50){return typeof requestIdleCallback=="function"?requestIdleCallback($,{timeout:B}):setTimeout(()=>$({timeRemaining:()=>0,didTimeout:!0}),1)}let G=0;function le($="l"){return`${$}${(++G).toString(36)}`}}),at("packages/modules/charts/fills.js",function(r,ie){"use strict";Object.defineProperty(r,"PATTERNS",{enumerable:!0,get:function(){return j}}),Object.defineProperty(r,"GRADIENTS",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(r,"isFill",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(r,"isPaintRef",{enumerable:!0,get:function(){return _}}),Object.defineProperty(r,"paintFallback",{enumerable:!0,get:function(){return v}}),Object.defineProperty(r,"normaliseFill",{enumerable:!0,get:function(){return h}}),Object.defineProperty(r,"swatchCss",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(r,"createFillRegistry",{enumerable:!0,get:function(){return k}}),Object.defineProperty(r,"rowPaint",{enumerable:!0,get:function(){return g}}),Object.defineProperty(r,"patternSeries",{enumerable:!0,get:function(){return u}}),Object.defineProperty(r,"paintSolid",{enumerable:!0,get:function(){return y}}),Object.defineProperty(r,"rowFillSource",{enumerable:!0,get:function(){return N}}),Object.defineProperty(r,"nodePaint",{enumerable:!0,get:function(){return ee}});const ue=ie("packages/core/src/internal/util.js").warnOnce,j=Object.freeze(["hatch","crosshatch","dots","grid"]),Se=Object.freeze(["linear","radial"]),Ae=8,he="#0072b2";let se=0;const J=new Map;function ae(p){return!!p&&typeof p=="object"&&!Array.isArray(p)&&(typeof p.gradient=="string"||typeof p.pattern=="string")}function _(p){return typeof p=="string"&&p.startsWith("url(#")}function v(p){if(typeof p!="string")return p==null?"":String(p);if(!p.startsWith("url("))return p;const I=p.indexOf(")");return(I<0?"":p.slice(I+1).trim())||he}function C(p,I){ue(`chart:fill:invalid:${p}`,`a chart fill object was ignored: ${I} The mark was drawn in a solid colour instead. A fill is a gradient object (gradient: "linear" or "radial", with stops of [offset, colour]) or a pattern object (pattern: "hatch", "crosshatch", "dots" or "grid", with a colour).`)}function h(p,I){if(!ae(p))return null;const a=I||he;if(typeof p.gradient=="string"){if(!Se.includes(p.gradient))return C("gradient",`the gradient "${p.gradient}" is not one of ${Se.join(", ")}.`),null;const f=Array.isArray(p.stops)?p.stops:[],L=[];for(const Q of f){const pe=Array.isArray(Q)?Number(Q[0]):Number(Q&&Q.offset),ce=Array.isArray(Q)?Q[1]:Q&&Q.colour;!Number.isFinite(pe)||typeof ce!="string"||!ce||L.push({offset:Math.min(1,Math.max(0,pe)),colour:ce})}if(L.length<2)return C("stops","a gradient needs at least two [offset, colour] stops."),null;L.sort((Q,pe)=>Q.offset-pe.offset);const q=Number.isFinite(Number(p.angle))?Number(p.angle):180;return{kind:p.gradient,angle:q,stops:L,solid:L[0].colour}}if(!j.includes(p.pattern))return C("pattern",`the pattern "${p.pattern}" is not one of ${j.join(", ")}.`),null;const A=Number(p.size),E=Number(p.angle),m=typeof p.colour=="string"&&p.colour?p.colour:a;return{kind:"pattern",pattern:p.pattern,colour:m,background:typeof p.background=="string"&&p.background?p.background:null,size:Number.isFinite(A)&&A>=2?A:Ae,angle:Number.isFinite(E)?E:p.pattern==="grid"||p.pattern==="dots"?0:45,solid:m}}function V(p){if(p.kind==="pattern"){const a=p.colour,A=p.size,E=Math.max(1,A/5),m=p.background||"transparent",f=L=>`repeating-linear-gradient(${L+90}deg,${a} 0 ${E}px,transparent ${E}px ${A}px)`;return p.pattern==="hatch"?`${f(p.angle)},${m}`:p.pattern==="crosshatch"?`${f(p.angle)},${f(p.angle+90)},${m}`:p.pattern==="grid"?`${f(p.angle)},${f(p.angle+90)},${m}`:`radial-gradient(circle at 50% 50%,${a} ${A/6}px,transparent ${A/6+.5}px) 0 0/${A}px ${A}px,${m}`}const I=p.stops.map(a=>`${a.colour} ${Math.round(a.offset*100)}%`).join(",");return p.kind==="radial"?`radial-gradient(circle,${I})`:`linear-gradient(${p.angle}deg,${I})`}function Y(p){if(!_(p))return typeof p=="string"?p:"";const I=String(p).indexOf(")"),a=String(p).slice(5,I),A=J.get(a);return A?V(A):v(p)}function k(p){const I=`lattice-fill-${++se}`;let a=new Map,A=0;const E=(f,L)=>{const q=p.ownerDocument.createElementNS("http://www.w3.org/2000/svg",f);for(const Q of Object.keys(L))q.setAttribute(Q,String(L[Q]));return q},m=(f,L)=>{if(L.kind==="pattern"){const Q=L.size,pe=Math.max(1,Q/5),ce=E("pattern",{id:f,width:Q,height:Q,patternUnits:"userSpaceOnUse"});L.angle&&ce.setAttribute("patternTransform",`rotate(${L.angle})`),L.background&&ce.appendChild(E("rect",{width:Q,height:Q,fill:L.background}));const te={stroke:L.colour,"stroke-width":pe};L.pattern==="dots"?ce.appendChild(E("circle",{cx:Q/2,cy:Q/2,r:Math.max(1,Q/6),fill:L.colour})):(ce.appendChild(E("line",{x1:Q/2,y1:0,x2:Q/2,y2:Q,...te})),L.pattern!=="hatch"&&ce.appendChild(E("line",{x1:0,y1:Q/2,x2:Q,y2:Q/2,...te}))),p.appendChild(ce);return}let q;if(L.kind==="radial")q=E("radialGradient",{id:f,cx:.5,cy:.5,r:.5});else{const Q=L.angle*Math.PI/180,pe=Math.sin(Q)/2,ce=-Math.cos(Q)/2;q=E("linearGradient",{id:f,x1:+(.5-pe).toFixed(4),y1:+(.5-ce).toFixed(4),x2:+(.5+pe).toFixed(4),y2:+(.5+ce).toFixed(4)})}for(const Q of L.stops)q.appendChild(E("stop",{offset:Q.offset,"stop-color":Q.colour}));p.appendChild(q)};return{prefix:I,paint(f,L){const q=h(f,L);if(!q)return L||he;if(!p||!p.ownerDocument)return q.solid;const Q=JSON.stringify(q);let pe=a.get(Q);if(!pe){const ce=`${I}-${A++}`;m(ce,q),J.set(ce,q),pe=`url(#${ce}) ${q.solid}`,a.set(Q,pe)}return pe},reset(){for(const f of a.values())J.delete(f.slice(5,f.indexOf(")")));if(a=new Map,A=0,p)for(;p.firstChild;)p.removeChild(p.firstChild)},ids(){return[...a.values()].map(f=>f.slice(5,f.indexOf(")")))}}}function g(p,I,a){if(p==null||p==="")return null;const A=v(a);if(ae(p))return I?I.paint(p,A):(h(p,A)||{}).solid||null;if(typeof p=="string"){if(j.includes(p)){const E={pattern:p,colour:A};return I?I.paint(E,A):A}return p}return null}function u(p){const I=[{pattern:"hatch",angle:45},{pattern:"dots"},{pattern:"crosshatch",angle:45},{pattern:"hatch",angle:135},{pattern:"grid"},{pattern:"dots",size:5},{pattern:"hatch",angle:0},{pattern:"crosshatch",angle:0,size:6}];return p.map((a,A)=>({...I[A%I.length],colour:a,background:"var(--lattice-background, #fff)"}))}function y(p){return _(p)?String(p).replace(/^url\([^)]*\)\s*/,""):p}function N(p,I){const a=p.fill;if(ae(a))return(E,m)=>g(a,I.fills,y(m));if(typeof a=="function")return(E,m)=>{let f=null;try{f=a({label:E.label,x:E.x,y:E.y,rowKey:E.rowKey})}catch{f=null}return g(f,I.fills,y(m))};const A=typeof a=="string"?a:a&&typeof a=="object"&&typeof a.col=="string"?a.col:null;return A?(E,m)=>E.rowKey===void 0||E.rowKey===null?null:g(p.grid.rows.value(E.rowKey,A),I.fills,y(m)):null}function ee(p,I,a){return p&&p({label:I.label,x:I.value,y:I.total,rowKey:I.rowKey},a)||a}}),at("packages/modules/charts/scheme.js",function(r,ie){"use strict";Object.defineProperty(r,"PALETTE",{enumerable:!0,get:function(){return se}}),Object.defineProperty(r,"SCHEMES",{enumerable:!0,get:function(){return J}}),Object.defineProperty(r,"registerScheme",{enumerable:!0,get:function(){return v}}),Object.defineProperty(r,"setDefaultScheme",{enumerable:!0,get:function(){return C}}),Object.defineProperty(r,"schemeNames",{enumerable:!0,get:function(){return h}}),Object.defineProperty(r,"resolveScheme",{enumerable:!0,get:function(){return g}}),Object.defineProperty(r,"RAMP_SCALES",{enumerable:!0,get:function(){return y}}),Object.defineProperty(r,"toRgb",{enumerable:!0,get:function(){return p}}),Object.defineProperty(r,"rampStops",{enumerable:!0,get:function(){return I}});const ue=ie("packages/core/src/internal/util.js").warnOnce,j=ie("packages/modules/charts/fills.js"),Se=j.isFill,Ae=j.patternSeries,he=j.rowPaint,se=Object.freeze(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#7a5195","#6b7d8c"]),J=Object.freeze({default:{series:se,sequential:["#ecf3f9","#005280"],diverging:["#b04a00","#f7f7f7","#005280"],positive:"#009e73",negative:"#d55e00"},bright:{series:["#1f77d0","#ff7f0e","#2ca02c","#d62728","#9467bd","#17becf","#e377c2","#7f7f7f"],sequential:["#eef4fb","#1f77d0"],diverging:["#d62728","#f7f7f7","#1f77d0"],positive:"#2ca02c",negative:"#d62728"},earth:{series:["#5b7c6f","#c08b52","#7a6a53","#a4553f","#4e6a83","#8f8259","#6d5566","#8c9196"],sequential:["#f2efe9","#4e6a83"],diverging:["#a4553f","#f2efe9","#4e6a83"],positive:"#5b7c6f",negative:"#a4553f"},mono:{series:["#0b2a3d","#17475f","#2c6480","#4a82a0","#6da0bd","#94bcd6","#bcd7e9","#dfecf5"],sequential:["#eef3f7","#0b2a3d"],diverging:["#7a5c00","#f5f5f5","#0b2a3d"],positive:"#17475f",negative:"#7a5c00"},patterns:{series:Ae(se),sequential:["#ecf3f9","#005280"],diverging:["#b04a00","#f7f7f7","#005280"],positive:"#009e73",negative:"#d55e00"}}),ae=new Map;let _="default";function v(a,A){!a||!A||ae.set(String(a),A)}function C(a){if(typeof a=="string"){_=a;return}a&&typeof a=="object"&&(ae.set("__default__",a),_="__default__")}function h(){return[...Object.keys(J),...ae.keys()].filter(a=>!a.startsWith("__"))}function V(a){return ae.has(a)?ae.get(a):J[a]||null}const Y=["series","sequential","diverging","positive","negative"];function k(a){return!a||typeof a!="object"||Array.isArray(a)?!1:!Y.some(A=>A in a)}function g(a,A){const E=A&&A.fills||null,m=V(_)||J.default,f=a&&a.scheme,L=k(f)?f:null,q=Array.isArray(f)&&f.length?f:null,Q=typeof f=="string"?V(f):L||Array.isArray(f)?null:f||null,pe=(a&&Array.isArray(a.palette)&&a.palette.length?a.palette:null)||q;L&&pe&&ue("chart:scheme:array-and-map",'chart "scheme" was given as a name map together with a "palette" array; the two do not combine. Colours came from the map and the array was ignored. Pass one or the other.');const ce=L?null:pe,te={...J.default,...m,...Q||{}};ce&&(te.series=ce);const H=a&&a.ramp&&typeof a.ramp=="object"&&!Array.isArray(a.ramp)?a.ramp:null,D=H?H.colours:a&&a.ramp,l=Array.isArray(D)&&D.length>=2?D:null;l&&(te.sequential=l);const t=H?N(H.scale):null,e=!!(Q||ce||L),d=te.series&&te.series.length?te.series:se,P=new Map;let O=0;return{...te,series:(W,R)=>{if(L&&R!==void 0&&R!==null){const b=String(R);return Object.prototype.hasOwnProperty.call(L,b)?u(L[b],E,W):(P.has(b)||P.set(b,O++),u(ee(d,P.get(b),!0),E,P.get(b)))}return u(ee(d,W,e),E,W)},explicit:e,nameMap:!!L,rampScale:t,fills:E}}function u(a,A,E){if(!Se(a))return a;const m=se[(E%se.length+se.length)%se.length];return he(a,A,m)||m}const y=Object.freeze(["linear","log","quantile"]);function N(a){return a==null?null:y.includes(a)?a:(ue(`chart:ramp:scale:${String(a)}`,`chart "ramp.scale" was "${String(a)}", which is not a ramp scale; the chart chose one from its values instead. Use "linear", "log" or "quantile".`),null)}function ee(a,A,E){const m=(A%a.length+a.length)%a.length;return E||typeof a[m]!="string"?a[m]:`var(--lattice-chart-${m+1}, ${a[m]})`}function p(a){if(typeof a!="string")return null;const A=a.trim(),E=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(A);if(E){const L=E[1];return L.length===3?[0,1,2].map(q=>parseInt(L[q]+L[q],16)):[0,2,4].map(q=>parseInt(L.slice(q,q+2),16))}const m=/^rgba?\(([^)]+)\)$/i.exec(A);if(!m)return null;const f=m[1].split(/[\s,/]+/).filter(Boolean).slice(0,3).map(Number);return f.length===3&&f.every(L=>Number.isFinite(L))?f:null}function I(a,A){const E=A?a.diverging:a.sequential,m=A?J.default.diverging:J.default.sequential,f=(Array.isArray(E)?E:m).map((L,q)=>p(L)||p(m[q])||[0,0,0]);return f.length>=2?f:m.map(L=>p(L))}}),at("packages/modules/charts/styles.js",function(r,ie){"use strict";Object.defineProperty(r,"NS",{enumerable:!0,get:function(){return j}}),Object.defineProperty(r,"seriesColour",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(r,"css",{enumerable:!0,get:function(){return he}}),Object.defineProperty(r,"injectStyles",{enumerable:!0,get:function(){return se}});const ue=ie("packages/modules/charts/scheme.js").PALETTE,j="lat-chartview",Se="data-lattice-chartview";function Ae(J){const ae=(J%ue.length+ue.length)%ue.length;return`var(--lattice-chart-${ae+1}, ${ue[ae]})`}function he(){return`
|
|
6
|
+
var fo=Object.create(null),ho=Object.create(null);function at(r,ie){fo[r]=ie}function mo(r){var ie=ho[r];if(ie)return ie;var Oe=Object.create(null);ho[r]=Oe;var ue=fo[r];if(!ue)throw new Error("[lattice] missing module: "+r);return ue(Oe,mo),Oe}at("packages/modules/charts/svg.js",function(r,ie){"use strict";Object.defineProperty(r,"SVG_NS",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(r,"el",{enumerable:!0,get:function(){return j}}),Object.defineProperty(r,"svg",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(r,"attr",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(r,"attrs",{enumerable:!0,get:function(){return he}}),Object.defineProperty(r,"setText",{enumerable:!0,get:function(){return se}}),Object.defineProperty(r,"clear",{enumerable:!0,get:function(){return J}}),Object.defineProperty(r,"append",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(r,"path",{enumerable:!0,get:function(){return _}}),Object.defineProperty(r,"ribbonPath",{enumerable:!0,get:function(){return v}}),Object.defineProperty(r,"round",{enumerable:!0,get:function(){return C}}),Object.defineProperty(r,"pathRings",{enumerable:!0,get:function(){return h}}),Object.defineProperty(r,"insideRings",{enumerable:!0,get:function(){return V}});const Oe="http://www.w3.org/2000/svg";function ue(Y){const k=Y.indexOf(")");return k<0?Y:Y.slice(k+1).trim()||"#0072b2"}function j(Y,k,g){const u=Y.createElement(k);return g&&u.setAttribute("class",g),u}function Se(Y,k,g){const u=Y.createElementNS(Oe,k);if(g)for(const y of Object.keys(g))u.setAttribute(y,String(g[y]));return u}function Ae(Y,k,g){if(!Y)return;if(g==null){Y.removeAttribute(k);return}let u=String(g);u.startsWith("url(#")&&(k==="stroke"||k==="fill"&&Y.localName==="text")&&(u=ue(u)),Y.setAttribute(k,u)}function he(Y,k){if(Y)for(const g of Object.keys(k))Ae(Y,g,k[g])}function se(Y,k){Y&&(Y.textContent=k==null?"":String(k))}function J(Y){if(Y)for(;Y.firstChild;)Y.removeChild(Y.firstChild)}function ae(Y,k){for(const g of k)g&&Y.appendChild(g);return Y}function _(Y){return Y.join(" ")}function v(Y){if(!Y||Y.length<2)return"";const k=["M",Y[0].x,Y[0].upper];for(let g=1;g<Y.length;g++)k.push("L",Y[g].x,Y[g].upper);for(let g=Y.length-1;g>=0;g--)k.push("L",Y[g].x,Y[g].lower);return k.push("Z"),_(k)}function C(Y){return Math.round(Y*100)/100}function h(Y){const k=[];let g=[];const u=String(Y||"").match(/[A-Za-z]|-?\d*\.?\d+(?:e[-+]?\d+)?/gi)||[];let y="",N=[];const ee=()=>{if(!y||!N.length){N=[];return}if(y==="M"||y==="L")for(let p=0;p+1<N.length;p+=2)g.push([N[p],N[p+1]]);else y!=="Z"&&N.length>=2&&g.push([N[N.length-2],N[N.length-1]]);N=[]};for(const p of u){if(/[A-Za-z]/.test(p)){if(ee(),p==="Z"||p==="z"){g.length>2&&k.push(g),g=[],y="";continue}p==="M"&&g.length>2&&(k.push(g),g=[]),y=p;continue}N.push(Number(p))}return ee(),g.length>2&&k.push(g),k}function V(Y,k,g){let u=!1;for(const y of Y)for(let N=0,ee=y.length-1;N<y.length;ee=N++){const[p,I]=y[N],[a,A]=y[ee];I>g!=A>g&&k<(a-p)*(g-I)/(A-I||1e-12)+p&&(u=!u)}return u}}),at("packages/modules/charts/typography.js",function(r,ie){"use strict";Object.defineProperty(r,"BASE_SIZE",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(r,"BASE_FAMILY",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(r,"CHAR_RATIO",{enumerable:!0,get:function(){return j}}),Object.defineProperty(r,"resolveType",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(r,"textWidth",{enumerable:!0,get:function(){return he}}),Object.defineProperty(r,"widestLabel",{enumerable:!0,get:function(){return se}}),Object.defineProperty(r,"truncateTo",{enumerable:!0,get:function(){return J}}),Object.defineProperty(r,"applySize",{enumerable:!0,get:function(){return ae}});const Oe=12,ue="var(--lattice-font-family, system-ui, -apple-system, sans-serif)",j=.62;function Se(_){const v=_&&_.font,C=typeof v=="number"?{size:v}:v||{},h=Ae(C.size,Oe);return{family:C.family||ue,size:h,small:Ae(C.small??C.tickSize,Math.max(9,h-1)),title:Ae(C.title,Math.round(h*1.15)),axisTitle:Ae(C.axisTitle,Math.max(10,h-1)),weight:C.weight||"inherit"}}function Ae(_,v){const C=Number(_);return Number.isFinite(C)&&C>0?C:v}function he(_,v){return String(_??"").length*v*j}function se(_,v){let C=0;for(const h of _||[]){const V=he(h,v);V>C&&(C=V)}return C}function J(_,v,C){const h=String(_??""),V=Math.floor(v/(C*j));return V<=0?"":h.length<=V?h:V===1?"…":`${h.slice(0,V-1)}…`}function ae(_,v){!_||!Number.isFinite(v)||(_.style?_.style.fontSize=`${v}px`:_.setAttribute("style",`font-size:${v}px`))}}),at("packages/modules/charts/frame.js",function(r,ie){"use strict";Object.defineProperty(r,"LABEL_GAP",{enumerable:!0,get:function(){return se}}),Object.defineProperty(r,"LABEL_GUTTER_SHARE",{enumerable:!0,get:function(){return J}}),Object.defineProperty(r,"resolveMargin",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(r,"plotRect",{enumerable:!0,get:function(){return _}}),Object.defineProperty(r,"shouldRotate",{enumerable:!0,get:function(){return v}}),Object.defineProperty(r,"Pool",{enumerable:!0,get:function(){return C}});const ue=ie("packages/modules/charts/svg.js").SVG_NS,j=ie("packages/modules/charts/typography.js"),Se=j.textWidth,Ae=j.widestLabel,he=8,se=6,J=.4;function ae(h,V){const Y=typeof h=="number"?h:V,k=h&&typeof h=="object"?h:{},g=u=>Number.isFinite(u)&&u>=0?Number(u):Y;return{base:Y,top:g(k.top),right:g(k.right),bottom:g(k.bottom),left:g(k.left)}}function _(h){const V=ae(h.margin,typeof h.padding=="number"?h.padding:8),Y=V.base,k=h.fontSize||12,g=h.yLabels||[],u=h.xLabels||[],y=h.ySide==="right"?"right":"left",N=y==="right"?"left":"right",ee=h.titles||{},p=h.titleSize||k,I=te=>te?p+se:0,a=Ae(g,k),A=g.length?Math.min(h.width*J,V[y]+a+se):Math.max(he,V[y]),E=V[N]+(h.rightGutter||0),m=(y==="left"?A:E)+I(ee.left),f=Ae(u.map(te=>String(te).slice(0,14)),k),L=(u.length?h.rotated?Math.min(h.height*J,se+f):k+se+V.bottom:Math.max(he,V.bottom))+I(ee.bottom),q=(y==="right"?A:E)+I(ee.right),Q=V.top+(h.topGutter||0),pe=Math.max(0,h.width-m-q),ce=Math.max(0,h.height-Q-L);return{left:m,top:Q,width:pe,height:ce,right:m+pe,bottom:Q+ce,gutter:{left:m,bottom:L,right:q,top:Q}}}function v(h,V,Y,k){if(!h.length||V<=0)return!1;const g=Number.isFinite(k)&&k>0?Number(k):1;return Ae(h,Y)>V*g-4}class C{#r;#n=0;static#i="data-pool-key";constructor(V,Y=0){this.#r=V,this.#n=Y>0?Y:0}next(V,Y,k){if(k!=null)return this.#e(V,Y,String(k));const g=this.#r.childNodes[this.#n],u=g&&g.tagName,y=/(^|\s)\S*__axis-title(\s|$)/,N=u&&y.test(String(g.getAttribute("class")||"")),ee=!!Y&&y.test(String(Y));if(u&&(!N||ee)&&String(u).toLowerCase()===V.toLowerCase())return Y&&g.setAttribute("class",Y),this.#n++,g;const p=this.#r.ownerDocument.createElementNS(ue,V);return Y&&p.setAttribute("class",Y),g?this.#r.insertBefore(p,g):this.#r.appendChild(p),this.#n++,p}#e(V,Y,k){const g=V.toLowerCase();for(let N=this.#n;N<this.#r.childNodes.length;N++){const ee=this.#r.childNodes[N],p=ee&&ee.tagName;if(p&&String(p).toLowerCase()===g&&ee.getAttribute(C.#i)===k)return N!==this.#n&&this.#r.insertBefore(ee,this.#r.childNodes[this.#n]),Y&&ee.setAttribute("class",Y),this.#n++,ee}const u=this.#r.ownerDocument.createElementNS(ue,V);u.setAttribute(C.#i,k),Y&&u.setAttribute("class",Y);const y=this.#r.childNodes[this.#n];return y?this.#r.insertBefore(u,y):this.#r.appendChild(u),this.#n++,u}finish(){for(;this.#r.childNodes.length>this.#n;)this.#r.removeChild(this.#r.lastChild);this.#n=0}}}),at("packages/core/src/internal/util.js",function(r,ie){"use strict";Object.defineProperty(r,"VERSION",{enumerable:!0,get:function(){return j}}),Object.defineProperty(r,"reportedWarnings",{enumerable:!0,get:function(){return v}}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return h}}),Object.defineProperty(r,"infoOnce",{enumerable:!0,get:function(){return V}}),Object.defineProperty(r,"resetWarnings",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(r,"fail",{enumerable:!0,get:function(){return k}}),Object.defineProperty(r,"invariant",{enumerable:!0,get:function(){return g}}),Object.defineProperty(r,"DEV",{enumerable:!0,get:function(){return u}}),Object.defineProperty(r,"isObject",{enumerable:!0,get:function(){return y}}),Object.defineProperty(r,"isFunction",{enumerable:!0,get:function(){return N}}),Object.defineProperty(r,"isNil",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(r,"isBlank",{enumerable:!0,get:function(){return p}}),Object.defineProperty(r,"isCtor",{enumerable:!0,get:function(){return I}}),Object.defineProperty(r,"pathGetter",{enumerable:!0,get:function(){return A}}),Object.defineProperty(r,"pathSetter",{enumerable:!0,get:function(){return m}}),Object.defineProperty(r,"getPath",{enumerable:!0,get:function(){return f}}),Object.defineProperty(r,"setPath",{enumerable:!0,get:function(){return L}}),Object.defineProperty(r,"humanise",{enumerable:!0,get:function(){return q}}),Object.defineProperty(r,"escapeHtml",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(r,"titleCase",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(r,"expand",{enumerable:!0,get:function(){return te}}),Object.defineProperty(r,"toArray",{enumerable:!0,get:function(){return H}}),Object.defineProperty(r,"merge",{enumerable:!0,get:function(){return l}}),Object.defineProperty(r,"mergeRow",{enumerable:!0,get:function(){return t}}),Object.defineProperty(r,"Lru",{enumerable:!0,get:function(){return e}}),Object.defineProperty(r,"collator",{enumerable:!0,get:function(){return P}}),Object.defineProperty(r,"defaultCompare",{enumerable:!0,get:function(){return O}}),Object.defineProperty(r,"now",{enumerable:!0,get:function(){return T}}),Object.defineProperty(r,"nextFrame",{enumerable:!0,get:function(){return R}}),Object.defineProperty(r,"cancelFrame",{enumerable:!0,get:function(){return b}}),Object.defineProperty(r,"frameBatched",{enumerable:!0,get:function(){return U}}),Object.defineProperty(r,"settleDebounce",{enumerable:!0,get:function(){return re}}),Object.defineProperty(r,"whenIdle",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(r,"uid",{enumerable:!0,get:function(){return le}});const Oe="1.88.3";async function ue(){return Oe}const j="1.88.3",Se=new Set,Ae=2e3;function he($){if(Se.add($),Se.size>Ae){const B=Se.values().next().value;B!==void 0&&Se.delete(B)}}const se=[],J=500;function ae($,B,oe){se.push({key:$,level:B,message:oe.map(i=>typeof i=="string"?i:_(i)).join(" "),at:Date.now()}),se.length>J&&se.shift()}function _($){if($ instanceof Error)return $.message;try{return JSON.stringify($)}catch{return String($)}}function v(){return se.map($=>({...$}))}function C($){if($.length===0||typeof $[0]!="string")return $;const B=$[0].replace(/^\[lattice\]\s*/,"");return B===$[0]?$:[B,...$.slice(1)]}function h($,...B){if(Se.has($))return;he($);const oe=C(B);ae($,"warn",oe),console.warn("[lattice]",...oe)}function V($,...B){if(Se.has($))return;he($);const oe=C(B);ae($,"info",oe),console.info("[lattice]",...oe)}function Y(){Se.clear(),se.length=0}function k($,B){const oe=new Error(`[lattice] ${$}`);throw B!==void 0&&(oe.cause=B),oe}function g($,B){$||k(B)}const u=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function y($){return $!==null&&typeof $=="object"&&!Array.isArray($)}function N($){return typeof $=="function"}function ee($){return $==null}function p($){return $==null||$===""}function I($){return typeof $!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call($))?!0:!!($.prototype&&Object.getOwnPropertyNames($.prototype).length>1)}const a=new Map;function A($){let B=a.get($);if(B)return B;if(!$.includes("."))B=oe=>oe?.[$];else{const oe=$.split("."),i=oe.length;B=s=>{let n=s;for(let M=0;M<i;M++){if(n==null)return;n=n[oe[M]]}return n}}return a.set($,B),B}const E=new Map;function m($){let B=E.get($);if(B)return B;if(!$.includes("."))B=(oe,i)=>{oe!=null&&(oe[$]=i)};else{const oe=$.split("."),i=oe.length-1;B=(s,n)=>{let M=s;for(let o=0;o<i;o++){if(M==null)return;const x=oe[o];M[x]==null&&(M[x]={}),M=M[x]}M!=null&&(M[oe[i]]=n)}}return E.set($,B),B}function f($,B){return A(B)($)}function L($,B,oe){m(B)($,oe)}function q($){return $?($.includes(".")?$.slice($.lastIndexOf(".")+1):$).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,oe=>oe.toUpperCase()):""}const Q={"&":"&","<":"<",">":">",'"':""","'":"'"};function pe($){const B=$==null?"":String($);return/[&<>"']/.test(B)?B.replace(/[&<>"']/g,oe=>Q[oe]):B}function ce($){return String($).replace(/\w\S*/g,B=>B[0].toUpperCase()+B.slice(1).toLowerCase())}function te($,B,oe){if($!==void 0)return $===!0?{enabled:!0,...oe}:$===!1?{enabled:!1}:y($)?$:{[B]:$,enabled:!0}}function H($){return $==null?[]:Array.isArray($)?$:[$]}const D=Object.freeze(new Set(["__proto__","constructor","prototype"]));function l($,B){if(!y($))return y(B)?{...B}:B;if(!y(B))return B===void 0?$:B;const oe={...$};for(const i of Object.keys(B)){if(D.has(i))continue;const s=B[i];s!==void 0&&(oe[i]=y(s)&&y(oe[i])?l(oe[i],s):s)}return oe}function t($,B){if(!y($)||!y(B)||$===B)return B;const oe=Object.create(Object.getPrototypeOf($));return Object.assign(oe,$,B),oe}class e{#r;#n=new Map;#i;constructor(B=256,oe=null){this.#r=B,this.#i=oe}get size(){return this.#n.size}get max(){return this.#r}set max(B){this.#r=B,this.#e()}has(B){return this.#n.has(B)}get(B){const oe=this.#n;if(!oe.has(B))return;const i=oe.get(B);return oe.delete(B),oe.set(B,i),i}peek(B){return this.#n.get(B)}set(B,oe){const i=this.#n;return i.has(B)&&i.delete(B),i.set(B,oe),this.#e(),oe}delete(B){const oe=this.#n.get(B);return this.#n.delete(B)&&this.#i&&this.#i(oe,B),oe}clear(){if(this.#i)for(const[B,oe]of this.#n)this.#i(oe,B);this.#n.clear()}keys(){return this.#n.keys()}values(){return this.#n.values()}#e(){const B=this.#n;for(;B.size>this.#r;){const oe=B.keys().next().value,i=B.get(oe);B.delete(oe),this.#i&&this.#i(i,oe)}}}const d=new Map;function P($,B){const oe=`${$||""}|${B?JSON.stringify(B):""}`;let i=d.get(oe);return i||(i=new Intl.Collator($||void 0,{numeric:!0,sensitivity:"variant",...B}),d.set(oe,i)),i}function O($,B){if($===B)return 0;if($==null)return 1;if(B==null)return-1;if(typeof $=="number"&&typeof B=="number")return Number.isNaN($)?Number.isNaN(B)?0:1:Number.isNaN(B)||$<B?-1:$>B?1:0;const oe=String($),i=String(B);return oe<i?-1:oe>i?1:0}function T(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const W=typeof requestAnimationFrame=="function";function R($){return W?requestAnimationFrame($):setTimeout(()=>$(T()),16)}function b($){$!=null&&(W?cancelAnimationFrame($):clearTimeout($))}function U($){let B=null,oe=null;const i=()=>{B=null;const n=oe;oe=null,$(...n||[])},s=(...n)=>{oe=n,B===null&&(B=R(i))};return s.cancel=()=>{b(B),B=null,oe=null},s.flush=()=>{B!==null&&(b(B),i())},s}function re($,B){let oe=null,i=null;const s=()=>{if(oe=null,i===null)return;const o=i;i=null,$(...o),n()},n=()=>{oe=setTimeout(s,B),typeof oe?.unref=="function"&&oe.unref()},M=(...o)=>{oe===null?($(...o),n()):(i=o,clearTimeout(oe),n())};return M.flush=()=>{if(oe!==null&&clearTimeout(oe),oe=null,i===null)return;const o=i;i=null,$(...o)},M.cancel=()=>{oe!==null&&clearTimeout(oe),oe=null,i=null},M.pending=()=>oe!==null||i!==null,M}function ne($,B=50){return typeof requestIdleCallback=="function"?requestIdleCallback($,{timeout:B}):setTimeout(()=>$({timeRemaining:()=>0,didTimeout:!0}),1)}let G=0;function le($="l"){return`${$}${(++G).toString(36)}`}}),at("packages/modules/charts/fills.js",function(r,ie){"use strict";Object.defineProperty(r,"PATTERNS",{enumerable:!0,get:function(){return j}}),Object.defineProperty(r,"GRADIENTS",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(r,"isFill",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(r,"isPaintRef",{enumerable:!0,get:function(){return _}}),Object.defineProperty(r,"paintFallback",{enumerable:!0,get:function(){return v}}),Object.defineProperty(r,"normaliseFill",{enumerable:!0,get:function(){return h}}),Object.defineProperty(r,"swatchCss",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(r,"createFillRegistry",{enumerable:!0,get:function(){return k}}),Object.defineProperty(r,"rowPaint",{enumerable:!0,get:function(){return g}}),Object.defineProperty(r,"patternSeries",{enumerable:!0,get:function(){return u}}),Object.defineProperty(r,"paintSolid",{enumerable:!0,get:function(){return y}}),Object.defineProperty(r,"rowFillSource",{enumerable:!0,get:function(){return N}}),Object.defineProperty(r,"nodePaint",{enumerable:!0,get:function(){return ee}});const ue=ie("packages/core/src/internal/util.js").warnOnce,j=Object.freeze(["hatch","crosshatch","dots","grid"]),Se=Object.freeze(["linear","radial"]),Ae=8,he="#0072b2";let se=0;const J=new Map;function ae(p){return!!p&&typeof p=="object"&&!Array.isArray(p)&&(typeof p.gradient=="string"||typeof p.pattern=="string")}function _(p){return typeof p=="string"&&p.startsWith("url(#")}function v(p){if(typeof p!="string")return p==null?"":String(p);if(!p.startsWith("url("))return p;const I=p.indexOf(")");return(I<0?"":p.slice(I+1).trim())||he}function C(p,I){ue(`chart:fill:invalid:${p}`,`a chart fill object was ignored: ${I} The mark was drawn in a solid colour instead. A fill is a gradient object (gradient: "linear" or "radial", with stops of [offset, colour]) or a pattern object (pattern: "hatch", "crosshatch", "dots" or "grid", with a colour).`)}function h(p,I){if(!ae(p))return null;const a=I||he;if(typeof p.gradient=="string"){if(!Se.includes(p.gradient))return C("gradient",`the gradient "${p.gradient}" is not one of ${Se.join(", ")}.`),null;const f=Array.isArray(p.stops)?p.stops:[],L=[];for(const Q of f){const pe=Array.isArray(Q)?Number(Q[0]):Number(Q&&Q.offset),ce=Array.isArray(Q)?Q[1]:Q&&Q.colour;!Number.isFinite(pe)||typeof ce!="string"||!ce||L.push({offset:Math.min(1,Math.max(0,pe)),colour:ce})}if(L.length<2)return C("stops","a gradient needs at least two [offset, colour] stops."),null;L.sort((Q,pe)=>Q.offset-pe.offset);const q=Number.isFinite(Number(p.angle))?Number(p.angle):180;return{kind:p.gradient,angle:q,stops:L,solid:L[0].colour}}if(!j.includes(p.pattern))return C("pattern",`the pattern "${p.pattern}" is not one of ${j.join(", ")}.`),null;const A=Number(p.size),E=Number(p.angle),m=typeof p.colour=="string"&&p.colour?p.colour:a;return{kind:"pattern",pattern:p.pattern,colour:m,background:typeof p.background=="string"&&p.background?p.background:null,size:Number.isFinite(A)&&A>=2?A:Ae,angle:Number.isFinite(E)?E:p.pattern==="grid"||p.pattern==="dots"?0:45,solid:m}}function V(p){if(p.kind==="pattern"){const a=p.colour,A=p.size,E=Math.max(1,A/5),m=p.background||"transparent",f=L=>`repeating-linear-gradient(${L+90}deg,${a} 0 ${E}px,transparent ${E}px ${A}px)`;return p.pattern==="hatch"?`${f(p.angle)},${m}`:p.pattern==="crosshatch"?`${f(p.angle)},${f(p.angle+90)},${m}`:p.pattern==="grid"?`${f(p.angle)},${f(p.angle+90)},${m}`:`radial-gradient(circle at 50% 50%,${a} ${A/6}px,transparent ${A/6+.5}px) 0 0/${A}px ${A}px,${m}`}const I=p.stops.map(a=>`${a.colour} ${Math.round(a.offset*100)}%`).join(",");return p.kind==="radial"?`radial-gradient(circle,${I})`:`linear-gradient(${p.angle}deg,${I})`}function Y(p){if(!_(p))return typeof p=="string"?p:"";const I=String(p).indexOf(")"),a=String(p).slice(5,I),A=J.get(a);return A?V(A):v(p)}function k(p){const I=`lattice-fill-${++se}`;let a=new Map,A=0;const E=(f,L)=>{const q=p.ownerDocument.createElementNS("http://www.w3.org/2000/svg",f);for(const Q of Object.keys(L))q.setAttribute(Q,String(L[Q]));return q},m=(f,L)=>{if(L.kind==="pattern"){const Q=L.size,pe=Math.max(1,Q/5),ce=E("pattern",{id:f,width:Q,height:Q,patternUnits:"userSpaceOnUse"});L.angle&&ce.setAttribute("patternTransform",`rotate(${L.angle})`),L.background&&ce.appendChild(E("rect",{width:Q,height:Q,fill:L.background}));const te={stroke:L.colour,"stroke-width":pe};L.pattern==="dots"?ce.appendChild(E("circle",{cx:Q/2,cy:Q/2,r:Math.max(1,Q/6),fill:L.colour})):(ce.appendChild(E("line",{x1:Q/2,y1:0,x2:Q/2,y2:Q,...te})),L.pattern!=="hatch"&&ce.appendChild(E("line",{x1:0,y1:Q/2,x2:Q,y2:Q/2,...te}))),p.appendChild(ce);return}let q;if(L.kind==="radial")q=E("radialGradient",{id:f,cx:.5,cy:.5,r:.5});else{const Q=L.angle*Math.PI/180,pe=Math.sin(Q)/2,ce=-Math.cos(Q)/2;q=E("linearGradient",{id:f,x1:+(.5-pe).toFixed(4),y1:+(.5-ce).toFixed(4),x2:+(.5+pe).toFixed(4),y2:+(.5+ce).toFixed(4)})}for(const Q of L.stops)q.appendChild(E("stop",{offset:Q.offset,"stop-color":Q.colour}));p.appendChild(q)};return{prefix:I,paint(f,L){const q=h(f,L);if(!q)return L||he;if(!p||!p.ownerDocument)return q.solid;const Q=JSON.stringify(q);let pe=a.get(Q);if(!pe){const ce=`${I}-${A++}`;m(ce,q),J.set(ce,q),pe=`url(#${ce}) ${q.solid}`,a.set(Q,pe)}return pe},reset(){for(const f of a.values())J.delete(f.slice(5,f.indexOf(")")));if(a=new Map,A=0,p)for(;p.firstChild;)p.removeChild(p.firstChild)},ids(){return[...a.values()].map(f=>f.slice(5,f.indexOf(")")))}}}function g(p,I,a){if(p==null||p==="")return null;const A=v(a);if(ae(p))return I?I.paint(p,A):(h(p,A)||{}).solid||null;if(typeof p=="string"){if(j.includes(p)){const E={pattern:p,colour:A};return I?I.paint(E,A):A}return p}return null}function u(p){const I=[{pattern:"hatch",angle:45},{pattern:"dots"},{pattern:"crosshatch",angle:45},{pattern:"hatch",angle:135},{pattern:"grid"},{pattern:"dots",size:5},{pattern:"hatch",angle:0},{pattern:"crosshatch",angle:0,size:6}];return p.map((a,A)=>({...I[A%I.length],colour:a,background:"var(--lattice-background, #fff)"}))}function y(p){return _(p)?String(p).replace(/^url\([^)]*\)\s*/,""):p}function N(p,I){const a=p.fill;if(ae(a))return(E,m)=>g(a,I.fills,y(m));if(typeof a=="function")return(E,m)=>{let f=null;try{f=a({label:E.label,x:E.x,y:E.y,rowKey:E.rowKey})}catch{f=null}return g(f,I.fills,y(m))};const A=typeof a=="string"?a:a&&typeof a=="object"&&typeof a.col=="string"?a.col:null;return A?(E,m)=>E.rowKey===void 0||E.rowKey===null?null:g(p.grid.rows.value(E.rowKey,A),I.fills,y(m)):null}function ee(p,I,a){return p&&p({label:I.label,x:I.value,y:I.total,rowKey:I.rowKey},a)||a}}),at("packages/modules/charts/scheme.js",function(r,ie){"use strict";Object.defineProperty(r,"PALETTE",{enumerable:!0,get:function(){return se}}),Object.defineProperty(r,"SCHEMES",{enumerable:!0,get:function(){return J}}),Object.defineProperty(r,"registerScheme",{enumerable:!0,get:function(){return v}}),Object.defineProperty(r,"setDefaultScheme",{enumerable:!0,get:function(){return C}}),Object.defineProperty(r,"schemeNames",{enumerable:!0,get:function(){return h}}),Object.defineProperty(r,"resolveScheme",{enumerable:!0,get:function(){return g}}),Object.defineProperty(r,"RAMP_SCALES",{enumerable:!0,get:function(){return y}}),Object.defineProperty(r,"toRgb",{enumerable:!0,get:function(){return p}}),Object.defineProperty(r,"rampStops",{enumerable:!0,get:function(){return I}});const ue=ie("packages/core/src/internal/util.js").warnOnce,j=ie("packages/modules/charts/fills.js"),Se=j.isFill,Ae=j.patternSeries,he=j.rowPaint,se=Object.freeze(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#7a5195","#6b7d8c"]),J=Object.freeze({default:{series:se,sequential:["#ecf3f9","#005280"],diverging:["#b04a00","#f7f7f7","#005280"],positive:"#009e73",negative:"#d55e00"},bright:{series:["#1f77d0","#ff7f0e","#2ca02c","#d62728","#9467bd","#17becf","#e377c2","#7f7f7f"],sequential:["#eef4fb","#1f77d0"],diverging:["#d62728","#f7f7f7","#1f77d0"],positive:"#2ca02c",negative:"#d62728"},earth:{series:["#5b7c6f","#c08b52","#7a6a53","#a4553f","#4e6a83","#8f8259","#6d5566","#8c9196"],sequential:["#f2efe9","#4e6a83"],diverging:["#a4553f","#f2efe9","#4e6a83"],positive:"#5b7c6f",negative:"#a4553f"},mono:{series:["#0b2a3d","#17475f","#2c6480","#4a82a0","#6da0bd","#94bcd6","#bcd7e9","#dfecf5"],sequential:["#eef3f7","#0b2a3d"],diverging:["#7a5c00","#f5f5f5","#0b2a3d"],positive:"#17475f",negative:"#7a5c00"},patterns:{series:Ae(se),sequential:["#ecf3f9","#005280"],diverging:["#b04a00","#f7f7f7","#005280"],positive:"#009e73",negative:"#d55e00"}}),ae=new Map;let _="default";function v(a,A){!a||!A||ae.set(String(a),A)}function C(a){if(typeof a=="string"){_=a;return}a&&typeof a=="object"&&(ae.set("__default__",a),_="__default__")}function h(){return[...Object.keys(J),...ae.keys()].filter(a=>!a.startsWith("__"))}function V(a){return ae.has(a)?ae.get(a):J[a]||null}const Y=["series","sequential","diverging","positive","negative"];function k(a){return!a||typeof a!="object"||Array.isArray(a)?!1:!Y.some(A=>A in a)}function g(a,A){const E=A&&A.fills||null,m=V(_)||J.default,f=a&&a.scheme,L=k(f)?f:null,q=Array.isArray(f)&&f.length?f:null,Q=typeof f=="string"?V(f):L||Array.isArray(f)?null:f||null,pe=(a&&Array.isArray(a.palette)&&a.palette.length?a.palette:null)||q;L&&pe&&ue("chart:scheme:array-and-map",'chart "scheme" was given as a name map together with a "palette" array; the two do not combine. Colours came from the map and the array was ignored. Pass one or the other.');const ce=L?null:pe,te={...J.default,...m,...Q||{}};ce&&(te.series=ce);const H=a&&a.ramp&&typeof a.ramp=="object"&&!Array.isArray(a.ramp)?a.ramp:null,D=H?H.colours:a&&a.ramp,l=Array.isArray(D)&&D.length>=2?D:null;l&&(te.sequential=l);const t=H?N(H.scale):null,e=!!(Q||ce||L),d=te.series&&te.series.length?te.series:se,P=new Map;let O=0;return{...te,series:(W,R)=>{if(L&&R!==void 0&&R!==null){const b=String(R);return Object.prototype.hasOwnProperty.call(L,b)?u(L[b],E,W):(P.has(b)||P.set(b,O++),u(ee(d,P.get(b),!0),E,P.get(b)))}return u(ee(d,W,e),E,W)},explicit:e,nameMap:!!L,rampScale:t,fills:E}}function u(a,A,E){if(!Se(a))return a;const m=se[(E%se.length+se.length)%se.length];return he(a,A,m)||m}const y=Object.freeze(["linear","log","quantile"]);function N(a){return a==null?null:y.includes(a)?a:(ue(`chart:ramp:scale:${String(a)}`,`chart "ramp.scale" was "${String(a)}", which is not a ramp scale; the chart chose one from its values instead. Use "linear", "log" or "quantile".`),null)}function ee(a,A,E){const m=(A%a.length+a.length)%a.length;return E||typeof a[m]!="string"?a[m]:`var(--lattice-chart-${m+1}, ${a[m]})`}function p(a){if(typeof a!="string")return null;const A=a.trim(),E=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(A);if(E){const L=E[1];return L.length===3?[0,1,2].map(q=>parseInt(L[q]+L[q],16)):[0,2,4].map(q=>parseInt(L.slice(q,q+2),16))}const m=/^rgba?\(([^)]+)\)$/i.exec(A);if(!m)return null;const f=m[1].split(/[\s,/]+/).filter(Boolean).slice(0,3).map(Number);return f.length===3&&f.every(L=>Number.isFinite(L))?f:null}function I(a,A){const E=A?a.diverging:a.sequential,m=A?J.default.diverging:J.default.sequential,f=(Array.isArray(E)?E:m).map((L,q)=>p(L)||p(m[q])||[0,0,0]);return f.length>=2?f:m.map(L=>p(L))}}),at("packages/modules/charts/styles.js",function(r,ie){"use strict";Object.defineProperty(r,"NS",{enumerable:!0,get:function(){return j}}),Object.defineProperty(r,"seriesColour",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(r,"css",{enumerable:!0,get:function(){return he}}),Object.defineProperty(r,"injectStyles",{enumerable:!0,get:function(){return se}});const ue=ie("packages/modules/charts/scheme.js").PALETTE,j="lat-chartview",Se="data-lattice-chartview";function Ae(J){const ae=(J%ue.length+ue.length)%ue.length;return`var(--lattice-chart-${ae+1}, ${ue[ae]})`}function he(){return`
|
|
7
7
|
.${j}{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;
|
|
8
8
|
width:100%;height:100%;box-sizing:border-box;
|
|
9
9
|
font-family:var(--lattice-font-family,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif);
|