import{ae as qe,af as Dn,ag as Xe,ah as je,ai as Qe,aj as ee,ak as Mn,a as _n,s as Sn,o as Un,p as Yn,b as Fn,c as Ln,g as Dt,d as zt,e as En,l as Jt,k as An,j as In,r as Wn,u as On}from"./intro-yEGgrrvb.js";import{d as nt}from"./dayjs.min-CfWDS3UC.js";import{g as Je}from"./_commonjsHelpers-D6-XlEtG.js";import{d as Hn}from"./advancedFormat-DF-l3-BJ.js";import{b as Nn,t as Ue,c as Pn,a as Vn,l as Rn}from"./linear-TSojd4iL.js";import{i as zn}from"./init-Gi6I4Gst.js";import"./index-bIIEL2MP.js";import"./iframe-CzjIX-qr.js";import"./index-CO-0pc0F.js";import"./index-Z-6k0Xrj.js";import"./index-aQYXhgXp.js";import"./index-DrFu-skq.js";import"./docsPage-CT2vyZOj.js";import"./Table-F-lkejrq.js";import"./parseCss-DFN8Q8fx.js";import"./index-D7HDsfES.js";import"./_color-UiaLB_4F.js";function Bn(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 Zn(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 qn(t){return t}var Zt=1,ne=2,he=3,Bt=4,Ye=1e-6;function Xn(t){return"translate("+t+",0)"}function jn(t){return"translate(0,"+t+")"}function Qn(t){return e=>+t(e)}function Jn(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Gn(){return!this.__axis}function Ge(t,e){var n=[],r=null,i=null,s=6,a=6,x=3,U=typeof window<"u"&&window.devicePixelRatio>1?0:.5,T=t===Zt||t===Bt?-1:1,g=t===Bt||t===ne?"x":"y",F=t===Zt||t===he?Xn:jn;function w(k){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),I=i??(e.tickFormat?e.tickFormat.apply(e,n):qn),D=Math.max(s,0)+x,L=e.range(),H=+L[0]+U,E=+L[L.length-1]+U,Z=(e.bandwidth?Jn:Qn)(e.copy(),U),J=k.selection?k.selection():k,v=J.selectAll(".domain").data([null]),W=J.selectAll(".tick").data(X,e).order(),p=W.exit(),Y=W.enter().append("g").attr("class","tick"),_=W.select("line"),b=W.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),W=W.merge(Y),_=_.merge(Y.append("line").attr("stroke","currentColor").attr(g+"2",T*s)),b=b.merge(Y.append("text").attr("fill","currentColor").attr(g,T*D).attr("dy",t===Zt?"0em":t===he?"0.71em":"0.32em")),k!==J&&(v=v.transition(k),W=W.transition(k),_=_.transition(k),b=b.transition(k),p=p.transition(k).attr("opacity",Ye).attr("transform",function(o){return isFinite(o=Z(o))?F(o+U):this.getAttribute("transform")}),Y.attr("opacity",Ye).attr("transform",function(o){var f=this.parentNode.__axis;return F((f&&isFinite(f=f(o))?f:Z(o))+U)})),p.remove(),v.attr("d",t===Bt||t===ne?a?"M"+T*a+","+H+"H"+U+"V"+E+"H"+T*a:"M"+U+","+H+"V"+E:a?"M"+H+","+T*a+"V"+U+"H"+E+"V"+T*a:"M"+H+","+U+"H"+E),W.attr("opacity",1).attr("transform",function(o){return F(Z(o)+U)}),_.attr(g+"2",T*s),b.attr(g,T*D).text(I),J.filter(Gn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ne?"start":t===Bt?"end":"middle"),J.each(function(){this.__axis=Z})}return w.scale=function(k){return arguments.length?(e=k,w):e},w.ticks=function(){return n=Array.from(arguments),w},w.tickArguments=function(k){return arguments.length?(n=k==null?[]:Array.from(k),w):n.slice()},w.tickValues=function(k){return arguments.length?(r=k==null?null:Array.from(k),w):r&&r.slice()},w.tickFormat=function(k){return arguments.length?(i=k,w):i},w.tickSize=function(k){return arguments.length?(s=a=+k,w):s},w.tickSizeInner=function(k){return arguments.length?(s=+k,w):s},w.tickSizeOuter=function(k){return arguments.length?(a=+k,w):a},w.tickPadding=function(k){return arguments.length?(x=+k,w):x},w.offset=function(k){return arguments.length?(U=+k,w):U},w}function Kn(t){return Ge(Zt,t)}function $n(t){return Ge(he,t)}const tr=Math.PI/180,er=180/Math.PI,Gt=18,Ke=.96422,$e=1,tn=.82521,en=4/29,Mt=6/29,nn=3*Mt*Mt,nr=Mt*Mt*Mt;function rn(t){if(t instanceof st)return new st(t.l,t.a,t.b,t.opacity);if(t instanceof ft)return sn(t);t instanceof qe||(t=Dn(t));var e=ae(t.r),n=ae(t.g),r=ae(t.b),i=re((.2225045*e+.7168786*n+.0606169*r)/$e),s,a;return e===n&&n===r?s=a=i:(s=re((.4360747*e+.3850649*n+.1430804*r)/Ke),a=re((.0139322*e+.0971045*n+.7141733*r)/tn)),new st(116*i-16,500*(s-i),200*(i-a),t.opacity)}function rr(t,e,n,r){return arguments.length===1?rn(t):new st(t,e,n,r??1)}function st(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Xe(st,rr,je(Qe,{brighter(t){return new st(this.l+Gt*(t??1),this.a,this.b,this.opacity)},darker(t){return new st(this.l-Gt*(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=Ke*ie(e),t=$e*ie(t),n=tn*ie(n),new qe(se(3.1338561*e-1.6168667*t-.4906146*n),se(-.9787684*e+1.9161415*t+.033454*n),se(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function re(t){return t>nr?Math.pow(t,1/3):t/nn+en}function ie(t){return t>Mt?t*t*t:nn*(t-en)}function se(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ae(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ir(t){if(t instanceof ft)return new ft(t.h,t.c,t.l,t.opacity);if(t instanceof st||(t=rn(t)),t.a===0&&t.b===0)return new ft(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),x=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,x)=>{const U=[];if(s=i.ceil(s),x=x==null?1:Math.floor(x),!(s0))return U;let T;do U.push(T=new Date(+s)),e(s,x),t(s);while(Ttt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,x)=>{if(a>=a)if(x<0)for(;++x<=0;)for(;e(a,-1),!s(a););else for(;--x>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(oe.setTime(+s),ce.setTime(+a),t(oe),t(ce),Math.floor(n(oe,ce))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const St=tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);St.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):St);St.range;const ht=1e3,rt=ht*60,dt=rt*60,mt=dt*24,pe=mt*7,Fe=mt*30,le=mt*365,kt=tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ht)},(t,e)=>(e-t)/ht,t=>t.getUTCSeconds());kt.range;const At=tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ht)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getMinutes());At.range;const cr=tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getUTCMinutes());cr.range;const It=tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ht-t.getMinutes()*rt)},(t,e)=>{t.setTime(+t+e*dt)},(t,e)=>(e-t)/dt,t=>t.getHours());It.range;const lr=tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*dt)},(t,e)=>(e-t)/dt,t=>t.getUTCHours());lr.range;const pt=tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*rt)/mt,t=>t.getDate()-1);pt.range;const Te=tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/mt,t=>t.getUTCDate()-1);Te.range;const ur=tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/mt,t=>Math.floor(t/mt));ur.range;function bt(t){return tt(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())*rt)/pe)}const Ht=bt(0),Wt=bt(1),an=bt(2),on=bt(3),Tt=bt(4),cn=bt(5),ln=bt(6);Ht.range;Wt.range;an.range;on.range;Tt.range;cn.range;ln.range;function xt(t){return tt(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)/pe)}const un=xt(0),Kt=xt(1),fr=xt(2),hr=xt(3),Ut=xt(4),dr=xt(5),mr=xt(6);un.range;Kt.range;fr.range;hr.range;Ut.range;dr.range;mr.range;const Ot=tt(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());Ot.range;const gr=tt(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());gr.range;const gt=tt(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());gt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:tt(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)});gt.range;const vt=tt(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());vt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:tt(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)});vt.range;function yr(t,e,n,r,i,s){const a=[[kt,1,ht],[kt,5,5*ht],[kt,15,15*ht],[kt,30,30*ht],[s,1,rt],[s,5,5*rt],[s,15,15*rt],[s,30,30*rt],[i,1,dt],[i,3,3*dt],[i,6,6*dt],[i,12,12*dt],[r,1,mt],[r,2,2*mt],[n,1,pe],[e,1,Fe],[e,3,3*Fe],[t,1,le]];function x(T,g,F){const w=gD).right(a,w);if(k===a.length)return t.every(Ue(T/le,g/le,F));if(k===0)return St.every(Math.max(Ue(T,g,F),1));const[X,I]=a[w/a[k-1][2]53)return null;"w"in l||(l.w=1),"Z"in l?(P=fe(Ft(l.y,0,1)),Q=P.getUTCDay(),P=Q>4||Q===0?Kt.ceil(P):Kt(P),P=Te.offset(P,(l.V-1)*7),l.y=P.getUTCFullYear(),l.m=P.getUTCMonth(),l.d=P.getUTCDate()+(l.w+6)%7):(P=ue(Ft(l.y,0,1)),Q=P.getDay(),P=Q>4||Q===0?Wt.ceil(P):Wt(P),P=pt.offset(P,(l.V-1)*7),l.y=P.getFullYear(),l.m=P.getMonth(),l.d=P.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),Q="Z"in l?fe(Ft(l.y,0,1)).getUTCDay():ue(Ft(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(Q+5)%7:l.w+l.U*7-(Q+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,fe(l)):ue(l)}}function p(y,A,S,l){for(var B=0,P=A.length,Q=S.length,G,K;B=Q)return-1;if(G=A.charCodeAt(B++),G===37){if(G=A.charAt(B++),K=J[G in Le?A.charAt(B++):G],!K||(l=K(y,S,l))<0)return-1}else if(G!=S.charCodeAt(l++))return-1}return l}function Y(y,A,S){var l=T.exec(A.slice(S));return l?(y.p=g.get(l[0].toLowerCase()),S+l[0].length):-1}function _(y,A,S){var l=k.exec(A.slice(S));return l?(y.w=X.get(l[0].toLowerCase()),S+l[0].length):-1}function b(y,A,S){var l=F.exec(A.slice(S));return l?(y.w=w.get(l[0].toLowerCase()),S+l[0].length):-1}function o(y,A,S){var l=L.exec(A.slice(S));return l?(y.m=H.get(l[0].toLowerCase()),S+l[0].length):-1}function f(y,A,S){var l=I.exec(A.slice(S));return l?(y.m=D.get(l[0].toLowerCase()),S+l[0].length):-1}function m(y,A,S){return p(y,e,A,S)}function u(y,A,S){return p(y,n,A,S)}function M(y,A,S){return p(y,r,A,S)}function c(y){return a[y.getDay()]}function j(y){return s[y.getDay()]}function d(y){return U[y.getMonth()]}function h(y){return x[y.getMonth()]}function C(y){return i[+(y.getHours()>=12)]}function q(y){return 1+~~(y.getMonth()/3)}function O(y){return a[y.getUTCDay()]}function V(y){return s[y.getUTCDay()]}function N(y){return U[y.getUTCMonth()]}function R(y){return x[y.getUTCMonth()]}function at(y){return i[+(y.getUTCHours()>=12)]}function ot(y){return 1+~~(y.getUTCMonth()/3)}return{format:function(y){var A=v(y+="",E);return A.toString=function(){return y},A},parse:function(y){var A=W(y+="",!1);return A.toString=function(){return y},A},utcFormat:function(y){var A=v(y+="",Z);return A.toString=function(){return y},A},utcParse:function(y){var A=W(y+="",!0);return A.toString=function(){return y},A}}}var Le={"-":"",_:" ",0:"0"},et=/^\s*\d+/,vr=/^%/,br=/[\\^$*+?|[\]().{}]/g;function z(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function wr(t,e,n){var r=et.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Cr(t,e,n){var r=et.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Dr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Mr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function _r(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ee(t,e,n){var r=et.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ae(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Sr(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 Ur(t,e,n){var r=et.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Yr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ie(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=et.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function We(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=et.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ir(t,e,n){var r=et.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Wr(t,e,n){var r=vr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Or(t,e,n){var r=et.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=et.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Oe(t,e){return z(t.getDate(),e,2)}function Nr(t,e){return z(t.getHours(),e,2)}function Pr(t,e){return z(t.getHours()%12||12,e,2)}function Vr(t,e){return z(1+pt.count(gt(t),t),e,3)}function fn(t,e){return z(t.getMilliseconds(),e,3)}function Rr(t,e){return fn(t,e)+"000"}function zr(t,e){return z(t.getMonth()+1,e,2)}function Br(t,e){return z(t.getMinutes(),e,2)}function Zr(t,e){return z(t.getSeconds(),e,2)}function qr(t){var e=t.getDay();return e===0?7:e}function Xr(t,e){return z(Ht.count(gt(t)-1,t),e,2)}function hn(t){var e=t.getDay();return e>=4||e===0?Tt(t):Tt.ceil(t)}function jr(t,e){return t=hn(t),z(Tt.count(gt(t),t)+(gt(t).getDay()===4),e,2)}function Qr(t){return t.getDay()}function Jr(t,e){return z(Wt.count(gt(t)-1,t),e,2)}function Gr(t,e){return z(t.getFullYear()%100,e,2)}function Kr(t,e){return t=hn(t),z(t.getFullYear()%100,e,2)}function $r(t,e){return z(t.getFullYear()%1e4,e,4)}function ti(t,e){var n=t.getDay();return t=n>=4||n===0?Tt(t):Tt.ceil(t),z(t.getFullYear()%1e4,e,4)}function ei(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+z(e/60|0,"0",2)+z(e%60,"0",2)}function He(t,e){return z(t.getUTCDate(),e,2)}function ni(t,e){return z(t.getUTCHours(),e,2)}function ri(t,e){return z(t.getUTCHours()%12||12,e,2)}function ii(t,e){return z(1+Te.count(vt(t),t),e,3)}function dn(t,e){return z(t.getUTCMilliseconds(),e,3)}function si(t,e){return dn(t,e)+"000"}function ai(t,e){return z(t.getUTCMonth()+1,e,2)}function oi(t,e){return z(t.getUTCMinutes(),e,2)}function ci(t,e){return z(t.getUTCSeconds(),e,2)}function li(t){var e=t.getUTCDay();return e===0?7:e}function ui(t,e){return z(un.count(vt(t)-1,t),e,2)}function mn(t){var e=t.getUTCDay();return e>=4||e===0?Ut(t):Ut.ceil(t)}function fi(t,e){return t=mn(t),z(Ut.count(vt(t),t)+(vt(t).getUTCDay()===4),e,2)}function hi(t){return t.getUTCDay()}function di(t,e){return z(Kt.count(vt(t)-1,t),e,2)}function mi(t,e){return z(t.getUTCFullYear()%100,e,2)}function gi(t,e){return t=mn(t),z(t.getUTCFullYear()%100,e,2)}function yi(t,e){return z(t.getUTCFullYear()%1e4,e,4)}function ki(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ut(t):Ut.ceil(t),z(t.getUTCFullYear()%1e4,e,4)}function pi(){return"+0000"}function Ne(){return"%"}function Pe(t){return+t}function Ve(t){return Math.floor(+t/1e3)}var Ct,$t;Ti({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 Ti(t){return Ct=Tr(t),$t=Ct.format,Ct.parse,Ct.utcFormat,Ct.utcParse,Ct}function vi(t){return new Date(t)}function bi(t){return t instanceof Date?+t:+new Date(+t)}function gn(t,e,n,r,i,s,a,x,U,T){var g=Pn(),F=g.invert,w=g.domain,k=T(".%L"),X=T(":%S"),I=T("%I:%M"),D=T("%I %p"),L=T("%a %d"),H=T("%b %d"),E=T("%B"),Z=T("%Y");function J(v){return(U(v)4&&(k+=7),w.add(k,n));return X.diff(I,"week")+1},x.isoWeekday=function(T){return this.$utils().u(T)?this.day()||7:this.day(this.day()%7?T:T-7)};var U=x.startOf;x.startOf=function(T,g){var F=this.$utils(),w=!!F.u(g)||g;return F.p(T)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):U.bind(this)(T,g)}}})}(qt)),qt.exports}var Di=Ci();const Mi=Je(Di);var Xt={exports:{}},_i=Xt.exports,ze;function Si(){return ze||(ze=1,function(t,e){(function(n,r){t.exports=r()})(_i,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/,s=/\d\d/,a=/\d\d?/,x=/\d*[^-_:/,()\s\d]+/,U={},T=function(D){return(D=+D)+(D>68?1900:2e3)},g=function(D){return function(L){this[D]=+L}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(D){(this.zone||(this.zone={})).offset=function(L){if(!L||L==="Z")return 0;var H=L.match(/([+-]|\d\d)/g),E=60*H[1]+(+H[2]||0);return E===0?0:H[0]==="+"?-E:E}(D)}],w=function(D){var L=U[D];return L&&(L.indexOf?L:L.s.concat(L.f))},k=function(D,L){var H,E=U.meridiem;if(E){for(var Z=1;Z<=24;Z+=1)if(D.indexOf(E(Z,0,L))>-1){H=Z>12;break}}else H=D===(L?"pm":"PM");return H},X={A:[x,function(D){this.afternoon=k(D,!1)}],a:[x,function(D){this.afternoon=k(D,!0)}],Q:[i,function(D){this.month=3*(D-1)+1}],S:[i,function(D){this.milliseconds=100*+D}],SS:[s,function(D){this.milliseconds=10*+D}],SSS:[/\d{3}/,function(D){this.milliseconds=+D}],s:[a,g("seconds")],ss:[a,g("seconds")],m:[a,g("minutes")],mm:[a,g("minutes")],H:[a,g("hours")],h:[a,g("hours")],HH:[a,g("hours")],hh:[a,g("hours")],D:[a,g("day")],DD:[s,g("day")],Do:[x,function(D){var L=U.ordinal,H=D.match(/\d+/);if(this.day=H[0],L)for(var E=1;E<=31;E+=1)L(E).replace(/\[|\]/g,"")===D&&(this.day=E)}],w:[a,g("week")],ww:[s,g("week")],M:[a,g("month")],MM:[s,g("month")],MMM:[x,function(D){var L=w("months"),H=(w("monthsShort")||L.map(function(E){return E.slice(0,3)})).indexOf(D)+1;if(H<1)throw new Error;this.month=H%12||H}],MMMM:[x,function(D){var L=w("months").indexOf(D)+1;if(L<1)throw new Error;this.month=L%12||L}],Y:[/[+-]?\d+/,g("year")],YY:[s,function(D){this.year=T(D)}],YYYY:[/\d{4}/,g("year")],Z:F,ZZ:F};function I(D){var L,H;L=D,H=U&&U.formats;for(var E=(D=L.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(_,b,o){var f=o&&o.toUpperCase();return b||H[o]||n[o]||H[f].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(m,u,M){return u||M.slice(1)})})).match(r),Z=E.length,J=0;J-1)return new Date((j==="X"?1e3:1)*c);var C=I(j)(c),q=C.year,O=C.month,V=C.day,N=C.hours,R=C.minutes,at=C.seconds,ot=C.milliseconds,y=C.zone,A=C.week,S=new Date,l=V||(q||O?1:S.getDate()),B=q||S.getFullYear(),P=0;q&&!O||(P=O>0?O-1:S.getMonth());var Q,G=N||0,K=R||0,ct=at||0,yt=ot||0;return y?new Date(Date.UTC(B,P,l,G,K,ct,yt+60*y.offset*1e3)):d?new Date(Date.UTC(B,P,l,G,K,ct,yt)):(Q=new Date(B,P,l,G,K,ct,yt),A&&(Q=h(Q).week(A).toDate()),Q)}catch{return new Date("")}}(v,Y,W,H),this.init(),f&&f!==!0&&(this.$L=this.locale(f).$L),o&&v!=this.format(Y)&&(this.$d=new Date("")),U={}}else if(Y instanceof Array)for(var m=Y.length,u=1;u<=m;u+=1){p[1]=Y[u-1];var M=H.apply(this,p);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}u===m&&(this.$d=new Date(""))}else Z.call(this,J)}}})}(Xt)),Xt.exports}var Ui=Si();const Yi=Je(Ui);var me=function(){var t=function(b,o,f,m){for(f=f||{},m=b.length;m--;f[b[m]]=o);return f},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],s=[1,28],a=[1,29],x=[1,30],U=[1,31],T=[1,9],g=[1,10],F=[1,11],w=[1,12],k=[1,13],X=[1,14],I=[1,15],D=[1,16],L=[1,18],H=[1,19],E=[1,20],Z=[1,21],J=[1,22],v=[1,24],W=[1,32],p={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(o,f,m,u,M,c,j){var d=c.length-1;switch(M){case 1:return c[d-1];case 2:this.$=[];break;case 3:c[d-1].push(c[d]),this.$=c[d-1];break;case 4:case 5:this.$=c[d];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(c[d].substr(11)),this.$=c[d].substr(11);break;case 16:u.enableInclusiveEndDates(),this.$=c[d].substr(18);break;case 17:u.TopAxis(),this.$=c[d].substr(8);break;case 18:u.setAxisFormat(c[d].substr(11)),this.$=c[d].substr(11);break;case 19:u.setTickInterval(c[d].substr(13)),this.$=c[d].substr(13);break;case 20:u.setExcludes(c[d].substr(9)),this.$=c[d].substr(9);break;case 21:u.setIncludes(c[d].substr(9)),this.$=c[d].substr(9);break;case 22:u.setTodayMarker(c[d].substr(12)),this.$=c[d].substr(12);break;case 24:u.setDiagramTitle(c[d].substr(6)),this.$=c[d].substr(6);break;case 25:this.$=c[d].trim(),u.setAccTitle(this.$);break;case 26:case 27:this.$=c[d].trim(),u.setAccDescription(this.$);break;case 28:u.addSection(c[d].substr(8)),this.$=c[d].substr(8);break;case 30:u.addTask(c[d-1],c[d]),this.$="task";break;case 31:this.$=c[d-1],u.setClickEvent(c[d-1],c[d],null);break;case 32:this.$=c[d-2],u.setClickEvent(c[d-2],c[d-1],c[d]);break;case 33:this.$=c[d-2],u.setClickEvent(c[d-2],c[d-1],null),u.setLink(c[d-2],c[d]);break;case 34:this.$=c[d-3],u.setClickEvent(c[d-3],c[d-2],c[d-1]),u.setLink(c[d-3],c[d]);break;case 35:this.$=c[d-2],u.setClickEvent(c[d-2],c[d],null),u.setLink(c[d-2],c[d-1]);break;case 36:this.$=c[d-3],u.setClickEvent(c[d-3],c[d-1],c[d]),u.setLink(c[d-3],c[d-2]);break;case 37:this.$=c[d-1],u.setLink(c[d-1],c[d]);break;case 38:case 44:this.$=c[d-1]+" "+c[d];break;case 39:case 40:case 42:this.$=c[d-2]+" "+c[d-1]+" "+c[d];break;case 41:case 43:this.$=c[d-3]+" "+c[d-2]+" "+c[d-1]+" "+c[d];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:s,16:a,17:x,18:U,19:T,20:g,21:F,22:w,23:k,24:X,25:I,26:D,27:L,28:H,30:E,32:Z,33:J,34:23,35:v,37:W},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:33,11:17,12:n,13:r,14:i,15:s,16:a,17:x,18:U,19:T,20:g,21:F,22:w,23:k,24:X,25:I,26:D,27:L,28:H,30:E,32:Z,33:J,34:23,35:v,37:W},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(o,f){if(f.recoverable)this.trace(o);else{var m=new Error(o);throw m.hash=f,m}},parse:function(o){var f=this,m=[0],u=[],M=[null],c=[],j=this.table,d="",h=0,C=0,q=2,O=1,V=c.slice.call(arguments,1),N=Object.create(this.lexer),R={yy:{}};for(var at in this.yy)Object.prototype.hasOwnProperty.call(this.yy,at)&&(R.yy[at]=this.yy[at]);N.setInput(o,R.yy),R.yy.lexer=N,R.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var ot=N.yylloc;c.push(ot);var y=N.options&&N.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function A(){var lt;return lt=u.pop()||N.lex()||O,typeof lt!="number"&&(lt instanceof Array&&(u=lt,lt=u.pop()),lt=f.symbols_[lt]||lt),lt}for(var S,l,B,P,Q={},G,K,ct,yt;;){if(l=m[m.length-1],this.defaultActions[l]?B=this.defaultActions[l]:((S===null||typeof S>"u")&&(S=A()),B=j[l]&&j[l][S]),typeof B>"u"||!B.length||!B[0]){var Rt="";yt=[];for(G in j[l])this.terminals_[G]&&G>q&&yt.push("'"+this.terminals_[G]+"'");N.showPosition?Rt="Parse error on line "+(h+1)+`: `+N.showPosition()+` Expecting `+yt.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Rt="Parse error on line "+(h+1)+": Unexpected "+(S==O?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Rt,{text:N.match,token:this.terminals_[S]||S,line:N.yylineno,loc:ot,expected:yt})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+l+", token: "+S);switch(B[0]){case 1:m.push(S),M.push(N.yytext),c.push(N.yylloc),m.push(B[1]),S=null,C=N.yyleng,d=N.yytext,h=N.yylineno,ot=N.yylloc;break;case 2:if(K=this.productions_[B[1]][1],Q.$=M[M.length-K],Q._$={first_line:c[c.length-(K||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(K||1)].first_column,last_column:c[c.length-1].last_column},y&&(Q._$.range=[c[c.length-(K||1)].range[0],c[c.length-1].range[1]]),P=this.performAction.apply(Q,[d,C,h,R.yy,B[1],M,c].concat(V)),typeof P<"u")return P;K&&(m=m.slice(0,-1*K*2),M=M.slice(0,-1*K),c=c.slice(0,-1*K)),m.push(this.productions_[B[1]][0]),M.push(Q.$),c.push(Q._$),ct=j[m[m.length-2]][m[m.length-1]],m.push(ct);break;case 3:return!0}}return!0}},Y=function(){var b={EOF:1,parseError:function(f,m){if(this.yy.parser)this.yy.parser.parseError(f,m);else throw new Error(f)},setInput:function(o,f){return this.yy=f||this.yy||{},this._input=o,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 o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var f=o.length,m=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;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),m.length-1&&(this.yylineno-=m.length-1);var M=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:m?(m.length===u.length?this.yylloc.first_column:0)+u[u.length-m.length].length-m[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-f]),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(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+` `+f+"^"},test_match:function(o,f){var m,u,M;if(this.options.backtrack_lexer&&(M={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&&(M.yylloc.range=this.yylloc.range.slice(0))),u=o[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+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],m=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var c in M)this[c]=M[c];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,f,m,u;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),c=0;cf[0].length)){if(f=m,u=c,this.options.backtrack_lexer){if(o=this.test_match(m,M[c]),o!==!1)return o;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(o=this.test_match(f,M[u]),o!==!1?o:!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 f=this.next();return f||this.lex()},begin:function(f){this.conditionStack.push(f)},popState:function(){var f=this.conditionStack.length-1;return f>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(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},pushState:function(f){this.begin(f)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(f,m,u,M){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 b}();p.lexer=Y;function _(){this.yy={}}return _.prototype=p,p.Parser=_,new _}();me.parser=me;const Fi=me;nt.extend(Mi);nt.extend(Yi);nt.extend(Hn);let it="",ve="",be,xe="",Nt=[],Pt=[],we={},Ce=[],te=[],Yt="",De="";const yn=["active","done","crit","milestone"];let Me=[],Vt=!1,_e=!1,Se="sunday",ge=0;const Li=function(){Ce=[],te=[],Yt="",Me=[],jt=0,ke=void 0,Qt=void 0,$=[],it="",ve="",De="",be=void 0,xe="",Nt=[],Pt=[],Vt=!1,_e=!1,ge=0,we={},Wn(),Se="sunday"},Ei=function(t){ve=t},Ai=function(){return ve},Ii=function(t){be=t},Wi=function(){return be},Oi=function(t){xe=t},Hi=function(){return xe},Ni=function(t){it=t},Pi=function(){Vt=!0},Vi=function(){return Vt},Ri=function(){_e=!0},zi=function(){return _e},Bi=function(t){De=t},Zi=function(){return De},qi=function(){return it},Xi=function(t){Nt=t.toLowerCase().split(/[\s,]+/)},ji=function(){return Nt},Qi=function(t){Pt=t.toLowerCase().split(/[\s,]+/)},Ji=function(){return Pt},Gi=function(){return we},Ki=function(t){Yt=t,Ce.push(t)},$i=function(){return Ce},ts=function(){let t=Be();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()))},es=function(t){Se=t},ns=function(){return Se},pn=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 s;t.endTime instanceof Date?s=nt(t.endTime):s=nt(t.endTime,e,!0);const[a,x]=rs(i,s,e,n,r);t.endTime=a.toDate(),t.renderEndTime=x},rs=function(t,e,n,r,i){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=kn(t,n,r,i),s&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},ye=function(t,e,n){n=n.trim();const i=/^after\s+(?[\d\w- ]+)/.exec(n);if(i!==null){let a=null;for(const U of i.groups.ids.split(" ")){let T=wt(U);T!==void 0&&(!a||T.endTime>a.endTime)&&(a=T)}if(a)return a.endTime;const x=new Date;return x.setHours(0,0,0,0),x}let s=nt(n,e.trim(),!0);if(s.isValid())return s.toDate();{Jt.debug("Invalid date:"+n),Jt.debug("With date format:"+e.trim());const a=new Date(n);if(a===void 0||isNaN(a.getTime())||a.getFullYear()<-1e4||a.getFullYear()>1e4)throw new Error("Invalid date:"+n);return a}},Tn=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},vn=function(t,e,n,r=!1){n=n.trim();const s=/^until\s+(?[\d\w- ]+)/.exec(n);if(s!==null){let g=null;for(const w of s.groups.ids.split(" ")){let k=wt(w);k!==void 0&&(!g||k.startTime{window.open(n,"_self")}),we[r]=n)}),xn(t,"clickable")},xn=function(t,e){t.split(",").forEach(function(n){let r=wt(n);r!==void 0&&r.classes.push(e)})},ls=function(t,e,n){if(Dt().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s{On.runFunc(e,...r)})},wn=function(t,e){Me.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()})})},us=function(t,e,n){t.split(",").forEach(function(r){ls(r,e,n)}),xn(t,"clickable")},fs=function(t){Me.forEach(function(e){e(t)})},hs={getConfig:()=>Dt().gantt,clear:Li,setDateFormat:Ni,getDateFormat:qi,enableInclusiveEndDates:Pi,endDatesAreInclusive:Vi,enableTopAxis:Ri,topAxisEnabled:zi,setAxisFormat:Ei,getAxisFormat:Ai,setTickInterval:Ii,getTickInterval:Wi,setTodayMarker:Oi,getTodayMarker:Hi,setAccTitle:Ln,getAccTitle:Fn,setDiagramTitle:Yn,getDiagramTitle:Un,setDisplayMode:Bi,getDisplayMode:Zi,setAccDescription:Sn,getAccDescription:_n,addSection:Ki,getSections:$i,getTasks:ts,addTask:as,findTaskById:wt,addTaskOrg:os,setIncludes:Xi,getIncludes:ji,setExcludes:Qi,getExcludes:Ji,setClickEvent:us,setLink:cs,getLinks:Gi,bindFunctions:fs,parseDuration:Tn,isInvalidDate:kn,setWeekday:es,getWeekday:ns};function Cn(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const s="^\\s*"+i+"\\s*$",a=new RegExp(s);t[0].match(a)&&(e[i]=!0,t.shift(1),r=!0)})}const ds=function(){Jt.debug("Something is calling, setConf, remove the call")},Ze={monday:Wt,tuesday:an,wednesday:on,thursday:Tt,friday:cn,saturday:ln,sunday:Ht},ms=(t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((s,a)=>s.startTime-a.startTime||s.order-a.order),i=0;for(const s of r)for(let a=0;a=n[a]){n[a]=s.endTime,s.order=a+e,a>i&&(i=a);break}return i};let ut;const gs=function(t,e,n,r){const i=Dt().gantt,s=Dt().securityLevel;let a;s==="sandbox"&&(a=zt("#i"+e));const x=s==="sandbox"?zt(a.nodes()[0].contentDocument.body):zt("body"),U=s==="sandbox"?a.nodes()[0].contentDocument:document,T=U.getElementById(e);ut=T.parentElement.offsetWidth,ut===void 0&&(ut=1200),i.useWidth!==void 0&&(ut=i.useWidth);const g=r.db.getTasks();let F=[];for(const p of g)F.push(p.type);F=W(F);const w={};let k=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const p={};for(const _ of g)p[_.section]===void 0?p[_.section]=[_]:p[_.section].push(_);let Y=0;for(const _ of Object.keys(p)){const b=ms(p[_],Y)+1;Y+=b,k+=b*(i.barHeight+i.barGap),w[_]=b}}else{k+=g.length*(i.barHeight+i.barGap);for(const p of F)w[p]=g.filter(Y=>Y.type===p).length}T.setAttribute("viewBox","0 0 "+ut+" "+k);const X=x.select(`[id="${e}"]`),I=xi().domain([Zn(g,function(p){return p.startTime}),Bn(g,function(p){return p.endTime})]).rangeRound([0,ut-i.leftPadding-i.rightPadding]);function D(p,Y){const _=p.startTime,b=Y.startTime;let o=0;return _>b?o=1:_h.order))].map(h=>p.find(C=>C.order===h));X.append("g").selectAll("rect").data(M).enter().append("rect").attr("x",0).attr("y",function(h,C){return C=h.order,C*Y+_-2}).attr("width",function(){return m-i.rightPadding/2}).attr("height",Y).attr("class",function(h){for(const[C,q]of F.entries())if(h.type===q)return"section section"+C%i.numberSectionStyles;return"section section0"});const c=X.append("g").selectAll("rect").data(p).enter(),j=r.db.getLinks();if(c.append("rect").attr("id",function(h){return h.id}).attr("rx",3).attr("ry",3).attr("x",function(h){return h.milestone?I(h.startTime)+b+.5*(I(h.endTime)-I(h.startTime))-.5*o:I(h.startTime)+b}).attr("y",function(h,C){return C=h.order,C*Y+_}).attr("width",function(h){return h.milestone?o:I(h.renderEndTime||h.endTime)-I(h.startTime)}).attr("height",o).attr("transform-origin",function(h,C){return C=h.order,(I(h.startTime)+b+.5*(I(h.endTime)-I(h.startTime))).toString()+"px "+(C*Y+_+.5*o).toString()+"px"}).attr("class",function(h){const C="task";let q="";h.classes.length>0&&(q=h.classes.join(" "));let O=0;for(const[N,R]of F.entries())h.type===R&&(O=N%i.numberSectionStyles);let V="";return h.active?h.crit?V+=" activeCrit":V=" active":h.done?h.crit?V=" doneCrit":V=" done":h.crit&&(V+=" crit"),V.length===0&&(V=" task"),h.milestone&&(V=" milestone "+V),V+=O,V+=" "+q,C+V}),c.append("text").attr("id",function(h){return h.id+"-text"}).text(function(h){return h.task}).attr("font-size",i.fontSize).attr("x",function(h){let C=I(h.startTime),q=I(h.renderEndTime||h.endTime);h.milestone&&(C+=.5*(I(h.endTime)-I(h.startTime))-.5*o),h.milestone&&(q=C+o);const O=this.getBBox().width;return O>q-C?q+O+1.5*i.leftPadding>m?C+b-5:q+b+5:(q-C)/2+C+b}).attr("y",function(h,C){return C=h.order,C*Y+i.barHeight/2+(i.fontSize/2-2)+_}).attr("text-height",o).attr("class",function(h){const C=I(h.startTime);let q=I(h.endTime);h.milestone&&(q=C+o);const O=this.getBBox().width;let V="";h.classes.length>0&&(V=h.classes.join(" "));let N=0;for(const[at,ot]of F.entries())h.type===ot&&(N=at%i.numberSectionStyles);let R="";return h.active&&(h.crit?R="activeCritText"+N:R="activeText"+N),h.done?h.crit?R=R+" doneCritText"+N:R=R+" doneText"+N:h.crit&&(R=R+" critText"+N),h.milestone&&(R+=" milestoneText"),O>q-C?q+O+1.5*i.leftPadding>m?V+" taskTextOutsideLeft taskTextOutside"+N+" "+R:V+" taskTextOutsideRight taskTextOutside"+N+" "+R+" width-"+O:V+" taskText taskText"+N+" "+R+" width-"+O}),Dt().securityLevel==="sandbox"){let h;h=zt("#i"+e);const C=h.nodes()[0].contentDocument;c.filter(function(q){return j[q.id]!==void 0}).each(function(q){var O=C.querySelector("#"+q.id),V=C.querySelector("#"+q.id+"-text");const N=O.parentNode;var R=C.createElement("a");R.setAttribute("xlink:href",j[q.id]),R.setAttribute("target","_top"),N.appendChild(R),R.appendChild(O),R.appendChild(V)})}}function E(p,Y,_,b,o,f,m,u){if(m.length===0&&u.length===0)return;let M,c;for(const{startTime:O,endTime:V}of f)(M===void 0||Oc)&&(c=V);if(!M||!c)return;if(nt(c).diff(nt(M),"year")>5){Jt.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 j=r.db.getDateFormat(),d=[];let h=null,C=nt(M);for(;C.valueOf()<=c;)r.db.isInvalidDate(C,j,m,u)?h?h.end=C:h={start:C,end:C}:h&&(d.push(h),h=null),C=C.add(1,"d");X.append("g").selectAll("rect").data(d).enter().append("rect").attr("id",function(O){return"exclude-"+O.start.format("YYYY-MM-DD")}).attr("x",function(O){return I(O.start)+_}).attr("y",i.gridLineStartPadding).attr("width",function(O){const V=O.end.add(1,"day");return I(V)-I(O.start)}).attr("height",o-Y-i.gridLineStartPadding).attr("transform-origin",function(O,V){return(I(O.start)+_+.5*(I(O.end)-I(O.start))).toString()+"px "+(V*p+.5*o).toString()+"px"}).attr("class","exclude-range")}function Z(p,Y,_,b){let o=$n(I).tickSize(-b+Y+i.gridLineStartPadding).tickFormat($t(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const m=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(m!==null){const u=m[1],M=m[2],c=r.db.getWeekday()||i.weekday;switch(M){case"millisecond":o.ticks(St.every(u));break;case"second":o.ticks(kt.every(u));break;case"minute":o.ticks(At.every(u));break;case"hour":o.ticks(It.every(u));break;case"day":o.ticks(pt.every(u));break;case"week":o.ticks(Ze[c].every(u));break;case"month":o.ticks(Ot.every(u));break}}if(X.append("g").attr("class","grid").attr("transform","translate("+p+", "+(b-50)+")").call(o).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=Kn(I).tickSize(-b+Y+i.gridLineStartPadding).tickFormat($t(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(m!==null){const M=m[1],c=m[2],j=r.db.getWeekday()||i.weekday;switch(c){case"millisecond":u.ticks(St.every(M));break;case"second":u.ticks(kt.every(M));break;case"minute":u.ticks(At.every(M));break;case"hour":u.ticks(It.every(M));break;case"day":u.ticks(pt.every(M));break;case"week":u.ticks(Ze[j].every(M));break;case"month":u.ticks(Ot.every(M));break}}X.append("g").attr("class","grid").attr("transform","translate("+p+", "+Y+")").call(u).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function J(p,Y){let _=0;const b=Object.keys(w).map(o=>[o,w[o]]);X.append("g").selectAll("text").data(b).enter().append(function(o){const f=o[0].split(An.lineBreakRegex),m=-(f.length-1)/2,u=U.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("dy",m+"em");for(const[M,c]of f.entries()){const j=U.createElementNS("http://www.w3.org/2000/svg","tspan");j.setAttribute("alignment-baseline","central"),j.setAttribute("x","10"),M>0&&j.setAttribute("dy","1em"),j.textContent=c,u.appendChild(j)}return u}).attr("x",10).attr("y",function(o,f){if(f>0)for(let m=0;m` .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); } `,ps=ks,Ws={parser:Fi,db:hs,renderer:ys,styles:ps};export{Ws as diagram};