!function(a){"use strict";function b(){function a(a,b){a.attr("transform",function(a){return"translate("+(b(a)+q)+", 0)"})}function b(a,b){a.attr("transform",function(a){return"translate(0,"+b(a)+")"})}function c(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function d(a){for(var b=[],c=Math.ceil(a[0]);c0&&b[0]>0&&b.unshift(b[0]-(b[1]-b[0])),b}function e(a,b){var c=a.length-1;return p>=c||b%Math.ceil(c/p)===0}function f(a){return a0?a:320}function t(){return kd(re.data.targets)?0:ze?ze:_f?1:v("y")}function u(){var a=1;return kd(re.data.targets)?0:Ae?Ae:_g?Re+(dg&&!Of?v("y2"):a):dg?ig||Of?a:v("y2"):a}function v(a){var b=fb(a);return b.isInner?20+xb(a):40+xb(a)}function w(a){var b=fb(a);return(b.isInner?30:40)+("y2"===a?-10:0)}function x(){return+g.select(we).style("width").replace("px","")}function y(){return+g.select(we).style("height").replace("px","")}function z(a){return a?-1:-(He.left-1)}function A(a){return a?-20:-1}function B(){return z(!Of)}function C(){return A(!Of)}function D(){return z(Of)}function E(){return A(Of)}function F(a){return a?Ke+2:He.left+20}function G(a){return a?80:Me+2}function H(){return F(!Of)}function I(){return G(!Of)}function J(){return F(Of)}function K(){return G(Of)}function L(){var a=Of?Me:Ke,b=Kb(),c=fc();return c>1?a*b/(c-1):a}function M(a){ah=a}function N(a){bh=a}function O(a){ch=a}function P(){return Kf?_g?bh*(ah+1):Oe:0}function Q(){return Kf?_g?Pe:ch*(ah+1):0}function R(){var a,b,c=!ff;Ze=Of?1:0,$e=Of?Me:Ke,_e=Of?0:Me,af=Of?Ke:1,bf=Ze,cf=$e,df=Of?0:Ne,ef=Of?Le:1,ff=T(Ze,$e,c?void 0:ff.domain(),function(){return mf.tickOffset()}),gf=U(_e,af),hf=U(_e,af),jf=T(Ze,$e,rh,function(a){return a%1?0:pf.tickOffset()}),kf=U(df,ef),lf=U(df,ef),a=$(),b=_(),mf=X(ff,Wg,a,b),pf=X(jf,Zg,a,b),nf=Y(gf,Xg,ag,cg),of=Y(hf,Yg,jg,lg),c||(fh.scale(jf),Be&&jh.scale(ff)),S()}function S(){Ve=zb(),We=Ab(),Xe=Ab(.98)}function T(a,b,c,f){var h=(Og?g.time.scale():g.scale.linear()).range([a,b]);if(h.orgDomain=function(){return h.domain()},e(c)&&h.domain(c),d(f)&&(f=function(){return 0}),Pg){var i,j=h;h=function(a){return j(a)+f(a)};for(i in j)h[i]=j[i];h.orgDomain=function(){return j.domain()},h.domain=function(a){return arguments.length?(j.domain(a),h):(a=j.domain(),[a[0],a[1]+1])}}return h}function U(a,b){return g.scale.linear().range([a,b])}function V(a){return"y2"===Z(a)?hf:gf}function W(a){return"y2"===Z(a)?lf:kf}function X(a,c,d,e){var f=(Pg?b():g.svg.axis()).scale(a).orient(c);return f.tickFormat(d).ticks(e),Pg?f.tickCentered(Rf):f.tickOffset=function(){var a=Of?Me:Ke;return a*Kb()/fc()/2},Pg&&f.categories(Qf),f}function Y(a,b,c,d){return g.svg.axis().scale(a).orient(b).tickFormat(c).ticks(d).outerTickSize(0)}function Z(a){return a in wf?wf[a]:"y"}function $(){var a=Og?Vg:Pg?oc:null;return Sf&&("function"==typeof Sf?a=Sf:Og&&(a=function(a){return g.time.format(Sf)(a)})),a}function _(){var a=fc();return Tf&&a>Uf?Uf:a}function ab(a){return"string"==typeof a?a:a?a.text:null}function bb(a,b){var c=a&&"object"==typeof a&&a.position?a.position:b;return{isInner:c.indexOf("inner")>=0,isOuter:c.indexOf("outer")>=0,isLeft:c.indexOf("left")>=0,isCenter:c.indexOf("center")>=0,isRight:c.indexOf("right")>=0,isTop:c.indexOf("top")>=0,isMiddle:c.indexOf("middle")>=0,isBottom:c.indexOf("bottom")>=0}}function cb(){return bb(Wf,"inner-right")}function db(){return bb($f,"inner-top")}function eb(){return bb(hg,"inner-top")}function fb(a){return"y2"===a?eb():"y"===a?db():cb()}function gb(){return ab(Wf)}function hb(){return ab($f)}function ib(){return ab(hg)}function jb(a,b){return a?b.isLeft?0:b.isCenter?Ke/2:Ke:b.isBottom?-Me:b.isMiddle?-Me/2:0}function kb(a,b){return a?b.isLeft?"0.5em":b.isRight?"-0.5em":"0":b.isTop?"-0.5em":b.isBottom?"0.5em":"0"}function lb(a,b){return a?b.isLeft?"start":b.isCenter?"middle":"end":b.isBottom?"start":b.isMiddle?"middle":"end"}function mb(){return jb(!Of,cb())}function nb(){return jb(Of,db())}function ob(){return jb(Of,eb())}function pb(){return kb(Of,db())}function qb(){return kb(Of,eb())}function rb(){var a=cb();return Of?a.isInner?"1.2em":-30-xb("x"):a.isInner?"-0.5em":"3em"}function sb(){var a=db();return Of?a.isInner?"-0.5em":"3em":a.isInner?"1.2em":-20-xb("y")}function tb(){var a=eb();return Of?a.isInner?"1.2em":"-2.2em":a.isInner?"-0.5em":30+xb("y2")}function ub(){return lb(!Of,cb())}function vb(){return lb(Of,db())}function wb(){return lb(Of,eb())}function xb(a){var b=0;return g.selectAll("."+a+".axis .tick text").each(function(){var a=this.getBBox();b0)for(f=mc(a),b=0;ba?a:0}),c=1;c0||(h[d][b]+=+a)});return g.min(Object.keys(h).map(function(a){return g.min(h[a])}))}function Ib(a){var b,c,d,e,f,h=kc(a);if(vf.length>0)for(f=nc(a),b=0;b0?a:0}),c=1;c+a||(h[d][b]+=+a)});return g.max(Object.keys(h).map(function(a){return g.max(h[a])}))}function Jb(a){var b,d,e,f,g,h,i,j,k=jc(function(b){return Z(b.id)===a}),l="y2"===a?fg:Yf,m="y2"===a?eg:Xf,n=c(l)?l:Hb(k),o=c(m)?m:Ib(k),p="y2"===a?gg:Zf,q=Gc()&&Of;return n===o&&(0>n?o=0:n=0),b=Math.abs(o-n),d=e=f=q?0:.1*b,p&&(g=Math.max(Math.abs(n),Math.abs(o)),o=g-p,n=p-g),"y"===a&&bg&&(e=c(bg.top)?bg.top:d,f=c(bg.bottom)?bg.bottom:d),"y2"===a&&kg&&(e=c(kg.top)?kg.top:d,f=c(kg.bottom)?kg.bottom:d),q&&(h=Hc(n,o),i=Pb(gf.range()),j=[h[0]/i,h[1]/i],e+=b*(j[1]/(1-j[0]-j[1])),f+=b*(j[0]/(1-j[0]-j[1]))),gd(k)&&!mc(k)&&(f=n),[n-f,o+e]}function Kb(a){var b=Pb(rh),c=Pb(ff.domain());return a||0===c?1:b/c}function Lb(a){return g.min(a,function(a){return g.min(a.values,function(a){return a.x})})}function Mb(a){return g.max(a,function(a){return g.max(a.values,function(a){return a.x})})}function Nb(a,b){var c,d,e=b[0],f=b[1],g=Math.abs(e-f);return Pg?d=0:gd(a)?(c=fc(),d=c>1?g/(c-1)/2:.5):d=.01*g,d}function Ob(a){var b=[Lb(a),Mb(a)],c=b[0],d=b[1],e=Nb(a,b),f=Og?new Date(c.getTime()-e):c-e,g=Og?new Date(d.getTime()+e):d+e;return[f,g]}function Pb(a){return a[1]-a[0]}function Qb(a){for(var b=0;bd?0:d}function Vb(a){return qf&&a===qf||rf&&Ad(rf,a)}function Wb(a){return!Vb(a)}function Xb(a){return qf?qf:rf?rf[a]:null}function Yb(a,b){return a in re.data.x&&re.data.x[a]&&re.data.x[a][b]?re.data.x[a][b]:b}function Zb(a){Object.keys(a).forEach(function(b){rf[b]=a[b]})}function $b(a){var b;return a&&(b=uf[a.id],a.name=b?b:a.id),a}function _b(a){var b,c,d=a[0],e={},f=[];for(b=1;b=0?b.map(function(a){return a[c]}):re.data.x[Object.keys(re.data.x)[0]]}),c=d.map(function(a){var c=tf(a);return{id:c,id_org:a,values:b.map(function(b,d){var e,f=Xb(a);return e=Og?wd(b[f]):Qg?b[f]?+b[f]:Yb(a,d):d,b.x=e,{x:e,value:null===b[a]||isNaN(b[a])?null:+b[a],id:c}})}}),c.forEach(function(a){var b;a.values=a.values.sort(function(a,b){var c=a.x||0===a.x?a.x:1/0,d=b.x||0===b.x?b.x:1/0;return c-d}),b=0,a.values.forEach(function(a){a.index=b++})}),xf&&ed(hc(c).filter(function(a){return!(a in yf)}),xf),c.forEach(function(a){Rb(a.id_org,a)}),c)}function cc(a){return{id:a.id,id_org:a.id_org,values:a.values.map(function(a){return{x:a.x,value:a.value,id:a.id}})}}function dc(a){return a>0&&re.data.targets[0].values[a-1]?re.data.targets[0].values[a-1].x:void 0}function ec(a){return a1?re.data.targets.forEach(function(b){b.values.length>c&&(a=b,c=b.values.length)}):a=b?re.data.targets[0]:null,a}function hc(a){return a=d(a)?re.data.targets:a,a.map(function(a){return a.id})}function ic(a){var b,c=hc();for(b=0;ba})}function nc(a){return lc(a,function(a){return a>0})}function oc(a){return a=0&&d===a[c].x;c--)e.push(a[c]);for(c=b;c0?g=h:f=h,g-f===1?(e=[],a[f].x&&(e=e.concat(Oc(a,f))),a[g].x&&(e=e.concat(Oc(a,g))),Rc(e,b)):Pc(a,b,f,g)}function Qc(a,b){var c;return c=a.map(function(a){return Pc(a.values,b)}),Rc(c,b)}function Rc(a,b){var c,d;return a.forEach(function(a){var e=Bd(a,b);(c>e||!c)&&(c=e,d=a)}),d}function Sc(){return Af&&"desc"===Af.toLowerCase()}function Tc(){return Af&&"asc"===Af.toLowerCase()}function Uc(a){var b=Tc(),c=Sc();return b||c?a.sort(function(a,c){var d=function(a,b){return a+Math.abs(b.value)},e=a.values.reduce(d,0),f=c.values.reduce(d,0);return b?f-e:e-f}):"function"==typeof Af&&a.sort(Af),a}function Vc(a,b){var d,e,f,g,h,i,j,k=kd(re.data.targets),l=k?Nc:Mc,m=a.filter(function(a){return a&&c(a.value)});Fg&&0!==m.length&&(ph.html(Ig(a,$(),l,Ug)).style("visibility","hidden").style("display","block"),d=ph.property("offsetWidth"),e=ph.property("offsetHeight"),k?(g=Ke/2+b[0],i=Me/2+b[1]+20):(Of?(f=q(),g=f+b[0]+100,h=g+d,j=r()-u(),i=ff(m[0].x)+20):(f=q(),g=f+t()+ff(m[0].x)+20,h=g+d,j=f+r()-u(),i=b[1]+15),h>j&&(g-=d+60),i+e>s()&&(i-=e+30)),ph.style("top",i+"px").style("left",g+"px").style("visibility","visible"))}function Wc(){ph.style("display","none")}function Xc(a){var b=a.filter(function(a){return a&&c(a.value)});Fg&&(hd(re.data.targets)||kd(re.data.targets)||mh.selectAll("line.xgrid-focus").style("visibility","visible").data([b[0]]).attr(Of?"y1":"x1",Ic).attr(Of?"y2":"x2",Ic))}function Yc(){mh.select("line.xgrid-focus").style("visibility","hidden")}function Zc(a){return a.x||0===a.x?ff(a.x):null}function $c(a){return V(a.id)(a.value)}function _c(){var a,b,c={},e=0;return jc(nd).forEach(function(f){for(a=0;a0&&(i+=g(b.values[f].value)-h)}),i}}function dd(a,b){return b?2*a.tickOffset()*.6/b:0}function ed(a,b){var c=d(a)?hc():a;"string"==typeof c&&(c=[c]);for(var e=0;e0&&i>k||a.value<0&&k>i)&&(k=i),[[j,i],[j,k-(c-i)],[j+d,k-(c-i)],[j+d,i]]}}function Ud(a,b,c,f){var g,h,i,j,k,l,m,n,o,p,q,r=-1,s="M",t=[];if(e(f))for(g=0;g=h;h+=u)s+=i(a[g-1],a[g],h,o)}r=a[g].x}return s}function Vd(b){var c,d,e;if(qh=g.select(we),qh.empty())return void a.alert('No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".');if(qh.html(""),re.data.x={},re.data.targets=bc(b),o(),R(),ff.domain(g.extent(Ob(re.data.targets))),gf.domain(Jb("y")),hf.domain(Jb("y2")),jf.domain(ff.domain()),kf.domain(gf.domain()),lf.domain(hf.domain()),rh=ff.domain(),fh.scale(jf),Be&&jh.scale(ff),kh=g.select(we).append("svg").attr("width",Ke+He.left+He.right).attr("height",Me+He.top+He.bottom).on("mouseenter",Ee).on("mouseleave",Fe),lh=kh.append("defs"),lh.append("clipPath").attr("id",Mg).append("rect").attr("width",Ke).attr("height",Me),lh.append("clipPath").attr("id","xaxis-clip").append("rect").attr("x",B).attr("y",C).attr("width",H).attr("height",I),lh.append("clipPath").attr("id","yaxis-clip").append("rect").attr("x",D).attr("y",E).attr("width",J).attr("height",K),mh=kh.append("g").attr("transform",$g.main),nh=Hf?kh.append("g").attr("transform",$g.context):null,oh=Kf?kh.append("g").attr("transform",$g.legend):null,ph=g.select(we).style("position","relative").append("div").style("position","absolute").style("z-index","10").style("display","none"),mh.append("g").attr("class","x axis").attr("clip-path",Of?"":j("xaxis-clip")).attr("transform",$g.x).append("text").attr("class","-axis-x-label").attr("transform",Of?"rotate(-90)":"").attr("dy",rb).style("text-anchor",ub).text(gb),mh.append("g").attr("class","y axis").attr("clip-path",Of?j("yaxis-clip"):"").append("text").attr("class","-axis-y-label").attr("transform",Of?"":"rotate(-90)").attr("dx",pb).style("text-anchor",vb).text(hb),dg&&mh.append("g").attr("class","y2 axis").attr("transform",$g.y2).append("text").attr("class","-axis-y2-label").attr("transform",Of?"":"rotate(-90)").attr("dx",qb).style("text-anchor",wb).text(ib),d=mh.append("g").attr("clip-path",Ng).attr("class","grid"),mg&&d.append("g").attr("class","xgrids"),og&&d.append("g").attr("class","xgrid-lines"),ug&&d.append("g").attr("class","xgrid-focus").append("line").attr("class","xgrid-focus").attr("x1",Of?0:-10).attr("x2",Of?Ke:-10).attr("y1",Of?-10:He.top).attr("y2",Of?-10:Me),pg&&d.append("g").attr("class","ygrids"),qg&&d.append("g").attr("class","ygrid-lines"),mh.append("g").attr("clip-path",Ng).attr("class","regions"),mh.append("g").attr("clip-path",Ng).attr("class","chart"),c=mh.select(".chart").append("g").attr("class","event-rects").style("fill-opacity",0).style("cursor",Be?Of?"ns-resize":"ew-resize":null),mh.select(".chart").append("g").attr("class","chart-bars"),mh.select(".chart").append("g").attr("class","chart-lines"),mh.select(".chart").append("g").attr("class","chart-arcs").attr("transform",$g.arc).append("text").attr("class","chart-arcs-title").style("text-anchor","middle").text(Dg),mh.select(".chart").append("g").attr("class","chart-texts"),Be&&mh.insert("rect",De?null:"g.grid").attr("class","zoom-rect").attr("width",Ke).attr("height",Me).style("opacity",0).style("cursor",Of?"ns-resize":"ew-resize").call(jh).on("dblclick.zoom",null),null!==Vf&&fh.extent("function"!=typeof Vf?Vf:Vf(Ob())),Hf&&(nh.append("g").attr("clip-path",Ng).attr("class","chart"),nh.select(".chart").append("g").attr("class","chart-bars"),nh.select(".chart").append("g").attr("class","chart-lines"),nh.append("g").attr("clip-path",Ng).attr("class","x brush").call(fh).selectAll("rect").attr(Of?"width":"height",Of?Le:Ne),nh.append("g").attr("class","x axis").attr("transform",$g.subx).attr("clip-path",Of?j("yaxis-clip"):"")),ge(re.data.targets),Of?mh.select(".x.axis").style("opacity",0).call(mf):(mh.select(".y.axis").style("opacity",0).call(nf),mh.select(".y2.axis").style("opacity",0).call(of)),fe({withTransform:!0,withUpdateXDomain:!0,withLegend:!0,durationForAxis:0}),Jg){if(Og&&"string"==typeof Kg){for(Kg=wd(Kg),e=0;e0){d=[];for(var f in uf)for(c=0;cf&&h>c&&d>i&&j>d):"rect"===this.nodeName&&(c=1*l.attr("x"),d=1*l.attr("y"),e=1*l.attr("width"),k=Hd,o=c+e>f&&h>c&&j>d),o^n&&(l.classed(ve,!n),l.classed(ue,!m),k(!m,l,a,b))}))}function $d(a){kd(re.data.targets)||Df&&(Rg=a,mh.select(".chart").append("rect").attr("class","dragarea").style("opacity",.1),Sg=!0)}function _d(){kd(re.data.targets)||Df&&(mh.select(".dragarea").transition().duration(100).style("opacity",0).remove(),mh.selectAll(".-shape").classed(ve,!1),Sg=!1)}function ae(a){var b,d,f,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I=_c(),J=kd(re.data.targets);if(a=e(a)?a:{},u=e(a.withY)?a.withY:!0,v=e(a.withSubchart)?a.withSubchart:!0,w=e(a.withTransition)?a.withTransition:!0,x=e(a.withTransform)?a.withTransform:!1,y=e(a.withUpdateXDomain)?a.withUpdateXDomain:!1,z=e(a.withUpdateOrgXDomain)?a.withUpdateOrgXDomain:!1,A=e(a.withLegend)?a.withLegend:!1,F=w?Ge:0,G=e(a.durationForExit)?a.durationForExit:F,H=e(a.durationForAxis)?a.durationForAxis:F,A&&Kf&&le(re.data.targets,a),z&&(ff.domain(g.extent(Ob(re.data.targets))),rh=ff.domain(),Be&&jh.scale(ff).updateScaleExtent(),jf.domain(ff.domain()),fh.scale(jf)),y&&(ff.domain(fh.empty()?rh:fh.extent()),Be&&jh.scale(ff).updateScaleExtent()),gf.domain(Jb("y")),hf.domain(Jb("y2")),mh.select(".x.axis").style("opacity",J?0:1).transition().duration(H).call(mf),mh.select(".y.axis").style("opacity",J?0:1).transition().duration(H).call(nf),mh.select(".y2.axis").style("opacity",J?0:1).transition().duration(H).call(of),B=Pd(I),D=Qd(I,!0),E=Qd(I,!1),mh.select(".x.axis .-axis-x-label").attr("x",mb),mh.select(".y.axis .-axis-y-label").attr("x",nb).attr("dy",sb),mh.select(".y2.axis .-axis-y2-label").attr("x",ob).attr("dy",tb),kf.domain(gf.domain()),lf.domain(hf.domain()),ph.style("display","none"),mh.select("line.xgrid-focus").style("visibility","hidden").attr("y2",Me),mg){if("year"===ng){d=[];for(var K=Ob(),M=K[0].getFullYear(),N=K[1].getFullYear(),O=M;N>=O;O++)d.push(new Date(O+"-01-01 00:00:00"))}else d=ff.ticks(10);b=mh.select(".xgrids").selectAll(".xgrid").data(d),b.enter().append("line").attr("class","xgrid"),b.attr("x1",Of?0:function(a){return ff(a)-mf.tickOffset() }).attr("x2",Of?Ke:function(a){return ff(a)-mf.tickOffset()}).attr("y1",Of?function(a){return ff(a)-mf.tickOffset()}:He.top).attr("y2",Of?function(a){return ff(a)-mf.tickOffset()}:Me).style("opacity",function(){return+g.select(this).attr(Of?"y1":"x1")===(Of?Me:0)?0:1}),b.exit().remove()}og&&(f=mh.select(".xgrid-lines").selectAll(".xgrid-line").data(og),h=f.enter().append("g").attr("class",function(a){return"xgrid-line xgrid-line-"+(a["class"]?a["class"]:"")}),h.append("line").style("opacity",0),h.append("text").attr("text-anchor","end").attr("transform",Of?"":"rotate(-90)").attr("dx",Of?0:-He.top).attr("dy",-5).style("opacity",0),f.select("line").transition().duration(F).attr("x1",Of?0:Jc).attr("x2",Of?Ke:Jc).attr("y1",Of?Jc:He.top).attr("y2",Of?Jc:Me).style("opacity",1),f.select("text").transition().duration(F).attr("x",Of?Ke:0).attr("y",Jc).text(function(a){return a.text}).style("opacity",1),f.exit().transition().duration(F).style("opacity",0).remove()),u&&pg&&(i=mh.select(".ygrids").selectAll(".ygrid").data(gf.ticks(rg)),i.enter().append("line").attr("class","ygrid"),i.attr("x1",Of?gf:0).attr("x2",Of?gf:Ke).attr("y1",Of?0:gf).attr("y2",Of?Me:gf),i.exit().remove()),u&&qg&&(j=mh.select(".ygrid-lines").selectAll(".ygrid-line").data(qg),k=j.enter().append("g").attr("class",function(a){return"ygrid-line ygrid-line-"+(a.class?a.class:"")}),k.append("line").style("opacity",0),k.append("text").attr("text-anchor","end").attr("transform",Of?"rotate(-90)":"").attr("dx",Of?0:-He.top).attr("dy",-5).style("opacity",0),j.select("line").transition().duration(F).attr("x1",Of?Kc:0).attr("x2",Of?Kc:Ke).attr("y1",Of?0:Kc).attr("y2",Of?Me:Kc).style("opacity",1),j.select("text").transition().duration(F).attr("x",Of?0:Ke).attr("y",Kc).text(function(a){return a.text}).style("opacity",1),j.exit().transition().duration(F).style("opacity",0).remove()),m=mh.selectAll(".-bars").selectAll(".-bar").data(sd),m.enter().append("path").attr("d",B).style("stroke","none").style("opacity",0).style("fill",function(a){return Ug(a.id)}).attr("class",zc),m.style("opacity",Cc).transition().duration(F).attr("d",B).style("opacity",1),m.exit().transition().duration(G).style("opacity",0).remove(),o=mh.selectAll(".-texts").selectAll(".-text").data(ud),o.enter().append("text").attr("class",pc).attr("text-anchor",function(a){return Of?a.value<0?"end":"start":"middle"}).style("stroke","none").style("fill-opacity",0).text(function(a){return Mc(a.value)}),o.style("fill-opacity",Dc).transition().duration(F).attr("x",D).attr("y",E).style("fill-opacity",Fc),o.exit().transition().duration(G).style("fill-opacity",0).remove(),mh.selectAll(".-line").style("opacity",Cc).transition().duration(F).attr("d",gh).style("opacity",1),mh.selectAll(".-area").style("opacity",0).transition().duration(F).attr("d",hh).style("opacity",sh),l=mh.selectAll(".-circles").selectAll(".-circle").data(td),l.enter().append("circle").attr("class",yc).style("opacity",0).attr("r",tg),l.style("opacity",Cc).transition().duration(F).style("opacity",Ec).attr("cx",Of?$c:Zc).attr("cy",Of?Zc:$c),l.exit().remove(),mh.selectAll(".chart-arc").select(".-arc").attr("transform",x?"scale(0)":"").style("opacity",function(a){return a===this._current?0:1}).transition().duration(F).attrTween("d",function(a){var b=yb(a);if(!b)return function(){return"M 0 0"};var c=g.interpolate(this._current,b);return this._current=c(0),function(a){return Bb(c(a),!0)}}).attr("transform",x?"scale(1)":"").style("opacity",1),mh.selectAll(".chart-arc").select("text").attr("transform",Cb).style("opacity",0).transition().duration(F).text(Eb).style("opacity",function(a){return rd(a.data)?1:0}),mh.select(".chart-arcs-title").style("opacity",jd(re.data.targets)?1:0),Hf&&(null!==g.event&&"zoom"===g.event.type&&fh.extent(ff.orgDomain()).update(),v&&(nh.select(".x.axis").style("opacity",J?0:1).transition().duration(F).call(pf),fh.empty()||fh.extent(ff.orgDomain()).update(),C=Pd(I,!0),p=nh.selectAll(".-bars").selectAll(".-bar").data(sd),p.enter().append("path").attr("d",C).style("stroke","none").style("fill",function(a){return Ug(a.id)}).attr("class",zc),p.style("opacity",Cc).transition().duration(F).attr("d",C).style("opacity",1),p.exit().transition().duration(F).style("opacity",0).remove(),nh.selectAll(".-line").style("opacity",Cc).transition().duration(F).attr("d",ih).style("opacity",1))),mh.selectAll(".selected-circles").filter(function(a){return nd(a)}).selectAll("circle").remove(),mh.selectAll(".selected-circle").transition().duration(F).attr("cx",Of?$c:Zc).attr("cy",Of?Zc:$c),rf?(q=mh.select(".event-rects").selectAll(".event-rect").data([0]),Xd(q.enter()),q.attr("x",0).attr("y",0).attr("width",Ke).attr("height",Me)):(Qg?(t=function(a,b){var c=dc(b),d=ec(b);return(ff(d?d:a.x+50)-ff(c?c:a.x-50))/2},s=function(a,b){var c=dc(b);return(ff(a.x)+ff(c?c:a.x-50))/2}):(t=L(),s=function(a){return ff(a.x)-t/2}),r=gc(),mh.select(".event-rects").datum(r?r.values:[]),q=mh.select(".event-rects").selectAll(".event-rect").data(function(a){return a}),Wd(q.enter()),q.attr("class",Bc).attr("x",Of?0:s).attr("y",Of?s:0).attr("width",Of?Ke:t).attr("height",Of?t:Me),q.exit().remove()),n=mh.select(".regions").selectAll("rect.region").data(Eg),n.enter().append("rect").style("fill-opacity",0),n.attr("class",Ac).attr("x",Of?0:Tb).attr("y",Of?Tb:He.top).attr("width",Of?Ke:Ub).attr("height",Of?Ub:Me).transition().duration(F).style("fill-opacity",function(a){return c(a.opacity)?a.opacity:.1}),n.exit().transition().duration(F).style("fill-opacity",0).remove(),hc().forEach(function(a){th[a]=!0})}function be(){ae({withTransition:!1,withY:!1,withSubchart:!1,withUpdateXDomain:!0})}function ce(){return"mousemove"===g.event.sourceEvent.type&&jh.altDomain?(ff.domain(jh.altDomain),void jh.scale(ff).updateScaleExtent()):(Pg&&ff.orgDomain()[0]===rh[0]&&ff.domain([rh[0]-1e-10,ff.orgDomain()[1]]),ae({withTransition:!1,withY:!1,withSubchart:!1}),void("mousemove"===g.event.sourceEvent.type&&(Tg=!0)))}function de(){function a(){b.forEach(function(a){a()})}var b=[];return a.add=function(a){b.push(a)},a}function ee(){kh.attr("width",Oe).attr("height",Pe),kh.select("#"+Mg).select("rect").attr("width",Ke).attr("height",Me),kh.select("#xaxis-clip").select("rect").attr("width",H),kh.select(".zoom-rect").attr("width",Ke).attr("height",Me)}function fe(a){a=e(a)?a:{},a.withTransition=e(a.withTransition)?a.withTransition:!0,a.withTransform=e(a.withTransform)?a.withTransform:!1,a.withLegend=e(a.withLegend)?a.withLegend:!1,a.withUpdateXDomain=!0,a.durationForExit=0,o(),R(),ee(),n(a.withTransition),ae(a)}function ge(a){var b,c,d,e,f,h,i,j,k,l,m,n;i=mh.select(".chart-texts").selectAll(".chart-text").data(a),j=i.enter().append("g").attr("class",function(a){return"chart-text target target-"+a.id}).style("pointer-events","none"),j.append("g").attr("class",qc).style("fill",function(a){return Ug(a.id)}),e=mh.select(".chart-bars").selectAll(".chart-bar").data(a),d=e.enter().append("g").attr("class",function(a){return"chart-bar target target-"+a.id}).style("pointer-events","none"),d.append("g").attr("class",uc).style("fill",function(a){return Ug(a.id)}).style("stroke","none").style("cursor",function(a){return Ff(a)?"pointer":null}),c=mh.select(".chart-lines").selectAll(".chart-line").data(a),b=c.enter().append("g").attr("class",function(a){return"chart-line target target-"+a.id}).style("pointer-events","none"),b.append("path").attr("class",sc).style("opacity",0).style("stroke",function(a){return Ug(a.id)}),b.append("path").attr("class",wc).style("opacity",function(){return sh=+g.select(this).style("opacity"),0}).style("fill",function(a){return Ug(a.id)}),b.append("g").attr("class",function(a){return"selected-circles selected-circles-"+a.id}),b.append("g").attr("class",tc).style("fill",function(a){return Ug(a.id)}).style("cursor",function(a){return Ff(a)?"pointer":null}),a.forEach(function(a){var b=me(a.id);mh.selectAll(".selected-circles"+b).selectAll(".selected-circle").each(function(b){b.value=a.values[b.x].value})}),h=mh.select(".chart-arcs").selectAll(".chart-arc").data(Ye(a)),f=h.enter().append("g").attr("class",function(a){return"chart-arc target target-"+a.data.id}),f.append("path").attr("class",vc).style("opacity",0).style("fill",function(a){return Ug(a.data.id)}).style("cursor",function(a){return Ff(a)?"pointer":null}).each(function(a){this._current=a}).on("mouseover",function(a){Fb(a.data.id),ie(a.data.id)}).on("mousemove",function(a){var b=[$b({id:a.data.id,value:a.value,ratio:Db(a)})];Vc(b,g.mouse(this))}).on("mouseout",function(a){Gb(a.data.id),ke(),Wc()}),f.append("text").attr("dy",".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none"),Hf&&(n=nh.select(".chart-bars").selectAll(".chart-bar").data(a),m=n.enter().append("g").attr("class",function(a){return"chart-bar target target-"+a.id}),m.append("g").attr("class",uc).style("fill",function(a){return Ug(a.id)}),l=nh.select(".chart-lines").selectAll(".chart-line").data(a),k=l.enter().append("g").attr("class",function(a){return"chart-line target target-"+a.id}),k.append("path").attr("class",sc).style("opacity",0).style("stroke",function(a){return Ug(a.id)})),kh.selectAll(".target").transition().style("opacity",1)}function he(a,b){re.data.targets.forEach(function(b){for(var c=0;ce&&(e=(k-j)/2,v=0,B++)),A[a]=B,z[B]=e,w[a]=v,v+=j}var e,f,g=a.getBBox(),h=10*Math.ceil((g.width+t)/10),i=10*Math.ceil((g.height+s)/10),j=_g?i:h,k=_g?Qe:Re;c&&(v=0,B=0,m=0,p=0),x[b]=h,y[b]=i,(!m||h>=m)&&(m=h),(!p||i>=p)&&(p=i),f=_g?p:m,Nf?(Object.keys(x).forEach(function(a){x[a]=m}),Object.keys(y).forEach(function(a){y[a]=p}),e=(k-f*r.length)/2,u>e?(v=0,B=0,r.forEach(function(a){d(a)})):d(b,!0)):d(b)}var f,g,h,i,j,k,l,m,p,q,r=hc(a),s=4,t=26,u=10,v=0,w={},x={},y={},z={},A={},B=0;b=d(b)?{}:b,q=e(b.withTransition)?b.withTransition:!0,_g?(g=function(a){return m*(.2+A[a])},j=function(a){return z[A[a]]+w[a]}):(g=function(a){return z[A[a]]+w[a]},j=function(a){return p*(.2+A[a])}),h=function(a,b){return g(a,b)+14},k=function(a,b){return j(a,b)+9},i=function(a,b){return g(a,b)-4},l=function(a,b){return j(a,b)-7},f=oh.selectAll(".legend-item").data(r).enter().append("g").attr("class",function(a){return"legend-item legend-item-"+a}).style("cursor","pointer").on("click",function(a){Mf(a)}).on("mouseover",function(a){re.focus(a)}).on("mouseout",function(){re.revert()}),f.append("text").text(function(a){return e(uf[a])?uf[a]:a}).each(function(a,b){c(this,a,0===b)}).style("pointer-events","none").attr("x",_g?h:-200).attr("y",_g?-200:k),f.append("rect").attr("class","legend-item-event").style("fill-opacity",0).attr("x",_g?i:-200).attr("y",_g?-200:l).attr("width",function(a){return x[a]}).attr("height",function(a){return y[a]}),f.append("rect").attr("class","legend-item-tile").style("pointer-events","none").style("fill",function(a){return Ug(a)}).attr("x",_g?h:-200).attr("y",_g?-200:j).attr("width",10).attr("height",10),oh.selectAll("text").data(r).each(function(a,b){c(this,a,0===b)}).transition().duration(q?250:0).attr("x",h).attr("y",k),oh.selectAll("rect.legend-item-event").data(r).transition().duration(q?250:0).attr("x",i).attr("y",l),oh.selectAll("rect.legend-item-tile").data(r).transition().duration(q?250:0).attr("x",g).attr("y",j),N(m),O(p),M(B),o(),R(),ee(),n(!1)}function me(a){return a?"-"+a.replace(/\./g,"\\."):""}function ne(a){return".target"+me(a)}function oe(a){return ic(a.id)}function pe(a){return"data"in a&&ic(a.data.id)}function qe(a){var b=a&&a.value?a.value:null,c=a&&a["class"]?a["class"]:null;return b?function(a){return a.value!==b}:c?function(a){return a["class"]!==c}:function(){return!0}}var re={data:{}},se={},te="_expanded_",ue="_selected_",ve="_included_",we=i(["bindto"],"#chart"),xe=i(["size","width"],null),ye=i(["size","height"],null),ze=i(["padding","left"],null),Ae=i(["padding","right"],null),Be=i(["zoom","enabled"],!1),Ce=i(["zoom","extent"],null),De=i(["zoom","privileged"],!1),Ee=i(["onenter"],function(){}),Fe=i(["onleave"],function(){}),Ge=i(["transition","duration"],350);h("data","data is required in config");var He,Ie,Je,Ke,Le,Me,Ne,Oe,Pe,Qe,Re,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,_e,af,bf,cf,df,ef,ff,gf,hf,jf,kf,lf,mf,nf,of,pf,qf=i(["data","x"],null),rf=i(["data","xs"],null),sf=i(["data","x_format"],"%Y-%m-%d"),tf=i(["data","id_converter"],function(a){return a}),uf=i(["data","names"],{}),vf=i(["data","groups"],[]),wf=i(["data","axes"],{}),xf=i(["data","type"],null),yf=i(["data","types"],{}),zf=i(["data","labels"],{}),Af=i(["data","order"],null),Bf=i(["data","regions"],{}),Cf=i(["data","colors"],{}),Df=i(["data","selection","enabled"],!1),Ef=i(["data","selection","grouped"],!1),Ff=i(["data","selection","isselectable"],function(){return!0}),Gf=i(["data","selection","multiple"],!0),Hf=i(["subchart","show"],!1),If=Hf?i(["subchart","size","height"],60):0,Jf=i(["color","pattern"],null),Kf=i(["legend","show"],!0),Lf=i(["legend","position"],"bottom"),Mf=i(["legend","item","onclick"],function(){}),Nf=i(["legend","equally"],!1),Of=i(["axis","rotated"],!1),Pf=i(["axis","x","type"],"indexed"),Qf=i(["axis","x","categories"],[]),Rf=i(["axis","x","tick","centered"],!1),Sf=i(["axis","x","tick","format"],null),Tf=i(["axis","x","tick","culling"],"categorized"===Pf?!1:!0),Uf=i(["axis","x","tick","count"],10),Vf=i(["axis","x","default"],null),Wf=i(["axis","x","label"],null),Xf=i(["axis","y","max"],null),Yf=i(["axis","y","min"],null),Zf=i(["axis","y","center"],null),$f=i(["axis","y","label"],null),_f=i(["axis","y","inner"],!1),ag=i(["axis","y","tick","format"],null),bg=i(["axis","y","padding"],null),cg=i(["axis","y","ticks"],10),dg=i(["axis","y2","show"],!1),eg=i(["axis","y2","max"],null),fg=i(["axis","y2","min"],null),gg=i(["axis","y2","center"],null),hg=i(["axis","y2","label"],null),ig=i(["axis","y2","inner"],!1),jg=i(["axis","y2","tick","format"],null),kg=i(["axis","y2","padding"],null),lg=i(["axis","y2","ticks"],10),mg=i(["grid","x","show"],!1),ng=i(["grid","x","type"],"tick"),og=i(["grid","x","lines"],null),pg=i(["grid","y","show"],!1),qg=i(["grid","y","lines"],null),rg=i(["grid","y","ticks"],10),sg=i(["point","show"],!0),tg=sg?i(["point","r"],2.5):0,ug=i(["point","focus","line","enabled"],!0),vg=i(["point","focus","expand","enabled"],!0),wg=i(["point","focus","expand","r"],vg?4:tg),xg=i(["point","focus","select","r"],8),yg=i(["point","onclick"],function(){}),zg=i(["point","onselected"],function(){}),Ag=i(["point","onunselected"],function(){}),Bg=i(["arc","label","show"],!0),Cg=i(["arc","label","format"],null),Dg=i(["arc","title"],""),Eg=i(["regions"],[]),Fg=i(["tooltip","show"],!0),Gg=i(["tooltip","format","title"],null),Hg=i(["tooltip","format","value"],null),Ig=i(["tooltip","contents"],function(a,b,c,d){var e,f,g,h,i,j=Gg?Gg:b,k=Hg?Hg:c;for(f=0;f"+(g?""+g+"":"")),i=a[f].name,h=k(a[f].value,a[f].ratio),e+=""+i+""+h+"");return e+""}),Jg=i(["tooltip","init","show"],!1),Kg=i(["tooltip","init","x"],0),Lg=i(["tooltip","init","position"],{top:"0px",left:"50px"}),Mg=we.replace("#","")+"-clip",Ng=j(Mg),Og="timeseries"===Pf,Pg="categorized"===Pf,Qg=!Og&&(qf||rf),Rg=null,Sg=!1,Tg=!1,Ug=vd(Cf,Jf),Vg=function(){var a=[[g.time.format("%Y/%-m/%-d"),function(){return!0}],[g.time.format("%-m/%-d"),function(a){return a.getMonth()}],[g.time.format("%-m/%-d"),function(a){return 1!==a.getDate()}],[g.time.format("%-m/%-d"),function(a){return a.getDay()&&1!==a.getDate()}],[g.time.format("%I %p"),function(a){return a.getHours()}],[g.time.format("%I:%M"),function(a){return a.getMinutes()}],[g.time.format(":%S"),function(a){return a.getSeconds()}],[g.time.format(".%L"),function(a){return a.getMilliseconds()}]];return function(b){for(var c=a.length-1,d=a[c];!d[1](b);)d=a[--c];return d[0](b)}}(),Wg=Of?"left":"bottom",Xg=Of?_f?"top":"bottom":_f?"right":"left",Yg=Of?ig?"bottom":"top":ig?"left":"right",Zg=Of?"left":"bottom",$g={main:function(){return"translate("+He.left+","+He.top+")"},context:function(){return"translate("+Ie.left+","+Ie.top+")"},legend:function(){return"translate("+Je.left+","+Je.top+")"},x:function(){return"translate(0,"+(Of?0:Me)+")"},y:function(){return"translate(0,"+(Of?Me:0)+")"},y2:function(){return"translate("+(Of?0:Ke)+","+(Of?1:0)+")"},subx:function(){return"translate(0,"+(Of?0:Ne)+")"},arc:function(){return"translate("+Ke/2+","+Me/2+")"}},_g="right"===Lf,ah=0,bh=0,ch=0,dh=40,eh=20;Ye=g.layout.pie().value(function(a){return a.values.reduce(function(a,b){return a+b.value},0)});var fh,gh=function(){var a=g.svg.line().x(Of?function(a){return V(a.id)(a.value)}:Ic).y(Of?Ic:function(a){return V(a.id)(a.value)});return function(b){var c,d,e=Id(b.values);return ld(b)?(a.interpolate(md(b)?"cardinal":"linear"),Bf[b.id]?Ud(e,ff,V(b.id),Bf[b.id]):a(e)):(c=ff(e[0].x),d=V(b.id)(e[0].value),Of?"M "+d+" "+c:"M "+c+" "+d)}}(),hh=function(){var a;return a=Of?g.svg.area().x0(function(a){return V(a.id)(0)}).x1(function(a){return V(a.id)(a.value)}).y(Ic):g.svg.area().x(Ic).y0(function(a){return V(a.id)(0)}).y1(function(a){return V(a.id)(a.value)}),function(b){var c,d,e=Id(b.values);return fd([b],"area")||fd([b],"area-spline")?(a.interpolate(md(b)?"cardinal":"linear"),a(e)):(c=ff(e[0].x),d=V(b.id)(e[0].value),Of?"M "+d+" "+c:"M "+c+" "+d)}}(),ih=function(){var a=g.svg.line().x(Of?function(a){return W(a.id)(a.value)}:Lc).y(Of?Lc:function(a){return W(a.id)(a.value)});return function(b){var c=Id(b.values);return ld(b)?a(c):"M "+jf(c[0].x)+" "+W(b.id)(c[0].value)}}(),jh=function(){};fh=g.svg.brush().on("brush",be),fh.update=function(){return nh&&nh.select(".x.brush").call(this),this},fh.scale=function(a){return Of?this.y(a):this.x(a)},Be&&(jh=g.behavior.zoom().on("zoomstart",function(){jh.altDomain=g.event.sourceEvent.altKey?ff.orgDomain():null}).on("zoom",Be?ce:null),jh.scale=function(a){return Of?this.y(a):this.x(a)},jh.orgScaleExtent=function(){var a=Ce?Ce:[1,10];return[a[0],Math.max(fc()/a[1],a[1])]},jh.updateScaleExtent=function(){var a=Pb(ff.orgDomain())/Pb(rh),b=this.orgScaleExtent();return this.scaleExtent([b[0]*a,b[1]*a]),this});var kh,lh,mh,nh,oh,ph,qh,rh,sh,th={};if(re.focus=function(a){function b(a){a.transition().duration(100).style("opacity",1)}var c=kh.selectAll(ne(a)),d=c.filter(oe),e=c.filter(pe);re.revert(),re.defocus(),b(d.classed("focused",!0)),b(e),kd(re.data.targets)&&Fb(a,!0),ie(a)},re.defocus=function(a){function b(a){a.transition().duration(100).style("opacity",.3)}var c=kh.selectAll(ne(a)),d=c.filter(oe),e=c.filter(pe);re.revert(),b(d.classed("focused",!1)),b(e),kd(re.data.targets)&&Gb(a),je(a)},re.revert=function(a){function b(a){a.transition().duration(100).style("opacity",1)}var c=kh.selectAll(ne(a)),d=c.filter(oe),e=c.filter(pe);b(d.classed("focused",!1)),b(e),kd(re.data.targets)&&Gb(a),ke()},re.show=function(a){kh.selectAll(ne(a)).transition().style("opacity",1)},re.hide=function(a){kh.selectAll(ne(a)).transition().style("opacity",0)},re.unzoom=function(){fh.clear().update(),ae({withUpdateXDomain:!0})},re.load=function(a){if("function"!=typeof a.done&&(a.done=function(){}),a.xs&&Zb(a.xs),"categories"in a&&Pg&&(Qf=a.categories,mf.categories(Qf)),"cacheIds"in a&&Qb(a.cacheIds))return void he(Sb(a.cacheIds),a.done);if("data"in a)he(bc(a.data),a.done);else if("url"in a)g.csv(a.url,function(b,c){he(bc(c),a.done)});else if("rows"in a)he(bc(_b(a.rows)),a.done);else{if(!("columns"in a))throw Error("url or rows or columns is required.");he(bc(ac(a.columns)),a.done)}},re.unload=function(a){re.data.targets=re.data.targets.filter(function(b){return b.id!==a}),kh.selectAll(ne(a)).transition().style("opacity",0).remove(),Kf&&oh.selectAll(".legend-item"+me(a)).remove(),re.data.targets.length>0&&ae({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},re.selected=function(a){var b=me(a);return g.merge(mh.selectAll(".-shapes"+b).selectAll(".-shape").filter(function(){return g.select(this).classed(ue)}).map(function(a){return a.map(function(a){return a.__data__})}))},re.select=function(a,b,c){Df&&mh.selectAll(".-shapes").selectAll(".-shape").each(function(d,f){var h="circle"===this.nodeName?Cd:Fd,i="circle"===this.nodeName?Dd:Gd,j=Ef||!a||a.indexOf(d.id)>=0,k=!b||b.indexOf(f)>=0;j&&k?Ff(d)&&h(g.select(this).classed(ue,!0),d,f):e(c)&&c&&i(g.select(this).classed(ue,!1),d,f)})},re.unselect=function(a,b){Df&&mh.selectAll(".-shapes").selectAll(".-shape").each(function(c,d){var e="circle"===this.nodeName?Dd:Gd,f=Ef||!a||a.indexOf(c.id)>=0,h=!b||b.indexOf(d)>=0;f&&h&&Ff(c)&&e(g.select(this).classed(ue,!1),c,d)})},re.toLine=function(a){ed(a,"line"),fe()},re.toSpline=function(a){ed(a,"spline"),fe()},re.toBar=function(a){ed(a,"bar"),fe()},re.toScatter=function(a){ed(a,"scatter"),fe()},re.toArea=function(a){ed(a,"area"),fe()},re.toAreaSpline=function(a){ed(a,"area-spline"),fe()},re.toPie=function(a){ed(a,"pie"),fe({withTransform:!0})},re.toDonut=function(a){ed(a,"donut"),fe({withTransform:!0})},re.groups=function(a){return d(a)?vf:(vf=a,ae(),vf)},re.xgrids=function(a){return a?(og=a,ae(),og):og},re.xgrids.add=function(a){return a?re.xgrids(og.concat(a)):void 0},re.xgrids.remove=function(a){var b=qe(a);return re.xgrids(og.filter(b))},re.ygrids=function(a){return a?(qg=a,ae(),qg):qg},re.ygrids.add=function(a){return a?re.ygrids(qg.concat(a)):void 0},re.ygrids.remove=function(a){var b=qe(a);return re.ygrids(qg.filter(b))},re.regions=function(a){return d(a)?Eg:(Eg=a,ae(),Eg)},re.regions.add=function(a){return d(a)?Eg:(Eg=Eg.concat(a),ae(),Eg)},re.regions.remove=function(a,b){var d=[].concat(a);return b=e(b)?b:{},d.forEach(function(a){var d=c(b.duration)?b.duration:0;kh.selectAll("."+a).transition().duration(d).style("fill-opacity",0).remove(),Eg=Eg.filter(function(b){return b.classes.indexOf(a)<0})}),Eg},re.data.get=function(a){var b=re.data.getAsTarget(a);return e(b)?b.values.map(function(a){return a.value}):void 0},re.data.getAsTarget=function(a){var b=jc(function(b){return b.id===a});return b.length>0?b[0]:void 0},re.resize=function(a){xe=a?a.width:null,ye=a?a.height:null,fe({withLegend:!0,withTransition:!1})},re.destroy=function(){re.data.targets=void 0,re.data.x={},qh.html(""),a.onresize=null},"url"in f.data)g.csv(f.data.url,function(a,b){Vd(b)});else if("rows"in f.data)Vd(_b(f.data.rows));else{if(!("columns"in f.data))throw Error("url or rows or columns is required.");Vd(ac(f.data.columns))}return re}}(window);