@graphysdk/viz-engine 1.9.0-beta.1793700147232 → 1.9.0-beta.1793702966406
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/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Tl=Object.create,ra=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,Ll=Object.getOwnPropertyNames,El=Object.getPrototypeOf,Rl=Object.prototype.hasOwnProperty,Cl=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=Ll(t),i=0,o=a.length,s;i<o;i++)s=a[i],!Rl.call(e,s)&&s!==r&&ra(e,s,{get:(c=>t[c]).bind(null,s),enumerable:!(n=Il(t,s))||n.enumerable});return e},wl=(e,t,r)=>(r=e!=null?Tl(El(e)):{},Cl(t||!e||!e.__esModule?ra(r,"default",{value:e,enumerable:!0}):r,e));const l=require("./spec-builder-BjqUBbHG.cjs"),d=require("./compiler-BJvJ5W_E.cjs"),re=require("./graph.constants-DGzvPldq.cjs");let T=require("lodash-es"),xt=require("humanize-duration");xt=wl(xt,1);let w=require("d3-shape"),Pl=require("d3-delaunay");typeof window<"u"&&(window.__GRAPHY_SDK__??={},window.__GRAPHY_SDK__.vizEngine="1.9.0-beta.1793700147232");function Y(e,t){return e.geom===t}var ct="…",na=(e,t,r)=>{if(t<=0||e.length===0)return"";if(r(e)<=t)return e;if(r(ct)>t)return"";let n=0,a=e.length-1,i=0;for(;n<=a;){const o=n+a>>>1;r(e.slice(0,o)+ct)<=t?(i=o,n=o+1):a=o-1}return e.slice(0,i)+ct};var R={timeZone:"UTC",calendar:"gregory"},E=e=>t=>{if(!l.isStrictTemporalDataValue(t))return"–";try{return e(t)}catch{return"n/a"}},z=e=>t=>l.isStrictNumericDataValue(t)?e(t):"–",Ft=e=>t=>l.isStrictCategoricalDataValue(t)?t:"–",Se=new Map,be=new Map,aa=256,Ml=new Set(["integer","group","decimal","fraction"]),ne=(e,t)=>{const r=oa(e,t),n=Se.get(r);if(n!==void 0)return n;Se.size>=aa&&Se.clear();const a=new Intl.NumberFormat(Ht(e),t);return Se.set(r,a),a},C=(e,t)=>{const r=oa(e,t),n=be.get(r);if(n!==void 0)return n;be.size>=aa&&be.clear();const a=new Intl.DateTimeFormat(Ht(e),t);return be.set(r,a),a},Gt=(e,t,r)=>{if(r==="")return e.format(t);const n=e.formatToParts(t),a=n.map(i=>Ml.has(i.type)).lastIndexOf(!0);return n.map((i,o)=>o===a?`${i.value}${r}`:i.value).join("")},ia=e=>{try{return Intl.NumberFormat.supportedLocalesOf(e.trim().replaceAll("_","-"))[0]}catch{return}},Ht=e=>ia(e)??"en-GB",oa=(e,t)=>`${e}\0${JSON.stringify(t)}`,Ol=xt.default.humanizer({language:"en",spacer:"",delimiter:" ",languages:{en:{y:()=>"y",mo:()=>"mo",w:()=>"w",d:()=>"d",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"}}}),He={signDisplay:"negative"},sa=({valueFormat:e,locale:t,numberFormat:r,intlOptions:n})=>z(a=>{const i=typeof r.decimals=="number"?r.decimals:2,o=zt(a,i),{base:s,suffix:c}=$e(a,r.abbreviation);return Gt(ne(t,{...o,...He,...l.isCurrencyValueFormat(e)?{style:"currency",currencyDisplay:"narrowSymbol",currency:e.iso}:{},...n}),s,c)}),la=({locale:e,numberFormat:t,intlOptions:r})=>z(n=>{const{base:a,suffix:i}=$e(n,t.abbreviation);return Gt(ne(e,{...zt(a,t.decimals),...He,...r}),a,i)}),$t=e=>z(t=>{const r=Ol(Math.abs(t));return t<0?`-${r}`:r}),ca=({locale:e,intlOptions:t})=>{const r=ne(e,{maximumFractionDigits:0,...He,...t});return z(n=>r.format(n))},ua=({locale:e,numberFormat:t,intlOptions:r})=>z(n=>ne(e,{...zt(n,t.decimals),...He,...r,style:"percent"}).format(n)),$e=(e,t="none")=>{switch(t){case"none":return{base:e,suffix:""};case"auto":{const r=Dl(e);return $e(e,r)}default:return{base:e/l.SUFFIX_MULTIPLIERS[t],suffix:t}}},zt=(e,t)=>{if(typeof t=="number")return{minimumFractionDigits:t,maximumFractionDigits:t};const r=Math.ceil(Math.log10(Math.abs(e))),n=r>=3?0:r===2?1:2;return{minimumFractionDigits:t==="auto"?0:n,maximumFractionDigits:n}},Dl=e=>{const t=Math.abs(e);return t>=l.SUFFIX_MULTIPLIERS.b?"b":t>=l.SUFFIX_MULTIPLIERS.m?"m":t>=l.SUFFIX_MULTIPLIERS.k?"k":"none"},_l=1440*60*1e3,kl=({locale:e,intlOptions:t})=>{const r=C(e,{dateStyle:"medium",...R,...t});return E(n=>r.format(n))},Vl=({locale:e,intlOptions:t})=>{const r=C(e,{dateStyle:"medium",timeStyle:"medium",...R,...t});return E(n=>Nl(r.formatToParts(n)))},da=({locale:e,intlOptions:t})=>{const r=C(e,{day:"numeric",month:"long",...R,...t});return E(n=>r.format(n))},ma=({locale:e,intlOptions:t})=>{const r=C(e,{month:"long",...R,...t});return E(n=>r.format(n))},Kt=({locale:e,intlOptions:t})=>{const r=C(e,{month:"short",year:"numeric",...R,...t});return E(n=>r.format(n))},Ut=e=>E(t=>`Q${Math.floor(t.getUTCMonth()/3)+1} ${t.getUTCFullYear()}`),ha=({locale:e,intlOptions:t})=>{const r=C(e,{day:"numeric",month:"long",...R,...t,year:void 0});return E(n=>r.formatRange(n,va(n,6)))},pa=({locale:e,intlOptions:t})=>{const r=C(e,{dateStyle:"medium",...R,...t});return E(n=>r.formatRange(n,va(n,6)))},Yt=({locale:e,intlOptions:t})=>{const r=C(e,{year:"numeric",...R,...t});return E(n=>r.format(n))},fa=({locale:e,intlOptions:t})=>{const r=C(e,{timeStyle:"short",...R,...t});return E(n=>r.format(n))},va=(e,t)=>new Date(e.getTime()+t*_l),Nl=e=>{const t=e.findIndex(n=>n.type==="hour")-1,r=e[t];return e.map((n,a)=>a===t&&r?.type==="literal"&&r.value===", "?" • ":n.value).join("")},_r=1e3,Bl=({valueFormat:e,locale:t,tickValues:r,intlOptions:n})=>z(a=>{const i={...qt(a,r),...l.isCurrencyValueFormat(e)?{style:"currency",currencyDisplay:"narrowSymbol",currency:e.iso}:{},...n};return Wt(a,t,i)}),Fl=({locale:e,tickValues:t,intlOptions:r})=>z(n=>{const a={...qt(n,t),...r};return Wt(n,e,a)}),Gl=({locale:e,tickValues:t,intlOptions:r})=>z(n=>{const a={...qt(n,t),...r,style:"percent"};return Wt(n,e,a)}),Wt=(e,t,r)=>{const{base:n,suffix:a}=$e(e,Hl(e,r));return Gt(ne(t,r),n,a)},Hl=(e,t)=>{const r=ne("en-US",{...t,notation:"compact"}).formatToParts(e).find(n=>n.type==="compact")?.value.toLowerCase();return l.SUFFIXES.find(n=>n===r)??"none"},ga=e=>Math.abs(e)>_r?ga(e/_r):Number.isInteger(e),$l=e=>{if(e.length<2)return!1;const[t,r]=e;return typeof t!="number"||typeof r!="number"?!1:Math.abs(r-t)<1},qt=(e,t)=>ga(e)?{minimumFractionDigits:0,maximumFractionDigits:0}:$l(t)?{minimumFractionDigits:0,maximumFractionDigits:4}:{minimumFractionDigits:0,maximumFractionDigits:Math.max(1,zl(t))},zl=e=>{const t=e.filter(u=>typeof u=="number"&&Number.isFinite(u)),r=t[0],n=t[1];if(r===void 0||n===void 0)return 0;const a=Math.abs(n-r);if(a===0)return 0;let i=0;for(const u of t)i=Math.max(i,Math.abs(u));if(i===0)return 0;const o=Math.floor(Math.log10(i)/3),s=a/10**(Math.max(0,o)*3);if(s>=1)return 0;const c=Math.ceil(-Math.log10(s)-1e-9);return Math.min(4,Math.max(0,c))},Kl=({locale:e,intlOptions:t})=>{const r=C(e,{day:"numeric",month:"short",...R,...t});return E(n=>r.format(n))},Ul=({locale:e,intlOptions:t})=>{const r=C(e,{month:"short",...R,...t});return E(n=>r.format(n))},Yl=({locale:e,intlOptions:t})=>{const r=C(e,{day:"numeric",month:"short",...R,...t});return E(n=>r.format(n))},Wl=({locale:e,intlOptions:t,tickValues:r})=>{const n=C(e,{...Xl(r),...R,...t});return E(a=>n.format(a))},ql=({locale:e,intlOptions:t})=>{const r=C(e,{timeStyle:"short",...R,...t});return E(n=>r.format(n))},Xl=e=>{const t=e.filter(r=>r instanceof Date&&!Number.isNaN(r.getTime()));return t.length===0?{day:"numeric",month:"short"}:jl(t).size>1?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{timeStyle:"short"}},jl=e=>{const t=new Set;for(const r of e)t.add(`${r.getUTCFullYear()}-${r.getUTCMonth()}-${r.getUTCDate()}`);return t},Xt=e=>{const{valueFormat:t}=e;switch(t.type){case"currency":return Bl(e);case"date":return Kl(e);case"datetime":return Wl(e);case"dayMonth":case"weeklyDateRange":case"weeklyDateRangeWithYear":return Yl(e);case"decimal":case"integer":return Fl(e);case"duration":return $t(e);case"month":return Ul(e);case"monthYear":return Kt(e);case"percentage":return Gl(e);case"quarter":return Ut(e);case"text":return Ft(e);case"time":return ql(e);case"year":return Yt(e);case"lookup":return Xt({...e,valueFormat:t.fallback});default:throw new l.InternalError({message:`Unhandled value format: ${t.type}`})}},Zl=.9,Jl=1/3,Ql=1/4,ec=e=>e.formattedAxis.position==="top"||e.formattedAxis.position==="bottom"?tc(e):rc(e),tc=({formattedAxis:e,bandwidthPx:t,panelRect:r,measureLabel:n})=>{const{widths:a,maxWidth:i,maxHeight:o}=ya(e.ticks,n),s=nc(e.ticks,r.width),c=s*Zl;if(i<=c)return{...e,labelRotation:0,labelMaxWidthPx:null};if(s>=50){const m=Tt(c);return{...e,ticks:At(e.ticks,a,m,n),labelRotation:0,labelMaxWidthPx:m}}if(o+8>t)return{...e,ticks:[],labelRotation:0,labelMaxWidthPx:null};const u=Tt(r.height*Jl);return{...e,ticks:At(e.ticks,a,u,n),labelRotation:-90,labelMaxWidthPx:u}},rc=({formattedAxis:e,bandwidthPx:t,panelRect:r,measureLabel:n})=>{const{widths:a,maxWidth:i,maxHeight:o}=ya(e.ticks,n);if(o>t)return{...e,ticks:[],labelRotation:0,labelMaxWidthPx:null};const s=Tt(r.width*Ql);return i<=s?{...e,labelRotation:0,labelMaxWidthPx:null}:{...e,ticks:At(e.ticks,a,s,n),labelRotation:0,labelMaxWidthPx:s}},nc=(e,t)=>{const r=e[0],n=e[1];return r===void 0||n===void 0?t:Math.abs(n.position-r.position)*t},ya=(e,t)=>{const r=[];let n=0,a=0;for(const i of e){const{width:o,height:s}=t(i.formattedLabel);r.push(o),o>n&&(n=o),s>a&&(a=s)}return{widths:r,maxWidth:n,maxHeight:a}},At=(e,t,r,n)=>{const a=i=>n(i).width;return e.map((i,o)=>(t[o]??0)<=r?i:{...i,formattedLabel:na(i.formattedLabel,r,a)})},Tt=e=>Math.max(0,Math.floor(e)),ac=(e,t,r,n,a)=>{if(e===0)return!0;const i=r==="top"||r==="bottom",o=i?60:40;let s=n-(e-1)*o;for(let c=0;c<e;c+=1){const{width:u,height:m}=a(t(c));if(s-=i?u:m,s<0)return!1}return!0},ic=(e,t,r,n,a)=>{if(e.length<2)return!0;const i=r==="top"||r==="bottom",o=c=>{const{width:u,height:m}=a(t(c));return(i?u:m)/2};let s=o(0);for(let c=1;c<e.length;c+=1){const u=e[c-1],m=e[c];if(u===void 0||m===void 0)continue;const h=o(c);if((m.position-u.position)*n<s+h+8)return!1;s=h}return!0},oc={ticks:[],labelAt:()=>""},sc=({axis:e,availableSpacePx:t,measureLabel:r,resolveFormatter:n})=>{const{tickCandidates:a,position:i}=e;if(a.length===0)return[];const o=new Map,s=f=>{const v=o.get(f);if(v)return v;const g=a[f],b=g?cc(g.ticks,n(g)):oc;return o.set(f,b),b},c=f=>{const{ticks:v,labelAt:g}=s(f);return a[f]?.source==="generated"?ac(v.length,g,i,t,r):ic(v,g,i,t,r)};let u=0,m=a.length-1,h=-1;for(;u<=m;){const f=u+m>>>1;c(f)?(h=f,u=f+1):m=f-1}const p=lc(h,s);return uc(s(p))},lc=(e,t)=>{const r=e>=0?e:0;for(let n=r;n>=0;n-=1){const{ticks:a,labelAt:i}=t(n);if(dc(a,i))return n}return 0},cc=(e,t)=>{const r=new Array(e.length);return{ticks:e,labelAt:n=>{const a=r[n];if(a!==void 0)return a;const i=t(e[n]?.value??null);return r[n]=i,i}}},uc=({ticks:e,labelAt:t})=>e.map((r,n)=>({...r,formattedLabel:t(n)})),dc=(e,t)=>{const r=new Set;for(let n=0;n<e.length;n+=1){const a=t(n);if(r.has(a))return!1;r.add(a)}return!0};function jt(e,t){return e.axes.find(r=>r.scaledAesthetic===t)??null}function Zt(e,t){return e.categorySpan?.layerIds.includes(t)?e.categorySpan.valueFormat:e.valueFormat}function mc(e,t){return e.legends.drawn.find(r=>r.aesthetics.includes(t))??null}var hc=e=>{const t=I({...e,valueFormat:e.valueFormat.fallback}),r={};for(const[a,i]of Object.entries(e.valueFormat.cases))r[a]=I({...e,valueFormat:i});const n=e.valueFormat.byVariable;return(a,i)=>{if(i===void 0||i[n]===void 0)return t(a);const o=l.getStableKey(i[n]),s=r[o];return s!==void 0?s(a,i):t(a)}},I=e=>{switch(e.valueFormat.type){case"currency":return sa(e);case"date":return kl(e);case"datetime":return Vl(e);case"dayMonth":return da(e);case"decimal":return la(e);case"duration":return $t(e);case"integer":return ca(e);case"month":return ma(e);case"monthYear":return Kt(e);case"percentage":return ua(e);case"quarter":return Ut(e);case"text":return Ft(e);case"weeklyDateRange":return ha(e);case"weeklyDateRangeWithYear":return pa(e);case"year":return Yt(e);case"time":return fa(e);case"lookup":return hc({...e,valueFormat:e.valueFormat});default:{const t=e.valueFormat;throw new l.InternalError({message:`Unhandled value format: ${t.type}`})}}};function Jt({layer:e,numberFormat:t,locale:r}){return I({valueFormat:d.getLayerYValueFormat(e),locale:r,numberFormat:t})}var pc=(e,t)=>{const r=l.readVariableName(t.x);return r!==null&&r!==l.CONSTANT_VARIABLES.x?{read:d.createXValueReader(e,t),variable:r}:{read:d.getGroup,variable:l.GROUP_VARIABLES.group}},Sa=({layer:e,coordSystem:t,axes:r,numberFormat:n,panelRect:a,measureDataLabel:i,readers:o,formattingLocale:s,percentageValueStrategy:c})=>{const u=Jt({layer:e,numberFormat:n,locale:s}),m=t.type==="cartesian"&&t.mainAxis==="y";return{layer:e,coordSystem:t,panelRect:a,measureDataLabel:i,styleReaders:o.geom(e),formatLabel:Sc({layer:e,numberFormat:n,axes:r,locale:s,absoluteFormatter:u,percentageValueStrategy:c,flipped:m}),formatAbsolute:u,formatCategory:fc({layer:e,numberFormat:n,locale:s})}},fc=({layer:e,numberFormat:t,locale:r})=>{const{read:n,variable:a}=pc(e.data,e.mapping),i=I({valueFormat:e.data.hasVariable(a)?e.data.getValueFormat(a):{type:"text"},locale:r,numberFormat:t});return o=>{const s=n(o);return s===null?null:i(s,o)}},vc=(e,t,r)=>{switch(t){case"stack":return gc(e);case"fill":return yc(e,r);case"absoluteGrandTotal":return()=>e.summary.absoluteGrandTotal??null;case"none":return()=>null}},gc=e=>{const t=l.readVariableName(e.mapping.x);let r=null,n=!1;return a=>{const i=e.summary.stackTotals;if(i===void 0||i.length===0||t===null)return null;if(!n){r=new Map;for(const c of i)r.set(c.xKey,c);n=!0}const o=a[t];if(o==null)return null;const s=r?.get(d.getObservationXKey(a,t));return s===void 0?null:s.total}},yc=(e,t)=>{const r=t?l.getXMin:l.getYMin,n=t?l.getXMax:l.getYMax,a=d.createSegmentYReader(e);return i=>{const o=r(i),s=n(i);if(!l.isStrictNumericDataValue(o)||!l.isStrictNumericDataValue(s))return null;const c=s-o;if(c===0)return null;const u=a(i);return l.isStrictNumericDataValue(u)?u/c:null}},Sc=({layer:e,numberFormat:t,axes:r,locale:n,absoluteFormatter:a,percentageValueStrategy:i,flipped:o})=>{const s=d.createRawValueReader(e.data,e.dataLabels.labelSource),c=vc(e,i,o),u=bc({layer:e,numberFormat:t,axes:r,locale:n,absoluteFormatter:a}),m=I({valueFormat:{type:"percentage"},locale:n,numberFormat:t}),h=e.dataLabels.format==="percentage"&&ba(e);return p=>{const f=s(p);if(f===null)return"";if(!h||!l.isStrictNumericDataValue(f))return u(f,p);const v=c(p);return v===null||v===0?u(f,p):m(f/v)}},bc=({layer:e,numberFormat:t,axes:r,locale:n,absoluteFormatter:a})=>{const i=e.dataLabels.labelSource,o=l.readVariableName(i);if(o!==null){if(ba(e))return a;const s=xc(e,r,t,n,o);if(s!==null)return s}return I({valueFormat:Ac(e.data,i),locale:n,numberFormat:t})},ba=e=>{const t=l.readVariableName(e.dataLabels.labelSource);return t===null?!1:t===l.readVariableName(d.resolveSegmentYSource(e.position,e.mapping))},xc=(e,t,r,n,a)=>{const i=l.readVariableName(e.mapping.x);if(i===null||i!==a)return null;const o=t.find(s=>s.scaledAesthetic==="x");return o===void 0?null:I({valueFormat:Zt(o,e.id),locale:n,numberFormat:r})},Ac=(e,t)=>{const r=l.readConstantValue(t);if(r!==void 0)return l.isNumericDataValue(r)?{type:"decimal"}:l.isTemporalDataValue(r)?{type:"date"}:{type:"text"};const n=l.readVariableName(t);return n===null||!e.hasVariable(n)?{type:"text"}:e.getValueFormat(n)},Tc={cartesian:["cartesian","flip"],polar:["polar"]},Ic=null;function xa(e=[]){const t=Lc(e),r=(n,a)=>{if(!t.has(n))return null;const i=t.get(n);return i.getDataLabelPlacements===void 0||!Tc[a].some(o=>i.dataLabelCoordTypes.includes(o))?null:{place:i.getDataLabelPlacements.bind(i),getPercentageValueStrategy:o=>i.resolvePercentageValueStrategy?.(o,a)??"none"}};return{resolve:r,hasCapability:(n,a)=>r(n,a)!==null,hasPercentageFormat:(n,a)=>(r(n.geom,a)?.getPercentageValueStrategy(n)??"none")!=="none"}}function Qt(){return Ic??=xa()}function Lc(e){const t=new l.GeomRegistry;for(const r of e){const n=l.resolveDefinition(r);n instanceof l.Geom&&t.register(n.type,n)}return t}function*Ec({layers:e,coordSystem:t,axes:r,numberFormat:n,panelRect:a,measureDataLabel:i,readers:o,locale:s,resolvePlacement:c=Qt()}){if(!(t.type!=="cartesian"||a.width<=0||a.height<=0))for(const u of e){if(!u.dataLabels.showDataLabels&&!u.dataLabels.showStackTotals)continue;const m=c.resolve(u.geom,"cartesian");if(m===null)continue;const h=Sa({layer:u,coordSystem:t,axes:r,numberFormat:n,panelRect:a,measureDataLabel:i,readers:o,formattingLocale:s,percentageValueStrategy:m.getPercentageValueStrategy(u)});for(const p of m.place(h).labels)yield{x:a.x+p.x-p.width/2,y:a.y+p.y-p.height/2,width:p.width,height:p.height}}}var ut={abbreviation:"none",decimals:"auto"},Aa=({locale:e,kind:t,startValue:r,endValue:n,valueFormat:a})=>{if(r===null||n===null)return"n/a";switch(t){case"absoluteDifference":{const i=n-r,o=I({valueFormat:a,locale:e,numberFormat:ut,intlOptions:{signDisplay:"always"}})(i);return kr(o)?"0":o}case"relativeDifference":{const i=n-r;if(i===0)return"0%";const o=i/Math.abs(r);if(o===Number.POSITIVE_INFINITY)return"∞";if(o===Number.NEGATIVE_INFINITY)return"-∞";const s=I({valueFormat:{type:"percentage"},locale:e,numberFormat:ut,intlOptions:{signDisplay:"always"}})(o);return kr(s)?"0%":s}case"proportion":{if(n-r===0)return"=";const i=n/r;return i===Number.POSITIVE_INFINITY?"∞":i===Number.NEGATIVE_INFINITY?"-∞":`${I({valueFormat:{type:"decimal"},locale:e,numberFormat:ut,intlOptions:{maximumFractionDigits:1}})(i)}x`}}},kr=e=>{const t=e.replace(/[^\d.]/g,"");return t===""||t==="."?!1:Number(t)===0},Rc=2,Cc=6,wc=6,Pc=15,Mc=15,Oc=2.5,Dc=.5,_c=.25,Ta=e=>{const t=e-Rc,r=1+Dc*t,n=1+_c*t;return{arrowStartGap:Cc*r,arrowEndGap:wc*r,offsetFromHigherObservation:Pc*n,arrowheadSize:Oc*e,curveRadius:Mc*n,strokeWidth:e}},kc=(e,t,r,n)=>{const a=n.offsetFromHigherObservation+n.arrowheadSize+n.arrowEndGap;return e?Math.max(t.x,r.x)+a:Math.min(t.y,r.y)-a},Vc=(e,t,r,{arrowStartGap:n,arrowEndGap:a,curveRadius:i})=>{const o={x:e.x,y:e.y-n},s={x:e.x,y:r},c={x:t.x,y:r},u={x:t.x,y:t.y-a},m=t.x>e.x?1:-1;return`
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Tl=Object.create,ra=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,Ll=Object.getOwnPropertyNames,El=Object.getPrototypeOf,Rl=Object.prototype.hasOwnProperty,Cl=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=Ll(t),i=0,o=a.length,s;i<o;i++)s=a[i],!Rl.call(e,s)&&s!==r&&ra(e,s,{get:(c=>t[c]).bind(null,s),enumerable:!(n=Il(t,s))||n.enumerable});return e},wl=(e,t,r)=>(r=e!=null?Tl(El(e)):{},Cl(t||!e||!e.__esModule?ra(r,"default",{value:e,enumerable:!0}):r,e));const l=require("./spec-builder-BjqUBbHG.cjs"),d=require("./compiler-BJvJ5W_E.cjs"),re=require("./graph.constants-DGzvPldq.cjs");let T=require("lodash-es"),xt=require("humanize-duration");xt=wl(xt,1);let w=require("d3-shape"),Pl=require("d3-delaunay");typeof window<"u"&&(window.__GRAPHY_SDK__??={},window.__GRAPHY_SDK__.vizEngine="1.9.0-beta.1793702966406");function Y(e,t){return e.geom===t}var ct="…",na=(e,t,r)=>{if(t<=0||e.length===0)return"";if(r(e)<=t)return e;if(r(ct)>t)return"";let n=0,a=e.length-1,i=0;for(;n<=a;){const o=n+a>>>1;r(e.slice(0,o)+ct)<=t?(i=o,n=o+1):a=o-1}return e.slice(0,i)+ct};var R={timeZone:"UTC",calendar:"gregory"},E=e=>t=>{if(!l.isStrictTemporalDataValue(t))return"–";try{return e(t)}catch{return"n/a"}},z=e=>t=>l.isStrictNumericDataValue(t)?e(t):"–",Ft=e=>t=>l.isStrictCategoricalDataValue(t)?t:"–",Se=new Map,be=new Map,aa=256,Ml=new Set(["integer","group","decimal","fraction"]),ne=(e,t)=>{const r=oa(e,t),n=Se.get(r);if(n!==void 0)return n;Se.size>=aa&&Se.clear();const a=new Intl.NumberFormat(Ht(e),t);return Se.set(r,a),a},C=(e,t)=>{const r=oa(e,t),n=be.get(r);if(n!==void 0)return n;be.size>=aa&&be.clear();const a=new Intl.DateTimeFormat(Ht(e),t);return be.set(r,a),a},Gt=(e,t,r)=>{if(r==="")return e.format(t);const n=e.formatToParts(t),a=n.map(i=>Ml.has(i.type)).lastIndexOf(!0);return n.map((i,o)=>o===a?`${i.value}${r}`:i.value).join("")},ia=e=>{try{return Intl.NumberFormat.supportedLocalesOf(e.trim().replaceAll("_","-"))[0]}catch{return}},Ht=e=>ia(e)??"en-GB",oa=(e,t)=>`${e}\0${JSON.stringify(t)}`,Ol=xt.default.humanizer({language:"en",spacer:"",delimiter:" ",languages:{en:{y:()=>"y",mo:()=>"mo",w:()=>"w",d:()=>"d",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"}}}),He={signDisplay:"negative"},sa=({valueFormat:e,locale:t,numberFormat:r,intlOptions:n})=>z(a=>{const i=typeof r.decimals=="number"?r.decimals:2,o=zt(a,i),{base:s,suffix:c}=$e(a,r.abbreviation);return Gt(ne(t,{...o,...He,...l.isCurrencyValueFormat(e)?{style:"currency",currencyDisplay:"narrowSymbol",currency:e.iso}:{},...n}),s,c)}),la=({locale:e,numberFormat:t,intlOptions:r})=>z(n=>{const{base:a,suffix:i}=$e(n,t.abbreviation);return Gt(ne(e,{...zt(a,t.decimals),...He,...r}),a,i)}),$t=e=>z(t=>{const r=Ol(Math.abs(t));return t<0?`-${r}`:r}),ca=({locale:e,intlOptions:t})=>{const r=ne(e,{maximumFractionDigits:0,...He,...t});return z(n=>r.format(n))},ua=({locale:e,numberFormat:t,intlOptions:r})=>z(n=>ne(e,{...zt(n,t.decimals),...He,...r,style:"percent"}).format(n)),$e=(e,t="none")=>{switch(t){case"none":return{base:e,suffix:""};case"auto":{const r=Dl(e);return $e(e,r)}default:return{base:e/l.SUFFIX_MULTIPLIERS[t],suffix:t}}},zt=(e,t)=>{if(typeof t=="number")return{minimumFractionDigits:t,maximumFractionDigits:t};const r=Math.ceil(Math.log10(Math.abs(e))),n=r>=3?0:r===2?1:2;return{minimumFractionDigits:t==="auto"?0:n,maximumFractionDigits:n}},Dl=e=>{const t=Math.abs(e);return t>=l.SUFFIX_MULTIPLIERS.b?"b":t>=l.SUFFIX_MULTIPLIERS.m?"m":t>=l.SUFFIX_MULTIPLIERS.k?"k":"none"},_l=1440*60*1e3,kl=({locale:e,intlOptions:t})=>{const r=C(e,{dateStyle:"medium",...R,...t});return E(n=>r.format(n))},Vl=({locale:e,intlOptions:t})=>{const r=C(e,{dateStyle:"medium",timeStyle:"medium",...R,...t});return E(n=>Nl(r.formatToParts(n)))},da=({locale:e,intlOptions:t})=>{const r=C(e,{day:"numeric",month:"long",...R,...t});return E(n=>r.format(n))},ma=({locale:e,intlOptions:t})=>{const r=C(e,{month:"long",...R,...t});return E(n=>r.format(n))},Kt=({locale:e,intlOptions:t})=>{const r=C(e,{month:"short",year:"numeric",...R,...t});return E(n=>r.format(n))},Ut=e=>E(t=>`Q${Math.floor(t.getUTCMonth()/3)+1} ${t.getUTCFullYear()}`),ha=({locale:e,intlOptions:t})=>{const r=C(e,{day:"numeric",month:"long",...R,...t,year:void 0});return E(n=>r.formatRange(n,va(n,6)))},pa=({locale:e,intlOptions:t})=>{const r=C(e,{dateStyle:"medium",...R,...t});return E(n=>r.formatRange(n,va(n,6)))},Yt=({locale:e,intlOptions:t})=>{const r=C(e,{year:"numeric",...R,...t});return E(n=>r.format(n))},fa=({locale:e,intlOptions:t})=>{const r=C(e,{timeStyle:"short",...R,...t});return E(n=>r.format(n))},va=(e,t)=>new Date(e.getTime()+t*_l),Nl=e=>{const t=e.findIndex(n=>n.type==="hour")-1,r=e[t];return e.map((n,a)=>a===t&&r?.type==="literal"&&r.value===", "?" • ":n.value).join("")},_r=1e3,Bl=({valueFormat:e,locale:t,tickValues:r,intlOptions:n})=>z(a=>{const i={...qt(a,r),...l.isCurrencyValueFormat(e)?{style:"currency",currencyDisplay:"narrowSymbol",currency:e.iso}:{},...n};return Wt(a,t,i)}),Fl=({locale:e,tickValues:t,intlOptions:r})=>z(n=>{const a={...qt(n,t),...r};return Wt(n,e,a)}),Gl=({locale:e,tickValues:t,intlOptions:r})=>z(n=>{const a={...qt(n,t),...r,style:"percent"};return Wt(n,e,a)}),Wt=(e,t,r)=>{const{base:n,suffix:a}=$e(e,Hl(e,r));return Gt(ne(t,r),n,a)},Hl=(e,t)=>{const r=ne("en-US",{...t,notation:"compact"}).formatToParts(e).find(n=>n.type==="compact")?.value.toLowerCase();return l.SUFFIXES.find(n=>n===r)??"none"},ga=e=>Math.abs(e)>_r?ga(e/_r):Number.isInteger(e),$l=e=>{if(e.length<2)return!1;const[t,r]=e;return typeof t!="number"||typeof r!="number"?!1:Math.abs(r-t)<1},qt=(e,t)=>ga(e)?{minimumFractionDigits:0,maximumFractionDigits:0}:$l(t)?{minimumFractionDigits:0,maximumFractionDigits:4}:{minimumFractionDigits:0,maximumFractionDigits:Math.max(1,zl(t))},zl=e=>{const t=e.filter(u=>typeof u=="number"&&Number.isFinite(u)),r=t[0],n=t[1];if(r===void 0||n===void 0)return 0;const a=Math.abs(n-r);if(a===0)return 0;let i=0;for(const u of t)i=Math.max(i,Math.abs(u));if(i===0)return 0;const o=Math.floor(Math.log10(i)/3),s=a/10**(Math.max(0,o)*3);if(s>=1)return 0;const c=Math.ceil(-Math.log10(s)-1e-9);return Math.min(4,Math.max(0,c))},Kl=({locale:e,intlOptions:t})=>{const r=C(e,{day:"numeric",month:"short",...R,...t});return E(n=>r.format(n))},Ul=({locale:e,intlOptions:t})=>{const r=C(e,{month:"short",...R,...t});return E(n=>r.format(n))},Yl=({locale:e,intlOptions:t})=>{const r=C(e,{day:"numeric",month:"short",...R,...t});return E(n=>r.format(n))},Wl=({locale:e,intlOptions:t,tickValues:r})=>{const n=C(e,{...Xl(r),...R,...t});return E(a=>n.format(a))},ql=({locale:e,intlOptions:t})=>{const r=C(e,{timeStyle:"short",...R,...t});return E(n=>r.format(n))},Xl=e=>{const t=e.filter(r=>r instanceof Date&&!Number.isNaN(r.getTime()));return t.length===0?{day:"numeric",month:"short"}:jl(t).size>1?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{timeStyle:"short"}},jl=e=>{const t=new Set;for(const r of e)t.add(`${r.getUTCFullYear()}-${r.getUTCMonth()}-${r.getUTCDate()}`);return t},Xt=e=>{const{valueFormat:t}=e;switch(t.type){case"currency":return Bl(e);case"date":return Kl(e);case"datetime":return Wl(e);case"dayMonth":case"weeklyDateRange":case"weeklyDateRangeWithYear":return Yl(e);case"decimal":case"integer":return Fl(e);case"duration":return $t(e);case"month":return Ul(e);case"monthYear":return Kt(e);case"percentage":return Gl(e);case"quarter":return Ut(e);case"text":return Ft(e);case"time":return ql(e);case"year":return Yt(e);case"lookup":return Xt({...e,valueFormat:t.fallback});default:throw new l.InternalError({message:`Unhandled value format: ${t.type}`})}},Zl=.9,Jl=1/3,Ql=1/4,ec=e=>e.formattedAxis.position==="top"||e.formattedAxis.position==="bottom"?tc(e):rc(e),tc=({formattedAxis:e,bandwidthPx:t,panelRect:r,measureLabel:n})=>{const{widths:a,maxWidth:i,maxHeight:o}=ya(e.ticks,n),s=nc(e.ticks,r.width),c=s*Zl;if(i<=c)return{...e,labelRotation:0,labelMaxWidthPx:null};if(s>=50){const m=Tt(c);return{...e,ticks:At(e.ticks,a,m,n),labelRotation:0,labelMaxWidthPx:m}}if(o+8>t)return{...e,ticks:[],labelRotation:0,labelMaxWidthPx:null};const u=Tt(r.height*Jl);return{...e,ticks:At(e.ticks,a,u,n),labelRotation:-90,labelMaxWidthPx:u}},rc=({formattedAxis:e,bandwidthPx:t,panelRect:r,measureLabel:n})=>{const{widths:a,maxWidth:i,maxHeight:o}=ya(e.ticks,n);if(o>t)return{...e,ticks:[],labelRotation:0,labelMaxWidthPx:null};const s=Tt(r.width*Ql);return i<=s?{...e,labelRotation:0,labelMaxWidthPx:null}:{...e,ticks:At(e.ticks,a,s,n),labelRotation:0,labelMaxWidthPx:s}},nc=(e,t)=>{const r=e[0],n=e[1];return r===void 0||n===void 0?t:Math.abs(n.position-r.position)*t},ya=(e,t)=>{const r=[];let n=0,a=0;for(const i of e){const{width:o,height:s}=t(i.formattedLabel);r.push(o),o>n&&(n=o),s>a&&(a=s)}return{widths:r,maxWidth:n,maxHeight:a}},At=(e,t,r,n)=>{const a=i=>n(i).width;return e.map((i,o)=>(t[o]??0)<=r?i:{...i,formattedLabel:na(i.formattedLabel,r,a)})},Tt=e=>Math.max(0,Math.floor(e)),ac=(e,t,r,n,a)=>{if(e===0)return!0;const i=r==="top"||r==="bottom",o=i?60:40;let s=n-(e-1)*o;for(let c=0;c<e;c+=1){const{width:u,height:m}=a(t(c));if(s-=i?u:m,s<0)return!1}return!0},ic=(e,t,r,n,a)=>{if(e.length<2)return!0;const i=r==="top"||r==="bottom",o=c=>{const{width:u,height:m}=a(t(c));return(i?u:m)/2};let s=o(0);for(let c=1;c<e.length;c+=1){const u=e[c-1],m=e[c];if(u===void 0||m===void 0)continue;const h=o(c);if((m.position-u.position)*n<s+h+8)return!1;s=h}return!0},oc={ticks:[],labelAt:()=>""},sc=({axis:e,availableSpacePx:t,measureLabel:r,resolveFormatter:n})=>{const{tickCandidates:a,position:i}=e;if(a.length===0)return[];const o=new Map,s=f=>{const v=o.get(f);if(v)return v;const g=a[f],b=g?cc(g.ticks,n(g)):oc;return o.set(f,b),b},c=f=>{const{ticks:v,labelAt:g}=s(f);return a[f]?.source==="generated"?ac(v.length,g,i,t,r):ic(v,g,i,t,r)};let u=0,m=a.length-1,h=-1;for(;u<=m;){const f=u+m>>>1;c(f)?(h=f,u=f+1):m=f-1}const p=lc(h,s);return uc(s(p))},lc=(e,t)=>{const r=e>=0?e:0;for(let n=r;n>=0;n-=1){const{ticks:a,labelAt:i}=t(n);if(dc(a,i))return n}return 0},cc=(e,t)=>{const r=new Array(e.length);return{ticks:e,labelAt:n=>{const a=r[n];if(a!==void 0)return a;const i=t(e[n]?.value??null);return r[n]=i,i}}},uc=({ticks:e,labelAt:t})=>e.map((r,n)=>({...r,formattedLabel:t(n)})),dc=(e,t)=>{const r=new Set;for(let n=0;n<e.length;n+=1){const a=t(n);if(r.has(a))return!1;r.add(a)}return!0};function jt(e,t){return e.axes.find(r=>r.scaledAesthetic===t)??null}function Zt(e,t){return e.categorySpan?.layerIds.includes(t)?e.categorySpan.valueFormat:e.valueFormat}function mc(e,t){return e.legends.drawn.find(r=>r.aesthetics.includes(t))??null}var hc=e=>{const t=I({...e,valueFormat:e.valueFormat.fallback}),r={};for(const[a,i]of Object.entries(e.valueFormat.cases))r[a]=I({...e,valueFormat:i});const n=e.valueFormat.byVariable;return(a,i)=>{if(i===void 0||i[n]===void 0)return t(a);const o=l.getStableKey(i[n]),s=r[o];return s!==void 0?s(a,i):t(a)}},I=e=>{switch(e.valueFormat.type){case"currency":return sa(e);case"date":return kl(e);case"datetime":return Vl(e);case"dayMonth":return da(e);case"decimal":return la(e);case"duration":return $t(e);case"integer":return ca(e);case"month":return ma(e);case"monthYear":return Kt(e);case"percentage":return ua(e);case"quarter":return Ut(e);case"text":return Ft(e);case"weeklyDateRange":return ha(e);case"weeklyDateRangeWithYear":return pa(e);case"year":return Yt(e);case"time":return fa(e);case"lookup":return hc({...e,valueFormat:e.valueFormat});default:{const t=e.valueFormat;throw new l.InternalError({message:`Unhandled value format: ${t.type}`})}}};function Jt({layer:e,numberFormat:t,locale:r}){return I({valueFormat:d.getLayerYValueFormat(e),locale:r,numberFormat:t})}var pc=(e,t)=>{const r=l.readVariableName(t.x);return r!==null&&r!==l.CONSTANT_VARIABLES.x?{read:d.createXValueReader(e,t),variable:r}:{read:d.getGroup,variable:l.GROUP_VARIABLES.group}},Sa=({layer:e,coordSystem:t,axes:r,numberFormat:n,panelRect:a,measureDataLabel:i,readers:o,formattingLocale:s,percentageValueStrategy:c})=>{const u=Jt({layer:e,numberFormat:n,locale:s}),m=t.type==="cartesian"&&t.mainAxis==="y";return{layer:e,coordSystem:t,panelRect:a,measureDataLabel:i,styleReaders:o.geom(e),formatLabel:Sc({layer:e,numberFormat:n,axes:r,locale:s,absoluteFormatter:u,percentageValueStrategy:c,flipped:m}),formatAbsolute:u,formatCategory:fc({layer:e,numberFormat:n,locale:s})}},fc=({layer:e,numberFormat:t,locale:r})=>{const{read:n,variable:a}=pc(e.data,e.mapping),i=I({valueFormat:e.data.hasVariable(a)?e.data.getValueFormat(a):{type:"text"},locale:r,numberFormat:t});return o=>{const s=n(o);return s===null?null:i(s,o)}},vc=(e,t,r)=>{switch(t){case"stack":return gc(e);case"fill":return yc(e,r);case"absoluteGrandTotal":return()=>e.summary.absoluteGrandTotal??null;case"none":return()=>null}},gc=e=>{const t=l.readVariableName(e.mapping.x);let r=null,n=!1;return a=>{const i=e.summary.stackTotals;if(i===void 0||i.length===0||t===null)return null;if(!n){r=new Map;for(const c of i)r.set(c.xKey,c);n=!0}const o=a[t];if(o==null)return null;const s=r?.get(d.getObservationXKey(a,t));return s===void 0?null:s.total}},yc=(e,t)=>{const r=t?l.getXMin:l.getYMin,n=t?l.getXMax:l.getYMax,a=d.createSegmentYReader(e);return i=>{const o=r(i),s=n(i);if(!l.isStrictNumericDataValue(o)||!l.isStrictNumericDataValue(s))return null;const c=s-o;if(c===0)return null;const u=a(i);return l.isStrictNumericDataValue(u)?u/c:null}},Sc=({layer:e,numberFormat:t,axes:r,locale:n,absoluteFormatter:a,percentageValueStrategy:i,flipped:o})=>{const s=d.createRawValueReader(e.data,e.dataLabels.labelSource),c=vc(e,i,o),u=bc({layer:e,numberFormat:t,axes:r,locale:n,absoluteFormatter:a}),m=I({valueFormat:{type:"percentage"},locale:n,numberFormat:t}),h=e.dataLabels.format==="percentage"&&ba(e);return p=>{const f=s(p);if(f===null)return"";if(!h||!l.isStrictNumericDataValue(f))return u(f,p);const v=c(p);return v===null||v===0?u(f,p):m(f/v)}},bc=({layer:e,numberFormat:t,axes:r,locale:n,absoluteFormatter:a})=>{const i=e.dataLabels.labelSource,o=l.readVariableName(i);if(o!==null){if(ba(e))return a;const s=xc(e,r,t,n,o);if(s!==null)return s}return I({valueFormat:Ac(e.data,i),locale:n,numberFormat:t})},ba=e=>{const t=l.readVariableName(e.dataLabels.labelSource);return t===null?!1:t===l.readVariableName(d.resolveSegmentYSource(e.position,e.mapping))},xc=(e,t,r,n,a)=>{const i=l.readVariableName(e.mapping.x);if(i===null||i!==a)return null;const o=t.find(s=>s.scaledAesthetic==="x");return o===void 0?null:I({valueFormat:Zt(o,e.id),locale:n,numberFormat:r})},Ac=(e,t)=>{const r=l.readConstantValue(t);if(r!==void 0)return l.isNumericDataValue(r)?{type:"decimal"}:l.isTemporalDataValue(r)?{type:"date"}:{type:"text"};const n=l.readVariableName(t);return n===null||!e.hasVariable(n)?{type:"text"}:e.getValueFormat(n)},Tc={cartesian:["cartesian","flip"],polar:["polar"]},Ic=null;function xa(e=[]){const t=Lc(e),r=(n,a)=>{if(!t.has(n))return null;const i=t.get(n);return i.getDataLabelPlacements===void 0||!Tc[a].some(o=>i.dataLabelCoordTypes.includes(o))?null:{place:i.getDataLabelPlacements.bind(i),getPercentageValueStrategy:o=>i.resolvePercentageValueStrategy?.(o,a)??"none"}};return{resolve:r,hasCapability:(n,a)=>r(n,a)!==null,hasPercentageFormat:(n,a)=>(r(n.geom,a)?.getPercentageValueStrategy(n)??"none")!=="none"}}function Qt(){return Ic??=xa()}function Lc(e){const t=new l.GeomRegistry;for(const r of e){const n=l.resolveDefinition(r);n instanceof l.Geom&&t.register(n.type,n)}return t}function*Ec({layers:e,coordSystem:t,axes:r,numberFormat:n,panelRect:a,measureDataLabel:i,readers:o,locale:s,resolvePlacement:c=Qt()}){if(!(t.type!=="cartesian"||a.width<=0||a.height<=0))for(const u of e){if(!u.dataLabels.showDataLabels&&!u.dataLabels.showStackTotals)continue;const m=c.resolve(u.geom,"cartesian");if(m===null)continue;const h=Sa({layer:u,coordSystem:t,axes:r,numberFormat:n,panelRect:a,measureDataLabel:i,readers:o,formattingLocale:s,percentageValueStrategy:m.getPercentageValueStrategy(u)});for(const p of m.place(h).labels)yield{x:a.x+p.x-p.width/2,y:a.y+p.y-p.height/2,width:p.width,height:p.height}}}var ut={abbreviation:"none",decimals:"auto"},Aa=({locale:e,kind:t,startValue:r,endValue:n,valueFormat:a})=>{if(r===null||n===null)return"n/a";switch(t){case"absoluteDifference":{const i=n-r,o=I({valueFormat:a,locale:e,numberFormat:ut,intlOptions:{signDisplay:"always"}})(i);return kr(o)?"0":o}case"relativeDifference":{const i=n-r;if(i===0)return"0%";const o=i/Math.abs(r);if(o===Number.POSITIVE_INFINITY)return"∞";if(o===Number.NEGATIVE_INFINITY)return"-∞";const s=I({valueFormat:{type:"percentage"},locale:e,numberFormat:ut,intlOptions:{signDisplay:"always"}})(o);return kr(s)?"0%":s}case"proportion":{if(n-r===0)return"=";const i=n/r;return i===Number.POSITIVE_INFINITY?"∞":i===Number.NEGATIVE_INFINITY?"-∞":`${I({valueFormat:{type:"decimal"},locale:e,numberFormat:ut,intlOptions:{maximumFractionDigits:1}})(i)}x`}}},kr=e=>{const t=e.replace(/[^\d.]/g,"");return t===""||t==="."?!1:Number(t)===0},Rc=2,Cc=6,wc=6,Pc=15,Mc=15,Oc=2.5,Dc=.5,_c=.25,Ta=e=>{const t=e-Rc,r=1+Dc*t,n=1+_c*t;return{arrowStartGap:Cc*r,arrowEndGap:wc*r,offsetFromHigherObservation:Pc*n,arrowheadSize:Oc*e,curveRadius:Mc*n,strokeWidth:e}},kc=(e,t,r,n)=>{const a=n.offsetFromHigherObservation+n.arrowheadSize+n.arrowEndGap;return e?Math.max(t.x,r.x)+a:Math.min(t.y,r.y)-a},Vc=(e,t,r,{arrowStartGap:n,arrowEndGap:a,curveRadius:i})=>{const o={x:e.x,y:e.y-n},s={x:e.x,y:r},c={x:t.x,y:r},u={x:t.x,y:t.y-a},m=t.x>e.x?1:-1;return`
|
|
2
2
|
M ${o.x} ${o.y}
|
|
3
3
|
L ${s.x} ${s.y+i}
|
|
4
4
|
Q ${s.x} ${s.y} ${s.x+m*i} ${s.y}
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { clamp as Ze, findLast as Su, isEqual as z, isPlainObject as Au, omit as
|
|
|
5
5
|
import Iu from "humanize-duration";
|
|
6
6
|
import { area as Ji, curveCatmullRom as Lu, curveLinear as Mu, line as Qi, symbol as es, symbolCircle as Ru, symbolCross as Eu, symbolDiamond as Cu, symbolSquare as Pu, symbolStar as ku, symbolTriangle as Du, symbolWye as Ou } from "d3-shape";
|
|
7
7
|
import { Delaunay as Vu } from "d3-delaunay";
|
|
8
|
-
typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.vizEngine = "1.9.0-beta.
|
|
8
|
+
typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.vizEngine = "1.9.0-beta.1793702966406");
|
|
9
9
|
function ge(e, t) {
|
|
10
10
|
return e.geom === t;
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"grammar-of-graphics",
|
|
12
12
|
"compiler"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.9.0-beta.
|
|
14
|
+
"version": "1.9.0-beta.1793702966406",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"sideEffects": [
|
|
17
17
|
"**/version.ts"
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"vite": "^8.1.5",
|
|
65
65
|
"vite-plugin-dts": "^4.5.4",
|
|
66
66
|
"vitest": "^4.1.11",
|
|
67
|
-
"@graphytools/eslint-plugin-graphy": "1.0.0",
|
|
68
|
-
"@graphytools/eslint-config": "0.0.1",
|
|
69
67
|
"@graphytools/typescript-config": "0.0.1",
|
|
70
|
-
"@graphytools/
|
|
68
|
+
"@graphytools/eslint-plugin-graphy": "1.0.0",
|
|
69
|
+
"@graphytools/vitest-config": "1.0.0",
|
|
70
|
+
"@graphytools/eslint-config": "0.0.1"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|