import{l as U,A as C,e as X}from"./layers.BfHNcLbu-DoBpzOGI.js";import"./layers.B6AgvWr7-Bq9IA4iY.js";import"./index-DTC0Ed21.js";import"./TaskPanel-DL-lNNa-.js";import"./tasks-ClycqzjK.js";import"./IconUser-Bh9n--nN.js";import"./tasks-R9G1-k7v.js";import"./IconChevronLeft-DwnMQlxZ.js";import"./use-resize-observer-B2T5TxF-.js";import"./useTaskTypesData-DEDxUwkB.js";import"./PillsInput-BQBRVlfT.js";import"./SegmentedControl-CI2D3wRP.js";import"./get-base-value-JqT_q0U7.js";import"./ColorSwatch-DyLoUEeW.js";import"./TypographyStylesProvider-B4wTcLh8.js";import"./clamp-Bw9v46PI.js";import"./IconGripVertical-A4WphpSm.js";import"./Accordion-BmslGzqa.js";var A=(function(){var c=function(a,t,i,e){for(i=i||{},e=a.length;e--;i[a[e]]=t);return i},p=[6,9,10],_={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(a,t,i,e,s,n,o){switch(n.length-1,s){case 1:return e;case 4:break;case 6:e.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},c(p,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},c(p,[2,3]),c(p,[2,4]),c(p,[2,5]),c(p,[2,6])],defaultActions:{4:[2,1]},parseError:function(a,t){if(t.recoverable)this.trace(a);else{var i=new Error(a);throw i.hash=t,i}},parse:function(a){var t=this,i=[0],e=[],s=[null],n=[],o=this.table,$="",k=0,O=0,T=2,L=1,z=n.slice.call(arguments,1),r=Object.create(this.lexer),f={yy:{}};for(var I in this.yy)Object.prototype.hasOwnProperty.call(this.yy,I)&&(f.yy[I]=this.yy[I]);r.setInput(a,f.yy),f.yy.lexer=r,f.yy.parser=this,typeof r.yylloc>"u"&&(r.yylloc={});var w=r.yylloc;n.push(w);var F=r.options&&r.options.ranges;typeof f.yy.parseError=="function"?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(){var u;return u=e.pop()||r.lex()||L,typeof u!="number"&&(u instanceof Array&&(e=u,u=e.pop()),u=t.symbols_[u]||u),u}for(var h,m,l,E,g={},x,y,j,b;;){if(m=i[i.length-1],this.defaultActions[m]?l=this.defaultActions[m]:((h===null||typeof h>"u")&&(h=R()),l=o[m]&&o[m][h]),typeof l>"u"||!l.length||!l[0]){var S="";b=[];for(x in o[m])this.terminals_[x]&&x>T&&b.push("'"+this.terminals_[x]+"'");r.showPosition?S="Parse error on line "+(k+1)+`:
`+r.showPosition()+`
Expecting `+b.join(", ")+", got '"+(this.terminals_[h]||h)+"'":S="Parse error on line "+(k+1)+": Unexpected "+(h==L?"end of input":"'"+(this.terminals_[h]||h)+"'"),this.parseError(S,{text:r.match,token:this.terminals_[h]||h,line:r.yylineno,loc:w,expected:b})}if(l[0]instanceof Array&&l.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+h);switch(l[0]){case 1:i.push(h),s.push(r.yytext),n.push(r.yylloc),i.push(l[1]),h=null,O=r.yyleng,$=r.yytext,k=r.yylineno,w=r.yylloc;break;case 2:if(y=this.productions_[l[1]][1],g.$=s[s.length-y],g._$={first_line:n[n.length-(y||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(y||1)].first_column,last_column:n[n.length-1].last_column},F&&(g._$.range=[n[n.length-(y||1)].range[0],n[n.length-1].range[1]]),E=this.performAction.apply(g,[$,O,k,f.yy,l[1],s,n].concat(z)),typeof E<"u")return E;y&&(i=i.slice(0,-1*y*2),s=s.slice(0,-1*y),n=n.slice(0,-1*y)),i.push(this.productions_[l[1]][0]),s.push(g.$),n.push(g._$),j=o[i[i.length-2]][i[i.length-1]],i.push(j);break;case 3:return!0}}return!0}},d=(function(){var a={EOF:1,parseError:function(t,i){if(this.yy.parser)this.yy.parser.parseError(t,i);else throw new Error(t)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,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 t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var i=t.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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),e.length-1&&(this.yylineno-=e.length-1);var n=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),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(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+i+"^"},test_match:function(t,i){var e,s,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),s=t[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var o in n)this[o]=n[o];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,i,e,s;this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),o=0;o<n.length;o++)if(e=this._input.match(this.rules[n[o]]),e&&(!i||e[0].length>i[0].length)){if(i=e,s=o,this.options.backtrack_lexer){if(t=this.test_match(e,n[o]),t!==!1)return t;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(t=this.test_match(i,n[s]),t!==!1?t:!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 t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>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(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,i,e,s){switch(e){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return a})();_.lexer=d;function v(){this.yy={}}return v.prototype=_,_.Parser=v,new v})();A.parser=A;const q=A,N={info:!1};let P=N.info;const B=c=>{P=c},G=()=>P,H=()=>{P=N.info},M={clear:H,setInfo:B,getInfo:G},Q=(c,p,_)=>{U.debug(`rendering info diagram
`+c);const d=C(p);X(d,100,400,!0),d.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${_}`)},V={draw:Q},ut={parser:q,db:M,renderer:V};export{ut as diagram};
