267 lines
61 KiB
JavaScript
Generated
267 lines
61 KiB
JavaScript
Generated
import{b6 as nn,b7 as Ln,b8 as rn,b9 as an,ba as sn,bb as st,bc as An,aH as wt,_ as h,g as In,s as Wn,q as Hn,p as On,a as Nn,b as Vn,c as _e,d as Be,e as Pn,bd as ie,l as Ke,k as zn,j as Rn,y as qn,u as Bn}from"./index-bjrbS6e8.js";import{b as Zn,t as Ht,c as Xn,a as Gn,l as Qn}from"./linear-_bOHiOEq.js";import{i as jn}from"./init-Gi6I4Gst.js";import"./defaultLocale-C4B-KCzX.js";function $n(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Jn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Kn(e){return e}var Xe=1,ot=2,kt=3,Ze=4,Ot=1e-6;function er(e){return"translate("+e+",0)"}function tr(e){return"translate(0,"+e+")"}function nr(e){return t=>+e(t)}function rr(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function ir(){return!this.__axis}function on(e,t){var n=[],r=null,i=null,a=6,s=6,p=3,M=typeof window<"u"&&window.devicePixelRatio>1?0:.5,T=e===Xe||e===Ze?-1:1,g=e===Ze||e===ot?"x":"y",U=e===Xe||e===kt?er:tr;function C(b){var X=r??(t.ticks?t.ticks.apply(t,n):t.domain()),H=i??(t.tickFormat?t.tickFormat.apply(t,n):Kn),D=Math.max(a,0)+p,I=t.range(),V=+I[0]+M,W=+I[I.length-1]+M,B=(t.bandwidth?rr:nr)(t.copy(),M),j=b.selection?b.selection():b,w=j.selectAll(".domain").data([null]),O=j.selectAll(".tick").data(X,t).order(),x=O.exit(),F=O.enter().append("g").attr("class","tick"),S=O.select("line"),_=O.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),O=O.merge(F),S=S.merge(F.append("line").attr("stroke","currentColor").attr(g+"2",T*a)),_=_.merge(F.append("text").attr("fill","currentColor").attr(g,T*D).attr("dy",e===Xe?"0em":e===kt?"0.71em":"0.32em")),b!==j&&(w=w.transition(b),O=O.transition(b),S=S.transition(b),_=_.transition(b),x=x.transition(b).attr("opacity",Ot).attr("transform",function(k){return isFinite(k=B(k))?U(k+M):this.getAttribute("transform")}),F.attr("opacity",Ot).attr("transform",function(k){var Y=this.parentNode.__axis;return U((Y&&isFinite(Y=Y(k))?Y:B(k))+M)})),x.remove(),w.attr("d",e===Ze||e===ot?s?"M"+T*s+","+V+"H"+M+"V"+W+"H"+T*s:"M"+M+","+V+"V"+W:s?"M"+V+","+T*s+"V"+M+"H"+W+"V"+T*s:"M"+V+","+M+"H"+W),O.attr("opacity",1).attr("transform",function(k){return U(B(k)+M)}),S.attr(g+"2",T*a),_.attr(g,T*D).text(H),j.filter(ir).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===ot?"start":e===Ze?"end":"middle"),j.each(function(){this.__axis=B})}return C.scale=function(b){return arguments.length?(t=b,C):t},C.ticks=function(){return n=Array.from(arguments),C},C.tickArguments=function(b){return arguments.length?(n=b==null?[]:Array.from(b),C):n.slice()},C.tickValues=function(b){return arguments.length?(r=b==null?null:Array.from(b),C):r&&r.slice()},C.tickFormat=function(b){return arguments.length?(i=b,C):i},C.tickSize=function(b){return arguments.length?(a=s=+b,C):a},C.tickSizeInner=function(b){return arguments.length?(a=+b,C):a},C.tickSizeOuter=function(b){return arguments.length?(s=+b,C):s},C.tickPadding=function(b){return arguments.length?(p=+b,C):p},C.offset=function(b){return arguments.length?(M=+b,C):M},C}function ar(e){return on(Xe,e)}function sr(e){return on(kt,e)}const or=Math.PI/180,cr=180/Math.PI,et=18,cn=.96422,un=1,ln=.82521,fn=4/29,Se=6/29,dn=3*Se*Se,ur=Se*Se*Se;function hn(e){if(e instanceof fe)return new fe(e.l,e.a,e.b,e.opacity);if(e instanceof he)return mn(e);e instanceof nn||(e=Ln(e));var t=ft(e.r),n=ft(e.g),r=ft(e.b),i=ct((.2225045*t+.7168786*n+.0606169*r)/un),a,s;return t===n&&n===r?a=s=i:(a=ct((.4360747*t+.3850649*n+.1430804*r)/cn),s=ct((.0139322*t+.0971045*n+.7141733*r)/ln)),new fe(116*i-16,500*(a-i),200*(i-s),e.opacity)}function lr(e,t,n,r){return arguments.length===1?hn(e):new fe(e,t,n,r??1)}function fe(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}rn(fe,lr,an(sn,{brighter(e){return new fe(this.l+et*(e??1),this.a,this.b,this.opacity)},darker(e){return new fe(this.l-et*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=cn*ut(t),e=un*ut(e),n=ln*ut(n),new nn(lt(3.1338561*t-1.6168667*e-.4906146*n),lt(-.9787684*t+1.9161415*e+.033454*n),lt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function ct(e){return e>ur?Math.pow(e,1/3):e/dn+fn}function ut(e){return e>Se?e*e*e:dn*(e-fn)}function lt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ft(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function fr(e){if(e instanceof he)return new he(e.h,e.c,e.l,e.opacity);if(e instanceof fe||(e=hn(e)),e.a===0&&e.b===0)return new he(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*cr;return new he(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function pt(e,t,n,r){return arguments.length===1?fr(e):new he(e,t,n,r??1)}function he(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function mn(e){if(isNaN(e.h))return new fe(e.l,0,0,e.opacity);var t=e.h*or;return new fe(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}rn(he,pt,an(sn,{brighter(e){return new he(this.h,this.c,this.l+et*(e??1),this.opacity)},darker(e){return new he(this.h,this.c,this.l-et*(e??1),this.opacity)},rgb(){return mn(this).rgb()}}));function dr(e){return function(t,n){var r=e((t=pt(t)).h,(n=pt(n)).h),i=st(t.c,n.c),a=st(t.l,n.l),s=st(t.opacity,n.opacity);return function(p){return t.h=r(p),t.c=i(p),t.l=a(p),t.opacity=s(p),t+""}}}const hr=dr(An);function mr(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],s;return a<i&&(s=n,n=r,r=s,s=i,i=a,a=s),e[n]=t.floor(i),e[r]=t.ceil(a),e}const dt=new Date,ht=new Date;function te(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),p=i.ceil(a);return a-s<p-a?s:p},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,p)=>{const M=[];if(a=i.ceil(a),p=p==null?1:Math.floor(p),!(a<s)||!(p>0))return M;let T;do M.push(T=new Date(+a)),t(a,p),e(a);while(T<a&&a<s);return M},i.filter=a=>te(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,p)=>{if(s>=s)if(p<0)for(;++p<=0;)for(;t(s,-1),!a(s););else for(;--p>=0;)for(;t(s,1),!a(s););}),n&&(i.count=(a,s)=>(dt.setTime(+a),ht.setTime(+s),e(dt),e(ht),Math.floor(n(dt,ht))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?s=>r(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Ye=te(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ye.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?te(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ye);Ye.range;const me=1e3,ce=me*60,ge=ce*60,ye=ge*24,Ct=ye*7,Nt=ye*30,mt=ye*365,ve=te(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*me)},(e,t)=>(t-e)/me,e=>e.getUTCSeconds());ve.range;const We=te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*me)},(e,t)=>{e.setTime(+e+t*ce)},(e,t)=>(t-e)/ce,e=>e.getMinutes());We.range;const gr=te(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ce)},(e,t)=>(t-e)/ce,e=>e.getUTCMinutes());gr.range;const He=te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*me-e.getMinutes()*ce)},(e,t)=>{e.setTime(+e+t*ge)},(e,t)=>(t-e)/ge,e=>e.getHours());He.range;const yr=te(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ge)},(e,t)=>(t-e)/ge,e=>e.getUTCHours());yr.range;const Te=te(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ce)/ye,e=>e.getDate()-1);Te.range;const Dt=te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ye,e=>e.getUTCDate()-1);Dt.range;const kr=te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ye,e=>Math.floor(e/ye));kr.range;function we(e){return te(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ce)/Ct)}const Ve=we(0),Oe=we(1),gn=we(2),yn=we(3),be=we(4),kn=we(5),pn=we(6);Ve.range;Oe.range;gn.range;yn.range;be.range;kn.range;pn.range;function Ce(e){return te(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Ct)}const vn=Ce(0),tt=Ce(1),pr=Ce(2),vr=Ce(3),Ue=Ce(4),Tr=Ce(5),br=Ce(6);vn.range;tt.range;pr.range;vr.range;Ue.range;Tr.range;br.range;const Ne=te(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Ne.range;const xr=te(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());xr.range;const ke=te(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ke.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:te(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ke.range;const xe=te(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());xe.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:te(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});xe.range;function wr(e,t,n,r,i,a){const s=[[ve,1,me],[ve,5,5*me],[ve,15,15*me],[ve,30,30*me],[a,1,ce],[a,5,5*ce],[a,15,15*ce],[a,30,30*ce],[i,1,ge],[i,3,3*ge],[i,6,6*ge],[i,12,12*ge],[r,1,ye],[r,2,2*ye],[n,1,Ct],[t,1,Nt],[t,3,3*Nt],[e,1,mt]];function p(T,g,U){const C=g<T;C&&([T,g]=[g,T]);const b=U&&typeof U.range=="function"?U:M(T,g,U),X=b?b.range(T,+g+1):[];return C?X.reverse():X}function M(T,g,U){const C=Math.abs(g-T)/U,b=Zn(([,,D])=>D).right(s,C);if(b===s.length)return e.every(Ht(T/mt,g/mt,U));if(b===0)return Ye.every(Math.max(Ht(T,g,U),1));const[X,H]=s[C/s[b-1][2]<s[b][2]/C?b-1:b];return X.every(H)}return[p,M]}const[Cr,Dr]=wr(ke,Ne,Ve,Te,He,We);function gt(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function yt(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Le(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Mr(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,s=e.shortDays,p=e.months,M=e.shortMonths,T=Ae(i),g=Ie(i),U=Ae(a),C=Ie(a),b=Ae(s),X=Ie(s),H=Ae(p),D=Ie(p),I=Ae(M),V=Ie(M),W={a:m,A:E,b:c,B:u,c:null,d:Bt,e:Bt,f:Qr,g:ai,G:oi,H:Zr,I:Xr,j:Gr,L:Tn,m:jr,M:$r,p:o,q:R,Q:Gt,s:Qt,S:Jr,u:Kr,U:ei,V:ti,w:ni,W:ri,x:null,X:null,y:ii,Y:si,Z:ci,"%":Xt},B={a:P,A:z,b:K,B:G,c:null,d:Zt,e:Zt,f:di,g:xi,G:Ci,H:ui,I:li,j:fi,L:xn,m:hi,M:mi,p:$,q:ae,Q:Gt,s:Qt,S:gi,u:yi,U:ki,V:pi,w:vi,W:Ti,x:null,X:null,y:bi,Y:wi,Z:Di,"%":Xt},j={a:S,A:_,b:k,B:Y,c:l,d:Rt,e:Rt,f:zr,g:zt,G:Pt,H:qt,I:qt,j:Or,L:Pr,m:Hr,M:Nr,p:F,q:Wr,Q:qr,s:Br,S:Vr,u:Ur,U:Er,V:Lr,w:Yr,W:Ar,x:d,X:y,y:zt,Y:Pt,Z:Ir,"%":Rr};W.x=w(n,W),W.X=w(r,W),W.c=w(t,W),B.x=w(n,B),B.X=w(r,B),B.c=w(t,B);function w(v,A){return function(N){var f=[],J=-1,L=0,Q=v.length,Z,re,se;for(N instanceof Date||(N=new Date(+N));++J<Q;)v.charCodeAt(J)===37&&(f.push(v.slice(L,J)),(re=Vt[Z=v.charAt(++J)])!=null?Z=v.charAt(++J):re=Z==="e"?" ":"0",(se=A[Z])&&(Z=se(N,re)),f.push(Z),L=J+1);return f.push(v.slice(L,J)),f.join("")}}function O(v,A){return function(N){var f=Le(1900,void 0,1),J=x(f,v,N+="",0),L,Q;if(J!=N.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(A&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(L=yt(Le(f.y,0,1)),Q=L.getUTCDay(),L=Q>4||Q===0?tt.ceil(L):tt(L),L=Dt.offset(L,(f.V-1)*7),f.y=L.getUTCFullYear(),f.m=L.getUTCMonth(),f.d=L.getUTCDate()+(f.w+6)%7):(L=gt(Le(f.y,0,1)),Q=L.getDay(),L=Q>4||Q===0?Oe.ceil(L):Oe(L),L=Te.offset(L,(f.V-1)*7),f.y=L.getFullYear(),f.m=L.getMonth(),f.d=L.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?yt(Le(f.y,0,1)).getUTCDay():gt(Le(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,yt(f)):gt(f)}}function x(v,A,N,f){for(var J=0,L=A.length,Q=N.length,Z,re;J<L;){if(f>=Q)return-1;if(Z=A.charCodeAt(J++),Z===37){if(Z=A.charAt(J++),re=j[Z in Vt?A.charAt(J++):Z],!re||(f=re(v,N,f))<0)return-1}else if(Z!=N.charCodeAt(f++))return-1}return f}function F(v,A,N){var f=T.exec(A.slice(N));return f?(v.p=g.get(f[0].toLowerCase()),N+f[0].length):-1}function S(v,A,N){var f=b.exec(A.slice(N));return f?(v.w=X.get(f[0].toLowerCase()),N+f[0].length):-1}function _(v,A,N){var f=U.exec(A.slice(N));return f?(v.w=C.get(f[0].toLowerCase()),N+f[0].length):-1}function k(v,A,N){var f=I.exec(A.slice(N));return f?(v.m=V.get(f[0].toLowerCase()),N+f[0].length):-1}function Y(v,A,N){var f=H.exec(A.slice(N));return f?(v.m=D.get(f[0].toLowerCase()),N+f[0].length):-1}function l(v,A,N){return x(v,t,A,N)}function d(v,A,N){return x(v,n,A,N)}function y(v,A,N){return x(v,r,A,N)}function m(v){return s[v.getDay()]}function E(v){return a[v.getDay()]}function c(v){return M[v.getMonth()]}function u(v){return p[v.getMonth()]}function o(v){return i[+(v.getHours()>=12)]}function R(v){return 1+~~(v.getMonth()/3)}function P(v){return s[v.getUTCDay()]}function z(v){return a[v.getUTCDay()]}function K(v){return M[v.getUTCMonth()]}function G(v){return p[v.getUTCMonth()]}function $(v){return i[+(v.getUTCHours()>=12)]}function ae(v){return 1+~~(v.getUTCMonth()/3)}return{format:function(v){var A=w(v+="",W);return A.toString=function(){return v},A},parse:function(v){var A=O(v+="",!1);return A.toString=function(){return v},A},utcFormat:function(v){var A=w(v+="",B);return A.toString=function(){return v},A},utcParse:function(v){var A=O(v+="",!0);return A.toString=function(){return v},A}}}var Vt={"-":"",_:" ",0:"0"},ne=/^\s*\d+/,_r=/^%/,Sr=/[\\^$*+?|[\]().{}]/g;function q(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function Fr(e){return e.replace(Sr,"\\$&")}function Ae(e){return new RegExp("^(?:"+e.map(Fr).join("|")+")","i")}function Ie(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Yr(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ur(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Er(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Lr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ar(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Pt(e,t,n){var r=ne.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function zt(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ir(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Wr(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Hr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Rt(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Or(e,t,n){var r=ne.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function qt(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Nr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Vr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Pr(e,t,n){var r=ne.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function zr(e,t,n){var r=ne.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Rr(e,t,n){var r=_r.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function qr(e,t,n){var r=ne.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Br(e,t,n){var r=ne.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Bt(e,t){return q(e.getDate(),t,2)}function Zr(e,t){return q(e.getHours(),t,2)}function Xr(e,t){return q(e.getHours()%12||12,t,2)}function Gr(e,t){return q(1+Te.count(ke(e),e),t,3)}function Tn(e,t){return q(e.getMilliseconds(),t,3)}function Qr(e,t){return Tn(e,t)+"000"}function jr(e,t){return q(e.getMonth()+1,t,2)}function $r(e,t){return q(e.getMinutes(),t,2)}function Jr(e,t){return q(e.getSeconds(),t,2)}function Kr(e){var t=e.getDay();return t===0?7:t}function ei(e,t){return q(Ve.count(ke(e)-1,e),t,2)}function bn(e){var t=e.getDay();return t>=4||t===0?be(e):be.ceil(e)}function ti(e,t){return e=bn(e),q(be.count(ke(e),e)+(ke(e).getDay()===4),t,2)}function ni(e){return e.getDay()}function ri(e,t){return q(Oe.count(ke(e)-1,e),t,2)}function ii(e,t){return q(e.getFullYear()%100,t,2)}function ai(e,t){return e=bn(e),q(e.getFullYear()%100,t,2)}function si(e,t){return q(e.getFullYear()%1e4,t,4)}function oi(e,t){var n=e.getDay();return e=n>=4||n===0?be(e):be.ceil(e),q(e.getFullYear()%1e4,t,4)}function ci(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+q(t/60|0,"0",2)+q(t%60,"0",2)}function Zt(e,t){return q(e.getUTCDate(),t,2)}function ui(e,t){return q(e.getUTCHours(),t,2)}function li(e,t){return q(e.getUTCHours()%12||12,t,2)}function fi(e,t){return q(1+Dt.count(xe(e),e),t,3)}function xn(e,t){return q(e.getUTCMilliseconds(),t,3)}function di(e,t){return xn(e,t)+"000"}function hi(e,t){return q(e.getUTCMonth()+1,t,2)}function mi(e,t){return q(e.getUTCMinutes(),t,2)}function gi(e,t){return q(e.getUTCSeconds(),t,2)}function yi(e){var t=e.getUTCDay();return t===0?7:t}function ki(e,t){return q(vn.count(xe(e)-1,e),t,2)}function wn(e){var t=e.getUTCDay();return t>=4||t===0?Ue(e):Ue.ceil(e)}function pi(e,t){return e=wn(e),q(Ue.count(xe(e),e)+(xe(e).getUTCDay()===4),t,2)}function vi(e){return e.getUTCDay()}function Ti(e,t){return q(tt.count(xe(e)-1,e),t,2)}function bi(e,t){return q(e.getUTCFullYear()%100,t,2)}function xi(e,t){return e=wn(e),q(e.getUTCFullYear()%100,t,2)}function wi(e,t){return q(e.getUTCFullYear()%1e4,t,4)}function Ci(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ue(e):Ue.ceil(e),q(e.getUTCFullYear()%1e4,t,4)}function Di(){return"+0000"}function Xt(){return"%"}function Gt(e){return+e}function Qt(e){return Math.floor(+e/1e3)}var Me,nt;Mi({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Mi(e){return Me=Mr(e),nt=Me.format,Me.parse,Me.utcFormat,Me.utcParse,Me}function _i(e){return new Date(e)}function Si(e){return e instanceof Date?+e:+new Date(+e)}function Cn(e,t,n,r,i,a,s,p,M,T){var g=Xn(),U=g.invert,C=g.domain,b=T(".%L"),X=T(":%S"),H=T("%I:%M"),D=T("%I %p"),I=T("%a %d"),V=T("%b %d"),W=T("%B"),B=T("%Y");function j(w){return(M(w)<w?b:p(w)<w?X:s(w)<w?H:a(w)<w?D:r(w)<w?i(w)<w?I:V:n(w)<w?W:B)(w)}return g.invert=function(w){return new Date(U(w))},g.domain=function(w){return arguments.length?C(Array.from(w,Si)):C().map(_i)},g.ticks=function(w){var O=C();return e(O[0],O[O.length-1],w??10)},g.tickFormat=function(w,O){return O==null?j:T(O)},g.nice=function(w){var O=C();return(!w||typeof w.range!="function")&&(w=t(O[0],O[O.length-1],w??10)),w?C(mr(O,w)):g},g.copy=function(){return Gn(g,Cn(e,t,n,r,i,a,s,p,M,T))},g}function Fi(){return jn.apply(Cn(Cr,Dr,ke,Ne,Ve,Te,He,We,ve,nt).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Ge={exports:{}},Yi=Ge.exports,jt;function Ui(){return jt||(jt=1,function(e,t){(function(n,r){e.exports=r()})(Yi,function(){var n="day";return function(r,i,a){var s=function(T){return T.add(4-T.isoWeekday(),n)},p=i.prototype;p.isoWeekYear=function(){return s(this).year()},p.isoWeek=function(T){if(!this.$utils().u(T))return this.add(7*(T-this.isoWeek()),n);var g,U,C,b,X=s(this),H=(g=this.isoWeekYear(),U=this.$u,C=(U?a.utc:a)().year(g).startOf("year"),b=4-C.isoWeekday(),C.isoWeekday()>4&&(b+=7),C.add(b,n));return X.diff(H,"week")+1},p.isoWeekday=function(T){return this.$utils().u(T)?this.day()||7:this.day(this.day()%7?T:T-7)};var M=p.startOf;p.startOf=function(T,g){var U=this.$utils(),C=!!U.u(g)||g;return U.p(T)==="isoweek"?C?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):M.bind(this)(T,g)}}})}(Ge)),Ge.exports}var Ei=Ui();const Li=wt(Ei);var Qe={exports:{}},Ai=Qe.exports,$t;function Ii(){return $t||($t=1,function(e,t){(function(n,r){e.exports=r()})(Ai,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,a=/\d\d/,s=/\d\d?/,p=/\d*[^-_:/,()\s\d]+/,M={},T=function(D){return(D=+D)+(D>68?1900:2e3)},g=function(D){return function(I){this[D]=+I}},U=[/[+-]\d\d:?(\d\d)?|Z/,function(D){(this.zone||(this.zone={})).offset=function(I){if(!I||I==="Z")return 0;var V=I.match(/([+-]|\d\d)/g),W=60*V[1]+(+V[2]||0);return W===0?0:V[0]==="+"?-W:W}(D)}],C=function(D){var I=M[D];return I&&(I.indexOf?I:I.s.concat(I.f))},b=function(D,I){var V,W=M.meridiem;if(W){for(var B=1;B<=24;B+=1)if(D.indexOf(W(B,0,I))>-1){V=B>12;break}}else V=D===(I?"pm":"PM");return V},X={A:[p,function(D){this.afternoon=b(D,!1)}],a:[p,function(D){this.afternoon=b(D,!0)}],Q:[i,function(D){this.month=3*(D-1)+1}],S:[i,function(D){this.milliseconds=100*+D}],SS:[a,function(D){this.milliseconds=10*+D}],SSS:[/\d{3}/,function(D){this.milliseconds=+D}],s:[s,g("seconds")],ss:[s,g("seconds")],m:[s,g("minutes")],mm:[s,g("minutes")],H:[s,g("hours")],h:[s,g("hours")],HH:[s,g("hours")],hh:[s,g("hours")],D:[s,g("day")],DD:[a,g("day")],Do:[p,function(D){var I=M.ordinal,V=D.match(/\d+/);if(this.day=V[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===D&&(this.day=W)}],w:[s,g("week")],ww:[a,g("week")],M:[s,g("month")],MM:[a,g("month")],MMM:[p,function(D){var I=C("months"),V=(C("monthsShort")||I.map(function(W){return W.slice(0,3)})).indexOf(D)+1;if(V<1)throw new Error;this.month=V%12||V}],MMMM:[p,function(D){var I=C("months").indexOf(D)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,g("year")],YY:[a,function(D){this.year=T(D)}],YYYY:[/\d{4}/,g("year")],Z:U,ZZ:U};function H(D){var I,V;I=D,V=M&&M.formats;for(var W=(D=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S,_,k){var Y=k&&k.toUpperCase();return _||V[k]||n[k]||V[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(l,d,y){return d||y.slice(1)})})).match(r),B=W.length,j=0;j<B;j+=1){var w=W[j],O=X[w],x=O&&O[0],F=O&&O[1];W[j]=F?{regex:x,parser:F}:w.replace(/^\[|\]$/g,"")}return function(S){for(var _={},k=0,Y=0;k<B;k+=1){var l=W[k];if(typeof l=="string")Y+=l.length;else{var d=l.regex,y=l.parser,m=S.slice(Y),E=d.exec(m)[0];y.call(_,E),S=S.replace(E,"")}}return function(c){var u=c.afternoon;if(u!==void 0){var o=c.hours;u?o<12&&(c.hours+=12):o===12&&(c.hours=0),delete c.afternoon}}(_),_}}return function(D,I,V){V.p.customParseFormat=!0,D&&D.parseTwoDigitYear&&(T=D.parseTwoDigitYear);var W=I.prototype,B=W.parse;W.parse=function(j){var w=j.date,O=j.utc,x=j.args;this.$u=O;var F=x[1];if(typeof F=="string"){var S=x[2]===!0,_=x[3]===!0,k=S||_,Y=x[2];_&&(Y=x[2]),M=this.$locale(),!S&&Y&&(M=V.Ls[Y]),this.$d=function(m,E,c,u){try{if(["x","X"].indexOf(E)>-1)return new Date((E==="X"?1e3:1)*m);var o=H(E)(m),R=o.year,P=o.month,z=o.day,K=o.hours,G=o.minutes,$=o.seconds,ae=o.milliseconds,v=o.zone,A=o.week,N=new Date,f=z||(R||P?1:N.getDate()),J=R||N.getFullYear(),L=0;R&&!P||(L=P>0?P-1:N.getMonth());var Q,Z=K||0,re=G||0,se=$||0,pe=ae||0;return v?new Date(Date.UTC(J,L,f,Z,re,se,pe+60*v.offset*1e3)):c?new Date(Date.UTC(J,L,f,Z,re,se,pe)):(Q=new Date(J,L,f,Z,re,se,pe),A&&(Q=u(Q).week(A).toDate()),Q)}catch{return new Date("")}}(w,F,O,V),this.init(),Y&&Y!==!0&&(this.$L=this.locale(Y).$L),k&&w!=this.format(F)&&(this.$d=new Date("")),M={}}else if(F instanceof Array)for(var l=F.length,d=1;d<=l;d+=1){x[1]=F[d-1];var y=V.apply(this,x);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}d===l&&(this.$d=new Date(""))}else B.call(this,j)}}})}(Qe)),Qe.exports}var Wi=Ii();const Hi=wt(Wi);var je={exports:{}},Oi=je.exports,Jt;function Ni(){return Jt||(Jt=1,function(e,t){(function(n,r){e.exports=r()})(Oi,function(){return function(n,r){var i=r.prototype,a=i.format;i.format=function(s){var p=this,M=this.$locale();if(!this.isValid())return a.bind(this)(s);var T=this.$utils(),g=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(U){switch(U){case"Q":return Math.ceil((p.$M+1)/3);case"Do":return M.ordinal(p.$D);case"gggg":return p.weekYear();case"GGGG":return p.isoWeekYear();case"wo":return M.ordinal(p.week(),"W");case"w":case"ww":return T.s(p.week(),U==="w"?1:2,"0");case"W":case"WW":return T.s(p.isoWeek(),U==="W"?1:2,"0");case"k":case"kk":return T.s(String(p.$H===0?24:p.$H),U==="k"?1:2,"0");case"X":return Math.floor(p.$d.getTime()/1e3);case"x":return p.$d.getTime();case"z":return"["+p.offsetName()+"]";case"zzz":return"["+p.offsetName("long")+"]";default:return U}});return a.bind(this)(g)}}})}(je)),je.exports}var Vi=Ni();const Pi=wt(Vi);var vt=function(){var e=h(function(Y,l,d,y){for(d=d||{},y=Y.length;y--;d[Y[y]]=l);return d},"o"),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],s=[1,30],p=[1,31],M=[1,32],T=[1,33],g=[1,34],U=[1,9],C=[1,10],b=[1,11],X=[1,12],H=[1,13],D=[1,14],I=[1,15],V=[1,16],W=[1,19],B=[1,20],j=[1,21],w=[1,22],O=[1,23],x=[1,25],F=[1,35],S={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:h(function(l,d,y,m,E,c,u){var o=c.length-1;switch(E){case 1:return c[o-1];case 2:this.$=[];break;case 3:c[o-1].push(c[o]),this.$=c[o-1];break;case 4:case 5:this.$=c[o];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=c[o].substr(18);break;case 19:m.TopAxis(),this.$=c[o].substr(8);break;case 20:m.setAxisFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 21:m.setTickInterval(c[o].substr(13)),this.$=c[o].substr(13);break;case 22:m.setExcludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 23:m.setIncludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 24:m.setTodayMarker(c[o].substr(12)),this.$=c[o].substr(12);break;case 27:m.setDiagramTitle(c[o].substr(6)),this.$=c[o].substr(6);break;case 28:this.$=c[o].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=c[o].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(c[o].substr(8)),this.$=c[o].substr(8);break;case 33:m.addTask(c[o-1],c[o]),this.$="task";break;case 34:this.$=c[o-1],m.setClickEvent(c[o-1],c[o],null);break;case 35:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],c[o]);break;case 36:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],null),m.setLink(c[o-2],c[o]);break;case 37:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-2],c[o-1]),m.setLink(c[o-3],c[o]);break;case 38:this.$=c[o-2],m.setClickEvent(c[o-2],c[o],null),m.setLink(c[o-2],c[o-1]);break;case 39:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-1],c[o]),m.setLink(c[o-3],c[o-2]);break;case 40:this.$=c[o-1],m.setLink(c[o-1],c[o]);break;case 41:case 47:this.$=c[o-1]+" "+c[o];break;case 42:case 43:case 45:this.$=c[o-2]+" "+c[o-1]+" "+c[o];break;case 44:case 46:this.$=c[o-3]+" "+c[o-2]+" "+c[o-1]+" "+c[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:s,17:p,18:M,19:18,20:T,21:g,22:U,23:C,24:b,25:X,26:H,27:D,28:I,29:V,30:W,31:B,33:j,35:w,36:O,37:24,38:x,40:F},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:s,17:p,18:M,19:18,20:T,21:g,22:U,23:C,24:b,25:X,26:H,27:D,28:I,29:V,30:W,31:B,33:j,35:w,36:O,37:24,38:x,40:F},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:h(function(l,d){if(d.recoverable)this.trace(l);else{var y=new Error(l);throw y.hash=d,y}},"parseError"),parse:h(function(l){var d=this,y=[0],m=[],E=[null],c=[],u=this.table,o="",R=0,P=0,z=2,K=1,G=c.slice.call(arguments,1),$=Object.create(this.lexer),ae={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(ae.yy[v]=this.yy[v]);$.setInput(l,ae.yy),ae.yy.lexer=$,ae.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var A=$.yylloc;c.push(A);var N=$.options&&$.options.ranges;typeof ae.yy.parseError=="function"?this.parseError=ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(oe){y.length=y.length-2*oe,E.length=E.length-oe,c.length=c.length-oe}h(f,"popStack");function J(){var oe;return oe=m.pop()||$.lex()||K,typeof oe!="number"&&(oe instanceof Array&&(m=oe,oe=m.pop()),oe=d.symbols_[oe]||oe),oe}h(J,"lex");for(var L,Q,Z,re,se={},pe,ue,Wt,qe;;){if(Q=y[y.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((L===null||typeof L>"u")&&(L=J()),Z=u[Q]&&u[Q][L]),typeof Z>"u"||!Z.length||!Z[0]){var at="";qe=[];for(pe in u[Q])this.terminals_[pe]&&pe>z&&qe.push("'"+this.terminals_[pe]+"'");$.showPosition?at="Parse error on line "+(R+1)+`:
|
|
`+$.showPosition()+`
|
|
Expecting `+qe.join(", ")+", got '"+(this.terminals_[L]||L)+"'":at="Parse error on line "+(R+1)+": Unexpected "+(L==K?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(at,{text:$.match,token:this.terminals_[L]||L,line:$.yylineno,loc:A,expected:qe})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+L);switch(Z[0]){case 1:y.push(L),E.push($.yytext),c.push($.yylloc),y.push(Z[1]),L=null,P=$.yyleng,o=$.yytext,R=$.yylineno,A=$.yylloc;break;case 2:if(ue=this.productions_[Z[1]][1],se.$=E[E.length-ue],se._$={first_line:c[c.length-(ue||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(ue||1)].first_column,last_column:c[c.length-1].last_column},N&&(se._$.range=[c[c.length-(ue||1)].range[0],c[c.length-1].range[1]]),re=this.performAction.apply(se,[o,P,R,ae.yy,Z[1],E,c].concat(G)),typeof re<"u")return re;ue&&(y=y.slice(0,-1*ue*2),E=E.slice(0,-1*ue),c=c.slice(0,-1*ue)),y.push(this.productions_[Z[1]][0]),E.push(se.$),c.push(se._$),Wt=u[y[y.length-2]][y[y.length-1]],y.push(Wt);break;case 3:return!0}}return!0},"parse")},_=function(){var Y={EOF:1,parseError:h(function(d,y){if(this.yy.parser)this.yy.parser.parseError(d,y);else throw new Error(d)},"parseError"),setInput:h(function(l,d){return this.yy=d||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var d=l.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:h(function(l){var d=l.length,y=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(l){this.unput(this.match.slice(l))},"less"),pastInput:h(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var l=this.pastInput(),d=new Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
|
`+d+"^"},"showPosition"),test_match:h(function(l,d){var y,m,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),m=l[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(l[0].length),this.matched+=l[0],y=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var c in E)this[c]=E[c];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,d,y,m;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),c=0;c<E.length;c++)if(y=this._input.match(this.rules[E[c]]),y&&(!d||y[0].length>d[0].length)){if(d=y,m=c,this.options.backtrack_lexer){if(l=this.test_match(y,E[c]),l!==!1)return l;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(l=this.test_match(d,E[m]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var d=this.next();return d||this.lex()},"lex"),begin:h(function(d){this.conditionStack.push(d)},"begin"),popState:h(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:h(function(d){this.begin(d)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(d,y,m,E){switch(m){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return Y}();S.lexer=_;function k(){this.yy={}}return h(k,"Parser"),k.prototype=S,S.Parser=k,new k}();vt.parser=vt;var zi=vt;ie.extend(Li);ie.extend(Hi);ie.extend(Pi);var Kt={friday:5,saturday:6},le="",Mt="",_t=void 0,St="",Pe=[],ze=[],Ft=new Map,Yt=[],rt=[],Ee="",Ut="",Dn=["active","done","crit","milestone","vert"],Et=[],Re=!1,Lt=!1,At="sunday",it="saturday",Tt=0,Ri=h(function(){Yt=[],rt=[],Ee="",Et=[],$e=0,xt=void 0,Je=void 0,ee=[],le="",Mt="",Ut="",_t=void 0,St="",Pe=[],ze=[],Re=!1,Lt=!1,Tt=0,Ft=new Map,qn(),At="sunday",it="saturday"},"clear"),qi=h(function(e){Mt=e},"setAxisFormat"),Bi=h(function(){return Mt},"getAxisFormat"),Zi=h(function(e){_t=e},"setTickInterval"),Xi=h(function(){return _t},"getTickInterval"),Gi=h(function(e){St=e},"setTodayMarker"),Qi=h(function(){return St},"getTodayMarker"),ji=h(function(e){le=e},"setDateFormat"),$i=h(function(){Re=!0},"enableInclusiveEndDates"),Ji=h(function(){return Re},"endDatesAreInclusive"),Ki=h(function(){Lt=!0},"enableTopAxis"),ea=h(function(){return Lt},"topAxisEnabled"),ta=h(function(e){Ut=e},"setDisplayMode"),na=h(function(){return Ut},"getDisplayMode"),ra=h(function(){return le},"getDateFormat"),ia=h(function(e){Pe=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),aa=h(function(){return Pe},"getIncludes"),sa=h(function(e){ze=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),oa=h(function(){return ze},"getExcludes"),ca=h(function(){return Ft},"getLinks"),ua=h(function(e){Ee=e,Yt.push(e)},"addSection"),la=h(function(){return Yt},"getSections"),fa=h(function(){let e=en();const t=10;let n=0;for(;!e&&n<t;)e=en(),n++;return rt=ee,rt},"getTasks"),Mn=h(function(e,t,n,r){return r.includes(e.format(t.trim()))?!1:n.includes("weekends")&&(e.isoWeekday()===Kt[it]||e.isoWeekday()===Kt[it]+1)||n.includes(e.format("dddd").toLowerCase())?!0:n.includes(e.format(t.trim()))},"isInvalidDate"),da=h(function(e){At=e},"setWeekday"),ha=h(function(){return At},"getWeekday"),ma=h(function(e){it=e},"setWeekend"),_n=h(function(e,t,n,r){if(!n.length||e.manualEndTime)return;let i;e.startTime instanceof Date?i=ie(e.startTime):i=ie(e.startTime,t,!0),i=i.add(1,"d");let a;e.endTime instanceof Date?a=ie(e.endTime):a=ie(e.endTime,t,!0);const[s,p]=ga(i,a,t,n,r);e.endTime=s.toDate(),e.renderEndTime=p},"checkTaskDates"),ga=h(function(e,t,n,r,i){let a=!1,s=null;for(;e<=t;)a||(s=t.toDate()),a=Mn(e,n,r,i),a&&(t=t.add(1,"d")),e=e.add(1,"d");return[t,s]},"fixTaskDates"),bt=h(function(e,t,n){n=n.trim();const i=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(i!==null){let s=null;for(const M of i.groups.ids.split(" ")){let T=De(M);T!==void 0&&(!s||T.endTime>s.endTime)&&(s=T)}if(s)return s.endTime;const p=new Date;return p.setHours(0,0,0,0),p}let a=ie(n,t.trim(),!0);if(a.isValid())return a.toDate();{Ke.debug("Invalid date:"+n),Ke.debug("With date format:"+t.trim());const s=new Date(n);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+n);return s}},"getStartDate"),Sn=h(function(e){const t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),Fn=h(function(e,t,n,r=!1){n=n.trim();const a=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(a!==null){let g=null;for(const C of a.groups.ids.split(" ")){let b=De(C);b!==void 0&&(!g||b.startTime<g.startTime)&&(g=b)}if(g)return g.startTime;const U=new Date;return U.setHours(0,0,0,0),U}let s=ie(n,t.trim(),!0);if(s.isValid())return r&&(s=s.add(1,"d")),s.toDate();let p=ie(e);const[M,T]=Sn(n);if(!Number.isNaN(M)){const g=p.add(M,T);g.isValid()&&(p=g)}return p.toDate()},"getEndDate"),$e=0,Fe=h(function(e){return e===void 0?($e=$e+1,"task"+$e):e},"parseId"),ya=h(function(e,t){let n;t.substr(0,1)===":"?n=t.substr(1,t.length):n=t;const r=n.split(","),i={};It(r,i,Dn);for(let s=0;s<r.length;s++)r[s]=r[s].trim();let a="";switch(r.length){case 1:i.id=Fe(),i.startTime=e.endTime,a=r[0];break;case 2:i.id=Fe(),i.startTime=bt(void 0,le,r[0]),a=r[1];break;case 3:i.id=Fe(r[0]),i.startTime=bt(void 0,le,r[1]),a=r[2];break}return a&&(i.endTime=Fn(i.startTime,le,a,Re),i.manualEndTime=ie(a,"YYYY-MM-DD",!0).isValid(),_n(i,le,ze,Pe)),i},"compileData"),ka=h(function(e,t){let n;t.substr(0,1)===":"?n=t.substr(1,t.length):n=t;const r=n.split(","),i={};It(r,i,Dn);for(let a=0;a<r.length;a++)r[a]=r[a].trim();switch(r.length){case 1:i.id=Fe(),i.startTime={type:"prevTaskEnd",id:e},i.endTime={data:r[0]};break;case 2:i.id=Fe(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=Fe(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]};break}return i},"parseData"),xt,Je,ee=[],Yn={},pa=h(function(e,t){const n={section:Ee,type:Ee,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:t},task:e,classes:[]},r=ka(Je,t);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=Je,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,n.order=Tt,Tt++;const i=ee.push(n);Je=n.id,Yn[n.id]=i-1},"addTask"),De=h(function(e){const t=Yn[e];return ee[t]},"findTaskById"),va=h(function(e,t){const n={section:Ee,type:Ee,description:e,task:e,classes:[]},r=ya(xt,t);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,xt=n,rt.push(n)},"addTaskOrg"),en=h(function(){const e=h(function(n){const r=ee[n];let i="";switch(ee[n].raw.startTime.type){case"prevTaskEnd":{const a=De(r.prevTaskId);r.startTime=a.endTime;break}case"getStartDate":i=bt(void 0,le,ee[n].raw.startTime.startData),i&&(ee[n].startTime=i);break}return ee[n].startTime&&(ee[n].endTime=Fn(ee[n].startTime,le,ee[n].raw.endTime.data,Re),ee[n].endTime&&(ee[n].processed=!0,ee[n].manualEndTime=ie(ee[n].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),_n(ee[n],le,ze,Pe))),ee[n].processed},"compileTask");let t=!0;for(const[n,r]of ee.entries())e(n),t=t&&r.processed;return t},"compileTasks"),Ta=h(function(e,t){let n=t;_e().securityLevel!=="loose"&&(n=Rn.sanitizeUrl(t)),e.split(",").forEach(function(r){De(r)!==void 0&&(En(r,()=>{window.open(n,"_self")}),Ft.set(r,n))}),Un(e,"clickable")},"setLink"),Un=h(function(e,t){e.split(",").forEach(function(n){let r=De(n);r!==void 0&&r.classes.push(t)})},"setClass"),ba=h(function(e,t,n){if(_e().securityLevel!=="loose"||t===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a<r.length;a++){let s=r[a].trim();s.startsWith('"')&&s.endsWith('"')&&(s=s.substr(1,s.length-2)),r[a]=s}}r.length===0&&r.push(e),De(e)!==void 0&&En(e,()=>{Bn.runFunc(t,...r)})},"setClickFun"),En=h(function(e,t){Et.push(function(){const n=document.querySelector(`[id="${e}"]`);n!==null&&n.addEventListener("click",function(){t()})},function(){const n=document.querySelector(`[id="${e}-text"]`);n!==null&&n.addEventListener("click",function(){t()})})},"pushFun"),xa=h(function(e,t,n){e.split(",").forEach(function(r){ba(r,t,n)}),Un(e,"clickable")},"setClickEvent"),wa=h(function(e){Et.forEach(function(t){t(e)})},"bindFunctions"),Ca={getConfig:h(()=>_e().gantt,"getConfig"),clear:Ri,setDateFormat:ji,getDateFormat:ra,enableInclusiveEndDates:$i,endDatesAreInclusive:Ji,enableTopAxis:Ki,topAxisEnabled:ea,setAxisFormat:qi,getAxisFormat:Bi,setTickInterval:Zi,getTickInterval:Xi,setTodayMarker:Gi,getTodayMarker:Qi,setAccTitle:Vn,getAccTitle:Nn,setDiagramTitle:On,getDiagramTitle:Hn,setDisplayMode:ta,getDisplayMode:na,setAccDescription:Wn,getAccDescription:In,addSection:ua,getSections:la,getTasks:fa,addTask:pa,findTaskById:De,addTaskOrg:va,setIncludes:ia,getIncludes:aa,setExcludes:sa,getExcludes:oa,setClickEvent:xa,setLink:Ta,getLinks:ca,bindFunctions:wa,parseDuration:Sn,isInvalidDate:Mn,setWeekday:da,getWeekday:ha,setWeekend:ma};function It(e,t,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const a="^\\s*"+i+"\\s*$",s=new RegExp(a);e[0].match(s)&&(t[i]=!0,e.shift(1),r=!0)})}h(It,"getTaskTags");var Da=h(function(){Ke.debug("Something is calling, setConf, remove the call")},"setConf"),tn={monday:Oe,tuesday:gn,wednesday:yn,thursday:be,friday:kn,saturday:pn,sunday:Ve},Ma=h((e,t)=>{let n=[...e].map(()=>-1/0),r=[...e].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),i=0;for(const a of r)for(let s=0;s<n.length;s++)if(a.startTime>=n[s]){n[s]=a.endTime,a.order=s+t,s>i&&(i=s);break}return i},"getMaxIntersections"),de,_a=h(function(e,t,n,r){const i=_e().gantt,a=_e().securityLevel;let s;a==="sandbox"&&(s=Be("#i"+t));const p=a==="sandbox"?Be(s.nodes()[0].contentDocument.body):Be("body"),M=a==="sandbox"?s.nodes()[0].contentDocument:document,T=M.getElementById(t);de=T.parentElement.offsetWidth,de===void 0&&(de=1200),i.useWidth!==void 0&&(de=i.useWidth);const g=r.db.getTasks();let U=[];for(const x of g)U.push(x.type);U=O(U);const C={};let b=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const x={};for(const S of g)x[S.section]===void 0?x[S.section]=[S]:x[S.section].push(S);let F=0;for(const S of Object.keys(x)){const _=Ma(x[S],F)+1;F+=_,b+=_*(i.barHeight+i.barGap),C[S]=_}}else{b+=g.length*(i.barHeight+i.barGap);for(const x of U)C[x]=g.filter(F=>F.type===x).length}T.setAttribute("viewBox","0 0 "+de+" "+b);const X=p.select(`[id="${t}"]`),H=Fi().domain([Jn(g,function(x){return x.startTime}),$n(g,function(x){return x.endTime})]).rangeRound([0,de-i.leftPadding-i.rightPadding]);function D(x,F){const S=x.startTime,_=F.startTime;let k=0;return S>_?k=1:S<_&&(k=-1),k}h(D,"taskCompare"),g.sort(D),I(g,de,b),Pn(X,b,de,i.useMaxWidth),X.append("text").text(r.db.getDiagramTitle()).attr("x",de/2).attr("y",i.titleTopMargin).attr("class","titleText");function I(x,F,S){const _=i.barHeight,k=_+i.barGap,Y=i.topPadding,l=i.leftPadding,d=Qn().domain([0,U.length]).range(["#00B9FA","#F95002"]).interpolate(hr);W(k,Y,l,F,S,x,r.db.getExcludes(),r.db.getIncludes()),B(l,Y,F,S),V(x,k,Y,l,_,d,F),j(k,Y),w(l,Y,F,S)}h(I,"makeGantt");function V(x,F,S,_,k,Y,l){x.sort((u,o)=>u.vert===o.vert?0:u.vert?1:-1);const y=[...new Set(x.map(u=>u.order))].map(u=>x.find(o=>o.order===u));X.append("g").selectAll("rect").data(y).enter().append("rect").attr("x",0).attr("y",function(u,o){return o=u.order,o*F+S-2}).attr("width",function(){return l-i.rightPadding/2}).attr("height",F).attr("class",function(u){for(const[o,R]of U.entries())if(u.type===R)return"section section"+o%i.numberSectionStyles;return"section section0"}).enter();const m=X.append("g").selectAll("rect").data(x).enter(),E=r.db.getLinks();if(m.append("rect").attr("id",function(u){return u.id}).attr("rx",3).attr("ry",3).attr("x",function(u){return u.milestone?H(u.startTime)+_+.5*(H(u.endTime)-H(u.startTime))-.5*k:H(u.startTime)+_}).attr("y",function(u,o){return o=u.order,u.vert?i.gridLineStartPadding:o*F+S}).attr("width",function(u){return u.milestone?k:u.vert?.08*k:H(u.renderEndTime||u.endTime)-H(u.startTime)}).attr("height",function(u){return u.vert?g.length*(i.barHeight+i.barGap)+i.barHeight*2:k}).attr("transform-origin",function(u,o){return o=u.order,(H(u.startTime)+_+.5*(H(u.endTime)-H(u.startTime))).toString()+"px "+(o*F+S+.5*k).toString()+"px"}).attr("class",function(u){const o="task";let R="";u.classes.length>0&&(R=u.classes.join(" "));let P=0;for(const[K,G]of U.entries())u.type===G&&(P=K%i.numberSectionStyles);let z="";return u.active?u.crit?z+=" activeCrit":z=" active":u.done?u.crit?z=" doneCrit":z=" done":u.crit&&(z+=" crit"),z.length===0&&(z=" task"),u.milestone&&(z=" milestone "+z),u.vert&&(z=" vert "+z),z+=P,z+=" "+R,o+z}),m.append("text").attr("id",function(u){return u.id+"-text"}).text(function(u){return u.task}).attr("font-size",i.fontSize).attr("x",function(u){let o=H(u.startTime),R=H(u.renderEndTime||u.endTime);if(u.milestone&&(o+=.5*(H(u.endTime)-H(u.startTime))-.5*k,R=o+k),u.vert)return H(u.startTime)+_;const P=this.getBBox().width;return P>R-o?R+P+1.5*i.leftPadding>l?o+_-5:R+_+5:(R-o)/2+o+_}).attr("y",function(u,o){return u.vert?i.gridLineStartPadding+g.length*(i.barHeight+i.barGap)+60:(o=u.order,o*F+i.barHeight/2+(i.fontSize/2-2)+S)}).attr("text-height",k).attr("class",function(u){const o=H(u.startTime);let R=H(u.endTime);u.milestone&&(R=o+k);const P=this.getBBox().width;let z="";u.classes.length>0&&(z=u.classes.join(" "));let K=0;for(const[$,ae]of U.entries())u.type===ae&&(K=$%i.numberSectionStyles);let G="";return u.active&&(u.crit?G="activeCritText"+K:G="activeText"+K),u.done?u.crit?G=G+" doneCritText"+K:G=G+" doneText"+K:u.crit&&(G=G+" critText"+K),u.milestone&&(G+=" milestoneText"),u.vert&&(G+=" vertText"),P>R-o?R+P+1.5*i.leftPadding>l?z+" taskTextOutsideLeft taskTextOutside"+K+" "+G:z+" taskTextOutsideRight taskTextOutside"+K+" "+G+" width-"+P:z+" taskText taskText"+K+" "+G+" width-"+P}),_e().securityLevel==="sandbox"){let u;u=Be("#i"+t);const o=u.nodes()[0].contentDocument;m.filter(function(R){return E.has(R.id)}).each(function(R){var P=o.querySelector("#"+R.id),z=o.querySelector("#"+R.id+"-text");const K=P.parentNode;var G=o.createElement("a");G.setAttribute("xlink:href",E.get(R.id)),G.setAttribute("target","_top"),K.appendChild(G),G.appendChild(P),G.appendChild(z)})}}h(V,"drawRects");function W(x,F,S,_,k,Y,l,d){if(l.length===0&&d.length===0)return;let y,m;for(const{startTime:P,endTime:z}of Y)(y===void 0||P<y)&&(y=P),(m===void 0||z>m)&&(m=z);if(!y||!m)return;if(ie(m).diff(ie(y),"year")>5){Ke.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const E=r.db.getDateFormat(),c=[];let u=null,o=ie(y);for(;o.valueOf()<=m;)r.db.isInvalidDate(o,E,l,d)?u?u.end=o:u={start:o,end:o}:u&&(c.push(u),u=null),o=o.add(1,"d");X.append("g").selectAll("rect").data(c).enter().append("rect").attr("id",function(P){return"exclude-"+P.start.format("YYYY-MM-DD")}).attr("x",function(P){return H(P.start)+S}).attr("y",i.gridLineStartPadding).attr("width",function(P){const z=P.end.add(1,"day");return H(z)-H(P.start)}).attr("height",k-F-i.gridLineStartPadding).attr("transform-origin",function(P,z){return(H(P.start)+S+.5*(H(P.end)-H(P.start))).toString()+"px "+(z*x+.5*k).toString()+"px"}).attr("class","exclude-range")}h(W,"drawExcludeDays");function B(x,F,S,_){let k=sr(H).tickSize(-_+F+i.gridLineStartPadding).tickFormat(nt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const l=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(l!==null){const d=l[1],y=l[2],m=r.db.getWeekday()||i.weekday;switch(y){case"millisecond":k.ticks(Ye.every(d));break;case"second":k.ticks(ve.every(d));break;case"minute":k.ticks(We.every(d));break;case"hour":k.ticks(He.every(d));break;case"day":k.ticks(Te.every(d));break;case"week":k.ticks(tn[m].every(d));break;case"month":k.ticks(Ne.every(d));break}}if(X.append("g").attr("class","grid").attr("transform","translate("+x+", "+(_-50)+")").call(k).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let d=ar(H).tickSize(-_+F+i.gridLineStartPadding).tickFormat(nt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(l!==null){const y=l[1],m=l[2],E=r.db.getWeekday()||i.weekday;switch(m){case"millisecond":d.ticks(Ye.every(y));break;case"second":d.ticks(ve.every(y));break;case"minute":d.ticks(We.every(y));break;case"hour":d.ticks(He.every(y));break;case"day":d.ticks(Te.every(y));break;case"week":d.ticks(tn[E].every(y));break;case"month":d.ticks(Ne.every(y));break}}X.append("g").attr("class","grid").attr("transform","translate("+x+", "+F+")").call(d).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}h(B,"makeGrid");function j(x,F){let S=0;const _=Object.keys(C).map(k=>[k,C[k]]);X.append("g").selectAll("text").data(_).enter().append(function(k){const Y=k[0].split(zn.lineBreakRegex),l=-(Y.length-1)/2,d=M.createElementNS("http://www.w3.org/2000/svg","text");d.setAttribute("dy",l+"em");for(const[y,m]of Y.entries()){const E=M.createElementNS("http://www.w3.org/2000/svg","tspan");E.setAttribute("alignment-baseline","central"),E.setAttribute("x","10"),y>0&&E.setAttribute("dy","1em"),E.textContent=m,d.appendChild(E)}return d}).attr("x",10).attr("y",function(k,Y){if(Y>0)for(let l=0;l<Y;l++)return S+=_[Y-1][1],k[1]*x/2+S*x+F;else return k[1]*x/2+F}).attr("font-size",i.sectionFontSize).attr("class",function(k){for(const[Y,l]of U.entries())if(k[0]===l)return"sectionTitle sectionTitle"+Y%i.numberSectionStyles;return"sectionTitle"})}h(j,"vertLabels");function w(x,F,S,_){const k=r.db.getTodayMarker();if(k==="off")return;const Y=X.append("g").attr("class","today"),l=new Date,d=Y.append("line");d.attr("x1",H(l)+x).attr("x2",H(l)+x).attr("y1",i.titleTopMargin).attr("y2",_-i.titleTopMargin).attr("class","today"),k!==""&&d.attr("style",k.replace(/,/g,";"))}h(w,"drawToday");function O(x){const F={},S=[];for(let _=0,k=x.length;_<k;++_)Object.prototype.hasOwnProperty.call(F,x[_])||(F[x[_]]=!0,S.push(x[_]));return S}h(O,"checkUnique")},"draw"),Sa={setConf:Da,draw:_a},Fa=h(e=>`
|
|
.mermaid-main-font {
|
|
font-family: ${e.fontFamily};
|
|
}
|
|
|
|
.exclude-range {
|
|
fill: ${e.excludeBkgColor};
|
|
}
|
|
|
|
.section {
|
|
stroke: none;
|
|
opacity: 0.2;
|
|
}
|
|
|
|
.section0 {
|
|
fill: ${e.sectionBkgColor};
|
|
}
|
|
|
|
.section2 {
|
|
fill: ${e.sectionBkgColor2};
|
|
}
|
|
|
|
.section1,
|
|
.section3 {
|
|
fill: ${e.altSectionBkgColor};
|
|
opacity: 0.2;
|
|
}
|
|
|
|
.sectionTitle0 {
|
|
fill: ${e.titleColor};
|
|
}
|
|
|
|
.sectionTitle1 {
|
|
fill: ${e.titleColor};
|
|
}
|
|
|
|
.sectionTitle2 {
|
|
fill: ${e.titleColor};
|
|
}
|
|
|
|
.sectionTitle3 {
|
|
fill: ${e.titleColor};
|
|
}
|
|
|
|
.sectionTitle {
|
|
text-anchor: start;
|
|
font-family: ${e.fontFamily};
|
|
}
|
|
|
|
|
|
/* Grid and axis */
|
|
|
|
.grid .tick {
|
|
stroke: ${e.gridColor};
|
|
opacity: 0.8;
|
|
shape-rendering: crispEdges;
|
|
}
|
|
|
|
.grid .tick text {
|
|
font-family: ${e.fontFamily};
|
|
fill: ${e.textColor};
|
|
}
|
|
|
|
.grid path {
|
|
stroke-width: 0;
|
|
}
|
|
|
|
|
|
/* Today line */
|
|
|
|
.today {
|
|
fill: none;
|
|
stroke: ${e.todayLineColor};
|
|
stroke-width: 2px;
|
|
}
|
|
|
|
|
|
/* Task styling */
|
|
|
|
/* Default task */
|
|
|
|
.task {
|
|
stroke-width: 2;
|
|
}
|
|
|
|
.taskText {
|
|
text-anchor: middle;
|
|
font-family: ${e.fontFamily};
|
|
}
|
|
|
|
.taskTextOutsideRight {
|
|
fill: ${e.taskTextDarkColor};
|
|
text-anchor: start;
|
|
font-family: ${e.fontFamily};
|
|
}
|
|
|
|
.taskTextOutsideLeft {
|
|
fill: ${e.taskTextDarkColor};
|
|
text-anchor: end;
|
|
}
|
|
|
|
|
|
/* Special case clickable */
|
|
|
|
.task.clickable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.taskText.clickable {
|
|
cursor: pointer;
|
|
fill: ${e.taskTextClickableColor} !important;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.taskTextOutsideLeft.clickable {
|
|
cursor: pointer;
|
|
fill: ${e.taskTextClickableColor} !important;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.taskTextOutsideRight.clickable {
|
|
cursor: pointer;
|
|
fill: ${e.taskTextClickableColor} !important;
|
|
font-weight: bold;
|
|
}
|
|
|
|
|
|
/* Specific task settings for the sections*/
|
|
|
|
.taskText0,
|
|
.taskText1,
|
|
.taskText2,
|
|
.taskText3 {
|
|
fill: ${e.taskTextColor};
|
|
}
|
|
|
|
.task0,
|
|
.task1,
|
|
.task2,
|
|
.task3 {
|
|
fill: ${e.taskBkgColor};
|
|
stroke: ${e.taskBorderColor};
|
|
}
|
|
|
|
.taskTextOutside0,
|
|
.taskTextOutside2
|
|
{
|
|
fill: ${e.taskTextOutsideColor};
|
|
}
|
|
|
|
.taskTextOutside1,
|
|
.taskTextOutside3 {
|
|
fill: ${e.taskTextOutsideColor};
|
|
}
|
|
|
|
|
|
/* Active task */
|
|
|
|
.active0,
|
|
.active1,
|
|
.active2,
|
|
.active3 {
|
|
fill: ${e.activeTaskBkgColor};
|
|
stroke: ${e.activeTaskBorderColor};
|
|
}
|
|
|
|
.activeText0,
|
|
.activeText1,
|
|
.activeText2,
|
|
.activeText3 {
|
|
fill: ${e.taskTextDarkColor} !important;
|
|
}
|
|
|
|
|
|
/* Completed task */
|
|
|
|
.done0,
|
|
.done1,
|
|
.done2,
|
|
.done3 {
|
|
stroke: ${e.doneTaskBorderColor};
|
|
fill: ${e.doneTaskBkgColor};
|
|
stroke-width: 2;
|
|
}
|
|
|
|
.doneText0,
|
|
.doneText1,
|
|
.doneText2,
|
|
.doneText3 {
|
|
fill: ${e.taskTextDarkColor} !important;
|
|
}
|
|
|
|
|
|
/* Tasks on the critical line */
|
|
|
|
.crit0,
|
|
.crit1,
|
|
.crit2,
|
|
.crit3 {
|
|
stroke: ${e.critBorderColor};
|
|
fill: ${e.critBkgColor};
|
|
stroke-width: 2;
|
|
}
|
|
|
|
.activeCrit0,
|
|
.activeCrit1,
|
|
.activeCrit2,
|
|
.activeCrit3 {
|
|
stroke: ${e.critBorderColor};
|
|
fill: ${e.activeTaskBkgColor};
|
|
stroke-width: 2;
|
|
}
|
|
|
|
.doneCrit0,
|
|
.doneCrit1,
|
|
.doneCrit2,
|
|
.doneCrit3 {
|
|
stroke: ${e.critBorderColor};
|
|
fill: ${e.doneTaskBkgColor};
|
|
stroke-width: 2;
|
|
cursor: pointer;
|
|
shape-rendering: crispEdges;
|
|
}
|
|
|
|
.milestone {
|
|
transform: rotate(45deg) scale(0.8,0.8);
|
|
}
|
|
|
|
.milestoneText {
|
|
font-style: italic;
|
|
}
|
|
.doneCritText0,
|
|
.doneCritText1,
|
|
.doneCritText2,
|
|
.doneCritText3 {
|
|
fill: ${e.taskTextDarkColor} !important;
|
|
}
|
|
|
|
.vert {
|
|
stroke: ${e.vertLineColor};
|
|
}
|
|
|
|
.vertText {
|
|
font-size: 15px;
|
|
text-anchor: middle;
|
|
fill: ${e.vertLineColor} !important;
|
|
}
|
|
|
|
.activeCritText0,
|
|
.activeCritText1,
|
|
.activeCritText2,
|
|
.activeCritText3 {
|
|
fill: ${e.taskTextDarkColor} !important;
|
|
}
|
|
|
|
.titleText {
|
|
text-anchor: middle;
|
|
font-size: 18px;
|
|
fill: ${e.titleColor||e.textColor};
|
|
font-family: ${e.fontFamily};
|
|
}
|
|
`,"getStyles"),Ya=Fa,Ia={parser:zi,db:Ca,renderer:Sa,styles:Ya};export{Ia as diagram};
|