Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vega-parser

Package Overview
Dependencies
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-parser - npm Package Compare versions

Comparing version 5.6.1 to 5.6.2

2

build/vega-parser.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vega-util"),require("vega-expression"),require("vega-functions"),require("vega-event-selector"),require("vega-scale"),require("vega-dataflow")):"function"==typeof define&&define.amd?define(["exports","vega-util","vega-expression","vega-functions","vega-event-selector","vega-scale","vega-dataflow"],t):t((e=e||self).vega={},e.vega,e.vega,e.vega,e.vega,e.vega,e.vega)}(this,function(e,t,n,i,a,r,o){"use strict";function l(e){return+e||0}var s="outer",u=["value","update","init","react","bind"];function d(e,n){t.error(e+' for "outer" push: '+t.stringValue(n))}function c(e,t){var n=e.name;if(e.push===s)t.signals[n]||d("No prior signal definition",n),u.forEach(function(t){void 0!==e[t]&&d("Invalid property ",t)});else{var i=t.addSignal(n,e.value);!1===e.react&&(i.react=!1),e.bind&&t.addBinding(n,e.bind)}}function f(e,a,r){var o,l,s={};try{e=t.isString(e)?e:t.stringValue(e)+"",o=n.parse(e)}catch(n){t.error("Expression parse error: "+e)}return o.visit(function(e){if(e.type===n.CallExpression){var t=e.callee.name,r=i.codegenParams.visitors[t];r&&r(t,e.arguments,a,s)}}),(l=i.codeGenerator(o)).globals.forEach(function(e){var t=i.SignalPrefix+e;!s.hasOwnProperty(t)&&a.getSignal(e)&&(s[t]=a.signalRef(e))}),{$expr:r?r+"return("+l.code+");":l.code,$fields:l.fields,$params:s}}function p(e,t,n,i){this.id=-1,this.type=e,this.value=t,this.params=n,i&&(this.parent=i)}function g(e,t,n,i){return new p(e,t,n,i)}function h(e,t){return g("operator",e,t)}function m(e){var t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}var y={$tupleid:1,toString:function(){return":_tupleid_:"}};function v(e,t){return t?{$field:e,$name:t}:{$field:e}}var b=v("key");function x(e,t){return{$compare:e,$order:t}}var k="descending";function S(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}var $="scope",O="view";function R(e){return e&&e.signal}function j(e){if(R(e))return!0;if(t.isObject(e))for(var n in e)if(j(e[n]))return!0;return!1}function w(e,t){return null!=e?e:t}function z(e){return e&&e.signal||e}var V="timer";function D(e,n){return(e.merge?P:e.stream?_:e.type?E:t.error("Invalid stream specification: "+t.stringValue(e)))(e,n)}function P(e,t){var n=W({merge:e.merge.map(e=>D(e,t))},e,t);return t.addStream(n).id}function _(e,t){var n=W({stream:D(e.stream,t)},e,t);return t.addStream(n).id}function E(e,t){var n,i,a;return e.type===V?(n=t.event(V,e.throttle),e={between:e.between,filter:e.filter}):n=t.event((a=e.source)===$?O:a||O,e.type),i=W({stream:n},e,t),1===Object.keys(i).length?n:t.addStream(i).id}function W(e,n,i){var a,r,o,l,s=n.between;return s&&(2!==s.length&&t.error('Stream "between" parameter must have 2 entries: '+t.stringValue(n)),e.between=[D(s[0],i),D(s[1],i)]),s=n.filter?[].concat(n.filter):[],(n.marktype||n.markname||n.markrole)&&s.push((a=n.marktype,r=n.markname,o=n.markrole,(l="event.item")+(a&&"*"!==a?"&&"+l+".mark.marktype==='"+a+"'":"")+(o?"&&"+l+".mark.role==='"+o+"'":"")+(r?"&&"+l+".mark.name==='"+r+"'":""))),n.source===$&&s.push("inScope(event.item)"),s.length&&(e.filter=f("("+s.join(")&&(")+")").$expr),null!=(s=n.throttle)&&(e.throttle=+s),null!=(s=n.debounce)&&(e.debounce=+s),n.consume&&(e.consume=!0),e}var C="var datum=event.item&&event.item.datum;";function A(e,n,i){var r=e.events,o=e.update,l=e.encode,s=[],u={target:i};r||t.error("Signal update missing events specification."),t.isString(r)&&(r=a.selector(r,n.isSubscope()?$:O)),r=t.array(r).filter(e=>e.signal||e.scale?(s.push(e),0):1),s.length>1&&(s=[L(s)]),r.length&&s.push(r.length>1?{merge:r}:r[0]),null!=l&&(o&&t.error("Signal encode and update are mutually exclusive."),o="encode(item(),"+t.stringValue(l)+")"),u.update=t.isString(o)?f(o,n,C):null!=o.expr?f(o.expr,n,C):null!=o.value?o.value:null!=o.signal?{$expr:"_.value",$params:{value:n.signalRef(o.signal)}}:t.error("Invalid signal update specification."),e.force&&(u.options={force:!0}),s.forEach(function(e){n.addUpdate(t.extend(function(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):D(e,t)}}(e,n),u))})}function L(e){return{signal:"["+e.map(e=>e.scale?'scale("'+e.scale+'")':e.signal)+"]"}}function F(e,n){var i=n.getSignal(e.name),a=e.update;e.init&&(a?t.error("Signals can not include both init and update expressions."):(a=e.init,i.initonly=!0)),a&&(a=f(a,n),i.update=a.$expr,i.params=a.$params),e.on&&e.on.forEach(function(e){A(e,n,i.id)})}function T(e){return function(t,n,i){return g(e,n,t||void 0,i)}}var M=T("aggregate"),B=T("axisticks"),U=T("bound"),q=T("collect"),I=T("compare"),N=T("datajoin"),G=T("encode"),H=T("expression"),Q=T("facet"),X=T("field"),Y=T("key"),J=T("legendentries"),K=T("load"),Z=T("mark"),ee=T("multiextent"),te=T("multivalues"),ne=T("overlap"),ie=T("params"),ae=T("prefacet"),re=T("projection"),oe=T("proxy"),le=T("relay"),se=T("render"),ue=T("scale"),de=T("sieve"),ce=T("sortitems"),fe=T("viewlayout"),pe=T("values"),ge=0;function he(e,n){var i,a,o=n.getScale(e.name).params;for(i in o.domain=be(e.domain,e,n),null!=e.range&&(o.range=function e(n,i,a){var o=n.range,l=i.config.range;if(o.signal)return i.signalRef(o.signal);if(t.isString(o)){if(l&&l.hasOwnProperty(o))return n=t.extend({},n,{range:l[o]}),e(n,i,a);"width"===o?o=[0,{signal:"width"}]:"height"===o?o=r.isDiscrete(n.type)?[0,{signal:"height"}]:[{signal:"height"},0]:t.error("Unrecognized scale range value: "+t.stringValue(o))}else{if(o.scheme)return a.scheme=t.isArray(o.scheme)?ye(o.scheme,i):me(o.scheme,i),o.extent&&(a.schemeExtent=ye(o.extent,i)),void(o.count&&(a.schemeCount=me(o.count,i)));if(o.step)return void(a.rangeStep=me(o.step,i));if(r.isDiscrete(n.type)&&!t.isArray(o))return be(o,n,i);t.isArray(o)||t.error("Unsupported range type: "+t.stringValue(o))}return o.map(e=>(t.isArray(e)?ye:me)(e,i))}(e,n,o)),null!=e.interpolate&&function(e,t){t.interpolate=me(e.type||e),null!=e.gamma&&(t.interpolateGamma=me(e.gamma))}(e.interpolate,o),null!=e.nice&&(o.nice=(a=e.nice,t.isObject(a)?{interval:me(a.interval),step:me(a.step)}:me(a))),null!=e.bins&&(o.bins=function(e,n){return e.signal||t.isArray(e)?ye(e,n):n.objectProperty(e)}(e.bins,n)),e)o.hasOwnProperty(i)||"name"===i||(o[i]=me(e[i],n))}function me(e,n){return t.isObject(e)?e.signal?n.signalRef(e.signal):t.error("Unsupported object: "+t.stringValue(e)):e}function ye(e,t){return e.signal?t.signalRef(e.signal):e.map(e=>me(e,t))}function ve(e){t.error("Can not find data set: "+t.stringValue(e))}function be(e,n,i){if(e)return e.signal?i.signalRef(e.signal):(t.isArray(e)?function(e,t,n){return e.map(function(e){return me(e,n)})}:e.fields?function(e,n,i){var a=e.data,o=e.fields.reduce(function(e,n){return n=t.isString(n)?{data:a,field:n}:t.isArray(n)||n.signal?function(e,n){var i="_:vega:_"+ge++,a=q({});if(t.isArray(e))a.value={$ingest:e};else if(e.signal){var r="setdata("+t.stringValue(i)+","+e.signal+")";a.params.input=n.signalRef(r)}return n.addDataPipeline(i,[a,de({})]),{data:i,field:"data"}}(n,i):n,e.push(n),e},[]);return(r.isDiscrete(n.type)?function(e,t,n){var i,a,r,o;return i=n.map(function(e){var n=t.getData(e.data);return n||ve(e.data),n.countsRef(t,e.field)}),a=t.add(M({groupby:b,ops:["sum"],fields:[t.fieldRef("count")],as:["count"],pulse:i})),r=t.add(q({pulse:m(a)})),o=t.add(pe({field:b,sort:t.sortRef(xe(e.sort,!0)),pulse:m(r)})),m(o)}:r.isQuantile(n.type)?function(e,t,n){var i=n.map(function(e){var n=t.getData(e.data);return n||ve(e.data),n.domainRef(t,e.field)});return m(t.add(te({values:i})))}:function(e,t,n){var i=n.map(function(e){var n=t.getData(e.data);return n||ve(e.data),n.extentRef(t,e.field)});return m(t.add(ee({extents:i})))})(e,i,o)}:function(e,t,n){var i=n.getData(e.data);i||ve(e.data);return r.isDiscrete(t.type)?i.valuesRef(n,e.field,xe(e.sort,!1)):r.isQuantile(t.type)?i.domainRef(n,e.field):i.extentRef(n,e.field)})(e,n,i);null==n.domainMin&&null==n.domainMax||t.error("No scale domain defined for domainMin/domainMax to override.")}function xe(e,n){return e&&(e.field||e.op?e.field||"count"===e.op?n&&e.field?t.error("Multiple domain scales can not sort by field."):n&&e.op&&"count"!==e.op&&t.error("Multiple domain scales support op count only."):t.error("No field provided for sort aggregate op: "+e.op):t.isObject(e)?e.field="key":e={field:"key"}),e}function ke(e,n,i){return t.isArray(e)?e.map(function(e){return ke(e,n,i)}):t.isObject(e)?e.signal?i.signalRef(e.signal):"fit"===n?e:t.error("Unsupported parameter object: "+t.stringValue(e)):e}const Se="top",$e="left",Oe="right",Re="bottom",je="vertical",we="start",ze="end",Ve="index",De="label",Pe="offset",_e="perc",Ee="perc2",We="size",Ce="value",Ae="guide-label",Le="guide-title",Fe="group-title",Te="symbol",Me="gradient",Be="discrete",Ue=["size","shape","fill","stroke","strokeWidth","strokeDash","opacity"],qe={name:1,interactive:1},Ie={value:0},Ne={value:1};var Ge=t.toSet(["rule"]),He=t.toSet(["group","image","rect"]);function Qe(e,n,i,a){var r=f(e,n);return r.$fields.forEach(function(e){a[e]=1}),t.extend(i,r.$params),r.$expr}function Xe(e,n,i,a){return function e(n,i,a,r){var o,l,s;if(n.signal)o="datum",s=Qe(n.signal,i,a,r);else if(n.group||n.parent){for(l=Math.max(1,n.level||1),o="item";l-- >0;)o+=".mark.group";n.parent?(s=n.parent,o+=".datum"):s=n.group}else n.datum?(o="datum",s=n.datum):t.error("Invalid field reference: "+t.stringValue(n));n.signal||(t.isString(s)?(r[s]=1,s=t.splitAccessPath(s).map(t.stringValue).join("][")):s=e(s,i,a,r));return o+"["+s+"]"}(t.isObject(e)?e:{datum:e},n,i,a)}function Ye(e,n,i,a,r){var o,l,s,u=Je(e.scale,i,a,r);return null!=e.range?(l=u+".range()",n=0===(o=+e.range)?l+"[0]":"($="+l+","+(1===o?"$[$.length-1]":"$[0]+"+o+"*($[$.length-1]-$[0])")+")"):(void 0!==n&&(n=u+"("+n+")"),e.band&&(s=function(e,n){if(!t.isString(e))return-1;var i=n.scaleType(e);return"band"===i||"point"===i?1:0}(e.scale,i))&&(o=(l=u+".bandwidth")+"()"+(1===(o=+e.band)?"":"*"+o),s<0&&(o="("+l+"?"+o+":0)"),n=(n?n+"+":"")+o,e.extra&&(n="(datum.extra?"+u+"(datum.extra.value):"+n+")")),null==n&&(n="0")),n}function Je(e,n,a,r){var o;if(t.isString(e))o=i.ScalePrefix+e,a.hasOwnProperty(o)||(a[o]=n.scaleRef(e)),o=t.stringValue(o);else{for(o in n.scales)a[i.ScalePrefix+o]=n.scaleRef(o);o=t.stringValue(i.ScalePrefix)+"+"+(e.signal?"("+Qe(e.signal,n,a,r)+")":Xe(e,n,a,r))}return"_["+o+"]"}function Ke(e,n,i,a){return t.isObject(e)?"("+Ze(null,e,n,i,a)+")":e}function Ze(e,n,i,a,r){if(null!=n.gradient)return function(e,n,i,a){return"this.gradient("+Je(e.gradient,n,i,a)+","+t.stringValue(e.start)+","+t.stringValue(e.stop)+","+t.stringValue(e.count)+")"}(n,i,a,r);var o=n.signal?Qe(n.signal,i,a,r):n.color?function(e,t,n,i){function a(e,a,r,o){return"this."+e+"("+[Ze(null,a,t,n,i),Ze(null,r,t,n,i),Ze(null,o,t,n,i)].join(",")+").toString()"}return e.c?a("hcl",e.h,e.c,e.l):e.h||e.s?a("hsl",e.h,e.s,e.l):e.l||e.a?a("lab",e.l,e.a,e.b):e.r||e.g||e.b?a("rgb",e.r,e.g,e.b):null}(n.color,i,a,r):null!=n.field?Xe(n.field,i,a,r):void 0!==n.value?t.stringValue(n.value):void 0;return null!=n.scale&&(o=Ye(n,o,i,a,r)),void 0===o&&(o=null),null!=n.exponent&&(o="Math.pow("+o+","+Ke(n.exponent,i,a,r)+")"),null!=n.mult&&(o+="*"+Ke(n.mult,i,a,r)),null!=n.offset&&(o+="+"+Ke(n.offset,i,a,r)),n.round&&(o="Math.round("+o+")"),o}function et(e,n,i){return e+"["+t.stringValue(n)+"]="+i+";"}function tt(e,n,i,a,r){var o="";return n.forEach(function(e){var t=Ze(0,e,i,a,r);o+=e.test?Qe(e.test,i,a,r)+"?"+t+":":t}),":"===t.peek(o)&&(o+="null"),et("o",e,o)}function nt(e,n,i,a){var r,o,l={},s="var o=item,datum=o.datum,$;";for(r in e)o=e[r],t.isArray(o)?s+=tt(r,o,a,i,l):s+=et("o",r,Ze(0,o,a,i,l));return s+=function(e,t){var n="";return Ge[t]?n:(e.x2&&(e.x?(He[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(He[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;"),n)}(e,n),{$expr:s+="return 1;",$fields:Object.keys(l),$output:Object.keys(e)}}var it="mark",at="frame",rt="scope",ot="axis",lt="axis-domain",st="axis-grid",ut="axis-label",dt="axis-tick",ct="axis-title",ft="legend",pt="legend-band",gt="legend-entry",ht="legend-gradient",mt="legend-label",yt="legend-symbol",vt="legend-title",bt="title";function xt(e){return t.isObject(e)?t.extend({},e):{value:e}}function kt(e,n,i,a){return null!=i?(t.isObject(i)&&!t.isArray(i)?e.update[n]=i:e[a||"enter"][n]={value:i},1):0}function St(e,t,n){for(let n in t)kt(e,n,t[n]);for(let t in n)kt(e,t,n[t],"update")}function $t(e,n,i){for(var a in n)i&&i.hasOwnProperty(a)||(e[a]=t.extend(e[a]||{},n[a]));return e}function Ot(e,n,i,a,r,o){var l,s;for(s in(o=o||{}).encoders={$encode:l={}},e=function(e,n,i,a,r){var o,l,s={};"legend"!=i&&0!==String(i).indexOf("axis")||(i=null);for(o in l=i===at?r.group:i===it?t.extend({},r.mark,r[n]):null)jt(o,e)||("fill"===o||"stroke"===o)&&(jt("fill",e)||jt("stroke",e))||(s[o]=Rt(l[o]));return t.array(a).forEach(function(t){var n=r.style&&r.style[t];for(var i in n)jt(i,e)||(s[i]=Rt(n[i]))}),(e=t.extend({},e)).enter=t.extend(s,e.enter),e}(e,n,i,a,r.config))l[s]=nt(e[s],n,o,r);return o}function Rt(e){return e&&e.signal?{signal:e.signal}:{value:e}}function jt(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}function wt(e,t,n,i,a,r,o){return{type:e,name:o?o.name:void 0,role:t,style:o&&o.style||n,key:i,from:a,interactive:!(!o||!o.interactive),encode:$t(r,o,qe)}}function zt(e,t){const n=n=>w(e[n],t[n]);return n.isVertical=(n=>je===w(e.direction,t.direction||(n?t.symbolDirection:t.gradientDirection))),n.gradientLength=(()=>w(e.gradientLength,t.gradientLength||t.gradientWidth)),n.gradientThickness=(()=>w(e.gradientThickness,t.gradientThickness||t.gradientHeight)),n.entryColumns=(()=>w(e.columns,w(t.columns,+n.isVertical(!0)))),n}function Vt(e,t){var n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function Dt(e,t,n){return`item.anchor === "${we}" ? ${e} : item.anchor === "${ze}" ? ${t} : ${n}`}const Pt=Dt(t.stringValue($e),t.stringValue(Oe),t.stringValue("center"));var _t="group",Et="rect",Wt="rule",Ct="symbol",At="text";function Lt(e,n,i,a){var r,o,l,s,u,d,c=zt(e,i),f=c.isVertical(),p=c.gradientThickness(),g=c.gradientLength();return f?(l=[0,1],s=[0,0],u=p,d=g):(l=[0,0],s=[1,0],u=g,d=p),St(r={enter:o={opacity:Ie,x:Ie,y:Ie,width:xt(u),height:xt(d)},update:t.extend({},o,{opacity:Ne,fill:{gradient:n,start:l,stop:s}}),exit:{opacity:Ie}},{stroke:c("gradientStrokeColor"),strokeWidth:c("gradientStrokeWidth")},{opacity:c("gradientOpacity")}),wt(Et,ht,null,void 0,void 0,r,a)}function Ft(e,n,i,a,r){var o,l,s,u,d,c,f=zt(e,i),p=f.isVertical(),g=f.gradientThickness(),h=f.gradientLength(),m="";return p?(s="y",d="y2",u="x",c="width",m="1-"):(s="x",d="x2",u="y",c="height"),(l={opacity:Ie,fill:{scale:n,field:Ce}})[s]={signal:m+"datum."+_e,mult:h},l[u]=Ie,l[d]={signal:m+"datum."+Ee,mult:h},l[c]=xt(g),St(o={enter:l,update:t.extend({},l,{opacity:Ne}),exit:{opacity:Ie}},{stroke:f("gradientStrokeColor"),strokeWidth:f("gradientStrokeWidth")},{opacity:f("gradientOpacity")}),wt(Et,pt,null,Ce,r,o,a)}const Tt=`datum.${_e}<=0?"${$e}":datum.${_e}>=1?"${Oe}":"center"`,Mt=`datum.${_e}<=0?"${Re}":datum.${_e}>=1?"${Se}":"middle"`;function Bt(e,t,n,i){var a,r,o,l,s,u=zt(e,t),d=u.isVertical(),c=xt(u.gradientThickness()),f=u.gradientLength(),p=u("labelOverlap"),g=u("labelSeparation"),h="";return St(a={enter:r={opacity:Ie},update:o={opacity:Ne,text:{field:De}},exit:{opacity:Ie}},{fill:u("labelColor"),fillOpacity:u("labelOpacity"),font:u("labelFont"),fontSize:u("labelFontSize"),fontStyle:u("labelFontStyle"),fontWeight:u("labelFontWeight"),limit:w(e.labelLimit,t.gradientLabelLimit)}),d?(r.align={value:"left"},r.baseline=o.baseline={signal:Mt},l="y",s="x",h="1-"):(r.align=o.align={signal:Tt},r.baseline={value:"top"},l="x",s="y"),r[l]=o[l]={signal:h+"datum."+_e,mult:f},r[s]=o[s]=c,c.offset=w(e.labelOffset,t.gradientLabelOffset)||0,e=wt(At,mt,Ae,Ce,i,a,n),p&&(e.overlap={separation:g,method:p,order:"datum."+Ve}),e}function Ut(e,t,n,i,a,r,o,l){return{type:_t,name:n,role:e,style:t,from:i,interactive:a||!1,encode:r,marks:o,layout:l}}function qt(e,t,n,i,a){var r,o,l,s,u,d,c,f=zt(e,t),p=n.entries,g=!(!p||!p.interactive),h=p?p.name:void 0,m=f("clipHeight"),y=f("symbolOffset"),v={data:"value"},b={},x=`${a} ? datum.${Pe} : datum.${We}`,k=m?xt(m):{field:We},S=`datum.${Ve}`,$=`max(1, ${a})`;return k.mult=.5,b={enter:r={opacity:Ie,x:{signal:x,mult:.5,offset:y},y:k},update:o={opacity:Ne,x:r.x,y:r.y},exit:{opacity:Ie}},e.fill||St(b,{fill:t.symbolBaseFillColor,stroke:t.symbolBaseStrokeColor}),St(b,{fill:f("symbolFillColor"),shape:f("symbolType"),size:f("symbolSize"),stroke:f("symbolStrokeColor"),strokeDash:f("symbolDash"),strokeDashOffset:f("symbolDashOffset"),strokeWidth:f("symbolStrokeWidth")},{opacity:f("symbolOpacity")}),Ue.forEach(function(t){e[t]&&(o[t]=r[t]={scale:e[t],field:Ce})}),s=wt(Ct,yt,null,Ce,v,b,n.symbols),m&&(s.clip=!0),(l=xt(y)).offset=f("labelOffset"),St(b={enter:r={opacity:Ie,x:{signal:x,offset:l},y:k},update:o={opacity:Ne,text:{field:De},x:r.x,y:r.y},exit:{opacity:Ie}},{align:f("labelAlign"),baseline:f("labelBaseline"),fill:f("labelColor"),fillOpacity:f("labelOpacity"),font:f("labelFont"),fontSize:f("labelFontSize"),fontStyle:f("labelFontStyle"),fontWeight:f("labelFontWeight"),limit:f("labelLimit")}),u=wt(At,mt,Ae,Ce,v,b,n.labels),b={enter:{noBound:{value:!m},width:Ie,height:m?xt(m):Ie,opacity:Ie},exit:{opacity:Ie},update:o={opacity:Ne,row:{signal:null},column:{signal:null}}},f.isVertical(!0)?(d=`ceil(item.mark.items.length / ${$})`,o.row.signal=`${S}%${d}`,o.column.signal=`floor(${S} / ${d})`,c={field:["row",S]}):(o.row.signal=`floor(${S} / ${$})`,o.column.signal=`${S} % ${$}`,c={field:S}),o.column.signal=`${a}?${o.column.signal}:${S}`,(e=Ut(rt,null,h,i={facet:{data:i,name:"value",groupby:Ve}},g,$t(b,p,qe),[s,u])).sort=c,e}const It='item.orient === "left"',Nt='item.orient === "right"',Gt=`(${It} || ${Nt})`,Ht=`datum.vgrad && ${Gt}`,Qt=Dt('"top"','"bottom"','"middle"'),Xt=`datum.vgrad && ${Nt} ? (${Dt('"right"','"left"','"center"')}) : (${Gt} && !(datum.vgrad && ${It})) ? "left" : ${Pt}`,Yt=`item._anchor || (${Gt} ? "middle" : "start")`,Jt=`${Ht} ? (${It} ? -90 : 90) : 0`,Kt=`${Gt} ? (datum.vgrad ? (${Nt} ? "bottom" : "top") : ${Qt}) : "top"`;function Zt(e,n){var i;return t.isObject(e)&&(e.signal?i=e.signal:e.path?i="pathShape("+en(e.path)+")":e.sphere&&(i="geoShape("+en(e.sphere)+', {type: "Sphere"})')),i?n.signalRef(i):!!e}function en(e){return t.isObject(e)&&e.signal?e.signal:t.stringValue(e)}function tn(e){var t=e.role||"";return t.indexOf("axis")&&t.indexOf("legend")?e.type===_t?rt:t||it:t}function nn(e){return{marktype:e.type,name:e.name||void 0,role:e.role||tn(e),zindex:+e.zindex||void 0}}function an(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e}function rn(e,n){var i=o.definition(e.type);i||t.error("Unrecognized transform type: "+t.stringValue(e.type));var a=g(i.type.toLowerCase(),null,on(i,e,n));return e.signal&&n.addSignal(e.signal,n.proxy(a)),a.metadata=i.metadata||{},a}function on(e,t,n){var i,a,r,o={};for(a=0,r=e.params.length;a<r;++a)o[(i=e.params[a]).name]=ln(i,t,n);return o}function ln(e,n,i){var a=e.type,r=n[e.name];return"index"===a?function(e,n,i){t.isString(n.from)||t.error('Lookup "from" parameter must be a string literal.');return i.getData(n.from).lookupRef(i,n.key)}(0,n,i):void 0!==r?"param"===a?function(e,n,i){var a=n[e.name];return e.array?(t.isArray(a)||t.error("Expected an array of sub-parameters. Instead: "+t.stringValue(a)),a.map(function(t){return un(e,t,i)})):un(e,a,i)}(e,n,i):"projection"===a?i.projectionRef(n[e.name]):e.array&&!R(r)?r.map(function(t){return sn(e,t,i)}):sn(e,r,i):void(e.required&&t.error("Missing required "+t.stringValue(n.type)+" parameter: "+t.stringValue(e.name)))}function sn(e,n,i){var a=e.type;if(R(n))return dn(a)?t.error("Expression references can not be signals."):cn(a)?i.fieldRef(n):fn(a)?i.compareRef(n):i.signalRef(n.signal);var r,o=e.expr||cn(a);return o&&((r=n)&&r.expr)?i.exprRef(n.expr,n.as):o&&function(e){return e&&e.field}(n)?v(n.field,n.as):dn(a)?f(n,i):function(e){return"data"===e}(a)?m(i.getData(n).values):cn(a)?v(n):fn(a)?i.compareRef(n):n}function un(e,n,i){var a,r,o,l,s;for(l=0,s=e.params.length;l<s;++l){for(o in(r=e.params[l]).key)if(r.key[o]!==n[o]){r=null;break}if(r)break}return r||t.error("Unsupported parameter: "+t.stringValue(n)),a=t.extend(on(r,n,i),r.key),m(i.add(ie(a)))}function dn(e){return"expr"===e}function cn(e){return"field"===e}function fn(e){return"compare"===e}function pn(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:m(t.getData(e.data).output)}function gn(e,t,n,i,a){this.scope=e,this.input=t,this.output=n,this.values=i,this.aggregate=a,this.index={}}gn.fromEntries=function(e,t){var n=t.length,i=1,a=t[0],r=t[n-1],o=t[n-2],l=null;for(a&&"load"===a.type&&(a=t[1]),e.add(t[0]);i<n;++i)t[i].params.pulse=m(t[i-1]),e.add(t[i]),"aggregate"===t[i].type&&(l=t[i]);return new gn(e,a,o,r,l)};var hn=gn.prototype;function mn(e){return t.isString(e)?e:null}function yn(e,t,n){var i,a=S(n.op,n.field);if(t.ops){for(var r=0,o=t.as.length;r<o;++r)if(t.as[r]===a)return}else t.ops=["count"],t.fields=[null],t.as=["count"];n.op&&(t.ops.push((i=n.op.signal)?e.signalRef(i):n.op),t.fields.push(e.fieldRef(n.field)),t.as.push(a))}function vn(e,n,i,a,r,o,l){var s,u,d=n[i]||(n[i]={}),c=function(e){return t.isObject(e)?(e.order===k?"-":"+")+S(e.op,e.field):""}(o),f=mn(r);if(null!=f&&(e=n.scope,s=d[f+=c?"|"+c:""]),!s){var p=o?{field:b,pulse:n.countsRef(e,r,o)}:{field:e.fieldRef(r),pulse:m(n.output)};c&&(p.sort=e.sortRef(o)),u=e.add(g(a,void 0,p)),l&&(n.index[r]=u),s=m(u),null!=f&&(d[f]=s)}return s}function bn(e,t,n){var i,a=e.remove,r=e.insert,o=e.toggle,l=e.modify,s=e.values,u=t.add(h());i=f("if("+e.trigger+',modify("'+n+'",'+[r,a,o,l,s].map(function(e){return null==e?"null":e}).join(",")+"),0)",t),u.update=i.$expr,u.params=i.$params}function xn(e,n){var i,a,r,o,l,s,u,d,c,f,p,g,h,y=tn(e),b=e.type===_t,x=e.from&&e.from.facet,k=e.layout||y===rt||y===at,S=y===it||k||x,$=e.overlap;r=function(e,n,i){var a,r,o,l,s;return e?(a=e.facet)&&(n||t.error("Only group marks can be faceted."),null!=a.field?l=s=pn(a,i):(e.data?s=m(i.getData(e.data).aggregate):((o=rn(t.extend({type:"aggregate",groupby:t.array(a.groupby)},a.aggregate),i)).params.key=i.keyRef(a.groupby),o.params.pulse=pn(a,i),l=s=m(i.add(o))),r=i.keyRef(a.groupby,!0))):l=m(i.add(q(null,[{}]))),l||(l=pn(e,i)),{key:r,pulse:l,parent:s}}(e.from,b,n),c=m(a=n.add(N({key:r.key||(e.key?v(e.key):void 0),pulse:r.pulse,clean:!b}))),a=o=n.add(q({pulse:c})),a=n.add(Z({markdef:nn(e),interactive:an(e.interactive,n),clip:Zt(e.clip,n),context:{$context:!0},groups:n.lookup(),parent:n.signals.parent?n.signalRef("parent"):null,index:n.markpath(),pulse:m(a)})),f=m(a),(a=n.add(G(Ot(e.encode,e.type,y,e.style,n,{pulse:f})))).params.parent=n.encode(),e.transform&&e.transform.forEach(function(e){var i=rn(e,n);(i.metadata.generates||i.metadata.changes)&&t.error("Mark transforms should not generate new data."),i.params.pulse=m(a),n.add(a=i)}),e.sort&&(a=n.add(ce({sort:n.compareRef(e.sort,!0),pulse:m(a)}))),p=m(a),(x||k)&&(g=m(k=n.add(fe({layout:n.objectProperty(e.layout),legends:n.legends,mark:f,pulse:p})))),h=m(l=n.add(U({mark:f,pulse:g||p}))),b&&(S&&((i=n.operators).pop(),k&&i.pop()),n.pushState(p,g||h,c),x?function(e,n,i){var a,r,o,l,s=e.from.facet,u=s.name,d=pn(s,n);s.name||t.error("Facet must have a name: "+t.stringValue(s)),s.data||t.error("Facet must reference a data set: "+t.stringValue(s)),s.field?l=n.add(ae({field:n.fieldRef(s.field),pulse:d})):s.groupby?l=n.add(Q({key:n.keyRef(s.groupby),group:m(n.proxy(i.parent)),pulse:d})):t.error("Facet must specify groupby or field: "+t.stringValue(s)),r=(a=n.fork()).add(q()),o=a.add(de({pulse:m(r)})),a.addData(u,new gn(a,r,r,o)),a.addSignal("parent",null),l.params.subflow={$subflow:En(e,a).toRuntime()}}(e,n,r):S?function(e,t,n){var i=t.add(ae({pulse:n.pulse})),a=t.fork();a.add(de()),a.addSignal("parent",null),i.params.subflow={$subflow:En(e,a).toRuntime()}}(e,n,r):En(e,n),n.popState(),S&&(k&&i.push(k),i.push(l))),$&&(h=function(e,t,n){var i,a=e.method,r=e.bound,o=e.separation,l={separation:R(o)?n.signalRef(o.signal):o,method:R(a)?n.signalRef(a.signal):a,pulse:t};e.order&&(l.sort=n.compareRef({field:e.order}));r&&(i=r.tolerance,l.boundTolerance=R(i)?n.signalRef(i.signal):+i,l.boundScale=n.scaleRef(r.scale),l.boundOrient=r.orient);return m(n.add(ne(l)))}($,h,n)),s=n.add(se({pulse:h})),u=n.add(de({pulse:m(s)},void 0,n.parent())),null!=e.name&&(d=e.name,n.addData(d,new gn(n,o,s,u)),e.on&&e.on.forEach(function(e){(e.insert||e.remove||e.toggle)&&t.error("Marks only support modify triggers."),bn(e,n,d)}))}function kn(e,n){var i,a,o,l,s,u,d,c,p,g=n.config.legend,h=e.encode||{},y=h.legend||{},v=y.name||void 0,b=y.interactive,x=y.style,k=zt(e,g),S=Ue.reduce(function(t,n){return t||e[n]},0);return S||t.error("Missing valid scale for legend."),s=function(e,t){var n=e.type||Te;e.type||1!==function(e){return Ue.reduce(function(t,n){return t+(e[n]?1:0)},0)}(e)||!e.fill&&!e.stroke||(n=r.isContinuous(t)?Me:r.isDiscretizing(t)?Be:Te);return n!==Me?n:r.isDiscretizing(t)?Be:Me}(e,n.scaleType(S)),u={title:null!=e.title,type:s,vgrad:"symbol"!==s&&k.isVertical()},d=m(n.add(q(null,[u]))),y=$t(function(e,t){var n={enter:{},update:{}};return St(n,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:t.strokeWidth,strokeDash:t.strokeDash}),n}(k,g),y,qe),i={enter:{x:{value:0},y:{value:0}}},c=m(n.add(J(o={type:s,scale:n.scaleRef(S),count:n.objectProperty(e.tickCount),values:n.objectProperty(e.values),minstep:n.property(e.tickMinStep),formatType:n.property(e.formatType),formatSpecifier:n.property(e.format)}))),s===Me?(l=[Lt(e,S,g,h.gradient),Bt(e,g,h.labels,c)],o.count=o.count||n.signalRef(`max(2,2*floor((${z(k.gradientLength())})/100))`)):s===Be?l=[Ft(e,S,g,h.gradient,c),Bt(e,g,h.labels,c)]:(a=function(e,t){const n=zt(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}(e,g),l=[qt(e,g,h,c,z(a.columns))],o.size=function(e,t,n){var i=z(Sn("size",e,n)),a=z(Sn("strokeWidth",e,n)),r=z(function(e,t,n){return Vt("fontSize",e)||function(e,t,n){var i=t.config.style[n];return i&&i[e]}("fontSize",t,n)}(n[1].encode,t,Ae));return f(`max(ceil(sqrt(${i})+${a}),${r})`,t)}(e,n,l[0].marks)),l=[Ut(gt,null,null,d,b,i,l,a)],u.title&&l.push(function(e,t,n,i){var a,r=zt(e,t);return St(a={enter:{opacity:Ie},update:{opacity:Ne,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:Ie}},{orient:r("titleOrient"),_anchor:r("titleAnchor"),anchor:{signal:Yt},angle:{signal:Jt},align:{signal:Xt},baseline:{signal:Kt},text:e.title,fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit")},{align:r("titleAlign"),baseline:r("titleBaseline")}),wt(At,vt,Le,null,i,a,n)}(e,g,h.title,d)),p=Ut(ft,x,v,d,b,y,l),e.zindex&&(p.zindex=e.zindex),xn(p,n)}function Sn(e,t,n){return t[e]?`scale("${t[e]}",datum)`:Vt(e,n[0].encode)}hn.countsRef=function(e,t,n){var i,a,r,o=this.counts||(this.counts={}),l=mn(t);return null!=l&&(e=this.scope,i=o[l]),i?n&&n.field&&yn(e,i.agg.params,n):(r={groupby:e.fieldRef(t,"key"),pulse:m(this.output)},n&&n.field&&yn(e,r,n),a=e.add(M(r)),i=e.add(q({pulse:m(a)})),i={agg:a,ref:m(i)},null!=l&&(o[l]=i)),i.ref},hn.tuplesRef=function(){return m(this.values)},hn.extentRef=function(e,t){return vn(e,this,"extent","extent",t,!1)},hn.domainRef=function(e,t){return vn(e,this,"domain","values",t,!1)},hn.valuesRef=function(e,t,n){return vn(e,this,"vals","values",t,n||!0)},hn.lookupRef=function(e,t){return vn(e,this,"lookup","tupleindex",t,!1)},hn.indataRef=function(e,t){return vn(e,this,"indata","tupleindex",t,!0,!0)};const $n=`item.orient==="${$e}"?-90:item.orient==="${Oe}"?90:0`,On=`item.orient==="${Re}"?"${Se}":"${Re}"`;function Rn(e,n){e=t.isString(e)?{text:e}:e;var i,a,r=n.config.title,o=t.extend({},e.encode);return i=m(n.add(q(null,[{}]))),o.name=e.name,o.interactive=e.interactive,a=function(e,t,n,i){var a,r=zt(e,t),o={value:0},l=e.text;return St(a={enter:{opacity:o},update:{opacity:{value:1}},exit:{opacity:o}},{text:l,orient:r("orient"),anchor:r("anchor"),align:{signal:Pt},angle:{signal:$n},baseline:{signal:On},dx:r("dx"),dy:r("dy"),fill:r("color"),font:r("font"),fontSize:r("fontSize"),fontStyle:r("fontStyle"),fontWeight:r("fontWeight"),frame:r("frame"),limit:r("limit"),offset:r("offset")||0},{align:r("align"),angle:r("angle"),baseline:r("baseline")}),wt(At,bt,e.style||Fe,null,i,a,n)}(e,r,o,i),e.zindex&&(a.zindex=e.zindex),xn(a,n)}function jn(e,n){var i=[];e.transform&&e.transform.forEach(function(e){i.push(rn(e,n))}),e.on&&e.on.forEach(function(t){bn(t,n,e.name)}),n.addDataPipeline(e.name,function(e,n,i){var a,r,o,l,s,u=[],d=null,c=!1,f=!1;e.values?j(e.values)||j(e.format)?(u.push(zn(n,e)),u.push(d=wn())):u.push(d=wn({$ingest:e.values,$format:e.format})):e.url?j(e.url)||j(e.format)?(u.push(zn(n,e)),u.push(d=wn())):u.push(d=wn({$request:e.url,$format:e.format})):e.source&&(d=a=t.array(e.source).map(function(e){return m(n.getData(e).output)}),u.push(null));for(r=0,o=i.length;r<o;++r)l=i[r],s=l.metadata,d||s.source||u.push(d=wn()),u.push(l),s.generates&&(f=!0),s.modifies&&!f&&(c=!0),s.source?d=l:s.changes&&(d=null);a&&(o=a.length-1,u[0]=le({derive:c,pulse:o?a:a[0]}),(c||o)&&u.splice(1,0,wn()));d||u.push(wn());return u.push(de({})),u}(e,n,i))}function wn(e){var t=q({},e);return t.metadata={source:!0},t}function zn(e,t){return K({url:t.url?e.property(t.url):void 0,values:t.values?e.property(t.values):void 0,format:e.objectProperty(t.format)})}function Vn(e,t){return{scale:e.scale,range:t}}function Dn(e,n,i,a){var r,o,l,s,u,d,c,f,p,g=zt(e,n),h=e.orient,m=e.gridScale,y=h===$e||h===Se?1:-1,v=function(e,n){if(1===n);else if(t.isObject(e)){for(var i=e=t.extend({},e);null!=i.mult;){if(!t.isObject(i.mult))return i.mult*=n,e;i=i.mult=t.extend({},i.mult)}i.mult=n}else e=n*(e||0);return e}(e.offset,y);return St(r={enter:o={opacity:Ie},update:s={opacity:Ne},exit:l={opacity:Ie}},{stroke:g("gridColor"),strokeDash:g("gridDash"),strokeDashOffset:g("gridDashOffset"),strokeOpacity:g("gridOpacity"),strokeWidth:g("gridWidth")}),u={scale:e.scale,field:Ce,band:g("bandPosition"),round:g("tickRound"),extra:g("tickExtra"),offset:g("tickOffset")},h===Se||h===Re?(d="x",c="y",p="height"):(d="y",c="x",p="width"),f=c+"2",s[d]=o[d]=l[d]=u,m?(s[c]=o[c]={scale:m,range:0,mult:y,offset:v},s[f]=o[f]={scale:m,range:1,mult:y,offset:v}):(s[c]=o[c]={value:0,offset:v},s[f]=o[f]={signal:p,mult:y,offset:v}),wt(Wt,st,null,Ce,a,r,i)}function Pn(e,t,n,i,a){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+i+","+a+")"}}function _n(e,n){var i,a,r,o,l,s,u=function(e,n){var i=n.config,a=e.orient,r=a===Se||a===Re?i.axisX:i.axisY,o=i["axis"+a[0].toUpperCase()+a.slice(1)],l="band"===n.scaleType(e.scale)&&i.axisBand;return r||o||l?t.extend({},i.axis,r,o,l):i.axis}(e,n),d=e.encode||{},c=d.axis||{},f=c.name||void 0,p=c.interactive,g=c.style,h=zt(e,u);return i={orient:e.orient,ticks:!!h("ticks"),labels:!!h("labels"),grid:!!h("grid"),domain:!!h("domain"),title:null!=e.title},a=m(n.add(q({},[i]))),c=$t({update:{offset:xt(h("offset")||0),position:xt(w(e.position,0)),titlePadding:xt(h("titlePadding")),minExtent:xt(h("minExtent")),maxExtent:xt(h("maxExtent")),range:{signal:`abs(span(range("${e.scale}")))`}}},d.axis,qe),r=m(n.add(B({scale:n.scaleRef(e.scale),extra:n.property(h("tickExtra")),count:n.objectProperty(e.tickCount),values:n.objectProperty(e.values),minstep:n.property(e.tickMinStep),formatType:n.property(e.formatType),formatSpecifier:n.property(e.format)}))),s=[],i.grid&&s.push(Dn(e,u,d.grid,r)),i.ticks&&(o=h("tickSize"),s.push(function(e,t,n,i,a){var r,o,l,s,u,d,c=zt(e,t),f=e.orient,p=f===$e||f===Se?-1:1;return St(r={enter:o={opacity:Ie},update:s={opacity:Ne},exit:l={opacity:Ie}},{stroke:c("tickColor"),strokeDash:c("tickDash"),strokeDashOffset:c("tickDashOffset"),strokeOpacity:c("tickOpacity"),strokeWidth:c("tickWidth")}),(u=xt(a)).mult=p,d={scale:e.scale,field:Ce,band:c("bandPosition"),round:c("tickRound"),extra:c("tickExtra"),offset:c("tickOffset")},f===Se||f===Re?(s.y=o.y=Ie,s.y2=o.y2=u,s.x=o.x=l.x=d):(s.x=o.x=Ie,s.x2=o.x2=u,s.y=o.y=l.y=d),wt(Wt,dt,null,Ce,i,r,n)}(e,u,d.ticks,r,o))),i.labels&&(o=i.ticks?o:0,s.push(function(e,t,n,i,a){var r,o,l,s,u,d,c,f,p,g,h=zt(e,t),m=e.orient,y=m===$e||m===Se?-1:1,v=m===Se||m===Re,b=e.scale,x=z(h("labelFlush")),k=z(h("labelFlushOffset")),S=0===x||!!x,$=h("labelAlign"),O=h("labelBaseline");return(l=xt(a)).mult=y,l.offset=xt(h("labelPadding")||0),l.offset.mult=y,s={scale:b,field:Ce,band:.5,offset:h("tickOffset")},v?(u=$||(S?Pn(b,x,'"left"','"right"','"center"'):"center"),d=O||(m===Se?"bottom":"top"),c=!$):(u=$||(m===Oe?"left":"right"),d=O||(S?Pn(b,x,'"top"','"bottom"','"middle"'):"middle"),c=!O),c=c&&S&&k?Pn(b,x,"-"+k,k,0):null,St(r={enter:o={opacity:Ie,x:v?s:l,y:v?l:s},update:{opacity:Ne,text:{field:De},x:o.x,y:o.y},exit:{opacity:Ie,x:o.x,y:o.y}},{[v?"dx":"dy"]:c,align:u,baseline:d,angle:h("labelAngle"),fill:h("labelColor"),fillOpacity:h("labelOpacity"),font:h("labelFont"),fontSize:h("labelFontSize"),fontWeight:h("labelFontWeight"),fontStyle:h("labelFontStyle"),limit:h("labelLimit")}),f=h("labelBound"),p=h("labelOverlap"),g=h("labelSeparation"),e=wt(At,ut,Ae,Ce,i,r,n),(p||f)&&(e.overlap={separation:g,method:p,order:"datum.index",bound:f?{scale:b,orient:m,tolerance:f}:null}),e}(e,u,d.labels,r,o))),i.domain&&s.push(function(e,t,n,i){var a,r,o,l,s,u,d=zt(e,t),c=e.orient;return St(a={enter:r={opacity:Ie},update:o={opacity:Ne},exit:{opacity:Ie}},{stroke:d("domainColor"),strokeDash:d("domainDash"),strokeDashOffset:d("domainDashOffset"),strokeWidth:d("domainWidth"),strokeOpacity:d("domainOpacity")}),c===Se||c===Re?(l="x",u="y"):(l="y",u="x"),s=l+"2",r[u]=Ie,o[l]=r[l]=Vn(e,0),o[s]=r[s]=Vn(e,1),wt(Wt,lt,null,null,i,a,n)}(e,u,d.domain,a)),i.title&&s.push(function(e,n,i,a){var r,o,l,s,u=zt(e,n),d=e.orient,c=d===$e||d===Se?-1:1,f=d===Se||d===Re;return r={enter:o={opacity:Ie,anchor:xt(u("titleAnchor")),align:{signal:Pt}},update:l=t.extend({},o,{opacity:Ne,text:xt(e.title)}),exit:{opacity:Ie}},s={signal:`lerp(range("${e.scale}"), ${Dt(0,1,.5)})`},f?(l.x=s,o.angle={value:0},o.baseline={value:d===Se?"bottom":"top"}):(l.y=s,o.angle={value:90*c},o.baseline={value:"bottom"}),St(r,{angle:u("titleAngle"),baseline:u("titleBaseline"),fill:u("titleColor"),fillOpacity:u("titleOpacity"),font:u("titleFont"),fontSize:u("titleFontSize"),fontStyle:u("titleFontStyle"),fontWeight:u("titleFontWeight"),limit:u("titleLimit")},{align:u("titleAlign")}),!kt(r,"x",u("titleX"),"update")&&!f&&!jt("x",i)&&(r.enter.auto={value:!0}),!kt(r,"y",u("titleY"),"update")&&f&&!jt("y",i)&&(r.enter.auto={value:!0}),wt(At,ct,Le,null,a,r,i)}(e,u,d.title,a)),l=Ut(ot,g,f,a,p,c,s),e.zindex&&(l.zindex=e.zindex),xn(l,n)}function En(e,n,i){var a=t.array(e.signals),o=t.array(e.scales);return i||a.forEach(function(e){c(e,n)}),t.array(e.projections).forEach(function(e){!function(e,t){var n={};for(var i in e)"name"!==i&&(n[i]=ke(e[i],i,t));t.addProjection(e.name,n)}(e,n)}),o.forEach(function(e){!function(e,n){var i=e.type||"linear";r.isValidScaleType(i)||t.error("Unrecognized scale type: "+t.stringValue(i)),n.addScale(e.name,{type:i,domain:void 0})}(e,n)}),t.array(e.data).forEach(function(e){jn(e,n)}),o.forEach(function(e){he(e,n)}),a.forEach(function(e){F(e,n)}),t.array(e.axes).forEach(function(e){_n(e,n)}),t.array(e.marks).forEach(function(e){xn(e,n)}),t.array(e.legends).forEach(function(e){kn(e,n)}),e.title&&Rn(e.title,n),n.parseLambdas(),n}var Wn=t.toSet(["width","height","padding","autosize"]);function Cn(e,n){var i,a,r,o,s,u=n.config;return n.background=e.background||u.background,n.eventConfig=u.events,s=m(n.root=n.add(h())),n.addSignal("width",e.width||0),n.addSignal("height",e.height||0),n.addSignal("padding",function(e,n){return e=e||n.padding,t.isObject(e)?{top:l(e.top),bottom:l(e.bottom),left:l(e.left),right:l(e.right)}:{top:i=l(e),bottom:i,left:i,right:i};var i}(e.padding,u)),n.addSignal("autosize",function(e,n){return e=e||n.autosize,t.isObject(e)?e:{type:e||"pad"}}(e.autosize,u)),n.legends=n.objectProperty(u.legend&&u.legend.layout),t.array(e.signals).forEach(function(e){Wn[e.name]||c(e,n)}),a=n.add(q()),r=$t({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e.encode),r=n.add(G(Ot(r,_t,at,e.style,n,{pulse:m(a)}))),o=n.add(fe({layout:n.objectProperty(e.layout),legends:n.legends,autosize:n.signalRef("autosize"),mark:s,pulse:m(r)})),n.operators.pop(),n.pushState(m(r),m(o),null),En(e,n,!0),n.operators.push(o),i=n.add(U({mark:s,pulse:m(o)})),i=n.add(se({pulse:m(i)})),i=n.add(de({pulse:m(i)})),n.addData("root",new gn(n,a,a,i)),n}function An(e){this.config=e,this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.background=null,this.eventConfig=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function Ln(e){this.config=e.config,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}var Fn=An.prototype=Ln.prototype;function Tn(e){return(t.isArray(e)?function(e){for(var n,i="[",a=0,r=e.length;a<r;++a)n=e[a],i+=(a>0?",":"")+(t.isObject(n)?n.signal||Tn(n):t.stringValue(n));return i+"]"}:function(e){var n,i,a="{",r=0;for(n in e)i=e[n],a+=(++r>1?",":"")+t.stringValue(n)+":"+(t.isObject(i)?i.signal||Tn(i):t.stringValue(i));return a+"}"})(e)}function Mn(e){return(e||[]).reduce((e,t)=>{for(var n in t){var i="legend"===n?{layout:1}:"style"===n||null;Bn(e,n,t[n],i)}return e},{padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:Nn},area:{fill:Nn},image:null,line:{stroke:Nn,strokeWidth:In},path:{stroke:Nn},rect:{fill:Nn},rule:{stroke:Gn},shape:{stroke:Nn},symbol:{fill:Nn,size:64},text:{fill:Gn,font:Un,fontSize:11},style:{"guide-label":{fill:Gn,font:Un,fontSize:10},"guide-title":{fill:Gn,font:Un,fontSize:11,fontWeight:"bold"},"group-title":{fill:Gn,font:Un,fontSize:13,fontWeight:"bold"},point:{size:qn,strokeWidth:In,shape:"circle"},circle:{size:qn,strokeWidth:In},square:{size:qn,strokeWidth:In,shape:"square"},cell:{fill:"transparent",stroke:Qn}},title:{orient:"top",anchor:"middle",offset:4},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:Hn,grid:!1,gridWidth:1,gridColor:Qn,labels:!0,labelAngle:0,labelLimit:180,labelPadding:2,ticks:!0,tickColor:Hn,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-1},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:Qn,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:Hn,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}})}function Bn(e,n,i,a){var r,o;if(t.isObject(i)&&!t.isArray(i))for(r in o=t.isObject(e[n])?e[n]:e[n]={},i)a&&a[r]?Bn(o,r,i[r]):o[r]=i[r];else e[n]=i}Fn.fork=function(){return new Ln(this)},Fn.isSubscope=function(){return this._subid>0},Fn.toRuntime=function(){return this.finish(),{background:this.background,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig}},Fn.id=function(){return(this._subid?this._subid+":":0)+this._id++},Fn.add=function(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach(function(t){t.$ref=e.id}),e.refs=null),e},Fn.proxy=function(e){var t=e instanceof p?m(e):e;return this.add(oe({value:t}))},Fn.addStream=function(e){return this.streams.push(e),e.id=this.id(),e},Fn.addUpdate=function(e){return this.updates.push(e),e},Fn.finish=function(){var e,t;for(e in this.root&&(this.root.root=!0),this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(e,t,n){var i;e&&((i=e.data||(e.data={}))[t]||(i[t]=[])).push(n)}for(e in this.data)for(var i in n((t=this.data[e]).input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values"),t.index)n(t.index[i],e,"index:"+i);return this},Fn.pushState=function(e,t,n){this._encode.push(m(this.add(de({pulse:e})))),this._parent.push(t),this._lookup.push(n?m(this.proxy(n)):null),this._markpath.push(-1)},Fn.popState=function(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},Fn.parent=function(){return t.peek(this._parent)},Fn.encode=function(){return t.peek(this._encode)},Fn.lookup=function(){return t.peek(this._lookup)},Fn.markpath=function(){var e=this._markpath;return++e[e.length-1]},Fn.fieldRef=function(e,n){if(t.isString(e))return v(e,n);e.signal||t.error("Unsupported field reference: "+t.stringValue(e));var i,a=e.signal,r=this.field[a];return r||(i={name:this.signalRef(a)},n&&(i.as=n),this.field[a]=r=m(this.add(X(i)))),r},Fn.compareRef=function(e,n){function i(e){return R(e)?(r=!0,a.signalRef(e.signal)):e}var a=this,r=!1,o=t.array(e.field).map(i),l=t.array(e.order).map(i);return n&&o.push(y),r?m(this.add(I({fields:o,orders:l}))):x(o,l)},Fn.keyRef=function(e,n){var i=this.signals,a=!1;return e=t.array(e).map(function(e){return R(e)?(a=!0,m(i[e.signal])):e}),a?m(this.add(Y({fields:e,flat:n}))):function(e,t){var n={$key:e};return t&&(n.$flat=!0),n}(e,n)},Fn.sortRef=function(e){if(!e)return e;var t=[S(e.op,e.field),y],n=e.order||"ascending";return n.signal?m(this.add(I({fields:t,orders:[n=this.signalRef(n.signal),n]}))):x(t,[n,n])},Fn.event=function(e,t){var n=e+":"+t;if(!this.events[n]){var i=this.id();this.streams.push({id:i,source:e,type:t}),this.events[n]=i}return this.events[n]},Fn.addSignal=function(e,n){this.signals.hasOwnProperty(e)&&t.error("Duplicate signal name: "+t.stringValue(e));var i=n instanceof p?n:this.add(h(n));return this.signals[e]=i},Fn.getSignal=function(e){return this.signals[e]||t.error("Unrecognized signal name: "+t.stringValue(e)),this.signals[e]},Fn.signalRef=function(e){return this.signals[e]?m(this.signals[e]):(this.lambdas.hasOwnProperty(e)||(this.lambdas[e]=this.add(h(null))),m(this.lambdas[e]))},Fn.parseLambdas=function(){for(var e=Object.keys(this.lambdas),t=0,n=e.length;t<n;++t){var i=e[t],a=f(i,this),r=this.lambdas[i];r.params=a.$params,r.update=a.$expr}},Fn.property=function(e){return e&&e.signal?this.signalRef(e.signal):e},Fn.objectProperty=function(e){return e&&t.isObject(e)?this.signalRef(e.signal||Tn(e)):e},Fn.exprRef=function(e,t){var n={expr:f(e,this)};return t&&(n.expr.$name=t),m(this.add(H(n)))},Fn.addBinding=function(e,n){this.bindings||t.error("Nested signals do not support binding: "+t.stringValue(e)),this.bindings.push(t.extend({signal:e},n))},Fn.addScaleProj=function(e,n){this.scales.hasOwnProperty(e)&&t.error("Duplicate scale or projection name: "+t.stringValue(e)),this.scales[e]=this.add(n)},Fn.addScale=function(e,t){this.addScaleProj(e,ue(t))},Fn.addProjection=function(e,t){this.addScaleProj(e,re(t))},Fn.getScale=function(e){return this.scales[e]||t.error("Unrecognized scale name: "+t.stringValue(e)),this.scales[e]},Fn.projectionRef=Fn.scaleRef=function(e){return m(this.getScale(e))},Fn.projectionType=Fn.scaleType=function(e){return this.getScale(e).params.type},Fn.addData=function(e,n){return this.data.hasOwnProperty(e)&&t.error("Duplicate data set name: "+t.stringValue(e)),this.data[e]=n},Fn.getData=function(e){return this.data[e]||t.error("Undefined data set name: "+t.stringValue(e)),this.data[e]},Fn.addDataPipeline=function(e,n){return this.data.hasOwnProperty(e)&&t.error("Duplicate data set name: "+t.stringValue(e)),this.addData(e,gn.fromEntries(this,n))};var Un="sans-serif",qn=30,In=2,Nn="#4c78a8",Gn="#000",Hn="#888",Qn="#ddd";e.parse=function(e,n){return t.isObject(e)||t.error("Input Vega specification must be an object."),Cn(e,new An(Mn([n,e.config]))).toRuntime()},e.config=Mn,e.signal=c,e.signalUpdates=F,e.stream=D,e.MarkRole=it,e.FrameRole=at,e.ScopeRole=rt,e.AxisRole=ot,e.AxisDomainRole=lt,e.AxisGridRole=st,e.AxisLabelRole=ut,e.AxisTickRole=dt,e.AxisTitleRole=ct,e.LegendRole=ft,e.LegendEntryRole=gt,e.LegendLabelRole=mt,e.LegendSymbolRole=yt,e.LegendTitleRole=vt,e.Scope=An,e.DataScope=gn,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vega-util"),require("vega-expression"),require("vega-functions"),require("vega-event-selector"),require("vega-scale"),require("vega-dataflow")):"function"==typeof define&&define.amd?define(["exports","vega-util","vega-expression","vega-functions","vega-event-selector","vega-scale","vega-dataflow"],t):t((e=e||self).vega={},e.vega,e.vega,e.vega,e.vega,e.vega,e.vega)}(this,function(e,t,n,i,a,r,o){"use strict";function l(e){return+e||0}var s="outer",u=["value","update","init","react","bind"];function d(e,n){t.error(e+' for "outer" push: '+t.stringValue(n))}function c(e,t){var n=e.name;if(e.push===s)t.signals[n]||d("No prior signal definition",n),u.forEach(function(t){void 0!==e[t]&&d("Invalid property ",t)});else{var i=t.addSignal(n,e.value);!1===e.react&&(i.react=!1),e.bind&&t.addBinding(n,e.bind)}}function f(e,a,r){var o,l,s={};try{e=t.isString(e)?e:t.stringValue(e)+"",o=n.parse(e)}catch(n){t.error("Expression parse error: "+e)}return o.visit(function(e){if(e.type===n.CallExpression){var t=e.callee.name,r=i.codegenParams.visitors[t];r&&r(t,e.arguments,a,s)}}),(l=i.codeGenerator(o)).globals.forEach(function(e){var t=i.SignalPrefix+e;!s.hasOwnProperty(t)&&a.getSignal(e)&&(s[t]=a.signalRef(e))}),{$expr:r?r+"return("+l.code+");":l.code,$fields:l.fields,$params:s}}function p(e,t,n,i){this.id=-1,this.type=e,this.value=t,this.params=n,i&&(this.parent=i)}function g(e,t,n,i){return new p(e,t,n,i)}function h(e,t){return g("operator",e,t)}function m(e){var t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}var y={$tupleid:1,toString:function(){return":_tupleid_:"}};function v(e,t){return t?{$field:e,$name:t}:{$field:e}}var b=v("key");function x(e,t){return{$compare:e,$order:t}}var k="descending";function S(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}var $="scope",O="view";function R(e){return e&&e.signal}function j(e){if(R(e))return!0;if(t.isObject(e))for(var n in e)if(j(e[n]))return!0;return!1}function w(e,t){return null!=e?e:t}function z(e){return e&&e.signal||e}var V="timer";function D(e,n){return(e.merge?P:e.stream?_:e.type?E:t.error("Invalid stream specification: "+t.stringValue(e)))(e,n)}function P(e,t){var n=W({merge:e.merge.map(e=>D(e,t))},e,t);return t.addStream(n).id}function _(e,t){var n=W({stream:D(e.stream,t)},e,t);return t.addStream(n).id}function E(e,t){var n,i,a;return e.type===V?(n=t.event(V,e.throttle),e={between:e.between,filter:e.filter}):n=t.event((a=e.source)===$?O:a||O,e.type),i=W({stream:n},e,t),1===Object.keys(i).length?n:t.addStream(i).id}function W(e,n,i){var a,r,o,l,s=n.between;return s&&(2!==s.length&&t.error('Stream "between" parameter must have 2 entries: '+t.stringValue(n)),e.between=[D(s[0],i),D(s[1],i)]),s=n.filter?[].concat(n.filter):[],(n.marktype||n.markname||n.markrole)&&s.push((a=n.marktype,r=n.markname,o=n.markrole,(l="event.item")+(a&&"*"!==a?"&&"+l+".mark.marktype==='"+a+"'":"")+(o?"&&"+l+".mark.role==='"+o+"'":"")+(r?"&&"+l+".mark.name==='"+r+"'":""))),n.source===$&&s.push("inScope(event.item)"),s.length&&(e.filter=f("("+s.join(")&&(")+")").$expr),null!=(s=n.throttle)&&(e.throttle=+s),null!=(s=n.debounce)&&(e.debounce=+s),n.consume&&(e.consume=!0),e}var C="var datum=event.item&&event.item.datum;";function A(e,n,i){var r=e.events,o=e.update,l=e.encode,s=[],u={target:i};r||t.error("Signal update missing events specification."),t.isString(r)&&(r=a.selector(r,n.isSubscope()?$:O)),r=t.array(r).filter(e=>e.signal||e.scale?(s.push(e),0):1),s.length>1&&(s=[L(s)]),r.length&&s.push(r.length>1?{merge:r}:r[0]),null!=l&&(o&&t.error("Signal encode and update are mutually exclusive."),o="encode(item(),"+t.stringValue(l)+")"),u.update=t.isString(o)?f(o,n,C):null!=o.expr?f(o.expr,n,C):null!=o.value?o.value:null!=o.signal?{$expr:"_.value",$params:{value:n.signalRef(o.signal)}}:t.error("Invalid signal update specification."),e.force&&(u.options={force:!0}),s.forEach(function(e){n.addUpdate(t.extend(function(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):D(e,t)}}(e,n),u))})}function L(e){return{signal:"["+e.map(e=>e.scale?'scale("'+e.scale+'")':e.signal)+"]"}}function F(e,n){var i=n.getSignal(e.name),a=e.update;e.init&&(a?t.error("Signals can not include both init and update expressions."):(a=e.init,i.initonly=!0)),a&&(a=f(a,n),i.update=a.$expr,i.params=a.$params),e.on&&e.on.forEach(function(e){A(e,n,i.id)})}function T(e){return function(t,n,i){return g(e,n,t||void 0,i)}}var M=T("aggregate"),B=T("axisticks"),U=T("bound"),q=T("collect"),I=T("compare"),N=T("datajoin"),G=T("encode"),H=T("expression"),Q=T("facet"),X=T("field"),Y=T("key"),J=T("legendentries"),K=T("load"),Z=T("mark"),ee=T("multiextent"),te=T("multivalues"),ne=T("overlap"),ie=T("params"),ae=T("prefacet"),re=T("projection"),oe=T("proxy"),le=T("relay"),se=T("render"),ue=T("scale"),de=T("sieve"),ce=T("sortitems"),fe=T("viewlayout"),pe=T("values"),ge=0;function he(e,n){var i,a,o=n.getScale(e.name).params;for(i in o.domain=be(e.domain,e,n),null!=e.range&&(o.range=function e(n,i,a){var o=n.range,l=i.config.range;if(o.signal)return i.signalRef(o.signal);if(t.isString(o)){if(l&&l.hasOwnProperty(o))return n=t.extend({},n,{range:l[o]}),e(n,i,a);"width"===o?o=[0,{signal:"width"}]:"height"===o?o=r.isDiscrete(n.type)?[0,{signal:"height"}]:[{signal:"height"},0]:t.error("Unrecognized scale range value: "+t.stringValue(o))}else{if(o.scheme)return a.scheme=t.isArray(o.scheme)?ye(o.scheme,i):me(o.scheme,i),o.extent&&(a.schemeExtent=ye(o.extent,i)),void(o.count&&(a.schemeCount=me(o.count,i)));if(o.step)return void(a.rangeStep=me(o.step,i));if(r.isDiscrete(n.type)&&!t.isArray(o))return be(o,n,i);t.isArray(o)||t.error("Unsupported range type: "+t.stringValue(o))}return o.map(e=>(t.isArray(e)?ye:me)(e,i))}(e,n,o)),null!=e.interpolate&&function(e,t){t.interpolate=me(e.type||e),null!=e.gamma&&(t.interpolateGamma=me(e.gamma))}(e.interpolate,o),null!=e.nice&&(o.nice=(a=e.nice,t.isObject(a)?{interval:me(a.interval),step:me(a.step)}:me(a))),null!=e.bins&&(o.bins=function(e,n){return e.signal||t.isArray(e)?ye(e,n):n.objectProperty(e)}(e.bins,n)),e)o.hasOwnProperty(i)||"name"===i||(o[i]=me(e[i],n))}function me(e,n){return t.isObject(e)?e.signal?n.signalRef(e.signal):t.error("Unsupported object: "+t.stringValue(e)):e}function ye(e,t){return e.signal?t.signalRef(e.signal):e.map(e=>me(e,t))}function ve(e){t.error("Can not find data set: "+t.stringValue(e))}function be(e,n,i){if(e)return e.signal?i.signalRef(e.signal):(t.isArray(e)?function(e,t,n){return e.map(function(e){return me(e,n)})}:e.fields?function(e,n,i){var a=e.data,o=e.fields.reduce(function(e,n){return n=t.isString(n)?{data:a,field:n}:t.isArray(n)||n.signal?function(e,n){var i="_:vega:_"+ge++,a=q({});if(t.isArray(e))a.value={$ingest:e};else if(e.signal){var r="setdata("+t.stringValue(i)+","+e.signal+")";a.params.input=n.signalRef(r)}return n.addDataPipeline(i,[a,de({})]),{data:i,field:"data"}}(n,i):n,e.push(n),e},[]);return(r.isDiscrete(n.type)?function(e,t,n){var i,a,r,o;return i=n.map(function(e){var n=t.getData(e.data);return n||ve(e.data),n.countsRef(t,e.field)}),a=t.add(M({groupby:b,ops:["sum"],fields:[t.fieldRef("count")],as:["count"],pulse:i})),r=t.add(q({pulse:m(a)})),o=t.add(pe({field:b,sort:t.sortRef(xe(e.sort,!0)),pulse:m(r)})),m(o)}:r.isQuantile(n.type)?function(e,t,n){var i=n.map(function(e){var n=t.getData(e.data);return n||ve(e.data),n.domainRef(t,e.field)});return m(t.add(te({values:i})))}:function(e,t,n){var i=n.map(function(e){var n=t.getData(e.data);return n||ve(e.data),n.extentRef(t,e.field)});return m(t.add(ee({extents:i})))})(e,i,o)}:function(e,t,n){var i=n.getData(e.data);i||ve(e.data);return r.isDiscrete(t.type)?i.valuesRef(n,e.field,xe(e.sort,!1)):r.isQuantile(t.type)?i.domainRef(n,e.field):i.extentRef(n,e.field)})(e,n,i);null==n.domainMin&&null==n.domainMax||t.error("No scale domain defined for domainMin/domainMax to override.")}function xe(e,n){return e&&(e.field||e.op?e.field||"count"===e.op?n&&e.field?t.error("Multiple domain scales can not sort by field."):n&&e.op&&"count"!==e.op&&t.error("Multiple domain scales support op count only."):t.error("No field provided for sort aggregate op: "+e.op):t.isObject(e)?e.field="key":e={field:"key"}),e}function ke(e,n,i){return t.isArray(e)?e.map(function(e){return ke(e,n,i)}):t.isObject(e)?e.signal?i.signalRef(e.signal):"fit"===n?e:t.error("Unsupported parameter object: "+t.stringValue(e)):e}const Se="top",$e="left",Oe="right",Re="bottom",je="vertical",we="start",ze="end",Ve="index",De="label",Pe="offset",_e="perc",Ee="perc2",We="size",Ce="value",Ae="guide-label",Le="guide-title",Fe="group-title",Te="symbol",Me="gradient",Be="discrete",Ue=["size","shape","fill","stroke","strokeWidth","strokeDash","opacity"],qe={name:1,interactive:1},Ie={value:0},Ne={value:1};var Ge=t.toSet(["rule"]),He=t.toSet(["group","image","rect"]);function Qe(e,n,i,a){var r=f(e,n);return r.$fields.forEach(function(e){a[e]=1}),t.extend(i,r.$params),r.$expr}function Xe(e,n,i,a){return function e(n,i,a,r){var o,l,s;if(n.signal)o="datum",s=Qe(n.signal,i,a,r);else if(n.group||n.parent){for(l=Math.max(1,n.level||1),o="item";l-- >0;)o+=".mark.group";n.parent?(s=n.parent,o+=".datum"):s=n.group}else n.datum?(o="datum",s=n.datum):t.error("Invalid field reference: "+t.stringValue(n));n.signal||(t.isString(s)?(r[s]=1,s=t.splitAccessPath(s).map(t.stringValue).join("][")):s=e(s,i,a,r));return o+"["+s+"]"}(t.isObject(e)?e:{datum:e},n,i,a)}function Ye(e,n,i,a,r){var o,l,s,u=Je(e.scale,i,a,r);return null!=e.range?(l=u+".range()",n=0===(o=+e.range)?l+"[0]":"($="+l+","+(1===o?"$[$.length-1]":"$[0]+"+o+"*($[$.length-1]-$[0])")+")"):(void 0!==n&&(n=u+"("+n+")"),e.band&&(s=function(e,n){if(!t.isString(e))return-1;var i=n.scaleType(e);return"band"===i||"point"===i?1:0}(e.scale,i))&&(o=(l=u+".bandwidth")+"()"+(1===(o=+e.band)?"":"*"+o),s<0&&(o="("+l+"?"+o+":0)"),n=(n?n+"+":"")+o,e.extra&&(n="(datum.extra?"+u+"(datum.extra.value):"+n+")")),null==n&&(n="0")),n}function Je(e,n,a,r){var o;if(t.isString(e))o=i.ScalePrefix+e,a.hasOwnProperty(o)||(a[o]=n.scaleRef(e)),o=t.stringValue(o);else{for(o in n.scales)a[i.ScalePrefix+o]=n.scaleRef(o);o=t.stringValue(i.ScalePrefix)+"+"+(e.signal?"("+Qe(e.signal,n,a,r)+")":Xe(e,n,a,r))}return"_["+o+"]"}function Ke(e,n,i,a){return t.isObject(e)?"("+Ze(null,e,n,i,a)+")":e}function Ze(e,n,i,a,r){if(null!=n.gradient)return function(e,n,i,a){return"this.gradient("+Je(e.gradient,n,i,a)+","+t.stringValue(e.start)+","+t.stringValue(e.stop)+","+t.stringValue(e.count)+")"}(n,i,a,r);var o=n.signal?Qe(n.signal,i,a,r):n.color?function(e,t,n,i){function a(e,a,r,o){return"this."+e+"("+[Ze(null,a,t,n,i),Ze(null,r,t,n,i),Ze(null,o,t,n,i)].join(",")+").toString()"}return e.c?a("hcl",e.h,e.c,e.l):e.h||e.s?a("hsl",e.h,e.s,e.l):e.l||e.a?a("lab",e.l,e.a,e.b):e.r||e.g||e.b?a("rgb",e.r,e.g,e.b):null}(n.color,i,a,r):null!=n.field?Xe(n.field,i,a,r):void 0!==n.value?t.stringValue(n.value):void 0;return null!=n.scale&&(o=Ye(n,o,i,a,r)),void 0===o&&(o=null),null!=n.exponent&&(o="Math.pow("+o+","+Ke(n.exponent,i,a,r)+")"),null!=n.mult&&(o+="*"+Ke(n.mult,i,a,r)),null!=n.offset&&(o+="+"+Ke(n.offset,i,a,r)),n.round&&(o="Math.round("+o+")"),o}function et(e,n,i){return e+"["+t.stringValue(n)+"]="+i+";"}function tt(e,n,i,a,r){var o="";return n.forEach(function(e){var t=Ze(0,e,i,a,r);o+=e.test?Qe(e.test,i,a,r)+"?"+t+":":t}),":"===t.peek(o)&&(o+="null"),et("o",e,o)}function nt(e,n,i,a){var r,o,l={},s="var o=item,datum=o.datum,$;";for(r in e)o=e[r],t.isArray(o)?s+=tt(r,o,a,i,l):s+=et("o",r,Ze(0,o,a,i,l));return s+=function(e,t){var n="";return Ge[t]?n:(e.x2&&(e.x?(He[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(He[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;"),n)}(e,n),{$expr:s+="return 1;",$fields:Object.keys(l),$output:Object.keys(e)}}var it="mark",at="frame",rt="scope",ot="axis",lt="axis-domain",st="axis-grid",ut="axis-label",dt="axis-tick",ct="axis-title",ft="legend",pt="legend-band",gt="legend-entry",ht="legend-gradient",mt="legend-label",yt="legend-symbol",vt="legend-title",bt="title";function xt(e){return t.isObject(e)?t.extend({},e):{value:e}}function kt(e,n,i,a){return null!=i?(t.isObject(i)&&!t.isArray(i)?e.update[n]=i:e[a||"enter"][n]={value:i},1):0}function St(e,t,n){for(let n in t)kt(e,n,t[n]);for(let t in n)kt(e,t,n[t],"update")}function $t(e,n,i){for(var a in n)i&&i.hasOwnProperty(a)||(e[a]=t.extend(e[a]||{},n[a]));return e}function Ot(e,n,i,a,r,o){var l,s;for(s in(o=o||{}).encoders={$encode:l={}},e=function(e,n,i,a,r){var o,l,s={};"legend"!=i&&0!==String(i).indexOf("axis")||(i=null);for(o in l=i===at?r.group:i===it?t.extend({},r.mark,r[n]):null)jt(o,e)||("fill"===o||"stroke"===o)&&(jt("fill",e)||jt("stroke",e))||(s[o]=Rt(l[o]));return t.array(a).forEach(function(t){var n=r.style&&r.style[t];for(var i in n)jt(i,e)||(s[i]=Rt(n[i]))}),(e=t.extend({},e)).enter=t.extend(s,e.enter),e}(e,n,i,a,r.config))l[s]=nt(e[s],n,o,r);return o}function Rt(e){return e&&e.signal?{signal:e.signal}:{value:e}}function jt(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}function wt(e,t,n,i,a,r,o){return{type:e,name:o?o.name:void 0,role:t,style:o&&o.style||n,key:i,from:a,interactive:!(!o||!o.interactive),encode:$t(r,o,qe)}}function zt(e,t){const n=n=>w(e[n],t[n]);return n.isVertical=(n=>je===w(e.direction,t.direction||(n?t.symbolDirection:t.gradientDirection))),n.gradientLength=(()=>w(e.gradientLength,t.gradientLength||t.gradientWidth)),n.gradientThickness=(()=>w(e.gradientThickness,t.gradientThickness||t.gradientHeight)),n.entryColumns=(()=>w(e.columns,w(t.columns,+n.isVertical(!0)))),n}function Vt(e,t){var n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function Dt(e,t,n){return`item.anchor === "${we}" ? ${e} : item.anchor === "${ze}" ? ${t} : ${n}`}const Pt=Dt(t.stringValue($e),t.stringValue(Oe),t.stringValue("center"));var _t="group",Et="rect",Wt="rule",Ct="symbol",At="text";function Lt(e,n,i,a){var r,o,l,s,u,d,c=zt(e,i),f=c.isVertical(),p=c.gradientThickness(),g=c.gradientLength();return f?(l=[0,1],s=[0,0],u=p,d=g):(l=[0,0],s=[1,0],u=g,d=p),St(r={enter:o={opacity:Ie,x:Ie,y:Ie,width:xt(u),height:xt(d)},update:t.extend({},o,{opacity:Ne,fill:{gradient:n,start:l,stop:s}}),exit:{opacity:Ie}},{stroke:c("gradientStrokeColor"),strokeWidth:c("gradientStrokeWidth")},{opacity:c("gradientOpacity")}),wt(Et,ht,null,void 0,void 0,r,a)}function Ft(e,n,i,a,r){var o,l,s,u,d,c,f=zt(e,i),p=f.isVertical(),g=f.gradientThickness(),h=f.gradientLength(),m="";return p?(s="y",d="y2",u="x",c="width",m="1-"):(s="x",d="x2",u="y",c="height"),(l={opacity:Ie,fill:{scale:n,field:Ce}})[s]={signal:m+"datum."+_e,mult:h},l[u]=Ie,l[d]={signal:m+"datum."+Ee,mult:h},l[c]=xt(g),St(o={enter:l,update:t.extend({},l,{opacity:Ne}),exit:{opacity:Ie}},{stroke:f("gradientStrokeColor"),strokeWidth:f("gradientStrokeWidth")},{opacity:f("gradientOpacity")}),wt(Et,pt,null,Ce,r,o,a)}const Tt=`datum.${_e}<=0?"${$e}":datum.${_e}>=1?"${Oe}":"center"`,Mt=`datum.${_e}<=0?"${Re}":datum.${_e}>=1?"${Se}":"middle"`;function Bt(e,t,n,i){var a,r,o,l,s,u=zt(e,t),d=u.isVertical(),c=xt(u.gradientThickness()),f=u.gradientLength(),p=u("labelOverlap"),g=u("labelSeparation"),h="";return St(a={enter:r={opacity:Ie},update:o={opacity:Ne,text:{field:De}},exit:{opacity:Ie}},{fill:u("labelColor"),fillOpacity:u("labelOpacity"),font:u("labelFont"),fontSize:u("labelFontSize"),fontStyle:u("labelFontStyle"),fontWeight:u("labelFontWeight"),limit:w(e.labelLimit,t.gradientLabelLimit)}),d?(r.align={value:"left"},r.baseline=o.baseline={signal:Mt},l="y",s="x",h="1-"):(r.align=o.align={signal:Tt},r.baseline={value:"top"},l="x",s="y"),r[l]=o[l]={signal:h+"datum."+_e,mult:f},r[s]=o[s]=c,c.offset=w(e.labelOffset,t.gradientLabelOffset)||0,e=wt(At,mt,Ae,Ce,i,a,n),p&&(e.overlap={separation:g,method:p,order:"datum."+Ve}),e}function Ut(e,t,n,i,a,r,o,l){return{type:_t,name:n,role:e,style:t,from:i,interactive:a||!1,encode:r,marks:o,layout:l}}function qt(e,t,n,i,a){var r,o,l,s,u,d,c,f=zt(e,t),p=n.entries,g=!(!p||!p.interactive),h=p?p.name:void 0,m=f("clipHeight"),y=f("symbolOffset"),v={data:"value"},b={},x=`${a} ? datum.${Pe} : datum.${We}`,k=m?xt(m):{field:We},S=`datum.${Ve}`,$=`max(1, ${a})`;return k.mult=.5,b={enter:r={opacity:Ie,x:{signal:x,mult:.5,offset:y},y:k},update:o={opacity:Ne,x:r.x,y:r.y},exit:{opacity:Ie}},e.fill||St(b,{fill:t.symbolBaseFillColor,stroke:t.symbolBaseStrokeColor}),St(b,{fill:f("symbolFillColor"),shape:f("symbolType"),size:f("symbolSize"),stroke:f("symbolStrokeColor"),strokeDash:f("symbolDash"),strokeDashOffset:f("symbolDashOffset"),strokeWidth:f("symbolStrokeWidth")},{opacity:f("symbolOpacity")}),Ue.forEach(function(t){e[t]&&(o[t]=r[t]={scale:e[t],field:Ce})}),s=wt(Ct,yt,null,Ce,v,b,n.symbols),m&&(s.clip=!0),(l=xt(y)).offset=f("labelOffset"),St(b={enter:r={opacity:Ie,x:{signal:x,offset:l},y:k},update:o={opacity:Ne,text:{field:De},x:r.x,y:r.y},exit:{opacity:Ie}},{align:f("labelAlign"),baseline:f("labelBaseline"),fill:f("labelColor"),fillOpacity:f("labelOpacity"),font:f("labelFont"),fontSize:f("labelFontSize"),fontStyle:f("labelFontStyle"),fontWeight:f("labelFontWeight"),limit:f("labelLimit")}),u=wt(At,mt,Ae,Ce,v,b,n.labels),b={enter:{noBound:{value:!m},width:Ie,height:m?xt(m):Ie,opacity:Ie},exit:{opacity:Ie},update:o={opacity:Ne,row:{signal:null},column:{signal:null}}},f.isVertical(!0)?(d=`ceil(item.mark.items.length / ${$})`,o.row.signal=`${S}%${d}`,o.column.signal=`floor(${S} / ${d})`,c={field:["row",S]}):(o.row.signal=`floor(${S} / ${$})`,o.column.signal=`${S} % ${$}`,c={field:S}),o.column.signal=`${a}?${o.column.signal}:${S}`,(e=Ut(rt,null,h,i={facet:{data:i,name:"value",groupby:Ve}},g,$t(b,p,qe),[s,u])).sort=c,e}const It='item.orient === "left"',Nt='item.orient === "right"',Gt=`(${It} || ${Nt})`,Ht=`datum.vgrad && ${Gt}`,Qt=Dt('"top"','"bottom"','"middle"'),Xt=`datum.vgrad && ${Nt} ? (${Dt('"right"','"left"','"center"')}) : (${Gt} && !(datum.vgrad && ${It})) ? "left" : ${Pt}`,Yt=`item._anchor || (${Gt} ? "middle" : "start")`,Jt=`${Ht} ? (${It} ? -90 : 90) : 0`,Kt=`${Gt} ? (datum.vgrad ? (${Nt} ? "bottom" : "top") : ${Qt}) : "top"`;function Zt(e,n){var i;return t.isObject(e)&&(e.signal?i=e.signal:e.path?i="pathShape("+en(e.path)+")":e.sphere&&(i="geoShape("+en(e.sphere)+', {type: "Sphere"})')),i?n.signalRef(i):!!e}function en(e){return t.isObject(e)&&e.signal?e.signal:t.stringValue(e)}function tn(e){var t=e.role||"";return t.indexOf("axis")&&t.indexOf("legend")?e.type===_t?rt:t||it:t}function nn(e){return{marktype:e.type,name:e.name||void 0,role:e.role||tn(e),zindex:+e.zindex||void 0}}function an(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e}function rn(e,n){var i=o.definition(e.type);i||t.error("Unrecognized transform type: "+t.stringValue(e.type));var a=g(i.type.toLowerCase(),null,on(i,e,n));return e.signal&&n.addSignal(e.signal,n.proxy(a)),a.metadata=i.metadata||{},a}function on(e,t,n){var i,a,r,o={};for(a=0,r=e.params.length;a<r;++a)o[(i=e.params[a]).name]=ln(i,t,n);return o}function ln(e,n,i){var a=e.type,r=n[e.name];return"index"===a?function(e,n,i){t.isString(n.from)||t.error('Lookup "from" parameter must be a string literal.');return i.getData(n.from).lookupRef(i,n.key)}(0,n,i):void 0!==r?"param"===a?function(e,n,i){var a=n[e.name];return e.array?(t.isArray(a)||t.error("Expected an array of sub-parameters. Instead: "+t.stringValue(a)),a.map(function(t){return un(e,t,i)})):un(e,a,i)}(e,n,i):"projection"===a?i.projectionRef(n[e.name]):e.array&&!R(r)?r.map(function(t){return sn(e,t,i)}):sn(e,r,i):void(e.required&&t.error("Missing required "+t.stringValue(n.type)+" parameter: "+t.stringValue(e.name)))}function sn(e,n,i){var a=e.type;if(R(n))return dn(a)?t.error("Expression references can not be signals."):cn(a)?i.fieldRef(n):fn(a)?i.compareRef(n):i.signalRef(n.signal);var r,o=e.expr||cn(a);return o&&((r=n)&&r.expr)?i.exprRef(n.expr,n.as):o&&function(e){return e&&e.field}(n)?v(n.field,n.as):dn(a)?f(n,i):function(e){return"data"===e}(a)?m(i.getData(n).values):cn(a)?v(n):fn(a)?i.compareRef(n):n}function un(e,n,i){var a,r,o,l,s;for(l=0,s=e.params.length;l<s;++l){for(o in(r=e.params[l]).key)if(r.key[o]!==n[o]){r=null;break}if(r)break}return r||t.error("Unsupported parameter: "+t.stringValue(n)),a=t.extend(on(r,n,i),r.key),m(i.add(ie(a)))}function dn(e){return"expr"===e}function cn(e){return"field"===e}function fn(e){return"compare"===e}function pn(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:m(t.getData(e.data).output)}function gn(e,t,n,i,a){this.scope=e,this.input=t,this.output=n,this.values=i,this.aggregate=a,this.index={}}gn.fromEntries=function(e,t){var n=t.length,i=1,a=t[0],r=t[n-1],o=t[n-2],l=null;for(a&&"load"===a.type&&(a=t[1]),e.add(t[0]);i<n;++i)t[i].params.pulse=m(t[i-1]),e.add(t[i]),"aggregate"===t[i].type&&(l=t[i]);return new gn(e,a,o,r,l)};var hn=gn.prototype;function mn(e){return t.isString(e)?e:null}function yn(e,t,n){var i,a=S(n.op,n.field);if(t.ops){for(var r=0,o=t.as.length;r<o;++r)if(t.as[r]===a)return}else t.ops=["count"],t.fields=[null],t.as=["count"];n.op&&(t.ops.push((i=n.op.signal)?e.signalRef(i):n.op),t.fields.push(e.fieldRef(n.field)),t.as.push(a))}function vn(e,n,i,a,r,o,l){var s,u,d=n[i]||(n[i]={}),c=function(e){return t.isObject(e)?(e.order===k?"-":"+")+S(e.op,e.field):""}(o),f=mn(r);if(null!=f&&(e=n.scope,s=d[f+=c?"|"+c:""]),!s){var p=o?{field:b,pulse:n.countsRef(e,r,o)}:{field:e.fieldRef(r),pulse:m(n.output)};c&&(p.sort=e.sortRef(o)),u=e.add(g(a,void 0,p)),l&&(n.index[r]=u),s=m(u),null!=f&&(d[f]=s)}return s}function bn(e,t,n){var i,a=e.remove,r=e.insert,o=e.toggle,l=e.modify,s=e.values,u=t.add(h());i=f("if("+e.trigger+',modify("'+n+'",'+[r,a,o,l,s].map(function(e){return null==e?"null":e}).join(",")+"),0)",t),u.update=i.$expr,u.params=i.$params}function xn(e,n){var i,a,r,o,l,s,u,d,c,f,p,g,h,y=tn(e),b=e.type===_t,x=e.from&&e.from.facet,k=e.layout||y===rt||y===at,S=y===it||k||x,$=e.overlap;r=function(e,n,i){var a,r,o,l,s;return e?(a=e.facet)&&(n||t.error("Only group marks can be faceted."),null!=a.field?l=s=pn(a,i):(e.data?s=m(i.getData(e.data).aggregate):((o=rn(t.extend({type:"aggregate",groupby:t.array(a.groupby)},a.aggregate),i)).params.key=i.keyRef(a.groupby),o.params.pulse=pn(a,i),l=s=m(i.add(o))),r=i.keyRef(a.groupby,!0))):l=m(i.add(q(null,[{}]))),l||(l=pn(e,i)),{key:r,pulse:l,parent:s}}(e.from,b,n),c=m(a=n.add(N({key:r.key||(e.key?v(e.key):void 0),pulse:r.pulse,clean:!b}))),a=o=n.add(q({pulse:c})),a=n.add(Z({markdef:nn(e),interactive:an(e.interactive,n),clip:Zt(e.clip,n),context:{$context:!0},groups:n.lookup(),parent:n.signals.parent?n.signalRef("parent"):null,index:n.markpath(),pulse:m(a)})),f=m(a),(a=n.add(G(Ot(e.encode,e.type,y,e.style,n,{pulse:f})))).params.parent=n.encode(),e.transform&&e.transform.forEach(function(e){var i=rn(e,n);(i.metadata.generates||i.metadata.changes)&&t.error("Mark transforms should not generate new data."),i.params.pulse=m(a),n.add(a=i)}),e.sort&&(a=n.add(ce({sort:n.compareRef(e.sort,!0),pulse:m(a)}))),p=m(a),(x||k)&&(g=m(k=n.add(fe({layout:n.objectProperty(e.layout),legends:n.legends,mark:f,pulse:p})))),h=m(l=n.add(U({mark:f,pulse:g||p}))),b&&(S&&((i=n.operators).pop(),k&&i.pop()),n.pushState(p,g||h,c),x?function(e,n,i){var a,r,o,l,s=e.from.facet,u=s.name,d=pn(s,n);s.name||t.error("Facet must have a name: "+t.stringValue(s)),s.data||t.error("Facet must reference a data set: "+t.stringValue(s)),s.field?l=n.add(ae({field:n.fieldRef(s.field),pulse:d})):s.groupby?l=n.add(Q({key:n.keyRef(s.groupby),group:m(n.proxy(i.parent)),pulse:d})):t.error("Facet must specify groupby or field: "+t.stringValue(s)),r=(a=n.fork()).add(q()),o=a.add(de({pulse:m(r)})),a.addData(u,new gn(a,r,r,o)),a.addSignal("parent",null),l.params.subflow={$subflow:En(e,a).toRuntime()}}(e,n,r):S?function(e,t,n){var i=t.add(ae({pulse:n.pulse})),a=t.fork();a.add(de()),a.addSignal("parent",null),i.params.subflow={$subflow:En(e,a).toRuntime()}}(e,n,r):En(e,n),n.popState(),S&&(k&&i.push(k),i.push(l))),$&&(h=function(e,t,n){var i,a=e.method,r=e.bound,o=e.separation,l={separation:R(o)?n.signalRef(o.signal):o,method:R(a)?n.signalRef(a.signal):a,pulse:t};e.order&&(l.sort=n.compareRef({field:e.order}));r&&(i=r.tolerance,l.boundTolerance=R(i)?n.signalRef(i.signal):+i,l.boundScale=n.scaleRef(r.scale),l.boundOrient=r.orient);return m(n.add(ne(l)))}($,h,n)),s=n.add(se({pulse:h})),u=n.add(de({pulse:m(s)},void 0,n.parent())),null!=e.name&&(d=e.name,n.addData(d,new gn(n,o,s,u)),e.on&&e.on.forEach(function(e){(e.insert||e.remove||e.toggle)&&t.error("Marks only support modify triggers."),bn(e,n,d)}))}function kn(e,n){var i,a,o,l,s,u,d,c,p,g=n.config.legend,h=e.encode||{},y=h.legend||{},v=y.name||void 0,b=y.interactive,x=y.style,k=zt(e,g),S=Ue.reduce(function(t,n){return t||e[n]},0);return S||t.error("Missing valid scale for legend."),s=function(e,t){var n=e.type||Te;e.type||1!==function(e){return Ue.reduce(function(t,n){return t+(e[n]?1:0)},0)}(e)||!e.fill&&!e.stroke||(n=r.isContinuous(t)?Me:r.isDiscretizing(t)?Be:Te);return n!==Me?n:r.isDiscretizing(t)?Be:Me}(e,n.scaleType(S)),u={title:null!=e.title,type:s,vgrad:"symbol"!==s&&k.isVertical()},d=m(n.add(q(null,[u]))),y=$t(function(e,t){var n={enter:{},update:{}};return St(n,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:t.strokeWidth,strokeDash:t.strokeDash}),n}(k,g),y,qe),i={enter:{x:{value:0},y:{value:0}}},c=m(n.add(J(o={type:s,scale:n.scaleRef(S),count:n.objectProperty(e.tickCount),values:n.objectProperty(e.values),minstep:n.property(e.tickMinStep),formatType:n.property(e.formatType),formatSpecifier:n.property(e.format)}))),s===Me?(l=[Lt(e,S,g,h.gradient),Bt(e,g,h.labels,c)],o.count=o.count||n.signalRef(`max(2,2*floor((${z(k.gradientLength())})/100))`)):s===Be?l=[Ft(e,S,g,h.gradient,c),Bt(e,g,h.labels,c)]:(a=function(e,t){const n=zt(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}(e,g),l=[qt(e,g,h,c,z(a.columns))],o.size=function(e,t,n){var i=z(Sn("size",e,n)),a=z(Sn("strokeWidth",e,n)),r=z(function(e,t,n){return Vt("fontSize",e)||function(e,t,n){var i=t.config.style[n];return i&&i[e]}("fontSize",t,n)}(n[1].encode,t,Ae));return f(`max(ceil(sqrt(${i})+${a}),${r})`,t)}(e,n,l[0].marks)),l=[Ut(gt,null,null,d,b,i,l,a)],u.title&&l.push(function(e,t,n,i){var a,r=zt(e,t);return St(a={enter:{opacity:Ie},update:{opacity:Ne,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:Ie}},{orient:r("titleOrient"),_anchor:r("titleAnchor"),anchor:{signal:Yt},angle:{signal:Jt},align:{signal:Xt},baseline:{signal:Kt},text:e.title,fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit")},{align:r("titleAlign"),baseline:r("titleBaseline")}),wt(At,vt,Le,null,i,a,n)}(e,g,h.title,d)),p=Ut(ft,x,v,d,b,y,l),e.zindex&&(p.zindex=e.zindex),xn(p,n)}function Sn(e,t,n){return t[e]?`scale("${t[e]}",datum)`:Vt(e,n[0].encode)}hn.countsRef=function(e,t,n){var i,a,r,o=this.counts||(this.counts={}),l=mn(t);return null!=l&&(e=this.scope,i=o[l]),i?n&&n.field&&yn(e,i.agg.params,n):(r={groupby:e.fieldRef(t,"key"),pulse:m(this.output)},n&&n.field&&yn(e,r,n),a=e.add(M(r)),i=e.add(q({pulse:m(a)})),i={agg:a,ref:m(i)},null!=l&&(o[l]=i)),i.ref},hn.tuplesRef=function(){return m(this.values)},hn.extentRef=function(e,t){return vn(e,this,"extent","extent",t,!1)},hn.domainRef=function(e,t){return vn(e,this,"domain","values",t,!1)},hn.valuesRef=function(e,t,n){return vn(e,this,"vals","values",t,n||!0)},hn.lookupRef=function(e,t){return vn(e,this,"lookup","tupleindex",t,!1)},hn.indataRef=function(e,t){return vn(e,this,"indata","tupleindex",t,!0,!0)};const $n=`item.orient==="${$e}"?-90:item.orient==="${Oe}"?90:0`,On=`item.orient==="${Re}"?"${Se}":"${Re}"`;function Rn(e,n){e=t.isString(e)?{text:e}:e;var i,a,r=n.config.title,o=t.extend({},e.encode);return i=m(n.add(q(null,[{}]))),o.name=e.name,o.interactive=e.interactive,a=function(e,t,n,i){var a,r=zt(e,t),o={value:0},l=e.text;return St(a={enter:{opacity:o},update:{opacity:{value:1}},exit:{opacity:o}},{text:l,orient:r("orient"),anchor:r("anchor"),align:{signal:Pt},angle:{signal:$n},baseline:{signal:On},dx:r("dx"),dy:r("dy"),fill:r("color"),font:r("font"),fontSize:r("fontSize"),fontStyle:r("fontStyle"),fontWeight:r("fontWeight"),frame:r("frame"),limit:r("limit"),offset:r("offset")||0},{align:r("align"),angle:r("angle"),baseline:r("baseline")}),wt(At,bt,e.style||Fe,null,i,a,n)}(e,r,o,i),e.zindex&&(a.zindex=e.zindex),xn(a,n)}function jn(e,n){var i=[];e.transform&&e.transform.forEach(function(e){i.push(rn(e,n))}),e.on&&e.on.forEach(function(t){bn(t,n,e.name)}),n.addDataPipeline(e.name,function(e,n,i){var a,r,o,l,s,u=[],d=null,c=!1,f=!1;e.values?j(e.values)||j(e.format)?(u.push(zn(n,e)),u.push(d=wn())):u.push(d=wn({$ingest:e.values,$format:e.format})):e.url?j(e.url)||j(e.format)?(u.push(zn(n,e)),u.push(d=wn())):u.push(d=wn({$request:e.url,$format:e.format})):e.source&&(d=a=t.array(e.source).map(function(e){return m(n.getData(e).output)}),u.push(null));for(r=0,o=i.length;r<o;++r)l=i[r],s=l.metadata,d||s.source||u.push(d=wn()),u.push(l),s.generates&&(f=!0),s.modifies&&!f&&(c=!0),s.source?d=l:s.changes&&(d=null);a&&(o=a.length-1,u[0]=le({derive:c,pulse:o?a:a[0]}),(c||o)&&u.splice(1,0,wn()));d||u.push(wn());return u.push(de({})),u}(e,n,i))}function wn(e){var t=q({},e);return t.metadata={source:!0},t}function zn(e,t){return K({url:t.url?e.property(t.url):void 0,values:t.values?e.property(t.values):void 0,format:e.objectProperty(t.format)})}function Vn(e,t){return{scale:e.scale,range:t}}function Dn(e,n,i,a){var r,o,l,s,u,d,c,f,p,g=zt(e,n),h=e.orient,m=e.gridScale,y=h===$e||h===Se?1:-1,v=function(e,n){if(1===n);else if(t.isObject(e)){for(var i=e=t.extend({},e);null!=i.mult;){if(!t.isObject(i.mult))return i.mult*=n,e;i=i.mult=t.extend({},i.mult)}i.mult=n}else e=n*(e||0);return e}(e.offset,y);return St(r={enter:o={opacity:Ie},update:s={opacity:Ne},exit:l={opacity:Ie}},{stroke:g("gridColor"),strokeDash:g("gridDash"),strokeDashOffset:g("gridDashOffset"),strokeOpacity:g("gridOpacity"),strokeWidth:g("gridWidth")}),u={scale:e.scale,field:Ce,band:g("bandPosition"),round:g("tickRound"),extra:g("tickExtra"),offset:g("tickOffset")},h===Se||h===Re?(d="x",c="y",p="height"):(d="y",c="x",p="width"),f=c+"2",s[d]=o[d]=l[d]=u,m?(s[c]=o[c]={scale:m,range:0,mult:y,offset:v},s[f]=o[f]={scale:m,range:1,mult:y,offset:v}):(s[c]=o[c]={value:0,offset:v},s[f]=o[f]={signal:p,mult:y,offset:v}),wt(Wt,st,null,Ce,a,r,i)}function Pn(e,t,n,i,a){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+i+","+a+")"}}function _n(e,n){var i,a,r,o,l,s,u=function(e,n){var i=n.config,a=e.orient,r=a===Se||a===Re?i.axisX:i.axisY,o=i["axis"+a[0].toUpperCase()+a.slice(1)],l="band"===n.scaleType(e.scale)&&i.axisBand;return r||o||l?t.extend({},i.axis,r,o,l):i.axis}(e,n),d=e.encode||{},c=d.axis||{},f=c.name||void 0,p=c.interactive,g=c.style,h=zt(e,u);return i={orient:e.orient,ticks:!!h("ticks"),labels:!!h("labels"),grid:!!h("grid"),domain:!!h("domain"),title:null!=e.title},a=m(n.add(q({},[i]))),c=$t({update:{offset:xt(h("offset")||0),position:xt(w(e.position,0)),titlePadding:xt(h("titlePadding")),minExtent:xt(h("minExtent")),maxExtent:xt(h("maxExtent")),range:{signal:`abs(span(range("${e.scale}")))`}}},d.axis,qe),r=m(n.add(B({scale:n.scaleRef(e.scale),extra:n.property(h("tickExtra")),count:n.objectProperty(e.tickCount),values:n.objectProperty(e.values),minstep:n.property(e.tickMinStep),formatType:n.property(e.formatType),formatSpecifier:n.property(e.format)}))),s=[],i.grid&&s.push(Dn(e,u,d.grid,r)),i.ticks&&(o=h("tickSize"),s.push(function(e,t,n,i,a){var r,o,l,s,u,d,c=zt(e,t),f=e.orient,p=f===$e||f===Se?-1:1;return St(r={enter:o={opacity:Ie},update:s={opacity:Ne},exit:l={opacity:Ie}},{stroke:c("tickColor"),strokeDash:c("tickDash"),strokeDashOffset:c("tickDashOffset"),strokeOpacity:c("tickOpacity"),strokeWidth:c("tickWidth")}),(u=xt(a)).mult=p,d={scale:e.scale,field:Ce,band:c("bandPosition"),round:c("tickRound"),extra:c("tickExtra"),offset:c("tickOffset")},f===Se||f===Re?(s.y=o.y=Ie,s.y2=o.y2=u,s.x=o.x=l.x=d):(s.x=o.x=Ie,s.x2=o.x2=u,s.y=o.y=l.y=d),wt(Wt,dt,null,Ce,i,r,n)}(e,u,d.ticks,r,o))),i.labels&&(o=i.ticks?o:0,s.push(function(e,t,n,i,a){var r,o,l,s,u,d,c,f,p,g,h=zt(e,t),m=e.orient,y=m===$e||m===Se?-1:1,v=m===Se||m===Re,b=e.scale,x=z(h("labelFlush")),k=z(h("labelFlushOffset")),S=0===x||!!x,$=h("labelAlign"),O=h("labelBaseline");return(l=xt(a)).mult=y,l.offset=xt(h("labelPadding")||0),l.offset.mult=y,s={scale:b,field:Ce,band:.5,offset:h("tickOffset")},v?(u=$||(S?Pn(b,x,'"left"','"right"','"center"'):"center"),d=O||(m===Se?"bottom":"top"),c=!$):(u=$||(m===Oe?"left":"right"),d=O||(S?Pn(b,x,'"top"','"bottom"','"middle"'):"middle"),c=!O),c=c&&S&&k?Pn(b,x,"-"+k,k,0):null,St(r={enter:o={opacity:Ie,x:v?s:l,y:v?l:s},update:{opacity:Ne,text:{field:De},x:o.x,y:o.y},exit:{opacity:Ie,x:o.x,y:o.y}},{[v?"dx":"dy"]:c,align:u,baseline:d,angle:h("labelAngle"),fill:h("labelColor"),fillOpacity:h("labelOpacity"),font:h("labelFont"),fontSize:h("labelFontSize"),fontWeight:h("labelFontWeight"),fontStyle:h("labelFontStyle"),limit:h("labelLimit")}),f=h("labelBound"),p=h("labelOverlap"),g=h("labelSeparation"),e=wt(At,ut,Ae,Ce,i,r,n),(p||f)&&(e.overlap={separation:g,method:p,order:"datum.index",bound:f?{scale:b,orient:m,tolerance:f}:null}),e}(e,u,d.labels,r,o))),i.domain&&s.push(function(e,t,n,i){var a,r,o,l,s,u,d=zt(e,t),c=e.orient;return St(a={enter:r={opacity:Ie},update:o={opacity:Ne},exit:{opacity:Ie}},{stroke:d("domainColor"),strokeDash:d("domainDash"),strokeDashOffset:d("domainDashOffset"),strokeWidth:d("domainWidth"),strokeOpacity:d("domainOpacity")}),c===Se||c===Re?(l="x",u="y"):(l="y",u="x"),s=l+"2",r[u]=Ie,o[l]=r[l]=Vn(e,0),o[s]=r[s]=Vn(e,1),wt(Wt,lt,null,null,i,a,n)}(e,u,d.domain,a)),i.title&&s.push(function(e,n,i,a){var r,o,l,s,u=zt(e,n),d=e.orient,c=d===$e||d===Se?-1:1,f=d===Se||d===Re;return r={enter:o={opacity:Ie,anchor:xt(u("titleAnchor")),align:{signal:Pt}},update:l=t.extend({},o,{opacity:Ne,text:xt(e.title)}),exit:{opacity:Ie}},s={signal:`lerp(range("${e.scale}"), ${Dt(0,1,.5)})`},f?(l.x=s,o.angle={value:0},o.baseline={value:d===Se?"bottom":"top"}):(l.y=s,o.angle={value:90*c},o.baseline={value:"bottom"}),St(r,{angle:u("titleAngle"),baseline:u("titleBaseline"),fill:u("titleColor"),fillOpacity:u("titleOpacity"),font:u("titleFont"),fontSize:u("titleFontSize"),fontStyle:u("titleFontStyle"),fontWeight:u("titleFontWeight"),limit:u("titleLimit")},{align:u("titleAlign")}),!kt(r,"x",u("titleX"),"update")&&!f&&!jt("x",i)&&(r.enter.auto={value:!0}),!kt(r,"y",u("titleY"),"update")&&f&&!jt("y",i)&&(r.enter.auto={value:!0}),wt(At,ct,Le,null,a,r,i)}(e,u,d.title,a)),l=Ut(ot,g,f,a,p,c,s),e.zindex&&(l.zindex=e.zindex),xn(l,n)}function En(e,n,i){var a=t.array(e.signals),o=t.array(e.scales);return i||a.forEach(function(e){c(e,n)}),t.array(e.projections).forEach(function(e){!function(e,t){var n={};for(var i in e)"name"!==i&&(n[i]=ke(e[i],i,t));t.addProjection(e.name,n)}(e,n)}),o.forEach(function(e){!function(e,n){var i=e.type||"linear";r.isValidScaleType(i)||t.error("Unrecognized scale type: "+t.stringValue(i)),n.addScale(e.name,{type:i,domain:void 0})}(e,n)}),t.array(e.data).forEach(function(e){jn(e,n)}),o.forEach(function(e){he(e,n)}),a.forEach(function(e){F(e,n)}),t.array(e.axes).forEach(function(e){_n(e,n)}),t.array(e.marks).forEach(function(e){xn(e,n)}),t.array(e.legends).forEach(function(e){kn(e,n)}),e.title&&Rn(e.title,n),n.parseLambdas(),n}var Wn=t.toSet(["width","height","padding","autosize"]);function Cn(e,n){var i,a,r,o,s,u=n.config;return n.background=e.background||u.background,n.eventConfig=u.events,s=m(n.root=n.add(h())),n.addSignal("width",e.width||0),n.addSignal("height",e.height||0),n.addSignal("padding",function(e,n){return e=e||n.padding,t.isObject(e)?{top:l(e.top),bottom:l(e.bottom),left:l(e.left),right:l(e.right)}:{top:i=l(e),bottom:i,left:i,right:i};var i}(e.padding,u)),n.addSignal("autosize",function(e,n){return e=e||n.autosize,t.isObject(e)?e:{type:e||"pad"}}(e.autosize,u)),n.legends=n.objectProperty(u.legend&&u.legend.layout),t.array(e.signals).forEach(function(e){Wn[e.name]||c(e,n)}),a=n.add(q()),r=$t({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e.encode),r=n.add(G(Ot(r,_t,at,e.style,n,{pulse:m(a)}))),o=n.add(fe({layout:n.objectProperty(e.layout),legends:n.legends,autosize:n.signalRef("autosize"),mark:s,pulse:m(r)})),n.operators.pop(),n.pushState(m(r),m(o),null),En(e,n,!0),n.operators.push(o),i=n.add(U({mark:s,pulse:m(o)})),i=n.add(se({pulse:m(i)})),i=n.add(de({pulse:m(i)})),n.addData("root",new gn(n,a,a,i)),n}function An(e){this.config=e,this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.background=null,this.eventConfig=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function Ln(e){this.config=e.config,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}var Fn=An.prototype=Ln.prototype;function Tn(e){return(t.isArray(e)?function(e){for(var n,i="[",a=0,r=e.length;a<r;++a)n=e[a],i+=(a>0?",":"")+(t.isObject(n)?n.signal||Tn(n):t.stringValue(n));return i+"]"}:function(e){var n,i,a="{",r=0;for(n in e)i=e[n],a+=(++r>1?",":"")+t.stringValue(n)+":"+(t.isObject(i)?i.signal||Tn(i):t.stringValue(i));return a+"}"})(e)}function Mn(e){return(e||[]).reduce((e,t)=>{for(var n in t){var i="legend"===n?{layout:1}:"style"===n||null;Bn(e,n,t[n],i)}return e},{padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:Nn},area:{fill:Nn},image:null,line:{stroke:Nn,strokeWidth:In},path:{stroke:Nn},rect:{fill:Nn},rule:{stroke:Gn},shape:{stroke:Nn},symbol:{fill:Nn,size:64},text:{fill:Gn,font:Un,fontSize:11},style:{"guide-label":{fill:Gn,font:Un,fontSize:10},"guide-title":{fill:Gn,font:Un,fontSize:11,fontWeight:"bold"},"group-title":{fill:Gn,font:Un,fontSize:13,fontWeight:"bold"},point:{size:qn,strokeWidth:In,shape:"circle"},circle:{size:qn,strokeWidth:In},square:{size:qn,strokeWidth:In,shape:"square"},cell:{fill:"transparent",stroke:Qn}},title:{orient:"top",anchor:"middle",offset:4},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:Hn,grid:!1,gridWidth:1,gridColor:Qn,labels:!0,labelAngle:0,labelLimit:180,labelPadding:2,ticks:!0,tickColor:Hn,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-1},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:Qn,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:Hn,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}})}function Bn(e,n,i,a){var r,o;if(t.isObject(i)&&!t.isArray(i))for(r in o=t.isObject(e[n])?e[n]:e[n]={},i)a&&(!0===a||a[r])?Bn(o,r,i[r]):o[r]=i[r];else e[n]=i}Fn.fork=function(){return new Ln(this)},Fn.isSubscope=function(){return this._subid>0},Fn.toRuntime=function(){return this.finish(),{background:this.background,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig}},Fn.id=function(){return(this._subid?this._subid+":":0)+this._id++},Fn.add=function(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach(function(t){t.$ref=e.id}),e.refs=null),e},Fn.proxy=function(e){var t=e instanceof p?m(e):e;return this.add(oe({value:t}))},Fn.addStream=function(e){return this.streams.push(e),e.id=this.id(),e},Fn.addUpdate=function(e){return this.updates.push(e),e},Fn.finish=function(){var e,t;for(e in this.root&&(this.root.root=!0),this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(e,t,n){var i;e&&((i=e.data||(e.data={}))[t]||(i[t]=[])).push(n)}for(e in this.data)for(var i in n((t=this.data[e]).input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values"),t.index)n(t.index[i],e,"index:"+i);return this},Fn.pushState=function(e,t,n){this._encode.push(m(this.add(de({pulse:e})))),this._parent.push(t),this._lookup.push(n?m(this.proxy(n)):null),this._markpath.push(-1)},Fn.popState=function(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},Fn.parent=function(){return t.peek(this._parent)},Fn.encode=function(){return t.peek(this._encode)},Fn.lookup=function(){return t.peek(this._lookup)},Fn.markpath=function(){var e=this._markpath;return++e[e.length-1]},Fn.fieldRef=function(e,n){if(t.isString(e))return v(e,n);e.signal||t.error("Unsupported field reference: "+t.stringValue(e));var i,a=e.signal,r=this.field[a];return r||(i={name:this.signalRef(a)},n&&(i.as=n),this.field[a]=r=m(this.add(X(i)))),r},Fn.compareRef=function(e,n){function i(e){return R(e)?(r=!0,a.signalRef(e.signal)):e}var a=this,r=!1,o=t.array(e.field).map(i),l=t.array(e.order).map(i);return n&&o.push(y),r?m(this.add(I({fields:o,orders:l}))):x(o,l)},Fn.keyRef=function(e,n){var i=this.signals,a=!1;return e=t.array(e).map(function(e){return R(e)?(a=!0,m(i[e.signal])):e}),a?m(this.add(Y({fields:e,flat:n}))):function(e,t){var n={$key:e};return t&&(n.$flat=!0),n}(e,n)},Fn.sortRef=function(e){if(!e)return e;var t=[S(e.op,e.field),y],n=e.order||"ascending";return n.signal?m(this.add(I({fields:t,orders:[n=this.signalRef(n.signal),n]}))):x(t,[n,n])},Fn.event=function(e,t){var n=e+":"+t;if(!this.events[n]){var i=this.id();this.streams.push({id:i,source:e,type:t}),this.events[n]=i}return this.events[n]},Fn.addSignal=function(e,n){this.signals.hasOwnProperty(e)&&t.error("Duplicate signal name: "+t.stringValue(e));var i=n instanceof p?n:this.add(h(n));return this.signals[e]=i},Fn.getSignal=function(e){return this.signals[e]||t.error("Unrecognized signal name: "+t.stringValue(e)),this.signals[e]},Fn.signalRef=function(e){return this.signals[e]?m(this.signals[e]):(this.lambdas.hasOwnProperty(e)||(this.lambdas[e]=this.add(h(null))),m(this.lambdas[e]))},Fn.parseLambdas=function(){for(var e=Object.keys(this.lambdas),t=0,n=e.length;t<n;++t){var i=e[t],a=f(i,this),r=this.lambdas[i];r.params=a.$params,r.update=a.$expr}},Fn.property=function(e){return e&&e.signal?this.signalRef(e.signal):e},Fn.objectProperty=function(e){return e&&t.isObject(e)?this.signalRef(e.signal||Tn(e)):e},Fn.exprRef=function(e,t){var n={expr:f(e,this)};return t&&(n.expr.$name=t),m(this.add(H(n)))},Fn.addBinding=function(e,n){this.bindings||t.error("Nested signals do not support binding: "+t.stringValue(e)),this.bindings.push(t.extend({signal:e},n))},Fn.addScaleProj=function(e,n){this.scales.hasOwnProperty(e)&&t.error("Duplicate scale or projection name: "+t.stringValue(e)),this.scales[e]=this.add(n)},Fn.addScale=function(e,t){this.addScaleProj(e,ue(t))},Fn.addProjection=function(e,t){this.addScaleProj(e,re(t))},Fn.getScale=function(e){return this.scales[e]||t.error("Unrecognized scale name: "+t.stringValue(e)),this.scales[e]},Fn.projectionRef=Fn.scaleRef=function(e){return m(this.getScale(e))},Fn.projectionType=Fn.scaleType=function(e){return this.getScale(e).params.type},Fn.addData=function(e,n){return this.data.hasOwnProperty(e)&&t.error("Duplicate data set name: "+t.stringValue(e)),this.data[e]=n},Fn.getData=function(e){return this.data[e]||t.error("Undefined data set name: "+t.stringValue(e)),this.data[e]},Fn.addDataPipeline=function(e,n){return this.data.hasOwnProperty(e)&&t.error("Duplicate data set name: "+t.stringValue(e)),this.addData(e,gn.fromEntries(this,n))};var Un="sans-serif",qn=30,In=2,Nn="#4c78a8",Gn="#000",Hn="#888",Qn="#ddd";e.AxisDomainRole=lt,e.AxisGridRole=st,e.AxisLabelRole=ut,e.AxisRole=ot,e.AxisTickRole=dt,e.AxisTitleRole=ct,e.DataScope=gn,e.FrameRole=at,e.LegendEntryRole=gt,e.LegendLabelRole=mt,e.LegendRole=ft,e.LegendSymbolRole=yt,e.LegendTitleRole=vt,e.MarkRole=it,e.Scope=An,e.ScopeRole=rt,e.config=Mn,e.parse=function(e,n){return t.isObject(e)||t.error("Input Vega specification must be an object."),Cn(e,new An(Mn([n,e.config]))).toRuntime()},e.signal=c,e.signalUpdates=F,e.stream=D,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "vega-parser",
"version": "5.6.1",
"version": "5.6.2",
"description": "Parse Vega specifications to runtime dataflows.",

@@ -34,3 +34,3 @@ "keywords": [

},
"gitHead": "8e012f8b7b5a520bb60a2b5ebb0764991048e16a"
"gitHead": "bcea8011b193cfed59e5fa45cc2c00fd8cb9f588"
}

@@ -19,4 +19,7 @@ import {isArray, isObject} from 'vega-util';

for (k in value) {
if (!recurse || !recurse[k]) o[k] = value[k];
else copy(o, k, value[k]);
if (recurse && (recurse === true || recurse[k])) {
copy(o, k, value[k]);
} else {
o[k] = value[k];
}
}

@@ -23,0 +26,0 @@ } else {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc