@graphysdk/viz-engine 1.9.0-beta.1789731663685 → 1.9.0-beta.1789732501098
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/dist/config.types-Ca10IwFf.cjs +1 -0
- package/dist/{config.types-BFgQXLdD.js → config.types-O0QkX9jk.js} +766 -1466
- package/dist/graph-config.cjs +1 -1
- package/dist/graph-config.d.ts +1068 -675
- package/dist/graph-config.mjs +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +275 -842
- package/dist/index.mjs +4514 -4610
- package/package.json +1 -1
- package/dist/config.types-D8z7wfQy.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let b=require("date-fns"),He=require("lodash-es");var J=e=>e instanceof Date&&(0,b.isValid)(e),Kt=e=>J(e)||e===null,qt=e=>typeof e=="string",ze=e=>typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e),Jt=e=>ze(e)||e===null,$e="\0graphy\0_",p=e=>`${$e}${e}`,de={x:p("constantX")},Qt={bar:p("barSeriesLabel"),line:p("lineSeriesLabel")},fe={count:p("count"),mean:p("mean"),sum:p("sum")},Xe={group:p("group")},Ke={x:p("x"),y:p("y"),xMin:p("xMin"),xMax:p("xMax"),yMin:p("yMin"),yMax:p("yMax"),yRaw:p("yRaw")},qe={role:p("stackRole")},Je={color:p("color"),size:p("size"),alpha:p("alpha"),strokeWidth:p("strokeWidth"),lineType:p("lineType")},Qe={y:p("ruleY"),x:p("ruleX")},Xa={...de,...fe,...Xe,...Ke,...qe,...Je,...Qe},Zt=new Set(Object.values(fe)),er=e=>p(`scaled_${e}`),tr=e=>e.startsWith($e),rr=e=>Zt.has(e),nr=e=>e.length>0;function pe(e){return e!=null}function ar(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function or(e){const{numeric:t,categorical:r,temporal:n}=e.groupVariableNamesByType();return n[0]??r[0]??t[0]??""}function ir(e,t){const{categorical:r,temporal:n}=e.groupVariableNamesByType(),a=[...r,...n];return t===""||a.includes(t)?a:[t,...a]}function sr(e){const t=be(e.x);return t===null||t===de.x?"":t}function be(e){return pe(e)?typeof e=="string"?e:"variable"in e?e.variable:null:null}function Ze(e){if(!(!pe(e)||typeof e=="string")&&"value"in e)return e.value}function lr(e,t){return[...new Set([...Object.keys(e),...Object.keys(t)])].every(r=>ve(e[r])===ve(t[r]))}function ve(e){const t=be(e);if(t!==null)return`variable:${t}`;const r=Ze(e);return r===void 0?"":r===null?"value:null":r instanceof Date?`value:date:${r.getTime()}`:`value:${typeof r}:${r}`}var ur=["stack","dodge","identity","fill"],ye=["solid","dashed","dotted"],et=e=>ye.includes(e);function cr(e){return e==="stack"||e==="fill"}var ee="en-GB",ge=class extends Error{constructor(e){super(e.message,e.cause!==void 0?{cause:e.cause}:void 0),this.name=new.target.name,this.code=e.code,this.context=e.context,this.suggestion=e.suggestion}},G=class extends ge{constructor(e){super(e),this.kind="user-input"}},v=class extends ge{constructor(e){super({...e,code:e.code??"INTERNAL_INVARIANT"}),this.kind="internal"}},me=e=>e.type==="lookup",tt=e=>e.type==="text",W=e=>e.type==="date"||e.type==="datetime"||e.type==="year"||e.type==="month_year"||e.type==="month"||e.type==="day_month"||e.type==="weekly_date_range"||e.type==="weekly_date_range_with_year"||e.type==="quarter"||e.type==="time",rt=e=>e.type==="decimal"||e.type==="integer"||e.type==="percentage"||e.type==="duration"||e.type==="currency",dr=e=>e.type==="currency",fr=e=>e.type==="month"||e.type==="day_month"||e.type==="weekly_date_range",nt=e=>{if(me(e))return nt(e.fallback);if(W(e))return"temporal";if(rt(e))return"numeric";if(tt(e))return"categorical";throw new v({message:`No data type found for value format: ${e.type}`})},pr=e=>me(e)?e.fallback:e,at=class{constructor(){this.currentYear=new Date().getUTCFullYear(),this.previousDate=null,this.previousYear=null}incrementYearIfNeeded(e){this.previousYear===null?this.previousYear=e.getUTCFullYear():this.previousDate!==null&&(0,b.isBefore)(new Date(this.currentYear,e.getUTCMonth(),e.getUTCDate()),new Date(this.currentYear,this.previousDate.getUTCMonth(),this.previousDate.getUTCDate()))&&this.previousYear++;const t=new Date(e.getTime());return t.setUTCFullYear(this.previousYear),this.previousDate=t,t}},ot={k:1e3,m:1e6,b:1e9,t:1e12},he=["k","m","b","t"],br=new RegExp(`^-?(\\d{1,3}(,\\d{3})*|\\d+)\\.?\\d*(${he.join("|")})?$`,"i"),yr=/^-?\d{1,3}(?:,\d{3})*(?:\.\d+)?%?$/,C=e=>e===null||e instanceof Date||Array.isArray(e)||typeof e=="boolean"?!1:typeof e=="string"?br.test(e)&&!Number.isNaN(Number(e.replace(new RegExp(`[,${he.join("")}]`,"gi"),""))):!Number.isNaN(Number(e)),it=e=>C(e)?!0:typeof e=="string"?yr.test(e):!1,gr=/^\d{4}-\d{2}-\d{2}(T|\s)\d{1,2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|\+00:00)?$/,mr=/^\s*(1[89]\d{2}|2[01]\d{2})\s*$/,hr=[[/\bJan\b/i,"January"],[/\bFeb\b/i,"February"],[/\bMar\b/i,"March"],[/\bApr\b/i,"April"],[/\bJun\b/i,"June"],[/\bJul\b/i,"July"],[/\bAug\b/i,"August"],[/\bSept?\b/i,"September"],[/\bOct\b/i,"October"],[/\bNov\b/i,"November"],[/\bDec\b/i,"December"]],Er={"en-US":"MDY","en-GB":"DMY","pt-PT":"DMY",ar:"DMY"},st=["/","-","."," "],Te=[["d","M","yy"],["d","MM","yy"],["d","MMMM","yy"],["dd","M","yy"],["dd","MM","yy"],["dd","MMMM","yy"],["do","MMMM","yy"],["d","M","yyyy"],["d","MM","yyyy"],["d","MMMM","yyyy"],["dd","M","yyyy"],["dd","MM","yyyy"],["dd","MMMM","yyyy"],["do","MMMM","yyyy"]],Oe=[["M","d","yy"],["M","dd","yy"],["MM","d","yy"],["MM","dd","yy"],["MMMM","d","yy"],["MMMM","dd","yy"],["MMMM","do","yy"],["M","d","yyyy"],["M","dd","yyyy"],["MM","d","yyyy"],["MM","dd","yyyy"],["MMMM","d","yyyy"],["MMMM","dd","yyyy"],["MMMM","do","yyyy"]],_e=[["yyyy","M","d"],["yyyy","M","dd"],["yyyy","MM","d"],["yyyy","MM","dd"],["yyyy","MMMM","d"],["yyyy","MMMM","dd"],["yyyy","MMMM","do"]],lt=[["d","MMMM"],["dd","MMMM"],["do","MMMM"],["MMMM","d"],["MMMM","dd"],["MMMM","do"]],Ar=[{dateFormat:"MMMM d, yyyy",type:"date"},{dateFormat:"MMMM dd, yyyy",type:"date"},{dateFormat:"MMMM do, yyyy",type:"date"},{dateFormat:"yyyy-MM",type:"month_year"}],ut=1800,ct=2199,vr=3,Tr=6,Or=5,_r=1,Sr=28,Mr=/\s*[–—]\s*|\s-\s/,Dr=e=>typeof e=="number"?Number.isInteger(e)&&e>=ut&&e<=ct:typeof e=="string"?mr.test(e):!1,dt=(e,t)=>{const r=H(e);return!t&&C(r)?Rr(r):typeof r=="string"?t?(0,b.isValid)((0,b.parse)(r,t,new Date)):!!ft(r)||te(r)&&(0,b.isValid)(new Date(r)):(0,b.isValid)(r)},H=e=>{if(typeof e!="string")return e;let t=e;for(const[r,n]of hr)t=t.replace(r,n);return t},ft=(e,t=ee)=>{const r=H(e);return te(r)?{type:"datetime"}:bt(t).find(n=>!W(n)||n.type==="month"&&r.length<vr?!1:n.dateFormat&&(0,b.isValid)((0,b.parse)(r,n.dateFormat,new Date)))},te=e=>gr.test(e.trim()),pt=e=>{if(e instanceof Date)return(0,b.isValid)(e)?e:null;if(typeof e!="string"||!te(e))return null;const t=new Date(e.trim());return(0,b.isValid)(t)?t:null},Lr=(e,t=ee)=>{const[r,n]=e.split(Mr);if(!r||!n)return;const a=H(r).trim(),o=H(n).trim();return Pr(t).find(i=>{if(!W(i)||!i.dateFormat)return!1;const s=(0,b.parse)(a,i.dateFormat,new Date),l=(0,b.parse)(o,i.dateFormat,new Date);if(!(0,b.isValid)(s)||!(0,b.isValid)(l))return!1;const c=new at,f=c.incrementYearIfNeeded(s),h=c.incrementYearIfNeeded(l),d=(0,b.differenceInDays)(h,f);return(0,b.isWithinInterval)(new Date(f.getFullYear(),_r,Sr),{start:f,end:h})&&d===Or?!0:d===Tr})},bt=e=>{const t={date:yt(e),year:[["yyyy"]],day_month:lt,month_year:[["MMMM","yyyy"],["yyyy","MMMM"]],month:[["MMMM"]],quarter:[["QQQ","yyyy"],["yyyy","QQQ"]]};return[...Ar,...Object.entries(t).flatMap(([r,n])=>n.flatMap(a=>st.map(o=>({dateFormat:a.join(o),type:r}))))]},yt=e=>Er[e]==="MDY"?[...Oe,...Te,..._e]:[...Te,...Oe,..._e],Pr=e=>{const t={weekly_date_range:lt,weekly_date_range_with_year:yt(e)};return Object.entries(t).flatMap(([r,n])=>n.flatMap(a=>st.map(o=>({dateFormat:a.join(o),type:r}))))},Rr=e=>{const t=Number(e);if(!(0,He.isInteger)(t))return!1;const r=new Date(t),n=new Date(t*1e3),a=o=>(0,b.isValid)(o)&&o.getFullYear()>=ut&&o.getFullYear()<=ct;return a(r)||a(n)},gt={$:"usd","£":"gbp","€":"eur","¥":"jpy","₹":"inr","₱":"php",P:"php","₩":"krw","₪":"ils","₫":"vnd","₽":"rub","฿":"thb",R$:"brl",Rp:"idr",RM:"myr","₦":"ngn",zł:"pln","₺":"try",kr:"dkk",Fr:"chf",R:"zar","د.إ":"aed","﷼":"sar",Ch$:"clp",NT$:"twd",HK$:"hkd",S$:"sgd",A$:"aud",C$:"cad",NZ$:"nzd",MX$:"mxn"},mt=e=>{if(typeof e=="string"){const t=ht(e);return t.length?C(t):!1}return C(e)},kr=e=>{const t=Et(e),r=t?gt[t]:void 0;if(!r)throw new v({message:"Could not get currency ISO"});return r},ht=e=>{const t=Et(e);let r=e;if(t){const n=e.indexOf(t);n===0?r=e.slice(t.length):n===e.length-t.length?r=e.slice(0,e.length-t.length):e[0]==="-"&&n===1&&(r=`-${e.slice(t.length+1)}`)}return C(r)?r.split(",").join(""):""},Et=e=>Object.keys(gt).sort((t,r)=>r.length-t.length).find(t=>e.includes(t)),At=e=>{const t=Object.entries(e);return!t.length||!t.some(([,r])=>!B(r))},B=e=>typeof e=="string"&&e.trim()===""||e===void 0||e===null||e==="-",Fr=/\s*[–—]\s*|\s-\s/,vt=(e,t,r)=>{if(B(e))return null;switch(t.type){case"decimal":case"integer":case"duration":return Ot(e);case"percentage":return Ir(e);case"currency":return Nr(e);case"datetime":case"date":case"year":case"month_year":case"month":case"day_month":case"quarter":case"time":return Tt(e,t.dateFormat,r);case"weekly_date_range":case"weekly_date_range_with_year":return Cr(e,t.dateFormat,r);case"text":return wr(e);case"lookup":throw new v({message:"Cannot parse: lookup value formats are produced by transforms, not raw input"});default:throw new v({message:`Unhandled value format: ${t.type}`})}},Tt=(e,t,r)=>{if(e instanceof Date)return(0,b.isValid)(e)?e:null;const n=H(String(e).trim());if(n.length===0)return null;const a=new Date;if(t){const i=(0,b.parse)(n,t,a);return(0,b.isValid)(i)?ae(i):null}for(const i of bt(r)){if(!W(i)||!i.dateFormat)continue;const s=(0,b.parse)(n,i.dateFormat,a);if((0,b.isValid)(s))return ae(s)}const o=new Date(n);return dt(o)?te(n)?o:ae(o):null},Ot=e=>{if(typeof e=="number")return Number.isNaN(e)?null:e;if(typeof e!="string")return null;let t=e.trim();if(!C(t))return null;let r=1;for(const n of he)if(new RegExp(`${n}$`,"i").test(t)){r=ot[n],t=t.slice(0,-1);break}return Number(t.split(",").join(""))*r},Ir=e=>{if(typeof e=="number")return Number.isNaN(e)?null:e;if(typeof e!="string")return null;const t=e.trim();if(!it(t))return null;const r=Number(t.replace(/%/g,"").replace(/,/g,""))/100;return Number.isNaN(r)?null:r},Nr=e=>{if(typeof e=="number")return Number.isNaN(e)?null:e;if(typeof e!="string")return null;const t=e.trim();return mt(t)?Ot(ht(t)):null},Cr=(e,t,r)=>{const n=String(e).trim().split(Fr),[a,o]=[n[0]?.trim(),n[1]?.trim()];return!a||!o?null:Tt(a,t,r)},wr=e=>String(e).trim(),ae=e=>new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())),_t=(e,t,r)=>{if(t.type==="text"&&typeof e=="string")return e;const n=vt(e,t,r);return n!==null||!W(t)?n:pt(e)},N=process.env.NODE_ENV!=="production";var re=!0,jr=e=>{re=e},xr=()=>re,Vr=()=>{let e=null;const t={hits:0,misses:0};return Object.assign((n,a)=>{if(!re)return N&&(t.misses+=1),a();if(e&&Mt(e.args,n))return N&&(t.hits+=1),e.out;N&&(t.misses+=1);const o=a();return e={args:n,out:o},o},{stats:t,reset:()=>{e=null}})},St=()=>{const e=new WeakMap,t={hits:0,misses:0};return Object.assign((n,a,o)=>{if(!re)return N&&(t.misses+=1),o();const i=e.get(n);if(i)for(let l=0;l<i.length;l+=1){const c=i[l];if(c&&Mt(c.args,a))return N&&(t.hits+=1),l>0&&(i.splice(l,1),i.unshift(c)),c.out}N&&(t.misses+=1);const s=o();return i?(i.unshift({args:a,out:s}),i.length>16&&(i.length=16)):e.set(n,[{args:a,out:s}]),s},{stats:t})},Br=(...e)=>e.reduce((t,r)=>({hits:t.hits+r.hits,misses:t.misses+r.misses}),{hits:0,misses:0}),Mt=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(e[r]!==t[r])return!1;return!0},Dt=class{constructor(){this.memo=St(),this.singletonKey={}}get stats(){return this.memo.stats}compile(e){return this.memo(this.key(e),this.dependencies(e),()=>this.run(e))}key(e){return this.singletonKey}},Q=e=>(Array.isArray(e)?e:[e]).map(t=>t instanceof Date?t.toISOString():String(t??"<null>")).join("\0"),Wr=(e,t)=>e===t?!0:J(e)&&J(t)?e.getTime()===t.getTime():!1,Ur=new Set(["count","sum","mean","median"]);function Lt(e,t){return Ur.has(e)?"numeric":t}function Pt(e,t,r){const n=r?.length??t.length;if(e==="count")return n;if(e==="median"||e==="mode"){const i=[];for(let s=0;s<n;s++){const l=oe(t,r,s);ie(l)&&i.push(l)}return i.length===0?null:e==="median"?Hr(i):zr(i)}if(e==="sum"||e==="mean"){let i=0,s=0;for(let l=0;l<n;l++){const c=oe(t,r,l);ie(c)&&(i++,s+=Number(c))}return i===0?null:e==="sum"?s:s/i}const a=e==="min"?-1:1;let o=null;for(let i=0;i<n;i++){const s=oe(t,r,i);ie(s)&&(o===null||Yr(s,o)===a)&&(o=s)}return o}var oe=(e,t,r)=>e[t?.[r]??r]??null,ie=e=>e!==null&&!(typeof e=="number"&&Number.isNaN(e)),Yr=(e,t)=>e===null||t===null?0:e<t?-1:e>t?1:0,Gr=e=>e instanceof Date?e.getTime():e??null;function Hr(e){const t=e.map(Number).sort((o,i)=>o-i);if(t.length===1)return t[0]??0;const r=(t.length-1)/2,n=Math.floor(r),a=t[n]??0;return a+((t[n+1]??a)-a)*(r-n)}function zr(e){const t=new Map;for(const a of e){const o=Gr(a),i=t.get(o);i===void 0?t.set(o,{value:a,count:1}):i.count++}let r=null,n=0;for(const{value:a,count:o}of t.values())o>n&&(n=o,r=a);return r}var $r=e=>e==null||typeof e=="number"&&Number.isNaN(e),Xr=e=>e instanceof Date?e.getTime():e??null,ue=class F{constructor(t,r,n,a=null){this.rowShape=null,this.names=t,this.columns=r,this.rowCount=n,this.source=a}get columnCount(){return this.names.length}static from(t){const r=Object.entries(t);return new F(r.map(([n])=>n),new Map(r),r[0]?.[1].length??0)}columnNames(){return[...this.names]}hasColumn(t){return this.names.includes(t)}values(t){const r=this.columns.get(t);if(r!==void 0)return r;if(this.source===null||!this.names.includes(t))return;const n=this.source.table.values(t);if(n===void 0)return;const{indices:a}=this.source,o=new Array(a.length);for(let i=0;i<a.length;i++)o[i]=n[a[i]??0]??null;return this.columns.set(t,o),this.columns.size===this.names.length&&(this.source=null),o}assign(t,r){const n=this.gathered(),a=new Map(n.columns);a.set(t,r);const o=n.names.includes(t)?[...n.names]:[...n.names,t];return new F(o,a,n.names.length===0?r.length:n.rowCount)}select(t){const r=t.filter(a=>this.names.includes(a)),n=new Map;for(const a of r){const o=this.columns.get(a);o!==void 0&&n.set(a,o)}return new F(r,n,this.rowCount,this.source)}rename(t,r){const n=this.gathered(),a=new Map;for(const o of n.names){const i=n.columns.get(o);i!==void 0&&a.set(o===t?r:o,i)}return new F(n.names.map(o=>o===t?r:o),a,n.rowCount)}take(t){const r=this.source===null?{table:this,indices:t}:{table:this.source.table,indices:t.map(n=>this.source?.indices[n]??0)};return new F(this.names,new Map,t.length,r)}sortedIndices(t,r){const n=this.values(t);if(n===void 0)return Array.from({length:this.rowCount},(s,l)=>l);const a=[],o=[];for(let s=0;s<this.rowCount;s++)($r(n[s])?a:o).push(s);const i=r==="asc"?1:-1;return o.sort((s,l)=>{const c=n[s],f=n[l];return c<f?-i:c>f?i:0}),a.length===0?o:r==="asc"?[...a,...o]:[...o,...a]}partition(t){const r=t.map(o=>this.values(o)).filter(o=>o!==void 0),n=r.length===1?r[0]:void 0,a=new Map;if(n!==void 0){for(let o=0;o<this.rowCount;o++){const i=Xr(n[o]),s=a.get(i);s===void 0?a.set(i,{key:Q(n[o]??null),indices:[o]}):s.indices.push(o)}return[...a.values()]}for(let o=0;o<this.rowCount;o++){const i=Q(r.map(l=>l[o])),s=a.get(i);s===void 0?a.set(i,{key:i,indices:[o]}):s.indices.push(o)}return[...a.values()]}fold(t,r,n){const a=this.names.filter(d=>!t.includes(d)),o=this.rowCount*t.length,i=a.map(d=>({name:d,source:this.values(d)??[],repeated:new Array(o)})),s=t.map(d=>this.values(d)??[]),l=new Array(o),c=new Array(o);let f=0;for(let d=0;d<this.rowCount;d++)for(let O=0;O<t.length;O++,f++){for(const j of i)j.repeated[f]=j.source[d]??null;l[f]=t[O]??"",c[f]=s[O]?.[d]??null}const h=new Map;for(const{name:d,repeated:O}of i)h.set(d,O);return h.set(r,l),h.set(n,c),new F([...a,r,n],h,o)}objectAt(t){const{names:r,arrays:n,template:a}=this.rowShape??this.resolveRowShape(),o={...a};for(let i=0;i<r.length;i++)o[r[i]??""]=n[i]?.[t]??null;return o}*[Symbol.iterator](){for(let t=0;t<this.rowCount;t++)yield this.objectAt(t)}resolveRowShape(){const t={};for(const r of this.names)t[r]=null;return this.rowShape={names:this.names,arrays:this.names.map(r=>this.values(r)??[]),template:t},this.rowShape}gathered(){if(this.source===null)return this;for(const t of this.names)this.values(t);return new F(this.names,new Map(this.columns),this.rowCount)}};var Rt="value",Y={numeric:{type:"decimal"},categorical:{type:"text"},temporal:{type:"datetime"}},Se={eq:(e,t)=>e===t,neq:(e,t)=>e!==t,gt:(e,t)=>e!==null&&t!==null&&e>t,gte:(e,t)=>e!==null&&t!==null&&e>=t,lt:(e,t)=>e!==null&&t!==null&&e<t,lte:(e,t)=>e!==null&&t!==null&&e<=t},Me=e=>e===null?null:e instanceof Date?e.getTime():new Date(e).getTime(),kt=(e,t)=>e==="count"?{type:"integer"}:t,Ft=(e,t,r)=>{const n=e.values(t);if(n!==void 0)return n;if(r==="count")return new Array(e.rowCount);throw new v({message:`Variable '${t}' not defined`})},Z=class E{constructor(t={}){const{table:r,variableMetadata:n}=this.parseVariableMap(t);this.table=r,this.variableMetadata=n}static fromTrusted(t,r){const n=Object.create(E.prototype);return n.table=t,n.variableMetadata=r,n}size(){return this.table.rowCount}getVariableNames(){return this.table.columnNames()}hasVariable(t){return this.table.hasColumn(t)}addVariable(t,r,n,a){if(this.table.columnCount>0&&n.length!==this.size())throw new v({message:`Variable '${t}' has ${n.length} values, expected ${this.size()}`});const o={...this.variableMetadata,[t]:{type:r,valueFormat:this.resolveAddedVariableFormat(t,r,a)}},i=this.normalizeRawValues(r,n),s=this.table.assign(t,i);return E.fromTrusted(s,o)}addConstantVariable(t,r,n,a){const o={...this.variableMetadata,[t]:{type:r,valueFormat:this.resolveAddedVariableFormat(t,r,a),constant:{value:n}}},[i=null]=this.normalizeRawValues(r,[n]),s=this.table.assign(t,new Array(this.size()).fill(i));return E.fromTrusted(s,o)}getConstant(t){return this.variableMetadata[t]?.constant}deriveVariable(t,r,n,a){const o=Array.from({length:this.size()},(i,s)=>n(this.table.objectAt(s)));return this.addVariable(t,r,o,a)}deriveVariableFrom(t,r,n,a,o){const i=this.hasVariable(t)?this.getValues(t).map(a):Array.from({length:this.size()},()=>a(null));return this.addVariable(r,n,i,o)}renameVariable(t,r){const n=this.variableMetadata[t];if(!n)throw new v({message:`Variable ${t} not defined`});const a=this.table.rename(t,r),{[t]:o,...i}=this.variableMetadata,s={...i,[r]:n};return E.fromTrusted(a,s)}selectVariables(...t){const r=this.table.select(t),n=Object.fromEntries(Object.entries(this.variableMetadata).filter(([a])=>t.includes(a)));return E.fromTrusted(r,n)}getType(t){const r=this.variableMetadata[t];if(!r)throw new v({message:`Variable ${t} not defined`});return r.type}getValueFormat(t){const r=this.variableMetadata[t];if(!r)throw new v({message:`Variable ${t} not defined`});return r.valueFormat}groupVariableNamesByType(){const t={numeric:[],categorical:[],temporal:[]};for(const[r,{type:n}]of Object.entries(this.variableMetadata))t[n].push(r);return t}getValues(t,r){if(!this.hasVariable(t))throw new v({message:`Variable '${t}' not defined`});const n=this.getType(t);if(r?.type!==void 0&&n!==r.type){if(this.size()===0)return[];throw new v({message:`Variable '${t}' has type '${n}', expected '${r.type}'`})}let a=this.table.values(t)??[];return r?.distinct&&(a=this.getDistinctValues(n,a)),r?.skipNulls&&(a=this.skipNulls(a)),a}filter(t,r,n){if(this.hasVariable(t)&&this.getType(t)==="temporal")return this.filterByTimestamp(t,r,n);const a=Se[r],o=this.table.values(t)??[],i=[];for(let s=0;s<o.length;s++)a(o[s]??null,n)&&i.push(s);return E.fromTrusted(this.table.take(i),this.variableMetadata)}filterByMask(t){if(t.length!==this.size())throw new v({message:`Row mask length ${t.length} does not match dataset size ${this.size()}`});const r=[];for(let n=0;n<t.length;n++)t[n]===1&&r.push(n);return E.fromTrusted(this.table.take(r),this.variableMetadata)}take(t){return E.fromTrusted(this.table.take(t),this.variableMetadata)}orderBy(t,r="asc"){const n=this.table.take(this.table.sortedIndices(t,r));return E.fromTrusted(n,this.variableMetadata)}getAt(t){return t<0||t>=this.size()?null:this.table.objectAt(t)}getFirst(){return this.getAt(0)}getLast(){return this.getAt(this.size()-1)}findFirst(t){const r=this.size();for(let n=0;n<r;n++){const a=this.table.objectAt(n);if(t(a))return a}return null}findLast(t){for(let r=this.size()-1;r>=0;r--){const n=this.table.objectAt(r);if(t(n))return n}return null}groupBy(...t){return new Kr(t,this.table,this.variableMetadata)}rollup(t){const r=ue.from(Object.fromEntries(Object.entries(t).map(([a,{variableName:o,aggregation:i}])=>[a,[Pt(i,Ft(this.table,o,i))]]))),n={};for(const[a,{variableName:o,aggregation:i}]of Object.entries(t)){const s=this.variableMetadata[o],l=s?.type??"numeric",c=s?.valueFormat??Y[l];n[a]={type:Lt(i,l),valueFormat:kt(i,c)}}return E.fromTrusted(r,n)}reshapeFromWideToLong({keep:t,reshape:r,keyName:n="key",valueName:a=Rt}={}){const{numeric:o,categorical:i,temporal:s}=this.groupVariableNamesByType(),l=t??[...i,...s],c=r??o.filter(d=>!l.includes(d));if(l.includes(n)||l.includes(a))throw new G({code:"INVALID_DATA_SHAPE",message:`The variables to keep includes the variables '${n}' or '${a}' to create the key and value variables`});if(c.length===0){const d={};for(const O of l){const j=this.variableMetadata[O];j&&(d[O]={type:j.type,values:[],valueFormat:j.valueFormat})}return d[n]={type:"categorical",values:[],valueFormat:{type:"text"}},d[a]={type:"numeric",values:[],valueFormat:{type:"decimal"}},new E(d)}if(c.filter(d=>this.variableMetadata[d]?.type!=="numeric").length>0)throw new G({code:"INVALID_DATA_SHAPE",message:"Only numeric variables can be reshaped"});const f=this.table.select([...l,...c]).fold(c,n,a),h={};for(const d of l){const O=this.variableMetadata[d];O&&(h[d]=O)}return h[n]={type:"categorical",valueFormat:{type:"text"}},h[a]={type:"numeric",valueFormat:qr(this.variableMetadata,c,n)},E.fromTrusted(f,h)}print(){console.table(this.variableMetadata),console.table([...this.table])}[Symbol.iterator](){return this.table[Symbol.iterator]()}filterByTimestamp(t,r,n){const a=Se[r],o=_t(n,this.getValueFormat(t),ee),i=Me(o??n),s=this.getValues(t,{type:"temporal"}),l=[];for(let c=0;c<s.length;c++)a(Me(s[c]??null),i)&&l.push(c);return E.fromTrusted(this.table.take(l),this.variableMetadata)}resolveAddedVariableFormat(t,r,n){if(n!==void 0)return n;const a=this.variableMetadata[t];return a?a.valueFormat:Y[r]}parseVariableMap(t){const r={},n={};for(const[a,{type:o,values:i,valueFormat:s}]of Object.entries(t))r[a]=i,n[a]={type:o,valueFormat:s??Y[o]};return{table:ue.from(r),variableMetadata:n}}normalizeRawValues(t,r){switch(t){case"numeric":return r.map(n=>typeof n!="number"||Number.isNaN(n)?null:n);case"categorical":return r.map(n=>typeof n!="string"?null:n);case"temporal":return r.map(n=>!(n instanceof Date)||!(0,b.isValid)(n)?null:n);default:throw new v({message:`Cannot normalize raw value of unknown type: ${t}`})}}skipNulls(t){return t.filter(r=>r!==null)}getDistinctValues(t,r){const n=t==="temporal",a=new Set,o=[];for(const i of r){const s=n&&i instanceof Date?i.getTime():i;a.has(s)||(a.add(s),o.push(i))}return o}},Kr=class{constructor(e,t,r){this.groupedBy=e,this.table=t,this.variableMetadata=r}forEach(e){this.table.partition(this.groupedBy).forEach(({key:t,indices:r},n)=>{e(Z.fromTrusted(this.table.take(r),this.variableMetadata),t,n)})}rollup(e){const t=this.table.partition(this.groupedBy),r={};for(const a of this.groupedBy){const o=this.table.values(a)??[];r[a]=t.map(({indices:i})=>o[i[0]??0]??null)}const n=Object.fromEntries(this.groupedBy.map(a=>{const o=this.variableMetadata[a],i=o?.type??"categorical";return[a,{type:i,valueFormat:o?.valueFormat??Y[i]}]}));for(const[a,{variableName:o,aggregation:i}]of Object.entries(e)){const s=Ft(this.table,o,i);r[a]=t.map(({indices:h})=>Pt(i,s,h));const l=this.variableMetadata[o],c=l?.type??"numeric",f=l?.valueFormat??Y[c];n[a]={type:Lt(i,c),valueFormat:kt(i,f)}}return Z.fromTrusted(ue.from(r),n)}};function qr(e,t,r){const n=t.map(s=>e[s]?.valueFormat??{type:"decimal"}),[a,...o]=n;if(!a)return{type:"decimal"};for(const s of n)if(s.type==="lookup")throw new G({code:"INVALID_DATA_SHAPE",message:"Cannot reshape: a source column has a lookup format and lookups cannot nest"});if(o.every(s=>(0,He.isEqual)(s,a))||a.type==="lookup")return a;const i={};for(const[s,l]of t.entries()){const c=Q([l]),f=n[s];f&&f.type!=="lookup"&&(i[c]=f)}return{type:"lookup",byVariable:r,cases:i,fallback:a}}var It=class{constructor(e){this.label=e,this.items=new Map}register(e,t){return this.items.set(e,t),this}get(e){if(!this.items.has(e)){const t=[...this.items.keys()].map(r=>`'${r}'`).join(", ");throw new G({code:"UNKNOWN_REGISTERED_TYPE",message:`Unknown ${this.label}: '${e}' (available: ${t})`,context:{kind:this.label,requested:e,available:[...this.items.keys()]},suggestion:`Register a custom ${this.label} named '${e}' in the \`plugins\` array, or use one of: ${t}.`})}return this.items.get(e)}getAll(){return[...this.items.values()]}has(e){return this.items.has(e)}},Jr=(e,t)=>{const r=typeof e=="string"?e.trim():e;if(C(r))return{type:"decimal"};const n=typeof r=="string"&&ft(r,t);if(n)return n;const a=typeof r=="string"&&Lr(r,t);return a||(dt(e)?{type:"date"}:it(e)?{type:"percentage"}:mt(e)&&typeof e=="string"?{type:"currency",iso:kr(e)}:{type:"text"})},Qr={type:"year",dateFormat:"yyyy"},Zr={type:"text"},Nt=e=>{const t=e._metadata?.parsingLocale??"en-GB",r={},n=nn(e),a=tn(e),o=n.size>0;for(const[i,s]of e.columns.entries()){if(s._metadata?.isHidden)continue;const l=n.get(s.key);if(B(l)&&o)continue;const c=s.valueFormat??(B(l)?Zr:i===a?Qr:Jr(l,t)),f=nt(c);r[s.key]=rn(s.key,e.rows,c,f,t)}return new Z(r)},en=class extends Dt{dependencies(e){return[e]}run(e){return Nt(e)}},tn=e=>{if(e.columns.some(r=>r.valueFormat?.type==="year"))return-1;const t=an(e.rows,5);return e.columns.findIndex(r=>{if(r.valueFormat)return!1;const n=t.map(a=>a[r.key]).filter(a=>!B(a));return n.length>=2&&n.every(Dr)})},rn=(e,t,r,n,a)=>({type:n,values:t.reduce((o,i)=>(At(i)||o.push(vt(i[e],r,a)),o),[]),valueFormat:r}),nn=e=>{const t=new Map,r=new Set(e.columns.map(n=>n.key));for(const n of e.rows){for(const a of r){const o=n[a];B(o)||(t.set(a,o),r.delete(a))}if(r.size===0)break}return t},an=(e,t)=>{const r=[];for(const n of e)if(At(n)||r.push(n),r.length===t)return r;return r},Ee=["none","xs","sm","md","lg","xl","full"],on={point:sn,line:ln,area:un,bar:cn,rule:dn,tile:fn},Ct=e=>typeof e=="string"&&Ee.includes(e);function w(e,t){return{type:"layer",id:t.id,geom:e,mapping:t.aes,stat:t.stat,params:t.params,position:t.position,yScaleType:t.yScaleType,transforms:t.transforms,interactive:t.interactive,dataLabels:t.dataLabels}}function sn(e={}){return w("point",e)}function ln(e={}){return w("line",e)}function un(e={}){return w("area",e)}function cn(e={}){return w("bar",e)}function dn(e={}){return w("rule",e)}function fn(e={}){return w("tile",e)}var pn=["dimmed","hovered"],bn=["color","alpha","saturation","borderRadius","borderColor","borderWidth","strokeWidth","lineType","strokeAlpha","fillAlpha","size","background","fontFamily","fontSize","fontWeight","lineHeight","textScale","textColor","offset","gap","length","paddingInline","paddingBlock","padding","margin","shadow"],De=1,Le=1e3,yn="'none' or a shadow object { offsetX, offsetY, blur, color }",Pe="a non-negative number of pixels, or an object of those per edge",gn="a non-empty color string, a { light, dark } pair, or a token(...) reference",mn=["top","right","bottom","left"],ne=e=>typeof e=="object"&&e!==null&&typeof e.light=="string"&&typeof e.dark=="string",wt=e=>typeof e=="object"&&e!==null&&typeof e.token=="string",jt=e=>typeof e=="string"?e.trim().length>0:ne(e)&&e.light.trim().length>0&&e.dark.trim().length>0;function u(e){return{token:e}}var ce=(e,t)=>{if(typeof e!="object"||e===null)return e;if(ne(e))return e[t];if(Array.isArray(e)){const n=e.map(a=>ce(a,t));return n.every((a,o)=>a===e[o])?e:n}const r=Object.entries(e).map(([n,a])=>[n,ce(a,t)]);return r.every(([n,a])=>a===e[n])?e:Object.fromEntries(r)},R=e=>typeof e=="number"&&Number.isFinite(e),_=(e,t)=>({status:"rejected",expected:e,actual:t}),Re=(e,t)=>{if(typeof e=="string")return e.trim().length>0?{status:"accepted",value:e}:_("a non-empty color string",e);if(wt(e)){const r=t[e.token];return r===void 0?{status:"unknownToken",token:e.token}:jt(r)?{status:"accepted",value:typeof r=="string"?r:{light:r.light,dark:r.dark}}:{status:"dropped"}}return ne(e)&&e.light.trim().length>0&&e.dark.trim().length>0?{status:"accepted",value:{light:e.light,dark:e.dark}}:_(gn,e)},ke=e=>{if(R(e)&&e>=0)return{status:"accepted",value:{top:e,right:e,bottom:e,left:e}};if(typeof e!="object"||e===null)return _(Pe,e);const t=e,r={};for(const n of mn){const a=t[n];if(a!==void 0){if(!R(a)||a<0)return _(Pe,e);r[n]=a}}return{status:"accepted",value:r}},hn={color:Re,unitInterval:e=>R(e)&&e>=0&&e<=1?{status:"accepted",value:e}:_("a number in [0, 1]",e),pixels:e=>R(e)&&e>=0?{status:"accepted",value:e}:_("a non-negative number of pixels",e),radiusToken:e=>Ct(e)?{status:"accepted",value:e}:_(`one of ${Ee.map(t=>`'${t}'`).join(", ")}`,e),lineType:e=>et(e)?{status:"accepted",value:e}:_(`one of ${ye.map(t=>`'${t}'`).join(", ")}`,e),fontFamily:e=>typeof e=="string"&&e.trim().length>0?{status:"accepted",value:e}:_("a non-empty CSS font-family list",e),fontWeight:e=>R(e)&&e>=De&&e<=Le?{status:"accepted",value:e}:_(`a number in [${De}, ${Le}]`,e),multiplier:e=>R(e)&&e>0?{status:"accepted",value:e}:_("a positive multiple of the font size",e),shadow:(e,t)=>{if(e==="none")return{status:"accepted",value:e};const r=e;if(!R(r.offsetX)||!R(r.offsetY)||!R(r.blur)||r.blur<0)return _(yn,e);const n=Re(r.color,t);return n.status!=="accepted"?n:{status:"accepted",value:{offsetX:r.offsetX,offsetY:r.offsetY,blur:r.blur,color:n.value}}},padding:ke,margin:ke},xt=["kind","edge","axis","role","position","part"],En="#B84737",Vt=.4,An="sm",vn=2,Tn=8,On=12,_n=Object.freeze({light:"#F5F1E9",dark:"#1F1E1C"}),Sn="#ffffff",Mn=1,Dn=24,Ln={top:24,right:24,bottom:24,left:24},L={color:"color",strokeWidth:"pixels",lineType:"lineType"},y={fontFamily:"fontFamily",fontSize:"pixels",fontWeight:"fontWeight",lineHeight:"multiplier",textColor:"color"},k={...y,paddingInline:"pixels",paddingBlock:"pixels",background:"color",borderColor:"color",borderWidth:"pixels",borderRadius:"pixels"},Fe=1,Pn=.3,Rn=10,kn=24,Fn=8,m={label:{fontSize:11.5,fontWeight:500,lineHeight:1},dataLabelOutside:{fontSize:12.5,fontWeight:600,lineHeight:1},tooltipHeading:{fontSize:12.5,fontWeight:700,lineHeight:1.3},tooltipRow:{fontSize:12.5,fontWeight:500,lineHeight:1.43},heading:{fontSize:18,fontWeight:600,lineHeight:1.25},subtitle:{fontSize:15,fontWeight:500,lineHeight:1.47},caption:{fontSize:12,fontWeight:500,lineHeight:1.3},source:{fontSize:12,fontWeight:500,lineHeight:1.3},sourceLink:{fontSize:12,fontWeight:400,lineHeight:1.3}},Ie={color:u("gridLine"),strokeWidth:1,lineType:"dashed"},Ne={background:u("tooltipBackground"),borderColor:u("tooltipBorder"),borderWidth:1,borderRadius:6,paddingBlock:8,paddingInline:10,shadow:{offsetX:0,offsetY:4,blur:12,color:"rgba(0, 0, 0, 0.18)"}},Ce={color:u("textPrimary"),size:8,borderColor:u("tooltipBackground"),borderWidth:2,shadow:{offsetX:0,offsetY:1,blur:1.5,color:"rgba(14, 14, 52, 0.18)"}},we={fontSize:12,fontWeight:500,lineHeight:1.3,textColor:u("textPrimary"),background:u("tooltipBackground"),borderColor:u("tooltipBorder"),borderWidth:1,borderRadius:6,paddingInline:7,paddingBlock:4,shadow:{offsetX:0,offsetY:2,blur:6,color:"rgba(0, 0, 0, 0.12)"}},x={color:"color",alpha:"unitInterval",saturation:"unitInterval"},se={...L,length:"pixels"},je={...y,margin:"margin"},xe={...y,offset:"pixels",margin:"margin"},V={gap:"pixels",margin:"margin"},le={color:"color",strokeWidth:"pixels",offset:"pixels",borderRadius:"pixels"},Ve={background:"color",borderColor:"color",borderWidth:"pixels",borderRadius:"pixels",paddingInline:"pixels",paddingBlock:"pixels",shadow:"shadow"},I=["where","state","layer"],Bt=new Map;var In=()=>{const e=[],t=[],r=[],n=a=>{if(a.rest!==void 0&&e.push({select:a.select,declarations:a.rest}),a.dimmed!==void 0&&t.push({select:a.select,declarations:a.dimmed,when:{state:"dimmed"}}),a.hovered!==void 0&&r.push({select:a.select,declarations:a.hovered,when:{state:"hovered"}}),a.children!==void 0)for(const o of Object.values(a.children))n(o)};for(const a of Object.values(g))n(a);return[...e,...t,...r]},Nn=e=>Bt.get(Wt(e)),Be=(e,t,r)=>({x:{select:{target:e,axis:"x"},vocabulary:t},y:{select:{target:e,axis:"y"},vocabulary:t},top:{select:{target:e,edge:"top"},vocabulary:t,rest:r.top},bottom:{select:{target:e,edge:"bottom"},vocabulary:t,rest:r.bottom},left:{select:{target:e,edge:"left"},vocabulary:t,rest:r.left},right:{select:{target:e,edge:"right"},vocabulary:t,rest:r.right}}),We=e=>({select:{target:"dataLabel",role:e},vocabulary:k,children:{inside:{select:{target:"dataLabel",role:e,position:"inside"},vocabulary:k,rest:{textColor:"#FFFFFF"}},outside:{select:{target:"dataLabel",role:e,position:"outside"},vocabulary:k,rest:{...m.dataLabelOutside}}}}),g={geom:{select:{target:"geom"},vocabulary:x,options:I,aesthetics:{color:"color",alpha:"alpha"},rest:{color:u("geom"),alpha:1},dimmed:{alpha:Vt},acceptsUnknownKinds:!0,children:{bar:{select:{target:"geom",kind:"bar"},vocabulary:{...x,borderRadius:"radiusToken",borderColor:"color",borderWidth:"pixels"},options:I,aesthetics:{borderWidth:"strokeWidth"},rest:{borderRadius:"sm",borderWidth:Fe,borderColor:u("geomBorder")},hovered:{borderColor:u("hoverAffordance")}},line:{select:{target:"geom",kind:"line"},vocabulary:{...x,strokeWidth:"pixels",lineType:"lineType",fillAlpha:"unitInterval"},options:I,aesthetics:{strokeWidth:"strokeWidth",lineType:"lineType"},rest:{strokeWidth:2,lineType:"solid"}},area:{select:{target:"geom",kind:"area"},vocabulary:{...x,strokeWidth:"pixels",lineType:"lineType",strokeAlpha:"unitInterval"},options:I,aesthetics:{strokeWidth:"strokeWidth",lineType:"lineType"},rest:{alpha:Pn,strokeWidth:2,lineType:"solid",strokeAlpha:1}},point:{select:{target:"geom",kind:"point"},vocabulary:{...x,size:"pixels",borderColor:"color",borderWidth:"pixels"},options:I,aesthetics:{size:"size",borderWidth:"strokeWidth"},rest:{size:8,borderColor:u("hoverAffordance"),borderWidth:Fe},hovered:{borderColor:u("hoverAffordance")}},rule:{select:{target:"geom",kind:"rule"},vocabulary:{color:"color",strokeWidth:"pixels",lineType:"lineType"},options:I,aesthetics:{strokeWidth:"strokeWidth",lineType:"lineType"},rest:{color:u("ruleLine"),strokeWidth:1,lineType:"dashed"},children:{label:{select:{target:"ruleLabel"},vocabulary:y,options:["layer"],rest:{...m.label}}}},tile:{select:{target:"geom",kind:"tile"},vocabulary:{...x,borderRadius:"pixels",borderColor:"color",borderWidth:"pixels"},options:I,aesthetics:{borderWidth:"strokeWidth"},rest:{borderRadius:8,borderWidth:0},hovered:{borderColor:u("hoverAffordance"),borderWidth:2}}}},panelBorder:{select:{target:"panelBorder"},vocabulary:{...L,borderRadius:"pixels"},rest:{...Ie,borderRadius:6},children:{top:{select:{target:"panelBorder",edge:"top"},vocabulary:L},right:{select:{target:"panelBorder",edge:"right"},vocabulary:L},bottom:{select:{target:"panelBorder",edge:"bottom"},vocabulary:L},left:{select:{target:"panelBorder",edge:"left"},vocabulary:L}}},gridLine:{select:{target:"gridLine"},vocabulary:L,children:{x:{select:{target:"gridLine",axis:"x"},vocabulary:L},y:{select:{target:"gridLine",axis:"y"},vocabulary:L,rest:Ie}}},tickLine:{select:{target:"tickLine"},vocabulary:se,rest:{strokeWidth:0,length:0},children:{x:{select:{target:"tickLine",axis:"x"},vocabulary:se},y:{select:{target:"tickLine",axis:"y"},vocabulary:se}}},axisLabel:{select:{target:"axisLabel"},vocabulary:je,rest:{...m.label,textColor:u("textPrimary")},children:Be("axisLabel",je,{top:{margin:{bottom:8}},bottom:{margin:{top:4,bottom:16}}})},tickLabel:{select:{target:"tickLabel"},vocabulary:xe,rest:{...m.label,textColor:u("textSecondary"),offset:Rn},children:Be("tickLabel",xe,{left:{offset:14},right:{offset:14}})},dataLabel:{select:{target:"dataLabel"},vocabulary:k,rest:{...m.label,textColor:u("textPrimary"),paddingInline:6,paddingBlock:2,borderRadius:4},children:{aggregate:{select:{target:"dataLabel",role:"aggregate"},vocabulary:k,rest:{...m.dataLabelOutside}},observation:We("observation"),category:We("category")}},graph:{select:{target:"graph"},vocabulary:{background:"color",borderColor:"color",borderWidth:"pixels",borderRadius:"pixels",fontFamily:"fontFamily",fontSize:"pixels",fontWeight:"fontWeight",lineHeight:"multiplier",textColor:"color",textScale:"multiplier",padding:"padding"},rest:{background:u("graphBackground"),borderWidth:1,borderColor:u("graphBorder"),borderRadius:8,textScale:1,padding:24}},heading:{select:{target:"heading"},vocabulary:y,rest:{textColor:u("textPrimary")},partWildcard:!0,children:{h1:{select:{target:"heading",part:"h1"},vocabulary:y,rest:{...m.heading}},h2:{select:{target:"heading",part:"h2"},vocabulary:y,rest:{...m.subtitle}}}},caption:{select:{target:"caption"},vocabulary:y,rest:{...m.caption,textColor:u("textPrimary")}},source:{select:{target:"source"},vocabulary:y,rest:{...m.source,textColor:u("textSecondary")},children:{link:{select:{target:"source",part:"link"},vocabulary:y,rest:{...m.sourceLink,textColor:u("textSecondary")}}}},header:{select:{target:"header"},vocabulary:{margin:"margin"},rest:{margin:{bottom:10}}},footer:{select:{target:"footer"},vocabulary:{margin:"margin"},rest:{margin:{top:16}}},hoverGuide:{select:{target:"hoverGuide"},vocabulary:{color:"color",background:"color"},rest:{color:u("hoverGuideLine"),background:u("hoverGuideFill")}},editOutline:{select:{target:"editOutline"},vocabulary:le,rest:{strokeWidth:2,offset:2,borderRadius:3},partWildcard:!0,children:{hover:{select:{target:"editOutline",part:"hover"},vocabulary:le,rest:{color:u("editOutlineHover")}},selected:{select:{target:"editOutline",part:"selected"},vocabulary:le,rest:{color:u("editOutlineSelected")}}}},tooltip:{select:{target:"tooltip"},vocabulary:Ve,rest:Ne,children:{heading:{select:{target:"tooltip",part:"heading"},vocabulary:y,rest:{...m.tooltipHeading,textColor:u("textPrimary")}},label:{select:{target:"tooltip",part:"label"},vocabulary:y,rest:{...m.tooltipRow,textColor:u("textPrimary")}},value:{select:{target:"tooltip",part:"value"},vocabulary:y,rest:{...m.tooltipRow,textColor:u("textSecondary")}},primaryRow:{select:{target:"tooltip",part:"primaryRow"},vocabulary:{background:"color"},rest:{background:u("tooltipPrimaryRow")}}}},headline:{select:{target:"headline"},vocabulary:V,rest:{gap:kn,margin:{bottom:4}}},headlineItem:{select:{target:"headlineItem"},vocabulary:{},children:{number:{select:{target:"headlineItem",part:"number"},vocabulary:y,rest:{fontSize:26,fontWeight:700,lineHeight:1.3,textColor:u("textPrimary")},children:{center:{select:{target:"headlineItem",part:"numberCenter"},vocabulary:y}}},caption:{select:{target:"headlineItem",part:"caption"},vocabulary:y,rest:{fontSize:12,textColor:u("textSecondary")}},label:{select:{target:"headlineItem",part:"label"},vocabulary:y,rest:{fontSize:12,textColor:u("textSecondary")}},swatch:{select:{target:"headlineItem",part:"swatch"},vocabulary:{size:"pixels"},rest:{size:12}},trend:{select:{target:"headlineItem",part:"trend"},vocabulary:y,rest:{fontSize:12},children:{up:{select:{target:"headlineItem",part:"trendUp"},vocabulary:{textColor:"color"},rest:{textColor:u("trendPositive")}},down:{select:{target:"headlineItem",part:"trendDown"},vocabulary:{textColor:"color"},rest:{textColor:u("trendNegative")}},flat:{select:{target:"headlineItem",part:"trendFlat"},vocabulary:{textColor:"color"},rest:{textColor:u("trendNeutral")}}}}}},legend:{select:{target:"legend"},vocabulary:V,rest:{gap:Fn},children:{popover:{select:{target:"legend",part:"popover"},vocabulary:Ve,rest:Ne},top:{select:{target:"legend",edge:"top"},vocabulary:V,rest:{margin:{bottom:8}}},bottom:{select:{target:"legend",edge:"bottom"},vocabulary:V,rest:{margin:{top:16,bottom:10}}},left:{select:{target:"legend",edge:"left"},vocabulary:V,rest:{margin:{right:10}}},right:{select:{target:"legend",edge:"right"},vocabulary:V,rest:{margin:{left:10}}}}},legendItem:{select:{target:"legendItem"},vocabulary:{...y,paddingInline:"pixels",paddingBlock:"pixels",background:"color",borderColor:"color",borderWidth:"pixels",borderRadius:"pixels"},rest:{...m.label,textColor:u("textSecondary"),borderWidth:0,paddingInline:2,paddingBlock:4},children:{swatch:{select:{target:"legendItem",part:"swatch"},vocabulary:{size:"pixels",strokeWidth:"pixels"},rest:{size:12,strokeWidth:2}}}},directLabel:{select:{target:"directLabel"},vocabulary:{...y,strokeWidth:"pixels",lineType:"lineType"},rest:{fontSize:12,fontWeight:500,lineHeight:1.3,textColor:u("textPrimary"),strokeWidth:1,lineType:"dashed"}},annotation:{select:{target:"annotation"},vocabulary:{color:"color",alpha:"unitInterval"},options:["annotation"],children:{shape:{select:{target:"annotation",kind:"shape"},vocabulary:{color:"color",alpha:"unitInterval",borderColor:"color",borderWidth:"pixels"},options:["annotation"],rest:{color:u("annotationShape"),alpha:.25,borderWidth:1}},arrow:{select:{target:"annotation",kind:"arrow"},vocabulary:{color:"color",strokeWidth:"pixels",lineType:"lineType",borderColor:"color",borderWidth:"pixels",shadow:"shadow"},options:["annotation"],rest:{color:u("annotationArrow"),strokeWidth:4,lineType:"solid",borderWidth:0,shadow:"none"}},differenceArrow:{select:{target:"annotation",kind:"differenceArrow"},vocabulary:{color:"color",strokeWidth:"pixels"},options:["annotation"],rest:{color:u("annotationArrow"),strokeWidth:2},children:{label:{select:{target:"annotation",kind:"differenceArrow",part:"label"},vocabulary:k,options:["annotation"],rest:{...m.label,textColor:u("textPrimary"),background:u("differenceLabelBackground"),borderWidth:1,borderRadius:4,paddingInline:6,paddingBlock:3}}}},text:{select:{target:"annotation",kind:"text"},vocabulary:{...k,alpha:"unitInterval"},options:["annotation"],rest:{background:"transparent",alpha:1,borderWidth:1.5,borderRadius:9,paddingInline:6,paddingBlock:3,fontSize:15,fontWeight:500,lineHeight:1.25,textColor:u("textPrimary")}},image:{select:{target:"annotation",kind:"image"},vocabulary:{alpha:"unitInterval",borderRadius:"pixels"},options:["annotation"],rest:{alpha:1,borderRadius:0}},pinnedNumber:{select:{target:"annotation",kind:"pinnedNumber"},vocabulary:{color:"color",size:"pixels",borderColor:"color",borderWidth:"pixels",shadow:"shadow"},options:["annotation"],rest:Ce,children:{label:{select:{target:"annotation",kind:"pinnedNumber",part:"label"},vocabulary:{...k,shadow:"shadow"},options:["annotation"],rest:we}}},comment:{select:{target:"annotation",kind:"comment"},vocabulary:{color:"color",size:"pixels",borderColor:"color",borderWidth:"pixels",shadow:"shadow"},options:["annotation"],rest:Ce,children:{label:{select:{target:"annotation",kind:"comment",part:"label"},vocabulary:{...k,shadow:"shadow"},options:["annotation"],rest:we}}}}}},Wt=e=>{let t=e.target;for(const r of xt){const n=e[r];n!==void 0&&(t+=`\0${r}:${n}`)}return t},Ut=e=>{if(Bt.set(Wt(e.select),e),e.children!==void 0)for(const t of Object.values(e.children))Ut(t)};for(const e of Object.values(g))Ut(e);var Cn=class{constructor(){this.transformType="aggregate"}apply(e,t){const{options:r}=t,n={};for(const a of r.operations)n[a.as]={variableName:a.variableName,aggregation:a.op};return e.groupBy(...r.groupby).rollup(n)}},wn=class{constructor(){this.transformType="constant"}apply(e,t){const{options:r}=t;return e.addConstantVariable(r.variableName,r.type,r.value)}getIntroducedVariables(e){const{options:t}=e;return[t.variableName]}},jn=class{constructor(){this.transformType="filter"}apply(e,t){const{options:r}=t;return e.filter(r.variableName,r.operator,r.value)}},xn=class{constructor(){this.transformType="reshape"}apply(e,t){const{options:r}=t;return e.reshapeFromWideToLong({keep:r.keep,reshape:r.reshape,keyName:r.keyName,valueName:r.valueName})}getIntroducedVariables(e){const{options:t}=e;return[t.keyName??"key"]}},Vn=class{constructor(){this.transformType="sort"}apply(e,t){const{options:r}=t;return e.orderBy(r.variableName,r.direction??"asc")}},Bn=[new Cn,new wn,new jn,new xn,new Vn],Wn=class extends It{constructor(){super("transform");for(const e of Bn)this.register(e.transformType,e)}},Un=["brick","gray","red","orange","yellow","green","cyan","blue","purple","pink"],Yn=["cyan","pink","purple","red","orange","yellow","green","blue"],Yt=["#B84737","#BA7420","#0B8666","#3D63A8","#DD9583","#E2BF6B","#95CBA6","#AABCE5"],Gt="brick",D={red:"#E83562",orange:"#F38650",yellow:"#FBBC30",green:"#31FCB4",cyan:"#40F8FF",blue:"#279EFF",purple:"#B399FD",dark_purple:"#6D48D2",plum:"#C82184",pink:"#FC8497"},Gn=[D.purple,D.pink,D.yellow,D.blue,D.red,D.cyan,D.orange,D.plum,D.green,D.dark_purple],S={green:"#B2DDC9",cyan:"#A2D5E2",blue:"#AAC4FF",purple:"#B2A4FF",plum:"#DCA8C7",pink:"#FFCCD3",red:"#FFADAD",orange:"#FFDEB4",yellow:"#FDF7C3"},Hn=[S.green,S.purple,S.red,S.cyan,S.pink,S.blue,S.orange,S.plum,S.yellow],z={brick900:"#6E0500",brick800:"#881D11",brick700:"#A03522",brick600:"#B0523B",brick500:"#C06D56",brick400:"#CE8772",brick300:"#DBA28E",brick200:"#E7BDAC",brick100:"#F2D8CB",brick50:"#FCF4EA",gray900:"#1c1917",gray800:"#292524",gray700:"#44403c",gray600:"#57534e",gray500:"#78716c",gray400:"#a8a29e",gray300:"#d6d3d1",gray200:"#e7e5e4",gray100:"#f5f5f4",gray50:"#fafaf9",red900:"#7f1d1d",red800:"#991b1b",red700:"#b91c1c",red600:"#dc2626",red500:"#ef4444",red400:"#f87171",red300:"#fca5a5",red200:"#fecaca",red100:"#fee2e2",red50:"#fef2f2",orange900:"#7c2d12",orange800:"#9a3412",orange700:"#c2410c",orange600:"#ea580c",orange500:"#f97316",orange400:"#fb923c",orange300:"#fdba74",orange200:"#fed7aa",orange100:"#ffedd5",orange50:"#fff7ed",yellow900:"#553B0C",yellow800:"#6F4B08",yellow700:"#8D6300",yellow600:"#BD8A00",yellow500:"#E5B400",yellow400:"#FFC800",yellow300:"#FBDA2B",yellow200:"#FEED72",yellow100:"#FEF8B4",yellow50:"#FEFCE2",green900:"#064e3b",green800:"#065f46",green700:"#047857",green600:"#059669",green500:"#10b981",green400:"#34d399",green300:"#6ee7b7",green200:"#a7f3d0",green100:"#d1fae5",green50:"#ecfdf5",cyan900:"#164e63",cyan800:"#155e75",cyan700:"#0e7490",cyan600:"#0891B2",cyan500:"#06b6d4",cyan400:"#22d3ee",cyan300:"#67e8f9",cyan200:"#a5f3fc",cyan100:"#cffafe",cyan50:"#ecfeff",blue900:"#1e3a8a",blue800:"#1e40af",blue700:"#1d4ed8",blue600:"#2563eb",blue500:"#3b82f6",blue400:"#60a5fa",blue300:"#93c5fd",blue200:"#bfdbfe",blue100:"#dbeafe",blue50:"#eff6ff",purple900:"#4c1d95",purple800:"#5b21b6",purple700:"#6d28d9",purple600:"#7c3aed",purple500:"#8b5cf6",purple400:"#a78bfa",purple300:"#c4b5fd",purple200:"#ddd6fe",purple100:"#ede9fe",purple50:"#f5f3ff",pink900:"#751A5E",pink800:"#8F1972",pink700:"#AF1C8A",pink600:"#D326A8",pink500:"#E845BF",pink400:"#F979D9",pink300:"#FCABE8",pink200:"#FED0F3",pink100:"#FFE8F9",pink50:"#FFF4FC"},zn=[z.brick100,z.brick900],$n=[z.gray200,S.green,S.red,z.gray200],Ue={dark:{1:[500],2:[600,400],3:[600,400,200],4:[600,500,300,100],5:[700,600,400,200,50],6:[600,500,400,300,200,100],7:[600,500,400,300,200,100,50],default:[700,600,500,400,300,200,100,50]},light:{1:[600],2:[700,500],3:[800,600,400],4:[800,600,400,300],5:[800,700,600,500,400],6:[800,700,600,500,400,300],7:[900,800,700,600,500,400,300],default:[900,800,700,600,500,400,300,200]}},T={cyan:"#22D3EE",pink:"#F377EF",purple:"#6528F7",red:"#FB2576",orange:"#FF9300",yellow:"#FBFF00",green:"#06FF00",blue:"#0079FF"},$=[T.cyan,T.pink,T.purple,T.red,T.orange,T.yellow,T.green,T.blue],Xn=[T.cyan,T.green,T.red,T.cyan],X={start:"#84D1FC",positive:"#84FC89",negative:"#FC8497",total:"#84D1FC"},Kn=[X.start,X.positive,X.negative,X.total],qn={transform:"linear",reverse:!1,nice:!0,zero:!1,domainMin:null,domainMax:null,range:null,scheme:null,interpolate:"lab",domainMid:null,symmetric:!1},Jn={size:[4,20],alpha:[.1,1],strokeWidth:[1,4]},Qn={domainMin:null,domainMax:null,nice:!1,reverse:!1},Zn={range:null,domain:null,padding:.1,reverse:!1},Ye={palette:{type:"default"}};function Ge(e,t="light",r){return((r!==void 0?Ue[t][r]:void 0)??Ue[t].default).map(n=>z[`${e}${n}`])}function ea(e){const t=$.indexOf(T[e]);return t<=0?$:[...$.slice(t),...$.slice(0,t)]}function ta(e,t={}){switch(e.type){case"default":return t.hasTouchingGeoms?Ge(Gt,t.colorScheme??"light",t.groupCount):Yt;case"graphy":return e.variant==="waterfall"?Kn:Gn;case"pastel":return e.variant==="waterfall"?$n:Hn;case"neon":return e.variant==="waterfall"?Xn:ea(e.base);case"mono":return Ge(e.base,e.variant??"light",t.groupCount);case"custom":return e.colors}}function ra(e,t){if(!t)return e;const r=[...e];for(const[n,a]of Object.entries(t)){const o=Number(n);if(!Number.isInteger(o)||o<1)continue;const i=o-1;i<r.length&&(r[i]=a)}return r}function na(e,t,r,n){if(!t)return;const a=r?.type==="custom"?n[r.id]:void 0,o={};for(const[i,s]of Object.entries(t)){const l=Number(i);if(!(!Number.isInteger(l)||l<1)){if(s.hex!==void 0){o[l]=s.hex;continue}if(s.id!==void 0){const c=a?.find(f=>f.id===s.id)?.hex;c!==void 0?o[l]=c:e.diagnostics.addWarning({code:"PALETTE_NOT_FOUND",message:`Palette override at slot ${l} with id '${s.id}' did not resolve against the active palette — falling back to palette color.`,context:{requested:s.id,available:a?.map(f=>f.id)??[]},suggestion:"Define the override id in the active custom palette, or use a hex value instead."})}}}return Object.keys(o).length>0?o:void 0}function aa(e,t,r){if(!t)return Ye.palette;if(t.type==="custom"){const n=r[t.id];if(!n)return e.diagnostics.addWarning({code:"PALETTE_NOT_FOUND",message:`Custom palette with id "${t.id}" not found — falling back to the default palette.`,context:{requested:t.id,available:Object.keys(r)},suggestion:"Register the palette in customPalettes, or reference an existing palette id."}),Ye.palette;const a=n.map(o=>o.hex);return{type:"custom",id:t.id,colors:a}}return t}function A(e,t={}){const r=t;return{type:"scale",scaledAesthetic:e,scaleType:"continuous",transform:t.transform,reverse:t.reverse,nice:t.nice,zero:t.zero,clamp:t.clamp,domainMin:t.domainMin??null,domainMax:t.domainMax??null,range:t.range,scheme:r.scheme??null,interpolate:r.interpolate,domainMid:r.domainMid??null,symmetric:r.symmetric}}function K(e,t={}){return{type:"scale",scaledAesthetic:e,scaleType:"datetime",domainMin:t.domainMin??null,domainMax:t.domainMax??null,nice:t.nice,reverse:t.reverse,clamp:t.clamp}}function P(e,t={}){return{type:"scale",scaledAesthetic:e,scaleType:"discrete",range:t.range,domain:t.domain??null,padding:t.padding,reverse:t.reverse}}function U(e,t={}){return{type:"scale",scaledAesthetic:e,scaleType:"identity"}}function q(e,t){return{type:"scale",scaledAesthetic:e,scaleType:"inferred",options:t}}function Ht(e,t={}){return{type:"scale",scaledAesthetic:e,scaleType:"palette",palette:t.palette,overrides:t.overrides}}var oa={labelCrossPosition:.5},ia={kind:"rectangle",zOrder:"foreground"},sa={zOrder:"foreground",fit:"contain"},la={x:8,y:8,unit:"px"},ua={align:"center"},ca={startArrowheadStyle:"none",endArrowheadStyle:"line-arrow"},da={thin:2,medium:4,thick:8},fa=.5,pa={borderWidth:2,shadow:{offsetX:0,offsetY:1.15,blur:1.15,color:"rgba(0, 0, 0, 0.16)"}},ba={small:{arrow:{strokeWidth:2},label:{fontSize:12,fontWeight:500,paddingInline:6,paddingBlock:3,borderWidth:1}},medium:{arrow:{strokeWidth:3},label:{fontSize:16,fontWeight:500,paddingInline:8,paddingBlock:4,borderWidth:1.5}},large:{arrow:{strokeWidth:5},label:{fontSize:20,fontWeight:600,paddingInline:10,paddingBlock:5,borderWidth:2}}};function ya(e){return{type:"styles",...e}}var M=e=>Object.keys(e.children??{}),ga=M(g.dataLabel),ma=M(g.panelBorder),ha=M(g.tooltip),Ea=M(g.source),Aa=M(g.heading),va=M(g.editOutline),Ta=M(g.legendItem),Oa=M(g.annotation),_a={differenceArrow:M(g.annotation.children.differenceArrow),pinnedNumber:M(g.annotation.children.pinnedNumber),comment:M(g.annotation.children.comment)},Ae=(e,t)=>{const r=[],n=new Set,a=o=>{const i=o.select[t];i!==void 0&&!n.has(i)&&(n.add(i),r.push(i));for(const s of Object.values(o.children??{}))a(s)};return a(e),r},Sa=Ae(g.dataLabel,"position"),Ma=Ae(g.headlineItem,"part"),Da=Ae(g.legend,"part"),La=e=>new Set(e.options??[]),Pa=(e,t,r)=>{const n={...e.select};return t.has("layer")&&typeof r?.layer=="string"&&(n.layer=r.layer),t.has("annotation")&&typeof r?.annotation=="string"&&(n.annotation=r.annotation),n},Ra=(e,t)=>{const r={...e.has("where")&&t?.where!==void 0?{where:t.where}:{},...e.has("state")&&t?.state!==void 0?{state:t.state}:{}};return{...typeof t?.id=="string"?{id:t.id}:{},...Object.keys(r).length===0?{}:{when:r}}},zt=e=>{const t=Object.fromEntries(Object.entries(e.children??{}).map(([a,o])=>[a,zt(o)]));if(Object.keys(e.vocabulary).length===0)return t;const r=La(e);return Object.assign((a,o)=>({...Ra(r,o),select:Pa(e,r,o),declarations:a}),t)},ka=Object.fromEntries(Object.entries(g).map(([e,t])=>[e,zt(t)])),$t=["grouped-bars","stacked-bars","lines"],Xt={"grouped-bars":"dodge","stacked-bars":"stack",lines:null},Fa=e=>e==="identity"?"grouped-bars":$t.find(t=>Xt[t]===e)??null,Ia={cartesian:(e={})=>({type:"coord",coordType:"cartesian",params:e}),flip:(e={})=>({type:"coord",coordType:"flip",params:e}),polar:(e={})=>({type:"coord",coordType:"polar",params:e})},Na={x:Object.assign(e=>q("x",e),{continuous:e=>A("x",e),discrete:e=>P("x",e),datetime:e=>K("x",e),log:e=>A("x",{...e,transform:"log"}),sqrt:e=>A("x",{...e,transform:"sqrt"})}),y:Object.assign(e=>q("y",e),{continuous:e=>A("y",e),discrete:e=>P("y",e),datetime:e=>K("y",e),log:e=>A("y",{...e,transform:"log"}),sqrt:e=>A("y",{...e,transform:"sqrt"})}),ySecondary:Object.assign(e=>q("ySecondary",e),{continuous:e=>A("ySecondary",e),discrete:e=>P("ySecondary",e),datetime:e=>K("ySecondary",e),log:e=>A("ySecondary",{...e,transform:"log"}),sqrt:e=>A("ySecondary",{...e,transform:"sqrt"})}),color:{continuous:e=>A("color",e),discrete:e=>P("color",e),palette:e=>Ht("color",e)},size:{continuous:e=>A("size",e),discrete:e=>P("size",e),identity:e=>U("size",e)},alpha:{continuous:e=>A("alpha",e),discrete:e=>P("alpha",e),identity:e=>U("alpha",e)},strokeWidth:{continuous:e=>A("strokeWidth",e),discrete:e=>P("strokeWidth",e),identity:e=>U("strokeWidth",e)},lineType:{discrete:e=>P("lineType",e),identity:e=>U("lineType",e)}},Ca={identity:ja,count:xa,smooth:wa,mean:Va,sum:Ba};function wa(e){return{type:"smooth",method:e.method,order:e.order,bandwidth:e.bandwidth}}function ja(){return{type:"identity"}}function xa(){return{type:"count"}}function Va(){return{type:"mean"}}function Ba(){return{type:"sum"}}var Wa={reshape:Ua,filter:Ya,sort:Ga,aggregate:Ha,constant:za};function Ua(e={}){return{type:"transform",transformType:"reshape",options:e}}function Ya(e){return{type:"transform",transformType:"filter",options:e}}function Ga(e){return{type:"transform",transformType:"sort",options:e}}function Ha(e){return{type:"transform",transformType:"aggregate",options:e}}function za(e){return{type:"transform",transformType:"constant",options:e}}function $a(e){return{type:"config",config:e}}Object.defineProperty(exports,"ANNOTATION_PARTS",{enumerable:!0,get:function(){return _a}});Object.defineProperty(exports,"ANNOTATION_STYLE_KINDS",{enumerable:!0,get:function(){return Oa}});Object.defineProperty(exports,"ARROW_DEFAULTS",{enumerable:!0,get:function(){return ca}});Object.defineProperty(exports,"ARROW_STICKER_DECLARATIONS",{enumerable:!0,get:function(){return pa}});Object.defineProperty(exports,"ARROW_STROKE_WIDTHS_PX",{enumerable:!0,get:function(){return da}});Object.defineProperty(exports,"BORDER_RADIUS_TOKENS",{enumerable:!0,get:function(){return Ee}});Object.defineProperty(exports,"COMBO_BAR_POSITIONS",{enumerable:!0,get:function(){return Xt}});Object.defineProperty(exports,"COMBO_TYPES",{enumerable:!0,get:function(){return $t}});Object.defineProperty(exports,"CONSTANT_VARIABLES",{enumerable:!0,get:function(){return de}});Object.defineProperty(exports,"CONTINUOUS_SCALE_DEFAULTS",{enumerable:!0,get:function(){return qn}});Object.defineProperty(exports,"ChronologicalDateManager",{enumerable:!0,get:function(){return at}});Object.defineProperty(exports,"DATA_LABEL_ROLES",{enumerable:!0,get:function(){return ga}});Object.defineProperty(exports,"DATETIME_SCALE_DEFAULTS",{enumerable:!0,get:function(){return Qn}});Object.defineProperty(exports,"DEFAULT_BAR_BORDER_RADIUS",{enumerable:!0,get:function(){return An}});Object.defineProperty(exports,"DEFAULT_COLOR_PALETTE",{enumerable:!0,get:function(){return Yt}});Object.defineProperty(exports,"DEFAULT_DIMMED_ALPHA",{enumerable:!0,get:function(){return Vt}});Object.defineProperty(exports,"DEFAULT_GEOM_COLOR",{enumerable:!0,get:function(){return En}});Object.defineProperty(exports,"DEFAULT_GRAPH_BACKGROUND",{enumerable:!0,get:function(){return _n}});Object.defineProperty(exports,"DEFAULT_GRAPH_BORDER_WIDTH_PX",{enumerable:!0,get:function(){return Mn}});Object.defineProperty(exports,"DEFAULT_GRAPH_PADDING_EDGES_PX",{enumerable:!0,get:function(){return Ln}});Object.defineProperty(exports,"DEFAULT_GRAPH_PADDING_PX",{enumerable:!0,get:function(){return Dn}});Object.defineProperty(exports,"DEFAULT_HEADLINE_SWATCH_SIZE_PX",{enumerable:!0,get:function(){return On}});Object.defineProperty(exports,"DEFAULT_HOVER_AFFORDANCE_COLOR",{enumerable:!0,get:function(){return Sn}});Object.defineProperty(exports,"DEFAULT_LOCALE",{enumerable:!0,get:function(){return ee}});Object.defineProperty(exports,"DEFAULT_MONO_BASE",{enumerable:!0,get:function(){return Gt}});Object.defineProperty(exports,"DEFAULT_POINT_SIZE_PX",{enumerable:!0,get:function(){return Tn}});Object.defineProperty(exports,"DEFAULT_RESHAPE_VALUE_NAME",{enumerable:!0,get:function(){return Rt}});Object.defineProperty(exports,"DEFAULT_SEQUENTIAL_RAMP",{enumerable:!0,get:function(){return zn}});Object.defineProperty(exports,"DEFAULT_STROKE_WIDTH_PX",{enumerable:!0,get:function(){return vn}});Object.defineProperty(exports,"DIFFERENCE_ARROW_DEFAULTS",{enumerable:!0,get:function(){return oa}});Object.defineProperty(exports,"DIFFERENCE_ARROW_SIZE_DECLARATIONS",{enumerable:!0,get:function(){return ba}});Object.defineProperty(exports,"DISCRETE_SCALE_DEFAULTS",{enumerable:!0,get:function(){return Zn}});Object.defineProperty(exports,"DataCompiler",{enumerable:!0,get:function(){return en}});Object.defineProperty(exports,"Dataset",{enumerable:!0,get:function(){return Z}});Object.defineProperty(exports,"EDIT_OUTLINE_PARTS",{enumerable:!0,get:function(){return va}});Object.defineProperty(exports,"GROUP_VARIABLES",{enumerable:!0,get:function(){return Xe}});Object.defineProperty(exports,"HEADING_PARTS",{enumerable:!0,get:function(){return Aa}});Object.defineProperty(exports,"HEADLINE_ITEM_PARTS",{enumerable:!0,get:function(){return Ma}});Object.defineProperty(exports,"IMAGE_ANNOTATION_DEFAULTS",{enumerable:!0,get:function(){return sa}});Object.defineProperty(exports,"IS_DEV",{enumerable:!0,get:function(){return N}});Object.defineProperty(exports,"InternalError",{enumerable:!0,get:function(){return v}});Object.defineProperty(exports,"LAYER_LABEL_VARIABLES",{enumerable:!0,get:function(){return Qt}});Object.defineProperty(exports,"LEGEND_ITEM_PARTS",{enumerable:!0,get:function(){return Ta}});Object.defineProperty(exports,"LEGEND_PARTS",{enumerable:!0,get:function(){return Da}});Object.defineProperty(exports,"LINE_TYPES",{enumerable:!0,get:function(){return ye}});Object.defineProperty(exports,"MONO_BASES",{enumerable:!0,get:function(){return Un}});Object.defineProperty(exports,"NEON_BASES",{enumerable:!0,get:function(){return Yn}});Object.defineProperty(exports,"NON_POSITION_RANGE_DEFAULTS",{enumerable:!0,get:function(){return Jn}});Object.defineProperty(exports,"PANEL_BORDER_EDGES",{enumerable:!0,get:function(){return ma}});Object.defineProperty(exports,"POSITION_ADJUSTMENTS",{enumerable:!0,get:function(){return ur}});Object.defineProperty(exports,"POSITION_VARIABLES",{enumerable:!0,get:function(){return Ke}});Object.defineProperty(exports,"RESOLVED_DATA_LABEL_POSITIONS",{enumerable:!0,get:function(){return Sa}});Object.defineProperty(exports,"RULE_VARIABLES",{enumerable:!0,get:function(){return Qe}});Object.defineProperty(exports,"Registry",{enumerable:!0,get:function(){return It}});Object.defineProperty(exports,"SELECTION_PADDING_DEFAULT",{enumerable:!0,get:function(){return la}});Object.defineProperty(exports,"SHAPE_DEFAULTS",{enumerable:!0,get:function(){return ia}});Object.defineProperty(exports,"SOURCE_PARTS",{enumerable:!0,get:function(){return Ea}});Object.defineProperty(exports,"STACK_VARIABLES",{enumerable:!0,get:function(){return qe}});Object.defineProperty(exports,"STAT_VARIABLES",{enumerable:!0,get:function(){return fe}});Object.defineProperty(exports,"STYLE_DOMAINS",{enumerable:!0,get:function(){return hn}});Object.defineProperty(exports,"STYLE_PROPERTY_NAMES",{enumerable:!0,get:function(){return bn}});Object.defineProperty(exports,"STYLE_SELECT_KEYS",{enumerable:!0,get:function(){return xt}});Object.defineProperty(exports,"STYLE_STATES",{enumerable:!0,get:function(){return pn}});Object.defineProperty(exports,"STYLE_TARGETS",{enumerable:!0,get:function(){return g}});Object.defineProperty(exports,"SUFFIX_MULTIPLIERS",{enumerable:!0,get:function(){return ot}});Object.defineProperty(exports,"Stage",{enumerable:!0,get:function(){return Dt}});Object.defineProperty(exports,"TEXT_ANNOTATION_DEFAULTS",{enumerable:!0,get:function(){return ua}});Object.defineProperty(exports,"TEXT_ANNOTATION_FADE_ALPHA",{enumerable:!0,get:function(){return fa}});Object.defineProperty(exports,"TOOLTIP_PARTS",{enumerable:!0,get:function(){return ha}});Object.defineProperty(exports,"TransformRegistry",{enumerable:!0,get:function(){return Wn}});Object.defineProperty(exports,"UserInputError",{enumerable:!0,get:function(){return G}});Object.defineProperty(exports,"VISUAL_VARIABLES",{enumerable:!0,get:function(){return Je}});Object.defineProperty(exports,"VizError",{enumerable:!0,get:function(){return ge}});Object.defineProperty(exports,"applyOverrides",{enumerable:!0,get:function(){return ra}});Object.defineProperty(exports,"areDataValuesEqual",{enumerable:!0,get:function(){return Wr}});Object.defineProperty(exports,"areMappingsEquivalent",{enumerable:!0,get:function(){return lr}});Object.defineProperty(exports,"buildLayerSpec",{enumerable:!0,get:function(){return w}});Object.defineProperty(exports,"config",{enumerable:!0,get:function(){return $a}});Object.defineProperty(exports,"continuous",{enumerable:!0,get:function(){return A}});Object.defineProperty(exports,"coord",{enumerable:!0,get:function(){return Ia}});Object.defineProperty(exports,"createPerKeyMemo",{enumerable:!0,get:function(){return St}});Object.defineProperty(exports,"createSingleSlotMemo",{enumerable:!0,get:function(){return Vr}});Object.defineProperty(exports,"datetime",{enumerable:!0,get:function(){return K}});Object.defineProperty(exports,"discrete",{enumerable:!0,get:function(){return P}});Object.defineProperty(exports,"findStyleTarget",{enumerable:!0,get:function(){return Nn}});Object.defineProperty(exports,"geom",{enumerable:!0,get:function(){return on}});Object.defineProperty(exports,"getStableKey",{enumerable:!0,get:function(){return Q}});Object.defineProperty(exports,"identity",{enumerable:!0,get:function(){return U}});Object.defineProperty(exports,"inferXVariable",{enumerable:!0,get:function(){return or}});Object.defineProperty(exports,"inferred",{enumerable:!0,get:function(){return q}});Object.defineProperty(exports,"isBorderRadiusToken",{enumerable:!0,get:function(){return Ct}});Object.defineProperty(exports,"isCategoricalValueFormat",{enumerable:!0,get:function(){return tt}});Object.defineProperty(exports,"isCompilerCachingEnabled",{enumerable:!0,get:function(){return xr}});Object.defineProperty(exports,"isCurrencyValueFormat",{enumerable:!0,get:function(){return dr}});Object.defineProperty(exports,"isDateWithoutYearValueFormat",{enumerable:!0,get:function(){return fr}});Object.defineProperty(exports,"isDefined",{enumerable:!0,get:function(){return pe}});Object.defineProperty(exports,"isInternalVariable",{enumerable:!0,get:function(){return tr}});Object.defineProperty(exports,"isLightDarkColor",{enumerable:!0,get:function(){return ne}});Object.defineProperty(exports,"isLineType",{enumerable:!0,get:function(){return et}});Object.defineProperty(exports,"isLookupValueFormat",{enumerable:!0,get:function(){return me}});Object.defineProperty(exports,"isNonEmptyArray",{enumerable:!0,get:function(){return nr}});Object.defineProperty(exports,"isNumericDataValue",{enumerable:!0,get:function(){return Jt}});Object.defineProperty(exports,"isNumericValueFormat",{enumerable:!0,get:function(){return rt}});Object.defineProperty(exports,"isPlainObject",{enumerable:!0,get:function(){return ar}});Object.defineProperty(exports,"isStackedPosition",{enumerable:!0,get:function(){return cr}});Object.defineProperty(exports,"isStatVariable",{enumerable:!0,get:function(){return rr}});Object.defineProperty(exports,"isStrictCategoricalDataValue",{enumerable:!0,get:function(){return qt}});Object.defineProperty(exports,"isStrictNumericDataValue",{enumerable:!0,get:function(){return ze}});Object.defineProperty(exports,"isStrictTemporalDataValue",{enumerable:!0,get:function(){return J}});Object.defineProperty(exports,"isStyleTokenRef",{enumerable:!0,get:function(){return wt}});Object.defineProperty(exports,"isTemporalDataValue",{enumerable:!0,get:function(){return Kt}});Object.defineProperty(exports,"isTemporalValueFormat",{enumerable:!0,get:function(){return W}});Object.defineProperty(exports,"isUsableTokenValue",{enumerable:!0,get:function(){return jt}});Object.defineProperty(exports,"palette",{enumerable:!0,get:function(){return Ht}});Object.defineProperty(exports,"parseAddressingValue",{enumerable:!0,get:function(){return _t}});Object.defineProperty(exports,"parseDataset",{enumerable:!0,get:function(){return Nt}});Object.defineProperty(exports,"prefixInternalVariable",{enumerable:!0,get:function(){return p}});Object.defineProperty(exports,"readComboTypeOfBarPosition",{enumerable:!0,get:function(){return Fa}});Object.defineProperty(exports,"readConstantValue",{enumerable:!0,get:function(){return Ze}});Object.defineProperty(exports,"readFoldKeepVariables",{enumerable:!0,get:function(){return ir}});Object.defineProperty(exports,"readISOInstant",{enumerable:!0,get:function(){return pt}});Object.defineProperty(exports,"readMainAxisVariable",{enumerable:!0,get:function(){return sr}});Object.defineProperty(exports,"readVariableName",{enumerable:!0,get:function(){return be}});Object.defineProperty(exports,"resolveColorScheme",{enumerable:!0,get:function(){return ce}});Object.defineProperty(exports,"resolvePaletteConfig",{enumerable:!0,get:function(){return aa}});Object.defineProperty(exports,"resolvePaletteOverrides",{enumerable:!0,get:function(){return na}});Object.defineProperty(exports,"resolvePaletteRange",{enumerable:!0,get:function(){return ta}});Object.defineProperty(exports,"resolveScaledAestheticVariable",{enumerable:!0,get:function(){return er}});Object.defineProperty(exports,"scale",{enumerable:!0,get:function(){return Na}});Object.defineProperty(exports,"setCompilerCachingEnabled",{enumerable:!0,get:function(){return jr}});Object.defineProperty(exports,"stat",{enumerable:!0,get:function(){return Ca}});Object.defineProperty(exports,"style",{enumerable:!0,get:function(){return ka}});Object.defineProperty(exports,"styles",{enumerable:!0,get:function(){return ya}});Object.defineProperty(exports,"sumMemoStats",{enumerable:!0,get:function(){return Br}});Object.defineProperty(exports,"toExplicitValueFormat",{enumerable:!0,get:function(){return pr}});Object.defineProperty(exports,"token",{enumerable:!0,get:function(){return u}});Object.defineProperty(exports,"transform",{enumerable:!0,get:function(){return Wa}});Object.defineProperty(exports,"walkStyleTargets",{enumerable:!0,get:function(){return In}});
|