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