diff --git a/dist/assets/arc-XpyNnWh5.js b/dist/assets/arc-XpyNnWh5.js new file mode 100644 index 0000000..5788737 --- /dev/null +++ b/dist/assets/arc-XpyNnWh5.js @@ -0,0 +1 @@ +import{a0 as ln,a1 as an,a2 as y,a3 as tn,a4 as H,a5 as q,a6 as _,a7 as un,a8 as rn,a9 as L,aa as o,ab as B,ac as sn,ad as on,ae as fn}from"./index-mLPbTfpz.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,C,a){var O=I-l,i=D-h,n=C-v,d=a-A,u=d*O-n*i;if(!(u*ur*r+G*G&&(j=w,z=p),{cx:j,cy:z,x01:-n,y01:-d,x11:j*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=yn,I=B(0),D=null,v=gn,A=dn,C=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=A.apply(this,arguments)-an,F=un(c-f),t=c>f;if(a||(a=n=O()),sy))a.moveTo(0,0);else if(F>tn-y)a.moveTo(s*H(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*H(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=F,S=F,j=C.apply(this,arguments)/2,z=j>y&&(D?+D.apply(this,arguments):L(u*u+s*s)),w=_(un(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(z>y){var G=sn(z/u*q(j)),M=sn(z/s*q(j));(P-=G*2)>y?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(S-=M*2)>y?(M*=t?1:-1,m+=M,g-=M):(S=0,m=g=(f+c)/2)}var J=s*H(m),K=s*q(m),N=u*H(T),Q=u*q(T);if(w>y){var U=s*H(g),V=s*q(g),X=u*H(R),Y=u*q(R),E;if(Fy?x>y?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(N,Q):p>y?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),ps?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),h=t.inverseTransformPoint(c);this.setLocation(h.x,h.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=i},function(A,b,N){var u=N(0);function l(){}for(var a in u)l[a]=u[a];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=l},function(A,b,N){function u(l,a){l==null&&a==null?(this.x=0,this.y=0):(this.x=l,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},A.exports=u},function(A,b,N){var u=N(2),l=N(10),a=N(0),e=N(7),r=N(3),f=N(1),i=N(13),d=N(12),t=N(11);function s(c,h,T){u.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,h!=null&&h instanceof e?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,h,T){if(h==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var v=c;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(h.owner==T.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=T.owner?null:(v.source=h,v.target=T,v.isInterGraph=!1,this.getEdges().push(v),h.edges.push(v),T!=h&&T.edges.push(v),v)}},s.prototype.remove=function(c){var h=c;if(c instanceof r){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=h.edges.slice(),g,v=T.length,L=0;L-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(C,1),g.target!=g.source&&g.target.edges.splice(P,1);var G=g.source.owner.getEdges().indexOf(g);if(G==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(G,1)}},s.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,h=l.MAX_VALUE,T,g,v,L=this.getNodes(),G=L.length,C=0;CT&&(c=T),h>g&&(h=g)}return c==l.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?v=L[0].getParent().paddingLeft:v=this.margin,this.left=h-v,this.top=c-v,new d(this.left,this.top))},s.prototype.updateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,g=l.MAX_VALUE,v=-l.MAX_VALUE,L,G,C,P,V,Y=this.nodes,J=Y.length,D=0;DL&&(h=L),TC&&(g=C),vL&&(h=L),TC&&(g=C),v=this.nodes.length){var J=0;T.forEach(function(D){D.owner==c&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},A.exports=s},function(A,b,N){var u,l=N(1);function a(e){u=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),f=this.add(e,r);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,r,f,i,d){if(f==null&&i==null&&d==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{d=f,i=r,f=e;var t=i.getOwner(),s=d.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,i,d);if(f.isInterGraph=!0,f.source=i,f.target=d,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof u){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(r.getEdges());for(var i,d=f.length,t=0;t=e.getRight()?r[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(r[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(r[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var d=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(d=1);var t=d*r[0],s=r[1]/d;r[0]t)return r[0]=f,r[1]=o,r[2]=d,r[3]=Y,!1;if(id)return r[0]=s,r[1]=i,r[2]=P,r[3]=t,!1;if(fd?(r[0]=h,r[1]=T,n=!0):(r[0]=c,r[1]=o,n=!0):p===y&&(f>d?(r[0]=s,r[1]=o,n=!0):(r[0]=g,r[1]=T,n=!0)),-E===y?d>f?(r[2]=V,r[3]=Y,m=!0):(r[2]=P,r[3]=C,m=!0):E===y&&(d>f?(r[2]=G,r[3]=C,m=!0):(r[2]=J,r[3]=Y,m=!0)),n&&m)return!1;if(f>d?i>t?(I=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):i>t?(I=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=o,S=f+-L/y,r[0]=S,r[1]=W;break;case 2:S=g,W=i+v*y,r[0]=S,r[1]=W;break;case 3:W=T,S=f+L/y,r[0]=S,r[1]=W;break;case 4:S=h,W=i+-v*y,r[0]=S,r[1]=W;break}if(!m)switch(w){case 1:q=C,x=d+-tt/y,r[2]=x,r[3]=q;break;case 2:x=J,q=t+D*y,r[2]=x,r[3]=q;break;case 3:q=Y,x=d+tt/y,r[2]=x,r[3]=q;break;case 4:x=V,q=t+-D*y,r[2]=x,r[3]=q;break}}return!1},l.getCardinalDirection=function(a,e,r){return a>e?r:1+r%4},l.getIntersection=function(a,e,r,f){if(f==null)return this.getIntersection2(a,e,r);var i=a.x,d=a.y,t=e.x,s=e.y,o=r.x,c=r.y,h=f.x,T=f.y,g=void 0,v=void 0,L=void 0,G=void 0,C=void 0,P=void 0,V=void 0,Y=void 0,J=void 0;return L=s-d,C=i-t,V=t*d-i*s,G=T-c,P=o-h,Y=h*c-o*T,J=L*P-G*C,J===0?null:(g=(C*Y-P*V)/J,v=(G*V-L*Y)/J,new u(g,v))},l.angleOfVector=function(a,e,r,f){var i=void 0;return a!==r?(i=Math.atan((f-e)/(r-a)),r=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),v=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:v}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,A.exports=l},function(A,b,N){function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},A.exports=u},function(A,b,N){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,A.exports=u},function(A,b,N){var u=function(){function i(d,t){for(var s=0;s"u"?"undefined":u(a);return a==null||e!="object"&&e!="function"},A.exports=l},function(A,b,N){function u(o){if(Array.isArray(o)){for(var c=0,h=Array(o.length);c0&&c;){for(L.push(C[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),v.add(P);for(var V=P.getEdges(),g=0;g-1&&C.splice(tt,1)}v=new Set,G=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],h=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(h),g=0;g=0&&c.splice(Y,1);var J=G.getNeighborsList();J.forEach(function(n){if(h.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&P.push(n),T.set(n,p)}})}h=h.concat(P),(c.length==1||c.length==2)&&(g=!0,v=c[0])}return v},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s},function(A,b,N){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},A.exports=u},function(A,b,N){var u=N(5);function l(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(a){this.lworldExtX=a},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(a){this.lworldExtY=a},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},l.prototype.transformX=function(a){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/r),e},l.prototype.transformY=function(a){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/r),e},l.prototype.inverseTransformX=function(a){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/r),e},l.prototype.inverseTransformY=function(a){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/r),e},l.prototype.inverseTransformPoint=function(a){var e=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},A.exports=l},function(A,b,N){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,h,T,g=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,o=0;oL||v>L)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||L>=g[0].length)){for(var G=0;Gi}}]),r}();A.exports=e},function(A,b,N){function u(){}u.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var a=Math.min(this.m,this.n);this.s=function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct}(Math.min(this.m+1,this.n)),this.U=function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct}(this.n),r=function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct}(this.m),f=!0,i=Math.min(this.m-1,this.n),d=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var y=E+1;y=0;z--){if(function(Tt,Ct){return Tt&&Ct}(z0;){var Q=void 0,It=void 0;for(Q=n-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(e[Q])<=ht+_*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){e[Q]=0;break}if(Q===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=Q&&Nt!==Q;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==Q+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+_*vt){this.s[Nt]=0;break}}Nt===Q?It=3:Nt===n-1?It=1:(It=2,Q=Nt)}switch(Q++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=Q;gt--){var mt=u.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==Q&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et=this.s[Q+1]);){var Lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=Lt,QMath.abs(a)?(e=a/l,e=Math.abs(l)*Math.sqrt(1+e*e)):a!=0?(e=l/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},A.exports=u},function(A,b,N){var u=function(){function e(r,f){for(var i=0;i2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,e),this.sequence1=r,this.sequence2=f,this.match_score=i,this.mismatch_penalty=d,this.gap_penalty=t,this.iMax=r.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;r--){var f=this.listeners[r];f.event===a&&f.callback===e&&this.listeners.splice(r,1)}},l.emit=function(a,e){for(var r=0;r{var b={45:(a,e,r)=>{var f={};f.layoutBase=r(551),f.CoSEConstants=r(806),f.CoSEEdge=r(767),f.CoSEGraph=r(880),f.CoSEGraphManager=r(578),f.CoSELayout=r(765),f.CoSENode=r(991),f.ConstraintHandler=r(902),a.exports=f},806:(a,e,r)=>{var f=r(551).FDLayoutConstants;function i(){}for(var d in f)i[d]=f[d];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,a.exports=i},767:(a,e,r)=>{var f=r(551).FDLayoutEdge;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var d in f)i[d]=f[d];a.exports=i},880:(a,e,r)=>{var f=r(551).LGraph;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var d in f)i[d]=f[d];a.exports=i},578:(a,e,r)=>{var f=r(551).LGraphManager;function i(t){f.call(this,t)}i.prototype=Object.create(f.prototype);for(var d in f)i[d]=f[d];a.exports=i},765:(a,e,r)=>{var f=r(551).FDLayout,i=r(578),d=r(880),t=r(991),s=r(767),o=r(806),c=r(902),h=r(551).FDLayoutConstants,T=r(551).LayoutConstants,g=r(551).Point,v=r(551).PointD,L=r(551).DimensionD,G=r(551).Layout,C=r(551).Integer,P=r(551).IGeometry,V=r(551).LGraph,Y=r(551).Transform,J=r(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var tt in f)D[tt]=f[tt];D.prototype.newGraphManager=function(){var n=new i(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new d(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new s(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;_--)H=Math.floor(Math.random()*(_+1)),B=O[_],O[_]=O[H],O[H]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:O.gap})}else{var _=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:_,gap:O.gap})}});else{var q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;q.has(H)?q.get(H).push(B):q.set(H,[B]),q.has(B)?q.get(B).push(H):q.set(B,[H])}else{var _=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;z.has(_)?z.get(_).push(ht):z.set(_,[ht]),z.has(ht)?z.get(ht).push(_):z.set(ht,[_])}});var X=function(H,B){var _=[],ht=[],Q=new J,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){_[Nt]=[],ht[Nt]=!1;var gt=it;for(Q.push(gt),It.add(gt),_[Nt].push(gt);Q.length!=0;){gt=Q.shift(),B.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(Q.push(At),It.add(At),_[Nt].push(At))})}Nt++}}),{components:_,isFixed:ht}},rt=X(q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var O=n.idToNodeMap.get($.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p1){var S;for(S=0;SE&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=V.calculateBounds(n),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var w=0;w1;){var B=H[0];H.splice(0,1);var _=z.indexOf(B);_>=0&&z.splice(_,1),$--,X--}m!=null?O=(z.indexOf(H[0])+1)%$:O=0;for(var ht=Math.abs(E-p)/X,Q=O;rt!=X;Q=++Q%$){var It=z[Q].getOtherEnd(n);if(It!=m){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},D.maxDiagonalInTree=function(n){for(var m=C.MIN_VALUE,p=0;pm&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y"u"&&(m[S]=[]),m[S]=m[S].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var q=m[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=q.paddingLeft||0,z.paddingRight=q.paddingRight||0,z.paddingBottom=q.paddingBottom||0,z.paddingTop=q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=q.getChild();rt.add(z);for(var $=0;$y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,S=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,w,S)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;Eq&&(q=X.rect.height)}p+=q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),w;return IS&&(S=$.getWidth())});var W=I/y,x=w/y,q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,z=(E-p+Math.sqrt(q))/(2*(W+E)),X;m?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+E)-E;return S>rt&&(rt=S),rt+=E*2,rt},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(n,p));var S=function(O){return O.rect.width*O.rect.height},W=function(O,H){return S(H)-S(O)};n.sort(function($,O){var H=W;return w.idealRowWidth?(H=I,H($.id,O.id)):H($,O)});for(var x=0,q=0,z=0;z0&&(w+=n.horizontalPadding),n.rowWidth[p]=w,n.width0&&(S+=n.verticalPadding);var W=0;S>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=S,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;Ep&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var w=n.rowWidth[I];if(w+n.horizontalPadding+m<=n.width)return!0;var S=0;n.rowHeight[I]0&&(S=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-w>=m+n.horizontalPadding?W=(n.height+S)/(w+m+n.horizontalPadding):W=(n.height+S)/n.width,S=p+n.verticalPadding;var x;return n.widthI&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,S=0;Sw&&(w=E[S].height);m>0&&(w+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=w,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][w-1].length+this.grid[rt][w].length-1;if(I0)for(var rt=w;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=C.MAX_VALUE,O,H,B=0;B{var f=r(551).FDLayoutNode,i=r(551).IMath;function d(s,o,c,h){f.call(this,s,o,c,h)}d.prototype=Object.create(f.prototype);for(var t in f)d[t]=f[t];d.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},d.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),h,T=0;T{function f(c){if(Array.isArray(c)){for(var h=0,T=Array(c.length);h0){var Lt=0;ot.forEach(function(st){k=="horizontal"?(et.set(st,g.has(st)?v[g.get(st)]:Z.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?L[g.get(st)]:Z.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){k=="horizontal"?ft+=g.has(st)?v[g.get(st)]:Z.get(st):ft+=g.has(st)?L[g.get(st)]:Z.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var ce=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;et.set(te,et.get(te)+ce)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},tt=function(U){var k=0,K=0,Z=0,at=0;if(U.forEach(function(j){j.left?v[g.get(j.left)]-v[g.get(j.right)]>=0?k++:K++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?Z++:at++}),k>K&&Z>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)h.fixedNodeConstraint.forEach(function(F,U){E[U]=[F.position.x,F.position.y],y[U]=[v[g.get(F.nodeId)],L[g.get(F.nodeId)]]}),I=!0;else if(h.alignmentConstraint)(function(){var F=0;if(h.alignmentConstraint.vertical){for(var U=h.alignmentConstraint.vertical,k=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),wt=void 0;ut.size>0?wt=v[g.get(ut.values().next().value)]:wt=J(j).x,U[et].forEach(function(pt){E[F]=[wt,L[g.get(pt)]],y[F]=[v[g.get(pt)],L[g.get(pt)]],F++})},K=0;K0?wt=v[g.get(ut.values().next().value)]:wt=J(j).y,Z[et].forEach(function(pt){E[F]=[v[g.get(pt)],wt],y[F]=[v[g.get(pt)],L[g.get(pt)]],F++})},ct=0;ctz&&(z=q[rt].length,X=rt);if(z0){var Et={x:0,y:0};h.fixedNodeConstraint.forEach(function(F,U){var k={x:v[g.get(F.nodeId)],y:L[g.get(F.nodeId)]},K=F.position,Z=Y(K,k);Et.x+=Z.x,Et.y+=Z.y}),Et.x/=h.fixedNodeConstraint.length,Et.y/=h.fixedNodeConstraint.length,v.forEach(function(F,U){v[U]+=Et.x}),L.forEach(function(F,U){L[U]+=Et.y}),h.fixedNodeConstraint.forEach(function(F){v[g.get(F.nodeId)]=F.position.x,L[g.get(F.nodeId)]=F.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var Dt=h.alignmentConstraint.vertical,Rt=function(U){var k=new Set;Dt[U].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return S.has(at)})),Z=void 0;K.size>0?Z=v[g.get(K.values().next().value)]:Z=J(k).x,k.forEach(function(at){S.has(at)||(v[g.get(at)]=Z)})},Ht=0;Ht0?Z=L[g.get(K.values().next().value)]:Z=J(k).y,k.forEach(function(at){S.has(at)||(L[g.get(at)]=Z)})},Ft=0;Ft{a.exports=A}},N={};function u(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return b[a](r,r.exports,u),r.exports}var l=u(45);return l})()})}(le)),le.exports}var pr=he.exports,De;function yr(){return De||(De=1,function(R,M){(function(b,N){R.exports=N(vr())})(pr,function(A){return(()=>{var b={658:a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var r=arguments.length,f=Array(r>1?r-1:0),i=1;i{var f=function(){function t(s,o){var c=[],h=!0,T=!1,g=void 0;try{for(var v=s[Symbol.iterator](),L;!(h=(L=v.next()).done)&&(c.push(L.value),!(o&&c.length===o));h=!0);}catch(G){T=!0,g=G}finally{try{!h&&v.return&&v.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=r(140).layoutBase.LinkedList,d={};d.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var w=0;w1){L=g[0],G=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),Y},d.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var v=!0,L=!1,G=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),P;!(v=(P=C.next()).done);v=!0){var V=P.value,Y=f(V,2),J=Y[0],D=Y[1],tt=o.cy.getElementById(J);if(tt){var n=tt.boundingBox(),m=s.xCoords[D]-n.w/2,p=s.xCoords[D]+n.w/2,E=s.yCoords[D]-n.h/2,y=s.yCoords[D]+n.h/2;mh&&(h=p),Eg&&(g=y)}}}catch(x){L=!0,G=x}finally{try{!v&&C.return&&C.return()}finally{if(L)throw G}}var I=t.x-(h+c)/2,w=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+w})}else{Object.keys(s).forEach(function(x){var q=s[x],z=q.getRect().x,X=q.getRect().x+q.getRect().width,rt=q.getRect().y,$=q.getRect().y+q.getRect().height;zh&&(h=X),rtg&&(g=$)});var S=t.x-(h+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var q=s[x];q.setCenter(q.getCenterX()+S,q.getCenterY()+W)})}}},d.calcBoundingBox=function(t,s,o,c){for(var h=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,L=void 0,G=void 0,C=void 0,P=void 0,V=t.descendants().not(":parent"),Y=V.length,J=0;JL&&(h=L),TC&&(g=C),v{var f=r(548),i=r(140).CoSELayout,d=r(140).CoSENode,t=r(140).layoutBase.PointD,s=r(140).layoutBase.DimensionD,o=r(140).layoutBase.LayoutConstants,c=r(140).layoutBase.FDLayoutConstants,h=r(140).CoSEConstants,T=function(v,L){var G=v.cy,C=v.eles,P=C.nodes(),V=C.edges(),Y=void 0,J=void 0,D=void 0,tt={};v.randomize&&(Y=L.nodeIndexes,J=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,q){return n(x)?x(q):x},p=f.calcParentsWithoutChildren(G,C),E=function W(x,q,z,X){for(var rt=q.length,$=0;$0){var Q=void 0;Q=z.getGraphManager().add(z.newGraph(),B),W(Q,H,z,X)}}},y=function(x,q,z){for(var X=0,rt=0,$=0;$0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(v.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=v.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};v.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=v.tilingCompareBy),v.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!v.randomize,h.ANIMATE=c.ANIMATE=o.ANIMATE=v.animate,h.TILE=v.tile,h.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!v.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=v.uniformNodeDimensions,v.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),v.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),v.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),v.step=="all"&&(v.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),v.fixedNodeConstraint||v.alignmentConstraint||v.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,S=w.newGraphManager();return E(S.addRoot(),f.getTopMostNodes(P),w,v),y(w,S,V),I(w,v),w.runLayout(),tt};a.exports={coseLayout:T}},212:(a,e,r)=>{var f=function(){function v(L,G){for(var C=0;C0)if(p){var I=t.getTopMostNodes(C.eles.nodes());if(D=t.connectComponents(P,C.eles,I),D.forEach(function(vt){var it=vt.boundingBox();tt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),C.randomize&&D.forEach(function(vt){C.eles=vt,Y.push(o(C))}),C.quality=="default"||C.quality=="proof"){var w=P.collection();if(C.tile){var S=new Map,W=[],x=[],q=0,z={nodeIndexes:S,xCoords:W,yCoords:x},X=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){w.merge(vt.nodes()[mt]),gt.isParent()||(z.nodeIndexes.set(vt.nodes()[mt].id(),q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),w.length>1){var rt=w.boundingBox();tt.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(w),Y.push(z);for(var $=X.length-1;$>=0;$--)D.splice(X[$],1),Y.splice(X[$],1),tt.splice(X[$],1)}}D.forEach(function(vt,it){C.eles=vt,J.push(h(C,Y[it])),t.relocateComponent(tt[it],J[it],C)})}else D.forEach(function(vt,it){t.relocateComponent(tt[it],Y[it],C)});var O=new Set;if(D.length>1){var H=[],B=V.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(C.quality=="draft"&&(gt=Y[it].nodeIndexes),vt.nodes().not(B).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Ot){if(C.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:Y[it].xCoords[At]-Ot.boundingbox().w/2,y:Y[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else J[it][Ot.id()]&&mt.nodes.push({x:J[it][Ot.id()].getLeft(),y:J[it][Ot.id()].getTop(),width:J[it][Ot.id()].getWidth(),height:J[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(C.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,Y[it].xCoords,Y[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(Y[it].xCoords[Ht]),Pt.push(Y[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else J[it][Et.id()]&&J[it][Dt.id()]&&mt.edges.push({startX:J[it][Et.id()].getCenterX(),startY:J[it][Et.id()].getCenterY(),endX:J[it][Dt.id()].getCenterX(),endY:J[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(it))}});var _=m.packComponents(H,C.randomize).shifts;if(C.quality=="draft")Y.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+_[it].dx}),mt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(J[vt]).forEach(function(it){var gt=J[vt][it];gt.setCenter(gt.getCenterX()+_[ht].dx,gt.getCenterY()+_[ht].dy)}),ht++})}}}else{var E=C.eles.boundingBox();if(tt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),C.randomize){var y=o(C);Y.push(y)}C.quality=="default"||C.quality=="proof"?(J.push(h(C,Y[0])),t.relocateComponent(tt[0],J[0],C)):t.relocateComponent(tt[0],Y[0],C)}var Q=function(it,gt){if(C.quality=="default"||C.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return J.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),C.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return Y.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(P,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});C.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(G,C,Q),It.length>0&&It.forEach(function(vt){vt.position(Q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v}();a.exports=g},657:(a,e,r)=>{var f=r(548),i=r(140).layoutBase.Matrix,d=r(140).layoutBase.SVD,t=function(o){var c=o.cy,h=o.eles,T=h.nodes(),g=h.nodes(":parent"),v=new Map,L=new Map,G=new Map,C=[],P=[],V=[],Y=[],J=[],D=[],tt=[],n=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,w=o.nodeSeparation,S=void 0,W=function(){for(var U=0,k=0,K=!1;k=at;){nt=Z[at++];for(var xt=C[nt],lt=0;ltut&&(ut=J[Lt],wt=Lt)}return wt},q=function(U){var k=void 0;if(U){k=Math.floor(Math.random()*m);for(var Z=0;Z=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(k.isParent()?C[U].push(G.get(k.id())):C[U].push(k.id()))})});var Nt=function(U){var k=L.get(U),K=void 0;v.get(U).forEach(function(Z){c.getElementById(Z).isParent()?K=G.get(Z):K=Z,C[k].push(K),C[L.get(K)].push(U)})},vt=!0,it=!1,gt=void 0;try{for(var mt=v.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(F){it=!0,gt=F}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=L.size;var Et=void 0;if(m>2){S=m{var f=r(212),i=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&i(cytoscape),a.exports=i},140:a=>{a.exports=A}},N={};function u(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return b[a](r,r.exports,u),r.exports}var l=u(579);return l})()})}(he)),he.exports}var Er=yr();const mr=ke(Er);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:dt(R=>`${R},${R/2} 0,${R} 0,0`,"L"),R:dt(R=>`0,${R/2} ${R},0 ${R},${R}`,"R"),T:dt(R=>`0,0 ${R},0 ${R/2},${R}`,"T"),B:dt(R=>`${R/2},0 ${R},${R} 0,${R}`,"B")},se={L:dt((R,M)=>R-M+2,"L"),R:dt((R,M)=>R-2,"R"),T:dt((R,M)=>R-M+2,"T"),B:dt((R,M)=>R-2,"B")},Tr=dt(function(R){return Wt(R)?R==="L"?"R":"L":R==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=dt(function(R){const M=R;return M==="L"||M==="R"||M==="T"||M==="B"},"isArchitectureDirection"),Wt=dt(function(R){const M=R;return M==="L"||M==="R"},"isArchitectureDirectionX"),qt=dt(function(R){const M=R;return M==="T"||M==="B"},"isArchitectureDirectionY"),Te=dt(function(R,M){const A=Wt(R)&&qt(M),b=qt(R)&&Wt(M);return A||b},"isArchitectureDirectionXY"),Nr=dt(function(R){const M=R[0],A=R[1],b=Wt(M)&&qt(A),N=qt(M)&&Wt(A);return b||N},"isArchitecturePairXY"),Lr=dt(function(R){return R!=="LL"&&R!=="RR"&&R!=="TT"&&R!=="BB"},"isValidArchitectureDirectionPair"),ye=dt(function(R,M){const A=`${R}${M}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=dt(function([R,M],A){const b=A[0],N=A[1];return Wt(b)?qt(N)?[R+(b==="L"?-1:1),M+(N==="T"?1:-1)]:[R+(b==="L"?-1:1),M]:Wt(N)?[R+(N==="L"?1:-1),M+(b==="T"?1:-1)]:[R,M+(b==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ar=dt(function(R){return R==="LT"||R==="TL"?[1,1]:R==="BL"||R==="LB"?[1,-1]:R==="BR"||R==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),wr=dt(function(R,M){return Te(R,M)?"bend":Wt(R)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=dt(function(R){return R.type==="service"},"isArchitectureService"),Or=dt(function(R){return R.type==="junction"},"isArchitectureJunction"),be=dt(R=>R.data(),"edgeData"),ie=dt(R=>R.data(),"nodeData"),Dr=ar.architecture,ae,Pe=(ae=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}setDiagramId(M){this.diagramId=M}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:M,icon:A,in:b,title:N,iconText:u}){if(this.registeredIds[M]!==void 0)throw new Error(`The service id [${M}] is already in use by another ${this.registeredIds[M]}`);if(b!==void 0){if(M===b)throw new Error(`The service [${M}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[b]==="node")throw new Error(`The service [${M}]'s parent is not a group`)}this.registeredIds[M]="node",this.nodes[M]={id:M,type:"service",icon:A,iconText:u,title:N,edges:[],in:b}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:M,in:A}){if(this.registeredIds[M]!==void 0)throw new Error(`The junction id [${M}] is already in use by another ${this.registeredIds[M]}`);if(A!==void 0){if(M===A)throw new Error(`The junction [${M}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The junction [${M}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[A]==="node")throw new Error(`The junction [${M}]'s parent is not a group`)}this.registeredIds[M]="node",this.nodes[M]={id:M,type:"junction",edges:[],in:A}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(M){return this.nodes[M]??null}addGroup({id:M,icon:A,in:b,title:N}){var u,l,a;if(((u=this.registeredIds)==null?void 0:u[M])!==void 0)throw new Error(`The group id [${M}] is already in use by another ${this.registeredIds[M]}`);if(b!==void 0){if(M===b)throw new Error(`The group [${M}] cannot be placed within itself`);if(((l=this.registeredIds)==null?void 0:l[b])===void 0)throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(((a=this.registeredIds)==null?void 0:a[b])==="node")throw new Error(`The group [${M}]'s parent is not a group`)}this.registeredIds[M]="group",this.groups[M]={id:M,icon:A,title:N,in:b}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:M,rhsId:A,lhsDir:b,rhsDir:N,lhsInto:u,rhsInto:l,lhsGroup:a,rhsGroup:e,title:r}){if(!Re(b))throw new Error(`Invalid direction given for left hand side of edge ${M}--${A}. Expected (L,R,T,B) got ${String(b)}`);if(!Re(N))throw new Error(`Invalid direction given for right hand side of edge ${M}--${A}. Expected (L,R,T,B) got ${String(N)}`);if(this.nodes[M]===void 0&&this.groups[M]===void 0)throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[A]===void 0&&this.groups[A]===void 0)throw new Error(`The right-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes[M].in,i=this.nodes[A].in;if(a&&f&&i&&f==i)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&f&&i&&f==i)throw new Error(`The right-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const d={lhsId:M,lhsDir:b,lhsInto:u,lhsGroup:a,rhsId:A,rhsDir:N,rhsInto:l,rhsGroup:e,title:r};this.edges.push(d),this.nodes[M]&&this.nodes[A]&&(this.nodes[M].edges.push(this.edges[this.edges.length-1]),this.nodes[A].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const M={},A=Object.entries(this.nodes).reduce((e,[r,f])=>(e[r]=f.edges.reduce((i,d)=>{var o,c;const t=(o=this.getNode(d.lhsId))==null?void 0:o.in,s=(c=this.getNode(d.rhsId))==null?void 0:c.in;if(t&&s&&t!==s){const h=wr(d.lhsDir,d.rhsDir);h!=="bend"&&(M[t]??(M[t]={}),M[t][s]=h,M[s]??(M[s]={}),M[s][t]=h)}if(d.lhsId===r){const h=ye(d.lhsDir,d.rhsDir);h&&(i[h]=d.rhsId)}else{const h=ye(d.rhsDir,d.lhsDir);h&&(i[h]=d.lhsId)}return i},{}),e),{}),b=Object.keys(A)[0],N={[b]:1},u=Object.keys(A).reduce((e,r)=>r===b?e:{...e,[r]:1},{}),l=dt(e=>{const r={[e]:[0,0]},f=[e];for(;f.length>0;){const i=f.shift();if(i){N[i]=1,delete u[i];const d=A[i],[t,s]=r[i];Object.entries(d).forEach(([o,c])=>{N[c]||(r[c]=Cr([t,s],o),f.push(c))})}}return r},"BFS"),a=[l(b)];for(;Object.keys(u).length>0;)a.push(l(Object.keys(u)[0]));this.dataStructures={adjList:A,spatialMaps:a,groupAlignments:M}}return this.dataStructures}setElementForId(M,A){this.elements[M]=A}getElementById(M){return this.elements[M]}getConfig(){return rr({...Dr,...ir().architecture})}getConfigField(M){return this.getConfig()[M]}},dt(ae,"ArchitectureDB"),ae),xr=dt((R,M)=>{fr(R,M),R.groups.map(A=>M.addGroup(A)),R.services.map(A=>M.addService({...A,type:"service"})),R.junctions.map(A=>M.addJunction({...A,type:"junction"})),R.edges.map(A=>M.addEdge(A))},"populateDb"),Ge={parser:{yy:void 0},parse:dt(async R=>{var b;const M=await cr("architecture",R);Se.debug(M);const A=(b=Ge.parser)==null?void 0:b.yy;if(!(A instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");xr(M,A)},"parse")},Ir=dt(R=>` + .edge { + stroke-width: ${R.archEdgeWidth}; + stroke: ${R.archEdgeColor}; + fill: none; + } + + .arrow { + fill: ${R.archEdgeArrowColor}; + } + + .node-bkg { + fill: none; + stroke: ${R.archGroupBorderColor}; + stroke-width: ${R.archGroupBorderWidth}; + stroke-dasharray: 8; + } + .node-icon-text { + display: flex; + align-items: center; + } + + .node-icon-text > div { + color: #fff; + margin: 1px; + height: fit-content; + text-align: center; + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + } +`,"getStyles"),Rr=Ir,re=dt(R=>`${R}`,"wrapIcon"),ne={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:re('')},server:{body:re('')},disk:{body:re('')},internet:{body:re('')},cloud:{body:re('')},unknown:lr,blank:{body:re("")}}},Sr=dt(async function(R,M,A,b){const N=A.getConfigField("padding"),u=A.getConfigField("iconSize"),l=u/2,a=u/6,e=a/2;await Promise.all(M.edges().map(async r=>{var Y,J;const{source:f,sourceDir:i,sourceArrow:d,sourceGroup:t,target:s,targetDir:o,targetArrow:c,targetGroup:h,label:T}=be(r);let{x:g,y:v}=r[0].sourceEndpoint();const{x:L,y:G}=r[0].midpoint();let{x:C,y:P}=r[0].targetEndpoint();const V=N+4;if(t&&(Wt(i)?g+=i==="L"?-V:V:v+=i==="T"?-V:V+18),h&&(Wt(o)?C+=o==="L"?-V:V:P+=o==="T"?-V:V+18),!t&&((Y=A.getNode(f))==null?void 0:Y.type)==="junction"&&(Wt(i)?g+=i==="L"?l:-l:v+=i==="T"?l:-l),!h&&((J=A.getNode(s))==null?void 0:J.type)==="junction"&&(Wt(o)?C+=o==="L"?l:-l:P+=o==="T"?l:-l),r[0]._private.rscratch){const D=R.insert("g");if(D.insert("path").attr("d",`M ${g},${v} L ${L},${G} L${C},${P} `).attr("class","edge").attr("id",`${b}-${sr(f,s,{prefix:"L"})}`),d){const tt=Wt(i)?se[i](g,a):g-e,n=qt(i)?se[i](v,a):v-e;D.insert("polygon").attr("points",Ie[i](a)).attr("transform",`translate(${tt},${n})`).attr("class","arrow")}if(c){const tt=Wt(o)?se[o](C,a):C-e,n=qt(o)?se[o](P,a):P-e;D.insert("polygon").attr("points",Ie[o](a)).attr("transform",`translate(${tt},${n})`).attr("class","arrow")}if(T){const tt=Te(i,o)?"XY":Wt(i)?"X":"Y";let n=0;tt==="X"?n=Math.abs(g-C):tt==="Y"?n=Math.abs(v-P)/1.5:n=Math.abs(g-C)/2;const m=D.append("g");if(await me(m,T,{useHtmlLabels:!1,width:n,classes:"architecture-service-label"},Ee()),m.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),tt==="X")m.attr("transform","translate("+L+", "+G+")");else if(tt==="Y")m.attr("transform","translate("+L+", "+G+") rotate(-90)");else if(tt==="XY"){const p=ye(i,o);if(p&&Nr(p)){const E=m.node().getBoundingClientRect(),[y,I]=Ar(p);m.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*I*45})`);const w=m.node().getBoundingClientRect();m.attr("transform",` + translate(${L}, ${G-E.height/2}) + translate(${y*w.width/2}, ${I*w.height/2}) + rotate(${-1*y*I*45}, 0, ${E.height/2}) + `)}}}}}))},"drawEdges"),Fr=dt(async function(R,M,A,b){const u=A.getConfigField("padding")*.75,l=A.getConfigField("fontSize"),e=A.getConfigField("iconSize")/2;await Promise.all(M.nodes().map(async r=>{const f=ie(r);if(f.type==="group"){const{h:i,w:d,x1:t,y1:s}=r.boundingBox(),o=R.append("rect");o.attr("id",`${b}-group-${f.id}`).attr("x",t+e).attr("y",s+e).attr("width",d).attr("height",i).attr("class","node-bkg");const c=R.append("g");let h=t,T=s;if(f.icon){const g=c.append("g");g.html(`${await pe(f.icon,{height:u,width:u,fallbackPrefix:ne.prefix})}`),g.attr("transform","translate("+(h+e+1)+", "+(T+e+1)+")"),h+=u,T+=l/2-1-2}if(f.label){const g=c.append("g");await me(g,f.label,{useHtmlLabels:!1,width:d,classes:"architecture-service-label"},Ee()),g.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),g.attr("transform","translate("+(h+e+4)+", "+(T+e+2)+")")}A.setElementForId(f.id,o)}}))},"drawGroups"),br=dt(async function(R,M,A,b){const N=Ee();for(const u of A){const l=M.append("g"),a=R.getConfigField("iconSize");if(u.title){const i=l.append("g");await me(i,u.title,{useHtmlLabels:!1,width:a*1.5,classes:"architecture-service-label"},N),i.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),i.attr("transform","translate("+a/2+", "+a+")")}const e=l.append("g");if(u.icon)e.html(`${await pe(u.icon,{height:a,width:a,fallbackPrefix:ne.prefix})}`);else if(u.iconText){e.html(`${await pe("blank",{height:a,width:a,fallbackPrefix:ne.prefix})}`);const t=e.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(nr(u.iconText,N)),s=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/s)};`)}else e.append("path").attr("class","node-bkg").attr("id",`${b}-node-${u.id}`).attr("d",`M0,${a} V5 Q0,0 5,0 H${a-5} Q${a},0 ${a},5 V${a} Z`);l.attr("id",`${b}-service-${u.id}`).attr("class","architecture-service");const{width:r,height:f}=l.node().getBBox();u.width=r,u.height=f,R.setElementForId(u.id,l)}return 0},"drawServices"),Pr=dt(function(R,M,A,b){A.forEach(N=>{const u=M.append("g"),l=R.getConfigField("iconSize");u.append("g").append("rect").attr("id",`${b}-node-${N.id}`).attr("fill-opacity","0").attr("width",l).attr("height",l),u.attr("class","architecture-junction");const{width:e,height:r}=u._groups[0][0].getBBox();u.width=e,u.height=r,R.setElementForId(N.id,u)})},"drawJunctions");hr([{name:ne.prefix,icons:ne}]);Fe.use(mr);function Ue(R,M,A){R.forEach(b=>{M.add({group:"nodes",data:{type:"service",id:b.id,icon:b.icon,label:b.title,parent:b.in,width:A.getConfigField("iconSize"),height:A.getConfigField("iconSize")},classes:"node-service"})})}dt(Ue,"addServices");function Ye(R,M,A){R.forEach(b=>{M.add({group:"nodes",data:{type:"junction",id:b.id,parent:b.in,width:A.getConfigField("iconSize"),height:A.getConfigField("iconSize")},classes:"node-junction"})})}dt(Ye,"addJunctions");function Xe(R,M){M.nodes().map(A=>{const b=ie(A);if(b.type==="group")return;b.x=A.position().x,b.y=A.position().y,R.getElementById(b.id).attr("transform","translate("+(b.x||0)+","+(b.y||0)+")")})}dt(Xe,"positionNodes");function He(R,M){R.forEach(A=>{M.add({group:"nodes",data:{type:"group",id:A.id,icon:A.icon,label:A.title,parent:A.in},classes:"node-group"})})}dt(He,"addGroups");function We(R,M){R.forEach(A=>{const{lhsId:b,rhsId:N,lhsInto:u,lhsGroup:l,rhsInto:a,lhsDir:e,rhsDir:r,rhsGroup:f,title:i}=A,d=Te(A.lhsDir,A.rhsDir)?"segments":"straight",t={id:`${b}-${N}`,label:i,source:b,sourceDir:e,sourceArrow:u,sourceGroup:l,sourceEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%",target:N,targetDir:r,targetArrow:a,targetGroup:f,targetEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%"};M.add({group:"edges",data:t,classes:d})})}dt(We,"addEdges");function Ve(R,M,A){const b=dt((a,e)=>Object.entries(a).reduce((r,[f,i])=>{var s;let d=0;const t=Object.entries(i);if(t.length===1)return r[f]=t[0][1],r;for(let o=0;o{const e={},r={};return Object.entries(a).forEach(([f,[i,d]])=>{var s,o,c;const t=((s=R.getNode(f))==null?void 0:s.in)??"default";e[d]??(e[d]={}),(o=e[d])[t]??(o[t]=[]),e[d][t].push(f),r[i]??(r[i]={}),(c=r[i])[t]??(c[t]=[]),r[i][t].push(f)}),{horiz:Object.values(b(e,"horizontal")).filter(f=>f.length>1),vert:Object.values(b(r,"vertical")).filter(f=>f.length>1)}}),[u,l]=N.reduce(([a,e],{horiz:r,vert:f})=>[[...a,...r],[...e,...f]],[[],[]]);return{horizontal:u,vertical:l}}dt(Ve,"getAlignments");function ze(R,M){const A=[],b=dt(u=>`${u[0]},${u[1]}`,"posToStr"),N=dt(u=>u.split(",").map(l=>parseInt(l)),"strToPos");return R.forEach(u=>{const l=Object.fromEntries(Object.entries(u).map(([f,i])=>[b(i),f])),a=[b([0,0])],e={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;a.length>0;){const f=a.shift();if(f){e[f]=1;const i=l[f];if(i){const d=N(f);Object.entries(r).forEach(([t,s])=>{const o=b([d[0]+s[0],d[1]+s[1]]),c=l[o];c&&!e[o]&&(a.push(o),A.push({[xe[t]]:c,[xe[Tr(t)]]:i,gap:1.5*M.getConfigField("iconSize")}))})}}}}),A}dt(ze,"getRelativeConstraints");function $e(R,M,A,b,N,{spatialMaps:u,groupAlignments:l}){return new Promise(a=>{const e=or("body").append("div").attr("id","cy").attr("style","display:none"),r=Fe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${N.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${N.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});e.remove(),He(A,r),Ue(R,r,N),Ye(M,r,N),We(b,r);const f=Ve(N,u,l),i=ze(u,N),d=N.getConfigField("iconSize"),t=N.getConfigField("idealEdgeLengthMultiplier")*d,s=.5*d,o=N.getConfigField("edgeElasticity"),c=r.layout({name:"fcose",quality:"proof",randomize:N.getConfigField("randomize"),nodeSeparation:N.getConfigField("nodeSeparation"),numIter:N.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(h){const[T,g]=h.connectedNodes(),{parent:v}=ie(T),{parent:L}=ie(g);return v===L?t:s},edgeElasticity(h){const[T,g]=h.connectedNodes(),{parent:v}=ie(T),{parent:L}=ie(g);return v===L?o:.001},alignmentConstraint:f,relativePlacementConstraint:i});c.one("layoutstop",()=>{var T;function h(g,v,L,G){let C,P;const{x:V,y:Y}=g,{x:J,y:D}=v;P=(G-Y+(V-L)*(Y-D)/(V-J))/Math.sqrt(1+Math.pow((Y-D)/(V-J),2)),C=Math.sqrt(Math.pow(G-Y,2)+Math.pow(L-V,2)-Math.pow(P,2));const tt=Math.sqrt(Math.pow(J-V,2)+Math.pow(D-Y,2));C=C/tt;let n=(J-V)*(G-Y)-(D-Y)*(L-V);switch(!0){case n>=0:n=1;break;case n<0:n=-1;break}let m=(J-V)*(L-V)+(D-Y)*(G-Y);switch(!0){case m>=0:m=1;break;case m<0:m=-1;break}return P=Math.abs(P)*n,C=C*m,{distances:P,weights:C}}dt(h,"getSegmentWeights"),r.startBatch();for(const g of Object.values(r.edges()))if((T=g.data)!=null&&T.call(g)){const{x:v,y:L}=g.source().position(),{x:G,y:C}=g.target().position();if(v!==G&&L!==C){const P=g.sourceEndpoint(),V=g.targetEndpoint(),{sourceDir:Y}=be(g),[J,D]=qt(Y)?[P.x,V.y]:[V.x,P.y],{weights:tt,distances:n}=h(P,V,J,D);g.style("segment-distances",n),g.style("segment-weights",tt)}}r.endBatch(),c.run()}),c.run(),r.ready(h=>{Se.info("Ready",h),a(r)})})}dt($e,"layoutArchitecture");var Gr=dt(async(R,M,A,b)=>{const N=b.db;N.setDiagramId(M);const u=N.getServices(),l=N.getJunctions(),a=N.getGroups(),e=N.getEdges(),r=N.getDataStructures(),f=Ze(M),i=f.append("g");i.attr("class","architecture-edges");const d=f.append("g");d.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await br(N,d,u,M),Pr(N,d,l,M);const s=await $e(u,l,a,e,N,r);await Sr(i,s,N,M),await Fr(t,s,N,M),Xe(N,s),qe(void 0,f,N.getConfigField("padding"),N.getConfigField("useMaxWidth"))},"draw"),Ur={draw:Gr},zr={parser:Ge,get db(){return new Pe},renderer:Ur,styles:Rr};export{zr as diagram}; diff --git a/dist/assets/blockDiagram-GPEHLZMM-DsfQw5wZ.js b/dist/assets/blockDiagram-GPEHLZMM-DsfQw5wZ.js new file mode 100644 index 0000000..dbed2f2 --- /dev/null +++ b/dist/assets/blockDiagram-GPEHLZMM-DsfQw5wZ.js @@ -0,0 +1,132 @@ +import{g as Te}from"./chunk-FMBD7UC4-Crb6W-Lm.js";import{an as De,ao as Gt,ap as Ne,aq as Zt,ar as jt,as as qt,at as Jt,au as wt,av as Qt,aw as $t,ax as te,ay as ee,az as re,aA as ae,aB as Ie,aC as Ce,aD as Be,aE as Oe,aF as Re,aG as Ae,aH as ze,aI as Me,aJ as Pe,aK as Fe,aL as We,_ as d,D as ct,d as O,e as Ye,l as v,z as He,B as Ke,aM as Ue,R as Xe,S as Ve,c as M,O as Ge,aN as H,aO as _t,aP as at,aQ as Ze,u as st,k as je,aR as qe,i as Rt,aS as At,aT as Je}from"./index-mLPbTfpz.js";import{G as Qe}from"./graph-BlwPajkw.js";import{c as $e}from"./channel-B5wXLQie.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";function tr(e){return Array.isArray(e)}function er(e){if(De(e))return e;const t=Gt(e);if(!rr(e))return{};if(tr(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(Ne(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t===Zt)return new ArrayBuffer(e.byteLength);if(t===jt){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t===qt||t===Jt||t===wt){const s=e.constructor,i=new s(e.valueOf());return t===wt?sr(i,e):xt(i,e),i}if(t===Qt)return new Date(Number(e));if(t===$t){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t===te)return Object(Symbol.prototype.valueOf.call(e));if(t===ee){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t===re){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t===ae){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return ir(a,e),xt(a,e),ar(a,e),a}function rr(e){switch(Gt(e)){case ae:case We:case Zt:case jt:case qt:case Qt:case Fe:case Pe:case Me:case ze:case Ae:case ee:case Jt:case Re:case $t:case re:case wt:case te:case Oe:case Be:case Ce:case Ie:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function ar(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function ir(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var mt=function(){var e=d(function(N,x,p,f){for(p=p||{},f=N.length;f--;p[N[f]]=x);return p},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],u=[8,30],g=[8,10,21,28,29,30,31,39,43,46],y=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],L={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(x,p,f,S,E,o,k){var h=o.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",o[h-1]),S.setHierarchy(o[h-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",o[h]),typeof o[h].length=="number"?this.$=o[h]:this.$=[o[h]];break;case 13:S.getLogger().debug("Rule: statement #2: ",o[h-1]),this.$=[o[h-1]].concat(o[h]);break;case 14:S.getLogger().debug("Rule: link: ",o[h],x),this.$={edgeTypeStr:o[h],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",o[h-3],o[h-1],o[h]),this.$={edgeTypeStr:o[h],label:o[h-1]};break;case 18:const T=parseInt(o[h]),D=S.generateId();this.$={id:D,type:"space",label:"",width:T,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",o[h-2],o[h-1],o[h]," typestr: ",o[h-1].edgeTypeStr);const U=S.edgeStrToEdgeData(o[h-1].edgeTypeStr),F=S.edgeStrToEdgeStartData(o[h-1].edgeTypeStr),J=S.edgeStrToThickness(o[h-1].edgeTypeStr),B=S.edgeStrToPattern(o[h-1].edgeTypeStr);this.$=[{id:o[h-2].id,label:o[h-2].label,type:o[h-2].type,directions:o[h-2].directions},{id:o[h-2].id+"-"+o[h].id,start:o[h-2].id,end:o[h].id,label:o[h-1].label,type:"edge",thickness:J,pattern:B,directions:o[h].directions,arrowTypeEnd:U,arrowTypeStart:F},{id:o[h].id,label:o[h].label,type:S.typeStr2Type(o[h].typeStr),directions:o[h].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[h-1],o[h]),this.$={id:o[h-1].id,label:o[h-1].label,type:S.typeStr2Type(o[h-1].typeStr),directions:o[h-1].directions,widthInColumns:parseInt(o[h],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",o[h]),this.$={id:o[h].id,label:o[h].label,type:S.typeStr2Type(o[h].typeStr),directions:o[h].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",o[h]),this.$={type:"column-setting",columns:o[h]==="auto"?-1:parseInt(o[h])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",o[h-2],o[h-1]),S.generateId(),this.$={...o[h-2],type:"composite",children:o[h-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",o[h-2],o[h-1],o[h]);const Y=S.generateId();this.$={id:Y,type:"composite",label:"",children:o[h-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",o[h]),this.$={id:o[h]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[h-1],o[h]),this.$={id:o[h-1],label:o[h].label,typeStr:o[h].typeStr,directions:o[h].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",o[h]),this.$=[o[h]];break;case 32:S.getLogger().debug("Rule: dirList: ",o[h-1],o[h]),this.$=[o[h-1]].concat(o[h]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",o[h-2],o[h-1],o[h]),this.$={typeStr:o[h-2]+o[h],label:o[h-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[h-3],o[h-2]," #3:",o[h-1],o[h]),this.$={typeStr:o[h-3]+o[h],label:o[h-2],directions:o[h-1]};break;case 35:case 36:this.$={type:"classDef",id:o[h-1].trim(),css:o[h].trim()};break;case 37:this.$={type:"applyClass",id:o[h-1].trim(),styleClass:o[h].trim()};break;case 38:this.$={type:"applyStyles",id:o[h-1].trim(),stylesStr:o[h].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(g,[2,16],{14:22,15:y,16:w}),e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(b,[2,25],{27:[1,25]}),e(g,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:y,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(g,[2,28]),e(g,[2,35]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),{36:[1,47]},{33:48,34:_},{15:[1,50]},e(g,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(x,p){if(p.recoverable)this.trace(x);else{var f=new Error(x);throw f.hash=p,f}},"parseError"),parse:d(function(x){var p=this,f=[0],S=[],E=[null],o=[],k=this.table,h="",T=0,D=0,U=2,F=1,J=o.slice.call(arguments,1),B=Object.create(this.lexer),Y={yy:{}};for(var et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,et)&&(Y.yy[et]=this.yy[et]);B.setInput(x,Y.yy),Y.yy.lexer=B,Y.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var rt=B.yylloc;o.push(rt);var _e=B.options&&B.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(X){f.length=f.length-2*X,E.length=E.length-X,o.length=o.length-X}d(ke,"popStack");function Bt(){var X;return X=S.pop()||B.lex()||F,typeof X!="number"&&(X instanceof Array&&(S=X,X=S.pop()),X=p.symbols_[X]||X),X}d(Bt,"lex");for(var K,$,G,ft,tt={},lt,Q,Ot,ot;;){if($=f[f.length-1],this.defaultActions[$]?G=this.defaultActions[$]:((K===null||typeof K>"u")&&(K=Bt()),G=k[$]&&k[$][K]),typeof G>"u"||!G.length||!G[0]){var yt="";ot=[];for(lt in k[$])this.terminals_[lt]&<>U&&ot.push("'"+this.terminals_[lt]+"'");B.showPosition?yt="Parse error on line "+(T+1)+`: +`+B.showPosition()+` +Expecting `+ot.join(", ")+", got '"+(this.terminals_[K]||K)+"'":yt="Parse error on line "+(T+1)+": Unexpected "+(K==F?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:B.match,token:this.terminals_[K]||K,line:B.yylineno,loc:rt,expected:ot})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+K);switch(G[0]){case 1:f.push(K),E.push(B.yytext),o.push(B.yylloc),f.push(G[1]),K=null,D=B.yyleng,h=B.yytext,T=B.yylineno,rt=B.yylloc;break;case 2:if(Q=this.productions_[G[1]][1],tt.$=E[E.length-Q],tt._$={first_line:o[o.length-(Q||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Q||1)].first_column,last_column:o[o.length-1].last_column},_e&&(tt._$.range=[o[o.length-(Q||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(tt,[h,D,T,Y.yy,G[1],E,o].concat(J)),typeof ft<"u")return ft;Q&&(f=f.slice(0,-1*Q*2),E=E.slice(0,-1*Q),o=o.slice(0,-1*Q)),f.push(this.productions_[G[1]][0]),E.push(tt.$),o.push(tt._$),Ot=k[f[f.length-2]][f[f.length-1]],f.push(Ot);break;case 3:return!0}}return!0},"parse")},C=function(){var N={EOF:1,parseError:d(function(p,f){if(this.yy.parser)this.yy.parser.parseError(p,f);else throw new Error(p)},"parseError"),setInput:d(function(x,p){return this.yy=p||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var p=x.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:d(function(x){var p=x.length,f=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;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),f.length-1&&(this.yylineno-=f.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===S.length?this.yylloc.first_column:0)+S[S.length-f.length].length-f[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(x){this.unput(this.match.slice(x))},"less"),pastInput:d(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var x=this.pastInput(),p=new Array(x.length+1).join("-");return x+this.upcomingInput()+` +`+p+"^"},"showPosition"),test_match:d(function(x,p){var f,S,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),S=x[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+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,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(x[0].length),this.matched+=x[0],f=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var o in E)this[o]=E[o];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,p,f,S;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),o=0;op[0].length)){if(p=f,S=o,this.options.backtrack_lexer){if(x=this.test_match(f,E[o]),x!==!1)return x;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(x=this.test_match(p,E[S]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var p=this.next();return p||this.lex()},"lex"),begin:d(function(p){this.conditionStack.push(p)},"begin"),popState:d(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:d(function(p){this.begin(p)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(p,f,S,E){switch(S){case 0:return p.getLogger().debug("Found block-beta"),10;case 1:return p.getLogger().debug("Found id-block"),29;case 2:return p.getLogger().debug("Found block"),10;case 3:p.getLogger().debug(".",f.yytext);break;case 4:p.getLogger().debug("_",f.yytext);break;case 5:return 5;case 6:return f.yytext=-1,28;case 7:return f.yytext=f.yytext.replace(/columns\s+/,""),p.getLogger().debug("COLUMNS (LEX)",f.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:p.getLogger().debug("LEX: POPPING STR:",f.yytext),this.popState();break;case 13:return p.getLogger().debug("LEX: STR end:",f.yytext),"STR";case 14:return f.yytext=f.yytext.replace(/space\:/,""),p.getLogger().debug("SPACE NUM (LEX)",f.yytext),21;case 15:return f.yytext="1",p.getLogger().debug("COLUMNS (LEX)",f.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),p.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),p.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),p.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),p.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),p.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),p.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),p.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),p.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),p.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),p.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),p.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),p.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return p.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return p.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return p.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return p.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return p.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return p.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return p.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),p.getLogger().debug("LEX ARR START"),37;case 74:return p.getLogger().debug("Lex: NODE_ID",f.yytext),31;case 75:return p.getLogger().debug("Lex: EOF",f.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:p.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:p.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return p.getLogger().debug("LEX: NODE_DESCR:",f.yytext),"NODE_DESCR";case 83:p.getLogger().debug("LEX POPPING"),this.popState();break;case 84:p.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return f.yytext=f.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (right): dir:",f.yytext),"DIR";case 86:return f.yytext=f.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (left):",f.yytext),"DIR";case 87:return f.yytext=f.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (x):",f.yytext),"DIR";case 88:return f.yytext=f.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (y):",f.yytext),"DIR";case 89:return f.yytext=f.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (up):",f.yytext),"DIR";case 90:return f.yytext=f.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (down):",f.yytext),"DIR";case 91:return f.yytext="]>",p.getLogger().debug("Lex (ARROW_DIR end):",f.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return p.getLogger().debug("Lex: LINK","#"+f.yytext+"#"),15;case 93:return p.getLogger().debug("Lex: LINK",f.yytext),15;case 94:return p.getLogger().debug("Lex: LINK",f.yytext),15;case 95:return p.getLogger().debug("Lex: LINK",f.yytext),15;case 96:return p.getLogger().debug("Lex: START_LINK",f.yytext),this.pushState("LLABEL"),16;case 97:return p.getLogger().debug("Lex: START_LINK",f.yytext),this.pushState("LLABEL"),16;case 98:return p.getLogger().debug("Lex: START_LINK",f.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return p.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),p.getLogger().debug("Lex: LINK","#"+f.yytext+"#"),15;case 102:return this.popState(),p.getLogger().debug("Lex: LINK",f.yytext),15;case 103:return this.popState(),p.getLogger().debug("Lex: LINK",f.yytext),15;case 104:return p.getLogger().debug("Lex: COLON",f.yytext),f.yytext=f.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return N}();L.lexer=C;function I(){this.yy={}}return d(I,"Parser"),I.prototype=L,L.Parser=I,new I}();mt.parser=mt;var nr=mt,j=new Map,kt=[],St=new Map,zt="color",Mt="fill",cr="bgFill",se=",",lr=M(),gt=new Map,Tt="",or=d(e=>je.sanitizeText(e,lr),"sanitizeText"),hr=d(function(e,t=""){let a=gt.get(e);a||(a={id:e,styles:[],textStyles:[]},gt.set(e,a)),t!=null&&t.split(se).forEach(s=>{const i=s.replace(/([^;]*);/,"$1").trim();if(RegExp(zt).exec(s)){const r=i.replace(Mt,cr).replace(zt,Mt);a.textStyles.push(r)}a.styles.push(i)})},"addStyleClass"),gr=d(function(e,t=""){const a=j.get(e);t!=null&&(a.styles=t.split(se))},"addStyle2Node"),dr=d(function(e,t){e.split(",").forEach(function(a){let s=j.get(a);if(s===void 0){const i=a.trim();s={id:i,type:"na",children:[]},j.set(i,s)}s.classes||(s.classes=[]),s.classes.push(t)})},"setCssClass"),ie=d((e,t)=>{const a=e.flat(),s=[],i=a.find(r=>(r==null?void 0:r.type)==="column-setting"),c=(i==null?void 0:i.columns)??-1;for(const r of a){if(typeof c=="number"&&c>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>c&&v.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${c}`),r.label&&(r.label=or(r.label)),r.type==="classDef"){hr(r.id,r.css);continue}if(r.type==="applyClass"){dr(r.id,(r==null?void 0:r.styleClass)??"");continue}if(r.type==="applyStyles"){r!=null&&r.stylesStr&&gr(r.id,r==null?void 0:r.stylesStr);continue}if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){const n=(St.get(r.id)??0)+1;St.set(r.id,n),r.id=n+"-"+r.id,kt.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);const n=j.get(r.id);if(n===void 0?j.set(r.id,r):(r.type!=="na"&&(n.type=r.type),r.label!==r.id&&(n.label=r.label)),r.children&&ie(r.children,r),r.type==="space"){const l=r.width??1;for(let u=0;u{v.debug("Clear called"),He(),nt={id:"root",type:"composite",children:[],columns:-1},j=new Map([["root",nt]]),Dt=[],gt=new Map,kt=[],St=new Map,Tt=""},"clear");function ne(e){switch(v.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return v.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}d(ne,"typeStr2Type");function ce(e){switch(v.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}d(ce,"edgeTypeStr2Type");function le(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}d(le,"edgeStrToEdgeData");function oe(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}d(oe,"edgeStrToEdgeStartData");function he(e){return e.includes("==")?"thick":"normal"}d(he,"edgeStrToThickness");function ge(e){return e.includes(".-")?"dotted":"solid"}d(ge,"edgeStrToPattern");var Pt=0,pr=d(()=>(Pt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Pt),"generateId"),fr=d(e=>{nt.children=e,ie(e,nt),Dt=nt.children},"setHierarchy"),yr=d(e=>{const t=j.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),xr=d(()=>[...j.values()],"getBlocksFlat"),br=d(()=>Dt||[],"getBlocks"),wr=d(()=>kt,"getEdges"),mr=d(e=>j.get(e),"getBlock"),Sr=d(e=>{j.set(e.id,e)},"setBlock"),Lr=d(e=>{Tt=e},"setDiagramId"),vr=d(()=>Tt,"getDiagramId"),Er=d(()=>v,"getLogger"),_r=d(function(){return gt},"getClasses"),kr={getConfig:d(()=>ct().block,"getConfig"),typeStr2Type:ne,edgeTypeStr2Type:ce,edgeStrToEdgeData:le,edgeStrToEdgeStartData:oe,edgeStrToThickness:he,edgeStrToPattern:ge,getLogger:Er,getBlocksFlat:xr,getBlocks:br,getEdges:wr,setHierarchy:fr,getBlock:mr,setBlock:Sr,getColumns:yr,getClasses:_r,clear:ur,generateId:pr,setDiagramId:Lr,getDiagramId:vr},Tr=kr,bt=d((e,t)=>{const a=$e,s=a(e,"r"),i=a(e,"g"),c=a(e,"b");return Ke(s,i,c,t)},"fade"),Dr=d(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + + + .label text,span,p { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + /* + * This is for backward compatibility with existing code that didn't + * add a \`

\` around edge labels. + * + * TODO: We should probably remove this in a future release. + */ + p { + margin: 0; + padding: 0; + display: inline; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${e.edgeLabelBackground}; + } + + .node .cluster { + // fill: ${bt(e.mainBkg,.5)}; + fill: ${bt(e.clusterBkg,.5)}; + stroke: ${bt(e.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + ${Te()} +`,"getStyles"),Nr=Dr,Ir=d((e,t,a,s)=>{t.forEach(i=>{Wr[i](e,a,s)})},"insertMarkers"),Cr=d((e,t,a)=>{v.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Br=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Or=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Rr=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Ar=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),zr=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Mr=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Pr=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Fr=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Wr={extension:Cr,composition:Br,aggregation:Or,dependency:Rr,lollipop:Ar,point:zr,circle:Mr,cross:Pr,barb:Fr},Yr=Ir,Xt,Vt,z=((Vt=(Xt=M())==null?void 0:Xt.block)==null?void 0:Vt.padding)??8;function Lt(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const a=t%e,s=Math.floor(t/e);return{px:a,py:s}}d(Lt,"calculateBlockPosition");var Hr=d(e=>{let t=0,a=0;for(const s of e.children){const{width:i,height:c,x:r,y:n}=s.size??{width:0,height:0,x:0,y:0};if(v.debug("getMaxChildSize abc95 child:",s.id,"width:",i,"height:",c,"x:",r,"y:",n,s.type),s.type==="space")continue;const l=i/(s.widthInColumns??1);l>t&&(t=l),c>a&&(a=c)}return{width:t,height:a}},"getMaxChildSize");function dt(e,t,a=0,s=0){var r,n,l,u,g,y,w,b,m,_,L;v.debug("setBlockSizes abc95 (start)",e.id,(r=e==null?void 0:e.size)==null?void 0:r.x,"block width =",e==null?void 0:e.size,"siblingWidth",a),(n=e==null?void 0:e.size)!=null&&n.width||(e.size={width:a,height:s,x:0,y:0});let i=0,c=0;if(((l=e.children)==null?void 0:l.length)>0){for(const E of e.children)dt(E,t);const C=Hr(e);i=C.width,c=C.height,v.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,c);for(const E of e.children)E.size&&(v.debug(`abc95 Setting size of children of ${e.id} id=${E.id} ${i} ${c} ${JSON.stringify(E.size)}`),E.size.width=i*(E.widthInColumns??1)+z*((E.widthInColumns??1)-1),E.size.height=c,E.size.x=0,E.size.y=0,v.debug(`abc95 updating size of ${e.id} children child:${E.id} maxWidth:${i} maxHeight:${c}`));for(const E of e.children)dt(E,t,i,c);const I=e.columns??-1;let N=0;for(const E of e.children)N+=E.widthInColumns??1;let x=e.children.length;I>0&&I0?Math.min(e.children.length,I):e.children.length;if(E>0){const o=(f-E*z-z)/E;v.debug("abc95 (growing to fit) width",e.id,f,(w=e.size)==null?void 0:w.width,o);for(const k of e.children)k.size&&(k.size.width=o)}}e.size={width:f,height:S,x:0,y:0}}v.debug("setBlockSizes abc94 (done)",e.id,(b=e==null?void 0:e.size)==null?void 0:b.x,(m=e==null?void 0:e.size)==null?void 0:m.width,(_=e==null?void 0:e.size)==null?void 0:_.y,(L=e==null?void 0:e.size)==null?void 0:L.height)}d(dt,"setBlockSizes");function Nt(e,t){var s,i,c,r,n,l,u,g,y,w,b,m,_,L,C,I,N;v.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(s=e==null?void 0:e.size)==null?void 0:s.x} y: ${(i=e==null?void 0:e.size)==null?void 0:i.y} width: ${(c=e==null?void 0:e.size)==null?void 0:c.width}`);const a=e.columns??-1;if(v.debug("layoutBlocks columns abc95",e.id,"=>",a,e),e.children&&e.children.length>0){const x=((n=(r=e==null?void 0:e.children[0])==null?void 0:r.size)==null?void 0:n.width)??0,p=e.children.length*x+(e.children.length-1)*z;v.debug("widthOfChildren 88",p,"posX");const f=new Map;{let h=0;for(const T of e.children){if(!T.size)continue;const{py:D}=Lt(a,h),U=f.get(D)??0;T.size.height>U&&f.set(D,T.size.height);let F=(T==null?void 0:T.widthInColumns)??1;a>0&&(F=Math.min(F,a-h%a)),h+=F}}const S=new Map;{let h=0;const T=[...f.keys()].sort((D,U)=>D-U);for(const D of T)S.set(D,h),h+=(f.get(D)??0)+z}let E=0;v.debug("abc91 block?.size?.x",e.id,(l=e==null?void 0:e.size)==null?void 0:l.x);let o=(u=e==null?void 0:e.size)!=null&&u.x?((g=e==null?void 0:e.size)==null?void 0:g.x)+(-((y=e==null?void 0:e.size)==null?void 0:y.width)/2||0):-z,k=0;for(const h of e.children){const T=e;if(!h.size)continue;const{width:D,height:U}=h.size,{px:F,py:J}=Lt(a,E);if(J!=k&&(k=J,o=(w=e==null?void 0:e.size)!=null&&w.x?((b=e==null?void 0:e.size)==null?void 0:b.x)+(-((m=e==null?void 0:e.size)==null?void 0:m.width)/2||0):-z,v.debug("New row in layout for block",e.id," and child ",h.id,k)),v.debug(`abc89 layout blocks (child) id: ${h.id} Pos: ${E} (px, py) ${F},${J} (${(_=T==null?void 0:T.size)==null?void 0:_.x},${(L=T==null?void 0:T.size)==null?void 0:L.y}) parent: ${T.id} width: ${D}${z}`),T.size){const Y=D/2;h.size.x=o+z+Y,v.debug(`abc91 layout blocks (calc) px, pyid:${h.id} startingPos=X${o} new startingPosX${h.size.x} ${Y} padding=${z} width=${D} halfWidth=${Y} => x:${h.size.x} y:${h.size.y} ${h.widthInColumns} (width * (child?.w || 1)) / 2 ${D*((h==null?void 0:h.widthInColumns)??1)/2}`),o=h.size.x+Y;const et=S.get(J)??0,rt=f.get(J)??U;h.size.y=T.size.y-T.size.height/2+et+rt/2+z,v.debug(`abc88 layout blocks (calc) px, pyid:${h.id}startingPosX${o}${z}${Y}=>x:${h.size.x}y:${h.size.y}${h.widthInColumns}(width * (child?.w || 1)) / 2${D*((h==null?void 0:h.widthInColumns)??1)/2}`)}h.children&&Nt(h);let B=(h==null?void 0:h.widthInColumns)??1;a>0&&(B=Math.min(B,a-E%a)),E+=B,v.debug("abc88 columnsPos",h,E)}}v.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(C=e==null?void 0:e.size)==null?void 0:C.x} y: ${(I=e==null?void 0:e.size)==null?void 0:I.y} width: ${(N=e==null?void 0:e.size)==null?void 0:N.width}`)}d(Nt,"layoutBlocks");function It(e,{minX:t,minY:a,maxX:s,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:c,y:r,width:n,height:l}=e.size;c-n/2s&&(s=c+n/2),r+l/2>i&&(i=r+l/2)}if(e.children)for(const c of e.children)({minX:t,minY:a,maxX:s,maxY:i}=It(c,{minX:t,minY:a,maxX:s,maxY:i}));return{minX:t,minY:a,maxX:s,maxY:i}}d(It,"findBounds");function de(e){const t=e.getBlock("root");if(!t)return;dt(t,e,0,0),Nt(t),v.debug("getBlocks",JSON.stringify(t,null,2));const{minX:a,minY:s,maxX:i,maxY:c}=It(t),r=c-s,n=i-a;return{x:a,y:s,width:n,height:r}}d(de,"layout");var Kr=d(async(e,t,a,s=!1,i=!1)=>{let c=t||"";typeof c=="object"&&(c=c[0]);const r=M(),n=H(r);return await _t(e,c,{style:a,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},r)},"createLabel"),Z=Kr,Ur=d((e,t,a,s,i)=>{t.arrowTypeStart&&Ft(e,"start",t.arrowTypeStart,a,s,i),t.arrowTypeEnd&&Ft(e,"end",t.arrowTypeEnd,a,s,i)},"addEdgeMarkers"),Xr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ft=d((e,t,a,s,i,c)=>{const r=Xr[a];if(!r){v.warn(`Unknown arrow type: ${a}`);return}const n=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${s}#${i}_${c}-${r}${n})`)},"addEdgeMarker"),vt={},W={},Vr=d(async(e,t)=>{const a=M(),s=H(a),i=e.insert("g").attr("class","edgeLabel"),c=i.insert("g").attr("class","label"),r=t.labelType==="markdown",n=await _t(e,t.label,{style:t.labelStyle,useHtmlLabels:s,addSvgBackground:r,isNode:!1,markdown:r,width:r?void 0:Number.POSITIVE_INFINITY},a);c.node().appendChild(n);let l=n.getBBox(),u=l;if(s){const y=n.children[0],w=O(n);l=y.getBoundingClientRect(),u=l,w.attr("width",l.width),w.attr("height",l.height)}else{const y=O(n).select("text").node();y&&typeof y.getBBox=="function"&&(u=y.getBBox())}c.attr("transform",at(u,s)),vt[t.id]=i,t.width=l.width,t.height=l.height;let g;if(t.startLabelLeft){const y=e.insert("g").attr("class","edgeTerminals"),w=y.insert("g").attr("class","inner"),b=await Z(w,t.startLabelLeft,t.labelStyle);g=b;let m=b.getBBox();if(s){const _=b.children[0],L=O(b);m=_.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}w.attr("transform",at(m,s)),W[t.id]||(W[t.id]={}),W[t.id].startLeft=y,it(g,t.startLabelLeft)}if(t.startLabelRight){const y=e.insert("g").attr("class","edgeTerminals"),w=y.insert("g").attr("class","inner"),b=await Z(w,t.startLabelRight,t.labelStyle);g=b;let m=b.getBBox();if(s){const _=b.children[0],L=O(b);m=_.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}w.attr("transform",at(m,s)),W[t.id]||(W[t.id]={}),W[t.id].startRight=y,it(g,t.startLabelRight)}if(t.endLabelLeft){const y=e.insert("g").attr("class","edgeTerminals"),w=y.insert("g").attr("class","inner"),b=await Z(y,t.endLabelLeft,t.labelStyle);g=b;let m=b.getBBox();if(s){const _=b.children[0],L=O(b);m=_.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}w.attr("transform",at(m,s)),W[t.id]||(W[t.id]={}),W[t.id].endLeft=y,it(g,t.endLabelLeft)}if(t.endLabelRight){const y=e.insert("g").attr("class","edgeTerminals"),w=y.insert("g").attr("class","inner"),b=await Z(y,t.endLabelRight,t.labelStyle);g=b;let m=b.getBBox();if(s){const _=b.children[0],L=O(b);m=_.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}w.attr("transform",at(m,s)),W[t.id]||(W[t.id]={}),W[t.id].endRight=y,it(g,t.endLabelRight)}return n},"insertEdgeLabel");function it(e,t){H(M())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(it,"setTerminalWidth");var Gr=d((e,t)=>{v.debug("Moving label abc88 ",e.id,e.label,vt[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath;const s=M(),{subGraphTitleTotalMargin:i}=Ze(s);if(e.label){const c=vt[e.id];let r=e.x,n=e.y;if(a){const l=st.calcLabelPosition(a);v.debug("Moving label "+e.label+" from (",r,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(r=l.x,n=l.y)}c.attr("transform",`translate(${r}, ${n+i/2})`)}if(e.startLabelLeft){const c=W[e.id].startLeft;let r=e.x,n=e.y;if(a){const l=st.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}if(e.startLabelRight){const c=W[e.id].startRight;let r=e.x,n=e.y;if(a){const l=st.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelLeft){const c=W[e.id].endLeft;let r=e.x,n=e.y;if(a){const l=st.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelRight){const c=W[e.id].endRight;let r=e.x,n=e.y;if(a){const l=st.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}},"positionEdgeLabel"),Zr=d((e,t)=>{const a=e.x,s=e.y,i=Math.abs(t.x-a),c=Math.abs(t.y-s),r=e.width/2,n=e.height/2;return i>=r||c>=n},"outsideNode"),jr=d((e,t,a)=>{v.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(a)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const s=e.x,i=e.y,c=Math.abs(s-a.x),r=e.width/2;let n=a.xMath.abs(s-t.x)*l){let y=a.y{v.debug("abc88 cutPathAtIntersect",e,t);let a=[],s=e[0],i=!1;return e.forEach(c=>{if(!Zr(t,c)&&!i){const r=jr(t,s,c);let n=!1;a.forEach(l=>{n=n||l.x===r.x&&l.y===r.y}),a.some(l=>l.x===r.x&&l.y===r.y)||a.push(r),i=!0}else s=c,i||a.push(c)}),a},"cutPathAtIntersect"),qr=d(function(e,t,a,s,i,c,r){let n=a.points;v.debug("abc88 InsertEdge: edge=",a,"e=",t);let l=!1;const u=c.node(t.v);var g=c.node(t.w);g!=null&&g.intersect&&(u!=null&&u.intersect)&&(n=n.slice(1,a.points.length-1),n.unshift(u.intersect(n[0])),n.push(g.intersect(n[n.length-1]))),a.toCluster&&(v.debug("to cluster abc88",s[a.toCluster]),n=Wt(a.points,s[a.toCluster].node),l=!0),a.fromCluster&&(v.debug("from cluster abc88",s[a.fromCluster]),n=Wt(n.reverse(),s[a.fromCluster].node).reverse(),l=!0);const y=n.filter(x=>!Number.isNaN(x.y));let w=Ve;a.curve&&(i==="graph"||i==="flowchart")&&(w=a.curve);const{x:b,y:m}=Ue(a),_=Xe().x(b).y(m).curve(w);let L;switch(a.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-thick";break;default:L=""}switch(a.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break}const C=e.append("path").attr("d",_(y)).attr("id",a.id).attr("class"," "+L+(a.classes?" "+a.classes:"")).attr("style",a.style);let I="";(M().flowchart.arrowMarkerAbsolute||M().state.arrowMarkerAbsolute)&&(I=Ge(!0)),Ur(C,a,I,r,i);let N={};return l&&(N.updatedPath=n),N.originalPath=a.points,N},"insertEdge"),Jr=d(e=>{const t=new Set;for(const a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),Qr=d((e,t,a,s)=>{const i=Jr(e),c=2,r=t.height+2*a.padding,n=r/c,l=s??t.width+2*n+a.padding,u=a.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:l/2,y:2*u},{x:l-n,y:0},{x:l,y:0},{x:l,y:-r/3},{x:l+2*u,y:-r/2},{x:l,y:-2*r/3},{x:l,y:-r},{x:l-n,y:-r},{x:l/2,y:-r-2*u},{x:n,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*u,y:-r/2},{x:0,y:-r/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:n,y:0},{x:l-n,y:0},{x:l,y:-r/2},{x:l-n,y:-r},{x:n,y:-r},{x:0,y:-r/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:n,y:-r},{x:l-n,y:-r},{x:l,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:l,y:-n},{x:l,y:-r+n},{x:0,y:-r}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:l,y:0},{x:0,y:-n},{x:0,y:-r+n},{x:l,y:-r}]:i.has("right")&&i.has("left")?[{x:n,y:0},{x:n,y:-u},{x:l-n,y:-u},{x:l-n,y:0},{x:l,y:-r/2},{x:l-n,y:-r},{x:l-n,y:-r+u},{x:n,y:-r+u},{x:n,y:-r},{x:0,y:-r/2}]:i.has("up")&&i.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:n,y:-u},{x:n,y:-r+u},{x:0,y:-r+u},{x:l/2,y:-r},{x:l,y:-r+u},{x:l-n,y:-r+u},{x:l-n,y:-u},{x:l,y:-u}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:l,y:-n},{x:0,y:-r}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-r}]:i.has("left")&&i.has("up")?[{x:l,y:0},{x:0,y:-n},{x:l,y:-r}]:i.has("left")&&i.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-r}]:i.has("right")?[{x:n,y:-u},{x:n,y:-u},{x:l-n,y:-u},{x:l-n,y:0},{x:l,y:-r/2},{x:l-n,y:-r},{x:l-n,y:-r+u},{x:n,y:-r+u},{x:n,y:-r+u}]:i.has("left")?[{x:n,y:0},{x:n,y:-u},{x:l-n,y:-u},{x:l-n,y:-r+u},{x:n,y:-r+u},{x:n,y:-r},{x:0,y:-r/2}]:i.has("up")?[{x:n,y:-u},{x:n,y:-r+u},{x:0,y:-r+u},{x:l/2,y:-r},{x:l,y:-r+u},{x:l-n,y:-r+u},{x:l-n,y:-u}]:i.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:n,y:-u},{x:n,y:-r+u},{x:l-n,y:-r+u},{x:l-n,y:-u},{x:l,y:-u}]:[{x:0,y:0}]},"getArrowPoints");function ue(e,t){return e.intersect(t)}d(ue,"intersectNode");var $r=ue;function pe(e,t,a,s){var i=e.x,c=e.y,r=i-s.x,n=c-s.y,l=Math.sqrt(t*t*n*n+a*a*r*r),u=Math.abs(t*a*r/l);s.x0}d(Et,"sameSign");var ea=xe,ra=be;function be(e,t,a){var s=e.x,i=e.y,c=[],r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(m){r=Math.min(r,m.x),n=Math.min(n,m.y)}):(r=Math.min(r,t.x),n=Math.min(n,t.y));for(var l=s-e.width/2-r,u=i-e.height/2-n,g=0;g1&&c.sort(function(m,_){var L=m.x-a.x,C=m.y-a.y,I=Math.sqrt(L*L+C*C),N=_.x-a.x,x=_.y-a.y,p=Math.sqrt(N*N+x*x);return I{var a=e.x,s=e.y,i=t.x-a,c=t.y-s,r=e.width/2,n=e.height/2,l,u;return Math.abs(c)*r>Math.abs(i)*n?(c<0&&(n=-n),l=c===0?0:n*i/c,u=n):(i<0&&(r=-r),l=r,u=i===0?0:r*c/i),{x:a+l,y:s+u}},"intersectRect"),sa=aa,R={node:$r,circle:ta,ellipse:fe,polygon:ra,rect:sa},P=d(async(e,t,a,s)=>{const i=M();let c;const r=t.useHtmlLabels||H(i);a?c=a:c="node default";const n=e.insert("g").attr("class",c).attr("id",t.domId||t.id),l=n.insert("g").attr("class","label").attr("style",t.labelStyle);let u;t.labelText===void 0?u="":u=typeof t.labelText=="string"?t.labelText:t.labelText[0];let g;t.labelType==="markdown"?g=_t(l,Rt(At(u),i),{useHtmlLabels:r,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):g=await Z(l,Rt(At(u),i),t.labelStyle,!1,s);let y=g.getBBox();const w=t.padding/2;if(H(i)){const b=g.children[0],m=O(g);await Je(b,u),y=b.getBoundingClientRect(),m.attr("width",y.width),m.attr("height",y.height)}return r?l.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):l.attr("transform","translate(0, "+-y.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:n,bbox:y,halfPadding:w,label:l}},"labelHelper"),A=d((e,t)=>{const a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function q(e,t,a,s){return e.insert("polygon",":first-child").attr("points",s.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}d(q,"insertPolygonShape");var ia=d(async(e,t)=>{t.useHtmlLabels||H(M())||(t.centerLabel=!0);const{shapeSvg:s,bbox:i,halfPadding:c}=await P(e,t,"node "+t.classes,!0);v.info("Classes = ",t.classes);const r=s.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-c).attr("y",-i.height/2-c).attr("width",i.width+t.padding).attr("height",i.height+t.padding),A(t,r),t.intersect=function(n){return R.rect(t,n)},s},"note"),na=ia,Yt=d(e=>e?" "+e:"","formatClass"),V=d((e,t)=>`${t||"node default"}${Yt(e.classes)} ${Yt(e.class)}`,"getClassesFromNode"),Ht=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await P(e,t,V(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=i+c,n=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];v.info("Question main (Circle)");const l=q(a,r,r,n);return l.attr("style",t.style),A(t,l),t.intersect=function(u){return v.warn("Intersect called"),R.polygon(t,n,u)},a},"question"),ca=d((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=28,i=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}];return a.insert("polygon",":first-child").attr("points",i.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return R.circle(t,14,r)},a},"choice"),la=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await P(e,t,V(t,void 0),!0),i=4,c=t.positioned?t.height:s.height+t.padding,r=c/i,n=t.positioned?t.width:s.width+2*r+t.padding,l=[{x:r,y:0},{x:n-r,y:0},{x:n,y:-c/2},{x:n-r,y:-c},{x:r,y:-c},{x:0,y:-c/2}],u=q(a,n,c,l);return u.attr("style",t.style),A(t,u),t.intersect=function(g){return R.polygon(t,l,g)},a},"hexagon"),oa=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await P(e,t,void 0,!0),i=2,c=s.height+2*t.padding,r=c/i,n=s.width+2*r+t.padding,u=t.positioned&&(t.widthInColumns??1)>1&&t.width>n?t.width:n,g=Qr(t.directions,s,t,u),y=q(a,u,c,g);return y.attr("style",t.style),A(t,y),t.intersect=function(w){return R.polygon(t,g,w)},a},"block_arrow"),ha=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await P(e,t,V(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:-c/2,y:0},{x:i,y:0},{x:i,y:-c},{x:-c/2,y:-c},{x:0,y:-c/2}];return q(a,i,c,r).attr("style",t.style),t.width=i+c,t.height=c,t.intersect=function(l){return R.polygon(t,r,l)},a},"rect_left_inv_arrow"),ga=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await P(e,t,V(t),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:-2*c/6,y:0},{x:i-c/6,y:0},{x:i+2*c/6,y:-c},{x:c/6,y:-c}],n=q(a,i,c,r);return n.attr("style",t.style),A(t,n),t.intersect=function(l){return R.polygon(t,r,l)},a},"lean_right"),da=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await P(e,t,V(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:2*c/6,y:0},{x:i+c/6,y:0},{x:i-2*c/6,y:-c},{x:-c/6,y:-c}],n=q(a,i,c,r);return n.attr("style",t.style),A(t,n),t.intersect=function(l){return R.polygon(t,r,l)},a},"lean_left"),ua=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await P(e,t,V(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:-2*c/6,y:0},{x:i+2*c/6,y:0},{x:i-c/6,y:-c},{x:c/6,y:-c}],n=q(a,i,c,r);return n.attr("style",t.style),A(t,n),t.intersect=function(l){return R.polygon(t,r,l)},a},"trapezoid"),pa=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await P(e,t,V(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:c/6,y:0},{x:i-c/6,y:0},{x:i+2*c/6,y:-c},{x:-2*c/6,y:-c}],n=q(a,i,c,r);return n.attr("style",t.style),A(t,n),t.intersect=function(l){return R.polygon(t,r,l)},a},"inv_trapezoid"),fa=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await P(e,t,V(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:0,y:0},{x:i+c/2,y:0},{x:i,y:-c/2},{x:i+c/2,y:-c},{x:0,y:-c}],n=q(a,i,c,r);return n.attr("style",t.style),A(t,n),t.intersect=function(l){return R.polygon(t,r,l)},a},"rect_right_inv_arrow"),ya=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await P(e,t,V(t,void 0),!0),i=s.width+t.padding,c=i/2,r=c/(2.5+i/50),n=s.height+r+t.padding,l="M 0,"+r+" a "+c+","+r+" 0,0,0 "+i+" 0 a "+c+","+r+" 0,0,0 "+-i+" 0 l 0,"+n+" a "+c+","+r+" 0,0,0 "+i+" 0 l 0,"+-n,u=a.attr("label-offset-y",r).insert("path",":first-child").attr("style",t.style).attr("d",l).attr("transform","translate("+-i/2+","+-(n/2+r)+")");return A(t,u),t.intersect=function(g){const y=R.rect(t,g),w=y.x-t.x;if(c!=0&&(Math.abs(w)t.height/2-r)){let b=r*r*(1-w*w/(c*c));b!=0&&(b=Math.sqrt(b)),b=r-b,g.y-t.y>0&&(b=-b),y.y+=b}return y},a},"cylinder"),xa=d(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await P(e,t,"node "+t.classes+" "+t.class,!0),c=a.insert("rect",":first-child"),r=t.positioned?t.width:s.width+t.padding,n=t.positioned?t.height:s.height+t.padding,l=t.positioned?-r/2:-s.width/2-i,u=t.positioned?-n/2:-s.height/2-i;if(c.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",u).attr("width",r).attr("height",n),t.props){const g=new Set(Object.keys(t.props));t.props.borders&&(ut(c,t.props.borders,r,n),g.delete("borders")),g.forEach(y=>{v.warn(`Unknown node property ${y}`)})}return A(t,c),t.intersect=function(g){return R.rect(t,g)},a},"rect"),ba=d(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await P(e,t,"node "+t.classes,!0),c=a.insert("rect",":first-child"),r=t.positioned?t.width:s.width+t.padding,n=t.positioned?t.height:s.height+t.padding,l=t.positioned?-r/2:-s.width/2-i,u=t.positioned?-n/2:-s.height/2-i;if(c.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",u).attr("width",r).attr("height",n),t.props){const g=new Set(Object.keys(t.props));t.props.borders&&(ut(c,t.props.borders,r,n),g.delete("borders")),g.forEach(y=>{v.warn(`Unknown node property ${y}`)})}return A(t,c),t.intersect=function(g){return R.rect(t,g)},a},"composite"),wa=d(async(e,t)=>{const{shapeSvg:a}=await P(e,t,"label",!0);v.trace("Classes = ",t.class);const s=a.insert("rect",":first-child"),i=0,c=0;if(s.attr("width",i).attr("height",c),a.attr("class","label edgeLabel"),t.props){const r=new Set(Object.keys(t.props));t.props.borders&&(ut(s,t.props.borders,i,c),r.delete("borders")),r.forEach(n=>{v.warn(`Unknown node property ${n}`)})}return A(t,s),t.intersect=function(r){return R.rect(t,r)},a},"labelRect");function ut(e,t,a,s){const i=[],c=d(n=>{i.push(n,0)},"addBorder"),r=d(n=>{i.push(0,n)},"skipBorder");t.includes("t")?(v.debug("add top border"),c(a)):r(a),t.includes("r")?(v.debug("add right border"),c(s)):r(s),t.includes("b")?(v.debug("add bottom border"),c(a)):r(a),t.includes("l")?(v.debug("add left border"),c(s)):r(s),e.attr("stroke-dasharray",i.join(" "))}d(ut,"applyNodePropertyBorders");var ma=d(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),i=s.insert("rect",":first-child"),c=s.insert("line"),r=s.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText;let l="";typeof n=="object"?l=n[0]:l=n,v.info("Label text abc79",l,n,typeof n=="object");const u=await Z(r,l,t.labelStyle,!0,!0);let g={width:0,height:0};if(H(M())){const _=u.children[0],L=O(u);g=_.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}v.info("Text 2",n);const y=n.slice(1,n.length);let w=u.getBBox();const b=await Z(r,y.join?y.join("
"):y,t.labelStyle,!0,!0);if(H(M())){const _=b.children[0],L=O(b);g=_.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}const m=t.padding/2;return O(b).attr("transform","translate( "+(g.width>w.width?0:(w.width-g.width)/2)+", "+(w.height+m+5)+")"),O(u).attr("transform","translate( "+(g.width{const{shapeSvg:a,bbox:s}=await P(e,t,V(t,void 0),!0),i=s.height+t.padding,c=s.width+i/4+t.padding,r=a.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-c/2).attr("y",-i/2).attr("width",c).attr("height",i);return A(t,r),t.intersect=function(n){return R.rect(t,n)},a},"stadium"),La=d(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await P(e,t,V(t,void 0),!0),c=a.insert("circle",":first-child");return c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i).attr("width",s.width+t.padding).attr("height",s.height+t.padding),v.info("Circle main"),A(t,c),t.intersect=function(r){return v.info("Circle intersect",t,s.width/2+i,r),R.circle(t,s.width/2+i,r)},a},"circle"),va=d(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await P(e,t,V(t,void 0),!0),c=5,r=a.insert("g",":first-child"),n=r.insert("circle"),l=r.insert("circle");return r.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i+c).attr("width",s.width+t.padding+c*2).attr("height",s.height+t.padding+c*2),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i).attr("width",s.width+t.padding).attr("height",s.height+t.padding),v.info("DoubleCircle main"),A(t,n),t.intersect=function(u){return v.info("DoubleCircle intersect",t,s.width/2+i+c,u),R.circle(t,s.width/2+i+c,u)},a},"doublecircle"),Ea=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await P(e,t,V(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:0,y:0},{x:i,y:0},{x:i,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-c},{x:-8,y:-c},{x:-8,y:0}],n=q(a,i,c,r);return n.attr("style",t.style),A(t,n),t.intersect=function(l){return R.polygon(t,r,l)},a},"subroutine"),_a=d((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=a.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),A(t,s),t.intersect=function(i){return R.circle(t,7,i)},a},"start"),Kt=d((e,t,a)=>{const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,c=10;a==="LR"&&(i=10,c=70);const r=s.append("rect").attr("x",-1*i/2).attr("y",-1*c/2).attr("width",i).attr("height",c).attr("class","fork-join");return A(t,r),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return R.rect(t,n)},s},"forkJoin"),ka=d((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=a.insert("circle",":first-child"),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),s.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),A(t,i),t.intersect=function(c){return R.circle(t,7,c)},a},"end"),Ta=d(async(e,t)=>{var E;const a=t.padding/2,s=4,i=8;let c;t.classes?c="node "+t.classes:c="node default";const r=e.insert("g").attr("class",c).attr("id",t.domId||t.id),n=r.insert("rect",":first-child"),l=r.insert("line"),u=r.insert("line");let g=0,y=s;const w=r.insert("g").attr("class","label");let b=0;const m=(E=t.classData.annotations)==null?void 0:E[0],_=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",L=await Z(w,_,t.labelStyle,!0,!0);let C=L.getBBox();if(H(M())){const o=L.children[0],k=O(L);C=o.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}t.classData.annotations[0]&&(y+=C.height+s,g+=C.width);let I=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(H(M())?I+="<"+t.classData.type+">":I+="<"+t.classData.type+">");const N=await Z(w,I,t.labelStyle,!0,!0);O(N).attr("class","classTitle");let x=N.getBBox();if(H(M())){const o=N.children[0],k=O(N);x=o.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}y+=x.height+s,x.width>g&&(g=x.width);const p=[];t.classData.members.forEach(async o=>{const k=o.getDisplayDetails();let h=k.displayText;H(M())&&(h=h.replace(//g,">"));const T=await Z(w,h,k.cssStyle?k.cssStyle:t.labelStyle,!0,!0);let D=T.getBBox();if(H(M())){const U=T.children[0],F=O(T);D=U.getBoundingClientRect(),F.attr("width",D.width),F.attr("height",D.height)}D.width>g&&(g=D.width),y+=D.height+s,p.push(T)}),y+=i;const f=[];if(t.classData.methods.forEach(async o=>{const k=o.getDisplayDetails();let h=k.displayText;H(M())&&(h=h.replace(//g,">"));const T=await Z(w,h,k.cssStyle?k.cssStyle:t.labelStyle,!0,!0);let D=T.getBBox();if(H(M())){const U=T.children[0],F=O(T);D=U.getBoundingClientRect(),F.attr("width",D.width),F.attr("height",D.height)}D.width>g&&(g=D.width),y+=D.height+s,f.push(T)}),y+=i,m){let o=(g-C.width)/2;O(L).attr("transform","translate( "+(-1*g/2+o)+", "+-1*y/2+")"),b=C.height+s}let S=(g-x.width)/2;return O(N).attr("transform","translate( "+(-1*g/2+S)+", "+(-1*y/2+b)+")"),b+=x.height+s,l.attr("class","divider").attr("x1",-g/2-a).attr("x2",g/2+a).attr("y1",-y/2-a+i+b).attr("y2",-y/2-a+i+b),b+=i,p.forEach(o=>{O(o).attr("transform","translate( "+-g/2+", "+(-1*y/2+b+i/2)+")");const k=o==null?void 0:o.getBBox();b+=((k==null?void 0:k.height)??0)+s}),b+=i,u.attr("class","divider").attr("x1",-g/2-a).attr("x2",g/2+a).attr("y1",-y/2-a+i+b).attr("y2",-y/2-a+i+b),b+=i,f.forEach(o=>{O(o).attr("transform","translate( "+-g/2+", "+(-1*y/2+b)+")");const k=o==null?void 0:o.getBBox();b+=((k==null?void 0:k.height)??0)+s}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-g/2-a).attr("y",-(y/2)-a).attr("width",g+t.padding).attr("height",y+t.padding),A(t,n),t.intersect=function(o){return R.rect(t,o)},r},"class_box"),Ut={rhombus:Ht,composite:ba,question:Ht,rect:xa,labelRect:wa,rectWithTitle:ma,choice:ca,circle:La,doublecircle:va,stadium:Sa,hexagon:la,block_arrow:oa,rect_left_inv_arrow:ha,lean_right:ga,lean_left:da,trapezoid:ua,inv_trapezoid:pa,rect_right_inv_arrow:fa,cylinder:ya,start:_a,end:ka,note:na,subroutine:Ea,fork:Kt,join:Kt,class_box:Ta},ht={},we=d(async(e,t,a)=>{let s,i;if(t.link){let c;M().securityLevel==="sandbox"?c="_top":t.linkTarget&&(c=t.linkTarget||"_blank"),s=e.insert("svg:a").attr("xlink:href",t.link).attr("target",c),i=await Ut[t.shape](s,t,a)}else i=await Ut[t.shape](e,t,a),s=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),ht[t.id]=s,t.haveCallback&&ht[t.id].attr("class",ht[t.id].attr("class")+" clickable"),s},"insertNode"),Da=d(e=>{const t=ht[e.id];v.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const a=8,s=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+s-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),s},"positionNode");function Ct(e,t,a=!1){var b,m,_;const s=e;let i="default";(((b=s==null?void 0:s.classes)==null?void 0:b.length)||0)>0&&(i=((s==null?void 0:s.classes)??[]).join(" ")),i=i+" flowchart-label";let c=0,r="",n;switch(s.type){case"round":c=5,r="rect";break;case"composite":c=0,r="composite",n=0;break;case"square":r="rect";break;case"diamond":r="question";break;case"hexagon":r="hexagon";break;case"block_arrow":r="block_arrow";break;case"odd":r="rect_left_inv_arrow";break;case"lean_right":r="lean_right";break;case"lean_left":r="lean_left";break;case"trapezoid":r="trapezoid";break;case"inv_trapezoid":r="inv_trapezoid";break;case"rect_left_inv_arrow":r="rect_left_inv_arrow";break;case"circle":r="circle";break;case"ellipse":r="ellipse";break;case"stadium":r="stadium";break;case"subroutine":r="subroutine";break;case"cylinder":r="cylinder";break;case"group":r="rect";break;case"doublecircle":r="doublecircle";break;default:r="rect"}const l=qe((s==null?void 0:s.styles)??[]),u=s.label,g=s.size??{width:0,height:0,x:0,y:0},y=t.getDiagramId();return{labelStyle:l.labelStyle,shape:r,labelText:u,rx:c,ry:c,class:i,style:l.style,id:s.id,domId:y?`${y}-${s.id}`:s.id,directions:s.directions,width:g.width,height:g.height,x:g.x,y:g.y,positioned:a,intersect:void 0,type:s.type,padding:n??((_=(m=ct())==null?void 0:m.block)==null?void 0:_.padding)??0,widthInColumns:s.widthInColumns??1}}d(Ct,"getNodeFromBlock");async function me(e,t,a){const s=Ct(t,a,!1);if(s.type==="group")return;const i=ct(),c=await we(e,s,{config:i}),r=c.node().getBBox(),n=a.getBlock(s.id);n.size={width:r.width,height:r.height,x:0,y:0,node:c},a.setBlock(n),c.remove()}d(me,"calculateBlockSize");async function Se(e,t,a){const s=Ct(t,a,!0);if(a.getBlock(s.id).type!=="space"){const c=ct();await we(e,s,{config:c}),t.intersect=s==null?void 0:s.intersect,Da(s)}}d(Se,"insertBlockPositioned");async function pt(e,t,a,s){for(const i of t)await s(e,i,a),i.children&&await pt(e,i.children,a,s)}d(pt,"performOperations");async function Le(e,t,a){await pt(e,t,a,me)}d(Le,"calculateBlockSizes");async function ve(e,t,a){await pt(e,t,a,Se)}d(ve,"insertBlocks");async function Ee(e,t,a,s,i){const c=new Qe({multigraph:!0,compound:!0});c.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const r of a)r.size&&c.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(const r of t)if(r.start&&r.end){const n=s.getBlock(r.start),l=s.getBlock(r.end);if(n!=null&&n.size&&(l!=null&&l.size)){const u=n.size,g=l.size,y=[{x:u.x,y:u.y},{x:u.x+(g.x-u.x)/2,y:u.y+(g.y-u.y)/2},{x:g.x,y:g.y}],w=i?`${i}-${r.id}`:r.id,b=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",m=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",_=`${b} ${m} flowchart-link LS-a1 LE-b1`;qr(e,{v:r.start,w:r.end,name:w},{...r,id:w,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:y,classes:_},void 0,"block",c,i),r.label&&(await Vr(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:y,classes:_}),Gr({...r,x:y[1].x,y:y[1].y},{originalPath:y}))}}}d(Ee,"insertEdges");var Na=d(function(e,t){return t.db.getClasses()},"getClasses"),Ia=d(async function(e,t,a,s){const{securityLevel:i,block:c}=ct(),r=s.db;r.setDiagramId(t);let n;i==="sandbox"&&(n=O("#i"+t));const l=i==="sandbox"?O(n.nodes()[0].contentDocument.body):O("body"),u=i==="sandbox"?l.select(`[id="${t}"]`):O(`[id="${t}"]`);Yr(u,["point","circle","cross"],s.type,t);const y=r.getBlocks(),w=r.getBlocksFlat(),b=r.getEdges(),m=u.insert("g").attr("class","block");await Le(m,y,r);const _=de(r);if(await ve(m,y,r),await Ee(m,b,w,r,t),_){const L=_,C=Math.max(1,Math.round(.125*(L.width/L.height))),I=L.height+C+10,N=L.width+10,{useMaxWidth:x}=c;Ye(u,I,N,!!x),v.debug("Here Bounds",_,L),u.attr("viewBox",`${L.x-5} ${L.y-5} ${L.width+10} ${L.height+10}`)}},"draw"),Ca={draw:Ia,getClasses:Na},Ma={parser:nr,db:Tr,renderer:Ca,styles:Nr};export{Ma as diagram}; diff --git a/dist/assets/c4Diagram-AAUBKEIU-DAk3fAMC.js b/dist/assets/c4Diagram-AAUBKEIU-DAk3fAMC.js new file mode 100644 index 0000000..db97347 --- /dev/null +++ b/dist/assets/c4Diagram-AAUBKEIU-DAk3fAMC.js @@ -0,0 +1,10 @@ +import{g as Se,d as De}from"./chunk-ND2GUHAM-DRVGyKsL.js";import{s as Pe,g as Be,a as Ie,b as Me,_ as y,c as Bt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,m as fe}from"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var Ft=function(){var a=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],r=[1,27],l=[1,28],e=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,E,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},a(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(Ct,[2,14]),a(Qt,[2,16],{12:[1,76]}),a(Ct,[2,36],{12:[1,77]}),a(St,[2,19]),a(St,[2,20]),{25:[1,78]},{27:[1,79]},a(St,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},a(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},a(Ct,[2,15]),a(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:r,28:l}),a(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:r,28:l,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(St,[2,21]),a(St,[2,22]),a(T,[2,39]),a(le,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),a(Mt,[2,73]),{78:[1,133]},a(Mt,[2,75]),a(Mt,[2,76]),a(T,[2,40]),a(T,[2,41]),a(T,[2,42]),a(T,[2,43]),a(T,[2,44]),a(T,[2,45]),a(T,[2,46]),a(T,[2,47]),a(T,[2,48]),a(T,[2,49]),a(T,[2,50]),a(T,[2,51]),a(T,[2,52]),a(T,[2,53]),a(T,[2,54]),a(T,[2,55]),a(T,[2,56]),a(T,[2,57]),a(T,[2,58]),a(T,[2,60]),a(T,[2,61]),a(T,[2,62]),a(T,[2,63]),a(T,[2,64]),a(T,[2,65]),a(T,[2,66]),a(T,[2,67]),a(T,[2,68]),a(T,[2,69]),a(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},a(vt,[2,28]),a(vt,[2,29]),a(vt,[2,30]),a(vt,[2,31]),a(vt,[2,32]),a(vt,[2,33]),a(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},a(Qt,[2,18]),a(Ct,[2,38]),a(le,[2,72]),a(Mt,[2,74]),a(T,[2,24]),a(T,[2,35]),a(Ht,[2,25]),a(Ht,[2,26],{12:[1,138]}),a(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(At.yy[Gt]=this.yy[Gt]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(he,"lex");for(var I,kt,N,Jt,wt={},Nt,W,ue,Yt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=he()),N=Dt[kt]&&Dt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[kt])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: +`+D.showPosition()+` +Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+I);switch(N[0]){case 1:E.push(I),R.push(D.yytext),h.push(D.yylloc),E.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,At.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;W&&(E=E.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),E.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[E[E.length-2]][E[E.length-1]],E.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=function(){var _t={EOF:1,parseError:y(function(v,E){if(this.yy.parser)this.yy.parser.parseError(v,E);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:y(function(x){var v=x.length,E=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var b=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 R=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===b.length?this.yylloc.first_column:0)+b[b.length-E.length].length-E[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+` +`+v+"^"},"showPosition"),test_match:y(function(x,v){var E,b,R;if(this.options.backtrack_lexer&&(R={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&&(R.yylloc.range=this.yylloc.range.slice(0))),b=x[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,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(x[0].length),this.matched+=x[0],E=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:y(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,v,E,b;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;hv[0].length)){if(v=E,b=h,this.options.backtrack_lexer){if(x=this.test_match(E,R[h]),x!==!1)return x;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(x=this.test_match(v,R[b]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:y(function(){var v=this.next();return v||this.lex()},"lex"),begin:y(function(v){this.conditionStack.push(v)},"begin"),popState:y(function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:y(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:y(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),pushState:y(function(v){this.begin(v)},"pushState"),stateStackSize:y(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:y(function(v,E,b,R){switch(b){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t}();qt.lexer=Ce;function Lt(){this.yy={}}return y(Lt,"Parser"),Lt.prototype=qt,qt.Parser=Lt,new Lt}();Ft.parser=Ft;var Ue=Ft,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],It=[],ie="",ne=!1,Vt=4,zt=2,be,Fe=y(function(){return be},"getC4Type"),Ve=y(function(a){be=ge(a,Bt())},"setC4Type"),ze=y(function(a,t,s,o,r,l,e,n,i){if(a==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=It.find(f=>f.from===t&&f.to===s);if(d?u=d:It.push(u),u.type=a,u.from=t,u.to=s,u.label={text:o},r==null)u.techn={text:""};else if(typeof r=="object"){let[f,g]=Object.entries(r)[0];u[f]={text:g}}else u.techn={text:r};if(l==null)u.descr={text:""};else if(typeof l=="object"){let[f,g]=Object.entries(l)[0];u[f]={text:g}}else u.descr={text:l};if(typeof e=="object"){let[f,g]=Object.entries(e)[0];u[f]=g}else u.sprite=e;if(typeof n=="object"){let[f,g]=Object.entries(n)[0];u[f]=g}else u.tags=n;if(typeof i=="object"){let[f,g]=Object.entries(i)[0];u[f]=g}else u.link=i;u.wrap=mt()},"addRel"),Xe=y(function(a,t,s,o,r,l,e){if(t===null||s===null)return;let n={};const i=V.find(u=>u.alias===t);if(i&&t===i.alias?n=i:(n.alias=t,V.push(n)),s==null?n.label={text:""}:n.label={text:s},o==null)n.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];n[u]={text:d}}else n.descr={text:o};if(typeof r=="object"){let[u,d]=Object.entries(r)[0];n[u]=d}else n.sprite=r;if(typeof l=="object"){let[u,d]=Object.entries(l)[0];n[u]=d}else n.tags=l;if(typeof e=="object"){let[u,d]=Object.entries(e)[0];n[u]=d}else n.link=e;n.typeC4Shape={text:a},n.parentBoundary=B,n.wrap=mt()},"addPersonOrSystem"),We=y(function(a,t,s,o,r,l,e,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(r==null)i.descr={text:""};else if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]={text:f}}else i.descr={text:r};if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]=f}else i.sprite=l;if(typeof e=="object"){let[d,f]=Object.entries(e)[0];i[d]=f}else i.tags=e;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:a},i.parentBoundary=B},"addContainer"),Qe=y(function(a,t,s,o,r,l,e,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(r==null)i.descr={text:""};else if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]={text:f}}else i.descr={text:r};if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]=f}else i.sprite=l;if(typeof e=="object"){let[d,f]=Object.entries(e)[0];i[d]=f}else i.tags=e;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:a},i.parentBoundary=B},"addComponent"),He=y(function(a,t,s,o,r){if(a===null||t===null)return;let l={};const e=X.find(n=>n.alias===a);if(e&&a===e.alias?l=e:(l.alias=a,X.push(l)),t==null?l.label={text:""}:l.label={text:t},s==null)l.type={text:"system"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];l[n]={text:i}}else l.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];l[n]=i}else l.tags=o;if(typeof r=="object"){let[n,i]=Object.entries(r)[0];l[n]=i}else l.link=r;l.parentBoundary=B,l.wrap=mt(),F=B,B=a,xt.push(F)},"addPersonOrSystemBoundary"),qe=y(function(a,t,s,o,r){if(a===null||t===null)return;let l={};const e=X.find(n=>n.alias===a);if(e&&a===e.alias?l=e:(l.alias=a,X.push(l)),t==null?l.label={text:""}:l.label={text:t},s==null)l.type={text:"container"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];l[n]={text:i}}else l.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];l[n]=i}else l.tags=o;if(typeof r=="object"){let[n,i]=Object.entries(r)[0];l[n]=i}else l.link=r;l.parentBoundary=B,l.wrap=mt(),F=B,B=a,xt.push(F)},"addContainerBoundary"),Ge=y(function(a,t,s,o,r,l,e,n){if(t===null||s===null)return;let i={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,X.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.type={text:"node"};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.type={text:o};if(r==null)i.descr={text:""};else if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]={text:f}}else i.descr={text:r};if(typeof e=="object"){let[d,f]=Object.entries(e)[0];i[d]=f}else i.tags=e;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.nodeType=a,i.parentBoundary=B,i.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),Ke=y(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Je=y(function(a,t,s,o,r,l,e,n,i,u,d){let f=V.find(g=>g.alias===t);if(!(f===void 0&&(f=X.find(g=>g.alias===t),f===void 0))){if(s!=null)if(typeof s=="object"){let[g,m]=Object.entries(s)[0];f[g]=m}else f.bgColor=s;if(o!=null)if(typeof o=="object"){let[g,m]=Object.entries(o)[0];f[g]=m}else f.fontColor=o;if(r!=null)if(typeof r=="object"){let[g,m]=Object.entries(r)[0];f[g]=m}else f.borderColor=r;if(l!=null)if(typeof l=="object"){let[g,m]=Object.entries(l)[0];f[g]=m}else f.shadowing=l;if(e!=null)if(typeof e=="object"){let[g,m]=Object.entries(e)[0];f[g]=m}else f.shape=e;if(n!=null)if(typeof n=="object"){let[g,m]=Object.entries(n)[0];f[g]=m}else f.sprite=n;if(i!=null)if(typeof i=="object"){let[g,m]=Object.entries(i)[0];f[g]=m}else f.techn=i;if(u!=null)if(typeof u=="object"){let[g,m]=Object.entries(u)[0];f[g]=m}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[g,m]=Object.entries(d)[0];f[g]=m}else f.legendSprite=d}},"updateElStyle"),Ze=y(function(a,t,s,o,r,l,e){const n=It.find(i=>i.from===t&&i.to===s);if(n!==void 0){if(o!=null)if(typeof o=="object"){let[i,u]=Object.entries(o)[0];n[i]=u}else n.textColor=o;if(r!=null)if(typeof r=="object"){let[i,u]=Object.entries(r)[0];n[i]=u}else n.lineColor=r;if(l!=null)if(typeof l=="object"){let[i,u]=Object.entries(l)[0];n[i]=parseInt(u)}else n.offsetX=parseInt(l);if(e!=null)if(typeof e=="object"){let[i,u]=Object.entries(e)[0];n[i]=parseInt(u)}else n.offsetY=parseInt(e)}},"updateRelStyle"),$e=y(function(a,t,s){let o=Vt,r=zt;if(typeof t=="object"){const l=Object.values(t)[0];o=parseInt(l)}else o=parseInt(t);if(typeof s=="object"){const l=Object.values(s)[0];r=parseInt(l)}else r=parseInt(s);o>=1&&(Vt=o),r>=1&&(zt=r)},"updateLayoutConfig"),t0=y(function(){return Vt},"getC4ShapeInRow"),e0=y(function(){return zt},"getC4BoundaryInRow"),a0=y(function(){return B},"getCurrentBoundaryParse"),i0=y(function(){return F},"getParentBoundaryParse"),_e=y(function(a){return a==null?V:V.filter(t=>t.parentBoundary===a)},"getC4ShapeArray"),n0=y(function(a){return V.find(t=>t.alias===a)},"getC4Shape"),s0=y(function(a){return Object.keys(_e(a))},"getC4ShapeKeys"),xe=y(function(a){return a==null?X:X.filter(t=>t.parentBoundary===a)},"getBoundaries"),r0=xe,l0=y(function(){return It},"getRels"),o0=y(function(){return ie},"getTitle"),c0=y(function(a){ne=a},"setWrap"),mt=y(function(){return ne},"autoWrap"),h0=y(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],It=[],xt=[""],ie="",ne=!1,Vt=4,zt=2},"clear"),u0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},d0={FILLED:0,OPEN:1},f0={LEFTOF:0,RIGHTOF:1,OVER:2},p0=y(function(a){ie=ge(a,Bt())},"setTitle"),te={addPersonOrSystem:Xe,addPersonOrSystemBoundary:He,addContainer:We,addContainerBoundary:qe,addComponent:Qe,addDeploymentNode:Ge,popBoundaryParseStack:Ke,addRel:ze,updateElStyle:Je,updateRelStyle:Ze,updateLayoutConfig:$e,autoWrap:mt,setWrap:c0,getC4ShapeArray:_e,getC4Shape:n0,getC4ShapeKeys:s0,getBoundaries:xe,getBoundarys:r0,getCurrentBoundaryParse:a0,getParentBoundaryParse:i0,getRels:l0,getTitle:o0,getC4Type:Fe,getC4ShapeInRow:t0,getC4BoundaryInRow:e0,setAccTitle:Me,getAccTitle:Ie,getAccDescription:Be,setAccDescription:Pe,getConfig:y(()=>Bt().c4,"getConfig"),clear:h0,LINETYPE:u0,ARROWTYPE:d0,PLACEMENT:f0,setTitle:p0,setC4Type:Ve},se=y(function(a,t){return De(a,t)},"drawRect"),me=y(function(a,t,s,o,r,l){const e=a.append("image");e.attr("width",t),e.attr("height",s),e.attr("x",o),e.attr("y",r);let n=l.startsWith("data:image/png;base64")?l:Ye.sanitizeUrl(l);e.attr("xlink:href",n)},"drawImage"),y0=y((a,t,s,o)=>{const r=a.append("g");let l=0;for(let e of t){let n=e.textColor?e.textColor:"#444444",i=e.lineColor?e.lineColor:"#444444",u=e.offsetX?parseInt(e.offsetX):0,d=e.offsetY?parseInt(e.offsetY):0,f="";if(l===0){let m=r.append("line");m.attr("x1",e.startPoint.x),m.attr("y1",e.startPoint.y),m.attr("x2",e.endPoint.x),m.attr("y2",e.endPoint.y),m.attr("stroke-width","1"),m.attr("stroke",i),m.style("fill","none"),e.type!=="rel_b"&&m.attr("marker-end","url("+f+"#"+o+"-arrowhead)"),(e.type==="birel"||e.type==="rel_b")&&m.attr("marker-start","url("+f+"#"+o+"-arrowend)"),l=-1}else{let m=r.append("path");m.attr("fill","none").attr("stroke-width","1").attr("stroke",i).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",e.startPoint.x).replaceAll("starty",e.startPoint.y).replaceAll("controlx",e.startPoint.x+(e.endPoint.x-e.startPoint.x)/2-(e.endPoint.x-e.startPoint.x)/4).replaceAll("controly",e.startPoint.y+(e.endPoint.y-e.startPoint.y)/2).replaceAll("stopx",e.endPoint.x).replaceAll("stopy",e.endPoint.y)),e.type!=="rel_b"&&m.attr("marker-end","url("+f+"#"+o+"-arrowhead)"),(e.type==="birel"||e.type==="rel_b")&&m.attr("marker-start","url("+f+"#"+o+"-arrowend)")}let g=s.messageFont();Q(s)(e.label.text,r,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+u,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+d,e.label.width,e.label.height,{fill:n},g),e.techn&&e.techn.text!==""&&(g=s.messageFont(),Q(s)("["+e.techn.text+"]",r,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+u,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+s.messageFontSize+5+d,Math.max(e.label.width,e.techn.width),e.techn.height,{fill:n,"font-style":"italic"},g))}},"drawRels"),g0=y(function(a,t,s){const o=a.append("g");let r=t.bgColor?t.bgColor:"none",l=t.borderColor?t.borderColor:"#444444",e=t.fontColor?t.fontColor:"black",n={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(n={"stroke-width":1});let i={x:t.x,y:t.y,fill:r,stroke:l,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:n};se(o,i);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=e,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=e,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=e,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),b0=y(function(a,t,s){var f;let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],r=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],l=t.fontColor?t.fontColor:"#FFFFFF",e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const n=a.append("g");n.attr("class","person-man");const i=Se();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":i.x=t.x,i.y=t.y,i.fill=o,i.width=t.width,i.height=t.height,i.stroke=r,i.rx=2.5,i.ry=2.5,i.attrs={"stroke-width":.5},se(n,i);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=C0(s,t.typeC4Shape.text);switch(n.append("text").attr("fill",l).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":me(n,48,48,t.x+t.width/2-24,t.y+t.image.Y,e);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=l,Q(s)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:l},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=l,t.techn&&((f=t.techn)==null?void 0:f.text)!==""?Q(s)(t.techn.text,n,t.x,t.y+t.techn.Y,t.width,t.height,{fill:l,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:l,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=l,Q(s)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:l},d)),t.height},"drawC4Shape"),_0=y(function(a,t){a.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),x0=y(function(a,t){a.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),m0=y(function(a,t){a.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),v0=y(function(a,t){a.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),E0=y(function(a,t){a.append("defs").append("marker").attr("id",t+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),A0=y(function(a,t){a.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),k0=y(function(a,t){const o=a.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);o.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),o.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),C0=y((a,t)=>({fontFamily:a[t+"FontFamily"],fontSize:a[t+"FontSize"],fontWeight:a[t+"FontWeight"]}),"getC4ShapeFont"),Q=function(){function a(r,l,e,n,i,u,d){const f=l.append("text").attr("x",e+i/2).attr("y",n+u/2+5).style("text-anchor","middle").text(r);o(f,d)}y(a,"byText");function t(r,l,e,n,i,u,d,f){const{fontSize:g,fontFamily:m,fontWeight:O}=f,S=r.split($t.lineBreakRegex);for(let P=0;P=this.data.widthLimit||o>=this.data.widthLimit||this.nextData.cnt>ve)&&(s=this.nextData.startx+t.margin+_.nextLinePaddingX,r=this.nextData.stopy+t.margin*2,this.nextData.stopx=o=s+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=l=r+t.height,this.nextData.cnt=1),t.x=s,t.y=r,this.updateVal(this.data,"startx",s,Math.min),this.updateVal(this.data,"starty",r,Math.min),this.updateVal(this.data,"stopx",o,Math.max),this.updateVal(this.data,"stopy",l,Math.max),this.updateVal(this.nextData,"startx",s,Math.min),this.updateVal(this.nextData,"starty",r,Math.min),this.updateVal(this.nextData,"stopx",o,Math.max),this.updateVal(this.nextData,"stopy",l,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},ae(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},y(Ot,"Bounds"),Ot),ae=y(function(a){Ne(_,a),a.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=a.fontFamily),a.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=a.fontSize),a.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=a.fontWeight)},"setConf"),Pt=y((a,t)=>({fontFamily:a[t+"FontFamily"],fontSize:a[t+"FontSize"],fontWeight:a[t+"FontWeight"]}),"c4ShapeFont"),Ut=y(a=>({fontFamily:a.boundaryFontFamily,fontSize:a.boundaryFontSize,fontWeight:a.boundaryFontWeight}),"boundaryFont"),w0=y(a=>({fontFamily:a.messageFontFamily,fontSize:a.messageFontSize,fontWeight:a.messageFontWeight}),"messageFont");function j(a,t,s,o,r){if(!t[a].width)if(s)t[a].text=je(t[a].text,r,o),t[a].textLines=t[a].text.split($t.lineBreakRegex).length,t[a].width=r,t[a].height=fe(t[a].text,o);else{let l=t[a].text.split($t.lineBreakRegex);t[a].textLines=l.length;let e=0;t[a].height=0,t[a].width=0;for(const n of l)t[a].width=Math.max(Tt(n,o),t[a].width),e=fe(n,o),t[a].height=t[a].height+e}}y(j,"calcC4ShapeTextWH");var Ae=y(function(a,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,r=Ut(_);r.fontSize=r.fontSize+2,r.fontWeight="bold";let l=Tt(t.label.text,r);j("label",t,o,r,l),z.drawBoundary(a,t,_)},"drawBoundary"),ke=y(function(a,t,s,o){let r=0;for(const l of o){r=0;const e=s[l];let n=Pt(_,e.typeC4Shape.text);switch(n.fontSize=n.fontSize-2,e.typeC4Shape.width=Tt("«"+e.typeC4Shape.text+"»",n),e.typeC4Shape.height=n.fontSize+2,e.typeC4Shape.Y=_.c4ShapePadding,r=e.typeC4Shape.Y+e.typeC4Shape.height-4,e.image={width:0,height:0,Y:0},e.typeC4Shape.text){case"person":case"external_person":e.image.width=48,e.image.height=48,e.image.Y=r,r=e.image.Y+e.image.height;break}e.sprite&&(e.image.width=48,e.image.height=48,e.image.Y=r,r=e.image.Y+e.image.height);let i=e.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,e.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",e,i,d,u),e.label.Y=r+8,r=e.label.Y+e.label.height,e.type&&e.type.text!==""){e.type.text="["+e.type.text+"]";let m=Pt(_,e.typeC4Shape.text);j("type",e,i,m,u),e.type.Y=r+5,r=e.type.Y+e.type.height}else if(e.techn&&e.techn.text!==""){e.techn.text="["+e.techn.text+"]";let m=Pt(_,e.techn.text);j("techn",e,i,m,u),e.techn.Y=r+5,r=e.techn.Y+e.techn.height}let f=r,g=e.label.width;if(e.descr&&e.descr.text!==""){let m=Pt(_,e.typeC4Shape.text);j("descr",e,i,m,u),e.descr.Y=r+20,r=e.descr.Y+e.descr.height,g=Math.max(e.label.width,e.descr.width),f=r-e.descr.textLines*5}g=g+_.c4ShapePadding,e.width=Math.max(e.width||_.width,g,_.width),e.height=Math.max(e.height||_.height,f,_.height),e.margin=e.margin||_.c4ShapeMargin,a.insert(e),z.drawC4Shape(t,e,_)}a.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Rt,Y=(Rt=class{constructor(t,s){this.x=t,this.y=s}},y(Rt,"Point"),Rt),pe=y(function(a,t){let s=a.x,o=a.y,r=t.x,l=t.y,e=s+a.width/2,n=o+a.height/2,i=Math.abs(s-r),u=Math.abs(o-l),d=u/i,f=a.height/a.width,g=null;return o==l&&sr?g=new Y(s,n):s==r&&ol&&(g=new Y(e,o)),s>r&&o=d?g=new Y(s,n+d*a.width/2):g=new Y(e-i/u*a.height/2,o+a.height):s=d?g=new Y(s+a.width,n+d*a.width/2):g=new Y(e+i/u*a.height/2,o+a.height):sl?f>=d?g=new Y(s+a.width,n-d*a.width/2):g=new Y(e+a.height/2*i/u,o):s>r&&o>l&&(f>=d?g=new Y(s,n-a.width/2*d):g=new Y(e-a.height/2*i/u,o)),g},"getIntersectPoint"),T0=y(function(a,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=pe(a,s);s.x=a.x+a.width/2,s.y=a.y+a.height/2;let r=pe(t,s);return{startPoint:o,endPoint:r}},"getIntersectPoints"),O0=y(function(a,t,s,o,r){let l=0;for(let e of t){l=l+1;let n=e.wrap&&_.wrap,i=w0(_);o.db.getC4Type()==="C4Dynamic"&&(e.label.text=l+": "+e.label.text);let d=Tt(e.label.text,i);j("label",e,n,i,d),e.techn&&e.techn.text!==""&&(d=Tt(e.techn.text,i),j("techn",e,n,i,d)),e.descr&&e.descr.text!==""&&(d=Tt(e.descr.text,i),j("descr",e,n,i,d));let f=s(e.from),g=s(e.to),m=T0(f,g);e.startPoint=m.startPoint,e.endPoint=m.endPoint}z.drawRels(a,t,_,r)},"drawRels");function re(a,t,s,o,r){let l=new Ee(r);l.data.widthLimit=s.data.widthLimit/Math.min(ee,o.length);for(let[e,n]of o.entries()){let i=0;n.image={width:0,height:0,Y:0},n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height);let u=n.wrap&&_.wrap,d=Ut(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",n,u,d,l.data.widthLimit),n.label.Y=i+8,i=n.label.Y+n.label.height,n.type&&n.type.text!==""){n.type.text="["+n.type.text+"]";let O=Ut(_);j("type",n,u,O,l.data.widthLimit),n.type.Y=i+5,i=n.type.Y+n.type.height}if(n.descr&&n.descr.text!==""){let O=Ut(_);O.fontSize=O.fontSize-2,j("descr",n,u,O,l.data.widthLimit),n.descr.Y=i+20,i=n.descr.Y+n.descr.height}if(e==0||e%ee===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+i;l.setData(O,O,S,S)}else{let O=l.data.stopx!==l.data.startx?l.data.stopx+_.diagramMarginX:l.data.startx,S=l.data.starty;l.setData(O,O,S,S)}l.name=n.alias;let f=r.db.getC4ShapeArray(n.alias),g=r.db.getC4ShapeKeys(n.alias);g.length>0&&ke(l,a,f,g),t=n.alias;let m=r.db.getBoundaries(t);m.length>0&&re(a,t,l,m,r),n.alias!=="global"&&Ae(a,n,l),s.data.stopy=Math.max(l.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(l.data.stopx+_.c4ShapeMargin,s.data.stopx),Xt=Math.max(Xt,s.data.stopx),Wt=Math.max(Wt,s.data.stopy)}}y(re,"drawInsideBoundary");var R0=y(function(a,t,s,o){_=Bt().c4;const r=Bt().securityLevel;let l;r==="sandbox"&&(l=jt("#i"+t));const e=r==="sandbox"?jt(l.nodes()[0].contentDocument.body):jt("body");let n=o.db;o.db.setWrap(_.wrap),ve=n.getC4ShapeInRow(),ee=n.getC4BoundaryInRow(),de.debug(`C:${JSON.stringify(_,null,2)}`);const i=r==="sandbox"?e.select(`[id="${t}"]`):jt(`[id="${t}"]`);z.insertComputerIcon(i,t),z.insertDatabaseIcon(i,t),z.insertClockIcon(i,t);let u=new Ee(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Xt=_.diagramMarginX,Wt=_.diagramMarginY;const d=o.db.getTitle();let f=o.db.getBoundaries("");re(i,"",u,f,o),z.insertArrowHead(i,t),z.insertArrowEnd(i,t),z.insertArrowCrossHead(i,t),z.insertArrowFilledHead(i,t),O0(i,o.db.getRels(),o.db.getC4Shape,o,t),u.data.stopx=Xt,u.data.stopy=Wt;const g=u.data;let O=g.stopy-g.starty+2*_.diagramMarginY;const P=g.stopx-g.startx+2*_.diagramMarginX;d&&i.append("text").text(d).attr("x",(g.stopx-g.startx)/2-4*_.diagramMarginX).attr("y",g.starty+_.diagramMarginY),Le(i,O,P,_.useMaxWidth);const M=d?60:0;i.attr("viewBox",g.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),de.debug("models:",g)},"draw"),ye={drawPersonOrSystemArray:ke,drawBoundary:Ae,setConf:ae,draw:R0},S0=y(a=>`.person { + stroke: ${a.personBorder}; + fill: ${a.personBkg}; + } +`,"getStyles"),D0=S0,M0={parser:Ue,db:te,renderer:ye,styles:D0,init:y(({c4:a,wrap:t})=>{ye.setConf(a),te.setWrap(t)},"init")};export{M0 as diagram}; diff --git a/dist/assets/channel-B5wXLQie.js b/dist/assets/channel-B5wXLQie.js new file mode 100644 index 0000000..260bed5 --- /dev/null +++ b/dist/assets/channel-B5wXLQie.js @@ -0,0 +1 @@ +import{ai as o,aj as n}from"./index-mLPbTfpz.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c}; diff --git a/dist/assets/chunk-2J33WTMH-CsIyCw5_.js b/dist/assets/chunk-2J33WTMH-CsIyCw5_.js new file mode 100644 index 0000000..bb1a20c --- /dev/null +++ b/dist/assets/chunk-2J33WTMH-CsIyCw5_.js @@ -0,0 +1 @@ +import{_ as a,e as w,l as x}from"./index-mLPbTfpz.js";var d=a((e,t,i,o)=>{e.attr("class",i);const{width:r,height:h,x:n,y:c}=u(e,t);w(e,h,r,o);const s=l(n,c,r,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{var o;const i=((o=e.node())==null?void 0:o.getBBox())||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,o,r)=>`${e-r} ${t-r} ${i} ${o}`,"createViewBox");export{d as s}; diff --git a/dist/assets/chunk-4BX2VUAB-DTW3NaPN.js b/dist/assets/chunk-4BX2VUAB-DTW3NaPN.js new file mode 100644 index 0000000..2f60a37 --- /dev/null +++ b/dist/assets/chunk-4BX2VUAB-DTW3NaPN.js @@ -0,0 +1 @@ +import{_ as l}from"./index-mLPbTfpz.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p}; diff --git a/dist/assets/chunk-55IACEB6-DT6mN9fZ.js b/dist/assets/chunk-55IACEB6-DT6mN9fZ.js new file mode 100644 index 0000000..67f291b --- /dev/null +++ b/dist/assets/chunk-55IACEB6-DT6mN9fZ.js @@ -0,0 +1 @@ +import{_ as a,d as o}from"./index-mLPbTfpz.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; diff --git a/dist/assets/chunk-727SXJPM-DkN7wOmK.js b/dist/assets/chunk-727SXJPM-DkN7wOmK.js new file mode 100644 index 0000000..f30188b --- /dev/null +++ b/dist/assets/chunk-727SXJPM-DkN7wOmK.js @@ -0,0 +1,206 @@ +import{g as st}from"./chunk-FMBD7UC4-Crb6W-Lm.js";import{c as it}from"./chunk-ND2GUHAM-DRVGyKsL.js";import{g as at}from"./chunk-55IACEB6-DT6mN9fZ.js";import{s as rt}from"./chunk-2J33WTMH-CsIyCw5_.js";import{_ as g,l as we,c as F,o as nt,r as ut,u as Ve,d as fe,y as lt,b as ct,a as ot,s as ht,g as dt,p as pt,q as At,k as I,z as ft,x as gt,i as mt,Q as z}from"./index-mLPbTfpz.js";var Pe=function(){var s=g(function(O,o,d,p){for(d=d||{},p=O.length;p--;d[O[p]]=o);return d},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],u=[1,26],h=[1,42],f=[1,24],c=[1,25],m=[1,32],B=[1,33],R=[1,34],b=[1,45],me=[1,35],Ce=[1,36],be=[1,37],ke=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],re=[1,62],_e=[1,63],Se=[1,64],S=[1,8,9,41],Me=[1,77],G=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ne=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ue=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],le=[1,103],Q=[1,121],W=[1,117],j=[1,113],X=[1,119],q=[1,114],H=[1,115],J=[1,116],Z=[1,118],$=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],ce=[12,39],Ne=[1,8,9,39,41,44,46],oe=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:g(function(o,d,p,l,C,e,ee){var t=e.length-1;switch(C){case 8:this.$=e[t-1];break;case 9:case 10:case 13:case 15:this.$=e[t];break;case 11:case 14:this.$=e[t-2]+"."+e[t];break;case 12:case 16:this.$=e[t-1]+e[t];break;case 17:case 18:this.$=e[t-1]+"~"+e[t]+"~";break;case 19:l.addRelation(e[t]);break;case 20:e[t-1].title=l.cleanupLabel(e[t]),l.addRelation(e[t-1]);break;case 31:this.$=e[t].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[t].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[t-3],e[t-1][0],e[t-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[t-4],e[t-1][0],e[t-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[t]);break;case 37:this.$=l.addNamespace(e[t-1],e[t]);break;case 38:this.$=[[e[t]],[]];break;case 39:this.$=[[e[t-1]],[]];break;case 40:e[t][0].unshift(e[t-2]),this.$=e[t];break;case 41:this.$=[[],[e[t]]];break;case 42:this.$=[[],[e[t-1]]];break;case 43:e[t][1].unshift(e[t-2]),this.$=e[t];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[t];break;case 48:l.setCssClass(e[t-2],e[t]);break;case 49:l.addMembers(e[t-3],e[t-1]);break;case 51:l.setCssClass(e[t-5],e[t-3]),l.addMembers(e[t-5],e[t-1]);break;case 52:l.addAnnotation(e[t-3],e[t-1]);break;case 53:l.addAnnotation(e[t-6],e[t-4]),l.addMembers(e[t-6],e[t-1]);break;case 54:l.addAnnotation(e[t-5],e[t-3]);break;case 55:this.$=e[t],l.addClass(e[t]);break;case 56:this.$=e[t-1],l.addClass(e[t-1]),l.setClassLabel(e[t-1],e[t]);break;case 60:l.addAnnotation(e[t],e[t-2]);break;case 61:case 74:this.$=[e[t]];break;case 62:e[t].push(e[t-1]),this.$=e[t];break;case 63:break;case 64:l.addMember(e[t-1],l.cleanupLabel(e[t]));break;case 65:break;case 66:break;case 67:this.$={id1:e[t-2],id2:e[t],relation:e[t-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[t-3],id2:e[t],relation:e[t-1],relationTitle1:e[t-2],relationTitle2:"none"};break;case 69:this.$={id1:e[t-3],id2:e[t],relation:e[t-2],relationTitle1:"none",relationTitle2:e[t-1]};break;case 70:this.$={id1:e[t-4],id2:e[t],relation:e[t-2],relationTitle1:e[t-3],relationTitle2:e[t-1]};break;case 71:this.$=l.addNote(e[t],e[t-1]);break;case 72:this.$=l.addNote(e[t]);break;case 73:this.$=e[t-2],l.defineClass(e[t-1],e[t]);break;case 75:this.$=e[t-2].concat([e[t]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[t-2],type2:e[t],lineType:e[t-1]};break;case 81:this.$={type1:"none",type2:e[t],lineType:e[t-1]};break;case 82:this.$={type1:e[t-1],type2:"none",lineType:e[t]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[t]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[t-2],l.setClickEvent(e[t-1],e[t]);break;case 92:case 98:this.$=e[t-3],l.setClickEvent(e[t-2],e[t-1]),l.setTooltip(e[t-2],e[t]);break;case 93:this.$=e[t-2],l.setLink(e[t-1],e[t]);break;case 94:this.$=e[t-3],l.setLink(e[t-2],e[t-1],e[t]);break;case 95:this.$=e[t-3],l.setLink(e[t-2],e[t-1]),l.setTooltip(e[t-2],e[t]);break;case 96:this.$=e[t-4],l.setLink(e[t-3],e[t-2],e[t]),l.setTooltip(e[t-3],e[t-1]);break;case 99:this.$=e[t-3],l.setClickEvent(e[t-2],e[t-1],e[t]);break;case 100:this.$=e[t-4],l.setClickEvent(e[t-3],e[t-2],e[t-1]),l.setTooltip(e[t-3],e[t]);break;case 101:this.$=e[t-3],l.setLink(e[t-2],e[t]);break;case 102:this.$=e[t-4],l.setLink(e[t-3],e[t-1],e[t]);break;case 103:this.$=e[t-4],l.setLink(e[t-3],e[t-1]),l.setTooltip(e[t-3],e[t]);break;case 104:this.$=e[t-5],l.setLink(e[t-4],e[t-2],e[t]),l.setTooltip(e[t-4],e[t-1]);break;case 105:this.$=e[t-2],l.setCssStyle(e[t-1],e[t]);break;case 106:l.setCssClass(e[t-1],e[t]);break;case 107:this.$=[e[t]];break;case 108:e[t-2].push(e[t]),this.$=e[t-2];break;case 110:this.$=e[t-1]+e[t];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:f,52:c,54:m,56:B,57:R,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(Be,[2,5],{8:[1,48]}),{8:[1,49]},s(A,[2,19],{22:[1,50]}),s(A,[2,21]),s(A,[2,22]),s(A,[2,23]),s(A,[2,24]),s(A,[2,25]),s(A,[2,26]),s(A,[2,27]),s(A,[2,28]),s(A,[2,29]),s(A,[2,30]),{34:[1,51]},{36:[1,52]},s(A,[2,33]),s(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se}),{39:[1,65]},s(S,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),s(A,[2,65]),s(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},s(A,[2,76]),s(A,[2,77]),s(A,[2,78]),s(A,[2,79]),s(G,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),s(G,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},s(ne,[2,133]),s(ne,[2,134]),s(ne,[2,135]),s(ne,[2,136]),s([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),s(Be,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:u,48:h,51:f,52:c,54:m,56:B,57:R,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:f,52:c,54:m,56:B,57:R,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},s(A,[2,20]),s(A,[2,31]),s(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se},s(A,[2,64]),{67:93,73:_e,74:Se},s(ue,[2,83],{66:94,68:te,69:se,70:ie,71:ae,72:re}),s(K,[2,84]),s(K,[2,85]),s(K,[2,86]),s(K,[2,87]),s(K,[2,88]),s(Re,[2,89]),s(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:h,54:m,56:B},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:le},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:Q,50:W,59:110,60:j,82:X,84:111,85:112,86:q,87:H,88:J,89:Z,90:$},{60:[1,122]},{13:Me,55:123},s(S,[2,72]),s(S,[2,138]),{22:Q,50:W,59:124,60:j,61:[1,125],82:X,84:111,85:112,86:q,87:H,88:J,89:Z,90:$},s(Ge,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},s(G,[2,16]),s(G,[2,17]),s(G,[2,18]),{11:127,12:Ue,39:[2,36]},s(ce,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),s(ce,[2,10]),s(Ne,[2,55],{11:131,12:Ue}),s(Be,[2,7]),{9:[1,132]},s(oe,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},s(ue,[2,82],{66:136,68:te,69:se,70:ie,71:ae,72:re}),s(ue,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:h,54:m,56:B},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},s(S,[2,48],{39:[1,142]}),{41:[1,143]},s(S,[2,50]),{41:[2,61],45:144,51:le},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},s(A,[2,91],{13:[1,147]}),s(A,[2,93],{13:[1,149],77:[1,148]}),s(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},s(A,[2,105],{61:ze}),s(Ye,[2,107],{85:154,22:Q,50:W,60:j,82:X,86:q,87:H,88:J,89:Z,90:$}),s(x,[2,109]),s(x,[2,111]),s(x,[2,112]),s(x,[2,113]),s(x,[2,114]),s(x,[2,115]),s(x,[2,116]),s(x,[2,117]),s(x,[2,118]),s(x,[2,119]),s(A,[2,106]),s(S,[2,71]),s(A,[2,73],{61:ze}),{60:[1,155]},s(G,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},s(ce,[2,12]),s(Ne,[2,56]),{1:[2,4]},s(oe,[2,69]),s(oe,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},s(ue,[2,80]),s(S,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:h,54:m,56:B},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:h,54:m,56:B},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:h,54:m,56:B},{45:163,51:le},s(S,[2,49]),{41:[2,62]},s(S,[2,52],{39:[1,164]}),s(A,[2,60]),s(A,[2,92]),s(A,[2,94]),s(A,[2,95],{77:[1,165]}),s(A,[2,98]),s(A,[2,99],{13:[1,166]}),s(A,[2,101],{13:[1,168],77:[1,167]}),{22:Q,50:W,60:j,82:X,84:169,85:112,86:q,87:H,88:J,89:Z,90:$},s(x,[2,110]),s(Ge,[2,75]),{14:[1,170]},s(ce,[2,11]),s(oe,[2,70]),s(S,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:le},s(A,[2,96]),s(A,[2,100]),s(A,[2,102]),s(A,[2,103],{77:[1,174]}),s(Ye,[2,108],{85:154,22:Q,50:W,60:j,82:X,86:q,87:H,88:J,89:Z,90:$}),s(Ne,[2,8]),s(S,[2,51]),{41:[1,175]},s(S,[2,54]),s(A,[2,104]),s(S,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:g(function(o,d){if(d.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=d,p}},"parseError"),parse:g(function(o){var d=this,p=[0],l=[],C=[null],e=[],ee=this.table,t="",de=0,Ke=0,Ze=2,Qe=1,$e=e.slice.call(arguments,1),D=Object.create(this.lexer),V={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(V.yy[xe]=this.yy[xe]);D.setInput(o,V.yy),V.yy.lexer=D,V.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var et=D.options&&D.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(N){p.length=p.length-2*N,C.length=C.length-N,e.length=e.length-N}g(tt,"popStack");function We(){var N;return N=l.pop()||D.lex()||Qe,typeof N!="number"&&(N instanceof Array&&(l=N,N=l.pop()),N=d.symbols_[N]||N),N}g(We,"lex");for(var _,P,L,Ie,U={},pe,v,je,Ae;;){if(P=p[p.length-1],this.defaultActions[P]?L=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=We()),L=ee[P]&&ee[P][_]),typeof L>"u"||!L.length||!L[0]){var Oe="";Ae=[];for(pe in ee[P])this.terminals_[pe]&&pe>Ze&&Ae.push("'"+this.terminals_[pe]+"'");D.showPosition?Oe="Parse error on line "+(de+1)+`: +`+D.showPosition()+` +Expecting `+Ae.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Oe="Parse error on line "+(de+1)+": Unexpected "+(_==Qe?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Oe,{text:D.match,token:this.terminals_[_]||_,line:D.yylineno,loc:ve,expected:Ae})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch(L[0]){case 1:p.push(_),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),_=null,Ke=D.yyleng,t=D.yytext,de=D.yylineno,ve=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],U.$=C[C.length-v],U._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},et&&(U._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),Ie=this.performAction.apply(U,[t,Ke,de,V.yy,L[1],C,e].concat($e)),typeof Ie<"u")return Ie;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(U.$),e.push(U._$),je=ee[p[p.length-2]][p[p.length-1]],p.push(je);break;case 3:return!0}}return!0},"parse")},Je=function(){var O={EOF:1,parseError:g(function(d,p){if(this.yy.parser)this.yy.parser.parseError(d,p);else throw new Error(d)},"parseError"),setInput:g(function(o,d){return this.yy=d||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},"setInput"),input:g(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var d=o.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),o},"input"),unput:g(function(o){var d=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var l=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),p.length-1&&(this.yylineno-=p.length-1);var C=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:p?(p.length===l.length?this.yylloc.first_column:0)+l[l.length-p.length].length-p[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(o){this.unput(this.match.slice(o))},"less"),pastInput:g(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(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,"")},"upcomingInput"),showPosition:g(function(){var o=this.pastInput(),d=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+d+"^"},"showPosition"),test_match:g(function(o,d){var p,l,C;if(this.options.backtrack_lexer&&(C={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&&(C.yylloc.range=this.yylloc.range.slice(0))),l=o[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.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],p=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var e in C)this[e]=C[e];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,d,p,l;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),e=0;ed[0].length)){if(d=p,l=e,this.options.backtrack_lexer){if(o=this.test_match(p,C[e]),o!==!1)return o;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(o=this.test_match(d,C[l]),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})},"next"),lex:g(function(){var d=this.next();return d||this.lex()},"lex"),begin:g(function(d){this.conditionStack.push(d)},"begin"),popState:g(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:g(function(d){this.begin(d)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(d,p,l,C){switch(l){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;case 35:return"EOF_IN_STRUCT";case 36:return 8;case 37:break;case 38:return"EDGE_STATE";case 39:return this.begin("class"),48;case 40:return this.popState(),8;case 41:break;case 42:return this.popState(),this.popState(),41;case 43:return this.begin("class-body"),39;case 44:return this.popState(),41;case 45:return"EOF_IN_STRUCT";case 46:return"EDGE_STATE";case 47:return"OPEN_IN_STRUCT";case 48:break;case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 62:this.popState();break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return"EQUALS";case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}};return O}();Le.lexer=Je;function he(){this.yy={}}return g(he,"Parser"),he.prototype=Le,Le.Parser=he,new he}();Pe.parser=Pe;var _t=Pe,Xe=["#","+","~","-",""],Y,qe=(Y=class{constructor(i,a){this.memberType=a,this.visibility="",this.classifier="",this.text="";const r=mt(i,F());this.parseMember(r)}getDisplayDetails(){let i=this.visibility+z(this.id);this.memberType==="method"&&(i+=`(${z(this.parameters.trim())})`,this.returnType&&(i+=" : "+z(this.returnType))),i=i.trim();const a=this.parseClassifier();return{displayText:i,cssStyle:a}}parseMember(i){let a="";if(this.memberType==="method"){const u=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(u){const h=u[1]?u[1].trim():"";if(Xe.includes(h)&&(this.visibility=h),this.id=u[2],this.parameters=u[3]?u[3].trim():"",a=u[4]?u[4].trim():"",this.returnType=u[5]?u[5].trim():"",a===""){const f=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(f)&&(a=f,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const n=i.length,u=i.substring(0,1),h=i.substring(n-1);Xe.includes(u)&&(this.visibility=u),/[$*]/.exec(h)&&(a=h),this.id=i.substring(this.visibility===""?0:1,a===""?n:n-1)}this.classifier=a,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const r=`${this.visibility?"\\"+this.visibility:""}${z(this.id)}${this.memberType==="method"?`(${z(this.parameters)})${this.returnType?" : "+z(this.returnType):""}`:""}`;this.text=r.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},g(Y,"ClassMember"),Y),ge="classId-",He=0,M=g(s=>I.sanitizeText(s,F()),"sanitizeText"),w,St=(w=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=g(i=>{const a=it();fe(i).select("svg").selectAll("g").filter(function(){return fe(this).attr("title")!==null}).on("mouseover",u=>{const h=fe(u.currentTarget),f=h.attr("title");if(!f)return;const c=u.currentTarget.getBoundingClientRect();a.transition().duration(200).style("opacity",".9"),a.html(lt.sanitize(f)).style("left",`${window.scrollX+c.left+c.width/2}px`).style("top",`${window.scrollY+c.bottom+4}px`),h.classed("hover",!0)}).on("mouseout",u=>{a.transition().duration(500).style("opacity",0),fe(u.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=ct,this.getAccTitle=ot,this.setAccDescription=ht,this.getAccDescription=dt,this.setDiagramTitle=pt,this.getDiagramTitle=At,this.getConfig=g(()=>F().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(i){const a=I.sanitizeText(i,F());let r="",n=a;if(a.indexOf("~")>0){const u=a.split("~");n=M(u[0]),r=M(u[1])}return{className:n,type:r}}setClassLabel(i,a){const r=I.sanitizeText(i,F());a&&(a=M(a));const{className:n}=this.splitClassNameAndType(r);this.classes.get(n).label=a,this.classes.get(n).text=`${a}${this.classes.get(n).type?`<${this.classes.get(n).type}>`:""}`}addClass(i){const a=I.sanitizeText(i,F()),{className:r,type:n}=this.splitClassNameAndType(a);if(this.classes.has(r))return;const u=I.sanitizeText(r,F());this.classes.set(u,{id:u,type:n,label:u,text:`${u}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:ge+u+"-"+He}),He++}addInterface(i,a){const r={id:`interface${this.interfaces.length}`,label:i,classId:a};this.interfaces.push(r)}setDiagramId(i){this.diagramId=i}lookUpDomId(i){const a=I.sanitizeText(i,F());if(this.classes.has(a)){const r=this.classes.get(a).domId;return this.diagramId?`${this.diagramId}-${r}`:r}throw new Error("Class not found: "+a)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",ft()}getClass(i){return this.classes.get(i)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(i){const a=typeof i=="number"?`note${i}`:i;return this.notes.get(a)}getNotes(){return this.notes}addRelation(i){we.debug("Adding relation: "+JSON.stringify(i));const a=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];i.relation.type1===this.relationType.LOLLIPOP&&!a.includes(i.relation.type2)?(this.addClass(i.id2),this.addInterface(i.id1,i.id2),i.id1=`interface${this.interfaces.length-1}`):i.relation.type2===this.relationType.LOLLIPOP&&!a.includes(i.relation.type1)?(this.addClass(i.id1),this.addInterface(i.id2,i.id1),i.id2=`interface${this.interfaces.length-1}`):(this.addClass(i.id1),this.addClass(i.id2)),i.id1=this.splitClassNameAndType(i.id1).className,i.id2=this.splitClassNameAndType(i.id2).className,i.relationTitle1=I.sanitizeText(i.relationTitle1.trim(),F()),i.relationTitle2=I.sanitizeText(i.relationTitle2.trim(),F()),this.relations.push(i)}addAnnotation(i,a){const r=this.splitClassNameAndType(i).className;this.classes.get(r).annotations.push(a)}addMember(i,a){this.addClass(i);const r=this.splitClassNameAndType(i).className,n=this.classes.get(r);if(typeof a=="string"){const u=a.trim();u.startsWith("<<")&&u.endsWith(">>")?n.annotations.push(M(u.substring(2,u.length-2))):u.indexOf(")")>0?n.methods.push(new qe(u,"method")):u&&n.members.push(new qe(u,"attribute"))}}addMembers(i,a){Array.isArray(a)&&(a.reverse(),a.forEach(r=>this.addMember(i,r)))}addNote(i,a){const r=this.notes.size,n={id:`note${r}`,class:a,text:i,index:r};return this.notes.set(n.id,n),n.id}cleanupLabel(i){return i.startsWith(":")&&(i=i.substring(1)),M(i.trim())}setCssClass(i,a){i.split(",").forEach(r=>{let n=r;/\d/.exec(r[0])&&(n=ge+n);const u=this.classes.get(n);u&&(u.cssClasses+=" "+a)})}defineClass(i,a){for(const r of i){let n=this.styleClasses.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},this.styleClasses.set(r,n)),a&&a.forEach(u=>{if(/color/.exec(u)){const h=u.replace("fill","bgFill");n.textStyles.push(h)}n.styles.push(u)}),this.classes.forEach(u=>{u.cssClasses.includes(r)&&u.styles.push(...a.flatMap(h=>h.split(",")))})}}setTooltip(i,a){i.split(",").forEach(r=>{a!==void 0&&(this.classes.get(r).tooltip=M(a))})}getTooltip(i,a){return a&&this.namespaces.has(a)?this.namespaces.get(a).classes.get(i).tooltip:this.classes.get(i).tooltip}setLink(i,a,r){const n=F();i.split(",").forEach(u=>{let h=u;/\d/.exec(u[0])&&(h=ge+h);const f=this.classes.get(h);f&&(f.link=Ve.formatUrl(a,n),n.securityLevel==="sandbox"?f.linkTarget="_top":typeof r=="string"?f.linkTarget=M(r):f.linkTarget="_blank")}),this.setCssClass(i,"clickable")}setClickEvent(i,a,r){i.split(",").forEach(n=>{this.setClickFunc(n,a,r),this.classes.get(n).haveCallback=!0}),this.setCssClass(i,"clickable")}setClickFunc(i,a,r){const n=I.sanitizeText(i,F());if(F().securityLevel!=="loose"||a===void 0)return;const h=n;if(this.classes.has(h)){let f=[];if(typeof r=="string"){f=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let c=0;c{const c=this.lookUpDomId(h),m=document.querySelector(`[id="${c}"]`);m!==null&&m.addEventListener("click",()=>{Ve.runFunc(a,...f)},!1)})}}bindFunctions(i){this.functions.forEach(a=>{a(i)})}escapeHtml(i){return i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(i){this.direction=i}static resolveQualifiedId(i,a){const r=a.at(-1);return r?`${r}.${i}`:i}static getAncestorIds(i){const a=i.split("."),r=new Array(a.length);r[0]=a[0];for(let n=1;n0?u[h-1]:void 0,m=h===u.length-1,B=m&&a?a:n[h];this.namespaces.has(f)?m&&(this.namespaces.get(f).explicit=!0):this.namespaces.set(f,this.createNamespaceNode(f,B,c,m)),c&&this.linkParentChild(c,f)}return r}popNamespace(){this.namespaceStack.pop()}getNamespace(i){return this.namespaces.get(i)}getNamespaces(){return this.namespaces}addClassesToNamespace(i,a,r){if(this.namespaces.has(i)){for(const n of a){const{className:u}=this.splitClassNameAndType(n),h=this.getClass(u);h.parent=i,this.namespaces.get(i).classes.set(u,h)}for(const n of r){const u=this.getNote(n);u.parent=i,this.namespaces.get(i).notes.set(n,u)}}}setCssStyle(i,a){const r=this.classes.get(i);if(!(!a||!r))for(const n of a)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)}getArrowMarker(i){let a;switch(i){case 0:a="aggregation";break;case 1:a="extension";break;case 2:a="composition";break;case 3:a="dependency";break;case 4:a="lollipop";break;default:a="none"}return a}resolveExplicitAncestor(i){let a=i;for(;a;){const r=this.namespaces.get(a);if(!r)return;if(r.explicit)return a;a=r.parent}}getData(){var h,f;const i=[],a=[],r=F(),n=((h=r.class)==null?void 0:h.hierarchicalNamespaces)??!0;for(const c of this.namespaces.values()){if(!n&&!c.explicit)continue;const m={id:c.id,label:n?c.label:c.id,isGroup:!0,padding:r.class.padding??16,shape:"rect",cssStyles:[],look:r.look,parentId:n?c.parent:void 0};i.push(m)}for(const c of this.classes.values()){const m=n?c.parent:this.resolveExplicitAncestor(c.parent),B={...c,type:void 0,isGroup:!1,parentId:m,look:r.look};i.push(B)}for(const c of this.notes.values()){const m=n?c.parent:this.resolveExplicitAncestor(c.parent),B={id:c.id,label:c.text,isGroup:!1,shape:"note",padding:r.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look,parentId:m,labelType:"markdown"};i.push(B);const R=(f=this.classes.get(c.class))==null?void 0:f.id;if(R){const b={id:`edgeNote${c.index}`,start:c.id,end:R,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:r.look};a.push(b)}}for(const c of this.interfaces){const m={id:c.id,label:c.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:r.look};i.push(m)}let u=0;for(const c of this.relations){u++;const m={id:gt(c.id1,c.id2,{prefix:"id",counter:u}),start:c.id1,end:c.id2,type:"normal",label:c.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(c.relation.type1),arrowTypeEnd:this.getArrowMarker(c.relation.type2),startLabelRight:c.relationTitle1==="none"?"":c.relationTitle1,endLabelLeft:c.relationTitle2==="none"?"":c.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:c.style||"",pattern:c.relation.lineType==1?"dashed":"solid",look:r.look,labelType:"markdown"};a.push(m)}return{nodes:i,edges:a,other:{},config:r,direction:this.getDirection()}}},g(w,"ClassDB"),w),Ct=g(s=>`g.classGroup text { + fill: ${s.nodeBorder||s.classText}; + stroke: none; + font-family: ${s.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + + .cluster-label text { + fill: ${s.titleColor}; + } + .cluster-label span { + color: ${s.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .cluster rect { + fill: ${s.clusterBkg}; + stroke: ${s.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${s.titleColor}; + } + + .cluster span { + color: ${s.titleColor}; + } + +.nodeLabel, .edgeLabel { + color: ${s.classText}; +} + +.noteLabel .nodeLabel, .noteLabel .edgeLabel { + color: ${s.noteTextColor}; +} +.edgeLabel .label rect { + fill: ${s.mainBkg}; +} +.label text { + fill: ${s.classText}; +} + +.labelBkg { + background: ${s.mainBkg}; +} +.edgeLabel .label span { + background: ${s.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${s.mainBkg}; + stroke: ${s.nodeBorder}; + stroke-width: ${s.strokeWidth}; + } + + +.divider { + stroke: ${s.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${s.mainBkg}; + stroke: ${s.nodeBorder}; +} + +g.classGroup line { + stroke: ${s.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${s.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${s.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${s.lineColor}; + stroke-width: ${s.strokeWidth}; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +[id$="-compositionStart"], .composition { + fill: ${s.lineColor} !important; + stroke: ${s.lineColor} !important; + stroke-width: 1; +} + +[id$="-compositionEnd"], .composition { + fill: ${s.lineColor} !important; + stroke: ${s.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyStart"], .dependency { + fill: ${s.lineColor} !important; + stroke: ${s.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyEnd"], .dependency { + fill: ${s.lineColor} !important; + stroke: ${s.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionStart"], .extension { + fill: transparent !important; + stroke: ${s.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionEnd"], .extension { + fill: transparent !important; + stroke: ${s.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationStart"], .aggregation { + fill: transparent !important; + stroke: ${s.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationEnd"], .aggregation { + fill: transparent !important; + stroke: ${s.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopStart"], .lollipop { + fill: ${s.mainBkg} !important; + stroke: ${s.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopEnd"], .lollipop { + fill: ${s.mainBkg} !important; + stroke: ${s.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${s.textColor}; +} + +.edgeLabel[data-look="neo"] { + background-color: ${s.edgeLabelBackground}; + p { + background-color: ${s.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${s.edgeLabelBackground}; + fill: ${s.edgeLabelBackground}; + } + text-align: center; +} + ${st()} +`,"getStyles"),Nt=Ct,bt=g((s,i="TB")=>{if(!s.doc)return i;let a=i;for(const r of s.doc)r.stmt==="dir"&&(a=r.value);return a},"getDir"),kt=g(function(s,i){return i.db.getClasses()},"getClasses"),Et=g(async function(s,i,a,r){we.info("REF0:"),we.info("Drawing class diagram (v3)",i);const{securityLevel:n,state:u,layout:h}=F();r.db.setDiagramId(i);const f=r.db.getData(),c=at(i,n);f.type=r.type,f.layoutAlgorithm=nt(h),f.nodeSpacing=(u==null?void 0:u.nodeSpacing)||50,f.rankSpacing=(u==null?void 0:u.rankSpacing)||50,f.markers=["aggregation","extension","composition","dependency","lollipop"],f.diagramId=i,await ut(f,c);const m=8;Ve.insertTitle(c,"classDiagramTitleText",(u==null?void 0:u.titleTopMargin)??25,r.db.getDiagramTitle()),rt(c,m,"classDiagram",(u==null?void 0:u.useMaxWidth)??!0)},"draw"),Lt={getClasses:kt,draw:Et,getDir:bt};export{St as C,_t as a,Lt as c,Nt as s}; diff --git a/dist/assets/chunk-AQP2D5EJ-B3_Jw0pD.js b/dist/assets/chunk-AQP2D5EJ-B3_Jw0pD.js new file mode 100644 index 0000000..6562ce0 --- /dev/null +++ b/dist/assets/chunk-AQP2D5EJ-B3_Jw0pD.js @@ -0,0 +1,231 @@ +import{g as te}from"./chunk-55IACEB6-DT6mN9fZ.js";import{s as ee}from"./chunk-2J33WTMH-CsIyCw5_.js";import{_ as d,l as b,c as F,r as se,u as ie,a as re,b as ae,g as ne,s as oe,p as le,q as ce,T as he,k as z,z as ue}from"./index-mLPbTfpz.js";var vt=function(){var t=d(function(U,o,h,n){for(h=h||{},n=U.length;n--;h[U[n]]=o);return h},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],l=[1,9],u=[1,11],p=[1,16],S=[1,17],T=[1,18],E=[1,19],m=[1,33],L=[1,20],v=[1,21],O=[1,22],w=[1,23],C=[1,24],f=[1,26],k=[1,27],$=[1,28],B=[1,29],R=[1,30],V=[1,31],P=[1,32],at=[1,35],nt=[1,36],ot=[1,37],lt=[1,38],X=[1,34],y=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],gt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:d(function(o,h,n,g,_,i,G){var c=i.length-1;switch(_){case 3:return g.setRootDoc(i[c]),i[c];case 4:this.$=[];break;case 5:i[c]!="nl"&&(i[c-1].push(i[c]),this.$=i[c-1]);break;case 6:case 7:this.$=i[c];break;case 8:this.$="nl";break;case 12:this.$=i[c];break;case 13:const tt=i[c-1];tt.description=g.trimColon(i[c]),this.$=tt;break;case 14:this.$={stmt:"relation",state1:i[c-2],state2:i[c]};break;case 15:const Tt=g.trimColon(i[c]);this.$={stmt:"relation",state1:i[c-3],state2:i[c-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[c-3],type:"default",description:"",doc:i[c-1]};break;case 20:var Y=i[c],J=i[c-2].trim();if(i[c].match(":")){var ut=i[c].split(":");Y=ut[0],J=[J,ut[1]]}this.$={stmt:"state",id:Y,type:"default",description:J};break;case 21:this.$={stmt:"state",id:i[c-3],type:"default",description:i[c-5],doc:i[c-1]};break;case 22:this.$={stmt:"state",id:i[c],type:"fork"};break;case 23:this.$={stmt:"state",id:i[c],type:"join"};break;case 24:this.$={stmt:"state",id:i[c],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[c-1].trim(),note:{position:i[c-2].trim(),text:i[c].trim()}};break;case 29:this.$=i[c].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[c].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[c-3],url:i[c-2],tooltip:i[c-1]};break;case 33:this.$={stmt:"click",id:i[c-3],url:i[c-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[c-1].trim(),classes:i[c].trim()};break;case 36:this.$={stmt:"style",id:i[c-1].trim(),styleClass:i[c].trim()};break;case 37:this.$={stmt:"applyClass",id:i[c-1].trim(),styleClass:i[c].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[c].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[c-2].trim(),classes:[i[c].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[c-2].trim(),classes:[i[c].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:l,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:S,19:T,22:E,24:m,25:L,26:v,27:O,28:w,29:C,32:25,33:f,35:k,37:$,38:B,41:R,45:V,48:P,51:at,52:nt,53:ot,54:lt,57:X},t(y,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:p,17:S,19:T,22:E,24:m,25:L,26:v,27:O,28:w,29:C,32:25,33:f,35:k,37:$,38:B,41:R,45:V,48:P,51:at,52:nt,53:ot,54:lt,57:X},t(y,[2,7]),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(y,[2,11]),t(y,[2,12],{14:[1,40],15:[1,41]}),t(y,[2,16]),{18:[1,42]},t(y,[2,18],{20:[1,43]}),{23:[1,44]},t(y,[2,22]),t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(y,[2,28]),{34:[1,49]},{36:[1,50]},t(y,[2,31]),{13:51,24:m,57:X},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ct,[2,44],{58:[1,56]}),t(ct,[2,45],{58:[1,57]}),t(y,[2,38]),t(y,[2,39]),t(y,[2,40]),t(y,[2,41]),t(y,[2,6]),t(y,[2,13]),{13:58,24:m,57:X},t(y,[2,17]),t(xt,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(y,[2,29]),t(y,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(y,[2,14],{14:[1,71]}),{4:l,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:S,19:T,21:[1,72],22:E,24:m,25:L,26:v,27:O,28:w,29:C,32:25,33:f,35:k,37:$,38:B,41:R,45:V,48:P,51:at,52:nt,53:ot,54:lt,57:X},t(y,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),t(ct,[2,46]),t(ct,[2,47]),t(y,[2,15]),t(y,[2,19]),t(xt,r,{7:78}),t(y,[2,26]),t(y,[2,27]),{5:[1,79]},{5:[1,80]},{4:l,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:S,19:T,21:[1,81],22:E,24:m,25:L,26:v,27:O,28:w,29:C,32:25,33:f,35:k,37:$,38:B,41:R,45:V,48:P,51:at,52:nt,53:ot,54:lt,57:X},t(y,[2,32]),t(y,[2,33]),t(y,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:d(function(o,h){if(h.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=h,n}},"parseError"),parse:d(function(o){var h=this,n=[0],g=[],_=[null],i=[],G=this.table,c="",Y=0,J=0,ut=2,tt=1,Tt=i.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(j.yy[Et]=this.yy[Et]);D.setInput(o,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var _t=D.yylloc;i.push(_t);var Qt=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(I){n.length=n.length-2*I,_.length=_.length-I,i.length=i.length-I}d(Zt,"popStack");function Lt(){var I;return I=g.pop()||D.lex()||tt,typeof I!="number"&&(I instanceof Array&&(g=I,I=g.pop()),I=h.symbols_[I]||I),I}d(Lt,"lex");for(var x,H,N,mt,q={},dt,M,Ot,ft;;){if(H=n[n.length-1],this.defaultActions[H]?N=this.defaultActions[H]:((x===null||typeof x>"u")&&(x=Lt()),N=G[H]&&G[H][x]),typeof N>"u"||!N.length||!N[0]){var bt="";ft=[];for(dt in G[H])this.terminals_[dt]&&dt>ut&&ft.push("'"+this.terminals_[dt]+"'");D.showPosition?bt="Parse error on line "+(Y+1)+`: +`+D.showPosition()+` +Expecting `+ft.join(", ")+", got '"+(this.terminals_[x]||x)+"'":bt="Parse error on line "+(Y+1)+": Unexpected "+(x==tt?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(bt,{text:D.match,token:this.terminals_[x]||x,line:D.yylineno,loc:_t,expected:ft})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+x);switch(N[0]){case 1:n.push(x),_.push(D.yytext),i.push(D.yylloc),n.push(N[1]),x=null,J=D.yyleng,c=D.yytext,Y=D.yylineno,_t=D.yylloc;break;case 2:if(M=this.productions_[N[1]][1],q.$=_[_.length-M],q._$={first_line:i[i.length-(M||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(M||1)].first_column,last_column:i[i.length-1].last_column},Qt&&(q._$.range=[i[i.length-(M||1)].range[0],i[i.length-1].range[1]]),mt=this.performAction.apply(q,[c,J,Y,j.yy,N[1],_,i].concat(Tt)),typeof mt<"u")return mt;M&&(n=n.slice(0,-1*M*2),_=_.slice(0,-1*M),i=i.slice(0,-1*M)),n.push(this.productions_[N[1]][0]),_.push(q.$),i.push(q._$),Ot=G[n[n.length-2]][n[n.length-1]],n.push(Ot);break;case 3:return!0}}return!0},"parse")},qt=function(){var U={EOF:1,parseError:d(function(h,n){if(this.yy.parser)this.yy.parser.parseError(h,n);else throw new Error(h)},"parseError"),setInput:d(function(o,h){return this.yy=h||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},"setInput"),input:d(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:d(function(o){var h=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var g=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),n.length-1&&(this.yylineno-=n.length-1);var _=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:n?(n.length===g.length?this.yylloc.first_column:0)+g[g.length-n.length].length-n[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(o){this.unput(this.match.slice(o))},"less"),pastInput:d(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(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,"")},"upcomingInput"),showPosition:d(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+h+"^"},"showPosition"),test_match:d(function(o,h){var n,g,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),g=o[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.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],n=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in _)this[i]=_[i];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,h,n,g;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),i=0;i<_.length;i++)if(n=this._input.match(this.rules[_[i]]),n&&(!h||n[0].length>h[0].length)){if(h=n,g=i,this.options.backtrack_lexer){if(o=this.test_match(n,_[i]),o!==!1)return o;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(o=this.test_match(h,_[g]),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})},"next"),lex:d(function(){var h=this.next();return h||this.lex()},"lex"),begin:d(function(h){this.conditionStack.push(h)},"begin"),popState:d(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:d(function(h){this.begin(h)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(h,n,g,_){function i(){const G=n.yytext.indexOf("%%");if(G===0)return!1;if(G>0){const c=n.yytext.slice(0,G),Y=n.yytext.slice(G);Y&&h.lexer.unput(Y),n.yytext=c}return!0}switch(d(i,"processId"),g){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 33:return this.pushState("SCALE"),17;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:return i()?(this.popState(),"ID"):void 0;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:return 19;case 53:this.popState();break;case 54:return this.popState(),this.pushState("struct"),20;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),59;case 59:return this.popState(),this.pushState("NOTE_ID"),60;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return i()?(this.popState(),"ID"):void 0;case 65:return i()?(this.popState(),this.pushState("NOTE_TEXT"),24):void 0;case 66:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 67:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 57;case 72:return i()?24:void 0;case 73:return n.yytext=n.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 58;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,55,56,57,71,72,73,74,75,76],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,54,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return U}();gt.lexer=qt;function ht(){this.yy={}}return d(ht,"Parser"),ht.prototype=gt,gt.Parser=ht,new ht}();vt.parser=vt;var Ye=vt,de="TB",Bt="TB",It="dir",Z="state",Q="root",Ct="relation",fe="classDef",pe="style",Se="applyClass",it="default",Gt="divider",Yt="fill:none",Vt="fill: #333",Mt="c",Ut="markdown",Wt="normal",Dt="rect",kt="rectWithTitle",ye="stateStart",ge="stateEnd",Rt="divider",Nt="roundedWithTitle",Te="note",Ee="noteGroup",rt="statediagram",_e="state",me=`${rt}-${_e}`,jt="transition",be="note",De="note-edge",ke=`${jt} ${De}`,ve=`${rt}-${be}`,Ce="cluster",Ae=`${rt}-${Ce}`,xe="cluster-alt",Le=`${rt}-${xe}`,Ht="parent",zt="note",Oe="state",At="----",Ie=`${At}${zt}`,wt=`${At}${Ht}`,Kt=d((t,e=Bt)=>{if(!t.doc)return e;let s=e;for(const a of t.doc)a.stmt==="dir"&&(s=a.value);return s},"getDir"),Re=d(function(t,e){return e.db.getClasses()},"getClasses"),Ne=d(async function(t,e,s,a){b.info("REF0:"),b.info("Drawing state diagram (v2)",e);const{securityLevel:r,state:l,layout:u}=F();a.db.extract(a.db.getRootDocV2());const p=a.db.getData(),S=te(e,r);p.type=a.type,p.layoutAlgorithm=u,p.nodeSpacing=(l==null?void 0:l.nodeSpacing)||50,p.rankSpacing=(l==null?void 0:l.rankSpacing)||50,F().look==="neo"?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await se(p,S);const E=8;try{(typeof a.db.getLinks=="function"?a.db.getLinks():new Map).forEach((L,v)=>{var B;const O=typeof v=="string"?v:typeof(v==null?void 0:v.id)=="string"?v.id:"";if(!O){b.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(v));return}const w=(B=S.node())==null?void 0:B.querySelectorAll("g");let C;if(w==null||w.forEach(R=>{var P;((P=R.textContent)==null?void 0:P.trim())===O&&(C=R)}),!C){b.warn("⚠️ Could not find node matching text:",O);return}const f=C.parentNode;if(!f){b.warn("⚠️ Node has no parent, cannot wrap:",O);return}const k=document.createElementNS("http://www.w3.org/2000/svg","a"),$=L.url.replace(/^"+|"+$/g,"");if(k.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",$),k.setAttribute("target","_blank"),L.tooltip){const R=L.tooltip.replace(/^"+|"+$/g,"");k.setAttribute("title",R)}f.replaceChild(k,C),k.appendChild(C),b.info("🔗 Wrapped node in tag for:",O,L.url)})}catch(m){b.error("❌ Error injecting clickable links:",m)}ie.insertTitle(S,"statediagramTitleText",(l==null?void 0:l.titleTopMargin)??25,a.db.getDiagramTitle()),ee(S,E,rt,(l==null?void 0:l.useMaxWidth)??!0)},"draw"),Ve={getClasses:Re,draw:Ne,getDir:Kt},St=new Map,W=0;function yt(t="",e=0,s="",a=At){const r=s!==null&&s.length>0?`${a}${s}`:"";return`${Oe}-${t}${r}-${e}`}d(yt,"stateDomId");var we=d((t,e,s,a,r,l,u,p)=>{b.trace("items",e),e.forEach(S=>{switch(S.stmt){case Z:st(t,S,s,a,r,l,u,p);break;case it:st(t,S,s,a,r,l,u,p);break;case Ct:{st(t,S.state1,s,a,r,l,u,p),st(t,S.state2,s,a,r,l,u,p);const T=u==="neo",E={id:"edge"+W,start:S.state1.id,end:S.state2.id,arrowhead:"normal",arrowTypeEnd:T?"arrow_barb_neo":"arrow_barb",style:Yt,labelStyle:"",label:z.sanitizeText(S.description??"",F()),arrowheadStyle:Vt,labelpos:Mt,labelType:Ut,thickness:Wt,classes:jt,look:u};r.push(E),W++}break}})},"setupDoc"),$t=d((t,e=Bt)=>{let s=e;if(t.doc)for(const a of t.doc)a.stmt==="dir"&&(s=a.value);return s},"getDir");function et(t,e,s){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(r=>{const l=s.get(r);l&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...l.styles])}));const a=t.find(r=>r.id===e.id);a?Object.assign(a,e):t.push(e)}d(et,"insertOrUpdateNode");function Xt(t){var e;return((e=t==null?void 0:t.classes)==null?void 0:e.join(" "))??""}d(Xt,"getClassesFromDbInfo");function Jt(t){return(t==null?void 0:t.styles)??[]}d(Jt,"getStylesFromDbInfo");var st=d((t,e,s,a,r,l,u,p)=>{var v,O,w;const S=e.id,T=s.get(S),E=Xt(T),m=Jt(T),L=F();if(b.info("dataFetcher parsedItem",e,T,m),S!=="root"){let C=Dt;e.start===!0?C=ye:e.start===!1&&(C=ge),e.type!==it&&(C=e.type),St.get(S)||St.set(S,{id:S,shape:C,description:z.sanitizeText(S,L),cssClasses:`${E} ${me}`,cssStyles:m});const f=St.get(S);e.description&&(Array.isArray(f.description)?(f.shape=kt,f.description.push(e.description)):(v=f.description)!=null&&v.length&&f.description.length>0?(f.shape=kt,f.description===S?f.description=[e.description]:f.description=[f.description,e.description]):(f.shape=Dt,f.description=e.description),f.description=z.sanitizeTextOrArray(f.description,L)),((O=f.description)==null?void 0:O.length)===1&&f.shape===kt&&(f.type==="group"?f.shape=Nt:f.shape=Dt),!f.type&&e.doc&&(b.info("Setting cluster for XCX",S,$t(e)),f.type="group",f.isGroup=!0,f.dir=$t(e),f.shape=e.type===Gt?Rt:Nt,f.cssClasses=`${f.cssClasses} ${Ae} ${l?Le:""}`);const k={labelStyle:"",shape:f.shape,label:f.description,cssClasses:f.cssClasses,cssCompiledStyles:[],cssStyles:f.cssStyles,id:S,dir:f.dir,domId:yt(S,W),type:f.type,isGroup:f.type==="group",padding:8,rx:10,ry:10,look:u,labelType:"markdown"};if(k.shape===Rt&&(k.label=""),t&&t.id!=="root"&&(b.trace("Setting node ",S," to be child of its parent ",t.id),k.parentId=t.id),k.centerLabel=!0,e.note){const $={labelStyle:"",shape:Te,label:e.note.text,labelType:"markdown",cssClasses:ve,cssStyles:[],cssCompiledStyles:[],id:S+Ie+"-"+W,domId:yt(S,W,zt),type:f.type,isGroup:f.type==="group",padding:(w=L.flowchart)==null?void 0:w.padding,look:u,position:e.note.position},B=S+wt,R={labelStyle:"",shape:Ee,label:e.note.text,cssClasses:f.cssClasses,cssStyles:[],id:S+wt,domId:yt(S,W,Ht),type:"group",isGroup:!0,padding:16,look:u,position:e.note.position};W++,R.id=B,$.parentId=B,et(a,R,p),et(a,$,p),et(a,k,p);let V=S,P=$.id;e.note.position==="left of"&&(V=$.id,P=S),r.push({id:V+"-"+P,start:V,end:P,arrowhead:"none",arrowTypeEnd:"",style:Yt,labelStyle:"",classes:ke,arrowheadStyle:Vt,labelpos:Mt,labelType:Ut,thickness:Wt,look:u})}else et(a,k,p)}e.doc&&(b.trace("Adding nodes children "),we(e,e.doc,s,a,r,!l,u,p))},"dataFetcher"),$e=d(()=>{St.clear(),W=0},"reset"),A={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Pt=d(()=>new Map,"newClassesList"),Ft=d(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),pt=d(t=>JSON.parse(JSON.stringify(t)),"clone"),K,Me=(K=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Pt(),this.documents={root:Ft()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=re,this.setAccTitle=ae,this.getAccDescription=ne,this.setAccDescription=oe,this.setDiagramTitle=le,this.getDiagramTitle=ce,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}extract(e){this.clear(!0);for(const r of Array.isArray(e)?e:e.doc)switch(r.stmt){case Z:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case Ct:this.addRelation(r.state1,r.state2,r.description);break;case fe:this.addStyleClass(r.id.trim(),r.classes);break;case pe:this.handleStyleDef(r);break;case Se:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}const s=this.getStates(),a=F();$e(),st(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,a.look,this.classes);for(const r of this.nodes)if(Array.isArray(r.label)){if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(e){const s=e.id.trim().split(","),a=e.styleClass.split(",");for(const r of s){let l=this.getState(r);if(!l){const u=r.trim();this.addState(u),l=this.getState(u)}l&&(l.styles=a.map(u=>{var p;return(p=u.replace(/;/g,""))==null?void 0:p.trim()}))}}setRootDoc(e){b.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,s,a){if(s.stmt===Ct){this.docTranslator(e,s.state1,!0),this.docTranslator(e,s.state2,!1);return}if(s.stmt===Z&&(s.id===A.START_NODE?(s.id=e.id+(a?"_start":"_end"),s.start=a):s.id=s.id.trim()),s.stmt!==Q&&s.stmt!==Z||!s.doc)return;const r=[];let l=[];for(const u of s.doc)if(u.type===Gt){const p=pt(u);p.doc=pt(l),r.push(p),l=[]}else l.push(u);if(r.length>0&&l.length>0){const u={stmt:Z,id:he(),type:"divider",doc:pt(l)};r.push(pt(u)),s.doc=r}s.doc.forEach(u=>this.docTranslator(s,u,!0))}getRootDocV2(){return this.docTranslator({id:Q,stmt:Q},{id:Q,stmt:Q,doc:this.rootDoc},!0),{id:Q,doc:this.rootDoc}}addState(e,s=it,a=void 0,r=void 0,l=void 0,u=void 0,p=void 0,S=void 0){const T=e==null?void 0:e.trim();if(!this.currentDocument.states.has(T))b.info("Adding state ",T,r),this.currentDocument.states.set(T,{stmt:Z,id:T,descriptions:[],type:s,doc:a,note:l,classes:[],styles:[],textStyles:[]});else{const E=this.currentDocument.states.get(T);if(!E)throw new Error(`State not found: ${T}`);E.doc||(E.doc=a),E.type||(E.type=s)}if(r&&(b.info("Setting state description",T,r),(Array.isArray(r)?r:[r]).forEach(m=>this.addDescription(T,m.trim()))),l){const E=this.currentDocument.states.get(T);if(!E)throw new Error(`State not found: ${T}`);E.note=l,E.note.text=z.sanitizeText(E.note.text,F())}u&&(b.info("Setting state classes",T,u),(Array.isArray(u)?u:[u]).forEach(m=>this.setCssClass(T,m.trim()))),p&&(b.info("Setting state styles",T,p),(Array.isArray(p)?p:[p]).forEach(m=>this.setStyle(T,m.trim()))),S&&(b.info("Setting state styles",T,p),(Array.isArray(S)?S:[S]).forEach(m=>this.setTextStyle(T,m.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:Ft()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Pt(),e||(this.links=new Map,ue())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){b.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,s,a){this.links.set(e,{url:s,tooltip:a}),b.warn("Adding link",e,s,a)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===A.START_NODE?(this.startEndCount++,`${A.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e="",s=it){return e===A.START_NODE?A.START_TYPE:s}endIdIfNeeded(e=""){return e===A.END_NODE?(this.startEndCount++,`${A.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e="",s=it){return e===A.END_NODE?A.END_TYPE:s}addRelationObjs(e,s,a=""){const r=this.startIdIfNeeded(e.id.trim()),l=this.startTypeIfNeeded(e.id.trim(),e.type),u=this.startIdIfNeeded(s.id.trim()),p=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(r,l,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(u,p,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:r,id2:u,relationTitle:z.sanitizeText(a,F())})}addRelation(e,s,a){if(typeof e=="object"&&typeof s=="object")this.addRelationObjs(e,s,a);else if(typeof e=="string"&&typeof s=="string"){const r=this.startIdIfNeeded(e.trim()),l=this.startTypeIfNeeded(e),u=this.endIdIfNeeded(s.trim()),p=this.endTypeIfNeeded(s);this.addState(r,l),this.addState(u,p),this.currentDocument.relations.push({id1:r,id2:u,relationTitle:a?z.sanitizeText(a,F()):void 0})}}addDescription(e,s){var l;const a=this.currentDocument.states.get(e),r=s.startsWith(":")?s.replace(":","").trim():s;(l=a==null?void 0:a.descriptions)==null||l.push(z.sanitizeText(r,F()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,s=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});const a=this.classes.get(e);s&&a&&s.split(A.STYLECLASS_SEP).forEach(r=>{const l=r.replace(/([^;]*);/,"$1").trim();if(RegExp(A.COLOR_KEYWORD).exec(r)){const p=l.replace(A.FILL_KEYWORD,A.BG_FILL).replace(A.COLOR_KEYWORD,A.FILL_KEYWORD);a.textStyles.push(p)}a.styles.push(l)})}getClasses(){return this.classes}setCssClass(e,s){e.split(",").forEach(a=>{var l;let r=this.getState(a);if(!r){const u=a.trim();this.addState(u),r=this.getState(u)}(l=r==null?void 0:r.classes)==null||l.push(s)})}setStyle(e,s){var a,r;(r=(a=this.getState(e))==null?void 0:a.styles)==null||r.push(s)}setTextStyle(e,s){var a,r;(r=(a=this.getState(e))==null?void 0:a.textStyles)==null||r.push(s)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===It)}getDirection(){var e;return((e=this.getDirectionStatement())==null?void 0:e.value)??de}setDirection(e){const s=this.getDirectionStatement();s?s.value=e:this.rootDoc.unshift({stmt:It,value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){const e=F();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:Kt(this.getRootDocV2())}}getConfig(){return F().state}},d(K,"StateDB"),K.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},K),Pe=d(t=>` +defs [id$="-barbEnd"] { + fill: ${t.transitionColor}; + stroke: ${t.transitionColor}; + } +g.stateGroup text { + fill: ${t.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${t.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${t.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.stateGroup line { + stroke: ${t.lineColor}; + stroke-width: ${t.strokeWidth||1}; +} + +.transition { + stroke: ${t.transitionColor}; + stroke-width: ${t.strokeWidth||1}; + fill: none; +} + +.stateGroup .composit { + fill: ${t.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + + text { + fill: ${t.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${t.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${t.transitionLabelColor||t.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${t.transitionLabelColor||t.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${t.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node .fork-join { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node circle.state-end { + fill: ${t.innerEndBackground}; + stroke: ${t.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${t.compositeBackground||t.background}; + // stroke: ${t.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${t.stateBkg||t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: ${t.strokeWidth||1}px; +} +.node polygon { + fill: ${t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder};; + stroke-width: ${t.strokeWidth||1}px; +} +[id$="-barbEnd"] { + fill: ${t.lineColor}; +} + +.statediagram-cluster rect { + fill: ${t.compositeTitleBackground}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: ${t.strokeWidth||1}px; +} + +.cluster-label, .nodeLabel { + color: ${t.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${t.stateBorder||t.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${t.compositeBackground||t.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${t.altBackground?t.altBackground:"#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${t.altBackground?t.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${t.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${t.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${t.noteTextColor}; +} + +[id$="-dependencyStart"], [id$="-dependencyEnd"] { + fill: ${t.lineColor}; + stroke: ${t.lineColor}; + stroke-width: ${t.strokeWidth||1}; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} + +[data-look="neo"].statediagram-cluster rect { + fill: ${t.mainBkg}; + stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder}; + stroke-width: ${t.strokeWidth??1}; +} +[data-look="neo"].statediagram-cluster rect.outer { + rx: ${t.radius}px; + ry: ${t.radius}px; + filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"} +} +`,"getStyles"),Ue=Pe;export{Me as S,Ye as a,Ve as b,Ue as s}; diff --git a/dist/assets/chunk-FMBD7UC4-Crb6W-Lm.js b/dist/assets/chunk-FMBD7UC4-Crb6W-Lm.js new file mode 100644 index 0000000..94bfc24 --- /dev/null +++ b/dist/assets/chunk-FMBD7UC4-Crb6W-Lm.js @@ -0,0 +1,15 @@ +import{_ as e}from"./index-mLPbTfpz.js";var l=e(()=>` + /* Font Awesome icon styling - consolidated */ + .label-icon { + display: inline-block; + height: 1em; + overflow: visible; + vertical-align: -0.125em; + } + + .node .label-icon path { + fill: currentColor; + stroke: revert; + stroke-width: revert; + } +`,"getIconStyles");export{l as g}; diff --git a/dist/assets/chunk-ND2GUHAM-DRVGyKsL.js b/dist/assets/chunk-ND2GUHAM-DRVGyKsL.js new file mode 100644 index 0000000..fc6775b --- /dev/null +++ b/dist/assets/chunk-ND2GUHAM-DRVGyKsL.js @@ -0,0 +1 @@ +import{_ as i,d as l,U as d,j as o}from"./index-mLPbTfpz.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,f as b,w as c,x as d,g as e,m as f,h as g,y as h}; diff --git a/dist/assets/chunk-QZHKN3VN-DFJ7UdTp.js b/dist/assets/chunk-QZHKN3VN-DFJ7UdTp.js new file mode 100644 index 0000000..b2783a6 --- /dev/null +++ b/dist/assets/chunk-QZHKN3VN-DFJ7UdTp.js @@ -0,0 +1 @@ +import{_ as s}from"./index-mLPbTfpz.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I}; diff --git a/dist/assets/classDiagram-4FO5ZUOK-C891wWoD.js b/dist/assets/classDiagram-4FO5ZUOK-C891wWoD.js new file mode 100644 index 0000000..2e8f60d --- /dev/null +++ b/dist/assets/classDiagram-4FO5ZUOK-C891wWoD.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-DkN7wOmK.js";import{_ as i}from"./index-mLPbTfpz.js";import"./chunk-FMBD7UC4-Crb6W-Lm.js";import"./chunk-ND2GUHAM-DRVGyKsL.js";import"./chunk-55IACEB6-DT6mN9fZ.js";import"./chunk-2J33WTMH-CsIyCw5_.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/dist/assets/classDiagram-v2-Q7XG4LA2-C891wWoD.js b/dist/assets/classDiagram-v2-Q7XG4LA2-C891wWoD.js new file mode 100644 index 0000000..2e8f60d --- /dev/null +++ b/dist/assets/classDiagram-v2-Q7XG4LA2-C891wWoD.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-DkN7wOmK.js";import{_ as i}from"./index-mLPbTfpz.js";import"./chunk-FMBD7UC4-Crb6W-Lm.js";import"./chunk-ND2GUHAM-DRVGyKsL.js";import"./chunk-55IACEB6-DT6mN9fZ.js";import"./chunk-2J33WTMH-CsIyCw5_.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/dist/assets/cose-bilkent-S5V4N54A-DfPmC3MC.js b/dist/assets/cose-bilkent-S5V4N54A-DfPmC3MC.js new file mode 100644 index 0000000..b687984 --- /dev/null +++ b/dist/assets/cose-bilkent-S5V4N54A-DfPmC3MC.js @@ -0,0 +1 @@ +import{b4 as lt,_ as V,l as $,d as gt}from"./index-mLPbTfpz.js";import{c as tt}from"./cytoscape.esm-BHYC38rz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,function(G,b){(function(I,T){G.exports=T()})(ut,function(){return function(N){var I={};function T(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,T),e.l=!0,e.exports}return T.m=N,T.c=I,T.i=function(o){return o},T.d=function(o,e,t){T.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},T.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return T.d(e,"a",e),e},T.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},T.p="",T(T.s=26)}([function(N,I,T){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o},function(N,I,T){var o=T(2),e=T(8),t=T(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i},function(N,I,T){function o(e){this.vGraphObject=e}N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(13),i=T(0),l=T(16),g=T(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n},function(N,I,T){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(0),i=T(6),l=T(3),g=T(1),n=T(13),d=T(12),r=T(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var E=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(E.source=v,E.target=D,E.isInterGraph=!1,this.getEdges().push(E),v.edges.push(E),D!=v&&D.edges.push(E),E)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,E=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,E,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?E=y[0].getParent().paddingLeft:E=this.margin,this.left=v-E,this.top=p-E,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,E=-e.MAX_VALUE,y,O,s,f,c,L=this.nodes,A=L.length,m=0;my&&(v=y),Ds&&(u=s),Ey&&(v=y),Ds&&(u=s),E=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h},function(N,I,T){var o,e=T(1);function t(i){o=T(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=L,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=L,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=L,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+E*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-E*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=L,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,E=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,L=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,L=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*L-f*c)/A,E=(O*c-y*L)/A,new o(u,E))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o},function(N,I,T){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o},function(N,I,T){var o=function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e},function(N,I,T){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),E.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}E=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(L,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,E=p[0])}return E},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h},function(N,I,T){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o},function(N,I,T){var o=T(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e},function(N,I,T){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),E=new Set,a=0;ay||E>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||E>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l}();N.exports=i},function(N,I,T){var o=function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(L){return f.has(L)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,L=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,L),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RL&&(L=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var L=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,L);var A=u.calculateBounds(s),m=new E;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(L-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],L=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,L=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,L,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var L=s.idToDummyNode[c],A=L.paddingLeft,m=L.paddingTop;s.adjustLocations(f[c],L.rect.x,L.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var L=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,L=0;LM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(L){var A=f[L];c.tiledMemberPack[L]=c.tileNodes(s[L],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[L].width,A.rect.height=c.tiledMemberPack[L].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,L=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:L};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,L=0;Lc&&(f=L,c=s.rowWidth[L]);return f},y.prototype.canAddHorizontal=function(s,f,c){var L=this.getShortestRowIndex(s);if(L<0)return!0;var A=s.rowWidth[L];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[L]0&&(m=c+s.verticalPadding-s.rowHeight[L]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){L.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=L[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=E.getGraphManager().add(E.newGraph(),c),this.processChildrenList(R,f,E)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v}])})}(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(T=>{["id","label","height","width","padding","x","y"].includes(T)||(I[T]=N[T])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(T=>{["id","start","end"].includes(T)||(I[T]=N[T])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const T={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(T).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),T={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(T[o]=N[o])}),T})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,T={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(T[o]=N[o])}),T})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),T=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${T.length} edges`),{nodes:I,edges:T}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:T,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const E={...u};n[u.id]=E,g[u.id]=E,await N(r,u)}else{const E={...u};g[u.id]=E;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();E.width=O.width,E.height=O.height,E.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const E=g[u.id];return{...u,width:E.width,height:E.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const E=g[u.id];E!=null&&E.domId&&(E.domId.attr("transform",`translate(${u.x}, ${u.y})`),E.x=u.x,E.y=u.y,t.debug(`Positioned node ${E.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const E=G.edges.find(y=>y.id===u.id);E&&(E.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await T(a,u);const E=g[u.start??""],y=g[u.end??""];if(E&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:E.x||0,y:E.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render}; diff --git a/dist/assets/cytoscape.esm-BHYC38rz.js b/dist/assets/cytoscape.esm-BHYC38rz.js new file mode 100644 index 0000000..bee1ed8 --- /dev/null +++ b/dist/assets/cytoscape.esm-BHYC38rz.js @@ -0,0 +1,331 @@ +function ks(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,a=Array(e);t=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,o=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return s=u.done,u},e:function(u){o=!0,i=u},f:function(){try{s||t.return==null||t.return()}finally{if(o)throw i}}}}function Zl(r,e,t){return(e=Ql(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function tc(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function ac(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var a,n,i,s,o=[],u=!0,l=!1;try{if(i=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;u=!1}else for(;!(u=(a=i.call(t)).done)&&(o.push(a.value),o.length!==e);u=!0);}catch(v){l=!0,n=v}finally{try{if(!u&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(l)throw n}}return o}}function nc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ic(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qe(r,e){return jf(r)||ac(r,e)||Us(r,e)||nc()}function pn(r){return ec(r)||tc(r)||Us(r)||ic()}function sc(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function Ql(r){var e=sc(r,"string");return typeof e=="symbol"?e:e+""}function rr(r){"@babel/helpers - typeof";return rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rr(r)}function Us(r,e){if(r){if(typeof r=="string")return ks(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ks(r,e):void 0}}var je=typeof window>"u"?null:window,Eo=je?je.navigator:null;je&&je.document;var oc=rr(""),Jl=rr({}),uc=rr(function(){}),lc=typeof HTMLElement>"u"?"undefined":rr(HTMLElement),Ra=function(e){return e&&e.instanceString&&$e(e.instanceString)?e.instanceString():null},he=function(e){return e!=null&&rr(e)==oc},$e=function(e){return e!=null&&rr(e)===uc},Ve=function(e){return!Tr(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Me=function(e){return e!=null&&rr(e)===Jl&&!Ve(e)&&e.constructor===Object},vc=function(e){return e!=null&&rr(e)===Jl},ae=function(e){return e!=null&&rr(e)===rr(1)&&!isNaN(e)},fc=function(e){return ae(e)&&Math.floor(e)===e},yn=function(e){if(lc!=="undefined")return e!=null&&e instanceof HTMLElement},Tr=function(e){return Ma(e)||jl(e)},Ma=function(e){return Ra(e)==="collection"&&e._private.single},jl=function(e){return Ra(e)==="collection"&&!e._private.single},Ks=function(e){return Ra(e)==="core"},ev=function(e){return Ra(e)==="stylesheet"},cc=function(e){return Ra(e)==="event"},ot=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},dc=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},hc=function(e){return Me(e)&&ae(e.x1)&&ae(e.x2)&&ae(e.y1)&&ae(e.y2)},gc=function(e){return vc(e)&&$e(e.then)},pc=function(){return Eo&&Eo.userAgent.match(/msie|trident|edge/i)},Yt=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;st?1:0},Cc=function(e,t){return-1*tv(e,t)},ye=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t1&&(g-=1),g<1/6?d+(y-d)*6*g:g<1/2?y:g<2/3?d+(y-d)*(2/3-g)*6:d}var f=new RegExp("^"+bc+"$").exec(e);if(f){if(a=parseInt(f[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=u=l=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;o=Math.round(255*v(h,c,a+1/3)),u=Math.round(255*v(h,c,a)),l=Math.round(255*v(h,c,a-1/3))}t=[o,u,l,s]}return t},kc=function(e){var t,a=new RegExp("^"+yc+"$").exec(e);if(a){t=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;t.push(Math.floor(s))}var o=n[1]||n[2]||n[3],u=n[1]&&n[2]&&n[3];if(o&&!u)return;var l=a[4];if(l!==void 0){if(l=parseFloat(l),l<0||l>1)return;t.push(l)}}return t},Dc=function(e){return Bc[e.toLowerCase()]},av=function(e){return(Ve(e)?e:null)||Dc(e)||Tc(e)||kc(e)||Sc(e)},Bc={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},nv=function(e){for(var t=e.map,a=e.keys,n=a.length,i=0;i=u||R<0||m&&L>=c}function T(){var A=e();if(x(A))return k(A);d=setTimeout(T,C(A))}function k(A){return d=void 0,b&&v?w(A):(v=f=void 0,h)}function D(){d!==void 0&&clearTimeout(d),g=0,v=y=f=d=void 0}function B(){return d===void 0?h:k(e())}function P(){var A=e(),R=x(A);if(v=arguments,f=this,y=A,R){if(d===void 0)return E(y);if(m)return clearTimeout(d),d=setTimeout(T,u),w(y)}return d===void 0&&(d=setTimeout(T,u)),h}return P.cancel=D,P.flush=B,P}return li=s,li}var Fc=zc(),Na=La(Fc),vi=je?je.performance:null,ov=vi&&vi.now?function(){return vi.now()}:function(){return Date.now()},Vc=function(){if(je){if(je.requestAnimationFrame)return function(r){je.requestAnimationFrame(r)};if(je.mozRequestAnimationFrame)return function(r){je.mozRequestAnimationFrame(r)};if(je.webkitRequestAnimationFrame)return function(r){je.webkitRequestAnimationFrame(r)};if(je.msRequestAnimationFrame)return function(r){je.msRequestAnimationFrame(r)}}return function(r){r&&setTimeout(function(){r(ov())},1e3/60)}}(),mn=function(e){return Vc(e)},Xr=ov,Ct=9261,uv=65599,_t=5381,lv=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ct,a=t,n;n=e.next(),!n.done;)a=a*uv+n.value|0;return a},xa=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ct;return t*uv+e|0},Ea=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_t;return(t<<5)+t+e|0},qc=function(e,t){return e*2097152+t},jr=function(e){return e[0]*2097152+e[1]},Ua=function(e,t){return[xa(e[0],t[0]),Ea(e[1],t[1])]},Fo=function(e,t){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n=0;n--)e[n]===t&&e.splice(n,1)},Js=function(e){e.splice(0,e.length)},Zc=function(e,t){for(var a=0;a"u"?"undefined":rr(Set))!==Jc?Set:jc,Mn=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!Ks(e)){He("An element must have a core reference and parameters set");return}var n=t.group;if(n==null&&(t.data&&t.data.source!=null&&t.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){He("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0?!0:!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0?!0:!!t.grabbable,pannable:t.pannable===void 0?n==="edges":!!t.pannable,active:!1,classes:new jt,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),t.renderedPosition){var s=t.renderedPosition,o=e.pan(),u=e.zoom();i.position={x:(s.x-o.x)/u,y:(s.y-o.y)/u}}var l=[];Ve(t.classes)?l=t.classes:he(t.classes)&&(l=t.classes.split(/\s+/));for(var v=0,f=l.length;vm?1:0},v=function(p,m,b,w,E){var C;if(b==null&&(b=0),E==null&&(E=a),b<0)throw new Error("lo must be non-negative");for(w==null&&(w=p.length);bD;0<=D?k++:k--)T.push(k);return T}).apply(this).reverse(),x=[],w=0,E=C.length;wB;0<=B?++T:--T)P.push(s(p,b));return P},y=function(p,m,b,w){var E,C,x;for(w==null&&(w=a),E=p[b];b>m;){if(x=b-1>>1,C=p[x],w(E,C)<0){p[b]=C,b=x;continue}break}return p[b]=E},g=function(p,m,b){var w,E,C,x,T;for(b==null&&(b=a),E=p.length,T=m,C=p[m],w=2*m+1;w0;){var C=m.pop(),x=g(C),T=C.id();if(c[T]=x,x!==1/0)for(var k=C.neighborhood().intersect(d),D=0;D0)for(O.unshift(M);f[_];){var N=f[_];O.unshift(N.edge),O.unshift(N.node),q=N.node,_=q.id()}return o.spawn(O)}}}},sd={kruskal:function(e){e=e||function(b){return 1};for(var t=this.byGroup(),a=t.nodes,n=t.edges,i=a.length,s=new Array(i),o=a,u=function(w){for(var E=0;E0;){if(E(),x++,w===v){for(var T=[],k=i,D=v,B=p[D];T.unshift(k),B!=null&&T.unshift(B),k=g[D],k!=null;)D=k.id(),B=p[D];return{found:!0,distance:f[w],path:this.spawn(T),steps:x}}h[w]=!0;for(var P=b._private.edges,A=0;AB&&(d[D]=B,m[D]=k,b[D]=E),!i){var P=k*v+T;!i&&d[P]>B&&(d[P]=B,m[P]=T,b[P]=E)}}}for(var A=0;A1&&arguments[1]!==void 0?arguments[1]:s,se=b(me),de=[],fe=se;;){if(fe==null)return t.spawn();var xe=m(fe),be=xe.edge,Se=xe.pred;if(de.unshift(fe[0]),fe.same(ge)&&de.length>0)break;be!=null&&de.unshift(be),fe=Se}return u.spawn(de)},C=0;C=0;v--){var f=l[v],c=f[1],h=f[2];(t[c]===o&&t[h]===u||t[c]===u&&t[h]===o)&&l.splice(v,1)}for(var d=0;dn;){var i=Math.floor(Math.random()*t.length);t=hd(i,e,t),a--}return t},gd={kargerStein:function(){var e=this,t=this.byGroup(),a=t.nodes,n=t.edges;n.unmergeBy(function(O){return O.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),u=Math.floor(i/dd);if(i<2){He("At least 2 nodes are required for Karger-Stein algorithm");return}for(var l=[],v=0;v1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=t;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(t,a):(a0&&e.splice(0,t));for(var o=0,u=e.length-1;u>=0;u--){var l=e[u];s?isFinite(l)||(e[u]=-1/0,o++):e.splice(u,1)}i&&e.sort(function(c,h){return c-h});var v=e.length,f=Math.floor(v/2);return v%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},xd=function(e){return Math.PI*e/180},Ka=function(e,t){return Math.atan2(t,e)-Math.PI/2},js=Math.log2||function(r){return Math.log(r)/Math.log(2)},eo=function(e){return e>0?1:e<0?-1:0},Dt=function(e,t){return Math.sqrt(xt(e,t))},xt=function(e,t){var a=t.x-e.x,n=t.y-e.y;return a*a+n*n},Ed=function(e){for(var t=e.length,a=0,n=0;n=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Td=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},Sd=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},kd=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},pv=function(e,t,a){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},sn=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},on=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(t.length===1)a=n=i=s=t[0];else if(t.length===2)a=i=t[0],s=n=t[1];else if(t.length===4){var o=Qe(t,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Wo=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},ro=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},at=function(e,t,a){return e.x1<=t&&t<=e.x2&&e.y1<=a&&a<=e.y2},$o=function(e,t){return at(e,t.x,t.y)},yv=function(e,t){return at(e,t.x1,t.y1)&&at(e,t.x2,t.y2)},Dd=(di=Math.hypot)!==null&&di!==void 0?di:function(r,e){return Math.sqrt(r*r+e*e)};function Bd(r,e){if(r.length<3)throw new Error("Need at least 3 vertices");var t=function(T,k){return{x:T.x+k.x,y:T.y+k.y}},a=function(T,k){return{x:T.x-k.x,y:T.y-k.y}},n=function(T,k){return{x:T.x*k,y:T.y*k}},i=function(T,k){return T.x*k.y-T.y*k.x},s=function(T){var k=Dd(T.x,T.y);return k===0?{x:0,y:0}:{x:T.x/k,y:T.y/k}},o=function(T){for(var k=0,D=0;D7&&arguments[7]!==void 0?arguments[7]:"auto",l=u==="auto"?lt(i,s):u,v=i/2,f=s/2;l=Math.min(l,v,f);var c=l!==v,h=l!==f,d;if(c){var y=a-v+l-o,g=n-f-o,p=a+v-l+o,m=g;if(d=nt(e,t,a,n,y,g,p,m,!1),d.length>0)return d}if(h){var b=a+v+o,w=n-f+l-o,E=b,C=n+f-l+o;if(d=nt(e,t,a,n,b,w,E,C,!1),d.length>0)return d}if(c){var x=a-v+l-o,T=n+f+o,k=a+v-l+o,D=T;if(d=nt(e,t,a,n,x,T,k,D,!1),d.length>0)return d}if(h){var B=a-v-o,P=n-f+l-o,A=B,R=n+f-l+o;if(d=nt(e,t,a,n,B,P,A,R,!1),d.length>0)return d}var L;{var I=a-v+l,M=n-f+l;if(L=ga(e,t,a,n,I,M,l+o),L.length>0&&L[0]<=I&&L[1]<=M)return[L[0],L[1]]}{var O=a+v-l,q=n-f+l;if(L=ga(e,t,a,n,O,q,l+o),L.length>0&&L[0]>=O&&L[1]<=q)return[L[0],L[1]]}{var _=a+v-l,N=n+f-l;if(L=ga(e,t,a,n,_,N,l+o),L.length>0&&L[0]>=_&&L[1]>=N)return[L[0],L[1]]}{var F=a-v+l,U=n+f-l;if(L=ga(e,t,a,n,F,U,l+o),L.length>0&&L[0]<=F&&L[1]>=U)return[L[0],L[1]]}return[]},Ad=function(e,t,a,n,i,s,o){var u=o,l=Math.min(a,i),v=Math.max(a,i),f=Math.min(n,s),c=Math.max(n,s);return l-u<=e&&e<=v+u&&f-u<=t&&t<=c+u},Rd=function(e,t,a,n,i,s,o,u,l){var v={x1:Math.min(a,o,i)-l,x2:Math.max(a,o,i)+l,y1:Math.min(n,u,s)-l,y2:Math.max(n,u,s)+l};return!(ev.x2||tv.y2)},Md=function(e,t,a,n){a-=n;var i=t*t-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,u=(-t+s)/o,l=(-t-s)/o;return[u,l]},Ld=function(e,t,a,n,i){var s=1e-5;e===0&&(e=s),t/=e,a/=e,n/=e;var o,u,l,v,f,c,h,d;if(u=(3*a-t*t)/9,l=-(27*n)+t*(9*a-2*(t*t)),l/=54,o=u*u*u+l*l,i[1]=0,h=t/3,o>0){f=l+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),c=l-Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+f+c,h+=(f+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+f)/2,i[3]=h,i[5]=-h;return}if(i[5]=i[3]=0,o===0){d=l<0?-Math.pow(-l,1/3):Math.pow(l,1/3),i[0]=-h+2*d,i[4]=i[2]=-(d+h);return}u=-u,v=u*u*u,v=Math.acos(l/Math.sqrt(v)),d=2*Math.sqrt(u),i[0]=-h+d*Math.cos(v/3),i[2]=-h+d*Math.cos((v+2*Math.PI)/3),i[4]=-h+d*Math.cos((v+4*Math.PI)/3)},Id=function(e,t,a,n,i,s,o,u){var l=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*u+4*s*s-4*s*u+u*u,v=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*u-6*s*s+3*s*u,f=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*u-n*t+2*s*s+2*s*t-u*t,c=1*a*i-a*a+a*e-i*e+n*s-n*n+n*t-s*t,h=[];Ld(l,v,f,c,h);for(var d=1e-7,y=[],g=0;g<6;g+=2)Math.abs(h[g+1])=0&&h[g]<=1&&y.push(h[g]);y.push(1),y.push(0);for(var p=-1,m,b,w,E=0;E=0?wl?(e-i)*(e-i)+(t-s)*(t-s):v-c},Er=function(e,t,a){for(var n,i,s,o,u,l=0,v=0;v=e&&e>=s||n<=e&&e<=s)u=(e-n)/(s-n)*(o-i)+i,u>t&&l++;else continue;return l%2!==0},Yr=function(e,t,a,n,i,s,o,u,l){var v=new Array(a.length),f;u[0]!=null?(f=Math.atan(u[1]/u[0]),u[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=u;for(var c=Math.cos(-f),h=Math.sin(-f),d=0;d0){var g=xn(v,-l);y=wn(g)}else y=v;return Er(e,t,y)},Nd=function(e,t,a,n,i,s,o,u){for(var l=new Array(a.length*2),v=0;v=0&&g<=1&&m.push(g),p>=0&&p<=1&&m.push(p),m.length===0)return[];var b=m[0]*u[0]+e,w=m[0]*u[1]+t;if(m.length>1){if(m[0]==m[1])return[b,w];var E=m[1]*u[0]+e,C=m[1]*u[1]+t;return[b,w,E,C]}else return[b,w]},hi=function(e,t,a){return t<=e&&e<=a||a<=e&&e<=t?e:e<=t&&t<=a||a<=t&&t<=e?t:a},nt=function(e,t,a,n,i,s,o,u,l){var v=e-i,f=a-e,c=o-i,h=t-s,d=n-t,y=u-s,g=c*h-y*v,p=f*h-d*v,m=y*f-c*d;if(m!==0){var b=g/m,w=p/m,E=.001,C=0-E,x=1+E;return C<=b&&b<=x&&C<=w&&w<=x?[e+b*f,t+b*d]:l?[e+b*f,t+b*d]:[]}else return g===0||p===0?hi(e,a,o)===o?[o,u]:hi(e,a,i)===i?[i,s]:hi(i,o,a)===a?[a,n]:[]:[]},Fd=function(e,t,a,n,i){var s=[],o=n/2,u=i/2,l=t,v=a;s.push({x:l+o*e[0],y:v+u*e[1]});for(var f=1;f0){var y=xn(f,-u);h=wn(y)}else h=f}else h=a;for(var g,p,m,b,w=0;w2){for(var d=[v[0],v[1]],y=Math.pow(d[0]-e,2)+Math.pow(d[1]-t,2),g=1;gv&&(v=w)},get:function(b){return l[b]}},c=0;c0?L=R.edgesTo(A)[0]:L=A.edgesTo(R)[0];var I=n(L);A=A.id(),x[A]>x[B]+I&&(x[A]=x[B]+I,T.nodes.indexOf(A)<0?T.push(A):T.updateItem(A),C[A]=0,E[A]=[]),x[A]==x[B]+I&&(C[A]=C[A]+C[B],E[A].push(B))}else for(var M=0;M0;){for(var N=w.pop(),F=0;F0&&o.push(a[u]);o.length!==0&&i.push(n.collection(o))}return i},jd=function(e,t){for(var a=0;a5&&arguments[5]!==void 0?arguments[5]:th,o=n,u,l,v=0;v=2?ua(e,t,a,0,Zo,ah):ua(e,t,a,0,Yo)},squaredEuclidean:function(e,t,a){return ua(e,t,a,0,Zo)},manhattan:function(e,t,a){return ua(e,t,a,0,Yo)},max:function(e,t,a){return ua(e,t,a,-1/0,nh)}};Zt["squared-euclidean"]=Zt.squaredEuclidean;Zt.squaredeuclidean=Zt.squaredEuclidean;function In(r,e,t,a,n,i){var s;return $e(r)?s=r:s=Zt[r]||Zt.euclidean,e===0&&$e(r)?s(n,i):s(e,t,a,n,i)}var ih=vr({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),ao=function(e){return ih(e)},En=function(e,t,a,n,i){var s=i!=="kMedoids",o=s?function(f){return a[f]}:function(f){return n[f](a)},u=function(c){return n[c](t)},l=a,v=t;return In(e,n.length,o,u,l,v)},pi=function(e,t,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(t),u=null,l=0;la)return!1}return!0},uh=function(e,t,a){for(var n=0;no&&(o=t[l][v],u=v);i[u].push(e[l])}for(var f=0;f=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var d=t[s],y=t[n[s]],g;i.mode==="dendrogram"?g={left:d,right:y,key:d.key}:g={value:d.value.concat(y.value),key:d.key},e[d.index]=g,e.splice(y.index,1),t[d.key]=g;for(var p=0;pa[y.key][m.key]&&(u=a[y.key][m.key])):i.linkage==="max"?(u=a[d.key][m.key],a[d.key][m.key]0&&n.push(i);return n},tu=function(e,t,a){for(var n=[],i=0;io&&(s=l,o=t[i*e+l])}s>0&&n.push(s)}for(var v=0;vl&&(u=v,l=f)}a[i]=s[u]}return n=tu(e,t,a),n},au=function(e){for(var t=this.cy(),a=this.nodes(),n=wh(e),i={},s=0;s=B?(P=B,B=R,A=L):R>P&&(P=R);for(var I=0;I0?1:0;x[k%n.minIterations*o+F]=U,N+=U}if(N>0&&(k>=n.minIterations-1||k==n.maxIterations-1)){for(var J=0,Z=0;Z1||C>1)&&(o=!0),f[b]=[],m.outgoers().forEach(function(T){T.isEdge()&&f[b].push(T.id())})}else c[b]=[void 0,m.target().id()]}):s.forEach(function(m){var b=m.id();if(m.isNode()){var w=m.degree(!0);w%2&&(u?l?o=!0:l=b:u=b),f[b]=[],m.connectedEdges().forEach(function(E){return f[b].push(E.id())})}else c[b]=[m.source().id(),m.target().id()]});var h={found:!1,trail:void 0};if(o)return h;if(l&&u)if(i){if(v&&l!=v)return h;v=l}else{if(v&&l!=v&&u!=v)return h;v||(v=l)}else v||(v=s[0].id());var d=function(b){for(var w=b,E=[b],C,x,T;f[w].length;)C=f[w].shift(),x=c[C][0],T=c[C][1],w!=T?(f[T]=f[T].filter(function(k){return k!=C}),w=T):!i&&w!=x&&(f[x]=f[x].filter(function(k){return k!=C}),w=x),E.unshift(C),E.unshift(w);return E},y=[],g=[];for(g=d(v);g.length!=1;)f[g[0]].length==0?(y.unshift(s.getElementById(g.shift())),y.unshift(s.getElementById(g.shift()))):g=d(g.shift()).concat(g);y.unshift(s.getElementById(g.shift()));for(var p in f)if(f[p].length)return h;return h.found=!0,h.trail=this.spawn(y,!0),h}},Ya=function(){var e=this,t={},a=0,n=0,i=[],s=[],o={},u=function(c,h){for(var d=s.length-1,y=[],g=e.spawn();s[d].x!=c||s[d].y!=h;)y.push(s.pop().edge),d--;y.push(s.pop().edge),y.forEach(function(p){var m=p.connectedNodes().intersection(e);g.merge(p),m.forEach(function(b){var w=b.id(),E=b.connectedEdges().intersection(e);g.merge(b),t[w].cutVertex?g.merge(E.filter(function(C){return C.isLoop()})):g.merge(E)})}),i.push(g)},l=function(c,h,d){c===d&&(n+=1),t[h]={id:a,low:a++,cutVertex:!1};var y=e.getElementById(h).connectedEdges().intersection(e);if(y.size()===0)i.push(e.spawn(e.getElementById(h)));else{var g,p,m,b;y.forEach(function(w){g=w.source().id(),p=w.target().id(),m=g===h?p:g,m!==d&&(b=w.id(),o[b]||(o[b]=!0,s.push({x:h,y:m,edge:w})),m in t?t[h].low=Math.min(t[h].low,t[m].id):(l(c,m,h),t[h].low=Math.min(t[h].low,t[m].low),t[h].id<=t[m].low&&(t[h].cutVertex=!0,u(h,m))))})}};e.forEach(function(f){if(f.isNode()){var c=f.id();c in t||(n=0,l(c,c),t[c].cutVertex=n>1)}});var v=Object.keys(t).filter(function(f){return t[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(v),components:i}},Bh={hopcroftTarjanBiconnected:Ya,htbc:Ya,htb:Ya,hopcroftTarjanBiconnectedComponents:Ya},Za=function(){var e=this,t={},a=0,n=[],i=[],s=e.spawn(e),o=function(l){i.push(l),t[l]={index:a,low:a++,explored:!1};var v=e.getElementById(l).connectedEdges().intersection(e);if(v.forEach(function(y){var g=y.target().id();g!==l&&(g in t||o(g),t[g].explored||(t[l].low=Math.min(t[l].low,t[g].low)))}),t[l].index===t[l].low){for(var f=e.spawn();;){var c=i.pop();if(f.merge(e.getElementById(c)),t[c].low=t[l].index,t[c].explored=!0,c===l)break}var h=f.edgesWith(f),d=f.merge(h);n.push(d),s=s.difference(d)}};return e.forEach(function(u){if(u.isNode()){var l=u.id();l in t||o(l)}}),{cut:s,components:n}},Ph={tarjanStronglyConnected:Za,tsc:Za,tscc:Za,tarjanStronglyConnectedComponents:Za},Sv={};[Ca,id,sd,ud,vd,cd,gd,Gd,Ut,Kt,Ps,rh,hh,mh,Sh,Dh,Bh,Ph].forEach(function(r){ye(Sv,r)});/*! +Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable +Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) +Licensed under The MIT License (http://opensource.org/licenses/MIT) +*/var kv=0,Dv=1,Bv=2,Or=function(e){if(!(this instanceof Or))return new Or(e);this.id="Thenable/1.0.7",this.state=kv,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Or.prototype={fulfill:function(e){return nu(this,Dv,"fulfillValue",e)},reject:function(e){return nu(this,Bv,"rejectReason",e)},then:function(e,t){var a=this,n=new Or;return a.onFulfilled.push(su(e,n,"fulfill")),a.onRejected.push(su(t,n,"reject")),Pv(a),n.proxy}};var nu=function(e,t,a,n){return e.state===kv&&(e.state=t,e[a]=n,Pv(e)),e},Pv=function(e){e.state===Dv?iu(e,"onFulfilled",e.fulfillValue):e.state===Bv&&iu(e,"onRejected",e.rejectReason)},iu=function(e,t,a){if(e[t].length!==0){var n=e[t];e[t]=[];var i=function(){for(var o=0;o0}},clearQueue:function(){return function(){var t=this,a=t.length!==void 0,n=a?t:[t],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s-1}return Fi=e,Fi}var Vi,Pu;function Xh(){if(Pu)return Vi;Pu=1;var r=zn();function e(t,a){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,a])):n[i][1]=a,this}return Vi=e,Vi}var qi,Au;function Yh(){if(Au)return qi;Au=1;var r=Wh(),e=$h(),t=Uh(),a=Kh(),n=Xh();function i(s){var o=-1,u=s==null?0:s.length;for(this.clear();++o-1&&a%1==0&&a0&&this.spawn(n).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},toggleClass:function(e,t){Ve(e)||(e=e.match(/\S+/g)||[]);for(var a=this,n=t===void 0,i=[],s=0,o=a.length;s0&&this.spawn(i).updateStyle().emit("class"),a},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var a=this;if(t==null)t=250;else if(t===0)return a;return a.addClass(e),setTimeout(function(){a.removeClass(e)},t),a}};un.className=un.classNames=un.classes;var Re={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:er,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Re.variable="(?:[\\w-.]|(?:\\\\"+Re.metaChar+"))+";Re.className="(?:[\\w-]|(?:\\\\"+Re.metaChar+"))+";Re.value=Re.string+"|"+Re.number;Re.id=Re.variable;(function(){var r,e,t;for(r=Re.comparatorOp.split("|"),t=0;t=0)&&e!=="="&&(Re.comparatorOp+="|\\!"+e)})();var Fe=function(){return{checks:[]}},ue={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},Ls=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(r,e){return Cc(r.selector,e.selector)}),kg=function(){for(var r={},e,t=0;t0&&v.edgeCount>0)return ze("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(v.edgeCount>1)return ze("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;v.edgeCount===1&&ze("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},Mg=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(v){return v??""},t=function(v){return he(v)?'"'+v+'"':e(v)},a=function(v){return" "+v+" "},n=function(v,f){var c=v.type,h=v.value;switch(c){case ue.GROUP:{var d=e(h);return d.substring(0,d.length-1)}case ue.DATA_COMPARE:{var y=v.field,g=v.operator;return"["+y+a(e(g))+t(h)+"]"}case ue.DATA_BOOL:{var p=v.operator,m=v.field;return"["+e(p)+m+"]"}case ue.DATA_EXIST:{var b=v.field;return"["+b+"]"}case ue.META_COMPARE:{var w=v.operator,E=v.field;return"[["+E+a(e(w))+t(h)+"]]"}case ue.STATE:return h;case ue.ID:return"#"+h;case ue.CLASS:return"."+h;case ue.PARENT:case ue.CHILD:return i(v.parent,f)+a(">")+i(v.child,f);case ue.ANCESTOR:case ue.DESCENDANT:return i(v.ancestor,f)+" "+i(v.descendant,f);case ue.COMPOUND_SPLIT:{var C=i(v.left,f),x=i(v.subject,f),T=i(v.right,f);return C+(C.length>0?" ":"")+x+T}case ue.TRUE:return""}},i=function(v,f){return v.checks.reduce(function(c,h,d){return c+(f===v&&d===0?"$":"")+n(h,f)},"")},s="",o=0;o1&&o=0&&(t=t.replace("!",""),f=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),v=!0),(i||o||v)&&(u=!i&&!s?"":""+e,l=""+a),v&&(e=u=u.toLowerCase(),a=l=l.toLowerCase()),t){case"*=":n=u.indexOf(l)>=0;break;case"$=":n=u.indexOf(l,u.length-l.length)>=0;break;case"^=":n=u.indexOf(l)===0;break;case"=":n=e===a;break;case">":c=!0,n=e>a;break;case">=":c=!0,n=e>=a;break;case"<":c=!0,n=e0;){var v=n.shift();e(v),i.add(v.id()),o&&a(n,i,v)}return r}function zv(r,e,t){if(t.isParent())for(var a=t._private.children,n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;return oo(this,r,e,zv)};function Fv(r,e,t){if(t.isChild()){var a=t._private.parent;e.has(a.id())||r.push(a)}}Qt.forEachUp=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return oo(this,r,e,Fv)};function qg(r,e,t){Fv(r,e,t),zv(r,e,t)}Qt.forEachUpAndDown=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return oo(this,r,e,qg)};Qt.ancestors=Qt.parents;var ka,Vv;ka=Vv={data:Ne.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Ne.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Ne.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ne.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Ne.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Ne.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};ka.attr=ka.data;ka.removeAttr=ka.removeData;var _g=Vv,Vn={};function hs(r){return function(e){var t=this;if(e===void 0&&(e=!0),t.length!==0)if(t.isNode()&&!t.removed()){for(var a=0,n=t[0],i=n._private.edges,s=0;se}),minIndegree:It("indegree",function(r,e){return re}),minOutdegree:It("outdegree",function(r,e){return re})});ye(Vn,{totalDegree:function(e){for(var t=0,a=this.nodes(),n=0;n0,c=f;f&&(v=v[0]);var h=c?v.position():{x:0,y:0};t!==void 0?l.position(e,t+h[e]):i!==void 0&&l.position({x:i.x+h.x,y:i.y+h.y})}else{var d=a.position(),y=o?a.parent():null,g=y&&y.length>0,p=g;g&&(y=y[0]);var m=p?y.position():{x:0,y:0};return i={x:d.x-m.x,y:d.y-m.y},e===void 0?i:i[e]}else if(!s)return;return this}};Ir.modelPosition=Ir.point=Ir.position;Ir.modelPositions=Ir.points=Ir.positions;Ir.renderedPoint=Ir.renderedPosition;Ir.relativePoint=Ir.relativePosition;var Gg=qv,Xt,gt;Xt=gt={};gt.renderedBoundingBox=function(r){var e=this.boundingBox(r),t=this.cy(),a=t.zoom(),n=t.pan(),i=e.x1*a+n.x,s=e.x2*a+n.x,o=e.y1*a+n.y,u=e.y2*a+n.y;return{x1:i,x2:s,y1:o,y2:u,w:s-i,h:u-o}};gt.dirtyCompoundBoundsCache=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(t){if(t.isParent()){var a=t._private;a.compoundBoundsClean=!1,a.bbCache=null,r||t.emitAndNotify("bounds")}}),this)};gt.updateCompoundBounds=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!r&&e.batching())return this;function t(s){if(!s.isParent())return;var o=s._private,u=s.children(),l=s.pstyle("compound-sizing-wrt-labels").value==="include",v={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=u.boundingBox({includeLabels:l,includeOverlays:!1,useCache:!1}),c=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=c.x-f.w/2,f.x2=c.x+f.w/2,f.y1=c.y-f.h/2,f.y2=c.y+f.h/2);function h(k,D,B){var P=0,A=0,R=D+B;return k>0&&R>0&&(P=D/R*k,A=B/R*k),{biasDiff:P,biasComplementDiff:A}}function d(k,D,B,P){if(B.units==="%")switch(P){case"width":return k>0?B.pfValue*k:0;case"height":return D>0?B.pfValue*D:0;case"average":return k>0&&D>0?B.pfValue*(k+D)/2:0;case"min":return k>0&&D>0?k>D?B.pfValue*D:B.pfValue*k:0;case"max":return k>0&&D>0?k>D?B.pfValue*k:B.pfValue*D:0;default:return 0}else return B.units==="px"?B.pfValue:0}var y=v.width.left.value;v.width.left.units==="px"&&v.width.val>0&&(y=y*100/v.width.val);var g=v.width.right.value;v.width.right.units==="px"&&v.width.val>0&&(g=g*100/v.width.val);var p=v.height.top.value;v.height.top.units==="px"&&v.height.val>0&&(p=p*100/v.height.val);var m=v.height.bottom.value;v.height.bottom.units==="px"&&v.height.val>0&&(m=m*100/v.height.val);var b=h(v.width.val-f.w,y,g),w=b.biasDiff,E=b.biasComplementDiff,C=h(v.height.val-f.h,p,m),x=C.biasDiff,T=C.biasComplementDiff;o.autoPadding=d(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,v.width.val),c.x=(-w+f.x1+f.x2+E)/2,o.autoHeight=Math.max(f.h,v.height.val),c.y=(-x+f.y1+f.y2+T)/2}for(var a=0;ae.x2?n:e.x2,e.y1=ae.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},rt=function(e,t){return t==null?e:Lr(e,t.x1,t.y1,t.x2,t.y2)},la=function(e,t,a){return xr(e,t,a)},Qa=function(e,t,a){if(!t.cy().headless()){var n=t._private,i=n.rstyle,s=i.arrowWidth/2,o=t.pstyle(a+"-arrow-shape").value,u,l;if(o!=="none"){a==="source"?(u=i.srcX,l=i.srcY):a==="target"?(u=i.tgtX,l=i.tgtY):(u=i.midX,l=i.midY);var v=n.arrowBounds=n.arrowBounds||{},f=v[a]=v[a]||{};f.x1=u-s,f.y1=l-s,f.x2=u+s,f.y2=l+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,sn(f,1),Lr(e,f.x1,f.y1,f.x2,f.y2)}}},gs=function(e,t,a){if(!t.cy().headless()){var n;a?n=a+"-":n="";var i=t._private,s=i.rstyle,o=t.pstyle(n+"label").strValue;if(o){var u=t.pstyle("text-halign"),l=t.pstyle("text-valign"),v=la(s,"labelWidth",a),f=la(s,"labelHeight",a),c=la(s,"labelX",a),h=la(s,"labelY",a),d=t.pstyle(n+"text-margin-x").pfValue,y=t.pstyle(n+"text-margin-y").pfValue,g=t.isEdge(),p=t.pstyle(n+"text-rotation"),m=t.pstyle("text-outline-width").pfValue,b=t.pstyle("text-border-width").pfValue,w=b/2,E=t.pstyle("text-background-padding").pfValue,C=2,x=f,T=v,k=T/2,D=x/2,B,P,A,R;if(g)B=c-k,P=c+k,A=h-D,R=h+D;else{switch(u.value){case"left":B=c-T,P=c;break;case"center":B=c-k,P=c+k;break;case"right":B=c,P=c+T;break}switch(l.value){case"top":A=h-x,R=h;break;case"center":A=h-D,R=h+D;break;case"bottom":A=h,R=h+x;break}}var L=d-Math.max(m,w)-E-C,I=d+Math.max(m,w)+E+C,M=y-Math.max(m,w)-E-C,O=y+Math.max(m,w)+E+C;B+=L,P+=I,A+=M,R+=O;var q=a||"main",_=i.labelBounds,N=_[q]=_[q]||{};N.x1=B,N.y1=A,N.x2=P,N.y2=R,N.w=P-B,N.h=R-A,N.leftPad=L,N.rightPad=I,N.topPad=M,N.botPad=O;var F=g&&p.strValue==="autorotate",U=p.pfValue!=null&&p.pfValue!==0;if(F||U){var J=F?la(i.rstyle,"labelAngle",a):p.pfValue,Z=Math.cos(J),j=Math.sin(J),re=(B+P)/2,ne=(A+R)/2;if(!g){switch(u.value){case"left":re=P;break;case"right":re=B;break}switch(l.value){case"top":ne=R;break;case"bottom":ne=A;break}}var Q=function(we,me){return we=we-re,me=me-ne,{x:we*Z-me*j+re,y:we*j+me*Z+ne}},V=Q(B,A),H=Q(B,R),W=Q(P,A),Y=Q(P,R);B=Math.min(V.x,H.x,W.x,Y.x),P=Math.max(V.x,H.x,W.x,Y.x),A=Math.min(V.y,H.y,W.y,Y.y),R=Math.max(V.y,H.y,W.y,Y.y)}var te=q+"Rot",ce=_[te]=_[te]||{};ce.x1=B,ce.y1=A,ce.x2=P,ce.y2=R,ce.w=P-B,ce.h=R-A,Lr(e,B,A,P,R),Lr(i.labelBounds.all,B,A,P,R)}return e}},il=function(e,t){if(!t.cy().headless()){var a=t.pstyle("outline-opacity").value,n=t.pstyle("outline-width").value,i=t.pstyle("outline-offset").value,s=n+i;Gv(e,t,a,s,"outside",s/2)}},Gv=function(e,t,a,n,i,s){if(!(a===0||n<=0||i==="inside")){var o=t.cy(),u=o.renderer(),l=u.nodeShapes[u.getNodeShape(t)];if(l){var v=t.position(),f=v.x,c=v.y,h=t.width(),d=t.height();if(l.hasMiterBounds){i==="center"&&(n/=2);var y=l.miterBounds(f,c,h,d,n);rt(e,y)}else s!=null&&s>0&&on(e,[s,s,s,s])}}},Hg=function(e,t){if(!t.cy().headless()){var a=t.pstyle("border-opacity").value,n=t.pstyle("border-width").pfValue,i=t.pstyle("border-position").value;Gv(e,t,a,n,i)}},Wg=function(e,t){var a=e._private.cy,n=a.styleEnabled(),i=a.headless(),s=yr(),o=e._private,u=e.isNode(),l=e.isEdge(),v,f,c,h,d,y,g=o.rstyle,p=u&&n?e.pstyle("bounds-expansion").pfValue:[0],m=function(Be){return Be.pstyle("display").value!=="none"},b=!n||m(e)&&(!l||m(e.source())&&m(e.target()));if(b){var w=0,E=0;n&&t.includeOverlays&&(w=e.pstyle("overlay-opacity").value,w!==0&&(E=e.pstyle("overlay-padding").value));var C=0,x=0;n&&t.includeUnderlays&&(C=e.pstyle("underlay-opacity").value,C!==0&&(x=e.pstyle("underlay-padding").value));var T=Math.max(E,x),k=0,D=0;if(n&&(k=e.pstyle("width").pfValue,D=k/2),u&&t.includeNodes){var B=e.position();d=B.x,y=B.y;var P=e.outerWidth(),A=P/2,R=e.outerHeight(),L=R/2;v=d-A,f=d+A,c=y-L,h=y+L,Lr(s,v,c,f,h),n&&il(s,e),n&&t.includeOutlines&&!i&&il(s,e),n&&Hg(s,e)}else if(l&&t.includeEdges)if(n&&!i){var I=e.pstyle("curve-style").strValue;if(v=Math.min(g.srcX,g.midX,g.tgtX),f=Math.max(g.srcX,g.midX,g.tgtX),c=Math.min(g.srcY,g.midY,g.tgtY),h=Math.max(g.srcY,g.midY,g.tgtY),v-=D,f+=D,c-=D,h+=D,Lr(s,v,c,f,h),I==="haystack"){var M=g.haystackPts;if(M&&M.length===2){if(v=M[0].x,c=M[0].y,f=M[1].x,h=M[1].y,v>f){var O=v;v=f,f=O}if(c>h){var q=c;c=h,h=q}Lr(s,v-D,c-D,f+D,h+D)}}else if(I==="bezier"||I==="unbundled-bezier"||tt(I,"segments")||tt(I,"taxi")){var _;switch(I){case"bezier":case"unbundled-bezier":_=g.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":_=g.linePts;break}if(_!=null)for(var N=0;N<_.length;N++){var F=_[N];v=F.x-D,f=F.x+D,c=F.y-D,h=F.y+D,Lr(s,v,c,f,h)}}}else{var U=e.source(),J=U.position(),Z=e.target(),j=Z.position();if(v=J.x,f=j.x,c=J.y,h=j.y,v>f){var re=v;v=f,f=re}if(c>h){var ne=c;c=h,h=ne}v-=D,f+=D,c-=D,h+=D,Lr(s,v,c,f,h)}if(n&&t.includeEdges&&l&&(Qa(s,e,"mid-source"),Qa(s,e,"mid-target"),Qa(s,e,"source"),Qa(s,e,"target")),n){var Q=e.pstyle("ghost").value==="yes";if(Q){var V=e.pstyle("ghost-offset-x").pfValue,H=e.pstyle("ghost-offset-y").pfValue;Lr(s,s.x1+V,s.y1+H,s.x2+V,s.y2+H)}}var W=o.bodyBounds=o.bodyBounds||{};Wo(W,s),on(W,p),sn(W,1),n&&(v=s.x1,f=s.x2,c=s.y1,h=s.y2,Lr(s,v-T,c-T,f+T,h+T));var Y=o.overlayBounds=o.overlayBounds||{};Wo(Y,s),on(Y,p),sn(Y,1);var te=o.labelBounds=o.labelBounds||{};te.all!=null?Sd(te.all):te.all=yr(),n&&t.includeLabels&&(t.includeMainLabels&&gs(s,e,null),l&&(t.includeSourceLabels&&gs(s,e,"source"),t.includeTargetLabels&&gs(s,e,"target")))}return s.x1=Dr(s.x1),s.y1=Dr(s.y1),s.x2=Dr(s.x2),s.y2=Dr(s.y2),s.w=Dr(s.x2-s.x1),s.h=Dr(s.y2-s.y1),s.w>0&&s.h>0&&b&&(on(s,p),sn(s,1)),s},Hv=function(e){var t=0,a=function(s){return(s?1:0)<0&&arguments[0]!==void 0?arguments[0]:ip,e=arguments.length>1?arguments[1]:void 0,t=0;t=0;o--)s(o);return this};ct.removeAllListeners=function(){return this.removeListener("*")};ct.emit=ct.trigger=function(r,e,t){var a=this.listeners,n=a.length;return this.emitting++,Ve(e)||(e=[e]),sp(this,function(i,s){t!=null&&(a=[{event:s.event,type:s.type,namespace:s.namespace,callback:t}],n=a.length);for(var o=function(){var v=a[u];if(v.type===s.type&&(!v.namespace||v.namespace===s.namespace||v.namespace===np)&&i.eventMatches(i.context,v,s)){var f=[s];e!=null&&Zc(f,e),i.beforeEmit(i.context,v,s),v.conf&&v.conf.one&&(i.listeners=i.listeners.filter(function(d){return d!==v}));var c=i.callbackContext(i.context,v,s),h=v.callback.apply(c,f);i.afterEmit(i.context,v,s),h===!1&&(s.stopPropagation(),s.preventDefault())}},u=0;u1&&!s){var o=this.length-1,u=this[o],l=u._private.data.id;this[o]=void 0,this[e]=u,i.set(l,{ele:u,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,a=e._private.data.id,n=t.map,i=n.get(a);if(!i)return this;var s=i.index;return this.unmergeAt(s),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&he(e)){var a=e;e=t.mutableElements().filter(a)}for(var n=0;n=0;t--){var a=this[t];e(a)&&this.unmergeAt(t)}return this},map:function(e,t){for(var a=[],n=this,i=0;ia&&(a=u,n=o)}return{value:a,ele:n}},min:function(e,t){for(var a=1/0,n,i=this,s=0;s=0&&i"u"?"undefined":rr(Symbol))!=e&&rr(Symbol.iterator)!=e;t&&(Cn[Symbol.iterator]=function(){var a=this,n={value:void 0,done:!1},i=0,s=this.length;return Zl({next:function(){return i1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],n=a.cy();if(n.styleEnabled()&&a){a._private.styleDirty&&(a._private.styleDirty=!1,n.style().apply(a));var i=a._private.style[e];return i??(t?n.style().getDefaultProperty(e):null)}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var a=t.pstyle(e);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=this[0];if(a)return t.style().getRenderedStyle(a,e)},style:function(e,t){var a=this.cy();if(!a.styleEnabled())return this;var n=!1,i=a.style();if(Me(e)){var s=e;i.applyBypass(this,s,n),this.emitAndNotify("style")}else if(he(e))if(t===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,t,n),this.emitAndNotify("style");else if(e===void 0){var u=this[0];return u?i.getRawStyle(u):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=!1,n=t.style(),i=this;if(e===void 0)for(var s=0;s0&&e.push(v[0]),e.push(o[0])}return this.spawn(e,!0).filter(r)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});dr.neighbourhood=dr.neighborhood;dr.closedNeighbourhood=dr.closedNeighborhood;dr.openNeighbourhood=dr.openNeighborhood;ye(dr,{source:Br(function(e){var t=this[0],a;return t&&(a=t._private.source||t.cy().collection()),a&&e?a.filter(e):a},"source"),target:Br(function(e){var t=this[0],a;return t&&(a=t._private.target||t.cy().collection()),a&&e?a.filter(e):a},"target"),sources:pl({attr:"source"}),targets:pl({attr:"target"})});function pl(r){return function(t){for(var a=[],n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});dr.componentsOf=dr.components;var lr=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){He("A collection must have a reference to the core");return}var i=new Kr,s=!1;if(!t)t=[];else if(t.length>0&&Me(t[0])&&!Ma(t[0])){s=!0;for(var o=[],u=new jt,l=0,v=t.length;l0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=t.cy(),n=a._private,i=[],s=[],o,u=0,l=t.length;u0){for(var q=o.length===t.length?t:new lr(a,o),_=0;_0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=[],n={},i=t._private.cy;function s(R){for(var L=R._private.edges,I=0;I0&&(r?B.emitAndNotify("remove"):e&&B.emit("remove"));for(var P=0;P0?P=R:B=R;while(Math.abs(A)>s&&++L=i?m(D,L):I===0?L:w(D,B,B+l)}var C=!1;function x(){C=!0,(r!==e||t!==a)&&b()}var T=function(B){return C||x(),r===e&&t===a?B:B===0?0:B===1?1:g(E(B),e,a)};T.getControlPoints=function(){return[{x:r,y:e},{x:t,y:a}]};var k="generateBezier("+[r,e,t,a]+")";return T.toString=function(){return k},T}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var yp=function(){function r(a){return-a.tension*a.x-a.friction*a.v}function e(a,n,i){var s={x:a.x+i.dx*n,v:a.v+i.dv*n,tension:a.tension,friction:a.friction};return{dx:s.v,dv:r(s)}}function t(a,n){var i={dx:a.v,dv:r(a)},s=e(a,n*.5,i),o=e(a,n*.5,s),u=e(a,n,o),l=1/6*(i.dx+2*(s.dx+o.dx)+u.dx),v=1/6*(i.dv+2*(s.dv+o.dv)+u.dv);return a.x=a.x+l*n,a.v=a.v+v*n,a}return function a(n,i,s){var o={x:-1,v:0,tension:null,friction:null},u=[0],l=0,v=1/1e4,f=16/1e3,c,h,d;for(n=parseFloat(n)||500,i=parseFloat(i)||20,s=s||null,o.tension=n,o.friction=i,c=s!==null,c?(l=a(n,i),h=l/s*f):h=f;d=t(d||o,h),u.push(1+d.x),l+=16,Math.abs(d.x)>v&&Math.abs(d.v)>v;);return c?function(y){return u[y*(u.length-1)|0]}:l}}(),qe=function(e,t,a,n){var i=pp(e,t,a,n);return function(s,o,u){return s+(o-s)*i(u)}},vn={linear:function(e,t,a){return e+(t-e)*a},ease:qe(.25,.1,.25,1),"ease-in":qe(.42,0,1,1),"ease-out":qe(0,0,.58,1),"ease-in-out":qe(.42,0,.58,1),"ease-in-sine":qe(.47,0,.745,.715),"ease-out-sine":qe(.39,.575,.565,1),"ease-in-out-sine":qe(.445,.05,.55,.95),"ease-in-quad":qe(.55,.085,.68,.53),"ease-out-quad":qe(.25,.46,.45,.94),"ease-in-out-quad":qe(.455,.03,.515,.955),"ease-in-cubic":qe(.55,.055,.675,.19),"ease-out-cubic":qe(.215,.61,.355,1),"ease-in-out-cubic":qe(.645,.045,.355,1),"ease-in-quart":qe(.895,.03,.685,.22),"ease-out-quart":qe(.165,.84,.44,1),"ease-in-out-quart":qe(.77,0,.175,1),"ease-in-quint":qe(.755,.05,.855,.06),"ease-out-quint":qe(.23,1,.32,1),"ease-in-out-quint":qe(.86,0,.07,1),"ease-in-expo":qe(.95,.05,.795,.035),"ease-out-expo":qe(.19,1,.22,1),"ease-in-out-expo":qe(1,0,0,1),"ease-in-circ":qe(.6,.04,.98,.335),"ease-out-circ":qe(.075,.82,.165,1),"ease-in-out-circ":qe(.785,.135,.15,.86),spring:function(e,t,a){if(a===0)return vn.linear;var n=yp(e,t,a);return function(i,s,o){return i+(s-i)*n(o)}},"cubic-bezier":qe};function bl(r,e,t,a,n){if(a===1||e===t)return t;var i=n(e,t,a);return r==null||((r.roundValue||r.color)&&(i=Math.round(i)),r.min!==void 0&&(i=Math.max(i,r.min)),r.max!==void 0&&(i=Math.min(i,r.max))),i}function wl(r,e){return r.pfValue!=null||r.value!=null?r.pfValue!=null&&(e==null||e.type.units!=="%")?r.pfValue:r.value:r}function Ot(r,e,t,a,n){var i=n!=null?n.type:null;t<0?t=0:t>1&&(t=1);var s=wl(r,n),o=wl(e,n);if(ae(s)&&ae(o))return bl(i,s,o,t,a);if(Ve(s)&&Ve(o)){for(var u=[],l=0;l0?(h==="spring"&&d.push(s.duration),s.easingImpl=vn[h].apply(null,d)):s.easingImpl=vn[h]}var y=s.easingImpl,g;if(s.duration===0?g=1:g=(t-u)/s.duration,s.applying&&(g=s.progress),g<0?g=0:g>1&&(g=1),s.delay==null){var p=s.startPosition,m=s.position;if(m&&n&&!r.locked()){var b={};fa(p.x,m.x)&&(b.x=Ot(p.x,m.x,g,y)),fa(p.y,m.y)&&(b.y=Ot(p.y,m.y,g,y)),r.position(b)}var w=s.startPan,E=s.pan,C=i.pan,x=E!=null&&a;x&&(fa(w.x,E.x)&&(C.x=Ot(w.x,E.x,g,y)),fa(w.y,E.y)&&(C.y=Ot(w.y,E.y,g,y)),r.emit("pan"));var T=s.startZoom,k=s.zoom,D=k!=null&&a;D&&(fa(T,k)&&(i.zoom=Ta(i.minZoom,Ot(T,k,g,y),i.maxZoom)),r.emit("zoom")),(x||D)&&r.emit("viewport");var B=s.style;if(B&&B.length>0&&n){for(var P=0;P=0;x--){var T=C[x];T()}C.splice(0,C.length)},m=h.length-1;m>=0;m--){var b=h[m],w=b._private;if(w.stopped){h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.frames);continue}!w.playing&&!w.applying||(w.playing&&w.applying&&(w.applying=!1),w.started||bp(v,b,r),mp(v,b,r,f),w.applying&&(w.applying=!1),p(w.frames),w.step!=null&&w.step(r),b.completed()&&(h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.completes)),y=!0)}return!f&&h.length===0&&d.length===0&&a.push(v),y}for(var i=!1,s=0;s0?e.notify("draw",t):e.notify("draw")),t.unmerge(a),e.emit("step")}var wp={animate:Ne.animate(),animation:Ne.animation(),animated:Ne.animated(),clearQueue:Ne.clearQueue(),delay:Ne.delay(),delayAnimation:Ne.delayAnimation(),stop:Ne.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&mn(function(i){xl(i,e),t()})}var a=e.renderer();a&&a.beforeRender?a.beforeRender(function(i,s){xl(s,e)},a.beforeRenderPriorities.animations):t()}},xp={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,a){var n=t.qualifier;return n!=null?e!==a.target&&Ma(a.target)&&n.matches(a.target):!0},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,a){return t.qualifier!=null?a.target:e}},en=function(e){return he(e)?new vt(e):e},ef={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new qn(xp,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,a){return this.emitter().on(e,en(t),a),this},removeListener:function(e,t,a){return this.emitter().removeListener(e,en(t),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,a){return this.emitter().one(e,en(t),a),this},once:function(e,t,a){return this.emitter().one(e,en(t),a),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Ne.eventAliasesOn(ef);var Os={png:function(e){var t=this._private.renderer;return e=e||{},t.png(e)},jpg:function(e){var t=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",t.jpg(e)}};Os.jpeg=Os.jpg;var fn={layout:function(e){var t=this;if(e==null){He("Layout options must be specified to make a layout");return}if(e.name==null){He("A `name` must be specified to make a layout");return}var a=e.name,n=t.extension("layout",a);if(n==null){He("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;he(e.eles)?i=t.$(e.eles):i=e.eles!=null?e.eles:t.$();var s=new n(ye({},e,{cy:t,eles:i}));return s}};fn.createLayout=fn.makeLayout=fn.layout;var Ep={notify:function(e,t){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var n=a.batchNotifications[e]=a.batchNotifications[e]||this.collection();t!=null&&n.merge(t);return}if(a.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,t)}},notifications:function(e){var t=this._private;return e===void 0?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(a){var n=e.batchNotifications[a];n.empty()?t.notify(a):t.notify(a,n)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var a=Object.keys(e),n=0;n0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(a){var n=a._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Ns.invalidateDimensions=Ns.resize;var cn={collection:function(e,t){return he(e)?this.$(e):Tr(e)?e.collection():Ve(e)?(t||(t={}),new lr(this,e,t.unique,t.removed)):new lr(this)},nodes:function(e){var t=this.$(function(a){return a.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(a){return a.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};cn.elements=cn.filter=cn.$;var sr={},ma="t",Tp="f";sr.apply=function(r){for(var e=this,t=e._private,a=t.cy,n=a.collection(),i=0;i0;if(c||f&&h){var d=void 0;c&&h||c?d=l.properties:h&&(d=l.mappedProperties);for(var y=0;y1&&(w=1),o.color){var C=a.valueMin[0],x=a.valueMax[0],T=a.valueMin[1],k=a.valueMax[1],D=a.valueMin[2],B=a.valueMax[2],P=a.valueMin[3]==null?1:a.valueMin[3],A=a.valueMax[3]==null?1:a.valueMax[3],R=[Math.round(C+(x-C)*w),Math.round(T+(k-T)*w),Math.round(D+(B-D)*w),Math.round(P+(A-P)*w)];i={bypass:a.bypass,name:a.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else if(o.number){var L=a.valueMin+(a.valueMax-a.valueMin)*w;i=this.parse(a.name,L,a.bypass,c)}else return!1;if(!i)return y(),!1;i.mapping=a,a=i;break}case s.data:{for(var I=a.field.split("."),M=f.data,O=0;O0&&i>0){for(var o={},u=!1,l=0;l0?r.delayAnimation(s).play().promise().then(b):b()}).then(function(){return r.animation({style:o,duration:i,easing:r.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){t.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1)};sr.checkTrigger=function(r,e,t,a,n,i){var s=this.properties[e],o=n(s);r.removed()||o!=null&&o(t,a,r)&&i(s)};sr.checkZOrderTrigger=function(r,e,t,a){var n=this;this.checkTrigger(r,e,t,a,function(i){return i.triggersZOrder},function(){n._private.cy.notify("zorder",r)})};sr.checkBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBounds},function(n){r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache()})};sr.checkConnectedEdgesBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBoundsOfConnectedEdges},function(n){r.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};sr.checkParallelEdgesBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBoundsOfParallelEdges},function(n){r.parallelEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};sr.checkTriggers=function(r,e,t,a){r.dirtyStyleCache(),this.checkZOrderTrigger(r,e,t,a),this.checkBoundsTrigger(r,e,t,a),this.checkConnectedEdgesBoundsTrigger(r,e,t,a),this.checkParallelEdgesBoundsTrigger(r,e,t,a)};var Va={};Va.applyBypass=function(r,e,t,a){var n=this,i=[],s=!0;if(e==="*"||e==="**"){if(t!==void 0)for(var o=0;on.length?a=a.substr(n.length):a=""}function u(){i.length>s.length?i=i.substr(s.length):i=""}for(;;){var l=a.match(/^\s*$/);if(l)break;var v=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!v){ze("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}n=v[0];var f=v[1];if(f!=="core"){var c=new vt(f);if(c.invalid){ze("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var h=v[2],d=!1;i=h;for(var y=[];;){var g=i.match(/^\s*$/);if(g)break;var p=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){ze("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),d=!0;break}s=p[0];var m=p[1],b=p[2],w=e.properties[m];if(!w){ze("Skipping property: Invalid property name in: "+s),u();continue}var E=t.parse(m,b);if(!E){ze("Skipping property: Invalid property definition in: "+s),u();continue}y.push({name:m,val:b}),u()}if(d){o();break}t.selector(f);for(var C=0;C=7&&e[0]==="d"&&(v=new RegExp(o.data.regex).exec(e))){if(t)return!1;var c=o.data;return{name:r,value:v,strValue:""+e,mapped:c,field:v[1],bypass:t}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(t||l.multiple)return!1;var h=o.mapData;if(!(l.color||l.number))return!1;var d=this.parse(r,f[4]);if(!d||d.mapped)return!1;var y=this.parse(r,f[5]);if(!y||y.mapped)return!1;if(d.pfValue===y.pfValue||d.strValue===y.strValue)return ze("`"+r+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+r+": "+d.strValue+"`"),this.parse(r,d.strValue);if(l.color){var g=d.value,p=y.value,m=g[0]===p[0]&&g[1]===p[1]&&g[2]===p[2]&&(g[3]===p[3]||(g[3]==null||g[3]===1)&&(p[3]==null||p[3]===1));if(m)return!1}return{name:r,value:f,strValue:""+e,mapped:h,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:d.value,valueMax:y.value,bypass:t}}}if(l.multiple&&a!=="multiple"){var b;if(u?b=e.split(/\s+/):Ve(e)?b=e:b=[e],l.evenMultiple&&b.length%2!==0)return null;for(var w=[],E=[],C=[],x="",T=!1,k=0;k0?" ":"")+D.strValue}return l.validate&&!l.validate(w,E)?null:l.singleEnum&&T?w.length===1&&he(w[0])?{name:r,value:w[0],strValue:w[0],bypass:t}:null:{name:r,value:w,pfValue:C,strValue:x,bypass:t,units:E}}var B=function(){for(var Q=0;Ql.max||l.strictMax&&e===l.max))return null;var I={name:r,value:e,strValue:""+e+(P||""),units:P,bypass:t};return l.unitless||P!=="px"&&P!=="em"?I.pfValue=e:I.pfValue=P==="px"||!P?e:this.getEmSizeInPixels()*e,(P==="ms"||P==="s")&&(I.pfValue=P==="ms"?e:1e3*e),(P==="deg"||P==="rad")&&(I.pfValue=P==="rad"?e:xd(e)),P==="%"&&(I.pfValue=e/100),I}else if(l.propList){var M=[],O=""+e;if(O!=="none"){for(var q=O.split(/\s*,\s*|\s+/),_=0;_0&&o>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){u=Math.min((s-2*t)/a.w,(o-2*t)/a.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u=a.minZoom&&(a.maxZoom=t),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t=this._private,a=t.pan,n=t.zoom,i,s,o=!1;if(t.zoomingEnabled||(o=!0),ae(e)?s=e:Me(e)&&(s=e.level,e.position!=null?i=Ln(e.position,n,a):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!t.panningEnabled&&(o=!0)),s=s>t.maxZoom?t.maxZoom:s,s=st.maxZoom||!t.zoomingEnabled?s=!0:(t.zoom=u,i.push("zoom"))}if(n&&(!s||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;ae(l.x)&&(t.pan.x=l.x,o=!1),ae(l.y)&&(t.pan.y=l.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(he(e)){var a=e;e=this.mutableElements().filter(a)}else Tr(e)||(e=this.mutableElements());if(e.length!==0){var n=e.boundingBox(),i=this.width(),s=this.height();t=t===void 0?this._private.zoom:t;var o={x:(i-t*(n.x1+n.x2))/2,y:(s-t*(n.y1+n.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container,a=this;return e.sizeCache=e.sizeCache||(t?function(){var n=a.window().getComputedStyle(t),i=function(o){return parseFloat(n.getPropertyValue(o))};return{width:t.clientWidth-i("padding-left")-i("padding-right"),height:t.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,a=this.renderedExtent(),n={x1:(a.x1-e.x)/t,x2:(a.x2-e.x)/t,y1:(a.y1-e.y)/t,y2:(a.y2-e.y)/t};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};Pt.centre=Pt.center;Pt.autolockNodes=Pt.autolock;Pt.autoungrabifyNodes=Pt.autoungrabify;var Ba={data:Ne.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Ne.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Ne.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ne.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Ba.attr=Ba.data;Ba.removeAttr=Ba.removeData;var Pa=function(e){var t=this;e=ye({},e);var a=e.container;a&&!yn(a)&&yn(a[0])&&(a=a[0]);var n=a?a._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];a&&(a._cyreg=n),n.cy=t;var s=je!==void 0&&a!==void 0&&!e.headless,o=e;o.layout=ye({name:s?"grid":"null"},o.layout),o.renderer=ye({name:s?"canvas":"null"},o.renderer);var u=function(d,y,g){return y!==void 0?y:g!==void 0?g:d},l=this._private={container:a,ready:!1,options:o,elements:new lr(this),listeners:[],aniEles:new lr(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:u(!0,o.zoomingEnabled),userZoomingEnabled:u(!0,o.userZoomingEnabled),panningEnabled:u(!0,o.panningEnabled),userPanningEnabled:u(!0,o.userPanningEnabled),boxSelectionEnabled:u(!0,o.boxSelectionEnabled),autolock:u(!1,o.autolock,o.autolockNodes),autoungrabify:u(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:u(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:ae(o.zoom)?o.zoom:1,pan:{x:Me(o.pan)&&ae(o.pan.x)?o.pan.x:0,y:Me(o.pan)&&ae(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:u(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var v=function(d,y){var g=d.some(gc);if(g)return ea.all(d).then(y);y(d)};l.styleEnabled&&t.setStyle([]);var f=ye({},o,o.renderer);t.initRenderer(f);var c=function(d,y,g){t.notifications(!1);var p=t.mutableElements();p.length>0&&p.remove(),d!=null&&(Me(d)||Ve(d))&&t.add(d),t.one("layoutready",function(b){t.notifications(!0),t.emit(b),t.one("load",y),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",g),t.emit("done")});var m=ye({},t._private.options.layout);m.eles=t.elements(),t.layout(m).run()};v([o.style,o.elements],function(h){var d=h[0],y=h[1];l.styleEnabled&&t.style().append(d),c(y,function(){t.startAnimationLoop(),l.ready=!0,$e(o.ready)&&t.on("ready",o.ready);for(var g=0;g0,o=!!r.boundingBox,u=yr(o?r.boundingBox:structuredClone(e.extent())),l;if(Tr(r.roots))l=r.roots;else if(Ve(r.roots)){for(var v=[],f=0;f0;){var R=A(),L=k(R,B);if(L)R.outgoers().filter(function(ge){return ge.isNode()&&t.has(ge)}).forEach(P);else if(L===null){ze("Detected double maximal shift for node `"+R.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var I=0;if(r.avoidOverlap)for(var M=0;M0&&p[0].length<=3?be/2:0),De=2*Math.PI/p[fe].length*xe;return fe===0&&p[0].length===1&&(Se=1),{x:W.x+Se*Math.cos(De),y:W.y+Se*Math.sin(De)}}else{var Oe=p[fe].length,Le=Math.max(Oe===1?0:o?(u.w-r.padding*2-Y.w)/((r.grid?ce:Oe)-1):(u.w-r.padding*2-Y.w)/((r.grid?ce:Oe)+1),I),Ae={x:W.x+(xe+1-(Oe+1)/2)*Le,y:W.y+(fe+1-(Z+1)/2)*te};return Ae}},we={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(we).indexOf(r.direction)===-1&&He("Invalid direction '".concat(r.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(we).join(", ")));var me=function(se){return Wc(Be(se),u,we[r.direction])};return t.nodes().layoutPositions(this,r,me),this};var Pp={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function tf(r){this.options=ye({},Pp,r)}tf.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=a.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var s=yr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},u=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,l=u/Math.max(1,i.length-1),v,f=0,c=0;c1&&e.avoidOverlap){f*=1.75;var p=Math.cos(l)-Math.cos(0),m=Math.sin(l)-Math.sin(0),b=Math.sqrt(f*f/(p*p+m*m));v=Math.max(b,v)}var w=function(C,x){var T=e.startAngle+x*l*(n?1:-1),k=v*Math.cos(T),D=v*Math.sin(T),B={x:o.x+k,y:o.y+D};return B};return a.nodes().layoutPositions(this,e,w),this};var Ap={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function af(r){this.options=ye({},Ap,r)}af.prototype.run=function(){for(var r=this.options,e=r,t=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=r.cy,n=e.eles,i=n.nodes().not(":parent"),s=yr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},u=[],l=0,v=0;v0){var E=Math.abs(m[0].value-w.value);E>=g&&(m=[],p.push(m))}m.push(w)}var C=l+e.minNodeSpacing;if(!e.avoidOverlap){var x=p.length>0&&p[0].length>1,T=Math.min(s.w,s.h)/2-C,k=T/(p.length+x?1:0);C=Math.min(C,k)}for(var D=0,B=0;B1&&e.avoidOverlap){var L=Math.cos(R)-Math.cos(0),I=Math.sin(R)-Math.sin(0),M=Math.sqrt(C*C/(L*L+I*I));D=Math.max(M,D)}P.r=D,D+=C}if(e.equidistant){for(var O=0,q=0,_=0;_=r.numIter||(zp(a,r),a.temperature=a.temperature*r.coolingFactor,a.temperature=r.animationThreshold&&i(),mn(v)}};v()}else{for(;l;)l=s(u),u++;Tl(a,r),o()}return this};$n.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};$n.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Mp=function(e,t,a){for(var n=a.eles.edges(),i=a.eles.nodes(),s=yr(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:a.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},u=a.eles.components(),l={},v=0;v0){o.graphSet.push(T);for(var v=0;vn.count?0:n.graph},nf=function(e,t,a,n){var i=n.graphSet[a];if(-10)var f=n.nodeOverlap*v,c=Math.sqrt(o*o+u*u),h=f*o/c,d=f*u/c;else var y=Sn(e,o,u),g=Sn(t,-1*o,-1*u),p=g.x-y.x,m=g.y-y.y,b=p*p+m*m,c=Math.sqrt(b),f=(e.nodeRepulsion+t.nodeRepulsion)/b,h=f*p/c,d=f*m/c;e.isLocked||(e.offsetX-=h,e.offsetY-=d),t.isLocked||(t.offsetX+=h,t.offsetY+=d)}},qp=function(e,t,a,n){if(a>0)var i=e.maxX-t.minX;else var i=t.maxX-e.minX;if(n>0)var s=e.maxY-t.minY;else var s=t.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},Sn=function(e,t,a){var n=e.positionX,i=e.positionY,s=e.height||1,o=e.width||1,u=a/t,l=s/o,v={};return t===0&&0a?(v.x=n,v.y=i+s/2,v):0t&&-1*l<=u&&u<=l?(v.x=n-o/2,v.y=i-o*a/2/t,v):0=l)?(v.x=n+s*t/2/a,v.y=i+s/2,v):(0>a&&(u<=-1*l||u>=l)&&(v.x=n-s*t/2/a,v.y=i-s/2),v)},_p=function(e,t){for(var a=0;aa){var g=t.gravity*h/y,p=t.gravity*d/y;c.offsetX+=g,c.offsetY+=p}}}}},Hp=function(e,t){var a=[],n=0,i=-1;for(a.push.apply(a,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var s=a[n++],o=e.idToIndex[s],u=e.layoutNodes[o],l=u.children;if(0a)var i={x:a*e/n,y:a*t/n};else var i={x:e,y:t};return i},of=function(e,t){var a=e.parentId;if(a!=null){var n=t.layoutNodes[t.idToIndex[a]],i=!1;if((n.maxX==null||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(n.minX==null||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(n.minY==null||e.minY-n.padTopp&&(d+=g+t.componentSpacing,h=0,y=0,g=0)}}},Up={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function uf(r){this.options=ye({},Up,r)}uf.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=a.nodes().not(":parent");e.sort&&(n=n.sort(e.sort));var i=yr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});if(i.h===0||i.w===0)a.nodes().layoutPositions(this,e,function(U){return{x:i.x1,y:i.y1}});else{var s=n.size(),o=Math.sqrt(s*i.h/i.w),u=Math.round(o),l=Math.round(i.w/i.h*o),v=function(J){if(J==null)return Math.min(u,l);var Z=Math.min(u,l);Z==u?u=J:l=J},f=function(J){if(J==null)return Math.max(u,l);var Z=Math.max(u,l);Z==u?u=J:l=J},c=e.rows,h=e.cols!=null?e.cols:e.columns;if(c!=null&&h!=null)u=c,l=h;else if(c!=null&&h==null)u=c,l=Math.ceil(s/u);else if(c==null&&h!=null)l=h,u=Math.ceil(s/l);else if(l*u>s){var d=v(),y=f();(d-1)*y>=s?v(d-1):(y-1)*d>=s&&f(y-1)}else for(;l*u=s?f(p+1):v(g+1)}var m=i.w/l,b=i.h/u;if(e.condense&&(m=0,b=0),e.avoidOverlap)for(var w=0;w=l&&(L=0,R++)},M={},O=0;O(L=Od(r,e,I[M],I[M+1],I[M+2],I[M+3])))return g(x,L),!0}else if(k.edgeType==="bezier"||k.edgeType==="multibezier"||k.edgeType==="self"||k.edgeType==="compound"){for(var I=k.allpts,M=0;M+5(L=Id(r,e,I[M],I[M+1],I[M+2],I[M+3],I[M+4],I[M+5])))return g(x,L),!0}for(var O=O||T.source,q=q||T.target,_=n.getArrowWidth(D,B),N=[{name:"source",x:k.arrowStartX,y:k.arrowStartY,angle:k.srcArrowAngle},{name:"target",x:k.arrowEndX,y:k.arrowEndY,angle:k.tgtArrowAngle},{name:"mid-source",x:k.midX,y:k.midY,angle:k.midsrcArrowAngle},{name:"mid-target",x:k.midX,y:k.midY,angle:k.midtgtArrowAngle}],M=0;M0&&(p(O),p(q))}function b(x,T,k){return xr(x,T,k)}function w(x,T){var k=x._private,D=c,B;T?B=T+"-":B="",x.boundingBox();var P=k.labelBounds[T||"main"],A=x.pstyle(B+"label").value,R=x.pstyle("text-events").strValue==="yes";if(!(!R||!A)){var L=b(k.rscratch,"labelX",T),I=b(k.rscratch,"labelY",T),M=b(k.rscratch,"labelAngle",T),O=x.pstyle(B+"text-margin-x").pfValue,q=x.pstyle(B+"text-margin-y").pfValue,_=P.x1-D-O,N=P.x2+D-O,F=P.y1-D-q,U=P.y2+D-q;if(M){var J=Math.cos(M),Z=Math.sin(M),j=function(Y,te){return Y=Y-L,te=te-I,{x:Y*J-te*Z+L,y:Y*Z+te*J+I}},re=j(_,F),ne=j(_,U),Q=j(N,F),V=j(N,U),H=[re.x+O,re.y+q,Q.x+O,Q.y+q,V.x+O,V.y+q,ne.x+O,ne.y+q];if(Er(r,e,H))return g(x),!0}else if(at(P,r,e))return g(x),!0}}for(var E=s.length-1;E>=0;E--){var C=s[E];C.isNode()?p(C)||w(C):m(C)||w(C)||w(C,"source")||w(C,"target")}return o};Rt.getAllInBox=function(r,e,t,a){var n=this.getCachedZSortedEles().interactive,i=this.cy.zoom(),s=2/i,o=[],u=Math.min(r,t),l=Math.max(r,t),v=Math.min(e,a),f=Math.max(e,a);r=u,t=l,e=v,a=f;var c=yr({x1:r,y1:e,x2:t,y2:a}),h=[{x:c.x1,y:c.y1},{x:c.x2,y:c.y1},{x:c.x2,y:c.y2},{x:c.x1,y:c.y2}],d=[[h[0],h[1]],[h[1],h[2]],[h[2],h[3]],[h[3],h[0]]];function y(Y,te,ce){return xr(Y,te,ce)}function g(Y,te){var ce=Y._private,Be=s,we="";Y.boundingBox();var me=ce.labelBounds.main;if(!me)return null;var ge=y(ce.rscratch,"labelX",te),se=y(ce.rscratch,"labelY",te),de=y(ce.rscratch,"labelAngle",te),fe=Y.pstyle(we+"text-margin-x").pfValue,xe=Y.pstyle(we+"text-margin-y").pfValue,be=me.x1-Be-fe,Se=me.x2+Be-fe,De=me.y1-Be-xe,Oe=me.y2+Be-xe;if(de){var Le=Math.cos(de),Ae=Math.sin(de),X=function(z,G){return z=z-ge,G=G-se,{x:z*Le-G*Ae+ge,y:z*Ae+G*Le+se}};return[X(be,De),X(Se,De),X(Se,Oe),X(be,Oe)]}else return[{x:be,y:De},{x:Se,y:De},{x:Se,y:Oe},{x:be,y:Oe}]}function p(Y,te,ce,Be){function we(me,ge,se){return(se.y-me.y)*(ge.x-me.x)>(ge.y-me.y)*(se.x-me.x)}return we(Y,ce,Be)!==we(te,ce,Be)&&we(Y,te,ce)!==we(Y,te,Be)}for(var m=0;m0?-(Math.PI-e.ang):Math.PI+e.ang},Jp=function(e,t,a,n,i){if(e!==Pl?Al(t,e,Vr):Qp(kr,Vr),Al(t,a,kr),Dl=Vr.nx*kr.ny-Vr.ny*kr.nx,Bl=Vr.nx*kr.nx-Vr.ny*-kr.ny,$r=Math.asin(Math.max(-1,Math.min(1,Dl))),Math.abs($r)<1e-6){zs=t.x,Fs=t.y,Et=zt=0;return}Tt=1,dn=!1,Bl<0?$r<0?$r=Math.PI+$r:($r=Math.PI-$r,Tt=-1,dn=!0):$r>0&&(Tt=-1,dn=!0),t.radius!==void 0?zt=t.radius:zt=n,bt=$r/2,rn=Math.min(Vr.len/2,kr.len/2),i?(zr=Math.abs(Math.cos(bt)*zt/Math.sin(bt)),zr>rn?(zr=rn,Et=Math.abs(zr*Math.sin(bt)/Math.cos(bt))):Et=zt):(zr=Math.min(rn,zt),Et=Math.abs(zr*Math.sin(bt)/Math.cos(bt))),Vs=t.x+kr.nx*zr,qs=t.y+kr.ny*zr,zs=Vs-kr.ny*Et*Tt,Fs=qs+kr.nx*Et*Tt,cf=t.x+Vr.nx*zr,df=t.y+Vr.ny*zr,Pl=t};function hf(r,e){e.radius===0?r.lineTo(e.cx,e.cy):r.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function ho(r,e,t,a){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return a===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Jp(r,e,t,a,n),{cx:zs,cy:Fs,radius:Et,startX:cf,startY:df,stopX:Vs,stopY:qs,startAngle:Vr.ang+Math.PI/2*Tt,endAngle:kr.ang-Math.PI/2*Tt,counterClockwise:dn})}var Aa=.01,jp=Math.sqrt(2*Aa),gr={};gr.findMidptPtsEtc=function(r,e){var t=e.posPts,a=e.intersectionPts,n=e.vectorNormInverse,i,s=r.pstyle("source-endpoint"),o=r.pstyle("target-endpoint"),u=s.units!=null&&o.units!=null,l=function(E,C,x,T){var k=T-C,D=x-E,B=Math.sqrt(D*D+k*k);return{x:-k/B,y:D/B}},v=r.pstyle("edge-distances").value;switch(v){case"node-position":i=t;break;case"intersection":i=a;break;case"endpoints":{if(u){var f=this.manualEndptToPx(r.source()[0],s),c=Qe(f,2),h=c[0],d=c[1],y=this.manualEndptToPx(r.target()[0],o),g=Qe(y,2),p=g[0],m=g[1],b={x1:h,y1:d,x2:p,y2:m};n=l(h,d,p,m),i=b}else ze("Edge ".concat(r.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=a;break}}return{midptPts:i,vectorNormInverse:n}};gr.findHaystackPoints=function(r){for(var e=0;e0?Math.max(G-$,0):Math.min(G+$,0)},A=P(D,T),R=P(B,k),L=!1;m===l?p=Math.abs(A)>Math.abs(R)?n:a:m===u||m===o?(p=a,L=!0):(m===i||m===s)&&(p=n,L=!0);var I=p===a,M=I?R:A,O=I?B:D,q=eo(O),_=!1;!(L&&(w||C))&&(m===o&&O<0||m===u&&O>0||m===i&&O>0||m===s&&O<0)&&(q*=-1,M=q*Math.abs(M),_=!0);var N;if(w){var F=E<0?1+E:E;N=F*M}else{var U=E<0?M:0;N=U+E*q}var J=function(G){return Math.abs(G)=Math.abs(M)},Z=J(N),j=J(Math.abs(M)-Math.abs(N)),re=Z||j;if(re&&!_)if(I){var ne=Math.abs(O)<=c/2,Q=Math.abs(D)<=h/2;if(ne){var V=(v.x1+v.x2)/2,H=v.y1,W=v.y2;t.segpts=[V,H,V,W]}else if(Q){var Y=(v.y1+v.y2)/2,te=v.x1,ce=v.x2;t.segpts=[te,Y,ce,Y]}else t.segpts=[v.x1,v.y2]}else{var Be=Math.abs(O)<=f/2,we=Math.abs(B)<=d/2;if(Be){var me=(v.y1+v.y2)/2,ge=v.x1,se=v.x2;t.segpts=[ge,me,se,me]}else if(we){var de=(v.x1+v.x2)/2,fe=v.y1,xe=v.y2;t.segpts=[de,fe,de,xe]}else t.segpts=[v.x2,v.y1]}else if(I){var be=v.y1+N+(g?c/2*q:0),Se=v.x1,De=v.x2;t.segpts=[Se,be,De,be]}else{var Oe=v.x1+N+(g?f/2*q:0),Le=v.y1,Ae=v.y2;t.segpts=[Oe,Le,Oe,Ae]}if(t.isRound){var X=r.pstyle("taxi-radius").value,S=r.pstyle("radius-type").value[0]==="arc-radius";t.radii=new Array(t.segpts.length/2).fill(X),t.isArcRadius=new Array(t.segpts.length/2).fill(S)}};gr.tryToCorrectInvalidPoints=function(r,e){var t=r._private.rscratch;if(t.edgeType==="bezier"){var a=e.srcPos,n=e.tgtPos,i=e.srcW,s=e.srcH,o=e.tgtW,u=e.tgtH,l=e.srcShape,v=e.tgtShape,f=e.srcCornerRadius,c=e.tgtCornerRadius,h=e.srcRs,d=e.tgtRs,y=!ae(t.startX)||!ae(t.startY),g=!ae(t.arrowStartX)||!ae(t.arrowStartY),p=!ae(t.endX)||!ae(t.endY),m=!ae(t.arrowEndX)||!ae(t.arrowEndY),b=3,w=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth,E=b*w,C=Dt({x:t.ctrlpts[0],y:t.ctrlpts[1]},{x:t.startX,y:t.startY}),x=CO.poolIndex()){var q=M;M=O,O=q}var _=A.srcPos=M.position(),N=A.tgtPos=O.position(),F=A.srcW=M.outerWidth(),U=A.srcH=M.outerHeight(),J=A.tgtW=O.outerWidth(),Z=A.tgtH=O.outerHeight(),j=A.srcShape=t.nodeShapes[e.getNodeShape(M)],re=A.tgtShape=t.nodeShapes[e.getNodeShape(O)],ne=A.srcCornerRadius=M.pstyle("corner-radius").value==="auto"?"auto":M.pstyle("corner-radius").pfValue,Q=A.tgtCornerRadius=O.pstyle("corner-radius").value==="auto"?"auto":O.pstyle("corner-radius").pfValue,V=A.tgtRs=O._private.rscratch,H=A.srcRs=M._private.rscratch;A.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var W=0;W=jp||(De=Math.sqrt(Math.max(Se*Se,Aa)+Math.max(be*be,Aa)));var Oe=A.vector={x:Se,y:be},Le=A.vectorNorm={x:Oe.x/De,y:Oe.y/De},Ae={x:-Le.y,y:Le.x};A.nodesOverlap=!ae(De)||re.checkPoint(me[0],me[1],0,J,Z,N.x,N.y,Q,V)||j.checkPoint(se[0],se[1],0,F,U,_.x,_.y,ne,H),A.vectorNormInverse=Ae,R={nodesOverlap:A.nodesOverlap,dirCounts:A.dirCounts,calculatedIntersection:!0,hasBezier:A.hasBezier,hasUnbundled:A.hasUnbundled,eles:A.eles,srcPos:N,srcRs:V,tgtPos:_,tgtRs:H,srcW:J,srcH:Z,tgtW:F,tgtH:U,srcIntn:de,tgtIntn:ge,srcShape:re,tgtShape:j,posPts:{x1:xe.x2,y1:xe.y2,x2:xe.x1,y2:xe.y1},intersectionPts:{x1:fe.x2,y1:fe.y2,x2:fe.x1,y2:fe.y1},vector:{x:-Oe.x,y:-Oe.y},vectorNorm:{x:-Le.x,y:-Le.y},vectorNormInverse:{x:-Ae.x,y:-Ae.y}}}var X=we?R:A;te.nodesOverlap=X.nodesOverlap,te.srcIntn=X.srcIntn,te.tgtIntn=X.tgtIntn,te.isRound=ce.startsWith("round"),n&&(M.isParent()||M.isChild()||O.isParent()||O.isChild())&&(M.parents().anySame(O)||O.parents().anySame(M)||M.same(O)&&M.isParent())?e.findCompoundLoopPoints(Y,X,W,Be):M===O?e.findLoopPoints(Y,X,W,Be):ce.endsWith("segments")?e.findSegmentsPoints(Y,X):ce.endsWith("taxi")?e.findTaxiPoints(Y,X):ce==="straight"||!Be&&A.eles.length%2===1&&W===Math.floor(A.eles.length/2)?e.findStraightEdgePoints(Y):e.findBezierPoints(Y,X,W,Be,we),e.findEndpoints(Y),e.tryToCorrectInvalidPoints(Y,X),e.checkForInvalidEdgeWarning(Y),e.storeAllpts(Y),e.storeEdgeProjections(Y),e.calculateArrowAngles(Y),e.recalculateEdgeLabelProjections(Y),e.calculateLabelAngles(Y)}},x=0;x0){var me=l,ge=xt(me,Gt(s)),se=xt(me,Gt(we)),de=ge;if(se2){var fe=xt(me,{x:we[2],y:we[3]});fe0){var K=v,le=xt(K,Gt(s)),ee=xt(K,Gt($)),ie=le;if(ee2){var oe=xt(K,{x:$[2],y:$[3]});oe=d||x){g={cp:w,segment:C};break}}if(g)break}var T=g.cp,k=g.segment,D=(d-p)/k.length,B=k.t1-k.t0,P=h?k.t0+B*D:k.t1-B*D;P=Ta(0,P,1),e=$t(T.p0,T.p1,T.p2,P),c=ry(T.p0,T.p1,T.p2,P);break}case"straight":case"segments":case"haystack":{for(var A=0,R,L,I,M,O=a.allpts.length,q=0;q+3=d));q+=2);var _=d-L,N=_/R;N=Ta(0,N,1),e=Cd(I,M,N),c=yf(I,M);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,c)}};l("source"),l("target"),this.applyLabelDimensions(r)}};Gr.applyLabelDimensions=function(r){this.applyPrefixedLabelDimensions(r),r.isEdge()&&(this.applyPrefixedLabelDimensions(r,"source"),this.applyPrefixedLabelDimensions(r,"target"))};Gr.applyPrefixedLabelDimensions=function(r,e){var t=r._private,a=this.getLabelText(r,e),n=kt(a,r._private.labelDimsKey);if(xr(t.rscratch,"prefixedLabelDimsKey",e)!==n){Ur(t.rscratch,"prefixedLabelDimsKey",e,n);var i=this.calculateLabelDimensions(r,a),s=r.pstyle("line-height").pfValue,o=r.pstyle("text-wrap").strValue,u=xr(t.rscratch,"labelWrapCachedLines",e)||[],l=o!=="wrap"?1:Math.max(u.length,1),v=i.height/l,f=v*s,c=i.width,h=i.height+(l-1)*(s-1)*v;Ur(t.rstyle,"labelWidth",e,c),Ur(t.rscratch,"labelWidth",e,c),Ur(t.rstyle,"labelHeight",e,h),Ur(t.rscratch,"labelHeight",e,h),Ur(t.rscratch,"labelLineHeight",e,f)}};Gr.getLabelText=function(r,e){var t=r._private,a=e?e+"-":"",n=r.pstyle(a+"label").strValue,i=r.pstyle("text-transform").value,s=function(U,J){return J?(Ur(t.rscratch,U,e,J),J):xr(t.rscratch,U,e)};if(!n)return"";i=="none"||(i=="uppercase"?n=n.toUpperCase():i=="lowercase"&&(n=n.toLowerCase()));var o=r.pstyle("text-wrap").value;if(o==="wrap"){var u=s("labelKey");if(u!=null&&s("labelWrapKey")===u)return s("labelWrapCachedText");for(var l="​",v=n.split(` +`),f=r.pstyle("text-max-width").pfValue,c=r.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[\s\u200b]+|$/g,g=0;gf){var E=p.matchAll(y),C="",x=0,T=Cr(E),k;try{for(T.s();!(k=T.n()).done;){var D=k.value,B=D[0],P=p.substring(x,D.index);x=D.index+B.length;var A=C.length===0?P:C+P+B,R=this.calculateLabelDimensions(r,A),L=R.width;L<=f?C+=P+B:(C&&d.push(C),C=P+B)}}catch(F){T.e(F)}finally{T.f()}C.match(/^[\s\u200b]+$/)||d.push(C)}else d.push(p)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join(` +`)),s("labelWrapKey",u)}else if(o==="ellipsis"){var I=r.pstyle("text-max-width").pfValue,M="",O="…",q=!1;if(this.calculateLabelDimensions(r,n).widthI)break;M+=n[_],_===n.length-1&&(q=!0)}return q||(M+=O),M}return n};Gr.getLabelJustification=function(r){var e=r.pstyle("text-justification").strValue,t=r.pstyle("text-halign").strValue;if(e==="auto")if(r.isNode())switch(t){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Gr.calculateLabelDimensions=function(r,e){var t=this,a=t.cy.window(),n=a.document,i=0,s=r.pstyle("font-style").strValue,o=r.pstyle("font-size").pfValue,u=r.pstyle("font-family").strValue,l=r.pstyle("font-weight").strValue,v=this.labelCalcCanvas,f=this.labelCalcCanvasContext;if(!v){v=this.labelCalcCanvas=n.createElement("canvas"),f=this.labelCalcCanvasContext=v.getContext("2d");var c=v.style;c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none"}f.font="".concat(s," ").concat(l," ").concat(o,"px ").concat(u);for(var h=0,d=0,y=e.split(` +`),g=0;g1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var u=0;u=r.desktopTapThreshold2}var or=i(S);ar&&(r.hoverData.tapholdCancelled=!0);var Nr=function(){var Sr=r.hoverData.dragDelta=r.hoverData.dragDelta||[];Sr.length===0?(Sr.push(ke[0]),Sr.push(ke[1])):(Sr[0]+=ke[0],Sr[1]+=ke[1])};G=!0,n(Ee,["mousemove","vmousemove","tapdrag"],S,{x:ee[0],y:ee[1]});var We=function(Sr){return{originalEvent:S,type:Sr,position:{x:ee[0],y:ee[1]}}},Wr=function(){r.data.bgActivePosistion=void 0,r.hoverData.selecting||$.emit(We("boxstart")),pe[4]=1,r.hoverData.selecting=!0,r.redrawHint("select",!0),r.redraw()};if(r.hoverData.which===3){if(ar){var Ar=We("cxtdrag");ve?ve.emit(Ar):$.emit(Ar),r.hoverData.cxtDragged=!0,(!r.hoverData.cxtOver||Ee!==r.hoverData.cxtOver)&&(r.hoverData.cxtOver&&r.hoverData.cxtOver.emit(We("cxtdragout")),r.hoverData.cxtOver=Ee,Ee&&Ee.emit(We("cxtdragover")))}}else if(r.hoverData.dragging){if(G=!0,$.panningEnabled()&&$.userPanningEnabled()){var Jr;if(r.hoverData.justStartedPan){var Ha=r.hoverData.mdownPos;Jr={x:(ee[0]-Ha[0])*K,y:(ee[1]-Ha[1])*K},r.hoverData.justStartedPan=!1}else Jr={x:ke[0]*K,y:ke[1]*K};$.panBy(Jr),$.emit(We("dragpan")),r.hoverData.dragged=!0}ee=r.projectIntoViewport(S.clientX,S.clientY)}else if(pe[4]==1&&(ve==null||ve.pannable())){if(ar){if(!r.hoverData.dragging&&$.boxSelectionEnabled()&&(or||!$.panningEnabled()||!$.userPanningEnabled()))Wr();else if(!r.hoverData.selecting&&$.panningEnabled()&&$.userPanningEnabled()){var mt=s(ve,r.hoverData.downs);mt&&(r.hoverData.dragging=!0,r.hoverData.justStartedPan=!0,pe[4]=0,r.data.bgActivePosistion=Gt(ie),r.redrawHint("select",!0),r.redraw())}ve&&ve.pannable()&&ve.active()&&ve.unactivate()}}else{if(ve&&ve.pannable()&&ve.active()&&ve.unactivate(),(!ve||!ve.grabbed())&&Ee!=Ce&&(Ce&&n(Ce,["mouseout","tapdragout"],S,{x:ee[0],y:ee[1]}),Ee&&n(Ee,["mouseover","tapdragover"],S,{x:ee[0],y:ee[1]}),r.hoverData.last=Ee),ve)if(ar){if($.boxSelectionEnabled()&&or)ve&&ve.grabbed()&&(y(Pe),ve.emit(We("freeon")),Pe.emit(We("free")),r.dragData.didDrag&&(ve.emit(We("dragfreeon")),Pe.emit(We("dragfree")))),Wr();else if(ve&&ve.grabbed()&&r.nodeIsDraggable(ve)){var br=!r.dragData.didDrag;br&&r.redrawHint("eles",!0),r.dragData.didDrag=!0,r.hoverData.draggingEles||h(Pe,{inDragLayer:!0});var cr={x:0,y:0};if(ae(ke[0])&&ae(ke[1])&&(cr.x+=ke[0],cr.y+=ke[1],br)){var wr=r.hoverData.dragDelta;wr&&ae(wr[0])&&ae(wr[1])&&(cr.x+=wr[0],cr.y+=wr[1])}r.hoverData.draggingEles=!0,Pe.silentShift(cr).emit(We("position")).emit(We("drag")),r.redrawHint("drag",!0),r.redraw()}}else Nr();G=!0}if(pe[2]=ee[0],pe[3]=ee[1],G)return S.stopPropagation&&S.stopPropagation(),S.preventDefault&&S.preventDefault(),!1}},!1);var D,B,P;r.registerBinding(e,"mouseup",function(S){if(!(r.hoverData.which===1&&S.which!==1&&r.hoverData.capture)){var z=r.hoverData.capture;if(z){r.hoverData.capture=!1;var G=r.cy,$=r.projectIntoViewport(S.clientX,S.clientY),K=r.selection,le=r.findNearestElement($[0],$[1],!0,!1),ee=r.dragData.possibleDragElements,ie=r.hoverData.down,oe=i(S);r.data.bgActivePosistion&&(r.redrawHint("select",!0),r.redraw()),r.hoverData.tapholdCancelled=!0,r.data.bgActivePosistion=void 0,ie&&ie.unactivate();var pe=function(Ue){return{originalEvent:S,type:Ue,position:{x:$[0],y:$[1]}}};if(r.hoverData.which===3){var Ee=pe("cxttapend");if(ie?ie.emit(Ee):G.emit(Ee),!r.hoverData.cxtDragged){var Ce=pe("cxttap");ie?ie.emit(Ce):G.emit(Ce)}r.hoverData.cxtDragged=!1,r.hoverData.which=null}else if(r.hoverData.which===1){if(n(le,["mouseup","tapend","vmouseup"],S,{x:$[0],y:$[1]}),!r.dragData.didDrag&&!r.hoverData.dragged&&!r.hoverData.selecting&&!r.hoverData.isOverThresholdDrag&&(n(ie,["click","tap","vclick"],S,{x:$[0],y:$[1]}),B=!1,S.timeStamp-P<=G.multiClickDebounceTime()?(D&&clearTimeout(D),B=!0,P=null,n(ie,["dblclick","dbltap","vdblclick"],S,{x:$[0],y:$[1]})):(D=setTimeout(function(){B||n(ie,["oneclick","onetap","voneclick"],S,{x:$[0],y:$[1]})},G.multiClickDebounceTime()),P=S.timeStamp)),ie==null&&!r.dragData.didDrag&&!r.hoverData.selecting&&!r.hoverData.dragged&&!i(S)&&(G.$(t).unselect(["tapunselect"]),ee.length>0&&r.redrawHint("eles",!0),r.dragData.possibleDragElements=ee=G.collection()),le==ie&&!r.dragData.didDrag&&!r.hoverData.selecting&&le!=null&&le._private.selectable&&(r.hoverData.dragging||(G.selectionType()==="additive"||oe?le.selected()?le.unselect(["tapunselect"]):le.select(["tapselect"]):oe||(G.$(t).unmerge(le).unselect(["tapunselect"]),le.select(["tapselect"]))),r.redrawHint("eles",!0)),r.hoverData.selecting){var ve=G.collection(r.getAllInBox(K[0],K[1],K[2],K[3]));r.redrawHint("select",!0),ve.length>0&&r.redrawHint("eles",!0),G.emit(pe("boxend"));var ke=function(Ue){return Ue.selectable()&&!Ue.selected()};G.selectionType()==="additive"||oe||G.$(t).unmerge(ve).unselect(),ve.emit(pe("box")).stdFilter(ke).select().emit(pe("boxselect")),r.redraw()}if(r.hoverData.dragging&&(r.hoverData.dragging=!1,r.redrawHint("select",!0),r.redrawHint("eles",!0),r.redraw()),!K[4]){r.redrawHint("drag",!0),r.redrawHint("eles",!0);var Pe=ie&&ie.grabbed();y(ee),Pe&&(ie.emit(pe("freeon")),ee.emit(pe("free")),r.dragData.didDrag&&(ie.emit(pe("dragfreeon")),ee.emit(pe("dragfree"))))}}K[4]=0,r.hoverData.down=null,r.hoverData.cxtStarted=!1,r.hoverData.draggingEles=!1,r.hoverData.selecting=!1,r.hoverData.isOverThresholdDrag=!1,r.dragData.didDrag=!1,r.hoverData.dragged=!1,r.hoverData.dragDelta=[],r.hoverData.mdownPos=null,r.hoverData.mdownGPos=null,r.hoverData.which=null}}},!1);var A=[],R=4,L,I=1e5,M=function(S,z){for(var G=0;G=R){var $=A;if(L=M($,5),!L){var K=Math.abs($[0]);L=O($)&&K>5}if(L)for(var le=0;le<$.length;le++)I=Math.min(Math.abs($[le]),I)}else A.push(G),z=!0;else L&&(I=Math.min(Math.abs(G),I));if(!r.scrollingPage){var ee=r.cy,ie=ee.zoom(),oe=ee.pan(),pe=r.projectIntoViewport(S.clientX,S.clientY),Ee=[pe[0]*ie+oe.x,pe[1]*ie+oe.y];if(r.hoverData.draggingEles||r.hoverData.dragging||r.hoverData.cxtStarted||x()){S.preventDefault();return}if(ee.panningEnabled()&&ee.userPanningEnabled()&&ee.zoomingEnabled()&&ee.userZoomingEnabled()){S.preventDefault(),r.data.wheelZooming=!0,clearTimeout(r.data.wheelTimeout),r.data.wheelTimeout=setTimeout(function(){r.data.wheelZooming=!1,r.redrawHint("eles",!0),r.redraw()},150);var Ce;z&&Math.abs(G)>5&&(G=eo(G)*5),Ce=G/-250,L&&(Ce/=I,Ce*=3),Ce=Ce*r.wheelSensitivity;var ve=S.deltaMode===1;ve&&(Ce*=33);var ke=ee.zoom()*Math.pow(10,Ce);S.type==="gesturechange"&&(ke=r.gestureStartZoom*S.scale),ee.zoom({level:ke,renderedPosition:{x:Ee[0],y:Ee[1]}}),ee.emit({type:S.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:S,position:{x:pe[0],y:pe[1]}})}}}};r.registerBinding(r.container,"wheel",q,!0),r.registerBinding(e,"scroll",function(S){r.scrollingPage=!0,clearTimeout(r.scrollingPageTimeout),r.scrollingPageTimeout=setTimeout(function(){r.scrollingPage=!1},250)},!0),r.registerBinding(r.container,"gesturestart",function(S){r.gestureStartZoom=r.cy.zoom(),r.hasTouchStarted||S.preventDefault()},!0),r.registerBinding(r.container,"gesturechange",function(X){r.hasTouchStarted||q(X)},!0),r.registerBinding(r.container,"mouseout",function(S){var z=r.projectIntoViewport(S.clientX,S.clientY);r.cy.emit({originalEvent:S,type:"mouseout",position:{x:z[0],y:z[1]}})},!1),r.registerBinding(r.container,"mouseover",function(S){var z=r.projectIntoViewport(S.clientX,S.clientY);r.cy.emit({originalEvent:S,type:"mouseover",position:{x:z[0],y:z[1]}})},!1);var _,N,F,U,J,Z,j,re,ne,Q,V,H,W,Y=function(S,z,G,$){return Math.sqrt((G-S)*(G-S)+($-z)*($-z))},te=function(S,z,G,$){return(G-S)*(G-S)+($-z)*($-z)},ce;r.registerBinding(r.container,"touchstart",ce=function(S){if(r.hasTouchStarted=!0,!!T(S)){p(),r.touchData.capture=!0,r.data.bgActivePosistion=void 0;var z=r.cy,G=r.touchData.now,$=r.touchData.earlier;if(S.touches[0]){var K=r.projectIntoViewport(S.touches[0].clientX,S.touches[0].clientY);G[0]=K[0],G[1]=K[1]}if(S.touches[1]){var K=r.projectIntoViewport(S.touches[1].clientX,S.touches[1].clientY);G[2]=K[0],G[3]=K[1]}if(S.touches[2]){var K=r.projectIntoViewport(S.touches[2].clientX,S.touches[2].clientY);G[4]=K[0],G[5]=K[1]}var le=function(or){return{originalEvent:S,type:or,position:{x:G[0],y:G[1]}}};if(S.touches[1]){r.touchData.singleTouchMoved=!0,y(r.dragData.touchDragEles);var ee=r.findContainerClientCoords();ne=ee[0],Q=ee[1],V=ee[2],H=ee[3],_=S.touches[0].clientX-ne,N=S.touches[0].clientY-Q,F=S.touches[1].clientX-ne,U=S.touches[1].clientY-Q,W=0<=_&&_<=V&&0<=F&&F<=V&&0<=N&&N<=H&&0<=U&&U<=H;var ie=z.pan(),oe=z.zoom();J=Y(_,N,F,U),Z=te(_,N,F,U),j=[(_+F)/2,(N+U)/2],re=[(j[0]-ie.x)/oe,(j[1]-ie.y)/oe];var pe=200,Ee=pe*pe;if(Z=1){for(var Pr=r.touchData.startPosition=[null,null,null,null,null,null],Ke=0;Ke=r.touchTapThreshold2}if(z&&r.touchData.cxt){S.preventDefault();var Ke=S.touches[0].clientX-ne,Ye=S.touches[0].clientY-Q,Je=S.touches[1].clientX-ne,or=S.touches[1].clientY-Q,Nr=te(Ke,Ye,Je,or),We=Nr/Z,Wr=150,Ar=Wr*Wr,Jr=1.5,Ha=Jr*Jr;if(We>=Ha||Nr>=Ar){r.touchData.cxt=!1,r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var mt=oe("cxttapend");r.touchData.start?(r.touchData.start.unactivate().emit(mt),r.touchData.start=null):$.emit(mt)}}if(z&&r.touchData.cxt){var mt=oe("cxtdrag");r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.touchData.start?r.touchData.start.emit(mt):$.emit(mt),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxtDragged=!0;var br=r.findNearestElement(K[0],K[1],!0,!0);(!r.touchData.cxtOver||br!==r.touchData.cxtOver)&&(r.touchData.cxtOver&&r.touchData.cxtOver.emit(oe("cxtdragout")),r.touchData.cxtOver=br,br&&br.emit(oe("cxtdragover")))}else if(z&&S.touches[2]&&$.boxSelectionEnabled())S.preventDefault(),r.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,r.touchData.selecting||$.emit(oe("boxstart")),r.touchData.selecting=!0,r.touchData.didSelect=!0,G[4]=1,!G||G.length===0||G[0]===void 0?(G[0]=(K[0]+K[2]+K[4])/3,G[1]=(K[1]+K[3]+K[5])/3,G[2]=(K[0]+K[2]+K[4])/3+1,G[3]=(K[1]+K[3]+K[5])/3+1):(G[2]=(K[0]+K[2]+K[4])/3,G[3]=(K[1]+K[3]+K[5])/3),r.redrawHint("select",!0),r.redraw();else if(z&&S.touches[1]&&!r.touchData.didSelect&&$.zoomingEnabled()&&$.panningEnabled()&&$.userZoomingEnabled()&&$.userPanningEnabled()){S.preventDefault(),r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var cr=r.dragData.touchDragEles;if(cr){r.redrawHint("drag",!0);for(var wr=0;wr0&&!r.hoverData.draggingEles&&!r.swipePanning&&r.data.bgActivePosistion!=null&&(r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.redraw())}},!1);var we;r.registerBinding(e,"touchcancel",we=function(S){var z=r.touchData.start;r.touchData.capture=!1,z&&z.unactivate()});var me,ge,se,de;if(r.registerBinding(e,"touchend",me=function(S){var z=r.touchData.start,G=r.touchData.capture;if(G)S.touches.length===0&&(r.touchData.capture=!1),S.preventDefault();else return;var $=r.selection;r.swipePanning=!1,r.hoverData.draggingEles=!1;var K=r.cy,le=K.zoom(),ee=r.touchData.now,ie=r.touchData.earlier;if(S.touches[0]){var oe=r.projectIntoViewport(S.touches[0].clientX,S.touches[0].clientY);ee[0]=oe[0],ee[1]=oe[1]}if(S.touches[1]){var oe=r.projectIntoViewport(S.touches[1].clientX,S.touches[1].clientY);ee[2]=oe[0],ee[3]=oe[1]}if(S.touches[2]){var oe=r.projectIntoViewport(S.touches[2].clientX,S.touches[2].clientY);ee[4]=oe[0],ee[5]=oe[1]}var pe=function(Ar){return{originalEvent:S,type:Ar,position:{x:ee[0],y:ee[1]}}};z&&z.unactivate();var Ee;if(r.touchData.cxt){if(Ee=pe("cxttapend"),z?z.emit(Ee):K.emit(Ee),!r.touchData.cxtDragged){var Ce=pe("cxttap");z?z.emit(Ce):K.emit(Ce)}r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!1,r.touchData.start=null,r.redraw();return}if(!S.touches[2]&&K.boxSelectionEnabled()&&r.touchData.selecting){r.touchData.selecting=!1;var ve=K.collection(r.getAllInBox($[0],$[1],$[2],$[3]));$[0]=void 0,$[1]=void 0,$[2]=void 0,$[3]=void 0,$[4]=0,r.redrawHint("select",!0),K.emit(pe("boxend"));var ke=function(Ar){return Ar.selectable()&&!Ar.selected()};ve.emit(pe("box")).stdFilter(ke).select().emit(pe("boxselect")),ve.nonempty()&&r.redrawHint("eles",!0),r.redraw()}if(z!=null&&z.unactivate(),S.touches[2])r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);else if(!S.touches[1]){if(!S.touches[0]){if(!S.touches[0]){r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var Pe=r.dragData.touchDragEles;if(z!=null){var ar=z._private.grabbed;y(Pe),r.redrawHint("drag",!0),r.redrawHint("eles",!0),ar&&(z.emit(pe("freeon")),Pe.emit(pe("free")),r.dragData.didDrag&&(z.emit(pe("dragfreeon")),Pe.emit(pe("dragfree")))),n(z,["touchend","tapend","vmouseup","tapdragout"],S,{x:ee[0],y:ee[1]}),z.unactivate(),r.touchData.start=null}else{var Ue=r.findNearestElement(ee[0],ee[1],!0,!0);n(Ue,["touchend","tapend","vmouseup","tapdragout"],S,{x:ee[0],y:ee[1]})}var Pr=r.touchData.startPosition[0]-ee[0],Ke=Pr*Pr,Ye=r.touchData.startPosition[1]-ee[1],Je=Ye*Ye,or=Ke+Je,Nr=or*le*le;r.touchData.singleTouchMoved||(z||K.$(":selected").unselect(["tapunselect"]),n(z,["tap","vclick"],S,{x:ee[0],y:ee[1]}),ge=!1,S.timeStamp-de<=K.multiClickDebounceTime()?(se&&clearTimeout(se),ge=!0,de=null,n(z,["dbltap","vdblclick"],S,{x:ee[0],y:ee[1]})):(se=setTimeout(function(){ge||n(z,["onetap","voneclick"],S,{x:ee[0],y:ee[1]})},K.multiClickDebounceTime()),de=S.timeStamp)),z!=null&&!r.dragData.didDrag&&z._private.selectable&&Nr"u"){var fe=[],xe=function(S){return{clientX:S.clientX,clientY:S.clientY,force:1,identifier:S.pointerId,pageX:S.pageX,pageY:S.pageY,radiusX:S.width/2,radiusY:S.height/2,screenX:S.screenX,screenY:S.screenY,target:S.target}},be=function(S){return{event:S,touch:xe(S)}},Se=function(S){fe.push(be(S))},De=function(S){for(var z=0;z0)return F[0]}return null},d=Object.keys(c),y=0;y0?h:mv(i,s,e,t,a,n,o,u)},checkPoint:function(e,t,a,n,i,s,o,u){u=u==="auto"?lt(n,i):u;var l=2*u;if(Yr(e,t,this.points,s,o,n,i-l,[0,-1],a)||Yr(e,t,this.points,s,o,n-l,i,[0,-1],a))return!0;var v=n/2+2*a,f=i/2+2*a,c=[s-v,o-f,s-v,o,s+v,o,s+v,o-f];return!!(Er(e,t,c)||St(e,t,l,l,s+n/2-u,o+i/2-u,a)||St(e,t,l,l,s-n/2+u,o+i/2-u,a))}}};Zr.registerNodeShapes=function(){var r=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",pr(3,0)),this.generateRoundPolygon("round-triangle",pr(3,0)),this.generatePolygon("rectangle",pr(4,0)),r.square=r.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var t=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t)}this.generatePolygon("pentagon",pr(5,0)),this.generateRoundPolygon("round-pentagon",pr(5,0)),this.generatePolygon("hexagon",pr(6,0)),this.generateRoundPolygon("round-hexagon",pr(6,0)),this.generatePolygon("heptagon",pr(7,0)),this.generateRoundPolygon("round-heptagon",pr(7,0)),this.generatePolygon("octagon",pr(8,0)),this.generateRoundPolygon("round-octagon",pr(8,0));var a=new Array(20);{var n=Ds(5,0),i=Ds(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*w)break}else if(l){if(m>=e.deqCost*h||m>=e.deqAvgCost*c)break}else if(b>=e.deqNoDrawCost*ms)break;var E=e.deq(a,g,y);if(E.length>0)for(var C=0;C0&&(e.onDeqd(a,d),!l&&e.shouldRedraw(a,d,g,y)&&i())},o=e.priority||Qs;n.beforeRender(s,o(a))}}}},iy=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bn;dt(this,r),this.idsByKey=new Kr,this.keyForId=new Kr,this.cachesByLvl=new Kr,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}return ht(r,[{key:"getIdsFor",value:function(t){t==null&&He("Can not get id list for null key");var a=this.idsByKey,n=this.idsByKey.get(t);return n||(n=new jt,a.set(t,n)),n}},{key:"addIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).add(a)}},{key:"deleteIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).delete(a)}},{key:"getNumberOfIdsForKey",value:function(t){return t==null?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);this.deleteIdForKey(n,a),this.addIdForKey(i,a),this.keyForId.set(a,i)}},{key:"deleteKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteIdForKey(n,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);return n!==i}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var a=this.cachesByLvl,n=this.lvls,i=a.get(t);return i||(i=new Kr,a.set(t,i),n.push(t)),i}},{key:"getCache",value:function(t,a){return this.getCachesAt(a).get(t)}},{key:"get",value:function(t,a){var n=this.getKey(t),i=this.getCache(n,a);return i!=null&&this.updateKeyMappingFor(t),i}},{key:"getForCachedKey",value:function(t,a){var n=this.keyForId.get(t.id()),i=this.getCache(n,a);return i}},{key:"hasCache",value:function(t,a){return this.getCachesAt(a).has(t)}},{key:"has",value:function(t,a){var n=this.getKey(t);return this.hasCache(n,a)}},{key:"setCache",value:function(t,a,n){n.key=t,this.getCachesAt(a).set(t,n)}},{key:"set",value:function(t,a,n){var i=this.getKey(t);this.setCache(i,a,n),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,a){this.getCachesAt(a).delete(t)}},{key:"delete",value:function(t,a){var n=this.getKey(t);this.deleteCache(n,a)}},{key:"invalidateKey",value:function(t){var a=this;this.lvls.forEach(function(n){return a.deleteCache(t,n)})}},{key:"invalidate",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteKeyMappingFor(t);var i=this.doesEleInvalidateKey(t);return i&&this.invalidateKey(n),i||this.getNumberOfIdsForKey(n)===0}}])}(),Il=25,tn=50,hn=-4,_s=3,Tf=7.99,sy=8,oy=1024,uy=1024,ly=1024,vy=.2,fy=.8,cy=10,dy=.15,hy=.1,gy=.9,py=.9,yy=100,my=1,Wt={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},by=vr({getKey:null,doesEleInvalidateKey:bn,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:fv,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),ya=function(e,t){var a=this;a.renderer=e,a.onDequeues=[];var n=by(t);ye(a,n),a.lookup=new iy(n.getKey,n.doesEleInvalidateKey),a.setupDequeueing()},tr=ya.prototype;tr.reasons=Wt;tr.getTextureQueue=function(r){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[r]=e.eleImgCaches[r]||[]};tr.getRetiredTextureQueue=function(r){var e=this,t=e.eleImgCaches.retired=e.eleImgCaches.retired||{},a=t[r]=t[r]||[];return a};tr.getElementQueue=function(){var r=this,e=r.eleCacheQueue=r.eleCacheQueue||new za(function(t,a){return a.reqs-t.reqs});return e};tr.getElementKeyToQueue=function(){var r=this,e=r.eleKeyToCacheQueue=r.eleKeyToCacheQueue||{};return e};tr.getElement=function(r,e,t,a,n){var i=this,s=this.renderer,o=s.cy.zoom(),u=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!r.visible()||r.removed()||!i.allowEdgeTxrCaching&&r.isEdge()||!i.allowParentTxrCaching&&r.isParent())return null;if(a==null&&(a=Math.ceil(js(o*t))),a=Tf||a>_s)return null;var l=Math.pow(2,a),v=e.h*l,f=e.w*l,c=s.eleTextBiggerThanMin(r,l);if(!this.isVisible(r,c))return null;var h=u.get(r,a);if(h&&h.invalidated&&(h.invalidated=!1,h.texture.invalidatedWidth-=h.width),h)return h;var d;if(v<=Il?d=Il:v<=tn?d=tn:d=Math.ceil(v/tn)*tn,v>ly||f>uy)return null;var y=i.getTextureQueue(d),g=y[y.length-2],p=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};g||(g=y[y.length-1]),g||(g=p()),g.width-g.usedWidtha;B--)k=i.getElement(r,e,t,B,Wt.downscale);D()}else return i.queueElement(r,C.level-1),C;else{var P;if(!b&&!w&&!E)for(var A=a-1;A>=hn;A--){var R=u.get(r,A);if(R){P=R;break}}if(m(P))return i.queueElement(r,a),P;g.context.translate(g.usedWidth,0),g.context.scale(l,l),this.drawElement(g.context,r,e,c,!1),g.context.scale(1/l,1/l),g.context.translate(-g.usedWidth,0)}return h={x:g.usedWidth,texture:g,level:a,scale:l,width:f,height:v,scaledLabelShown:c},g.usedWidth+=Math.ceil(f+sy),g.eleCaches.push(h),u.set(r,a,h),i.checkTextureFullness(g),h};tr.invalidateElements=function(r){for(var e=0;e=vy*r.width&&this.retireTexture(r)};tr.checkTextureFullness=function(r){var e=this,t=e.getTextureQueue(r.height);r.usedWidth/r.width>fy&&r.fullnessChecks>=cy?ut(t,r):r.fullnessChecks++};tr.retireTexture=function(r){var e=this,t=r.height,a=e.getTextureQueue(t),n=this.lookup;ut(a,r),r.retired=!0;for(var i=r.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,Js(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),ut(n,s),a.push(s),s}};tr.queueElement=function(r,e){var t=this,a=t.getElementQueue(),n=t.getElementKeyToQueue(),i=this.getKey(r),s=n[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(r),s.reqs++,a.updateItem(s);else{var o={eles:r.spawn().merge(r),level:e,reqs:1,key:i};a.push(o),n[i]=o}};tr.dequeue=function(r){for(var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=[],i=e.lookup,s=0;s0;s++){var o=t.pop(),u=o.key,l=o.eles[0],v=i.hasCache(l,o.level);if(a[u]=null,v)continue;n.push(o);var f=e.getBoundingBox(l);e.getElement(l,f,r,o.level,Wt.dequeue)}return n};tr.removeFromQueue=function(r){var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=this.getKey(r),i=a[n];i!=null&&(i.eles.length===1?(i.reqs=Zs,t.updateItem(i),t.pop(),a[n]=null):i.eles.unmerge(r))};tr.onDequeue=function(r){this.onDequeues.push(r)};tr.offDequeue=function(r){ut(this.onDequeues,r)};tr.setupDequeueing=Cf.setupDequeueing({deqRedrawThreshold:yy,deqCost:dy,deqAvgCost:hy,deqNoDrawCost:gy,deqFastCost:py,deq:function(e,t,a){return e.dequeue(t,a)},onDeqd:function(e,t){for(var a=0;a=xy||t>Dn)return null}a.validateLayersElesOrdering(t,r);var u=a.layersByLevel,l=Math.pow(2,t),v=u[t]=u[t]||[],f,c=a.levelIsComplete(t,r),h,d=function(){var D=function(L){if(a.validateLayersElesOrdering(L,r),a.levelIsComplete(L,r))return h=u[L],!0},B=function(L){if(!h)for(var I=t+L;ba<=I&&I<=Dn&&!D(I);I+=L);};B(1),B(-1);for(var P=v.length-1;P>=0;P--){var A=v[P];A.invalid&&ut(v,A)}};if(!c)d();else return v;var y=function(){if(!f){f=yr();for(var D=0;DNl||A>Nl)return null;var R=P*A;if(R>Py)return null;var L=a.makeLayer(f,t);if(B!=null){var I=v.indexOf(B)+1;v.splice(I,0,L)}else(D.insert===void 0||D.insert)&&v.unshift(L);return L};if(a.skipping&&!o)return null;for(var p=null,m=r.length/wy,b=!o,w=0;w=m||!yv(p.bb,E.boundingBox()))&&(p=g({insert:!0,after:p}),!p))return null;h||b?a.queueLayer(p,E):a.drawEleInLayer(p,E,t,e),p.eles.push(E),x[t]=p}return h||(b?null:v)};fr.getEleLevelForLayerLevel=function(r,e){return r};fr.drawEleInLayer=function(r,e,t,a){var n=this,i=this.renderer,s=r.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(t=n.getEleLevelForLayerLevel(t,a),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,t,Ay),i.setImgSmoothing(s,!0))};fr.levelIsComplete=function(r,e){var t=this,a=t.layersByLevel[r];if(!a||a.length===0)return!1;for(var n=0,i=0;i0||s.invalid)return!1;n+=s.eles.length}return n===e.length};fr.validateLayersElesOrdering=function(r,e){var t=this.layersByLevel[r];if(t)for(var a=0;a0){e=!0;break}}return e};fr.invalidateElements=function(r){var e=this;r.length!==0&&(e.lastInvalidationTime=Xr(),!(r.length===0||!e.haveLayers())&&e.updateElementsInLayers(r,function(a,n,i){e.invalidateLayer(a)}))};fr.invalidateLayer=function(r){if(this.lastInvalidationTime=Xr(),!r.invalid){var e=r.level,t=r.eles,a=this.layersByLevel[e];ut(a,r),r.elesQueue=[],r.invalid=!0,r.replacement&&(r.replacement.invalid=!0);for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(i&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var u;t&&(u=t,r.translate(-u.x1,-u.y1));var l=i?e.pstyle("opacity").value:1,v=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,c=e.pstyle("line-style").value,h=e.pstyle("width").pfValue,d=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,g=e.pstyle("line-outline-color").value,p=l*v,m=l*v,b=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;f==="straight-triangle"?(s.eleStrokeStyle(r,e,L),s.drawEdgeTrianglePath(e,r,o.allpts)):(r.lineWidth=h,r.lineCap=d,s.eleStrokeStyle(r,e,L),s.drawEdgePath(e,r,o.allpts,c),r.lineCap="butt")},w=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;if(r.lineWidth=h+y,r.lineCap=d,y>0)s.colorStrokeStyle(r,g[0],g[1],g[2],L);else{r.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,r,o.allpts):(s.drawEdgePath(e,r,o.allpts,c),r.lineCap="butt")},E=function(){n&&s.drawEdgeOverlay(r,e)},C=function(){n&&s.drawEdgeUnderlay(r,e)},x=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;s.drawArrowheads(r,e,L)},T=function(){s.drawElementText(r,e,null,a)};r.lineJoin="round";var k=e.pstyle("ghost").value==="yes";if(k){var D=e.pstyle("ghost-offset-x").pfValue,B=e.pstyle("ghost-offset-y").pfValue,P=e.pstyle("ghost-opacity").value,A=p*P;r.translate(D,B),b(A),x(A),r.translate(-D,-B)}else w();C(),b(),x(),E(),T(),t&&r.translate(u.x1,u.y1)}};var Df=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,a){if(a.visible()){var n=a.pstyle("".concat(e,"-opacity")).value;if(n!==0){var i=this,s=i.usePaths(),o=a._private.rscratch,u=a.pstyle("".concat(e,"-padding")).pfValue,l=2*u,v=a.pstyle("".concat(e,"-color")).value;t.lineWidth=l,o.edgeType==="self"&&!s?t.lineCap="butt":t.lineCap="round",i.colorStrokeStyle(t,v[0],v[1],v[2],n),i.drawEdgePath(a,t,o.allpts,"solid")}}}};Qr.drawEdgeOverlay=Df("overlay");Qr.drawEdgeUnderlay=Df("underlay");Qr.drawEdgePath=function(r,e,t,a){var n=r._private.rscratch,i=e,s,o=!1,u=this.usePaths(),l=r.pstyle("line-dash-pattern").pfValue,v=r.pstyle("line-dash-offset").pfValue;if(u){var f=t.join("$"),c=n.pathCacheKey&&n.pathCacheKey===f;c?(s=e=n.pathCache,o=!0):(s=e=new Path2D,n.pathCacheKey=f,n.pathCache=s)}if(i.setLineDash)switch(a){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(l),i.lineDashOffset=v;break;case"solid":i.setLineDash([]);break}if(!o&&!n.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(t[0],t[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var h=2;h+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(a==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(a===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var u=s.getLabelJustification(e);r.textAlign=u,r.textBaseline="bottom"}else{var l=e.element()._private.rscratch.badLine,v=e.pstyle("label"),f=e.pstyle("source-label"),c=e.pstyle("target-label");if(l||(!v||!v.value)&&(!f||!f.value)&&(!c||!c.value))return;r.textAlign="center",r.textBaseline="bottom"}var h=!t,d;t&&(d=t,r.translate(-d.x1,-d.y1)),n==null?(s.drawText(r,e,null,h,i),e.isEdge()&&(s.drawText(r,e,"source",h,i),s.drawText(r,e,"target",h,i))):s.drawText(r,e,n,h,i),t&&r.translate(d.x1,d.y1)};Mt.getFontCache=function(r){var e;this.fontCaches=this.fontCaches||[];for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:!0,a=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=t?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,u=e.pstyle("text-outline-opacity").value*o,l=e.pstyle("color").value,v=e.pstyle("text-outline-color").value;r.font=a+" "+s+" "+n+" "+i,r.lineJoin="round",this.colorFillStyle(r,l[0],l[1],l[2],o),this.colorStrokeStyle(r,v[0],v[1],v[2],u)};function _y(r,e,t,a,n){var i=Math.min(a,n),s=i/2,o=e+a/2,u=t+n/2;r.beginPath(),r.arc(o,u,s,0,Math.PI*2),r.closePath()}function ql(r,e,t,a,n){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=Math.min(i,a/2,n/2);r.beginPath(),r.moveTo(e+s,t),r.lineTo(e+a-s,t),r.quadraticCurveTo(e+a,t,e+a,t+s),r.lineTo(e+a,t+n-s),r.quadraticCurveTo(e+a,t+n,e+a-s,t+n),r.lineTo(e+s,t+n),r.quadraticCurveTo(e,t+n,e,t+n-s),r.lineTo(e,t+s),r.quadraticCurveTo(e,t,e+s,t),r.closePath()}Mt.getTextAngle=function(r,e){var t,a=r._private,n=a.rscratch,i=e?e+"-":"",s=r.pstyle(i+"text-rotation");if(s.strValue==="autorotate"){var o=xr(n,"labelAngle",e);t=r.isEdge()?o:0}else s.strValue==="none"?t=0:t=s.pfValue;return t};Mt.drawText=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,s=i.rscratch,o=n?e.effectiveOpacity():1;if(!(n&&(o===0||e.pstyle("text-opacity").value===0))){t==="main"&&(t=null);var u=xr(s,"labelX",t),l=xr(s,"labelY",t),v,f,c=this.getLabelText(e,t);if(c!=null&&c!==""&&!isNaN(u)&&!isNaN(l)){this.setupTextStyle(r,e,n);var h=t?t+"-":"",d=xr(s,"labelWidth",t),y=xr(s,"labelHeight",t),g=e.pstyle(h+"text-margin-x").pfValue,p=e.pstyle(h+"text-margin-y").pfValue,m=e.isEdge(),b=e.pstyle("text-halign").value,w=e.pstyle("text-valign").value;m&&(b="center",w="center"),u+=g,l+=p;var E;switch(a?E=this.getTextAngle(e,t):E=0,E!==0&&(v=u,f=l,r.translate(v,f),r.rotate(E),u=0,l=0),w){case"top":break;case"center":l+=y/2;break;case"bottom":l+=y;break}var C=e.pstyle("text-background-opacity").value,x=e.pstyle("text-border-opacity").value,T=e.pstyle("text-border-width").pfValue,k=e.pstyle("text-background-padding").pfValue,D=e.pstyle("text-background-shape").strValue,B=D==="round-rectangle"||D==="roundrectangle",P=D==="circle",A=2;if(C>0||T>0&&x>0){var R=r.fillStyle,L=r.strokeStyle,I=r.lineWidth,M=e.pstyle("text-background-color").value,O=e.pstyle("text-border-color").value,q=e.pstyle("text-border-style").value,_=C>0,N=T>0&&x>0,F=u-k;switch(b){case"left":F-=d;break;case"center":F-=d/2;break}var U=l-y-k,J=d+2*k,Z=y+2*k;if(_&&(r.fillStyle="rgba(".concat(M[0],",").concat(M[1],",").concat(M[2],",").concat(C*o,")")),N&&(r.strokeStyle="rgba(".concat(O[0],",").concat(O[1],",").concat(O[2],",").concat(x*o,")"),r.lineWidth=T,r.setLineDash))switch(q){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"double":r.lineWidth=T/4,r.setLineDash([]);break;case"solid":default:r.setLineDash([]);break}if(B?(r.beginPath(),ql(r,F,U,J,Z,A)):P?(r.beginPath(),_y(r,F,U,J,Z)):(r.beginPath(),r.rect(F,U,J,Z)),_&&r.fill(),N&&r.stroke(),N&&q==="double"){var j=T/2;r.beginPath(),B?ql(r,F+j,U+j,J-2*j,Z-2*j,A):r.rect(F+j,U+j,J-2*j,Z-2*j),r.stroke()}r.fillStyle=R,r.strokeStyle=L,r.lineWidth=I,r.setLineDash&&r.setLineDash([])}var re=2*e.pstyle("text-outline-width").pfValue;if(re>0&&(r.lineWidth=re),e.pstyle("text-wrap").value==="wrap"){var ne=xr(s,"labelWrapCachedLines",t),Q=xr(s,"labelLineHeight",t),V=d/2,H=this.getLabelJustification(e);switch(H==="auto"||(b==="left"?H==="left"?u+=-d:H==="center"&&(u+=-V):b==="center"?H==="left"?u+=-V:H==="right"&&(u+=V):b==="right"&&(H==="center"?u+=V:H==="right"&&(u+=d))),w){case"top":l-=(ne.length-1)*Q;break;case"center":case"bottom":l-=(ne.length-1)*Q;break}for(var W=0;W0&&r.strokeText(ne[W],u,l),r.fillText(ne[W],u,l),l+=Q}else re>0&&r.strokeText(c,u,l),r.fillText(c,u,l);E!==0&&(r.rotate(-E),r.translate(-v,-f))}}};var pt={};pt.drawNode=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,u,l=e._private,v=l.rscratch,f=e.position();if(!(!ae(f.x)||!ae(f.y))&&!(i&&!e.visible())){var c=i?e.effectiveOpacity():1,h=s.usePaths(),d,y=!1,g=e.padding();o=e.width()+2*g,u=e.height()+2*g;var p;t&&(p=t,r.translate(-p.x1,-p.y1));for(var m=e.pstyle("background-image"),b=m.value,w=new Array(b.length),E=new Array(b.length),C=0,x=0;x0&&arguments[0]!==void 0?arguments[0]:A;s.eleFillStyle(r,e,S)},Q=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:N;s.colorStrokeStyle(r,R[0],R[1],R[2],S)},V=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z;s.colorStrokeStyle(r,U[0],U[1],U[2],S)},H=function(S,z,G,$){var K=s.nodePathCache=s.nodePathCache||[],le=vv(G==="polygon"?G+","+$.join(","):G,""+z,""+S,""+re),ee=K[le],ie,oe=!1;return ee!=null?(ie=ee,oe=!0,v.pathCache=ie):(ie=new Path2D,K[le]=v.pathCache=ie),{path:ie,cacheHit:oe}},W=e.pstyle("shape").strValue,Y=e.pstyle("shape-polygon-points").pfValue;if(h){r.translate(f.x,f.y);var te=H(o,u,W,Y);d=te.path,y=te.cacheHit}var ce=function(){if(!y){var S=f;h&&(S={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(d||r,S.x,S.y,o,u,re,v)}h?r.fill(d):r.fill()},Be=function(){for(var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,G=l.backgrounding,$=0,K=0;K0&&arguments[0]!==void 0?arguments[0]:!1,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;s.hasPie(e)&&(s.drawPie(r,e,z),S&&(h||s.nodeShapes[s.getNodeShape(e)].draw(r,f.x,f.y,o,u,re,v)))},me=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;s.hasStripe(e)&&(r.save(),h?r.clip(v.pathCache):(s.nodeShapes[s.getNodeShape(e)].draw(r,f.x,f.y,o,u,re,v),r.clip()),s.drawStripe(r,e,z),r.restore(),S&&(h||s.nodeShapes[s.getNodeShape(e)].draw(r,f.x,f.y,o,u,re,v)))},ge=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,z=(B>0?B:-B)*S,G=B>0?0:255;B!==0&&(s.colorFillStyle(r,G,G,G,z),h?r.fill(d):r.fill())},se=function(){if(P>0){if(r.lineWidth=P,r.lineCap=M,r.lineJoin=I,r.setLineDash)switch(L){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash(q),r.lineDashOffset=_;break;case"solid":case"double":r.setLineDash([]);break}if(O!=="center"){if(r.save(),r.lineWidth*=2,O==="inside")h?r.clip(d):r.clip();else{var S=new Path2D;S.rect(-o/2-P,-u/2-P,o+2*P,u+2*P),S.addPath(d),r.clip(S,"evenodd")}h?r.stroke(d):r.stroke(),r.restore()}else h?r.stroke(d):r.stroke();if(L==="double"){r.lineWidth=P/3;var z=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",h?r.stroke(d):r.stroke(),r.globalCompositeOperation=z}r.setLineDash&&r.setLineDash([])}},de=function(){if(F>0){if(r.lineWidth=F,r.lineCap="butt",r.setLineDash)switch(J){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"solid":case"double":r.setLineDash([]);break}var S=f;h&&(S={x:0,y:0});var z=s.getNodeShape(e),G=P;O==="inside"&&(G=0),O==="outside"&&(G*=2);var $=(o+G+(F+j))/o,K=(u+G+(F+j))/u,le=o*$,ee=u*K,ie=s.nodeShapes[z].points,oe;if(h){var pe=H(le,ee,z,ie);oe=pe.path}if(z==="ellipse")s.drawEllipsePath(oe||r,S.x,S.y,le,ee);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(z)){var Ee=0,Ce=0,ve=0;z==="round-diamond"?Ee=(G+j+F)*1.4:z==="round-heptagon"?(Ee=(G+j+F)*1.075,ve=-(G/2+j+F)/35):z==="round-hexagon"?Ee=(G+j+F)*1.12:z==="round-pentagon"?(Ee=(G+j+F)*1.13,ve=-(G/2+j+F)/15):z==="round-tag"?(Ee=(G+j+F)*1.12,Ce=(G/2+F+j)*.07):z==="round-triangle"&&(Ee=(G+j+F)*(Math.PI/2),ve=-(G+j/2+F)/Math.PI),Ee!==0&&($=(o+Ee)/o,le=o*$,["round-hexagon","round-tag"].includes(z)||(K=(u+Ee)/u,ee=u*K)),re=re==="auto"?wv(le,ee):re;for(var ke=le/2,Pe=ee/2,ar=re+(G+F+j)/2,Ue=new Array(ie.length/2),Pr=new Array(ie.length/2),Ke=0;Ke0){if(n=n||a.position(),i==null||s==null){var h=a.padding();i=a.width()+2*h,s=a.height()+2*h}o.colorFillStyle(t,v[0],v[1],v[2],l),o.nodeShapes[f].draw(t,n.x,n.y,i+u*2,s+u*2,c),t.fill()}}}};pt.drawNodeOverlay=Bf("overlay");pt.drawNodeUnderlay=Bf("underlay");pt.hasPie=function(r){return r=r[0],r._private.hasPie};pt.hasStripe=function(r){return r=r[0],r._private.hasStripe};pt.drawPie=function(r,e,t,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=e.pstyle("pie-size"),s=e.pstyle("pie-hole"),o=e.pstyle("pie-start-angle").pfValue,u=a.x,l=a.y,v=e.width(),f=e.height(),c=Math.min(v,f)/2,h,d=0,y=this.usePaths();if(y&&(u=0,l=0),i.units==="%"?c=c*i.pfValue:i.pfValue!==void 0&&(c=i.pfValue/2),s.units==="%"?h=c*s.pfValue:s.pfValue!==void 0&&(h=s.pfValue/2),!(h>=c))for(var g=1;g<=n.pieBackgroundN;g++){var p=e.pstyle("pie-"+g+"-background-size").value,m=e.pstyle("pie-"+g+"-background-color").value,b=e.pstyle("pie-"+g+"-background-opacity").value*t,w=p/100;w+d>1&&(w=1-d);var E=1.5*Math.PI+2*Math.PI*d;E+=o;var C=2*Math.PI*w,x=E+C;p===0||d>=1||d+w>1||(h===0?(r.beginPath(),r.moveTo(u,l),r.arc(u,l,c,E,x),r.closePath()):(r.beginPath(),r.arc(u,l,c,E,x),r.arc(u,l,h,x,E,!0),r.closePath()),this.colorFillStyle(r,m[0],m[1],m[2],b),r.fill(),d+=w)}};pt.drawStripe=function(r,e,t,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=a.x,s=a.y,o=e.width(),u=e.height(),l=0,v=this.usePaths();r.save();var f=e.pstyle("stripe-direction").value,c=e.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":r.rotate(-Math.PI/2);break}var h=o,d=u;c.units==="%"?(h=h*c.pfValue,d=d*c.pfValue):c.pfValue!==void 0&&(h=c.pfValue,d=c.pfValue),v&&(i=0,s=0),s-=h/2,i-=d/2;for(var y=1;y<=n.stripeBackgroundN;y++){var g=e.pstyle("stripe-"+y+"-background-size").value,p=e.pstyle("stripe-"+y+"-background-color").value,m=e.pstyle("stripe-"+y+"-background-opacity").value*t,b=g/100;b+l>1&&(b=1-l),!(g===0||l>=1||l+b>1)&&(r.beginPath(),r.rect(i,s+d*l,h,d*b),r.closePath(),this.colorFillStyle(r,p[0],p[1],p[2],m),r.fill(),l+=b)}r.restore()};var mr={},Gy=100;mr.getPixelRatio=function(){var r=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),t=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/t};mr.paintCache=function(r){for(var e=this.paintCaches=this.paintCaches||[],t=!0,a,n=0;ne.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(v[e.NODE]=!0,v[e.SELECT_BOX]=!0);var m=t.style(),b=t.zoom(),w=s!==void 0?s:b,E=t.pan(),C={x:E.x,y:E.y},x={zoom:b,pan:{x:E.x,y:E.y}},T=e.prevViewport,k=T===void 0||x.zoom!==T.zoom||x.pan.x!==T.pan.x||x.pan.y!==T.pan.y;!k&&!(y&&!d)&&(e.motionBlurPxRatio=1),o&&(C=o),w*=u,C.x*=u,C.y*=u;var D=e.getCachedZSortedEles();function B(Q,V,H,W,Y){var te=Q.globalCompositeOperation;Q.globalCompositeOperation="destination-out",e.colorFillStyle(Q,255,255,255,e.motionBlurTransparency),Q.fillRect(V,H,W,Y),Q.globalCompositeOperation=te}function P(Q,V){var H,W,Y,te;!e.clearingMotionBlur&&(Q===l.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||Q===l.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(H={x:E.x*h,y:E.y*h},W=b*h,Y=e.canvasWidth*h,te=e.canvasHeight*h):(H=C,W=w,Y=e.canvasWidth,te=e.canvasHeight),Q.setTransform(1,0,0,1,0,0),V==="motionBlur"?B(Q,0,0,Y,te):!a&&(V===void 0||V)&&Q.clearRect(0,0,Y,te),n||(Q.translate(H.x,H.y),Q.scale(W,W)),o&&Q.translate(o.x,o.y),s&&Q.scale(s,s)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=t.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var A=e.data.bufferContexts[e.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:u*e.textureMult});var x=e.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:e.canvasWidth,height:e.canvasHeight};x.mpan={x:(0-x.pan.x)/x.zoom,y:(0-x.pan.y)/x.zoom}}v[e.DRAG]=!1,v[e.NODE]=!1;var R=l.contexts[e.NODE],L=e.textureCache.texture,x=e.textureCache.viewport;R.setTransform(1,0,0,1,0,0),c?B(R,0,0,x.width,x.height):R.clearRect(0,0,x.width,x.height);var I=m.core("outside-texture-bg-color").value,M=m.core("outside-texture-bg-opacity").value;e.colorFillStyle(R,I[0],I[1],I[2],M),R.fillRect(0,0,x.width,x.height);var b=t.zoom();P(R,!1),R.clearRect(x.mpan.x,x.mpan.y,x.width/x.zoom/u,x.height/x.zoom/u),R.drawImage(L,x.mpan.x,x.mpan.y,x.width/x.zoom/u,x.height/x.zoom/u)}else e.textureOnViewport&&!a&&(e.textureCache=null);var O=t.extent(),q=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),_=e.hideEdgesOnViewport&&q,N=[];if(N[e.NODE]=!v[e.NODE]&&c&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,N[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),N[e.DRAG]=!v[e.DRAG]&&c&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,N[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),v[e.NODE]||n||i||N[e.NODE]){var F=c&&!N[e.NODE]&&h!==1,R=a||(F?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:l.contexts[e.NODE]),U=c&&!F?"motionBlur":void 0;P(R,U),_?e.drawCachedNodes(R,D.nondrag,u,O):e.drawLayeredElements(R,D.nondrag,u,O),e.debug&&e.drawDebugPoints(R,D.nondrag),!n&&!c&&(v[e.NODE]=!1)}if(!i&&(v[e.DRAG]||n||N[e.DRAG])){var F=c&&!N[e.DRAG]&&h!==1,R=a||(F?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:l.contexts[e.DRAG]);P(R,c&&!F?"motionBlur":void 0),_?e.drawCachedNodes(R,D.drag,u,O):e.drawCachedElements(R,D.drag,u,O),e.debug&&e.drawDebugPoints(R,D.drag),!n&&!c&&(v[e.DRAG]=!1)}if(this.drawSelectionRectangle(r,P),c&&h!==1){var J=l.contexts[e.NODE],Z=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],j=l.contexts[e.DRAG],re=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],ne=function(V,H,W){V.setTransform(1,0,0,1,0,0),W||!p?V.clearRect(0,0,e.canvasWidth,e.canvasHeight):B(V,0,0,e.canvasWidth,e.canvasHeight);var Y=h;V.drawImage(H,0,0,e.canvasWidth*Y,e.canvasHeight*Y,0,0,e.canvasWidth,e.canvasHeight)};(v[e.NODE]||N[e.NODE])&&(ne(J,Z,N[e.NODE]),v[e.NODE]=!1),(v[e.DRAG]||N[e.DRAG])&&(ne(j,re,N[e.DRAG]),v[e.DRAG]=!1)}e.prevViewport=x,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),c&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,v[e.NODE]=!0,v[e.DRAG]=!0,e.redraw()},Gy)),a||t.emit("render")};var ca;mr.drawSelectionRectangle=function(r,e){var t=this,a=t.cy,n=t.data,i=a.style(),s=r.drawOnlyNodeLayer,o=r.drawAllLayers,u=n.canvasNeedsRedraw,l=r.forcedContext;if(t.showFps||!s&&u[t.SELECT_BOX]&&!o){var v=l||n.contexts[t.SELECT_BOX];if(e(v),t.selection[4]==1&&(t.hoverData.selecting||t.touchData.selecting)){var f=t.cy.zoom(),c=i.core("selection-box-border-width").value/f;v.lineWidth=c,v.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",v.fillRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]),c>0&&(v.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",v.strokeRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]))}if(n.bgActivePosistion&&!t.hoverData.selecting){var f=t.cy.zoom(),h=n.bgActivePosistion;v.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",v.beginPath(),v.arc(h.x,h.y,i.core("active-bg-size").pfValue/f,0,2*Math.PI),v.fill()}var d=t.lastRedrawTime;if(t.showFps&&d){d=Math.round(d);var y=Math.round(1e3/d),g="1 frame = "+d+" ms = "+y+" fps";if(v.setTransform(1,0,0,1,0,0),v.fillStyle="rgba(255, 0, 0, 0.75)",v.strokeStyle="rgba(255, 0, 0, 0.75)",v.font="30px Arial",!ca){var p=v.measureText(g);ca=p.actualBoundingBoxAscent}v.fillText(g,0,ca);var m=60;v.strokeRect(0,ca+10,250,20),v.fillRect(0,ca+10,250*Math.min(y/m,1),20)}o||(u[t.SELECT_BOX]=!1)}};function _l(r,e,t){var a=r.createShader(e);if(r.shaderSource(a,t),r.compileShader(a),!r.getShaderParameter(a,r.COMPILE_STATUS))throw new Error(r.getShaderInfoLog(a));return a}function Hy(r,e,t){var a=_l(r,r.VERTEX_SHADER,e),n=_l(r,r.FRAGMENT_SHADER,t),i=r.createProgram();if(r.attachShader(i,a),r.attachShader(i,n),r.linkProgram(i),!r.getProgramParameter(i,r.LINK_STATUS))throw new Error("Could not initialize shaders");return i}function Wy(r,e,t){t===void 0&&(t=e);var a=r.makeOffscreenCanvas(e,t),n=a.context=a.getContext("2d");return a.clear=function(){return n.clearRect(0,0,a.width,a.height)},a.clear(),a}function yo(r){var e=r.pixelRatio,t=r.cy.zoom(),a=r.cy.pan();return{zoom:t*e,pan:{x:a.x*e,y:a.y*e}}}function $y(r){var e=r.pixelRatio,t=r.cy.zoom();return t*e}function Uy(r,e,t,a,n){var i=a*t+e.x,s=n*t+e.y;return s=Math.round(r.canvasHeight-s),[i,s]}function Ky(r,e){return e.picking?!0:r.pstyle("background-fill").value!=="solid"||r.pstyle("background-image").strValue!=="none"?!1:r.pstyle("border-width").value===0||r.pstyle("border-opacity").value===0?!0:r.pstyle("border-style").value==="solid"}function Xy(r,e){if(r.length!==e.length)return!1;for(var t=0;t>0&255)/255,t[1]=(r>>8&255)/255,t[2]=(r>>16&255)/255,t[3]=(r>>24&255)/255,t}function Yy(r){return r[0]+(r[1]<<8)+(r[2]<<16)+(r[3]<<24)}function Zy(r,e){var t=r.createTexture();return t.buffer=function(a){r.bindTexture(r.TEXTURE_2D,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR_MIPMAP_NEAREST),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,a),r.generateMipmap(r.TEXTURE_2D),r.bindTexture(r.TEXTURE_2D,null)},t.deleteTexture=function(){r.deleteTexture(t)},t}function Pf(r,e){switch(e){case"float":return[1,r.FLOAT,4];case"vec2":return[2,r.FLOAT,4];case"vec3":return[3,r.FLOAT,4];case"vec4":return[4,r.FLOAT,4];case"int":return[1,r.INT,4];case"ivec2":return[2,r.INT,4]}}function Af(r,e,t){switch(e){case r.FLOAT:return new Float32Array(t);case r.INT:return new Int32Array(t)}}function Qy(r,e,t,a,n,i){switch(e){case r.FLOAT:return new Float32Array(t.buffer,i*a,n);case r.INT:return new Int32Array(t.buffer,i*a,n)}}function Jy(r,e,t,a){var n=Pf(r,e),i=Qe(n,2),s=i[0],o=i[1],u=Af(r,o,a),l=r.createBuffer();return r.bindBuffer(r.ARRAY_BUFFER,l),r.bufferData(r.ARRAY_BUFFER,u,r.STATIC_DRAW),o===r.FLOAT?r.vertexAttribPointer(t,s,o,!1,0,0):o===r.INT&&r.vertexAttribIPointer(t,s,o,0,0),r.enableVertexAttribArray(t),r.bindBuffer(r.ARRAY_BUFFER,null),l}function Fr(r,e,t,a){var n=Pf(r,t),i=Qe(n,3),s=i[0],o=i[1],u=i[2],l=Af(r,o,e*s),v=s*u,f=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,f),r.bufferData(r.ARRAY_BUFFER,e*v,r.DYNAMIC_DRAW),r.enableVertexAttribArray(a),o===r.FLOAT?r.vertexAttribPointer(a,s,o,!1,v,0):o===r.INT&&r.vertexAttribIPointer(a,s,o,v,0),r.vertexAttribDivisor(a,1),r.bindBuffer(r.ARRAY_BUFFER,null);for(var c=new Array(e),h=0;hs&&(o=s/a,u=a*o,l=n*o),{scale:o,texW:u,texH:l}}},{key:"draw",value:function(t,a,n){var i=this;if(this.locked)throw new Error("can't draw, atlas is locked");var s=this.texSize,o=this.texRows,u=this.texHeight,l=this.getScale(a),v=l.scale,f=l.texW,c=l.texH,h=function(b,w){if(n&&w){var E=w.context,C=b.x,x=b.row,T=C,k=u*x;E.save(),E.translate(T,k),E.scale(v,v),n(E,a),E.restore()}},d=[null,null],y=function(){h(i.freePointer,i.canvas),d[0]={x:i.freePointer.x,y:i.freePointer.row*u,w:f,h:c},d[1]={x:i.freePointer.x+f,y:i.freePointer.row*u,w:0,h:c},i.freePointer.x+=f,i.freePointer.x==s&&(i.freePointer.x=0,i.freePointer.row++)},g=function(){var b=i.scratch,w=i.canvas;b.clear(),h({x:0,row:0},b);var E=s-i.freePointer.x,C=f-E,x=u;{var T=i.freePointer.x,k=i.freePointer.row*u,D=E;w.context.drawImage(b,0,0,D,x,T,k,D,x),d[0]={x:T,y:k,w:D,h:c}}{var B=E,P=(i.freePointer.row+1)*u,A=C;w&&w.context.drawImage(b,B,0,A,x,0,P,A,x),d[1]={x:0,y:P,w:A,h:c}}i.freePointer.x=C,i.freePointer.row++},p=function(){i.freePointer.x=0,i.freePointer.row++};if(this.freePointer.x+f<=s)y();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(p(),y()):this.enableWrapping?g():(p(),y())}return this.keyToLocation.set(t,d),this.needsBuffer=!0,d}},{key:"getOffsets",value:function(t){return this.keyToLocation.get(t)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(t){if(this.locked)return!1;var a=this.texSize,n=this.texRows,i=this.getScale(t),s=i.texW;return this.freePointer.x+s>a?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},i=n.forceRedraw,s=i===void 0?!1:i,o=n.filterEle,u=o===void 0?function(){return!0}:o,l=n.filterType,v=l===void 0?function(){return!0}:l,f=!1,c=!1,h=Cr(t),d;try{for(h.s();!(d=h.n()).done;){var y=d.value;if(u(y)){var g=Cr(this.renderTypes.values()),p;try{var m=function(){var w=p.value,E=w.type;if(v(E)){var C=a.collections.get(w.collection),x=w.getKey(y),T=Array.isArray(x)?x:[x];if(s)T.forEach(function(P){return C.markKeyForGC(P)}),c=!0;else{var k=w.getID?w.getID(y):y.id(),D=a._key(E,k),B=a.typeAndIdToKey.get(D);B!==void 0&&!Xy(T,B)&&(f=!0,a.typeAndIdToKey.delete(D),B.forEach(function(P){return C.markKeyForGC(P)}))}}};for(g.s();!(p=g.n()).done;)m()}catch(b){g.e(b)}finally{g.f()}}}}catch(b){h.e(b)}finally{h.f()}return c&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var t=Cr(this.collections.values()),a;try{for(t.s();!(a=t.n()).done;){var n=a.value;n.gc()}}catch(i){t.e(i)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(t,a,n,i){var s=this.renderTypes.get(a),o=this.collections.get(s.collection),u=!1,l=o.draw(i,n,function(c){s.drawClipped?(c.save(),c.beginPath(),c.rect(0,0,n.w,n.h),c.clip(),s.drawElement(c,t,n,!0,!0),c.restore()):s.drawElement(c,t,n,!0,!0),u=!0});if(u){var v=s.getID?s.getID(t):t.id(),f=this._key(a,v);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(i):this.typeAndIdToKey.set(f,[i])}return l}},{key:"getAtlasInfo",value:function(t,a){var n=this,i=this.renderTypes.get(a),s=i.getKey(t),o=Array.isArray(s)?s:[s];return o.map(function(u){var l=i.getBoundingBox(t,u),v=n.getOrCreateAtlas(t,a,l,u),f=v.getOffsets(u),c=Qe(f,2),h=c[0],d=c[1];return{atlas:v,tex:h,tex1:h,tex2:d,bb:l}})}},{key:"getDebugInfo",value:function(){var t=[],a=Cr(this.collections),n;try{for(a.s();!(n=a.n()).done;){var i=Qe(n.value,2),s=i[0],o=i[1],u=o.getCounts(),l=u.keyCount,v=u.atlasCount;t.push({type:s,keyCount:l,atlasCount:v})}}catch(f){a.e(f)}finally{a.f()}return t}}])}(),om=function(){function r(e){dt(this,r),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}return ht(r,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,a){return a})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(t){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(t):!0}},{key:"getAtlasIndexForBatch",value:function(t){var a=this.batchAtlases.indexOf(t);if(a<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(t),a=this.batchAtlases.length-1}return a}}])}(),um=` + float circleSD(vec2 p, float r) { + return distance(vec2(0), p) - r; // signed distance + } +`,lm=` + float rectangleSD(vec2 p, vec2 b) { + vec2 d = abs(p)-b; + return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); + } +`,vm=` + float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { + cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; + cr.x = (p.y > 0.0) ? cr.x : cr.y; + vec2 q = abs(p) - b + cr.x; + return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; + } +`,fm=` + float ellipseSD(vec2 p, vec2 ab) { + p = abs( p ); // symmetry + + // find root with Newton solver + vec2 q = ab*(p-ab); + float w = (q.x1.0) ? d : -d; + } +`,wa={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Bn={IGNORE:1,USE_BB:2},xs=0,$l=1,Ul=2,Es=3,Vt=4,an=5,da=6,ha=7,cm=function(){function r(e,t,a){dt(this,r),this.r=e,this.gl=t,this.maxInstances=a.webglBatchSize,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,this.debug=a.webglDebug,this.batchDebugInfo=[],a.enableWrapping=!0,a.createTextureCanvas=Wy,this.atlasManager=new sm(e,a),this.batchManager=new om(a),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(wa.SCREEN),this.pickingProgram=this._createShaderProgram(wa.PICKING),this.vao=this._createVAO()}return ht(r,[{key:"addAtlasCollection",value:function(t,a){this.atlasManager.addAtlasCollection(t,a)}},{key:"addTextureAtlasRenderType",value:function(t,a){this.atlasManager.addRenderType(t,a)}},{key:"addSimpleShapeRenderType",value:function(t,a){this.simpleShapeOptions.set(t,a)}},{key:"invalidate",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.type,i=this.atlasManager;return n?i.invalidate(t,{filterType:function(o){return o===n},forceRedraw:!0}):i.invalidate(t)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(t){var a=this.gl,n=`#version 300 es + precision highp float; + + uniform mat3 uPanZoomMatrix; + uniform int uAtlasSize; + + // instanced + in vec2 aPosition; // a vertex from the unit square + + in mat3 aTransform; // used to transform verticies, eg into a bounding box + in int aVertType; // the type of thing we are rendering + + // the z-index that is output when using picking mode + in vec4 aIndex; + + // For textures + in int aAtlasId; // which shader unit/atlas to use + in vec4 aTex; // x/y/w/h of texture in atlas + + // for edges + in vec4 aPointAPointB; + in vec4 aPointCPointD; + in vec2 aLineWidth; // also used for node border width + + // simple shapes + in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left] + in vec4 aColor; // also used for edges + in vec4 aBorderColor; // aLineWidth is used for border width + + // output values passed to the fragment shader + out vec2 vTexCoord; + out vec4 vColor; + out vec2 vPosition; + // flat values are not interpolated + flat out int vAtlasId; + flat out int vVertType; + flat out vec2 vTopRight; + flat out vec2 vBotLeft; + flat out vec4 vCornerRadius; + flat out vec4 vBorderColor; + flat out vec2 vBorderWidth; + flat out vec4 vIndex; + + void main(void) { + int vid = gl_VertexID; + vec2 position = aPosition; // TODO make this a vec3, simplifies some code below + + if(aVertType == `.concat(xs,`) { + float texX = aTex.x; // texture coordinates + float texY = aTex.y; + float texW = aTex.z; + float texH = aTex.w; + + if(vid == 1 || vid == 2 || vid == 4) { + texX += texW; + } + if(vid == 2 || vid == 4 || vid == 5) { + texY += texH; + } + + float d = float(uAtlasSize); + vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + } + else if(aVertType == `).concat(Vt," || aVertType == ").concat(ha,` + || aVertType == `).concat(an," || aVertType == ").concat(da,`) { // simple shapes + + // the bounding box is needed by the fragment shader + vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat + vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat + vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated + + // calculations are done in the fragment shader, just pass these along + vColor = aColor; + vCornerRadius = aCornerRadius; + vBorderColor = aBorderColor; + vBorderWidth = aLineWidth; + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + } + else if(aVertType == `).concat($l,`) { + vec2 source = aPointAPointB.xy; + vec2 target = aPointAPointB.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + // stretch the unit square into a long skinny rectangle + vec2 xBasis = target - source; + vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); + vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y; + + gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); + vColor = aColor; + } + else if(aVertType == `).concat(Ul,`) { + vec2 pointA = aPointAPointB.xy; + vec2 pointB = aPointAPointB.zw; + vec2 pointC = aPointCPointD.xy; + vec2 pointD = aPointCPointD.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + vec2 p0, p1, p2, pos; + if(position.x == 0.0) { // The left side of the unit square + p0 = pointA; + p1 = pointB; + p2 = pointC; + pos = position; + } else { // The right side of the unit square, use same approach but flip the geometry upside down + p0 = pointD; + p1 = pointC; + p2 = pointB; + pos = vec2(0.0, -position.y); + } + + vec2 p01 = p1 - p0; + vec2 p12 = p2 - p1; + vec2 p21 = p1 - p2; + + // Find the normal vector. + vec2 tangent = normalize(normalize(p12) + normalize(p01)); + vec2 normal = vec2(-tangent.y, tangent.x); + + // Find the vector perpendicular to p0 -> p1. + vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); + + // Determine the bend direction. + float sigma = sign(dot(p01 + p21, normal)); + float width = aLineWidth[0]; + + if(sign(pos.y) == -sigma) { + // This is an intersecting vertex. Adjust the position so that there's no overlap. + vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } else { + // This is a non-intersecting vertex. Treat it like a mitre join. + vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } + + vColor = aColor; + } + else if(aVertType == `).concat(Es,` && vid < 3) { + // massage the first triangle into an edge arrow + if(vid == 0) + position = vec2(-0.15, -0.3); + if(vid == 1) + position = vec2( 0.0, 0.0); + if(vid == 2) + position = vec2( 0.15, -0.3); + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + vColor = aColor; + } + else { + gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space + } + + vAtlasId = aAtlasId; + vVertType = aVertType; + vIndex = aIndex; + } + `),i=this.batchManager.getIndexArray(),s=`#version 300 es + precision highp float; + + // declare texture unit for each texture atlas in the batch + `.concat(i.map(function(l){return"uniform sampler2D uTexture".concat(l,";")}).join(` + `),` + + uniform vec4 uBGColor; + uniform float uZoom; + + in vec2 vTexCoord; + in vec4 vColor; + in vec2 vPosition; // model coordinates + + flat in int vAtlasId; + flat in vec4 vIndex; + flat in int vVertType; + flat in vec2 vTopRight; + flat in vec2 vBotLeft; + flat in vec4 vCornerRadius; + flat in vec4 vBorderColor; + flat in vec2 vBorderWidth; + + out vec4 outColor; + + `).concat(um,` + `).concat(lm,` + `).concat(vm,` + `).concat(fm,` + + vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha + return vec4( + top.rgb + (bot.rgb * (1.0 - top.a)), + top.a + (bot.a * (1.0 - top.a)) + ); + } + + vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance + // scale to the zoom level so that borders don't look blurry when zoomed in + // note 1.5 is an aribitrary value chosen because it looks good + return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); + } + + void main(void) { + if(vVertType == `).concat(xs,`) { + // look up the texel from the texture unit + `).concat(i.map(function(l){return"if(vAtlasId == ".concat(l,") outColor = texture(uTexture").concat(l,", vTexCoord);")}).join(` + else `),` + } + else if(vVertType == `).concat(Es,`) { + // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; + outColor = blend(vColor, uBGColor); + outColor.a = 1.0; // make opaque, masks out line under arrow + } + else if(vVertType == `).concat(Vt,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border + outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done + } + else if(vVertType == `).concat(Vt," || vVertType == ").concat(ha,` + || vVertType == `).concat(an," || vVertType == ").concat(da,`) { // use SDF + + float outerBorder = vBorderWidth[0]; + float innerBorder = vBorderWidth[1]; + float borderPadding = outerBorder * 2.0; + float w = vTopRight.x - vBotLeft.x - borderPadding; + float h = vTopRight.y - vBotLeft.y - borderPadding; + vec2 b = vec2(w/2.0, h/2.0); // half width, half height + vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center + + float d; // signed distance + if(vVertType == `).concat(Vt,`) { + d = rectangleSD(p, b); + } else if(vVertType == `).concat(ha,` && w == h) { + d = circleSD(p, b.x); // faster than ellipse + } else if(vVertType == `).concat(ha,`) { + d = ellipseSD(p, b); + } else { + d = roundRectangleSD(p, b, vCornerRadius.wzyx); + } + + // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling + // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box + if(d > 0.0) { + if(d > outerBorder) { + discard; + } else { + outColor = distInterp(vBorderColor, vec4(0), d - outerBorder); + } + } else { + if(d > innerBorder) { + vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; + vec4 innerBorderColor = blend(vBorderColor, vColor); + outColor = distInterp(innerBorderColor, outerColor, d); + } + else { + vec4 outerColor; + if(innerBorder == 0.0 && outerBorder == 0.0) { + outerColor = vec4(0); + } else if(innerBorder == 0.0) { + outerColor = vBorderColor; + } else { + outerColor = blend(vBorderColor, vColor); + } + outColor = distInterp(vColor, outerColor, d - innerBorder); + } + } + } + else { + outColor = vColor; + } + + `).concat(t.picking?`if(outColor.a == 0.0) discard; + else outColor = vIndex;`:"",` + } + `),o=Hy(a,n,s);o.aPosition=a.getAttribLocation(o,"aPosition"),o.aIndex=a.getAttribLocation(o,"aIndex"),o.aVertType=a.getAttribLocation(o,"aVertType"),o.aTransform=a.getAttribLocation(o,"aTransform"),o.aAtlasId=a.getAttribLocation(o,"aAtlasId"),o.aTex=a.getAttribLocation(o,"aTex"),o.aPointAPointB=a.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=a.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=a.getAttribLocation(o,"aLineWidth"),o.aColor=a.getAttribLocation(o,"aColor"),o.aCornerRadius=a.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=a.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=a.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=a.getUniformLocation(o,"uAtlasSize"),o.uBGColor=a.getUniformLocation(o,"uBGColor"),o.uZoom=a.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var u=0;u1&&arguments[1]!==void 0?arguments[1]:wa.SCREEN;this.panZoomMatrix=t,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,a){return t.visible()?a&&a.isVisible?a.isVisible(t):!0:!1}},{key:"drawTexture",value:function(t,a,n){var i=this.atlasManager,s=this.batchManager,o=i.getRenderTypeOpts(n);if(this._isVisible(t,o)&&!(t.isEdge()&&!this._isValidEdge(t))){if(this.renderTarget.picking&&o.getTexPickingMode){var u=o.getTexPickingMode(t);if(u===Bn.IGNORE)return;if(u==Bn.USE_BB){this.drawPickingRectangle(t,a,n);return}}var l=i.getAtlasInfo(t,n),v=Cr(l),f;try{for(v.s();!(f=v.n()).done;){var c=f.value,h=c.atlas,d=c.tex1,y=c.tex2;s.canAddToCurrentBatch(h)||this.endBatch();for(var g=s.getAtlasIndexForBatch(h),p=0,m=[[d,!0],[y,!1]];p=this.maxInstances&&this.endBatch()}}}}catch(B){v.e(B)}finally{v.f()}}}},{key:"setTransformMatrix",value:function(t,a,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(n.shapeProps&&n.shapeProps.padding&&(o=t.pstyle(n.shapeProps.padding).pfValue),i){var u=i.bb,l=i.tex1,v=i.tex2,f=l.w/(l.w+v.w);s||(f=1-f);var c=this._getAdjustedBB(u,o,s,f);this._applyTransformMatrix(a,c,n,t)}else{var h=n.getBoundingBox(t),d=this._getAdjustedBB(h,o,!0,1);this._applyTransformMatrix(a,d,n,t)}}},{key:"_applyTransformMatrix",value:function(t,a,n,i){var s,o;Hl(t);var u=n.getRotation?n.getRotation(i):0;if(u!==0){var l=n.getRotationPoint(i),v=l.x,f=l.y;gn(t,t,[v,f]),Wl(t,t,u);var c=n.getRotationOffset(i);s=c.x+(a.xOffset||0),o=c.y+(a.yOffset||0)}else s=a.x1,o=a.y1;gn(t,t,[s,o]),Gs(t,t,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(t,a,n,i){var s=t.x1,o=t.y1,u=t.w,l=t.h,v=t.yOffset;a&&(s-=a,o-=a,u+=2*a,l+=2*a);var f=0,c=u*i;return n&&i<1?u=c:!n&&i<1&&(f=u-c,s+=f,u=c),{x1:s,y1:o,w:u,h:l,xOffset:f,yOffset:v}}},{key:"drawPickingRectangle",value:function(t,a,n){var i=this.atlasManager.getRenderTypeOpts(n),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=Vt;var o=this.indexBuffer.getView(s);Ft(a,o);var u=this.colorBuffer.getView(s);wt([0,0,0],1,u);var l=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(t,l,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,a,n){var i=this.simpleShapeOptions.get(n);if(this._isVisible(t,i)){var s=i.shapeProps,o=this._getVertTypeForShape(t,s.shape);if(o===void 0||i.isSimple&&!i.isSimple(t,this.renderTarget)){this.drawTexture(t,a,n);return}var u=this.instanceCount;if(this.vertTypeBuffer.getView(u)[0]=o,o===an||o===da){var l=i.getBoundingBox(t),v=this._getCornerRadius(t,s.radius,l),f=this.cornerRadiusBuffer.getView(u);f[0]=v,f[1]=v,f[2]=v,f[3]=v,o===da&&(f[0]=0,f[2]=0)}var c=this.indexBuffer.getView(u);Ft(a,c);var h=this.renderTarget.picking?1:n==="node-body"?t.effectiveOpacity():1,d=this.renderTarget.picking?1:t.pstyle(s.opacity).value*h,y=t.pstyle(s.color).value,g=this.colorBuffer.getView(u);wt(y,d,g);var p=this.lineWidthBuffer.getView(u);if(p[0]=0,p[1]=0,s.border){var m=t.pstyle("border-width").value;if(m>0){var b=t.pstyle("border-color").value,w=h*t.pstyle("border-opacity").value,E=this.borderColorBuffer.getView(u);wt(b,w,E);var C=t.pstyle("border-position").value;if(C==="inside")p[0]=0,p[1]=-m;else if(C==="outside")p[0]=m,p[1]=0;else{var x=m/2;p[0]=x,p[1]=-x}}}var T=this.transformBuffer.getMatrixView(u);this.setTransformMatrix(t,T,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(t,a){var n=t.pstyle(a).value;switch(n){case"rectangle":return Vt;case"ellipse":return ha;case"roundrectangle":case"round-rectangle":return an;case"bottom-round-rectangle":return da;default:return}}},{key:"_getCornerRadius",value:function(t,a,n){var i=n.w,s=n.h;if(t.pstyle(a).value==="auto")return lt(i,s);var o=t.pstyle(a).pfValue,u=i/2,l=s/2;return Math.min(o,l,u)}},{key:"drawEdgeArrow",value:function(t,a,n){if(t.visible()){var i=t._private.rscratch,s,o,u;if(n==="source"?(s=i.arrowStartX,o=i.arrowStartY,u=i.srcArrowAngle):(s=i.arrowEndX,o=i.arrowEndY,u=i.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(u)||u==null)){var l=t.pstyle(n+"-arrow-shape").value;if(l!=="none"){var v=t.pstyle(n+"-arrow-color").value,f=t.pstyle("opacity").value,c=t.pstyle("line-opacity").value,h=f*c,d=t.pstyle("width").pfValue,y=t.pstyle("arrow-scale").value,g=this.r.getArrowWidth(d,y),p=this.instanceCount,m=this.transformBuffer.getMatrixView(p);Hl(m),gn(m,m,[s,o]),Gs(m,m,[g,g]),Wl(m,m,u),this.vertTypeBuffer.getView(p)[0]=Es;var b=this.indexBuffer.getView(p);Ft(a,b);var w=this.colorBuffer.getView(p);wt(v,h,w),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(t,a){if(t.visible()){var n=this._getEdgePoints(t);if(n){var i=t.pstyle("opacity").value,s=t.pstyle("line-opacity").value,o=t.pstyle("width").pfValue,u=t.pstyle("line-color").value,l=i*s;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var v=this.instanceCount;this.vertTypeBuffer.getView(v)[0]=$l;var f=this.indexBuffer.getView(v);Ft(a,f);var c=this.colorBuffer.getView(v);wt(u,l,c);var h=this.lineWidthBuffer.getView(v);h[0]=o;var d=this.pointAPointBBuffer.getView(v);d[0]=n[0],d[1]=n[1],d[2]=n[2],d[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var y=0;y=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(t){var a=t._private.rscratch;return!(a.badLine||a.allpts==null||isNaN(a.allpts[0]))}},{key:"_getEdgePoints",value:function(t){var a=t._private.rscratch;if(this._isValidEdge(t)){var n=a.allpts;if(n.length==4)return n;var i=this._getNumSegments(t);return this._getCurveSegmentPoints(n,i)}}},{key:"_getNumSegments",value:function(t){var a=15;return Math.min(Math.max(a,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(t,a){if(t.length==4)return t;for(var n=Array((a+1)*2),i=0;i<=a;i++)if(i==0)n[0]=t[0],n[1]=t[1];else if(i==a)n[i*2]=t[t.length-2],n[i*2+1]=t[t.length-1];else{var s=i/a;this._setCurvePoint(t,s,n,i*2)}return n}},{key:"_setCurvePoint",value:function(t,a,n,i){if(t.length<=2)n[i]=t[0],n[i+1]=t[1];else{for(var s=Array(t.length-2),o=0;o0}},o=function(f){var c=f.pstyle("text-events").strValue==="yes";return c?Bn.USE_BB:Bn.IGNORE},u=function(f){var c=f.position(),h=c.x,d=c.y,y=f.outerWidth(),g=f.outerHeight();return{w:y,h:g,x1:h-y/2,y1:d-g/2}};t.drawing.addAtlasCollection("node",{texRows:r.webglTexRowsNodes}),t.drawing.addAtlasCollection("label",{texRows:r.webglTexRows}),t.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),t.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:u,isSimple:Ky,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),t.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:u,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),t.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:u,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),t.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:o,getKey:Cs(e.getLabelKey,null),getBoundingBox:Ts(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:n(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")}),t.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:o,getKey:Cs(e.getSourceLabelKey,"source"),getBoundingBox:Ts(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:n("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")}),t.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:o,getKey:Cs(e.getTargetLabelKey,"target"),getBoundingBox:Ts(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:n("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")});var l=Na(function(){console.log("garbage collect flag set"),t.data.gc=!0},1e4);t.onUpdateEleCalcs(function(v,f){var c=!1;f&&f.length>0&&(c|=t.drawing.invalidate(f)),c&&l()}),hm(t)};function dm(r){var e=r.cy.container(),t=e&&e.style&&e.style.backgroundColor||"white";return av(t)}function Mf(r,e){var t=r._private.rscratch;return xr(t,"labelWrapCachedLines",e)||[]}var Cs=function(e,t){return function(a){var n=e(a),i=Mf(a,t);return i.length>1?i.map(function(s,o){return"".concat(n,"_").concat(o)}):n}},Ts=function(e,t){return function(a,n){var i=e(a);if(typeof n=="string"){var s=n.indexOf("_");if(s>0){var o=Number(n.substring(s+1)),u=Mf(a,t),l=i.h/u.length,v=l*o,f=i.y1+v;return{x1:i.x1,w:i.w,y1:f,h:l,yOffset:v}}}return i}};function hm(r){{var e=r.render;r.render=function(i){i=i||{};var s=r.cy;r.webgl&&(s.zoom()>Tf?(gm(r),e.call(r,i)):(pm(r),If(r,i,wa.SCREEN)))}}{var t=r.matchCanvasSize;r.matchCanvasSize=function(i){t.call(r,i),r.pickingFrameBuffer.setFramebufferAttachmentSizes(r.canvasWidth,r.canvasHeight),r.pickingFrameBuffer.needsDraw=!0}}r.findNearestElements=function(i,s,o,u){return Em(r,i,s)};{var a=r.invalidateCachedZSortedEles;r.invalidateCachedZSortedEles=function(){a.call(r),r.pickingFrameBuffer.needsDraw=!0}}{var n=r.notify;r.notify=function(i,s){n.call(r,i,s),i==="viewport"||i==="bounds"?r.pickingFrameBuffer.needsDraw=!0:i==="background"&&r.drawing.invalidate(s,{type:"node-body"})}}}function gm(r){var e=r.data.contexts[r.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function pm(r){var e=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,r.canvasWidth,r.canvasHeight),a.restore()};e(r.data.contexts[r.NODE]),e(r.data.contexts[r.DRAG])}function ym(r){var e=r.canvasWidth,t=r.canvasHeight,a=yo(r),n=a.pan,i=a.zoom,s=ws();gn(s,s,[n.x,n.y]),Gs(s,s,[i,i]);var o=ws();tm(o,e,t);var u=ws();return rm(u,o,s),u}function Lf(r,e){var t=r.canvasWidth,a=r.canvasHeight,n=yo(r),i=n.pan,s=n.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t,a),e.translate(i.x,i.y),e.scale(s,s)}function mm(r,e){r.drawSelectionRectangle(e,function(t){return Lf(r,t)})}function bm(r){var e=r.data.contexts[r.NODE];e.save(),Lf(r,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function wm(r){var e=function(n,i,s){for(var o=n.atlasManager.getAtlasCollection(i),u=r.data.contexts[r.NODE],l=o.atlases,v=0;v=0&&w.add(x)}return w}function Em(r,e,t){var a=xm(r,e,t),n=r.getCachedZSortedEles(),i,s,o=Cr(a),u;try{for(o.s();!(u=o.n()).done;){var l=u.value,v=n[l];if(!i&&v.isNode()&&(i=v),!s&&v.isEdge()&&(s=v),i&&s)break}}catch(f){o.e(f)}finally{o.f()}return[i,s].filter(Boolean)}function Ss(r,e,t){var a=r.drawing;e+=1,t.isNode()?(a.drawNode(t,e,"node-underlay"),a.drawNode(t,e,"node-body"),a.drawTexture(t,e,"label"),a.drawNode(t,e,"node-overlay")):(a.drawEdgeLine(t,e),a.drawEdgeArrow(t,e,"source"),a.drawEdgeArrow(t,e,"target"),a.drawTexture(t,e,"label"),a.drawTexture(t,e,"edge-source-label"),a.drawTexture(t,e,"edge-target-label"))}function If(r,e,t){var a;r.webglDebug&&(a=performance.now());var n=r.drawing,i=0;if(t.screen&&r.data.canvasNeedsRedraw[r.SELECT_BOX]&&mm(r,e),r.data.canvasNeedsRedraw[r.NODE]||t.picking){var s=r.data.contexts[r.WEBGL];t.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=ym(r),u=r.getCachedZSortedEles();if(i=u.length,n.startFrame(o,t),t.screen){for(var l=0;l0&&s>0){h.clearRect(0,0,i,s),h.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(r.full)h.translate(-a.x1*l,-a.y1*l),h.scale(l,l),this.drawElements(h,d),h.scale(1/l,1/l),h.translate(a.x1*l,a.y1*l);else{var y=e.pan(),g={x:y.x*l,y:y.y*l};l*=e.zoom(),h.translate(g.x,g.y),h.scale(l,l),this.drawElements(h,d),h.scale(1/l,1/l),h.translate(-g.x,-g.y)}r.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=r.bg,h.rect(0,0,i,s),h.fill())}return c};function Cm(r,e){for(var t=atob(r),a=new ArrayBuffer(t.length),n=new Uint8Array(a),i=0;i"u"?"undefined":rr(OffscreenCanvas))!=="undefined")t=new OffscreenCanvas(r,e);else{var a=this.cy.window(),n=a.document;t=n.createElement("canvas"),t.width=r,t.height=e}return t};[kf,Hr,Qr,po,Mt,pt,mr,Rf,yt,Ga,zf].forEach(function(r){ye(Te,r)});var km=[{name:"null",impl:ff},{name:"base",impl:Ef},{name:"canvas",impl:Tm}],Dm=[{type:"layout",extensions:Zp},{type:"renderer",extensions:km}],Vf={},qf={};function _f(r,e,t){var a=t,n=function(T){ze("Can not register `"+e+"` for `"+r+"` since `"+T+"` already exists in the prototype and can not be overridden")};if(r==="core"){if(Pa.prototype[e])return n(e);Pa.prototype[e]=t}else if(r==="collection"){if(lr.prototype[e])return n(e);lr.prototype[e]=t}else if(r==="layout"){for(var i=function(T){this.options=T,t.call(this,T),Me(this._private)||(this._private={}),this._private.cy=T.cy,this._private.listeners=[],this.createEmitter()},s=i.prototype=Object.create(t.prototype),o=[],u=0;u{N.clear(),A.clear(),f.clear()},"clear"),O=b((e,t)=>{const n=N.get(t)||[];return r.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),ie=b((e,t)=>{const n=N.get(t)||[];return r.info("Descendants of ",t," is ",n),r.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(r.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=b((e,t,n,o)=>{r.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),r.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const i=t.node(a);r.info("cp ",a," to ",o," with parent ",e),n.setNode(a,i),o!==t.parent(a)&&(r.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(r.debug("Setting parent",a,e),n.setParent(a,e)):(r.info("In copy ",e,"root",o,"data",t.node(e),o),r.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);r.debug("Copying Edges",u),u.forEach(l=>{r.info("Edge",l);const v=t.edge(l.v,l.w,l.name);r.info("Edge data",v,o);try{ie(l,o)?(r.info("Copying as ",l.v,l.w,v,l.name),n.setEdge(l.v,l.w,v,l.name),r.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):r.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){r.error(C)}})}r.debug("Removing node",a),t.removeNode(a)})},"copy"),J=b((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)A.set(c,e),o=[...o,...J(c,t)];return o},"extractDescendants"),oe=b((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),i=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>i.some(v=>l.v===v.v&&l.w===v.w))},"findCommonEdges"),D=b((e,t,n)=>{const o=t.children(e);if(r.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const i=D(a,t,n),u=oe(t,n,i);if(i)if(u.length>0)c=i;else return i}return c},"findNonClusterChild"),k=b(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),ae=b((e,t)=>{if(!e||t>10){r.debug("Opting out, no graph ");return}else r.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(r.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),N.set(n,J(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(r.debug("Cluster identified",n,N),c.forEach(a=>{const i=O(a.v,n),u=O(a.w,n);i^u&&(r.warn("Edge: ",a," leaves cluster ",n),r.warn("Descendants of XXX ",n,": ",N.get(n)),f.get(n).externalConnections=!0)})):r.debug("Not a cluster ",n,N)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(r.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(r.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const i=e.parent(c);f.get(i).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const i=e.parent(a);f.get(i).externalConnections=!0,o.toCluster=n.w}r.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),r.warn("Adjusted Graph",E(e)),T(e,0),r.trace(f)},"adjustClustersAndEdges"),T=b((e,t)=>{var c,a;if(r.warn("extractor - ",t,E(e),e.children("D")),t>10){r.error("Bailing out");return}let n=e.nodes(),o=!1;for(const i of n){const u=e.children(i);o=o||u.length>0}if(!o){r.debug("Done, no node has children",e.nodes());return}r.debug("Nodes = ",n,t);for(const i of n)if(r.debug("Extracting node",i,f,f.has(i)&&!f.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!f.has(i))r.debug("Not a cluster",i,t);else if(!f.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){r.warn("Cluster without external connections, without a parent and with children",i,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(i))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(i).clusterData.dir,r.warn("Fixing dir",f.get(i).clusterData.dir,l));const v=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});r.warn("Old graph before copy",E(e)),G(i,e,v,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:f.get(i).clusterData,label:f.get(i).label,graph:v}),r.warn("New graph after copy node: (",i,")",E(v)),r.debug("Old graph after copy",E(e))}else r.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!f.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),r.debug(f);n=e.nodes(),r.warn("New list of nodes",n);for(const i of n){const u=e.node(i);r.warn(" Now next level",i,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),L=b((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=L(e,c);n=[...n,...a]}),n},"sorter"),ce=b(e=>L(e,e.children()),"sortNodesByHierarchy"),M=b(async(e,t,n,o,c,a)=>{r.warn("Graph in recursive render:XAX",E(t),c);const i=t.graph().rankdir;r.trace("Dir in recursive render - dir:",i);const u=e.insert("g").attr("class","root");t.nodes()?r.info("Recursive render XXX",t.nodes()):r.info("No nodes found for",t),t.edges().length>0&&r.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),v=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),w=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const g=JSON.parse(JSON.stringify(c.clusterData));r.trace(`Setting data for parent cluster XXX + Node.id = `,d,` + data=`,g.height,` +Parent cluster`,c.height),t.setNode(c.id,g),t.parent(d)||(r.trace("Setting parent",d,c.id),t.setParent(d,c.id,g))}if(r.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),s!=null&&s.clusterNode){r.info("Cluster identified XBX",d,s.width,t.node(d));const{ranksep:g,nodesep:m}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:g+25,nodesep:m});const p=await M(w,s.graph,n,o,t.node(d),a),S=p.elem;V(s,S),s.diff=p.diff||0,r.info("New compound node after recursive render XAX",d,"width",s.width,"height",s.height),$(S,s)}else t.children(d).length>0?(r.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),r.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(r.trace("Node - the non recursive path XAX",d,w,t.node(d),i),await Q(w,t.node(d),{config:a,dir:i}))})),await b(async()=>{const d=t.edges().map(async function(s){const g=t.edge(s.v,s.w,s.name);r.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),r.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),r.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await z(C,g)});await Promise.all(d)},"processEdges")(),r.info("Graph before layout:",JSON.stringify(E(t))),r.info("############################################# XXX"),r.info("### Layout ### XXX"),r.info("############################################# XXX"),I(t),r.info("Graph after layout:",JSON.stringify(E(t)));let y=0,{subGraphTitleTotalMargin:X}=U(a);return await Promise.all(ce(t).map(async function(d){var g;const s=t.node(d);if(r.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=X,r.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){r.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=X,t.node(s.parentId);const m=(s==null?void 0:s.padding)/2||0,p=((g=s==null?void 0:s.labelBBox)==null?void 0:g.height)||0,S=p-m||0;r.debug("OffsetY",S,"labelHeight",p,"halfPadding",m),await W(l,s),f.get(s.id).node=s}else{const m=t.node(s.parentId);s.y+=X/2,r.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",m,m==null?void 0:m.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);r.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(S=>S.y+=X/2);const g=t.node(d.v);var m=t.node(d.w);const p=Z(v,s,f,n,g,m,o);q(s,p)}),t.nodes().forEach(function(d){const s=t.node(d);r.info(d,s.type,s.diff),s.isGroup&&(y=s.diff)}),r.warn("Returning from recursive render XAX",u,y),{elem:u,diff:y}},"recursiveRender"),ge=b(async(e,t)=>{var a,i,u,l,v,C;const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(i=e.config)==null?void 0:i.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(v=e.config)==null?void 0:v.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");_(o,e.markers,e.type,e.diagramId),Y(),F(),j(),re(),e.nodes.forEach(w=>{n.setNode(w.id,{...w}),w.parentId&&n.setParent(w.id,w.parentId)}),r.debug("Edges:",e.edges),e.edges.forEach(w=>{if(w.start===w.end){const h=w.start,y=h+"---"+h+"---1",X=h+"---"+h+"---2",d=n.node(h);n.setNode(y,{domId:y,id:y,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(y,d.parentId),n.setNode(X,{domId:X,id:X,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(X,d.parentId);const s=structuredClone(w),g=structuredClone(w),m=structuredClone(w);s.label="",s.arrowTypeEnd="none",s.endLabelLeft="",s.endLabelRight="",s.startLabelLeft="",s.id=h+"-cyclic-special-1",g.startLabelRight="",g.startLabelLeft="",g.endLabelLeft="",g.endLabelRight="",g.arrowTypeStart="none",g.arrowTypeEnd="none",g.id=h+"-cyclic-special-mid",m.label="",m.startLabelRight="",m.startLabelLeft="",m.arrowTypeStart="none",d.isGroup&&(s.fromCluster=h,m.toCluster=h),m.id=h+"-cyclic-special-2",m.arrowTypeStart="none",n.setEdge(h,y,s,h+"-cyclic-special-0"),n.setEdge(y,X,g,h+"-cyclic-special-1"),n.setEdge(X,h,m,h+"-cyc=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function j(n,t){if(!isFinite(n)||n===0)return null;var e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"),i=n.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+n.slice(e+1)]}function K(n){return n=j(Math.abs(n)),n?n[1]:NaN}function Q(n,t){return function(e,i){for(var o=e.length,a=[],c=0,h=n[0],M=0;o>0&&h>0&&(M+h+1>i&&(h=Math.max(1,i-M)),a.push(e.substring(o-=h,o+h)),!((M+=h+1)>i));)h=n[c=(c+1)%n.length];return a.reverse().join(t)}}function V(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var W=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $(n){if(!(t=W.exec(n)))throw new Error("invalid format: "+n);var t;return new L({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}$.prototype=L.prototype;function L(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}L.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _(n){n:for(var t=n.length,e=1,i=-1,o;e0&&(i=0);break}return i>0?n.slice(0,i)+n.slice(o+1):n}var N;function v(n,t){var e=j(n,t);if(!e)return N=void 0,n.toPrecision(t);var i=e[0],o=e[1],a=o-(N=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,c=i.length;return a===c?i:a>c?i+new Array(a-c+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+j(n,Math.max(0,t+a-1))[0]}function X(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}const O={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:J,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>X(n*100,t),r:X,s:v,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function R(n){return n}var U=Array.prototype.map,Y=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function nn(n){var t=n.grouping===void 0||n.thousands===void 0?R:Q(U.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",i=n.currency===void 0?"":n.currency[1]+"",o=n.decimal===void 0?".":n.decimal+"",a=n.numerals===void 0?R:V(U.call(n.numerals,String)),c=n.percent===void 0?"%":n.percent+"",h=n.minus===void 0?"−":n.minus+"",M=n.nan===void 0?"NaN":n.nan+"";function T(f,g){f=$(f);var b=f.fill,p=f.align,m=f.sign,w=f.symbol,S=f.zero,E=f.width,F=f.comma,y=f.precision,C=f.trim,d=f.type;d==="n"?(F=!0,d="g"):O[d]||(y===void 0&&(y=12),C=!0,d="g"),(S||b==="0"&&p==="=")&&(S=!0,b="0",p="=");var q=(g&&g.prefix!==void 0?g.prefix:"")+(w==="$"?e:w==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():""),B=(w==="$"?i:/[%p]/.test(d)?c:"")+(g&&g.suffix!==void 0?g.suffix:""),D=O[d],H=/[defgprs%]/.test(d);y=y===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function G(r){var l=q,u=B,x,I,k;if(d==="c")u=D(r)+u,r="";else{r=+r;var P=r<0||1/r<0;if(r=isNaN(r)?M:D(Math.abs(r),y),C&&(r=_(r)),P&&+r==0&&m!=="+"&&(P=!1),l=(P?m==="("?m:h:m==="-"||m==="("?"":m)+l,u=(d==="s"&&!isNaN(r)&&N!==void 0?Y[8+N/3]:"")+u+(P&&m==="("?")":""),H){for(x=-1,I=r.length;++xk||k>57){u=(k===46?o+r.slice(x+1):r.slice(x))+u,r=r.slice(0,x);break}}}F&&!S&&(r=t(r,1/0));var z=l.length+r.length+u.length,s=z>1)+l+r+u+s.slice(z);break;default:r=s+l+r+u;break}return a(r)}return G.toString=function(){return f+""},G}function Z(f,g){var b=Math.max(-8,Math.min(8,Math.floor(K(g)/3)))*3,p=Math.pow(10,-b),m=T((f=$(f),f.type="f",f),{suffix:Y[8+b/3]});return function(w){return m(p*w)}}return{format:T,formatPrefix:Z}}var A,tn,rn;en({thousands:",",grouping:[3],currency:["$",""]});function en(n){return A=nn(n),tn=A.format,rn=A.formatPrefix,A}export{rn as a,tn as b,K as e,$ as f}; diff --git a/dist/assets/diagram-2AECGRRQ-DngQtK0P.js b/dist/assets/diagram-2AECGRRQ-DngQtK0P.js new file mode 100644 index 0000000..213ac26 --- /dev/null +++ b/dist/assets/diagram-2AECGRRQ-DngQtK0P.js @@ -0,0 +1,43 @@ +import{s as k,g as I,q as R,p as F,a as _,b as D,_ as l,I as E,z,F as y,D as C,G,l as P,K as W,e as B}from"./index-mLPbTfpz.js";import{p as V}from"./chunk-4BX2VUAB-DTW3NaPN.js";import{p as H}from"./mermaid-parser.core-D9g22YKo.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var m={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:m},x=structuredClone(w),j=G.radar,q=l(()=>y({...j,...C().radar}),"getConfig"),b=l(()=>x.axes,"getAxes"),K=l(()=>x.curves,"getCurves"),N=l(()=>x.options,"getOptions"),U=l(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),X=l(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Y(t.entries)}))},"setCurves"),Y=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>{var o;return((o=s.axis)==null?void 0:o.$refText)===e.name});if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),Z=l(a=>{var e,r,s,o,i;const t=a.reduce((n,c)=>(n[c.name]=c,n),{});x.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??m.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??m.ticks,max:((s=t.max)==null?void 0:s.value)??m.max,min:((o=t.min)==null?void 0:o.value)??m.min,graticule:((i=t.graticule)==null?void 0:i.value)??m.graticule}},"setOptions"),J=l(()=>{z(),x=structuredClone(w)},"clear"),$={getAxes:b,getCurves:K,getOptions:N,setAxes:U,setCurves:X,setOptions:Z,getConfig:q,clear:J,setAccTitle:D,getAccTitle:_,setDiagramTitle:F,getDiagramTitle:R,getAccDescription:I,setAccDescription:k},Q=l(a=>{V(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:l(async a=>{const t=await H("radar",a);P.debug(t),Q(t)},"parse")},et=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),p=E(t),u=at(p,c),g=n.max??Math.max(...i.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(c.width,c.height)/2;rt(u,o,v,n.ticks,n.graticule),st(u,o,v,c),M(u,o,i,h,g,n.graticule,c),T(u,i,n.showLegend,c),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),at=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return B(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o{const u=2*p*Math.PI/o-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),st=l((a,t,e,r)=>{const s=t.length;for(let o=0;o{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=A(g,r,s,c),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});o==="circle"?a.append("path").attr("d",L(u,i.curveTension)).attr("class",`radarCurve-${p}`):o==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var nt={draw:et},ot=l((a,t)=>{let e="";for(let r=0;r{const t=W(),e=C(),r=y(t,e.themeVariables),s=y(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),lt=l(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=it(a);return` + .radarTitle { + font-size: ${t.fontSize}; + color: ${t.titleColor}; + dominant-baseline: hanging; + text-anchor: middle; + } + .radarAxisLine { + stroke: ${e.axisColor}; + stroke-width: ${e.axisStrokeWidth}; + } + .radarAxisLabel { + dominant-baseline: middle; + text-anchor: middle; + font-size: ${e.axisLabelFontSize}px; + color: ${e.axisColor}; + } + .radarGraticule { + fill: ${e.graticuleColor}; + fill-opacity: ${e.graticuleOpacity}; + stroke: ${e.graticuleColor}; + stroke-width: ${e.graticuleStrokeWidth}; + } + .radarLegendText { + text-anchor: start; + font-size: ${e.legendFontSize}px; + dominant-baseline: hanging; + } + ${ot(t,e)} + `},"styles"),gt={parser:tt,db:$,renderer:nt,styles:lt};export{gt as diagram}; diff --git a/dist/assets/diagram-5GNKFQAL-C5KUC4pU.js b/dist/assets/diagram-5GNKFQAL-C5KUC4pU.js new file mode 100644 index 0000000..b43035d --- /dev/null +++ b/dist/assets/diagram-5GNKFQAL-C5KUC4pU.js @@ -0,0 +1,10 @@ +import{p as x,b as f,s as C,q as B,g as T,a as y,_ as s,F as u,l as k,I as V,e as _,D,z as N,G as S}from"./index-mLPbTfpz.js";import{p as I}from"./chunk-4BX2VUAB-DTW3NaPN.js";import{I as $}from"./chunk-QZHKN3VN-DFJ7UdTp.js";import{p as z}from"./mermaid-parser.core-D9g22YKo.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var d=new $(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),A=s(()=>{d.reset(),N()},"clear"),X=s(()=>d.records.stack[0],"getRoot"),H=s(()=>d.records.cnt,"getCount"),L=S.treeView,R=s(()=>u(L,D().treeView),"getConfig"),W=s((e,t)=>{for(;e<=d.records.stack[d.records.stack.length-1].level;)d.records.stack.pop();const a={id:d.records.cnt++,level:e,name:t,children:[]};d.records.stack[d.records.stack.length-1].children.push(a),d.records.stack.push(a)},"addNode"),E={clear:A,addNode:W,getRoot:X,getCount:H,getConfig:R,getAccTitle:y,getAccDescription:T,getDiagramTitle:B,setAccDescription:C,setAccTitle:f,setDiagramTitle:x},m=E,F=s(e=>{I(e,m),e.nodes.map(t=>m.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),M={parse:s(async e=>{const t=await z("treeView",e);k.debug(t),F(t)},"parse")},Y=s((e,t,a,n,o)=>{const c=n.append("text").text(a.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:g,width:r}=c.node().getBBox(),l=g+o.paddingY*2,i=r+o.paddingX*2;c.attr("x",e+o.paddingX),c.attr("y",t+l/2),a.BBox={x:e,y:t,width:i,height:l}},"positionLabel"),b=s((e,t,a,n,o,c)=>e.append("line").attr("x1",t).attr("y1",a).attr("x2",n).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),q=s((e,t,a)=>{let n=0,o=0;const c=s((r,l,i,h)=>{const v=h*(i.rowIndent+i.paddingX);Y(v,n,l,r,i);const{height:p,width:w}=l.BBox;b(r,v-i.rowIndent,n+p/2,v,n+p/2,i.lineThickness),o=Math.max(o,v+w),n+=p},"drawNode"),g=s((r,l=0)=>{c(e,r,a,l),r.children.forEach(p=>{g(p,l+1)});const{x:i,y:h,height:v}=r.BBox;if(r.children.length){const{y:p,height:w}=r.children[r.children.length-1].BBox;b(e,i+a.paddingX,h+v,i+a.paddingX,p+w/2+a.lineThickness/2,a.lineThickness)}},"processNode");return g(t),{totalHeight:n,totalWidth:o}},"drawTree"),G=s((e,t,a,n)=>{k.debug(`Rendering treeView diagram +`+e);const o=n.db,c=o.getRoot(),g=o.getConfig(),r=V(t),l=r.append("g");l.attr("class","tree-view");const{totalHeight:i,totalWidth:h}=q(l,c,g);r.attr("viewBox",`-${g.lineThickness/2} 0 ${h} ${i}`),_(r,i,h,g.useMaxWidth)},"draw"),j={draw:G},J=j,K={labelFontSize:"16px",labelColor:"black",lineColor:"black"},O=s(({treeView:e})=>{const{labelFontSize:t,labelColor:a,lineColor:n}=u(K,e);return` + .treeView-node-label { + font-size: ${t}; + fill: ${a}; + } + .treeView-node-line { + stroke: ${n}; + } + `},"styles"),P=O,ae={db:m,renderer:J,parser:M,styles:P};export{ae as diagram}; diff --git a/dist/assets/diagram-KO2AKTUF-C6UfqqSa.js b/dist/assets/diagram-KO2AKTUF-C6UfqqSa.js new file mode 100644 index 0000000..b03e1cd --- /dev/null +++ b/dist/assets/diagram-KO2AKTUF-C6UfqqSa.js @@ -0,0 +1,3 @@ +import{p as oe}from"./chunk-4BX2VUAB-DTW3NaPN.js";import{q as se,p as de,s as le,g as ce,a as me,b as ue,_ as o,l as g,c as D,d as xe,E as fe,z as ge,F as he,D as E,G as pe,i as P,w as S,ak as be}from"./index-mLPbTfpz.js";import{p as ve,m as we}from"./mermaid-parser.core-D9g22YKo.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var T="position frame",N="frame positioned",M="position relation",C="relation positioned",ye=o(function(e){g.debug("options str",e)},"setOptions"),Pe=o(function(){return{}},"getOptions"),Se=o(function(){O(),ge()},"clear");function O(){R={}}o(O,"reset");var ke=pe.eventmodeling,Me=o(()=>he({...ke,...E().eventmodeling}),"getConfig"),R={};function W(){let e=Be;const{ast:n}=R,t=A();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=L(i,n.dataEntities,t);e=w(e,{$kind:T,index:a,frame:i,textProps:r});let d;q(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=w(e,{$kind:M,index:a,frame:i,sourceFrame:l})})):e=w(e,{$kind:M,index:a,frame:i})}),e={...e,sortedSwimlanesArray:$(e.swimlanes)},e}o(W,"getState");function I(e){R.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:450-2*10,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function A(){return s}o(A,"getDiagramProps");var Be={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function H(e){const n=e.split(".");if(n.length===2)return n[0]}o(H,"extractNamespace");function U(e){const n=e.split(".");return n.length===2?n[1]:e}o(U,"extractName");function _(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(_,"findSwimlaneByNamespace");function v(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(v,"findNextAvailableIndex");function V(e,n){const t=H(e.entityIdentifier),i=_(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:v(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:v(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:v(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(V,"calculateSwimlaneProps");function G(e){const{themeVariables:n}=E();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(G,"calculateEntityVisualProps");function L(e,n,t){const i=E(),a=P(U(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"};let c=`${S(a,t.textMaxWidth,d)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(y=>{var b;return y.name===((b=e.dataReference)==null?void 0:b.$refText)});p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ +`)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" "," "),r+="
")}const m=r!==void 0;m&&(c+=`

${r}`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=be(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(L,"calculateTextProps");function X(e,n){const t=n,i=G(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:N,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(X,"decidePositionFrame");function j(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(j,"calculateX");function Y(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(Y,"calculateMaxRight");function $(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o($,"sortedSwimlanesArray");function z(e,n){const t=n,i=V(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=j(a,d,r),m=c+l.width+s.boxPadding,x=Y(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=$(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p0}o(q,"hasSourceFrame");function B(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(B,"findBoxByFrame");function J(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(J,"findBoxByLineIndex");function Q(e,n){const t=n;if(we(t.frame)||K(t.index,t.frame))return[];const i=B(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=B(e.boxes,t.sourceFrame):a=J(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:C,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(Q,"decidePositionRelation");function Z(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Z,"evolveRelationPositioned");var Fe={[T]:X,[M]:Q},Ee={[N]:z,[C]:Z};function ee(e,n){const t=Fe[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(ee,"decide");function te(e,n){const t=n.reduce((i,a)=>{const r=Ee[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(te,"evolve");function w(e,n){const t=ee(e,n);return te(e,t)}o(w,"dispatch");var F={getConfig:Me,setOptions:ye,getOptions:Pe,clear:Se,setAccTitle:ue,getAccTitle:me,getAccDescription:ce,setAccDescription:le,setDiagramTitle:de,getDiagramTitle:se,setAst:I,getDiagramProps:A,getState:W},Re={parse:o(async e=>{const n=await ve("eventmodeling",e);g.debug(n),F.setAst(n),oe(n,F)},"parse")},k=D(),Ae=k==null?void 0:k.eventmodeling;function ne(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(ne,"renderD3Box");function ie(e,n){return e>n}o(ie,"dirUpwards");function ae(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ie(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ae,"renderD3Relation");function re(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(re,"renderD3Swimlane");var $e=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+` +`,"id:",n,t),!Ae)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=D(),l=xe(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(re(l,m.maxR,c,r)),m.boxes.forEach(ne(l,c)),m.relations.forEach(ae(l,c,x,r)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),fe(void 0,l,(d==null?void 0:d.padding)??30,d==null?void 0:d.useMaxWidth)},"draw"),De={draw:$e},Te=o(e=>"","getStyles"),Ne=Te,He={parser:Re,db:F,renderer:De,styles:Ne};export{He as diagram}; diff --git a/dist/assets/diagram-LMA3HP47-B5Kro_O5.js b/dist/assets/diagram-LMA3HP47-B5Kro_O5.js new file mode 100644 index 0000000..af2b39b --- /dev/null +++ b/dist/assets/diagram-LMA3HP47-B5Kro_O5.js @@ -0,0 +1,24 @@ +import{_ as b,F as m,I as B,e as C,l as w,b as S,a as D,p as T,q as z,g as F,s as P,D as E,G as A,z as W}from"./index-mLPbTfpz.js";import{p as _}from"./chunk-4BX2VUAB-DTW3NaPN.js";import{p as N}from"./mermaid-parser.core-D9g22YKo.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var I=A.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=F,this.setAccDescription=P}getConfig(){const t=m({...I,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},b(u,"PacketDB"),u),L=1e4,M=b((e,t)=>{_(e,t);let s=-1,r=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*s)return[e,void 0];const r=t*s-1,n=t*s;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{var r;const t=await N("packet",e),s=(r=x.parser)==null?void 0:r.yy;if(!(s instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),M(t,s)},"parse")},G=b((e,t,s,r)=>{const n=r.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=B(t);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())O(f,$,y,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((e,t,s,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=s*(r+l)+l;for(const o of t){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),j={draw:G},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},H=b(({packet:e}={})=>{const t=m(q,e);return` + .packetByte { + font-size: ${t.byteFontSize}; + } + .packetByte.start { + fill: ${t.startByteColor}; + } + .packetByte.end { + fill: ${t.endByteColor}; + } + .packetLabel { + fill: ${t.labelColor}; + font-size: ${t.labelFontSize}; + } + .packetTitle { + fill: ${t.titleColor}; + font-size: ${t.titleFontSize}; + } + .packetBlock { + stroke: ${t.blockStrokeColor}; + stroke-width: ${t.blockStrokeWidth}; + fill: ${t.blockFillColor}; + } + `},"styles"),J={parser:x,get db(){return new v},renderer:j,styles:H};export{J as diagram}; diff --git a/dist/assets/diagram-OG6HWLK6-CBZ7PcAN.js b/dist/assets/diagram-OG6HWLK6-CBZ7PcAN.js new file mode 100644 index 0000000..ec12d29 --- /dev/null +++ b/dist/assets/diagram-OG6HWLK6-CBZ7PcAN.js @@ -0,0 +1,24 @@ +import{_ as w,K as he,D as ee,F as J,I as ue,e as pe,l as Q,be as P,d as j,b as fe,a as ge,p as me,q as ye,g as Se,s as ve,G as xe,bf as be,z as we}from"./index-mLPbTfpz.js";import{s as Ce}from"./chunk-2J33WTMH-CsIyCw5_.js";import{p as Te}from"./chunk-4BX2VUAB-DTW3NaPN.js";import{p as Le}from"./mermaid-parser.core-D9g22YKo.js";import{b as O}from"./defaultLocale-DX6XiGOO.js";import{o as Z}from"./ordinal-Cboi1Yqb.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";import"./init-Gi6I4Gst.js";function $e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function Ae(){return this.eachAfter($e)}function Fe(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ne(t,a){for(var l=this,n=[l],r,s,d=-1;l=n.pop();)if(t.call(a,l,++d,this),r=l.children)for(s=r.length-1;s>=0;--s)n.push(r[s]);return this}function Me(t,a){for(var l=this,n=[l],r=[],s,d,h,g=-1;l=n.pop();)if(r.push(l),s=l.children)for(d=0,h=s.length;d=0;)l+=n[r].value;a.value=l})}function ke(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=De(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function De(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function Pe(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Be(){return Array.from(this)}function Re(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ee(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*We(){var t=this,a,l=[t],n,r,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,s=n.length;r=0;--h)r.push(s=d[h]=new K(d[h])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(qe)}function Ie(){return te(this).eachBefore(Ge)}function He(t){return t.children}function Oe(t){return Array.isArray(t)?t[1]:null}function Ge(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qe(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function K(t){this.data=t,this.depth=this.height=0,this.parent=null}K.prototype=te.prototype={constructor:K,count:Ae,each:Fe,eachAfter:Me,eachBefore:Ne,find:Ve,sum:_e,sort:ke,path:ze,ancestors:Pe,descendants:Be,leaves:Re,links:Ee,copy:Ie,[Symbol.iterator]:We};function Xe(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Ye(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,r){for(var s=t.children,d,h=-1,g=s.length,c=t.value&&(n-a)/t.value;++hM&&(M=c),V=p*p*E,N=Math.max(M/V,V/m),N>z){p-=c;break}z=N}d.push(g={value:p,dice:x1?n:1)},l}(Ue);function Qe(){var t=Je,a=!1,l=1,n=1,r=[0],s=G,d=G,h=G,g=G,c=G;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(b),r=[0],a&&i.eachBefore(Ye),i}function b(i){var x=r[i.depth],S=i.x0+x,v=i.y0+x,p=i.x1-x,m=i.y1-x;p{be(s)&&(n!=null&&n.textStyles?n.textStyles.push(s):n.textStyles=[s]),n!=null&&n.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){var l;return((l=this.classes.get(a))==null?void 0:l.styles)??[]}clear(){we(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(R,"TreeMapDB"),R);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n==null?void 0:n.classSelector,n!=null&&n.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const s=l[l.length-1].node;s.children?s.children.push(r):s.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(le,"buildHierarchy");var et=w((t,a)=>{Te(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,g=tt(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c:void 0,b={level:h,name:g,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};l.push(b)}const n=le(l),r=w((s,d)=>{for(const h of s)a.addNode(h,d),h.children&&h.children.length>0&&r(h.children,d+1)},"addNodesRecursively");r(n,0)},"populate"),tt=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{var a;try{const n=await Le("treemap",t);Q.debug("Treemap AST:",n);const r=(a=re.parser)==null?void 0:a.yy;if(!(r instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");et(n,r)}catch(l){throw Q.error("Error parsing treemap:",l),l}},"parse")},at=10,B=10,X=25,nt=w((t,a,l,n)=>{const r=n.db,s=r.getConfig(),d=s.padding??at,h=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=ee();if(!g)return;const u=h?30:0,b=ue(a),i=s.nodeWidth?s.nodeWidth*B:960,x=s.nodeHeight?s.nodeHeight*B:500,S=i,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),pe(b,v,S,s.useMaxWidth);let p;try{const e=s.valueFormat||",";if(e==="$0,0")p=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);p=w(f=>"$"+O(o||"")(f),"valueFormat")}else p=O(e)}catch(e){Q.error("Error creating format function:",e),p=O(",")}const m=Z().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=Z().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),N=Z().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const z=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),E=te(g).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),ae=Qe().size([i,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(E),se=ae.descendants().filter(e=>e.children&&e.children.length>0),W=z.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>m(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>M(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=P({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=j(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,$=6;let A;s.showValues!==!1&&e.value?A=C-10-30-10-$:A=C-$-6;const F=Math.max(15,A),y=o.node();if(y.getComputedTextLength()>F){const T="...";let L=f;for(;L.length>0;){if(L=f.substring(0,L.length-1),L.length===0){o.text(T),y.getComputedTextLength()>F&&o.text("");break}if(o.text(L+T),y.getComputedTextLength()<=F)break}}}),s.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const ie=ae.leaves(),Y=z.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?m(e.parent.data.name):m(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?m(e.parent.data.name):m(e.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+N(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=j(this),f=e.x1-e.x0,C=e.y1-e.y0,$=o.node(),A=4,D=f-2*A,F=C-2*A;if(D<10||F<10){o.style("display","none");return}let y=parseInt(o.style("font-size"),10);const _=8,T=28,L=.6,k=6,I=2;for(;$.getComputedTextLength()>D&&y>_;)y--,o.style("font-size",`${y}px`);let H=Math.max(k,Math.min(T,Math.round(y*L))),U=y+I+H;for(;U>F&&y>_&&(y--,H=Math.max(k,Math.min(T,Math.round(y*L))),!(HD||y<_||F(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+N(o.data.name)+";",C=P({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?p(o.value):"").each(function(o){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const $=j(C).select(".treemapLabel");if($.empty()||$.style("display")==="none"){f.style("display","none");return}const A=parseFloat($.style("font-size")),D=28,F=.6,y=6,_=2,T=Math.max(y,Math.min(D,Math.round(A*F)));f.style("font-size",`${T}px`);const k=(o.y1-o.y0)/2+A/2+_;f.attr("y",k);const I=o.x1-o.x0,ce=o.y1-o.y0-4,de=I-2*4;f.node().getComputedTextLength()>de||k+T>ce||T{const a=he(),l=ee(),n=J(a,l.themeVariables),r=J(st,t),s=r.titleColor??n.titleColor,d=r.labelColor??n.textColor,h=r.valueColor??n.textColor;return` + .treemapNode.section { + stroke: ${r.sectionStrokeColor}; + stroke-width: ${r.sectionStrokeWidth}; + fill: ${r.sectionFillColor}; + } + .treemapNode.leaf { + stroke: ${r.leafStrokeColor}; + stroke-width: ${r.leafStrokeWidth}; + fill: ${r.leafFillColor}; + } + .treemapLabel { + fill: ${d}; + font-size: ${r.labelFontSize}; + } + .treemapValue { + fill: ${h}; + font-size: ${r.valueFontSize}; + } + .treemapTitle { + fill: ${s}; + font-size: ${r.titleFontSize}; + } + `},"getStyles"),ot=it,St={parser:re,get db(){return new ne},renderer:rt,styles:ot};export{St as diagram}; diff --git a/dist/assets/erDiagram-TEJ5UH35-6rSkwA1P.js b/dist/assets/erDiagram-TEJ5UH35-6rSkwA1P.js new file mode 100644 index 0000000..c005df9 --- /dev/null +++ b/dist/assets/erDiagram-TEJ5UH35-6rSkwA1P.js @@ -0,0 +1,85 @@ +import{g as Bt}from"./chunk-55IACEB6-DT6mN9fZ.js";import{s as Ft}from"./chunk-2J33WTMH-CsIyCw5_.js";import{_ as p,b as Yt,a as Pt,s as zt,g as Gt,p as Kt,q as Ut,c as rt,l as V,z as Zt,x as jt,B as Wt,C as Qt,o as Xt,r as Ht,d as qt,u as Jt}from"./index-mLPbTfpz.js";import{c as $t}from"./channel-B5wXLQie.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var gt=function(){var s=p(function(I,n,a,l){for(a=a||{},l=I.length;l--;a[I[l]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],o=[1,10],h=[1,11],c=[1,12],u=[1,13],f=[1,23],d=[1,24],k=[1,25],W=[1,26],Q=[1,27],T=[1,19],X=[1,28],B=[1,29],D=[1,20],R=[1,18],S=[1,21],x=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],O=[1,45],N=[1,46],Y=[1,55],P=[40,48,50,51,52,70,71],z=[1,66],G=[1,64],A=[1,61],K=[1,65],U=[1,67],H=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],bt=[65,66,67,68,69],mt=[1,84],kt=[1,83],Et=[1,81],Tt=[1,82],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],q=[1,92],J=[1,91],$=[1,90],Z=[19,58],Ot=[1,101],Nt=[1,100],ut=[19,58,60,62],dt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:p(function(n,a,l,r,y,t,j){var e=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 67:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 79:case 80:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 66:case 69:this.$=t[e];break;case 68:t[e-2].push(t[e]),this.$=t[e-2];break;case 70:this.$=t[e].replace(/"/g,"");break;case 71:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:f,34:d,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:x},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:f,34:d,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:x},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:at,66:ct,67:ot,68:lt,69:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},s(i,[2,4]),{11:49,40:T,48:D,50:R,51:S,52:x},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:T,48:D,50:R,51:S,52:x},{64:57,70:[1,58],71:[1,59]},s(P,[2,72]),s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:A,45:62,46:63,48:K,49:U},s(H,[2,37]),s(H,[2,38]),{16:68,40:O,41:N,42:A},{13:z,38:69,41:G,42:A,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{63:35,12:72,17:[1,73],42:A,65:at,66:ct,67:ot,68:lt,69:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:at,66:ct,67:ot,68:lt,69:ht},s(bt,[2,77]),s(bt,[2,78]),{6:mt,10:kt,39:80,42:Et,47:Tt},{40:[1,85],41:[1,86]},s(St,[2,43],{46:87,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:A}),{6:mt,10:kt,39:88,42:Et,47:Tt},{14:89,40:q,50:J,72:$},{16:93,40:O,41:N},{11:94,40:T,48:D,50:R,51:S,52:x},{18:95,19:[1,96],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:97,57:98,59:99,61:Ot,62:Nt}),s([19,58,61,62],[2,66]),s(i,[2,22],{15:[1,103],17:[1,102]}),s([40,48,50,51,52],[2,71]),s(i,[2,36]),{13:z,41:G,45:104,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(H,[2,39]),s(H,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,79]),s(i,[2,80]),s(i,[2,81]),{13:[1,105],42:A},{13:[1,107],15:[1,106]},{19:[1,108]},s(i,[2,15]),s(Z,[2,62],{57:109,60:[1,110],62:Nt}),s(Z,[2,63]),s(ut,[2,67]),s(Z,[2,70]),s(ut,[2,69]),{18:111,19:[1,112],53:53,54:54,58:Y},{16:113,40:O,41:N},s(St,[2,44],{46:87,13:z,41:G,48:K,49:U}),{14:114,40:q,50:J,72:$},{16:115,40:O,41:N},{14:116,40:q,50:J,72:$},s(i,[2,13]),s(Z,[2,64]),{59:117,61:Ot},{19:[1,118]},s(i,[2,20]),s(i,[2,23],{17:[1,119],42:A}),s(i,[2,11]),{13:[1,120],42:A},s(i,[2,10]),s(ut,[2,68]),s(i,[2,18]),{18:121,19:[1,122],53:53,54:54,58:Y},{14:123,40:q,50:J,72:$},{19:[1,124]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:p(function(n,a){if(a.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=a,l}},"parseError"),parse:p(function(n){var a=this,l=[0],r=[],y=[null],t=[],j=this.table,e="",et=0,At=0,Lt=2,It=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(C.yy[pt]=this.yy[pt]);_.setInput(n,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var yt=_.yylloc;t.push(yt);var Vt=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){l.length=l.length-2*b,y.length=y.length-b,t.length=t.length-b}p(Mt,"popStack");function Rt(){var b;return b=r.pop()||_.lex()||It,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}p(Rt,"lex");for(var g,v,m,ft,w={},st,E,xt,it;;){if(v=l[l.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Rt()),m=j[v]&&j[v][g]),typeof m>"u"||!m.length||!m[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`: +`+_.showPosition()+` +Expecting `+it.join(", ")+", got '"+(this.terminals_[g]||g)+"'":_t="Parse error on line "+(et+1)+": Unexpected "+(g==It?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(_t,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:yt,expected:it})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(m[0]){case 1:l.push(g),y.push(_.yytext),t.push(_.yylloc),l.push(m[1]),g=null,At=_.yyleng,e=_.yytext,et=_.yylineno,yt=_.yylloc;break;case 2:if(E=this.productions_[m[1]][1],w.$=y[y.length-E],w._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},Vt&&(w._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),ft=this.performAction.apply(w,[e,At,et,C.yy,m[1],y,t].concat(wt)),typeof ft<"u")return ft;E&&(l=l.slice(0,-1*E*2),y=y.slice(0,-1*E),t=t.slice(0,-1*E)),l.push(this.productions_[m[1]][0]),y.push(w.$),t.push(w._$),xt=j[l[l.length-2]][l[l.length-1]],l.push(xt);break;case 3:return!0}}return!0},"parse")},Dt=function(){var I={EOF:1,parseError:p(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:p(function(n,a){return this.yy=a||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:p(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:p(function(n){var a=n.length,l=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=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),l.length-1&&(this.yylineno-=l.length-1);var y=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:l?(l.length===r.length?this.yylloc.first_column:0)+r[r.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(n){this.unput(this.match.slice(n))},"less"),pastInput:p(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:p(function(n,a){var l,r,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),r=n[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var t in y)this[t]=y[t];return!1}return!1},"test_match"),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,a,l,r;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),t=0;ta[0].length)){if(a=l,r=t,this.options.backtrack_lexer){if(n=this.test_match(l,y[t]),n!==!1)return n;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(n=this.test_match(a,y[r]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:p(function(){var a=this.next();return a||this.lex()},"lex"),begin:p(function(a){this.conditionStack.push(a)},"begin"),popState:p(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:p(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:p(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:p(function(a){this.begin(a)},"pushState"),stateStackSize:p(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:p(function(a,l,r,y){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 72;case 16:return 4;case 17:return this.begin("block"),17;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 61;case 25:return 58;case 26:return 58;case 27:return 62;case 28:break;case 29:return this.popState(),19;case 30:return l.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;case 40:return 43;case 41:return 65;case 42:return 67;case 43:return 67;case 44:return 67;case 45:return 65;case 46:return 65;case 47:return 66;case 48:return 66;case 49:return 66;case 50:return 66;case 51:return 66;case 52:return 67;case 53:return 66;case 54:return 67;case 55:return 68;case 56:return 68;case 57:return 51;case 58:return 68;case 59:return 68;case 60:return 68;case 61:return 52;case 62:return 48;case 63:return 68;case 64:return 65;case 65:return 66;case 66:return 67;case 67:return 69;case 68:return 70;case 69:return 71;case 70:return 71;case 71:return 70;case 72:return 70;case 73:return 70;case 74:return 41;case 75:return 47;case 76:return 40;case 77:return l.yytext[0];case 78:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,74,75],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,76,77,78],inclusive:!0}}};return I}();dt.lexer=Dt;function tt(){this.yy={}}return p(tt,"Parser"),tt.prototype=dt,dt.Parser=tt,new tt}();gt.parser=gt;var te=gt,M,ee=(M=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Yt,this.getAccTitle=Pt,this.setAccDescription=zt,this.getAccDescription=Gt,this.setDiagramTitle=Kt,this.getDiagramTitle=Ut,this.getConfig=p(()=>rt().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}addEntity(i,o=""){var h;return this.entities.has(i)?!((h=this.entities.get(i))!=null&&h.alias)&&o&&(this.entities.get(i).alias=o,V.info(`Add alias '${o}' to entity '${i}'`)):(this.entities.set(i,{id:`entity-${i}-${this.entities.size}`,label:i,attributes:[],alias:o,shape:"erBox",look:rt().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),V.info("Added new entity :",i)),this.entities.get(i)}getEntity(i){return this.entities.get(i)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(i,o){const h=this.addEntity(i);let c;for(c=o.length-1;c>=0;c--)o[c].keys||(o[c].keys=[]),o[c].comment||(o[c].comment=""),h.attributes.push(o[c]),V.debug("Added attribute ",o[c].name)}addRelationship(i,o,h,c){const u=this.entities.get(i),f=this.entities.get(h);if(!u||!f)return;const d={entityA:u.id,roleA:o,entityB:f.id,relSpec:c};this.relationships.push(d),V.debug("Added new relationship :",d)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(i){this.direction=i}getCompiledStyles(i){let o=[];for(const h of i){const c=this.classes.get(h);c!=null&&c.styles&&(o=[...o,...c.styles??[]].map(u=>u.trim())),c!=null&&c.textStyles&&(o=[...o,...c.textStyles??[]].map(u=>u.trim()))}return o}addCssStyles(i,o){for(const h of i){const c=this.entities.get(h);if(!o||!c)return;for(const u of o)c.cssStyles.push(u)}}addClass(i,o){i.forEach(h=>{let c=this.classes.get(h);c===void 0&&(c={id:h,styles:[],textStyles:[]},this.classes.set(h,c)),o&&o.forEach(function(u){if(/color/.exec(u)){const f=u.replace("fill","bgFill");c.textStyles.push(f)}c.styles.push(u)})})}setClass(i,o){for(const h of i){const c=this.entities.get(h);if(c)for(const u of o)c.cssClasses+=" "+u}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Zt()}getData(){const i=[],o=[],h=rt();let c=0;for(const f of this.entities.keys()){const d=this.entities.get(f);d&&(d.cssCompiledStyles=this.getCompiledStyles(d.cssClasses.split(" ")),d.colorIndex=c++,i.push(d))}let u=0;for(const f of this.relationships){const d={id:jt(f.entityA,f.entityB,{prefix:"id",counter:u++}),type:"normal",curve:"basis",start:f.entityA,end:f.entityB,label:f.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:f.relSpec.cardB.toLowerCase(),arrowTypeEnd:f.relSpec.cardA.toLowerCase(),pattern:f.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:h.look,labelType:"markdown"};o.push(d)}return{nodes:i,edges:o,other:{},config:h,direction:"TB"}}},p(M,"ErDB"),M),vt={};Qt(vt,{draw:()=>se});var se=p(async function(s,i,o,h){V.info("REF0:"),V.info("Drawing er diagram (unified)",i);const{securityLevel:c,er:u,layout:f}=rt(),d=h.db.getData(),k=Bt(i,c);d.type=h.type,d.layoutAlgorithm=Xt(f),d.config.flowchart.nodeSpacing=(u==null?void 0:u.nodeSpacing)||140,d.config.flowchart.rankSpacing=(u==null?void 0:u.rankSpacing)||80,d.direction=h.db.getDirection();const{config:W}=d,{look:Q}=W;Q==="neo"?d.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:d.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],d.diagramId=i,await Ht(d,k),d.layoutAlgorithm==="elk"&&k.select(".edges").lower();const T=k.selectAll('[id*="-background"]');Array.from(T).length>0&&T.each(function(){const B=qt(this),R=B.attr("id").replace("-background",""),S=k.select(`#${CSS.escape(R)}`);if(!S.empty()){const x=S.attr("transform");B.attr("transform",x)}});const X=8;Jt.insertTitle(k,"erDiagramTitleText",(u==null?void 0:u.titleTopMargin)??25,h.db.getDiagramTitle()),Ft(k,X,"erDiagram",(u==null?void 0:u.useMaxWidth)??!0)},"draw"),Ct=p((s,i)=>{const o=$t,h=o(s,"r"),c=o(s,"g"),u=o(s,"b");return Wt(h,c,u,i)},"fade"),nt=new Set(["redux-color","redux-dark-color"]),ie=p(s=>{const{theme:i,look:o,bkgColorArray:h,borderColorArray:c}=s;if(!nt.has(i))return"";const u=(h==null?void 0:h.length)>0;let f="";for(let d=0;d{const{look:i,theme:o,erEdgeLabelBackground:h,strokeWidth:c}=s;return` + ${ie(s)} + .entityBox { + fill: ${s.mainBkg}; + stroke: ${s.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${s.tertiaryColor}; + opacity: 0.7; + background-color: ${s.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .labelBkg { + background-color: ${nt.has(o)&&h?h:Ct(s.tertiaryColor,.5)}; + } + + .edgeLabel { + background-color: ${nt.has(o)&&h?h:s.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${nt.has(o)&&h?h:s.edgeLabelBackground}; + } + .edgeLabel .label text { + fill: ${s.textColor}; + } + + .edgeLabel .label { + fill: ${s.nodeBorder}; + font-size: 14px; + } + + .label { + font-family: ${s.fontFamily}; + color: ${s.nodeTextColor||s.textColor}; + } + + .edge-pattern-dashed { + stroke-dasharray: 8,8; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon + { + fill: ${s.mainBkg}; + stroke: ${s.nodeBorder}; + stroke-width: ${i==="neo"?c:"1px"}; + } + + .relationshipLine { + stroke: ${s.lineColor}; + stroke-width: ${i==="neo"?c:"1px"}; + fill: none; + } + + .marker { + fill: none !important; + stroke: ${s.lineColor} !important; + stroke-width: 1; + } + [data-look=neo].labelBkg { + background-color: ${Ct(s.tertiaryColor,.5)}; + } +`},"getStyles"),ne=re,ue={parser:te,get db(){return new ee},renderer:vt,styles:ne};export{ue as diagram}; diff --git a/dist/assets/eventmodeling-FCH6USID-DKM4hpFU.js b/dist/assets/eventmodeling-FCH6USID-DKM4hpFU.js new file mode 100644 index 0000000..89cddec --- /dev/null +++ b/dist/assets/eventmodeling-FCH6USID-DKM4hpFU.js @@ -0,0 +1 @@ +import{h as o}from"./mermaid-parser.core-D9g22YKo.js";import{E as p}from"./mermaid-parser.core-D9g22YKo.js";import"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";export{p as EventModelingModule,o as createEventModelingServices}; diff --git a/dist/assets/flowDiagram-I6XJVG4X-D0Me_Wp2.js b/dist/assets/flowDiagram-I6XJVG4X-D0Me_Wp2.js new file mode 100644 index 0000000..69d295e --- /dev/null +++ b/dist/assets/flowDiagram-I6XJVG4X-D0Me_Wp2.js @@ -0,0 +1,162 @@ +import{g as Ht}from"./chunk-FMBD7UC4-Crb6W-Lm.js";import{_ as m,n as Mt,l as J,c as g1,o as Xt,r as Qt,u as rt,b as Jt,s as Zt,p as $t,a as te,g as ee,q as se,k as ie,t as re,J as ae,v as ne,x as st,d as it,y as ue,z as le,A as oe,B as ce}from"./index-mLPbTfpz.js";import{c as he}from"./chunk-ND2GUHAM-DRVGyKsL.js";import{g as de}from"./chunk-55IACEB6-DT6mN9fZ.js";import{s as pe}from"./chunk-2J33WTMH-CsIyCw5_.js";import{c as fe}from"./channel-B5wXLQie.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var ge="flowchart-",w1,be=(w1=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Jt,this.setAccDescription=Zt,this.setDiagramTitle=$t,this.getAccTitle=te,this.getAccDescription=ee,this.getDiagramTitle=se,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return ie.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,a,u,o,p,c={},k){var K,E;if(!i||i.trim().length===0)return;let r;if(k!==void 0){let f;k.includes(` +`)?f=k+` +`:f=`{ +`+k+` +}`,r=re(f,{schema:ae})}const A=this.edges.find(f=>f.id===i);if(A){const f=r;(f==null?void 0:f.animate)!==void 0&&(A.animate=f.animate),(f==null?void 0:f.animation)!==void 0&&(A.animation=f.animation),(f==null?void 0:f.curve)!==void 0&&(A.interpolate=f.curve);return}let y,b=this.vertices.get(i);if(b===void 0&&(n===void 0&&a===void 0&&u!==void 0&&u!==null&&J.warn(`Style applied to unknown node "${i}". This may indicate a typo. The node will be created automatically.`),b={id:i,labelType:"text",domId:ge+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,b)),this.vertexCounter++,n!==void 0?(this.config=g1(),y=this.sanitizeText(n.text.trim()),b.labelType=n.type,y.startsWith('"')&&y.endsWith('"')&&(y=y.substring(1,y.length-1)),b.text=y):b.text===void 0&&(b.text=i),a!==void 0&&(b.type=a),u!=null&&u.forEach(f=>{b.styles.push(f)}),o!=null&&o.forEach(f=>{b.classes.push(f)}),p!==void 0&&(b.dir=p),b.props===void 0?b.props=c:c!==void 0&&Object.assign(b.props,c),r!==void 0){if(r.shape){if(r.shape!==r.shape.toLowerCase()||r.shape.includes("_"))throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);if(!ne(r.shape))throw new Error(`No such shape: ${r.shape}.`);b.type=r==null?void 0:r.shape}r!=null&&r.label&&(b.text=r==null?void 0:r.label,b.labelType=this.sanitizeNodeLabelType(r==null?void 0:r.labelType)),r!=null&&r.icon&&(b.icon=r==null?void 0:r.icon,!((K=r.label)!=null&&K.trim())&&b.text===i&&(b.text="")),r!=null&&r.form&&(b.form=r==null?void 0:r.form),r!=null&&r.pos&&(b.pos=r==null?void 0:r.pos),r!=null&&r.img&&(b.img=r==null?void 0:r.img,!((E=r.label)!=null&&E.trim())&&b.text===i&&(b.text="")),r!=null&&r.constraint&&(b.constraint=r.constraint),r.w&&(b.assetWidth=Number(r.w)),r.h&&(b.assetHeight=Number(r.h))}}addSingleLink(i,n,a,u){const c={start:i,end:n,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};J.info("abc78 Got edge...",c);const k=a.text;if(k!==void 0&&(c.text=this.sanitizeText(k.text.trim()),c.text.startsWith('"')&&c.text.endsWith('"')&&(c.text=c.text.substring(1,c.text.length-1)),c.labelType=this.sanitizeNodeLabelType(k.type)),a!==void 0&&(c.type=a.type,c.stroke=a.stroke,c.length=a.length>10?10:a.length),u&&!this.edges.some(r=>r.id===u))c.id=u,c.isUserDefinedId=!0;else{const r=this.edges.filter(A=>A.start===c.start&&A.end===c.end);r.length===0?c.id=st(c.start,c.end,{counter:0,prefix:"L"}):c.id=st(c.start,c.end,{counter:r.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))J.info("Pushing edge..."),this.edges.push(c);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`)}isLinkData(i){return i!==null&&typeof i=="object"&&"id"in i&&typeof i.id=="string"}addLink(i,n,a){const u=this.isLinkData(a)?a.id.replace("@",""):void 0;J.info("addLink",i,n,u);for(const o of i)for(const p of n){const c=o===i[i.length-1],k=p===n[0];c&&k?this.addSingleLink(o,p,a,u):this.addSingleLink(o,p,a,void 0)}}updateLinkInterpolate(i,n){i.forEach(a=>{a==="default"?this.edges.defaultInterpolate=n:this.edges[a].interpolate=n})}updateLink(i,n){i.forEach(a=>{var u,o,p,c,k,r;if(typeof a=="number"&&a>=this.edges.length)throw new Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);a==="default"?this.edges.defaultStyle=n:(this.edges[a].style=n,(((o=(u=this.edges[a])==null?void 0:u.style)==null?void 0:o.length)??0)>0&&!((c=(p=this.edges[a])==null?void 0:p.style)!=null&&c.some(A=>A==null?void 0:A.startsWith("fill")))&&((r=(k=this.edges[a])==null?void 0:k.style)==null||r.push("fill:none")))})}addClass(i,n){const a=n.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");i.split(",").forEach(u=>{let o=this.classes.get(u);o===void 0&&(o={id:u,styles:[],textStyles:[]},this.classes.set(u,o)),a!=null&&a.forEach(p=>{if(/color/.exec(p)){const c=p.replace("fill","bgFill");o.textStyles.push(c)}o.styles.push(p)})})}setDirection(i){this.direction=i.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(i,n){for(const a of i.split(",")){const u=this.vertices.get(a);u&&u.classes.push(n);const o=this.edges.find(c=>c.id===a);o&&o.classes.push(n);const p=this.subGraphLookup.get(a);p&&p.classes.push(n)}}setTooltip(i,n){if(n!==void 0){n=this.sanitizeText(n);for(const a of i.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,n)}}setClickFun(i,n,a){if(g1().securityLevel!=="loose"||n===void 0)return;let u=[];if(typeof a=="string"){u=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let p=0;p{const p=this.lookUpDomId(i),c=document.querySelector(`[id="${p}"]`);c!==null&&c.addEventListener("click",()=>{rt.runFunc(n,...u)},!1)}))}setLink(i,n,a){i.split(",").forEach(u=>{const o=this.vertices.get(u);o!==void 0&&(o.link=rt.formatUrl(n,this.config),o.linkTarget=a)}),this.setClass(i,"clickable")}getTooltip(i){return this.tooltips.get(i)}setClickEvent(i,n,a){i.split(",").forEach(u=>{this.setClickFun(u,n,a)}),this.setClass(i,"clickable")}bindFunctions(i){this.funs.forEach(n=>{n(i)})}getDirection(){var i;return(i=this.direction)==null?void 0:i.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(i){const n=he();it(i).select("svg").selectAll("g.node").on("mouseover",o=>{var r;const p=it(o.currentTarget),c=p.attr("title");if(c===null)return;const k=(r=o.currentTarget)==null?void 0:r.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.text(p.attr("title")).style("left",window.scrollX+k.left+(k.right-k.left)/2+"px").style("top",window.scrollY+k.bottom+"px"),n.html(ue.sanitize(c)),p.classed("hover",!0)}).on("mouseout",o=>{n.transition().duration(500).style("opacity",0),it(o.currentTarget).classed("hover",!1)})}clear(i="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=i,this.config=g1(),le()}setGen(i){this.version=i||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(i,n,a){let u=i.text.trim(),o=a.text;i===a&&/\s/.exec(a.text)&&(u=void 0);const c=m(b=>{const K={boolean:{},number:{},string:{}},E=[];let f;return{nodeList:b.filter(function(j){const h1=typeof j;return j.stmt&&j.stmt==="dir"?(f=j.value,!1):j.trim()===""?!1:h1 in K?K[h1].hasOwnProperty(j)?!1:K[h1][j]=!0:E.includes(j)?!1:E.push(j)}),dir:f}},"uniq")(n.flat()),k=c.nodeList;let r=c.dir;const A=g1().flowchart??{};if(r=r??(A.inheritDir?this.getDirection()??g1().direction??void 0:void 0),this.version==="gen-1")for(let b=0;b2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=n,this.subGraphs[n].id===i)return{result:!0,count:0};let u=0,o=1;for(;u=0){const c=this.indexNodes2(i,p);if(c.result)return{result:!0,count:o+c.count};o=o+c.count}u=u+1}return{result:!1,count:o}}getDepthFirstPos(i){return this.posCrossRef[i]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(i){let n=i.trim(),a="arrow_open";switch(n[0]){case"<":a="arrow_point",n=n.slice(1);break;case"x":a="arrow_cross",n=n.slice(1);break;case"o":a="arrow_circle",n=n.slice(1);break}let u="normal";return n.includes("=")&&(u="thick"),n.includes(".")&&(u="dotted"),{type:a,stroke:u}}countChar(i,n){const a=n.length;let u=0;for(let o=0;o":u="arrow_point",n.startsWith("<")&&(u="double_"+u,a=a.slice(1));break;case"o":u="arrow_circle",n.startsWith("o")&&(u="double_"+u,a=a.slice(1));break}let o="normal",p=a.length-1;a.startsWith("=")&&(o="thick"),a.startsWith("~")&&(o="invisible");const c=this.countChar(".",a);return c&&(o="dotted",p=c),{type:u,stroke:o,length:p}}destructLink(i,n){const a=this.destructEndLink(i);let u;if(n){if(u=this.destructStartLink(n),u.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(u.type==="arrow_open")u.type=a.type;else{if(u.type!==a.type)return{type:"INVALID",stroke:"INVALID"};u.type="double_"+u.type}return u.type==="double_arrow"&&(u.type="double_arrow_point"),u.length=a.length,u}return a}exists(i,n){for(const a of i)if(a.nodes.includes(n))return!0;return!1}makeUniq(i,n){const a=[];return i.nodes.forEach((u,o)=>{this.exists(n,u)||a.push(i.nodes[o])}),{nodes:a}}getTypeFromVertex(i){if(i.img)return"imageSquare";if(i.icon)return i.form==="circle"?"iconCircle":i.form==="square"?"iconSquare":i.form==="rounded"?"iconRounded":"icon";switch(i.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return i.type}}findNode(i,n){return i.find(a=>a.id===n)}destructEdgeType(i){let n="none",a="arrow_point";switch(i){case"arrow_point":case"arrow_circle":case"arrow_cross":a=i;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":n=i.replace("double_",""),a=n;break}return{arrowTypeStart:n,arrowTypeEnd:a}}addNodeFromVertex(i,n,a,u,o,p){var A;const c=a.get(i.id),k=u.get(i.id)??!1,r=this.findNode(n,i.id);if(r)r.cssStyles=i.styles,r.cssCompiledStyles=this.getCompiledStyles(i.classes),r.cssClasses=i.classes.join(" ");else{const y={id:i.id,label:i.text,labelType:i.labelType,labelStyle:"",parentId:c,padding:((A=o.flowchart)==null?void 0:A.padding)||8,cssStyles:i.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...i.classes]),cssClasses:"default "+i.classes.join(" "),dir:i.dir,domId:i.domId,look:p,link:i.link,linkTarget:i.linkTarget,tooltip:this.getTooltip(i.id),icon:i.icon,pos:i.pos,img:i.img,assetWidth:i.assetWidth,assetHeight:i.assetHeight,constraint:i.constraint};k?n.push({...y,isGroup:!0,shape:"rect"}):n.push({...y,isGroup:!1,shape:this.getTypeFromVertex(i)})}}getCompiledStyles(i){let n=[];for(const a of i){const u=this.classes.get(a);u!=null&&u.styles&&(n=[...n,...u.styles??[]].map(o=>o.trim())),u!=null&&u.textStyles&&(n=[...n,...u.textStyles??[]].map(o=>o.trim()))}return n}getData(){const i=g1(),n=[],a=[],u=this.getSubGraphs(),o=new Map,p=new Map;for(let r=u.length-1;r>=0;r--){const A=u[r];A.nodes.length>0&&p.set(A.id,!0);for(const y of A.nodes)o.set(y,A.id)}for(let r=u.length-1;r>=0;r--){const A=u[r];n.push({id:A.id,label:A.title,labelStyle:"",labelType:A.labelType,parentId:o.get(A.id),padding:8,cssCompiledStyles:this.getCompiledStyles(A.classes),cssClasses:A.classes.join(" "),shape:"rect",dir:A.dir,isGroup:!0,look:i.look})}this.getVertices().forEach(r=>{this.addNodeFromVertex(r,n,o,p,i,i.look||"classic")});const k=this.getEdges();return k.forEach((r,A)=>{var f;const{arrowTypeStart:y,arrowTypeEnd:b}=this.destructEdgeType(r.type),K=[...k.defaultStyle??[]];r.style&&K.push(...r.style);const E={id:st(r.start,r.end,{counter:A,prefix:"L"},r.id),isUserDefinedId:r.isUserDefinedId,start:r.start,end:r.end,type:r.type??"normal",label:r.text,labelType:r.labelType,labelpos:"c",thickness:r.stroke,minlen:r.length,classes:(r==null?void 0:r.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(r==null?void 0:r.stroke)==="invisible"||(r==null?void 0:r.type)==="arrow_open"?"none":y,arrowTypeEnd:(r==null?void 0:r.stroke)==="invisible"||(r==null?void 0:r.type)==="arrow_open"?"none":b,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(r.classes),labelStyle:K,style:K,pattern:r.stroke,look:i.look,animate:r.animate,animation:r.animation,curve:r.interpolate||this.edges.defaultInterpolate||((f=i.flowchart)==null?void 0:f.curve)};a.push(E)}),{nodes:n,edges:a,other:{},config:i}}defaultConfig(){return oe.flowchart}},m(w1,"FlowDB"),w1),Ae=m(function(s,i){return i.db.getClasses()},"getClasses"),ke=m(async function(s,i,n,a){var y;J.info("REF0:"),J.info("Drawing state diagram (v2)",i);const{securityLevel:u,flowchart:o,layout:p}=g1();a.db.setDiagramId(i),J.debug("Before getData: ");const c=a.db.getData();J.debug("Data: ",c);const k=de(i,u),r=a.db.getDirection();c.type=a.type,c.layoutAlgorithm=Xt(p),c.layoutAlgorithm==="dagre"&&p==="elk"&&J.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),c.direction=r,c.nodeSpacing=(o==null?void 0:o.nodeSpacing)||50,c.rankSpacing=(o==null?void 0:o.rankSpacing)||50,c.markers=["point","circle","cross"],c.diagramId=i,J.debug("REF1:",c),await Qt(c,k);const A=((y=c.config.flowchart)==null?void 0:y.diagramPadding)??8;rt.insertTitle(k,"flowchartTitleText",(o==null?void 0:o.titleTopMargin)||0,a.db.getDiagramTitle()),pe(k,A,"flowchart",(o==null?void 0:o.useMaxWidth)||!1)},"draw"),me={getClasses:Ae,draw:ke},at=function(){var s=m(function(f1,h,d,g){for(d=d||{},g=f1.length;g--;d[f1[g]]=h);return d},"o"),i=[1,4],n=[1,3],a=[1,5],u=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],o=[2,2],p=[1,13],c=[1,14],k=[1,15],r=[1,16],A=[1,23],y=[1,25],b=[1,26],K=[1,27],E=[1,50],f=[1,49],N1=[1,29],j=[1,30],h1=[1,31],P1=[1,32],O1=[1,33],L=[1,45],V=[1,47],I=[1,43],R=[1,48],w=[1,44],N=[1,51],G=[1,46],P=[1,52],O=[1,53],M1=[1,34],U1=[1,35],z1=[1,36],W1=[1,37],K1=[1,38],d1=[1,58],x=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],$=[1,62],t1=[1,61],e1=[1,63],m1=[8,9,11,75,77,78],nt=[1,79],T1=[1,92],C1=[1,97],D1=[1,96],S1=[1,93],y1=[1,89],x1=[1,95],E1=[1,91],F1=[1,98],_1=[1,94],B1=[1,99],v1=[1,90],b1=[8,9,10,11,40,75,77,78],U=[8,9,10,11,40,46,75,77,78],q=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],ut=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],L1=[44,60,89,102,105,106,109,111,114,115,116],lt=[1,122],ot=[1,123],j1=[1,125],Y1=[1,124],ct=[44,60,62,74,89,102,105,106,109,111,114,115,116],ht=[1,134],dt=[1,148],pt=[1,149],ft=[1,150],gt=[1,151],bt=[1,136],At=[1,138],kt=[1,142],mt=[1,143],Tt=[1,144],Ct=[1,145],Dt=[1,146],St=[1,147],yt=[1,152],xt=[1,153],Et=[1,132],Ft=[1,133],_t=[1,140],Bt=[1,135],vt=[1,139],Lt=[1,137],Q1=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Vt=[1,155],It=[1,157],B=[8,9,11],H=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],T=[1,177],z=[1,173],W=[1,174],C=[1,178],D=[1,175],S=[1,176],V1=[77,116,119],F=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Rt=[10,106],p1=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],s1=[1,248],i1=[1,246],r1=[1,250],a1=[1,244],n1=[1,245],u1=[1,247],l1=[1,249],o1=[1,251],I1=[1,269],wt=[8,9,11,106],Z=[8,9,10,11,60,84,105,106,109,110,111,112],J1={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:m(function(h,d,g,l,_,t,G1){var e=t.length-1;switch(_){case 2:this.$=[];break;case 3:(!Array.isArray(t[e])||t[e].length>0)&&t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 183:this.$=t[e];break;case 11:l.setDirection("TB"),this.$="TB";break;case 12:l.setDirection(t[e-1]),this.$=t[e-1];break;case 27:this.$=t[e-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=l.addSubGraph(t[e-6],t[e-1],t[e-4]);break;case 34:this.$=l.addSubGraph(t[e-3],t[e-1],t[e-3]);break;case 35:this.$=l.addSubGraph(void 0,t[e-1],void 0);break;case 37:this.$=t[e].trim(),l.setAccTitle(this.$);break;case 38:case 39:this.$=t[e].trim(),l.setAccDescription(this.$);break;case 43:this.$=t[e-1]+t[e];break;case 44:this.$=t[e];break;case 45:l.addVertex(t[e-1][t[e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e]),l.addLink(t[e-3].stmt,t[e-1],t[e-2]),this.$={stmt:t[e-1],nodes:t[e-1].concat(t[e-3].nodes)};break;case 46:l.addLink(t[e-2].stmt,t[e],t[e-1]),this.$={stmt:t[e],nodes:t[e].concat(t[e-2].nodes)};break;case 47:l.addLink(t[e-3].stmt,t[e-1],t[e-2]),this.$={stmt:t[e-1],nodes:t[e-1].concat(t[e-3].nodes)};break;case 48:this.$={stmt:t[e-1],nodes:t[e-1]};break;case 49:l.addVertex(t[e-1][t[e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e]),this.$={stmt:t[e-1],nodes:t[e-1],shapeData:t[e]};break;case 50:this.$={stmt:t[e],nodes:t[e]};break;case 51:this.$=[t[e]];break;case 52:l.addVertex(t[e-5][t[e-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e-4]),this.$=t[e-5].concat(t[e]);break;case 53:this.$=t[e-4].concat(t[e]);break;case 54:this.$=t[e];break;case 55:this.$=t[e-2],l.setClass(t[e-2],t[e]);break;case 56:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"square");break;case 57:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"doublecircle");break;case 58:this.$=t[e-5],l.addVertex(t[e-5],t[e-2],"circle");break;case 59:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"ellipse");break;case 60:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"stadium");break;case 61:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"subroutine");break;case 62:this.$=t[e-7],l.addVertex(t[e-7],t[e-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[e-5],t[e-3]]]));break;case 63:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"cylinder");break;case 64:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"round");break;case 65:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"diamond");break;case 66:this.$=t[e-5],l.addVertex(t[e-5],t[e-2],"hexagon");break;case 67:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"odd");break;case 68:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"trapezoid");break;case 69:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"inv_trapezoid");break;case 70:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"lean_right");break;case 71:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"lean_left");break;case 72:this.$=t[e],l.addVertex(t[e]);break;case 73:t[e-1].text=t[e],this.$=t[e-1];break;case 74:case 75:t[e-2].text=t[e-1],this.$=t[e-2];break;case 76:this.$=t[e];break;case 77:var v=l.destructLink(t[e],t[e-2]);this.$={type:v.type,stroke:v.stroke,length:v.length,text:t[e-1]};break;case 78:var v=l.destructLink(t[e],t[e-2]);this.$={type:v.type,stroke:v.stroke,length:v.length,text:t[e-1],id:t[e-3]};break;case 79:this.$={text:t[e],type:"text"};break;case 80:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 81:this.$={text:t[e],type:"string"};break;case 82:this.$={text:t[e],type:"markdown"};break;case 83:var v=l.destructLink(t[e]);this.$={type:v.type,stroke:v.stroke,length:v.length};break;case 84:var v=l.destructLink(t[e]);this.$={type:v.type,stroke:v.stroke,length:v.length,id:t[e-1]};break;case 85:this.$=t[e-1];break;case 86:this.$={text:t[e],type:"text"};break;case 87:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 88:this.$={text:t[e],type:"string"};break;case 89:case 104:this.$={text:t[e],type:"markdown"};break;case 101:this.$={text:t[e],type:"text"};break;case 102:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 103:this.$={text:t[e],type:"text"};break;case 105:this.$=t[e-4],l.addClass(t[e-2],t[e]);break;case 106:this.$=t[e-4],l.setClass(t[e-2],t[e]);break;case 107:case 115:this.$=t[e-1],l.setClickEvent(t[e-1],t[e]);break;case 108:case 116:this.$=t[e-3],l.setClickEvent(t[e-3],t[e-2]),l.setTooltip(t[e-3],t[e]);break;case 109:this.$=t[e-2],l.setClickEvent(t[e-2],t[e-1],t[e]);break;case 110:this.$=t[e-4],l.setClickEvent(t[e-4],t[e-3],t[e-2]),l.setTooltip(t[e-4],t[e]);break;case 111:this.$=t[e-2],l.setLink(t[e-2],t[e]);break;case 112:this.$=t[e-4],l.setLink(t[e-4],t[e-2]),l.setTooltip(t[e-4],t[e]);break;case 113:this.$=t[e-4],l.setLink(t[e-4],t[e-2],t[e]);break;case 114:this.$=t[e-6],l.setLink(t[e-6],t[e-4],t[e]),l.setTooltip(t[e-6],t[e-2]);break;case 117:this.$=t[e-1],l.setLink(t[e-1],t[e]);break;case 118:this.$=t[e-3],l.setLink(t[e-3],t[e-2]),l.setTooltip(t[e-3],t[e]);break;case 119:this.$=t[e-3],l.setLink(t[e-3],t[e-2],t[e]);break;case 120:this.$=t[e-5],l.setLink(t[e-5],t[e-4],t[e]),l.setTooltip(t[e-5],t[e-2]);break;case 121:this.$=t[e-4],l.addVertex(t[e-2],void 0,void 0,t[e]);break;case 122:this.$=t[e-4],l.updateLink([t[e-2]],t[e]);break;case 123:this.$=t[e-4],l.updateLink(t[e-2],t[e]);break;case 124:this.$=t[e-8],l.updateLinkInterpolate([t[e-6]],t[e-2]),l.updateLink([t[e-6]],t[e]);break;case 125:this.$=t[e-8],l.updateLinkInterpolate(t[e-6],t[e-2]),l.updateLink(t[e-6],t[e]);break;case 126:this.$=t[e-6],l.updateLinkInterpolate([t[e-4]],t[e]);break;case 127:this.$=t[e-6],l.updateLinkInterpolate(t[e-4],t[e]);break;case 128:case 130:this.$=[t[e]];break;case 129:case 131:t[e-2].push(t[e]),this.$=t[e-2];break;case 133:this.$=t[e-1]+t[e];break;case 181:this.$=t[e];break;case 182:this.$=t[e-1]+""+t[e];break;case 184:this.$=t[e-1]+""+t[e];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:i,10:n,12:a},{1:[3]},s(u,o,{5:6}),{4:7,9:i,10:n,12:a},{4:8,9:i,10:n,12:a},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:p,9:c,10:k,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:A,33:24,34:y,36:b,38:K,42:28,43:39,44:E,45:40,47:41,60:f,84:N1,85:j,86:h1,87:P1,88:O1,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O,121:M1,122:U1,123:z1,124:W1,125:K1},s(u,[2,9]),s(u,[2,10]),s(u,[2,11]),{8:[1,55],9:[1,56],10:d1,15:54,18:57},s(x,[2,3]),s(x,[2,4]),s(x,[2,5]),s(x,[2,6]),s(x,[2,7]),s(x,[2,8]),{8:$,9:t1,11:e1,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:$,9:t1,11:e1,21:68},{8:$,9:t1,11:e1,21:69},{8:$,9:t1,11:e1,21:70},{8:$,9:t1,11:e1,21:71},{8:$,9:t1,11:e1,21:72},{8:$,9:t1,10:[1,73],11:e1,21:74},s(x,[2,36]),{35:[1,75]},{37:[1,76]},s(x,[2,39]),s(m1,[2,50],{18:77,39:78,10:d1,40:nt}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:T1,44:C1,60:D1,80:[1,87],89:S1,95:[1,84],97:[1,85],101:86,105:y1,106:x1,109:E1,111:F1,114:_1,115:B1,116:v1,120:88},s(x,[2,185]),s(x,[2,186]),s(x,[2,187]),s(x,[2,188]),s(x,[2,189]),s(b1,[2,51]),s(b1,[2,54],{46:[1,100]}),s(U,[2,72],{113:113,29:[1,101],44:E,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:f,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:L,102:V,105:I,106:R,109:w,111:N,114:G,115:P,116:O}),s(q,[2,181]),s(q,[2,142]),s(q,[2,143]),s(q,[2,144]),s(q,[2,145]),s(q,[2,146]),s(q,[2,147]),s(q,[2,148]),s(q,[2,149]),s(q,[2,150]),s(q,[2,151]),s(q,[2,152]),s(u,[2,12]),s(u,[2,18]),s(u,[2,19]),{9:[1,114]},s(ut,[2,26],{18:115,10:d1}),s(x,[2,27]),{42:116,43:39,44:E,45:40,47:41,60:f,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O},s(x,[2,40]),s(x,[2,41]),s(x,[2,42]),s(L1,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:lt,81:ot,116:j1,119:Y1},{75:[1,126],77:[1,127]},s(ct,[2,83]),s(x,[2,28]),s(x,[2,29]),s(x,[2,30]),s(x,[2,31]),s(x,[2,32]),{10:ht,12:dt,14:pt,27:ft,28:128,32:gt,44:bt,60:At,75:kt,80:[1,130],81:[1,131],83:141,84:mt,85:Tt,86:Ct,87:Dt,88:St,89:yt,90:xt,91:129,105:Et,109:Ft,111:_t,114:Bt,115:vt,116:Lt},s(Q1,o,{5:154}),s(x,[2,37]),s(x,[2,38]),s(m1,[2,48],{44:Vt}),s(m1,[2,49],{18:156,10:d1,40:It}),s(b1,[2,44]),{44:E,47:158,60:f,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O},{102:[1,159],103:160,105:[1,161]},{44:E,47:162,60:f,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O},{44:E,47:163,60:f,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O},s(B,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},s(B,[2,115],{120:168,10:[1,167],14:T1,44:C1,60:D1,89:S1,105:y1,106:x1,109:E1,111:F1,114:_1,115:B1,116:v1}),s(B,[2,117],{10:[1,169]}),s(H,[2,183]),s(H,[2,170]),s(H,[2,171]),s(H,[2,172]),s(H,[2,173]),s(H,[2,174]),s(H,[2,175]),s(H,[2,176]),s(H,[2,177]),s(H,[2,178]),s(H,[2,179]),s(H,[2,180]),{44:E,47:170,60:f,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O},{30:171,67:T,80:z,81:W,82:172,116:C,117:D,118:S},{30:179,67:T,80:z,81:W,82:172,116:C,117:D,118:S},{30:181,50:[1,180],67:T,80:z,81:W,82:172,116:C,117:D,118:S},{30:182,67:T,80:z,81:W,82:172,116:C,117:D,118:S},{30:183,67:T,80:z,81:W,82:172,116:C,117:D,118:S},{30:184,67:T,80:z,81:W,82:172,116:C,117:D,118:S},{109:[1,185]},{30:186,67:T,80:z,81:W,82:172,116:C,117:D,118:S},{30:187,65:[1,188],67:T,80:z,81:W,82:172,116:C,117:D,118:S},{30:189,67:T,80:z,81:W,82:172,116:C,117:D,118:S},{30:190,67:T,80:z,81:W,82:172,116:C,117:D,118:S},{30:191,67:T,80:z,81:W,82:172,116:C,117:D,118:S},s(q,[2,182]),s(u,[2,20]),s(ut,[2,25]),s(m1,[2,46],{39:192,18:193,10:d1,40:nt}),s(L1,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:T,80:z,81:W,82:172,116:C,117:D,118:S},{77:[1,197],79:198,116:j1,119:Y1},s(V1,[2,79]),s(V1,[2,81]),s(V1,[2,82]),s(V1,[2,168]),s(V1,[2,169]),{76:199,79:121,80:lt,81:ot,116:j1,119:Y1},s(ct,[2,84]),{8:$,9:t1,10:ht,11:e1,12:dt,14:pt,21:201,27:ft,29:[1,200],32:gt,44:bt,60:At,75:kt,83:141,84:mt,85:Tt,86:Ct,87:Dt,88:St,89:yt,90:xt,91:202,105:Et,109:Ft,111:_t,114:Bt,115:vt,116:Lt},s(F,[2,101]),s(F,[2,103]),s(F,[2,104]),s(F,[2,157]),s(F,[2,158]),s(F,[2,159]),s(F,[2,160]),s(F,[2,161]),s(F,[2,162]),s(F,[2,163]),s(F,[2,164]),s(F,[2,165]),s(F,[2,166]),s(F,[2,167]),s(F,[2,90]),s(F,[2,91]),s(F,[2,92]),s(F,[2,93]),s(F,[2,94]),s(F,[2,95]),s(F,[2,96]),s(F,[2,97]),s(F,[2,98]),s(F,[2,99]),s(F,[2,100]),{6:11,7:12,8:p,9:c,10:k,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:A,32:[1,203],33:24,34:y,36:b,38:K,42:28,43:39,44:E,45:40,47:41,60:f,84:N1,85:j,86:h1,87:P1,88:O1,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O,121:M1,122:U1,123:z1,124:W1,125:K1},{10:d1,18:204},{44:[1,205]},s(b1,[2,43]),{10:[1,206],44:E,60:f,89:L,102:V,105:I,106:R,109:w,111:N,113:113,114:G,115:P,116:O},{10:[1,207]},{10:[1,208],106:[1,209]},s(Rt,[2,128]),{10:[1,210],44:E,60:f,89:L,102:V,105:I,106:R,109:w,111:N,113:113,114:G,115:P,116:O},{10:[1,211],44:E,60:f,89:L,102:V,105:I,106:R,109:w,111:N,113:113,114:G,115:P,116:O},{80:[1,212]},s(B,[2,109],{10:[1,213]}),s(B,[2,111],{10:[1,214]}),{80:[1,215]},s(H,[2,184]),{80:[1,216],98:[1,217]},s(b1,[2,55],{113:113,44:E,60:f,89:L,102:V,105:I,106:R,109:w,111:N,114:G,115:P,116:O}),{31:[1,218],67:T,82:219,116:C,117:D,118:S},s(p1,[2,86]),s(p1,[2,88]),s(p1,[2,89]),s(p1,[2,153]),s(p1,[2,154]),s(p1,[2,155]),s(p1,[2,156]),{49:[1,220],67:T,82:219,116:C,117:D,118:S},{30:221,67:T,80:z,81:W,82:172,116:C,117:D,118:S},{51:[1,222],67:T,82:219,116:C,117:D,118:S},{53:[1,223],67:T,82:219,116:C,117:D,118:S},{55:[1,224],67:T,82:219,116:C,117:D,118:S},{57:[1,225],67:T,82:219,116:C,117:D,118:S},{60:[1,226]},{64:[1,227],67:T,82:219,116:C,117:D,118:S},{66:[1,228],67:T,82:219,116:C,117:D,118:S},{30:229,67:T,80:z,81:W,82:172,116:C,117:D,118:S},{31:[1,230],67:T,82:219,116:C,117:D,118:S},{67:T,69:[1,231],71:[1,232],82:219,116:C,117:D,118:S},{67:T,69:[1,234],71:[1,233],82:219,116:C,117:D,118:S},s(m1,[2,45],{18:156,10:d1,40:It}),s(m1,[2,47],{44:Vt}),s(L1,[2,75]),s(L1,[2,74]),{62:[1,235],67:T,82:219,116:C,117:D,118:S},s(L1,[2,77]),s(V1,[2,80]),{77:[1,236],79:198,116:j1,119:Y1},{30:237,67:T,80:z,81:W,82:172,116:C,117:D,118:S},s(Q1,o,{5:238}),s(F,[2,102]),s(x,[2,35]),{43:239,44:E,45:40,47:41,60:f,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O},{10:d1,18:240},{10:s1,60:i1,84:r1,92:241,105:a1,107:242,108:243,109:n1,110:u1,111:l1,112:o1},{10:s1,60:i1,84:r1,92:252,104:[1,253],105:a1,107:242,108:243,109:n1,110:u1,111:l1,112:o1},{10:s1,60:i1,84:r1,92:254,104:[1,255],105:a1,107:242,108:243,109:n1,110:u1,111:l1,112:o1},{105:[1,256]},{10:s1,60:i1,84:r1,92:257,105:a1,107:242,108:243,109:n1,110:u1,111:l1,112:o1},{44:E,47:258,60:f,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O},s(B,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},s(B,[2,116]),s(B,[2,118],{10:[1,262]}),s(B,[2,119]),s(U,[2,56]),s(p1,[2,87]),s(U,[2,57]),{51:[1,263],67:T,82:219,116:C,117:D,118:S},s(U,[2,64]),s(U,[2,59]),s(U,[2,60]),s(U,[2,61]),{109:[1,264]},s(U,[2,63]),s(U,[2,65]),{66:[1,265],67:T,82:219,116:C,117:D,118:S},s(U,[2,67]),s(U,[2,68]),s(U,[2,70]),s(U,[2,69]),s(U,[2,71]),s([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),s(L1,[2,78]),{31:[1,266],67:T,82:219,116:C,117:D,118:S},{6:11,7:12,8:p,9:c,10:k,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:A,32:[1,267],33:24,34:y,36:b,38:K,42:28,43:39,44:E,45:40,47:41,60:f,84:N1,85:j,86:h1,87:P1,88:O1,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O,121:M1,122:U1,123:z1,124:W1,125:K1},s(b1,[2,53]),{43:268,44:E,45:40,47:41,60:f,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O},s(B,[2,121],{106:I1}),s(wt,[2,130],{108:270,10:s1,60:i1,84:r1,105:a1,109:n1,110:u1,111:l1,112:o1}),s(Z,[2,132]),s(Z,[2,134]),s(Z,[2,135]),s(Z,[2,136]),s(Z,[2,137]),s(Z,[2,138]),s(Z,[2,139]),s(Z,[2,140]),s(Z,[2,141]),s(B,[2,122],{106:I1}),{10:[1,271]},s(B,[2,123],{106:I1}),{10:[1,272]},s(Rt,[2,129]),s(B,[2,105],{106:I1}),s(B,[2,106],{113:113,44:E,60:f,89:L,102:V,105:I,106:R,109:w,111:N,114:G,115:P,116:O}),s(B,[2,110]),s(B,[2,112],{10:[1,273]}),s(B,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:$,9:t1,11:e1,21:278},s(x,[2,34]),s(b1,[2,52]),{10:s1,60:i1,84:r1,105:a1,107:279,108:243,109:n1,110:u1,111:l1,112:o1},s(Z,[2,133]),{14:T1,44:C1,60:D1,89:S1,101:280,105:y1,106:x1,109:E1,111:F1,114:_1,115:B1,116:v1,120:88},{14:T1,44:C1,60:D1,89:S1,101:281,105:y1,106:x1,109:E1,111:F1,114:_1,115:B1,116:v1,120:88},{98:[1,282]},s(B,[2,120]),s(U,[2,58]),{30:283,67:T,80:z,81:W,82:172,116:C,117:D,118:S},s(U,[2,66]),s(Q1,o,{5:284}),s(wt,[2,131],{108:270,10:s1,60:i1,84:r1,105:a1,109:n1,110:u1,111:l1,112:o1}),s(B,[2,126],{120:168,10:[1,285],14:T1,44:C1,60:D1,89:S1,105:y1,106:x1,109:E1,111:F1,114:_1,115:B1,116:v1}),s(B,[2,127],{120:168,10:[1,286],14:T1,44:C1,60:D1,89:S1,105:y1,106:x1,109:E1,111:F1,114:_1,115:B1,116:v1}),s(B,[2,114]),{31:[1,287],67:T,82:219,116:C,117:D,118:S},{6:11,7:12,8:p,9:c,10:k,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:A,32:[1,288],33:24,34:y,36:b,38:K,42:28,43:39,44:E,45:40,47:41,60:f,84:N1,85:j,86:h1,87:P1,88:O1,89:L,102:V,105:I,106:R,109:w,111:N,113:42,114:G,115:P,116:O,121:M1,122:U1,123:z1,124:W1,125:K1},{10:s1,60:i1,84:r1,92:289,105:a1,107:242,108:243,109:n1,110:u1,111:l1,112:o1},{10:s1,60:i1,84:r1,92:290,105:a1,107:242,108:243,109:n1,110:u1,111:l1,112:o1},s(U,[2,62]),s(x,[2,33]),s(B,[2,124],{106:I1}),s(B,[2,125],{106:I1})],defaultActions:{},parseError:m(function(h,d){if(d.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=d,g}},"parseError"),parse:m(function(h){var d=this,g=[0],l=[],_=[null],t=[],G1=this.table,e="",v=0,Nt=0,Kt=2,Gt=1,jt=t.slice.call(arguments,1),M=Object.create(this.lexer),A1={yy:{}};for(var Z1 in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z1)&&(A1.yy[Z1]=this.yy[Z1]);M.setInput(h,A1.yy),A1.yy.lexer=M,A1.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var $1=M.yylloc;t.push($1);var Yt=M.options&&M.options.ranges;typeof A1.yy.parseError=="function"?this.parseError=A1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function qt(X){g.length=g.length-2*X,_.length=_.length-X,t.length=t.length-X}m(qt,"popStack");function Pt(){var X;return X=l.pop()||M.lex()||Gt,typeof X!="number"&&(X instanceof Array&&(l=X,X=l.pop()),X=d.symbols_[X]||X),X}m(Pt,"lex");for(var Y,k1,Q,tt,R1={},H1,c1,Ot,X1;;){if(k1=g[g.length-1],this.defaultActions[k1]?Q=this.defaultActions[k1]:((Y===null||typeof Y>"u")&&(Y=Pt()),Q=G1[k1]&&G1[k1][Y]),typeof Q>"u"||!Q.length||!Q[0]){var et="";X1=[];for(H1 in G1[k1])this.terminals_[H1]&&H1>Kt&&X1.push("'"+this.terminals_[H1]+"'");M.showPosition?et="Parse error on line "+(v+1)+`: +`+M.showPosition()+` +Expecting `+X1.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":et="Parse error on line "+(v+1)+": Unexpected "+(Y==Gt?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(et,{text:M.match,token:this.terminals_[Y]||Y,line:M.yylineno,loc:$1,expected:X1})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k1+", token: "+Y);switch(Q[0]){case 1:g.push(Y),_.push(M.yytext),t.push(M.yylloc),g.push(Q[1]),Y=null,Nt=M.yyleng,e=M.yytext,v=M.yylineno,$1=M.yylloc;break;case 2:if(c1=this.productions_[Q[1]][1],R1.$=_[_.length-c1],R1._$={first_line:t[t.length-(c1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(c1||1)].first_column,last_column:t[t.length-1].last_column},Yt&&(R1._$.range=[t[t.length-(c1||1)].range[0],t[t.length-1].range[1]]),tt=this.performAction.apply(R1,[e,Nt,v,A1.yy,Q[1],_,t].concat(jt)),typeof tt<"u")return tt;c1&&(g=g.slice(0,-1*c1*2),_=_.slice(0,-1*c1),t=t.slice(0,-1*c1)),g.push(this.productions_[Q[1]][0]),_.push(R1.$),t.push(R1._$),Ot=G1[g[g.length-2]][g[g.length-1]],g.push(Ot);break;case 3:return!0}}return!0},"parse")},Wt=function(){var f1={EOF:1,parseError:m(function(d,g){if(this.yy.parser)this.yy.parser.parseError(d,g);else throw new Error(d)},"parseError"),setInput:m(function(h,d){return this.yy=d||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:m(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var d=h.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),h},"input"),unput:m(function(h){var d=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var l=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 _=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===l.length?this.yylloc.first_column:0)+l[l.length-g.length].length-g[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(h){this.unput(this.match.slice(h))},"less"),pastInput:m(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var h=this.pastInput(),d=new Array(h.length+1).join("-");return h+this.upcomingInput()+` +`+d+"^"},"showPosition"),test_match:m(function(h,d){var g,l,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),l=h[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[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 t in _)this[t]=_[t];return!1}return!1},"test_match"),next:m(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,d,g,l;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),t=0;t<_.length;t++)if(g=this._input.match(this.rules[_[t]]),g&&(!d||g[0].length>d[0].length)){if(d=g,l=t,this.options.backtrack_lexer){if(h=this.test_match(g,_[t]),h!==!1)return h;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(h=this.test_match(d,_[l]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:m(function(){var d=this.next();return d||this.lex()},"lex"),begin:m(function(d){this.conditionStack.push(d)},"begin"),popState:m(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:m(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:m(function(d){this.begin(d)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:m(function(d,g,l,_){switch(l){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),g.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const t=/\n\s*/g;return g.yytext=g.yytext.replace(t,"
"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return d.lex.firstGraph()&&this.begin("dir"),12;case 36:return d.lex.firstGraph()&&this.begin("dir"),12;case 37:return d.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:return 111;case 63:return 46;case 64:return 60;case 65:return 44;case 66:return 8;case 67:return 106;case 68:return 115;case 69:return this.popState(),77;case 70:return this.pushState("edgeText"),75;case 71:return 119;case 72:return this.popState(),77;case 73:return this.pushState("thickEdgeText"),75;case 74:return 119;case 75:return this.popState(),77;case 76:return this.pushState("dottedEdgeText"),75;case 77:return 119;case 78:return 77;case 79:return this.popState(),53;case 80:return"TEXT";case 81:return this.pushState("ellipseText"),52;case 82:return this.popState(),55;case 83:return this.pushState("text"),54;case 84:return this.popState(),57;case 85:return this.pushState("text"),56;case 86:return 58;case 87:return this.pushState("text"),67;case 88:return this.popState(),64;case 89:return this.pushState("text"),63;case 90:return this.popState(),49;case 91:return this.pushState("text"),48;case 92:return this.popState(),69;case 93:return this.popState(),71;case 94:return 117;case 95:return this.pushState("trapText"),68;case 96:return this.pushState("trapText"),70;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 102:return 115;case 103:return 111;case 104:return 44;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;case 109:return this.pushState("text"),62;case 110:return this.popState(),51;case 111:return this.pushState("text"),50;case 112:return this.popState(),31;case 113:return this.pushState("text"),29;case 114:return this.popState(),66;case 115:return this.pushState("text"),65;case 116:return"TEXT";case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}};return f1}();J1.lexer=Wt;function q1(){this.yy={}}return m(q1,"Parser"),q1.prototype=J1,J1.Parser=q1,new q1}();at.parser=at;var Ut=at,zt=Object.assign({},Ut);zt.parse=s=>{const i=s.replace(/}\s*\n/g,`} +`);return Ut.parse(i)};var Te=zt,Ce=m((s,i)=>{const n=fe,a=n(s,"r"),u=n(s,"g"),o=n(s,"b");return ce(a,u,o,i)},"fade"),De=m(s=>`.label { + font-family: ${s.fontFamily}; + color: ${s.nodeTextColor||s.textColor}; + } + .cluster-label text { + fill: ${s.titleColor}; + } + .cluster-label span { + color: ${s.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${s.nodeTextColor||s.textColor}; + color: ${s.nodeTextColor||s.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${s.mainBkg}; + stroke: ${s.nodeBorder}; + stroke-width: ${s.strokeWidth??1}px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${s.lineColor} !important; + stroke-width: 0; + stroke: ${s.lineColor}; + } + + .arrowheadPath { + fill: ${s.arrowheadColor}; + } + + .edgePath .path { + stroke: ${s.lineColor}; + stroke-width: ${s.strokeWidth??2}px; + } + + .flowchart-link { + stroke: ${s.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${s.edgeLabelBackground}; + p { + background-color: ${s.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${s.edgeLabelBackground}; + fill: ${s.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${Ce(s.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${s.clusterBkg}; + stroke: ${s.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${s.titleColor}; + } + + .cluster span { + color: ${s.titleColor}; + } + /* .cluster div { + color: ${s.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${s.fontFamily}; + font-size: 12px; + background: ${s.tertiaryColor}; + border: 1px solid ${s.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${s.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${s.edgeLabelBackground}; + p { + background-color: ${s.edgeLabelBackground}; + padding: 2px; + } + .label rect { + opacity: 0.5; + background-color: ${s.edgeLabelBackground}; + fill: ${s.edgeLabelBackground}; + } + text-align: center; + } + ${Ht()} +`,"getStyles"),Se=De,Le={parser:Te,get db(){return new be},renderer:me,styles:Se,init:m(s=>{s.flowchart||(s.flowchart={}),s.layout&&Mt({layout:s.layout}),s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,Mt({flowchart:{arrowMarkerAbsolute:s.arrowMarkerAbsolute}})},"init")};export{Le as diagram}; diff --git a/dist/assets/ganttDiagram-6RSMTGT7-CskD-f5L.js b/dist/assets/ganttDiagram-6RSMTGT7-CskD-f5L.js new file mode 100644 index 0000000..d96a0ea --- /dev/null +++ b/dist/assets/ganttDiagram-6RSMTGT7-CskD-f5L.js @@ -0,0 +1,292 @@ +import{bg as on,bh as $n,bi as cn,bj as un,bk as ln,bl as ue,bm as On,b4 as oe,g as Hn,s as Nn,q as Pn,p as Rn,a as Vn,b as zn,_ as d,c as Ft,d as Bt,e as qn,bn as rt,l as Tt,k as Zn,j as Bn,z as Xn,u as Gn}from"./index-mLPbTfpz.js";import{b as jn,t as Ne,c as Qn,a as Jn,l as Kn}from"./linear-CvhoBmDn.js";import{i as tr}from"./init-Gi6I4Gst.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";import"./defaultLocale-DX6XiGOO.js";function er(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 nr(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 rr(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function ir(t){return"translate("+t+",0)"}function sr(t){return"translate(0,"+t+")"}function ar(t){return e=>+t(e)}function or(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function cr(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,a=6,c=6,m=3,Y=typeof window<"u"&&window.devicePixelRatio>1?0:.5,C=t===Gt||t===Xt?-1:1,k=t===Xt||t===le?"x":"y",L=t===Gt||t===xe?ir:sr;function _(S){var Z=r??(e.ticks?e.ticks.apply(e,n):e.domain()),A=i??(e.tickFormat?e.tickFormat.apply(e,n):rr),U=Math.max(a,0)+m,I=e.range(),N=+I[0]+Y,W=+I[I.length-1]+Y,q=(e.bandwidth?or:ar)(e.copy(),Y),j=S.selection?S.selection():S,p=j.selectAll(".domain").data([null]),g=j.selectAll(".tick").data(Z,e).order(),y=g.exit(),h=g.enter().append("g").attr("class","tick"),D=g.select("line"),w=g.select("text");p=p.merge(p.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),g=g.merge(h),D=D.merge(h.append("line").attr("stroke","currentColor").attr(k+"2",C*a)),w=w.merge(h.append("text").attr("fill","currentColor").attr(k,C*U).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),S!==j&&(p=p.transition(S),g=g.transition(S),D=D.transition(S),w=w.transition(S),y=y.transition(S).attr("opacity",Pe).attr("transform",function(T){return isFinite(T=q(T))?L(T+Y):this.getAttribute("transform")}),h.attr("opacity",Pe).attr("transform",function(T){var v=this.parentNode.__axis;return L((v&&isFinite(v=v(T))?v:q(T))+Y)})),y.remove(),p.attr("d",t===Xt||t===le?c?"M"+C*c+","+N+"H"+Y+"V"+W+"H"+C*c:"M"+Y+","+N+"V"+W:c?"M"+N+","+C*c+"V"+Y+"H"+W+"V"+C*c:"M"+N+","+Y+"H"+W),g.attr("opacity",1).attr("transform",function(T){return L(q(T)+Y)}),D.attr(k+"2",C*a),w.attr(k,C*U).text(A),j.filter(cr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),j.each(function(){this.__axis=q})}return _.scale=function(S){return arguments.length?(e=S,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(S){return arguments.length?(n=S==null?[]:Array.from(S),_):n.slice()},_.tickValues=function(S){return arguments.length?(r=S==null?null:Array.from(S),_):r&&r.slice()},_.tickFormat=function(S){return arguments.length?(i=S,_):i},_.tickSize=function(S){return arguments.length?(a=c=+S,_):a},_.tickSizeInner=function(S){return arguments.length?(a=+S,_):a},_.tickSizeOuter=function(S){return arguments.length?(c=+S,_):c},_.tickPadding=function(S){return arguments.length?(m=+S,_):m},_.offset=function(S){return arguments.length?(Y=+S,_):Y},_}function ur(t){return fn(Gt,t)}function lr(t){return fn(xe,t)}const fr=Math.PI/180,dr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Yt=6/29,yn=3*Yt*Yt,hr=Yt*Yt*Yt;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=$n(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),a,c;return e===n&&n===r?a=c=i:(a=fe((.4360747*e+.3850649*n+.1430804*r)/dn),c=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(a-i),200*(i-c),t.opacity)}function mr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,mr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(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=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>hr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Yt?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function gr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(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 c=i(a),m=i.ceil(a);return a-c(e(a=new Date(+a),c==null?1:Math.floor(c)),a),i.range=(a,c,m)=>{const Y=[];if(a=i.ceil(a),m=m==null?1:Math.floor(m),!(a0))return Y;let C;do Y.push(C=new Date(+a)),e(a,m),t(a);while(Cet(c=>{if(c>=c)for(;t(c),!a(c);)c.setTime(c-1)},(c,m)=>{if(c>=c)if(m<0)for(;++m<=0;)for(;e(c,-1),!a(c););else for(;--m>=0;)for(;e(c,1),!a(c););}),n&&(i.count=(a,c)=>(ge.setTime(+a),ye.setTime(+c),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?c=>r(c)%a===0:c=>i.count(0,c)%a===0):i)),i}const Et=et(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?et(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Re=yt*30,ke=yt*365,vt=et(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Ot=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Ot.range;const vr=et(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());vr.range;const Ht=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Ht.range;const Tr=et(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());Tr.range;const xt=et(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const xr=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));xr.range;function Dt(t){return et(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())*ct)/Se)}const Rt=Dt(0),Nt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);Rt.range;Nt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return et(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)/Se)}const wn=Mt(0),re=Mt(1),br=Mt(2),wr=Mt(3),It=Mt(4),Dr=Mt(5),Mr=Mt(6);wn.range;re.range;br.range;wr.range;It.range;Dr.range;Mr.range;const Pt=et(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());Pt.range;const Cr=et(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());Cr.range;const kt=et(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());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(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)});kt.range;const wt=et(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());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(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)});wt.range;function Sr(t,e,n,r,i,a){const c=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[a,1,ct],[a,5,5*ct],[a,15,15*ct],[a,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Re],[e,3,3*Re],[t,1,ke]];function m(C,k,L){const _=kU).right(c,_);if(S===c.length)return t.every(Ne(C/ke,k/ke,L));if(S===0)return Et.every(Math.max(Ne(C,k,L),1));const[Z,A]=c[_/c[S-1][2]53)return null;"w"in l||(l.w=1),"Z"in l?($=ve(At(l.y,0,1)),Q=$.getUTCDay(),$=Q>4||Q===0?re.ceil($):re($),$=_e.offset($,(l.V-1)*7),l.y=$.getUTCFullYear(),l.m=$.getUTCMonth(),l.d=$.getUTCDate()+(l.w+6)%7):($=pe(At(l.y,0,1)),Q=$.getDay(),$=Q>4||Q===0?Nt.ceil($):Nt($),$=xt.offset($,(l.V-1)*7),l.y=$.getFullYear(),l.m=$.getMonth(),l.d=$.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?ve(At(l.y,0,1)).getUTCDay():pe(At(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,ve(l)):pe(l)}}function y(M,H,R,l){for(var J=0,$=H.length,Q=R.length,G,it;J<$;){if(l>=Q)return-1;if(G=H.charCodeAt(J++),G===37){if(G=H.charAt(J++),it=j[G in Ve?H.charAt(J++):G],!it||(l=it(M,R,l))<0)return-1}else if(G!=R.charCodeAt(l++))return-1}return l}function h(M,H,R){var l=C.exec(H.slice(R));return l?(M.p=k.get(l[0].toLowerCase()),R+l[0].length):-1}function D(M,H,R){var l=S.exec(H.slice(R));return l?(M.w=Z.get(l[0].toLowerCase()),R+l[0].length):-1}function w(M,H,R){var l=L.exec(H.slice(R));return l?(M.w=_.get(l[0].toLowerCase()),R+l[0].length):-1}function T(M,H,R){var l=I.exec(H.slice(R));return l?(M.m=N.get(l[0].toLowerCase()),R+l[0].length):-1}function v(M,H,R){var l=A.exec(H.slice(R));return l?(M.m=U.get(l[0].toLowerCase()),R+l[0].length):-1}function u(M,H,R){return y(M,e,H,R)}function f(M,H,R){return y(M,n,H,R)}function x(M,H,R){return y(M,r,H,R)}function b(M){return c[M.getDay()]}function F(M){return a[M.getDay()]}function o(M){return Y[M.getMonth()]}function X(M){return m[M.getMonth()]}function s(M){return i[+(M.getHours()>=12)]}function E(M){return 1+~~(M.getMonth()/3)}function z(M){return c[M.getUTCDay()]}function V(M){return a[M.getUTCDay()]}function P(M){return Y[M.getUTCMonth()]}function K(M){return m[M.getUTCMonth()]}function O(M){return i[+(M.getUTCHours()>=12)]}function st(M){return 1+~~(M.getUTCMonth()/3)}return{format:function(M){var H=p(M+="",W);return H.toString=function(){return M},H},parse:function(M){var H=g(M+="",!1);return H.toString=function(){return M},H},utcFormat:function(M){var H=p(M+="",q);return H.toString=function(){return M},H},utcParse:function(M){var H=g(M+="",!0);return H.toString=function(){return M},H}}}var Ve={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,Ur=/^%/,Er=/[\\^$*+?|[\]().{}]/g;function B(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a[e.toLowerCase(),n]))}function Lr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Hr(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 Nr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Pr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ze(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Be(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Br(t,e,n){var r=Ur.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Xr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Gr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return B(t.getDate(),e,2)}function jr(t,e){return B(t.getHours(),e,2)}function Qr(t,e){return B(t.getHours()%12||12,e,2)}function Jr(t,e){return B(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return B(t.getMilliseconds(),e,3)}function Kr(t,e){return Dn(t,e)+"000"}function ti(t,e){return B(t.getMonth()+1,e,2)}function ei(t,e){return B(t.getMinutes(),e,2)}function ni(t,e){return B(t.getSeconds(),e,2)}function ri(t){var e=t.getDay();return e===0?7:e}function ii(t,e){return B(Rt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function si(t,e){return t=Mn(t),B(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function ai(t){return t.getDay()}function oi(t,e){return B(Nt.count(kt(t)-1,t),e,2)}function ci(t,e){return B(t.getFullYear()%100,e,2)}function ui(t,e){return t=Mn(t),B(t.getFullYear()%100,e,2)}function li(t,e){return B(t.getFullYear()%1e4,e,4)}function fi(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),B(t.getFullYear()%1e4,e,4)}function di(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+B(e/60|0,"0",2)+B(e%60,"0",2)}function Ge(t,e){return B(t.getUTCDate(),e,2)}function hi(t,e){return B(t.getUTCHours(),e,2)}function mi(t,e){return B(t.getUTCHours()%12||12,e,2)}function gi(t,e){return B(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return B(t.getUTCMilliseconds(),e,3)}function yi(t,e){return Cn(t,e)+"000"}function ki(t,e){return B(t.getUTCMonth()+1,e,2)}function pi(t,e){return B(t.getUTCMinutes(),e,2)}function vi(t,e){return B(t.getUTCSeconds(),e,2)}function Ti(t){var e=t.getUTCDay();return e===0?7:e}function xi(t,e){return B(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function bi(t,e){return t=Sn(t),B(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function wi(t){return t.getUTCDay()}function Di(t,e){return B(re.count(wt(t)-1,t),e,2)}function Mi(t,e){return B(t.getUTCFullYear()%100,e,2)}function Ci(t,e){return t=Sn(t),B(t.getUTCFullYear()%100,e,2)}function Si(t,e){return B(t.getUTCFullYear()%1e4,e,4)}function _i(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),B(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Yi({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 Yi(t){return St=Yr(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ui(t){return new Date(t)}function Ei(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,a,c,m,Y,C){var k=Qn(),L=k.invert,_=k.domain,S=C(".%L"),Z=C(":%S"),A=C("%I:%M"),U=C("%I %p"),I=C("%a %d"),N=C("%b %d"),W=C("%B"),q=C("%Y");function j(p){return(Y(p)4&&(S+=7),_.add(S,n));return Z.diff(A,"week")+1},m.isoWeekday=function(C){return this.$utils().u(C)?this.day()||7:this.day(this.day()%7?C:C-7)};var Y=m.startOf;m.startOf=function(C,k){var L=this.$utils(),_=!!L.u(k)||k;return L.p(C)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):Y.bind(this)(C,k)}}})}(jt)),jt.exports}var Wi=Ai();const $i=oe(Wi);var Qt={exports:{}},Oi=Qt.exports,tn;function Hi(){return tn||(tn=1,function(t,e){(function(n,r){t.exports=r()})(Oi,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,a=/\d\d/,c=/\d\d?/,m=/\d*[^-_:/,()\s\d]+/,Y={},C=function(U){return(U=+U)+(U>68?1900:2e3)},k=function(U){return function(I){this[U]=+I}},L=[/[+-]\d\d:?(\d\d)?|Z/,function(U){(this.zone||(this.zone={})).offset=function(I){if(!I||I==="Z")return 0;var N=I.match(/([+-]|\d\d)/g),W=60*N[1]+(+N[2]||0);return W===0?0:N[0]==="+"?-W:W}(U)}],_=function(U){var I=Y[U];return I&&(I.indexOf?I:I.s.concat(I.f))},S=function(U,I){var N,W=Y.meridiem;if(W){for(var q=1;q<=24;q+=1)if(U.indexOf(W(q,0,I))>-1){N=q>12;break}}else N=U===(I?"pm":"PM");return N},Z={A:[m,function(U){this.afternoon=S(U,!1)}],a:[m,function(U){this.afternoon=S(U,!0)}],Q:[i,function(U){this.month=3*(U-1)+1}],S:[i,function(U){this.milliseconds=100*+U}],SS:[a,function(U){this.milliseconds=10*+U}],SSS:[/\d{3}/,function(U){this.milliseconds=+U}],s:[c,k("seconds")],ss:[c,k("seconds")],m:[c,k("minutes")],mm:[c,k("minutes")],H:[c,k("hours")],h:[c,k("hours")],HH:[c,k("hours")],hh:[c,k("hours")],D:[c,k("day")],DD:[a,k("day")],Do:[m,function(U){var I=Y.ordinal,N=U.match(/\d+/);if(this.day=N[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===U&&(this.day=W)}],w:[c,k("week")],ww:[a,k("week")],M:[c,k("month")],MM:[a,k("month")],MMM:[m,function(U){var I=_("months"),N=(_("monthsShort")||I.map(function(W){return W.slice(0,3)})).indexOf(U)+1;if(N<1)throw new Error;this.month=N%12||N}],MMMM:[m,function(U){var I=_("months").indexOf(U)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,k("year")],YY:[a,function(U){this.year=C(U)}],YYYY:[/\d{4}/,k("year")],Z:L,ZZ:L};function A(U){var I,N;I=U,N=Y&&Y.formats;for(var W=(U=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(D,w,T){var v=T&&T.toUpperCase();return w||N[T]||n[T]||N[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(u,f,x){return f||x.slice(1)})})).match(r),q=W.length,j=0;j-1)return new Date((F==="X"?1e3:1)*b);var s=A(F)(b),E=s.year,z=s.month,V=s.day,P=s.hours,K=s.minutes,O=s.seconds,st=s.milliseconds,M=s.zone,H=s.week,R=new Date,l=V||(E||z?1:R.getDate()),J=E||R.getFullYear(),$=0;E&&!z||($=z>0?z-1:R.getMonth());var Q,G=P||0,it=K||0,at=O||0,pt=st||0;return M?new Date(Date.UTC(J,$,l,G,it,at,pt+60*M.offset*1e3)):o?new Date(Date.UTC(J,$,l,G,it,at,pt)):(Q=new Date(J,$,l,G,it,at,pt),H&&(Q=X(Q).week(H).toDate()),Q)}catch{return new Date("")}}(p,h,g,N),this.init(),v&&v!==!0&&(this.$L=this.locale(v).$L),T&&p!=this.format(h)&&(this.$d=new Date("")),Y={}}else if(h instanceof Array)for(var u=h.length,f=1;f<=u;f+=1){y[1]=h[f-1];var x=N.apply(this,y);if(x.isValid()){this.$d=x.$d,this.$L=x.$L,this.init();break}f===u&&(this.$d=new Date(""))}else q.call(this,j)}}})}(Qt)),Qt.exports}var Ni=Hi();const Pi=oe(Ni);var Jt={exports:{}},Ri=Jt.exports,en;function Vi(){return en||(en=1,function(t,e){(function(n,r){t.exports=r()})(Ri,function(){return function(n,r){var i=r.prototype,a=i.format;i.format=function(c){var m=this,Y=this.$locale();if(!this.isValid())return a.bind(this)(c);var C=this.$utils(),k=(c||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(L){switch(L){case"Q":return Math.ceil((m.$M+1)/3);case"Do":return Y.ordinal(m.$D);case"gggg":return m.weekYear();case"GGGG":return m.isoWeekYear();case"wo":return Y.ordinal(m.week(),"W");case"w":case"ww":return C.s(m.week(),L==="w"?1:2,"0");case"W":case"WW":return C.s(m.isoWeek(),L==="W"?1:2,"0");case"k":case"kk":return C.s(String(m.$H===0?24:m.$H),L==="k"?1:2,"0");case"X":return Math.floor(m.$d.getTime()/1e3);case"x":return m.$d.getTime();case"z":return"["+m.offsetName()+"]";case"zzz":return"["+m.offsetName("long")+"]";default:return L}});return a.bind(this)(k)}}})}(Jt)),Jt.exports}var zi=Vi();const qi=oe(zi);var Kt={exports:{}},Zi=Kt.exports,nn;function Bi(){return nn||(nn=1,function(t,e){(function(n,r){t.exports=r()})(Zi,function(){var n,r,i=1e3,a=6e4,c=36e5,m=864e5,Y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C=31536e6,k=2628e6,L=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,_={years:C,months:k,days:m,hours:c,minutes:a,seconds:i,milliseconds:1,weeks:6048e5},S=function(p){return p instanceof q},Z=function(p,g,y){return new q(p,y,g.$l)},A=function(p){return r.p(p)+"s"},U=function(p){return p<0},I=function(p){return U(p)?Math.ceil(p):Math.floor(p)},N=function(p){return Math.abs(p)},W=function(p,g){return p?U(p)?{negative:!0,format:""+N(p)+g}:{negative:!1,format:""+p+g}:{negative:!1,format:""}},q=function(){function p(y,h,D){var w=this;if(this.$d={},this.$l=D,y===void 0&&(this.$ms=0,this.parseFromMilliseconds()),h)return Z(y*_[A(h)],this);if(typeof y=="number")return this.$ms=y,this.parseFromMilliseconds(),this;if(typeof y=="object")return Object.keys(y).forEach(function(u){w.$d[A(u)]=y[u]}),this.calMilliseconds(),this;if(typeof y=="string"){var T=y.match(L);if(T){var v=T.slice(2).map(function(u){return u!=null?Number(u):0});return this.$d.years=v[0],this.$d.months=v[1],this.$d.weeks=v[2],this.$d.days=v[3],this.$d.hours=v[4],this.$d.minutes=v[5],this.$d.seconds=v[6],this.calMilliseconds(),this}}return this}var g=p.prototype;return g.calMilliseconds=function(){var y=this;this.$ms=Object.keys(this.$d).reduce(function(h,D){return h+(y.$d[D]||0)*_[D]},0)},g.parseFromMilliseconds=function(){var y=this.$ms;this.$d.years=I(y/C),y%=C,this.$d.months=I(y/k),y%=k,this.$d.days=I(y/m),y%=m,this.$d.hours=I(y/c),y%=c,this.$d.minutes=I(y/a),y%=a,this.$d.seconds=I(y/i),y%=i,this.$d.milliseconds=y},g.toISOString=function(){var y=W(this.$d.years,"Y"),h=W(this.$d.months,"M"),D=+this.$d.days||0;this.$d.weeks&&(D+=7*this.$d.weeks);var w=W(D,"D"),T=W(this.$d.hours,"H"),v=W(this.$d.minutes,"M"),u=this.$d.seconds||0;this.$d.milliseconds&&(u+=this.$d.milliseconds/1e3,u=Math.round(1e3*u)/1e3);var f=W(u,"S"),x=y.negative||h.negative||w.negative||T.negative||v.negative||f.negative,b=T.format||v.format||f.format?"T":"",F=(x?"-":"")+"P"+y.format+h.format+w.format+b+T.format+v.format+f.format;return F==="P"||F==="-P"?"P0D":F},g.toJSON=function(){return this.toISOString()},g.format=function(y){var h=y||"YYYY-MM-DDTHH:mm:ss",D={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return h.replace(Y,function(w,T){return T||String(D[w])})},g.as=function(y){return this.$ms/_[A(y)]},g.get=function(y){var h=this.$ms,D=A(y);return D==="milliseconds"?h%=1e3:h=D==="weeks"?I(h/_[D]):this.$d[D],h||0},g.add=function(y,h,D){var w;return w=h?y*_[A(h)]:S(y)?y.$ms:Z(y,this).$ms,Z(this.$ms+w*(D?-1:1),this)},g.subtract=function(y,h){return this.add(y,h,!0)},g.locale=function(y){var h=this.clone();return h.$l=y,h},g.clone=function(){return Z(this.$ms,this)},g.humanize=function(y){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!y)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},p}(),j=function(p,g,y){return p.add(g.years()*y,"y").add(g.months()*y,"M").add(g.days()*y,"d").add(g.hours()*y,"h").add(g.minutes()*y,"m").add(g.seconds()*y,"s").add(g.milliseconds()*y,"ms")};return function(p,g,y){n=y,r=y().$utils(),y.duration=function(w,T){var v=y.locale();return Z(w,{$l:v},T)},y.isDuration=S;var h=g.prototype.add,D=g.prototype.subtract;g.prototype.add=function(w,T){return S(w)?j(this,w,1):h.bind(this)(w,T)},g.prototype.subtract=function(w,T){return S(w)?j(this,w,-1):D.bind(this)(w,T)}}})}(Kt)),Kt.exports}var Xi=Bi();const Gi=oe(Xi);var we=function(){var t=d(function(v,u,f,x){for(f=f||{},x=v.length;x--;f[v[x]]=u);return f},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],c=[1,30],m=[1,31],Y=[1,32],C=[1,33],k=[1,34],L=[1,9],_=[1,10],S=[1,11],Z=[1,12],A=[1,13],U=[1,14],I=[1,15],N=[1,16],W=[1,19],q=[1,20],j=[1,21],p=[1,22],g=[1,23],y=[1,25],h=[1,35],D={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(u,f,x,b,F,o,X){var s=o.length-1;switch(F){case 1:return o[s-1];case 2:this.$=[];break;case 3:o[s-1].push(o[s]),this.$=o[s-1];break;case 4:case 5:this.$=o[s];break;case 6:case 7:this.$=[];break;case 8:b.setWeekday("monday");break;case 9:b.setWeekday("tuesday");break;case 10:b.setWeekday("wednesday");break;case 11:b.setWeekday("thursday");break;case 12:b.setWeekday("friday");break;case 13:b.setWeekday("saturday");break;case 14:b.setWeekday("sunday");break;case 15:b.setWeekend("friday");break;case 16:b.setWeekend("saturday");break;case 17:b.setDateFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 18:b.enableInclusiveEndDates(),this.$=o[s].substr(18);break;case 19:b.TopAxis(),this.$=o[s].substr(8);break;case 20:b.setAxisFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 21:b.setTickInterval(o[s].substr(13)),this.$=o[s].substr(13);break;case 22:b.setExcludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 23:b.setIncludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 24:b.setTodayMarker(o[s].substr(12)),this.$=o[s].substr(12);break;case 27:b.setDiagramTitle(o[s].substr(6)),this.$=o[s].substr(6);break;case 28:this.$=o[s].trim(),b.setAccTitle(this.$);break;case 29:case 30:this.$=o[s].trim(),b.setAccDescription(this.$);break;case 31:b.addSection(o[s].substr(8)),this.$=o[s].substr(8);break;case 33:b.addTask(o[s-1],o[s]),this.$="task";break;case 34:this.$=o[s-1],b.setClickEvent(o[s-1],o[s],null);break;case 35:this.$=o[s-2],b.setClickEvent(o[s-2],o[s-1],o[s]);break;case 36:this.$=o[s-2],b.setClickEvent(o[s-2],o[s-1],null),b.setLink(o[s-2],o[s]);break;case 37:this.$=o[s-3],b.setClickEvent(o[s-3],o[s-2],o[s-1]),b.setLink(o[s-3],o[s]);break;case 38:this.$=o[s-2],b.setClickEvent(o[s-2],o[s],null),b.setLink(o[s-2],o[s-1]);break;case 39:this.$=o[s-3],b.setClickEvent(o[s-3],o[s-1],o[s]),b.setLink(o[s-3],o[s-2]);break;case 40:this.$=o[s-1],b.setLink(o[s-1],o[s]);break;case 41:case 47:this.$=o[s-1]+" "+o[s];break;case 42:case 43:case 45:this.$=o[s-2]+" "+o[s-1]+" "+o[s];break;case 44:case 46:this.$=o[s-3]+" "+o[s-2]+" "+o[s-1]+" "+o[s];break}},"anonymous"),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:c,17:m,18:Y,19:18,20:C,21:k,22:L,23:_,24:S,25:Z,26:A,27:U,28:I,29:N,30:W,31:q,33:j,35:p,36:g,37:24,38:y,40:h},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:c,17:m,18:Y,19:18,20:C,21:k,22:L,23:_,24:S,25:Z,26:A,27:U,28:I,29:N,30:W,31:q,33:j,35:p,36:g,37:24,38:y,40:h},t(e,[2,5]),t(e,[2,6]),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]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},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]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(u,f){if(f.recoverable)this.trace(u);else{var x=new Error(u);throw x.hash=f,x}},"parseError"),parse:d(function(u){var f=this,x=[0],b=[],F=[null],o=[],X=this.table,s="",E=0,z=0,V=2,P=1,K=o.slice.call(arguments,1),O=Object.create(this.lexer),st={yy:{}};for(var M in this.yy)Object.prototype.hasOwnProperty.call(this.yy,M)&&(st.yy[M]=this.yy[M]);O.setInput(u,st.yy),st.yy.lexer=O,st.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var H=O.yylloc;o.push(H);var R=O.options&&O.options.ranges;typeof st.yy.parseError=="function"?this.parseError=st.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function l(ot){x.length=x.length-2*ot,F.length=F.length-ot,o.length=o.length-ot}d(l,"popStack");function J(){var ot;return ot=b.pop()||O.lex()||P,typeof ot!="number"&&(ot instanceof Array&&(b=ot,ot=b.pop()),ot=f.symbols_[ot]||ot),ot}d(J,"lex");for(var $,Q,G,it,at={},pt,ut,He,Zt;;){if(Q=x[x.length-1],this.defaultActions[Q]?G=this.defaultActions[Q]:(($===null||typeof $>"u")&&($=J()),G=X[Q]&&X[Q][$]),typeof G>"u"||!G.length||!G[0]){var ce="";Zt=[];for(pt in X[Q])this.terminals_[pt]&&pt>V&&Zt.push("'"+this.terminals_[pt]+"'");O.showPosition?ce="Parse error on line "+(E+1)+`: +`+O.showPosition()+` +Expecting `+Zt.join(", ")+", got '"+(this.terminals_[$]||$)+"'":ce="Parse error on line "+(E+1)+": Unexpected "+($==P?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(ce,{text:O.match,token:this.terminals_[$]||$,line:O.yylineno,loc:H,expected:Zt})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+$);switch(G[0]){case 1:x.push($),F.push(O.yytext),o.push(O.yylloc),x.push(G[1]),$=null,z=O.yyleng,s=O.yytext,E=O.yylineno,H=O.yylloc;break;case 2:if(ut=this.productions_[G[1]][1],at.$=F[F.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},R&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),it=this.performAction.apply(at,[s,z,E,st.yy,G[1],F,o].concat(K)),typeof it<"u")return it;ut&&(x=x.slice(0,-1*ut*2),F=F.slice(0,-1*ut),o=o.slice(0,-1*ut)),x.push(this.productions_[G[1]][0]),F.push(at.$),o.push(at._$),He=X[x[x.length-2]][x[x.length-1]],x.push(He);break;case 3:return!0}}return!0},"parse")},w=function(){var v={EOF:1,parseError:d(function(f,x){if(this.yy.parser)this.yy.parser.parseError(f,x);else throw new Error(f)},"parseError"),setInput:d(function(u,f){return this.yy=f||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var f=u.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),u},"input"),unput:d(function(u){var f=u.length,x=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var b=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),x.length-1&&(this.yylineno-=x.length-1);var F=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:x?(x.length===b.length?this.yylloc.first_column:0)+b[b.length-x.length].length-x[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(u){this.unput(this.match.slice(u))},"less"),pastInput:d(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var u=this.pastInput(),f=new Array(u.length+1).join("-");return u+this.upcomingInput()+` +`+f+"^"},"showPosition"),test_match:d(function(u,f){var x,b,F;if(this.options.backtrack_lexer&&(F={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&&(F.yylloc.range=this.yylloc.range.slice(0))),b=u[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,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(u[0].length),this.matched+=u[0],x=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var o in F)this[o]=F[o];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,f,x,b;this._more||(this.yytext="",this.match="");for(var F=this._currentRules(),o=0;of[0].length)){if(f=x,b=o,this.options.backtrack_lexer){if(u=this.test_match(x,F[o]),u!==!1)return u;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(u=this.test_match(f,F[b]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var f=this.next();return f||this.lex()},"lex"),begin:d(function(f){this.conditionStack.push(f)},"begin"),popState:d(function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},"topState"),pushState:d(function(f){this.begin(f)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(f,x,b,F){switch(b){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return v}();D.lexer=w;function T(){this.yy={}}return d(T,"Parser"),T.prototype=D,D.Parser=T,new T}();we.parser=we;var ji=we;rt.extend($i);rt.extend(Pi);rt.extend(qi);var rn={friday:5,saturday:6},lt="",Fe="",Ye=void 0,Ue="",Vt=[],zt=[],Ee=new Map,Ie=[],se=[],Lt="",Le="",Fn=["active","done","crit","milestone","vert"],Ae=[],_t="",qt=!1,We=!1,$e="sunday",ae="saturday",De=0,Qi=d(function(){Ie=[],se=[],Lt="",Ae=[],te=0,Ce=void 0,ee=void 0,tt=[],lt="",Fe="",Le="",Ye=void 0,Ue="",Vt=[],zt=[],qt=!1,We=!1,De=0,Ee=new Map,_t="",Xn(),$e="sunday",ae="saturday"},"clear"),Ji=d(function(t){_t=t},"setDiagramId"),Ki=d(function(t){Fe=t},"setAxisFormat"),ts=d(function(){return Fe},"getAxisFormat"),es=d(function(t){Ye=t},"setTickInterval"),ns=d(function(){return Ye},"getTickInterval"),rs=d(function(t){Ue=t},"setTodayMarker"),is=d(function(){return Ue},"getTodayMarker"),ss=d(function(t){lt=t},"setDateFormat"),as=d(function(){qt=!0},"enableInclusiveEndDates"),os=d(function(){return qt},"endDatesAreInclusive"),cs=d(function(){We=!0},"enableTopAxis"),us=d(function(){return We},"topAxisEnabled"),ls=d(function(t){Le=t},"setDisplayMode"),fs=d(function(){return Le},"getDisplayMode"),ds=d(function(){return lt},"getDateFormat"),hs=d(function(t){Vt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),ms=d(function(){return Vt},"getIncludes"),gs=d(function(t){zt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),ys=d(function(){return zt},"getExcludes"),ks=d(function(){return Ee},"getLinks"),ps=d(function(t){Lt=t,Ie.push(t)},"addSection"),vs=d(function(){return Ie},"getSections"),Ts=d(function(){let t=sn();const e=10;let n=0;for(;!t&&nm))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");t=t.add(1,"d")}return[e,c]},"fixTaskDates"),Me=d(function(t,e,n){if(n=n.trim(),d(m=>{const Y=m.trim();return Y==="x"||Y==="X"},"isTimestampFormat")(e)&&/^\d+$/.test(n))return new Date(Number(n));const a=/^after\s+(?[\d\w- ]+)/.exec(n);if(a!==null){let m=null;for(const C of a.groups.ids.split(" ")){let k=Ct(C);k!==void 0&&(!m||k.endTime>m.endTime)&&(m=k)}if(m)return m.endTime;const Y=new Date;return Y.setHours(0,0,0,0),Y}let c=rt(n,e.trim(),!0);if(c.isValid())return c.toDate();{Tt.debug("Invalid date:"+n),Tt.debug("With date format:"+e.trim());const m=new Date(n);if(m===void 0||isNaN(m.getTime())||m.getFullYear()<-1e4||m.getFullYear()>1e4)throw new Error("Invalid date:"+n);return m}},"getStartDate"),En=d(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),In=d(function(t,e,n,r=!1){n=n.trim();const a=/^until\s+(?[\d\w- ]+)/.exec(n);if(a!==null){let k=null;for(const _ of a.groups.ids.split(" ")){let S=Ct(_);S!==void 0&&(!k||S.startTime{window.open(n,"_self")}),Ee.set(r,n))}),An(t,"clickable")},"setLink"),An=d(function(t,e){t.split(",").forEach(function(n){let r=Ct(n);r!==void 0&&r.classes.push(e)})},"setClass"),Ys=d(function(t,e,n){if(Ft().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{Gn.runFunc(e,...r)})},"setClickFun"),Wn=d(function(t,e){Ae.push(function(){const n=_t?`${_t}-${t}`:t,r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){const n=_t?`${_t}-${t}`:t,r=document.querySelector(`[id="${n}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},"pushFun"),Us=d(function(t,e,n){t.split(",").forEach(function(r){Ys(r,e,n)}),An(t,"clickable")},"setClickEvent"),Es=d(function(t){Ae.forEach(function(e){e(t)})},"bindFunctions"),Is={getConfig:d(()=>Ft().gantt,"getConfig"),clear:Qi,setDateFormat:ss,getDateFormat:ds,enableInclusiveEndDates:as,endDatesAreInclusive:os,enableTopAxis:cs,topAxisEnabled:us,setAxisFormat:Ki,getAxisFormat:ts,setTickInterval:es,getTickInterval:ns,setTodayMarker:rs,getTodayMarker:is,setAccTitle:zn,getAccTitle:Vn,setDiagramTitle:Rn,getDiagramTitle:Pn,setDiagramId:Ji,setDisplayMode:ls,getDisplayMode:fs,setAccDescription:Nn,getAccDescription:Hn,addSection:ps,getSections:vs,getTasks:Ts,addTask:Ss,findTaskById:Ct,addTaskOrg:_s,setIncludes:hs,getIncludes:ms,setExcludes:gs,getExcludes:ys,setClickEvent:Us,setLink:Fs,getLinks:ks,bindFunctions:Es,parseDuration:En,isInvalidDate:Yn,setWeekday:xs,getWeekday:bs,setWeekend:ws};function Oe(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const a="^\\s*"+i+"\\s*$",c=new RegExp(a);t[0].match(c)&&(e[i]=!0,t.shift(1),r=!0)})}d(Oe,"getTaskTags");rt.extend(Gi);var Ls=d(function(){Tt.debug("Something is calling, setConf, remove the call")},"setConf"),an={monday:Nt,tuesday:vn,wednesday:Tn,thursday:bt,friday:xn,saturday:bn,sunday:Rt},As=d((t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((a,c)=>a.startTime-c.startTime||a.order-c.order),i=0;for(const a of r)for(let c=0;c=n[c]){n[c]=a.endTime,a.order=c+e,c>i&&(i=c);break}return i},"getMaxIntersections"),dt,Te=1e4,Ws=d(function(t,e,n,r){const i=Ft().gantt;r.db.setDiagramId(e);const a=Ft().securityLevel;let c;a==="sandbox"&&(c=Bt("#i"+e));const m=a==="sandbox"?Bt(c.nodes()[0].contentDocument.body):Bt("body"),Y=a==="sandbox"?c.nodes()[0].contentDocument:document,C=Y.getElementById(e);dt=C.parentElement.offsetWidth,dt===void 0&&(dt=1200),i.useWidth!==void 0&&(dt=i.useWidth);const k=r.db.getTasks();let L=[];for(const h of k)L.push(h.type);L=y(L);const _={};let S=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const h={};for(const w of k)h[w.section]===void 0?h[w.section]=[w]:h[w.section].push(w);let D=0;for(const w of Object.keys(h)){const T=As(h[w],D)+1;D+=T,S+=T*(i.barHeight+i.barGap),_[w]=T}}else{S+=k.length*(i.barHeight+i.barGap);for(const h of L)_[h]=k.filter(D=>D.type===h).length}C.setAttribute("viewBox","0 0 "+dt+" "+S);const Z=m.select(`[id="${e}"]`),A=Ii().domain([nr(k,function(h){return h.startTime}),er(k,function(h){return h.endTime})]).rangeRound([0,dt-i.leftPadding-i.rightPadding]);function U(h,D){const w=h.startTime,T=D.startTime;let v=0;return w>T?v=1:ws.vert===E.vert?0:s.vert?1:-1);const b=[...new Set(h.map(s=>s.order))].map(s=>h.find(E=>E.order===s));Z.append("g").selectAll("rect").data(b).enter().append("rect").attr("x",0).attr("y",function(s,E){return E=s.order,E*D+w-2}).attr("width",function(){return f-i.rightPadding/2}).attr("height",D).attr("class",function(s){for(const[E,z]of L.entries())if(s.type===z)return"section section"+E%i.numberSectionStyles;return"section section0"}).enter();const F=Z.append("g").selectAll("rect").data(h).enter(),o=r.db.getLinks();if(F.append("rect").attr("id",function(s){return e+"-"+s.id}).attr("rx",3).attr("ry",3).attr("x",function(s){return s.milestone?A(s.startTime)+T+.5*(A(s.endTime)-A(s.startTime))-.5*v:A(s.startTime)+T}).attr("y",function(s,E){return E=s.order,s.vert?i.gridLineStartPadding:E*D+w}).attr("width",function(s){return s.milestone?v:s.vert?.08*v:A(s.renderEndTime||s.endTime)-A(s.startTime)}).attr("height",function(s){return s.vert?k.length*(i.barHeight+i.barGap)+i.barHeight*2:v}).attr("transform-origin",function(s,E){return E=s.order,(A(s.startTime)+T+.5*(A(s.endTime)-A(s.startTime))).toString()+"px "+(E*D+w+.5*v).toString()+"px"}).attr("class",function(s){const E="task";let z="";s.classes.length>0&&(z=s.classes.join(" "));let V=0;for(const[K,O]of L.entries())s.type===O&&(V=K%i.numberSectionStyles);let P="";return s.active?s.crit?P+=" activeCrit":P=" active":s.done?s.crit?P=" doneCrit":P=" done":s.crit&&(P+=" crit"),P.length===0&&(P=" task"),s.milestone&&(P=" milestone "+P),s.vert&&(P=" vert "+P),P+=V,P+=" "+z,E+P}),F.append("text").attr("id",function(s){return e+"-"+s.id+"-text"}).text(function(s){return s.task}).attr("font-size",i.fontSize).attr("x",function(s){let E=A(s.startTime),z=A(s.renderEndTime||s.endTime);if(s.milestone&&(E+=.5*(A(s.endTime)-A(s.startTime))-.5*v,z=E+v),s.vert)return A(s.startTime)+T;const V=this.getBBox().width;return V>z-E?z+V+1.5*i.leftPadding>f?E+T-5:z+T+5:(z-E)/2+E+T}).attr("y",function(s,E){return s.vert?i.gridLineStartPadding+k.length*(i.barHeight+i.barGap)+60:(E=s.order,E*D+i.barHeight/2+(i.fontSize/2-2)+w)}).attr("text-height",v).attr("class",function(s){const E=A(s.startTime);let z=A(s.endTime);s.milestone&&(z=E+v);const V=this.getBBox().width;let P="";s.classes.length>0&&(P=s.classes.join(" "));let K=0;for(const[st,M]of L.entries())s.type===M&&(K=st%i.numberSectionStyles);let O="";return s.active&&(s.crit?O="activeCritText"+K:O="activeText"+K),s.done?s.crit?O=O+" doneCritText"+K:O=O+" doneText"+K:s.crit&&(O=O+" critText"+K),s.milestone&&(O+=" milestoneText"),s.vert&&(O+=" vertText"),V>z-E?z+V+1.5*i.leftPadding>f?P+" taskTextOutsideLeft taskTextOutside"+K+" "+O:P+" taskTextOutsideRight taskTextOutside"+K+" "+O+" width-"+V:P+" taskText taskText"+K+" "+O+" width-"+V}),Ft().securityLevel==="sandbox"){let s;s=Bt("#i"+e);const E=s.nodes()[0].contentDocument;F.filter(function(z){return o.has(z.id)}).each(function(z){var V=E.querySelector("#"+CSS.escape(e+"-"+z.id)),P=E.querySelector("#"+CSS.escape(e+"-"+z.id+"-text"));const K=V.parentNode;var O=E.createElement("a");O.setAttribute("xlink:href",o.get(z.id)),O.setAttribute("target","_top"),K.appendChild(O),O.appendChild(V),O.appendChild(P)})}}d(N,"drawRects");function W(h,D,w,T,v,u,f,x){if(f.length===0&&x.length===0)return;let b,F;for(const{startTime:V,endTime:P}of u)(b===void 0||VF)&&(F=P);if(!b||!F)return;if(rt(F).diff(rt(b),"year")>5){Tt.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 o=r.db.getDateFormat(),X=[];let s=null,E=rt(b);for(;E.valueOf()<=F;)r.db.isInvalidDate(E,o,f,x)?s?s.end=E:s={start:E,end:E}:s&&(X.push(s),s=null),E=E.add(1,"d");Z.append("g").selectAll("rect").data(X).enter().append("rect").attr("id",V=>e+"-exclude-"+V.start.format("YYYY-MM-DD")).attr("x",V=>A(V.start.startOf("day"))+w).attr("y",i.gridLineStartPadding).attr("width",V=>A(V.end.endOf("day"))-A(V.start.startOf("day"))).attr("height",v-D-i.gridLineStartPadding).attr("transform-origin",function(V,P){return(A(V.start)+w+.5*(A(V.end)-A(V.start))).toString()+"px "+(P*h+.5*v).toString()+"px"}).attr("class","exclude-range")}d(W,"drawExcludeDays");function q(h,D,w,T){if(w<=0||h>D)return 1/0;const v=D-h,u=rt.duration({[T??"day"]:w}).asMilliseconds();return u<=0?1/0:Math.ceil(v/u)}d(q,"getEstimatedTickCount");function j(h,D,w,T){const v=r.db.getDateFormat(),u=r.db.getAxisFormat();let f;u?f=u:v==="D"?f="%d":f=i.axisFormat??"%Y-%m-%d";let x=lr(A).tickSize(-T+D+i.gridLineStartPadding).tickFormat(ie(f));const F=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(F!==null){const o=parseInt(F[1],10);if(isNaN(o)||o<=0)Tt.warn(`Invalid tick interval value: "${F[1]}". Skipping custom tick interval.`);else{const X=F[2],s=r.db.getWeekday()||i.weekday,E=A.domain(),z=E[0],V=E[1],P=q(z,V,o,X);if(P>Te)Tt.warn(`The tick interval "${o}${X}" would generate ${P} ticks, which exceeds the maximum allowed (${Te}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(X){case"millisecond":x.ticks(Et.every(o));break;case"second":x.ticks(vt.every(o));break;case"minute":x.ticks(Ot.every(o));break;case"hour":x.ticks(Ht.every(o));break;case"day":x.ticks(xt.every(o));break;case"week":x.ticks(an[s].every(o));break;case"month":x.ticks(Pt.every(o));break}}}if(Z.append("g").attr("class","grid").attr("transform","translate("+h+", "+(T-50)+")").call(x).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 o=ur(A).tickSize(-T+D+i.gridLineStartPadding).tickFormat(ie(f));if(F!==null){const X=parseInt(F[1],10);if(isNaN(X)||X<=0)Tt.warn(`Invalid tick interval value: "${F[1]}". Skipping custom tick interval.`);else{const s=F[2],E=r.db.getWeekday()||i.weekday,z=A.domain(),V=z[0],P=z[1];if(q(V,P,X,s)<=Te)switch(s){case"millisecond":o.ticks(Et.every(X));break;case"second":o.ticks(vt.every(X));break;case"minute":o.ticks(Ot.every(X));break;case"hour":o.ticks(Ht.every(X));break;case"day":o.ticks(xt.every(X));break;case"week":o.ticks(an[E].every(X));break;case"month":o.ticks(Pt.every(X));break}}}Z.append("g").attr("class","grid").attr("transform","translate("+h+", "+D+")").call(o).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}d(j,"makeGrid");function p(h,D){let w=0;const T=Object.keys(_).map(v=>[v,_[v]]);Z.append("g").selectAll("text").data(T).enter().append(function(v){const u=v[0].split(Zn.lineBreakRegex),f=-(u.length-1)/2,x=Y.createElementNS("http://www.w3.org/2000/svg","text");x.setAttribute("dy",f+"em");for(const[b,F]of u.entries()){const o=Y.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttribute("alignment-baseline","central"),o.setAttribute("x","10"),b>0&&o.setAttribute("dy","1em"),o.textContent=F,x.appendChild(o)}return x}).attr("x",10).attr("y",function(v,u){if(u>0)for(let f=0;f` + .mermaid-main-font { + font-family: ${t.fontFamily}; + } + + .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: ${t.fontFamily}; + } + + + /* 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: ${t.fontFamily}; + } + + .taskTextOutsideRight { + fill: ${t.taskTextDarkColor}; + text-anchor: start; + font-family: ${t.fontFamily}; + } + + .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; + } + + /* Done task text displayed outside the bar sits against the diagram background, + not against the done-task bar, so it must use the outside/contrast color. */ + .doneText0.taskTextOutsideLeft, + .doneText0.taskTextOutsideRight, + .doneText1.taskTextOutsideLeft, + .doneText1.taskTextOutsideRight, + .doneText2.taskTextOutsideLeft, + .doneText2.taskTextOutsideRight, + .doneText3.taskTextOutsideLeft, + .doneText3.taskTextOutsideRight { + fill: ${t.taskTextOutsideColor} !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; + } + + /* Done-crit task text outside the bar — same reasoning as doneText above. */ + .doneCritText0.taskTextOutsideLeft, + .doneCritText0.taskTextOutsideRight, + .doneCritText1.taskTextOutsideLeft, + .doneCritText1.taskTextOutsideRight, + .doneCritText2.taskTextOutsideLeft, + .doneCritText2.taskTextOutsideRight, + .doneCritText3.taskTextOutsideLeft, + .doneCritText3.taskTextOutsideRight { + fill: ${t.taskTextOutsideColor} !important; + } + + .vert { + stroke: ${t.vertLineColor}; + } + + .vertText { + font-size: 15px; + text-anchor: middle; + fill: ${t.vertLineColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.titleColor||t.textColor}; + font-family: ${t.fontFamily}; + } +`,"getStyles"),Hs=Os,qs={parser:ji,db:Is,renderer:$s,styles:Hs};export{qs as diagram}; diff --git a/dist/assets/gitGraph-WXDBUCRP-BECHaw36.js b/dist/assets/gitGraph-WXDBUCRP-BECHaw36.js new file mode 100644 index 0000000..1bb4239 --- /dev/null +++ b/dist/assets/gitGraph-WXDBUCRP-BECHaw36.js @@ -0,0 +1 @@ +import{g as o}from"./mermaid-parser.core-D9g22YKo.js";import{G as a}from"./mermaid-parser.core-D9g22YKo.js";import"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";export{a as GitGraphModule,o as createGitGraphServices}; diff --git a/dist/assets/gitGraphDiagram-PVQCEYII-aKmExrif.js b/dist/assets/gitGraphDiagram-PVQCEYII-aKmExrif.js new file mode 100644 index 0000000..53113f7 --- /dev/null +++ b/dist/assets/gitGraphDiagram-PVQCEYII-aKmExrif.js @@ -0,0 +1,106 @@ +import{p as he}from"./chunk-4BX2VUAB-DTW3NaPN.js";import{I as $e}from"./chunk-QZHKN3VN-DFJ7UdTp.js";import{q as fe,p as ge,s as ue,g as ye,a as xe,b as me,_ as $,D as Q,l as k,d as pe,c as z,u as be,E as we,z as ke,k as L,F as ve,G as Ee,H as Ce}from"./index-mLPbTfpz.js";import{p as Be}from"./mermaid-parser.core-D9g22YKo.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ee.gitGraph,D=$(()=>ve({...Te,...Q().gitGraph}),"getConfig"),i=new $e(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ce({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Se=$(function(){i.reset(),ke()},"clear"),Ae=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),qe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=$(function(){return i.records.currBranch},"getCurrentBranch"),We=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Se,getBranchesAsObjArray:Ae,getBranches:De,getCommits:qe,getCommitsArray:se,getCurrentBranch:Pe,getDirection:We,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,S=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),A=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${A(s,S,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${A(s,S,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${A(s,S,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",` + ${o-n/2-M/2},${u+I} + ${o-n/2-M/2},${u-I} + ${t.posWithOffset-n/2-M},${u-x-I} + ${t.posWithOffset+n/2+M},${u-x-I} + ${t.posWithOffset+n/2+M},${u+x+I} + ${t.posWithOffset-n/2-M},${u+x+I}`),g.attr("cy",u).attr("cx",o-n/2+M/2).attr("r",1.5).attr("class","tag-hole"),y==="TB"||y==="BT"){const m=o+c;f.attr("class","tag-label-bkg").attr("points",` + ${t.x},${m+2} + ${t.x},${m-2} + ${t.x+G},${m-x-2} + ${t.x+G+n+4},${m-x-2} + ${t.x+G+n+4},${m+x+2} + ${t.x+G},${m+x+2}`).attr("transform","translate(12,12) rotate(45, "+t.x+","+o+")"),g.attr("cx",t.x+M/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+t.x+","+o+")"),h.attr("x",t.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+t.x+","+o+")")}}}},"drawCommitTags"),ir=$(e=>{switch(e.customType??e.type){case p.NORMAL:return"commit-normal";case p.REVERSE:return"commit-reverse";case p.HIGHLIGHT:return"commit-highlight";case p.MERGE:return"commit-merge";case p.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),dr=$((e,r,t,o)=>{const s={x:0,y:0};if(e.parents.length>0){const d=ie(e.parents);if(d){const n=o.get(d)??s;return r==="TB"?n.y+H:r==="BT"?(o.get(e.id)??s).y-H:n.x+H}}else return r==="TB"?j:r==="BT"?(o.get(e.id)??s).y-H:0;return 0},"calculatePosition"),lr=$((e,r,t)=>{var l,h;const o=y==="BT"&&t?r:r+G,s=(l=B.get(e.branch))==null?void 0:l.pos,d=y==="TB"||y==="BT"?(h=B.get(e.branch))==null?void 0:h.pos:o;if(d===void 0||s===void 0)throw new Error(`Position were undefined for commit ${e.id}`);const n=V.has(z().theme??""),a=y==="TB"||y==="BT"?o:s+(n?J/2+1:-2);return{x:d,y:a,posWithOffset:o}},"getCommitPosition"),te=$((e,r,t,o)=>{const s=e.append("g").attr("class","commit-bullets"),d=e.append("g").attr("class","commit-labels");let n=y==="TB"||y==="BT"?j:0;const a=[...r.keys()],l=o.parallelCommits??!1,h=$((f,c)=>{var m,E;const x=(m=r.get(f))==null?void 0:m.seq,u=(E=r.get(c))==null?void 0:E.seq;return x!==void 0&&u!==void 0?x-u:0},"sortKeys");let g=a.sort(h);y==="BT"&&(l&&er(g,r,n),g=g.reverse()),g.forEach(f=>{var u;const c=r.get(f);if(!c)throw new Error(`Commit not found for key ${f}`);l&&(n=dr(c,y,n,T));const x=lr(c,n,l);if(t){const m=ir(c),E=c.customType??c.type,b=((u=B.get(c.branch))==null?void 0:u.index)??0;sr(s,c,x,m,b,E),or(d,c,x,n,o),cr(d,c,x,n)}y==="TB"||y==="BT"?T.set(c.id,{x:x.x,y:x.posWithOffset}):T.set(c.id,{x:x.posWithOffset,y:x.y}),n=y==="BT"&&l?n+H:n+H+G,n>O&&(O=n)})},"drawCommits"),hr=$((e,r,t,o,s)=>{const n=(y==="TB"||y==="BT"?t.xh.branch===n,"isOnBranchToGetCurve"),l=$(h=>h.seq>e.seq&&h.seql(h)&&a(h))},"shouldRerouteArrow"),F=$((e,r,t=0)=>{const o=e+Math.abs(e-r)/2;if(t>5)return o;if(U.every(n=>Math.abs(n-o)>=10))return U.push(o),o;const d=Math.abs(e-r);return F(e,r-d/5,t+1)},"findLane"),$r=$((e,r,t,o)=>{var m,E,b,q,_;const{theme:s}=z(),d=ee.has(s??""),n=T.get(r.id),a=T.get(t.id);if(n===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${t.id}`);const l=hr(r,t,n,a,o);let h="",g="",f=0,c=0,x=(m=B.get(t.branch))==null?void 0:m.index;t.type===p.MERGE&&r.id!==t.parents[0]&&(x=(E=B.get(r.branch))==null?void 0:E.index);let u;if(l){h="A 10 10, 0, 0, 0,",g="A 10 10, 0, 0, 1,",f=10,c=10;const v=n.ya.x&&(h="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",f=20,c=20,t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y-f} ${g} ${n.x-c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x+f} ${n.y} ${h} ${a.x} ${n.y+c} L ${a.x} ${a.y}`),n.x===a.x&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`)):y==="BT"?(n.xa.x&&(h="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",f=20,c=20,t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y+f} ${h} ${n.x-c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x+f} ${n.y} ${g} ${a.x} ${n.y-c} L ${a.x} ${a.y}`),n.x===a.x&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`)):(n.ya.y&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${h} ${a.x} ${n.y-c} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${n.x} ${a.y+f} ${g} ${n.x+c} ${a.y} L ${a.x} ${a.y}`),n.y===a.y&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`));if(u===void 0)throw new Error("Line definition not found");e.append("path").attr("d",u).attr("class","arrow arrow"+A(x,S,d))},"drawArrow"),fr=$((e,r)=>{const t=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach(o=>{const s=r.get(o);s.parents&&s.parents.length>0&&s.parents.forEach(d=>{$r(t,r.get(d),s,r)})})},"drawArrows"),gr=$((e,r,t,o)=>{const{look:s,theme:d,themeVariables:n}=z(),{dropShadow:a,THEME_COLOR_LIMIT:l}=n,h=V.has(d??""),g=ee.has(d??""),f=e.append("g");r.forEach((c,x)=>{var re;const u=A(x,h?l:S,g),m=(re=B.get(c.name))==null?void 0:re.pos;if(m===void 0)throw new Error(`Position not found for branch ${c.name}`);const E=y==="TB"||y==="BT"?m:h?m+J/2+1:m-2,b=f.append("line");b.attr("x1",0),b.attr("y1",E),b.attr("x2",O),b.attr("y2",E),b.attr("class","branch branch"+u),y==="TB"?(b.attr("y1",j),b.attr("x1",m),b.attr("y2",O),b.attr("x2",m)):y==="BT"&&(b.attr("y1",O),b.attr("x1",m),b.attr("y2",j),b.attr("x2",m)),U.push(E);const q=c.name,_=ce(q),v=f.insert("rect"),R=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+u);R.node().appendChild(_);const C=_.getBBox(),W=h?0:4,Y=h?16:0,P=h?J:0;s==="neo"&&v.attr("data-look","neo"),v.attr("class","branchLabelBkg label"+u).attr("style",s==="neo"?`filter:${h?`url(#${o}-drop-shadow)`:a}`:"").attr("rx",W).attr("ry",W).attr("x",-C.width-4-(t.rotateCommitLabel===!0?30:0)).attr("y",-C.height/2+10).attr("width",C.width+18+Y).attr("height",C.height+4+P),R.attr("transform","translate("+(-C.width-14-(t.rotateCommitLabel===!0?30:0)+Y/2)+", "+(E-C.height/2-2)+")"),y==="TB"?(v.attr("x",m-C.width/2-10).attr("y",0),R.attr("transform","translate("+(m-C.width/2-5)+", 0)"),h&&(v.attr("transform",`translate(${-Y/2-3}, ${-P-10})`),R.attr("transform","translate("+(m-C.width/2-5)+", "+(-P*2+7)+")"))):y==="BT"?(v.attr("x",m-C.width/2-10).attr("y",O),R.attr("transform","translate("+(m-C.width/2-5)+", "+O+")"),h&&(v.attr("transform",`translate(${-Y/2-3}, ${P+10})`),R.attr("transform","translate("+(m-C.width/2-5)+", "+(O+P*2+4)+")"))):v.attr("transform","translate(-19, "+(E-12-P/2)+")")})},"drawBranches"),ur=$(function(e,r,t,o,s){return B.set(e,{pos:r,index:t}),r+=50+(s?40:0)+(y==="TB"||y==="BT"?o.width/2:0),r},"setBranchPosition"),yr=$(function(e,r,t,o){Qe(),k.debug("in gitgraph renderer",e+` +`,"id:",r,t);const s=o.db;if(!s.getConfig){k.error("getConfig method is not available on db");return}const d=s.getConfig(),n=d.rotateCommitLabel??!1;N=s.getCommits();const a=s.getBranchesAsObjArray();y=s.getDirection();const l=pe(`[id="${r}"]`),{look:h,theme:g,themeVariables:f}=z(),{useGradient:c,gradientStart:x,gradientStop:u,filterColor:m}=f;if(c){const b=l.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");b.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),b.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}h==="neo"&&V.has(g??"")&&l.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",m);let E=0;a.forEach((b,q)=>{var W;const _=ce(b.name),v=l.append("g"),w=v.insert("g").attr("class","branchLabel"),R=w.insert("g").attr("class","label branch-label");(W=R.node())==null||W.appendChild(_);const C=_.getBBox();E=ur(b.name,E,q,C,n),R.remove(),w.remove(),v.remove()}),te(l,N,!1,d),d.showBranches&&gr(l,a,d,r),fr(l,N),te(l,N,!0,d),be.insertTitle(l,"gitTitleText",d.titleTopMargin??0,s.getDiagramTitle()),we(void 0,l,d.diagramPadding,d.useMaxWidth)},"draw"),xr={draw:yr},de=8,le=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),mr=new Set(["redux-color","redux-dark-color"]),pr=new Set(["neo","neo-dark"]),br=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),wr=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),kr=$(e=>{const{svgId:r}=e;let t="";if(e.useGradient&&r)for(let o=0;o{const r=Q(),{theme:t,themeVariables:o}=r,{borderColorArray:s}=o,d=le.has(t);if(pr.has(t)){let n="";for(let a=0;a`${Array.from({length:e.THEME_COLOR_LIMIT},(r,t)=>t).map(r=>{const t=r%de;return` + .branch-label${r} { fill: ${e["gitBranchLabel"+t]}; } + .commit${r} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; } + .commit-highlight${r} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; } + .label${r} { fill: ${e["git"+t]}; } + .arrow${r} { stroke: ${e["git"+t]}; } + `}).join(` +`)}`,"normalTheme"),Cr=$(e=>{const r=Q(),{theme:t}=r,o=wr.has(t);return` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + + ${o?vr(e):Er(e)} + + .branch { + stroke-width: ${e.strokeWidth}; + stroke: ${e.commitLineColor??e.lineColor}; + stroke-dasharray: ${o?"4 2":"2"}; + } + .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${o?e.nodeBorder:e.commitLabelColor}; ${o?`font-weight:${e.noteFontWeight};`:""}} + .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${o?"transparent":e.commitLabelBackground}; opacity: ${o?"":.5}; } + .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} + .tag-label-bkg { fill: ${o?e.mainBkg:e.tagLabelBackground}; stroke: ${o?e.nodeBorder:e.tagLabelBorder}; ${o?`filter:${e.dropShadow}`:""} } + .tag-hole { fill: ${e.textColor}; } + + .commit-merge { + stroke: ${o?e.mainBkg:e.primaryColor}; + fill: ${o?e.mainBkg:e.primaryColor}; + } + .commit-reverse { + stroke: ${o?e.mainBkg:e.primaryColor}; + fill: ${o?e.mainBkg:e.primaryColor}; + stroke-width: ${o?e.strokeWidth:3}; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${o?e.mainBkg:e.primaryColor}; + fill: ${o?e.mainBkg:e.primaryColor}; + } + + .arrow { + /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */ + stroke-width: ${le.has(t)?e.strokeWidth:8}; + stroke-linecap: round; + fill: none + } + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`},"getStyles"),Br=Cr,Or={parser:Xe,db:oe,renderer:xr,styles:Br};export{Or as diagram}; diff --git a/dist/assets/graph-BlwPajkw.js b/dist/assets/graph-BlwPajkw.js new file mode 100644 index 0000000..6bf47ba --- /dev/null +++ b/dist/assets/graph-BlwPajkw.js @@ -0,0 +1 @@ +var Ze=typeof global=="object"&&global&&global.Object===Object&&global,pt=typeof self=="object"&&self&&self.Object===Object&&self,w=Ze||pt||Function("return this")(),y=w.Symbol,We=Object.prototype,_t=We.hasOwnProperty,bt=We.toString,D=y?y.toStringTag:void 0;function yt(e){var t=_t.call(e,D),r=e[D];try{e[D]=void 0;var n=!0}catch{}var i=bt.call(e);return n&&(t?e[D]=r:delete e[D]),i}var vt=Object.prototype,Ot=vt.toString;function mt(e){return Ot.call(e)}var wt="[object Null]",Tt="[object Undefined]",Oe=y?y.toStringTag:void 0;function M(e){return e==null?e===void 0?Tt:wt:Oe&&Oe in Object(e)?yt(e):mt(e)}function j(e){return e!=null&&typeof e=="object"}var At="[object Symbol]";function he(e){return typeof e=="symbol"||j(e)&&M(e)==At}function Je(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r0){if(++t>=Bt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function F(e){return function(){return e}}var Ae=function(){try{var e=L(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Yt=Ae?function(e,t){return Ae(e,"toString",{configurable:!0,enumerable:!1,value:F(t),writable:!0})}:J,Zt=Xt(Yt);function Wt(e,t){for(var r=-1,n=e==null?0:e.length;++r-1}var tr=9007199254740991,rr=/^(?:0|[1-9]\d*)$/;function Ve(e,t){var r=typeof e;return t=t??tr,!!t&&(r=="number"||r!="symbol"&&rr.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=sr}function Q(e){return e!=null&&le(e.length)&&!Z(e)}var ar=Object.prototype;function et(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ar;return e===r}function or(e,t){for(var r=-1,n=Array(e);++r-1}function gn(e,t){var r=this.__data__,n=k(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function T(e){var t=-1,r=e==null?0:e.length;for(this.clear();++to))return!1;var f=s.get(e),d=s.get(t);if(f&&d)return f==t&&d==e;var c=-1,l=!0,v=r&ei?new B:void 0;for(s.set(e,t),s.set(t,e);++c=ki){var f=Vi(e);if(f)return _e(f);a=!1,i=ft,u=new B}else u=o;e:for(;++n1?i.setNode(s,r):i.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=C,this._children[t]={},this._children[C][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],S(this.children(t),n=>{this.setParent(n)}),delete this._children[t]),S(b(this._in[t]),r),delete this._in[t],delete this._preds[t],S(b(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(R(r))r=C;else{r+="";for(var n=r;!R(n);n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==C)return r}}children(t){if(R(t)&&(t=C),this._isCompound){var r=this._children[t];if(r)return b(r)}else{if(t===C)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return b(r)}successors(t){var r=this._sucs[t];if(r)return b(r)}neighbors(t){var r=this.predecessors(t);if(r)return ts(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;S(this._nodes,function(a,o){t(o)&&r.setNode(o,a)}),S(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,n.edge(a))});var i={};function s(a){var o=n.parent(a);return o===void 0||r.hasNode(o)?(i[a]=o,o):o in i?i[o]:s(o)}return this._isCompound&&S(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(t){return Z(t)||(t=F(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return se(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return Ji(t,function(s,a){return i.length>1?n.setEdge(s,a,r):n.setEdge(s,a),a}),this}setEdge(){var t,r,n,i,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,n=a.name,arguments.length===2&&(i=arguments[1],s=!0)):(t=a,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),t=""+t,r=""+r,R(n)||(n=""+n);var o=G(this._isDirected,t,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return s&&(this._edgeLabels[o]=i),this;if(!R(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=s?i:this._defaultEdgeLabelFn(t,r,n);var u=ns(this._isDirected,t,r,n);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[o]=u,Xe(this._preds[r],t),Xe(this._sucs[t],r),this._in[r][o]=u,this._out[t][o]=u,this._edgeCount++,this}edge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n);return this._edgeLabels[i]}hasEdge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n),s=this._edgeObjs[i];return s&&(t=s.v,r=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Ye(this._preds[r],t),Ye(this._sucs[t],r),delete this._in[r][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var i=se(n);return r?Y(i,function(s){return s.v===r}):i}}outEdges(t,r){var n=this._out[t];if(n){var i=se(n);return r?Y(i,function(s){return s.w===r}):i}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}}gt.prototype._nodeCount=0;gt.prototype._edgeCount=0;function Xe(e,t){e[t]?e[t]++:e[t]=1}function Ye(e,t){--e[t]||delete e[t]}function G(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}return i+qe+s+qe+(R(n)?rs:n)}function ns(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}var o={v:i,w:s};return n&&(o.name=n),o}function ae(e,t){return G(e,t.v,t.w,t.name)}export{Y as $,m as A,Wt as B,g as C,Le as D,de as E,zi as F,gt as G,V as H,Z as I,Fi as J,dt as K,Jt as L,ye as M,Je as N,Hi as O,Gi as P,Ci as Q,J as R,y as S,st as T,Ge as U,te as V,at as W,ji as X,$n as Y,S as Z,F as _,he as a,se as a0,Ji as a1,ce as b,Q as c,Ae as d,ke as e,Ve as f,ir as g,et as h,R as i,Br as j,jn as k,Kr as l,j as m,M as n,nr as o,b as p,zn as q,w as r,Zt as s,Fn as t,ot as u,Hn as v,O as w,Gr as x,Ce as y,W as z}; diff --git a/dist/assets/index-BEfDAM6P.js b/dist/assets/index-BEfDAM6P.js deleted file mode 100644 index 00920b2..0000000 --- a/dist/assets/index-BEfDAM6P.js +++ /dev/null @@ -1,130 +0,0 @@ -var $n=Object.defineProperty;var Bn=(u,e,t)=>e in u?$n(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t;var E=(u,e,t)=>Bn(u,typeof e!="symbol"?e+"":e,t);import*as be from"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=t(r);fetch(r.href,i)}})();const te=class te{};E(te,"localStorage",window.localStorage),E(te,"sessionStorage",window.sessionStorage),E(te,"createKey",function(e,t){return this.getMD5Hash([e,t].join("-"))}),E(te,"getItem",function(e,t){var n=this.createKey(e,t),r=JSON.parse(sessionStorage.getItem(n))||JSON.parse(localStorage.getItem(n));if(r){var i=r.value,o=Number(r.expire),a=new Date().getTime();if(o){if(o>a)return i;deleteItem(e,t)}else return i}}),E(te,"setItem",function(e,t,n,r){var i={namespace:e,key:t,value:n};r?(i.expire=r.getTime(),localStorage.setItem(this.createKey(e,t),JSON.stringify(i))):sessionStorage.setItem(this.createKey(e,t),JSON.stringify(i))}),E(te,"deleteItem",function(e,t){sessionStorage.removeItem(this.createKey(e,t)),localStorage.removeItem(this.createKey(e,t))}),E(te,"getInstance",function(e){return{getItem:function(t){return te.getItem(e,t)},setItem:function(t,n,r){te.setItem(e,t,n,r)},deleteItem:function(t){te.deleteItem(e,t)}}}),E(te,"getMD5Hash",function(e){var t=new Array(0,3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955,4249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,1272893353,4139469664,3200236656,681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690,4293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745),n=new Array(new Array(0,7,1),new Array(1,12,2),new Array(2,17,3),new Array(3,22,4),new Array(4,7,5),new Array(5,12,6),new Array(6,17,7),new Array(7,22,8),new Array(8,7,9),new Array(9,12,10),new Array(10,17,11),new Array(11,22,12),new Array(12,7,13),new Array(13,12,14),new Array(14,17,15),new Array(15,22,16)),r=new Array(new Array(1,5,17),new Array(6,9,18),new Array(11,14,19),new Array(0,20,20),new Array(5,5,21),new Array(10,9,22),new Array(15,14,23),new Array(4,20,24),new Array(9,5,25),new Array(14,9,26),new Array(3,14,27),new Array(8,20,28),new Array(13,5,29),new Array(2,9,30),new Array(7,14,31),new Array(12,20,32)),i=new Array(new Array(5,4,33),new Array(8,11,34),new Array(11,16,35),new Array(14,23,36),new Array(1,4,37),new Array(4,11,38),new Array(7,16,39),new Array(10,23,40),new Array(13,4,41),new Array(0,11,42),new Array(3,16,43),new Array(6,23,44),new Array(9,4,45),new Array(12,11,46),new Array(15,16,47),new Array(2,23,48)),o=new Array(new Array(0,6,49),new Array(7,10,50),new Array(14,15,51),new Array(5,21,52),new Array(12,6,53),new Array(3,10,54),new Array(10,15,55),new Array(1,21,56),new Array(8,6,57),new Array(15,10,58),new Array(6,15,59),new Array(13,21,60),new Array(4,6,61),new Array(11,10,62),new Array(2,15,63),new Array(9,21,64));function a(A,_,D){return A&_|~A&D}function p(A,_,D){return A&D|_&~D}function l(A,_,D){return A^_^D}function c(A,_,D){return _^(A|~D)}var w=new Array(new Array(a,n),new Array(p,r),new Array(l,i),new Array(c,o));function m(A){return String.fromCharCode(A&255)+String.fromCharCode(A>>>8&255)+String.fromCharCode(A>>>16&255)+String.fromCharCode(A>>>24&255)}function k(A){for(;A<0;)A+=4294967296;for(;A>4294967295;)A-=4294967296;return A}function I(A,_,D,T,P){var H,q,F,fe,de,x,z,$,se;H=T[0],q=T[1],F=T[2],fe=T[3],de=P[0],x=P[1],z=P[2],se=D(_[q],_[F],_[fe]),$=_[H]+se+A[de]+t[z],$=k($),$=$<>>32-x,$+=_[q],_[H]=k($)}function R(A){var _,D,T,P,H,q,F,fe,de,x,z,$,se;if(T=new Array(1732584193,4023233417,2562383102,271733878),H=A.length,q=H&63,F=q<56?56-q:120-q,F>0)for(A+="€",x=0;x>4&15),D+="0123456789abcdef".charAt(T&15);return D}return N(e)});let ye=te;function Et(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let _e=Et();function dn(u){_e=u}const He={exec:()=>null};function v(u,e=""){let t=typeof u=="string"?u:u.source;const n={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(V.caret,"$1"),t=t.replace(r,o),n},getRegex:()=>new RegExp(t,e)};return n}const V={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:u=>new RegExp(`^( {0,3}${u})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}#`),htmlBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}<(?:[a-z].*>|!--)`,"i")},Un=/^(?:[ \t]*(?:\n|$))+/,Hn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Fn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,We=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Wn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Rt=/(?:[*+-]|\d{1,9}[.)])/,gn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,mn=v(gn).replace(/bull/g,Rt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Gn=v(gn).replace(/bull/g,Rt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Lt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,qn=/^[^\n]+/,It=/(?!\s*\])(?:\\.|[^\[\]\\])+/,jn=v(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",It).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Yn=v(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Rt).getRegex(),st="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ct=/|$))/,Zn=v("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ct).replace("tag",st).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bn=v(Lt).replace("hr",We).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",st).getRegex(),Xn=v(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bn).getRegex(),vt={blockquote:Xn,code:Hn,def:jn,fences:Fn,heading:Wn,hr:We,html:Zn,lheading:mn,list:Yn,newline:Un,paragraph:bn,table:He,text:qn},Jt=v("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",We).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",st).getRegex(),Vn={...vt,lheading:Gn,table:Jt,paragraph:v(Lt).replace("hr",We).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Jt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",st).getRegex()},Kn={...vt,html:v(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ct).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:He,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:v(Lt).replace("hr",We).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",mn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Qn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Jn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,wn=/^( {2,}|\\)\n(?!\s*$)/,er=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,yn=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,sr=v(yn,"u").replace(/punct/g,ot).getRegex(),or=v(yn,"u").replace(/punct/g,xn).getRegex(),Tn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ar=v(Tn,"gu").replace(/notPunctSpace/g,kn).replace(/punctSpace/g,Dt).replace(/punct/g,ot).getRegex(),lr=v(Tn,"gu").replace(/notPunctSpace/g,rr).replace(/punctSpace/g,nr).replace(/punct/g,xn).getRegex(),cr=v("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,kn).replace(/punctSpace/g,Dt).replace(/punct/g,ot).getRegex(),ur=v(/\\(punct)/,"gu").replace(/punct/g,ot).getRegex(),pr=v(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),hr=v(Ct).replace("(?:-->|$)","-->").getRegex(),fr=v("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",hr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,dr=v(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",nt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),An=v(/^!?\[(label)\]\[(ref)\]/).replace("label",nt).replace("ref",It).getRegex(),_n=v(/^!?\[(ref)\](?:\[\])?/).replace("ref",It).getRegex(),gr=v("reflink|nolink(?!\\()","g").replace("reflink",An).replace("nolink",_n).getRegex(),Ot={_backpedal:He,anyPunctuation:ur,autolink:pr,blockSkip:ir,br:wn,code:Jn,del:He,emStrongLDelim:sr,emStrongRDelimAst:ar,emStrongRDelimUnd:cr,escape:Qn,link:dr,nolink:_n,punctuation:tr,reflink:An,reflinkSearch:gr,tag:fr,text:er,url:He},mr={...Ot,link:v(/^!?\[(label)\]\((.*?)\)/).replace("label",nt).getRegex(),reflink:v(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nt).getRegex()},At={...Ot,emStrongRDelimAst:lr,emStrongLDelim:or,url:v(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},en=u=>wr[u];function he(u,e){if(e){if(V.escapeTest.test(u))return u.replace(V.escapeReplace,en)}else if(V.escapeTestNoEncode.test(u))return u.replace(V.escapeReplaceNoEncode,en);return u}function tn(u){try{u=encodeURI(u).replace(V.percentDecode,"%")}catch{return null}return u}function nn(u,e){var i;const t=u.replace(V.findPipe,(o,a,p)=>{let l=!1,c=a;for(;--c>=0&&p[c]==="\\";)l=!l;return l?"|":" |"}),n=t.split(V.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length{const o=i.match(t.other.beginningSpace);if(o===null)return i;const[a]=o;return a.length>=r.length?i.slice(r.length):i}).join(` -`)}class rt{constructor(e){E(this,"options");E(this,"rules");E(this,"lexer");this.options=e||_e}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Pe(n,` -`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],r=xr(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const r=Pe(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Pe(t[0],` -`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=Pe(t[0],` -`).split(` -`),r="",i="";const o=[];for(;n.length>0;){let a=!1;const p=[];let l;for(l=0;l1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let a=!1;for(;e;){let l=!1,c="",w="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let m=t[2].split(` -`,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),k=e.split(` -`,1)[0],I=!m.trim(),R=0;if(this.options.pedantic?(R=2,w=m.trimStart()):I?R=t[1].length+1:(R=t[2].search(this.rules.other.nonSpaceChar),R=R>4?1:R,w=m.slice(R),R+=t[1].length),I&&this.rules.other.blankLine.test(k)&&(c+=k+` -`,e=e.substring(k.length+1),l=!0),!l){const _=this.rules.other.nextBulletRegex(R),D=this.rules.other.hrRegex(R),T=this.rules.other.fencesBeginRegex(R),P=this.rules.other.headingBeginRegex(R),H=this.rules.other.htmlBeginRegex(R);for(;e;){const q=e.split(` -`,1)[0];let F;if(k=q,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),F=k):F=k.replace(this.rules.other.tabCharGlobal," "),T.test(k)||P.test(k)||H.test(k)||_.test(k)||D.test(k))break;if(F.search(this.rules.other.nonSpaceChar)>=R||!k.trim())w+=` -`+F.slice(R);else{if(I||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(m)||P.test(m)||D.test(m))break;w+=` -`+k}!I&&!k.trim()&&(I=!0),c+=q+` -`,e=e.substring(q.length+1),m=F.slice(R)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0));let N=null,A;this.options.gfm&&(N=this.rules.other.listIsTask.exec(w),N&&(A=N[0]!=="[ ] ",w=w.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:c,task:!!N,checked:A,loose:!1,text:w,tokens:[]}),i.raw+=c}const p=i.items.at(-1);if(p)p.raw=p.raw.trimEnd(),p.text=p.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;lm.type==="space"),w=c.length>0&&c.some(m=>this.rules.other.anyLine.test(m.raw));i.loose=w}if(i.loose)for(let l=0;l({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===` -`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const o=Pe(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=kr(t[2],"()");if(o>-1){const p=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,p).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),rn(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return rn(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const o=[...r[0]].length-1;let a,p,l=o,c=0;const w=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(w.lastIndex=0,t=t.slice(-1*e.length+o);(r=w.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(p=[...a].length,r[3]||r[4]){l+=p;continue}else if((r[5]||r[6])&&o%3&&!((o+p)%3)){c+=p;continue}if(l-=p,l>0)continue;p=Math.min(p,p+l+c);const m=[...r[0]][0].length,k=e.slice(0,o+r.index+m+p);if(Math.min(o,p)%2){const R=k.slice(1,-1);return{type:"em",raw:k,text:R,tokens:this.lexer.inlineTokens(R)}}const I=k.slice(2,-2);return{type:"strong",raw:k,text:I,tokens:this.lexer.inlineTokens(I)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}}class ne{constructor(e){E(this,"tokens");E(this,"options");E(this,"state");E(this,"tokenizer");E(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_e,this.options.tokenizer=this.options.tokenizer||new rt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:V,block:Qe.normal,inline:Me.normal};this.options.pedantic?(t.block=Qe.pedantic,t.inline=Me.pedantic):this.options.gfm&&(t.block=Qe.gfm,this.options.breaks?t.inline=Me.breaks:t.inline=Me.gfm),this.tokenizer.rules=t}static get rules(){return{block:Qe,inline:Me}}static lex(e,t){return new ne(t).lex(e)}static lexInline(e,t){return new ne(t).inlineTokens(e)}lex(e){e=e.replace(V.carriageReturn,` -`),this.blockTokens(e,this.tokens);for(let t=0;t(a=l.call({lexer:this},e,t))?(e=e.substring(a.raw.length),t.push(a),!0):!1))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);const l=t.at(-1);a.raw.length===1&&l!==void 0?l.raw+=` -`:t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);const l=t.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=` -`+a.raw,l.text+=` -`+a.text,this.inlineQueue.at(-1).src=l.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);const l=t.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=` -`+a.raw,l.text+=` -`+a.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let p=e;if((o=this.options.extensions)!=null&&o.startBlock){let l=1/0;const c=e.slice(1);let w;this.options.extensions.startBlock.forEach(m=>{w=m.call({lexer:this},c),typeof w=="number"&&w>=0&&(l=Math.min(l,w))}),l<1/0&&l>=0&&(p=e.substring(0,l+1))}if(this.state.top&&(a=this.tokenizer.paragraph(p))){const l=t.at(-1);n&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=` -`+a.raw,l.text+=` -`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(a),n=p.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);const l=t.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=` -`+a.raw,l.text+=` -`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(a);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var a,p,l;let n=e,r=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i=!1,o="";for(;e;){i||(o=""),i=!1;let c;if((p=(a=this.options.extensions)==null?void 0:a.inline)!=null&&p.some(m=>(c=m.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);const m=t.at(-1);c.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=c.raw,m.text+=c.text):t.push(c);continue}if(c=this.tokenizer.emStrong(e,n,o)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.del(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),t.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),t.push(c);continue}let w=e;if((l=this.options.extensions)!=null&&l.startInline){let m=1/0;const k=e.slice(1);let I;this.options.extensions.startInline.forEach(R=>{I=R.call({lexer:this},k),typeof I=="number"&&I>=0&&(m=Math.min(m,I))}),m<1/0&&m>=0&&(w=e.substring(0,m+1))}if(c=this.tokenizer.inlineText(w)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(o=c.raw.slice(-1)),i=!0;const m=t.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=c.raw,m.text+=c.text):t.push(c);continue}if(e){const m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return t}}class it{constructor(e){E(this,"options");E(this,"parser");this.options=e||_e}space(e){return""}code({text:e,lang:t,escaped:n}){var o;const r=(o=(t||"").match(V.notSpaceStart))==null?void 0:o[0],i=e.replace(V.endingNewline,"")+` -`;return r?'

'+(n?i:he(i,!0))+`
-`:"
"+(n?i:he(i,!0))+`
-`}blockquote({tokens:e}){return`
-${this.parser.parse(e)}
-`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} -`}hr(e){return`
-`}list(e){const t=e.ordered,n=e.start;let r="";for(let a=0;a -`+r+" -`}listitem(e){var n;let t="";if(e.task){const r=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+he(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • -`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    -`}table(e){let t="",n="";for(let i=0;i${r}`),` - -`+t+` -`+r+`
    -`}tablerow({text:e}){return` -${e} -`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` -`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${he(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),i=tn(e);if(i===null)return r;e=i;let o='
    ",o}image({href:e,title:t,text:n}){const r=tn(e);if(r===null)return he(n);e=r;let i=`${n}{const l=a[p].flat(1/0);n=n.concat(this.walkTokens(l,t))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const o=t.renderers[i.name];o?t.renderers[i.name]=function(...a){let p=i.renderer.apply(this,a);return p===!1&&(p=o.apply(this,a)),p}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[i.level];o?o.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){const i=this.defaults.renderer||new it(this.defaults);for(const o in n.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const a=o,p=n.renderer[a],l=i[a];i[a]=(...c)=>{let w=p.apply(i,c);return w===!1&&(w=l.apply(i,c)),w||""}}r.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new rt(this.defaults);for(const o in n.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const a=o,p=n.tokenizer[a],l=i[a];i[a]=(...c)=>{let w=p.apply(i,c);return w===!1&&(w=l.apply(i,c)),w}}r.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new Fe;for(const o in n.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const a=o,p=n.hooks[a],l=i[a];Fe.passThroughHooks.has(o)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(p.call(i,c)).then(m=>l.call(i,m));const w=p.call(i,c);return l.call(i,w)}:i[a]=(...c)=>{let w=p.apply(i,c);return w===!1&&(w=l.apply(i,c)),w}}r.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,o=n.walkTokens;r.walkTokens=function(a){let p=[];return p.push(o.call(this,a)),i&&(p=p.concat(i.call(this,a))),p}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ne.lex(e,t??this.defaults)}parser(e,t){return re.parse(e,t??this.defaults)}parseMarkdown(e){return(n,r)=>{const i={...r},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const p=o.hooks?o.hooks.provideLexer():e?ne.lex:ne.lexInline,l=o.hooks?o.hooks.provideParser():e?re.parse:re.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(c=>p(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>l(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(a);try{o.hooks&&(n=o.hooks.preprocess(n));let c=p(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let w=l(c,o);return o.hooks&&(w=o.hooks.postprocess(w)),w}catch(c){return a(c)}}}onError(e,t){return n=>{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const r="

    An error occurred:

    "+he(n.message+"",!0)+"
    ";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}}const Ae=new yr;function O(u,e){return Ae.parse(u,e)}O.options=O.setOptions=function(u){return Ae.setOptions(u),O.defaults=Ae.defaults,dn(O.defaults),O};O.getDefaults=Et;O.defaults=_e;O.use=function(...u){return Ae.use(...u),O.defaults=Ae.defaults,dn(O.defaults),O};O.walkTokens=function(u,e){return Ae.walkTokens(u,e)};O.parseInline=Ae.parseInline;O.Parser=re;O.parser=re.parse;O.Renderer=it;O.TextRenderer=Mt;O.Lexer=ne;O.lexer=ne.lex;O.Tokenizer=rt;O.Hooks=Fe;O.parse=O;O.options;O.setOptions;O.use;O.walkTokens;O.parseInline;re.parse;ne.lex;/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */const{entries:Sn,setPrototypeOf:sn,isFrozen:Tr,getPrototypeOf:Ar,getOwnPropertyDescriptor:_r}=Object;let{freeze:K,seal:ie,create:En}=Object,{apply:_t,construct:St}=typeof Reflect<"u"&&Reflect;K||(K=function(e){return e});ie||(ie=function(e){return e});_t||(_t=function(e,t,n){return e.apply(t,n)});St||(St=function(e,t){return new e(...t)});const Je=Q(Array.prototype.forEach),Sr=Q(Array.prototype.lastIndexOf),on=Q(Array.prototype.pop),Ne=Q(Array.prototype.push),Er=Q(Array.prototype.splice),tt=Q(String.prototype.toLowerCase),wt=Q(String.prototype.toString),an=Q(String.prototype.match),ze=Q(String.prototype.replace),Rr=Q(String.prototype.indexOf),Lr=Q(String.prototype.trim),le=Q(Object.prototype.hasOwnProperty),X=Q(RegExp.prototype.test),$e=Ir(TypeError);function Q(u){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:tt;sn&&sn(u,null);let n=e.length;for(;n--;){let r=e[n];if(typeof r=="string"){const i=t(r);i!==r&&(Tr(e)||(e[n]=i),r=i)}u[r]=!0}return u}function Cr(u){for(let e=0;e/gm),Pr=ie(/\$\{[\w\W]*/gm),Nr=ie(/^data-[\-\w.\u00B7-\uFFFF]+$/),zr=ie(/^aria-[\-\w]+$/),Rn=ie(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$r=ie(/^(?:\w+script|data):/i),Br=ie(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ln=ie(/^html$/i),Ur=ie(/^[a-z][.\w]*(-[.\w]+)+$/i);var hn=Object.freeze({__proto__:null,ARIA_ATTR:zr,ATTR_WHITESPACE:Br,CUSTOM_ELEMENT:Ur,DATA_ATTR:Nr,DOCTYPE_NAME:Ln,ERB_EXPR:Mr,IS_ALLOWED_URI:Rn,IS_SCRIPT_OR_DATA:$r,MUSTACHE_EXPR:Or,TMPLIT_EXPR:Pr});const Ue={element:1,text:3,progressingInstruction:7,comment:8,document:9},Hr=function(){return typeof window>"u"?null:window},Fr=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},fn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function In(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hr();const e=g=>In(g);if(e.version="3.2.5",e.removed=[],!u||!u.document||u.document.nodeType!==Ue.document||!u.Element)return e.isSupported=!1,e;let{document:t}=u;const n=t,r=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:a,Element:p,NodeFilter:l,NamedNodeMap:c=u.NamedNodeMap||u.MozNamedAttrMap,HTMLFormElement:w,DOMParser:m,trustedTypes:k}=u,I=p.prototype,R=Be(I,"cloneNode"),N=Be(I,"remove"),A=Be(I,"nextSibling"),_=Be(I,"childNodes"),D=Be(I,"parentNode");if(typeof o=="function"){const g=t.createElement("template");g.content&&g.content.ownerDocument&&(t=g.content.ownerDocument)}let T,P="";const{implementation:H,createNodeIterator:q,createDocumentFragment:F,getElementsByTagName:fe}=t,{importNode:de}=n;let x=fn();e.isSupported=typeof Sn=="function"&&typeof D=="function"&&H&&H.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:z,ERB_EXPR:$,TMPLIT_EXPR:se,DATA_ATTR:at,ARIA_ATTR:lt,IS_SCRIPT_OR_DATA:Ge,ATTR_WHITESPACE:we,CUSTOM_ELEMENT:ct}=hn;let{IS_ALLOWED_URI:ke}=hn,f=null;const b=S({},[...ln,...kt,...xt,...yt,...cn]);let y=null;const L=S({},[...un,...Tt,...pn,...et]);let C=Object.seal(En(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),B=null,Y=null,W=!0,ee=!0,ce=!1,xe=!0,oe=!1,Ce=!0,ae=!1,ut=!1,pt=!1,Se=!1,qe=!1,je=!1,Pt=!0,Nt=!1;const Cn="user-content-";let ht=!0,ve=!1,Ee={},Re=null;const zt=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $t=null;const Bt=S({},["audio","video","img","source","image","track"]);let ft=null;const Ut=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let Le=ge,dt=!1,gt=null;const vn=S({},[Ye,Ze,ge],wt);let Xe=S({},["mi","mo","mn","ms","mtext"]),Ve=S({},["annotation-xml"]);const Dn=S({},["title","style","font","a","script"]);let De=null;const On=["application/xhtml+xml","text/html"],Mn="text/html";let U=null,Ie=null;const Pn=t.createElement("form"),Ht=function(s){return s instanceof RegExp||s instanceof Function},mt=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ie&&Ie===s)){if((!s||typeof s!="object")&&(s={}),s=Te(s),De=On.indexOf(s.PARSER_MEDIA_TYPE)===-1?Mn:s.PARSER_MEDIA_TYPE,U=De==="application/xhtml+xml"?wt:tt,f=le(s,"ALLOWED_TAGS")?S({},s.ALLOWED_TAGS,U):b,y=le(s,"ALLOWED_ATTR")?S({},s.ALLOWED_ATTR,U):L,gt=le(s,"ALLOWED_NAMESPACES")?S({},s.ALLOWED_NAMESPACES,wt):vn,ft=le(s,"ADD_URI_SAFE_ATTR")?S(Te(Ut),s.ADD_URI_SAFE_ATTR,U):Ut,$t=le(s,"ADD_DATA_URI_TAGS")?S(Te(Bt),s.ADD_DATA_URI_TAGS,U):Bt,Re=le(s,"FORBID_CONTENTS")?S({},s.FORBID_CONTENTS,U):zt,B=le(s,"FORBID_TAGS")?S({},s.FORBID_TAGS,U):{},Y=le(s,"FORBID_ATTR")?S({},s.FORBID_ATTR,U):{},Ee=le(s,"USE_PROFILES")?s.USE_PROFILES:!1,W=s.ALLOW_ARIA_ATTR!==!1,ee=s.ALLOW_DATA_ATTR!==!1,ce=s.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=s.ALLOW_SELF_CLOSE_IN_ATTR!==!1,oe=s.SAFE_FOR_TEMPLATES||!1,Ce=s.SAFE_FOR_XML!==!1,ae=s.WHOLE_DOCUMENT||!1,Se=s.RETURN_DOM||!1,qe=s.RETURN_DOM_FRAGMENT||!1,je=s.RETURN_TRUSTED_TYPE||!1,pt=s.FORCE_BODY||!1,Pt=s.SANITIZE_DOM!==!1,Nt=s.SANITIZE_NAMED_PROPS||!1,ht=s.KEEP_CONTENT!==!1,ve=s.IN_PLACE||!1,ke=s.ALLOWED_URI_REGEXP||Rn,Le=s.NAMESPACE||ge,Xe=s.MATHML_TEXT_INTEGRATION_POINTS||Xe,Ve=s.HTML_INTEGRATION_POINTS||Ve,C=s.CUSTOM_ELEMENT_HANDLING||{},s.CUSTOM_ELEMENT_HANDLING&&Ht(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(C.tagNameCheck=s.CUSTOM_ELEMENT_HANDLING.tagNameCheck),s.CUSTOM_ELEMENT_HANDLING&&Ht(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(C.attributeNameCheck=s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),s.CUSTOM_ELEMENT_HANDLING&&typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(C.allowCustomizedBuiltInElements=s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),oe&&(ee=!1),qe&&(Se=!0),Ee&&(f=S({},cn),y=[],Ee.html===!0&&(S(f,ln),S(y,un)),Ee.svg===!0&&(S(f,kt),S(y,Tt),S(y,et)),Ee.svgFilters===!0&&(S(f,xt),S(y,Tt),S(y,et)),Ee.mathMl===!0&&(S(f,yt),S(y,pn),S(y,et))),s.ADD_TAGS&&(f===b&&(f=Te(f)),S(f,s.ADD_TAGS,U)),s.ADD_ATTR&&(y===L&&(y=Te(y)),S(y,s.ADD_ATTR,U)),s.ADD_URI_SAFE_ATTR&&S(ft,s.ADD_URI_SAFE_ATTR,U),s.FORBID_CONTENTS&&(Re===zt&&(Re=Te(Re)),S(Re,s.FORBID_CONTENTS,U)),ht&&(f["#text"]=!0),ae&&S(f,["html","head","body"]),f.table&&(S(f,["tbody"]),delete B.tbody),s.TRUSTED_TYPES_POLICY){if(typeof s.TRUSTED_TYPES_POLICY.createHTML!="function")throw $e('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof s.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $e('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=s.TRUSTED_TYPES_POLICY,P=T.createHTML("")}else T===void 0&&(T=Fr(k,r)),T!==null&&typeof P=="string"&&(P=T.createHTML(""));K&&K(s),Ie=s}},Ft=S({},[...kt,...xt,...vr]),Wt=S({},[...yt,...Dr]),Nn=function(s){let h=D(s);(!h||!h.tagName)&&(h={namespaceURI:Le,tagName:"template"});const d=tt(s.tagName),M=tt(h.tagName);return gt[s.namespaceURI]?s.namespaceURI===Ze?h.namespaceURI===ge?d==="svg":h.namespaceURI===Ye?d==="svg"&&(M==="annotation-xml"||Xe[M]):!!Ft[d]:s.namespaceURI===Ye?h.namespaceURI===ge?d==="math":h.namespaceURI===Ze?d==="math"&&Ve[M]:!!Wt[d]:s.namespaceURI===ge?h.namespaceURI===Ze&&!Ve[M]||h.namespaceURI===Ye&&!Xe[M]?!1:!Wt[d]&&(Dn[d]||!Ft[d]):!!(De==="application/xhtml+xml"&>[s.namespaceURI]):!1},ue=function(s){Ne(e.removed,{element:s});try{D(s).removeChild(s)}catch{N(s)}},Ke=function(s,h){try{Ne(e.removed,{attribute:h.getAttributeNode(s),from:h})}catch{Ne(e.removed,{attribute:null,from:h})}if(h.removeAttribute(s),s==="is")if(Se||qe)try{ue(h)}catch{}else try{h.setAttribute(s,"")}catch{}},Gt=function(s){let h=null,d=null;if(pt)s=""+s;else{const G=an(s,/^[\r\n\t ]+/);d=G&&G[0]}De==="application/xhtml+xml"&&Le===ge&&(s=''+s+"");const M=T?T.createHTML(s):s;if(Le===ge)try{h=new m().parseFromString(M,De)}catch{}if(!h||!h.documentElement){h=H.createDocument(Le,"template",null);try{h.documentElement.innerHTML=dt?P:M}catch{}}const j=h.body||h.documentElement;return s&&d&&j.insertBefore(t.createTextNode(d),j.childNodes[0]||null),Le===ge?fe.call(h,ae?"html":"body")[0]:ae?h.documentElement:j},qt=function(s){return q.call(s.ownerDocument||s,s,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},bt=function(s){return s instanceof w&&(typeof s.nodeName!="string"||typeof s.textContent!="string"||typeof s.removeChild!="function"||!(s.attributes instanceof c)||typeof s.removeAttribute!="function"||typeof s.setAttribute!="function"||typeof s.namespaceURI!="string"||typeof s.insertBefore!="function"||typeof s.hasChildNodes!="function")},jt=function(s){return typeof a=="function"&&s instanceof a};function me(g,s,h){Je(g,d=>{d.call(e,s,h,Ie)})}const Yt=function(s){let h=null;if(me(x.beforeSanitizeElements,s,null),bt(s))return ue(s),!0;const d=U(s.nodeName);if(me(x.uponSanitizeElement,s,{tagName:d,allowedTags:f}),s.hasChildNodes()&&!jt(s.firstElementChild)&&X(/<[/\w!]/g,s.innerHTML)&&X(/<[/\w!]/g,s.textContent)||s.nodeType===Ue.progressingInstruction||Ce&&s.nodeType===Ue.comment&&X(/<[/\w]/g,s.data))return ue(s),!0;if(!f[d]||B[d]){if(!B[d]&&Xt(d)&&(C.tagNameCheck instanceof RegExp&&X(C.tagNameCheck,d)||C.tagNameCheck instanceof Function&&C.tagNameCheck(d)))return!1;if(ht&&!Re[d]){const M=D(s)||s.parentNode,j=_(s)||s.childNodes;if(j&&M){const G=j.length;for(let J=G-1;J>=0;--J){const pe=R(j[J],!0);pe.__removalCount=(s.__removalCount||0)+1,M.insertBefore(pe,A(s))}}}return ue(s),!0}return s instanceof p&&!Nn(s)||(d==="noscript"||d==="noembed"||d==="noframes")&&X(/<\/no(script|embed|frames)/i,s.innerHTML)?(ue(s),!0):(oe&&s.nodeType===Ue.text&&(h=s.textContent,Je([z,$,se],M=>{h=ze(h,M," ")}),s.textContent!==h&&(Ne(e.removed,{element:s.cloneNode()}),s.textContent=h)),me(x.afterSanitizeElements,s,null),!1)},Zt=function(s,h,d){if(Pt&&(h==="id"||h==="name")&&(d in t||d in Pn))return!1;if(!(ee&&!Y[h]&&X(at,h))){if(!(W&&X(lt,h))){if(!y[h]||Y[h]){if(!(Xt(s)&&(C.tagNameCheck instanceof RegExp&&X(C.tagNameCheck,s)||C.tagNameCheck instanceof Function&&C.tagNameCheck(s))&&(C.attributeNameCheck instanceof RegExp&&X(C.attributeNameCheck,h)||C.attributeNameCheck instanceof Function&&C.attributeNameCheck(h))||h==="is"&&C.allowCustomizedBuiltInElements&&(C.tagNameCheck instanceof RegExp&&X(C.tagNameCheck,d)||C.tagNameCheck instanceof Function&&C.tagNameCheck(d))))return!1}else if(!ft[h]){if(!X(ke,ze(d,we,""))){if(!((h==="src"||h==="xlink:href"||h==="href")&&s!=="script"&&Rr(d,"data:")===0&&$t[s])){if(!(ce&&!X(Ge,ze(d,we,"")))){if(d)return!1}}}}}}return!0},Xt=function(s){return s!=="annotation-xml"&&an(s,ct)},Vt=function(s){me(x.beforeSanitizeAttributes,s,null);const{attributes:h}=s;if(!h||bt(s))return;const d={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:y,forceKeepAttr:void 0};let M=h.length;for(;M--;){const j=h[M],{name:G,namespaceURI:J,value:pe}=j,Oe=U(G);let Z=G==="value"?pe:Lr(pe);if(d.attrName=Oe,d.attrValue=Z,d.keepAttr=!0,d.forceKeepAttr=void 0,me(x.uponSanitizeAttribute,s,d),Z=d.attrValue,Nt&&(Oe==="id"||Oe==="name")&&(Ke(G,s),Z=Cn+Z),Ce&&X(/((--!?|])>)|<\/(style|title)/i,Z)){Ke(G,s);continue}if(d.forceKeepAttr||(Ke(G,s),!d.keepAttr))continue;if(!xe&&X(/\/>/i,Z)){Ke(G,s);continue}oe&&Je([z,$,se],Qt=>{Z=ze(Z,Qt," ")});const Kt=U(s.nodeName);if(Zt(Kt,Oe,Z)){if(T&&typeof k=="object"&&typeof k.getAttributeType=="function"&&!J)switch(k.getAttributeType(Kt,Oe)){case"TrustedHTML":{Z=T.createHTML(Z);break}case"TrustedScriptURL":{Z=T.createScriptURL(Z);break}}try{J?s.setAttributeNS(J,G,Z):s.setAttribute(G,Z),bt(s)?ue(s):on(e.removed)}catch{}}}me(x.afterSanitizeAttributes,s,null)},zn=function g(s){let h=null;const d=qt(s);for(me(x.beforeSanitizeShadowDOM,s,null);h=d.nextNode();)me(x.uponSanitizeShadowNode,h,null),Yt(h),Vt(h),h.content instanceof i&&g(h.content);me(x.afterSanitizeShadowDOM,s,null)};return e.sanitize=function(g){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,d=null,M=null,j=null;if(dt=!g,dt&&(g=""),typeof g!="string"&&!jt(g))if(typeof g.toString=="function"){if(g=g.toString(),typeof g!="string")throw $e("dirty is not a string, aborting")}else throw $e("toString is not a function");if(!e.isSupported)return g;if(ut||mt(s),e.removed=[],typeof g=="string"&&(ve=!1),ve){if(g.nodeName){const pe=U(g.nodeName);if(!f[pe]||B[pe])throw $e("root node is forbidden and cannot be sanitized in-place")}}else if(g instanceof a)h=Gt(""),d=h.ownerDocument.importNode(g,!0),d.nodeType===Ue.element&&d.nodeName==="BODY"||d.nodeName==="HTML"?h=d:h.appendChild(d);else{if(!Se&&!oe&&!ae&&g.indexOf("<")===-1)return T&&je?T.createHTML(g):g;if(h=Gt(g),!h)return Se?null:je?P:""}h&&pt&&ue(h.firstChild);const G=qt(ve?g:h);for(;M=G.nextNode();)Yt(M),Vt(M),M.content instanceof i&&zn(M.content);if(ve)return g;if(Se){if(qe)for(j=F.call(h.ownerDocument);h.firstChild;)j.appendChild(h.firstChild);else j=h;return(y.shadowroot||y.shadowrootmode)&&(j=de.call(n,j,!0)),j}let J=ae?h.outerHTML:h.innerHTML;return ae&&f["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&X(Ln,h.ownerDocument.doctype.name)&&(J=" -`+J),oe&&Je([z,$,se],pe=>{J=ze(J,pe," ")}),T&&je?T.createHTML(J):J},e.setConfig=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};mt(g),ut=!0},e.clearConfig=function(){Ie=null,ut=!1},e.isValidAttribute=function(g,s,h){Ie||mt({});const d=U(g),M=U(s);return Zt(d,M,h)},e.addHook=function(g,s){typeof s=="function"&&Ne(x[g],s)},e.removeHook=function(g,s){if(s!==void 0){const h=Sr(x[g],s);return h===-1?void 0:Er(x[g],h,1)[0]}return on(x[g])},e.removeHooks=function(g){x[g]=[]},e.removeAllHooks=function(){x=fn()},e}var Wr=In();const Gr=()=>{let u=!1,e=!1;const t="com.markdownlivepreview",n="last_state",r="scroll_bar_settings",i="theme_settings",o="Are you sure you want to reset? Your changes will be lost.",a=`# Markdown syntax guide - -## Headers - -# This is a Heading h1 -## This is a Heading h2 -###### This is a Heading h6 - -## Emphasis - -*This text will be italic* -_This will also be italic_ - -**This text will be bold** -__This will also be bold__ - -_You **can** combine them_ - -## Lists - -### Unordered - -* Item 1 -* Item 2 -* Item 2a -* Item 2b - * Item 3a - * Item 3b - -### Ordered - -1. Item 1 -2. Item 2 -3. Item 3 - 1. Item 3a - 2. Item 3b - -## Images - -![This is an alt text.](/image/Markdown-mark.svg "This is a sample image.") - -## Links - -You may be using [Markdown Live Preview](https://markdownlivepreview.com/). - -## Blockquotes - -> Markdown is a lightweight markup language with plain-text-formatting syntax, created in 2004 by John Gruber with Aaron Swartz. -> ->> Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor. - -## Tables - -| Left columns | Right columns | -| ------------- |:-------------:| -| left foo | right foo | -| left bar | right bar | -| left baz | right baz | - -## Blocks of code - -\`\`\` -let message = 'Hello world'; -alert(message); -\`\`\` - -## Inline code - -This web site is using \`markedjs/marked\`. -`;self.MonacoEnvironment={getWorker(f,b){return new Proxy({},{get:()=>()=>{}})}};let p=()=>{let f=be.editor.create(document.querySelector("#editor"),{fontSize:14,language:"markdown",minimap:{enabled:!1},scrollBeyondLastLine:!1,automaticLayout:!0,scrollbar:{vertical:"visible",horizontal:"visible"},wordWrap:"on",hover:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1});return f.onDidChangeModelContent(()=>{f.getValue()!=a&&(u=!0);let y=f.getValue();l(y),x(y)}),f.onDidScrollChange(b=>{if(!e)return;const y=b.scrollTop,L=b.scrollHeight,C=f.getLayoutInfo().height,B=L-C,Y=y/B;let W=document.querySelector("#preview"),ee=(W.scrollHeight-W.clientHeight)*Y;W.scrollTo(0,ee)}),f},l=f=>{let b={headerIds:!1,mangle:!1},y=O.parse(f,b),L=Wr.sanitize(y);document.querySelector("#output").innerHTML=L},c=()=>{let f=we.getValue()!=a;if(u||f){var b=window.confirm(o);if(!b)return}w(a),document.querySelectorAll(".column").forEach(y=>{y.scrollTo({top:0})})},w=f=>{we.setValue(f),we.revealPosition({lineNumber:1,column:1}),we.focus(),u=!1},m=f=>{let b=document.querySelector("#sync-scroll-checkbox");b.checked=f,e=f,b.addEventListener("change",y=>{let L=y.currentTarget.checked;e=L,se(L)})};const k="css/github-markdown-light.css?v=1.11.0",I="css/github-markdown-dark_dimmed.css?v=1.11.0";let R=f=>{const b=document.getElementById("gh-markdown-link");if(!b){const L=document.createElement("link");L.id="gh-markdown-link",L.rel="stylesheet",L.href=f?I:k,document.head.appendChild(L);return}const y=f?I:k;b.getAttribute("href")!==y&&b.setAttribute("href",y)},N=f=>{document.documentElement.setAttribute("data-theme",f?"dark":"light")},A=f=>{let b=document.querySelector("#theme-checkbox");b&&(b.checked=f,N(f),be&&be.editor&&typeof be.editor.setTheme=="function"&&be.editor.setTheme(f?"vs-dark":"vs"),R(f),b.addEventListener("change",y=>{let L=y.currentTarget.checked;N(L),at(L),R(L),be&&be.editor&&typeof be.editor.setTheme=="function"&&be.editor.setTheme(L?"vs-dark":"vs")}))},_=(f,b,y)=>{navigator.clipboard.writeText(f).then(()=>{b()},()=>{})},D=()=>{let f=document.querySelector("#copy-button a");f.innerHTML="Copied!",setTimeout(()=>{f.innerHTML="Copy"},1e3)},T=null,P=()=>T||(T=fetch(k).then(f=>{if(!f.ok)throw new Error(`Failed to load export CSS: ${f.status}`);return f.text()}).catch(f=>(console.error("Failed to load light markdown CSS",f),"")),T),H=()=>{const f=document.querySelector("#preview-wrapper");if(f){if(typeof window.html2pdf!="function"){window.alert("PDF export is not available yet. Please try again in a moment.");return}P().then(b=>{const y={margin:10,filename:"markdown-preview.pdf",image:{type:"jpeg",quality:.98},html2canvas:{scale:2,useCORS:!0,onclone:L=>{L.documentElement.setAttribute("data-theme","light");const C=L.getElementById("gh-markdown-link");if(C&&C.setAttribute("href",k),b){const W=L.createElement("style");W.id="export-light-css",W.textContent=`${b} -#preview-wrapper, #output, body { - background: #fff !important; - color: #24292f !important; -}`,L.head.appendChild(W)}const B=L.getElementById("preview-wrapper");B&&(B.style.background="#fff",B.style.color="#24292f",B.style.width="190mm",B.style.maxWidth="190mm");const Y=L.getElementById("output");Y&&(Y.style.background="#fff",Y.style.color="#24292f",Y.style.width="190mm",Y.style.maxWidth="190mm")}},jsPDF:{unit:"mm",format:"a4",orientation:"portrait"}};window.html2pdf().set(y).from(f).save().catch(L=>{console.error("Failed to export PDF",L)})})}},q=()=>{document.querySelector("#reset-button").addEventListener("click",f=>{f.preventDefault(),c()})},F=f=>{document.querySelector("#copy-button").addEventListener("click",b=>{b.preventDefault();let y=f.getValue();_(y,()=>{D()})})},fe=()=>{const f=document.querySelector("#export-button");f&&f.addEventListener("click",b=>{b.preventDefault(),H()})},de=()=>ye.getItem(t,n),x=f=>{let b=new Date(2099,1,1);ye.setItem(t,n,f,b)},z=()=>ye.getItem(t,r),$=()=>{let f=ye.getItem(t,i);if(f==null)try{const b=localStorage.getItem("com.markdownlivepreview_theme");if(b==="dark")return!0;if(b==="light")return!1}catch{}return f},se=f=>{let b=new Date(2099,1,1);ye.setItem(t,r,f,b)},at=f=>{let b=new Date(2099,1,1);ye.setItem(t,i,f,b);try{localStorage.setItem("com.markdownlivepreview_theme",f?"dark":"light")}catch{}},lt=()=>{let f=.5;const b=document.getElementById("split-divider"),y=document.getElementById("edit"),L=document.getElementById("preview"),C=document.getElementById("container");let B=!1;b.addEventListener("mouseenter",()=>{b.classList.add("hover")}),b.addEventListener("mouseleave",()=>{B||b.classList.remove("hover")}),b.addEventListener("mousedown",()=>{B=!0,b.classList.add("active"),document.body.style.cursor="col-resize"}),b.addEventListener("dblclick",()=>{const W=C.getBoundingClientRect().width,ee=b.offsetWidth,ce=(W-ee)/2;y.style.width=ce+"px",L.style.width=ce+"px"}),document.addEventListener("mousemove",Y=>{if(!B)return;document.body.style.userSelect="none";const W=C.getBoundingClientRect(),ee=W.width,ce=Y.clientX-W.left,xe=b.offsetWidth,oe=100,Ce=ee-oe-xe,ae=Math.max(oe,Math.min(ce,Ce));y.style.width=ae+"px",L.style.width=ee-ae-xe+"px",f=ae/(ee-xe)}),document.addEventListener("mouseup",()=>{B&&(B=!1,b.classList.remove("active"),b.classList.remove("hover"),document.body.style.cursor="default",document.body.style.userSelect="")}),window.addEventListener("resize",()=>{const W=C.getBoundingClientRect().width,ee=b.offsetWidth,ce=W-ee,xe=ce*f,oe=ce*(1-f);y.style.width=xe+"px",L.style.width=oe+"px"})},Ge=de(),we=p();w(Ge||a),q(),F(we),fe();let ct=z()||!1;m(ct);let ke=$();ke==="true"||ke===!0?ke=!0:ke=!1,A(ke),lt()};window.addEventListener("load",()=>{Gr()}); diff --git a/dist/assets/index-mLPbTfpz.js b/dist/assets/index-mLPbTfpz.js new file mode 100644 index 0000000..4efb519 --- /dev/null +++ b/dist/assets/index-mLPbTfpz.js @@ -0,0 +1,445 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-B7Ojjrxg.js","assets/graph-BlwPajkw.js","assets/layout-Boy8vhSP.js","assets/cose-bilkent-S5V4N54A-DfPmC3MC.js","assets/cytoscape.esm-BHYC38rz.js","assets/c4Diagram-AAUBKEIU-DAk3fAMC.js","assets/chunk-ND2GUHAM-DRVGyKsL.js","assets/flowDiagram-I6XJVG4X-D0Me_Wp2.js","assets/chunk-FMBD7UC4-Crb6W-Lm.js","assets/chunk-55IACEB6-DT6mN9fZ.js","assets/chunk-2J33WTMH-CsIyCw5_.js","assets/channel-B5wXLQie.js","assets/erDiagram-TEJ5UH35-6rSkwA1P.js","assets/gitGraphDiagram-PVQCEYII-aKmExrif.js","assets/chunk-4BX2VUAB-DTW3NaPN.js","assets/chunk-QZHKN3VN-DFJ7UdTp.js","assets/mermaid-parser.core-D9g22YKo.js","assets/ganttDiagram-6RSMTGT7-CskD-f5L.js","assets/linear-CvhoBmDn.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-ChgsIg6d.js","assets/pieDiagram-4H26LBE5-DbOHoVVN.js","assets/arc-XpyNnWh5.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-DEXrGMHs.js","assets/xychartDiagram-2RQKCTM6-D123ylb3.js","assets/requirementDiagram-4Y6WPE33-C9L6Ib86.js","assets/sequenceDiagram-3UESZ5HK-D_-m6WNS.js","assets/classDiagram-4FO5ZUOK-C891wWoD.js","assets/chunk-727SXJPM-DkN7wOmK.js","assets/classDiagram-v2-Q7XG4LA2-C891wWoD.js","assets/stateDiagram-AJRCARHV-DSD_0bJU.js","assets/chunk-AQP2D5EJ-B3_Jw0pD.js","assets/stateDiagram-v2-BHNVJYJU-Bj5k-FXZ.js","assets/journeyDiagram-JHISSGLW-BGdfH_nK.js","assets/timeline-definition-PNZ67QCA-DuNinMEh.js","assets/mindmap-definition-RKZ34NQL-R9rEr1y5.js","assets/kanban-definition-UN3LZRKU-BOdRLozk.js","assets/sankeyDiagram-5OEKKPKP-DsxkSyuQ.js","assets/diagram-LMA3HP47-B5Kro_O5.js","assets/diagram-2AECGRRQ-DngQtK0P.js","assets/blockDiagram-GPEHLZMM-DsfQw5wZ.js","assets/diagram-5GNKFQAL-C5KUC4pU.js","assets/architectureDiagram-3BPJPVTR-CXJxMnqD.js","assets/diagram-KO2AKTUF-C6UfqqSa.js","assets/diagram-OG6HWLK6-CBZ7PcAN.js","assets/wardleyDiagram-YWT4CUSO-D-feaV5C.js"])))=>i.map(i=>d[i]); +var zy=Object.defineProperty;var Wy=(e,t,r)=>t in e?zy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var J=(e,t,r)=>Wy(e,typeof t!="symbol"?t+"":t,r);import*as Ke from"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(s){if(s.ep)return;s.ep=!0;const a=r(s);fetch(s.href,a)}})();const me=class me{};J(me,"localStorage",window.localStorage),J(me,"sessionStorage",window.sessionStorage),J(me,"createKey",function(t,r){return this.getMD5Hash([t,r].join("-"))}),J(me,"getItem",function(t,r){var i=this.createKey(t,r),s=JSON.parse(sessionStorage.getItem(i))||JSON.parse(localStorage.getItem(i));if(s){var a=s.value,o=Number(s.expire),n=new Date().getTime();if(o){if(o>n)return a;deleteItem(t,r)}else return a}}),J(me,"setItem",function(t,r,i,s){var a={namespace:t,key:r,value:i};s?(a.expire=s.getTime(),localStorage.setItem(this.createKey(t,r),JSON.stringify(a))):sessionStorage.setItem(this.createKey(t,r),JSON.stringify(a))}),J(me,"deleteItem",function(t,r){sessionStorage.removeItem(this.createKey(t,r)),localStorage.removeItem(this.createKey(t,r))}),J(me,"getInstance",function(t){return{getItem:function(r){return me.getItem(t,r)},setItem:function(r,i,s){me.setItem(t,r,i,s)},deleteItem:function(r){me.deleteItem(t,r)}}}),J(me,"getMD5Hash",function(t){var r=new Array(0,3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955,4249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,1272893353,4139469664,3200236656,681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690,4293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745),i=new Array(new Array(0,7,1),new Array(1,12,2),new Array(2,17,3),new Array(3,22,4),new Array(4,7,5),new Array(5,12,6),new Array(6,17,7),new Array(7,22,8),new Array(8,7,9),new Array(9,12,10),new Array(10,17,11),new Array(11,22,12),new Array(12,7,13),new Array(13,12,14),new Array(14,17,15),new Array(15,22,16)),s=new Array(new Array(1,5,17),new Array(6,9,18),new Array(11,14,19),new Array(0,20,20),new Array(5,5,21),new Array(10,9,22),new Array(15,14,23),new Array(4,20,24),new Array(9,5,25),new Array(14,9,26),new Array(3,14,27),new Array(8,20,28),new Array(13,5,29),new Array(2,9,30),new Array(7,14,31),new Array(12,20,32)),a=new Array(new Array(5,4,33),new Array(8,11,34),new Array(11,16,35),new Array(14,23,36),new Array(1,4,37),new Array(4,11,38),new Array(7,16,39),new Array(10,23,40),new Array(13,4,41),new Array(0,11,42),new Array(3,16,43),new Array(6,23,44),new Array(9,4,45),new Array(12,11,46),new Array(15,16,47),new Array(2,23,48)),o=new Array(new Array(0,6,49),new Array(7,10,50),new Array(14,15,51),new Array(5,21,52),new Array(12,6,53),new Array(3,10,54),new Array(10,15,55),new Array(1,21,56),new Array(8,6,57),new Array(15,10,58),new Array(6,15,59),new Array(13,21,60),new Array(4,6,61),new Array(11,10,62),new Array(2,15,63),new Array(9,21,64));function n(x,b,k){return x&b|~x&k}function l(x,b,k){return x&k|b&~k}function h(x,b,k){return x^b^k}function c(x,b,k){return b^(x|~k)}var u=new Array(new Array(n,i),new Array(l,s),new Array(h,a),new Array(c,o));function p(x){return String.fromCharCode(x&255)+String.fromCharCode(x>>>8&255)+String.fromCharCode(x>>>16&255)+String.fromCharCode(x>>>24&255)}function d(x){for(;x<0;)x+=4294967296;for(;x>4294967295;)x-=4294967296;return x}function m(x,b,k,w,S){var _,M,B,z,D,L,Y,q,I;_=w[0],M=w[1],B=w[2],z=w[3],D=S[0],L=S[1],Y=S[2],I=k(b[M],b[B],b[z]),q=b[_]+I+x[D]+r[Y],q=d(q),q=q<>>32-L,q+=b[M],b[_]=d(q)}function g(x){var b,k,w,S,_,M,B,z,D,L,Y,q,I;if(w=new Array(1732584193,4023233417,2562383102,271733878),_=x.length,M=_&63,B=M<56?56-M:120-M,B>0)for(x+="€",L=0;L>4&15),k+="0123456789abcdef".charAt(w&15);return k}return y(t)});let dr=me;function Un(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Hr=Un();function eu(e){Hr=e}const is={exec:()=>null};function Tt(e,t=""){let r=typeof e=="string"?e:e.source;const i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(re.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}const re={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
    /i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Hy=/^(?:[ \t]*(?:\n|$))+/,Yy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Uy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ss=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Gy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Gn=/(?:[*+-]|\d{1,9}[.)])/,ru=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iu=Tt(ru).replace(/bull/g,Gn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),jy=Tt(ru).replace(/bull/g,Gn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),jn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xy=/^[^\n]+/,Xn=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Vy=Tt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Zy=Tt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Gn).getRegex(),Ga="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Vn=/|$))/,Ky=Tt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Vn).replace("tag",Ga).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),su=Tt(jn).replace("hr",Ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ga).getRegex(),Qy=Tt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",su).getRegex(),Zn={blockquote:Qy,code:Yy,def:Vy,fences:Uy,heading:Gy,hr:Ss,html:Ky,lheading:iu,list:Zy,newline:Hy,paragraph:su,table:is,text:Xy},yh=Tt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ga).getRegex(),Jy={...Zn,lheading:jy,table:yh,paragraph:Tt(jn).replace("hr",Ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yh).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ga).getRegex()},t0={...Zn,html:Tt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Vn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:is,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Tt(jn).replace("hr",Ss).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",iu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},e0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,r0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,au=/^( {2,}|\\)\n(?!\s*$)/,i0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,lu=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,l0=Tt(lu,"u").replace(/punct/g,ja).getRegex(),h0=Tt(lu,"u").replace(/punct/g,nu).getRegex(),hu="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",c0=Tt(hu,"gu").replace(/notPunctSpace/g,ou).replace(/punctSpace/g,Kn).replace(/punct/g,ja).getRegex(),u0=Tt(hu,"gu").replace(/notPunctSpace/g,o0).replace(/punctSpace/g,a0).replace(/punct/g,nu).getRegex(),d0=Tt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ou).replace(/punctSpace/g,Kn).replace(/punct/g,ja).getRegex(),p0=Tt(/\\(punct)/,"gu").replace(/punct/g,ja).getRegex(),f0=Tt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),g0=Tt(Vn).replace("(?:-->|$)","-->").getRegex(),m0=Tt("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",g0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),da=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,y0=Tt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",da).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),cu=Tt(/^!?\[(label)\]\[(ref)\]/).replace("label",da).replace("ref",Xn).getRegex(),uu=Tt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xn).getRegex(),x0=Tt("reflink|nolink(?!\\()","g").replace("reflink",cu).replace("nolink",uu).getRegex(),Qn={_backpedal:is,anyPunctuation:p0,autolink:f0,blockSkip:n0,br:au,code:r0,del:is,emStrongLDelim:l0,emStrongRDelimAst:c0,emStrongRDelimUnd:d0,escape:e0,link:y0,nolink:uu,punctuation:s0,reflink:cu,reflinkSearch:x0,tag:m0,text:i0,url:is},C0={...Qn,link:Tt(/^!?\[(label)\]\((.*?)\)/).replace("label",da).getRegex(),reflink:Tt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",da).getRegex()},Ho={...Qn,emStrongRDelimAst:u0,emStrongLDelim:h0,url:Tt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},xh=e=>k0[e];function Pe(e,t){if(t){if(re.escapeTest.test(e))return e.replace(re.escapeReplace,xh)}else if(re.escapeTestNoEncode.test(e))return e.replace(re.escapeReplaceNoEncode,xh);return e}function Ch(e){try{e=encodeURI(e).replace(re.percentDecode,"%")}catch{return null}return e}function bh(e,t){var a;const r=e.replace(re.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(re.splitPipe);let s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length{const o=a.match(r.other.beginningSpace);if(o===null)return a;const[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(` +`)}class pa{constructor(t){J(this,"options");J(this,"rules");J(this,"lexer");this.options=t||Hr}space(t){const r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){const r=this.rules.block.code.exec(t);if(r){const i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Oi(i,` +`)}}}fences(t){const r=this.rules.block.fences.exec(t);if(r){const i=r[0],s=S0(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){const r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){const s=Oi(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){const r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Oi(r[0],` +`)}}blockquote(t){const r=this.rules.block.blockquote.exec(t);if(r){let i=Oi(r[0],` +`).split(` +`),s="",a="";const o=[];for(;i.length>0;){let n=!1;const l=[];let h;for(h=0;h1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");const o=this.rules.other.listItemRegex(i);let n=!1;for(;t;){let h=!1,c="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let p=r[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(` +`,1)[0],m=!p.trim(),g=0;if(this.options.pedantic?(g=2,u=p.trimStart()):m?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=p.slice(g),g+=r[1].length),m&&this.rules.other.blankLine.test(d)&&(c+=d+` +`,t=t.substring(d.length+1),h=!0),!h){const b=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),w=this.rules.other.fencesBeginRegex(g),S=this.rules.other.headingBeginRegex(g),_=this.rules.other.htmlBeginRegex(g);for(;t;){const M=t.split(` +`,1)[0];let B;if(d=M,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),B=d):B=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||S.test(d)||_.test(d)||b.test(d)||k.test(d))break;if(B.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=` +`+B.slice(g);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(p)||S.test(p)||k.test(p))break;u+=` +`+d}!m&&!d.trim()&&(m=!0),c+=M+` +`,t=t.substring(M.length+1),p=B.slice(g)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(n=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:c,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=c}const l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;hp.type==="space"),u=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=u}if(a.loose)for(let h=0;h({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[c]})));return o}}lheading(t){const r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){const r=this.rules.block.paragraph.exec(t);if(r){const i=r[1].charAt(r[1].length-1)===` +`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){const r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){const r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){const r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){const r=this.rules.inline.link.exec(t);if(r){const i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;const o=Oi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{const o=w0(r[2],"()");if(o>-1){const l=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),kh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){const s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){const o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return kh(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const o=[...s[0]].length-1;let n,l,h=o,c=0;const u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,r=r.slice(-1*t.length+o);(s=u.exec(r))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(l=[...n].length,s[3]||s[4]){h+=l;continue}else if((s[5]||s[6])&&o%3&&!((o+l)%3)){c+=l;continue}if(h-=l,h>0)continue;l=Math.min(l,l+h+c);const p=[...s[0]][0].length,d=t.slice(0,o+s.index+p+l);if(Math.min(o,l)%2){const g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}const m=d.slice(2,-2);return{type:"strong",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){const r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," ");const s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){const r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){const r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){const r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){const r=this.rules.inline.text.exec(t);if(r){const i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}}class be{constructor(t){J(this,"tokens");J(this,"options");J(this,"state");J(this,"tokenizer");J(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Hr,this.options.tokenizer=this.options.tokenizer||new pa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:re,block:Rs.normal,inline:Ii.normal};this.options.pedantic?(r.block=Rs.pedantic,r.inline=Ii.pedantic):this.options.gfm&&(r.block=Rs.gfm,this.options.breaks?r.inline=Ii.breaks:r.inline=Ii.gfm),this.tokenizer.rules=r}static get rules(){return{block:Rs,inline:Ii}}static lex(t,r){return new be(r).lex(t)}static lexInline(t,r){return new be(r).inlineTokens(t)}lex(t){t=t.replace(re.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let r=0;r(n=h.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);const h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=` +`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);const h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=` +`+n.raw,h.text+=` +`+n.text,this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);const h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=` +`+n.raw,h.text+=` +`+n.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let h=1/0;const c=t.slice(1);let u;this.options.extensions.startBlock.forEach(p=>{u=p.call({lexer:this},c),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){const h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=` +`+n.raw,h.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);const h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=` +`+n.raw,h.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var n,l,h;let i=t,s=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a=!1,o="";for(;t;){a||(o=""),a=!1;let c;if((l=(n=this.options.extensions)==null?void 0:n.inline)!=null&&l.some(p=>(c=p.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);const p=r.at(-1);c.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=c.raw,p.text+=c.text):r.push(c);continue}if(c=this.tokenizer.emStrong(t,i,o)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.del(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),r.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),r.push(c);continue}let u=t;if((h=this.options.extensions)!=null&&h.startInline){let p=1/0;const d=t.slice(1);let m;this.options.extensions.startInline.forEach(g=>{m=g.call({lexer:this},d),typeof m=="number"&&m>=0&&(p=Math.min(p,m))}),p<1/0&&p>=0&&(u=t.substring(0,p+1))}if(c=this.tokenizer.inlineText(u)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(o=c.raw.slice(-1)),a=!0;const p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=c.raw,p.text+=c.text):r.push(c);continue}if(t){const p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}}class fa{constructor(t){J(this,"options");J(this,"parser");this.options=t||Hr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;const s=(o=(r||"").match(re.notSpaceStart))==null?void 0:o[0],a=t.replace(re.endingNewline,"")+` +`;return s?'
    '+(i?a:Pe(a,!0))+`
    +`:"
    "+(i?a:Pe(a,!0))+`
    +`}blockquote({tokens:t}){return`
    +${this.parser.parse(t)}
    +`}html({text:t}){return t}heading({tokens:t,depth:r}){return`${this.parser.parseInline(t)} +`}hr(t){return`
    +`}list(t){const r=t.ordered,i=t.start;let s="";for(let n=0;n +`+s+" +`}listitem(t){var i;let r="";if(t.task){const s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Pe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`
  • ${r}
  • +`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    +`}table(t){let r="",i="";for(let a=0;a${s}`),` + +`+r+` +`+s+`
    +`}tablerow({text:t}){return` +${t} +`}tablecell(t){const r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+` +`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${Pe(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:r,tokens:i}){const s=this.parser.parseInline(i),a=Ch(t);if(a===null)return s;t=a;let o='
    ",o}image({href:t,title:r,text:i}){const s=Ch(t);if(s===null)return Pe(i);t=s;let a=`${i}{const h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{const s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){const a=this.defaults.renderer||new fa(this.defaults);for(const o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const n=o,l=i.renderer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u||""}}s.renderer=a}if(i.tokenizer){const a=this.defaults.tokenizer||new pa(this.defaults);for(const o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const n=o,l=i.tokenizer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.tokenizer=a}if(i.hooks){const a=this.defaults.hooks||new ss;for(const o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const n=o,l=i.hooks[n],h=a[n];ss.passThroughHooks.has(o)?a[n]=c=>{if(this.defaults.async)return Promise.resolve(l.call(a,c)).then(p=>h.call(a,p));const u=l.call(a,c);return h.call(a,u)}:a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.hooks=a}if(i.walkTokens){const a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return be.lex(t,r??this.defaults)}parser(t,r){return ke.parse(t,r??this.defaults)}parseMarkdown(t){return(i,s)=>{const a={...s},o={...this.defaults,...a},n=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=t);const l=o.hooks?o.hooks.provideLexer():t?be.lex:be.lexInline,h=o.hooks?o.hooks.provideParser():t?ke.parse:ke.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(i):i).then(c=>l(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>h(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(n);try{o.hooks&&(i=o.hooks.preprocess(i));let c=l(i,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let u=h(c,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(c){return n(c)}}}onError(t,r){return i=>{if(i.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const s="

    An error occurred:

    "+Pe(i.message+"",!0)+"
    ";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}}const Ir=new T0;function wt(e,t){return Ir.parse(e,t)}wt.options=wt.setOptions=function(e){return Ir.setOptions(e),wt.defaults=Ir.defaults,eu(wt.defaults),wt};wt.getDefaults=Un;wt.defaults=Hr;wt.use=function(...e){return Ir.use(...e),wt.defaults=Ir.defaults,eu(wt.defaults),wt};wt.walkTokens=function(e,t){return Ir.walkTokens(e,t)};wt.parseInline=Ir.parseInline;wt.Parser=ke;wt.parser=ke.parse;wt.Renderer=fa;wt.TextRenderer=Jn;wt.Lexer=be;wt.lexer=be.lex;wt.Tokenizer=pa;wt.Hooks=ss;wt.parse=wt;wt.options;wt.setOptions;wt.use;wt.walkTokens;wt.parseInline;ke.parse;be.lex;/*! @license DOMPurify 3.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.0/LICENSE */const{entries:du,setPrototypeOf:wh,isFrozen:_0,getPrototypeOf:v0,getOwnPropertyDescriptor:B0}=Object;let{freeze:ae,seal:we,create:Xi}=Object,{apply:Yo,construct:Uo}=typeof Reflect<"u"&&Reflect;ae||(ae=function(t){return t});we||(we=function(t){return t});Yo||(Yo=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a1?r-1:0),s=1;s1?r-1:0),s=1;s2&&arguments[2]!==void 0?arguments[2]:Ks;wh&&wh(e,null);let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(_0(t)||(t[i]=a),s=a)}e[s]=!0}return e}function $0(e){for(let t=0;t/gm),P0=we(/\$\{[\w\W]*/gm),q0=we(/^data-[\-\w.\u00B7-\uFFFF]+$/),N0=we(/^aria-[\-\w]+$/),pu=we(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z0=we(/^(?:\w+script|data):/i),W0=we(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fu=we(/^html$/i),H0=we(/^[a-z][.\w]*(-[.\w]+)+$/i);var Lh=Object.freeze({__proto__:null,ARIA_ATTR:N0,ATTR_WHITESPACE:W0,CUSTOM_ELEMENT:H0,DATA_ATTR:q0,DOCTYPE_NAME:fu,ERB_EXPR:R0,IS_ALLOWED_URI:pu,IS_SCRIPT_OR_DATA:z0,MUSTACHE_EXPR:D0,TMPLIT_EXPR:P0});const Ni={element:1,text:3,progressingInstruction:7,comment:8,document:9},Y0=function(){return typeof window>"u"?null:window},U0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Ah=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function gu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Y0();const t=st=>gu(st);if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==Ni.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,s=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:n,Element:l,NodeFilter:h,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:p,trustedTypes:d}=e,m=l.prototype,g=qi(m,"cloneNode"),y=qi(m,"remove"),x=qi(m,"nextSibling"),b=qi(m,"childNodes"),k=qi(m,"parentNode");if(typeof o=="function"){const st=r.createElement("template");st.content&&st.content.ownerDocument&&(r=st.content.ownerDocument)}let w,S="";const{implementation:_,createNodeIterator:M,createDocumentFragment:B,getElementsByTagName:z}=r,{importNode:D}=i;let L=Ah();t.isSupported=typeof du=="function"&&typeof k=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Y,ERB_EXPR:q,TMPLIT_EXPR:I,DATA_ATTR:$,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:E,CUSTOM_ELEMENT:T}=Lh;let{IS_ALLOWED_URI:N}=Lh,V=null;const ft=yt({},[...Th,...To,..._o,...vo,..._h]);let at=null;const mt=yt({},[...vh,...Bo,...Bh,...Ps]);let it=Object.seal(Xi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),_t=null,$t=null;const It=Object.seal(Xi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Nt=!0,K=!0,nt=!1,H=!0,G=!1,lt=!0,pt=!1,vt=!1,Et=!1,Bt=!1,Lt=!1,Rt=!1,pe=!0,hr=!1;const Ur="user-content-";let Mi=!0,Ve=!1,Gr={},De=null;const fo=yt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let rh=null;const ih=yt({},["audio","video","img","source","image","track"]);let go=null;const sh=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$s="http://www.w3.org/1998/Math/MathML",Is="http://www.w3.org/2000/svg",Re="http://www.w3.org/1999/xhtml";let jr=Re,mo=!1,yo=null;const Oy=yt({},[$s,Is,Re],wo);let Os=yt({},["mi","mo","mn","ms","mtext"]),Ds=yt({},["annotation-xml"]);const Dy=yt({},["title","style","font","a","script"]);let $i=null;const Ry=["application/xhtml+xml","text/html"],Py="text/html";let zt=null,Xr=null;const qy=r.createElement("form"),ah=function(v){return v instanceof RegExp||v instanceof Function},xo=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Xr&&Xr===v)){if((!v||typeof v!="object")&&(v={}),v=qe(v),$i=Ry.indexOf(v.PARSER_MEDIA_TYPE)===-1?Py:v.PARSER_MEDIA_TYPE,zt=$i==="application/xhtml+xml"?wo:Ks,V=_e(v,"ALLOWED_TAGS")?yt({},v.ALLOWED_TAGS,zt):ft,at=_e(v,"ALLOWED_ATTR")?yt({},v.ALLOWED_ATTR,zt):mt,yo=_e(v,"ALLOWED_NAMESPACES")?yt({},v.ALLOWED_NAMESPACES,wo):Oy,go=_e(v,"ADD_URI_SAFE_ATTR")?yt(qe(sh),v.ADD_URI_SAFE_ATTR,zt):sh,rh=_e(v,"ADD_DATA_URI_TAGS")?yt(qe(ih),v.ADD_DATA_URI_TAGS,zt):ih,De=_e(v,"FORBID_CONTENTS")?yt({},v.FORBID_CONTENTS,zt):fo,_t=_e(v,"FORBID_TAGS")?yt({},v.FORBID_TAGS,zt):qe({}),$t=_e(v,"FORBID_ATTR")?yt({},v.FORBID_ATTR,zt):qe({}),Gr=_e(v,"USE_PROFILES")?v.USE_PROFILES:!1,Nt=v.ALLOW_ARIA_ATTR!==!1,K=v.ALLOW_DATA_ATTR!==!1,nt=v.ALLOW_UNKNOWN_PROTOCOLS||!1,H=v.ALLOW_SELF_CLOSE_IN_ATTR!==!1,G=v.SAFE_FOR_TEMPLATES||!1,lt=v.SAFE_FOR_XML!==!1,pt=v.WHOLE_DOCUMENT||!1,Bt=v.RETURN_DOM||!1,Lt=v.RETURN_DOM_FRAGMENT||!1,Rt=v.RETURN_TRUSTED_TYPE||!1,Et=v.FORCE_BODY||!1,pe=v.SANITIZE_DOM!==!1,hr=v.SANITIZE_NAMED_PROPS||!1,Mi=v.KEEP_CONTENT!==!1,Ve=v.IN_PLACE||!1,N=v.ALLOWED_URI_REGEXP||pu,jr=v.NAMESPACE||Re,Os=v.MATHML_TEXT_INTEGRATION_POINTS||Os,Ds=v.HTML_INTEGRATION_POINTS||Ds,it=v.CUSTOM_ELEMENT_HANDLING||Xi(null),v.CUSTOM_ELEMENT_HANDLING&&ah(v.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(it.tagNameCheck=v.CUSTOM_ELEMENT_HANDLING.tagNameCheck),v.CUSTOM_ELEMENT_HANDLING&&ah(v.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(it.attributeNameCheck=v.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),v.CUSTOM_ELEMENT_HANDLING&&typeof v.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(it.allowCustomizedBuiltInElements=v.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),G&&(K=!1),Lt&&(Bt=!0),Gr&&(V=yt({},_h),at=Xi(null),Gr.html===!0&&(yt(V,Th),yt(at,vh)),Gr.svg===!0&&(yt(V,To),yt(at,Bo),yt(at,Ps)),Gr.svgFilters===!0&&(yt(V,_o),yt(at,Bo),yt(at,Ps)),Gr.mathMl===!0&&(yt(V,vo),yt(at,Bh),yt(at,Ps))),It.tagCheck=null,It.attributeCheck=null,v.ADD_TAGS&&(typeof v.ADD_TAGS=="function"?It.tagCheck=v.ADD_TAGS:(V===ft&&(V=qe(V)),yt(V,v.ADD_TAGS,zt))),v.ADD_ATTR&&(typeof v.ADD_ATTR=="function"?It.attributeCheck=v.ADD_ATTR:(at===mt&&(at=qe(at)),yt(at,v.ADD_ATTR,zt))),v.ADD_URI_SAFE_ATTR&&yt(go,v.ADD_URI_SAFE_ATTR,zt),v.FORBID_CONTENTS&&(De===fo&&(De=qe(De)),yt(De,v.FORBID_CONTENTS,zt)),v.ADD_FORBID_CONTENTS&&(De===fo&&(De=qe(De)),yt(De,v.ADD_FORBID_CONTENTS,zt)),Mi&&(V["#text"]=!0),pt&&yt(V,["html","head","body"]),V.table&&(yt(V,["tbody"]),delete _t.tbody),v.TRUSTED_TYPES_POLICY){if(typeof v.TRUSTED_TYPES_POLICY.createHTML!="function")throw Pi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof v.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Pi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=v.TRUSTED_TYPES_POLICY,S=w.createHTML("")}else w===void 0&&(w=U0(d,s)),w!==null&&typeof S=="string"&&(S=w.createHTML(""));ae&&ae(v),Xr=v}},oh=yt({},[...To,..._o,...I0]),nh=yt({},[...vo,...O0]),Ny=function(v){let U=k(v);(!U||!U.tagName)&&(U={namespaceURI:jr,tagName:"template"});const Q=Ks(v.tagName),At=Ks(U.tagName);return yo[v.namespaceURI]?v.namespaceURI===Is?U.namespaceURI===Re?Q==="svg":U.namespaceURI===$s?Q==="svg"&&(At==="annotation-xml"||Os[At]):!!oh[Q]:v.namespaceURI===$s?U.namespaceURI===Re?Q==="math":U.namespaceURI===Is?Q==="math"&&Ds[At]:!!nh[Q]:v.namespaceURI===Re?U.namespaceURI===Is&&!Ds[At]||U.namespaceURI===$s&&!Os[At]?!1:!nh[Q]&&(Dy[Q]||!oh[Q]):!!($i==="application/xhtml+xml"&&yo[v.namespaceURI]):!1},Te=function(v){Ri(t.removed,{element:v});try{k(v).removeChild(v)}catch{y(v)}},Sr=function(v,U){try{Ri(t.removed,{attribute:U.getAttributeNode(v),from:U})}catch{Ri(t.removed,{attribute:null,from:U})}if(U.removeAttribute(v),v==="is")if(Bt||Lt)try{Te(U)}catch{}else try{U.setAttribute(v,"")}catch{}},lh=function(v){let U=null,Q=null;if(Et)v=""+v;else{const Pt=So(v,/^[\r\n\t ]+/);Q=Pt&&Pt[0]}$i==="application/xhtml+xml"&&jr===Re&&(v=''+v+"");const At=w?w.createHTML(v):v;if(jr===Re)try{U=new p().parseFromString(At,$i)}catch{}if(!U||!U.documentElement){U=_.createDocument(jr,"template",null);try{U.documentElement.innerHTML=mo?S:At}catch{}}const Vt=U.body||U.documentElement;return v&&Q&&Vt.insertBefore(r.createTextNode(Q),Vt.childNodes[0]||null),jr===Re?z.call(U,pt?"html":"body")[0]:pt?U.documentElement:Vt},hh=function(v){return M.call(v.ownerDocument||v,v,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Co=function(v){return v instanceof u&&(typeof v.nodeName!="string"||typeof v.textContent!="string"||typeof v.removeChild!="function"||!(v.attributes instanceof c)||typeof v.removeAttribute!="function"||typeof v.setAttribute!="function"||typeof v.namespaceURI!="string"||typeof v.insertBefore!="function"||typeof v.hasChildNodes!="function")},bo=function(v){return typeof n=="function"&&v instanceof n};function Ze(st,v,U){Di(st,Q=>{Q.call(t,v,U,Xr)})}const ch=function(v){let U=null;if(Ze(L.beforeSanitizeElements,v,null),Co(v))return Te(v),!0;const Q=zt(v.nodeName);if(Ze(L.uponSanitizeElement,v,{tagName:Q,allowedTags:V}),lt&&v.hasChildNodes()&&!bo(v.firstElementChild)&&te(/<[/\w!]/g,v.innerHTML)&&te(/<[/\w!]/g,v.textContent)||lt&&v.namespaceURI===Re&&Q==="style"&&bo(v.firstElementChild)||v.nodeType===Ni.progressingInstruction||lt&&v.nodeType===Ni.comment&&te(/<[/\w]/g,v.data))return Te(v),!0;if(_t[Q]||!(It.tagCheck instanceof Function&&It.tagCheck(Q))&&!V[Q]){if(!_t[Q]&&dh(Q)&&(it.tagNameCheck instanceof RegExp&&te(it.tagNameCheck,Q)||it.tagNameCheck instanceof Function&&it.tagNameCheck(Q)))return!1;if(Mi&&!De[Q]){const At=k(v)||v.parentNode,Vt=b(v)||v.childNodes;if(Vt&&At){const Pt=Vt.length;for(let le=Pt-1;le>=0;--le){const fe=g(Vt[le],!0);fe.__removalCount=(v.__removalCount||0)+1,At.insertBefore(fe,x(v))}}}return Te(v),!0}return v instanceof l&&!Ny(v)||(Q==="noscript"||Q==="noembed"||Q==="noframes")&&te(/<\/no(script|embed|frames)/i,v.innerHTML)?(Te(v),!0):(G&&v.nodeType===Ni.text&&(U=v.textContent,Di([Y,q,I],At=>{U=Vr(U,At," ")}),v.textContent!==U&&(Ri(t.removed,{element:v.cloneNode()}),v.textContent=U)),Ze(L.afterSanitizeElements,v,null),!1)},uh=function(v,U,Q){if($t[U]||pe&&(U==="id"||U==="name")&&(Q in r||Q in qy))return!1;if(!(K&&!$t[U]&&te($,U))){if(!(Nt&&te(A,U))){if(!(It.attributeCheck instanceof Function&&It.attributeCheck(U,v))){if(!at[U]||$t[U]){if(!(dh(v)&&(it.tagNameCheck instanceof RegExp&&te(it.tagNameCheck,v)||it.tagNameCheck instanceof Function&&it.tagNameCheck(v))&&(it.attributeNameCheck instanceof RegExp&&te(it.attributeNameCheck,U)||it.attributeNameCheck instanceof Function&&it.attributeNameCheck(U,v))||U==="is"&&it.allowCustomizedBuiltInElements&&(it.tagNameCheck instanceof RegExp&&te(it.tagNameCheck,Q)||it.tagNameCheck instanceof Function&&it.tagNameCheck(Q))))return!1}else if(!go[U]){if(!te(N,Vr(Q,E,""))){if(!((U==="src"||U==="xlink:href"||U==="href")&&v!=="script"&&F0(Q,"data:")===0&&rh[v])){if(!(nt&&!te(O,Vr(Q,E,"")))){if(Q)return!1}}}}}}}return!0},dh=function(v){return v!=="annotation-xml"&&So(v,T)},ph=function(v){Ze(L.beforeSanitizeAttributes,v,null);const{attributes:U}=v;if(!U||Co(v))return;const Q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:at,forceKeepAttr:void 0};let At=U.length;for(;At--;){const Vt=U[At],{name:Pt,namespaceURI:le,value:fe}=Vt,cr=zt(Pt),ko=fe;let Gt=Pt==="value"?ko:E0(ko);if(Q.attrName=cr,Q.attrValue=Gt,Q.keepAttr=!0,Q.forceKeepAttr=void 0,Ze(L.uponSanitizeAttribute,v,Q),Gt=Q.attrValue,hr&&(cr==="id"||cr==="name")&&(Sr(Pt,v),Gt=Ur+Gt),lt&&te(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Gt)){Sr(Pt,v);continue}if(cr==="attributename"&&So(Gt,"href")){Sr(Pt,v);continue}if(Q.forceKeepAttr)continue;if(!Q.keepAttr){Sr(Pt,v);continue}if(!H&&te(/\/>/i,Gt)){Sr(Pt,v);continue}G&&Di([Y,q,I],mh=>{Gt=Vr(Gt,mh," ")});const gh=zt(v.nodeName);if(!uh(gh,cr,Gt)){Sr(Pt,v);continue}if(w&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!le)switch(d.getAttributeType(gh,cr)){case"TrustedHTML":{Gt=w.createHTML(Gt);break}case"TrustedScriptURL":{Gt=w.createScriptURL(Gt);break}}if(Gt!==ko)try{le?v.setAttributeNS(le,Pt,Gt):v.setAttribute(Pt,Gt),Co(v)?Te(v):Sh(t.removed)}catch{Sr(Pt,v)}}Ze(L.afterSanitizeAttributes,v,null)},fh=function(v){let U=null;const Q=hh(v);for(Ze(L.beforeSanitizeShadowDOM,v,null);U=Q.nextNode();)Ze(L.uponSanitizeShadowNode,U,null),ch(U),ph(U),U.content instanceof a&&fh(U.content);Ze(L.afterSanitizeShadowDOM,v,null)};return t.sanitize=function(st){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=null,Q=null,At=null,Vt=null;if(mo=!st,mo&&(st=""),typeof st!="string"&&!bo(st))if(typeof st.toString=="function"){if(st=st.toString(),typeof st!="string")throw Pi("dirty is not a string, aborting")}else throw Pi("toString is not a function");if(!t.isSupported)return st;if(vt||xo(v),t.removed=[],typeof st=="string"&&(Ve=!1),Ve){if(st.nodeName){const fe=zt(st.nodeName);if(!V[fe]||_t[fe])throw Pi("root node is forbidden and cannot be sanitized in-place")}}else if(st instanceof n)U=lh(""),Q=U.ownerDocument.importNode(st,!0),Q.nodeType===Ni.element&&Q.nodeName==="BODY"||Q.nodeName==="HTML"?U=Q:U.appendChild(Q);else{if(!Bt&&!G&&!pt&&st.indexOf("<")===-1)return w&&Rt?w.createHTML(st):st;if(U=lh(st),!U)return Bt?null:Rt?S:""}U&&Et&&Te(U.firstChild);const Pt=hh(Ve?st:U);for(;At=Pt.nextNode();)ch(At),ph(At),At.content instanceof a&&fh(At.content);if(Ve)return st;if(Bt){if(G){U.normalize();let fe=U.innerHTML;Di([Y,q,I],cr=>{fe=Vr(fe,cr," ")}),U.innerHTML=fe}if(Lt)for(Vt=B.call(U.ownerDocument);U.firstChild;)Vt.appendChild(U.firstChild);else Vt=U;return(at.shadowroot||at.shadowrootmode)&&(Vt=D.call(i,Vt,!0)),Vt}let le=pt?U.outerHTML:U.innerHTML;return pt&&V["!doctype"]&&U.ownerDocument&&U.ownerDocument.doctype&&U.ownerDocument.doctype.name&&te(fu,U.ownerDocument.doctype.name)&&(le=" +`+le),G&&Di([Y,q,I],fe=>{le=Vr(le,fe," ")}),w&&Rt?w.createHTML(le):le},t.setConfig=function(){let st=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xo(st),vt=!0},t.clearConfig=function(){Xr=null,vt=!1},t.isValidAttribute=function(st,v,U){Xr||xo({});const Q=zt(st),At=zt(v);return uh(Q,At,U)},t.addHook=function(st,v){typeof v=="function"&&Ri(L[st],v)},t.removeHook=function(st,v){if(v!==void 0){const U=L0(L[st],v);return U===-1?void 0:A0(L[st],U,1)[0]}return Sh(L[st])},t.removeHooks=function(st){L[st]=[]},t.removeAllHooks=function(){L=Ah()},t}var Or=gu();const G0="modulepreload",j0=function(e){return"/"+e},Fh={},Ct=function(t,r,i){let s=Promise.resolve();if(r&&r.length>0){let o=function(h){return Promise.all(h.map(c=>Promise.resolve(c).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),l=(n==null?void 0:n.nonce)||(n==null?void 0:n.getAttribute("nonce"));s=o(r.map(h=>{if(h=j0(h),h in Fh)return;Fh[h]=!0;const c=h.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${u}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":G0,c||(p.as="script"),p.crossOrigin="",p.href=h,l&&p.setAttribute("nonce",l),document.head.appendChild(p),c)return new Promise((d,m)=>{p.addEventListener("load",d),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${h}`)))})}))}function a(o){const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=o,window.dispatchEvent(n),!n.defaultPrevented)throw o}return s.then(o=>{for(const n of o||[])n.status==="rejected"&&a(n.reason);return t().catch(a)})};function X0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qs={exports:{}},V0=Qs.exports,Eh;function Z0(){return Eh||(Eh=1,function(e,t){(function(r,i){e.exports=i()})(V0,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",h="day",c="week",u="month",p="quarter",d="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var $=["th","st","nd","rd"],A=I%100;return"["+I+($[(A-20)%10]||$[A]||$[0])+"]"}},k=function(I,$,A){var O=String(I);return!O||O.length>=$?I:""+Array($+1-O.length).join(A)+I},w={s:k,z:function(I){var $=-I.utcOffset(),A=Math.abs($),O=Math.floor(A/60),E=A%60;return($<=0?"+":"-")+k(O,2,"0")+":"+k(E,2,"0")},m:function I($,A){if($.date()1)return I(N[0])}else{var V=$.name;_[V]=$,E=V}return!O&&E&&(S=E),E||!O&&S},D=function(I,$){if(B(I))return I.clone();var A=typeof $=="object"?$:{};return A.date=I,A.args=arguments,new Y(A)},L=w;L.l=z,L.i=B,L.w=function(I,$){return D(I,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var Y=function(){function I(A){this.$L=z(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[M]=!0}var $=I.prototype;return $.parse=function(A){this.$d=function(O){var E=O.date,T=O.utc;if(E===null)return new Date(NaN);if(L.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var N=E.match(y);if(N){var V=N[2]-1||0,ft=(N[7]||"0").substring(0,3);return T?new Date(Date.UTC(N[1],V,N[3]||1,N[4]||0,N[5]||0,N[6]||0,ft)):new Date(N[1],V,N[3]||1,N[4]||0,N[5]||0,N[6]||0,ft)}}return new Date(E)}(A),this.init()},$.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},$.$utils=function(){return L},$.isValid=function(){return this.$d.toString()!==g},$.isSame=function(A,O){var E=D(A);return this.startOf(O)<=E&&E<=this.endOf(O)},$.isAfter=function(A,O){return D(A)mu(e,"name",{value:t,configurable:!0}),J0=(e,t)=>{for(var r in t)mu(e,r,{get:t[r],enumerable:!0})},Qe={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},W={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},tl=f(function(e="fatal"){let t=Qe.fatal;typeof e=="string"?e.toLowerCase()in Qe&&(t=Qe[e]):typeof e=="number"&&(t=e),W.trace=()=>{},W.debug=()=>{},W.info=()=>{},W.warn=()=>{},W.error=()=>{},W.fatal=()=>{},t<=Qe.fatal&&(W.fatal=console.error?console.error.bind(console,Ce("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ce("FATAL"))),t<=Qe.error&&(W.error=console.error?console.error.bind(console,Ce("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ce("ERROR"))),t<=Qe.warn&&(W.warn=console.warn?console.warn.bind(console,Ce("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ce("WARN"))),t<=Qe.info&&(W.info=console.info?console.info.bind(console,Ce("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ce("INFO"))),t<=Qe.debug&&(W.debug=console.debug?console.debug.bind(console,Ce("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ce("DEBUG"))),t<=Qe.trace&&(W.trace=console.debug?console.debug.bind(console,Ce("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ce("TRACE")))},"setLogLevel"),Ce=f(e=>`%c${Q0().format("ss.SSS")} : ${e} : `,"format");const Js={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return Js.hue2rgb(a,s,e+1/3)*255;case"g":return Js.hue2rgb(a,s,e)*255;case"b":return Js.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},ex={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},dt={channel:Js,lang:tx,unit:ex},ur={};for(let e=0;e<=255;e++)ur[e]=dt.unit.dec2hex(e);const Zt={ALL:0,RGB:1,HSL:2};class rx{constructor(){this.type=Zt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Zt.ALL}is(t){return this.type===t}}class ix{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new rx}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Zt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=dt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=dt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=dt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=dt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=dt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=dt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),dt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),dt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),dt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),dt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),dt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),dt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Zt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Zt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Zt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Zt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Zt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Zt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Xa=new ix({r:0,g:0,b:0,a:0},"transparent"),si={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(si.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,h=a?0:-1,c=o?255:15;return Xa.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${ur[Math.round(t)]}${ur[Math.round(r)]}${ur[Math.round(i)]}${ur[Math.round(s*255)]}`:`#${ur[Math.round(t)]}${ur[Math.round(r)]}${ur[Math.round(i)]}`}},Lr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Lr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return dt.channel.clamp.h(parseFloat(r)*.9);case"rad":return dt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return dt.channel.clamp.h(parseFloat(r)*360)}}return dt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Lr.re);if(!r)return;const[,i,s,a,o,n]=r;return Xa.set({h:Lr._hue2deg(i),s:dt.channel.clamp.s(parseFloat(s)),l:dt.channel.clamp.l(parseFloat(a)),a:o?dt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${dt.lang.round(t)}, ${dt.lang.round(r)}%, ${dt.lang.round(i)}%, ${s})`:`hsl(${dt.lang.round(t)}, ${dt.lang.round(r)}%, ${dt.lang.round(i)}%)`}},as={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=as.colors[e];if(t)return si.parse(t)},stringify:e=>{const t=si.stringify(e);for(const r in as.colors)if(as.colors[r]===t)return r}},Vi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Vi.re);if(!r)return;const[,i,s,a,o,n,l,h,c]=r;return Xa.set({r:dt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:dt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:dt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?dt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${dt.lang.round(t)}, ${dt.lang.round(r)}, ${dt.lang.round(i)}, ${dt.lang.round(s)})`:`rgb(${dt.lang.round(t)}, ${dt.lang.round(r)}, ${dt.lang.round(i)})`}},Ye={format:{keyword:as,hex:si,rgb:Vi,rgba:Vi,hsl:Lr,hsla:Lr},parse:e=>{if(typeof e!="string")return e;const t=si.parse(e)||Vi.parse(e)||Lr.parse(e)||as.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Zt.HSL)||e.data.r===void 0?Lr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Vi.stringify(e):si.stringify(e)},yu=(e,t)=>{const r=Ye.parse(e);for(const i in t)r[i]=dt.channel.clamp[i](t[i]);return Ye.stringify(r)},mr=(e,t,r=0,i=1)=>{if(typeof e!="number")return yu(e,{a:t});const s=Xa.set({r:dt.channel.clamp.r(e),g:dt.channel.clamp.g(t),b:dt.channel.clamp.b(r),a:dt.channel.clamp.a(i)});return Ye.stringify(s)},sx=e=>{const{r:t,g:r,b:i}=Ye.parse(e),s=.2126*dt.channel.toLinear(t)+.7152*dt.channel.toLinear(r)+.0722*dt.channel.toLinear(i);return dt.lang.round(s)},ax=e=>sx(e)>=.5,Ie=e=>!ax(e),xu=(e,t,r)=>{const i=Ye.parse(e),s=i[t],a=dt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Ye.stringify(i)},R=(e,t)=>xu(e,"l",t),P=(e,t)=>xu(e,"l",-t),C=(e,t)=>{const r=Ye.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return yu(e,i)},ox=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Ye.parse(e),{r:n,g:l,b:h,a:c}=Ye.parse(t),u=r/100,p=u*2-1,d=o-c,g=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,y=1-g,x=i*g+n*y,b=s*g+l*y,k=a*g+h*y,w=o*u+c*(1-u);return mr(x,b,k,w)},F=(e,t=100)=>{const r=Ye.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,ox(r,e,t)};var Cu=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,os=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,nx=/\s*%%.*\n/gm,ni,bu=(ni=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(ni,"UnknownDiagramError"),ni),Dr={},el=f(function(e,t){e=e.replace(Cu,"").replace(os,"").replace(nx,` +`);for(const[r,{detector:i}]of Object.entries(Dr))if(i(e,t))return r;throw new bu(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Go=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)ku(t,r,i)},"registerLazyLoadedDiagrams"),ku=f((e,t,r)=>{Dr[e]&&W.warn(`Detector with key ${e} already exists. Overwriting.`),Dr[e]={detector:t,loader:r},W.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),lx=f(e=>Dr[e].loader,"getDiagramLoader"),jo=f((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>jo(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=jo(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Ht=jo,Ge="#ffffff",je="#f2f2f2",ut=f((e,t)=>t?C(e,{s:-40,l:10}):C(e,{s:-40,l:-10}),"mkBorder"),li,hx=(li=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,h,c,u,p,d,m,g,y,x,b,k,w,S,_,M,B,z,D,L,Y,q,I,$,A,O,E,T;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?P(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||P(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||P(this.mainBkg,10)):(this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let N=0;N{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(li,"Theme"),li),cx=f(e=>{const t=new hx;return t.calculate(e),t},"getThemeVariables"),hi,ux=(hi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=mr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=P("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=P(this.sectionBkgColor,10),this.taskBorderColor=mr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=mr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||P(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,l,h,c,u,p,d,m,g,y,x,b,k,w,S,_,M,B,z,D,L,Y,q,I,$,A,O,E;this.secondBkg=R(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=R(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=R(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=F(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330});for(let T=0;T{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(hi,"Theme"),hi),dx=f(e=>{const t=new ux;return t.calculate(e),t},"getThemeVariables"),ci,px=(ci=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=C(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ut(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=mr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,l,h,c,u,p,d,m,g,y,x,b,k,w,S,_,M,B,z,D,L,Y,q,I,$,A,O,E;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||P(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||P(this.tertiaryColor,40);for(let T=0;T{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ci,"Theme"),ci),fx=f(e=>{const t=new px;return t.calculate(e),t},"getThemeVariables"),ui,gx=(ui=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=R("#cde498",10),this.primaryBorderColor=ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,l,h,c,u,p,d,m,g,y,x,b,k,w,S,_,M,B,z,D,L,Y,q,I,$,A,O,E;this.actorBorder=P(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||P(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||P(this.tertiaryColor,40);for(let T=0;T{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ui,"Theme"),ui),mx=f(e=>{const t=new gx;return t.calculate(e),t},"getThemeVariables"),di,yx=(di=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=R(this.contrast,55),this.background="#ffffff",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,l,h,c,u,p,d,m,g,y,x,b,k,w,S,_,M,B,z,D,L,Y,q,I,$,A,O,E;this.secondBkg=R(this.contrast,55),this.border2=this.contrast,this.actorBorder=R(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let T=0;T{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(di,"Theme"),di),xx=f(e=>{const t=new yx;return t.calculate(e),t},"getThemeVariables"),pi,Cx=(pi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ut(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,h,c,u,p,d,m,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?P(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=C(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||C(t,{h:30}),this.cScale4=this.cScale4||C(t,{h:60}),this.cScale5=this.cScale5||C(t,{h:90}),this.cScale6=this.cScale6||C(t,{h:120}),this.cScale7=this.cScale7||C(t,{h:150}),this.cScale8=this.cScale8||C(t,{h:210,l:150}),this.cScale9=this.cScale9||C(t,{h:270}),this.cScale10=this.cScale10||C(t,{h:300}),this.cScale11=this.cScale11||C(t,{h:330}),this.darkMode)for(let y=0;y{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(pi,"Theme"),pi),bx=f(e=>{const t=new Cx;return t.calculate(e),t},"getThemeVariables"),fi,kx=(fi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=mr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?P(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(fi,"Theme"),fi),wx=f(e=>{const t=new kx;return t.calculate(e),t},"getThemeVariables"),gi,Sx=(gi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ut("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,u,p,d,m,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?P(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=C(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let y=0;y{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(gi,"Theme"),gi),Tx=f(e=>{const t=new Sx;return t.calculate(e),t},"getThemeVariables"),mi,_x=(mi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=mr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?P(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(mi,"Theme"),mi),vx=f(e=>{const t=new _x;return t.calculate(e),t},"getThemeVariables"),yi,Bx=(yi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ut(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,u,p,d,m,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?P(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=C(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let y=0;y{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(yi,"Theme"),yi),Lx=f(e=>{const t=new Bx;return t.calculate(e),t},"getThemeVariables"),xi,Ax=(xi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=mr(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,h,c,u,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?P(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let d=0;d{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(xi,"Theme"),xi),Fx=f(e=>{const t=new Ax;return t.calculate(e),t},"getThemeVariables"),rr={base:{getThemeVariables:cx},dark:{getThemeVariables:dx},default:{getThemeVariables:fx},forest:{getThemeVariables:mx},neutral:{getThemeVariables:xx},neo:{getThemeVariables:bx},"neo-dark":{getThemeVariables:wx},redux:{getThemeVariables:Tx},"redux-dark":{getThemeVariables:vx},"redux-color":{getThemeVariables:Lx},"redux-dark-color":{getThemeVariables:Fx}},ee={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},wu={...ee,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:rr.default.getThemeVariables(),sequence:{...ee.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ee.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ee.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ee.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ee.pie,useWidth:984},xyChart:{...ee.xyChart,useWidth:void 0},requirement:{...ee.requirement,useWidth:void 0},packet:{...ee.packet},eventmodeling:{...ee.eventmodeling},treeView:{...ee.treeView,useWidth:void 0},radar:{...ee.radar},ishikawa:{...ee.ishikawa},sankey:{...ee.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...ee.venn}},Su=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Su(e[i],"")]:[...r,t+i],[]),"keyify"),Ex=new Set(Su(wu,"")),Tu=wu,ga=f(e=>{if(W.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ga(t));return}for(const t of Object.keys(e)){if(W.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Ex.has(t)||e[t]==null){W.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(W.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else W.debug("sanitizing object",t),ga(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(W.debug("sanitizing css option",t),e[t]=_u(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}W.debug("After sanitization",e)}},"sanitizeDirective"),_u=f(e=>{let t=0,r=0;for(const i of e){if(t!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ce=Ht({},ki),ma,Rr=[],ns=Ht({},ki),Va=f((e,t)=>{let r=Ht({},e),i={};for(const s of t)Lu(s),i=Ht(i,s);if(r=Ht(r,i),i.theme&&i.theme in rr){const s=Ht({},ma),a=Ht(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in rr&&(r.themeVariables=rr[r.theme].getThemeVariables(a))}return ns=r,Fu(ns),ns},"updateCurrentConfig"),Mx=f(e=>(ce=Ht({},ki),ce=Ht(ce,e),e.theme&&rr[e.theme]&&(ce.themeVariables=rr[e.theme].getThemeVariables(e.themeVariables)),Va(ce,Rr),ce),"setSiteConfig"),$x=f(e=>{ma=Ht({},e)},"saveConfigFromInitialize"),Ix=f(e=>(ce=Ht(ce,e),Va(ce,Rr),ce),"updateSiteConfig"),vu=f(()=>Ht({},ce),"getSiteConfig"),Bu=f(e=>(Fu(e),Ht(ns,e),Mt()),"setConfig"),Mt=f(()=>Ht({},ns),"getConfig"),Lu=f(e=>{e&&(["secure",...ce.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(W.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Lu(e[t])}))},"sanitize"),Ox=f(e=>{var t;ga(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Rr.push(e),Va(ce,Rr)},"addDirective"),ya=f((e=ce)=>{Rr=[],Va(e,Rr)},"reset"),Dx={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Mh={},Au=f(e=>{Mh[e]||(W.warn(Dx[e]),Mh[e]=!0)},"issueWarning"),Fu=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Au("LAZY_LOAD_DEPRECATED")},"checkConfig"),ZL=f(()=>{let e={};ma&&(e=Ht(e,ma));for(const t of Rr)e=Ht(e,t);return e},"getUserDefinedConfig"),ne=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Au("FLOWCHART_HTML_LABELS_DEPRECATED"),or(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Ts=//gi,Rx=f(e=>e?$u(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Px=(()=>{let e=!1;return()=>{e||(Eu(),e=!0)}})();function Eu(){const e="data-temp-href-target";Or.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Or.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}f(Eu,"setupDompurifyHooks");var Mu=f(e=>(Px(),Or.sanitize(e)),"removeScript"),$h=f((e,t)=>{if(ne(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Mu(e):r!=="loose"&&(e=$u(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=Wx(e))}return e},"sanitizeMore"),$e=f((e,t)=>e&&(t.dompurifyConfig?e=Or.sanitize($h(e,t),t.dompurifyConfig).toString():e=Or.sanitize($h(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),qx=f((e,t)=>typeof e=="string"?$e(e,t):e.flat().map(r=>$e(r,t)),"sanitizeTextOrArray"),Nx=f(e=>Ts.test(e),"hasBreaks"),zx=f(e=>e.split(Ts),"splitBreaks"),Wx=f(e=>e.replace(/#br#/g,"
    "),"placeholderToBreak"),$u=f(e=>e.replace(Ts,"#br#"),"breakToPlaceholder"),Hx=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Yx=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Ux=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Ih=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),Gx=f((e,t)=>{const r=Xo(e,"~"),i=Xo(t,"~");return r===1&&i===1},"shouldCombineSets"),jx=f(e=>{const t=Xo(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Oh=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Vo=/\$\$(.*)\$\$/g,us=f(e=>{var t;return(((t=e.match(Vo))==null?void 0:t.length)??0)>0},"hasKatex"),KL=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Iu(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),Xx=f(async(e,t)=>{if(!us(e))return e;if(!(Oh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Vo,"MathML is unsupported in this environment.");{const{default:r}=await Ct(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[]),i=t.forceLegacyMathML||!Oh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ts).map(s=>us(s)?`
    ${s}
    `:`
    ${s}
    `).join("").replace(Vo,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),Iu=f(async(e,t)=>$e(await Xx(e,t),t),"renderKatexSanitized"),_s={getRows:Rx,sanitizeText:$e,sanitizeTextOrArray:qx,hasBreaks:Nx,splitBreaks:zx,lineBreakRegex:Ts,removeScript:Mu,getUrl:Hx,evaluate:or,getMax:Yx,getMin:Ux},Vx=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Zx=f(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Ou=f(function(e,t,r,i){const s=Zx(t,r,i);Vx(e,s)},"configureSvgSize"),Kx=f(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;W.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;W.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,W.info(`Calculated bounds: ${n}x${l}`),Ou(t,l,n,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),ta={};function Zo(e){return[...e.cssRules].map(t=>t.cssText).join(` +`)}f(Zo,"cssStyleSheetToString");var Qx=f((e,t,r,i)=>{let s="";return e in ta&&ta[e]?s=ta[e]({...r,svgId:i}):W.warn(`No theme found for ${e}`),` & { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + @keyframes edge-animation-frame { + from { + stroke-dashoffset: 0; + } + } + @keyframes dash { + to { + stroke-dashoffset: 0; + } + } + & .edge-animation-slow { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 50s linear infinite; + stroke-linecap: round; + } + & .edge-animation-fast { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 20s linear infinite; + stroke-linecap: round; + } + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: ${r.strokeWidth??1}px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${s} + .node .neo-node { + stroke: ${r.nodeBorder}; + } + + [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { + stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + + [data-look="neo"].node path { + stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + stroke-width: ${r.strokeWidth??1}px; + } + + [data-look="neo"].node .outer-path { + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node .neo-line path { + stroke: ${r.nodeBorder}; + filter: none; + } + + [data-look="neo"].node circle{ + stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node circle .state-start{ + fill: #000000; + } + + [data-look="neo"].icon-shape .icon { + fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + [data-look="neo"].icon-shape .icon-neo path { + stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + ${t} +`},"getStyles"),Jx=f((e,t)=>{t!==void 0&&(ta[e]=t)},"addStylesForDiagram"),tC=Qx,Du={};J0(Du,{clear:()=>eC,getAccDescription:()=>aC,getAccTitle:()=>iC,getDiagramTitle:()=>nC,setAccDescription:()=>sC,setAccTitle:()=>rC,setDiagramTitle:()=>oC});var rl="",il="",sl="",al=f(e=>$e(e,Mt()),"sanitizeText"),eC=f(()=>{rl="",sl="",il=""},"clear"),rC=f(e=>{rl=al(e).replace(/^\s+/g,"")},"setAccTitle"),iC=f(()=>rl,"getAccTitle"),sC=f(e=>{sl=al(e).replace(/\n\s+/g,` +`)},"setAccDescription"),aC=f(()=>sl,"getAccDescription"),oC=f(e=>{il=al(e)},"setDiagramTitle"),nC=f(()=>il,"getDiagramTitle"),Dh=W,lC=tl,bt=Mt,QL=Bu,JL=ki,ol=f(e=>$e(e,bt()),"sanitizeText"),hC=Kx,cC=f(()=>Du,"getCommonDb"),xa={},Ca=f((e,t,r)=>{var i;xa[e]&&Dh.warn(`Diagram with id ${e} already registered. Overwriting.`),xa[e]=t,r&&ku(e,r),Jx(e,t.styles),(i=t.injectUtils)==null||i.call(t,Dh,lC,bt,ol,hC,cC(),()=>{})},"registerDiagram"),Ko=f(e=>{if(e in xa)return xa[e];throw new uC(e)},"getDiagram"),Ci,uC=(Ci=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(Ci,"DiagramNotFoundError"),Ci),dC={value:()=>{}};function Ru(){for(var e=0,t=arguments.length,r={},i;e=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}ea.prototype=Ru.prototype={constructor:ea,on:function(e,t){var r=this._,i=pC(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(s),i=0,s,a;i=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Ph.hasOwnProperty(t)?{space:Ph[t],local:e}:e}function gC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Qo&&t.documentElement.namespaceURI===Qo?t.createElement(e):t.createElementNS(r,e)}}function mC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Pu(e){var t=Za(e);return(t.local?mC:gC)(t)}function yC(){}function nl(e){return e==null?yC:function(){return this.querySelector(e)}}function xC(e){typeof e!="function"&&(e=nl(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s=k&&(k=b+1);!(S=y[k])&&++k=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function HC(e){e||(e=YC);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var r=this._groups,i=r.length,s=new Array(i),a=0;at?1:e>=t?0:NaN}function UC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function GC(){return Array.from(this)}function jC(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?sb:typeof t=="function"?ob:ab)(e,t,r??"")):wi(this.node(),e)}function wi(e,t){return e.style.getPropertyValue(t)||Hu(e).getComputedStyle(e,null).getPropertyValue(t)}function lb(e){return function(){delete this[e]}}function hb(e,t){return function(){this[e]=t}}function cb(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function ub(e,t){return arguments.length>1?this.each((t==null?lb:typeof t=="function"?cb:hb)(e,t)):this.node()[e]}function Yu(e){return e.trim().split(/^|\s+/)}function ll(e){return e.classList||new Uu(e)}function Uu(e){this._node=e,this._names=Yu(e.getAttribute("class")||"")}Uu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Gu(e,t){for(var r=ll(e),i=-1,s=t.length;++i=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function qb(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?qs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?qs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Xb.exec(e))?new de(t[1],t[2],t[3],1):(t=Vb.exec(e))?new de(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Zb.exec(e))?qs(t[1],t[2],t[3],t[4]):(t=Kb.exec(e))?qs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Qb.exec(e))?Uh(t[1],t[2]/100,t[3]/100,1):(t=Jb.exec(e))?Uh(t[1],t[2]/100,t[3]/100,t[4]):qh.hasOwnProperty(e)?Wh(qh[e]):e==="transparent"?new de(NaN,NaN,NaN,0):null}function Wh(e){return new de(e>>16&255,e>>8&255,e&255,1)}function qs(e,t,r,i){return i<=0&&(e=t=r=NaN),new de(e,t,r,i)}function rk(e){return e instanceof Bs||(e=fs(e)),e?(e=e.rgb(),new de(e.r,e.g,e.b,e.opacity)):new de}function Jo(e,t,r,i){return arguments.length===1?rk(e):new de(e,t,r,i??1)}function de(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}hl(de,Jo,Zu(Bs,{brighter(e){return e=e==null?ka:Math.pow(ka,e),new de(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ds:Math.pow(ds,e),new de(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new de(Mr(this.r),Mr(this.g),Mr(this.b),wa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Hh,formatHex:Hh,formatHex8:ik,formatRgb:Yh,toString:Yh}));function Hh(){return`#${Ar(this.r)}${Ar(this.g)}${Ar(this.b)}`}function ik(){return`#${Ar(this.r)}${Ar(this.g)}${Ar(this.b)}${Ar((isNaN(this.opacity)?1:this.opacity)*255)}`}function Yh(){const e=wa(this.opacity);return`${e===1?"rgb(":"rgba("}${Mr(this.r)}, ${Mr(this.g)}, ${Mr(this.b)}${e===1?")":`, ${e})`}`}function wa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Mr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ar(e){return e=Mr(e),(e<16?"0":"")+e.toString(16)}function Uh(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ae(e,t,r,i)}function Ku(e){if(e instanceof Ae)return new Ae(e.h,e.s,e.l,e.opacity);if(e instanceof Bs||(e=fs(e)),!e)return new Ae;if(e instanceof Ae)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,n=a-s,l=(a+s)/2;return n?(t===a?o=(r-i)/n+(r0&&l<1?0:o,new Ae(o,n,l,e.opacity)}function sk(e,t,r,i){return arguments.length===1?Ku(e):new Ae(e,t,r,i??1)}function Ae(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}hl(Ae,sk,Zu(Bs,{brighter(e){return e=e==null?ka:Math.pow(ka,e),new Ae(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ds:Math.pow(ds,e),new Ae(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new de(Lo(e>=240?e-240:e+120,s,i),Lo(e,s,i),Lo(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Ae(Gh(this.h),Ns(this.s),Ns(this.l),wa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=wa(this.opacity);return`${e===1?"hsl(":"hsla("}${Gh(this.h)}, ${Ns(this.s)*100}%, ${Ns(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Gh(e){return e=(e||0)%360,e<0?e+360:e}function Ns(e){return Math.max(0,Math.min(1,e||0))}function Lo(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const cl=e=>()=>e;function Qu(e,t){return function(r){return e+r*t}}function ak(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function tA(e,t){var r=t-e;return r?Qu(e,r>180||r<-180?r-360*Math.round(r/360):r):cl(isNaN(e)?t:e)}function ok(e){return(e=+e)==1?Ju:function(t,r){return r-t?ak(t,r,e):cl(isNaN(t)?r:t)}}function Ju(e,t){var r=t-e;return r?Qu(e,r):cl(isNaN(e)?t:e)}const jh=function e(t){var r=ok(t);function i(s,a){var o=r((s=Jo(s)).r,(a=Jo(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),h=Ju(s.opacity,a.opacity);return function(c){return s.r=o(c),s.g=n(c),s.b=l(c),s.opacity=h(c),s+""}}return i.gamma=e,i}(1);function pr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var tn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ao=new RegExp(tn.source,"g");function nk(e){return function(){return e}}function lk(e){return function(t){return e(t)+""}}function hk(e,t){var r=tn.lastIndex=Ao.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=tn.exec(e))&&(s=Ao.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),n[o]?n[o]+=a:n[++o]=a),(i=i[0])===(s=s[0])?n[o]?n[o]+=s:n[++o]=s:(n[++o]=null,l.push({i:o,x:pr(i,s)})),r=Ao.lastIndex;return r180?c+=360:c-h>180&&(h+=360),p.push({i:u.push(s(u)+"rotate(",null,i)-2,x:pr(h,c)})):c&&u.push(s(u)+"rotate("+c+i)}function n(h,c,u,p){h!==c?p.push({i:u.push(s(u)+"skewX(",null,i)-2,x:pr(h,c)}):c&&u.push(s(u)+"skewX("+c+i)}function l(h,c,u,p,d,m){if(h!==u||c!==p){var g=d.push(s(d)+"scale(",null,",",null,")");m.push({i:g-4,x:pr(h,u)},{i:g-2,x:pr(c,p)})}else(u!==1||p!==1)&&d.push(s(d)+"scale("+u+","+p+")")}return function(h,c){var u=[],p=[];return h=e(h),c=e(c),a(h.translateX,h.translateY,c.translateX,c.translateY,u,p),o(h.rotate,c.rotate,u,p),n(h.skewX,c.skewX,u,p),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,u,p),h=c=null,function(d){for(var m=-1,g=p.length,y;++m=0&&e._call.call(void 0,t),e=e._next;--Si}function Vh(){Pr=(Ta=gs.now())+Ka,Si=Zi=0;try{gk()}finally{Si=0,yk(),Pr=0}}function mk(){var e=gs.now(),t=e-Ta;t>rd&&(Ka-=t,Ta=e)}function yk(){for(var e,t=Sa,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Sa=r);Ki=e,rn(i)}function rn(e){if(!Si){Zi&&(Zi=clearTimeout(Zi));var t=e-Pr;t>24?(e<1/0&&(Zi=setTimeout(Vh,e-gs.now()-Ka)),zi&&(zi=clearInterval(zi))):(zi||(Ta=gs.now(),zi=setInterval(mk,rd)),Si=1,id(Vh))}}function Zh(e,t,r){var i=new _a;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var xk=Ru("start","end","cancel","interrupt"),Ck=[],ad=0,Kh=1,sn=2,ra=3,Qh=4,an=5,ia=6;function Qa(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;bk(e,r,{name:t,index:i,group:s,on:xk,tween:Ck,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ad})}function dl(e,t){var r=Oe(e,t);if(r.state>ad)throw new Error("too late; already scheduled");return r}function Xe(e,t){var r=Oe(e,t);if(r.state>ra)throw new Error("too late; already running");return r}function Oe(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function bk(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=sd(a,0,r.time);function a(h){r.state=Kh,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}function o(h){var c,u,p,d;if(r.state!==Kh)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===ra)return Zh(o);d.state===Qh?(d.state=ia,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+csn&&i.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function Kk(e,t,r){var i,s,a=Zk(t)?dl:Xe;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function Qk(e,t){var r=this._id;return arguments.length<2?Oe(this.node(),r).on.on(e):this.each(Kk(r,e,t))}function Jk(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function t1(){return this.on("end.remove",Jk(this._id))}function e1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=nl(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o=0))throw new Error(`invalid digits: ${e}`);if(t>15)return hd;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;svr)if(!(Math.abs(u*l-h*c)>vr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,m=s-n,g=l*l+h*h,y=d*d+m*m,x=Math.sqrt(g),b=Math.sqrt(p),k=a*Math.tan((on-Math.acos((g+p-y)/(2*x*b)))/2),w=k/b,S=k/x;Math.abs(w-1)>vr&&this._append`L${t+w*c},${r+w*u}`,this._append`A${a},${a},0,0,${+(u*d>c*m)},${this._x1=t+S*l},${this._y1=r+S*h}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),h=t+n,c=r+l,u=1^o,p=o?s-a:a-s;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>vr||Math.abs(this._y1-c)>vr)&&this._append`L${h},${c}`,i&&(p<0&&(p=p%nn+nn),p>v1?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`:p>vr&&this._append`A${i},${i},0,${+(p>=on)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Zr(e){return function(){return e}}const eA=Math.abs,rA=Math.atan2,iA=Math.cos,sA=Math.max,aA=Math.min,oA=Math.sin,nA=Math.sqrt,Jh=1e-12,fl=Math.PI,tc=fl/2,lA=2*fl;function hA(e){return e>1?0:e<-1?fl:Math.acos(e)}function cA(e){return e>=1?tc:e<=-1?-tc:Math.asin(e)}function A1(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new L1(t)}function F1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function cd(e){this._context=e}cd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ls(e){return new cd(e)}function E1(e){return e[0]}function M1(e){return e[1]}function $1(e,t){var r=Zr(!0),i=null,s=ls,a=null,o=A1(n);e=typeof e=="function"?e:e===void 0?E1:Zr(e),t=typeof t=="function"?t:t===void 0?M1:Zr(t);function n(l){var h,c=(l=F1(l)).length,u,p=!1,d;for(i==null&&(a=s(d=o())),h=0;h<=c;++h)!(h0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const D1=function e(t){function r(i){return t===1?new Ja(i):new md(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function Ba(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function gl(e,t){this._context=e,this._k=(1-t)/6}gl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ba(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ba(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const yd=function e(t){function r(i){return new gl(i,t)}return r.tension=function(i){return e(+i)},r}(0);function ml(e,t){this._context=e,this._k=(1-t)/6}ml.prototype={areaStart:xr,areaEnd:xr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ba(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const R1=function e(t){function r(i){return new ml(i,t)}return r.tension=function(i){return e(+i)},r}(0);function yl(e,t){this._context=e,this._k=(1-t)/6}yl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ba(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const P1=function e(t){function r(i){return new yl(i,t)}return r.tension=function(i){return e(+i)},r}(0);function xl(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Jh){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Jh){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function xd(e,t){this._context=e,this._alpha=t}xd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:xl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Cd=function e(t){function r(i){return t?new xd(i,t):new gl(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function bd(e,t){this._context=e,this._alpha=t}bd.prototype={areaStart:xr,areaEnd:xr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:xl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const q1=function e(t){function r(i){return t?new bd(i,t):new ml(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function kd(e,t){this._context=e,this._alpha=t}kd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const N1=function e(t){function r(i){return t?new kd(i,t):new yl(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function wd(e){this._context=e}wd.prototype={areaStart:xr,areaEnd:xr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function z1(e){return new wd(e)}function ec(e){return e<0?-1:1}function rc(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(ec(a)+ec(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function ic(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Fo(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function La(e){this._context=e}La.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Fo(this,this._t0,ic(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Fo(this,ic(this,r=rc(this,e,t)),r);break;default:Fo(this,this._t0,r=rc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Sd(e){this._context=new Td(e)}(Sd.prototype=Object.create(La.prototype)).point=function(e,t){La.prototype.point.call(this,t,e)};function Td(e){this._context=e}Td.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function _d(e){return new La(e)}function vd(e){return new Sd(e)}function Bd(e){this._context=e}Bd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=sc(e),s=sc(t),a=0,o=1;o=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Ad(e){return new to(e,.5)}function Fd(e){return new to(e,0)}function Ed(e){return new to(e,1)}function Qi(e,t,r){this.k=e,this.x=t,this.y=r}Qi.prototype={constructor:Qi,scale:function(e){return e===1?this:new Qi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Qi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Qi.prototype;var W1=f(e=>{var s;const{securityLevel:t}=bt();let r=gt("body");if(t==="sandbox"){const o=((s=gt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=gt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Cl(e){return typeof e>"u"||e===null}f(Cl,"isNothing");function Md(e){return typeof e=="object"&&e!==null}f(Md,"isObject");function $d(e){return Array.isArray(e)?e:Cl(e)?[]:[e]}f($d,"toArray");function Id(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;rn&&(a=" ... ",t=i-n+a.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}f(sa,"getLine");function aa(e,t){return Yt.repeat(" ",t-e.length)+e}f(aa,"padStart");function Rd(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],a,o=-1;a=r.exec(e.buffer);)s.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,h,c=Math.min(e.line+t.linesAfter,s.length).toString().length,u=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)h=sa(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),u),n=Yt.repeat(" ",t.indent)+aa((e.line-l+1).toString(),c)+" | "+h.str+` +`+n;for(h=sa(e.buffer,i[o],s[o],e.position,u),n+=Yt.repeat(" ",t.indent)+aa((e.line+1).toString(),c)+" | "+h.str+` +`,n+=Yt.repeat("-",t.indent+c+3+h.pos)+`^ +`,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)h=sa(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),u),n+=Yt.repeat(" ",t.indent)+aa((e.line+l+1).toString(),c)+" | "+h.str+` +`;return n.replace(/\n$/,"")}f(Rd,"makeSnippet");var V1=Rd,Z1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],K1=["scalar","sequence","mapping"];function Pd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(Pd,"compileStyleAliases");function qd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Z1.indexOf(r)===-1)throw new ue('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Pd(t.styleAliases||null),K1.indexOf(this.kind)===-1)throw new ue('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(qd,"Type$1");var Qt=qd;function hn(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}f(hn,"compileList");function Nd(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(f(i,"collectType"),t=0,r=arguments.length;t=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:f(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:f(function(e){return e.toString(10)},"decimal"),hexadecimal:f(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),o2=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Jd(e){return!(e===null||!o2.test(e)||e[e.length-1]==="_")}f(Jd,"resolveYamlFloat");function tp(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}f(tp,"constructYamlFloat");var n2=/^[-+]?[0-9]+e/;function ep(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Yt.isNegativeZero(e))return"-0.0";return r=e.toString(10),n2.test(r)?r.replace("e",".e"):r}f(ep,"representYamlFloat");function rp(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Yt.isNegativeZero(e))}f(rp,"isFloat");var l2=new Qt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Jd,construct:tp,predicate:rp,represent:ep,defaultStyle:"lowercase"}),ip=r2.extend({implicit:[i2,s2,a2,l2]}),h2=ip,sp=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ap=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function op(e){return e===null?!1:sp.exec(e)!==null||ap.exec(e)!==null}f(op,"resolveYamlTimestamp");function np(e){var t,r,i,s,a,o,n,l=0,h=null,c,u,p;if(t=sp.exec(e),t===null&&(t=ap.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],u=+(t[11]||0),h=(c*60+u)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,s,a,o,n,l)),h&&p.setTime(p.getTime()-h),p}f(np,"constructYamlTimestamp");function lp(e){return e.toISOString()}f(lp,"representYamlTimestamp");var c2=new Qt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:op,construct:np,instanceOf:Date,represent:lp});function hp(e){return e==="<<"||e===null}f(hp,"resolveYamlMerge");var u2=new Qt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:hp}),kl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function cp(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=kl;for(r=0;r64)){if(t<0)return!1;i+=6}return i%8===0}f(cp,"resolveYamlBinary");function up(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=kl,o=0,n=[];for(t=0;t>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}f(up,"constructYamlBinary");function dp(e){var t="",r=0,i,s,a=e.length,o=kl;for(i=0;i>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}f(dp,"representYamlBinary");function pp(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(pp,"isBinary");var d2=new Qt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:cp,construct:up,predicate:pp,represent:dp}),p2=Object.prototype.hasOwnProperty,f2=Object.prototype.toString;function fp(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r>10)+55296,(e-65536&1023)+56320)}f(Lp,"charFromCodepoint");function wl(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}f(wl,"setProperty");var Ap=new Array(256),Fp=new Array(256);for(Tr=0;Tr<256;Tr++)Ap[Tr]=un(Tr)?1:0,Fp[Tr]=un(Tr);var Tr;function Ep(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||bp,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}f(Ep,"State$1");function Sl(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=V1(r),new ue(t,r)}f(Sl,"generateError");function rt(e,t){throw Sl(e,t)}f(rt,"throwError");function ms(e,t){e.onWarning&&e.onWarning.call(null,Sl(e,t))}f(ms,"throwWarning");var oc={YAML:f(function(t,r,i){var s,a,o;t.version!==null&&rt(t,"duplication of %YAML directive"),i.length!==1&&rt(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&rt(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&rt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&ms(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(t,r,i){var s,a;i.length!==2&&rt(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],Sp.test(s)||rt(t,"ill-formed tag handle (first argument) of the TAG directive"),Cr.call(t.tagMap,s)&&rt(t,'there is a previously declared suffix for "'+s+'" tag handle'),Tp.test(a)||rt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{rt(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function ir(e,t,r,i){var s,a,o,n;if(t1&&(e.result+=Yt.repeat(` +`,t-1))}f(ro,"writeFoldedLines");function Mp(e,t,r){var i,s,a,o,n,l,h,c,u=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),ie(d)||Fr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(s=e.input.charCodeAt(e.position+1),ie(s)||r&&Fr(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;d!==0;){if(d===58){if(s=e.input.charCodeAt(e.position+1),ie(s)||r&&Fr(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),ie(i))break}else{if(e.position===e.lineStart&&Ls(e)||r&&Fr(d))break;if(Ee(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,Dt(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(ir(e,a,o,!1),ro(e,e.line-l),a=o=e.position,n=!1),yr(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return ir(e,a,o,!1),e.result?!0:(e.kind=u,e.result=p,!1)}f(Mp,"readPlainScalar");function $p(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(ir(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else Ee(r)?(ir(e,i,s,!0),ro(e,Dt(e,!1,t)),i=s=e.position):e.position===e.lineStart&&Ls(e)?rt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);rt(e,"unexpected end of the stream within a single quoted scalar")}f($p,"readSingleQuotedScalar");function Ip(e,t){var r,i,s,a,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return ir(e,r,e.position,!0),e.position++,!0;if(n===92){if(ir(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),Ee(n))Dt(e,!1,t);else if(n<256&&Ap[n])e.result+=Fp[n],e.position++;else if((o=vp(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=_p(n))>=0?a=(a<<4)+o:rt(e,"expected hexadecimal character");e.result+=Lp(a),e.position++}else rt(e,"unknown escape sequence");r=i=e.position}else Ee(n)?(ir(e,r,i,!0),ro(e,Dt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ls(e)?rt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}rt(e,"unexpected end of the stream within a double quoted scalar")}f(Ip,"readDoubleQuotedScalar");function Op(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,h,c,u,p,d,m=Object.create(null),g,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,d=!1,n=[];else if(b===123)c=125,d=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Dt(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&rt(e,"expected the node content, but found ','"):rt(e,"missed comma between flow collection entries"),y=g=x=null,u=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),ie(h)&&(u=p=!0,e.position++,Dt(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,qr(e,t,Fa,!1,!0),y=e.tag,g=e.result,Dt(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Dt(e,!0,t),qr(e,t,Fa,!1,!0),x=e.result),d?Er(e,n,m,y,g,x,i,s,a):u?n.push(Er(e,null,m,y,g,x,i,s,a)):n.push(g),Dt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}rt(e,"unexpected end of the stream within a flow collection")}f(Op,"readFlowCollection");function Dp(e,t){var r,i,s=Eo,a=!1,o=!1,n=t,l=0,h=!1,c,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Eo===s?s=u===43?ac:b2:rt(e,"repeat of a chomping mode identifier");else if((c=Bp(u))>=0)c===0?rt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?rt(e,"repeat of an indentation width identifier"):(n=t+c-1,o=!0);else break;if(yr(u)){do u=e.input.charCodeAt(++e.position);while(yr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Ee(u)&&u!==0)}for(;u!==0;){for(eo(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndentn&&(n=e.lineIndent),Ee(u)){l++;continue}if(e.lineIndentt)&&l!==0)rt(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(y&&(o=e.line,n=e.lineStart,l=e.position),qr(e,t,Ea,!0,s)&&(y?m=e.result:g=e.result),y||(Er(e,u,p,d,m,g,o,n,l),d=m=g=null),Dt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)rt(e,"bad indentation of a mapping entry");else if(e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),u=0,p=e.implicitTypes.length;u"),e.result!==null&&m.kind!==e.kind&&rt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):rt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}f(qr,"composeNode");function zp(e){var t=e.position,r,i,s,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Dt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!ie(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&rt(e,"directive name must not be less than one character in length");o!==0;){for(;yr(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Ee(o));break}if(Ee(o))break;for(r=e.position;o!==0&&!ie(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&eo(e),Cr.call(oc,i)?oc[i](e,i,s):ms(e,'unknown document directive "'+i+'"')}if(Dt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Dt(e,!0,-1)):a&&rt(e,"directives end mark is expected"),qr(e,e.lineIndent-1,Ea,!1,!0),Dt(e,!0,-1),e.checkLineBreaks&&w2.test(e.input.slice(t,e.position))&&ms(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ls(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Dt(e,!0,-1));return}if(e.position"u"&&(r=t,t=null);var i=Tl(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s=55296&&r<=56319&&t+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}f(ri,"codePointAt");function vl(e){var t=/^\n* /;return t.test(e)}f(vl,"needIndentIndicator");var rf=1,xn=2,sf=3,af=4,Jr=5;function of(e,t,r,i,s,a,o,n){var l,h=0,c=null,u=!1,p=!1,d=i!==-1,m=-1,g=tf(ri(e,0))&&ef(ri(e,e.length-1));if(t||o)for(l=0;l=65536?l+=2:l++){if(h=ri(e,l),!_i(h))return Jr;g=g&&yn(h,c,n),c=h}else{for(l=0;l=65536?l+=2:l++){if(h=ri(e,l),h===ys)u=!0,d&&(p=p||l-m-1>i&&e[m+1]!==" ",m=l);else if(!_i(h))return Jr;g=g&&yn(h,c,n),c=h}p=p||d&&l-m-1>i&&e[m+1]!==" "}return!u&&!p?g&&!o&&!s(e)?rf:a===xs?Jr:xn:r>9&&vl(e)?Jr:o?a===xs?Jr:xn:p?af:sf}f(of,"chooseScalarStyle");function nf(e,t,r,i,s){e.dump=function(){if(t.length===0)return e.quotingType===xs?'""':"''";if(!e.noCompatMode&&(H2.indexOf(t)!==-1||Y2.test(t)))return e.quotingType===xs?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return Jp(e,h)}switch(f(l,"testAmbiguity"),of(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case rf:return t;case xn:return"'"+t.replace(/'/g,"''")+"'";case sf:return"|"+Cn(t,e.indent)+bn(gn(t,a));case af:return">"+Cn(t,e.indent)+bn(gn(lf(t,o),a));case Jr:return'"'+hf(t)+'"';default:throw new ue("impossible error: invalid scalar style")}}()}f(nf,"writeScalar");function Cn(e,t){var r=vl(e)?String(t):"",i=e[e.length-1]===` +`,s=i&&(e[e.length-2]===` +`||e===` +`),a=s?"+":i?"":"-";return r+a+` +`}f(Cn,"blockHeader");function bn(e){return e[e.length-1]===` +`?e.slice(0,-1):e}f(bn,"dropEndingNewline");function lf(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var h=e.indexOf(` +`);return h=h!==-1?h:e.length,r.lastIndex=h,kn(e.slice(0,h),t)}(),s=e[0]===` +`||e[0]===" ",a,o;o=r.exec(e);){var n=o[1],l=o[2];a=l[0]===" ",i+=n+(!s&&!a&&l!==""?` +`:"")+kn(l,t),s=a}return i}f(lf,"foldString");function kn(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(a=o>s?o:n,l+=` +`+e.slice(s,a),s=a+1),o=n;return l+=` +`,e.length-s>t&&o>s?l+=e.slice(s,o)+` +`+e.slice(o+1):l+=e.slice(s),l.slice(1)}f(kn,"foldLine");function hf(e){for(var t="",r=0,i,s=0;s=65536?s+=2:s++)r=ri(e,s),i=Jt[r],!i&&_i(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Kp(r);return t}f(hf,"escapeString");function cf(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a"u"&&Ue(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}f(cf,"writeFlowSequence");function wn(e,t,r,i){var s="",a=e.tag,o,n,l;for(o=0,n=r.length;o"u"&&Ue(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=$a(e,t)),e.dump&&ys===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}f(wn,"writeBlockSequence");function uf(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,h,c;for(o=0,n=a.length;o1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ue(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}f(uf,"writeFlowMapping");function df(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,h,c,u,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new ue("sortKeys must be a boolean or a function");for(n=0,l=o.length;n1024,u&&(e.dump&&ys===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=$a(e,t)),Ue(e,t+1,c,!0,u)&&(e.dump&&ys===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=a,e.dump=s||"{}"}f(df,"writeBlockMapping");function Sn(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(Sn,"detectType");function Ue(e,t,r,i,s,a,o){e.tag=null,e.dump=r,Sn(e,r,!1)||Sn(e,r,!0);var n=Hp.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",u,p;if(c&&(u=e.duplicates.indexOf(r),p=u!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(s=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(c&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(df(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(uf(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?wn(e,t-1,e.dump,s):wn(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(cf(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&nf(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ue("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}f(Ue,"writeNode");function pf(e,t){var r=[],i=[],s,a;for(Ia(e,r,i),s=0,a=i.length;s{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Kt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},nc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Ji(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Ft(e),t=Ft(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}f(Ji,"calculateDeltaAndAngle");var Ft=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Z2=f(e=>({x:f(function(t,r,i){let s=0;const a=Ft(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Kt,e.arrowTypeEnd)){const{angle:d,deltaX:m}=Ji(i[i.length-1],i[i.length-2]);s=Kt[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const o=Math.abs(Ft(t).x-Ft(i[i.length-1]).x),n=Math.abs(Ft(t).y-Ft(i[i.length-1]).y),l=Math.abs(Ft(t).x-Ft(i[0]).x),h=Math.abs(Ft(t).y-Ft(i[0]).y),c=Kt[e.arrowTypeStart],u=Kt[e.arrowTypeEnd],p=1;if(o0&&n0&&h=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Kt,e.arrowTypeEnd)){const{angle:d,deltaY:m}=Ji(i[i.length-1],i[i.length-2]);s=Kt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const o=Math.abs(Ft(t).y-Ft(i[i.length-1]).y),n=Math.abs(Ft(t).x-Ft(i[i.length-1]).x),l=Math.abs(Ft(t).y-Ft(i[0]).y),h=Math.abs(Ft(t).x-Ft(i[0]).x),c=Kt[e.arrowTypeStart],u=Kt[e.arrowTypeEnd],p=1;if(o0&&n0&&h-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,h){return String.fromCharCode(h)})}function i(o){return URL.canParse(o)}function s(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var n,l=s(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var h=l;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),u=c.match(e.urlSchemeRegex);if(!u)return h;var p=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var d=c.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return d;if(p==="http:"||p==="https:"){if(!i(d))return e.BLANK_URL;var m=new URL(d);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return d}return Ws}var J2=Q2();function tw(e){return Number.isSafeInteger(e)&&e>=0}function ff(e){return e!=null&&typeof e!="function"&&tw(e.length)}function ew(e){return e==="__proto__"}function Bl(e){return e==null||typeof e!="object"&&typeof e!="function"}function gf(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ll(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const rw="[object RegExp]",mf="[object String]",yf="[object Number]",xf="[object Boolean]",Cf="[object Arguments]",iw="[object Symbol]",sw="[object Date]",aw="[object Map]",ow="[object Set]",nw="[object Array]",lw="[object ArrayBuffer]",bf="[object Object]",hw="[object DataView]",cw="[object Uint8Array]",uw="[object Uint8ClampedArray]",dw="[object Uint16Array]",pw="[object Uint32Array]",fw="[object Int8Array]",gw="[object Int16Array]",mw="[object Int32Array]",yw="[object Float32Array]",xw="[object Float64Array]",cc=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}()||Function("return this")();function Al(e){return typeof cc.Buffer<"u"&&cc.Buffer.isBuffer(e)}function Fl(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Cw(e,t){return ii(e,void 0,e,new Map,t)}function ii(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(Bl(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n{if(typeof e=="object"){if(Ll(e)===bf&&typeof e.constructor!="function"){const o={};return a.set(e,o),ve(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case yf:case mf:case xf:{const o=new e.constructor(e==null?void 0:e.valueOf());return ve(o,e),o}case Cf:{const o={};return ve(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function uc(e){return kw(e)}function Tn(e){return e!==null&&typeof e=="object"&&Ll(e)==="[object Arguments]"}function _n(e){return typeof e=="object"&&e!==null}function ww(e){return _n(e)&&ff(e)}function As(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...s){const a=t?t.apply(this,s):s[0],o=r.cache;if(o.has(a))return o.get(a);const n=e.apply(this,s);return r.cache=o.set(a,n)||o,n},i=As.Cache||Map;return r.cache=new i,r}As.Cache=Map;function Sw(){}function Tw(e){const t=e==null?void 0:e.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}function oa(e){return Fl(e)}function Mo(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function _w(e){if(Bl(e))return e;if(Array.isArray(e)||Fl(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const i=Object.create(t);return Object.assign(i,e)}return e}function vw(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;ar!=="constructor").length===0:t.length===0}return!0}var Lw="​",Aw={curveBasis:ln,curveBasisClosed:I1,curveBasisOpen:O1,curveBumpX:dd,curveBumpY:pd,curveBundle:D1,curveCardinalClosed:R1,curveCardinalOpen:P1,curveCardinal:yd,curveCatmullRomClosed:q1,curveCatmullRomOpen:N1,curveCatmullRom:Cd,curveLinear:ls,curveLinearClosed:z1,curveMonotoneX:_d,curveMonotoneY:vd,curveNatural:Ld,curveStep:Ad,curveStepAfter:Ed,curveStepBefore:Fd},Fw=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ew=f(function(e,t){const r=kf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);ga(o),i=Ht(i,[...o])}else i=r.args;if(!i)return;let s=el(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),kf=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${Fw.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),W.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=os.exec(e))!==null;)if(a.index===os.lastIndex&&os.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return W.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Mw=f(function(e){return e.replace(os,"")},"removeDirectives"),$w=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function El(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Aw[r]??t}f(El,"interpolateToCurve");function wf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?J2.sanitizeUrl(r):r}f(wf,"formatUrl");var Iw=f((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o{r+=Ml(s,t),t=s});const i=r/2;return $l(e,i)}f(Sf,"traverseEdge");function Tf(e){return e.length===1?e[0]:Sf(e)}f(Tf,"calcLabelPosition");var pc=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),$l=f((e,t)=>{let r,i=t;for(const s of e){if(r){const a=Ml(s,r);if(a===0)return r;if(a=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:pc((1-o)*r.x+o*s.x,5),y:pc((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Ow=f((e,t,r)=>{W.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=$l(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function _f(e,t,r){const i=structuredClone(r);W.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=$l(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}f(_f,"calcTerminalLabelPosition");function vf(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}f(vf,"getStylesFromArray");var fc=0,Dw=f(()=>(fc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+fc),"generateId");function Bf(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;sBf(e.length),"random"),Pw=f(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),qw=f(function(e,t){const r=t.text.replace(_s.lineBreakRegex," "),[,i]=io(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),Nw=As((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
    "},r),_s.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=ar(`${o} `,r),h=ar(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=zw(o,t,"-",r);s.push(a,...p),a=d}else h+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),zw=As((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const h=`${o}${n}`;if(ar(h,i)>=t){const u=l+1,p=s.length===u,d=`${h}${r}`;a.push(p?h:d),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Lf(e,t){return Il(e,t).height}f(Lf,"calculateTextHeight");function ar(e,t){return Il(e,t).width}f(ar,"calculateTextWidth");var Il=As((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=io(r),o=["sans-serif",i],n=e.split(_s.lineBreakRegex),l=[],h=gt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const p of o){let d=0;const m={width:0,height:0,lineHeight:0};for(const g of n){const y=Pw();y.text=g||Lw;const x=qw(c,y).style("font-size",a).style("font-weight",s).style("font-family",p),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),d=Math.round(b.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}c.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),bi,Ww=(bi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(bi,"InitIDGenerator"),bi),Hs,Hw=f(function(e){return Hs=Hs||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Hs.innerHTML=e,unescape(Hs.textContent)},"entityDecode");function Ol(e){return"str"in e}f(Ol,"isDetailedError");var Yw=f((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),io=f(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Dl(e,t){return Bw({},e,t)}f(Dl,"cleanAndMerge");var Fe={assignWithDepth:Ht,wrapLabel:Nw,calculateTextHeight:Lf,calculateTextWidth:ar,calculateTextDimensions:Il,cleanAndMerge:Dl,detectInit:Ew,detectDirective:kf,isSubstringInArray:$w,interpolateToCurve:El,calcLabelPosition:Tf,calcCardinalityPosition:Ow,calcTerminalLabelPosition:_f,formatUrl:wf,getStylesFromArray:vf,generateId:Dw,random:Rw,runFunc:Iw,entityDecode:Hw,insertTitle:Yw,isLabelCoordinateInPath:Af,parseFontSize:io,InitIDGenerator:Ww},Uw=f(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Nr=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),uA=f((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Ut(e){return e??null}f(Ut,"handleUndefinedAttr");function Af(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}f(Af,"isLabelCoordinateInPath");var Rl=f(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Ff(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=bt().fontSize?bt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=Tu.fontSize]=io(n),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";a(s)}f(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}f(Ff,"configureLabelImages");var Gw=f(e=>{const{handDrawnSeed:t}=bt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Li=f(e=>{const t=jw([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),jw=f(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Ef=f(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),tt=f(e=>{const{stylesArray:t}=Li(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Ef(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),Z=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=bt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=Li(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:Xw(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),Xw=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const Vw=Object.freeze({left:0,top:0,width:16,height:16}),Oa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Mf=Object.freeze({...Vw,...Oa}),Zw=Object.freeze({...Mf,body:"",hidden:!1}),Kw=Object.freeze({width:null,height:null}),Qw=Object.freeze({...Kw,...Oa}),Jw=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:n};return $o(h)?h:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return $o(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return $o(n,r)?n:null}return null},$o=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function tS(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function gc(e,t){const r=tS(e,t);for(const i in Zw)i in Oa?i in e&&!(i in r)&&(r[i]=Oa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function eS(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function mc(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=gc(i[n]||s[n],a)}return o(t),r.forEach(o),gc(e,a)}function rS(e,t){if(e.icons[t])return mc(e,t,[]);const r=eS(e,[t])[t];return r?mc(e,t,r):null}const iS=/(-?[0-9.]*[0-9]+[0-9.]*)/g,sS=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function yc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(iS);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=sS.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function aS(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function oS(e,t){return e?""+e+""+t:t}function nS(e,t,r){const i=aS(e);return oS(i.defs,t+i.content+r)}const lS=e=>e==="unset"||e==="undefined"||e==="none";function hS(e,t){const r={...Mf,...e},i={...Qw,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(g=>{const y=[],x=g.hFlip,b=g.vFlip;let k=g.rotate;x?b?k+=2:(y.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),y.push("scale(-1 1)"),s.top=s.left=0):b&&(y.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),y.push("scale(1 -1)"),s.top=s.left=0);let w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=s.height/2+s.top,y.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,y.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}k%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),y.length&&(a=nS(a,'',""))});const o=i.width,n=i.height,l=s.width,h=s.height;let c,u;o===null?(u=n===null?"1em":n==="auto"?h:n,c=yc(u,l/h)):(c=o==="auto"?l:o,u=n===null?yc(c,h/l):n==="auto"?h:n);const p={},d=(g,y)=>{lS(y)||(p[g]=y.toString())};d("width",c),d("height",u);const m=[s.left,s.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:a}}const cS=/\sid="(\S+)"/g,xc=new Map;function uS(e){e=e.replace(/[0-9]+$/,"")||"a";const t=xc.get(e)||0;return xc.set(e,t+1),t?`${e}${t}`:e}function dS(e){const t=[];let r;for(;r=cS.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=uS(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function pS(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'"+e+""}function Pl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Yr=Pl();function $f(e){Yr=e}var hs={exec:()=>null};function kt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(se.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var fS=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
    /i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},gS=/^(?:[ \t]*(?:\n|$))+/,mS=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yS=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Fs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xS=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ql=/(?:[*+-]|\d{1,9}[.)])/,If=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Of=kt(If).replace(/bull/g,ql).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),CS=kt(If).replace(/bull/g,ql).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Nl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,bS=/^[^\n]+/,zl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,kS=kt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",zl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wS=kt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ql).getRegex(),so="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Wl=/|$))/,SS=kt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Wl).replace("tag",so).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Df=kt(Nl).replace("hr",Fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",so).getRegex(),TS=kt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Df).getRegex(),Hl={blockquote:TS,code:mS,def:kS,fences:yS,heading:xS,hr:Fs,html:SS,lheading:Of,list:wS,newline:gS,paragraph:Df,table:hs,text:bS},Cc=kt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",so).getRegex(),_S={...Hl,lheading:CS,table:Cc,paragraph:kt(Nl).replace("hr",Fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Cc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",so).getRegex()},vS={...Hl,html:kt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Wl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:kt(Nl).replace("hr",Fs).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Of).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},BS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,LS=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Rf=/^( {2,}|\\)\n(?!\s*$)/,AS=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",fS?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Nf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,IS=kt(Nf,"u").replace(/punct/g,ao).getRegex(),OS=kt(Nf,"u").replace(/punct/g,qf).getRegex(),zf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",DS=kt(zf,"gu").replace(/notPunctSpace/g,Pf).replace(/punctSpace/g,Yl).replace(/punct/g,ao).getRegex(),RS=kt(zf,"gu").replace(/notPunctSpace/g,MS).replace(/punctSpace/g,ES).replace(/punct/g,qf).getRegex(),PS=kt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Pf).replace(/punctSpace/g,Yl).replace(/punct/g,ao).getRegex(),qS=kt(/\\(punct)/,"gu").replace(/punct/g,ao).getRegex(),NS=kt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),zS=kt(Wl).replace("(?:-->|$)","-->").getRegex(),WS=kt("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",zS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Da=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,HS=kt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Da).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Wf=kt(/^!?\[(label)\]\[(ref)\]/).replace("label",Da).replace("ref",zl).getRegex(),Hf=kt(/^!?\[(ref)\](?:\[\])?/).replace("ref",zl).getRegex(),YS=kt("reflink|nolink(?!\\()","g").replace("reflink",Wf).replace("nolink",Hf).getRegex(),bc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ul={_backpedal:hs,anyPunctuation:qS,autolink:NS,blockSkip:$S,br:Rf,code:LS,del:hs,emStrongLDelim:IS,emStrongRDelimAst:DS,emStrongRDelimUnd:PS,escape:BS,link:HS,nolink:Hf,punctuation:FS,reflink:Wf,reflinkSearch:YS,tag:WS,text:AS,url:hs},US={...Ul,link:kt(/^!?\[(label)\]\((.*?)\)/).replace("label",Da).getRegex(),reflink:kt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Da).getRegex()},vn={...Ul,emStrongRDelimAst:RS,emStrongLDelim:OS,url:kt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",bc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:kt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},kc=e=>jS[e];function Ne(e,t){if(t){if(se.escapeTest.test(e))return e.replace(se.escapeReplace,kc)}else if(se.escapeTestNoEncode.test(e))return e.replace(se.escapeReplaceNoEncode,kc);return e}function wc(e){try{e=encodeURI(e).replace(se.percentDecode,"%")}catch{return null}return e}function Sc(e,t){var a;let r=e.replace(se.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(se.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length0?-2:-1}function Tc(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function VS(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(` +`).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(` +`)}var Ra=class{constructor(t){J(this,"options");J(this,"rules");J(this,"lexer");this.options=t||Yr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Yi(i,` +`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=VS(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=Yi(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Yi(r[0],` +`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Yi(r[0],` +`).split(` +`),s="",a="",o=[];for(;i.length>0;){let n=!1,l=[],h;for(h=0;h1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let h=!1,c="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let p=r[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(` +`,1)[0],m=!p.trim(),g=0;if(this.options.pedantic?(g=2,u=p.trimStart()):m?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=p.slice(g),g+=r[1].length),m&&this.rules.other.blankLine.test(d)&&(c+=d+` +`,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),w=this.rules.other.fencesBeginRegex(g),S=this.rules.other.headingBeginRegex(g),_=this.rules.other.htmlBeginRegex(g);for(;t;){let M=t.split(` +`,1)[0],B;if(d=M,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),B=d):B=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||S.test(d)||_.test(d)||b.test(d)||k.test(d))break;if(B.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=` +`+B.slice(g);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(p)||S.test(p)||k.test(p))break;u+=` +`+d}!m&&!d.trim()&&(m=!0),c+=M+` +`,t=t.substring(M.length+1),p=B.slice(g)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(n=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:c,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=c}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;hp.type==="space"),u=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=u}if(a.loose)for(let h=0;h({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[c]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===` +`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=Yi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=XS(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Tc(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Tc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){h+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+h);let u=[...s[0]][0].length,p=t.slice(0,a+s.index+u+n);if(Math.min(a,n)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Be=class Bn{constructor(t){J(this,"tokens");J(this,"options");J(this,"state");J(this,"tokenizer");J(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Yr,this.options.tokenizer=this.options.tokenizer||new Ra,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:se,block:Ys.normal,inline:Hi.normal};this.options.pedantic?(r.block=Ys.pedantic,r.inline=Hi.pedantic):this.options.gfm&&(r.block=Ys.gfm,this.options.breaks?r.inline=Hi.breaks:r.inline=Hi.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ys,inline:Hi}}static lex(t,r){return new Bn(r).lex(t)}static lexInline(t,r){return new Bn(r).inlineTokens(t)}lex(t){t=t.replace(se.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let r=0;r(n=h.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=` +`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(` +`)?"":` +`)+n.raw,h.text+=` +`+n.text,this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(` +`)?"":` +`)+n.raw,h.text+=` +`+n.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let h=1/0,c=t.slice(1),u;this.options.extensions.startBlock.forEach(p=>{u=p.call({lexer:this},c),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(` +`)?"":` +`)+n.raw,h.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(` +`)?"":` +`)+n.raw,h.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,u,p;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let g=1/0,y=t.slice(1),x;this.options.extensions.startInline.forEach(b=>{x=b.call({lexer:this},y),typeof x=="number"&&x>=0&&(g=Math.min(g,x))}),g<1/0&&g>=0&&(m=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},Pa=class{constructor(t){J(this,"options");J(this,"parser");this.options=t||Yr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(se.notSpaceStart))==null?void 0:o[0],a=t.replace(se.endingNewline,"")+` +`;return s?'
    '+(i?a:Ne(a,!0))+`
    +`:"
    "+(i?a:Ne(a,!0))+`
    +`}blockquote({tokens:t}){return`
    +${this.parser.parse(t)}
    +`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`${this.parser.parseInline(t)} +`}hr(t){return`
    +`}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n +`+s+" +`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Ne(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`
  • ${r}
  • +`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    +`}table(t){let r="",i="";for(let a=0;a${s}`),` + +`+r+` +`+s+`
    +`}tablerow({text:t}){return` +${t} +`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+` +`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${Ne(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=wc(t);if(a===null)return s;t=a;let o='
    ",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=wc(t);if(a===null)return Ne(i);t=a;let o=`${i}{let h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Pa(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Ra(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new ts;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],h=a[n];ts.passThroughHooks.has(o)?a[n]=c=>{if(this.defaults.async&&ts.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await l.call(a,c);return h.call(a,p)})();let u=l.call(a,c);return h.call(a,u)}:a[n]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(a,c);return p===!1&&(p=await h.apply(a,c)),p})();let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Be.lex(t,r??this.defaults)}parser(t,r){return Le.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Be.lex:Be.lexInline)(n,a),h=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser():t?Le.parse:Le.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?Be.lex:Be.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Le.parse:Le.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=` +Please report this to https://github.com/markedjs/marked.`,t){let s="

    An error occurred:

    "+Ne(i.message+"",!0)+"
    ";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},zr=new ZS;function St(e,t){return zr.parse(e,t)}St.options=St.setOptions=function(e){return zr.setOptions(e),St.defaults=zr.defaults,$f(St.defaults),St};St.getDefaults=Pl;St.defaults=Yr;St.use=function(...e){return zr.use(...e),St.defaults=zr.defaults,$f(St.defaults),St};St.walkTokens=function(e,t){return zr.walkTokens(e,t)};St.parseInline=zr.parseInline;St.Parser=Le;St.parser=Le.parse;St.Renderer=Pa;St.TextRenderer=Gl;St.Lexer=Be;St.lexer=Be.lex;St.Tokenizer=Ra;St.Hooks=ts;St.parse=St;St.options;St.setOptions;St.use;St.walkTokens;St.parseInline;Le.parse;Be.lex;function Yf(e){for(var t=[],r=1;r?',height:80,width:80},An=new Map,Uf=new Map,QS=f(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(W.debug("Registering icon pack:",t.name),"loader"in t)Uf.set(t.name,t.loader);else if("icons"in t)An.set(t.name,t.icons);else throw W.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Gf=f(async(e,t)=>{const r=Jw(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=An.get(i);if(!s){const o=Uf.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},An.set(i,s)}catch(n){throw W.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=rS(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),JS=f(async e=>{try{return await Gf(e),!0}catch{return!1}},"isIconAvailable"),Es=f(async(e,t,r)=>{let i;try{i=await Gf(e,t==null?void 0:t.fallbackPrefix)}catch(o){W.error(o),i=KS}const s=hS(i,t),a=pS(dS(s.body),{...s.attributes,...r});return $e(a,Mt())},"getIconSVG");function jf(e,{markdownAutoWrap:t}){const i=e.replace(//g,` +`).replace(/\n{2,}/g,` +`);return Yf(i)}f(jf,"preprocessMarkdown");function Xf(e){return e.split(/\\n|\n|/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}f(Xf,"nonMarkdownToLines");function Vf(e,t={}){const r=jf(e,t),i=St.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(` +`).forEach((c,u)=>{u!==0&&(a++,s.push([])),c.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&s[a].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(h=>{o(h,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return f(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(h=>{o(h)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}f(Vf,"markdownToLines");function Zf(e){return e?`

    ${e.replace(/\\n|\n/g,"
    ")}

    `:""}f(Zf,"nonMarkdownToHTML");function Kf(e,{markdownAutoWrap:t}={}){const r=St.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"
    ").replace(/ /g," "):s.text.replace(/\n */g,"
    "):s.type==="strong"?`${(a=s.tokens)==null?void 0:a.map(i).join("")}`:s.type==="em"?`${(o=s.tokens)==null?void 0:o.map(i).join("")}`:s.type==="paragraph"?`

    ${(n=s.tokens)==null?void 0:n.map(i).join("")}

    `:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(W.warn(`Unsupported markdown: ${s.type}`),s.raw)}return f(i,"output"),r.map(i).join("")}f(Kf,"markdownToHTML");function Qf(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(Qf,"splitTextToChars");function Jf(e,t){const r=Qf(t.content);return jl(e,[],r,t.type)}f(Jf,"splitWordToFitWidth");function jl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?jl(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(jl,"splitWordToFitWidthRecursion");function tg(e,t){if(e.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return qa(e,t)}f(tg,"splitLineToFitWidth");function qa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return qa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=Jf(t,a);r.push([n]),l.content&&e.unshift(l)}return qa(e,t,r)}f(qa,"splitLineToFitWidthRecursion");function Fn(e,t){t&&e.attr("style",t)}f(Fn,"applyStyle");var _c=16384;async function eg(e,t,r,i,s=!1,a=Mt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,_c)}px`),o.attr("height",`${Math.min(10*r,_c)}px`);const n=o.append("xhtml:div"),l=us(t.label)?await Iu(t.label.replace(_s.lineBreakRegex,` +`),a):$e(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),Fn(c,t.labelStyle),c.attr("class",`${h} ${i}`),Fn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}f(eg,"addHtmlSpan");function oo(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}f(oo,"createTspan");function rg(e,t,r){const i=e.append("text"),s=oo(i,1,t);no(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}f(rg,"computeWidthOfText");function tT(e,t,r){var o;const i=e.append("text"),s=oo(i,1,t);no(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}f(tT,"computeDimensionOfText");function ig(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=f(d=>rg(o,1.1,d)<=e,"checkWidth"),p=u(c)?[c]:tg(c,u);for(const d of p){const m=oo(l,h,1.1,s);no(m,d),h++}}if(i){const c=l.node().getBBox(),u=2;return n.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),o.node()}else return l.node()}f(ig,"createFormattedText");function En(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}f(En,"decodeHTMLEntities");function no(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(En(r.content)):s.text(" "+En(r.content))})}f(no,"updateTextContentAndStyles");async function sg(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await JS(n)?await Es(n,void 0,{class:"label-icon"}):``})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(sg,"replaceIconSubstring");var nr=f(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(W.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",h),a){const u=o?Kf(t,c):Zf(t),p=await sg(Nr(u),c),d=t.replace(/\\\\/g,"\\"),m={isNode:n,label:us(t)?d:p,labelStyle:r.replace("fill:","color:")};return await eg(e,m,l,s,h,c)}else{const u=Nr(t.replace(//g,"
    ")),p=o?Vf(u.replace("
    ","
    "),c):Xf(u),d=ig(l,e,p,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");gt(d).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");gt(d).select("rect").attr("style",m.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");gt(d).select("text").attr("style",g)}return i?gt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):gt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Io(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*o-(c-s)*n+i,l[1]=(h-i)*n+(c-s)*o+s}}}function eT(e,t){return e[0]===t[0]&&e[1]===t[1]}function rT(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const h of o)Io(h,n,s);const l=function(h,c,u){const p=[];for(const b of h){const k=[...b];eT(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const d=[];c=Math.max(c,.1);const m=[];for(const b of p)for(let k=0;kb.ymink.ymin?1:b.xk.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax)),!m.length)return d;let g=[],y=m[0].ymin,x=0;for(;g.length||m.length;){if(m.length){let b=-1;for(let k=0;ky);k++)b=k;m.splice(0,b+1).forEach(k=>{g.push({s:y,edge:k})})}if(g=g.filter(b=>!(b.edge.ymax<=y)),g.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(u!==1||x%c==0)&&g.length>1)for(let b=0;b=g.length)break;const w=g[b].edge,S=g[k].edge;d.push([[Math.round(w.x),y],[Math.round(S.x),y]])}y+=u,g.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return d}(o,a,i);if(s){for(const h of o)Io(h,n,-s);(function(h,c,u){const p=[];h.forEach(d=>p.push(...d)),Io(p,c,u)})(l,n,-s)}return l}function Ms(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),rT(e,s,i,a||1)}class Xl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ms(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function lo(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class iT extends Xl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Ms(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)lo([h,c])&&o.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class sT extends Xl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class aT{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ms(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=lo(n),h=l/s,c=Math.ceil(h)-1,u=l-c*s,p=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let m=0;m{const n=lo(o),l=Math.floor(n/(i+s)),h=(n+s-l*(i+s))/2;let c=o[0],u=o[1];c[0]>u[0]&&(c=o[1],u=o[0]);const p=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let d=0;d{const o=lo(a),n=Math.round(o/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let u=0;uc%2?h+r:h+t);a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map((h,c)=>c%2?h+r:h+t);a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map((h,c)=>c%2?h+r:h+t);a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function og(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],n=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s),t.push({key:"C",data:[u,p,...c]}),n=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[u,p]=c;let d=0,m=0;r==="Q"||r==="T"?(d=i+(i-n),m=s+(s-l)):(d=i,m=s);const g=i+2*(d-i)/3,y=s+2*(m-s)/3,x=u+2*(d-u)/3,b=p+2*(m-p)/3;t.push({key:"C",data:[g,y,x,b,u,p]}),n=d,l=m,i=u,s=p;break}case"Q":{const[u,p,d,m]=c,g=i+2*(u-i)/3,y=s+2*(p-s)/3,x=d+2*(u-d)/3,b=m+2*(p-m)/3;t.push({key:"C",data:[g,y,x,b,d,m]}),n=u,l=p,i=d,s=m;break}case"A":{const u=Math.abs(c[0]),p=Math.abs(c[1]),d=c[2],m=c[3],g=c[4],y=c[5],x=c[6];u===0||p===0?(t.push({key:"C",data:[i,s,y,x,y,x]}),i=y,s=x):(i!==y||s!==x)&&(ng(i,s,y,x,u,p,d,m,g).forEach(function(b){t.push({key:"C",data:b})}),i=y,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=h}return t}function Ui(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function ng(e,t,r,i,s,a,o,n,l,h){const c=(u=o,Math.PI*u/180);var u;let p=[],d=0,m=0,g=0,y=0;if(h)[d,m,g,y]=h;else{[e,t]=Ui(e,t,-c),[r,i]=Ui(r,i,-c);const q=(e-r)/2,I=(t-i)/2;let $=q*q/(s*s)+I*I/(a*a);$>1&&($=Math.sqrt($),s*=$,a*=$);const A=s*s,O=a*a,E=A*O-A*I*I-O*q*q,T=A*I*I+O*q*q,N=(n===l?-1:1)*Math.sqrt(Math.abs(E/T));g=N*s*I/a+(e+r)/2,y=N*-a*q/s+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),m=Math.asin(parseFloat(((i-y)/a).toFixed(9))),em&&(d-=2*Math.PI),!l&&m>d&&(m-=2*Math.PI)}let x=m-d;if(Math.abs(x)>120*Math.PI/180){const q=m,I=r,$=i;m=l&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=ng(r=g+s*Math.cos(m),i=y+a*Math.sin(m),I,$,s,a,o,0,l,[m,q,g,y])}x=m-d;const b=Math.cos(d),k=Math.sin(d),w=Math.cos(m),S=Math.sin(m),_=Math.tan(x/4),M=4/3*s*_,B=4/3*a*_,z=[e,t],D=[e+M*k,t-B*b],L=[r+M*S,i-B*w],Y=[r,i];if(D[0]=2*z[0]-D[0],D[1]=2*z[1]-D[1],h)return[D,L,Y].concat(p);{p=[D,L,Y].concat(p);const q=[];for(let I=0;I2){const s=[];for(let a=0;a2*Math.PI&&(d=0,m=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(m-d)/2),x=Mc(y,h,c,u,p,d,m,1,l);if(!l.disableMultiStroke){const b=Mc(y,h,c,u,p,d,m,1.5,l);x.push(...b)}return o&&(n?x.push(...br(h,c,h+u*Math.cos(d),c+p*Math.sin(d),l),...br(h,c,h+u*Math.cos(m),c+p*Math.sin(m),l)):x.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(d),c+p*Math.sin(d)]})),{type:"path",ops:x}}function Ac(e,t){const r=og(ag(Vl(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...br(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,h,c,u,p,d]=n;i.push(...dT(l,h,c,u,p,d,a,t)),a=[p,d];break}case"Z":i.push(...br(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Ro(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+ct(s,t),i[0][1]+ct(s,t)]});for(let o=1;o500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const u=c/2,p=.2+.2*cg(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=ct(d,s,h),m=ct(m,s,h);const g=[],y=()=>ct(u,s,h),x=()=>ct(c,s,h),b=s.preserveVertices;return o?g.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):g.push({op:"move",data:[e+(b?0:ct(c,s,h)),t+(b?0:ct(c,s,h))]}),o?g.push({op:"bcurveTo",data:[d+e+(r-e)*p+y(),m+t+(i-t)*p+y(),d+e+2*(r-e)*p+y(),m+t+2*(i-t)*p+y(),r+(b?0:y()),i+(b?0:y())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*p+x(),m+t+(i-t)*p+x(),d+e+2*(r-e)*p+x(),m+t+2*(i-t)*p+x(),r+(b?0:x()),i+(b?0:x())]}),g}function Gs(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+ct(t,r),e[0][1]+ct(t,r)]),i.push([e[0][0]+ct(t,r),e[0][1]+ct(t,r)]);for(let s=1;s3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+21&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],p=Br(l,h,.5),d=Br(h,c,.5),m=Br(c,u,.5),g=Br(p,d,.5),y=Br(d,m,.5),x=Br(g,y,.5);In([l,p,g,x],0,r,s),In([x,y,m,u],0,r,s)}var a,o;return s}function fT(e,t){return Wa(e,0,e.length,t)}function Wa(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;cl&&(l=u,h=c)}return Math.sqrt(l)>i?(Wa(e,t,h+1,i,a),Wa(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function Po(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a0?Wa(i,0,i.length,r):i}const ge="none";class Ha{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const o=this._o(a);return this._d("line",[lg(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=uT(t,r,i,s,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(Ro([h],o)):n.push(Kr([h],o))}return o.stroke!==ge&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=hg(i,s,o),h=Mn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=Mn(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(Kr([h.estimatedPoints],o));return o.stroke!==ge&&n.push(h.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[la(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const h=this._o(l),c=[],u=Lc(t,r,i,s,a,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const d=Lc(t,r,i,s,a,o,!0,!1,p);d.type="fillPath",c.push(d)}else c.push(function(p,d,m,g,y,x,b){const k=p,w=d;let S=Math.abs(m/2),_=Math.abs(g/2);S+=ct(.01*S,b),_+=ct(.01*_,b);let M=y,B=x;for(;M<0;)M+=2*Math.PI,B+=2*Math.PI;B-M>2*Math.PI&&(M=0,B=2*Math.PI);const z=(B-M)/b.curveStepCount,D=[];for(let L=M;L<=B;L+=z)D.push([k+S*Math.cos(L),w+_*Math.sin(L)]);return D.push([k+S*Math.cos(B),w+_*Math.sin(B)]),D.push([k,w]),Kr([D],b)}(t,r,i,s,a,o,h));return h.stroke!==ge&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=Bc(t,i);if(i.fill&&i.fill!==ge)if(i.fillStyle==="solid"){const o=Bc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const h of l)h.length<3?o.push(...h):h.length===3?o.push(...Po($c([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...Po($c(h),10,(1+i.roughness)/2))}o.length&&s.push(Kr([o],i))}return i.stroke!==ge&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=la(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Ro([t],i)):s.push(Kr([t],i))),i.stroke!==ge&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ge,o=i.stroke!==ge,n=!!(i.simplification&&i.simplification<1),l=function(c,u,p){const d=og(ag(Vl(c))),m=[];let g=[],y=[0,0],x=[];const b=()=>{x.length>=4&&g.push(...Po(x,u)),x=[]},k=()=>{b(),g.length&&(m.push(g),g=[])};for(const{key:S,data:_}of d)switch(S){case"M":k(),y=[_[0],_[1]],g.push(y);break;case"L":b(),g.push([_[0],_[1]]);break;case"C":if(!x.length){const M=g.length?g[g.length-1]:y;x.push([M[0],M[1]])}x.push([_[0],_[1]]),x.push([_[2],_[3]]),x.push([_[4],_[5]]);break;case"Z":b(),g.push([y[0],y[1]])}if(k(),!p)return m;const w=[];for(const S of m){const _=fT(S,p);_.length&&w.push(_)}return w}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=Ac(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=Ac(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(Ro(l,i));else s.push(Kr(l,i));return o&&(n?l.forEach(c=>{s.push(la(c,!1,i))}):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map(o=>+o.toFixed(r)):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ge};break;case"fillPath":o={d:this.opsToPath(a),stroke:ge,strokeWidth:0,fill:i.fill||ge};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ge,strokeWidth:i,fill:ge}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class gT{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ha(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(n=>+n.toFixed(i)):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const js="http://www.w3.org/2000/svg";class mT{constructor(t,r){this.svg=t,this.gen=new Ha(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(js,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(js,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(js,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(js,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var X={canvas:(e,t)=>new gT(e,t),svg:(e,t)=>new mT(e,t),generator:e=>new Ha(e),newSeed:()=>Ha.newSeed()},ht=f(async(e,t,r)=>{var d,m;let i;const s=t.useHtmlLabels||or((d=bt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Ut(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await nr(o,$e(Nr(n),bt()),{useHtmlLabels:s,width:t.width||((m=bt().flowchart)==null?void 0:m.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},bt());let u=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const g=c.children[0],y=gt(c);await Ff(g,n),u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}return s?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:p,label:o}},"labelHelper"),qo=f(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??ne(bt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await nr(s,$e(Nr(t),bt()),{useHtmlLabels:i,width:r.width||((h=(l=bt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(ne(bt())){const c=a.children[0],u=gt(a);o=c.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),et=f((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),ot=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function xt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(xt,"createPathFromPoints");function kr(e,t,r,i,s,a){const o=[],l=r-e,h=i-t,c=l/a,u=2*Math.PI/c,p=t+h/2;for(let d=0;d<=50;d++){const m=d/50,g=e+m*l,y=p+s*Math.sin(u*(g-e));o.push({x:g,y})}return o}f(kr,"generateFullSineWavePoints");function bs(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;ul.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=f((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}f(On,"mergePaths");var yT=f((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,h;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,h=n):(s<0&&(o=-o),l=o,h=s===0?0:o*a/s),{x:r+l,y:i+h}},"intersectRect"),Ai=yT,xT=f(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=bt(),n=ne(o);return await nr(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),fr=xT,wr=f((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),ug=f(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=bt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=tt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ne(r),d=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await nr(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):m=await fr(d,t.label,t.labelStyle||"",!1,!0);let g=m.getBBox();if(ne(r)){const M=m.children[0],B=gt(m);g=M.getBoundingClientRect(),B.attr("width",g.width),B.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;W.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const M=X.svg(u),B=Z(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),z=M.path(wr(b,k,y,x,0),B);w=u.insert(()=>(W.debug("Rough node insert CXC",z),z),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=Rl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const M=d.select("span");M&&M.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=g.height-t.padding/2,t.intersect=function(M){return Ai(t,M)},{cluster:u,labelBBox:g}},"rect"),CT=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return Ai(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),bT=f(async(e,t)=>{const r=bt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),u=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const d=await fr(u,t.label,t.labelStyle,void 0,!0);let m=d.getBBox();if(ne(r)){const z=d.children[0],D=gt(d);m=z.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const g=0*t.padding,y=g/2,x=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+g;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+g,k=t.height+g-m.height-6,w=t.x-x/2,S=t.y-b/2;t.width=x;const _=t.y-t.height/2-y+m.height+2;let M;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),D=X.svg(h),L=t.rx||t.ry?D.path(wr(w,S,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):D.rectangle(w,S,x,b,{seed:s});M=h.insert(()=>L,":first-child");const Y=D.rectangle(w,_,x,k,{fill:z?a:o,fillStyle:z?"hachure":"solid",stroke:l,seed:s});M=h.insert(()=>L,":first-child"),p=h.insert(()=>Y)}else M=c.insert("rect",":first-child"),M.attr("class","outer").attr("x",w).attr("y",S).attr("width",x).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",w).attr("y",_).attr("width",x).attr("height",k);u.attr("transform",`translate(${t.x-m.width/2}, ${S+1-(ne(r)?0:3)})`);const B=M.node().getBBox();return t.height=B.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(z){return Ai(t,z)},{cluster:h,labelBBox:m}},"roundedWithTitle"),kT=f(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=bt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=tt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ne(r),d=u.insert("g").attr("class","cluster-label "),m=await nr(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let g=m.getBBox();if(ne(r)){const M=m.children[0],B=gt(m);g=M.getBoundingClientRect(),B.attr("width",g.width),B.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;W.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const M=X.svg(u),B=Z(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),z=M.path(wr(b,k,y,x,t.rx),B);w=u.insert(()=>(W.debug("Rough node insert CXC",z),z),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=Rl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const M=d.select("span");M&&M.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=g.height-t.padding/2,t.intersect=function(M){return Ai(t,M)},{cluster:u,labelBBox:g}},"kanbanSection"),wT=f((e,t)=>{const r=bt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,u=t.x-h/2,p=t.y-c/2;t.width=h;let d;if(t.look==="handDrawn"){const y=X.svg(o).rectangle(u,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});d=o.insert(()=>y,":first-child")}else{d=n.insert("rect",":first-child");let g="outer";t.look,g="divider",d.attr("class",g).attr("x",u).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const m=d.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return Ai(t,g)},{cluster:o,labelBBox:{}}},"divider"),ST=ug,TT={rect:ug,squareRect:ST,roundedWithTitle:bT,noteGroup:CT,divider:wT,kanbanSection:kT},dg=new Map,_T=f(async(e,t)=>{const r=t.shape||"rect",i=await TT[r](e,t);return dg.set(t.id,i),i},"insertCluster"),yA=f(()=>{dg=new Map},"clear");function pg(e,t){return e.intersect(t)}f(pg,"intersectNode");var vT=pg;function fg(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/l);i.x0}f(Dn,"sameSign");var LT=yg;function xg(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),n=Math.min(n,c.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,h=s-e.height/2-n;for(let c=0;c1&&a.sort(function(c,u){let p=c.x-r.x,d=c.y-r.y,m=Math.sqrt(p*p+d*d),g=u.x-r.x,y=u.y-r.y,x=Math.sqrt(g*g+y*y);return mc,":first-child");return u.attr("class","anchor").attr("style",Ut(n)),et(t,u),t.intersect=function(p){return W.info("Circle intersect",t,o,p),j.circle(t,o,p)},a}f(Cg,"anchor");function Rn(e,t,r,i,s,a,o){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/s,m=p/a,g=Math.sqrt(d**2+m**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-g**2),x=l+y*a*Math.sin(c)*(o?-1:1),b=h-y*s*Math.cos(c)*(o?-1:1),k=Math.atan2((t-b)/a,(e-x)/s);let S=Math.atan2((i-b)/a,(r-x)/s)-k;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const _=[];for(let M=0;M<20;M++){const B=M/19,z=k+B*S,D=x+s*Math.cos(z),L=b+a*Math.sin(z);_.push({x:D,y:L})}return _}f(Rn,"generateArcPoints");function bg(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(bg,"calculateArcSagitta");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=f(z=>z+o,"calcTotalHeight"),l=f(z=>{const D=z/2;return[D/(2.5+z/50),D]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await ht(e,t,ot(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,d]=l(u),m=bg(u,p,d),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+m-m,x=u,{cssStyles:b}=t,k=[{x:y/2,y:-x/2},{x:-y/2,y:-x/2},...Rn(-y/2,-x/2,-y/2,x/2,p,d,!1),{x:y/2,y:x/2},...Rn(y/2,x/2,y/2,-x/2,p,d,!0)],w=X.svg(h),S=Z(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=xt(k),M=w.path(_,S),B=h.insert(()=>M,":first-child");return B.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${p/2}, 0)`),et(t,B),t.intersect=function(z){return j.polygon(t,k,z)},h}f(kg,"bowTieRect");function lr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(lr,"insertPolygonShape");var Xs=12;async function wg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await ht(e,t,ot(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+Xs),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,p=h,d=-c,m=0,g=[{x:u+Xs,y:d},{x:p,y:d},{x:p,y:m},{x:u,y:m},{x:u,y:d+Xs},{x:u+Xs,y:d}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=X.svg(n),k=Z(t,{}),w=xt(g),S=b.path(w,k);y=n.insert(()=>S,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),x&&y.attr("style",x)}else y=lr(n,h,c,g);return i&&y.attr("style",i),et(t,y),t.intersect=function(b){return j.polygon(t,g,b)},n}f(wg,"card");function Sg(e,t){const{nodeStyles:r}=tt(t);t.label="";const i=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=X.svg(i),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=xt(o),c=n.path(h,l),u=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return j.polygon(t,o,p)},i}f(Sg,"choice");async function Zl(e,t,r){const{labelStyles:i,nodeStyles:s}=tt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await ht(e,t,ot(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?o.width/2+l*2:o.width/2+h;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=X.svg(a),m=Z(t,{}),g=d.circle(0,0,c*2,m);u=a.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",Ut(p))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return et(t,u),t.calcIntersect=function(d,m){const g=d.width/2;return j.circle(d,g,m)},t.intersect=function(d){return W.info("Circle intersect",t,c,d),j.circle(t,c,d)},a}f(Zl,"circle");function Tg(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y} + M ${s.x},${s.y} L ${o.x},${o.y}`}f(Tg,"createLine");function _g(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=X.svg(s),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,a*2,l),c=Tg(a),u=n.path(c,l),p=s.insert(()=>h,":first-child");return p.insert(()=>u),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),et(t,p),t.intersect=function(d){return W.info("crossedCircle intersect",t,{radius:a,point:d}),j.circle(t,a,d)},s}f(_g,"crossedCircle");function tr(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;uS,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),p&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-h/2+u-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),et(t,_),t.intersect=function(M){return j.polygon(t,m,M)},s}f(vg,"curlyBraceLeft");function er(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;uS,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),p&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),et(t,_),t.intersect=function(M){return j.polygon(t,m,M)},s}f(Bg,"curlyBraceRight");function jt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;uz,":first-child").attr("stroke-opacity",0),D.insert(()=>w,":first-child"),D.insert(()=>M,":first-child"),D.attr("class","text"),p&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),et(t,D),t.intersect=function(L){return j.polygon(t,g,L)},s}f(Lg,"curlyBraces");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:h,bbox:c}=await ht(e,t,ot(t)),u=Math.max(n,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,c.height+o*2,(t==null?void 0:t.height)??0),d=p/2,{cssStyles:m}=t,g=X.svg(h),y=Z(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=u,b=p,k=x-d,w=b/4,S=[{x:k,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:k,y:b},...bs(-k,-b/2,d,50,270,90)],_=xt(S),M=g.path(_,y),B=h.insert(()=>M,":first-child");return B.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(${-u/2}, ${-p/2})`),et(t,B),t.intersect=function(z){return j.polygon(t,S,z)},h}f(Ag,"curvedTrapezoid");var FT=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),ET=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),MT=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ic=8,Oc=8;async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-o,t.widthS,":first-child"),m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{const y=FT(0,0,c,d,u,p);m=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Ut(g)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),et(t,m),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const x=j.rect(t,y),b=x.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-p)){let k=p*p*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=p-k,y.y-(t.y??0)>0&&(k=-k),x.y+=k}return x},n}f(Fg,"cylinder");async function Fi(e,t,r){const{labelStyles:i,nodeStyles:s}=tt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await ht(e,t,ot(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const g=X.svg(a),y=Z(t,{}),x=p||d?g.path(wr(h,c,n,l,p||0),y):g.rectangle(h,c,n,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Ut(m))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",Ut(p)).attr("ry",Ut(d)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return et(t,u),t.calcIntersect=function(g,y){return j.rect(g,y)},t.intersect=function(g){return j.rect(t,g)},a}f(Fi,"drawRect");async function Eg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await Fi(e,t,l);if(t.look==="handDrawn"){const d=X.svg(h),m=Z(t,{}),g=h.select(".basic.label-container > path:nth-child(2)"),y=g.node();if(!y)return h;let x=null;if(y instanceof SVGGraphicsElement)x=y.getBBox();else return h;return h.insert(()=>d.line(x.x,x.y,x.x+x.width,x.y,m),".basic.label-container g.label"),h.insert(()=>d.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,m),".basic.label-container g.label"),g.remove(),h}const c=h.select(".basic.label-container"),u=(Number(c.attr("width"))||o)??0,p=(Number(c.attr("height"))||n)??0;return u>0&&p>0&&c.attr("stroke-dasharray",`${u} ${p}`),h}f(Eg,"datastore");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await ht(e,t,ot(t)),h=n.width+s,c=n.height+a,u=c*.2,p=-h/2,d=-c/2-u/2,{cssStyles:m}=t,g=X.svg(o),y=Z(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:p,y:d+u},{x:-p,y:d+u},{x:-p,y:-d},{x:p,y:-d},{x:p,y:d},{x:-p,y:d},{x:-p,y:d+u}],b=g.polygon(x.map(w=>[w.x,w.y]),y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),et(t,k),t.intersect=function(w){return j.rect(t,w)},o}f(Mg,"dividedRectangle");async function $g(e,t){var d,m;const{labelStyles:r,nodeStyles:i}=tt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await ht(e,t,ot(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),c=h-s;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=X.svg(n),y=Z(t,{roughness:.2,strokeWidth:2.5}),x=Z(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,h*2,y),k=g.circle(0,0,c*2,x);u=n.insert("g",":first-child"),u.attr("class",Ut(t.cssClasses)).attr("style",Ut(p)),(d=u.node())==null||d.appendChild(b),(m=u.node())==null||m.appendChild(k)}else{u=n.insert("g",":first-child");const g=u.insert("circle",":first-child"),y=u.insert("circle");u.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return et(t,u),t.intersect=function(g){return W.info("DoubleCircle intersect",t,h,g),j.circle(t,h,g)},n}f($g,"doublecircle");function Ig(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=tt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=X.svg(a),{nodeBorder:h}=r,c=Z(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,o*2,c),p=a.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),et(t,p),t.intersect=function(d){return W.info("filledCircle intersect",t,{radius:o,point:d}),j.circle(t,o,d)},a}f(Ig,"filledCircle");var Dc=10,Rc=10;async function Og(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.heightx,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,et(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return W.info("Triangle intersect",t,p,k),j.polygon(t,p,k)},o}f(Og,"flippedTriangle");function Dg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=tt(t);t.label="";const o=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,p=X.svg(o),d=Z(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=p.rectangle(c,u,l,h,d),g=o.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),et(t,g);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return j.rect(t,x)},o}f(Dg,"forkJoin");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.heightb,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),et(t,k),t.intersect=function(w){return W.info("Pill intersect",t,{radius:p,point:w}),j.polygon(t,y,w)},l}f(Rg,"halfRoundedRectangle");var $T=f((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,h=t.look==="neo"?n:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await ht(e,t,ot(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,g=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-p/2},{x:m-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=X.svg(c),k=Z(t,{}),w=$T(0,0,m,p,d),S=b.path(w,k);y=c.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),x&&y.attr("style",x)}else y=lr(c,m,p,g);return i&&y.attr("style",i),t.width=m,t.height=p,et(t,y),t.intersect=function(b){return j.polygon(t,g,b)},c}f(Pg,"hexagon");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await ht(e,t,ot(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=X.svg(s),h=Z(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=xt(c),p=l.path(u,h),d=s.insert(()=>p,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),et(t,d),t.intersect=function(m){return W.info("Pill intersect",t,{points:c}),j.polygon(t,c,m)},s}f(qg,"hourglass");async function Ng(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=tt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await ht(e,t,"icon-shape default"),p=t.pos==="t",d=n,m=n,{nodeBorder:g}=r,{stylesMap:y}=Li(t),x=-m/2,b=-d/2,k=t.label?8:0,w=X.svg(h),S=Z(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=w.rectangle(x,b,m,d,S),M=Math.max(m,c.width),B=d+c.height+k,z=w.rectangle(-M/2,-B/2,M,B,{...S,fill:"transparent",stroke:"none"}),D=h.insert(()=>_,":first-child"),L=h.insert(()=>z);if(t.icon){const Y=h.append("g");Y.html(`${await Es(t.icon,{height:n,width:n,fallbackPrefix:""})}`);const q=Y.node().getBBox(),I=q.width,$=q.height,A=q.x,O=q.y;Y.attr("transform",`translate(${-I/2-A},${p?c.height/2+k/2-$/2-O:-c.height/2-k/2-$/2-O})`),Y.attr("style",`color: ${y.get("stroke")??g};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-B/2:B/2-c.height})`),D.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),et(t,L),t.intersect=function(Y){if(W.info("iconSquare intersect",t,Y),!t.label)return j.rect(t,Y);const q=t.x??0,I=t.y??0,$=t.height??0;let A=[];return p?A=[{x:q-c.width/2,y:I-$/2},{x:q+c.width/2,y:I-$/2},{x:q+c.width/2,y:I-$/2+c.height+k},{x:q+m/2,y:I-$/2+c.height+k},{x:q+m/2,y:I+$/2},{x:q-m/2,y:I+$/2},{x:q-m/2,y:I-$/2+c.height+k},{x:q-c.width/2,y:I-$/2+c.height+k}]:A=[{x:q-m/2,y:I-$/2},{x:q+m/2,y:I-$/2},{x:q+m/2,y:I-$/2+d},{x:q+c.width/2,y:I-$/2+d},{x:q+c.width/2/2,y:I+$/2},{x:q-c.width/2,y:I+$/2},{x:q-c.width/2,y:I-$/2+d},{x:q-m/2,y:I-$/2+d}],j.polygon(t,A,Y)},h}f(Ng,"icon");async function zg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=tt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await ht(e,t,"icon-shape default"),p=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:g,mainBkg:y}=r,{stylesMap:x}=Li(t),b=X.svg(h),k=Z(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=x.get("fill");k.stroke=w??y;const S=h.append("g");t.icon&&S.html(`${await Es(t.icon,{height:n,width:n,fallbackPrefix:""})}`);const _=S.node().getBBox(),M=_.width,B=_.height,z=_.x,D=_.y,L=Math.max(M,B)*Math.SQRT2+p*2,Y=b.circle(0,0,L,k),q=Math.max(L,c.width),I=L+c.height+d,$=b.rectangle(-q/2,-I/2,q,I,{...k,fill:"transparent",stroke:"none"}),A=h.insert(()=>Y,":first-child"),O=h.insert(()=>$);return S.attr("transform",`translate(${-M/2-z},${m?c.height/2+d/2-B/2-D:-c.height/2-d/2-B/2-D})`),S.attr("style",`color: ${x.get("stroke")??g};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${m?-I/2:I/2-c.height})`),A.attr("transform",`translate(0,${m?c.height/2+d/2:-c.height/2-d/2})`),et(t,O),t.intersect=function(E){return W.info("iconSquare intersect",t,E),j.rect(t,E)},h}f(zg,"iconCircle");async function Wg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=tt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await ht(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Li(t),k=-g/2,w=-m/2,S=t.label?8:0,_=X.svg(h),M=Z(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const B=b.get("fill");M.stroke=B??x;const z=_.path(wr(k,w,g,m,5),M),D=Math.max(g,c.width),L=m+c.height+S,Y=_.rectangle(-D/2,-L/2,D,L,{...M,fill:"transparent",stroke:"none"}),q=h.insert(()=>z,":first-child").attr("class","icon-shape2"),I=h.insert(()=>Y);if(t.icon){const $=h.append("g");$.html(`${await Es(t.icon,{height:n,width:n,fallbackPrefix:""})}`);const A=$.node().getBBox(),O=A.width,E=A.height,T=A.x,N=A.y;$.attr("transform",`translate(${-O/2-T},${d?c.height/2+S/2-E/2-N:-c.height/2-S/2-E/2-N})`),$.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-L/2:L/2-c.height})`),q.attr("transform",`translate(0,${d?c.height/2+S/2:-c.height/2-S/2})`),et(t,I),t.intersect=function($){if(W.info("iconSquare intersect",t,$),!t.label)return j.rect(t,$);const A=t.x??0,O=t.y??0,E=t.height??0;let T=[];return d?T=[{x:A-c.width/2,y:O-E/2},{x:A+c.width/2,y:O-E/2},{x:A+c.width/2,y:O-E/2+c.height+S},{x:A+g/2,y:O-E/2+c.height+S},{x:A+g/2,y:O+E/2},{x:A-g/2,y:O+E/2},{x:A-g/2,y:O-E/2+c.height+S},{x:A-c.width/2,y:O-E/2+c.height+S}]:T=[{x:A-g/2,y:O-E/2},{x:A+g/2,y:O-E/2},{x:A+g/2,y:O-E/2+m},{x:A+c.width/2,y:O-E/2+m},{x:A+c.width/2/2,y:O+E/2},{x:A-c.width/2,y:O+E/2},{x:A-c.width/2,y:O-E/2+m},{x:A-g/2,y:O-E/2+m}],j.polygon(t,T,$)},h}f(Wg,"iconRounded");async function Hg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=tt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await ht(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Li(t),k=-g/2,w=-m/2,S=t.label?8:0,_=X.svg(h),M=Z(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const B=b.get("fill");M.stroke=B??x;const z=_.path(wr(k,w,g,m,.1),M),D=Math.max(g,c.width),L=m+c.height+S,Y=_.rectangle(-D/2,-L/2,D,L,{...M,fill:"transparent",stroke:"none"}),q=h.insert(()=>z,":first-child"),I=h.insert(()=>Y);if(t.icon){const $=h.append("g");$.html(`${await Es(t.icon,{height:n,width:n,fallbackPrefix:""})}`);const A=$.node().getBBox(),O=A.width,E=A.height,T=A.x,N=A.y;$.attr("transform",`translate(${-O/2-T},${d?c.height/2+S/2-E/2-N:-c.height/2-S/2-E/2-N})`),$.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-L/2:L/2-c.height})`),q.attr("transform",`translate(0,${d?c.height/2+S/2:-c.height/2-S/2})`),et(t,I),t.intersect=function($){if(W.info("iconSquare intersect",t,$),!t.label)return j.rect(t,$);const A=t.x??0,O=t.y??0,E=t.height??0;let T=[];return d?T=[{x:A-c.width/2,y:O-E/2},{x:A+c.width/2,y:O-E/2},{x:A+c.width/2,y:O-E/2+c.height+S},{x:A+g/2,y:O-E/2+c.height+S},{x:A+g/2,y:O+E/2},{x:A-g/2,y:O+E/2},{x:A-g/2,y:O-E/2+c.height+S},{x:A-c.width/2,y:O-E/2+c.height+S}]:T=[{x:A-g/2,y:O-E/2},{x:A+g/2,y:O-E/2},{x:A+g/2,y:O-E/2+m},{x:A+c.width/2,y:O-E/2+m},{x:A+c.width/2/2,y:O+E/2},{x:A-c.width/2,y:O+E/2},{x:A-c.width/2,y:O-E/2+m},{x:A-g/2,y:O-E/2+m}],j.polygon(t,T,$)},h}f(Hg,"iconSquare");async function Yg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=tt(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,n??0);const{shapeSvg:u,bbox:p,label:d}=await ht(e,t,"image-shape default"),m=t.pos==="t",g=-h/2,y=-c/2,x=t.label?8:0,b=X.svg(u),k=Z(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(g,y,h,c,k),S=Math.max(h,p.width),_=c+p.height+x,M=b.rectangle(-S/2,-_/2,S,_,{...k,fill:"none",stroke:"none"}),B=u.insert(()=>w,":first-child"),z=u.insert(()=>M);if(t.img){const D=u.append("image");D.attr("href",t.img),D.attr("width",h),D.attr("height",c),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-h/2},${m?_/2-c:-_/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-c/2-p.height/2-x/2:c/2-p.height/2+x/2})`),B.attr("transform",`translate(0,${m?p.height/2+x/2:-p.height/2-x/2})`),et(t,z),t.intersect=function(D){if(W.info("iconSquare intersect",t,D),!t.label)return j.rect(t,D);const L=t.x??0,Y=t.y??0,q=t.height??0;let I=[];return m?I=[{x:L-p.width/2,y:Y-q/2},{x:L+p.width/2,y:Y-q/2},{x:L+p.width/2,y:Y-q/2+p.height+x},{x:L+h/2,y:Y-q/2+p.height+x},{x:L+h/2,y:Y+q/2},{x:L-h/2,y:Y+q/2},{x:L-h/2,y:Y-q/2+p.height+x},{x:L-p.width/2,y:Y-q/2+p.height+x}]:I=[{x:L-h/2,y:Y-q/2},{x:L+h/2,y:Y-q/2},{x:L+h/2,y:Y-q/2+c},{x:L+p.width/2,y:Y-q/2+c},{x:L+p.width/2/2,y:Y+q/2},{x:L-p.width/2,y:Y+q/2},{x:L-p.width/2,y:Y-q/2+c},{x:L-h/2,y:Y-q/2+c}],j.polygon(t,I,D)},u}f(Yg,"imageSquare");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ht(e,t,ot(t)),h=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=X.svg(n),g=Z(t,{}),y=xt(u),x=m.path(y,g);p=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=lr(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,et(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(Ug,"inv_trapezoid");async function Gg(e,t){const{shapeSvg:r,bbox:i,label:s}=await ht(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),et(t,a),t.intersect=function(l){return j.rect(t,l)},r}f(Gg,"labelRect");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ht(e,t,ot(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=X.svg(n),g=Z(t,{}),y=xt(u),x=m.path(y,g);p=n.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=lr(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,et(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(jg,"lean_left");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ht(e,t,ot(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=X.svg(n),g=Z(t,{}),y=xt(u),x=m.path(y,g);p=n.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=lr(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,et(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(Xg,"lean_right");function Vg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],c=X.svg(s),u=Z(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=xt(h),d=c.path(p,u),m=s.insert(()=>d,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${o/2},${-n})`),et(t,m),t.intersect=function(g){return W.info("lightningBolt intersect",t,g),j.polygon(t,h,g)},s}f(Vg,"lightningBolt");var IT=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),OT=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),DT=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Pc=10,qc=10;async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-a,t.width_,":first-child").attr("class","line"),g=n.insert(()=>S,":first-child"),g.attr("class","basic label-container"),y&&g.attr("style",y)}else{const x=IT(0,0,c,d,u,p,m);g=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Ut(y)).attr("style",i)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),et(t,g),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(x){const b=j.rect(t,x),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let w=p*p*(1-k*k/(u*u));w>0&&(w=Math.sqrt(w)),w=p-w,x.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},n}f(Zg,"linedCylinder");async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:h}=await ht(e,t,ot(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:m}=t,g=X.svg(n),y=Z(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...kr(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,p,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],b=g.polygon(x.map(w=>[w.x,w.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),et(t,k),t.intersect=function(w){return j.polygon(t,x,w)},n}f(Kg,"linedWaveEdgedRect");async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await ht(e,t,ot(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,d=u-2*n,m=p-2*n,g=-d/2,y=-m/2,{cssStyles:x}=t,b=X.svg(l),k=Z(t,{}),w=[{x:g-n,y:y+n},{x:g-n,y:y+m+n},{x:g+d-n,y:y+m+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y:y+m-n},{x:g+d+n,y:y+m-n},{x:g+d+n,y:y-n},{x:g+n,y:y-n},{x:g+n,y},{x:g,y},{x:g,y:y+n}],S=[{x:g,y:y+n},{x:g+d-n,y:y+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y},{x:g,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=xt(w);let M=b.path(_,k);const B=xt(S);let z=b.path(B,k);t.look!=="handDrawn"&&(M=On(M),z=On(z));const D=l.insert("g",":first-child");return D.insert(()=>M),D.insert(()=>z),D.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),et(t,D),t.intersect=function(L){return j.polygon(t,w,L)},l}f(Qg,"multiRect");async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ht(e,t,ot(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?p/4:p/8,m=p+(c?d/2:-d/2),g=-u/2,y=-m/2,x=10,{cssStyles:b}=t,k=kr(g-x,y+m+x,g+u-x,y+m+x,d,.8),w=k==null?void 0:k[k.length-1],S=[{x:g-x,y:y+x},{x:g-x,y:y+m+x},...k,{x:g+u-x,y:w.y-x},{x:g+u,y:w.y-x},{x:g+u,y:w.y-2*x},{x:g+u+x,y:w.y-2*x},{x:g+u+x,y:y-x},{x:g+x,y:y-x},{x:g+x,y},{x:g,y},{x:g,y:y+x}],_=[{x:g,y:y+x},{x:g+u-x,y:y+x},{x:g+u-x,y:w.y-x},{x:g+u,y:w.y-x},{x:g+u,y},{x:g,y}],M=X.svg(s),B=Z(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const z=xt(S),D=M.path(z,B),L=xt(_),Y=M.path(L,B),q=s.insert(()=>D,":first-child");return q.insert(()=>Y),q.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),q.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-x-(a.x-(a.left??0))}, ${-(a.height/2)+x-d/2-(a.y-(a.top??0))})`),et(t,q),t.intersect=function(I){return j.polygon(t,S,I)},s}f(Jg,"multiWaveEdgedRectangle");async function tm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=tt(t);t.labelStyle=i,t.useHtmlLabels||ne(Mt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await ht(e,t,ot(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,p=-c/2,{cssStyles:d}=t,m=X.svg(o),g=Z(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=m.rectangle(u,p,h,c,g),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),et(t,x),t.intersect=function(b){return j.rect(t,b)},o}f(tm,"note");var RT=f((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function em(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await ht(e,t,ot(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=X.svg(s),m=Z(t,{}),g=RT(0,0,l),y=d.path(g,m);u=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&u.attr("style",p)}else u=lr(s,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),et(t,u),t.calcIntersect=function(d,m){const g=d.width,y=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],x=j.polygon(d,y,m);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}f(em,"question");async function rm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:h}=await ht(e,t,ot(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),p=-c/2,d=-u/2,m=d/2,g=[{x:p+m,y:d},{x:p,y:0},{x:p+m,y:-d},{x:-p,y:-d},{x:-p,y:d}],{cssStyles:y}=t,x=X.svg(n),b=Z(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=xt(g),w=x.path(k,b),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-m/2},0)`),h.attr("transform",`translate(${-m/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),et(t,S),t.intersect=function(_){return j.polygon(t,g,_)},n}f(rm,"rect_left_inv_arrow");async function im(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await fr(n,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(ne(bt())){const B=c.children[0],z=gt(c);u=B.getBoundingClientRect(),z.attr("width",u.width),z.attr("height",u.height)}W.info("Text 2",l);const p=l||[],d=c.getBBox(),m=await fr(n,Array.isArray(p)?p.join("
    "):p,t.labelStyle,!0,!0),g=m.children[0],y=gt(m);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;gt(m).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),gt(c).attr("transform","translate( "+(u.width(W.debug("Rough node insert CXC",D),L),":first-child"),_=a.insert(()=>(W.debug("Rough node insert CXC",D),D),":first-child")}else _=o.insert("rect",":first-child"),M=o.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),M.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return et(t,_),t.intersect=function(B){return j.rect(t,B)},a}f(im,"rectWithTitle");async function sm(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Fi(e,t,s)}f(sm,"roundedRect");var _r=8;async function am(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await ht(e,t,ot(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?_r:_r*2),c=((t==null?void 0:t.height)??n.height)+a*2,u=h-_r,p=c,d=_r-h/2,m=-c/2,{cssStyles:g}=t,y=X.svg(o),x=Z(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+p},{x:d-_r,y:m+p},{x:d-_r,y:m},{x:d,y:m},{x:d,y:m+p}],k=y.polygon(b.map(S=>[S.x,S.y]),x),w=o.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",Ut(g)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${_r/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),et(t,w),t.intersect=function(S){return j.rect(t,S)},o}f(am,"shadedProcess");async function om(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:h}=await ht(e,t,ot(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,p=c,d=u/1.5,m=-p/2,g=-d/2,{cssStyles:y}=t,x=X.svg(n),b=Z(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y:g},{x:m,y:g+d},{x:m+p,y:g+d},{x:m+p,y:g-d/2}],w=xt(k),S=x.path(w,b),_=n.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),et(t,_),t.intersect=function(M){return j.polygon(t,k,M)},n}f(om,"slopedRect");async function nm(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Fi(e,t,a)}f(nm,"squareRect");async function lm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await ht(e,t,ot(t)),h=l.height+(t.look==="neo"?o*2:o),c=l.width+h/4+(t.look==="neo"?a*2:a),u=h/2,{cssStyles:p}=t,d=X.svg(n),m=Z(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...bs(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...bs(c/2-u,0,u,50,270,450)],y=xt(g),x=d.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),et(t,b),t.intersect=function(k){return j.polygon(t,g,k)},n}f(lm,"stadium");async function hm(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Fi(e,t,r)}f(hm,"state");function cm(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=tt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=X.svg(c),p=Z(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),m=n??l,g=(t.width??0)*5/14,y=u.circle(0,0,g,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),x=c.insert(()=>d,":first-child");if(x.insert(()=>y),t.look!=="handDrawn"&&x.attr("class","outer-path"),a&&x.selectAll("path").attr("style",a),s&&x.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const w=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",S=w?`${w}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${S})`)}return et(t,x),t.intersect=function(w){return j.circle(t,(t.width??0)/2,w)},c}f(cm,"stateEnd");function um(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const c=X.svg(a).circle(0,0,t.width,Gw(i));o=a.insert(()=>c),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${c})`)}return et(t,o),t.intersect=function(h){return j.circle(t,(t.width??7)/2,h)},a}f(um,"stateStart");var Qr=8;async function dm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await ht(e,t,ot(t)),h=((t==null?void 0:t.width)??l.width)+2*Qr+a,c=((t==null?void 0:t.height)??l.height)+o,u=h-2*Qr,p=c,d=-h/2,m=-c/2,g=[{x:0,y:0},{x:u,y:0},{x:u,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const y=X.svg(n),x=Z(t,{}),b=y.rectangle(d,m,u+16,p,x),k=y.line(d+Qr,m,d+Qr,m+p,x),w=y.line(d+Qr+u,m,d+Qr+u,m+p,x);n.insert(()=>k,":first-child"),n.insert(()=>w,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:_}=t;S.attr("class","basic label-container").attr("style",Ut(_)),et(t,S)}else{const y=lr(n,u,p,g);i&&y.attr("style",i),et(t,y)}return t.intersect=function(y){return j.polygon(t,g,y)},n}f(dm,"subroutine");var No=.2;async function pm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-No*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await ht(e,t,ot(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=No*h,u=No*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,m=h,g=-d/2,y=-m/2,{cssStyles:x}=t,b=X.svg(n),k=Z(t,{}),w=[{x:g-c/2,y},{x:g+d+c/2,y},{x:g+d+c/2,y:y+m},{x:g-c/2,y:y+m}],S=[{x:g+d-c/2,y:y+m},{x:g+d+c/2,y:y+m},{x:g+d+c/2,y:y+m-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=xt(w),M=b.path(_,k),B=xt(S),z=b.path(B,{...k,fillStyle:"solid"}),D=n.insert(()=>z,":first-child");return D.insert(()=>M,":first-child"),D.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),et(t,D),t.intersect=function(L){return j.polygon(t,w,L)},n}f(pm,"taggedRect");async function fm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ht(e,t,ot(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,u=.2*l,p=l+h,{cssStyles:d}=t,m=X.svg(s),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:p/2},...kr(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,h,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],x=-n/2+n/2*.1,b=-p/2-u*.4,k=[{x:x+n-c,y:(b+l)*1.3},{x:x+n,y:b+l-u},{x:x+n,y:(b+l)*.9},...kr(x+n,(b+l)*1.25,x+n-c,(b+l)*1.3,-l*.02,.5)],w=xt(y),S=m.path(w,g),_=xt(k),M=m.path(_,{...g,fillStyle:"solid"}),B=s.insert(()=>M,":first-child");return B.insert(()=>S,":first-child"),B.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),et(t,B),t.intersect=function(z){return j.polygon(t,y,z)},s}f(fm,"taggedWaveEdgedRectangle");async function gm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await ht(e,t,ot(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,h=-n/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",n),et(t,c),t.intersect=function(u){return j.rect(t,u)},s}f(gm,"text");var PT=f((e,t,r,i,s,a)=>`M${e},${t} + a${s},${a} 0,0,1 0,${-i} + l${r},0 + a${s},${a} 0,0,1 0,${i} + M${r},${-i} + a${s},${a} 0,0,0 0,${i} + l${-r},0`,"createCylinderPathD"),qT=f((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),NT=f((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Nc=5,zc=10;async function mm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const g=t.height??0;t.height=(t.height??0)-a,t.heightk,":first-child"),m=o.insert(()=>b,":first-child"),m.attr("class","basic label-container"),d&&m.attr("style",d)}else{const g=PT(0,0,p,h,u,c);m=o.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Ut(d)).attr("style",i),m.attr("class","basic label-container outer-path"),d&&m.selectAll("path").attr("style",d),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",u),m.attr("transform",`translate(${-p/2}, ${h/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),et(t,m),t.intersect=function(g){const y=j.rect(t,g),x=y.y-(t.y??0);if(c!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,g.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},o}f(mm,"tiltedCylinder");async function ym(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ht(e,t,ot(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=X.svg(n),g=Z(t,{}),y=xt(u),x=m.path(y,g);p=n.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=lr(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,et(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(ym,"trapezoid");async function xm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.heightb,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),et(t,k),t.intersect=function(w){return j.polygon(t,y,w)},h}f(xm,"trapezoidalPentagon");var Wc=10,Hc=10;async function Cm(e,t){var w;const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.widthb,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=u,et(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(S){return W.info("Triangle intersect",t,d,S),j.polygon(t,d,S)},o}f(Cm,"triangle");async function bm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await ht(e,t,ot(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,d=t.look==="neo"?p/4:p/8,m=p+(n?d:-d),{cssStyles:g}=t,x=14-u,b=x>0?x/2:0,k=X.svg(l),w=Z(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-u/2-b,y:m/2},...kr(-u/2-b,m/2,u/2+b,m/2,d,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],_=xt(S),M=k.path(_,w),B=l.insert(()=>M,":first-child");return B.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-d-(h.y-(h.top??0))})`),et(t,B),t.intersect=function(z){return j.polygon(t,S,z)},l}f(bm,"waveEdgedRectangle");async function km(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-w*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await ht(e,t,ot(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=c/8,p=c+u*2,{cssStyles:d}=t,m=X.svg(n),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-h/2,y:p/2},...kr(-h/2,p/2,h/2,p/2,u,1),{x:h/2,y:-p/2},...kr(h/2,-p/2,-h/2,-p/2,u,-1)],x=xt(y),b=m.path(x,g),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),et(t,k),t.intersect=function(w){return j.polygon(t,y,w)},n}f(km,"waveRectangle");var Ot=10;async function wm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Ot,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-Ot,10));const{shapeSvg:o,bbox:n,label:l}=await ht(e,t,ot(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+Ot,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+Ot,u=h-Ot,p=c-Ot,d=-u/2,m=-p/2,{cssStyles:g}=t,y=X.svg(o),x=Z(t,{}),b=[{x:d-Ot,y:m-Ot},{x:d-Ot,y:m+p},{x:d+u,y:m+p},{x:d+u,y:m-Ot}],k=`M${d-Ot},${m-Ot} L${d+u},${m-Ot} L${d+u},${m+p} L${d-Ot},${m+p} L${d-Ot},${m-Ot} + M${d-Ot},${m} L${d+u},${m} + M${d},${m-Ot} L${d},${m+p}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const w=y.path(k,x),S=o.insert(()=>w,":first-child");return S.attr("transform",`translate(${Ot/2}, ${Ot/2})`),S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Ot/2-(n.x-(n.left??0))}, ${-(n.height/2)+Ot/2-(n.y-(n.top??0))})`),et(t,S),t.intersect=function(_){return j.polygon(t,b,_)},o}f(wm,"windowPane");var Yc=new Set(["redux-color","redux-dark-color"]),zT=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Kl(e,t){var _t,$t,It,Nt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Mt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:K}=Mt(),{background:nt}=K,H={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${nt}`]};await Kl(e,H)}const h=Mt();t.useHtmlLabels=h.htmlLabels;let c=((_t=h.er)==null?void 0:_t.diagramPadding)??10,u=(($t=h.er)==null?void 0:$t.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:m}=tt(t);if(r.attributes.length===0&&t.label){const K={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};ar(t.label,h)+K.labelPaddingX*20){const K=x.width+c*2-(S+_+M+B);S+=K/L,_+=K/L,M>0&&(M+=K/L),B>0&&(B+=K/L)}const q=S+_+M+B,I=X.svg(y),$=Z(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");let A=0;w.length>0&&(A=w.reduce((K,nt)=>K+((nt==null?void 0:nt.rowHeight)??0),0));const O=Math.max(Y.width+c*2,(t==null?void 0:t.width)||0,q),E=Math.max((A??0)+x.height,(t==null?void 0:t.height)||0),T=-O/2,N=-E/2;if(y.selectAll("g:not(:first-child)").each((K,nt,H)=>{const G=gt(H[nt]),lt=G.attr("transform");let pt=0,vt=0;if(lt){const Bt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(lt);Bt&&(pt=parseFloat(Bt[1]),vt=parseFloat(Bt[2]),G.attr("class").includes("attribute-name")?pt+=S:G.attr("class").includes("attribute-keys")?pt+=S+_:G.attr("class").includes("attribute-comment")&&(pt+=S+_+M))}G.attr("transform",`translate(${T+c/2+pt}, ${vt+N+x.height+u/2})`)}),y.select(".name").attr("transform","translate("+-x.width/2+", "+(N+u/2)+")"),i!=null&&Yc.has(i)){const K=r.colorIndex??0;y.attr("data-color-id",`color-${K%l.length}`)}const V=I.rectangle(T,N,O,E,$),ft=y.insert(()=>V,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[K,nt]of w.entries()){const G=(K+1)%2===0&&nt.yOffset!==0,lt=I.rectangle(T,x.height+N+(nt==null?void 0:nt.yOffset),O,nt==null?void 0:nt.rowHeight,{...$,fill:G?a:o,stroke:n});y.insert(()=>lt,"g.label").attr("style",p.join("")).attr("class",`row-rect-${G?"even":"odd"}`)}const at=1e-4;let mt=ei(T,x.height+N,O+T,x.height+N,at),it=I.polygon(mt.map(K=>[K.x,K.y]),$);if(y.insert(()=>it).attr("class","divider"),mt=ei(S+T,x.height+N,S+T,E+N,at),it=I.polygon(mt.map(K=>[K.x,K.y]),$),y.insert(()=>it).attr("class","divider"),z){const K=S+_+T;mt=ei(K,x.height+N,K,E+N,at),it=I.polygon(mt.map(nt=>[nt.x,nt.y]),$),y.insert(()=>it).attr("class","divider")}if(D){const K=S+_+M+T;mt=ei(K,x.height+N,K,E+N,at),it=I.polygon(mt.map(nt=>[nt.x,nt.y]),$),y.insert(()=>it).attr("class","divider")}for(const K of k){const nt=x.height+N+K;mt=ei(T,nt,O+T,nt,at),it=I.polygon(mt.map(H=>[H.x,H.y]),$),y.insert(()=>it).attr("class","divider")}if(et(t,ft),m&&t.look!=="handDrawn")if(i!=null&&zT.has(i))y.selectAll("path").attr("style",m);else{const K=m.split(";"),nt=(Nt=K==null?void 0:K.filter(H=>H.includes("stroke")))==null?void 0:Nt.map(H=>`${H}`).join("; ");y.selectAll("path").attr("style",nt??""),y.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(K){return j.rect(t,K)},y}f(Kl,"erBox");async function ti(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==Ih(t)&&(t=Ih(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await nr(n,t,{width:ar(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(or(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=gt(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}f(ti,"addText");function ei(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}f(ei,"lineToPolygon");async function Sm(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",ot(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=null,u=0,p=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await es(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await es(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();p=m.height,h=o.insert("g").attr("class","members-group text");let g=0;for(const b of t.members){const k=await es(h,b,g,[b.parseClassifier()]);g+=k+a}d=h.node().getBBox().height,d<=0&&(d=s/2),c=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await es(c,b,y,[b.parseClassifier()]);y+=k+a}let x=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${u})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+p+s*2})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+p+(d?d+s*4:s*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}f(Sm,"textHelper");async function es(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Mt();let o="useHtmlLabels"in t?t.useHtmlLabels:or(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),us(n)&&(o=!0);const l=await nr(s,ol(Nr(n)),{width:ar(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let h,c=1;if(o){const u=l.children[0],p=gt(l);c=u.innerHTML.split("
    ").length,u.innerHTML.includes("")&&(c+=u.innerHTML.split("").length-1);const d=u.getElementsByTagName("img");if(d){const m=n.replace(/]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(y=>{function x(){var b;if(g.style.display="flex",g.style.flexDirection="column",m){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(k,10)*5+"px";g.style.minWidth=S,g.style.maxWidth=S}else g.style.width="100%";y(g)}f(x,"setupImage"),setTimeout(()=>{g.complete&&x()}),g.addEventListener("error",x),g.addEventListener("load",x)})))}h=u.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&>(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}f(es,"addText");async function Tm(e,t){var I,$;const r=bt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??or(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await Sm(e,t,r,n,o),{labelStyles:u,nodeStyles:p}=tt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((I=l.styles)==null?void 0:I.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!(($=r.class)!=null&&$.hideEmptyMembersBox),g=X.svg(h),y=Z(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const w=-x/2,S=-b/2;let _=m?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(_=a*2);const M=g.rectangle(w-a,S-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0),x+2*a,b+2*a+_,y),B=h.insert(()=>M,":first-child");B.attr("class","basic label-container outer-path");const z=B.node().getBBox(),D=h.select(".annotation-group").node().getBBox().height-(m?a/2:0)||0,L=h.select(".label-group").node().getBBox().height-(m?a/2:0)||0,Y=h.select(".members-group").node().getBBox().height-(m?a/2:0)||0,q=(D+L+S+a-(S-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((A,O,E)=>{var mt,it;const T=gt(E[O]),N=T.attr("transform");let V=0;if(N){const $t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);$t&&(V=parseFloat($t[2]))}let ft=V+S+a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(T.attr("class").includes("methods-group")){const _t=Math.max(Y,o/2);k?ft=Math.max(q,D+L+_t+S+o*2+a)+o*2:ft=D+L+_t+S+o*4+a}l.members.length===0&&l.methods.length===0&&((mt=r.class)!=null&&mt.hideEmptyMembersBox)&&(l.annotations.length>0?ft=V-o:ft=V),n||(ft-=4);let at=w;(T.attr("class").includes("label-group")||T.attr("class").includes("annotation-group"))&&(at=-((it=T.node())==null?void 0:it.getBBox().width)/2||0,h.selectAll("text").each(function(_t,$t,It){window.getComputedStyle(It[$t]).textAnchor==="middle"&&(at=0)})),T.attr("transform",`translate(${at}, ${ft})`)}),l.members.length>0||l.methods.length>0||m){const A=D+L+S+a,O=g.line(z.x,A,z.x+z.width,A+.001,y);h.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(m||l.members.length>0||l.methods.length>0){const A=D+L+Y+S+o*2+a,O=g.line(z.x,k?Math.max(q,A):A,z.x+z.width,(k?Math.max(q,A):A)+.001,y);h.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),B.select(":nth-child(2)").attr("style",d),h.selectAll(".divider").select("path").attr("style",d),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",d),!n){const A=RegExp(/color\s*:\s*([^;]*)/),O=A.exec(d);if(O){const E=O[0].replace("color","fill");h.selectAll("tspan").attr("style",E)}else if(u){const E=A.exec(u);if(E){const T=E[0].replace("color","fill");h.selectAll("tspan").attr("style",T)}}}return et(t,B),t.intersect=function(A){return j.rect(t,A)},h}f(Tm,"classBox");async function _m(e,t){var z,D;const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,h=ot(t),{themeVariables:c}=bt(),{borderColorArray:u,requirementEdgeLabelBackground:p}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let m;l?m=await ze(d,`<<${s.type}>>`,0,t.labelStyle):m=await ze(d,"<<Element>>",0,t.labelStyle);let g=m;const y=await ze(d,s.name,g,t.labelStyle+"; font-weight: bold;");if(g+=y+n,l){const L=await ze(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,g,t.labelStyle);g+=L;const Y=await ze(d,`${s.text?`Text: ${s.text}`:""}`,g,t.labelStyle);g+=Y;const q=await ze(d,`${s.risk?`Risk: ${s.risk}`:""}`,g,t.labelStyle);g+=q,await ze(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,g,t.labelStyle)}else{const L=await ze(d,`${a.type?`Type: ${a.type}`:""}`,g,t.labelStyle);g+=L,await ze(d,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,g,t.labelStyle)}const x=(((z=d.node())==null?void 0:z.getBBox().width)??200)+o,b=(((D=d.node())==null?void 0:D.getBBox().height)??200)+o,k=-x/2,w=-b/2,S=X.svg(d),_=Z(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const M=S.rectangle(k,w,x,b,_),B=d.insert(()=>M,":first-child");if(B.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const L=t.colorIndex??0;d.attr("data-color-id",`color-${L%u.length}`)}if(d.selectAll(".label").each((L,Y,q)=>{const I=gt(q[Y]),$=I.attr("transform");let A=0,O=0;if($){const V=RegExp(/translate\(([^,]+),([^)]+)\)/).exec($);V&&(A=parseFloat(V[1]),O=parseFloat(V[2]))}const E=O-b/2;let T=k+o/2;(Y===0||Y===1)&&(T=A),I.attr("transform",`translate(${T}, ${E+o})`)}),g>m+y+n){const L=w+m+y+n;let Y;if(t.look==="neo"){const $=[[k,L],[k+x,L],[k+x,L+.001],[k,L+.001]];Y=S.polygon($,_)}else Y=S.line(k,L,k+x,L,_);d.insert(()=>Y).attr("class","divider")}return et(t,B),t.intersect=function(L){return j.rect(t,L)},i&&t.look!=="handDrawn"&&(p||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}f(_m,"requirementBox");async function ze(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=bt(),o=a.htmlLabels??!0,n=await nr(s,ol(Nr(t)),{width:ar(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const h=n.children[0],c=gt(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}f(ze,"addText");var WT=f(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function vm(e,t,{config:r}){var Y,q;const{labelStyles:i,nodeStyles:s}=tt(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await ht(e,t,ot(t)),c=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((Y=r==null?void 0:r.kanban)!=null&&Y.ticketBaseUrl)&&(u=(q=r==null?void 0:r.kanban)==null?void 0:q.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,g;p?{label:m,bbox:g}=await qo(p,"ticket"in t&&t.ticket||"",d):{label:m,bbox:g}=await qo(n,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await qo(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,w=Math.max(g.height,x.height)/2,S=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+w,_=-k/2,M=-S/2;h.attr("transform","translate("+(c-k/2)+", "+(-w-l.height/2)+")"),m.attr("transform","translate("+(c-k/2)+", "+(-w+l.height/2)+")"),y.attr("transform","translate("+(c+k/2-x.width-2*a)+", "+(-w+l.height/2)+")");let B;const{rx:z,ry:D}=t,{cssStyles:L}=t;if(t.look==="handDrawn"){const I=X.svg(n),$=Z(t,{}),A=z||D?I.path(wr(_,M,k,S,z||0),$):I.rectangle(_,M,k,S,$);B=n.insert(()=>A,":first-child"),B.attr("class","basic label-container").attr("style",L||null)}else{B=n.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",s).attr("rx",z??5).attr("ry",D??5).attr("x",_).attr("y",M).attr("width",k).attr("height",S);const I="priority"in t&&t.priority;if(I){const $=n.append("line"),A=_+2,O=M+Math.floor((z??0)/2),E=M+S-Math.floor((z??0)/2);$.attr("x1",A).attr("y1",O).attr("x2",A).attr("y2",E).attr("stroke-width","4").attr("stroke",WT(I))}}return et(t,B),t.height=S,t.intersect=function(I){return j.rect(t,I)},n}f(vm,"kanbanItem");async function Bm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await ht(e,t,ot(t)),l=a.width+10*o,h=a.height+8*o,c=.15*l,{cssStyles:u}=t,p=a.width+20,d=a.height+20,m=Math.max(l,p),g=Math.max(h,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const x=`M0 0 + a${c},${c} 1 0,0 ${m*.25},${-1*g*.1} + a${c},${c} 1 0,0 ${m*.25},0 + a${c},${c} 1 0,0 ${m*.25},0 + a${c},${c} 1 0,0 ${m*.25},${g*.1} + + a${c},${c} 1 0,0 ${m*.15},${g*.33} + a${c*.8},${c*.8} 1 0,0 0,${g*.34} + a${c},${c} 1 0,0 ${-1*m*.15},${g*.33} + + a${c},${c} 1 0,0 ${-1*m*.25},${g*.15} + a${c},${c} 1 0,0 ${-1*m*.25},0 + a${c},${c} 1 0,0 ${-1*m*.25},0 + a${c},${c} 1 0,0 ${-1*m*.25},${-1*g*.15} + + a${c},${c} 1 0,0 ${-1*m*.1},${-1*g*.33} + a${c*.8},${c*.8} 1 0,0 0,${-1*g*.34} + a${c},${c} 1 0,0 ${m*.1},${-1*g*.33} + H0 V0 Z`;if(t.look==="handDrawn"){const b=X.svg(s),k=Z(t,{}),w=b.path(x,k);y=s.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",Ut(u))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-m/2}, ${-g/2})`),et(t,y),t.calcIntersect=function(b,k){return j.rect(b,k)},t.intersect=function(b){return W.info("Bang intersect",t,b),j.rect(t,b)},s}f(Bm,"bang");async function Lm(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await ht(e,t,ot(t)),l=a.width+2*o,h=a.height+2*o,c=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:m}=t;let g;const y=`M0 0 + a${c},${c} 0 0,1 ${l*.25},${-1*l*.1} + a${p},${p} 1 0,1 ${l*.4},${-1*l*.1} + a${u},${u} 1 0,1 ${l*.35},${l*.2} + + a${c},${c} 1 0,1 ${l*.15},${h*.35} + a${d},${d} 1 0,1 ${-1*l*.15},${h*.65} + + a${u},${c} 1 0,1 ${-1*l*.25},${l*.15} + a${p},${p} 1 0,1 ${-1*l*.5},0 + a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15} + + a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35} + a${d},${d} 1 0,1 ${l*.1},${-1*h*.65} + H0 V0 Z`;if(t.look==="handDrawn"){const x=X.svg(s),b=Z(t,{}),k=x.path(y,b);g=s.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",Ut(m))}else g=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),g.attr("transform",`translate(${-l/2}, ${-h/2})`),et(t,g),t.calcIntersect=function(x,b){return j.rect(x,b)},t.intersect=function(x){return W.info("Cloud intersect",t,x),j.rect(t,x)},s}f(Lm,"cloud");async function Am(e,t){const{labelStyles:r,nodeStyles:i}=tt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await ht(e,t,ot(t)),l=a.width+8*o,h=a.height+2*o,c=5,u=t.look==="neo"?` + M${-l/2} ${h/2-c} + v${-h+2*c} + q0,-${c} ${c},-${c} + h${l-2*c} + q${c},0 ${c},${c} + v${h-c} + H${-l/2} + Z + `:` + M${-l/2} ${h/2-c} + v${-h+2*c} + q0,-${c} ${c},-${c} + h${l-2*c} + q${c},0 ${c},${c} + v${h-2*c} + q0,${c} ${-c},${c} + h${-(l-2*c)} + q${-c},0 ${-c},${-c} + Z + `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),et(t,p),t.calcIntersect=function(d,m){return j.rect(d,m)},t.intersect=function(d){return j.rect(t,d)},s}f(Am,"defaultMindmapNode");async function Fm(e,t){const r={padding:t.padding??0};return Zl(e,t,r)}f(Fm,"mindmapCircle");var HT=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:nm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:sm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:lm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:dm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Fg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Eg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Zl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Bm},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Lm},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:em},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Pg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Xg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:jg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ym},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Ug},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:$g},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:gm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:wg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:am},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:um},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:cm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Dg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:qg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:vg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Bg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Lg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Vg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:bm},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Rg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:mm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Zg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Ag},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Mg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Cm},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:wm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Ig},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:xm},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Og},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:om},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Jg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Qg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:kg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:_g},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:fm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:pm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:km},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:rm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Kg}],YT=f(()=>{const t=[...Object.entries({state:hm,choice:Sg,note:tm,rectWithTitle:im,labelRect:Gg,iconSquare:Hg,iconCircle:zg,icon:Ng,iconRounded:Wg,imageSquare:Yg,anchor:Cg,kanbanItem:vm,mindmapCircle:Fm,defaultMindmapNode:Am,classBox:Tm,erBox:Kl,requirementBox:_m}),...HT.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Em=YT();function UT(e){return e in Em}f(UT,"isValidShape");var ho=new Map;async function Mm(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Em[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Ut(t.look)),t.tooltip&&s.attr("title",t.tooltip),ho.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(Mm,"insertNode");var xA=f((e,t)=>{ho.set(t.id,e)},"setNodeElem"),CA=f(()=>{ho.clear()},"clear"),bA=f(e=>{const t=ho.get(e.id);W.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),GT=f((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&Uc(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&Uc(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),jT={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},XT=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Uc=f((e,t,r,i,s,a,o=!1,n)=>{var m;const l=jT[r],h=l&&XT.includes(l.type);if(!l){W.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${s}_${a}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const g=n.replace(/[^\dA-Za-z]/g,"_"),y=`${d}_${g}`;if(!document.getElementById(y)){const x=document.getElementById(d);if(x){const b=x.cloneNode(!0);b.id=y,b.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(m=x.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),VT=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=bt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Ya=new Map,Xt=new Map,kA=f(()=>{Ya.clear(),Xt.clear()},"clear"),ji=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),ZT=f(async(e,t)=>{const r=bt();let i=ne(r);const{labelStyles:s}=tt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await nr(e,t.label,{style:ji(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),W.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],m=gt(h);c=d.getBoundingClientRect(),u=c,m.attr("width",c.width),m.attr("height",c.height)}else{const d=gt(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",Wi(u,i)),Ya.set(t.id,a),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await fr(m,t.startLabelLeft,ji(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const x=g.children[0],b=gt(g);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Wi(y,i)),Xt.get(t.id)||Xt.set(t.id,{}),Xt.get(t.id).startLeft=d,rs(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await fr(m,t.startLabelRight,ji(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const x=g.children[0],b=gt(g);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Wi(y,i)),Xt.get(t.id)||Xt.set(t.id,{}),Xt.get(t.id).startRight=d,rs(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await fr(d,t.endLabelLeft,ji(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const x=g.children[0],b=gt(g);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Wi(y,i)),Xt.get(t.id)||Xt.set(t.id,{}),Xt.get(t.id).endLeft=d,rs(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await fr(d,t.endLabelRight,ji(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const x=g.children[0],b=gt(g);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Wi(y,i)),Xt.get(t.id)||Xt.set(t.id,{}),Xt.get(t.id).endRight=d,rs(p,t.endLabelRight)}return h},"insertEdgeLabel");function rs(e,t){ne(bt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(rs,"setTerminalWidth");var KT=f((e,t)=>{W.debug("Moving label abc88 ",e.id,e.label,Ya.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=bt(),{subGraphTitleTotalMargin:s}=Rl(i);if(e.label){const a=Ya.get(e.id);let o=e.x,n=e.y;if(r){const l=Fe.calcLabelPosition(r);W.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=Xt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=Fe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=Xt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=Fe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=Xt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=Fe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=Xt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=Fe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),QT=f((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),JT=f((e,t,r)=>{W.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.xMath.abs(i-t.x)*l){let u=r.y{W.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(W.info("abc88 checking point",a,t),!QT(t,a)&&!s){const o=JT(t,i,a);W.debug("abc88 inside",a,i,o),W.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?W.warn("abc88 no intersect",o,r):r.push(o),s=!0}else W.warn("abc88 outside",a,i),i=a,s||r.push(a)}),W.debug("returning points",r),r},"cutPathAtIntersect");function $m(e){const t=[],r=[];for(let i=1;i5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f($m,"extractCornerPoints");var jc=f(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),t_=f(function(e){const{cornerPointPositions:t}=$m(e),r=[];for(let i=0;i10&&Math.abs(a.y-s.y)>=10){W.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?p={x:h<0?n.x-d+u:n.x+d-u,y:c<0?n.y-u:n.y+u}:p={x:h<0?n.x-u:n.x+u,y:c<0?n.y-d+u:n.y+d-u}}else W.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),e_=f((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),r_=f(function(e,t,r,i,s,a,o,n=!1){var O;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=bt();let h=t.points,c=!1;const u=s;var p=a;const d=[];for(const E in t.cssCompiledStyles)Ef(E)||d.push(t.cssCompiledStyles[E]);W.debug("UIO intersect check",t.points,p.x,u.x),p.intersect&&u.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),W.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(W.info("to cluster abc88",r.get(t.toCluster)),h=Gc(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(W.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Gc(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let g=h.filter(E=>!Number.isNaN(E.y));const y=VT(t.curve);y!=="rounded"&&(g=t_(g));let x=ls;switch(y){case"linear":x=ls;break;case"basis":x=ln;break;case"cardinal":x=yd;break;case"bumpX":x=dd;break;case"bumpY":x=pd;break;case"catmullRom":x=Cd;break;case"monotoneX":x=_d;break;case"monotoneY":x=vd;break;case"natural":x=Ld;break;case"step":x=Ad;break;case"stepAfter":x=Ed;break;case"stepBefore":x=Fd;break;case"rounded":x=ls;break;default:x=ln}const{x:b,y:k}=Z2(t),w=$1().x(b).y(k).curve(x);let S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let _,M=y==="rounded"?Im(Om(g,t),5):w(g);const B=Array.isArray(t.style)?t.style:[t.style];let z=B.find(E=>E==null?void 0:E.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let L=!1;if(t.look==="handDrawn"){const E=X.svg(e);Object.assign([],g);const T=E.path(M,{roughness:.3,seed:l});S+=" transition",_=gt(T).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",B?B.reduce((V,ft)=>V+";"+ft,""):"");let N=_.attr("d");_.attr("d",N),e.node().appendChild(_.node())}else{const E=d.join(";"),T=B?B.reduce((it,_t)=>it+_t+";",""):"",N=(E?E+";"+T+";":T)+";"+(B?B.reduce((it,_t)=>it+";"+_t,""):"");_=e.append("path").attr("d",M).attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",N),z=(O=N.match(/stroke:([^;]+)/))==null?void 0:O[1],L=t.animate===!0||!!t.animation||E.includes("animation");const V=_.node(),ft=typeof V.getTotalLength=="function"?V.getTotalLength():0,at=nc[t.arrowTypeStart]||0,mt=nc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!L){const _t=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?e_(ft,at,mt):`0 ${at} ${ft-at-mt} ${mt}`}; stroke-dashoffset: 0;`;_.attr("style",_t+_.attr("style"))}}_.attr("data-edge",!0),_.attr("data-et","edge"),_.attr("data-id",t.id),_.attr("data-points",m),_.attr("data-look",Ut(t.look)),t.showPoints&&g.forEach(E=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",E.x).attr("cy",E.y)});let Y="";(bt().flowchart.arrowMarkerAbsolute||bt().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),W.info("arrowTypeStart",t.arrowTypeStart),W.info("arrowTypeEnd",t.arrowTypeEnd);const q=!L&&(t==null?void 0:t.look)==="neo";GT(_,t,Y,o,i,q,z);const I=Math.floor(h.length/2),$=h[I];Fe.isLabelCoordinateInPath($,_.attr("d"))||(c=!0);let A={};return c&&(A.updatedPath=h),A.originalPath=t.points,A},"insertEdge");function Im(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a({...s}));if(e.length>=2&&Kt[t.arrowTypeStart]){const s=Kt[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=Pn(a,o),l=s*Math.cos(n),h=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&Kt[t.arrowTypeEnd]){const s=Kt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=Pn(o,a),l=s*Math.cos(n),h=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}f(Om,"applyMarkerOffsetsToPoints");var i_=f((e,t,r,i)=>{t.forEach(s=>{v_[s](e,r,i)})},"insertMarkers"),s_=f((e,t,r)=>{W.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),a_=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),o_=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),n_=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),l_=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),h_=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),c_=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),u_=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),d_=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),p_=f((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),f_=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),g_=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),m_=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),y_=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),x_=f((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),C_=f((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),b_=f((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),k_=f((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),w_=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 + L20,10 + M20,10 + L0,20`)},"requirement_arrow"),S_=f((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 + L20,10 + M20,10 + L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),T_=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),__=f((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),v_={extension:s_,composition:a_,aggregation:o_,dependency:n_,lollipop:l_,point:h_,circle:c_,cross:u_,barb:d_,barbNeo:p_,only_one:f_,zero_or_one:g_,one_or_more:m_,zero_or_more:y_,only_one_neo:x_,zero_or_one_neo:C_,one_or_more_neo:b_,zero_or_more_neo:k_,requirement_arrow:w_,requirement_contains:T_,requirement_arrow_neo:S_,requirement_contains_neo:__},B_=i_,L_={common:_s,getConfig:Mt,insertCluster:_T,insertEdge:r_,insertEdgeLabel:ZT,insertMarkers:B_,insertNode:Mm,interpolateToCurve:El,labelHelper:ht,log:W,positionEdgeLabel:KT},ks={},Dm=f(e=>{for(const t of e)ks[t.name]=t},"registerLayoutLoaders"),A_=f(()=>{Dm([{name:"dagre",loader:f(async()=>await Ct(()=>import("./dagre-BM42HDAG-B7Ojjrxg.js"),__vite__mapDeps([0,1,2])),"loader")},{name:"cose-bilkent",loader:f(async()=>await Ct(()=>import("./cose-bilkent-S5V4N54A-DfPmC3MC.js"),__vite__mapDeps([3,4])),"loader")}])},"registerDefaultLayoutLoaders");A_();var wA=f(async(e,t)=>{if(!(e.layoutAlgorithm in ks))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const u=c.domId||c.id;c.domId=`${e.diagramId}-${u}`}const r=ks[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,L_,{algorithm:r.algorithm})},"render"),SA=f((e="",{fallback:t="dagre"}={})=>{if(e in ks)return e;if(t in ks)return W.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Ql="comm",Rm="rule",Pm="decl",F_="@media",E_="@import",M_="@supports",$_="@namespace",qn="@keyframes",qm="@layer",I_="@scope",O_=Math.abs,cs=String.fromCharCode;function Nm(e){return e.trim()}function Nn(e,t,r){return e.replace(t,r)}function oi(e,t){return e.charCodeAt(t)|0}function vi(e,t,r){return e.slice(t,r)}function We(e){return e.length}function zm(e){return e.length}function Vs(e,t){return t.push(e),e}var co=1,Bi=1,Wm=0,Se=0,qt=0,Ei="";function Jl(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:co,column:Bi,length:o,return:"",siblings:n}}function D_(){return qt}function R_(){return qt=Se>0?oi(Ei,--Se):0,Bi--,qt===10&&(Bi=1,co--),qt}function Me(){return qt=Se2||ws(qt)>3?"":" "}function z_(e,t){for(;--t&&Me()&&!(qt<48||qt>102||qt>57&&qt<65||qt>70&&qt<97););return uo(e,ca()+(t<6&&gr()==32&&Me()==32))}function zn(e){for(;Me();)switch(qt){case e:return Se;case 34:case 39:e!==34&&e!==39&&zn(qt);break;case 40:e===41&&zn(e);break;case 92:Me();break}return Se}function W_(e,t){for(;Me()&&e+qt!==57;)if(e+qt===84&&gr()===47)break;return"/*"+uo(t,Se-1)+"*"+cs(e===47?e:Me())}function H_(e){for(;!ws(gr());)Me();return uo(e,Se)}function Y_(e){return q_(ua("",null,null,null,[""],e=P_(e),0,[0],e))}function ua(e,t,r,i,s,a,o,n,l){for(var h=0,c=0,u=o,p=0,d=0,m=0,g=1,y=1,x=1,b=0,k=0,w="",S=s,_=a,M=i,B=w;y;)switch(m=k,k=Me()){case 40:m!=108&&oi(B,u-1)==58?(b++,B+="("):B+=zo(k);break;case 41:b--,B+=")";break;case 34:case 39:case 91:B+=zo(k);break;case 9:case 10:case 13:case 32:if(b>0){B+=cs(k);break}B+=N_(m);break;case 92:B+=z_(ca()-1,7);continue;case 47:switch(gr()){case 42:case 47:Vs(U_(W_(Me(),ca()),t,r,l),l),(ws(m||1)==5||ws(gr()||1)==5)&&We(B)&&vi(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*g:n[h++]=We(B)*x;case 125*g:case 59:case 0:if(b>0&&k){B+=cs(k);break}switch(k){case 0:case 125:y=0;case 59+c:x==-1&&(B=Nn(B,/\f/g,"")),d>0&&(We(B)-u||g===0)&&Vs(d>32?Vc(B+";",i,r,u-1,l):Vc(Nn(B," ","")+";",i,r,u-2,l),l);break;case 59:B+=";";default:if(Vs(M=Xc(B,t,r,h,c,s,n,w,S=[],_=[],u,a),a),k===123)if(c===0)ua(B,t,M,M,S,a,u,n,_);else{switch(p){case 99:if(oi(B,3)===110)break;case 108:if(oi(B,2)===97)break;default:c=0;case 100:case 109:case 115:}c?ua(e,M,M,i&&Vs(Xc(e,M,M,0,0,s,n,w,s,S=[],u,_),_),s,_,u,n,i?S:_):ua(B,M,M,M,[""],_,0,n,_)}}h=c=d=0,g=x=1,w=B="",u=o;break;case 58:u=1+We(B),d=m;default:if(g<1){if(k==123)--g;else if(k==125&&g++==0&&R_()==125)continue}switch(B+=cs(k),k*g){case 38:x=c>0?1:(B+="\f",-1);break;case 44:if(b>0)break;n[h++]=(We(B)-1)*x,x=1;break;case 64:gr()===45&&(B+=zo(Me())),p=gr(),c=u=We(w=B+=H_(ca())),k++;break;case 45:m===45&&We(B)==2&&(g=0)}}return a}function Xc(e,t,r,i,s,a,o,n,l,h,c,u){for(var p=s-1,d=s===0?a:[""],m=zm(d),g=0,y=0,x=0;g0?d[b]+" "+k:Nn(k,/&\f/g,d[b])))&&(l[x++]=w);return Jl(e,t,r,s===0?Rm:n,l,h,c,u)}function U_(e,t,r,i){return Jl(e,t,r,Ql,cs(D_()),vi(e,2,-2),0,i)}function Vc(e,t,r,i,s){return Jl(e,t,r,Pm,vi(e,0,i),vi(e,i+1,-1),i,s)}function Wn(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),V_=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-DAk3fAMC.js");return{diagram:t}},__vite__mapDeps([5,6]));return{id:Hm,diagram:e}},"loader"),Z_={id:Hm,detector:X_,loader:V_},K_=Z_,Ym="flowchart",Q_=f((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),J_=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-D0Me_Wp2.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:Ym,diagram:e}},"loader"),tv={id:Ym,detector:Q_,loader:J_},ev=tv,Um="flowchart-v2",rv=f((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),iv=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-D0Me_Wp2.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:Um,diagram:e}},"loader"),sv={id:Um,detector:rv,loader:iv},av=sv,Gm="er",ov=f(e=>/^\s*erDiagram/.test(e),"detector"),nv=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-6rSkwA1P.js");return{diagram:t}},__vite__mapDeps([12,9,10,11]));return{id:Gm,diagram:e}},"loader"),lv={id:Gm,detector:ov,loader:nv},hv=lv,jm="gitGraph",cv=f(e=>/^\s*gitGraph/.test(e),"detector"),uv=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-aKmExrif.js");return{diagram:t}},__vite__mapDeps([13,14,15,16]));return{id:jm,diagram:e}},"loader"),dv={id:jm,detector:cv,loader:uv},pv=dv,Xm="gantt",fv=f(e=>/^\s*gantt/.test(e),"detector"),gv=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-CskD-f5L.js");return{diagram:t}},__vite__mapDeps([17,18,19,20]));return{id:Xm,diagram:e}},"loader"),mv={id:Xm,detector:fv,loader:gv},yv=mv,Vm="info",xv=f(e=>/^\s*info/.test(e),"detector"),Cv=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-ChgsIg6d.js");return{diagram:t}},__vite__mapDeps([21,16]));return{id:Vm,diagram:e}},"loader"),bv={id:Vm,detector:xv,loader:Cv},Zm="pie",kv=f(e=>/^\s*pie/.test(e),"detector"),wv=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-DbOHoVVN.js");return{diagram:t}},__vite__mapDeps([22,14,16,23,24,19]));return{id:Zm,diagram:e}},"loader"),Sv={id:Zm,detector:kv,loader:wv},Km="quadrantChart",Tv=f(e=>/^\s*quadrantChart/.test(e),"detector"),_v=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-DEXrGMHs.js");return{diagram:t}},__vite__mapDeps([25,18,19,20]));return{id:Km,diagram:e}},"loader"),vv={id:Km,detector:Tv,loader:_v},Bv=vv,Qm="xychart",Lv=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Av=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-D123ylb3.js");return{diagram:t}},__vite__mapDeps([26,19,24,18,20]));return{id:Qm,diagram:e}},"loader"),Fv={id:Qm,detector:Lv,loader:Av},Ev=Fv,Jm="requirement",Mv=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),$v=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-C9L6Ib86.js");return{diagram:t}},__vite__mapDeps([27,9,10]));return{id:Jm,diagram:e}},"loader"),Iv={id:Jm,detector:Mv,loader:$v},Ov=Iv,ty="sequence",Dv=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),Rv=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-D_-m6WNS.js");return{diagram:t}},__vite__mapDeps([28,6,15]));return{id:ty,diagram:e}},"loader"),Pv={id:ty,detector:Dv,loader:Rv},qv=Pv,ey="class",Nv=f((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),zv=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-C891wWoD.js");return{diagram:t}},__vite__mapDeps([29,30,8,6,9,10]));return{id:ey,diagram:e}},"loader"),Wv={id:ey,detector:Nv,loader:zv},Hv=Wv,ry="classDiagram",Yv=f((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),Uv=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-C891wWoD.js");return{diagram:t}},__vite__mapDeps([31,30,8,6,9,10]));return{id:ry,diagram:e}},"loader"),Gv={id:ry,detector:Yv,loader:Uv},jv=Gv,iy="state",Xv=f((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),Vv=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-DSD_0bJU.js");return{diagram:t}},__vite__mapDeps([32,33,9,10,1,2]));return{id:iy,diagram:e}},"loader"),Zv={id:iy,detector:Xv,loader:Vv},Kv=Zv,sy="stateDiagram",Qv=f((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),Jv=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-Bj5k-FXZ.js");return{diagram:t}},__vite__mapDeps([34,33,9,10]));return{id:sy,diagram:e}},"loader"),tB={id:sy,detector:Qv,loader:Jv},eB=tB,ay="journey",rB=f(e=>/^\s*journey/.test(e),"detector"),iB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-BGdfH_nK.js");return{diagram:t}},__vite__mapDeps([35,8,6,23]));return{id:ay,diagram:e}},"loader"),sB={id:ay,detector:rB,loader:iB},aB=sB,oB=f((e,t,r)=>{W.debug(`rendering svg for syntax error +`);const i=W1(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Ou(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),oy={draw:oB},nB=oy,lB={db:{},renderer:oy,parser:{parse:f(()=>{},"parse")}},hB=lB,ny="flowchart-elk",cB=f((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),uB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-D0Me_Wp2.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:ny,diagram:e}},"loader"),dB={id:ny,detector:cB,loader:uB},pB=dB,ly="timeline",fB=f(e=>/^\s*timeline/.test(e),"detector"),gB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-DuNinMEh.js");return{diagram:t}},__vite__mapDeps([36,23]));return{id:ly,diagram:e}},"loader"),mB={id:ly,detector:fB,loader:gB},yB=mB,hy="mindmap",xB=f(e=>/^\s*mindmap/.test(e),"detector"),CB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-R9rEr1y5.js");return{diagram:t}},__vite__mapDeps([37,9,10]));return{id:hy,diagram:e}},"loader"),bB={id:hy,detector:xB,loader:CB},kB=bB,cy="kanban",wB=f(e=>/^\s*kanban/.test(e),"detector"),SB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-BOdRLozk.js");return{diagram:t}},__vite__mapDeps([38,8]));return{id:cy,diagram:e}},"loader"),TB={id:cy,detector:wB,loader:SB},_B=TB,uy="sankey",vB=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),BB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-DsxkSyuQ.js");return{diagram:t}},__vite__mapDeps([39,24,19]));return{id:uy,diagram:e}},"loader"),LB={id:uy,detector:vB,loader:BB},AB=LB,dy="packet",FB=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),EB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-B5Kro_O5.js");return{diagram:t}},__vite__mapDeps([40,14,16]));return{id:dy,diagram:e}},"loader"),MB={id:dy,detector:FB,loader:EB},py="radar",$B=f(e=>/^\s*radar-beta/.test(e),"detector"),IB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-DngQtK0P.js");return{diagram:t}},__vite__mapDeps([41,14,16]));return{id:py,diagram:e}},"loader"),OB={id:py,detector:$B,loader:IB},fy="block",DB=f(e=>/^\s*block(-beta)?/.test(e),"detector"),RB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-DsfQw5wZ.js");return{diagram:t}},__vite__mapDeps([42,8,1,11]));return{id:fy,diagram:e}},"loader"),PB={id:fy,detector:DB,loader:RB},qB=PB,gy="treeView",NB=f(e=>/^\s*treeView-beta/.test(e),"detector"),zB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-C5KUC4pU.js");return{diagram:t}},__vite__mapDeps([43,14,15,16]));return{id:gy,diagram:e}},"loader"),WB={id:gy,detector:NB,loader:zB},HB=WB,my="architecture",YB=f(e=>/^\s*architecture/.test(e),"detector"),UB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-CXJxMnqD.js");return{diagram:t}},__vite__mapDeps([44,14,16,4]));return{id:my,diagram:e}},"loader"),GB={id:my,detector:YB,loader:UB},jB=GB,yy="eventmodeling",XB=f(e=>/^\s*eventmodeling/.test(e),"detector"),VB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-C6UfqqSa.js");return{diagram:t}},__vite__mapDeps([45,14,16]));return{id:yy,diagram:e}},"loader"),ZB={id:yy,detector:XB,loader:VB},KB=ZB,xy="ishikawa",QB=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),JB=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-B1FiwTBi.js");return{diagram:t}},[]);return{id:xy,diagram:e}},"loader"),tL={id:xy,detector:QB,loader:JB},Cy="venn",eL=f(e=>/^\s*venn-beta/.test(e),"detector"),rL=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-CJlbgw-f.js");return{diagram:t}},[]);return{id:Cy,diagram:e}},"loader"),iL={id:Cy,detector:eL,loader:rL},sL=iL,by="treemap",aL=f(e=>/^\s*treemap/.test(e),"detector"),oL=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-CBZ7PcAN.js");return{diagram:t}},__vite__mapDeps([46,10,14,16,20,24,19]));return{id:by,diagram:e}},"loader"),nL={id:by,detector:aL,loader:oL},ky="wardley-beta",lL=f(e=>/^\s*wardley-beta/i.test(e),"detector"),hL=f(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-D-feaV5C.js");return{diagram:t}},__vite__mapDeps([47,14,16]));return{id:ky,diagram:e}},"loader"),cL={id:ky,detector:lL,loader:hL},uL=cL,Zc=!1,po=f(()=>{Zc||(Zc=!0,Ca("error",hB,e=>e.toLowerCase().trim()==="error"),Ca("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Go(pB,kB,jB),Go(K_,_B,jv,Hv,hv,yv,bv,Sv,Ov,qv,av,ev,yB,pv,eB,Kv,aB,Bv,AB,MB,Ev,qB,KB,HB,OB,tL,nL,sL,uL))},"addDiagrams"),dL=f(async()=>{W.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Dr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Ko(r)}catch{try{const{diagram:a,id:o}=await s();Ca(o,a,i)}catch(a){throw W.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Dr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){W.error(`Failed to load ${t.length} external diagrams`);for(const r of t)W.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),pL="graphics-document document";function wy(e,t){e.attr("role",pL),t!==""&&e.attr("aria-roledescription",t)}f(wy,"setA11yDiagramInfo");function Sy(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}f(Sy,"addSVGa11yTitleDescription");var $r,Hn=($r=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var h,c;const i=Mt(),s=el(t,i);t=Uw(t)+` +`;try{Ko(s)}catch{const u=lx(s);if(!u)throw new bu(`Diagram ${s} not found.`);const{id:p,diagram:d}=await u();Ca(p,d)}const{db:a,parser:o,renderer:n,init:l}=Ko(s);return o.parser&&(o.parser.yy=a),(h=a.clear)==null||h.call(a),l==null||l(i),r.title&&((c=a.setDiagramTitle)==null||c.call(a,r.title)),await o.parse(t),new $r(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f($r,"Diagram"),$r),Kc=[],fL=f(()=>{Kc.forEach(e=>{e()}),Kc=[]},"attachFunctions"),gL=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Ty(e){const t=e.match(Cu);if(!t)return{text:e,metadata:{}};let r=V2(t[1],{schema:X2})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}f(Ty,"extractFrontMatter");var mL=f(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),yL=f(e=>{const{text:t,metadata:r}=Ty(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),xL=f(e=>{const t=Fe.detectInit(e)??{},r=Fe.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:Mw(e),directive:t}},"processDirectives");function th(e){const t=mL(e),r=yL(t),i=xL(r.text),s=Dl(r.config,i.directive);return e=gL(i.text),{code:e,title:r.title,config:s}}f(th,"preprocessDiagram");function _y(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(_y,"toBase64");var CL=5e4,bL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",kL="sandbox",wL="loose",SL="http://www.w3.org/2000/svg",TL="http://www.w3.org/1999/xlink",_L="http://www.w3.org/1999/xhtml",vL="100%",BL="100%",LL="border:0;margin:0;",AL="margin:0",FL="allow-top-navigation-by-user-activation allow-popups",EL='The "iframe" tag is not supported by your browser.',ML=["foreignobject"],$L=["dominant-baseline"];function eh(e){const t=th(e);return ya(),Ox(t.config??{}),t}f(eh,"processAndSetConfigs");async function vy(e,t){po();try{const{code:r,config:i}=eh(e);return{diagramType:(await Ly(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(vy,"parse");var Qc=f((e,t,r=[])=>{const i=_u(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),IL=f((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=ne(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{dc(l.styles)||n.forEach(h=>{r.insertRule(Qc(l.id,h,l.styles),r.cssRules.length)}),dc(l.textStyles)||r.insertRule(Qc(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Zo(s)+` +`}else i+=`${e.themeCSS} +`;return i+Zo(r)},"createCssStyles"),OL=f((e,t)=>Wn(Y_(`${e}{${t}}`),j_([f(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===qn)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[F_,M_,qm,I_,"@container","@starting-style"],qn].includes(i.type)||(W.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Ql))},"addNamespace"),G_])),"compileCSS"),DL=f((e,t,r,i)=>{const s=IL(e,r),a=tC(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return OL(i,a)},"createUserStyles"),RL=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Nr(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),PL=f((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":BL,i=_y(`${e}`);return``},"putIntoIFrame"),Jc=f((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",SL);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function Yn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(Yn,"sandboxedIframe");var qL=f((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),NL=f(async function(e,t,r){var Y,q,I,$,A,O;po();const i=eh(t);t=i.code;const s=Mt();W.debug(s),t.length>((s==null?void 0:s.maxTextSize)??CL)&&(t=bL);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=f(()=>{const T=gt(p?n:h).node();T&&"remove"in T&&T.remove()},"removeTempElements");let u=gt(document.body);const p=s.securityLevel===kL,d=s.securityLevel===wL,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const E=Yn(gt(r),o);u=gt(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=gt(r);Jc(u,e,l,`font-family: ${m}`,TL)}else{if(qL(document,e,l,o),p){const E=Yn(gt(document.body),o);u=gt(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=gt("body");Jc(u,e,l)}let g,y;try{g=await Hn.fromText(t,{title:i.title})}catch(E){if(s.suppressErrorRendering)throw c(),E;g=await Hn.fromText("error"),y=E}const x=u.select(h).node(),b=g.type,k=x.firstChild,w=k.firstChild,S=(q=(Y=g.renderer).getClasses)==null?void 0:q.call(Y,t,g),_=DL(s,b,S,a),M=document.createElement("style");M.innerHTML=_,k.insertBefore(M,w);try{await g.renderer.draw(t,e,"11.15.0",g)}catch(E){throw s.suppressErrorRendering?c():nB.draw(t,e,"11.15.0"),E}const B=u.select(`${h} svg`),z=($=(I=g.db).getAccTitle)==null?void 0:$.call(I),D=(O=(A=g.db).getAccDescription)==null?void 0:O.call(A);Ay(b,B,z,D),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",_L);let L=u.select(h).node().innerHTML;if(W.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),L=RL(L,p,or(s.arrowMarkerAbsolute)),p){const E=u.select(h+" svg").node();L=PL(L,E)}else d||(L=Or.sanitize(L,{ADD_TAGS:ML,ADD_ATTR:$L,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(fL(),y)throw y;return c(),{diagramType:b,svg:L,bindFunctions:g.db.bindFunctions}},"render");function By(e={}){var i;const t=Ht({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),$x(t),t!=null&&t.theme&&t.theme in rr?t.themeVariables=rr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=rr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Mx(t):vu();tl(r.logLevel),po()}f(By,"initialize");var Ly=f((e,t={})=>{const{code:r}=th(e);return Hn.fromText(r,t)},"getDiagramFromText");function Ay(e,t,r,i){wy(t,e),Sy(t,r,i,t.attr("id"))}f(Ay,"addA11yInfo");var Wr=Object.freeze({render:NL,parse:vy,getDiagramFromText:Ly,initialize:By,getConfig:Mt,setConfig:Bu,getSiteConfig:vu,updateSiteConfig:Ix,reset:f(()=>{ya()},"reset"),globalReset:f(()=>{ya(ki)},"globalReset"),defaultConfig:ki});tl(Mt().logLevel);ya(Mt());var zL=f((e,t,r)=>{W.warn(e),Ol(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Fy=f(async function(e={querySelector:".mermaid"}){try{await WL(e)}catch(t){if(Ol(t)&&W.error(t.str),ye.parseError&&ye.parseError(t),!e.suppressErrors)throw W.error("Use the suppressErrors option to suppress these errors"),t}},"run"),WL=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Wr.getConfig();W.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");W.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(W.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Wr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Fe.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(W.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;o=l.innerHTML,o=Yf(Fe.entityDecode(o)).trim().replace(//gi,"
    ");const c=Fe.detectInit(o);c&&W.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:p}=await Iy(h,o,l);l.innerHTML=u,e&&await e(h),p&&p(l)}catch(u){zL(u,n,ye.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Ey=f(function(e){Wr.initialize(e)},"initialize"),HL=f(async function(e,t,r){W.warn("mermaid.init is deprecated. Please use run instead."),e&&Ey(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Fy(i)},"init"),YL=f(async(e,{lazyLoad:t=!0}={})=>{po(),Go(...e),t===!1&&await dL()},"registerExternalDiagrams"),My=f(function(){if(ye.startOnLoad){const{startOnLoad:e}=Wr.getConfig();e&&ye.run().catch(t=>W.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",My,!1);var UL=f(function(e){ye.parseError=e},"setParseErrorHandler"),Ua=[],Wo=!1,$y=f(async()=>{if(!Wo){for(Wo=!0;Ua.length>0;){const e=Ua.shift();if(e)try{await e()}catch(t){W.error("Error executing queue",t)}}Wo=!1}},"executeQueue"),GL=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((a,o)=>{Wr.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;W.error("Error parsing",n),(l=ye.parseError)==null||l.call(ye,n),o(n),i(n)})}),"performCall");Ua.push(s),$y().catch(i)}),"parse"),Iy=f((e,t,r)=>new Promise((i,s)=>{const a=f(()=>new Promise((o,n)=>{Wr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;W.error("Error parsing",l),(h=ye.parseError)==null||h.call(ye,l),n(l),s(l)})}),"performCall");Ua.push(a),$y().catch(s)}),"render"),jL=f(()=>Object.keys(Dr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ye={startOnLoad:!0,mermaidAPI:Wr,parse:GL,render:Iy,init:HL,run:Fy,registerExternalDiagrams:YL,registerLayoutLoaders:Dm,initialize:Ey,parseError:void 0,contentLoaded:My,setParseErrorHandler:UL,detectType:el,registerIconPacks:QS,getRegisteredDiagramsMetadata:jL},tu=ye;/*! Check if previously processed *//*! + * Wait for document loaded before starting the execution + */const XL=()=>{let e=!1,t=!1;const r="com.markdownlivepreview",i="last_state",s="scroll_bar_settings",a="theme_settings",o="Are you sure you want to reset? Your changes will be lost.";let n=null,l=0;const h=`# Markdown syntax guide + +## Headers + +# This is a Heading h1 +## This is a Heading h2 +###### This is a Heading h6 + +## Emphasis + +*This text will be italic* +_This will also be italic_ + +**This text will be bold** +__This will also be bold__ + +_You **can** combine them_ + +## Lists + +### Unordered + +* Item 1 +* Item 2 +* Item 2a +* Item 2b + * Item 3a + * Item 3b + +### Ordered + +1. Item 1 +2. Item 2 +3. Item 3 + 1. Item 3a + 2. Item 3b + +## Images + +![This is an alt text.](/image/Markdown-mark.svg "This is a sample image.") + +## Links + +You may be using [Markdown Live Preview](https://markdownlivepreview.com/). + +## Blockquotes + +> Markdown is a lightweight markup language with plain-text-formatting syntax, created in 2004 by John Gruber with Aaron Swartz. +> +>> Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor. + +## Tables + +| Left columns | Right columns | +| ------------- |:-------------:| +| left foo | right foo | +| left bar | right bar | +| left baz | right baz | + +## Blocks of code + +\`\`\` +let message = 'Hello world'; +alert(message); +\`\`\` + +## Mermaid diagrams +\`\`\`mermaid +graph TD + A[Start] --> B{Decision} + B -->|Yes| C[Finish] + B -->|No| D[Alternate] +\`\`\` + +## Inline code + +This web site is using \`markedjs/marked\`. +`;self.MonacoEnvironment={getWorker(H,G){return new Proxy({},{get:()=>()=>{}})}};let c=()=>{let H=Ke.editor.create(document.querySelector("#editor"),{fontSize:14,language:"markdown",minimap:{enabled:!1},scrollBeyondLastLine:!1,automaticLayout:!0,scrollbar:{vertical:"visible",horizontal:"visible"},wordWrap:"on",hover:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1});return H.onDidChangeModelContent(()=>{H.getValue()!=h&&(e=!0);let lt=H.getValue();w(lt),ft(lt)}),H.onDidScrollChange(G=>{if(!t)return;const lt=G.scrollTop,pt=G.scrollHeight,vt=H.getLayoutInfo().height,Et=pt-vt,Bt=lt/Et;let Lt=document.querySelector("#preview"),Rt=(Lt.scrollHeight-Lt.clientHeight)*Bt;Lt.scrollTo(0,Rt)}),H},u=H=>H.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),p=()=>{const H=new wt.Renderer,G=H.code.bind(H);return H.code=lt=>{var vt;return((vt=(lt.lang||"").match(/^\S*/))==null?void 0:vt[0].toLowerCase())!=="mermaid"?G(lt):`
    ${u(lt.text)}
    +`},H},d=H=>{tu.initialize({startOnLoad:!1,securityLevel:"strict",theme:H})},m=(H,G)=>{const lt=G&&G.message?G.message:"Unable to render Mermaid chart.";H.classList.add("mermaid-error"),H.textContent=`Mermaid render error: ${lt}`},g=()=>document.documentElement.getAttribute("data-theme")==="dark"?"dark":"default",y=async(H=g())=>{const G=document.querySelector("#output");if(!G)return;const lt=++l;d(H);const pt=Array.from(G.querySelectorAll(".mermaid"));for(const[vt,Et]of pt.entries()){if(lt!==l)return;const Bt=Et.dataset.mermaidSource||Et.textContent;Et.dataset.mermaidSource=Bt,Et.classList.remove("mermaid-error");try{const Lt=`mermaid-${Date.now()}-${lt}-${vt}`,{svg:Rt,bindFunctions:pe}=await tu.render(Lt,Bt);if(lt!==l)return;Et.innerHTML=Rt,typeof pe=="function"&&pe(Et)}catch(Lt){m(Et,Lt)}}},x=()=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,y()},150)},b=H=>(n&&(clearTimeout(n),n=null),y(H)),k=p(),w=H=>{let G={headerIds:!1,mangle:!1,renderer:k},lt=wt.parse(H,G),pt=Or.sanitize(lt);document.querySelector("#output").innerHTML=pt,x()},S=()=>{let H=Nt.getValue()!=h;if(e||H){var G=window.confirm(o);if(!G)return}_(h),document.querySelectorAll(".column").forEach(lt=>{lt.scrollTo({top:0})})},_=H=>{Nt.setValue(H),Nt.revealPosition({lineNumber:1,column:1}),Nt.focus(),e=!1},M=H=>{let G=document.querySelector("#sync-scroll-checkbox");G.checked=H,t=H,G.addEventListener("change",lt=>{let pt=lt.currentTarget.checked;t=pt,it(pt)})};const B="css/github-markdown-light.css?v=1.11.0",z="css/github-markdown-dark_dimmed.css?v=1.11.0";let D=H=>{const G=document.getElementById("gh-markdown-link");if(!G){const pt=document.createElement("link");pt.id="gh-markdown-link",pt.rel="stylesheet",pt.href=H?z:B,document.head.appendChild(pt);return}const lt=H?z:B;G.getAttribute("href")!==lt&&G.setAttribute("href",lt)},L=H=>{document.documentElement.setAttribute("data-theme",H?"dark":"light")},Y=H=>{let G=document.querySelector("#theme-checkbox");G&&(G.checked=H,L(H),Ke&&Ke.editor&&typeof Ke.editor.setTheme=="function"&&Ke.editor.setTheme(H?"vs-dark":"vs"),D(H),G.addEventListener("change",lt=>{let pt=lt.currentTarget.checked;L(pt),_t(pt),D(pt),Ke&&Ke.editor&&typeof Ke.editor.setTheme=="function"&&Ke.editor.setTheme(pt?"vs-dark":"vs"),b()}))},q=(H,G,lt)=>{navigator.clipboard.writeText(H).then(()=>{G()},()=>{})},I=()=>{let H=document.querySelector("#copy-button a");H.innerHTML="Copied!",setTimeout(()=>{H.innerHTML="Copy"},1e3)},$=null,A=()=>$||($=fetch(B).then(H=>{if(!H.ok)throw new Error(`Failed to load export CSS: ${H.status}`);return H.text()}).catch(H=>(console.error("Failed to load light markdown CSS",H),"")),$),O=()=>{const H=document.querySelector("#preview-wrapper");if(!H)return;if(typeof window.html2pdf!="function"){window.alert("PDF export is not available yet. Please try again in a moment.");return}const G=g()==="dark";b("default").then(()=>A()).then(lt=>{const pt={margin:10,filename:"markdown-preview.pdf",image:{type:"jpeg",quality:.98},html2canvas:{scale:2,useCORS:!0,onclone:vt=>{vt.documentElement.setAttribute("data-theme","light");const Et=vt.getElementById("gh-markdown-link");if(Et&&Et.setAttribute("href",B),lt){const Rt=vt.createElement("style");Rt.id="export-light-css",Rt.textContent=`${lt} +#preview-wrapper, #output, body { + background: #fff !important; + color: #24292f !important; +}`,vt.head.appendChild(Rt)}const Bt=vt.getElementById("preview-wrapper");Bt&&(Bt.style.background="#fff",Bt.style.color="#24292f",Bt.style.width="190mm",Bt.style.maxWidth="190mm");const Lt=vt.getElementById("output");Lt&&(Lt.style.background="#fff",Lt.style.color="#24292f",Lt.style.width="190mm",Lt.style.maxWidth="190mm")}},jsPDF:{unit:"mm",format:"a4",orientation:"portrait"}};window.html2pdf().set(pt).from(H).save().catch(vt=>{console.error("Failed to export PDF",vt)}).finally(()=>{G&&b()})})},E=()=>{document.querySelector("#reset-button").addEventListener("click",H=>{H.preventDefault(),S()})},T=H=>{document.querySelector("#copy-button").addEventListener("click",G=>{G.preventDefault();let lt=H.getValue();q(lt,()=>{I()})})},N=()=>{const H=document.querySelector("#export-button");H&&H.addEventListener("click",G=>{G.preventDefault(),O()})},V=()=>dr.getItem(r,i),ft=H=>{let G=new Date(2099,1,1);dr.setItem(r,i,H,G)},at=()=>dr.getItem(r,s),mt=()=>{let H=dr.getItem(r,a);if(H==null)try{const G=localStorage.getItem("com.markdownlivepreview_theme");if(G==="dark")return!0;if(G==="light")return!1}catch{}return H},it=H=>{let G=new Date(2099,1,1);dr.setItem(r,s,H,G)},_t=H=>{let G=new Date(2099,1,1);dr.setItem(r,a,H,G);try{localStorage.setItem("com.markdownlivepreview_theme",H?"dark":"light")}catch{}},$t=()=>{let H=.5;const G=document.getElementById("split-divider"),lt=document.getElementById("edit"),pt=document.getElementById("preview"),vt=document.getElementById("container");let Et=!1;G.addEventListener("mouseenter",()=>{G.classList.add("hover")}),G.addEventListener("mouseleave",()=>{Et||G.classList.remove("hover")}),G.addEventListener("mousedown",()=>{Et=!0,G.classList.add("active"),document.body.style.cursor="col-resize"}),G.addEventListener("dblclick",()=>{const Lt=vt.getBoundingClientRect().width,Rt=G.offsetWidth,pe=(Lt-Rt)/2;lt.style.width=pe+"px",pt.style.width=pe+"px"}),document.addEventListener("mousemove",Bt=>{if(!Et)return;document.body.style.userSelect="none";const Lt=vt.getBoundingClientRect(),Rt=Lt.width,pe=Bt.clientX-Lt.left,hr=G.offsetWidth,Ur=100,Mi=Rt-Ur-hr,Ve=Math.max(Ur,Math.min(pe,Mi));lt.style.width=Ve+"px",pt.style.width=Rt-Ve-hr+"px",H=Ve/(Rt-hr)}),document.addEventListener("mouseup",()=>{Et&&(Et=!1,G.classList.remove("active"),G.classList.remove("hover"),document.body.style.cursor="default",document.body.style.userSelect="")}),window.addEventListener("resize",()=>{const Lt=vt.getBoundingClientRect().width,Rt=G.offsetWidth,pe=Lt-Rt,hr=pe*H,Ur=pe*(1-H);lt.style.width=hr+"px",pt.style.width=Ur+"px"})},It=V(),Nt=c();_(It||h),E(),T(Nt),N();let K=at()||!1;M(K);let nt=mt();nt==="true"||nt===!0?nt=!0:nt=!1,Y(nt),$t()};window.addEventListener("load",()=>{XL()});export{Du as $,JL as A,mr as B,J0 as C,Mt as D,hC as E,Dl as F,Tu as G,Rw as H,W1 as I,X2 as J,fx as K,us as L,KL as M,io as N,Hx as O,Iu as P,Ih as Q,$1 as R,ln as S,Dw as T,Ts as U,Ie as V,R as W,P as X,Kx as Y,Lw as Z,f as _,iC as a,r_ as a$,A1 as a0,tc as a1,Jh as a2,lA as a3,iA as a4,oA as a5,aA as a6,eA as a7,fl as a8,nA as a9,Cf as aA,pw as aB,dw as aC,uw as aD,cw as aE,bf as aF,mw as aG,gw as aH,fw as aI,xw as aJ,yw as aK,nw as aL,Z2 as aM,ne as aN,nr as aO,Wi as aP,Rl as aQ,vf as aR,Nr as aS,Ff as aT,xu as aU,B_ as aV,CA as aW,kA as aX,yA as aY,et as aZ,xA as a_,rA as aa,Zr as ab,cA as ac,hA as ad,sA as ae,_T as af,Mm as ag,bA as ah,dt as ai,Ye as aj,Il as ak,X as al,tT as am,Bl as an,Ll as ao,oa as ap,lw as aq,hw as ar,xf as as,yf as at,mf as au,sw as av,rw as aw,iw as ax,aw as ay,ow as az,rC as b,KT as b0,ZT as b1,F1 as b2,ZL as b3,X0 as b4,Es as b5,QS as b6,KS as b7,Ct as b8,cl as b9,pr as ba,fs as bb,jh as bc,hk as bd,tt as be,Ef as bf,de as bg,rk as bh,hl as bi,Zu as bj,Bs as bk,Ju as bl,tA as bm,Q0 as bn,bt as c,gt as d,Ou as e,Ht as f,aC as g,ar as h,$e as i,J2 as j,_s as k,W as l,Lf as m,QL as n,SA as o,oC as p,nC as q,wA as r,sC as s,V2 as t,Fe as u,UT as v,Nw as w,uA as x,Or as y,eC as z}; diff --git a/dist/assets/info-J43DQDTF-ByKsUPcs.js b/dist/assets/info-J43DQDTF-ByKsUPcs.js new file mode 100644 index 0000000..fb42139 --- /dev/null +++ b/dist/assets/info-J43DQDTF-ByKsUPcs.js @@ -0,0 +1 @@ +import{c as r}from"./mermaid-parser.core-D9g22YKo.js";import{I as f}from"./mermaid-parser.core-D9g22YKo.js";import"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";export{f as InfoModule,r as createInfoServices}; diff --git a/dist/assets/infoDiagram-5YYISTIA-ChgsIg6d.js b/dist/assets/infoDiagram-5YYISTIA-ChgsIg6d.js new file mode 100644 index 0000000..ee911d9 --- /dev/null +++ b/dist/assets/infoDiagram-5YYISTIA-ChgsIg6d.js @@ -0,0 +1,2 @@ +import{_ as a,l as s,I as o,e as i}from"./index-mLPbTfpz.js";import{p as g}from"./mermaid-parser.core-D9g22YKo.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var p={parse:a(async r=>{const e=await g("info",r);s.debug(e)},"parse")},v={version:"11.15.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,n)=>{s.debug(`rendering info diagram +`+r);const t=o(e);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),l={draw:c},b={parser:p,db:m,renderer:l};export{b as diagram}; diff --git a/dist/assets/init-Gi6I4Gst.js b/dist/assets/init-Gi6I4Gst.js new file mode 100644 index 0000000..d44de94 --- /dev/null +++ b/dist/assets/init-Gi6I4Gst.js @@ -0,0 +1 @@ +function t(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e);break}return this}export{t as i}; diff --git a/dist/assets/ishikawaDiagram-YF4QCWOH-B1FiwTBi.js b/dist/assets/ishikawaDiagram-YF4QCWOH-B1FiwTBi.js new file mode 100644 index 0000000..932d87b --- /dev/null +++ b/dist/assets/ishikawaDiagram-YF4QCWOH-B1FiwTBi.js @@ -0,0 +1,70 @@ +import{_ as o,c as ot,N as ut,I as dt,al as yt,z as ft,k as pt,p as it,a as gt,b as kt,g as mt,s as wt,q as _t,e as bt}from"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var tt=function(){var e=o(function(M,t,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],B={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,u,p,n,v){var w=n.length-1;switch(p){case 6:case 7:return u;case 15:u.addNode(n[w-1].length,n[w].trim());break;case 16:u.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:m},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],u=[],p=[null],n=[],v=this.table,w="",I=0,S=0,L=2,E=1,R=n.slice.call(arguments,1),b=Object.create(this.lexer),C={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(C.yy[z]=this.yy[z]);b.setInput(t,C.yy),C.yy.lexer=b,C.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var T=b.yylloc;n.push(T);var D=b.options&&b.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function F(N){i.length=i.length-2*N,p.length=p.length-N,n.length=n.length-N}o(F,"popStack");function j(){var N;return N=u.pop()||b.lex()||E,typeof N!="number"&&(N instanceof Array&&(u=N,N=u.pop()),N=s.symbols_[N]||N),N}o(j,"lex");for(var A,W,P,K,H={},X,V,et,Y;;){if(W=i[i.length-1],this.defaultActions[W]?P=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=j()),P=v[W]&&v[W][A]),typeof P>"u"||!P.length||!P[0]){var Q="";Y=[];for(X in v[W])this.terminals_[X]&&X>L&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Q="Parse error on line "+(I+1)+`: +`+b.showPosition()+` +Expecting `+Y.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Q="Parse error on line "+(I+1)+": Unexpected "+(A==E?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(Q,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:T,expected:Y})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(P[0]){case 1:i.push(A),p.push(b.yytext),n.push(b.yylloc),i.push(P[1]),A=null,S=b.yyleng,w=b.yytext,I=b.yylineno,T=b.yylloc;break;case 2:if(V=this.productions_[P[1]][1],H.$=p[p.length-V],H._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},D&&(H._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]]),K=this.performAction.apply(H,[w,S,I,C.yy,P[1],p,n].concat(R)),typeof K<"u")return K;V&&(i=i.slice(0,-1*V*2),p=p.slice(0,-1*V),n=n.slice(0,-1*V)),i.push(this.productions_[P[1]][0]),p.push(H.$),n.push(H._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=function(){var M={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||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},"setInput"),input:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;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),i.length-1&&(this.yylineno-=i.length-1);var p=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:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(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,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+` +`+s+"^"},"showPosition"),test_match:o(function(t,s){var i,u,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),u=t[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+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],i=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var n in p)this[n]=p[n];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,s,i,u;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),n=0;ns[0].length)){if(s=i,u=n,this.options.backtrack_lexer){if(t=this.test_match(i,p[n]),t!==!1)return t;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(t=this.test_match(s,p[u]),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})},"next"),lex:o(function(){var s=this.next();return s||this.lex()},"lex"),begin:o(function(s){this.conditionStack.push(s)},"begin"),popState:o(function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:o(function(s){this.begin(s)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(s,i,u,p){switch(u){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return M}();B.lexer=O;function $(){this.yy={}}return o($,"Parser"),$.prototype=B,B.Parser=$,new $}();tt.parser=tt;var xt=tt,Z,vt=(Z=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,ft()}getRoot(){return this.root}addNode(h,r){const a=pt.sanitizeText(r,ot());if(!this.root){this.root={text:a,children:[]},this.stack=[{level:0,node:this.root}],it(a);return}this.baseLevel??(this.baseLevel=h);let l=h-this.baseLevel+1;for(l<=0&&(l=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=l;)this.stack.pop();const y=this.stack[this.stack.length-1].node,f={text:a,children:[]};y.children.push(f),this.stack.push({level:l,node:f})}getAccTitle(){return gt()}setAccTitle(h){kt(h)}getAccDescription(){return mt()}setAccDescription(h){wt(h)}getDiagramTitle(){return _t()}setDiagramTitle(h){it(h)}},o(Z,"IshikawaDB"),Z),St=14,G=250,$t=30,Et=60,At=5,ht=82*Math.PI/180,st=Math.cos(ht),nt=Math.sin(ht),at=o((e,h,r)=>{const a=e.node().getBBox(),l=a.width+h*2,y=a.height+h*2;bt(e,y,l,r),e.attr("viewBox",`${a.x-h} ${a.y-h} ${l} ${y}`)},"applyPaddedViewBox"),It=o((e,h,r,a)=>{var C,z;const y=a.db.getRoot();if(!y)return;const f=ot(),{look:d,handDrawnSeed:m,themeVariables:c}=f,k=ut(f.fontSize)[0]??St,g=d==="handDrawn",_=y.children??[],x=((C=f.ishikawa)==null?void 0:C.diagramPadding)??20,B=((z=f.ishikawa)==null?void 0:z.useMaxWidth)??!1,O=dt(h),$=O.append("g").attr("class","ishikawa"),M=g?yt.svg(O.node()):void 0,t=M?{roughSvg:M,seed:m??0,lineColor:(c==null?void 0:c.lineColor)??"#333",fillColor:(c==null?void 0:c.mainBkg)??"#fff"}:void 0,s=`ishikawa-arrow-${h}`;g||$.append("defs").append("marker").attr("id",s).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let i=0,u=G;const p=g?void 0:U($,i,u,i,u,"ishikawa-spine");if(Lt($,i,u,y.text,k,t),!_.length){g&&U($,i,u,i,u,"ishikawa-spine",t),at(O,x,B);return}i-=20;const n=_.filter((T,D)=>D%2===0),v=_.filter((T,D)=>D%2===1),w=rt(n),I=rt(v),S=w.total+I.total;let L=G,E=G;if(S>0){const T=G*2,D=G*.3;L=Math.max(D,T*(w.total/S)),E=Math.max(D,T*(I.total/S))}const R=k*2;L=Math.max(L,w.max*R),E=Math.max(E,I.max*R),u=Math.max(L,G),p&&p.attr("y1",u).attr("y2",u),$.select(".ishikawa-head-group").attr("transform",`translate(0,${u})`);const b=Math.ceil(_.length/2);for(let T=0;TMath.min(F,j.getBBox().x),1/0)}if(g)U($,i,u,0,u,"ishikawa-spine",t);else{p.attr("x1",i);const T=`url(#${s})`;$.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",T)}at(O,x,B)},"draw"),rt=o(e=>{const h=o(r=>r.children.reduce((a,l)=>a+1+h(l),0),"countDescendants");return e.reduce((r,a)=>{const l=h(a);return r.total+=l,r.max=Math.max(r.max,l),r},{total:0,max:0})},"sideStats"),Lt=o((e,h,r,a,l,y)=>{const f=Math.max(6,Math.floor(110/(l*.6))),d=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${h},${r})`),m=q(d,ct(a,f),0,0,"ishikawa-head-label","start",l),c=m.node().getBBox(),k=Math.max(60,c.width+6),g=Math.max(40,c.height*2+40),_=`M 0 ${-g/2} L 0 ${g/2} Q ${k*2.4} 0 0 ${-g/2} Z`;if(y){const x=y.roughSvg.path(_,{roughness:1.5,seed:y.seed,fill:y.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:y.lineColor,strokeWidth:2});d.insert(()=>x,":first-child").attr("class","ishikawa-head")}else d.insert("path",":first-child").attr("class","ishikawa-head").attr("d",_);m.attr("transform",`translate(${(k-c.width)/2-c.x+3},${-c.y-c.height/2})`)},"drawHead"),Tt=o((e,h)=>{const r=[],a=[],l=o((y,f,d)=>{const m=h===-1?[...y].reverse():y;for(const c of m){const k=r.length,g=c.children??[];r.push({depth:d,text:ct(c.text,15),parentIndex:f,childCount:g.length}),d%2===0?(a.push(k),g.length&&l(g,k,d+1)):(g.length&&l(g,k,d+1),a.push(k))}},"walk");return l(e,-1,2),{entries:r,yOrder:a}},"flattenTree"),Mt=o((e,h,r,a,l,y,f)=>{const d=e.append("g").attr("class","ishikawa-label-group"),c=q(d,h,r,a+11*l,"ishikawa-label cause","middle",y).node().getBBox();if(f){const k=f.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:f.seed,fill:f.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:f.lineColor,strokeWidth:2});d.insert(()=>k,":first-child").attr("class","ishikawa-label-box")}else d.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",c.x-20).attr("y",c.y-2).attr("width",c.width+40).attr("height",c.height+4)},"drawCauseLabel"),J=o((e,h,r,a,l,y)=>{const f=Math.sqrt(a*a+l*l);if(f===0)return;const d=a/f,m=l/f,c=6,k=-m*c,g=d*c,_=h,x=r,B=`M ${_} ${x} L ${_-d*c*2+k} ${x-m*c*2+g} L ${_-d*c*2-k} ${x-m*c*2-g} Z`,O=y.roughSvg.path(B,{roughness:1,seed:y.seed,fill:y.lineColor,fillStyle:"solid",stroke:y.lineColor,strokeWidth:1});e.append(()=>O)},"drawArrowMarker"),Nt=o((e,h,r,a,l,y,f,d)=>{const m=h.children??[],c=y*(m.length?1:.2),k=-st*c,g=nt*c*l,_=r+k,x=a+g;if(U(e,r,a,_,x,"ishikawa-branch",d),d&&J(e,r,a,r-_,a-x,d),Mt(e,h.text,_,x,l,f,d),!m.length)return;const{entries:B,yOrder:O}=Tt(m,l),$=B.length,M=new Array($);for(const[p,n]of O.entries())M[n]=a+g*((p+1)/($+1));const t=new Map;t.set(-1,{x0:r,y0:a,x1:_,y1:x,childCount:m.length,childrenDrawn:0});const s=-st,i=nt*l,u=l<0?"ishikawa-label up":"ishikawa-label down";for(const[p,n]of B.entries()){const v=M[p],w=t.get(n.parentIndex),I=e.append("g").attr("class","ishikawa-sub-group");let S=0,L=0,E=0;if(n.depth%2===0){const R=w.y1-w.y0;S=lt(w.x0,w.x1,R?(v-w.y0)/R:.5),L=v,E=S-(n.childCount>0?Et+n.childCount*At:$t),U(I,S,v,E,v,"ishikawa-sub-branch",d),d&&J(I,S,v,1,0,d),q(I,n.text,E,v,"ishikawa-label align","end",f)}else{const R=w.childrenDrawn++;S=lt(w.x0,w.x1,(w.childCount-R)/(w.childCount+1)),L=w.y0,E=S+s*((v-L)/i),U(I,S,L,E,v,"ishikawa-sub-branch",d),d&&J(I,S,L,S-E,L-v,d),q(I,n.text,E,v,u,"end",f)}n.childCount>0&&t.set(p,{x0:S,y0:L,x1:E,y1:v,childCount:n.childCount,childrenDrawn:0})}},"drawBranch"),Pt=o(e=>e.split(/|\n/),"splitLines"),ct=o((e,h)=>{if(e.length<=h)return e;const r=[];for(const a of e.split(/\s+/)){const l=r.length-1;l>=0&&r[l].length+1+a.length<=h?r[l]+=" "+a:r.push(a)}return r.join(` +`)},"wrapText"),q=o((e,h,r,a,l,y,f)=>{const d=Pt(h),m=f*1.05,c=e.append("text").attr("class",l).attr("text-anchor",y).attr("x",r).attr("y",a-(d.length-1)*m/2);for(const[k,g]of d.entries())c.append("tspan").attr("x",r).attr("dy",k===0?0:m).text(g);return c},"drawMultilineText"),lt=o((e,h,r)=>e+(h-e)*r,"lerp"),U=o((e,h,r,a,l,y,f)=>{if(f){const d=f.roughSvg.line(h,r,a,l,{roughness:1.5,seed:f.seed,stroke:f.lineColor,strokeWidth:2});e.append(()=>d).attr("class",y);return}return e.append("line").attr("class",y).attr("x1",h).attr("y1",r).attr("x2",a).attr("y2",l)},"drawLine"),Bt={draw:It},Dt=o(e=>` +.ishikawa .ishikawa-spine, +.ishikawa .ishikawa-branch, +.ishikawa .ishikawa-sub-branch { + stroke: ${e.lineColor}; + stroke-width: 2; + fill: none; +} + +.ishikawa .ishikawa-sub-branch { + stroke-width: 1; +} + +.ishikawa .ishikawa-arrow { + fill: ${e.lineColor}; +} + +.ishikawa .ishikawa-head { + fill: ${e.mainBkg}; + stroke: ${e.lineColor}; + stroke-width: 2; +} + +.ishikawa .ishikawa-label-box { + fill: ${e.mainBkg}; + stroke: ${e.lineColor}; + stroke-width: 2; +} + +.ishikawa text { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + fill: ${e.textColor}; +} + +.ishikawa .ishikawa-head-label { + font-weight: 600; + text-anchor: middle; + dominant-baseline: middle; + font-size: 14px; +} + +.ishikawa .ishikawa-label { + text-anchor: end; +} + +.ishikawa .ishikawa-label.cause { + text-anchor: middle; + dominant-baseline: middle; +} + +.ishikawa .ishikawa-label.align { + text-anchor: end; + dominant-baseline: middle; +} + +.ishikawa .ishikawa-label.up { + dominant-baseline: baseline; +} + +.ishikawa .ishikawa-label.down { + dominant-baseline: hanging; +} +`,"getStyles"),Ot=Dt,Vt={parser:xt,get db(){return new vt},renderer:Bt,styles:Ot};export{Vt as diagram}; diff --git a/dist/assets/journeyDiagram-JHISSGLW-BGdfH_nK.js b/dist/assets/journeyDiagram-JHISSGLW-BGdfH_nK.js new file mode 100644 index 0000000..9a24bae --- /dev/null +++ b/dist/assets/journeyDiagram-JHISSGLW-BGdfH_nK.js @@ -0,0 +1,139 @@ +import{g as gt}from"./chunk-FMBD7UC4-Crb6W-Lm.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-ND2GUHAM-DRVGyKsL.js";import{g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,_ as s,c as R,d as G,e as $t,z as Mt}from"./index-mLPbTfpz.js";import{d as it}from"./arc-XpyNnWh5.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var U=function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),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:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var X="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?X="Parse error on line "+(C+1)+`: +`+_.showPosition()+` +Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(X,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=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),l.length-1&&(this.yylineno-=l.length-1);var d=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:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+` +`+n+"^"},"showPosition"),test_match:s(function(r,n){var l,y,d;if(this.options.backtrack_lexer&&(d={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&&(d.yylloc.range=this.yylloc.range.slice(0))),y=r[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var c in d)this[c]=d[c];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,n,l,y;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),c=0;cn[0].length)){if(n=l,y=c,this.options.backtrack_lexer){if(r=this.test_match(l,d[c]),r!==!1)return r;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(r=this.test_match(n,d[y]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var n=this.next();return n||this.lex()},"lex"),begin:s(function(n){this.conditionStack.push(n)},"begin"),popState:s(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:s(function(n){this.begin(n)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(n,l,y,d){switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return h}();g.lexer=m;function x(){this.yy={}}return s(x,"Parser"),x.prototype=g,g.Parser=x,new x}();U.parser=U;var Et=U,V="",J=[],L=[],B=[],Ct=s(function(){J.length=0,L.length=0,V="",B.length=0,Mt()},"clear"),Pt=s(function(t){V=t,J.push(t)},"addSection"),It=s(function(){return J},"getSections"),At=s(function(){let t=rt();const e=100;let a=0;for(;!t&&a{a.people&&t.push(...a.people)}),[...new Set(t)].sort()},"updateActors"),Vt=s(function(t,e){const a=e.substr(1).split(":");let f=0,i=[];a.length===1?(f=Number(a[0]),i=[]):(f=Number(a[0]),i=a[1].split(","));const u=i.map(o=>o.trim()),p={section:V,type:V,people:u,task:t,score:f};B.push(p)},"addTask"),Rt=s(function(t){const e={section:V,type:V,description:t,task:t,classes:[]};L.push(e)},"addTaskOrg"),rt=s(function(){const t=s(function(a){return B[a].processed},"compileTask");let e=!0;for(const[a,f]of B.entries())t(a),e=e&&f.processed;return e},"compileTasks"),Lt=s(function(){return Ft()},"getActors"),nt={getConfig:s(()=>R().journey,"getConfig"),clear:Ct,setDiagramTitle:St,getDiagramTitle:Tt,setAccTitle:wt,getAccTitle:bt,setAccDescription:vt,getAccDescription:_t,addSection:Pt,getSections:It,getTasks:At,addTask:Vt,addTaskOrg:Rt,getActors:Lt},Bt=s(t=>`.label { + font-family: ${t.fontFamily}; + color: ${t.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${t.textColor} + } + + .legend { + fill: ${t.textColor}; + font-family: ${t.fontFamily}; + } + + .label text { + fill: #333; + } + .label { + color: ${t.textColor} + } + + .face { + ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${t.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${t.fontFamily}; + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${t.fillType0?`fill: ${t.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${t.fillType0?`fill: ${t.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${t.fillType0?`fill: ${t.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${t.fillType0?`fill: ${t.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${t.fillType0?`fill: ${t.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${t.fillType0?`fill: ${t.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${t.fillType0?`fill: ${t.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${t.fillType0?`fill: ${t.fillType7}`:""}; + } + + .actor-0 { + ${t.actor0?`fill: ${t.actor0}`:""}; + } + .actor-1 { + ${t.actor1?`fill: ${t.actor1}`:""}; + } + .actor-2 { + ${t.actor2?`fill: ${t.actor2}`:""}; + } + .actor-3 { + ${t.actor3?`fill: ${t.actor3}`:""}; + } + .actor-4 { + ${t.actor4?`fill: ${t.actor4}`:""}; + } + .actor-5 { + ${t.actor5?`fill: ${t.actor5}`:""}; + } + ${gt()} +`,"getStyles"),jt=Bt,K=s(function(t,e){return kt(t,e)},"drawRect"),Nt=s(function(t,e){const f=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(g){const m=it().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(u,"smile");function p(g){const m=it().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(p,"sad");function o(g){g.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(o,"ambivalent"),e.score>3?u(i):e.score<3?p(i):o(i),f},"drawFace"),ot=s(function(t,e){const a=t.append("circle");return a.attr("cx",e.cx),a.attr("cy",e.cy),a.attr("class","actor-"+e.pos),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("r",e.r),a.class!==void 0&&a.attr("class",a.class),e.title!==void 0&&a.append("title").text(e.title),a},"drawCircle"),ct=s(function(t,e){return xt(t,e)},"drawText"),zt=s(function(t,e){function a(i,u,p,o,g){return i+","+u+" "+(i+p)+","+u+" "+(i+p)+","+(u+o-g)+" "+(i+p-g*1.2)+","+(u+o)+" "+i+","+(u+o)}s(a,"genPoints");const f=t.append("polygon");f.attr("points",a(e.x,e.y,50,20,7)),f.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ct(t,e)},"drawLabel"),Wt=s(function(t,e,a){const f=t.append("g"),i=lt();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=a.width*e.taskCount+a.diagramMarginX*(e.taskCount-1),i.height=a.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,K(f,i),ht(a)(e.text,f,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},a,e.colour)},"drawSection"),Z=-1,Ot=s(function(t,e,a,f){const i=e.x+a.width/2,u=t.append("g");Z++;const p=300+5*30;u.append("line").attr("id",f+"-task"+Z).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",p).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Nt(u,{cx:i,cy:300+(5-e.score)*30,score:e.score});const o=lt();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=a.width,o.height=a.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,K(u,o);let g=e.x+14;e.people.forEach(m=>{const x=e.actors[m].color,h={cx:g,cy:e.y,r:7,fill:x,stroke:"#000",title:m,pos:e.actors[m].position};ot(u,h),g+=10}),ht(a)(e.task,u,o.x,o.y,o.width,o.height,{class:"task"},a,e.colour)},"drawTask"),Yt=s(function(t,e){mt(t,e)},"drawBackgroundRect"),ht=function(){function t(i,u,p,o,g,m,x,h){const r=u.append("text").attr("x",p+g/2).attr("y",o+m/2+5).style("font-color",h).style("text-anchor","middle").text(i);f(r,x)}s(t,"byText");function e(i,u,p,o,g,m,x,h,r){const{taskFontSize:n,taskFontFamily:l}=h,y=i.split(//gi);for(let d=0;d{const u=E[i].color,p={cx:20,cy:f,r:7,fill:u,stroke:"#000",pos:E[i].position};j.drawCircle(t,p);let o=t.append("text").attr("visibility","hidden").text(i);const g=o.node().getBoundingClientRect().width;o.remove();let m=[];if(g<=a)m=[i];else{const x=i.split(" ");let h="";o=t.append("text").attr("visibility","hidden"),x.forEach(r=>{const n=h?`${h} ${r}`:r;if(o.text(n),o.node().getBoundingClientRect().width>a){if(h&&m.push(h),h=r,o.text(r),o.node().getBoundingClientRect().width>a){let y="";for(const d of r)y+=d,o.text(y+"-"),o.node().getBoundingClientRect().width>a&&(m.push(y.slice(0,-1)+"-"),y=d);h=y}}else h=n}),h&&m.push(h),o.remove()}m.forEach((x,h)=>{const r={x:40,y:f+7+h*20,fill:"#666",text:x,textMargin:e.boxTextMargin??5},l=j.drawText(t,r).node().getBoundingClientRect().width;l>W&&l>e.leftMargin-l&&(W=l)}),f+=Math.max(20,m.length*20)})}s(ut,"drawActorLegend");var $=R().journey,P=0,Gt=s(function(t,e,a,f){const i=R(),u=i.journey.titleColor,p=i.journey.titleFontSize,o=i.journey.titleFontFamily,g=i.securityLevel;let m;g==="sandbox"&&(m=G("#i"+e));const x=g==="sandbox"?G(m.nodes()[0].contentDocument.body):G("body");S.init();const h=x.select("#"+e);j.initGraphics(h,e);const r=f.db.getTasks(),n=f.db.getDiagramTitle(),l=f.db.getActors();for(const C in E)delete E[C];let y=0;l.forEach(C=>{E[C]={color:$.actorColours[y%$.actorColours.length],position:y},y++}),ut(h),P=$.leftMargin+W,S.insert(0,0,P,Object.keys(E).length*50),Ht(h,r,0,e);const d=S.getBounds();n&&h.append("text").text(n).attr("x",P).attr("font-size",p).attr("font-weight","bold").attr("y",25).attr("fill",u).attr("font-family",o);const c=d.stopy-d.starty+2*$.diagramMarginY,v=P+d.stopx+2*$.diagramMarginX;$t(h,c,v,$.useMaxWidth),h.append("line").attr("x1",P).attr("y1",$.height*4).attr("x2",v-P-4).attr("y2",$.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const k=n?70:0;h.attr("viewBox",`${d.startx} -25 ${v} ${c+k}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",c+k+25)},"draw"),S={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,a,f){t[e]===void 0?t[e]=a:t[e]=f(a,t[e])},"updateVal"),updateBounds:s(function(t,e,a,f){const i=R().journey,u=this;let p=0;function o(g){return s(function(x){p++;const h=u.sequenceItems.length-p+1;u.updateVal(x,"starty",e-h*i.boxMargin,Math.min),u.updateVal(x,"stopy",f+h*i.boxMargin,Math.max),u.updateVal(S.data,"startx",t-h*i.boxMargin,Math.min),u.updateVal(S.data,"stopx",a+h*i.boxMargin,Math.max),g!=="activation"&&(u.updateVal(x,"startx",t-h*i.boxMargin,Math.min),u.updateVal(x,"stopx",a+h*i.boxMargin,Math.max),u.updateVal(S.data,"starty",e-h*i.boxMargin,Math.min),u.updateVal(S.data,"stopy",f+h*i.boxMargin,Math.max))},"updateItemBounds")}s(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:s(function(t,e,a,f){const i=Math.min(t,a),u=Math.max(t,a),p=Math.min(e,f),o=Math.max(e,f);this.updateVal(S.data,"startx",i,Math.min),this.updateVal(S.data,"starty",p,Math.min),this.updateVal(S.data,"stopx",u,Math.max),this.updateVal(S.data,"stopy",o,Math.max),this.updateBounds(i,p,u,o)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},H=$.sectionFills,st=$.sectionColours,Ht=s(function(t,e,a,f){const i=R().journey;let u="";const p=i.height*2+i.diagramMarginY,o=a+p;let g=0,m="#CCC",x="black",h=0;for(const[r,n]of e.entries()){if(u!==n.section){m=H[g%H.length],h=g%H.length,x=st[g%st.length];let y=0;const d=n.section;for(let v=r;v(E[d]&&(y[d]=E[d]),y),{});n.x=r*i.taskMargin+r*i.width+P,n.y=o,n.width=i.diagramMarginX,n.height=i.diagramMarginY,n.colour=x,n.fill=m,n.num=h,n.actors=l,j.drawTask(t,n,i,f),S.insert(n.x,n.y,n.x+n.width+i.taskMargin,300+5*30)}},"drawTasks"),at={setConf:Xt,draw:Gt},Dt={parser:Et,db:nt,renderer:at,styles:jt,init:s(t=>{at.setConf(t.journey),nt.clear()},"init")};export{Dt as diagram}; diff --git a/dist/assets/kanban-definition-UN3LZRKU-BOdRLozk.js b/dist/assets/kanban-definition-UN3LZRKU-BOdRLozk.js new file mode 100644 index 0000000..60cccc4 --- /dev/null +++ b/dist/assets/kanban-definition-UN3LZRKU-BOdRLozk.js @@ -0,0 +1,89 @@ +import{_ as c,l as te,c as W,I as fe,af as ye,ag as be,ah as me,Y as _e,G as K,i as F,t as ke,J as Ee,V as Se,W as le,X as ce}from"./index-mLPbTfpz.js";import{g as Ne}from"./chunk-FMBD7UC4-Crb6W-Lm.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var $=function(){var t=c(function(_,s,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],k=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],M=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],U=[1,35],j=[1,36],A=[1,6,7,11,13,16,17,20,23],H=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:M}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},t(P,[2,14],{7:U,11:j}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:M}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:H}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:U,11:j}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:H}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var q=m.yylloc;e.push(q);var de=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||m.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var E,R,v,Q,G={},X,I,oe,Y;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((E===null||typeof E>"u")&&(E=ae()),v=B[R]&&B[R][E]),typeof v>"u"||!v.length||!v[0]){var Z="";Y=[];for(X in B[R])this.terminals_[X]&&X>ue&&Y.push("'"+this.terminals_[X]+"'");m.showPosition?Z="Parse error on line "+(z+1)+`: +`+m.showPosition()+` +Expecting `+Y.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(E==re?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Z,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:q,expected:Y})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+E);switch(v[0]){case 1:a.push(E),u.push(m.yytext),e.push(m.yylloc),a.push(v[1]),E=null,ie=m.yyleng,l=m.yytext,z=m.yylineno,q=m.yylloc;break;case 2:if(I=this.productions_[v[1]][1],G.$=u[u.length-I],G._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(G._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(G,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(G.$),e.push(G._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},y=function(){var _={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=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),a.length-1&&(this.yylineno-=a.length-1);var u=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:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+` +`+n+"^"},"showPosition"),test_match:c(function(s,n){var a,o,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),o=s[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],a=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var e in u)this[e]=u[e];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,a,o;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),e=0;en[0].length)){if(n=a,o=e,this.options.backtrack_lexer){if(s=this.test_match(a,u[e]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,u[o]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:c(function(){var n=this.next();return n||this.lex()},"lex"),begin:c(function(n){this.conditionStack.push(n)},"begin"),popState:c(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:c(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:c(function(n){this.begin(n)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(n,a,o,u){switch(o){case 0:return this.pushState("shapeData"),a.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const e=/\n\s*/g;return a.yytext=a.yytext.replace(e,"
    "),24;case 4:return 24;case 5:this.popState();break;case 6:return n.getLogger().trace("Found comment",a.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return n.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:n.getLogger().trace("end icon"),this.popState();break;case 16:return n.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return n.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return n.getLogger().trace("description:",a.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),n.getLogger().trace("node end ...",a.yytext),"NODE_DEND";case 36:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 41:return n.getLogger().trace("Long description:",a.yytext),21;case 42:return n.getLogger().trace("Long description:",a.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return _}();V.lexer=y;function O(){this.yy={}}return c(O,"Parser"),O.prototype=V,V.Parser=O,new O}();$.parser=$;var xe=$,D=[],ne=[],ee=0,se={},ve=c(()=>{D=[],ne=[],ee=0,se={}},"clear"),De=c(t=>{if(D.length===0)return null;const g=D[0].level;let d=null;for(let r=D.length-1;r>=0;r--)if(D[r].level===g&&!d&&(d=D[r]),D[r].levelh.parentId===p.id);for(const h of f){const L={id:h.id,parentId:p.id,label:F(h.label??"",r),labelType:"markdown",isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};g.push(L)}}return{nodes:g,edges:t,other:{},config:W()}},"getData"),Oe=c((t,g,d,r,p)=>{var C,w;const k=W();let f=((C=k.mindmap)==null?void 0:C.padding)??K.mindmap.padding;switch(r){case b.ROUNDED_RECT:case b.RECT:case b.HEXAGON:f*=2}const h={id:F(g,k)||"kbn"+ee++,level:t,label:F(d,k),width:((w=k.mindmap)==null?void 0:w.maxNodeWidth)??K.mindmap.maxNodeWidth,padding:f,isGroup:!1};if(p!==void 0){let N;p.includes(` +`)?N=p+` +`:N=`{ +`+p+` +}`;const i=ke(N,{schema:Ee});if(i.shape&&(i.shape!==i.shape.toLowerCase()||i.shape.includes("_")))throw new Error(`No such shape: ${i.shape}. Shape names should be lowercase.`);i!=null&&i.shape&&i.shape==="kanbanItem"&&(h.shape=i==null?void 0:i.shape),i!=null&&i.label&&(h.label=i==null?void 0:i.label),i!=null&&i.icon&&(h.icon=i==null?void 0:i.icon.toString()),i!=null&&i.assigned&&(h.assigned=i==null?void 0:i.assigned.toString()),i!=null&&i.ticket&&(h.ticket=i==null?void 0:i.ticket.toString()),i!=null&&i.priority&&(h.priority=i==null?void 0:i.priority)}const L=De(t);L?h.parentId=L.id||"kbn"+ee++:ne.push(h),D.push(h)},"addNode"),b={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Ie=c((t,g)=>{switch(te.debug("In get type",t,g),t){case"[":return b.RECT;case"(":return g===")"?b.ROUNDED_RECT:b.CLOUD;case"((":return b.CIRCLE;case")":return b.CLOUD;case"))":return b.BANG;case"{{":return b.HEXAGON;default:return b.DEFAULT}},"getType"),Ce=c((t,g)=>{se[t]=g},"setElementForId"),we=c(t=>{if(!t)return;const g=W(),d=D[D.length-1];t.icon&&(d.icon=F(t.icon,g)),t.class&&(d.cssClasses=F(t.class,g))},"decorateNode"),Ae=c(t=>{switch(t){case b.DEFAULT:return"no-border";case b.RECT:return"rect";case b.ROUNDED_RECT:return"rounded-rect";case b.CIRCLE:return"circle";case b.CLOUD:return"cloud";case b.BANG:return"bang";case b.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Te=c(()=>te,"getLogger"),Re=c(t=>se[t],"getElementById"),Pe={clear:ve,addNode:Oe,getSections:he,getData:Le,nodeType:b,getType:Ie,setElementForId:Ce,decorateNode:we,type2Str:Ae,getLogger:Te,getElementById:Re},Ve=Pe,Be=c(async(t,g,d,r)=>{var U,j,A,H,V;te.debug(`Rendering kanban diagram +`+t);const k=r.db.getData(),f=W();f.htmlLabels=!1;const h=fe(g);for(const y of k.nodes)y.domId=`${g}-${y.id}`;const L=h.append("g");L.attr("class","sections");const C=h.append("g");C.attr("class","items");const w=k.nodes.filter(y=>y.isGroup);let N=0;const i=10,M=[];let x=25;for(const y of w){const O=((U=f==null?void 0:f.kanban)==null?void 0:U.sectionWidth)||200;N=N+1,y.x=O*N+(N-1)*i/2,y.width=O,y.y=0,y.height=O*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+N;const _=await ye(L,y);x=Math.max(x,(j=_==null?void 0:_.labelBBox)==null?void 0:j.height),M.push(_)}let P=0;for(const y of w){const O=M[P];P=P+1;const _=((A=f==null?void 0:f.kanban)==null?void 0:A.sectionWidth)||200,s=-_*3/2+x;let n=s;const a=k.nodes.filter(e=>e.parentId===y.id);for(const e of a){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=y.x,e.width=_-1.5*i;const l=(await be(C,e,{config:f})).node().getBBox();e.y=n+l.height/2,await me(e),n=e.y+l.height/2+i/2}const o=O.cluster.select("rect"),u=Math.max(n-s+3*i,50)+(x-25);o.attr("height",u)}_e(void 0,h,((H=f.mindmap)==null?void 0:H.padding)??K.kanban.padding,((V=f.mindmap)==null?void 0:V.useMaxWidth)??K.kanban.useMaxWidth)},"draw"),Ge={draw:Be},Fe=c(t=>{let g="";for(let r=0;rt.darkMode?ce(r,p):le(r,p),"adjuster");for(let r=0;r` + .edge { + stroke-width: 3; + } + ${Fe(t)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .cluster-label, .label { + color: ${t.textColor}; + fill: ${t.textColor}; + } + .kanban-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } + ${Ne()} +`,"getStyles"),Ue=Me,ze={db:Ve,renderer:Ge,parser:xe,styles:Ue};export{ze as diagram}; diff --git a/dist/assets/katex-C5jXJg4s.js b/dist/assets/katex-C5jXJg4s.js new file mode 100644 index 0000000..c651c8a --- /dev/null +++ b/dist/assets/katex-C5jXJg4s.js @@ -0,0 +1,257 @@ +class S extends Error{constructor(e,t){var a="KaTeX parse error: "+e,i,s,u=t&&t.loc;if(u&&u.start<=u.end){var h=u.lexer.input;i=u.start,s=u.end,i===h.length?a+=" at end of input: ":a+=" at position "+(i+1)+": ";var c=h.slice(i,s).replace(/[^]/g,"$&̲"),v;i>15?v="…"+h.slice(i-15,i):v=h.slice(0,i);var p;s+15r.replace(Y1,"-$1").toLowerCase(),W1={"&":"&",">":">","<":"<",'"':""","'":"'"},j1=/[&><"']/g,i0=r=>String(r).replace(j1,e=>W1[e]),Ce=r=>r.type==="ordgroup"||r.type==="color"?r.body.length===1?Ce(r.body[0]):r:r.type==="font"?Ce(r.body):r,Z1=new Set(["mathord","textord","atom"]),D0=r=>Z1.has(Ce(r).type),K1=r=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(r);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},dt={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand ",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function J1(r){if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function Q1(r){if(r.default!==void 0)return r.default;var e=Array.isArray(r.type)?r.type[0]:r.type;return J1(e)}function _1(r,e,t,a){var i=t[e];r[e]=i!==void 0?a.processor?a.processor(i):i:Q1(a)}class Et{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t of Object.keys(dt)){var a=dt[t];a&&_1(this,t,e,a)}}reportNonstrict(e,t,a){var i=this.strict;if(typeof i=="function"&&(i=i(e,t,a)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new S("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var i=this.strict;if(typeof i=="function")try{i=i(e,t,a)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=K1(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class F0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return w0[ea[this.id]]}sub(){return w0[ta[this.id]]}fracNum(){return w0[ra[this.id]]}fracDen(){return w0[aa[this.id]]}cramp(){return w0[ia[this.id]]}text(){return w0[na[this.id]]}isTight(){return this.size>=2}}var Rt=0,qe=1,_0=2,B0=3,me=4,p0=5,ee=6,l0=7,w0=[new F0(Rt,0,!1),new F0(qe,0,!0),new F0(_0,1,!1),new F0(B0,1,!0),new F0(me,2,!1),new F0(p0,2,!0),new F0(ee,3,!1),new F0(l0,3,!0)],ea=[me,p0,me,p0,ee,l0,ee,l0],ta=[p0,p0,p0,p0,l0,l0,l0,l0],ra=[_0,B0,me,p0,ee,l0,ee,l0],aa=[B0,B0,p0,p0,l0,l0,l0,l0],ia=[qe,qe,B0,B0,p0,p0,l0,l0],na=[Rt,qe,_0,B0,_0,B0,_0,B0],N={DISPLAY:w0[Rt],TEXT:w0[_0],SCRIPT:w0[me],SCRIPTSCRIPT:w0[ee]},ft=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function sa(r){for(var e=0;e=i[0]&&r<=i[1])return t.name}return null}var De=[];ft.forEach(r=>r.blocks.forEach(e=>De.push(...e)));function Gr(r){for(var e=0;e=De[e]&&r<=De[e+1])return!0;return!1}var r0=r=>r+" "+r,Q0=80,la=function(e,t){return"M95,"+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+" -"+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},ua=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+" -"+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},oa=function(e,t){return"M983 "+(10+e+t)+` +l`+e/3.13+" -"+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},ha=function(e,t){return"M424,"+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` +h400000v`+(40+e)+"h-400000z"},ma=function(e,t){return"M473,"+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},ca=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},da=function(e,t,a){var i=a-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+` +H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},fa=function(e,t,a){t=1e3*t;var i="";switch(e){case"sqrtMain":i=la(t,Q0);break;case"sqrtSize1":i=ua(t,Q0);break;case"sqrtSize2":i=oa(t,Q0);break;case"sqrtSize3":i=ha(t,Q0);break;case"sqrtSize4":i=ma(t,Q0);break;case"sqrtTall":i=da(t,Q0,a)}return i},va=function(e,t){switch(e){case"⎜":return r0("M291 0 H417 V"+t+" H291z");case"∣":return r0("M145 0 H188 V"+t+" H145z");case"∥":return r0("M145 0 H188 V"+t+" H145z")+r0("M367 0 H410 V"+t+" H367z");case"⎟":return r0("M457 0 H583 V"+t+" H457z");case"⎢":return r0("M319 0 H403 V"+t+" H319z");case"⎥":return r0("M263 0 H347 V"+t+" H263z");case"⎪":return r0("M384 0 H504 V"+t+" H384z");case"⏐":return r0("M312 0 H355 V"+t+" H312z");case"‖":return r0("M257 0 H300 V"+t+" H257z")+r0("M478 0 H521 V"+t+" H478z");default:return""}},ar={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:r0("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:r0("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:r0("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:r0("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:r0("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:r0("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:r0("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:r0("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},pa=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 v84 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function ga(r){return"toText"in r}class ae{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t{if(ga(e))return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}var vt={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},ba={ex:!0,em:!0,mu:!0},Ur=function(e){return typeof e!="string"&&(e=e.unit),e in vt||e in ba||e==="ex"},K=function(e,t){var a;if(e.unit in vt)a=vt[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")a=t.fontMetrics().cssEmPerMu;else{var i;if(t.style.isTight()?i=t.havingStyle(t.style.text()):i=t,e.unit==="ex")a=i.fontMetrics().xHeight;else if(e.unit==="em")a=i.fontMetrics().quad;else throw new S("Invalid unit: '"+e.unit+"'");i!==t&&(a*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*a,t.maxSize)},A=function(e){return+e.toFixed(4)+"em"},L0=function(e){return e.filter(t=>t).join(" ")},It=function(e){var t="";for(var a of Object.keys(e)){var i=e[a];i!==void 0&&(t+=$1(a)+":"+i+";")}return t},Vr=function(e,t,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},t){t.style.isTight()&&this.classes.push("mtight");var i=t.getColor();i&&(this.style.color=i)}},Xr=function(e){var t=document.createElement(e);t.className=L0(this.classes),Object.assign(t.style,this.style);for(var a of Object.keys(this.attributes))t.setAttribute(a,this.attributes[a]);for(var i=0;i/=\x00-\x1f]/,Yr=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+i0(L0(this.classes))+'"');var a=It(this.style);a&&(t+=' style="'+i0(a)+'"');for(var i of Object.keys(this.attributes)){if(ya.test(i))throw new S("Invalid attribute name '"+i+"'");t+=" "+i+'="'+i0(this.attributes[i])+'"'}t+=">";for(var s=0;s",t};class ie{constructor(e,t,a,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,Vr.call(this,e,a,i),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Xr.call(this,"span")}toMarkup(){return Yr.call(this,"span")}}class Fe{constructor(e,t,a,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Vr.call(this,t,i),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Xr.call(this,"a")}toMarkup(){return Yr.call(this,"a")}}class xa{constructor(e,t,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=a}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e=''+i0(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=A(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=L0(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(a+="margin-right:"+A(this.italic)+";"),a+=It(this.style),a&&(e=!0,t+=' style="'+i0(a)+'"');var i=i0(this.text);return e?(t+=">",t+=i,t+="",t):i}}class C0{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var a of Object.keys(this.attributes))t.setAttribute(a,this.attributes[a]);for(var i=0;i':''}}class pt{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var a of Object.keys(this.attributes))t.setAttribute(a,this.attributes[a]);return t}toMarkup(){var e=" but got "+String(r)+".")}var za=r=>r instanceof ie||r instanceof Fe||r instanceof ae,k0={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},we={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},ir={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Aa(r,e){k0[r]=e}function Nt(r,e,t){if(!k0[e])throw new Error("Font metrics not found for font: "+e+".");var a=r.charCodeAt(0),i=k0[e][a];if(!i&&r[0]in ir&&(a=ir[r[0]].charCodeAt(0),i=k0[e][a]),!i&&t==="text"&&Gr(a)&&(i=k0[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Je={};function Ma(r){var e;if(r>=5?e=0:r>=3?e=1:e=2,!Je[e]){var t=Je[e]={cssEmPerMu:we.quad[e]/18};for(var a in we)we.hasOwnProperty(a)&&(t[a]=we[a][e])}return Je[e]}var W={math:{},text:{}};function n(r,e,t,a,i,s){W[r][i]={font:e,group:t,replace:a},s&&a&&(W[r][a]=W[r][i])}var l="math",w="text",o="main",d="ams",j="accent-token",D="bin",u0="close",ne="inner",E="mathord",t0="op-token",f0="open",de="punct",f="rel",q0="spacing",g="textord";n(l,o,f,"≡","\\equiv",!0);n(l,o,f,"≺","\\prec",!0);n(l,o,f,"≻","\\succ",!0);n(l,o,f,"∼","\\sim",!0);n(l,o,f,"⊥","\\perp");n(l,o,f,"⪯","\\preceq",!0);n(l,o,f,"⪰","\\succeq",!0);n(l,o,f,"≃","\\simeq",!0);n(l,o,f,"∣","\\mid",!0);n(l,o,f,"≪","\\ll",!0);n(l,o,f,"≫","\\gg",!0);n(l,o,f,"≍","\\asymp",!0);n(l,o,f,"∥","\\parallel");n(l,o,f,"⋈","\\bowtie",!0);n(l,o,f,"⌣","\\smile",!0);n(l,o,f,"⊑","\\sqsubseteq",!0);n(l,o,f,"⊒","\\sqsupseteq",!0);n(l,o,f,"≐","\\doteq",!0);n(l,o,f,"⌢","\\frown",!0);n(l,o,f,"∋","\\ni",!0);n(l,o,f,"∝","\\propto",!0);n(l,o,f,"⊢","\\vdash",!0);n(l,o,f,"⊣","\\dashv",!0);n(l,o,f,"∋","\\owns");n(l,o,de,".","\\ldotp");n(l,o,de,"⋅","\\cdotp");n(l,o,de,"⋅","·");n(w,o,g,"⋅","·");n(l,o,g,"#","\\#");n(w,o,g,"#","\\#");n(l,o,g,"&","\\&");n(w,o,g,"&","\\&");n(l,o,g,"ℵ","\\aleph",!0);n(l,o,g,"∀","\\forall",!0);n(l,o,g,"ℏ","\\hbar",!0);n(l,o,g,"∃","\\exists",!0);n(l,o,g,"∇","\\nabla",!0);n(l,o,g,"♭","\\flat",!0);n(l,o,g,"ℓ","\\ell",!0);n(l,o,g,"♮","\\natural",!0);n(l,o,g,"♣","\\clubsuit",!0);n(l,o,g,"℘","\\wp",!0);n(l,o,g,"♯","\\sharp",!0);n(l,o,g,"♢","\\diamondsuit",!0);n(l,o,g,"ℜ","\\Re",!0);n(l,o,g,"♡","\\heartsuit",!0);n(l,o,g,"ℑ","\\Im",!0);n(l,o,g,"♠","\\spadesuit",!0);n(l,o,g,"§","\\S",!0);n(w,o,g,"§","\\S");n(l,o,g,"¶","\\P",!0);n(w,o,g,"¶","\\P");n(l,o,g,"†","\\dag");n(w,o,g,"†","\\dag");n(w,o,g,"†","\\textdagger");n(l,o,g,"‡","\\ddag");n(w,o,g,"‡","\\ddag");n(w,o,g,"‡","\\textdaggerdbl");n(l,o,u0,"⎱","\\rmoustache",!0);n(l,o,f0,"⎰","\\lmoustache",!0);n(l,o,u0,"⟯","\\rgroup",!0);n(l,o,f0,"⟮","\\lgroup",!0);n(l,o,D,"∓","\\mp",!0);n(l,o,D,"⊖","\\ominus",!0);n(l,o,D,"⊎","\\uplus",!0);n(l,o,D,"⊓","\\sqcap",!0);n(l,o,D,"∗","\\ast");n(l,o,D,"⊔","\\sqcup",!0);n(l,o,D,"◯","\\bigcirc",!0);n(l,o,D,"∙","\\bullet",!0);n(l,o,D,"‡","\\ddagger");n(l,o,D,"≀","\\wr",!0);n(l,o,D,"⨿","\\amalg");n(l,o,D,"&","\\And");n(l,o,f,"⟵","\\longleftarrow",!0);n(l,o,f,"⇐","\\Leftarrow",!0);n(l,o,f,"⟸","\\Longleftarrow",!0);n(l,o,f,"⟶","\\longrightarrow",!0);n(l,o,f,"⇒","\\Rightarrow",!0);n(l,o,f,"⟹","\\Longrightarrow",!0);n(l,o,f,"↔","\\leftrightarrow",!0);n(l,o,f,"⟷","\\longleftrightarrow",!0);n(l,o,f,"⇔","\\Leftrightarrow",!0);n(l,o,f,"⟺","\\Longleftrightarrow",!0);n(l,o,f,"↦","\\mapsto",!0);n(l,o,f,"⟼","\\longmapsto",!0);n(l,o,f,"↗","\\nearrow",!0);n(l,o,f,"↩","\\hookleftarrow",!0);n(l,o,f,"↪","\\hookrightarrow",!0);n(l,o,f,"↘","\\searrow",!0);n(l,o,f,"↼","\\leftharpoonup",!0);n(l,o,f,"⇀","\\rightharpoonup",!0);n(l,o,f,"↙","\\swarrow",!0);n(l,o,f,"↽","\\leftharpoondown",!0);n(l,o,f,"⇁","\\rightharpoondown",!0);n(l,o,f,"↖","\\nwarrow",!0);n(l,o,f,"⇌","\\rightleftharpoons",!0);n(l,d,f,"≮","\\nless",!0);n(l,d,f,"","\\@nleqslant");n(l,d,f,"","\\@nleqq");n(l,d,f,"⪇","\\lneq",!0);n(l,d,f,"≨","\\lneqq",!0);n(l,d,f,"","\\@lvertneqq");n(l,d,f,"⋦","\\lnsim",!0);n(l,d,f,"⪉","\\lnapprox",!0);n(l,d,f,"⊀","\\nprec",!0);n(l,d,f,"⋠","\\npreceq",!0);n(l,d,f,"⋨","\\precnsim",!0);n(l,d,f,"⪹","\\precnapprox",!0);n(l,d,f,"≁","\\nsim",!0);n(l,d,f,"","\\@nshortmid");n(l,d,f,"∤","\\nmid",!0);n(l,d,f,"⊬","\\nvdash",!0);n(l,d,f,"⊭","\\nvDash",!0);n(l,d,f,"⋪","\\ntriangleleft");n(l,d,f,"⋬","\\ntrianglelefteq",!0);n(l,d,f,"⊊","\\subsetneq",!0);n(l,d,f,"","\\@varsubsetneq");n(l,d,f,"⫋","\\subsetneqq",!0);n(l,d,f,"","\\@varsubsetneqq");n(l,d,f,"≯","\\ngtr",!0);n(l,d,f,"","\\@ngeqslant");n(l,d,f,"","\\@ngeqq");n(l,d,f,"⪈","\\gneq",!0);n(l,d,f,"≩","\\gneqq",!0);n(l,d,f,"","\\@gvertneqq");n(l,d,f,"⋧","\\gnsim",!0);n(l,d,f,"⪊","\\gnapprox",!0);n(l,d,f,"⊁","\\nsucc",!0);n(l,d,f,"⋡","\\nsucceq",!0);n(l,d,f,"⋩","\\succnsim",!0);n(l,d,f,"⪺","\\succnapprox",!0);n(l,d,f,"≆","\\ncong",!0);n(l,d,f,"","\\@nshortparallel");n(l,d,f,"∦","\\nparallel",!0);n(l,d,f,"⊯","\\nVDash",!0);n(l,d,f,"⋫","\\ntriangleright");n(l,d,f,"⋭","\\ntrianglerighteq",!0);n(l,d,f,"","\\@nsupseteqq");n(l,d,f,"⊋","\\supsetneq",!0);n(l,d,f,"","\\@varsupsetneq");n(l,d,f,"⫌","\\supsetneqq",!0);n(l,d,f,"","\\@varsupsetneqq");n(l,d,f,"⊮","\\nVdash",!0);n(l,d,f,"⪵","\\precneqq",!0);n(l,d,f,"⪶","\\succneqq",!0);n(l,d,f,"","\\@nsubseteqq");n(l,d,D,"⊴","\\unlhd");n(l,d,D,"⊵","\\unrhd");n(l,d,f,"↚","\\nleftarrow",!0);n(l,d,f,"↛","\\nrightarrow",!0);n(l,d,f,"⇍","\\nLeftarrow",!0);n(l,d,f,"⇏","\\nRightarrow",!0);n(l,d,f,"↮","\\nleftrightarrow",!0);n(l,d,f,"⇎","\\nLeftrightarrow",!0);n(l,d,f,"△","\\vartriangle");n(l,d,g,"ℏ","\\hslash");n(l,d,g,"▽","\\triangledown");n(l,d,g,"◊","\\lozenge");n(l,d,g,"Ⓢ","\\circledS");n(l,d,g,"®","\\circledR");n(w,d,g,"®","\\circledR");n(l,d,g,"∡","\\measuredangle",!0);n(l,d,g,"∄","\\nexists");n(l,d,g,"℧","\\mho");n(l,d,g,"Ⅎ","\\Finv",!0);n(l,d,g,"⅁","\\Game",!0);n(l,d,g,"‵","\\backprime");n(l,d,g,"▲","\\blacktriangle");n(l,d,g,"▼","\\blacktriangledown");n(l,d,g,"■","\\blacksquare");n(l,d,g,"⧫","\\blacklozenge");n(l,d,g,"★","\\bigstar");n(l,d,g,"∢","\\sphericalangle",!0);n(l,d,g,"∁","\\complement",!0);n(l,d,g,"ð","\\eth",!0);n(w,o,g,"ð","ð");n(l,d,g,"╱","\\diagup");n(l,d,g,"╲","\\diagdown");n(l,d,g,"□","\\square");n(l,d,g,"□","\\Box");n(l,d,g,"◊","\\Diamond");n(l,d,g,"¥","\\yen",!0);n(w,d,g,"¥","\\yen",!0);n(l,d,g,"✓","\\checkmark",!0);n(w,d,g,"✓","\\checkmark");n(l,d,g,"ℶ","\\beth",!0);n(l,d,g,"ℸ","\\daleth",!0);n(l,d,g,"ℷ","\\gimel",!0);n(l,d,g,"ϝ","\\digamma",!0);n(l,d,g,"ϰ","\\varkappa");n(l,d,f0,"┌","\\@ulcorner",!0);n(l,d,u0,"┐","\\@urcorner",!0);n(l,d,f0,"└","\\@llcorner",!0);n(l,d,u0,"┘","\\@lrcorner",!0);n(l,d,f,"≦","\\leqq",!0);n(l,d,f,"⩽","\\leqslant",!0);n(l,d,f,"⪕","\\eqslantless",!0);n(l,d,f,"≲","\\lesssim",!0);n(l,d,f,"⪅","\\lessapprox",!0);n(l,d,f,"≊","\\approxeq",!0);n(l,d,D,"⋖","\\lessdot");n(l,d,f,"⋘","\\lll",!0);n(l,d,f,"≶","\\lessgtr",!0);n(l,d,f,"⋚","\\lesseqgtr",!0);n(l,d,f,"⪋","\\lesseqqgtr",!0);n(l,d,f,"≑","\\doteqdot");n(l,d,f,"≓","\\risingdotseq",!0);n(l,d,f,"≒","\\fallingdotseq",!0);n(l,d,f,"∽","\\backsim",!0);n(l,d,f,"⋍","\\backsimeq",!0);n(l,d,f,"⫅","\\subseteqq",!0);n(l,d,f,"⋐","\\Subset",!0);n(l,d,f,"⊏","\\sqsubset",!0);n(l,d,f,"≼","\\preccurlyeq",!0);n(l,d,f,"⋞","\\curlyeqprec",!0);n(l,d,f,"≾","\\precsim",!0);n(l,d,f,"⪷","\\precapprox",!0);n(l,d,f,"⊲","\\vartriangleleft");n(l,d,f,"⊴","\\trianglelefteq");n(l,d,f,"⊨","\\vDash",!0);n(l,d,f,"⊪","\\Vvdash",!0);n(l,d,f,"⌣","\\smallsmile");n(l,d,f,"⌢","\\smallfrown");n(l,d,f,"≏","\\bumpeq",!0);n(l,d,f,"≎","\\Bumpeq",!0);n(l,d,f,"≧","\\geqq",!0);n(l,d,f,"⩾","\\geqslant",!0);n(l,d,f,"⪖","\\eqslantgtr",!0);n(l,d,f,"≳","\\gtrsim",!0);n(l,d,f,"⪆","\\gtrapprox",!0);n(l,d,D,"⋗","\\gtrdot");n(l,d,f,"⋙","\\ggg",!0);n(l,d,f,"≷","\\gtrless",!0);n(l,d,f,"⋛","\\gtreqless",!0);n(l,d,f,"⪌","\\gtreqqless",!0);n(l,d,f,"≖","\\eqcirc",!0);n(l,d,f,"≗","\\circeq",!0);n(l,d,f,"≜","\\triangleq",!0);n(l,d,f,"∼","\\thicksim");n(l,d,f,"≈","\\thickapprox");n(l,d,f,"⫆","\\supseteqq",!0);n(l,d,f,"⋑","\\Supset",!0);n(l,d,f,"⊐","\\sqsupset",!0);n(l,d,f,"≽","\\succcurlyeq",!0);n(l,d,f,"⋟","\\curlyeqsucc",!0);n(l,d,f,"≿","\\succsim",!0);n(l,d,f,"⪸","\\succapprox",!0);n(l,d,f,"⊳","\\vartriangleright");n(l,d,f,"⊵","\\trianglerighteq");n(l,d,f,"⊩","\\Vdash",!0);n(l,d,f,"∣","\\shortmid");n(l,d,f,"∥","\\shortparallel");n(l,d,f,"≬","\\between",!0);n(l,d,f,"⋔","\\pitchfork",!0);n(l,d,f,"∝","\\varpropto");n(l,d,f,"◀","\\blacktriangleleft");n(l,d,f,"∴","\\therefore",!0);n(l,d,f,"∍","\\backepsilon");n(l,d,f,"▶","\\blacktriangleright");n(l,d,f,"∵","\\because",!0);n(l,d,f,"⋘","\\llless");n(l,d,f,"⋙","\\gggtr");n(l,d,D,"⊲","\\lhd");n(l,d,D,"⊳","\\rhd");n(l,d,f,"≂","\\eqsim",!0);n(l,o,f,"⋈","\\Join");n(l,d,f,"≑","\\Doteq",!0);n(l,d,D,"∔","\\dotplus",!0);n(l,d,D,"∖","\\smallsetminus");n(l,d,D,"⋒","\\Cap",!0);n(l,d,D,"⋓","\\Cup",!0);n(l,d,D,"⩞","\\doublebarwedge",!0);n(l,d,D,"⊟","\\boxminus",!0);n(l,d,D,"⊞","\\boxplus",!0);n(l,d,D,"⋇","\\divideontimes",!0);n(l,d,D,"⋉","\\ltimes",!0);n(l,d,D,"⋊","\\rtimes",!0);n(l,d,D,"⋋","\\leftthreetimes",!0);n(l,d,D,"⋌","\\rightthreetimes",!0);n(l,d,D,"⋏","\\curlywedge",!0);n(l,d,D,"⋎","\\curlyvee",!0);n(l,d,D,"⊝","\\circleddash",!0);n(l,d,D,"⊛","\\circledast",!0);n(l,d,D,"⋅","\\centerdot");n(l,d,D,"⊺","\\intercal",!0);n(l,d,D,"⋒","\\doublecap");n(l,d,D,"⋓","\\doublecup");n(l,d,D,"⊠","\\boxtimes",!0);n(l,d,f,"⇢","\\dashrightarrow",!0);n(l,d,f,"⇠","\\dashleftarrow",!0);n(l,d,f,"⇇","\\leftleftarrows",!0);n(l,d,f,"⇆","\\leftrightarrows",!0);n(l,d,f,"⇚","\\Lleftarrow",!0);n(l,d,f,"↞","\\twoheadleftarrow",!0);n(l,d,f,"↢","\\leftarrowtail",!0);n(l,d,f,"↫","\\looparrowleft",!0);n(l,d,f,"⇋","\\leftrightharpoons",!0);n(l,d,f,"↶","\\curvearrowleft",!0);n(l,d,f,"↺","\\circlearrowleft",!0);n(l,d,f,"↰","\\Lsh",!0);n(l,d,f,"⇈","\\upuparrows",!0);n(l,d,f,"↿","\\upharpoonleft",!0);n(l,d,f,"⇃","\\downharpoonleft",!0);n(l,o,f,"⊶","\\origof",!0);n(l,o,f,"⊷","\\imageof",!0);n(l,d,f,"⊸","\\multimap",!0);n(l,d,f,"↭","\\leftrightsquigarrow",!0);n(l,d,f,"⇉","\\rightrightarrows",!0);n(l,d,f,"⇄","\\rightleftarrows",!0);n(l,d,f,"↠","\\twoheadrightarrow",!0);n(l,d,f,"↣","\\rightarrowtail",!0);n(l,d,f,"↬","\\looparrowright",!0);n(l,d,f,"↷","\\curvearrowright",!0);n(l,d,f,"↻","\\circlearrowright",!0);n(l,d,f,"↱","\\Rsh",!0);n(l,d,f,"⇊","\\downdownarrows",!0);n(l,d,f,"↾","\\upharpoonright",!0);n(l,d,f,"⇂","\\downharpoonright",!0);n(l,d,f,"⇝","\\rightsquigarrow",!0);n(l,d,f,"⇝","\\leadsto");n(l,d,f,"⇛","\\Rrightarrow",!0);n(l,d,f,"↾","\\restriction");n(l,o,g,"‘","`");n(l,o,g,"$","\\$");n(w,o,g,"$","\\$");n(w,o,g,"$","\\textdollar");n(l,o,g,"%","\\%");n(w,o,g,"%","\\%");n(l,o,g,"_","\\_");n(w,o,g,"_","\\_");n(w,o,g,"_","\\textunderscore");n(l,o,g,"∠","\\angle",!0);n(l,o,g,"∞","\\infty",!0);n(l,o,g,"′","\\prime");n(l,o,g,"△","\\triangle");n(l,o,g,"Γ","\\Gamma",!0);n(l,o,g,"Δ","\\Delta",!0);n(l,o,g,"Θ","\\Theta",!0);n(l,o,g,"Λ","\\Lambda",!0);n(l,o,g,"Ξ","\\Xi",!0);n(l,o,g,"Π","\\Pi",!0);n(l,o,g,"Σ","\\Sigma",!0);n(l,o,g,"Υ","\\Upsilon",!0);n(l,o,g,"Φ","\\Phi",!0);n(l,o,g,"Ψ","\\Psi",!0);n(l,o,g,"Ω","\\Omega",!0);n(l,o,g,"A","Α");n(l,o,g,"B","Β");n(l,o,g,"E","Ε");n(l,o,g,"Z","Ζ");n(l,o,g,"H","Η");n(l,o,g,"I","Ι");n(l,o,g,"K","Κ");n(l,o,g,"M","Μ");n(l,o,g,"N","Ν");n(l,o,g,"O","Ο");n(l,o,g,"P","Ρ");n(l,o,g,"T","Τ");n(l,o,g,"X","Χ");n(l,o,g,"¬","\\neg",!0);n(l,o,g,"¬","\\lnot");n(l,o,g,"⊤","\\top");n(l,o,g,"⊥","\\bot");n(l,o,g,"∅","\\emptyset");n(l,d,g,"∅","\\varnothing");n(l,o,E,"α","\\alpha",!0);n(l,o,E,"β","\\beta",!0);n(l,o,E,"γ","\\gamma",!0);n(l,o,E,"δ","\\delta",!0);n(l,o,E,"ϵ","\\epsilon",!0);n(l,o,E,"ζ","\\zeta",!0);n(l,o,E,"η","\\eta",!0);n(l,o,E,"θ","\\theta",!0);n(l,o,E,"ι","\\iota",!0);n(l,o,E,"κ","\\kappa",!0);n(l,o,E,"λ","\\lambda",!0);n(l,o,E,"μ","\\mu",!0);n(l,o,E,"ν","\\nu",!0);n(l,o,E,"ξ","\\xi",!0);n(l,o,E,"ο","\\omicron",!0);n(l,o,E,"π","\\pi",!0);n(l,o,E,"ρ","\\rho",!0);n(l,o,E,"σ","\\sigma",!0);n(l,o,E,"τ","\\tau",!0);n(l,o,E,"υ","\\upsilon",!0);n(l,o,E,"ϕ","\\phi",!0);n(l,o,E,"χ","\\chi",!0);n(l,o,E,"ψ","\\psi",!0);n(l,o,E,"ω","\\omega",!0);n(l,o,E,"ε","\\varepsilon",!0);n(l,o,E,"ϑ","\\vartheta",!0);n(l,o,E,"ϖ","\\varpi",!0);n(l,o,E,"ϱ","\\varrho",!0);n(l,o,E,"ς","\\varsigma",!0);n(l,o,E,"φ","\\varphi",!0);n(l,o,D,"∗","*",!0);n(l,o,D,"+","+");n(l,o,D,"−","-",!0);n(l,o,D,"⋅","\\cdot",!0);n(l,o,D,"∘","\\circ",!0);n(l,o,D,"÷","\\div",!0);n(l,o,D,"±","\\pm",!0);n(l,o,D,"×","\\times",!0);n(l,o,D,"∩","\\cap",!0);n(l,o,D,"∪","\\cup",!0);n(l,o,D,"∖","\\setminus",!0);n(l,o,D,"∧","\\land");n(l,o,D,"∨","\\lor");n(l,o,D,"∧","\\wedge",!0);n(l,o,D,"∨","\\vee",!0);n(l,o,g,"√","\\surd");n(l,o,f0,"⟨","\\langle",!0);n(l,o,f0,"∣","\\lvert");n(l,o,f0,"∥","\\lVert");n(l,o,u0,"?","?");n(l,o,u0,"!","!");n(l,o,u0,"⟩","\\rangle",!0);n(l,o,u0,"∣","\\rvert");n(l,o,u0,"∥","\\rVert");n(l,o,f,"=","=");n(l,o,f,":",":");n(l,o,f,"≈","\\approx",!0);n(l,o,f,"≅","\\cong",!0);n(l,o,f,"≥","\\ge");n(l,o,f,"≥","\\geq",!0);n(l,o,f,"←","\\gets");n(l,o,f,">","\\gt",!0);n(l,o,f,"∈","\\in",!0);n(l,o,f,"","\\@not");n(l,o,f,"⊂","\\subset",!0);n(l,o,f,"⊃","\\supset",!0);n(l,o,f,"⊆","\\subseteq",!0);n(l,o,f,"⊇","\\supseteq",!0);n(l,d,f,"⊈","\\nsubseteq",!0);n(l,d,f,"⊉","\\nsupseteq",!0);n(l,o,f,"⊨","\\models");n(l,o,f,"←","\\leftarrow",!0);n(l,o,f,"≤","\\le");n(l,o,f,"≤","\\leq",!0);n(l,o,f,"<","\\lt",!0);n(l,o,f,"→","\\rightarrow",!0);n(l,o,f,"→","\\to");n(l,d,f,"≱","\\ngeq",!0);n(l,d,f,"≰","\\nleq",!0);n(l,o,q0," ","\\ ");n(l,o,q0," ","\\space");n(l,o,q0," ","\\nobreakspace");n(w,o,q0," ","\\ ");n(w,o,q0," "," ");n(w,o,q0," ","\\space");n(w,o,q0," ","\\nobreakspace");n(l,o,q0,"","\\nobreak");n(l,o,q0,"","\\allowbreak");n(l,o,de,",",",");n(l,o,de,";",";");n(l,d,D,"⊼","\\barwedge",!0);n(l,d,D,"⊻","\\veebar",!0);n(l,o,D,"⊙","\\odot",!0);n(l,o,D,"⊕","\\oplus",!0);n(l,o,D,"⊗","\\otimes",!0);n(l,o,g,"∂","\\partial",!0);n(l,o,D,"⊘","\\oslash",!0);n(l,d,D,"⊚","\\circledcirc",!0);n(l,d,D,"⊡","\\boxdot",!0);n(l,o,D,"△","\\bigtriangleup");n(l,o,D,"▽","\\bigtriangledown");n(l,o,D,"†","\\dagger");n(l,o,D,"⋄","\\diamond");n(l,o,D,"⋆","\\star");n(l,o,D,"◃","\\triangleleft");n(l,o,D,"▹","\\triangleright");n(l,o,f0,"{","\\{");n(w,o,g,"{","\\{");n(w,o,g,"{","\\textbraceleft");n(l,o,u0,"}","\\}");n(w,o,g,"}","\\}");n(w,o,g,"}","\\textbraceright");n(l,o,f0,"{","\\lbrace");n(l,o,u0,"}","\\rbrace");n(l,o,f0,"[","\\lbrack",!0);n(w,o,g,"[","\\lbrack",!0);n(l,o,u0,"]","\\rbrack",!0);n(w,o,g,"]","\\rbrack",!0);n(l,o,f0,"(","\\lparen",!0);n(l,o,u0,")","\\rparen",!0);n(w,o,g,"<","\\textless",!0);n(w,o,g,">","\\textgreater",!0);n(l,o,f0,"⌊","\\lfloor",!0);n(l,o,u0,"⌋","\\rfloor",!0);n(l,o,f0,"⌈","\\lceil",!0);n(l,o,u0,"⌉","\\rceil",!0);n(l,o,g,"\\","\\backslash");n(l,o,g,"∣","|");n(l,o,g,"∣","\\vert");n(w,o,g,"|","\\textbar",!0);n(l,o,g,"∥","\\|");n(l,o,g,"∥","\\Vert");n(w,o,g,"∥","\\textbardbl");n(w,o,g,"~","\\textasciitilde");n(w,o,g,"\\","\\textbackslash");n(w,o,g,"^","\\textasciicircum");n(l,o,f,"↑","\\uparrow",!0);n(l,o,f,"⇑","\\Uparrow",!0);n(l,o,f,"↓","\\downarrow",!0);n(l,o,f,"⇓","\\Downarrow",!0);n(l,o,f,"↕","\\updownarrow",!0);n(l,o,f,"⇕","\\Updownarrow",!0);n(l,o,t0,"∐","\\coprod");n(l,o,t0,"⋁","\\bigvee");n(l,o,t0,"⋀","\\bigwedge");n(l,o,t0,"⨄","\\biguplus");n(l,o,t0,"⋂","\\bigcap");n(l,o,t0,"⋃","\\bigcup");n(l,o,t0,"∫","\\int");n(l,o,t0,"∫","\\intop");n(l,o,t0,"∬","\\iint");n(l,o,t0,"∭","\\iiint");n(l,o,t0,"∏","\\prod");n(l,o,t0,"∑","\\sum");n(l,o,t0,"⨂","\\bigotimes");n(l,o,t0,"⨁","\\bigoplus");n(l,o,t0,"⨀","\\bigodot");n(l,o,t0,"∮","\\oint");n(l,o,t0,"∯","\\oiint");n(l,o,t0,"∰","\\oiiint");n(l,o,t0,"⨆","\\bigsqcup");n(l,o,t0,"∫","\\smallint");n(w,o,ne,"…","\\textellipsis");n(l,o,ne,"…","\\mathellipsis");n(w,o,ne,"…","\\ldots",!0);n(l,o,ne,"…","\\ldots",!0);n(l,o,ne,"⋯","\\@cdots",!0);n(l,o,ne,"⋱","\\ddots",!0);n(l,o,g,"⋮","\\varvdots");n(w,o,g,"⋮","\\varvdots");n(l,o,j,"ˊ","\\acute");n(l,o,j,"ˋ","\\grave");n(l,o,j,"¨","\\ddot");n(l,o,j,"~","\\tilde");n(l,o,j,"ˉ","\\bar");n(l,o,j,"˘","\\breve");n(l,o,j,"ˇ","\\check");n(l,o,j,"^","\\hat");n(l,o,j,"⃗","\\vec");n(l,o,j,"˙","\\dot");n(l,o,j,"˚","\\mathring");n(l,o,E,"","\\@imath");n(l,o,E,"","\\@jmath");n(l,o,g,"ı","ı");n(l,o,g,"ȷ","ȷ");n(w,o,g,"ı","\\i",!0);n(w,o,g,"ȷ","\\j",!0);n(w,o,g,"ß","\\ss",!0);n(w,o,g,"æ","\\ae",!0);n(w,o,g,"œ","\\oe",!0);n(w,o,g,"ø","\\o",!0);n(w,o,g,"Æ","\\AE",!0);n(w,o,g,"Œ","\\OE",!0);n(w,o,g,"Ø","\\O",!0);n(w,o,j,"ˊ","\\'");n(w,o,j,"ˋ","\\`");n(w,o,j,"ˆ","\\^");n(w,o,j,"˜","\\~");n(w,o,j,"ˉ","\\=");n(w,o,j,"˘","\\u");n(w,o,j,"˙","\\.");n(w,o,j,"¸","\\c");n(w,o,j,"˚","\\r");n(w,o,j,"ˇ","\\v");n(w,o,j,"¨",'\\"');n(w,o,j,"˝","\\H");n(w,o,j,"◯","\\textcircled");var $r={"--":!0,"---":!0,"``":!0,"''":!0};n(w,o,g,"–","--",!0);n(w,o,g,"–","\\textendash");n(w,o,g,"—","---",!0);n(w,o,g,"—","\\textemdash");n(w,o,g,"‘","`",!0);n(w,o,g,"‘","\\textquoteleft");n(w,o,g,"’","'",!0);n(w,o,g,"’","\\textquoteright");n(w,o,g,"“","``",!0);n(w,o,g,"“","\\textquotedblleft");n(w,o,g,"”","''",!0);n(w,o,g,"”","\\textquotedblright");n(l,o,g,"°","\\degree",!0);n(w,o,g,"°","\\degree");n(w,o,g,"°","\\textdegree",!0);n(l,o,g,"£","\\pounds");n(l,o,g,"£","\\mathsterling",!0);n(w,o,g,"£","\\pounds");n(w,o,g,"£","\\textsterling",!0);n(l,d,g,"✠","\\maltese");n(w,d,g,"✠","\\maltese");var nr='0123456789/@."';for(var Qe=0;Qe{var e=r.charCodeAt(0),t=r.charCodeAt(1),a=(e-55296)*1024+(t-56320)+65536;if(119808<=a&&a<120484){var i=Math.floor((a-119808)/26);return vr[i]}else if(120782<=a&&a<=120831){var s=Math.floor((a-120782)/10);return Ba[s]}else{if(a===120485||a===120486)return vr[0];if(120486{if(L0(r.classes)!==L0(e.classes)||r.skew!==e.skew||r.maxFontSize!==e.maxFontSize||r.italic!==0&&r.hasClass("mathnormal"))return!1;if(r.classes.length===1){var t=r.classes[0];if(t==="mbin"||t==="mord")return!1}for(var a of Object.keys(r.style))if(r.style[a]!==e.style[a])return!1;for(var i of Object.keys(e.style))if(r.style[i]!==e.style[i])return!1;return!0},Wr=r=>{for(var e=0;et&&(t=u.height),u.depth>a&&(a=u.depth),u.maxFontSize>i&&(i=u.maxFontSize)}e.height=t,e.depth=a,e.maxFontSize=i},k=function(e,t,a,i){var s=new ie(e,t,a,i);return Ht(s),s},G0=(r,e,t,a)=>new ie(r,e,t,a),te=function(e,t,a){var i=k([e],[],t);return i.height=Math.max(a||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),i.style.borderBottomWidth=A(i.height),i.maxFontSize=1,i},Ea=function(e,t,a,i){var s=new Fe(e,t,a,i);return Ht(s),s},E0=function(e){var t=new ae(e);return Ht(t),t},re=function(e,t){return e instanceof ae?k([],[e],t):e},Ra=function(e){if(e.positionType==="individualShift"){for(var t=e.children,a=[t[0]],i=-t[0].shift-t[0].elem.depth,s=i,u=1;u{var t=k(["mspace"],[],e),a=K(r,e);return t.style.marginRight=A(a),t},ze=(r,e,t)=>{var a,i;switch(r){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=r}return e==="textbf"&&t==="textit"?i="BoldItalic":e==="textbf"?i="Bold":t==="textit"?i="Italic":i="Regular",a+"-"+i},kt={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Zr={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Kr=function(e,t){var[a,i,s]=Zr[e],u=new P0(a),h=new C0([u],{width:A(i),height:A(s),style:"width:"+A(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),c=G0(["overlay"],[h],t);return c.height=s,c.style.height=A(s),c.style.width=A(i),c},Z={number:3,unit:"mu"},Y0={number:4,unit:"mu"},M0={number:5,unit:"mu"},Ia={mord:{mop:Z,mbin:Y0,mrel:M0,minner:Z},mop:{mord:Z,mop:Z,mrel:M0,minner:Z},mbin:{mord:Y0,mop:Y0,mopen:Y0,minner:Y0},mrel:{mord:M0,mop:M0,mopen:M0,minner:M0},mopen:{},mclose:{mop:Z,mbin:Y0,mrel:M0,minner:Z},mpunct:{mord:Z,mop:Z,mrel:M0,mopen:Z,mclose:Z,mpunct:Z,minner:Z},minner:{mord:Z,mop:Z,mbin:Y0,mrel:M0,mopen:Z,mpunct:Z,minner:Z}},Na={mord:{mop:Z},mop:{mord:Z,mop:Z},mbin:{},mrel:{},mopen:{},mclose:{mop:Z},mpunct:{},minner:{mop:Z}},Jr={},Re={},Ie={};function B(r){for(var{type:e,names:t,props:a,handler:i,htmlBuilder:s,mathmlBuilder:u}=r,h={type:e,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:i},c=0;c{var q=M.classes[0],C=T.classes[0];q==="mbin"&&Ha.has(C)?M.classes[0]="mord":C==="mbin"&&Fa.has(q)&&(T.classes[0]="mord")},{node:b},x,y),St(s,(T,M)=>{var q,C,R=At(M),F=At(T),L=R&&F?T.hasClass("mtight")?(q=Na[R])==null?void 0:q[F]:(C=Ia[R])==null?void 0:C[F]:null;if(L)return jr(L,v)},{node:b},x,y),s},St=function(e,t,a,i,s){i&&e.push(i);for(var u=0;ux=>{e.splice(b+1,0,x),u++})(u)}i&&e.pop()},Qr=function(e){return e instanceof ae||e instanceof Fe||e instanceof ie&&e.hasClass("enclosing")?e:null},zt=function(e,t){var a=Qr(e);if(a){var i=a.children;if(i.length){if(t==="right")return zt(i[i.length-1],"right");if(t==="left")return zt(i[0],"left")}}return e},At=function(e,t){if(!e)return null;t&&(e=zt(e,t));var a=e.classes[0];return La[a]||null},ce=function(e,t){var a=["nulldelimiter"].concat(e.baseSizingClasses());return k(t.concat(a))},X=function(e,t,a){if(!e)return k();if(Re[e.type]){var i=Re[e.type](e,t);if(a&&t.size!==a.size){i=k(t.sizingClasses(a),[i],t);var s=t.sizeMultiplier/a.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new S("Got group of unknown type: '"+e.type+"'")};function Ae(r,e){var t=k(["base"],r,e),a=k(["strut"]);return a.style.height=A(t.height+t.depth),t.depth&&(a.style.verticalAlign=A(-t.depth)),t.children.unshift(a),t}function Mt(r,e){var t=null;r.length===1&&r[0].type==="tag"&&(t=r[0].tag,r=r[0].body);var a=a0(r,e,"root"),i;a.length===2&&a[1].hasClass("tag")&&(i=a.pop());for(var s=[],u=[],h=0;h0&&(s.push(Ae(u,e)),u=[]),s.push(a[h]));u.length>0&&s.push(Ae(u,e));var v;t?(v=Ae(a0(t,e,!0),e),v.classes=["tag"],s.push(v)):i&&s.push(i);var p=k(["katex-html"],s);if(p.setAttribute("aria-hidden","true"),v){var b=v.children[0];b.style.height=A(p.height+p.depth),p.depth&&(b.style.verticalAlign=A(-p.depth))}return p}function _r(r){return new ae(r)}class z{constructor(e,t,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=a||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=L0(this.classes));for(var a=0;a0&&(e+=' class ="'+i0(L0(this.classes))+'"'),e+=">";for(var a=0;a",e}toText(){return this.children.map(e=>e.toText()).join("")}}class e0{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return i0(this.toText())}toText(){return this.text}}class e1{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",A(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Pa=new Set(["\\imath","\\jmath"]),Ga=new Set(["mrow","mtable"]),g0=function(e,t,a){return W[t][e]&&W[t][e].replace&&e.charCodeAt(0)!==55349&&!($r.hasOwnProperty(e)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(e=W[t][e].replace),new e0(e)},Ot=function(e){return e.length===1?e[0]:new z("mrow",e)},Ua={mathit:"italic",boldsymbol:r=>r.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},Lt=(r,e)=>{if(r.mode==="text"){if(e.fontFamily==="texttt")return"monospace";if(e.fontFamily==="textsf")return e.fontShape==="textit"&&e.fontWeight==="textbf"?"sans-serif-bold-italic":e.fontShape==="textit"?"sans-serif-italic":e.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(e.fontShape==="textit"&&e.fontWeight==="textbf")return"bold-italic";if(e.fontShape==="textit")return"italic";if(e.fontWeight==="textbf")return"bold"}var t=e.font;if(!t||t==="mathnormal")return null;var a=r.mode,i=Ua[t];if(i)return typeof i=="function"?i(r):i;var s=r.text;if(Pa.has(s))return null;if(W[a][s]){var u=W[a][s].replace;u&&(s=u)}var h=kt[t].fontName;return Nt(s,h,a)?kt[t].variant:null};function rt(r){if(!r)return!1;if(r.type==="mi"&&r.children.length===1){var e=r.children[0];return e instanceof e0&&e.text==="."}else if(r.type==="mo"&&r.children.length===1&&r.getAttribute("separator")==="true"&&r.getAttribute("lspace")==="0em"&&r.getAttribute("rspace")==="0em"){var t=r.children[0];return t instanceof e0&&t.text===","}else return!1}var v0=function(e,t,a){if(e.length===1){var i=$(e[0],t);return a&&i instanceof z&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],u,h=0;h=1&&(u.type==="mn"||rt(u))){var v=c.children[0];v instanceof z&&v.type==="mn"&&(v.children=[...u.children,...v.children],s.pop())}else if(u.type==="mi"&&u.children.length===1){var p=u.children[0];if(p instanceof e0&&p.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var b=c.children[0];b instanceof e0&&b.text.length>0&&(b.text=b.text.slice(0,1)+"̸"+b.text.slice(1),s.pop())}}}s.push(c),u=c}return s},U0=function(e,t,a){return Ot(v0(e,t,a))},$=function(e,t){if(!e)return new z("mrow");if(Ie[e.type])return Ie[e.type](e,t);throw new S("Got group of unknown type: '"+e.type+"'")};function pr(r,e,t,a,i){var s=v0(r,t),u;s.length===1&&s[0]instanceof z&&Ga.has(s[0].type)?u=s[0]:u=new z("mrow",s);var h=new z("annotation",[new e0(e)]);h.setAttribute("encoding","application/x-tex");var c=new z("semantics",[u,h]),v=new z("math",[c]);v.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&v.setAttribute("display","block");var p=i?"katex":"katex-mathml";return k([p],[v])}var Va=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],gr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],br=function(e,t){return t.size<2?e:Va[e-1][t.size-1]};class T0{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||T0.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=gr[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,e),new T0(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:br(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:gr[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=br(T0.BASESIZE,e);return this.size===t&&this.textSize===T0.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==T0.BASESIZE?["sizing","reset-size"+this.size,"size"+T0.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ma(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}T0.BASESIZE=6;var t1=function(e){return new T0({style:e.displayMode?N.DISPLAY:N.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},r1=function(e,t){if(t.displayMode){var a=["katex-display"];t.leqno&&a.push("leqno"),t.fleqn&&a.push("fleqn"),e=k(a,[e])}return e},Xa=function(e,t,a){var i=t1(a),s;if(a.output==="mathml")return pr(e,t,i,a.displayMode,!0);if(a.output==="html"){var u=Mt(e,i);s=k(["katex"],[u])}else{var h=pr(e,t,i,a.displayMode,!1),c=Mt(e,i);s=k(["katex"],[h,c])}return r1(s,a)},Ya=function(e,t,a){var i=t1(a),s=Mt(e,i),u=k(["katex"],[s]);return r1(u,a)},$a={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Le=function(e){var t=new z("mo",[new e0($a[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Wa={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},ja=new Set(["widehat","widecheck","widetilde","utilde"]),Pe=function(e,t){function a(){var h=4e5,c=e.label.slice(1);if(ja.has(c)&&"base"in e){var v=e.base.type==="ordgroup"?e.base.body.length:1,p,b,x;if(v>5)c==="widehat"||c==="widecheck"?(p=420,h=2364,x=.42,b=c+"4"):(p=312,h=2340,x=.34,b="tilde4");else{var y=[1,1,2,2,3,3][v];c==="widehat"||c==="widecheck"?(h=[0,1062,2364,2364,2364][y],p=[0,239,300,360,420][y],x=[0,.24,.3,.3,.36,.42][y],b=c+y):(h=[0,600,1033,2339,2340][y],p=[0,260,286,306,312][y],x=[0,.26,.286,.3,.306,.34][y],b="tilde"+y)}var T=new P0(b),M=new C0([T],{width:"100%",height:A(x),viewBox:"0 0 "+h+" "+p,preserveAspectRatio:"none"});return{span:G0([],[M],t),minWidth:0,height:x}}else{var q=[],C=Wa[c];if(!C)throw new Error('No SVG data for "'+c+'".');var[R,F,L]=C,O=L/1e3,P=R.length,G,Y;if(P===1){if(C.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');G=["hide-tail"],Y=[C[3]]}else if(P===2)G=["halfarrow-left","halfarrow-right"],Y=["xMinYMin","xMaxYMin"];else if(P===3)G=["brace-left","brace-center","brace-right"],Y=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+P+" children.");for(var U=0;U0&&(i.style.minWidth=A(s)),i},Za=function(e,t,a,i,s){var u,h=e.height+e.depth+a+i;if(/fbox|color|angl/.test(t)){if(u=k(["stretchy",t],[],s),t==="fbox"){var c=s.color&&s.getColor();c&&(u.style.borderColor=c)}}else{var v=[];/^[bx]cancel$/.test(t)&&v.push(new pt({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&v.push(new pt({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var p=new C0(v,{width:"100%",height:A(h)});u=G0([],[p],s)}return u.height=h,u.style.height=A(h),u},Ka={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ja={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function Qa(r){return r in Ka}function H(r,e){if(!r||r.type!==e)throw new Error("Expected node of type "+e+", but got "+(r?"node of type "+r.type:String(r)));return r}function Ge(r){var e=Ue(r);if(!e)throw new Error("Expected node of symbol group type, but got "+(r?"node of type "+r.type:String(r)));return e}function Ue(r){return r&&(r.type==="atom"||Ja.hasOwnProperty(r.type))?r:null}var a1=r=>{if(r instanceof d0)return r;if(za(r)&&r.children.length===1)return a1(r.children[0])},Pt=(r,e)=>{var t,a,i;r&&r.type==="supsub"?(a=H(r.base,"accent"),t=a.base,r.base=t,i=Sa(X(r,e)),r.base=a):(a=H(r,"accent"),t=a.base);var s=X(t,e.havingCrampedStyle()),u=a.isShifty&&D0(t),h=0;if(u){var c,v;h=(c=(v=a1(s))==null?void 0:v.skew)!=null?c:0}var p=a.label==="\\c",b=p?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),x;if(a.isStretchy)x=Pe(a,e),x=V({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:x,wrapperClasses:["svg-align"],wrapperStyle:h>0?{width:"calc(100% - "+A(2*h)+")",marginLeft:A(2*h)}:void 0}]});else{var y,T;a.label==="\\vec"?(y=Kr("vec",e),T=Zr.vec[1]):(y=Oe({mode:a.mode,text:a.label},e,"textord"),y=ka(y),y.italic=0,T=y.width,p&&(b+=y.depth)),x=k(["accent-body"],[y]);var M=a.label==="\\textcircled";M&&(x.classes.push("accent-full"),b=s.height);var q=h;M||(q-=T/2),x.style.left=A(q),a.label==="\\textcircled"&&(x.style.top=".2em"),x=V({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-b},{type:"elem",elem:x}]})}var C=k(["mord","accent"],[x],e);return i?(i.children[0]=C,i.height=Math.max(C.height,i.height),i.classes[0]="mord",i):C},i1=(r,e)=>{var t=r.isStretchy?Le(r.label):new z("mo",[g0(r.label,r.mode)]),a=new z("mover",[$(r.base,e),t]);return a.setAttribute("accent","true"),a},_a=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));B({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(r,e)=>{var t=Ne(e[0]),a=!_a.test(r.funcName),i=!a||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:a,isShifty:i,base:t}},htmlBuilder:Pt,mathmlBuilder:i1});B({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(r,e)=>{var t=e[0],a=r.parser.mode;return a==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:r.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:Pt,mathmlBuilder:i1});B({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,i=e[0];return{type:"accentUnder",mode:t.mode,label:a,base:i}},htmlBuilder:(r,e)=>{var t=X(r.base,e),a=Pe(r,e),i=r.label==="\\utilde"?.12:0,s=V({positionType:"top",positionData:t.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:t}]});return k(["mord","accentunder"],[s],e)},mathmlBuilder:(r,e)=>{var t=Le(r.label),a=new z("munder",[$(r.base,e),t]);return a.setAttribute("accentunder","true"),a}});var Me=r=>{var e=new z("mpadded",r?[r]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};B({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a,funcName:i}=r;return{type:"xArrow",mode:a.mode,label:i,body:e[0],below:t[0]}},htmlBuilder(r,e){var t=e.style,a=e.havingStyle(t.sup()),i=re(X(r.body,a,e),e),s=r.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(s+"-arrow-pad");var u;r.below&&(a=e.havingStyle(t.sub()),u=re(X(r.below,a,e),e),u.classes.push(s+"-arrow-pad"));var h=Pe(r,e),c=-e.fontMetrics().axisHeight+.5*h.height,v=-e.fontMetrics().axisHeight-.5*h.height-.111;(i.depth>.25||r.label==="\\xleftequilibrium")&&(v-=i.depth);var p;if(u){var b=-e.fontMetrics().axisHeight+u.height+.5*h.height+.111;p=V({positionType:"individualShift",children:[{type:"elem",elem:i,shift:v},{type:"elem",elem:h,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:u,shift:b}]})}else p=V({positionType:"individualShift",children:[{type:"elem",elem:i,shift:v},{type:"elem",elem:h,shift:c,wrapperClasses:["svg-align"]}]});return k(["mrel","x-arrow"],[p],e)},mathmlBuilder(r,e){var t=Le(r.label);t.setAttribute("minsize",r.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(r.body){var i=Me($(r.body,e));if(r.below){var s=Me($(r.below,e));a=new z("munderover",[t,s,i])}else a=new z("mover",[t,i])}else if(r.below){var u=Me($(r.below,e));a=new z("munder",[t,u])}else a=Me(),a=new z("mover",[t,a]);return a}});function n1(r,e){var t=a0(r.body,e,!0);return k([r.mclass],t,e)}function s1(r,e){var t,a=v0(r.body,e);return r.mclass==="minner"?t=new z("mpadded",a):r.mclass==="mord"?r.isCharacterBox?(t=a[0],t.type="mi"):t=new z("mi",a):(r.isCharacterBox?(t=a[0],t.type="mo"):t=new z("mo",a),r.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):r.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):r.mclass==="mopen"||r.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):r.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}B({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(r,e){var{parser:t,funcName:a}=r,i=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+a.slice(5),body:_(i),isCharacterBox:D0(i)}},htmlBuilder:n1,mathmlBuilder:s1});var Ve=r=>{var e=r.type==="ordgroup"&&r.body.length?r.body[0]:r;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};B({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(r,e){var{parser:t}=r;return{type:"mclass",mode:t.mode,mclass:Ve(e[0]),body:_(e[1]),isCharacterBox:D0(e[1])}}});B({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(r,e){var{parser:t,funcName:a}=r,i=e[1],s=e[0],u;a!=="\\stackrel"?u=Ve(i):u="mrel";var h={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:_(i)},c={type:"supsub",mode:s.mode,base:h,sup:a==="\\underset"?null:s,sub:a==="\\underset"?s:null};return{type:"mclass",mode:t.mode,mclass:u,body:[c],isCharacterBox:D0(c)}},htmlBuilder:n1,mathmlBuilder:s1});B({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"pmb",mode:t.mode,mclass:Ve(e[0]),body:_(e[0])}},htmlBuilder(r,e){var t=a0(r.body,e,!0),a=k([r.mclass],t,e);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(r,e){var t=v0(r.body,e),a=new z("mstyle",t);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var e4={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},yr=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),xr=r=>r.type==="textord"&&r.text==="@",t4=(r,e)=>(r.type==="mathord"||r.type==="atom")&&r.text===e;function r4(r,e,t){var a=e4[r];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(a,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var i=t.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:a,mode:"math",family:"rel"},u=t.callFunction("\\Big",[s],[]),h=t.callFunction("\\\\cdright",[e[1]],[]),c={type:"ordgroup",mode:"math",body:[i,u,h]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var v={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[v],[])}default:return{type:"textord",text:" ",mode:"math"}}}function a4(r){var e=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){e.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();var t=r.fetch().text;if(t==="&"||t==="\\\\")r.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new S("Expected \\\\ or \\cr or \\end",r.nextToken)}for(var a=[],i=[a],s=0;sAV".includes(v))for(var b=0;b<2;b++){for(var x=!0,y=c+1;yAV=|." after @',u[c]);var T=r4(v,p,r),M={type:"styling",body:[T],mode:"math",style:"display",resetFont:!0};a.push(M),h=yr()}s%2===0?a.push(h):a.shift(),a=[],i.push(a)}r.gullet.endGroup(),r.gullet.endGroup();var q=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:q,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}B({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"cdlabel",mode:t.mode,side:a.slice(4),label:e[0]}},htmlBuilder(r,e){var t=e.havingStyle(e.style.sup()),a=re(X(r.label,t,e),e);return a.classes.push("cd-label-"+r.side),a.style.bottom=A(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(r,e){var t=new z("mrow",[$(r.label,e)]);return t=new z("mpadded",[t]),t.setAttribute("width","0"),r.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new z("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});B({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(r,e){var{parser:t}=r;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(r,e){var t=re(X(r.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(r,e){return new z("mrow",[$(r.fragment,e)])}});B({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(r,e){for(var{parser:t}=r,a=H(e[0],"ordgroup"),i=a.body,s="",u=0;u=1114111)throw new S("\\@char with invalid code point "+s);return c<=65535?v=String.fromCharCode(c):(c-=65536,v=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:v}}});var l1=(r,e)=>{var t=a0(r.body,e.withColor(r.color),!1);return E0(t)},u1=(r,e)=>{var t=v0(r.body,e.withColor(r.color)),a=new z("mstyle",t);return a.setAttribute("mathcolor",r.color),a};B({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(r,e){var{parser:t}=r,a=H(e[0],"color-token").color,i=e[1];return{type:"color",mode:t.mode,color:a,body:_(i)}},htmlBuilder:l1,mathmlBuilder:u1});B({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(r,e){var{parser:t,breakOnTokenText:a}=r,i=H(e[0],"color-token").color;t.gullet.macros.set("\\current@color",i);var s=t.parseExpression(!0,a);return{type:"color",mode:t.mode,color:i,body:s}},htmlBuilder:l1,mathmlBuilder:u1});B({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(r,e,t){var{parser:a}=r,i=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,s=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:s,size:i&&H(i,"size").value}},htmlBuilder(r,e){var t=k(["mspace"],[],e);return r.newLine&&(t.classes.push("newline"),r.size&&(t.style.marginTop=A(K(r.size,e)))),t},mathmlBuilder(r,e){var t=new z("mspace");return r.newLine&&(t.setAttribute("linebreak","newline"),r.size&&t.setAttribute("height",A(K(r.size,e)))),t}});var Tt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},o1=r=>{var e=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new S("Expected a control sequence",r);return e},i4=r=>{var e=r.gullet.popToken();return e.text==="="&&(e=r.gullet.popToken(),e.text===" "&&(e=r.gullet.popToken())),e},h1=(r,e,t,a)=>{var i=r.gullet.macros.get(t.text);i==null&&(t.noexpand=!0,i={tokens:[t],numArgs:0,unexpandable:!r.gullet.isExpandable(t.text)}),r.gullet.macros.set(e,i,a)};B({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e,funcName:t}=r;e.consumeSpaces();var a=e.fetch();if(Tt[a.text])return(t==="\\global"||t==="\\\\globallong")&&(a.text=Tt[a.text]),H(e.parseFunction(),"internal");throw new S("Invalid token after macro prefix",a)}});B({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=e.gullet.popToken(),i=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new S("Expected a control sequence",a);for(var s=0,u,h=[[]];e.gullet.future().text!=="{";)if(a=e.gullet.popToken(),a.text==="#"){if(e.gullet.future().text==="{"){u=e.gullet.future(),h[s].push("{");break}if(a=e.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new S('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new S('Argument number "'+a.text+'" out of order');s++,h.push([])}else{if(a.text==="EOF")throw new S("Expected a macro definition");h[s].push(a.text)}var{tokens:c}=e.gullet.consumeArg();return u&&c.unshift(u),(t==="\\edef"||t==="\\xdef")&&(c=e.gullet.expandTokens(c),c.reverse()),e.gullet.macros.set(i,{tokens:c,numArgs:s,delimiters:h},t===Tt[t]),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=o1(e.gullet.popToken());e.gullet.consumeSpaces();var i=i4(e);return h1(e,a,i,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=o1(e.gullet.popToken()),i=e.gullet.popToken(),s=e.gullet.popToken();return h1(e,a,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var oe=function(e,t,a){var i=W.math[e]&&W.math[e].replace,s=Nt(i||e,t,a);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},Gt=function(e,t,a,i){var s=a.havingBaseStyle(t),u=k(i.concat(s.sizingClasses(a)),[e],a),h=s.sizeMultiplier/a.sizeMultiplier;return u.height*=h,u.depth*=h,u.maxFontSize=s.sizeMultiplier,u},m1=function(e,t,a){var i=t.havingBaseStyle(a),s=(1-t.sizeMultiplier/i.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=A(s),e.height-=s,e.depth+=s},n4=function(e,t,a,i,s,u){var h=s0(e,"Main-Regular",s,i),c=Gt(h,t,i,u);return m1(c,i,t),c},s4=function(e,t,a,i){return s0(e,"Size"+t+"-Regular",a,i)},c1=function(e,t,a,i,s,u){var h=s4(e,t,s,i),c=Gt(k(["delimsizing","size"+t],[h],i),N.TEXT,i,u);return a&&m1(c,i,N.TEXT),c},at=function(e,t,a){var i;t==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=k(["delimsizinginner",i],[k([],[s0(e,t,a)])]);return{type:"elem",elem:s}},it=function(e,t,a){var i=k0["Size4-Regular"][e.charCodeAt(0)]?k0["Size4-Regular"][e.charCodeAt(0)][4]:k0["Size1-Regular"][e.charCodeAt(0)][4],s=new P0("inner",va(e,Math.round(1e3*t))),u=new C0([s],{width:A(i),height:A(t),style:"width:"+A(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),h=G0([],[u],a);return h.height=t,h.style.height=A(t),h.style.width=A(i),{type:"elem",elem:h}},Bt=.008,Te={type:"kern",size:-1*Bt},l4=new Set(["|","\\lvert","\\rvert","\\vert"]),u4=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),d1=function(e,t,a,i,s,u){var h,c,v,p,b="",x=0;h=v=p=e,c=null;var y="Size1-Regular";e==="\\uparrow"?v=p="⏐":e==="\\Uparrow"?v=p="‖":e==="\\downarrow"?h=v="⏐":e==="\\Downarrow"?h=v="‖":e==="\\updownarrow"?(h="\\uparrow",v="⏐",p="\\downarrow"):e==="\\Updownarrow"?(h="\\Uparrow",v="‖",p="\\Downarrow"):l4.has(e)?(v="∣",b="vert",x=333):u4.has(e)?(v="∥",b="doublevert",x=556):e==="["||e==="\\lbrack"?(h="⎡",v="⎢",p="⎣",y="Size4-Regular",b="lbrack",x=667):e==="]"||e==="\\rbrack"?(h="⎤",v="⎥",p="⎦",y="Size4-Regular",b="rbrack",x=667):e==="\\lfloor"||e==="⌊"?(v=h="⎢",p="⎣",y="Size4-Regular",b="lfloor",x=667):e==="\\lceil"||e==="⌈"?(h="⎡",v=p="⎢",y="Size4-Regular",b="lceil",x=667):e==="\\rfloor"||e==="⌋"?(v=h="⎥",p="⎦",y="Size4-Regular",b="rfloor",x=667):e==="\\rceil"||e==="⌉"?(h="⎤",v=p="⎥",y="Size4-Regular",b="rceil",x=667):e==="("||e==="\\lparen"?(h="⎛",v="⎜",p="⎝",y="Size4-Regular",b="lparen",x=875):e===")"||e==="\\rparen"?(h="⎞",v="⎟",p="⎠",y="Size4-Regular",b="rparen",x=875):e==="\\{"||e==="\\lbrace"?(h="⎧",c="⎨",p="⎩",v="⎪",y="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(h="⎫",c="⎬",p="⎭",v="⎪",y="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(h="⎧",p="⎩",v="⎪",y="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(h="⎫",p="⎭",v="⎪",y="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(h="⎧",p="⎭",v="⎪",y="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(h="⎫",p="⎩",v="⎪",y="Size4-Regular");var T=oe(h,y,s),M=T.height+T.depth,q=oe(v,y,s),C=q.height+q.depth,R=oe(p,y,s),F=R.height+R.depth,L=0,O=1;if(c!==null){var P=oe(c,y,s);L=P.height+P.depth,O=2}var G=M+F+L,Y=Math.max(0,Math.ceil((t-G)/(O*C))),U=G+Y*O*C,o0=i.fontMetrics().axisHeight;a&&(o0*=i.sizeMultiplier);var m0=U/2-o0,Q=[];if(b.length>0){var le=U-M-F,x0=Math.round(U*1e3),b0=pa(b,Math.round(le*1e3)),R0=new P0(b,b0),j0=A(x/1e3),Z0=A(x0/1e3),Ze=new C0([R0],{width:j0,height:Z0,viewBox:"0 0 "+x+" "+x0}),I0=G0([],[Ze],i);I0.height=x0/1e3,I0.style.width=j0,I0.style.height=Z0,Q.push({type:"elem",elem:I0})}else{if(Q.push(at(p,y,s)),Q.push(Te),c===null){var N0=U-M-F+2*Bt;Q.push(it(v,N0,i))}else{var ue=(U-M-F-L)/2+2*Bt;Q.push(it(v,ue,i)),Q.push(Te),Q.push(at(c,y,s)),Q.push(Te),Q.push(it(v,ue,i))}Q.push(Te),Q.push(at(h,y,s))}var y0=i.havingBaseStyle(N.TEXT),ve=V({positionType:"bottom",positionData:m0,children:Q});return Gt(k(["delimsizing","mult"],[ve],y0),N.TEXT,i,u)},nt=80,st=.08,lt=function(e,t,a,i,s){var u=fa(e,i,a),h=new P0(e,u),c=new C0([h],{width:"400em",height:A(t),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return G0(["hide-tail"],[c],s)},o4=function(e,t){var a=t.havingBaseSizing(),i=b1("\\surd",e*a.sizeMultiplier,g1,a),s=a.sizeMultiplier,u=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),h,c,v,p,b;return i.type==="small"?(p=1e3+1e3*u+nt,e<1?s=1:e<1.4&&(s=.7),c=(1+u+st)/s,v=(1+u)/s,h=lt("sqrtMain",c,p,u,t),h.style.minWidth="0.853em",b=.833/s):i.type==="large"?(p=(1e3+nt)*he[i.size],v=(he[i.size]+u)/s,c=(he[i.size]+u+st)/s,h=lt("sqrtSize"+i.size,c,p,u,t),h.style.minWidth="1.02em",b=1/s):(c=e+u+st,v=e+u,p=Math.floor(1e3*e+u)+nt,h=lt("sqrtTall",c,p,u,t),h.style.minWidth="0.742em",b=1.056),h.height=v,h.style.height=A(c),{span:h,advanceWidth:b,ruleWidth:(t.fontMetrics().sqrtRuleThickness+u)*s}},f1=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),h4=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),v1=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),he=[0,1.2,1.8,2.4,3],p1=function(e,t,a,i,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),f1.has(e)||v1.has(e))return c1(e,t,!1,a,i,s);if(h4.has(e))return d1(e,he[t],!1,a,i,s);throw new S("Illegal delimiter: '"+e+"'")},m4=[{type:"small",style:N.SCRIPTSCRIPT},{type:"small",style:N.SCRIPT},{type:"small",style:N.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],c4=[{type:"small",style:N.SCRIPTSCRIPT},{type:"small",style:N.SCRIPT},{type:"small",style:N.TEXT},{type:"stack"}],g1=[{type:"small",style:N.SCRIPTSCRIPT},{type:"small",style:N.SCRIPT},{type:"small",style:N.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],d4=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";var t=e.type;throw new Error("Add support for delim type '"+t+"' here.")},b1=function(e,t,a,i){for(var s=Math.min(2,3-i.style.size),u=s;ut)return h}return a[a.length-1]},Ct=function(e,t,a,i,s,u){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var h;v1.has(e)?h=m4:f1.has(e)?h=g1:h=c4;var c=b1(e,t,h,i);return c.type==="small"?n4(e,c.style,a,i,s,u):c.type==="large"?c1(e,c.size,a,i,s,u):d1(e,t,a,i,s,u)},ut=function(e,t,a,i,s,u){var h=i.fontMetrics().axisHeight*i.sizeMultiplier,c=901,v=5/i.fontMetrics().ptPerEm,p=Math.max(t-h,a+h),b=Math.max(p/500*c,2*p-v);return Ct(e,b,!0,i,s,u)},wr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},f4=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function kr(r){return"isMiddle"in r}function Xe(r,e){var t=Ue(r);if(t&&f4.has(t.text))return t;throw t?new S("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",r):new S("Invalid delimiter type '"+r.type+"'",r)}B({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(r,e)=>{var t=Xe(e[0],r);return{type:"delimsizing",mode:r.parser.mode,size:wr[r.funcName].size,mclass:wr[r.funcName].mclass,delim:t.text}},htmlBuilder:(r,e)=>r.delim==="."?k([r.mclass]):p1(r.delim,r.size,e,r.mode,[r.mclass]),mathmlBuilder:r=>{var e=[];r.delim!=="."&&e.push(g0(r.delim,r.mode));var t=new z("mo",e);r.mclass==="mopen"||r.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var a=A(he[r.size]);return t.setAttribute("minsize",a),t.setAttribute("maxsize",a),t}});function Sr(r){if(!r.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}B({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=r.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new S("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:r.parser.mode,delim:Xe(e[0],r).text,color:t}}});B({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Xe(e[0],r),a=r.parser;++a.leftrightDepth;var i=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var s=H(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:i,left:t.text,right:s.delim,rightColor:s.color}},htmlBuilder:(r,e)=>{Sr(r);for(var t=a0(r.body,e,!0,["mopen","mclose"]),a=0,i=0,s=!1,u=0;u{Sr(r);var t=v0(r.body,e);if(r.left!=="."){var a=new z("mo",[g0(r.left,r.mode)]);a.setAttribute("fence","true"),t.unshift(a)}if(r.right!=="."){var i=new z("mo",[g0(r.right,r.mode)]);i.setAttribute("fence","true"),r.rightColor&&i.setAttribute("mathcolor",r.rightColor),t.push(i)}return Ot(t)}});B({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Xe(e[0],r);if(!r.parser.leftrightDepth)throw new S("\\middle without preceding \\left",t);return{type:"middle",mode:r.parser.mode,delim:t.text}},htmlBuilder:(r,e)=>{var t;return r.delim==="."?t=ce(e,[]):(t=p1(r.delim,1,e,r.mode,[]),t.isMiddle={delim:r.delim,options:e}),t},mathmlBuilder:(r,e)=>{var t=r.delim==="\\vert"||r.delim==="|"?g0("|","text"):g0(r.delim,r.mode),a=new z("mo",[t]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Ye=(r,e)=>{var t=re(X(r.body,e),e),a=r.label.slice(1),i=e.sizeMultiplier,s,u,h=D0(r.body);if(a==="sout")s=k(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/i,u=-.5*e.fontMetrics().xHeight;else if(a==="phase"){var c=K({number:.6,unit:"pt"},e),v=K({number:.35,unit:"ex"},e),p=e.havingBaseSizing();i=i/p.sizeMultiplier;var b=t.height+t.depth+c+v;t.style.paddingLeft=A(b/2+c);var x=Math.floor(1e3*b*i),y=ca(x),T=new C0([new P0("phase",y)],{width:"400em",height:A(x/1e3),viewBox:"0 0 400000 "+x,preserveAspectRatio:"xMinYMin slice"});s=G0(["hide-tail"],[T],e),s.style.height=A(b),u=t.depth+c+v}else{/cancel/.test(a)?h||t.classes.push("cancel-pad"):a==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var M,q,C=0;/box/.test(a)?(C=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),M=e.fontMetrics().fboxsep+(a==="colorbox"?0:C),q=M):a==="angl"?(C=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),M=4*C,q=Math.max(0,.25-t.depth)):(M=h?.2:0,q=M),s=Za(t,a,M,q,e),/fbox|boxed|fcolorbox/.test(a)?(s.style.borderStyle="solid",s.style.borderWidth=A(C)):a==="angl"&&C!==.049&&(s.style.borderTopWidth=A(C),s.style.borderRightWidth=A(C)),u=t.depth+q,r.backgroundColor&&(s.style.backgroundColor=r.backgroundColor,r.borderColor&&(s.style.borderColor=r.borderColor))}var R;if(r.backgroundColor)R=V({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:t,shift:0}]});else{var F=/cancel|phase/.test(a)?["svg-align"]:[];R=V({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:u,wrapperClasses:F}]})}return/cancel/.test(a)&&(R.height=t.height,R.depth=t.depth),/cancel/.test(a)&&!h?k(["mord","cancel-lap"],[R],e):k(["mord"],[R],e)},$e=(r,e)=>{var t,a=new z(r.label.includes("colorbox")?"mpadded":"menclose",[$(r.body,e)]);switch(r.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*t+"pt"),a.setAttribute("height","+"+2*t+"pt"),a.setAttribute("lspace",t+"pt"),a.setAttribute("voffset",t+"pt"),r.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);a.setAttribute("style","border: "+A(i)+" solid "+r.borderColor)}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return r.backgroundColor&&a.setAttribute("mathbackground",r.backgroundColor),a};B({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(r,e,t){var{parser:a,funcName:i}=r,s=H(e[0],"color-token").color,u=e[1];return{type:"enclose",mode:a.mode,label:i,backgroundColor:s,body:u}},htmlBuilder:Ye,mathmlBuilder:$e});B({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(r,e,t){var{parser:a,funcName:i}=r,s=H(e[0],"color-token").color,u=H(e[1],"color-token").color,h=e[2];return{type:"enclose",mode:a.mode,label:i,backgroundColor:u,borderColor:s,body:h}},htmlBuilder:Ye,mathmlBuilder:$e});B({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});B({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r,i=e[0];return{type:"enclose",mode:t.mode,label:a,body:i}},htmlBuilder:Ye,mathmlBuilder:$e});B({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var i=e[0];return{type:"enclose",mode:t.mode,label:a,body:i}},htmlBuilder:Ye,mathmlBuilder:$e});B({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var y1={};function S0(r){for(var{type:e,names:t,props:a,handler:i,htmlBuilder:s,mathmlBuilder:u}=r,h={type:e,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c{var e=r.parser.settings;if(!e.displayMode)throw new S("{"+r.envName+"} can be used only in display mode.")},v4=new Set(["gather","gather*"]);function Ut(r){if(!r.includes("ed"))return!r.includes("*")}function V0(r,e,t){var{hskipBeforeAndAfter:a,addJot:i,cols:s,arraystretch:u,colSeparationType:h,autoTag:c,singleRow:v,emptySingleRow:p,maxNumCols:b,leqno:x}=e;if(r.gullet.beginGroup(),v||r.gullet.macros.set("\\cr","\\\\\\relax"),!u){var y=r.gullet.expandMacroAsText("\\arraystretch");if(y==null)u=1;else if(u=parseFloat(y),!u||u<0)throw new S("Invalid \\arraystretch: "+y)}r.gullet.beginGroup();var T=[],M=[T],q=[],C=[],R=c!=null?[]:void 0;function F(){c&&r.gullet.macros.set("\\@eqnsw","1",!0)}function L(){R&&(r.gullet.macros.get("\\df@tag")?(R.push(r.subparse([new c0("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):R.push(!!c&&r.gullet.macros.get("\\@eqnsw")==="1"))}for(F(),C.push(zr(r));;){var O=r.parseExpression(!1,v?"\\end":"\\\\");r.gullet.endGroup(),r.gullet.beginGroup();var P={type:"ordgroup",mode:r.mode,body:O};t&&(P={type:"styling",mode:r.mode,style:t,resetFont:!0,body:[P]}),T.push(P);var G=r.fetch().text;if(G==="&"){if(b&&T.length===b){if(v||h)throw new S("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else if(G==="\\end"){L(),T.length===1&&P.type==="styling"&&P.body.length===1&&P.body[0].type==="ordgroup"&&P.body[0].body.length===0&&(M.length>1||!p)&&M.pop(),C.length0&&(F+=.25),v.push({pos:F,isDashed:ye[xe]})}for(L(u[0]),a=0;a0&&(m0+=R,Gye))for(a=0;a=h)){var J0=void 0;if(i>0||e.hskipBeforeAndAfter){var Kt,Jt;J0=(Kt=(Jt=y0)==null?void 0:Jt.pregap)!=null?Kt:x,J0!==0&&(b0=k(["arraycolsep"],[]),b0.style.width=A(J0),x0.push(b0))}var Qt=[];for(a=0;a0){for(var G1=te("hline",t,p),U1=te("hdashline",t,p),Ke=[{type:"elem",elem:be,shift:0}];v.length>0;){var tr=v.pop(),rr=tr.pos-Q;tr.isDashed?Ke.push({type:"elem",elem:U1,shift:rr}):Ke.push({type:"elem",elem:G1,shift:rr})}be=V({positionType:"individualShift",children:Ke})}if(j0.length===0)return k(["mord"],[be],t);var V1=V({positionType:"individualShift",children:j0}),X1=k(["tag"],[V1],t);return E0([be,X1])},p4={c:"center ",l:"left ",r:"right "},A0=function(e,t){for(var a=[],i=new z("mtd",[],["mtr-glue"]),s=new z("mtd",[],["mml-eqn-num"]),u=0;u0){var T=e.cols,M="",q=!1,C=0,R=T.length;T[0].type==="separator"&&(x+="top ",C=1),T[T.length-1].type==="separator"&&(x+="bottom ",R-=1);for(var F=C;F0?"left ":"",x+=U[U.length-1].length>0?"right ":"";for(var o0=1;o00&&y&&(q=1),a[T]={type:"align",align:M,pregap:q,postgap:0}}return u.colSeparationType=y?"align":"alignat",u};S0({type:"array",names:["array","darray"],props:{numArgs:1},handler(r,e){var t=Ue(e[0]),a=t?[e[0]]:H(e[0],"ordgroup").body,i=a.map(function(u){var h=Ge(u),c=h.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new S("Unknown column alignment: "+c,u)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return V0(r.parser,s,Vt(r.envName))},htmlBuilder:z0,mathmlBuilder:A0});S0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(r){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[r.envName.replace("*","")],t="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(r.envName.charAt(r.envName.length-1)==="*"){var i=r.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),t=i.fetch().text,!"lcr".includes(t))throw new S("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),a.cols=[{type:"align",align:t}]}}var s=V0(r.parser,a,Vt(r.envName)),u=Math.max(0,...s.body.map(h=>h.length));return s.cols=new Array(u).fill({type:"align",align:t}),e?{type:"leftright",mode:r.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:z0,mathmlBuilder:A0});S0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(r){var e={arraystretch:.5},t=V0(r.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:z0,mathmlBuilder:A0});S0({type:"array",names:["subarray"],props:{numArgs:1},handler(r,e){var t=Ue(e[0]),a=t?[e[0]]:H(e[0],"ordgroup").body,i=a.map(function(h){var c=Ge(h),v=c.text;if("lc".includes(v))return{type:"align",align:v};throw new S("Unknown column alignment: "+v,h)});if(i.length>1)throw new S("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5},u=V0(r.parser,s,"script");if(u.body.length>0&&u.body[0].length>1)throw new S("{subarray} can contain only one column");return u},htmlBuilder:z0,mathmlBuilder:A0});S0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(r){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=V0(r.parser,e,Vt(r.envName));return{type:"leftright",mode:r.mode,body:[t],left:r.envName.includes("r")?".":"\\{",right:r.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:z0,mathmlBuilder:A0});S0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:w1,htmlBuilder:z0,mathmlBuilder:A0});S0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(r){v4.has(r.envName)&&We(r);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ut(r.envName),emptySingleRow:!0,leqno:r.parser.settings.leqno};return V0(r.parser,e,"display")},htmlBuilder:z0,mathmlBuilder:A0});S0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:w1,htmlBuilder:z0,mathmlBuilder:A0});S0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(r){We(r);var e={autoTag:Ut(r.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:r.parser.settings.leqno};return V0(r.parser,e,"display")},htmlBuilder:z0,mathmlBuilder:A0});S0({type:"array",names:["CD"],props:{numArgs:0},handler(r){return We(r),a4(r.parser)},htmlBuilder:z0,mathmlBuilder:A0});m("\\nonumber","\\gdef\\@eqnsw{0}");m("\\notag","\\nonumber");B({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(r,e){throw new S(r.funcName+" valid only within array environment")}});var Ar=y1;B({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(r,e){var{parser:t,funcName:a}=r,i=e[0];if(i.type!=="ordgroup")throw new S("Invalid environment name",i);for(var s="",u=0;u{var t=r.font,a=e.withFont(t);return X(r.body,a)},S1=(r,e)=>{var t=r.font,a=e.withFont(t);return $(r.body,a)},Mr={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};B({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,i=Ne(e[0]),s=a;return s in Mr&&(s=Mr[s]),{type:"font",mode:t.mode,font:s.slice(1),body:i}},htmlBuilder:k1,mathmlBuilder:S1});B({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"mclass",mode:t.mode,mclass:Ve(a),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:a}],isCharacterBox:D0(a)}}});B({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a,breakOnTokenText:i}=r,{mode:s}=t,u=t.parseExpression(!0,i);return{type:"font",mode:s,font:"math"+a.slice(1),body:{type:"ordgroup",mode:t.mode,body:u}}},htmlBuilder:k1,mathmlBuilder:S1});var g4=(r,e)=>{var t=e.style,a=t.fracNum(),i=t.fracDen(),s;s=e.havingStyle(a);var u=X(r.numer,s,e);if(r.continued){var h=8.5/e.fontMetrics().ptPerEm,c=3.5/e.fontMetrics().ptPerEm;u.height=u.height0?T=3*x:T=7*x,M=e.fontMetrics().denom1):(b>0?(y=e.fontMetrics().num2,T=x):(y=e.fontMetrics().num3,T=3*x),M=e.fontMetrics().denom2);var q;if(p){var R=e.fontMetrics().axisHeight;y-u.depth-(R+.5*b){var t=new z("mfrac",[$(r.numer,e),$(r.denom,e)]);if(!r.hasBarLine)t.setAttribute("linethickness","0px");else if(r.barSize){var a=K(r.barSize,e);t.setAttribute("linethickness",A(a))}if(r.leftDelim!=null||r.rightDelim!=null){var i=[];if(r.leftDelim!=null){var s=new z("mo",[new e0(r.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}if(i.push(t),r.rightDelim!=null){var u=new z("mo",[new e0(r.rightDelim.replace("\\",""))]);u.setAttribute("fence","true"),i.push(u)}return Ot(i)}return t},z1=(r,e)=>{if(!e)return r;var t={type:"styling",mode:r.mode,style:e,body:[r]};return t};B({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,i=e[0],s=e[1],u,h=null,c=null;switch(a){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":u=!0;break;case"\\\\atopfrac":u=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":u=!1,h="(",c=")";break;case"\\\\bracefrac":u=!1,h="\\{",c="\\}";break;case"\\\\brackfrac":u=!1,h="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var v=a==="\\cfrac",p=null;return v||a.startsWith("\\d")?p="display":a.startsWith("\\t")&&(p="text"),z1({type:"genfrac",mode:t.mode,numer:i,denom:s,continued:v,hasBarLine:u,leftDelim:h,rightDelim:c,barSize:null},p)},htmlBuilder:g4,mathmlBuilder:b4});B({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(r){var{parser:e,funcName:t,token:a}=r,i;switch(t){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:a}}});var Tr=["display","text","script","scriptscript"],Br=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};B({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(r,e){var{parser:t}=r,a=e[4],i=e[5],s=Ne(e[0]),u=s.type==="atom"&&s.family==="open"?Br(s.text):null,h=Ne(e[1]),c=h.type==="atom"&&h.family==="close"?Br(h.text):null,v=H(e[2],"size"),p,b=null;v.isBlank?p=!0:(b=v.value,p=b.number>0);var x=null,y=e[3];if(y.type==="ordgroup"){if(y.body.length>0){var T=H(y.body[0],"textord");x=Tr[Number(T.text)]}}else y=H(y,"textord"),x=Tr[Number(y.text)];return z1({type:"genfrac",mode:t.mode,numer:a,denom:i,continued:!1,hasBarLine:p,barSize:b,leftDelim:u,rightDelim:c},x)}});B({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(r,e){var{parser:t,funcName:a,token:i}=r;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:H(e[0],"size").value,token:i}}});B({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(r,e)=>{var{parser:t,funcName:a}=r,i=e[0],s=H(e[1],"infix").size;if(!s)throw new Error("\\\\abovefrac expected size, but got "+String(s));var u=e[2],h=s.number>0;return{type:"genfrac",mode:t.mode,numer:i,denom:u,continued:!1,hasBarLine:h,barSize:s,leftDelim:null,rightDelim:null}}});var A1=(r,e)=>{var t=e.style,a,i;r.type==="supsub"?(a=r.sup?X(r.sup,e.havingStyle(t.sup()),e):X(r.sub,e.havingStyle(t.sub()),e),i=H(r.base,"horizBrace")):i=H(r,"horizBrace");var s=X(i.base,e.havingBaseStyle(N.DISPLAY)),u=Pe(i,e),h;if(i.isOver?h=V({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:u,wrapperClasses:["svg-align"]}]}):h=V({positionType:"bottom",positionData:s.depth+.1+u.height,children:[{type:"elem",elem:u,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:s}]}),a){var c=k(["minner",i.isOver?"mover":"munder"],[h],e);i.isOver?h=V({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:a}]}):h=V({positionType:"bottom",positionData:c.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:c}]})}return k(["minner",i.isOver?"mover":"munder"],[h],e)},y4=(r,e)=>{var t=Le(r.label);return new z(r.isOver?"mover":"munder",[$(r.base,e),t])};B({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"horizBrace",mode:t.mode,label:a,isOver:a.includes("\\over"),base:e[0]}},htmlBuilder:A1,mathmlBuilder:y4});B({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[1],i=H(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:t.mode,href:i,body:_(a)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(r,e)=>{var t=a0(r.body,e,!1);return Ea(r.href,[],t,e)},mathmlBuilder:(r,e)=>{var t=U0(r.body,e);return t instanceof z||(t=new z("mrow",[t])),t.setAttribute("href",r.href),t}});B({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=H(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:a}))return t.formatUnsupportedCmd("\\url");for(var i=[],s=0;s{var{parser:t,funcName:a,token:i}=r,s=H(e[0],"raw").string,u=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h,c={};switch(a){case"\\htmlClass":c.class=s,h={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,h={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,h={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var v=s.split(","),p=0;p{var t=a0(r.body,e,!1),a=["enclosing"];r.attributes.class&&a.push(...r.attributes.class.trim().split(/\s+/));var i=k(a,t,e);for(var s in r.attributes)s!=="class"&&r.attributes.hasOwnProperty(s)&&i.setAttribute(s,r.attributes[s]);return i},mathmlBuilder:(r,e)=>U0(r.body,e)});B({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"htmlmathml",mode:t.mode,html:_(e[0]),mathml:_(e[1])}},htmlBuilder:(r,e)=>{var t=a0(r.html,e,!1);return E0(t)},mathmlBuilder:(r,e)=>U0(r.mathml,e)});var ot=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new S("Invalid size: '"+e+"' in \\includegraphics");var a={number:+(t[1]+t[2]),unit:t[3]};if(!Ur(a))throw new S("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};B({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(r,e,t)=>{var{parser:a}=r,i={number:0,unit:"em"},s={number:.9,unit:"em"},u={number:0,unit:"em"},h="";if(t[0])for(var c=H(t[0],"raw").string,v=c.split(","),p=0;p{var t=K(r.height,e),a=0;r.totalheight.number>0&&(a=K(r.totalheight,e)-t);var i=0;r.width.number>0&&(i=K(r.width,e));var s={height:A(t+a)};i>0&&(s.width=A(i)),a>0&&(s.verticalAlign=A(-a));var u=new xa(r.src,r.alt,s);return u.height=t,u.depth=a,u},mathmlBuilder:(r,e)=>{var t=new z("mglyph",[]);t.setAttribute("alt",r.alt);var a=K(r.height,e),i=0;if(r.totalheight.number>0&&(i=K(r.totalheight,e)-a,t.setAttribute("valign",A(-i))),t.setAttribute("height",A(a+i)),r.width.number>0){var s=K(r.width,e);t.setAttribute("width",A(s))}return t.setAttribute("src",r.src),t}});B({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,i=H(e[0],"size");if(t.settings.strict){var s=a[1]==="m",u=i.value.unit==="mu";s?(u||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+i.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):u&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:i.value}},htmlBuilder(r,e){return jr(r.dimension,e)},mathmlBuilder(r,e){var t=K(r.dimension,e);return new e1(t)}});B({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,i=e[0];return{type:"lap",mode:t.mode,alignment:a.slice(5),body:i}},htmlBuilder:(r,e)=>{var t;r.alignment==="clap"?(t=k([],[X(r.body,e)]),t=k(["inner"],[t],e)):t=k(["inner"],[X(r.body,e)]);var a=k(["fix"],[]),i=k([r.alignment],[t,a],e),s=k(["strut"]);return s.style.height=A(i.height+i.depth),i.depth&&(s.style.verticalAlign=A(-i.depth)),i.children.unshift(s),i=k(["thinbox"],[i],e),k(["mord","vbox"],[i],e)},mathmlBuilder:(r,e)=>{var t=new z("mpadded",[$(r.body,e)]);if(r.alignment!=="rlap"){var a=r.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",a+"width")}return t.setAttribute("width","0px"),t}});B({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){var{funcName:t,parser:a}=r,i=a.mode;a.switchMode("math");var s=t==="\\("?"\\)":"$",u=a.parseExpression(!1,s);return a.expect(s),a.switchMode(i),{type:"styling",mode:a.mode,style:"text",resetFont:!0,body:u}}});B({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){throw new S("Mismatched "+r.funcName)}});var Cr=(r,e)=>{switch(e.style.size){case N.DISPLAY.size:return r.display;case N.TEXT.size:return r.text;case N.SCRIPT.size:return r.script;case N.SCRIPTSCRIPT.size:return r.scriptscript;default:return r.text}};B({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"mathchoice",mode:t.mode,display:_(e[0]),text:_(e[1]),script:_(e[2]),scriptscript:_(e[3])}},htmlBuilder:(r,e)=>{var t=Cr(r,e),a=a0(t,e,!1);return E0(a)},mathmlBuilder:(r,e)=>{var t=Cr(r,e);return U0(t,e)}});var M1=(r,e,t,a,i,s,u)=>{r=k([],[r]);var h=t&&D0(t),c,v;if(e){var p=X(e,a.havingStyle(i.sup()),a);v={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-p.depth)}}if(t){var b=X(t,a.havingStyle(i.sub()),a);c={elem:b,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-b.height)}}var x;if(v&&c){var y=a.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+r.depth+u;x=V({positionType:"bottom",positionData:y,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:A(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:A(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(c){var T=r.height-u;x=V({positionType:"top",positionData:T,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:A(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r}]})}else if(v){var M=r.depth+u;x=V({positionType:"bottom",positionData:M,children:[{type:"elem",elem:r},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:A(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else return r;var q=[x];if(c&&s!==0&&!h){var C=k(["mspace"],[],a);C.style.marginRight=A(s),q.unshift(C)}return k(["mop","op-limits"],q,a)},T1=new Set(["\\smallint"]),se=(r,e)=>{var t,a,i=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=H(r.base,"op"),i=!0):s=H(r,"op");var u=e.style,h=!1;u.size===N.DISPLAY.size&&s.symbol&&!T1.has(s.name)&&(h=!0);var c,v;if(s.symbol){var p=h?"Size2-Regular":"Size1-Regular",b="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(b=s.name.slice(1),s.name=b==="oiint"?"\\iint":"\\iiint"),c=s0(s.name,p,"math",e,["mop","op-symbol",h?"large-op":"small-op"]),v=c.italic,b.length>0){var x=Kr(b+"Size"+(h?"2":"1"),e);c=V({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:x,shift:h?.08:0}]}),s.name="\\"+b,c.classes.unshift("mop"),c.italic=v}}else if(s.body){var y=a0(s.body,e,!0);y.length===1&&y[0]instanceof d0?(c=y[0],c.classes[0]="mop"):c=k(["mop"],y,e)}else{for(var T=[],M=1;M{var t;if(r.symbol)t=new z("mo",[g0(r.name,r.mode)]),T1.has(r.name)&&t.setAttribute("largeop","false");else if(r.body)t=new z("mo",v0(r.body,e));else{t=new z("mi",[new e0(r.name.slice(1))]);var a=new z("mo",[g0("⁡","text")]);r.parentIsSupSub?t=new z("mrow",[t,a]):t=_r([t,a])}return t},x4={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};B({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(r,e)=>{var{parser:t,funcName:a}=r,i=a;return i.length===1&&(i=x4[i]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:se,mathmlBuilder:fe});B({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:_(a)}},htmlBuilder:se,mathmlBuilder:fe});var w4={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};B({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:se,mathmlBuilder:fe});B({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:se,mathmlBuilder:fe});B({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(r){var{parser:e,funcName:t}=r,a=t;return a.length===1&&(a=w4[a]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:se,mathmlBuilder:fe});var B1=(r,e)=>{var t,a,i=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=H(r.base,"operatorname"),i=!0):s=H(r,"operatorname");var u;if(s.body.length>0){for(var h=s.body.map(b=>{var x="text"in b?b.text:void 0;return typeof x=="string"?{type:"textord",mode:b.mode,text:x}:b}),c=a0(h,e.withFont("mathrm"),!0),v=0;v{for(var t=v0(r.body,e.withFont("mathrm")),a=!0,i=0;ip.toText()).join("");t=[new e0(h)]}var c=new z("mi",t);c.setAttribute("mathvariant","normal");var v=new z("mo",[g0("⁡","text")]);return r.parentIsSupSub?new z("mrow",[c,v]):_r([c,v])};B({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,i=e[0];return{type:"operatorname",mode:t.mode,body:_(i),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:B1,mathmlBuilder:k4});m("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");W0({type:"ordgroup",htmlBuilder(r,e){return r.semisimple?E0(a0(r.body,e,!1)):k(["mord"],a0(r.body,e,!0),e)},mathmlBuilder(r,e){return U0(r.body,e,!0)}});B({type:"overline",names:["\\overline"],props:{numArgs:1},handler(r,e){var{parser:t}=r,a=e[0];return{type:"overline",mode:t.mode,body:a}},htmlBuilder(r,e){var t=X(r.body,e.havingCrampedStyle()),a=te("overline-line",e),i=e.fontMetrics().defaultRuleThickness,s=V({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*i},{type:"elem",elem:a},{type:"kern",size:i}]});return k(["mord","overline"],[s],e)},mathmlBuilder(r,e){var t=new z("mo",[new e0("‾")]);t.setAttribute("stretchy","true");var a=new z("mover",[$(r.body,e),t]);return a.setAttribute("accent","true"),a}});B({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"phantom",mode:t.mode,body:_(a)}},htmlBuilder:(r,e)=>{var t=a0(r.body,e.withPhantom(),!1);return E0(t)},mathmlBuilder:(r,e)=>{var t=v0(r.body,e);return new z("mphantom",t)}});m("\\hphantom","\\smash{\\phantom{#1}}");B({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"vphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=k(["inner"],[X(r.body,e.withPhantom())]),a=k(["fix"],[]);return k(["mord","rlap"],[t,a],e)},mathmlBuilder:(r,e)=>{var t=v0(_(r.body),e),a=new z("mphantom",t),i=new z("mpadded",[a]);return i.setAttribute("width","0px"),i}});B({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r,a=H(e[0],"size").value,i=e[1];return{type:"raisebox",mode:t.mode,dy:a,body:i}},htmlBuilder(r,e){var t=X(r.body,e),a=K(r.dy,e);return V({positionType:"shift",positionData:-a,children:[{type:"elem",elem:t}]})},mathmlBuilder(r,e){var t=new z("mpadded",[$(r.body,e)]),a=r.dy.number+r.dy.unit;return t.setAttribute("voffset",a),t}});B({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(r){var{parser:e}=r;return{type:"internal",mode:e.mode}}});B({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(r,e,t){var{parser:a}=r,i=t[0],s=H(e[0],"size"),u=H(e[1],"size");return{type:"rule",mode:a.mode,shift:i&&H(i,"size").value,width:s.value,height:u.value}},htmlBuilder(r,e){var t=k(["mord","rule"],[],e),a=K(r.width,e),i=K(r.height,e),s=r.shift?K(r.shift,e):0;return t.style.borderRightWidth=A(a),t.style.borderTopWidth=A(i),t.style.bottom=A(s),t.width=a,t.height=i+s,t.depth=-s,t.maxFontSize=i*1.125*e.sizeMultiplier,t},mathmlBuilder(r,e){var t=K(r.width,e),a=K(r.height,e),i=r.shift?K(r.shift,e):0,s=e.color&&e.getColor()||"black",u=new z("mspace");u.setAttribute("mathbackground",s),u.setAttribute("width",A(t)),u.setAttribute("height",A(a));var h=new z("mpadded",[u]);return i>=0?h.setAttribute("height",A(i)):(h.setAttribute("height",A(i)),h.setAttribute("depth",A(-i))),h.setAttribute("voffset",A(i)),h}});function C1(r,e,t){for(var a=a0(r,e,!1),i=e.sizeMultiplier/t.sizeMultiplier,s=0;s{var t=e.havingSize(r.size);return C1(r.body,t,e)};B({type:"sizing",names:Dr,props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{breakOnTokenText:t,funcName:a,parser:i}=r,s=i.parseExpression(!1,t);return{type:"sizing",mode:i.mode,size:Dr.indexOf(a)+1,body:s}},htmlBuilder:S4,mathmlBuilder:(r,e)=>{var t=e.havingSize(r.size),a=v0(r.body,t),i=new z("mstyle",a);return i.setAttribute("mathsize",A(t.sizeMultiplier)),i}});B({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(r,e,t)=>{var{parser:a}=r,i=!1,s=!1,u=t[0]&&H(t[0],"ordgroup");if(u)for(var h,c=0;c{var t=k([],[X(r.body,e)]);if(!r.smashHeight&&!r.smashDepth)return t;if(r.smashHeight&&(t.height=0),r.smashDepth&&(t.depth=0),r.smashHeight&&r.smashDepth)return k(["mord","smash"],[t],e);if(t.children)for(var a=0;a{var t=new z("mpadded",[$(r.body,e)]);return r.smashHeight&&t.setAttribute("height","0px"),r.smashDepth&&t.setAttribute("depth","0px"),t}});B({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a}=r,i=t[0],s=e[0];return{type:"sqrt",mode:a.mode,body:s,index:i}},htmlBuilder(r,e){var t=X(r.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=re(t,e);var a=e.fontMetrics(),i=a.defaultRuleThickness,s=i;e.style.idt.height+t.depth+u&&(u=(u+b-t.height-t.depth)/2);var x=c.height-t.height-u-v;t.style.paddingLeft=A(p);var y=V({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+x)},{type:"elem",elem:c},{type:"kern",size:v}]});if(r.index){var T=e.havingStyle(N.SCRIPTSCRIPT),M=X(r.index,T,e),q=.6*(y.height-y.depth),C=V({positionType:"shift",positionData:-q,children:[{type:"elem",elem:M}]}),R=k(["root"],[C]);return k(["mord","sqrt"],[R,y],e)}else return k(["mord","sqrt"],[y],e)},mathmlBuilder(r,e){var{body:t,index:a}=r;return a?new z("mroot",[$(t,e),$(a,e)]):new z("msqrt",[$(t,e)])}});var Dt={display:N.DISPLAY,text:N.TEXT,script:N.SCRIPT,scriptscript:N.SCRIPTSCRIPT};function z4(r){return r in Dt}B({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r,e){var{breakOnTokenText:t,funcName:a,parser:i}=r,s=i.parseExpression(!0,t),u=a.slice(1,a.length-5);if(!z4(u))throw new Error("Unknown style: "+u);return{type:"styling",mode:i.mode,style:u,body:s}},htmlBuilder(r,e){var t=Dt[r.style],a=e.havingStyle(t);return r.resetFont&&(a=a.withFont("")),C1(r.body,a,e)},mathmlBuilder(r,e){var t=Dt[r.style],a=e.havingStyle(t);r.resetFont&&(a=a.withFont(""));var i=v0(r.body,a),s=new z("mstyle",i),u={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},h=u[r.style];return s.setAttribute("scriptlevel",h[0]),s.setAttribute("displaystyle",h[1]),s}});var A4=function(e,t){var a=e.base;if(a)if(a.type==="op"){var i=a.limits&&(t.style.size===N.DISPLAY.size||a.alwaysHandleSupSub);return i?se:null}else if(a.type==="operatorname"){var s=a.alwaysHandleSupSub&&(t.style.size===N.DISPLAY.size||a.limits);return s?B1:null}else{if(a.type==="accent")return D0(a.base)?Pt:null;if(a.type==="horizBrace"){var u=!e.sub;return u===a.isOver?A1:null}else return null}else return null};W0({type:"supsub",htmlBuilder(r,e){var t=A4(r,e);if(t)return t(r,e);var{base:a,sup:i,sub:s}=r,u=X(a,e),h,c,v=e.fontMetrics(),p=0,b=0,x=a&&D0(a);if(i){var y=e.havingStyle(e.style.sup());h=X(i,y,e),x||(p=u.height-y.fontMetrics().supDrop*y.sizeMultiplier/e.sizeMultiplier)}if(s){var T=e.havingStyle(e.style.sub());c=X(s,T,e),x||(b=u.depth+T.fontMetrics().subDrop*T.sizeMultiplier/e.sizeMultiplier)}var M;e.style===N.DISPLAY?M=v.sup1:e.style.cramped?M=v.sup3:M=v.sup2;var q=e.sizeMultiplier,C=A(.5/v.ptPerEm/q),R=null;if(c){var F=r.base&&r.base.type==="op"&&r.base.name&&(r.base.name==="\\oiint"||r.base.name==="\\oiiint");if(u instanceof d0||F){var L;R=A(-((L=u.italic)!=null?L:0))}}var O;if(h&&c){p=Math.max(p,M,h.depth+.25*v.xHeight),b=Math.max(b,v.sub2);var P=v.defaultRuleThickness,G=4*P;if(p-h.depth-(c.height-b)0&&(p+=Y,b-=Y)}var U=[{type:"elem",elem:c,shift:b,marginRight:C,marginLeft:R},{type:"elem",elem:h,shift:-p,marginRight:C}];O=V({positionType:"individualShift",children:U})}else if(c){b=Math.max(b,v.sub1,c.height-.8*v.xHeight);var o0=[{type:"elem",elem:c,marginLeft:R,marginRight:C}];O=V({positionType:"shift",positionData:b,children:o0})}else if(h)p=Math.max(p,M,h.depth+.25*v.xHeight),O=V({positionType:"shift",positionData:-p,children:[{type:"elem",elem:h,marginRight:C}]});else throw new Error("supsub must have either sup or sub.");var m0=At(u,"right")||"mord";return k([m0],[u,k(["msupsub"],[O])],e)},mathmlBuilder(r,e){var t=!1,a,i;r.base&&r.base.type==="horizBrace"&&(i=!!r.sup,i===r.base.isOver&&(t=!0,a=r.base.isOver)),r.base&&(r.base.type==="op"||r.base.type==="operatorname")&&(r.base.parentIsSupSub=!0);var s=[$(r.base,e)];r.sub&&s.push($(r.sub,e)),r.sup&&s.push($(r.sup,e));var u;if(t)u=a?"mover":"munder";else if(r.sub)if(r.sup){var v=r.base;v&&v.type==="op"&&v.limits&&e.style===N.DISPLAY||v&&v.type==="operatorname"&&v.alwaysHandleSupSub&&(e.style===N.DISPLAY||v.limits)?u="munderover":u="msubsup"}else{var c=r.base;c&&c.type==="op"&&c.limits&&(e.style===N.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===N.DISPLAY)?u="munder":u="msub"}else{var h=r.base;h&&h.type==="op"&&h.limits&&(e.style===N.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||e.style===N.DISPLAY)?u="mover":u="msup"}return new z(u,s)}});W0({type:"atom",htmlBuilder(r,e){return Ft(r.text,r.mode,e,["m"+r.family])},mathmlBuilder(r,e){var t=new z("mo",[g0(r.text,r.mode)]);if(r.family==="bin"){var a=Lt(r,e);a==="bold-italic"&&t.setAttribute("mathvariant",a)}else r.family==="punct"?t.setAttribute("separator","true"):(r.family==="open"||r.family==="close")&&t.setAttribute("stretchy","false");return t}});var D1={mi:"italic",mn:"normal",mtext:"normal"};W0({type:"mathord",htmlBuilder(r,e){return Oe(r,e,"mathord")},mathmlBuilder(r,e){var t=new z("mi",[g0(r.text,r.mode,e)]),a=Lt(r,e)||"italic";return a!==D1[t.type]&&t.setAttribute("mathvariant",a),t}});W0({type:"textord",htmlBuilder(r,e){return Oe(r,e,"textord")},mathmlBuilder(r,e){var t=g0(r.text,r.mode,e),a=Lt(r,e)||"normal",i;return r.mode==="text"?i=new z("mtext",[t]):/[0-9]/.test(r.text)?i=new z("mn",[t]):r.text==="\\prime"?i=new z("mo",[t]):i=new z("mi",[t]),a!==D1[i.type]&&i.setAttribute("mathvariant",a),i}});var ht={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},mt={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};W0({type:"spacing",htmlBuilder(r,e){if(mt.hasOwnProperty(r.text)){var t=mt[r.text].className||"";if(r.mode==="text"){var a=Oe(r,e,"textord");return a.classes.push(t),a}else return k(["mspace",t],[Ft(r.text,r.mode,e)],e)}else{if(ht.hasOwnProperty(r.text))return k(["mspace",ht[r.text]],[],e);throw new S('Unknown type of space "'+r.text+'"')}},mathmlBuilder(r,e){var t;if(mt.hasOwnProperty(r.text))t=new z("mtext",[new e0(" ")]);else{if(ht.hasOwnProperty(r.text))return new z("mspace");throw new S('Unknown type of space "'+r.text+'"')}return t}});var qr=()=>{var r=new z("mtd",[]);return r.setAttribute("width","50%"),r};W0({type:"tag",mathmlBuilder(r,e){var t=new z("mtable",[new z("mtr",[qr(),new z("mtd",[U0(r.body,e)]),qr(),new z("mtd",[U0(r.tag,e)])])]);return t.setAttribute("width","100%"),t}});var Er={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Rr={"\\textbf":"textbf","\\textmd":"textmd"},M4={"\\textit":"textit","\\textup":"textup"},Ir=(r,e)=>{var t=r.font;if(t){if(Er[t])return e.withTextFontFamily(Er[t]);if(Rr[t])return e.withTextFontWeight(Rr[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(M4[t])};B({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,i=e[0];return{type:"text",mode:t.mode,body:_(i),font:a}},htmlBuilder(r,e){var t=Ir(r,e),a=a0(r.body,t,!0);return k(["mord","text"],a,t)},mathmlBuilder(r,e){var t=Ir(r,e);return U0(r.body,t)}});B({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=X(r.body,e),a=te("underline-line",e),i=e.fontMetrics().defaultRuleThickness,s=V({positionType:"top",positionData:t.height,children:[{type:"kern",size:i},{type:"elem",elem:a},{type:"kern",size:3*i},{type:"elem",elem:t}]});return k(["mord","underline"],[s],e)},mathmlBuilder(r,e){var t=new z("mo",[new e0("‾")]);t.setAttribute("stretchy","true");var a=new z("munder",[$(r.body,e),t]);return a.setAttribute("accentunder","true"),a}});B({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=X(r.body,e),a=e.fontMetrics().axisHeight,i=.5*(t.height-a-(t.depth+a));return V({positionType:"shift",positionData:i,children:[{type:"elem",elem:t}]})},mathmlBuilder(r,e){var t=new z("mpadded",[$(r.body,e)],["vcenter"]);return new z("mrow",[t])}});B({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(r,e,t){throw new S("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){for(var t=Nr(r),a=[],i=e.havingStyle(e.style.text()),s=0;sr.body.replace(/ /g,r.star?"␣":" "),O0=Jr,q1=`[ \r + ]`,T4="\\\\[a-zA-Z@]+",B4="\\\\[^\uD800-\uDFFF]",C4="("+T4+")"+q1+"*",D4=`\\\\( +|[ \r ]+ +?)[ \r ]*`,qt="[̀-ͯ]",q4=new RegExp(qt+"+$"),E4="("+q1+"+)|"+(D4+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(qt+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(qt+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+C4)+("|"+B4+")");class Fr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(E4,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new c0("EOF",new h0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new S("Unexpected character: '"+e[t]+"'",new c0(e[t],new h0(this,t,t+1)));var i=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[i]===14){var s=e.indexOf(` +`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new c0(i,new h0(this,t,this.tokenRegex.lastIndex))}}class R4{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new S("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var I4=x1;m("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});m("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});m("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});m("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});m("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});m("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");m("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Hr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};m("\\char",function(r){var e=r.popToken(),t,a=0;if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new S("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=Hr[e.text],a==null||a>=t)throw new S("Invalid base-"+t+" digit "+e.text);for(var i;(i=Hr[r.future().text])!=null&&i{var i=r.consumeArg().tokens;if(i.length!==1)throw new S("\\newcommand's first argument must be a macro name");var s=i[0].text,u=r.isDefined(s);if(u&&!e)throw new S("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!u&&!t)throw new S("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var h=0;if(i=r.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var c="",v=r.expandNextToken();v.text!=="]"&&v.text!=="EOF";)c+=v.text,v=r.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new S("Invalid number of arguments: "+c);h=parseInt(c),i=r.consumeArg().tokens}return u&&a||r.macros.set(s,{tokens:i,numArgs:h}),""};m("\\newcommand",r=>Xt(r,!1,!0,!1));m("\\renewcommand",r=>Xt(r,!0,!1,!1));m("\\providecommand",r=>Xt(r,!0,!0,!0));m("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});m("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});m("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),O0[t],W.math[t],W.text[t]),""});m("\\bgroup","{");m("\\egroup","}");m("~","\\nobreakspace");m("\\lq","`");m("\\rq","'");m("\\aa","\\r a");m("\\AA","\\r A");m("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");m("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");m("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");m("ℬ","\\mathscr{B}");m("ℰ","\\mathscr{E}");m("ℱ","\\mathscr{F}");m("ℋ","\\mathscr{H}");m("ℐ","\\mathscr{I}");m("ℒ","\\mathscr{L}");m("ℳ","\\mathscr{M}");m("ℛ","\\mathscr{R}");m("ℭ","\\mathfrak{C}");m("ℌ","\\mathfrak{H}");m("ℨ","\\mathfrak{Z}");m("\\Bbbk","\\Bbb{k}");m("\\llap","\\mathllap{\\textrm{#1}}");m("\\rlap","\\mathrlap{\\textrm{#1}}");m("\\clap","\\mathclap{\\textrm{#1}}");m("\\mathstrut","\\vphantom{(}");m("\\underbar","\\underline{\\text{#1}}");m("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');m("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");m("\\ne","\\neq");m("≠","\\neq");m("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");m("∉","\\notin");m("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");m("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");m("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");m("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");m("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");m("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");m("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");m("⟂","\\perp");m("‼","\\mathclose{!\\mkern-0.8mu!}");m("∌","\\notni");m("⌜","\\ulcorner");m("⌝","\\urcorner");m("⌞","\\llcorner");m("⌟","\\lrcorner");m("©","\\copyright");m("®","\\textregistered");m("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');m("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');m("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');m("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');m("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");m("⋮","\\vdots");m("\\varGamma","\\mathit{\\Gamma}");m("\\varDelta","\\mathit{\\Delta}");m("\\varTheta","\\mathit{\\Theta}");m("\\varLambda","\\mathit{\\Lambda}");m("\\varXi","\\mathit{\\Xi}");m("\\varPi","\\mathit{\\Pi}");m("\\varSigma","\\mathit{\\Sigma}");m("\\varUpsilon","\\mathit{\\Upsilon}");m("\\varPhi","\\mathit{\\Phi}");m("\\varPsi","\\mathit{\\Psi}");m("\\varOmega","\\mathit{\\Omega}");m("\\substack","\\begin{subarray}{c}#1\\end{subarray}");m("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");m("\\boxed","\\fbox{$\\displaystyle{#1}$}");m("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");m("\\implies","\\DOTSB\\;\\Longrightarrow\\;");m("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");m("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");m("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Or={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},N4=new Set(["bin","rel"]);m("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in Or?e=Or[t]:(t.slice(0,4)==="\\not"||t in W.math&&N4.has(W.math[t].group))&&(e="\\dotsb"),e});var Yt={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};m("\\dotso",function(r){var e=r.future().text;return e in Yt?"\\ldots\\,":"\\ldots"});m("\\dotsc",function(r){var e=r.future().text;return e in Yt&&e!==","?"\\ldots\\,":"\\ldots"});m("\\cdots",function(r){var e=r.future().text;return e in Yt?"\\@cdots\\,":"\\@cdots"});m("\\dotsb","\\cdots");m("\\dotsm","\\cdots");m("\\dotsi","\\!\\cdots");m("\\dotsx","\\ldots\\,");m("\\DOTSI","\\relax");m("\\DOTSB","\\relax");m("\\DOTSX","\\relax");m("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");m("\\,","\\tmspace+{3mu}{.1667em}");m("\\thinspace","\\,");m("\\>","\\mskip{4mu}");m("\\:","\\tmspace+{4mu}{.2222em}");m("\\medspace","\\:");m("\\;","\\tmspace+{5mu}{.2777em}");m("\\thickspace","\\;");m("\\!","\\tmspace-{3mu}{.1667em}");m("\\negthinspace","\\!");m("\\negmedspace","\\tmspace-{4mu}{.2222em}");m("\\negthickspace","\\tmspace-{5mu}{.277em}");m("\\enspace","\\kern.5em ");m("\\enskip","\\hskip.5em\\relax");m("\\quad","\\hskip1em\\relax");m("\\qquad","\\hskip2em\\relax");m("\\tag","\\@ifstar\\tag@literal\\tag@paren");m("\\tag@paren","\\tag@literal{({#1})}");m("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new S("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});m("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");m("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");m("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");m("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");m("\\newline","\\\\\\relax");m("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var E1=A(k0["Main-Regular"][84][1]-.7*k0["Main-Regular"][65][1]);m("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+E1+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");m("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+E1+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");m("\\hspace","\\@ifstar\\@hspacer\\@hspace");m("\\@hspace","\\hskip #1\\relax");m("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");m("\\ordinarycolon",":");m("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");m("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');m("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');m("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');m("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');m("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');m("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');m("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');m("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');m("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');m("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');m("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');m("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');m("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');m("∷","\\dblcolon");m("∹","\\eqcolon");m("≔","\\coloneqq");m("≕","\\eqqcolon");m("⩴","\\Coloneqq");m("\\ratio","\\vcentcolon");m("\\coloncolon","\\dblcolon");m("\\colonequals","\\coloneqq");m("\\coloncolonequals","\\Coloneqq");m("\\equalscolon","\\eqqcolon");m("\\equalscoloncolon","\\Eqqcolon");m("\\colonminus","\\coloneq");m("\\coloncolonminus","\\Coloneq");m("\\minuscolon","\\eqcolon");m("\\minuscoloncolon","\\Eqcolon");m("\\coloncolonapprox","\\Colonapprox");m("\\coloncolonsim","\\Colonsim");m("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");m("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");m("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");m("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");m("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");m("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");m("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");m("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");m("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");m("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");m("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");m("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");m("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");m("\\nleqq","\\html@mathml{\\@nleqq}{≰}");m("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");m("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");m("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");m("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");m("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");m("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");m("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");m("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");m("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");m("\\imath","\\html@mathml{\\@imath}{ı}");m("\\jmath","\\html@mathml{\\@jmath}{ȷ}");m("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");m("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");m("⟦","\\llbracket");m("⟧","\\rrbracket");m("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");m("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");m("⦃","\\lBrace");m("⦄","\\rBrace");m("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");m("⦵","\\minuso");m("\\darr","\\downarrow");m("\\dArr","\\Downarrow");m("\\Darr","\\Downarrow");m("\\lang","\\langle");m("\\rang","\\rangle");m("\\uarr","\\uparrow");m("\\uArr","\\Uparrow");m("\\Uarr","\\Uparrow");m("\\N","\\mathbb{N}");m("\\R","\\mathbb{R}");m("\\Z","\\mathbb{Z}");m("\\alef","\\aleph");m("\\alefsym","\\aleph");m("\\Alpha","\\mathrm{A}");m("\\Beta","\\mathrm{B}");m("\\bull","\\bullet");m("\\Chi","\\mathrm{X}");m("\\clubs","\\clubsuit");m("\\cnums","\\mathbb{C}");m("\\Complex","\\mathbb{C}");m("\\Dagger","\\ddagger");m("\\diamonds","\\diamondsuit");m("\\empty","\\emptyset");m("\\Epsilon","\\mathrm{E}");m("\\Eta","\\mathrm{H}");m("\\exist","\\exists");m("\\harr","\\leftrightarrow");m("\\hArr","\\Leftrightarrow");m("\\Harr","\\Leftrightarrow");m("\\hearts","\\heartsuit");m("\\image","\\Im");m("\\infin","\\infty");m("\\Iota","\\mathrm{I}");m("\\isin","\\in");m("\\Kappa","\\mathrm{K}");m("\\larr","\\leftarrow");m("\\lArr","\\Leftarrow");m("\\Larr","\\Leftarrow");m("\\lrarr","\\leftrightarrow");m("\\lrArr","\\Leftrightarrow");m("\\Lrarr","\\Leftrightarrow");m("\\Mu","\\mathrm{M}");m("\\natnums","\\mathbb{N}");m("\\Nu","\\mathrm{N}");m("\\Omicron","\\mathrm{O}");m("\\plusmn","\\pm");m("\\rarr","\\rightarrow");m("\\rArr","\\Rightarrow");m("\\Rarr","\\Rightarrow");m("\\real","\\Re");m("\\reals","\\mathbb{R}");m("\\Reals","\\mathbb{R}");m("\\Rho","\\mathrm{P}");m("\\sdot","\\cdot");m("\\sect","\\S");m("\\spades","\\spadesuit");m("\\sub","\\subset");m("\\sube","\\subseteq");m("\\supe","\\supseteq");m("\\Tau","\\mathrm{T}");m("\\thetasym","\\vartheta");m("\\weierp","\\wp");m("\\Zeta","\\mathrm{Z}");m("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");m("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");m("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");m("\\bra","\\mathinner{\\langle{#1}|}");m("\\ket","\\mathinner{|{#1}\\rangle}");m("\\braket","\\mathinner{\\langle{#1}\\rangle}");m("\\Bra","\\left\\langle#1\\right|");m("\\Ket","\\left|#1\\right\\rangle");var R1=r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,i=e.consumeArg().tokens,s=e.consumeArg().tokens,u=e.macros.get("|"),h=e.macros.get("\\|");e.macros.beginGroup();var c=b=>x=>{r&&(x.macros.set("|",u),i.length&&x.macros.set("\\|",h));var y=b;if(!b&&i.length){var T=x.future();T.text==="|"&&(x.popToken(),y=!0)}return{tokens:y?i:a,numArgs:0}};e.macros.set("|",c(!1)),i.length&&e.macros.set("\\|",c(!0));var v=e.consumeArg().tokens,p=e.expandTokens([...s,...v,...t]);return e.macros.endGroup(),{tokens:p.reverse(),numArgs:0}};m("\\bra@ket",R1(!1));m("\\bra@set",R1(!0));m("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");m("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");m("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");m("\\angln","{\\angl n}");m("\\blue","\\textcolor{##6495ed}{#1}");m("\\orange","\\textcolor{##ffa500}{#1}");m("\\pink","\\textcolor{##ff00af}{#1}");m("\\red","\\textcolor{##df0030}{#1}");m("\\green","\\textcolor{##28ae7b}{#1}");m("\\gray","\\textcolor{gray}{#1}");m("\\purple","\\textcolor{##9d38bd}{#1}");m("\\blueA","\\textcolor{##ccfaff}{#1}");m("\\blueB","\\textcolor{##80f6ff}{#1}");m("\\blueC","\\textcolor{##63d9ea}{#1}");m("\\blueD","\\textcolor{##11accd}{#1}");m("\\blueE","\\textcolor{##0c7f99}{#1}");m("\\tealA","\\textcolor{##94fff5}{#1}");m("\\tealB","\\textcolor{##26edd5}{#1}");m("\\tealC","\\textcolor{##01d1c1}{#1}");m("\\tealD","\\textcolor{##01a995}{#1}");m("\\tealE","\\textcolor{##208170}{#1}");m("\\greenA","\\textcolor{##b6ffb0}{#1}");m("\\greenB","\\textcolor{##8af281}{#1}");m("\\greenC","\\textcolor{##74cf70}{#1}");m("\\greenD","\\textcolor{##1fab54}{#1}");m("\\greenE","\\textcolor{##0d923f}{#1}");m("\\goldA","\\textcolor{##ffd0a9}{#1}");m("\\goldB","\\textcolor{##ffbb71}{#1}");m("\\goldC","\\textcolor{##ff9c39}{#1}");m("\\goldD","\\textcolor{##e07d10}{#1}");m("\\goldE","\\textcolor{##a75a05}{#1}");m("\\redA","\\textcolor{##fca9a9}{#1}");m("\\redB","\\textcolor{##ff8482}{#1}");m("\\redC","\\textcolor{##f9685d}{#1}");m("\\redD","\\textcolor{##e84d39}{#1}");m("\\redE","\\textcolor{##bc2612}{#1}");m("\\maroonA","\\textcolor{##ffbde0}{#1}");m("\\maroonB","\\textcolor{##ff92c6}{#1}");m("\\maroonC","\\textcolor{##ed5fa6}{#1}");m("\\maroonD","\\textcolor{##ca337c}{#1}");m("\\maroonE","\\textcolor{##9e034e}{#1}");m("\\purpleA","\\textcolor{##ddd7ff}{#1}");m("\\purpleB","\\textcolor{##c6b9fc}{#1}");m("\\purpleC","\\textcolor{##aa87ff}{#1}");m("\\purpleD","\\textcolor{##7854ab}{#1}");m("\\purpleE","\\textcolor{##543b78}{#1}");m("\\mintA","\\textcolor{##f5f9e8}{#1}");m("\\mintB","\\textcolor{##edf2df}{#1}");m("\\mintC","\\textcolor{##e0e5cc}{#1}");m("\\grayA","\\textcolor{##f6f7f7}{#1}");m("\\grayB","\\textcolor{##f0f1f2}{#1}");m("\\grayC","\\textcolor{##e3e5e6}{#1}");m("\\grayD","\\textcolor{##d6d8da}{#1}");m("\\grayE","\\textcolor{##babec2}{#1}");m("\\grayF","\\textcolor{##888d93}{#1}");m("\\grayG","\\textcolor{##626569}{#1}");m("\\grayH","\\textcolor{##3b3e40}{#1}");m("\\grayI","\\textcolor{##21242c}{#1}");m("\\kaBlue","\\textcolor{##314453}{#1}");m("\\kaGreen","\\textcolor{##71B307}{#1}");var I1={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class F4{constructor(e,t,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new R4(I4,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new Fr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:i,end:a}=this.consumeArg(["]"])}else({tokens:i,start:t,end:a}=this.consumeArg());return this.pushToken(new c0("EOF",a.loc)),this.pushTokens(i),new c0("",h0.range(t,a))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var i=this.future(),s,u=0,h=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++u;else if(s.text==="}"){if(--u,u===-1)throw new S("Extra }",s)}else if(s.text==="EOF")throw new S("Unexpected end of input in a macro argument, expected '"+(e&&a?e[h]:"}")+"'",s);if(e&&a)if((u===0||u===1&&e[h]==="{")&&s.text===e[h]){if(++h,h===e.length){t.splice(-h,h);break}}else h=0}while(u!==0||a);return i.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new S("The length of delimiters doesn't match the number of args!");for(var a=t[0],i=0;ithis.settings.maxExpand)throw new S("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),a=t.text,i=t.noexpand?null:this._getExpansion(a);if(i==null||e&&i.unexpandable){if(e&&i==null&&a[0]==="\\"&&!this.isDefined(a))throw new S("Undefined control sequence: "+a);return this.pushToken(t),!1}this.countExpansion(1);var s=i.tokens,u=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){s=s.slice();for(var h=s.length-1;h>=0;--h){var c=s[h];if(c.text==="#"){if(h===0)throw new S("Incomplete placeholder at end of macro body",c);if(c=s[--h],c.text==="#")s.splice(h+1,1);else if(/^[1-9]$/.test(c.text))s.splice(h,2,...u[+c.text-1]);else throw new S("Not a valid argument number",c)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new c0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),t.push(i)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var i=typeof t=="function"?t(this):t;if(typeof i=="string"){var s=0;if(i.includes("#"))for(var u=i.replace(/##/g,"");u.includes("#"+(s+1));)++s;for(var h=new Fr(i,this.settings),c=[],v=h.lex();v.text!=="EOF";)c.push(v),v=h.lex();c.reverse();var p={tokens:c,numArgs:s};return p}return i}isDefined(e){return this.macros.has(e)||O0.hasOwnProperty(e)||W.math.hasOwnProperty(e)||W.text.hasOwnProperty(e)||I1.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:O0.hasOwnProperty(e)&&!O0[e].primitive}}var Lr=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Be=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),ct={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Pr={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class je{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new F4(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new S("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new c0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(je.endOfExpression.has(i.text)||t&&i.text===t||e&&O0[i.text]&&O0[i.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;a.push(s)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,i=0;i=128)this.settings.strict&&(Gr(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),u={type:"textord",mode:"text",loc:h0.range(e),text:t};else return null;if(this.consume(),s)for(var p=0;p1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&S(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),n=Object(n);++t2?n[2]:void 0;for(i&&S(n[0],n[1],i)&&(t=1);++r-1?i[o?n[a]:a]:void 0}}var Kt=Math.max;function Xt(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:cr(r);return i<0&&(i=Kt(t+i,0)),Xn(e,C(n),i)}var be=qt(Xt);function wn(e,n){var r=-1,t=K(e)?Array(e.length):[];return Hn(e,function(i,o,a){t[++r]=n(i,o,a)}),t}function g(e,n){var r=N(e)?B:wn;return r(e,C(n))}function Ht(e,n){return e==null?e:Qe(e,en(n),P)}function zt(e,n){return e&&nn(e,en(n))}function Jt(e,n){return e>n}var Zt=Object.prototype,Qt=Zt.hasOwnProperty;function ei(e,n){return e!=null&&Qt.call(e,n)}function gn(e,n){return e!=null&&zn(e,n,ei)}function mn(e,n){return en||o&&a&&f&&!u&&!d||t&&a&&f||!r&&f||!i)return 1;if(!t&&!o&&!d&&e=u)return f;var d=r[t];return f*(d=="desc"?-1:1)}}return e.index-n.index}function oi(e,n,r){n.length?n=B(n,function(o){return N(o)?function(a){return tn(a,o.length===1?o[0]:o)}:o}):n=[he];var t=-1;n=B(n,le(C));var i=wn(e,function(o,a,u){var f=B(n,function(d){return d(o)});return{criteria:f,index:++t,value:o}});return ti(i,function(o,a){return ai(o,a,r)})}function ui(e,n){return ri(e,n,function(r,t){return Zn(e,t)})}var W=yr(function(e,n){return e==null?{}:ui(e,n)}),fi=Math.ceil,di=Math.max;function si(e,n,r,t){for(var i=-1,o=di(fi((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function ci(e){return function(n,r,t){return t&&typeof t!="number"&&S(n,r,t)&&(r=t=void 0),n=G(n),r===void 0?(r=n,n=0):r=G(r),t=t===void 0?n1&&S(e,n[0],n[1])?n=[]:r>2&&S(n[0],n[1],n[2])&&(n=[n[0]]),oi(e,He(n),[])}),li=0;function me(e){var n=++li;return Qn(e)+n}function hi(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t0;--u)if(a=n[u].dequeue(),a){t=t.concat(Q(e,n,r,a,!0));break}}}return t}function Q(e,n,r,t,i){var o=i?[]:void 0;return c(e.inEdges(t.v),function(a){var u=e.edge(a),f=e.node(a.v);i&&o.push({v:a.v,w:a.w}),f.out-=u,ue(n,r,f)}),c(e.outEdges(t.v),function(a){var u=e.edge(a),f=a.w,d=e.node(f);d.in-=u,ue(n,r,d)}),e.removeNode(t.v),o}function yi(e,n){var r=new E,t=0,i=0;c(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),c(e.edges(),function(u){var f=r.edge(u.v,u.w)||0,d=n(u),s=f+d;r.setEdge(u.v,u.w,s),i=Math.max(i,r.node(u.v).out+=d),t=Math.max(t,r.node(u.w).in+=d)});var o=_(i+t+3).map(function(){return new pi}),a=t+1;return c(r.nodes(),function(u){ue(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function ue(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function xi(e){var n=e.graph().acyclicer==="greedy"?gi(e,r(e)):Oi(e);c(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,me("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Oi(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,c(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return c(e.nodes(),i),n}function Ei(e){c(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function k(e,n,r,t){var i;do i=me(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function Ti(e){var n=new E().setGraph(e.graph());return c(e.nodes(),function(r){n.setNode(r,e.node(r))}),c(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function yn(e){var n=new E({multigraph:e.isMultigraph()}).setGraph(e.graph());return c(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),c(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Fe(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var f,d;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),f=u*i/o,d=u):(i<0&&(a=-a),f=a,d=a*o/i),{x:r+f,y:t+d}}function Z(e){var n=g(_(xn(e)+1),function(){return[]});return c(e.nodes(),function(r){var t=e.node(r),i=t.rank;x(i)||(n[i][t.order]=r)}),n}function Pi(e){var n=j(g(e.nodes(),function(r){return e.node(r).rank}));c(e.nodes(),function(r){var t=e.node(r);gn(t,"rank")&&(t.rank-=n)})}function Li(e){var n=j(g(e.nodes(),function(o){return e.node(o).rank})),r=[];c(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;c(r,function(o,a){x(o)&&a%i!==0?--t:t&&c(o,function(u){e.node(u).rank+=t})})}function Be(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),k(e,"border",i,n)}function xn(e){return T(g(e.nodes(),function(n){var r=e.node(n).rank;if(!x(r))return r}))}function Ni(e,n){var r={lhs:[],rhs:[]};return c(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Ii(e,n){return n()}function _i(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&c(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;oa.lim&&(u=a,f=!0);var d=R(n.edges(),function(s){return f===Ye(e,e.node(s.v),u)&&f!==Ye(e,e.node(s.w),u)});return ge(d,function(s){return M(n,s)})}function Cn(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),Oe(e),xe(e,n),Vi(e,n)}function Vi(e,n){var r=be(e.nodes(),function(i){return!n.node(i).parent}),t=Yi(e,r);t=t.slice(1),c(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function Wi(e,n,r){return e.hasEdge(n,r)}function Ye(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function qi(e){switch(e.graph().ranker){case"network-simplex":Ue(e);break;case"tight-tree":Xi(e);break;case"longest-path":Ki(e);break;default:Ue(e)}}var Ki=ye;function Xi(e){ye(e),En(e)}function Ue(e){L(e)}function Hi(e){var n=k(e,"root",{},"_root"),r=zi(e),t=T(I(r))-1,i=2*t+1;e.graph().nestingRoot=n,c(e.edges(),function(a){e.edge(a).minlen*=i});var o=Ji(e)+1;c(e.children(),function(a){An(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function An(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var f=Be(e,"_bt"),d=Be(e,"_bb"),s=e.node(a);e.setParent(f,a),s.borderTop=f,e.setParent(d,a),s.borderBottom=d,c(u,function(l){An(e,n,r,t,i,o,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,w=h.borderTop?t:2*t,m=v!==p?1:i-o[a]+1;e.setEdge(f,v,{weight:w,minlen:m,nestingEdge:!0}),e.setEdge(p,d,{weight:w,minlen:m,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,f,{weight:0,minlen:i+o[a]})}function zi(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&c(o,function(a){r(a,i+1)}),n[t]=i}return c(e.children(),function(t){r(t,1)}),n}function Ji(e){return X(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Zi(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,c(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Qi(e,n,r){var t={},i;c(r,function(o){for(var a=e.parent(o),u,f;a;){if(u=e.parent(a),u?(f=t[u],t[u]=a):(f=i,i=a),f&&f!==a){n.setEdge(f,a);return}a=u}})}function ea(e,n,r){var t=na(e),i=new E({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return c(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),c(e[r](o),function(f){var d=f.v===o?f.w:f.v,s=i.edge(d,o),l=x(s)?0:s.weight;i.setEdge(d,o,{weight:e.edge(f).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function na(e){for(var n;e.hasNode(n=me("_root")););return n}function ra(e,n){for(var r=0,t=1;t0;)s%2&&(l+=u[s+1]),s=s-1>>1,u[s]+=d.weight;f+=d.weight*l})),f}function ia(e){var n={},r=R(e.nodes(),function(u){return!e.children(u).length}),t=T(g(r,function(u){return e.node(u).rank})),i=g(_(t+1),function(){return[]});function o(u){if(!gn(n,u)){n[u]=!0;var f=e.node(u);i[f.rank].push(u),c(e.successors(u),o)}}var a=F(r,function(u){return e.node(u).rank});return c(a,o),i}function aa(e,n){return g(n,function(r){var t=e.inEdges(r);if(t.length){var i=X(t,function(o,a){var u=e.edge(a),f=e.node(a.v);return{sum:o.sum+u.weight*f.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function oa(e,n){var r={};c(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};x(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),c(n.edges(),function(i){var o=r[i.v],a=r[i.w];!x(o)&&!x(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=R(r,function(i){return!i.indegree});return ua(t)}function ua(e){var n=[];function r(o){return function(a){a.merged||(x(a.barycenter)||x(o.barycenter)||a.barycenter>=o.barycenter)&&fa(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return g(R(n,function(o){return!o.merged}),function(o){return W(o,["vs","i","barycenter","weight"])})}function fa(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function da(e,n){var r=Ni(e,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),t=r.lhs,i=F(r.rhs,function(s){return-s.i}),o=[],a=0,u=0,f=0;t.sort(sa(!!n)),f=Ve(o,i,f),c(t,function(s){f+=s.vs.length,o.push(s.vs),a+=s.barycenter*s.weight,u+=s.weight,f=Ve(o,i,f)});var d={vs:A(o)};return u&&(d.barycenter=a/u,d.weight=u),d}function Ve(e,n,r){for(var t;n.length&&(t=V(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function sa(e){return function(n,r){return n.barycenterr.barycenter?1:e?r.i-n.i:n.i-r.i}}function kn(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,f={};a&&(i=R(i,function(p){return p!==a&&p!==u}));var d=aa(e,i);c(d,function(p){if(e.children(p.v).length){var w=kn(e,p.v,r,t);f[p.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&la(p,w)}});var s=oa(d,r);ca(s,f);var l=da(s,t);if(a&&(l.vs=A([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function ca(e,n){c(e,function(r){r.vs=A(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function la(e,n){x(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function ha(e){var n=xn(e),r=We(e,_(1,n+1),"inEdges"),t=We(e,_(n-1,-1,-1),"outEdges"),i=ia(e);qe(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,f=0;f<4;++u,++f){va(u%2?r:t,u%4>=2),i=Z(e);var d=ra(e,i);da||u>n[f].lim));for(d=f,f=t;(f=e.parent(f))!==d;)o.push(f);return{path:i.concat(o.reverse()),lca:d}}function wa(e){var n={},r=0;function t(i){var o=r;c(e.children(i),t),n[i]={low:o,lim:r++}}return c(e.children(),t),n}function ga(e,n){var r={};function t(i,o){var a=0,u=0,f=i.length,d=V(o);return c(o,function(s,l){var h=ya(e,s),v=h?e.node(h).order:f;(h||s===d)&&(c(o.slice(u,l+1),function(p){c(e.predecessors(p),function(w){var m=e.node(w),y=m.order;(yd)&&Sn(r,h,s)})})}function i(o,a){var u=-1,f,d=0;return c(a,function(s,l){if(e.node(s).dummy==="border"){var h=e.predecessors(s);h.length&&(f=e.node(h[0]).order,t(a,d,l,u,f),d=l,u=f)}t(a,d,a.length,f,o.length)}),a}return X(n,i),r}function ya(e,n){if(e.node(n).dummy)return be(e.predecessors(n),function(r){return e.node(r).dummy})}function Sn(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function xa(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Oa(e,n,r,t){var i={},o={},a={};return c(n,function(u){c(u,function(f,d){i[f]=f,o[f]=f,a[f]=d})}),c(n,function(u){var f=-1;c(u,function(d){var s=t(d);if(s.length){s=F(s,function(w){return a[w]});for(var l=(s.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=s[h];o[d]===d&&f{var t=r(" buildLayoutGraph",()=>Ua(e));r(" runLayout",()=>Sa(t,r)),r(" updateInputGraph",()=>ja(e,t))})}function Sa(e,n){n(" makeSpaceForEdgeLabels",()=>Va(e)),n(" removeSelfEdges",()=>Qa(e)),n(" acyclic",()=>xi(e)),n(" nestingGraph.run",()=>Hi(e)),n(" rank",()=>qi(yn(e))),n(" injectEdgeLabelProxies",()=>Wa(e)),n(" removeEmptyRanks",()=>Li(e)),n(" nestingGraph.cleanup",()=>Zi(e)),n(" normalizeRanks",()=>Pi(e)),n(" assignRankMinMax",()=>qa(e)),n(" removeEdgeLabelProxies",()=>Ka(e)),n(" normalize.run",()=>ji(e)),n(" parentDummyChains",()=>pa(e)),n(" addBorderSegments",()=>_i(e)),n(" order",()=>ha(e)),n(" insertSelfEdges",()=>eo(e)),n(" adjustCoordinateSystem",()=>Ci(e)),n(" position",()=>Aa(e)),n(" positionSelfEdges",()=>no(e)),n(" removeBorderNodes",()=>Za(e)),n(" normalize.undo",()=>Ri(e)),n(" fixupEdgeLabelCoords",()=>za(e)),n(" undoCoordinateSystem",()=>Ai(e)),n(" translateGraph",()=>Xa(e)),n(" assignNodeIntersects",()=>Ha(e)),n(" reversePoints",()=>Ja(e)),n(" acyclic.undo",()=>Ei(e))}function ja(e,n){c(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),c(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Ma=["nodesep","edgesep","ranksep","marginx","marginy"],Ra={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$a=["acyclicer","ranker","rankdir","align"],Fa=["width","height"],Ba={width:0,height:0},Ga=["minlen","weight","width","height","labeloffset"],Da={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ya=["labelpos"];function Ua(e){var n=new E({multigraph:!0,compound:!0}),r=te(e.graph());return n.setGraph(oe({},Ra,re(r,Ma),W(r,$a))),c(e.nodes(),function(t){var i=te(e.node(t));n.setNode(t,Ut(re(i,Fa),Ba)),n.setParent(t,e.parent(t))}),c(e.edges(),function(t){var i=te(e.edge(t));n.setEdge(t,oe({},Da,re(i,Ga),W(i,Ya)))}),n}function Va(e){var n=e.graph();n.ranksep/=2,c(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Wa(e){c(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};k(e,"edge-proxy",o,"_ep")}})}function qa(e){var n=0;c(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=T(n,t.maxRank))}),e.graph().maxRank=n}function Ka(e){c(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Xa(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function f(d){var s=d.x,l=d.y,h=d.width,v=d.height;n=Math.min(n,s-h/2),r=Math.max(r,s+h/2),t=Math.min(t,l-v/2),i=Math.max(i,l+v/2)}c(e.nodes(),function(d){f(e.node(d))}),c(e.edges(),function(d){var s=e.edge(d);Object.prototype.hasOwnProperty.call(s,"x")&&f(s)}),n-=a,t-=u,c(e.nodes(),function(d){var s=e.node(d);s.x-=n,s.y-=t}),c(e.edges(),function(d){var s=e.edge(d);c(s.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(s,"x")&&(s.x-=n),Object.prototype.hasOwnProperty.call(s,"y")&&(s.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Ha(e){c(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(Fe(t,o)),r.points.push(Fe(i,a))})}function za(e){c(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Ja(e){c(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Za(e){c(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(V(r.borderLeft)),a=e.node(V(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),c(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Qa(e){c(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function eo(e){var n=Z(e);c(n,function(r){var t=0;c(r,function(i,o){var a=e.node(i);a.order=o+t,c(a.selfEdges,function(u){k(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function no(e){c(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function re(e,n){return J(W(e,n),Number)}function te(e){var n={};return c(e,function(r,t){n[t.toLowerCase()]=r}),n}export{D as b,to as l,g as m}; diff --git a/dist/assets/linear-CvhoBmDn.js b/dist/assets/linear-CvhoBmDn.js new file mode 100644 index 0000000..f1a9792 --- /dev/null +++ b/dist/assets/linear-CvhoBmDn.js @@ -0,0 +1 @@ +import{b9 as j,ba as p,bb as w,bc as k,bd as q}from"./index-mLPbTfpz.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:nr?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:rn?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i>>1;t(o[l],c)<0?i=l+1:h=l}while(i>>1;t(o[l],c)<=0?i=l+1:h=l}while(ii&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/ir&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*ir&&--c),c0))return[];if(n===r)return[n];const e=r=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;ir&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t}; diff --git a/dist/assets/mermaid-parser.core-D9g22YKo.js b/dist/assets/mermaid-parser.core-D9g22YKo.js new file mode 100644 index 0000000..2895cab --- /dev/null +++ b/dist/assets/mermaid-parser.core-D9g22YKo.js @@ -0,0 +1,174 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/info-J43DQDTF-ByKsUPcs.js","assets/index-mLPbTfpz.js","assets/packet-YPE3B663-DxWH_D8P.js","assets/pie-LRSECV5Y-hrQnKzWO.js","assets/treeView-BLDUP644-C9ezM3fm.js","assets/architecture-7EHR7CIX-CH2wXeGZ.js","assets/gitGraph-WXDBUCRP-BECHaw36.js","assets/eventmodeling-FCH6USID-DKM4hpFU.js","assets/radar-GUYGQ44K-DhvxoL3l.js","assets/treemap-LRROVOQU-OJPVKysv.js","assets/wardley-L42UT6IY-BXdEa5-p.js"])))=>i.map(i=>d[i]); +var mN=Object.defineProperty;var gN=(t,e,r)=>e in t?mN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var jr=(t,e,r)=>gN(t,typeof e!="symbol"?e+"":e,r);import{b8 as er}from"./index-mLPbTfpz.js";var yN=Object.create,hc=Object.defineProperty,vN=Object.getOwnPropertyDescriptor,Fh=Object.getOwnPropertyNames,TN=Object.getPrototypeOf,RN=Object.prototype.hasOwnProperty,s=(t,e)=>hc(t,"name",{value:e,configurable:!0}),$N=(t,e)=>function(){return t&&(e=(0,t[Fh(t)[0]])(t=0)),e},Y=(t,e)=>function(){return e||(0,t[Fh(t)[0]])((e={exports:{}}).exports,e),e.exports},Qr=(t,e)=>{for(var r in e)hc(t,r,{get:e[r],enumerable:!0})},Gh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Fh(e))!RN.call(t,a)&&a!==r&&hc(t,a,{get:()=>e[a],enumerable:!(n=vN(e,a))||n.enumerable});return t},ff=(t,e,r)=>(Gh(t,e,"default"),r),jh=(t,e,r)=>(r=t!=null?yN(TN(t)):{},Gh(hc(r,"default",{value:t,enumerable:!0}),t)),Uh=t=>Gh(hc({},"__esModule",{value:!0}),t),df={};Qr(df,{AnnotatedTextEdit:()=>Tr,ChangeAnnotation:()=>fn,ChangeAnnotationIdentifier:()=>Xe,CodeAction:()=>Ep,CodeActionContext:()=>Ap,CodeActionKind:()=>$p,CodeActionTriggerKind:()=>Nl,CodeDescription:()=>Qd,CodeLens:()=>_p,Color:()=>ru,ColorInformation:()=>Vd,ColorPresentation:()=>Hd,Command:()=>un,CompletionItem:()=>cp,CompletionItemKind:()=>np,CompletionItemLabelDetails:()=>lp,CompletionItemTag:()=>ip,CompletionList:()=>up,CreateFile:()=>Ra,DeleteFile:()=>Aa,Diagnostic:()=>Sl,DiagnosticRelatedInformation:()=>nu,DiagnosticSeverity:()=>Jd,DiagnosticTag:()=>Zd,DocumentHighlight:()=>mp,DocumentHighlightKind:()=>hp,DocumentLink:()=>Sp,DocumentSymbol:()=>Rp,DocumentUri:()=>Kd,EOL:()=>mT,FoldingRange:()=>Xd,FoldingRangeKind:()=>Yd,FormattingOptions:()=>Cp,Hover:()=>fp,InlayHint:()=>Dp,InlayHintKind:()=>su,InlayHintLabelPart:()=>ou,InlineCompletionContext:()=>Up,InlineCompletionItem:()=>xp,InlineCompletionList:()=>Fp,InlineCompletionTriggerKind:()=>Gp,InlineValueContext:()=>Lp,InlineValueEvaluatableExpression:()=>Op,InlineValueText:()=>kp,InlineValueVariableLookup:()=>Pp,InsertReplaceEdit:()=>sp,InsertTextFormat:()=>ap,InsertTextMode:()=>op,Location:()=>Cl,LocationLink:()=>Wd,MarkedString:()=>Il,MarkupContent:()=>Ea,MarkupKind:()=>iu,OptionalVersionedTextDocumentIdentifier:()=>wl,ParameterInformation:()=>dp,Position:()=>ie,Range:()=>ee,RenameFile:()=>$a,SelectedCompletionInfo:()=>jp,SelectionRange:()=>bp,SemanticTokenModifiers:()=>Ip,SemanticTokenTypes:()=>wp,SemanticTokens:()=>Np,SignatureInformation:()=>pp,StringValue:()=>Mp,SymbolInformation:()=>vp,SymbolKind:()=>gp,SymbolTag:()=>yp,TextDocument:()=>Bp,TextDocumentEdit:()=>bl,TextDocumentIdentifier:()=>ep,TextDocumentItem:()=>rp,TextEdit:()=>rr,URI:()=>tu,VersionedTextDocumentIdentifier:()=>tp,WorkspaceChange:()=>hT,WorkspaceEdit:()=>au,WorkspaceFolder:()=>zp,WorkspaceSymbol:()=>Tp,integer:()=>qd,uinteger:()=>_l});var Kd,tu,qd,_l,ie,ee,Cl,Wd,ru,Vd,Hd,Yd,Xd,nu,Jd,Zd,Qd,Sl,un,rr,fn,Xe,Tr,bl,Ra,$a,Aa,au,hl,$d,hT,ep,tp,wl,rp,iu,Ea,np,ap,ip,sp,op,lp,cp,up,Il,fp,dp,pp,hp,mp,gp,yp,vp,Tp,Rp,$p,Nl,Ap,Ep,_p,Cp,Sp,bp,wp,Ip,Np,kp,Pp,Op,Lp,su,ou,Dp,Mp,xp,Fp,Gp,jp,Up,zp,mT,Bp,_y,_,mc=$N({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(Kd||(Kd={})),function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i}(tu||(tu={})),function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(qd||(qd={})),function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(_l||(_l={})),function(a){function i(c,l){return c===Number.MAX_VALUE&&(c=_l.MAX_VALUE),l===Number.MAX_VALUE&&(l=_l.MAX_VALUE),{line:c,character:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&_.uinteger(l.line)&&_.uinteger(l.character)}s(o,"is"),a.is=o}(ie||(ie={})),function(a){function i(c,l,u,f){if(_.uinteger(c)&&_.uinteger(l)&&_.uinteger(u)&&_.uinteger(f))return{start:ie.create(c,l),end:ie.create(u,f)};if(ie.is(c)&&ie.is(l))return{start:c,end:l};throw new Error(`Range#create called with invalid arguments[${c}, ${l}, ${u}, ${f}]`)}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ie.is(l.start)&&ie.is(l.end)}s(o,"is"),a.is=o}(ee||(ee={})),function(a){function i(c,l){return{uri:c,range:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(_.string(l.uri)||_.undefined(l.uri))}s(o,"is"),a.is=o}(Cl||(Cl={})),function(a){function i(c,l,u,f){return{targetUri:c,targetRange:l,targetSelectionRange:u,originSelectionRange:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.targetRange)&&_.string(l.targetUri)&&ee.is(l.targetSelectionRange)&&(ee.is(l.originSelectionRange)||_.undefined(l.originSelectionRange))}s(o,"is"),a.is=o}(Wd||(Wd={})),function(a){function i(c,l,u,f){return{red:c,green:l,blue:u,alpha:f}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.numberRange(l.red,0,1)&&_.numberRange(l.green,0,1)&&_.numberRange(l.blue,0,1)&&_.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o}(ru||(ru={})),function(a){function i(c,l){return{range:c,color:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ee.is(l.range)&&ru.is(l.color)}s(o,"is"),a.is=o}(Vd||(Vd={})),function(a){function i(c,l,u){return{label:c,textEdit:l,additionalTextEdits:u}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.undefined(l.textEdit)||rr.is(l))&&(_.undefined(l.additionalTextEdits)||_.typedArray(l.additionalTextEdits,rr.is))}s(o,"is"),a.is=o}(Hd||(Hd={})),function(a){a.Comment="comment",a.Imports="imports",a.Region="region"}(Yd||(Yd={})),function(a){function i(c,l,u,f,d,p){const m={startLine:c,endLine:l};return _.defined(u)&&(m.startCharacter=u),_.defined(f)&&(m.endCharacter=f),_.defined(d)&&(m.kind=d),_.defined(p)&&(m.collapsedText=p),m}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.uinteger(l.startLine)&&_.uinteger(l.startLine)&&(_.undefined(l.startCharacter)||_.uinteger(l.startCharacter))&&(_.undefined(l.endCharacter)||_.uinteger(l.endCharacter))&&(_.undefined(l.kind)||_.string(l.kind))}s(o,"is"),a.is=o}(Xd||(Xd={})),function(a){function i(c,l){return{location:c,message:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&Cl.is(l.location)&&_.string(l.message)}s(o,"is"),a.is=o}(nu||(nu={})),function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4}(Jd||(Jd={})),function(a){a.Unnecessary=1,a.Deprecated=2}(Zd||(Zd={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&_.string(c.href)}s(i,"is"),a.is=i}(Qd||(Qd={})),function(a){function i(c,l,u,f,d,p){let m={range:c,message:l};return _.defined(u)&&(m.severity=u),_.defined(f)&&(m.code=f),_.defined(d)&&(m.source=d),_.defined(p)&&(m.relatedInformation=p),m}s(i,"create"),a.create=i;function o(c){var l;let u=c;return _.defined(u)&&ee.is(u.range)&&_.string(u.message)&&(_.number(u.severity)||_.undefined(u.severity))&&(_.integer(u.code)||_.string(u.code)||_.undefined(u.code))&&(_.undefined(u.codeDescription)||_.string((l=u.codeDescription)===null||l===void 0?void 0:l.href))&&(_.string(u.source)||_.undefined(u.source))&&(_.undefined(u.relatedInformation)||_.typedArray(u.relatedInformation,nu.is))}s(o,"is"),a.is=o}(Sl||(Sl={})),function(a){function i(c,l,...u){let f={title:c,command:l};return _.defined(u)&&u.length>0&&(f.arguments=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.title)&&_.string(l.command)}s(o,"is"),a.is=o}(un||(un={})),function(a){function i(u,f){return{range:u,newText:f}}s(i,"replace"),a.replace=i;function o(u,f){return{range:{start:u,end:u},newText:f}}s(o,"insert"),a.insert=o;function c(u){return{range:u,newText:""}}s(c,"del"),a.del=c;function l(u){const f=u;return _.objectLiteral(f)&&_.string(f.newText)&&ee.is(f.range)}s(l,"is"),a.is=l}(rr||(rr={})),function(a){function i(c,l,u){const f={label:c};return l!==void 0&&(f.needsConfirmation=l),u!==void 0&&(f.description=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(_.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o}(fn||(fn={})),function(a){function i(o){const c=o;return _.string(c)}s(i,"is"),a.is=i}(Xe||(Xe={})),function(a){function i(u,f,d){return{range:u,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(u,f,d){return{range:{start:u,end:u},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function c(u,f){return{range:u,newText:"",annotationId:f}}s(c,"del"),a.del=c;function l(u){const f=u;return rr.is(f)&&(fn.is(f.annotationId)||Xe.is(f.annotationId))}s(l,"is"),a.is=l}(Tr||(Tr={})),function(a){function i(c,l){return{textDocument:c,edits:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&wl.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o}(bl||(bl={})),function(a){function i(c,l,u){let f={kind:"create",uri:c};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="create"&&_.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o}(Ra||(Ra={})),function(a){function i(c,l,u,f){let d={kind:"rename",oldUri:c,newUri:l};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(d.options=u),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="rename"&&_.string(l.oldUri)&&_.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o}($a||($a={})),function(a){function i(c,l,u){let f={kind:"delete",uri:c};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="delete"&&_.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||_.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||_.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o}(Aa||(Aa={})),function(a){function i(o){let c=o;return c&&(c.changes!==void 0||c.documentChanges!==void 0)&&(c.documentChanges===void 0||c.documentChanges.every(l=>_.string(l.kind)?Ra.is(l)||$a.is(l)||Aa.is(l):bl.is(l)))}s(i,"is"),a.is=i}(au||(au={})),hl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,c){let l,u;if(c===void 0?l=rr.insert(i,o):Xe.is(c)?(u=c,l=Tr.insert(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.insert(i,o,u)),this.edits.push(l),u!==void 0)return u}replace(i,o,c){let l,u;if(c===void 0?l=rr.replace(i,o):Xe.is(c)?(u=c,l=Tr.replace(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.replace(i,o,u)),this.edits.push(l),u!==void 0)return u}delete(i,o){let c,l;if(o===void 0?c=rr.del(i):Xe.is(o)?(l=o,c=Tr.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),c=Tr.del(i,l)),this.edits.push(c),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),$d=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let c;if(Xe.is(i)?c=i:(c=this.nextId(),o=i),this._annotations[c]!==void 0)throw new Error(`Id ${c} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${c}`);return this._annotations[c]=o,this._size++,c}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),hT=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new $d(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(bl.is(o)){const c=new hl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=c}})):i.changes&&Object.keys(i.changes).forEach(o=>{const c=new hl(i.changes[o]);this._textEditChanges[o]=c})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(i){if(wl.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let c=this._textEditChanges[o.uri];if(!c){const l=[],u={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(u),c=new hl(l,this._changeAnnotations),this._textEditChanges[o.uri]=c}return c}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let c=[];this._workspaceEdit.changes[i]=c,o=new hl(c),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new $d,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Ra.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=Ra.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}renameFile(i,o,c,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let u;fn.is(c)||Xe.is(c)?u=c:l=c;let f,d;if(u===void 0?f=$a.create(i,o,l):(d=Xe.is(u)?u:this._changeAnnotations.manage(u),f=$a.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Aa.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=Aa.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}},s(r,"WorkspaceChange"),r),function(a){function i(c){return{uri:c}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)}s(o,"is"),a.is=o}(ep||(ep={})),function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.integer(l.version)}s(o,"is"),a.is=o}(tp||(tp={})),function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&(l.version===null||_.integer(l.version))}s(o,"is"),a.is=o}(wl||(wl={})),function(a){function i(c,l,u,f){return{uri:c,languageId:l,version:u,text:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.string(l.languageId)&&_.integer(l.version)&&_.string(l.text)}s(o,"is"),a.is=o}(rp||(rp={})),function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const c=o;return c===a.PlainText||c===a.Markdown}s(i,"is"),a.is=i}(iu||(iu={})),function(a){function i(o){const c=o;return _.objectLiteral(o)&&iu.is(c.kind)&&_.string(c.value)}s(i,"is"),a.is=i}(Ea||(Ea={})),function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25}(np||(np={})),function(a){a.PlainText=1,a.Snippet=2}(ap||(ap={})),function(a){a.Deprecated=1}(ip||(ip={})),function(a){function i(c,l,u){return{newText:c,insert:l,replace:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l&&_.string(l.newText)&&ee.is(l.insert)&&ee.is(l.replace)}s(o,"is"),a.is=o}(sp||(sp={})),function(a){a.asIs=1,a.adjustIndentation=2}(op||(op={})),function(a){function i(o){const c=o;return c&&(_.string(c.detail)||c.detail===void 0)&&(_.string(c.description)||c.description===void 0)}s(i,"is"),a.is=i}(lp||(lp={})),function(a){function i(o){return{label:o}}s(i,"create"),a.create=i}(cp||(cp={})),function(a){function i(o,c){return{items:o||[],isIncomplete:!!c}}s(i,"create"),a.create=i}(up||(up={})),function(a){function i(c){return c.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(c){const l=c;return _.string(l)||_.objectLiteral(l)&&_.string(l.language)&&_.string(l.value)}s(o,"is"),a.is=o}(Il||(Il={})),function(a){function i(o){let c=o;return!!c&&_.objectLiteral(c)&&(Ea.is(c.contents)||Il.is(c.contents)||_.typedArray(c.contents,Il.is))&&(o.range===void 0||ee.is(o.range))}s(i,"is"),a.is=i}(fp||(fp={})),function(a){function i(o,c){return c?{label:o,documentation:c}:{label:o}}s(i,"create"),a.create=i}(dp||(dp={})),function(a){function i(o,c,...l){let u={label:o};return _.defined(c)&&(u.documentation=c),_.defined(l)?u.parameters=l:u.parameters=[],u}s(i,"create"),a.create=i}(pp||(pp={})),function(a){a.Text=1,a.Read=2,a.Write=3}(hp||(hp={})),function(a){function i(o,c){let l={range:o};return _.number(c)&&(l.kind=c),l}s(i,"create"),a.create=i}(mp||(mp={})),function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26}(gp||(gp={})),function(a){a.Deprecated=1}(yp||(yp={})),function(a){function i(o,c,l,u,f){let d={name:o,kind:c,location:{uri:u,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i}(vp||(vp={})),function(a){function i(o,c,l,u){return u!==void 0?{name:o,kind:c,location:{uri:l,range:u}}:{name:o,kind:c,location:{uri:l}}}s(i,"create"),a.create=i}(Tp||(Tp={})),function(a){function i(c,l,u,f,d,p){let m={name:c,detail:l,kind:u,range:f,selectionRange:d};return p!==void 0&&(m.children=p),m}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.name)&&_.number(l.kind)&&ee.is(l.range)&&ee.is(l.selectionRange)&&(l.detail===void 0||_.string(l.detail))&&(l.deprecated===void 0||_.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o}(Rp||(Rp={})),function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"}($p||($p={})),function(a){a.Invoked=1,a.Automatic=2}(Nl||(Nl={})),function(a){function i(c,l,u){let f={diagnostics:c};return l!=null&&(f.only=l),u!=null&&(f.triggerKind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.typedArray(l.diagnostics,Sl.is)&&(l.only===void 0||_.typedArray(l.only,_.string))&&(l.triggerKind===void 0||l.triggerKind===Nl.Invoked||l.triggerKind===Nl.Automatic)}s(o,"is"),a.is=o}(Ap||(Ap={})),function(a){function i(c,l,u){let f={title:c},d=!0;return typeof l=="string"?(d=!1,f.kind=l):un.is(l)?f.command=l:f.edit=l,d&&u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.title)&&(l.diagnostics===void 0||_.typedArray(l.diagnostics,Sl.is))&&(l.kind===void 0||_.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||un.is(l.command))&&(l.isPreferred===void 0||_.boolean(l.isPreferred))&&(l.edit===void 0||au.is(l.edit))}s(o,"is"),a.is=o}(Ep||(Ep={})),function(a){function i(c,l){let u={range:c};return _.defined(l)&&(u.data=l),u}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.command)||un.is(l.command))}s(o,"is"),a.is=o}(_p||(_p={})),function(a){function i(c,l){return{tabSize:c,insertSpaces:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.uinteger(l.tabSize)&&_.boolean(l.insertSpaces)}s(o,"is"),a.is=o}(Cp||(Cp={})),function(a){function i(c,l,u){return{range:c,target:l,data:u}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.target)||_.string(l.target))}s(o,"is"),a.is=o}(Sp||(Sp={})),function(a){function i(c,l){return{range:c,parent:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o}(bp||(bp={})),function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"}(wp||(wp={})),function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"}(Ip||(Ip={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&(c.resultId===void 0||typeof c.resultId=="string")&&Array.isArray(c.data)&&(c.data.length===0||typeof c.data[0]=="number")}s(i,"is"),a.is=i}(Np||(Np={})),function(a){function i(c,l){return{range:c,text:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.string(l.text)}s(o,"is"),a.is=o}(kp||(kp={})),function(a){function i(c,l,u){return{range:c,variableName:l,caseSensitiveLookup:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.boolean(l.caseSensitiveLookup)&&(_.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o}(Pp||(Pp={})),function(a){function i(c,l){return{range:c,expression:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&(_.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o}(Op||(Op={})),function(a){function i(c,l){return{frameId:c,stoppedLocation:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.defined(l)&&ee.is(c.stoppedLocation)}s(o,"is"),a.is=o}(Lp||(Lp={})),function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i}(su||(su={})),function(a){function i(c){return{value:c}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.location===void 0||Cl.is(l.location))&&(l.command===void 0||un.is(l.command))}s(o,"is"),a.is=o}(ou||(ou={})),function(a){function i(c,l,u){const f={position:c,label:l};return u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ie.is(l.position)&&(_.string(l.label)||_.typedArray(l.label,ou.is))&&(l.kind===void 0||su.is(l.kind))&&l.textEdits===void 0||_.typedArray(l.textEdits,rr.is)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.paddingLeft===void 0||_.boolean(l.paddingLeft))&&(l.paddingRight===void 0||_.boolean(l.paddingRight))}s(o,"is"),a.is=o}(Dp||(Dp={})),function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i}(Mp||(Mp={})),function(a){function i(o,c,l,u){return{insertText:o,filterText:c,range:l,command:u}}s(i,"create"),a.create=i}(xp||(xp={})),function(a){function i(o){return{items:o}}s(i,"create"),a.create=i}(Fp||(Fp={})),function(a){a.Invoked=0,a.Automatic=1}(Gp||(Gp={})),function(a){function i(o,c){return{range:o,text:c}}s(i,"create"),a.create=i}(jp||(jp={})),function(a){function i(o,c){return{triggerKind:o,selectedCompletionInfo:c}}s(i,"create"),a.create=i}(Up||(Up={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&tu.is(c.uri)&&_.string(c.name)}s(i,"is"),a.is=i}(zp||(zp={})),mT=[` +`,`\r +`,"\r"],function(a){function i(u,f,d,p){return new _y(u,f,d,p)}s(i,"create"),a.create=i;function o(u){let f=u;return!!(_.defined(f)&&_.string(f.uri)&&(_.undefined(f.languageId)||_.string(f.languageId))&&_.uinteger(f.lineCount)&&_.func(f.getText)&&_.func(f.positionAt)&&_.func(f.offsetAt))}s(o,"is"),a.is=o;function c(u,f){let d=u.getText(),p=l(f,(g,v)=>{let E=g.range.start.line-v.range.start.line;return E===0?g.range.start.character-v.range.start.character:E}),m=d.length;for(let g=p.length-1;g>=0;g--){let v=p[g],E=u.offsetAt(v.range.start),T=u.offsetAt(v.range.end);if(T<=m)d=d.substring(0,E)+v.newText+d.substring(T,d.length);else throw new Error("Overlapping edit");m=E}return d}s(c,"applyEdits"),a.applyEdits=c;function l(u,f){if(u.length<=1)return u;const d=u.length/2|0,p=u.slice(0,d),m=u.slice(d);l(p,f),l(m,f);let g=0,v=0,E=0;for(;g0&&i.push(o.length),this._lineOffsets=i}return this._lineOffsets}positionAt(i){i=Math.max(Math.min(i,this._content.length),0);let o=this.getLineOffsets(),c=0,l=o.length;if(l===0)return ie.create(0,i);for(;ci?l=f:c=f+1}let u=c-1;return ie.create(u,i-o[u])}offsetAt(i){let o=this.getLineOffsets();if(i.line>=o.length)return this._content.length;if(i.line<0)return 0;let c=o[i.line],l=i.line+1"u"}s(c,"undefined"),a.undefined=c;function l(T){return T===!0||T===!1}s(l,"boolean"),a.boolean=l;function u(T){return i.call(T)==="[object String]"}s(u,"string"),a.string=u;function f(T){return i.call(T)==="[object Number]"}s(f,"number"),a.number=f;function d(T,w,C){return i.call(T)==="[object Number]"&&w<=T&&T<=C}s(d,"numberRange"),a.numberRange=d;function p(T){return i.call(T)==="[object Number]"&&-2147483648<=T&&T<=2147483647}s(p,"integer"),a.integer=p;function m(T){return i.call(T)==="[object Number]"&&0<=T&&T<=2147483647}s(m,"uinteger"),a.uinteger=m;function g(T){return i.call(T)==="[object Function]"}s(g,"func"),a.func=g;function v(T){return T!==null&&typeof T=="object"}s(v,"objectLiteral"),a.objectLiteral=v;function E(T,w){return Array.isArray(T)&&T.every(w)}s(E,"typedArray"),a.typedArray=E}(_||(_={}))}}),zn=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(t){Object.defineProperty(t,"__esModule",{value:!0});var e;function r(){if(e===void 0)throw new Error("No runtime abstraction layer installed");return e}s(r,"RAL"),function(n){function a(i){if(i===void 0)throw new Error("No runtime abstraction layer provided");e=i}s(a,"install"),n.install=a}(r||(r={})),t.default=r}}),gc=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function e(l){return l===!0||l===!1}s(e,"boolean"),t.boolean=e;function r(l){return typeof l=="string"||l instanceof String}s(r,"string"),t.string=r;function n(l){return typeof l=="number"||l instanceof Number}s(n,"number"),t.number=n;function a(l){return l instanceof Error}s(a,"error"),t.error=a;function i(l){return typeof l=="function"}s(i,"func"),t.func=i;function o(l){return Array.isArray(l)}s(o,"array"),t.array=o;function c(l){return o(l)&&l.every(u=>r(u))}s(c,"stringArray"),t.stringArray=c}}),jo=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(t){var i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var e=zn(),r;(function(c){const l={dispose(){}};c.None=function(){return l}})(r||(t.Event=r={}));var n=(i=class{add(l,u=null,f){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(l),this._contexts.push(u),Array.isArray(f)&&f.push({dispose:s(()=>this.remove(l,u),"dispose")})}remove(l,u=null){if(!this._callbacks)return;let f=!1;for(let d=0,p=this._callbacks.length;d{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(l,u);const d={dispose:s(()=>{this._callbacks&&(this._callbacks.remove(l,u),d.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(f)&&f.push(d),d}),this._event}fire(l){this._callbacks&&this._callbacks.invoke.call(this._callbacks,l)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}},s(o,"Emitter"),o);t.Emitter=a,a._noop=function(){}}}),pf=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(t){var l,u;Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e=zn(),r=gc(),n=jo(),a;(function(f){f.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),f.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function d(p){const m=p;return m&&(m===f.None||m===f.Cancelled||r.boolean(m.isCancellationRequested)&&!!m.onCancellationRequested)}s(d,"is"),f.is=d})(a||(t.CancellationToken=a={}));var i=Object.freeze(function(f,d){const p=(0,e.default)().timer.setTimeout(f.bind(d),0);return{dispose(){p.dispose()}}}),o=(l=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},s(l,"MutableToken"),l),c=(u=class{get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof o&&this._token.dispose():this._token=a.None}},s(u,"CancellationTokenSource"),u);t.CancellationTokenSource=c}}),gT=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(t){var P,S,R,I,$,A,b,O,M,L,j,F,te,U,Q,fe,de,pe,ye,Ne,he,J,Ue,le,He;Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;var e=gc(),r;(function(ve){ve.ParseError=-32700,ve.InvalidRequest=-32600,ve.MethodNotFound=-32601,ve.InvalidParams=-32602,ve.InternalError=-32603,ve.jsonrpcReservedErrorRangeStart=-32099,ve.serverErrorStart=-32099,ve.MessageWriteError=-32099,ve.MessageReadError=-32098,ve.PendingResponseRejected=-32097,ve.ConnectionInactive=-32096,ve.ServerNotInitialized=-32002,ve.UnknownErrorCode=-32001,ve.jsonrpcReservedErrorRangeEnd=-32e3,ve.serverErrorEnd=-32e3})(r||(t.ErrorCodes=r={}));var n=(P=class extends Error{constructor(x,ze,Xt){super(ze),this.code=e.number(x)?x:r.UnknownErrorCode,this.data=Xt,Object.setPrototypeOf(this,P.prototype)}toJson(){const x={code:this.code,message:this.message};return this.data!==void 0&&(x.data=this.data),x}},s(P,"ResponseError"),P);t.ResponseError=n;var a=(S=class{constructor(x){this.kind=x}static is(x){return x===S.auto||x===S.byName||x===S.byPosition}toString(){return this.kind}},s(S,"ParameterStructures"),S);t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");var i=(R=class{constructor(x,ze){this.method=x,this.numberOfParams=ze}get parameterStructures(){return a.auto}},s(R,"AbstractMessageSignature"),R);t.AbstractMessageSignature=i;var o=(I=class extends i{constructor(x){super(x,0)}},s(I,"RequestType0"),I);t.RequestType0=o;var c=($=class extends i{constructor(x,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s($,"RequestType"),$);t.RequestType=c;var l=(A=class extends i{constructor(x,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s(A,"RequestType1"),A);t.RequestType1=l;var u=(b=class extends i{constructor(x){super(x,2)}},s(b,"RequestType2"),b);t.RequestType2=u;var f=(O=class extends i{constructor(x){super(x,3)}},s(O,"RequestType3"),O);t.RequestType3=f;var d=(M=class extends i{constructor(x){super(x,4)}},s(M,"RequestType4"),M);t.RequestType4=d;var p=(L=class extends i{constructor(x){super(x,5)}},s(L,"RequestType5"),L);t.RequestType5=p;var m=(j=class extends i{constructor(x){super(x,6)}},s(j,"RequestType6"),j);t.RequestType6=m;var g=(F=class extends i{constructor(x){super(x,7)}},s(F,"RequestType7"),F);t.RequestType7=g;var v=(te=class extends i{constructor(x){super(x,8)}},s(te,"RequestType8"),te);t.RequestType8=v;var E=(U=class extends i{constructor(x){super(x,9)}},s(U,"RequestType9"),U);t.RequestType9=E;var T=(Q=class extends i{constructor(x,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s(Q,"NotificationType"),Q);t.NotificationType=T;var w=(fe=class extends i{constructor(x){super(x,0)}},s(fe,"NotificationType0"),fe);t.NotificationType0=w;var C=(de=class extends i{constructor(x,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s(de,"NotificationType1"),de);t.NotificationType1=C;var k=(pe=class extends i{constructor(x){super(x,2)}},s(pe,"NotificationType2"),pe);t.NotificationType2=k;var B=(ye=class extends i{constructor(x){super(x,3)}},s(ye,"NotificationType3"),ye);t.NotificationType3=B;var re=(Ne=class extends i{constructor(x){super(x,4)}},s(Ne,"NotificationType4"),Ne);t.NotificationType4=re;var X=(he=class extends i{constructor(x){super(x,5)}},s(he,"NotificationType5"),he);t.NotificationType5=X;var ge=(J=class extends i{constructor(x){super(x,6)}},s(J,"NotificationType6"),J);t.NotificationType6=ge;var _e=(Ue=class extends i{constructor(x){super(x,7)}},s(Ue,"NotificationType7"),Ue);t.NotificationType7=_e;var Ie=(le=class extends i{constructor(x){super(x,8)}},s(le,"NotificationType8"),le);t.NotificationType8=Ie;var oe=(He=class extends i{constructor(x){super(x,9)}},s(He,"NotificationType9"),He);t.NotificationType9=oe;var tt;(function(ve){function x(Nt){const Te=Nt;return Te&&e.string(Te.method)&&(e.string(Te.id)||e.number(Te.id))}s(x,"isRequest"),ve.isRequest=x;function ze(Nt){const Te=Nt;return Te&&e.string(Te.method)&&Nt.id===void 0}s(ze,"isNotification"),ve.isNotification=ze;function Xt(Nt){const Te=Nt;return Te&&(Te.result!==void 0||!!Te.error)&&(e.string(Te.id)||e.number(Te.id)||Te.id===null)}s(Xt,"isResponse"),ve.isResponse=Xt})(tt||(t.Message=tt={}))}}),yT=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(t){var i,o;var e;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0;var r;(function(c){c.None=0,c.First=1,c.AsOld=c.First,c.Last=2,c.AsNew=c.Last})(r||(t.Touch=r={}));var n=(i=class{constructor(){this[e]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var l;return(l=this._head)==null?void 0:l.value}get last(){var l;return(l=this._tail)==null?void 0:l.value}has(l){return this._map.has(l)}get(l,u=r.None){const f=this._map.get(l);if(f)return u!==r.None&&this.touch(f,u),f.value}set(l,u,f=r.None){let d=this._map.get(l);if(d)d.value=u,f!==r.None&&this.touch(d,f);else{switch(d={key:l,value:u,next:void 0,previous:void 0},f){case r.None:this.addItemLast(d);break;case r.First:this.addItemFirst(d);break;case r.Last:this.addItemLast(d);break;default:this.addItemLast(d);break}this._map.set(l,d),this._size++}return this}delete(l){return!!this.remove(l)}remove(l){const u=this._map.get(l);if(u)return this._map.delete(l),this.removeItem(u),this._size--,u.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const l=this._head;return this._map.delete(l.key),this.removeItem(l),this._size--,l.value}forEach(l,u){const f=this._state;let d=this._head;for(;d;){if(u?l.bind(u)(d.value,d.key,this):l(d.value,d.key,this),this._state!==f)throw new Error("LinkedMap got modified during iteration.");d=d.next}}keys(){const l=this._state;let u=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(u){const d={value:u.key,done:!1};return u=u.next,d}else return{value:void 0,done:!0}},"next")};return f}values(){const l=this._state;let u=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(u){const d={value:u.value,done:!1};return u=u.next,d}else return{value:void 0,done:!0}},"next")};return f}entries(){const l=this._state;let u=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(u){const d={value:[u.key,u.value],done:!1};return u=u.next,d}else return{value:void 0,done:!0}},"next")};return f}[(e=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(l){if(l>=this.size)return;if(l===0){this.clear();return}let u=this._head,f=this.size;for(;u&&f>l;)this._map.delete(u.key),u=u.next,f--;this._head=u,this._size=f,u&&(u.previous=void 0),this._state++}addItemFirst(l){if(!this._head&&!this._tail)this._tail=l;else if(this._head)l.next=this._head,this._head.previous=l;else throw new Error("Invalid list");this._head=l,this._state++}addItemLast(l){if(!this._head&&!this._tail)this._head=l;else if(this._tail)l.previous=this._tail,this._tail.next=l;else throw new Error("Invalid list");this._tail=l,this._state++}removeItem(l){if(l===this._head&&l===this._tail)this._head=void 0,this._tail=void 0;else if(l===this._head){if(!l.next)throw new Error("Invalid list");l.next.previous=void 0,this._head=l.next}else if(l===this._tail){if(!l.previous)throw new Error("Invalid list");l.previous.next=void 0,this._tail=l.previous}else{const u=l.next,f=l.previous;if(!u||!f)throw new Error("Invalid list");u.previous=f,f.next=u}l.next=void 0,l.previous=void 0,this._state++}touch(l,u){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(u!==r.First&&u!==r.Last)){if(u===r.First){if(l===this._head)return;const f=l.next,d=l.previous;l===this._tail?(d.next=void 0,this._tail=d):(f.previous=d,d.next=f),l.previous=void 0,l.next=this._head,this._head.previous=l,this._head=l,this._state++}else if(u===r.Last){if(l===this._tail)return;const f=l.next,d=l.previous;l===this._head?(f.previous=void 0,this._head=f):(f.previous=d,d.next=f),l.next=void 0,l.previous=this._tail,this._tail.next=l,this._tail=l,this._state++}}}toJSON(){const l=[];return this.forEach((u,f)=>{l.push([f,u])}),l}fromJSON(l){this.clear();for(const[u,f]of l)this.set(u,f)}},s(i,"LinkedMap"),i);t.LinkedMap=n;var a=(o=class extends n{constructor(l,u=1){super(),this._limit=l,this._ratio=Math.min(Math.max(0,u),1)}get limit(){return this._limit}set limit(l){this._limit=l,this.checkTrim()}get ratio(){return this._ratio}set ratio(l){this._ratio=Math.min(Math.max(0,l),1),this.checkTrim()}get(l,u=r.AsNew){return super.get(l,u)}peek(l){return super.get(l,r.None)}set(l,u){return super.set(l,u,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}},s(o,"LRUCache"),o);t.LRUCache=a}}),AN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0;var e;(function(r){function n(a){return{dispose:a}}s(n,"create"),r.create=n})(e||(t.Disposable=e={}))}}),EN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(t){var c,l,u,f;Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;var e=pf(),r;(function(d){d.Continue=0,d.Cancelled=1})(r||(r={}));var n=(c=class{constructor(){this.buffers=new Map}enableCancellation(p){if(p.id===null)return;const m=new SharedArrayBuffer(4),g=new Int32Array(m,0,1);g[0]=r.Continue,this.buffers.set(p.id,m),p.$cancellationData=m}async sendCancellation(p,m){const g=this.buffers.get(m);if(g===void 0)return;const v=new Int32Array(g,0,1);Atomics.store(v,0,r.Cancelled)}cleanup(p){this.buffers.delete(p)}dispose(){this.buffers.clear()}},s(c,"SharedArraySenderStrategy"),c);t.SharedArraySenderStrategy=n;var a=(l=class{constructor(p){this.data=new Int32Array(p,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s(l,"SharedArrayBufferCancellationToken"),l),i=(u=class{constructor(p){this.token=new a(p)}cancel(){}dispose(){}},s(u,"SharedArrayBufferCancellationTokenSource"),u),o=(f=class{constructor(){this.kind="request"}createCancellationTokenSource(p){const m=p.$cancellationData;return m===void 0?new e.CancellationTokenSource:new i(m)}},s(f,"SharedArrayReceiverStrategy"),f);t.SharedArrayReceiverStrategy=o}}),vT=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;var e=zn(),r=(n=class{constructor(i=1){if(i<=0)throw new Error("Capacity must be greater than 0");this._capacity=i,this._active=0,this._waiting=[]}lock(i){return new Promise((o,c)=>{this._waiting.push({thunk:i,resolve:o,reject:c}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,e.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;const i=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const o=i.thunk();o instanceof Promise?o.then(c=>{this._active--,i.resolve(c),this.runNext()},c=>{this._active--,i.reject(c),this.runNext()}):(this._active--,i.resolve(o),this.runNext())}catch(o){this._active--,i.reject(o),this.runNext()}}},s(n,"Semaphore"),n);t.Semaphore=r}}),_N=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(t){var u,f;Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;var e=zn(),r=gc(),n=jo(),a=vT(),i;(function(d){function p(m){let g=m;return g&&r.func(g.listen)&&r.func(g.dispose)&&r.func(g.onError)&&r.func(g.onClose)&&r.func(g.onPartialMessage)}s(p,"is"),d.is=p})(i||(t.MessageReader=i={}));var o=(u=class{constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter,this.partialMessageEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(p){this.errorEmitter.fire(this.asError(p))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(p){this.partialMessageEmitter.fire(p)}asError(p){return p instanceof Error?p:new Error(`Reader received error. Reason: ${r.string(p.message)?p.message:"unknown"}`)}},s(u,"AbstractMessageReader"),u);t.AbstractMessageReader=o;var c;(function(d){function p(m){let g,v;const E=new Map;let T;const w=new Map;if(m===void 0||typeof m=="string")g=m??"utf-8";else{if(g=m.charset??"utf-8",m.contentDecoder!==void 0&&(v=m.contentDecoder,E.set(v.name,v)),m.contentDecoders!==void 0)for(const C of m.contentDecoders)E.set(C.name,C);if(m.contentTypeDecoder!==void 0&&(T=m.contentTypeDecoder,w.set(T.name,T)),m.contentTypeDecoders!==void 0)for(const C of m.contentTypeDecoders)w.set(C.name,C)}return T===void 0&&(T=(0,e.default)().applicationJson.decoder,w.set(T.name,T)),{charset:g,contentDecoder:v,contentDecoders:E,contentTypeDecoder:T,contentTypeDecoders:w}}s(p,"fromOptions"),d.fromOptions=p})(c||(c={}));var l=(f=class extends o{constructor(p,m){super(),this.readable=p,this.options=c.fromOptions(m),this.buffer=(0,e.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new a.Semaphore(1)}set partialMessageTimeout(p){this._partialMessageTimeout=p}get partialMessageTimeout(){return this._partialMessageTimeout}listen(p){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=p;const m=this.readable.onData(g=>{this.onData(g)});return this.readable.onError(g=>this.fireError(g)),this.readable.onClose(()=>this.fireClose()),m}onData(p){try{for(this.buffer.append(p);;){if(this.nextMessageLength===-1){const g=this.buffer.tryReadHeaders(!0);if(!g)return;const v=g.get("content-length");if(!v){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(g))}`));return}const E=parseInt(v);if(isNaN(E)){this.fireError(new Error(`Content-Length value must be a number. Got ${v}`));return}this.nextMessageLength=E}const m=this.buffer.tryReadBody(this.nextMessageLength);if(m===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const g=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(m):m,v=await this.options.contentTypeDecoder.decode(g,this.options);this.callback(v)}).catch(g=>{this.fireError(g)})}}catch(m){this.fireError(m)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,e.default)().timer.setTimeout((p,m)=>{this.partialMessageTimer=void 0,p===this.messageToken&&(this.firePartialMessage({messageToken:p,waitingTime:m}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}},s(f,"ReadableStreamMessageReader"),f);t.ReadableStreamMessageReader=l}}),CN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(t){var d,p;Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;var e=zn(),r=gc(),n=vT(),a=jo(),i="Content-Length: ",o=`\r +`,c;(function(m){function g(v){let E=v;return E&&r.func(E.dispose)&&r.func(E.onClose)&&r.func(E.onError)&&r.func(E.write)}s(g,"is"),m.is=g})(c||(t.MessageWriter=c={}));var l=(d=class{constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(g,v,E){this.errorEmitter.fire([this.asError(g),v,E])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(g){return g instanceof Error?g:new Error(`Writer received error. Reason: ${r.string(g.message)?g.message:"unknown"}`)}},s(d,"AbstractMessageWriter"),d);t.AbstractMessageWriter=l;var u;(function(m){function g(v){return v===void 0||typeof v=="string"?{charset:v??"utf-8",contentTypeEncoder:(0,e.default)().applicationJson.encoder}:{charset:v.charset??"utf-8",contentEncoder:v.contentEncoder,contentTypeEncoder:v.contentTypeEncoder??(0,e.default)().applicationJson.encoder}}s(g,"fromOptions"),m.fromOptions=g})(u||(u={}));var f=(p=class extends l{constructor(g,v){super(),this.writable=g,this.options=u.fromOptions(v),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(E=>this.fireError(E)),this.writable.onClose(()=>this.fireClose())}async write(g){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(g,this.options).then(E=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(E):E).then(E=>{const T=[];return T.push(i,E.byteLength.toString(),o),T.push(o),this.doWrite(g,T,E)},E=>{throw this.fireError(E),E}))}async doWrite(g,v,E){try{return await this.writable.write(v.join(""),"ascii"),this.writable.write(E)}catch(T){return this.handleError(T,g),Promise.reject(T)}}handleError(g,v){this.errorCount++,this.fireError(g,v,this.errorCount)}end(){this.writable.end()}},s(p,"WriteableStreamMessageWriter"),p);t.WriteableStreamMessageWriter=f}}),SN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;var e=13,r=10,n=`\r +`,a=(i=class{constructor(c="utf-8"){this._encoding=c,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(c){const l=typeof c=="string"?this.fromString(c,this._encoding):c;this._chunks.push(l),this._totalLength+=l.byteLength}tryReadHeaders(c=!1){if(this._chunks.length===0)return;let l=0,u=0,f=0,d=0;e:for(;uthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===c){const d=this._chunks[0];return this._chunks.shift(),this._totalLength-=c,this.asNative(d)}if(this._chunks[0].byteLength>c){const d=this._chunks[0],p=this.asNative(d,c);return this._chunks[0]=d.slice(c),this._totalLength-=c,p}const l=this.allocNative(c);let u=0,f=0;for(;c>0;){const d=this._chunks[f];if(d.byteLength>c){const p=d.slice(0,c);l.set(p,u),u+=c,this._chunks[f]=d.slice(c),this._totalLength-=c,c-=c}else l.set(d,u),u+=d.byteLength,this._chunks.shift(),this._totalLength-=d.byteLength,c-=d.byteLength}return l}},s(i,"AbstractMessageBuffer"),i);t.AbstractMessageBuffer=a}}),bN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(t){var P,S;Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;var e=zn(),r=gc(),n=gT(),a=yT(),i=jo(),o=pf(),c;(function(R){R.type=new n.NotificationType("$/cancelRequest")})(c||(c={}));var l;(function(R){function I($){return typeof $=="string"||typeof $=="number"}s(I,"is"),R.is=I})(l||(t.ProgressToken=l={}));var u;(function(R){R.type=new n.NotificationType("$/progress")})(u||(u={}));var f=(P=class{constructor(){}},s(P,"ProgressType"),P);t.ProgressType=f;var d;(function(R){function I($){return r.func($)}s(I,"is"),R.is=I})(d||(d={})),t.NullLogger=Object.freeze({error:s(()=>{},"error"),warn:s(()=>{},"warn"),info:s(()=>{},"info"),log:s(()=>{},"log")});var p;(function(R){R[R.Off=0]="Off",R[R.Messages=1]="Messages",R[R.Compact=2]="Compact",R[R.Verbose=3]="Verbose"})(p||(t.Trace=p={}));var m;(function(R){R.Off="off",R.Messages="messages",R.Compact="compact",R.Verbose="verbose"})(m||(t.TraceValues=m={})),function(R){function I(A){if(!r.string(A))return R.Off;switch(A=A.toLowerCase(),A){case"off":return R.Off;case"messages":return R.Messages;case"compact":return R.Compact;case"verbose":return R.Verbose;default:return R.Off}}s(I,"fromString"),R.fromString=I;function $(A){switch(A){case R.Off:return"off";case R.Messages:return"messages";case R.Compact:return"compact";case R.Verbose:return"verbose";default:return"off"}}s($,"toString"),R.toString=$}(p||(t.Trace=p={}));var g;(function(R){R.Text="text",R.JSON="json"})(g||(t.TraceFormat=g={})),function(R){function I($){return r.string($)?($=$.toLowerCase(),$==="json"?R.JSON:R.Text):R.Text}s(I,"fromString"),R.fromString=I}(g||(t.TraceFormat=g={}));var v;(function(R){R.type=new n.NotificationType("$/setTrace")})(v||(t.SetTraceNotification=v={}));var E;(function(R){R.type=new n.NotificationType("$/logTrace")})(E||(t.LogTraceNotification=E={}));var T;(function(R){R[R.Closed=1]="Closed",R[R.Disposed=2]="Disposed",R[R.AlreadyListening=3]="AlreadyListening"})(T||(t.ConnectionErrors=T={}));var w=(S=class extends Error{constructor(I,$){super($),this.code=I,Object.setPrototypeOf(this,S.prototype)}},s(S,"ConnectionError"),S);t.ConnectionError=w;var C;(function(R){function I($){const A=$;return A&&r.func(A.cancelUndispatched)}s(I,"is"),R.is=I})(C||(t.ConnectionStrategy=C={}));var k;(function(R){function I($){const A=$;return A&&(A.kind===void 0||A.kind==="id")&&r.func(A.createCancellationTokenSource)&&(A.dispose===void 0||r.func(A.dispose))}s(I,"is"),R.is=I})(k||(t.IdCancellationReceiverStrategy=k={}));var B;(function(R){function I($){const A=$;return A&&A.kind==="request"&&r.func(A.createCancellationTokenSource)&&(A.dispose===void 0||r.func(A.dispose))}s(I,"is"),R.is=I})(B||(t.RequestCancellationReceiverStrategy=B={}));var re;(function(R){R.Message=Object.freeze({createCancellationTokenSource($){return new o.CancellationTokenSource}});function I($){return k.is($)||B.is($)}s(I,"is"),R.is=I})(re||(t.CancellationReceiverStrategy=re={}));var X;(function(R){R.Message=Object.freeze({sendCancellation($,A){return $.sendNotification(c.type,{id:A})},cleanup($){}});function I($){const A=$;return A&&r.func(A.sendCancellation)&&r.func(A.cleanup)}s(I,"is"),R.is=I})(X||(t.CancellationSenderStrategy=X={}));var ge;(function(R){R.Message=Object.freeze({receiver:re.Message,sender:X.Message});function I($){const A=$;return A&&re.is(A.receiver)&&X.is(A.sender)}s(I,"is"),R.is=I})(ge||(t.CancellationStrategy=ge={}));var _e;(function(R){function I($){const A=$;return A&&r.func(A.handleMessage)}s(I,"is"),R.is=I})(_e||(t.MessageStrategy=_e={}));var Ie;(function(R){function I($){const A=$;return A&&(ge.is(A.cancellationStrategy)||C.is(A.connectionStrategy)||_e.is(A.messageStrategy))}s(I,"is"),R.is=I})(Ie||(t.ConnectionOptions=Ie={}));var oe;(function(R){R[R.New=1]="New",R[R.Listening=2]="Listening",R[R.Closed=3]="Closed",R[R.Disposed=4]="Disposed"})(oe||(oe={}));function tt(R,I,$,A){const b=$!==void 0?$:t.NullLogger;let O=0,M=0,L=0;const j="2.0";let F;const te=new Map;let U;const Q=new Map,fe=new Map;let de,pe=new a.LinkedMap,ye=new Map,Ne=new Set,he=new Map,J=p.Off,Ue=g.Text,le,He=oe.New;const ve=new i.Emitter,x=new i.Emitter,ze=new i.Emitter,Xt=new i.Emitter,Nt=new i.Emitter,Te=A&&A.cancellationStrategy?A.cancellationStrategy:ge.Message;function ca(y){if(y===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+y.toString()}s(ca,"createRequestQueueKey");function Jo(y){return y===null?"res-unknown-"+(++L).toString():"res-"+y.toString()}s(Jo,"createResponseQueueKey");function Zo(){return"not-"+(++M).toString()}s(Zo,"createNotificationQueueKey");function Qo(y,N){n.Message.isRequest(N)?y.set(ca(N.id),N):n.Message.isResponse(N)?y.set(Jo(N.id),N):y.set(Zo(),N)}s(Qo,"addMessageToQueue");function el(y){}s(el,"cancelUndispatched");function ua(){return He===oe.Listening}s(ua,"isListening");function fa(){return He===oe.Closed}s(fa,"isClosed");function Jt(){return He===oe.Disposed}s(Jt,"isDisposed");function da(){(He===oe.New||He===oe.Listening)&&(He=oe.Closed,x.fire(void 0))}s(da,"closeHandler");function tl(y){ve.fire([y,void 0,void 0])}s(tl,"readErrorHandler");function rl(y){ve.fire(y)}s(rl,"writeErrorHandler"),R.onClose(da),R.onError(tl),I.onClose(da),I.onError(rl);function pa(){de||pe.size===0||(de=(0,e.default)().timer.setImmediate(()=>{de=void 0,nl()}))}s(pa,"triggerMessageQueue");function ha(y){n.Message.isRequest(y)?al(y):n.Message.isNotification(y)?sl(y):n.Message.isResponse(y)?il(y):ol(y)}s(ha,"handleMessage");function nl(){if(pe.size===0)return;const y=pe.shift();try{const N=A==null?void 0:A.messageStrategy;_e.is(N)?N.handleMessage(y,ha):ha(y)}finally{pa()}}s(nl,"processMessageQueue");const Mc=s(y=>{try{if(n.Message.isNotification(y)&&y.method===c.type.method){const N=y.params.id,D=ca(N),G=pe.get(D);if(n.Message.isRequest(G)){const me=A==null?void 0:A.connectionStrategy,Re=me&&me.cancelUndispatched?me.cancelUndispatched(G,el):void 0;if(Re&&(Re.error!==void 0||Re.result!==void 0)){pe.delete(D),he.delete(N),Re.id=G.id,Gr(Re,y.method,Date.now()),I.write(Re).catch(()=>b.error("Sending response for canceled message failed."));return}}const Ce=he.get(N);if(Ce!==void 0){Ce.cancel(),an(y);return}else Ne.add(N)}Qo(pe,y)}finally{pa()}},"callback");function al(y){if(Jt())return;function N(ne,Le,ce){const Ke={jsonrpc:j,id:y.id};ne instanceof n.ResponseError?Ke.error=ne.toJson():Ke.result=ne===void 0?null:ne,Gr(Ke,Le,ce),I.write(Ke).catch(()=>b.error("Sending response failed."))}s(N,"reply");function D(ne,Le,ce){const Ke={jsonrpc:j,id:y.id,error:ne.toJson()};Gr(Ke,Le,ce),I.write(Ke).catch(()=>b.error("Sending response failed."))}s(D,"replyError");function G(ne,Le,ce){ne===void 0&&(ne=null);const Ke={jsonrpc:j,id:y.id,result:ne};Gr(Ke,Le,ce),I.write(Ke).catch(()=>b.error("Sending response failed."))}s(G,"replySuccess"),ul(y);const Ce=te.get(y.method);let me,Re;Ce&&(me=Ce.type,Re=Ce.handler);const Ge=Date.now();if(Re||F){const ne=y.id??String(Date.now()),Le=k.is(Te.receiver)?Te.receiver.createCancellationTokenSource(ne):Te.receiver.createCancellationTokenSource(y);y.id!==null&&Ne.has(y.id)&&Le.cancel(),y.id!==null&&he.set(ne,Le);try{let ce;if(Re)if(y.params===void 0){if(me!==void 0&&me.numberOfParams!==0){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines ${me.numberOfParams} params but received none.`),y.method,Ge);return}ce=Re(Le.token)}else if(Array.isArray(y.params)){if(me!==void 0&&me.parameterStructures===n.ParameterStructures.byName){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by name but received parameters by position`),y.method,Ge);return}ce=Re(...y.params,Le.token)}else{if(me!==void 0&&me.parameterStructures===n.ParameterStructures.byPosition){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by position but received parameters by name`),y.method,Ge);return}ce=Re(y.params,Le.token)}else F&&(ce=F(y.method,y.params,Le.token));const Ke=ce;ce?Ke.then?Ke.then(rt=>{he.delete(ne),N(rt,y.method,Ge)},rt=>{he.delete(ne),rt instanceof n.ResponseError?D(rt,y.method,Ge):rt&&r.string(rt.message)?D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${rt.message}`),y.method,Ge):D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,Ge)}):(he.delete(ne),N(ce,y.method,Ge)):(he.delete(ne),G(ce,y.method,Ge))}catch(ce){he.delete(ne),ce instanceof n.ResponseError?N(ce,y.method,Ge):ce&&r.string(ce.message)?D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${ce.message}`),y.method,Ge):D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,Ge)}}else D(new n.ResponseError(n.ErrorCodes.MethodNotFound,`Unhandled method ${y.method}`),y.method,Ge)}s(al,"handleRequest");function il(y){if(!Jt())if(y.id===null)y.error?b.error(`Received response message without id: Error is: +${JSON.stringify(y.error,void 0,4)}`):b.error("Received response message without id. No further error information provided.");else{const N=y.id,D=ye.get(N);if(fl(y,D),D!==void 0){ye.delete(N);try{if(y.error){const G=y.error;D.reject(new n.ResponseError(G.code,G.message,G.data))}else if(y.result!==void 0)D.resolve(y.result);else throw new Error("Should never happen.")}catch(G){G.message?b.error(`Response handler '${D.method}' failed with message: ${G.message}`):b.error(`Response handler '${D.method}' failed unexpectedly.`)}}}}s(il,"handleResponse");function sl(y){if(Jt())return;let N,D;if(y.method===c.type.method){const G=y.params.id;Ne.delete(G),an(y);return}else{const G=Q.get(y.method);G&&(D=G.handler,N=G.type)}if(D||U)try{if(an(y),D)if(y.params===void 0)N!==void 0&&N.numberOfParams!==0&&N.parameterStructures!==n.ParameterStructures.byName&&b.error(`Notification ${y.method} defines ${N.numberOfParams} params but received none.`),D();else if(Array.isArray(y.params)){const G=y.params;y.method===u.type.method&&G.length===2&&l.is(G[0])?D({token:G[0],value:G[1]}):(N!==void 0&&(N.parameterStructures===n.ParameterStructures.byName&&b.error(`Notification ${y.method} defines parameters by name but received parameters by position`),N.numberOfParams!==y.params.length&&b.error(`Notification ${y.method} defines ${N.numberOfParams} params but received ${G.length} arguments`)),D(...G))}else N!==void 0&&N.parameterStructures===n.ParameterStructures.byPosition&&b.error(`Notification ${y.method} defines parameters by position but received parameters by name`),D(y.params);else U&&U(y.method,y.params)}catch(G){G.message?b.error(`Notification handler '${y.method}' failed with message: ${G.message}`):b.error(`Notification handler '${y.method}' failed unexpectedly.`)}else ze.fire(y)}s(sl,"handleNotification");function ol(y){if(!y){b.error("Received empty message.");return}b.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(y,null,4)}`);const N=y;if(r.string(N.id)||r.number(N.id)){const D=N.id,G=ye.get(D);G&&G.reject(new Error("The received response has neither a result nor an error property."))}}s(ol,"handleInvalidMessage");function kt(y){if(y!=null)switch(J){case p.Verbose:return JSON.stringify(y,null,4);case p.Compact:return JSON.stringify(y);default:return}}s(kt,"stringifyTrace");function ll(y){if(!(J===p.Off||!le))if(Ue===g.Text){let N;(J===p.Verbose||J===p.Compact)&&y.params&&(N=`Params: ${kt(y.params)} + +`),le.log(`Sending request '${y.method} - (${y.id})'.`,N)}else Zt("send-request",y)}s(ll,"traceSendingRequest");function cl(y){if(!(J===p.Off||!le))if(Ue===g.Text){let N;(J===p.Verbose||J===p.Compact)&&(y.params?N=`Params: ${kt(y.params)} + +`:N=`No parameters provided. + +`),le.log(`Sending notification '${y.method}'.`,N)}else Zt("send-notification",y)}s(cl,"traceSendingNotification");function Gr(y,N,D){if(!(J===p.Off||!le))if(Ue===g.Text){let G;(J===p.Verbose||J===p.Compact)&&(y.error&&y.error.data?G=`Error data: ${kt(y.error.data)} + +`:y.result?G=`Result: ${kt(y.result)} + +`:y.error===void 0&&(G=`No result returned. + +`)),le.log(`Sending response '${N} - (${y.id})'. Processing request took ${Date.now()-D}ms`,G)}else Zt("send-response",y)}s(Gr,"traceSendingResponse");function ul(y){if(!(J===p.Off||!le))if(Ue===g.Text){let N;(J===p.Verbose||J===p.Compact)&&y.params&&(N=`Params: ${kt(y.params)} + +`),le.log(`Received request '${y.method} - (${y.id})'.`,N)}else Zt("receive-request",y)}s(ul,"traceReceivedRequest");function an(y){if(!(J===p.Off||!le||y.method===E.type.method))if(Ue===g.Text){let N;(J===p.Verbose||J===p.Compact)&&(y.params?N=`Params: ${kt(y.params)} + +`:N=`No parameters provided. + +`),le.log(`Received notification '${y.method}'.`,N)}else Zt("receive-notification",y)}s(an,"traceReceivedNotification");function fl(y,N){if(!(J===p.Off||!le))if(Ue===g.Text){let D;if((J===p.Verbose||J===p.Compact)&&(y.error&&y.error.data?D=`Error data: ${kt(y.error.data)} + +`:y.result?D=`Result: ${kt(y.result)} + +`:y.error===void 0&&(D=`No result returned. + +`)),N){const G=y.error?` Request failed: ${y.error.message} (${y.error.code}).`:"";le.log(`Received response '${N.method} - (${y.id})' in ${Date.now()-N.timerStart}ms.${G}`,D)}else le.log(`Received response ${y.id} without active response promise.`,D)}else Zt("receive-response",y)}s(fl,"traceReceivedResponse");function Zt(y,N){if(!le||J===p.Off)return;const D={isLSPMessage:!0,type:y,message:N,timestamp:Date.now()};le.log(D)}s(Zt,"logLSPMessage");function yr(){if(fa())throw new w(T.Closed,"Connection is closed.");if(Jt())throw new w(T.Disposed,"Connection is disposed.")}s(yr,"throwIfClosedOrDisposed");function dl(){if(ua())throw new w(T.AlreadyListening,"Connection is already listening")}s(dl,"throwIfListening");function pl(){if(!ua())throw new Error("Call listen() first.")}s(pl,"throwIfNotListening");function h(y){return y===void 0?null:y}s(h,"undefinedToNull");function se(y){if(y!==null)return y}s(se,"nullToUndefined");function ke(y){return y!=null&&!Array.isArray(y)&&typeof y=="object"}s(ke,"isNamedParam");function H(y,N){switch(y){case n.ParameterStructures.auto:return ke(N)?se(N):[h(N)];case n.ParameterStructures.byName:if(!ke(N))throw new Error("Received parameters by name but param is not an object literal.");return se(N);case n.ParameterStructures.byPosition:return[h(N)];default:throw new Error(`Unknown parameter structure ${y.toString()}`)}}s(H,"computeSingleParam");function Oe(y,N){let D;const G=y.numberOfParams;switch(G){case 0:D=void 0;break;case 1:D=H(y.parameterStructures,N[0]);break;default:D=[];for(let Ce=0;Ce{yr();let D,G;if(r.string(y)){D=y;const me=N[0];let Re=0,Ge=n.ParameterStructures.auto;n.ParameterStructures.is(me)&&(Re=1,Ge=me);let ne=N.length;const Le=ne-Re;switch(Le){case 0:G=void 0;break;case 1:G=H(Ge,N[Re]);break;default:if(Ge===n.ParameterStructures.byName)throw new Error(`Received ${Le} parameters for 'by Name' notification parameter structure.`);G=N.slice(Re,ne).map(ce=>h(ce));break}}else{const me=N;D=y.method,G=Oe(y,me)}const Ce={jsonrpc:j,method:D,params:G};return cl(Ce),I.write(Ce).catch(me=>{throw b.error("Sending notification failed."),me})},"sendNotification"),onNotification:s((y,N)=>{yr();let D;return r.func(y)?U=y:N&&(r.string(y)?(D=y,Q.set(y,{type:void 0,handler:N})):(D=y.method,Q.set(y.method,{type:y,handler:N}))),{dispose:s(()=>{D!==void 0?Q.delete(D):U=void 0},"dispose")}},"onNotification"),onProgress:s((y,N,D)=>{if(fe.has(N))throw new Error(`Progress handler for token ${N} already registered`);return fe.set(N,D),{dispose:s(()=>{fe.delete(N)},"dispose")}},"onProgress"),sendProgress:s((y,N,D)=>ma.sendNotification(u.type,{token:N,value:D}),"sendProgress"),onUnhandledProgress:Xt.event,sendRequest:s((y,...N)=>{yr(),pl();let D,G,Ce;if(r.string(y)){D=y;const ne=N[0],Le=N[N.length-1];let ce=0,Ke=n.ParameterStructures.auto;n.ParameterStructures.is(ne)&&(ce=1,Ke=ne);let rt=N.length;o.CancellationToken.is(Le)&&(rt=rt-1,Ce=Le);const Qt=rt-ce;switch(Qt){case 0:G=void 0;break;case 1:G=H(Ke,N[ce]);break;default:if(Ke===n.ParameterStructures.byName)throw new Error(`Received ${Qt} parameters for 'by Name' request parameter structure.`);G=N.slice(ce,rt).map(hN=>h(hN));break}}else{const ne=N;D=y.method,G=Oe(y,ne);const Le=y.numberOfParams;Ce=o.CancellationToken.is(ne[Le])?ne[Le]:void 0}const me=O++;let Re;Ce&&(Re=Ce.onCancellationRequested(()=>{const ne=Te.sender.sendCancellation(ma,me);return ne===void 0?(b.log(`Received no promise from cancellation strategy when cancelling id ${me}`),Promise.resolve()):ne.catch(()=>{b.log(`Sending cancellation messages for id ${me} failed`)})}));const Ge={jsonrpc:j,id:me,method:D,params:G};return ll(Ge),typeof Te.sender.enableCancellation=="function"&&Te.sender.enableCancellation(Ge),new Promise(async(ne,Le)=>{const ce=s(Qt=>{ne(Qt),Te.sender.cleanup(me),Re==null||Re.dispose()},"resolveWithCleanup"),Ke=s(Qt=>{Le(Qt),Te.sender.cleanup(me),Re==null||Re.dispose()},"rejectWithCleanup"),rt={method:D,timerStart:Date.now(),resolve:ce,reject:Ke};try{await I.write(Ge),ye.set(me,rt)}catch(Qt){throw b.error("Sending request failed."),rt.reject(new n.ResponseError(n.ErrorCodes.MessageWriteError,Qt.message?Qt.message:"Unknown reason")),Qt}})},"sendRequest"),onRequest:s((y,N)=>{yr();let D=null;return d.is(y)?(D=void 0,F=y):r.string(y)?(D=null,N!==void 0&&(D=y,te.set(y,{handler:N,type:void 0}))):N!==void 0&&(D=y.method,te.set(y.method,{type:y,handler:N})),{dispose:s(()=>{D!==null&&(D!==void 0?te.delete(D):F=void 0)},"dispose")}},"onRequest"),hasPendingResponse:s(()=>ye.size>0,"hasPendingResponse"),trace:s(async(y,N,D)=>{let G=!1,Ce=g.Text;D!==void 0&&(r.boolean(D)?G=D:(G=D.sendNotification||!1,Ce=D.traceFormat||g.Text)),J=y,Ue=Ce,J===p.Off?le=void 0:le=N,G&&!fa()&&!Jt()&&await ma.sendNotification(v.type,{value:p.toString(y)})},"trace"),onError:ve.event,onClose:x.event,onUnhandledNotification:ze.event,onDispose:Nt.event,end:s(()=>{I.end()},"end"),dispose:s(()=>{if(Jt())return;He=oe.Disposed,Nt.fire(void 0);const y=new n.ResponseError(n.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const N of ye.values())N.reject(y);ye=new Map,he=new Map,Ne=new Set,pe=new a.LinkedMap,r.func(I.dispose)&&I.dispose(),r.func(R.dispose)&&R.dispose()},"dispose"),listen:s(()=>{yr(),dl(),He=oe.Listening,R.listen(Mc)},"listen"),inspect:s(()=>{(0,e.default)().console.log("inspect")},"inspect")};return ma.onNotification(E.type,y=>{if(J===p.Off||!le)return;const N=J===p.Verbose||J===p.Compact;le.log(y.message,N?y.verbose:void 0)}),ma.onNotification(u.type,y=>{const N=fe.get(y.token);N?N(y.value):Xt.fire(y)}),ma}s(tt,"createMessageConnection"),t.createMessageConnection=tt}}),Kp=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;var e=gT();Object.defineProperty(t,"Message",{enumerable:!0,get:s(function(){return e.Message},"get")}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:s(function(){return e.RequestType},"get")}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:s(function(){return e.RequestType0},"get")}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:s(function(){return e.RequestType1},"get")}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:s(function(){return e.RequestType2},"get")}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:s(function(){return e.RequestType3},"get")}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:s(function(){return e.RequestType4},"get")}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:s(function(){return e.RequestType5},"get")}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:s(function(){return e.RequestType6},"get")}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:s(function(){return e.RequestType7},"get")}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:s(function(){return e.RequestType8},"get")}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:s(function(){return e.RequestType9},"get")}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:s(function(){return e.ResponseError},"get")}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:s(function(){return e.ErrorCodes},"get")}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:s(function(){return e.NotificationType},"get")}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:s(function(){return e.NotificationType0},"get")}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:s(function(){return e.NotificationType1},"get")}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:s(function(){return e.NotificationType2},"get")}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:s(function(){return e.NotificationType3},"get")}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:s(function(){return e.NotificationType4},"get")}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:s(function(){return e.NotificationType5},"get")}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:s(function(){return e.NotificationType6},"get")}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:s(function(){return e.NotificationType7},"get")}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:s(function(){return e.NotificationType8},"get")}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:s(function(){return e.NotificationType9},"get")}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:s(function(){return e.ParameterStructures},"get")});var r=yT();Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:s(function(){return r.LinkedMap},"get")}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:s(function(){return r.LRUCache},"get")}),Object.defineProperty(t,"Touch",{enumerable:!0,get:s(function(){return r.Touch},"get")});var n=AN();Object.defineProperty(t,"Disposable",{enumerable:!0,get:s(function(){return n.Disposable},"get")});var a=jo();Object.defineProperty(t,"Event",{enumerable:!0,get:s(function(){return a.Event},"get")}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:s(function(){return a.Emitter},"get")});var i=pf();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:s(function(){return i.CancellationTokenSource},"get")}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:s(function(){return i.CancellationToken},"get")});var o=EN();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:s(function(){return o.SharedArraySenderStrategy},"get")}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:s(function(){return o.SharedArrayReceiverStrategy},"get")});var c=_N();Object.defineProperty(t,"MessageReader",{enumerable:!0,get:s(function(){return c.MessageReader},"get")}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:s(function(){return c.AbstractMessageReader},"get")}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:s(function(){return c.ReadableStreamMessageReader},"get")});var l=CN();Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:s(function(){return l.MessageWriter},"get")}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:s(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:s(function(){return l.WriteableStreamMessageWriter},"get")});var u=SN();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:s(function(){return u.AbstractMessageBuffer},"get")});var f=bN();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:s(function(){return f.ConnectionStrategy},"get")}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:s(function(){return f.ConnectionOptions},"get")}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:s(function(){return f.NullLogger},"get")}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:s(function(){return f.createMessageConnection},"get")}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:s(function(){return f.ProgressToken},"get")}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:s(function(){return f.ProgressType},"get")}),Object.defineProperty(t,"Trace",{enumerable:!0,get:s(function(){return f.Trace},"get")}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:s(function(){return f.TraceValues},"get")}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:s(function(){return f.TraceFormat},"get")}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:s(function(){return f.SetTraceNotification},"get")}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:s(function(){return f.LogTraceNotification},"get")}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:s(function(){return f.ConnectionErrors},"get")}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:s(function(){return f.ConnectionError},"get")}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:s(function(){return f.CancellationReceiverStrategy},"get")}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:s(function(){return f.CancellationSenderStrategy},"get")}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:s(function(){return f.CancellationStrategy},"get")}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:s(function(){return f.MessageStrategy},"get")});var d=zn();t.RAL=d.default}}),wN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(t){var l,u,f;Object.defineProperty(t,"__esModule",{value:!0});var e=Kp(),r=(l=class extends e.AbstractMessageBuffer{constructor(p="utf-8"){super(p),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return l.emptyBuffer}fromString(p,m){return new TextEncoder().encode(p)}toString(p,m){return m==="ascii"?this.asciiDecoder.decode(p):new TextDecoder(m).decode(p)}asNative(p,m){return m===void 0?p:p.slice(0,m)}allocNative(p){return new Uint8Array(p)}},s(l,"MessageBuffer"),l);r.emptyBuffer=new Uint8Array(0);var n=(u=class{constructor(p){this.socket=p,this._onData=new e.Emitter,this._messageListener=m=>{m.data.arrayBuffer().then(v=>{this._onData.fire(new Uint8Array(v))},()=>{(0,e.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(p){return this.socket.addEventListener("close",p),e.Disposable.create(()=>this.socket.removeEventListener("close",p))}onError(p){return this.socket.addEventListener("error",p),e.Disposable.create(()=>this.socket.removeEventListener("error",p))}onEnd(p){return this.socket.addEventListener("end",p),e.Disposable.create(()=>this.socket.removeEventListener("end",p))}onData(p){return this._onData.event(p)}},s(u,"ReadableStreamWrapper"),u),a=(f=class{constructor(p){this.socket=p}onClose(p){return this.socket.addEventListener("close",p),e.Disposable.create(()=>this.socket.removeEventListener("close",p))}onError(p){return this.socket.addEventListener("error",p),e.Disposable.create(()=>this.socket.removeEventListener("error",p))}onEnd(p){return this.socket.addEventListener("end",p),e.Disposable.create(()=>this.socket.removeEventListener("end",p))}write(p,m){if(typeof p=="string"){if(m!==void 0&&m!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${m}`);this.socket.send(p)}else this.socket.send(p);return Promise.resolve()}end(){this.socket.close()}},s(f,"WritableStreamWrapper"),f),i=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:s(d=>new r(d),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:s((d,p)=>{if(p.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${p.charset}`);return Promise.resolve(i.encode(JSON.stringify(d,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:s((d,p)=>{if(!(d instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(p.charset).decode(d)))},"decode")})}),stream:Object.freeze({asReadableStream:s(d=>new n(d),"asReadableStream"),asWritableStream:s(d=>new a(d),"asWritableStream")}),console,timer:Object.freeze({setTimeout(d,p,...m){const g=setTimeout(d,p,...m);return{dispose:s(()=>clearTimeout(g),"dispose")}},setImmediate(d,...p){const m=setTimeout(d,0,...p);return{dispose:s(()=>clearTimeout(m),"dispose")}},setInterval(d,p,...m){const g=setInterval(d,p,...m);return{dispose:s(()=>clearInterval(g),"dispose")}}})});function c(){return o}s(c,"RIL"),function(d){function p(){e.RAL.install(o)}s(p,"install"),d.install=p}(c||(c={})),t.default=c}}),Uo=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(t){var l,u;var e=t&&t.__createBinding||(Object.create?function(f,d,p,m){m===void 0&&(m=p);var g=Object.getOwnPropertyDescriptor(d,p);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:s(function(){return d[p]},"get")}),Object.defineProperty(f,m,g)}:function(f,d,p,m){m===void 0&&(m=p),f[m]=d[p]}),r=t&&t.__exportStar||function(f,d){for(var p in f)p!=="default"&&!Object.prototype.hasOwnProperty.call(d,p)&&e(d,f,p)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0;var n=wN();n.default.install();var a=Kp();r(Kp(),t);var i=(l=class extends a.AbstractMessageReader{constructor(d){super(),this._onData=new a.Emitter,this._messageListener=p=>{this._onData.fire(p.data)},d.addEventListener("error",p=>this.fireError(p)),d.onmessage=this._messageListener}listen(d){return this._onData.event(d)}},s(l,"BrowserMessageReader"),l);t.BrowserMessageReader=i;var o=(u=class extends a.AbstractMessageWriter{constructor(d){super(),this.port=d,this.errorCount=0,d.addEventListener("error",p=>this.fireError(p))}write(d){try{return this.port.postMessage(d),Promise.resolve()}catch(p){return this.handleError(p,d),Promise.reject(p)}}handleError(d,p){this.errorCount++,this.fireError(d,p,this.errorCount)}end(){}},s(u,"BrowserMessageWriter"),u);t.BrowserMessageWriter=o;function c(f,d,p,m){return p===void 0&&(p=a.NullLogger),a.ConnectionStrategy.is(m)&&(m={connectionStrategy:m}),(0,a.createMessageConnection)(f,d,p,m)}s(c,"createMessageConnection"),t.createMessageConnection=c}}),Cy=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(t,e){e.exports=Uo()}}),Me=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(t){var l,u,f,d,p;Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;var e=Uo(),r;(function(m){m.clientToServer="clientToServer",m.serverToClient="serverToClient",m.both="both"})(r||(t.MessageDirection=r={}));var n=(l=class{constructor(g){this.method=g}},s(l,"RegistrationType"),l);t.RegistrationType=n;var a=(u=class extends e.RequestType0{constructor(g){super(g)}},s(u,"ProtocolRequestType0"),u);t.ProtocolRequestType0=a;var i=(f=class extends e.RequestType{constructor(g){super(g,e.ParameterStructures.byName)}},s(f,"ProtocolRequestType"),f);t.ProtocolRequestType=i;var o=(d=class extends e.NotificationType0{constructor(g){super(g)}},s(d,"ProtocolNotificationType0"),d);t.ProtocolNotificationType0=o;var c=(p=class extends e.NotificationType{constructor(g){super(g,e.ParameterStructures.byName)}},s(p,"ProtocolNotificationType"),p);t.ProtocolNotificationType=c}}),zh=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function e(f){return f===!0||f===!1}s(e,"boolean"),t.boolean=e;function r(f){return typeof f=="string"||f instanceof String}s(r,"string"),t.string=r;function n(f){return typeof f=="number"||f instanceof Number}s(n,"number"),t.number=n;function a(f){return f instanceof Error}s(a,"error"),t.error=a;function i(f){return typeof f=="function"}s(i,"func"),t.func=i;function o(f){return Array.isArray(f)}s(o,"array"),t.array=o;function c(f){return o(f)&&f.every(d=>r(d))}s(c,"stringArray"),t.stringArray=c;function l(f,d){return Array.isArray(f)&&f.every(d)}s(l,"typedArray"),t.typedArray=l;function u(f){return f!==null&&typeof f=="object"}s(u,"objectLiteral"),t.objectLiteral=u}}),IN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ImplementationRequest=r={}))}}),NN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.TypeDefinitionRequest=r={}))}}),kN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;var e=Me(),r;(function(a){a.method="workspace/workspaceFolders",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(r||(t.WorkspaceFoldersRequest=r={}));var n;(function(a){a.method="workspace/didChangeWorkspaceFolders",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolNotificationType(a.method)})(n||(t.DidChangeWorkspaceFoldersNotification=n={}))}}),PN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;var e=Me(),r;(function(n){n.method="workspace/configuration",n.messageDirection=e.MessageDirection.serverToClient,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ConfigurationRequest=r={}))}}),ON=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;var e=Me(),r;(function(a){a.method="textDocument/documentColor",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.DocumentColorRequest=r={}));var n;(function(a){a.method="textDocument/colorPresentation",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(n||(t.ColorPresentationRequest=n={}))}}),LN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;var e=Me(),r;(function(a){a.method="textDocument/foldingRange",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.FoldingRangeRequest=r={}));var n;(function(a){a.method="workspace/foldingRange/refresh",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(n||(t.FoldingRangeRefreshRequest=n={}))}}),DN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.DeclarationRequest=r={}))}}),MN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.SelectionRangeRequest=r={}))}}),xN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;var e=Uo(),r=Me(),n;(function(o){o.type=new e.ProgressType;function c(l){return l===o.type}s(c,"is"),o.is=c})(n||(t.WorkDoneProgress=n={}));var a;(function(o){o.method="window/workDoneProgress/create",o.messageDirection=r.MessageDirection.serverToClient,o.type=new r.ProtocolRequestType(o.method)})(a||(t.WorkDoneProgressCreateRequest=a={}));var i;(function(o){o.method="window/workDoneProgress/cancel",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolNotificationType(o.method)})(i||(t.WorkDoneProgressCancelNotification=i={}))}}),FN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;var e=Me(),r;(function(i){i.method="textDocument/prepareCallHierarchy",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.CallHierarchyPrepareRequest=r={}));var n;(function(i){i.method="callHierarchy/incomingCalls",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.CallHierarchyIncomingCallsRequest=n={}));var a;(function(i){i.method="callHierarchy/outgoingCalls",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.CallHierarchyOutgoingCallsRequest=a={}))}}),GN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;var e=Me(),r;(function(l){l.Relative="relative"})(r||(t.TokenFormat=r={}));var n;(function(l){l.method="textDocument/semanticTokens",l.type=new e.RegistrationType(l.method)})(n||(t.SemanticTokensRegistrationType=n={}));var a;(function(l){l.method="textDocument/semanticTokens/full",l.messageDirection=e.MessageDirection.clientToServer,l.type=new e.ProtocolRequestType(l.method),l.registrationMethod=n.method})(a||(t.SemanticTokensRequest=a={}));var i;(function(l){l.method="textDocument/semanticTokens/full/delta",l.messageDirection=e.MessageDirection.clientToServer,l.type=new e.ProtocolRequestType(l.method),l.registrationMethod=n.method})(i||(t.SemanticTokensDeltaRequest=i={}));var o;(function(l){l.method="textDocument/semanticTokens/range",l.messageDirection=e.MessageDirection.clientToServer,l.type=new e.ProtocolRequestType(l.method),l.registrationMethod=n.method})(o||(t.SemanticTokensRangeRequest=o={}));var c;(function(l){l.method="workspace/semanticTokens/refresh",l.messageDirection=e.MessageDirection.serverToClient,l.type=new e.ProtocolRequestType0(l.method)})(c||(t.SemanticTokensRefreshRequest=c={}))}}),jN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;var e=Me(),r;(function(n){n.method="window/showDocument",n.messageDirection=e.MessageDirection.serverToClient,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ShowDocumentRequest=r={}))}}),UN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.LinkedEditingRangeRequest=r={}))}}),zN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;var e=Me(),r;(function(u){u.file="file",u.folder="folder"})(r||(t.FileOperationPatternKind=r={}));var n;(function(u){u.method="workspace/willCreateFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method)})(n||(t.WillCreateFilesRequest=n={}));var a;(function(u){u.method="workspace/didCreateFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolNotificationType(u.method)})(a||(t.DidCreateFilesNotification=a={}));var i;(function(u){u.method="workspace/willRenameFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method)})(i||(t.WillRenameFilesRequest=i={}));var o;(function(u){u.method="workspace/didRenameFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolNotificationType(u.method)})(o||(t.DidRenameFilesNotification=o={}));var c;(function(u){u.method="workspace/didDeleteFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolNotificationType(u.method)})(c||(t.DidDeleteFilesNotification=c={}));var l;(function(u){u.method="workspace/willDeleteFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method)})(l||(t.WillDeleteFilesRequest=l={}))}}),BN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;var e=Me(),r;(function(i){i.document="document",i.project="project",i.group="group",i.scheme="scheme",i.global="global"})(r||(t.UniquenessLevel=r={}));var n;(function(i){i.$import="import",i.$export="export",i.local="local"})(n||(t.MonikerKind=n={}));var a;(function(i){i.method="textDocument/moniker",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.MonikerRequest=a={}))}}),KN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;var e=Me(),r;(function(i){i.method="textDocument/prepareTypeHierarchy",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.TypeHierarchyPrepareRequest=r={}));var n;(function(i){i.method="typeHierarchy/supertypes",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.TypeHierarchySupertypesRequest=n={}));var a;(function(i){i.method="typeHierarchy/subtypes",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.TypeHierarchySubtypesRequest=a={}))}}),qN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;var e=Me(),r;(function(a){a.method="textDocument/inlineValue",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.InlineValueRequest=r={}));var n;(function(a){a.method="workspace/inlineValue/refresh",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(n||(t.InlineValueRefreshRequest=n={}))}}),WN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;var e=Me(),r;(function(i){i.method="textDocument/inlayHint",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.InlayHintRequest=r={}));var n;(function(i){i.method="inlayHint/resolve",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.InlayHintResolveRequest=n={}));var a;(function(i){i.method="workspace/inlayHint/refresh",i.messageDirection=e.MessageDirection.serverToClient,i.type=new e.ProtocolRequestType0(i.method)})(a||(t.InlayHintRefreshRequest=a={}))}}),VN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;var e=Uo(),r=zh(),n=Me(),a;(function(u){function f(d){const p=d;return p&&r.boolean(p.retriggerRequest)}s(f,"is"),u.is=f})(a||(t.DiagnosticServerCancellationData=a={}));var i;(function(u){u.Full="full",u.Unchanged="unchanged"})(i||(t.DocumentDiagnosticReportKind=i={}));var o;(function(u){u.method="textDocument/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new e.ProgressType})(o||(t.DocumentDiagnosticRequest=o={}));var c;(function(u){u.method="workspace/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new e.ProgressType})(c||(t.WorkspaceDiagnosticRequest=c={}));var l;(function(u){u.method="workspace/diagnostic/refresh",u.messageDirection=n.MessageDirection.serverToClient,u.type=new n.ProtocolRequestType0(u.method)})(l||(t.DiagnosticRefreshRequest=l={}))}}),HN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;var e=(mc(),Uh(df)),r=zh(),n=Me(),a;(function(g){g.Markup=1,g.Code=2;function v(E){return E===1||E===2}s(v,"is"),g.is=v})(a||(t.NotebookCellKind=a={}));var i;(function(g){function v(w,C){const k={executionOrder:w};return(C===!0||C===!1)&&(k.success=C),k}s(v,"create"),g.create=v;function E(w){const C=w;return r.objectLiteral(C)&&e.uinteger.is(C.executionOrder)&&(C.success===void 0||r.boolean(C.success))}s(E,"is"),g.is=E;function T(w,C){return w===C?!0:w==null||C===null||C===void 0?!1:w.executionOrder===C.executionOrder&&w.success===C.success}s(T,"equals"),g.equals=T})(i||(t.ExecutionSummary=i={}));var o;(function(g){function v(C,k){return{kind:C,document:k}}s(v,"create"),g.create=v;function E(C){const k=C;return r.objectLiteral(k)&&a.is(k.kind)&&e.DocumentUri.is(k.document)&&(k.metadata===void 0||r.objectLiteral(k.metadata))}s(E,"is"),g.is=E;function T(C,k){const B=new Set;return C.document!==k.document&&B.add("document"),C.kind!==k.kind&&B.add("kind"),C.executionSummary!==k.executionSummary&&B.add("executionSummary"),(C.metadata!==void 0||k.metadata!==void 0)&&!w(C.metadata,k.metadata)&&B.add("metadata"),(C.executionSummary!==void 0||k.executionSummary!==void 0)&&!i.equals(C.executionSummary,k.executionSummary)&&B.add("executionSummary"),B}s(T,"diff"),g.diff=T;function w(C,k){if(C===k)return!0;if(C==null||k===null||k===void 0||typeof C!=typeof k||typeof C!="object")return!1;const B=Array.isArray(C),re=Array.isArray(k);if(B!==re)return!1;if(B&&re){if(C.length!==k.length)return!1;for(let X=0;X0}s(se,"hasId"),h.hasId=se})(A||(t.StaticRegistrationOptions=A={}));var b;(function(h){function se(ke){const H=ke;return H&&(H.documentSelector===null||tt.is(H.documentSelector))}s(se,"is"),h.is=se})(b||(t.TextDocumentRegistrationOptions=b={}));var O;(function(h){function se(H){const Oe=H;return n.objectLiteral(Oe)&&(Oe.workDoneProgress===void 0||n.boolean(Oe.workDoneProgress))}s(se,"is"),h.is=se;function ke(H){const Oe=H;return Oe&&n.boolean(Oe.workDoneProgress)}s(ke,"hasWorkDoneProgress"),h.hasWorkDoneProgress=ke})(O||(t.WorkDoneProgressOptions=O={}));var M;(function(h){h.method="initialize",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(M||(t.InitializeRequest=M={}));var L;(function(h){h.unknownProtocolVersion=1})(L||(t.InitializeErrorCodes=L={}));var j;(function(h){h.method="initialized",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(j||(t.InitializedNotification=j={}));var F;(function(h){h.method="shutdown",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType0(h.method)})(F||(t.ShutdownRequest=F={}));var te;(function(h){h.method="exit",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType0(h.method)})(te||(t.ExitNotification=te={}));var U;(function(h){h.method="workspace/didChangeConfiguration",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(U||(t.DidChangeConfigurationNotification=U={}));var Q;(function(h){h.Error=1,h.Warning=2,h.Info=3,h.Log=4,h.Debug=5})(Q||(t.MessageType=Q={}));var fe;(function(h){h.method="window/showMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(fe||(t.ShowMessageNotification=fe={}));var de;(function(h){h.method="window/showMessageRequest",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(de||(t.ShowMessageRequest=de={}));var pe;(function(h){h.method="window/logMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(pe||(t.LogMessageNotification=pe={}));var ye;(function(h){h.method="telemetry/event",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(ye||(t.TelemetryEventNotification=ye={}));var Ne;(function(h){h.None=0,h.Full=1,h.Incremental=2})(Ne||(t.TextDocumentSyncKind=Ne={}));var he;(function(h){h.method="textDocument/didOpen",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(he||(t.DidOpenTextDocumentNotification=he={}));var J;(function(h){function se(H){let Oe=H;return Oe!=null&&typeof Oe.text=="string"&&Oe.range!==void 0&&(Oe.rangeLength===void 0||typeof Oe.rangeLength=="number")}s(se,"isIncremental"),h.isIncremental=se;function ke(H){let Oe=H;return Oe!=null&&typeof Oe.text=="string"&&Oe.range===void 0&&Oe.rangeLength===void 0}s(ke,"isFull"),h.isFull=ke})(J||(t.TextDocumentContentChangeEvent=J={}));var Ue;(function(h){h.method="textDocument/didChange",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Ue||(t.DidChangeTextDocumentNotification=Ue={}));var le;(function(h){h.method="textDocument/didClose",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(le||(t.DidCloseTextDocumentNotification=le={}));var He;(function(h){h.method="textDocument/didSave",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(He||(t.DidSaveTextDocumentNotification=He={}));var ve;(function(h){h.Manual=1,h.AfterDelay=2,h.FocusOut=3})(ve||(t.TextDocumentSaveReason=ve={}));var x;(function(h){h.method="textDocument/willSave",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(x||(t.WillSaveTextDocumentNotification=x={}));var ze;(function(h){h.method="textDocument/willSaveWaitUntil",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ze||(t.WillSaveTextDocumentWaitUntilRequest=ze={}));var Xt;(function(h){h.method="workspace/didChangeWatchedFiles",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Xt||(t.DidChangeWatchedFilesNotification=Xt={}));var Nt;(function(h){h.Created=1,h.Changed=2,h.Deleted=3})(Nt||(t.FileChangeType=Nt={}));var Te;(function(h){function se(ke){const H=ke;return n.objectLiteral(H)&&(r.URI.is(H.baseUri)||r.WorkspaceFolder.is(H.baseUri))&&n.string(H.pattern)}s(se,"is"),h.is=se})(Te||(t.RelativePattern=Te={}));var ca;(function(h){h.Create=1,h.Change=2,h.Delete=4})(ca||(t.WatchKind=ca={}));var Jo;(function(h){h.method="textDocument/publishDiagnostics",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(Jo||(t.PublishDiagnosticsNotification=Jo={}));var Zo;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.TriggerForIncompleteCompletions=3})(Zo||(t.CompletionTriggerKind=Zo={}));var Qo;(function(h){h.method="textDocument/completion",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Qo||(t.CompletionRequest=Qo={}));var el;(function(h){h.method="completionItem/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(el||(t.CompletionResolveRequest=el={}));var ua;(function(h){h.method="textDocument/hover",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ua||(t.HoverRequest=ua={}));var fa;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.ContentChange=3})(fa||(t.SignatureHelpTriggerKind=fa={}));var Jt;(function(h){h.method="textDocument/signatureHelp",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Jt||(t.SignatureHelpRequest=Jt={}));var da;(function(h){h.method="textDocument/definition",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(da||(t.DefinitionRequest=da={}));var tl;(function(h){h.method="textDocument/references",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(tl||(t.ReferencesRequest=tl={}));var rl;(function(h){h.method="textDocument/documentHighlight",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(rl||(t.DocumentHighlightRequest=rl={}));var pa;(function(h){h.method="textDocument/documentSymbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(pa||(t.DocumentSymbolRequest=pa={}));var ha;(function(h){h.method="textDocument/codeAction",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ha||(t.CodeActionRequest=ha={}));var nl;(function(h){h.method="codeAction/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(nl||(t.CodeActionResolveRequest=nl={}));var Mc;(function(h){h.method="workspace/symbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Mc||(t.WorkspaceSymbolRequest=Mc={}));var al;(function(h){h.method="workspaceSymbol/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(al||(t.WorkspaceSymbolResolveRequest=al={}));var il;(function(h){h.method="textDocument/codeLens",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(il||(t.CodeLensRequest=il={}));var sl;(function(h){h.method="codeLens/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(sl||(t.CodeLensResolveRequest=sl={}));var ol;(function(h){h.method="workspace/codeLens/refresh",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType0(h.method)})(ol||(t.CodeLensRefreshRequest=ol={}));var kt;(function(h){h.method="textDocument/documentLink",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(kt||(t.DocumentLinkRequest=kt={}));var ll;(function(h){h.method="documentLink/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ll||(t.DocumentLinkResolveRequest=ll={}));var cl;(function(h){h.method="textDocument/formatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(cl||(t.DocumentFormattingRequest=cl={}));var Gr;(function(h){h.method="textDocument/rangeFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Gr||(t.DocumentRangeFormattingRequest=Gr={}));var ul;(function(h){h.method="textDocument/rangesFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ul||(t.DocumentRangesFormattingRequest=ul={}));var an;(function(h){h.method="textDocument/onTypeFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(an||(t.DocumentOnTypeFormattingRequest=an={}));var fl;(function(h){h.Identifier=1})(fl||(t.PrepareSupportDefaultBehavior=fl={}));var Zt;(function(h){h.method="textDocument/rename",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Zt||(t.RenameRequest=Zt={}));var yr;(function(h){h.method="textDocument/prepareRename",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(yr||(t.PrepareRenameRequest=yr={}));var dl;(function(h){h.method="workspace/executeCommand",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(dl||(t.ExecuteCommandRequest=dl={}));var pl;(function(h){h.method="workspace/applyEdit",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType("workspace/applyEdit")})(pl||(t.ApplyWorkspaceEditRequest=pl={}))}}),JN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var e=Uo();function r(n,a,i,o){return e.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,e.createMessageConnection)(n,a,i,o)}s(r,"createProtocolConnection"),t.createProtocolConnection=r}}),ZN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(t){var e=t&&t.__createBinding||(Object.create?function(i,o,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(o,c);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:s(function(){return o[c]},"get")}),Object.defineProperty(i,l,u)}:function(i,o,c,l){l===void 0&&(l=c),i[l]=o[c]}),r=t&&t.__exportStar||function(i,o){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&e(o,i,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(Uo(),t),r((mc(),Uh(df)),t),r(Me(),t),r(XN(),t);var n=JN();Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:s(function(){return n.createProtocolConnection},"get")});var a;(function(i){i.lspReservedErrorRangeStart=-32899,i.RequestFailed=-32803,i.ServerCancelled=-32802,i.ContentModified=-32801,i.RequestCancelled=-32800,i.lspReservedErrorRangeEnd=-32800})(a||(t.LSPErrorCodes=a={}))}}),QN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(t){var e=t&&t.__createBinding||(Object.create?function(i,o,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(o,c);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:s(function(){return o[c]},"get")}),Object.defineProperty(i,l,u)}:function(i,o,c,l){l===void 0&&(l=c),i[l]=o[c]}),r=t&&t.__exportStar||function(i,o){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&e(o,i,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var n=Cy();r(Cy(),t),r(ZN(),t);function a(i,o,c,l){return(0,n.createMessageConnection)(i,o,c,l)}s(a,"createProtocolConnection"),t.createProtocolConnection=a}}),TT={};Qr(TT,{AbstractAstReflection:()=>qh,AbstractCstNode:()=>Vg,AbstractLangiumParser:()=>Yg,AbstractParserErrorMessageProvider:()=>oI,AbstractThreadedAsyncParser:()=>Ej,AstUtils:()=>Wh,BiMap:()=>of,Cancellation:()=>Ae,CompositeCstNodeImpl:()=>cd,ContextCache:()=>gd,CstNodeBuilder:()=>aI,CstUtils:()=>Bh,DEFAULT_TOKENIZE_OPTIONS:()=>py,DONE_RESULT:()=>nt,DatatypeSymbol:()=>rf,DefaultAstNodeDescriptionProvider:()=>xI,DefaultAstNodeLocator:()=>GI,DefaultAsyncParser:()=>nN,DefaultCommentProvider:()=>rN,DefaultConfigurationProvider:()=>jI,DefaultDocumentBuilder:()=>UI,DefaultDocumentValidator:()=>MI,DefaultHydrator:()=>iN,DefaultIndexManager:()=>zI,DefaultJsonSerializer:()=>PI,DefaultLangiumDocumentFactory:()=>EI,DefaultLangiumDocuments:()=>_I,DefaultLangiumProfiler:()=>wj,DefaultLexer:()=>hy,DefaultLexerErrorMessageProvider:()=>KI,DefaultLinker:()=>CI,DefaultNameProvider:()=>SI,DefaultReferenceDescriptionProvider:()=>FI,DefaultReferences:()=>bI,DefaultScopeComputation:()=>wI,DefaultScopeProvider:()=>kI,DefaultServiceRegistry:()=>OI,DefaultTokenBuilder:()=>dd,DefaultValueConverter:()=>ry,DefaultWorkspaceLock:()=>aN,DefaultWorkspaceManager:()=>BI,Deferred:()=>Or,Disposable:()=>Dn,DisposableCache:()=>md,DocumentCache:()=>NI,DocumentState:()=>Z,DocumentValidator:()=>Ot,EMPTY_SCOPE:()=>Tj,EMPTY_STREAM:()=>wo,EmptyFileSystem:()=>Gt,EmptyFileSystemProvider:()=>lN,ErrorWithLocation:()=>Af,GrammarAST:()=>AT,GrammarUtils:()=>Am,IndentationAwareLexer:()=>Cj,IndentationAwareTokenBuilder:()=>oN,JSDocDocumentationProvider:()=>tN,LangiumCompletionParser:()=>lI,LangiumParser:()=>sI,LangiumParserErrorMessageProvider:()=>Xg,LeafCstNodeImpl:()=>tf,LexingMode:()=>On,MapScope:()=>vj,Module:()=>Ch,MultiMap:()=>Lr,MultiMapScope:()=>II,OperationCancelled:()=>or,ParserWorker:()=>_j,ProfilingTask:()=>uN,Reduction:()=>Zl,RefResolving:()=>mn,RegExpUtils:()=>_m,RootCstNodeImpl:()=>Hg,SimpleCache:()=>ly,StreamImpl:()=>sr,StreamScope:()=>$h,TextDocument:()=>af,TreeStreamImpl:()=>Io,URI:()=>Rt,UriTrie:()=>sy,UriUtils:()=>it,VALIDATE_EACH_NODE:()=>DI,ValidationCategory:()=>lf,ValidationRegistry:()=>LI,ValueConverter:()=>ar,WorkspaceCache:()=>cy,assertCondition:()=>Em,assertUnreachable:()=>en,createCompletionParser:()=>Qg,createDefaultCoreModule:()=>St,createDefaultSharedCoreModule:()=>bt,createGrammarConfig:()=>zm,createLangiumParser:()=>ey,createParser:()=>ud,delayNextTick:()=>pd,diagnosticData:()=>Pn,eagerLoad:()=>$y,getDiagnosticRange:()=>fy,indentationBuilderDefaultOptions:()=>bh,inject:()=>Pe,interruptAndCheck:()=>Ye,isAstNode:()=>Be,isAstNodeDescription:()=>Kh,isAstNodeWithComment:()=>uy,isCompositeCstNode:()=>Cr,isIMultiModeLexerDefinition:()=>Td,isJSDoc:()=>gy,isLeafCstNode:()=>Bn,isLinkingError:()=>vn,isMultiReference:()=>lr,isNamed:()=>oy,isOperationCancelled:()=>la,isReference:()=>at,isRootCstNode:()=>hf,isTokenTypeArray:()=>vd,isTokenTypeDictionary:()=>cf,loadGrammarFromJson:()=>wt,parseJSDoc:()=>my,prepareLangiumParser:()=>ty,setInterruptionPeriod:()=>ny,startCancelableOperation:()=>hd,stream:()=>ue,toDiagnosticData:()=>dy,toDiagnosticSeverity:()=>Xl});var Bh={};Qr(Bh,{DefaultNameRegexp:()=>ym,RangeComparison:()=>ir,compareRange:()=>mm,findCommentNode:()=>vm,findDeclarationNodeAtOffset:()=>UT,findLeafNodeAtOffset:()=>$f,findLeafNodeBeforeOffset:()=>Tm,flattenCst:()=>jT,getDatatypeNode:()=>GT,getInteriorNodes:()=>KT,getNextNode:()=>zT,getPreviousNode:()=>$m,getStartlineNode:()=>BT,inRange:()=>gm,isChildNode:()=>hm,isCommentNode:()=>Gu,streamCst:()=>Oo,toDocumentSegment:()=>Lo,tokenToRange:()=>Ql});function Be(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}s(Be,"isAstNode");function at(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}s(at,"isReference");function lr(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}s(lr,"isMultiReference");function Kh(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}s(Kh,"isAstNodeDescription");function vn(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}s(vn,"isLinkingError");var Ba,qh=(Ba=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var a;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(a=r.properties[e.property])==null?void 0:a.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return Be(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const a=n[r];if(a!==void 0)return a;{const i=this.types[e],o=i?i.superTypes.some(c=>this.isSubtype(c,r)):!1;return n[r]=o,o}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),a=[];for(const i of n)this.isSubtype(i,e)&&a.push(i);return this.allSubtypes[e]=a,a}}},s(Ba,"AbstractAstReflection"),Ba);function Cr(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}s(Cr,"isCompositeCstNode");function Bn(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}s(Bn,"isLeafCstNode");function hf(t){return Cr(t)&&typeof t.fullText=="string"}s(hf,"isRootCstNode");var ht,sr=(ht=class{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){const e={state:this.startFn(),next:s(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(a=>[e?e(a):a,r?r(a):a]);return new Map(n)}toString(){return this.join()}concat(e){return new ht(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return nt})}join(e=","){const r=this.iterator();let n="",a,i=!1;do a=r.next(),a.done||(i&&(n+=e),n+=RT(a.value)),i=!0;while(!a.done);return n}indexOf(e,r=0){const n=this.iterator();let a=0,i=n.next();for(;!i.done;){if(a>=r&&i.value===e)return a;i=n.next(),a++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,a=r.next();for(;!a.done;)e(a.value,n),a=r.next(),n++}map(e){return new ht(this.startFn,r=>{const{done:n,value:a}=this.nextFn(r);return n?nt:{done:!1,value:e(a)}})}filter(e){return new ht(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return nt})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let a=r,i=n.next();for(;!i.done;)a===void 0?a=i.value:a=e(a,i.value),i=n.next();return a}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const a=e.next();if(a.done)return n;const i=this.recursiveReduce(e,r,n);return i===void 0?a.value:r(i,a.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,a=r.next();for(;!a.done;){if(e(a.value))return n;a=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new ht(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const i=r.iterator.next();if(i.done)r.iterator=void 0;else return i}const{done:n,value:a}=this.nextFn(r.this);if(!n){const i=e(a);if(Jl(i))r.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}}while(r.iterator);return nt})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new ht(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const o=n.iterator.next();if(o.done)n.iterator=void 0;else return o}const{done:a,value:i}=r.nextFn(n.this);if(!a)if(Jl(i))n.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}while(n.iterator);return nt})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new ht(()=>{const r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?nt:this.nextFn(r.state)))}distinct(e){return new ht(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const a=e?e(n.value):n.value;if(!r.set.has(a))return r.set.add(a),n}while(!n.done);return nt})}exclude(e,r){const n=new Set;for(const a of e){const i=r?r(a):a;n.add(i)}return this.filter(a=>{const i=r?r(a):a;return!n.has(i)})}},s(ht,"StreamImpl"),ht);function RT(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}s(RT,"toString");function Jl(t){return!!t&&typeof t[Symbol.iterator]=="function"}s(Jl,"isIterable");var wo=new sr(()=>{},()=>nt),nt=Object.freeze({done:!0,value:void 0});function ue(...t){if(t.length===1){const e=t[0];if(e instanceof sr)return e;if(Jl(e))return new sr(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new sr(()=>({index:0}),r=>r.index1?new sr(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),a=>{for(a.pruned&&(a.iterators.pop(),a.pruned=!1);a.iterators.length>0;){const o=a.iterators[a.iterators.length-1].next();if(o.done)a.iterators.pop();else return a.iterators.push(r(o.value)[Symbol.iterator]()),o}return nt})}iterator(){const e={state:this.startFn(),next:s(()=>this.nextFn(e.state),"next"),prune:s(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},s(Ka,"TreeStreamImpl"),Ka),Zl;(function(t){function e(i){return i.reduce((o,c)=>o+c,0)}s(e,"sum"),t.sum=e;function r(i){return i.reduce((o,c)=>o*c,0)}s(r,"product"),t.product=r;function n(i){return i.reduce((o,c)=>Math.min(o,c))}s(n,"min"),t.min=n;function a(i){return i.reduce((o,c)=>Math.max(o,c))}s(a,"max"),t.max=a})(Zl||(Zl={}));var Wh={};Qr(Wh,{assignMandatoryProperties:()=>Vh,copyAstNode:()=>Cu,findRootNode:()=>Ga,getContainerOfType:()=>Kn,getDocument:()=>Bt,getReferenceNodes:()=>Eu,hasContainerOfType:()=>$T,linkContentToContainer:()=>No,streamAllContents:()=>Dr,streamAst:()=>Kt,streamContents:()=>yc,streamReferences:()=>ko});function No(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((a,i)=>{Be(a)&&(a.$container=t,a.$containerProperty=r,a.$containerIndex=i,e.deep&&No(a,e))}):Be(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&No(n,e)))}s(No,"linkContentToContainer");function Kn(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}s(Kn,"getContainerOfType");function $T(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}s($T,"hasContainerOfType");function Bt(t){const r=Ga(t).$document;if(!r)throw new Error("AST node has no document.");return r}s(Bt,"getDocument");function Ga(t){for(;t.$container;)t=t.$container;return t}s(Ga,"findRootNode");function Eu(t){return at(t)?t.ref?[t.ref]:[]:lr(t)?t.items.map(e=>e.ref):[]}s(Eu,"getReferenceNodes");function yc(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new sr(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexyc(r,e))}s(Dr,"streamAllContents");function Kt(t,e){if(t){if(e!=null&&e.range&&!_u(t,e.range))return new Io(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new Io(t,r=>yc(r,e),{includeRoot:!0})}s(Kt,"streamAst");function _u(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?gm(r,e):!1}s(_u,"isAstNodeInRange");function ko(t){return new sr(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndexdt,AbstractParserRule:()=>Ml,AbstractRule:()=>ka,AbstractType:()=>Tt,Action:()=>zr,Alternatives:()=>xl,ArrayLiteral:()=>Su,ArrayType:()=>bu,Assignment:()=>Br,BooleanLiteral:()=>wu,CharacterRange:()=>Kr,Condition:()=>qr,Conjunction:()=>Fl,CrossReference:()=>Wr,Disjunction:()=>Gl,EndOfFile:()=>Iu,Grammar:()=>Ar,GrammarImport:()=>Nu,Group:()=>Tn,InferredType:()=>ku,InfixRule:()=>nr,InfixRuleOperatorList:()=>jl,InfixRuleOperators:()=>Pu,Interface:()=>Pa,Keyword:()=>Oa,LangiumGrammarAstReflection:()=>pm,LangiumGrammarTerminals:()=>ek,NamedArgument:()=>La,NegatedToken:()=>Rn,Negation:()=>Ou,NumberLiteral:()=>Lu,Parameter:()=>Da,ParameterReference:()=>Du,ParserRule:()=>jt,ReferenceType:()=>Ul,RegexToken:()=>$n,ReturnType:()=>Mu,RuleCall:()=>An,SimpleType:()=>Ma,StringLiteral:()=>xu,TerminalAlternatives:()=>En,TerminalElement:()=>pt,TerminalGroup:()=>_n,TerminalRule:()=>Er,TerminalRuleCall:()=>Cn,Type:()=>zl,TypeAttribute:()=>Sn,TypeDefinition:()=>bn,UnionType:()=>Fu,UnorderedGroup:()=>Bl,UntilToken:()=>wn,ValueLiteral:()=>In,Wildcard:()=>xa,isAbstractElement:()=>mf,isAbstractParserRule:()=>qn,isAbstractRule:()=>ET,isAbstractType:()=>_T,isAction:()=>Hr,isAlternatives:()=>gf,isArrayLiteral:()=>CT,isArrayType:()=>Yh,isAssignment:()=>Sr,isBooleanLiteral:()=>Xh,isCharacterRange:()=>Jh,isCondition:()=>ST,isConjunction:()=>Zh,isCrossReference:()=>Wn,isDisjunction:()=>Qh,isEndOfFile:()=>em,isGrammar:()=>bT,isGrammarImport:()=>wT,isGroup:()=>Vn,isInferredType:()=>vc,isInfixRule:()=>Po,isInfixRuleOperatorList:()=>IT,isInfixRuleOperators:()=>NT,isInterface:()=>tm,isKeyword:()=>br,isNamedArgument:()=>kT,isNegatedToken:()=>rm,isNegation:()=>nm,isNumberLiteral:()=>PT,isParameter:()=>OT,isParameterReference:()=>am,isParserRule:()=>ot,isReferenceType:()=>im,isRegexToken:()=>sm,isReturnType:()=>om,isRuleCall:()=>wr,isSimpleType:()=>yf,isStringLiteral:()=>LT,isTerminalAlternatives:()=>lm,isTerminalElement:()=>DT,isTerminalGroup:()=>cm,isTerminalRule:()=>xt,isTerminalRuleCall:()=>vf,isType:()=>Tf,isTypeAttribute:()=>MT,isTypeDefinition:()=>xT,isUnionType:()=>um,isUnorderedGroup:()=>Rf,isUntilToken:()=>fm,isValueLiteral:()=>FT,isWildcard:()=>dm,reflection:()=>K});var ek={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},dt={$type:"AbstractElement",cardinality:"cardinality"};function mf(t){return K.isInstance(t,dt.$type)}s(mf,"isAbstractElement");var Ml={$type:"AbstractParserRule"};function qn(t){return K.isInstance(t,Ml.$type)}s(qn,"isAbstractParserRule");var ka={$type:"AbstractRule"};function ET(t){return K.isInstance(t,ka.$type)}s(ET,"isAbstractRule");var Tt={$type:"AbstractType"};function _T(t){return K.isInstance(t,Tt.$type)}s(_T,"isAbstractType");var zr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Hr(t){return K.isInstance(t,zr.$type)}s(Hr,"isAction");var xl={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function gf(t){return K.isInstance(t,xl.$type)}s(gf,"isAlternatives");var Su={$type:"ArrayLiteral",elements:"elements"};function CT(t){return K.isInstance(t,Su.$type)}s(CT,"isArrayLiteral");var bu={$type:"ArrayType",elementType:"elementType"};function Yh(t){return K.isInstance(t,bu.$type)}s(Yh,"isArrayType");var Br={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Sr(t){return K.isInstance(t,Br.$type)}s(Sr,"isAssignment");var wu={$type:"BooleanLiteral",true:"true"};function Xh(t){return K.isInstance(t,wu.$type)}s(Xh,"isBooleanLiteral");var Kr={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Jh(t){return K.isInstance(t,Kr.$type)}s(Jh,"isCharacterRange");var qr={$type:"Condition"};function ST(t){return K.isInstance(t,qr.$type)}s(ST,"isCondition");var Fl={$type:"Conjunction",left:"left",right:"right"};function Zh(t){return K.isInstance(t,Fl.$type)}s(Zh,"isConjunction");var Wr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Wn(t){return K.isInstance(t,Wr.$type)}s(Wn,"isCrossReference");var Gl={$type:"Disjunction",left:"left",right:"right"};function Qh(t){return K.isInstance(t,Gl.$type)}s(Qh,"isDisjunction");var Iu={$type:"EndOfFile",cardinality:"cardinality"};function em(t){return K.isInstance(t,Iu.$type)}s(em,"isEndOfFile");var Ar={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function bT(t){return K.isInstance(t,Ar.$type)}s(bT,"isGrammar");var Nu={$type:"GrammarImport",path:"path"};function wT(t){return K.isInstance(t,Nu.$type)}s(wT,"isGrammarImport");var Tn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Vn(t){return K.isInstance(t,Tn.$type)}s(Vn,"isGroup");var ku={$type:"InferredType",name:"name"};function vc(t){return K.isInstance(t,ku.$type)}s(vc,"isInferredType");var nr={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function Po(t){return K.isInstance(t,nr.$type)}s(Po,"isInfixRule");var jl={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function IT(t){return K.isInstance(t,jl.$type)}s(IT,"isInfixRuleOperatorList");var Pu={$type:"InfixRuleOperators",precedences:"precedences"};function NT(t){return K.isInstance(t,Pu.$type)}s(NT,"isInfixRuleOperators");var Pa={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function tm(t){return K.isInstance(t,Pa.$type)}s(tm,"isInterface");var Oa={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function br(t){return K.isInstance(t,Oa.$type)}s(br,"isKeyword");var La={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function kT(t){return K.isInstance(t,La.$type)}s(kT,"isNamedArgument");var Rn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function rm(t){return K.isInstance(t,Rn.$type)}s(rm,"isNegatedToken");var Ou={$type:"Negation",value:"value"};function nm(t){return K.isInstance(t,Ou.$type)}s(nm,"isNegation");var Lu={$type:"NumberLiteral",value:"value"};function PT(t){return K.isInstance(t,Lu.$type)}s(PT,"isNumberLiteral");var Da={$type:"Parameter",name:"name"};function OT(t){return K.isInstance(t,Da.$type)}s(OT,"isParameter");var Du={$type:"ParameterReference",parameter:"parameter"};function am(t){return K.isInstance(t,Du.$type)}s(am,"isParameterReference");var jt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function ot(t){return K.isInstance(t,jt.$type)}s(ot,"isParserRule");var Ul={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function im(t){return K.isInstance(t,Ul.$type)}s(im,"isReferenceType");var $n={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function sm(t){return K.isInstance(t,$n.$type)}s(sm,"isRegexToken");var Mu={$type:"ReturnType",name:"name"};function om(t){return K.isInstance(t,Mu.$type)}s(om,"isReturnType");var An={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function wr(t){return K.isInstance(t,An.$type)}s(wr,"isRuleCall");var Ma={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function yf(t){return K.isInstance(t,Ma.$type)}s(yf,"isSimpleType");var xu={$type:"StringLiteral",value:"value"};function LT(t){return K.isInstance(t,xu.$type)}s(LT,"isStringLiteral");var En={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function lm(t){return K.isInstance(t,En.$type)}s(lm,"isTerminalAlternatives");var pt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function DT(t){return K.isInstance(t,pt.$type)}s(DT,"isTerminalElement");var _n={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function cm(t){return K.isInstance(t,_n.$type)}s(cm,"isTerminalGroup");var Er={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function xt(t){return K.isInstance(t,Er.$type)}s(xt,"isTerminalRule");var Cn={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function vf(t){return K.isInstance(t,Cn.$type)}s(vf,"isTerminalRuleCall");var zl={$type:"Type",name:"name",type:"type"};function Tf(t){return K.isInstance(t,zl.$type)}s(Tf,"isType");var Sn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function MT(t){return K.isInstance(t,Sn.$type)}s(MT,"isTypeAttribute");var bn={$type:"TypeDefinition"};function xT(t){return K.isInstance(t,bn.$type)}s(xT,"isTypeDefinition");var Fu={$type:"UnionType",types:"types"};function um(t){return K.isInstance(t,Fu.$type)}s(um,"isUnionType");var Bl={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function Rf(t){return K.isInstance(t,Bl.$type)}s(Rf,"isUnorderedGroup");var wn={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function fm(t){return K.isInstance(t,wn.$type)}s(fm,"isUntilToken");var In={$type:"ValueLiteral"};function FT(t){return K.isInstance(t,In.$type)}s(FT,"isValueLiteral");var xa={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function dm(t){return K.isInstance(t,xa.$type)}s(dm,"isWildcard");var qa,pm=(qa=class extends qh{constructor(){super(...arguments),this.types={AbstractElement:{name:dt.$type,properties:{cardinality:{name:dt.cardinality}},superTypes:[]},AbstractParserRule:{name:Ml.$type,properties:{},superTypes:[ka.$type,Tt.$type]},AbstractRule:{name:ka.$type,properties:{},superTypes:[]},AbstractType:{name:Tt.$type,properties:{},superTypes:[]},Action:{name:zr.$type,properties:{cardinality:{name:zr.cardinality},feature:{name:zr.feature},inferredType:{name:zr.inferredType},operator:{name:zr.operator},type:{name:zr.type,referenceType:Tt.$type}},superTypes:[dt.$type]},Alternatives:{name:xl.$type,properties:{cardinality:{name:xl.cardinality},elements:{name:xl.elements,defaultValue:[]}},superTypes:[dt.$type]},ArrayLiteral:{name:Su.$type,properties:{elements:{name:Su.elements,defaultValue:[]}},superTypes:[In.$type]},ArrayType:{name:bu.$type,properties:{elementType:{name:bu.elementType}},superTypes:[bn.$type]},Assignment:{name:Br.$type,properties:{cardinality:{name:Br.cardinality},feature:{name:Br.feature},operator:{name:Br.operator},predicate:{name:Br.predicate},terminal:{name:Br.terminal}},superTypes:[dt.$type]},BooleanLiteral:{name:wu.$type,properties:{true:{name:wu.true,defaultValue:!1}},superTypes:[qr.$type,In.$type]},CharacterRange:{name:Kr.$type,properties:{cardinality:{name:Kr.cardinality},left:{name:Kr.left},lookahead:{name:Kr.lookahead},parenthesized:{name:Kr.parenthesized,defaultValue:!1},right:{name:Kr.right}},superTypes:[pt.$type]},Condition:{name:qr.$type,properties:{},superTypes:[]},Conjunction:{name:Fl.$type,properties:{left:{name:Fl.left},right:{name:Fl.right}},superTypes:[qr.$type]},CrossReference:{name:Wr.$type,properties:{cardinality:{name:Wr.cardinality},deprecatedSyntax:{name:Wr.deprecatedSyntax,defaultValue:!1},isMulti:{name:Wr.isMulti,defaultValue:!1},terminal:{name:Wr.terminal},type:{name:Wr.type,referenceType:Tt.$type}},superTypes:[dt.$type]},Disjunction:{name:Gl.$type,properties:{left:{name:Gl.left},right:{name:Gl.right}},superTypes:[qr.$type]},EndOfFile:{name:Iu.$type,properties:{cardinality:{name:Iu.cardinality}},superTypes:[dt.$type]},Grammar:{name:Ar.$type,properties:{imports:{name:Ar.imports,defaultValue:[]},interfaces:{name:Ar.interfaces,defaultValue:[]},isDeclared:{name:Ar.isDeclared,defaultValue:!1},name:{name:Ar.name},rules:{name:Ar.rules,defaultValue:[]},types:{name:Ar.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Nu.$type,properties:{path:{name:Nu.path}},superTypes:[]},Group:{name:Tn.$type,properties:{cardinality:{name:Tn.cardinality},elements:{name:Tn.elements,defaultValue:[]},guardCondition:{name:Tn.guardCondition},predicate:{name:Tn.predicate}},superTypes:[dt.$type]},InferredType:{name:ku.$type,properties:{name:{name:ku.name}},superTypes:[Tt.$type]},InfixRule:{name:nr.$type,properties:{call:{name:nr.call},dataType:{name:nr.dataType},inferredType:{name:nr.inferredType},name:{name:nr.name},operators:{name:nr.operators},parameters:{name:nr.parameters,defaultValue:[]},returnType:{name:nr.returnType,referenceType:Tt.$type}},superTypes:[Ml.$type]},InfixRuleOperatorList:{name:jl.$type,properties:{associativity:{name:jl.associativity},operators:{name:jl.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Pu.$type,properties:{precedences:{name:Pu.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Pa.$type,properties:{attributes:{name:Pa.attributes,defaultValue:[]},name:{name:Pa.name},superTypes:{name:Pa.superTypes,defaultValue:[],referenceType:Tt.$type}},superTypes:[Tt.$type]},Keyword:{name:Oa.$type,properties:{cardinality:{name:Oa.cardinality},predicate:{name:Oa.predicate},value:{name:Oa.value}},superTypes:[dt.$type]},NamedArgument:{name:La.$type,properties:{calledByName:{name:La.calledByName,defaultValue:!1},parameter:{name:La.parameter,referenceType:Da.$type},value:{name:La.value}},superTypes:[]},NegatedToken:{name:Rn.$type,properties:{cardinality:{name:Rn.cardinality},lookahead:{name:Rn.lookahead},parenthesized:{name:Rn.parenthesized,defaultValue:!1},terminal:{name:Rn.terminal}},superTypes:[pt.$type]},Negation:{name:Ou.$type,properties:{value:{name:Ou.value}},superTypes:[qr.$type]},NumberLiteral:{name:Lu.$type,properties:{value:{name:Lu.value}},superTypes:[In.$type]},Parameter:{name:Da.$type,properties:{name:{name:Da.name}},superTypes:[]},ParameterReference:{name:Du.$type,properties:{parameter:{name:Du.parameter,referenceType:Da.$type}},superTypes:[qr.$type]},ParserRule:{name:jt.$type,properties:{dataType:{name:jt.dataType},definition:{name:jt.definition},entry:{name:jt.entry,defaultValue:!1},fragment:{name:jt.fragment,defaultValue:!1},inferredType:{name:jt.inferredType},name:{name:jt.name},parameters:{name:jt.parameters,defaultValue:[]},returnType:{name:jt.returnType,referenceType:Tt.$type}},superTypes:[Ml.$type]},ReferenceType:{name:Ul.$type,properties:{isMulti:{name:Ul.isMulti,defaultValue:!1},referenceType:{name:Ul.referenceType}},superTypes:[bn.$type]},RegexToken:{name:$n.$type,properties:{cardinality:{name:$n.cardinality},lookahead:{name:$n.lookahead},parenthesized:{name:$n.parenthesized,defaultValue:!1},regex:{name:$n.regex}},superTypes:[pt.$type]},ReturnType:{name:Mu.$type,properties:{name:{name:Mu.name}},superTypes:[]},RuleCall:{name:An.$type,properties:{arguments:{name:An.arguments,defaultValue:[]},cardinality:{name:An.cardinality},predicate:{name:An.predicate},rule:{name:An.rule,referenceType:ka.$type}},superTypes:[dt.$type]},SimpleType:{name:Ma.$type,properties:{primitiveType:{name:Ma.primitiveType},stringType:{name:Ma.stringType},typeRef:{name:Ma.typeRef,referenceType:Tt.$type}},superTypes:[bn.$type]},StringLiteral:{name:xu.$type,properties:{value:{name:xu.value}},superTypes:[In.$type]},TerminalAlternatives:{name:En.$type,properties:{cardinality:{name:En.cardinality},elements:{name:En.elements,defaultValue:[]},lookahead:{name:En.lookahead},parenthesized:{name:En.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalElement:{name:pt.$type,properties:{cardinality:{name:pt.cardinality},lookahead:{name:pt.lookahead},parenthesized:{name:pt.parenthesized,defaultValue:!1}},superTypes:[dt.$type]},TerminalGroup:{name:_n.$type,properties:{cardinality:{name:_n.cardinality},elements:{name:_n.elements,defaultValue:[]},lookahead:{name:_n.lookahead},parenthesized:{name:_n.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalRule:{name:Er.$type,properties:{definition:{name:Er.definition},fragment:{name:Er.fragment,defaultValue:!1},hidden:{name:Er.hidden,defaultValue:!1},name:{name:Er.name},type:{name:Er.type}},superTypes:[ka.$type]},TerminalRuleCall:{name:Cn.$type,properties:{cardinality:{name:Cn.cardinality},lookahead:{name:Cn.lookahead},parenthesized:{name:Cn.parenthesized,defaultValue:!1},rule:{name:Cn.rule,referenceType:Er.$type}},superTypes:[pt.$type]},Type:{name:zl.$type,properties:{name:{name:zl.name},type:{name:zl.type}},superTypes:[Tt.$type]},TypeAttribute:{name:Sn.$type,properties:{defaultValue:{name:Sn.defaultValue},isOptional:{name:Sn.isOptional,defaultValue:!1},name:{name:Sn.name},type:{name:Sn.type}},superTypes:[]},TypeDefinition:{name:bn.$type,properties:{},superTypes:[]},UnionType:{name:Fu.$type,properties:{types:{name:Fu.types,defaultValue:[]}},superTypes:[bn.$type]},UnorderedGroup:{name:Bl.$type,properties:{cardinality:{name:Bl.cardinality},elements:{name:Bl.elements,defaultValue:[]}},superTypes:[dt.$type]},UntilToken:{name:wn.$type,properties:{cardinality:{name:wn.cardinality},lookahead:{name:wn.lookahead},parenthesized:{name:wn.parenthesized,defaultValue:!1},terminal:{name:wn.terminal}},superTypes:[pt.$type]},ValueLiteral:{name:In.$type,properties:{},superTypes:[]},Wildcard:{name:xa.$type,properties:{cardinality:{name:xa.cardinality},lookahead:{name:xa.lookahead},parenthesized:{name:xa.parenthesized,defaultValue:!1}},superTypes:[pt.$type]}}}},s(qa,"LangiumGrammarAstReflection"),qa),K=new pm;function GT(t){let e=t,r=!1;for(;e;){const n=Kn(e.grammarSource,ot);if(n&&n.dataType)e=e.container,r=!0;else return r?e:void 0}}s(GT,"getDatatypeNode");function Oo(t){return new Io(t,e=>Cr(e)?e.content:[],{includeRoot:!0})}s(Oo,"streamCst");function jT(t){return Oo(t).filter(Bn)}s(jT,"flattenCst");function hm(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}s(hm,"isChildNode");function Ql(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}s(Ql,"tokenToRange");function Lo(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}s(Lo,"toDocumentSegment");var ir;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(ir||(ir={}));function mm(t,e){if(t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return ir.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.lineir.After}s(gm,"inRange");var ym=/^[\w\p{L}]$/u;function UT(t,e,r=ym){if(t){if(e>0){const n=e-t.offset,a=t.text.charAt(n);r.test(a)||e--}return $f(t,e)}}s(UT,"findDeclarationNodeAtOffset");function vm(t,e){if(t){const r=$m(t,!0);if(r&&Gu(r,e))return r;if(hf(t)){const n=t.content.findIndex(a=>!a.hidden);for(let a=n-1;a>=0;a--){const i=t.content[a];if(Gu(i,e))return i}}}}s(vm,"findCommentNode");function Gu(t,e){return Bn(t)&&e.includes(t.tokenType.name)}s(Gu,"isCommentNode");function $f(t,e){if(Bn(t))return t;if(Cr(t)){const r=Rm(t,e,!1);if(r)return $f(r,e)}}s($f,"findLeafNodeAtOffset");function Tm(t,e){if(Bn(t))return t;if(Cr(t)){const r=Rm(t,e,!0);if(r)return Tm(r,e)}}s(Tm,"findLeafNodeBeforeOffset");function Rm(t,e,r){let n=0,a=t.content.length-1,i;for(;n<=a;){const o=Math.floor((n+a)/2),c=t.content[o];if(c.offset<=e&&c.end>e)return c;c.end<=e?(i=r?c:void 0,n=o+1):a=o-1}return i}s(Rm,"binarySearch");function $m(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const a=r.content[n];if(e||!a.hidden)return a}t=r}}s($m,"getPreviousNode");function zT(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);const a=r.content.length-1;for(;nDm,findNameAssignment:()=>If,findNodeForKeyword:()=>Lm,findNodeForProperty:()=>Sf,findNodesForKeyword:()=>QT,findNodesForKeywordInternal:()=>wf,findNodesForProperty:()=>Om,getActionAtElement:()=>xm,getActionType:()=>Gm,getAllReachableRules:()=>Cf,getAllRulesUsedForCrossReferences:()=>ZT,getCrossReferenceTerminal:()=>km,getEntryRule:()=>wm,getExplicitRuleType:()=>Rc,getHiddenRules:()=>Im,getRuleType:()=>jm,getRuleTypeName:()=>aR,getTypeName:()=>Fn,isArrayCardinality:()=>tR,isArrayOperator:()=>rR,isCommentTerminal:()=>Pm,isDataType:()=>nR,isDataTypeRule:()=>Tc,isOptionalCardinality:()=>eR,terminalRegex:()=>$c});var Wa,Af=(Wa=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}},s(Wa,"ErrorWithLocation"),Wa);function en(t,e="Error: Got unexpected value."){throw new Error(e)}s(en,"assertUnreachable");function Em(t,e="Error: Condition is violated."){if(!t)throw new Error(e)}s(Em,"assertCondition");var _m={};Qr(_m,{NEWLINE_REGEXP:()=>HT,escapeRegExp:()=>zo,getTerminalParts:()=>XT,isMultilineComment:()=>Cm,isWhitespace:()=>_f,partialMatches:()=>Sm,partialRegExp:()=>bm,whitespaceCharacters:()=>JT});function W(t){return t.charCodeAt(0)}s(W,"cc");function lu(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}s(lu,"insertToSet");function _a(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}s(_a,"addFlag");function dn(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}s(dn,"ASSERT_EXISTS");function WT(){throw Error("Internal Error - Should never get here!")}s(WT,"ASSERT_NEVER_REACH_HERE");function Wp(t){return t.type==="Character"}s(Wp,"isCharacter");var ju=[];for(let t=W("0");t<=W("9");t++)ju.push(t);var Uu=[W("_")].concat(ju);for(let t=W("a");t<=W("z");t++)Uu.push(t);for(let t=W("A");t<=W("Z");t++)Uu.push(t);var Sy=[W(" "),W("\f"),W(` +`),W("\r"),W(" "),W("\v"),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W("\u2028"),W("\u2029"),W(" "),W(" "),W(" "),W("\uFEFF")],tk=/[0-9a-fA-F]/,xc=/[0-9]/,rk=/[1-9]/,Va,VT=(Va=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const r=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":_a(n,"global");break;case"i":_a(n,"ignoreCase");break;case"m":_a(n,"multiLine");break;case"u":_a(n,"unicode");break;case"y":_a(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){const e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){const e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":r="Lookbehind";break;case"!":r="NegativeLookbehind"}break}}dn(r);const n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return WT()}quantifier(e=!1){let r;const n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":const a=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:a,atMost:a};break;case",":let i;this.isDigit()?(i=this.integerIncludingZero(),r={atLeast:a,atMost:i}):r={atLeast:a,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;dn(r);break}if(!(e===!0&&r===void 0)&&dn(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e;const r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),dn(e))return e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[W(` +`),W("\r"),W("\u2028"),W("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=ju;break;case"D":e=ju,r=!0;break;case"s":e=Sy;break;case"S":e=Sy,r=!0;break;case"w":e=Uu;break;case"W":e=Uu,r=!0;break}if(dn(e))return{type:"Set",value:e,complement:r}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=W("\f");break;case"n":e=W(` +`);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(dn(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:W("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:W(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const e=this.popChar();return{type:"Character",value:W(e)}}}characterClass(){const e=[];let r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){const n=this.classAtom();if(n.type,Wp(n)&&this.isRangeDash()){this.consumeChar("-");const a=this.classAtom();if(a.type,Wp(a)){if(a.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},s(Va,"RegExpParser"),Va),Ha,Ef=(Ha=class{visitChildren(e){for(const r in e){const n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(a=>{this.visit(a)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},s(Ha,"BaseRegExpVisitor"),Ha),HT=/\r?\n/gm,YT=new VT,Ya,nk=(Ya=class extends Ef{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const r=String.fromCharCode(e.value);if(!this.multiline&&r===` +`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const n=zo(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(e){if(!this.multiline){const r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!` +`.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},s(Ya,"TerminalRegExpVisitor"),Ya),Nn=new nk;function XT(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;const e=YT.pattern(t),r=[];for(const n of e.value.value)Nn.reset(t),Nn.visit(n),r.push({start:Nn.startRegexp,end:Nn.endRegex});return r}catch{return[]}}s(XT,"getTerminalParts");function Cm(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),Nn.reset(t),Nn.visit(YT.pattern(t)),Nn.multiline}catch{return!1}}s(Cm,"isMultilineComment");var JT=`\f +\r \v              \u2028\u2029   \uFEFF`.split("");function _f(t){const e=typeof t=="string"?new RegExp(t):t;return JT.some(r=>e.test(r))}s(_f,"isWhitespace");function zo(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(zo,"escapeRegExp");function Sm(t,e){const r=bm(t),n=e.match(r);return!!n&&n[0].length>0}s(Sm,"partialMatches");function bm(t){typeof t=="string"&&(t=new RegExp(t));const e=t,r=t.source;let n=0;function a(){let i="",o;function c(u){i+=r.substr(n,u),n+=u}s(c,"appendRaw");function l(u){i+="(?:"+r.substr(n,u)+"|$)",n+=u}for(s(l,"appendOptional");n",n)-n+1);break;default:l(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=n,o=o.exec(r)||[],l(o[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":c(1);break;case"{":o=/\{\d+,?\d*\}/g,o.lastIndex=n,o=o.exec(r),o?c(o[0].length):l(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":i+="(?:",n+=3,i+=a()+"|$)";break;case"=":i+="(?=",n+=3,i+=a()+")";break;case"!":o=n,n+=3,a(),i+=r.substr(o,n-o);break;case"<":switch(r[n+3]){case"=":case"!":o=n,n+=4,a(),i+=r.substr(o,n-o);break;default:c(r.indexOf(">",n)-n+1),i+=a()+"|$)";break}break}else c(1),i+=a()+"|$)";break;case")":return++n,i;default:l(1);break}return i}return s(a,"process"),new RegExp(a(),t.flags)}s(bm,"partialRegExp");function wm(t){return t.rules.find(e=>ot(e)&&e.entry)}s(wm,"getEntryRule");function Im(t){return t.rules.filter(e=>xt(e)&&e.hidden)}s(Im,"getHiddenRules");function Cf(t,e){const r=new Set,n=wm(t);if(!n)return new Set(t.rules);const a=[n].concat(Im(t));for(const o of a)Nm(o,r,e);const i=new Set;for(const o of t.rules)(r.has(o.name)||xt(o)&&o.hidden)&&i.add(o);return i}s(Cf,"getAllReachableRules");function Nm(t,e,r){e.add(t.name),Dr(t).forEach(n=>{if(wr(n)||r&&vf(n)){const a=n.rule.ref;a&&!e.has(a.name)&&Nm(a,e,r)}})}s(Nm,"ruleDfs");function ZT(t){const e=new Set;return Dr(t).forEach(r=>{Wn(r)&&(ot(r.type.ref)&&e.add(r.type.ref),vc(r.type.ref)&&ot(r.type.ref.$container)&&e.add(r.type.ref.$container))}),e}s(ZT,"getAllRulesUsedForCrossReferences");function km(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=If(t.type.ref);return e==null?void 0:e.terminal}}s(km,"getCrossReferenceTerminal");function Pm(t){return t.hidden&&!_f($c(t))}s(Pm,"isCommentTerminal");function Om(t,e){return!t||!e?[]:bf(t,e,t.astNode,!0)}s(Om,"findNodesForProperty");function Sf(t,e,r){if(!t||!e)return;const n=bf(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}s(Sf,"findNodeForProperty");function bf(t,e,r,n){if(!n){const a=Kn(t.grammarSource,Sr);if(a&&a.feature===e)return[t]}return Cr(t)&&t.astNode===r?t.content.flatMap(a=>bf(a,e,r,!1)):[]}s(bf,"findNodesForPropertyInternal");function QT(t,e){return t?wf(t,e,t==null?void 0:t.astNode):[]}s(QT,"findNodesForKeyword");function Lm(t,e,r){if(!t)return;const n=wf(t,e,t==null?void 0:t.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}s(Lm,"findNodeForKeyword");function wf(t,e,r){if(t.astNode!==r)return[];if(br(t.grammarSource)&&t.grammarSource.value===e)return[t];const n=Oo(t).iterator();let a;const i=[];do if(a=n.next(),!a.done){const o=a.value;o.astNode===r?br(o.grammarSource)&&o.grammarSource.value===e&&i.push(o):n.prune()}while(!a.done);return i}s(wf,"findNodesForKeywordInternal");function Dm(t){var r;const e=t.astNode;for(;e===((r=t.container)==null?void 0:r.astNode);){const n=Kn(t.grammarSource,Sr);if(n)return n;t=t.container}}s(Dm,"findAssignment");function If(t){let e=t;return vc(e)&&(Hr(e.$container)?e=e.$container.$container:qn(e.$container)?e=e.$container:en(e.$container)),Mm(t,e,new Map)}s(If,"findNameAssignment");function Mm(t,e,r){var a;function n(i,o){let c;return Kn(i,Sr)||(c=Mm(o,o,r)),r.set(t,c),c}if(s(n,"go"),r.has(t))return r.get(t);r.set(t,void 0);for(const i of Dr(e)){if(Sr(i)&&i.feature.toLowerCase()==="name")return r.set(t,i),i;if(wr(i)&&ot(i.rule.ref))return n(i,i.rule.ref);if(yf(i)&&((a=i.typeRef)!=null&&a.ref))return n(i,i.typeRef.ref)}}s(Mm,"findNameAssignmentInternal");function xm(t){const e=t.$container;if(Vn(e)){const r=e.elements,n=r.indexOf(t);for(let a=n-1;a>=0;a--){const i=r[a];if(Hr(i))return i;{const o=Dr(r[a]).find(Hr);if(o)return o}}}if(mf(e))return xm(e)}s(xm,"getActionAtElement");function eR(t,e){return t==="?"||t==="*"||Vn(e)&&!!e.guardCondition}s(eR,"isOptionalCardinality");function tR(t){return t==="*"||t==="+"}s(tR,"isArrayCardinality");function rR(t){return t==="+="}s(rR,"isArrayOperator");function Tc(t){return Fm(t,new Set)}s(Tc,"isDataTypeRule");function Fm(t,e){if(e.has(t))return!0;e.add(t);for(const r of Dr(t))if(wr(r)){if(!r.rule.ref||ot(r.rule.ref)&&!Fm(r.rule.ref,e)||Po(r.rule.ref))return!1}else{if(Sr(r))return!1;if(Hr(r))return!1}return!!t.definition}s(Fm,"isDataTypeRuleInternal");function nR(t){return zu(t.type,new Set)}s(nR,"isDataType");function zu(t,e){if(e.has(t))return!0;if(e.add(t),Yh(t))return!1;if(im(t))return!1;if(um(t))return t.types.every(r=>zu(r,e));if(yf(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){const r=t.typeRef.ref;return Tf(r)?zu(r.type,e):!1}else return!1}else return!1}s(zu,"isDataTypeInternal");function Rc(t){if(!xt(t)){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){const e=t.returnType.ref;if(e)return e.name}}}s(Rc,"getExplicitRuleType");function Fn(t){if(qn(t))return ot(t)&&Tc(t)?t.name:Rc(t)??t.name;if(tm(t)||Tf(t)||om(t))return t.name;if(Hr(t)){const e=Gm(t);if(e)return e}else if(vc(t))return t.name;throw new Error("Cannot get name of Unknown Type")}s(Fn,"getTypeName");function Gm(t){var e;if(t.inferredType)return t.inferredType.name;if((e=t.type)!=null&&e.ref)return Fn(t.type.ref)}s(Gm,"getActionType");function aR(t){var e;return xt(t)?((e=t.type)==null?void 0:e.name)??"string":ot(t)&&Tc(t)?t.name:Rc(t)??t.name}s(aR,"getRuleTypeName");function jm(t){var e;return xt(t)?((e=t.type)==null?void 0:e.name)??"string":Rc(t)??t.name}s(jm,"getRuleType");function $c(t){const e={s:!1,i:!1,u:!1},r=Hn(t.definition,e),n=Object.entries(e).filter(([,a])=>a).map(([a])=>a).join("");return new RegExp(r,n)}s($c,"terminalRegex");var Um=/[\s\S]/.source;function Hn(t,e){var r;if(lm(t))return iR(t);if(cm(t))return sR(t);if(Jh(t))return cR(t);if(vf(t)){const n=t.rule.ref;if(!n)throw new Error("Missing rule reference.");return cr(Hn(n.definition),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}else{if(rm(t))return lR(t);if(fm(t))return oR(t);if(sm(t)){const n=t.regex.lastIndexOf("/"),a=t.regex.substring(1,n),i=t.regex.substring(n+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),cr(a,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}else{if(dm(t))return cr(Um,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized});throw new Error(`Invalid terminal element: ${t==null?void 0:t.$type}, ${(r=t==null?void 0:t.$cstNode)==null?void 0:r.text}`)}}}s(Hn,"abstractElementToRegex");function iR(t){return cr(t.elements.map(e=>Hn(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(iR,"terminalAlternativesToRegex");function sR(t){return cr(t.elements.map(e=>Hn(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(sR,"terminalGroupToRegex");function oR(t){return cr(`${Um}*?${Hn(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}s(oR,"untilTokenToRegex");function lR(t){return cr(`(?!${Hn(t.terminal)})${Um}*?`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}s(lR,"negateTokenToRegex");function cR(t){return t.right?cr(`[${cu(t.left)}-${cu(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1}):cr(cu(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(cR,"characterRangeToRegex");function cu(t){return zo(t.value)}s(cu,"keywordToRegex");function cr(t,e){return(e.parenthesized||e.lookahead||e.wrap!==!1)&&(t=`(${e.lookahead??(e.parenthesized?"":"?:")}${t})`),e.cardinality?`${t}${e.cardinality}`:t}s(cr,"withCardinality");function zm(t){const e=[],r=t.Grammar;for(const n of r.rules)xt(n)&&Pm(n)&&Cm($c(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:ym}}s(zm,"createGrammarConfig");var ak=typeof global=="object"&&global&&global.Object===Object&&global,uR=ak,ik=typeof self=="object"&&self&&self.Object===Object&&self,sk=uR||ik||Function("return this")(),fr=sk,ok=fr.Symbol,Dt=ok,fR=Object.prototype,lk=fR.hasOwnProperty,ck=fR.toString,ml=Dt?Dt.toStringTag:void 0;function dR(t){var e=lk.call(t,ml),r=t[ml];try{t[ml]=void 0;var n=!0}catch{}var a=ck.call(t);return n&&(e?t[ml]=r:delete t[ml]),a}s(dR,"getRawTag");var uk=dR,fk=Object.prototype,dk=fk.toString;function pR(t){return dk.call(t)}s(pR,"objectToString");var pk=pR,hk="[object Null]",mk="[object Undefined]",by=Dt?Dt.toStringTag:void 0;function hR(t){return t==null?t===void 0?mk:hk:by&&by in Object(t)?uk(t):pk(t)}s(hR,"baseGetTag");var tn=hR;function mR(t){return t!=null&&typeof t=="object"}s(mR,"isObjectLike");var Vt=mR,gk="[object Symbol]";function gR(t){return typeof t=="symbol"||Vt(t)&&tn(t)==gk}s(gR,"isSymbol");var Nf=gR;function yR(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r0){if(++e>=Zk)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}s(LR,"shortOut");var tP=LR;function DR(t){return function(){return t}}s(DR,"constant");var rP=DR,nP=function(){try{var t=Xn(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Bu=nP,aP=Bu?function(t,e){return Bu(t,"toString",{configurable:!0,enumerable:!1,value:rP(e),writable:!0})}:Do,iP=aP,sP=tP(iP),oP=sP;function MR(t,e){for(var r=-1,n=t==null?0:t.length;++r-1}s(BR,"arrayIncludes");var KR=BR,uP=9007199254740991,fP=/^(?:0|[1-9]\d*)$/;function qR(t,e){var r=typeof t;return e=e??uP,!!e&&(r=="number"||r!="symbol"&&fP.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=mP}s(ZR,"isLength");var Vm=ZR;function QR(t){return t!=null&&Vm(t.length)&&!Mr(t)}s(QR,"isArrayLike");var dr=QR;function e$(t,e,r){if(!Mt(r))return!1;var n=typeof e;return(n=="number"?dr(r)&&kf(e,r.length):n=="string"&&e in r)?_c(r[e],t):!1}s(e$,"isIterateeCall");var Of=e$;function t$(t){return Wm(function(e,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(a--,i):void 0,o&&Of(r[0],r[1],o)&&(i=a<3?void 0:i,a=1),e=Object(e);++n-1}s(k$,"listCacheHas");var O0=k$;function P$(t,e){var r=this.__data__,n=Mf(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}s(P$,"listCacheSet");var L0=P$;function Zn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e0&&r(c)?e>1?Zm(c,e-1,r,n,a):Jm(a,c):n||(a[a.length]=c)}return a}s(Zm,"baseFlatten");var Qm=Zm;function H$(t){var e=t==null?0:t.length;return e?Qm(t,1):[]}s(H$,"flatten");var qt=H$,Q0=h$(Object.getPrototypeOf,Object),Y$=Q0;function X$(t,e,r){var n=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(a);++nc))return!1;var u=i.get(t),f=i.get(e);if(u&&f)return u==e&&f==t;var d=-1,p=!0,m=r&BL?new ng:void 0;for(i.set(t,e),i.set(e,t);++d2?e[2]:void 0;for(a&&Of(e[0],e[1],a)&&(n=1);++r=MD&&(i=ag,o=!1,e=new ng(e));e:for(;++a-1?a[i?e[o]:o]:void 0}}s(kE,"createFind");var zD=kE,BD=Math.max;function PE(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:Ec(r);return a<0&&(a=BD(n+a,0)),GR(t,pr(e),a)}s(PE,"findIndex");var KD=PE,qD=zD(KD),xo=qD;function OE(t){return t&&t.length?t[0]:void 0}s(OE,"head");var Ht=OE;function LE(t,e){var r=-1,n=dr(t)?Array(t.length):[];return ta(t,function(a,i,o){n[++r]=e(a,i,o)}),n}s(LE,"baseMap");var WD=LE;function DE(t,e){var r=ae(t)?Ac:WD;return r(t,pr(e))}s(DE,"map");var z=DE;function ME(t,e){return Qm(z(t,e),1)}s(ME,"flatMap");var Lt=ME,VD=Object.prototype,HD=VD.hasOwnProperty,YD=OD(function(t,e,r){HD.call(t,r)?t[r].push(e):qm(t,r,[e])}),XD=YD,JD=Object.prototype,ZD=JD.hasOwnProperty;function xE(t,e){return t!=null&&ZD.call(t,e)}s(xE,"baseHas");var QD=xE;function FE(t,e){return t!=null&&rE(t,e,QD)}s(FE,"has");var q=FE,eM="[object String]";function GE(t){return typeof t=="string"||!ae(t)&&Vt(t)&&tn(t)==eM}s(GE,"isString");var mt=GE;function jE(t,e){return Ac(e,function(r){return t[r]})}s(jE,"baseValues");var tM=jE;function UE(t){return t==null?[]:tM(t,$t(t))}s(UE,"values");var We=UE,rM=Math.max;function zE(t,e,r,n){t=dr(t)?t:We(t),r=r&&!n?Ec(r):0;var a=t.length;return r<0&&(r=rM(a+r,0)),mt(t)?r<=a&&t.indexOf(e,r)>-1:!!a&&Km(t,e,r)>-1}s(zE,"includes");var ft=zE,nM=Math.max;function BE(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:Ec(r);return a<0&&(a=nM(n+a,0)),Km(t,e,a)}s(BE,"indexOf");var iv=BE,aM="[object Map]",iM="[object Set]",sM=Object.prototype,oM=sM.hasOwnProperty;function KE(t){if(t==null)return!0;if(dr(t)&&(ae(t)||typeof t=="string"||typeof t.splice=="function"||ec(t)||Hm(t)||Lf(t)))return!t.length;var e=Mo(t);if(e==aM||e==iM)return!t.size;if(Sc(t))return!g$(t).length;for(var r in t)if(oM.call(t,r))return!1;return!0}s(KE,"isEmpty");var Ee=KE,lM="[object RegExp]";function qE(t){return Vt(t)&&tn(t)==lM}s(qE,"baseIsRegExp");var cM=qE,sv=Yr&&Yr.isRegExp,uM=sv?bc(sv):cM,Ir=uM;function WE(t){return t===void 0}s(WE,"isUndefined");var Nr=WE,fM="Expected a function";function VE(t){if(typeof t!="function")throw new TypeError(fM);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}s(VE,"negate");var dM=VE;function HE(t,e,r,n){if(!Mt(t))return t;e=Uf(e,t);for(var a=-1,i=e.length,o=i-1,c=t;c!=null&&++a=RM){var u=e?null:TM(t);if(u)return ig(u);o=!1,a=ag,l=new ng}else l=e?[]:c;e:for(;++n{r.accept(e)})}},s(Xa,"AbstractProduction"),Xa),Ja,lt=(Ja=class extends hr{constructor(e){super([]),this.idx=1,At(this,Yt(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},s(Ja,"NonTerminal"),Ja),Za,Bo=(Za=class extends hr{constructor(e){super(e.definition),this.orgText="",At(this,Yt(e,r=>r!==void 0))}},s(Za,"Rule"),Za),Qa,gt=(Qa=class extends hr{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,At(this,Yt(e,r=>r!==void 0))}},s(Qa,"Alternative"),Qa),ei,Qe=(ei=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ei,"Option"),ei),ti,_t=(ti=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ti,"RepetitionMandatory"),ti),ri,Ct=(ri=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ri,"RepetitionMandatoryWithSeparator"),ri),ni,xe=(ni=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ni,"Repetition"),ni),ai,yt=(ai=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ai,"RepetitionWithSeparator"),ai),ii,vt=(ii=class extends hr{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,At(this,Yt(e,r=>r!==void 0))}},s(ii,"Alternation"),ii),si,we=(si=class{constructor(e){this.idx=1,At(this,Yt(e,r=>r!==void 0))}accept(e){e.visit(this)}},s(si,"Terminal"),si);function o_(t){return z(t,Vl)}s(o_,"serializeGrammar");function Vl(t){function e(r){return z(r,Vl)}if(s(e,"convertDefinition"),t instanceof lt){const r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return mt(t.label)&&(r.label=t.label),r}else{if(t instanceof gt)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Qe)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof _t)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Ct)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Vl(new we({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof yt)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Vl(new we({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof xe)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof vt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof we){const r={type:"Terminal",name:t.terminalType.name,label:i_(t.terminalType),idx:t.idx};mt(t.label)&&(r.terminalLabel=t.label);const n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=Ir(n)?n.source:n),r}else{if(t instanceof Bo)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}s(Vl,"serializeProduction");var oi,Ko=(oi=class{visit(e){const r=e;switch(r.constructor){case lt:return this.visitNonTerminal(r);case gt:return this.visitAlternative(r);case Qe:return this.visitOption(r);case _t:return this.visitRepetitionMandatory(r);case Ct:return this.visitRepetitionMandatoryWithSeparator(r);case yt:return this.visitRepetitionWithSeparator(r);case xe:return this.visitRepetition(r);case vt:return this.visitAlternation(r);case we:return this.visitTerminal(r);case Bo:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}},s(oi,"GAstVisitor"),oi);function l_(t){return t instanceof gt||t instanceof Qe||t instanceof xe||t instanceof _t||t instanceof Ct||t instanceof yt||t instanceof we||t instanceof Bo}s(l_,"isSequenceProd");function ic(t,e=[]){return t instanceof Qe||t instanceof xe||t instanceof yt?!0:t instanceof vt?r_(t.definition,n=>ic(n,e)):t instanceof lt&&ft(e,t)?!1:t instanceof hr?(t instanceof lt&&e.push(t),Wt(t.definition,n=>ic(n,e))):!1}s(ic,"isOptionalProd");function c_(t){return t instanceof vt}s(c_,"isBranchingProd");function Ut(t){if(t instanceof lt)return"SUBRULE";if(t instanceof Qe)return"OPTION";if(t instanceof vt)return"OR";if(t instanceof _t)return"AT_LEAST_ONE";if(t instanceof Ct)return"AT_LEAST_ONE_SEP";if(t instanceof yt)return"MANY_SEP";if(t instanceof xe)return"MANY";if(t instanceof we)return"CONSUME";throw Error("non exhaustive match")}s(Ut,"getProductionDslName");var li,Kf=(li=class{walk(e,r=[]){V(e.definition,(n,a)=>{const i=Ze(e.definition,a+1);if(n instanceof lt)this.walkProdRef(n,i,r);else if(n instanceof we)this.walkTerminal(n,i,r);else if(n instanceof gt)this.walkFlat(n,i,r);else if(n instanceof Qe)this.walkOption(n,i,r);else if(n instanceof _t)this.walkAtLeastOne(n,i,r);else if(n instanceof Ct)this.walkAtLeastOneSep(n,i,r);else if(n instanceof yt)this.walkManySep(n,i,r);else if(n instanceof xe)this.walkMany(n,i,r);else if(n instanceof vt)this.walkOr(n,i,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){const a=r.concat(n);this.walk(e,a)}walkOption(e,r,n){const a=r.concat(n);this.walk(e,a)}walkAtLeastOne(e,r,n){const a=[new Qe({definition:e.definition})].concat(r,n);this.walk(e,a)}walkAtLeastOneSep(e,r,n){const a=Jp(e,r,n);this.walk(e,a)}walkMany(e,r,n){const a=[new Qe({definition:e.definition})].concat(r,n);this.walk(e,a)}walkManySep(e,r,n){const a=Jp(e,r,n);this.walk(e,a)}walkOr(e,r,n){const a=r.concat(n);V(e.definition,i=>{const o=new gt({definition:[i]});this.walk(o,a)})}},s(li,"RestWalker"),li);function Jp(t,e,r){return[new Qe({definition:[new we({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}s(Jp,"restForRepetitionWithSeparator");function qo(t){if(t instanceof lt)return qo(t.referencedRule);if(t instanceof we)return d_(t);if(l_(t))return u_(t);if(c_(t))return f_(t);throw Error("non exhaustive match")}s(qo,"first");function u_(t){let e=[];const r=t.definition;let n=0,a=r.length>n,i,o=!0;for(;a&&o;)i=r[n],o=ic(i),e=e.concat(qo(i)),n=n+1,a=r.length>n;return lg(e)}s(u_,"firstForSequence");function f_(t){const e=z(t.definition,r=>qo(r));return lg(qt(e))}s(f_,"firstForBranching");function d_(t){return[t.terminalType]}s(d_,"firstForTerminal");var p_="_~IN~_",ci,AM=(ci=class extends Kf{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){const a=m_(e.referencedRule,e.idx)+this.topProd.name,i=r.concat(n),o=new gt({definition:i}),c=qo(o);this.follows[a]=c}},s(ci,"ResyncFollowsWalker"),ci);function h_(t){const e={};return V(t,r=>{const n=new AM(r).startWalking();At(e,n)}),e}s(h_,"computeAllProdsFollows");function m_(t,e){return t.name+e+p_}s(m_,"buildBetweenProdsFollowPrefix");var uu={},EM=new VT;function Nc(t){const e=t.toString();if(uu.hasOwnProperty(e))return uu[e];{const r=EM.pattern(e);return uu[e]=r,r}}s(Nc,"getRegExpAst");function g_(){uu={}}s(g_,"clearRegExpParserCache");var y_="Complement Sets are not supported for first char optimization",Wu=`Unable to use "first char" lexer optimizations: +`;function v_(t,e=!1){try{const r=Nc(t);return Vu(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===y_)e&&cg(`${Wu} Unable to optimize: < ${t.toString()} > + Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),qu(`${Wu} + Failed parsing: < ${t.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}s(v_,"getOptimizedStartCodesIndices");function Vu(t,e,r){switch(t.type){case"Disjunction":for(let a=0;a{if(typeof l=="number")kl(l,e,r);else{const u=l;if(r===!0)for(let f=u.from;f<=u.to;f++)kl(f,e,r);else{for(let f=u.from;f<=u.to&&f=Ol){const f=u.from>=Ol?u.from:Ol,d=u.to,p=kr(f),m=kr(d);for(let g=p;g<=m;g++)e[g]=g}}}});break;case"Group":Vu(o.value,e,r);break;default:throw Error("Non Exhaustive Match")}const c=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&Hu(o)===!1||o.type!=="Group"&&c===!1)break}break;default:throw Error("non exhaustive match!")}return We(e)}s(Vu,"firstCharOptimizedIndices");function kl(t,e,r){const n=kr(t);e[n]=n,r===!0&&T_(t,e)}s(kl,"addOptimizedIdxToResult");function T_(t,e){const r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){const a=kr(n.charCodeAt(0));e[a]=a}else{const a=r.toLowerCase();if(a!==r){const i=kr(a.charCodeAt(0));e[i]=i}}}s(T_,"handleIgnoreCase");function Zp(t,e){return xo(t.value,r=>{if(typeof r=="number")return ft(e,r);{const n=r;return xo(e,a=>n.from<=a&&a<=n.to)!==void 0}})}s(Zp,"findCode");function Hu(t){const e=t.quantifier;return e&&e.atLeast===0?!0:t.value?ae(t.value)?Wt(t.value,Hu):Hu(t.value):!1}s(Hu,"isWholeOptional");var ui,_M=(ui=class extends Ef{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return;case"Lookbehind":this.visitLookbehind(e);return;case"NegativeLookbehind":this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){ft(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Zp(e,this.targetCharCodes)===void 0&&(this.found=!0):Zp(e,this.targetCharCodes)!==void 0&&(this.found=!0)}},s(ui,"CharCodeFinder"),ui);function qf(t,e){if(e instanceof RegExp){const r=Nc(e),n=new _M(t);return n.visit(r),n.found}else return xo(e,r=>ft(t,r.charCodeAt(0)))!==void 0}s(qf,"canMatchCharCode");var jn="PATTERN",Pl="defaultMode",Gc="modes",R_=typeof new RegExp("(?:)").sticky=="boolean";function $_(t,e){e=og(e,{useSticky:R_,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:s((w,C)=>C(),"tracer")});const r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{z_()});let n;r("Reject Lexer.NA",()=>{n=Bf(t,w=>w[jn]===st.NA)});let a=!1,i;r("Transform Patterns",()=>{a=!1,i=z(n,w=>{const C=w[jn];if(Ir(C)){const k=C.source;return k.length===1&&k!=="^"&&k!=="$"&&k!=="."&&!C.ignoreCase?k:k.length===2&&k[0]==="\\"&&!ft(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],k[1])?k[1]:e.useSticky?eh(C):Qp(C)}else{if(Mr(C))return a=!0,{exec:C};if(typeof C=="object")return a=!0,C;if(typeof C=="string"){if(C.length===1)return C;{const k=C.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),B=new RegExp(k);return e.useSticky?eh(B):Qp(B)}}else throw Error("non exhaustive match")}})});let o,c,l,u,f;r("misc mapping",()=>{o=z(n,w=>w.tokenTypeIdx),c=z(n,w=>{const C=w.GROUP;if(C!==st.SKIPPED){if(mt(C))return C;if(Nr(C))return!1;throw Error("non exhaustive match")}}),l=z(n,w=>{const C=w.LONGER_ALT;if(C)return ae(C)?z(C,B=>iv(n,B)):[iv(n,C)]}),u=z(n,w=>w.PUSH_MODE),f=z(n,w=>q(w,"POP_MODE"))});let d;r("Line Terminator Handling",()=>{const w=hg(e.lineTerminatorCharacters);d=z(n,C=>!1),e.positionTracking!=="onlyOffset"&&(d=z(n,C=>q(C,"LINE_BREAKS")?!!C.LINE_BREAKS:pg(C,w)===!1&&qf(w,C.PATTERN)))});let p,m,g,v;r("Misc Mapping #2",()=>{p=z(n,dg),m=z(i,j_),g=Et(n,(w,C)=>{const k=C.GROUP;return mt(k)&&k!==st.SKIPPED&&(w[k]=[]),w},{}),v=z(i,(w,C)=>({pattern:i[C],longerAlt:l[C],canLineTerminator:d[C],isCustom:p[C],short:m[C],group:c[C],push:u[C],pop:f[C],tokenTypeIdx:o[C],tokenType:n[C]}))});let E=!0,T=[];return e.safeMode||r("First Char Optimization",()=>{T=Et(n,(w,C,k)=>{if(typeof C.PATTERN=="string"){const B=C.PATTERN.charCodeAt(0),re=kr(B);fu(w,re,v[k])}else if(ae(C.START_CHARS_HINT)){let B;V(C.START_CHARS_HINT,re=>{const X=typeof re=="string"?re.charCodeAt(0):re,ge=kr(X);B!==ge&&(B=ge,fu(w,ge,v[k]))})}else if(Ir(C.PATTERN))if(C.PATTERN.unicode)E=!1,e.ensureOptimizations&&qu(`${Wu} Unable to analyze < ${C.PATTERN.toString()} > pattern. + The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const B=v_(C.PATTERN,e.ensureOptimizations);Ee(B)&&(E=!1),V(B,re=>{fu(w,re,v[k])})}else e.ensureOptimizations&&qu(`${Wu} TokenType: <${C.name}> is using a custom token pattern without providing parameter. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),E=!1;return w},[])}),{emptyGroups:g,patternIdxToConfig:v,charCodeToPatternIdxToConfig:T,hasCustom:a,canBeOptimized:E}}s($_,"analyzeTokenTypes");function A_(t,e){let r=[];const n=__(t);r=r.concat(n.errors);const a=C_(n.valid),i=a.valid;return r=r.concat(a.errors),r=r.concat(E_(i)),r=r.concat(k_(i)),r=r.concat(P_(i,e)),r=r.concat(O_(i)),r}s(A_,"validatePatterns");function E_(t){let e=[];const r=Ft(t,n=>Ir(n[jn]));return e=e.concat(S_(r)),e=e.concat(w_(r)),e=e.concat(I_(r)),e=e.concat(N_(r)),e=e.concat(b_(r)),e}s(E_,"validateRegExpPattern");function __(t){const e=Ft(t,a=>!q(a,jn)),r=z(e,a=>({message:"Token Type: ->"+a.name+"<- missing static 'PATTERN' property",type:Fe.MISSING_PATTERN,tokenTypes:[a]})),n=zf(t,e);return{errors:r,valid:n}}s(__,"findMissingPatterns");function C_(t){const e=Ft(t,a=>{const i=a[jn];return!Ir(i)&&!Mr(i)&&!q(i,"exec")&&!mt(i)}),r=z(e,a=>({message:"Token Type: ->"+a.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Fe.INVALID_PATTERN,tokenTypes:[a]})),n=zf(t,e);return{errors:r,valid:n}}s(C_,"findInvalidPatterns");var CM=/[^\\][$]/;function S_(t){const a=class a extends Ef{constructor(){super(...arguments),this.found=!1}visitEndAnchor(o){this.found=!0}};s(a,"EndAnchorFinder");let e=a;const r=Ft(t,i=>{const o=i.PATTERN;try{const c=Nc(o),l=new e;return l.visit(c),l.found}catch{return CM.test(o.source)}});return z(r,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Fe.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}s(S_,"findEndOfInputAnchor");function b_(t){const e=Ft(t,n=>n.PATTERN.test(""));return z(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Fe.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}s(b_,"findEmptyMatchRegExps");var SM=/[^\\[][\^]|^\^/;function w_(t){const a=class a extends Ef{constructor(){super(...arguments),this.found=!1}visitStartAnchor(o){this.found=!0}};s(a,"StartAnchorFinder");let e=a;const r=Ft(t,i=>{const o=i.PATTERN;try{const c=Nc(o),l=new e;return l.visit(c),l.found}catch{return SM.test(o.source)}});return z(r,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Fe.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}s(w_,"findStartOfInputAnchor");function I_(t){const e=Ft(t,n=>{const a=n[jn];return a instanceof RegExp&&(a.multiline||a.global)});return z(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Fe.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}s(I_,"findUnsupportedFlags");function N_(t){const e=[];let r=z(t,i=>Et(t,(o,c)=>(i.PATTERN.source===c.PATTERN.source&&!ft(e,c)&&c.PATTERN!==st.NA&&(e.push(c),o.push(c)),o),[]));r=Ic(r);const n=Ft(r,i=>i.length>1);return z(n,i=>{const o=z(i,l=>l.name);return{message:`The same RegExp pattern ->${Ht(i).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:Fe.DUPLICATE_PATTERNS_FOUND,tokenTypes:i}})}s(N_,"findDuplicatePatterns");function k_(t){const e=Ft(t,n=>{if(!q(n,"GROUP"))return!1;const a=n.GROUP;return a!==st.SKIPPED&&a!==st.NA&&!mt(a)});return z(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Fe.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}s(k_,"findInvalidGroupType");function P_(t,e){const r=Ft(t,a=>a.PUSH_MODE!==void 0&&!ft(e,a.PUSH_MODE));return z(r,a=>({message:`Token Type: ->${a.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${a.PUSH_MODE}<-which does not exist`,type:Fe.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[a]}))}s(P_,"findModesThatDoNotExist");function O_(t){const e=[],r=Et(t,(n,a,i)=>{const o=a.PATTERN;return o===st.NA||(mt(o)?n.push({str:o,idx:i,tokenType:a}):Ir(o)&&D_(o)&&n.push({str:o.source,idx:i,tokenType:a})),n},[]);return V(t,(n,a)=>{V(r,({str:i,idx:o,tokenType:c})=>{if(a${c.name}<- can never be matched. +Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:l,type:Fe.UNREACHABLE_PATTERN,tokenTypes:[n,c]})}})}),e}s(O_,"findUnreachablePatterns");function L_(t,e){if(Ir(e)){if(M_(e))return!1;const r=e.exec(t);return r!==null&&r.index===0}else{if(Mr(e))return e(t,0,[],{});if(q(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}s(L_,"tryToMatchStrToPattern");function D_(t){return xo([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}s(D_,"noMetaChar");function M_(t){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition +`,type:Fe.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),q(t,Gc)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Gc+`> property in its definition +`,type:Fe.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),q(t,Gc)&&q(t,Pl)&&!q(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Pl}: <${t.defaultMode}>which does not exist +`,type:Fe.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),q(t,Gc)&&V(t.modes,(a,i)=>{V(a,(o,c)=>{if(Nr(o))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${c}> +`,type:Fe.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(q(o,"LONGER_ALT")){const l=ae(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];V(l,u=>{!Nr(u)&&!ft(a,u)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${o.name}> outside of mode <${i}> +`,type:Fe.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}s(x_,"performRuntimeChecks");function F_(t,e,r){const n=[];let a=!1;const i=Ic(qt(We(t.modes))),o=Bf(i,l=>l[jn]===st.NA),c=hg(r);return e&&V(o,l=>{const u=pg(l,c);if(u!==!1){const d={message:U_(l,u),type:u.issue,tokenType:l};n.push(d)}else q(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(a=!0):qf(c,l.PATTERN)&&(a=!0)}),e&&!a&&n.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:Fe.NO_LINE_BREAKS_FLAGS}),n}s(F_,"performWarningRuntimeChecks");function G_(t){const e={},r=$t(t);return V(r,n=>{const a=t[n];if(ae(a))e[n]=[];else throw Error("non exhaustive match")}),e}s(G_,"cloneEmptyGroups");function dg(t){const e=t.PATTERN;if(Ir(e))return!1;if(Mr(e))return!0;if(q(e,"exec"))return!0;if(mt(e))return!1;throw Error("non exhaustive match")}s(dg,"isCustomPattern");function j_(t){return mt(t)&&t.length===1?t.charCodeAt(0):!1}s(j_,"isShortPattern");var bM={test:s(function(t){const e=t.length;for(let r=this.lastIndex;r Token Type + Root cause: ${e.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Fe.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${t.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}s(U_,"buildLineBreakIssueMessage");function hg(t){return z(t,r=>mt(r)?r.charCodeAt(0):r)}s(hg,"getCharCodes");function fu(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}s(fu,"addToMapOfArrays");var Ol=256,du=[];function kr(t){return t255?255+~~(t/255):t}}s(z_,"initCharCodeToOptimizedIndexMap");function Wo(t,e){const r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}s(Wo,"tokenStructuredMatcher");function sc(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}s(sc,"tokenStructuredMatcherNoCategories");var ov=1,B_={};function Vo(t){const e=K_(t);q_(e),V_(e),W_(e),V(e,r=>{r.isParent=r.categoryMatches.length>0})}s(Vo,"augmentTokenTypes");function K_(t){let e=et(t),r=t,n=!0;for(;n;){r=Ic(qt(z(r,i=>i.CATEGORIES)));const a=zf(r,e);e=e.concat(a),Ee(a)?n=!1:r=a}return e}s(K_,"expandCategories");function q_(t){V(t,e=>{gg(e)||(B_[ov]=e,e.tokenTypeIdx=ov++),th(e)&&!ae(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),th(e)||(e.CATEGORIES=[]),H_(e)||(e.categoryMatches=[]),Y_(e)||(e.categoryMatchesMap={})})}s(q_,"assignTokenDefaultProps");function W_(t){V(t,e=>{e.categoryMatches=[],V(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(B_[n].tokenTypeIdx)})})}s(W_,"assignCategoriesTokensProp");function V_(t){V(t,e=>{mg([],e)})}s(V_,"assignCategoriesMapProp");function mg(t,e){V(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),V(e.CATEGORIES,r=>{const n=t.concat(e);ft(n,r)||mg(n,r)})}s(mg,"singleAssignCategoriesToksMap");function gg(t){return q(t,"tokenTypeIdx")}s(gg,"hasShortKeyProperty");function th(t){return q(t,"CATEGORIES")}s(th,"hasCategoriesProperty");function H_(t){return q(t,"categoryMatches")}s(H_,"hasExtendingTokensTypesProperty");function Y_(t){return q(t,"categoryMatchesMap")}s(Y_,"hasExtendingTokensTypesMapProperty");function X_(t){return q(t,"tokenTypeIdx")}s(X_,"isTokenType");var rh={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,a,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}},Fe;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Fe||(Fe={}));var Ll={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:rh,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Ll);var fi,st=(fi=class{constructor(e,r=Ll){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(a,i)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;const o=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${a}>`);const{time:c,value:l}=ug(i),u=c>10?console.warn:console.log;return this.traceInitIndent time: ${c}ms`),this.traceInitIndent--,l}else return i()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=At({},Ll,r);const n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let a,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Ll.lineTerminatorsPattern)this.config.lineTerminatorsPattern=bM;else if(this.config.lineTerminatorCharacters===Ll.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),ae(e)?a={modes:{defaultMode:et(e)},defaultMode:Pl}:(i=!1,a=et(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(x_(a,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(F_(a,this.trackStartLines,this.config.lineTerminatorCharacters))})),a.modes=a.modes?a.modes:{},V(a.modes,(c,l)=>{a.modes[l]=Bf(c,u=>Nr(u))});const o=$t(a.modes);if(V(a.modes,(c,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(A_(c,o))}),Ee(this.lexerDefinitionErrors)){Vo(c);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=$_(c,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=u.charCodeToPatternIdxToConfig,this.emptyGroups=At({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=u.canBeOptimized}})}),this.defaultMode=a.defaultMode,!Ee(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const l=z(this.lexerDefinitionErrors,u=>u.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+l)}V(this.lexerDefinitionWarning,c=>{cg(c.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(R_?(this.chopInput=Do,this.match=this.matchWithTest):(this.updateLastIndex=qe,this.match=this.matchWithExec),i&&(this.handleModes=qe),this.trackStartLines===!1&&(this.computeNewColumn=Do),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=qe),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const c=Et(this.canModeBeOptimized,(l,u,f)=>(u===!1&&l.push(f),l),[]);if(r.ensureOptimizations&&!Ee(c))throw Error(`Lexer Modes: < ${c.join(", ")} > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{g_()}),this.TRACE_INIT("toFastProperties",()=>{fg(this)})})}tokenize(e,r=this.defaultMode){if(!Ee(this.lexerDefinitionErrors)){const a=z(this.lexerDefinitionErrors,i=>i.message).join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+a)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,a,i,o,c,l,u,f,d,p,m,g,v,E,T;const w=e,C=w.length;let k=0,B=0;const re=this.hasCustom?0:Math.floor(e.length/10),X=new Array(re),ge=[];let _e=this.trackStartLines?1:void 0,Ie=this.trackStartLines?1:void 0;const oe=G_(this.emptyGroups),tt=this.trackStartLines,P=this.config.lineTerminatorsPattern;let S=0,R=[],I=[];const $=[],A=[];Object.freeze(A);let b;function O(){return R}s(O,"getPossiblePatternsSlow");function M(U){const Q=kr(U),fe=I[Q];return fe===void 0?A:fe}s(M,"getPossiblePatternsOptimized");const L=s(U=>{if($.length===1&&U.tokenType.PUSH_MODE===void 0){const Q=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(U);ge.push({offset:U.startOffset,line:U.startLine,column:U.startColumn,length:U.image.length,message:Q})}else{$.pop();const Q=Gn($);R=this.patternIdxToConfig[Q],I=this.charCodeToPatternIdxToConfig[Q],S=R.length;const fe=this.canModeBeOptimized[Q]&&this.config.safeMode===!1;I&&fe?b=M:b=O}},"pop_mode");function j(U){$.push(U),I=this.charCodeToPatternIdxToConfig[U],R=this.patternIdxToConfig[U],S=R.length,S=R.length;const Q=this.canModeBeOptimized[U]&&this.config.safeMode===!1;I&&Q?b=M:b=O}s(j,"push_mode"),j.call(this,r);let F;const te=this.config.recoveryEnabled;for(;kl.length){l=o,u=f,F=Ne;break}}}break}}if(l!==null){if(d=l.length,p=F.group,p!==void 0&&(m=F.tokenTypeIdx,g=this.createTokenInstance(l,k,m,F.tokenType,_e,Ie,d),this.handlePayload(g,u),p===!1?B=this.addToken(X,B,g):oe[p].push(g)),e=this.chopInput(e,d),k=k+d,Ie=this.computeNewColumn(Ie,d),tt===!0&&F.canLineTerminator===!0){let de=0,pe,ye;P.lastIndex=0;do pe=P.test(l),pe===!0&&(ye=P.lastIndex-1,de++);while(pe===!0);de!==0&&(_e=_e+de,Ie=d-ye,this.updateTokenEndLineColumnLocation(g,p,ye,de,_e,Ie,d))}this.handleModes(F,L,j,g)}else{const de=k,pe=_e,ye=Ie;let Ne=te===!1;for(;Ne===!1&&k ${Ln(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:a}){const i="Expecting: ",c=` +but found: '`+Ht(e).image+"'";if(n)return i+n+c;{const l=Et(t,(p,m)=>p.concat(m),[]),u=z(l,p=>`[${z(p,m=>Ln(m)).join(", ")}]`),d=`one of these possible Token sequences: +${z(u,(p,m)=>` ${m+1}. ${p}`).join(` +`)}`;return i+d+c}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){const a="Expecting: ",o=` +but found: '`+Ht(e).image+"'";if(r)return a+r+o;{const l=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${z(t,u=>`[${z(u,f=>Ln(f)).join(",")}]`).join(" ,")}>`;return a+l+o}}};Object.freeze(Fa);var IM={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+t.name+"<-"}},kn={buildDuplicateFoundError(t,e){function r(f){return f instanceof we?f.terminalType.name:f instanceof lt?f.nonTerminalName:""}s(r,"getExtraProductionArgument");const n=t.name,a=Ht(e),i=a.idx,o=Ut(a),c=r(a),l=i>0;let u=`->${o}${l?i:""}<- ${c?`with argument: ->${c}<-`:""} + appears more than once (${e.length} times) in the top level rule: ->${n}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,` +`),u},buildNamespaceConflictError(t){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){const e=z(t.prefixPath,a=>Ln(a)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(t){const e=z(t.prefixPath,a=>Ln(a)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n},buildEmptyRepetitionError(t){let e=Ut(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. +This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in inside <${t.topLevelRule.name}> Rule. +Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives: + inside <${t.topLevelRule.name}> Rule. + has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){const e=t.topLevelRule.name,r=z(t.leftRecursionPath,i=>i.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar. +rule: <${e}> can be invoked from itself (directly or indirectly) +without consuming any Tokens. The grammar path that causes this is: + ${n} + To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof Bo?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function Z_(t,e){const r=new NM(t,e);return r.resolveRefs(),r.errors}s(Z_,"resolveGrammar");var di,NM=(di=class extends Ko{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){V(We(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{const n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:ct.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},s(di,"GastRefResolverVisitor"),di),pi,kM=(pi=class extends Kf{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=et(this.path.ruleStack).reverse(),this.occurrenceStack=et(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const a=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,a)}}updateExpectedNext(){Ee(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},s(pi,"AbstractNextPossibleTokensWalker"),pi),hi,PM=(hi=class extends kM{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const a=r.concat(n),i=new gt({definition:a});this.possibleTokTypes=qo(i),this.found=!0}}},s(hi,"NextAfterTokenWalker"),hi),mi,Wf=(mi=class extends Kf{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},s(mi,"AbstractNextTerminalAfterProductionWalker"),mi),gi,OM=(gi=class extends Wf{walkMany(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkMany(e,r,n)}},s(gi,"NextTerminalAfterManyWalker"),gi),yi,gv=(yi=class extends Wf{walkManySep(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkManySep(e,r,n)}},s(yi,"NextTerminalAfterManySepWalker"),yi),vi,LM=(vi=class extends Wf{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkAtLeastOne(e,r,n)}},s(vi,"NextTerminalAfterAtLeastOneWalker"),vi),Ti,yv=(Ti=class extends Wf{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkAtLeastOneSep(e,r,n)}},s(Ti,"NextTerminalAfterAtLeastOneSepWalker"),Ti);function Yu(t,e,r=[]){r=et(r);let n=[],a=0;function i(c){return c.concat(Ze(t,a+1))}s(i,"remainingPathWith");function o(c){const l=Yu(i(c),e,r);return n.concat(l)}for(s(o,"getAlternativesForProd");r.length{Ee(l.definition)===!1&&(n=o(l.definition))}),n;if(c instanceof we)r.push(c.terminalType);else throw Error("non exhaustive match")}a++}return n.push({partialPath:r,suffixDef:Ze(t,a)}),n}s(Yu,"possiblePathsFrom");function Tg(t,e,r,n){const a="EXIT_NONE_TERMINAL",i=[a],o="EXIT_ALTERNATIVE";let c=!1;const l=e.length,u=l-n-1,f=[],d=[];for(d.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Ee(d);){const p=d.pop();if(p===o){c&&Gn(d).idx<=u&&d.pop();continue}const m=p.def,g=p.idx,v=p.ruleStack,E=p.occurrenceStack;if(Ee(m))continue;const T=m[0];if(T===a){const w={idx:g,def:Ze(m),ruleStack:ac(v),occurrenceStack:ac(E)};d.push(w)}else if(T instanceof we)if(g=0;w--){const C=T.definition[w],k={idx:g,def:C.definition.concat(Ze(m)),ruleStack:v,occurrenceStack:E};d.push(k),d.push(o)}else if(T instanceof gt)d.push({idx:g,def:T.definition.concat(Ze(m)),ruleStack:v,occurrenceStack:E});else if(T instanceof Bo)d.push(Q_(T,g,v,E));else throw Error("non exhaustive match")}return f}s(Tg,"nextPossibleTokensAfter");function Q_(t,e,r,n){const a=et(r);a.push(t.name);const i=et(n);return i.push(1),{idx:e,def:t.definition,ruleStack:a,occurrenceStack:i}}s(Q_,"expandTopLevelRule");var De;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(De||(De={}));function Vf(t){if(t instanceof Qe||t==="Option")return De.OPTION;if(t instanceof xe||t==="Repetition")return De.REPETITION;if(t instanceof _t||t==="RepetitionMandatory")return De.REPETITION_MANDATORY;if(t instanceof Ct||t==="RepetitionMandatoryWithSeparator")return De.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof yt||t==="RepetitionWithSeparator")return De.REPETITION_WITH_SEPARATOR;if(t instanceof vt||t==="Alternation")return De.ALTERNATION;throw Error("non exhaustive match")}s(Vf,"getProdType");function nh(t){const{occurrence:e,rule:r,prodType:n,maxLookahead:a}=t,i=Vf(n);return i===De.ALTERNATION?Pc(e,r,a):Oc(e,r,i,a)}s(nh,"getLookaheadPaths");function eC(t,e,r,n,a,i){const o=Pc(t,e,r),c=$g(o)?sc:Wo;return i(o,n,c,a)}s(eC,"buildLookaheadFuncForOr");function tC(t,e,r,n,a,i){const o=Oc(t,e,a,r),c=$g(o)?sc:Wo;return i(o[0],c,n)}s(tC,"buildLookaheadFuncForOptionalProd");function rC(t,e,r,n){const a=t.length,i=Wt(t,o=>Wt(o,c=>c.length===1));if(e)return function(o){const c=z(o,l=>l.GATE);for(let l=0;lqt(l)),c=Et(o,(l,u,f)=>(V(u,d=>{q(l,d.tokenTypeIdx)||(l[d.tokenTypeIdx]=f),V(d.categoryMatches,p=>{q(l,p)||(l[p]=f)})}),l),{});return function(){const l=this.LA(1);return c[l.tokenTypeIdx]}}else return function(){for(let o=0;oi.length===1),a=t.length;if(n&&!r){const i=qt(t);if(i.length===1&&Ee(i[0].categoryMatches)){const c=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===c}}else{const o=Et(i,(c,l,u)=>(c[l.tokenTypeIdx]=!0,V(l.categoryMatches,f=>{c[f]=!0}),c),[]);return function(){const c=this.LA(1);return o[c.tokenTypeIdx]===!0}}}else return function(){e:for(let i=0;iYu([o],1)),n=ah(r.length),a=z(r,o=>{const c={};return V(o,l=>{const u=pu(l.partialPath);V(u,f=>{c[f]=!0})}),c});let i=r;for(let o=1;o<=e;o++){const c=i;i=ah(c.length);for(let l=0;l{const T=pu(E.partialPath);V(T,w=>{a[l][w]=!0})})}}}}return n}s(Rg,"lookAheadSequenceFromAlternatives");function Pc(t,e,r,n){const a=new aC(t,De.ALTERNATION,n);return e.accept(a),Rg(a.result,r)}s(Pc,"getLookaheadPathsForOr");function Oc(t,e,r,n){const a=new aC(t,r);e.accept(a);const i=a.result,c=new DM(e,t,r).startWalking(),l=new gt({definition:i}),u=new gt({definition:c});return Rg([l,u],n)}s(Oc,"getLookaheadPathsForOptionalProd");function Xu(t,e){e:for(let r=0;r{const a=e[n];return r===a||a.categoryMatchesMap[r.tokenTypeIdx]})}s(sC,"isStrictPrefixOfPath");function $g(t){return Wt(t,e=>Wt(e,r=>Wt(r,n=>Ee(n.categoryMatches))))}s($g,"areTokenCategoriesNotUsed");function oC(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return z(e,r=>Object.assign({type:ct.CUSTOM_LOOKAHEAD_VALIDATION},r))}s(oC,"validateLookahead");function lC(t,e,r,n){const a=Lt(t,l=>cC(l,r)),i=TC(t,e,r),o=Lt(t,l=>mC(l,r)),c=Lt(t,l=>fC(l,t,n,r));return a.concat(i,o,c)}s(lC,"validateGrammar");function cC(t,e){const r=new MM;t.accept(r);const n=r.allProductions,a=XD(n,uC),i=Yt(a,c=>c.length>1);return z(We(i),c=>{const l=Ht(c),u=e.buildDuplicateFoundError(t,c),f=Ut(l),d={message:u,type:ct.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:f,occurrence:l.idx},p=Ag(l);return p&&(d.parameter=p),d})}s(cC,"validateDuplicateProductions");function uC(t){return`${Ut(t)}_#_${t.idx}_#_${Ag(t)}`}s(uC,"identifyProductionForDuplicates");function Ag(t){return t instanceof we?t.terminalType.name:t instanceof lt?t.nonTerminalName:""}s(Ag,"getExtraProductionArgument");var Ai,MM=(Ai=class extends Ko{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}},s(Ai,"OccurrenceValidationCollector"),Ai);function fC(t,e,r,n){const a=[];if(Et(e,(o,c)=>c.name===t.name?o+1:o,0)>1){const o=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});a.push({message:o,type:ct.DUPLICATE_RULE_NAME,ruleName:t.name})}return a}s(fC,"validateRuleDoesNotAlreadyExist");function dC(t,e,r){const n=[];let a;return ft(e,t)||(a=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:a,type:ct.INVALID_RULE_OVERRIDE,ruleName:t})),n}s(dC,"validateRuleIsOverridden");function Eg(t,e,r,n=[]){const a=[],i=Hl(e.definition);if(Ee(i))return[];{const o=t.name;ft(i,t)&&a.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:ct.LEFT_RECURSION,ruleName:o});const l=zf(i,n.concat([t])),u=Lt(l,f=>{const d=et(n);return d.push(f),Eg(t,f,r,d)});return a.concat(u)}}s(Eg,"validateNoLeftRecursion");function Hl(t){let e=[];if(Ee(t))return e;const r=Ht(t);if(r instanceof lt)e.push(r.referencedRule);else if(r instanceof gt||r instanceof Qe||r instanceof _t||r instanceof Ct||r instanceof yt||r instanceof xe)e=e.concat(Hl(r.definition));else if(r instanceof vt)e=qt(z(r.definition,i=>Hl(i.definition)));else if(!(r instanceof we))throw Error("non exhaustive match");const n=ic(r),a=t.length>1;if(n&&a){const i=Ze(t);return e.concat(Hl(i))}else return e}s(Hl,"getFirstNoneTerminal");var Ei,_g=(Ei=class extends Ko{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},s(Ei,"OrCollector"),Ei);function pC(t,e){const r=new _g;t.accept(r);const n=r.alternations;return Lt(n,i=>{const o=ac(i.definition);return Lt(o,(c,l)=>{const u=Tg([c],[],Wo,1);return Ee(u)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:i,emptyChoiceIdx:l}),type:ct.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:i.idx,alternative:l+1}]:[]})})}s(pC,"validateEmptyOrAlternative");function hC(t,e,r){const n=new _g;t.accept(n);let a=n.alternations;return a=Bf(a,o=>o.ignoreAmbiguities===!0),Lt(a,o=>{const c=o.idx,l=o.maxLookahead||e,u=Pc(c,t,l,o),f=yC(u,o,t,r),d=vC(u,o,t,r);return f.concat(d)})}s(hC,"validateAmbiguousAlternationAlternatives");var _i,xM=(_i=class extends Ko{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}},s(_i,"RepetitionCollector"),_i);function mC(t,e){const r=new _g;t.accept(r);const n=r.alternations;return Lt(n,i=>i.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:i}),type:ct.TOO_MANY_ALTS,ruleName:t.name,occurrence:i.idx}]:[])}s(mC,"validateTooManyAlts");function gC(t,e,r){const n=[];return V(t,a=>{const i=new xM;a.accept(i);const o=i.allProductions;V(o,c=>{const l=Vf(c),u=c.maxLookahead||e,f=c.idx,p=Oc(f,a,l,u)[0];if(Ee(qt(p))){const m=r.buildEmptyRepetitionError({topLevelRule:a,repetition:c});n.push({message:m,type:ct.NO_NON_EMPTY_LOOKAHEAD,ruleName:a.name})}})}),n}s(gC,"validateSomeNonEmptyLookaheadPath");function yC(t,e,r,n){const a=[],i=Et(t,(c,l,u)=>(e.definition[u].ignoreAmbiguities===!0||V(l,f=>{const d=[u];V(t,(p,m)=>{u!==m&&Xu(p,f)&&e.definition[m].ignoreAmbiguities!==!0&&d.push(m)}),d.length>1&&!Xu(a,f)&&(a.push(f),c.push({alts:d,path:f}))}),c),[]);return z(i,c=>{const l=z(c.alts,f=>f+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:l,prefixPath:c.path}),type:ct.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:c.alts}})}s(yC,"checkAlternativesAmbiguities");function vC(t,e,r,n){const a=Et(t,(o,c,l)=>{const u=z(c,f=>({idx:l,path:f}));return o.concat(u)},[]);return Ic(Lt(a,o=>{if(e.definition[o.idx].ignoreAmbiguities===!0)return[];const l=o.idx,u=o.path,f=Ft(a,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx{const m=[p.idx+1,l+1],g=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:m,prefixPath:p.path}),type:ct.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:m}})}))}s(vC,"checkPrefixAlternativesAmbiguities");function TC(t,e,r){const n=[],a=z(e,i=>i.name);return V(t,i=>{const o=i.name;if(ft(a,o)){const c=r.buildNamespaceConflictError(i);n.push({message:c,type:ct.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}s(TC,"checkTerminalAndNoneTerminalsNameSpace");function RC(t){const e=og(t,{errMsgProvider:IM}),r={};return V(t.rules,n=>{r[n.name]=n}),Z_(r,e.errMsgProvider)}s(RC,"resolveGrammar");function $C(t){return t=og(t,{errMsgProvider:kn}),lC(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}s($C,"validateGrammar");var AC="MismatchedTokenException",EC="NoViableAltException",_C="EarlyExitException",CC="NotAllInputParsedException",SC=[AC,EC,_C,CC];Object.freeze(SC);function oc(t){return ft(SC,t.name)}s(oc,"isRecognitionException");var Ci,Hf=(Ci=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},s(Ci,"RecognitionException"),Ci),Si,bC=(Si=class extends Hf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=AC}},s(Si,"MismatchedTokenException"),Si),bi,FM=(bi=class extends Hf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=EC}},s(bi,"NoViableAltException"),bi),wi,GM=(wi=class extends Hf{constructor(e,r){super(e,r),this.name=CC}},s(wi,"NotAllInputParsedException"),wi),Ii,jM=(Ii=class extends Hf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=_C}},s(Ii,"EarlyExitException"),Ii),Cd={},wC="InRuleRecoveryException",Ni,UM=(Ni=class extends Error{constructor(e){super(e),this.name=wC}},s(Ni,"InRuleRecoveryException"),Ni),ki,zM=(ki=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=q(e,"recoveryEnabled")?e.recoveryEnabled:Pr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=IC)}getTokenToInsert(e){const r=kc(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,a){const i=this.findReSyncTokenType(),o=this.exportLexerState(),c=[];let l=!1;const u=this.LA(1);let f=this.LA(1);const d=s(()=>{const p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:a,actual:u,previous:p,ruleName:this.getCurrRuleFullName()}),g=new bC(m,u,this.LA(0));g.resyncedTokens=ac(c),this.SAVE_ERROR(g)},"generateErrorMessage");for(;!l;)if(this.tokenMatcher(f,a)){d();return}else if(n.call(this)){d(),e.apply(this,r);return}else this.tokenMatcher(f,i)?l=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,c));this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){const n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new UM("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Ee(r))return!1;const n=this.LA(1);return xo(r,i=>this.tokenMatcher(n,i))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){const r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return ft(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let r=this.LA(1),n=2;for(;;){const a=xo(e,i=>vg(r,i));if(a!==void 0)return a;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Cd;const e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return z(e,(n,a)=>a===0?Cd:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[a],inRule:this.shortRuleNameToFullName(e[a-1])})}flattenFollowSet(){const e=z(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return qt(e)}getFollowSetFromFollowKey(e){if(e===Cd)return[Xr];const r=e.ruleName+e.idxInCallingRule+p_+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,Xr)||r.push(e),r}reSyncTo(e){const r=[];let n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return ac(r)}attemptInRepetitionRecovery(e,r,n,a,i,o,c){}getCurrentGrammarPath(e,r){const n=this.getHumanReadableRuleStack(),a=et(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:a,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return z(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},s(ki,"Recoverable"),ki);function IC(t,e,r,n,a,i,o){const c=this.getKeyForAutomaticLookahead(n,a);let l=this.firstAfterRepMap[c];if(l===void 0){const p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];l=new i(m,a).startWalking(),this.firstAfterRepMap[c]=l}let u=l.token,f=l.occurrence;const d=l.isEndOfRule;this.RULE_STACK.length===1&&d&&u===void 0&&(u=Xr,f=1),!(u===void 0||f===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,f,o)&&this.tryInRepetitionRecovery(t,e,r,u)}s(IC,"attemptInRepetitionRecovery");var BM=4,rn=8,NC=1<Eg(r,r,kn))}validateEmptyOrAlternatives(e){return Lt(e,r=>pC(r,kn))}validateAmbiguousAlternationAlternatives(e,r){return Lt(e,n=>hC(n,r,kn))}validateSomeNonEmptyLookaheadPath(e,r){return gC(e,r,kn)}buildLookaheadForAlternation(e){return eC(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,rC)}buildLookaheadForOptional(e){return tC(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Vf(e.prodType),nC)}},s(Pi,"LLkLookaheadStrategy"),Pi),Oi,KM=(Oi=class{initLooksAhead(e){this.dynamicTokensEnabled=q(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Pr.dynamicTokensEnabled,this.maxLookahead=q(e,"maxLookahead")?e.maxLookahead:Pr.maxLookahead,this.lookaheadStrategy=q(e,"lookaheadStrategy")?e.lookaheadStrategy:new Cg({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){V(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{const{alternation:n,repetition:a,option:i,repetitionMandatory:o,repetitionMandatoryWithSeparator:c,repetitionWithSeparator:l}=PC(r);V(n,u=>{const f=u.idx===0?"":u.idx;this.TRACE_INIT(`${Ut(u)}${f}`,()=>{const d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:r,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=mu(this.fullRuleNameToShort[r.name],NC,u.idx);this.setLaFuncCache(p,d)})}),V(a,u=>{this.computeLookaheadFunc(r,u.idx,ih,"Repetition",u.maxLookahead,Ut(u))}),V(i,u=>{this.computeLookaheadFunc(r,u.idx,kC,"Option",u.maxLookahead,Ut(u))}),V(o,u=>{this.computeLookaheadFunc(r,u.idx,sh,"RepetitionMandatory",u.maxLookahead,Ut(u))}),V(c,u=>{this.computeLookaheadFunc(r,u.idx,hu,"RepetitionMandatoryWithSeparator",u.maxLookahead,Ut(u))}),V(l,u=>{this.computeLookaheadFunc(r,u.idx,oh,"RepetitionWithSeparator",u.maxLookahead,Ut(u))})})})}computeLookaheadFunc(e,r,n,a,i,o){this.TRACE_INIT(`${o}${r===0?"":r}`,()=>{const c=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),l=mu(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(l,c)})}getKeyForAutomaticLookahead(e,r){const n=this.getLastExplicitRuleShortName();return mu(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},s(Oi,"LooksAhead"),Oi),Li,qM=(Li=class extends Ko{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},s(Li,"DslMethodsCollectorVisitor"),Li),jc=new qM;function PC(t){jc.reset(),t.accept(jc);const e=jc.dslMethods;return jc.reset(),e}s(PC,"collectMethods");function lh(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffseto.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${i.join(` + +`).replace(/\n/g,` + `)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}s(MC,"createBaseSemanticVisitorConstructor");function xC(t,e,r){const n=s(function(){},"derivedConstructor");Sg(n,t+"BaseSemanticsWithDefaults");const a=Object.create(r.prototype);return V(e,i=>{a[i]=DC}),n.prototype=a,n.prototype.constructor=n,n}s(xC,"createBaseVisitorConstructorWithDefaults");var uh;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(uh||(uh={}));function FC(t,e){return GC(t,e)}s(FC,"validateVisitor");function GC(t,e){const r=Ft(e,a=>Mr(t[a])===!1),n=z(r,a=>({msg:`Missing visitor method: <${a}> on ${t.constructor.name} CST Visitor.`,type:uh.MISSING_METHOD,methodName:a}));return Ic(n)}s(GC,"validateMissingCstMethods");var Di,VM=(Di=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=q(e,"nodeLocationTracking")?e.nodeLocationTracking:Pr.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=qe,this.cstFinallyStateUpdate=qe,this.cstPostTerminal=qe,this.cstPostNonTerminal=qe,this.cstPostRule=qe;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=ch,this.setNodeLocationFromNode=ch,this.cstPostRule=qe,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=qe,this.setNodeLocationFromNode=qe,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=lh,this.setNodeLocationFromNode=lh,this.cstPostRule=qe,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=qe,this.setNodeLocationFromNode=qe,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=qe,this.setNodeLocationFromNode=qe,this.cstPostRule=qe,this.setInitialNodeLocation=qe;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){const n=this.CST_STACK[this.CST_STACK.length-1];OC(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){const n=this.CST_STACK[this.CST_STACK.length-1];LC(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(Nr(this.baseCstVisitorConstructor)){const e=MC(this.className,$t(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Nr(this.baseCstVisitorWithDefaultsConstructor)){const e=xC(this.className,$t(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},s(Di,"TreeBuilder"),Di),Mi,HM=(Mi=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Ju}LA(e){const r=this.currIdx+e;return r<0||this.tokVectorLength<=r?Ju:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},s(Mi,"LexerAdapter"),Mi),xi,YM=(xi=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=Zu){if(ft(this.definedRulesNames,e)){const o={message:kn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:ct.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(o)}this.definedRulesNames.push(e);const a=this.defineRule(e,r,n);return this[e]=a,a}OVERRIDE_RULE(e,r,n=Zu){const a=dC(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(a);const i=this.defineRule(e,r,n);return this[e]=i,i}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,r),!0}catch(a){if(oc(a))return!1;throw a}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return o_(We(this.gastProductionsCache))}},s(xi,"RecognizerApi"),xi),Fi,XM=(Fi=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=sc,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},q(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(ae(e)){if(Ee(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(ae(e))this.tokensMap=Et(e,(i,o)=>(i[o.name]=o,i),{});else if(q(e,"modes")&&Wt(qt(We(e.modes)),X_)){const i=qt(We(e.modes)),o=lg(i);this.tokensMap=Et(o,(c,l)=>(c[l.name]=l,c),{})}else if(Mt(e))this.tokensMap=et(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Xr;const n=q(e,"modes")?qt(We(e.modes)):We(e),a=Wt(n,i=>Ee(i.categoryMatches));this.tokenMatcher=a?sc:Wo,Vo(We(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const a=q(n,"resyncEnabled")?n.resyncEnabled:Zu.resyncEnabled,i=q(n,"recoveryValueFunc")?n.recoveryValueFunc:Zu.recoveryValueFunc,o=this.ruleShortNameIdx<o.call(this)&&c.call(this),"lookAheadFunc")}}else i=e;if(a.call(this)===!0)return i.call(this)}atLeastOneInternal(e,r){const n=this.getKeyForAutomaticLookahead(sh,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;const o=r.GATE;if(o!==void 0){const c=a;a=s(()=>o.call(this)&&c.call(this),"lookAheadFunc")}}else i=r;if(a.call(this)===!0){let o=this.doSingleRepetition(i);for(;a.call(this)===!0&&o===!0;)o=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,De.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],a,sh,e,LM)}atLeastOneSepFirstInternal(e,r){const n=this.getKeyForAutomaticLookahead(hu,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){const a=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){a.call(this);const c=s(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,c,a,yv],c,hu,e,yv)}else throw this.raiseEarlyExitException(e,De.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){const n=this.getKeyForAutomaticLookahead(ih,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;const c=r.GATE;if(c!==void 0){const l=a;a=s(()=>c.call(this)&&l.call(this),"lookaheadFunction")}}else i=r;let o=!0;for(;a.call(this)===!0&&o===!0;)o=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],a,ih,e,OM,o)}manySepFirstInternal(e,r){const n=this.getKeyForAutomaticLookahead(oh,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){const a=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){a.call(this);const c=s(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,c,a,gv],c,oh,e,gv)}}repetitionSepSecondInternal(e,r,n,a,i){for(;n();)this.CONSUME(r),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,a,i],n,hu,e,i)}doSingleRepetition(e){const r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){const n=this.getKeyForAutomaticLookahead(NC,r),a=ae(e)?e:e.DEF,o=this.getLaFuncFromCache(n).call(this,a);if(o!==void 0)return a[o].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new GM(r,e))}}subruleInternal(e,r,n){let a;try{const i=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,a=e.apply(this,i),this.cstPostNonTerminal(a,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),a}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,r,n){throw oc(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let a;try{const i=this.LA(1);this.tokenMatcher(i,e)===!0?(this.consumeToken(),a=i):this.consumeInternalError(e,i,n)}catch(i){a=this.consumeInternalRecovery(e,r,i)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,a),a}consumeInternalError(e,r,n){let a;const i=this.LA(0);throw n!==void 0&&n.ERR_MSG?a=n.ERR_MSG:a=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new bC(a,r,i))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){const a=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,a)}catch(i){throw i.name===wC?n:i}}else throw n}saveRecogState(){const e=this.errors,r=et(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Xr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},s(Fi,"RecognizerEngine"),Fi),Gi,JM=(Gi=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=q(e,"errorMessageProvider")?e.errorMessageProvider:Pr.errorMessageProvider}SAVE_ERROR(e){if(oc(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:et(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return et(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){const a=this.getCurrRuleFullName(),i=this.getGAstProductions()[a],c=Oc(e,i,r,this.maxLookahead)[0],l=[];for(let f=1;f<=this.maxLookahead;f++)l.push(this.LA(f));const u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:c,actual:l,previous:this.LA(0),customUserDescription:n,ruleName:a});throw this.SAVE_ERROR(new jM(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){const n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],i=Pc(e,a,this.maxLookahead),o=[];for(let u=1;u<=this.maxLookahead;u++)o.push(this.LA(u));const c=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:o,previous:c,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new FM(l,this.LA(1),c))}},s(Gi,"ErrorHandler"),Gi),ji,ZM=(ji=class{initContentAssist(){}computeContentAssist(e,r){const n=this.gastProductionsCache[e];if(Nr(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return Tg([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const r=Ht(e.ruleStack),a=this.getGAstProductions()[r];return new PM(a,e).startWalking()}},s(ji,"ContentAssist"),ji),Yf={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Yf);var vv=!0,Tv=Math.pow(2,rn)-1,jC=Ua({name:"RECORDING_PHASE_TOKEN",pattern:st.NA});Vo([jC]);var UC=kc(jC,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(UC);var QM={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Ui,ex=(Ui=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const r=e>0?e:"";this[`CONSUME${r}`]=function(n,a){return this.consumeInternalRecord(n,e,a)},this[`SUBRULE${r}`]=function(n,a){return this.subruleInternalRecord(n,e,a)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let r=0;r<10;r++){const n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return Ju}topLevelRuleRecord(e,r){try{const n=new Bo({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return Ca.call(this,Qe,e,r)}atLeastOneInternalRecord(e,r){Ca.call(this,_t,r,e)}atLeastOneSepFirstInternalRecord(e,r){Ca.call(this,Ct,r,e,vv)}manyInternalRecord(e,r){Ca.call(this,xe,r,e)}manySepFirstInternalRecord(e,r){Ca.call(this,yt,r,e,vv)}orInternalRecord(e,r){return zC.call(this,e,r)}subruleInternalRecord(e,r,n){if(lc(r),!e||q(e,"ruleName")===!1){const c=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw c.KNOWN_RECORDER_ERROR=!0,c}const a=Gn(this.recordingProdStack),i=e.ruleName,o=new lt({idx:r,nonTerminalName:i,label:n==null?void 0:n.LABEL,referencedRule:void 0});return a.definition.push(o),this.outputCst?QM:Yf}consumeInternalRecord(e,r,n){if(lc(r),!gg(e)){const o=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const a=Gn(this.recordingProdStack),i=new we({idx:r,terminalType:e,label:n==null?void 0:n.LABEL});return a.definition.push(i),UC}},s(Ui,"GastRecorder"),Ui);function Ca(t,e,r,n=!1){lc(r);const a=Gn(this.recordingProdStack),i=Mr(e)?e:e.DEF,o=new t({definition:[],idx:r});return n&&(o.separator=e.SEP),q(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),i.call(this),a.definition.push(o),this.recordingProdStack.pop(),Yf}s(Ca,"recordProd");function zC(t,e){lc(e);const r=Gn(this.recordingProdStack),n=ae(t)===!1,a=n===!1?t:t.DEF,i=new vt({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});q(t,"MAX_LOOKAHEAD")&&(i.maxLookahead=t.MAX_LOOKAHEAD);const o=r_(a,c=>Mr(c.GATE));return i.hasPredicates=o,r.definition.push(i),V(a,c=>{const l=new gt({definition:[]});i.definition.push(l),q(c,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=c.IGNORE_AMBIGUITIES:q(c,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),c.ALT.call(this),this.recordingProdStack.pop()}),Yf}s(zC,"recordOrProd");function fh(t){return t===0?"":`${t}`}s(fh,"getIdxSuffix");function lc(t){if(t<0||t>Tv){const e=new Error(`Invalid DSL Method idx value: <${t}> + Idx value must be a none negative value smaller than ${Tv+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}s(lc,"assertMethodIdxIsValid");var zi,tx=(zi=class{initPerformanceTracer(e){if(q(e,"traceInitPerf")){const r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=Pr.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);const{time:a,value:i}=ug(r),o=a>10?console.warn:console.log;return this.traceInitIndent time: ${a}ms`),this.traceInitIndent--,i}else return r()}},s(zi,"PerformanceTracer"),zi);function BC(t,e){e.forEach(r=>{const n=r.prototype;Object.getOwnPropertyNames(n).forEach(a=>{if(a==="constructor")return;const i=Object.getOwnPropertyDescriptor(n,a);i&&(i.get||i.set)?Object.defineProperty(t.prototype,a,i):t.prototype[a]=r.prototype[a]})})}s(BC,"applyMixins");var Ju=kc(Xr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Ju);var Pr=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Fa,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Zu=Object.freeze({recoveryValueFunc:s(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),ct;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(ct||(ct={}));function dh(t=void 0){return function(){return t}}s(dh,"EMPTY_ALT");var Mn,bg=(Mn=class{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const r=this.className;this.TRACE_INIT("toFastProps",()=>{fg(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),V(this.definedRulesNames,a=>{const o=this[a].originalGrammarAction;let c;this.TRACE_INIT(`${a} Rule`,()=>{c=this.topLevelRuleRecord(a,o)}),this.gastProductionsCache[a]=c})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=RC({rules:We(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(Ee(n)&&this.skipValidations===!1){const a=$C({rules:We(this.gastProductionsCache),tokenTypes:We(this.tokensMap),errMsgProvider:kn,grammarName:r}),i=oC({lookaheadStrategy:this.lookaheadStrategy,rules:We(this.gastProductionsCache),tokenTypes:We(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(a,i)}}),Ee(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const a=h_(We(this.gastProductionsCache));this.resyncFollows=a}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var a,i;(i=(a=this.lookaheadStrategy).initialize)===null||i===void 0||i.call(a,{rules:We(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(We(this.gastProductionsCache))})),!Mn.DEFER_DEFINITION_ERRORS_HANDLING&&!Ee(this.definitionErrors))throw e=z(this.definitionErrors,a=>a.message),new Error(`Parser Definition Errors detected: + ${e.join(` +------------------------------- +`)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),q(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=q(r,"skipValidations")?r.skipValidations:Pr.skipValidations}},s(Mn,"Parser"),Mn);bg.DEFER_DEFINITION_ERRORS_HANDLING=!1;BC(bg,[zM,KM,VM,HM,XM,YM,JM,ZM,ex,tx]);var Bi,rx=(Bi=class extends bg{constructor(e,r=Pr){const n=et(r);n.outputCst=!1,super(e,n)}},s(Bi,"EmbeddedActionsParser"),Bi);function KC(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r-1}s(ZC,"listCacheHas");var lx=ZC;function QC(t,e){var r=this.__data__,n=Xf(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}s(QC,"listCacheSet");var cx=QC;function ra(t){var e=-1,r=t==null?0:t.length;for(this.clear();++ec))return!1;var u=i.get(t),f=i.get(e);if(u&&f)return u==e&&f==t;var d=-1,p=!0,m=r&m1?new PS:void 0;for(i.set(t,e),i.set(e,t);++d-1&&t%1==0&&t-1&&t%1==0&&t<=X1}s(tb,"isLength");var Ng=tb,J1="[object Arguments]",Z1="[object Array]",Q1="[object Boolean]",eF="[object Date]",tF="[object Error]",rF="[object Function]",nF="[object Map]",aF="[object Number]",iF="[object Object]",sF="[object RegExp]",oF="[object Set]",lF="[object String]",cF="[object WeakMap]",uF="[object ArrayBuffer]",fF="[object DataView]",dF="[object Float32Array]",pF="[object Float64Array]",hF="[object Int8Array]",mF="[object Int16Array]",gF="[object Int32Array]",yF="[object Uint8Array]",vF="[object Uint8ClampedArray]",TF="[object Uint16Array]",RF="[object Uint32Array]",be={};be[dF]=be[pF]=be[hF]=be[mF]=be[gF]=be[yF]=be[vF]=be[TF]=be[RF]=!0;be[J1]=be[Z1]=be[uF]=be[Q1]=be[fF]=be[eF]=be[tF]=be[rF]=be[nF]=be[aF]=be[iF]=be[sF]=be[oF]=be[lF]=be[cF]=!1;function rb(t){return Fo(t)&&Ng(t.length)&&!!be[Ho(t)]}s(rb,"baseIsTypedArray");var $F=rb;function nb(t){return function(e){return t(e)}}s(nb,"baseUnary");var AF=nb,ab=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yl=ab&&typeof module=="object"&&module&&!module.nodeType&&module,EF=Yl&&Yl.exports===ab,wd=EF&&aS.process,_F=function(){try{var t=Yl&&Yl.require&&Yl.require("util").types;return t||wd&&wd.binding&&wd.binding("util")}catch{}}(),Iv=_F,Nv=Iv&&Iv.isTypedArray,CF=Nv?AF(Nv):$F,kg=CF,SF=Object.prototype,bF=SF.hasOwnProperty;function ib(t,e){var r=ut(t),n=!r&&ed(t),a=!r&&!n&&Qu(t),i=!r&&!n&&!a&&kg(t),o=r||n||a||i,c=o?G1(t.length,String):[],l=c.length;for(var u in t)(e||bF.call(t,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||eb(u,l)))&&c.push(u);return c}s(ib,"arrayLikeKeys");var wF=ib,IF=Object.prototype;function sb(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||IF;return t===r}s(sb,"isPrototype");var ob=sb;function lb(t,e){return function(r){return t(e(r))}}s(lb,"overArg");var NF=lb,kF=NF(Object.keys,Object),PF=kF,OF=Object.prototype,LF=OF.hasOwnProperty;function cb(t){if(!ob(t))return PF(t);var e=[];for(var r in Object(t))LF.call(t,r)&&r!="constructor"&&e.push(r);return e}s(cb,"baseKeys");var ub=cb;function fb(t){return t!=null&&Ng(t.length)&&!fS(t)}s(fb,"isArrayLike");var td=fb;function db(t){return td(t)?wF(t):ub(t)}s(db,"keys");var Pg=db;function pb(t){return O1(t,Pg,F1)}s(pb,"getAllKeys");var kv=pb,DF=1,MF=Object.prototype,xF=MF.hasOwnProperty;function hb(t,e,r,n,a,i){var o=r&DF,c=kv(t),l=c.length,u=kv(e),f=u.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var p=c[d];if(!(o?p in e:xF.call(e,p)))return!1}var m=i.get(t),g=i.get(e);if(m&&g)return m==e&&g==t;var v=!0;i.set(t,e),i.set(e,t);for(var E=o;++djg(t,e,o));return oa(t,e,n,r,...a)}s(sw,"alternation");function ow(t,e,r){const n=Ve(t,e,r,{type:Jr});Fr(t,n);const a=oa(t,e,n,r,nn(t,e,r));return lw(t,e,r,a)}s(ow,"option");function nn(t,e,r){const n=LG(_r(r.definition,a=>jg(t,e,a)),a=>a!==void 0);return n.length===1?n[0]:n.length===0?void 0:uw(t,n)}s(nn,"block");function Ug(t,e,r,n,a){const i=n.left,o=n.right,c=Ve(t,e,r,{type:GG});Fr(t,c);const l=Ve(t,e,r,{type:Zb});return i.loopback=c,l.loopback=c,t.decisionMap[Un(e,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=c,je(o,c),a===void 0?(je(c,i),je(c,l)):(je(c,l),je(c,a.left),je(a.right,i)),{left:i,right:l}}s(Ug,"plus");function zg(t,e,r,n,a){const i=n.left,o=n.right,c=Ve(t,e,r,{type:FG});Fr(t,c);const l=Ve(t,e,r,{type:Zb}),u=Ve(t,e,r,{type:xG});return c.loopback=u,l.loopback=u,je(c,i),je(c,l),je(o,u),a!==void 0?(je(u,l),je(u,a.left),je(a.right,i)):je(u,c),t.decisionMap[Un(e,a?"RepetitionWithSeparator":"Repetition",r.idx)]=c,{left:c,right:l}}s(zg,"star");function lw(t,e,r,n){const a=n.left,i=n.right;return je(a,i),t.decisionMap[Un(e,"Option",r.idx)]=a,n}s(lw,"optional");function Fr(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}s(Fr,"defineDecisionState");function oa(t,e,r,n,...a){const i=Ve(t,e,n,{type:MG,start:r});r.end=i;for(const c of a)c!==void 0?(je(r,c.left),je(c.right,i)):je(r,i);const o={left:r,right:i};return t.decisionMap[Un(e,cw(n),n.idx)]=r,o}s(oa,"makeAlts");function cw(t){if(t instanceof vt)return"Alternation";if(t instanceof Qe)return"Option";if(t instanceof xe)return"Repetition";if(t instanceof yt)return"RepetitionWithSeparator";if(t instanceof _t)return"RepetitionMandatory";if(t instanceof Ct)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}s(cw,"getProdType");function uw(t,e){const r=e.length;for(let i=0;ie.alt)}get key(){let e="";for(const r in this.map)e+=r+":";return e}},s(Hi,"ATNConfigSet"),Hi);function Bg(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}s(Bg,"getATNConfigKey");function hw(t,e,r){for(var n=-1,a=t.length;++n0&&r(c)?e>1?Kg(c,e-1,r,n,a):zS(a,c):n||(a[a.length]=c)}return a}s(Kg,"baseFlatten");var vw=Kg;function Tw(t,e){return vw(_r(t,e),1)}s(Tw,"flatMap");var KG=Tw;function Rw(t,e,r,n){for(var a=t.length,i=r+(n?1:-1);n?i--:++i-1}s(_w,"arrayIncludes");var YG=_w;function Cw(t,e,r){for(var n=-1,a=t==null?0:t.length;++n=tj){var u=e?null:ej(t);if(u)return Ig(u);o=!1,a=DS,l=new PS}else l=e?[]:c;e:for(;++n{const a=n.toString();let i=r[a];return i!==void 0||(i={atnStartState:t,decision:e,states:{}},r[a]=i),i}}s(xw,"createDFACache");var Yi,Fw=(Yi=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,r){this.predicates[e]=r}toString(){let e="";const r=this.predicates.length;for(let n=0;nconsole.log(n)}initialize(e){this.atn=ew(e.rules),this.dfas=Gw(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:r,rule:n,hasPredicates:a,dynamicTokensEnabled:i}=e,o=this.dfas,c=this.logging,l=Un(n,"Alternation",r),f=this.atn.decisionMap[l].decision,d=_r(nh({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),p=>_r(p,m=>m[0]));if(vh(d,!1)&&!i){const p=Bv(d,(m,g,v)=>(Id(g,E=>{E&&(m[E.tokenTypeIdx]=v,Id(E.categoryMatches,T=>{m[T]=v}))}),m),{});return a?function(m){var g;const v=this.LA(1),E=p[v.tokenTypeIdx];if(m!==void 0&&E!==void 0){const T=(g=m[E])===null||g===void 0?void 0:g.GATE;if(T!==void 0&&T.call(this)===!1)return}return E}:function(){const m=this.LA(1);return p[m.tokenTypeIdx]}}else return a?function(p){const m=new Fw,g=p===void 0?0:p.length;for(let E=0;E_r(p,m=>m[0]));if(vh(d)&&d[0][0]&&!i){const p=d[0],m=aj(p);if(m.length===1&&fj(m[0].categoryMatches)){const v=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===v}}else{const g=Bv(m,(v,E)=>(E!==void 0&&(v[E.tokenTypeIdx]=!0,Id(E.categoryMatches,T=>{v[T]=!0})),v),{});return function(){const v=this.LA(1);return g[v.tokenTypeIdx]===!0}}}return function(){const p=yu.call(this,o,f,Kv,c);return typeof p=="object"?!1:p===0}}},s(Xi,"LLStarLookaheadStrategy"),Xi);function vh(t,e=!0){const r=new Set;for(const n of t){const a=new Set;for(const i of n){if(i===void 0){if(e)break;return!1}const o=[i.tokenTypeIdx].concat(i.categoryMatches);for(const c of o)if(r.has(c)){if(!a.has(c))return!1}else r.add(c),a.add(c)}}return!0}s(vh,"isLL1Sequence");function Gw(t){const e=t.decisionStates.length,r=Array(e);for(let n=0;nLn(a)).join(", "),r=t.production.idx===0?"":t.production.idx;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${Kw(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n}s(Bw,"buildAmbiguityError");function Kw(t){if(t instanceof lt)return"SUBRULE";if(t instanceof Qe)return"OPTION";if(t instanceof vt)return"OR";if(t instanceof _t)return"AT_LEAST_ONE";if(t instanceof Ct)return"AT_LEAST_ONE_SEP";if(t instanceof yt)return"MANY_SEP";if(t instanceof xe)return"MANY";if(t instanceof we)return"CONSUME";throw Error("non exhaustive match")}s(Kw,"getProductionDslName");function qw(t,e,r){const n=KG(e.configs.elements,i=>i.state.transitions),a=nj(n.filter(i=>i instanceof Fg).map(i=>i.tokenType),i=>i.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:a,tokenPath:t}}s(qw,"buildAdaptivePredictError");function Ww(t,e){return t.edges[e.tokenTypeIdx]}s(Ww,"getExistingTargetState");function Vw(t,e,r){const n=new yh,a=[];for(const o of t.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===Lc){a.push(o);continue}const c=o.state.transitions.length;for(let l=0;l0&&!Zw(i))for(const o of a)i.add(o);return i}s(Vw,"computeReachSet");function Hw(t,e){if(t instanceof Fg&&vg(e,t.tokenType))return t.target}s(Hw,"getReachableTarget");function Yw(t,e){let r;for(const n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}s(Yw,"getUniqueAlt");function qg(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}s(qg,"newDFAState");function Th(t,e,r,n){return n=Wg(t,n),e.edges[r.tokenTypeIdx]=n,n}s(Th,"addDFAEdge");function Wg(t,e){if(e===ef)return e;const r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e)}s(Wg,"addDFAState");function Xw(t){const e=new yh,r=t.transitions.length;for(let n=0;n0){const a=[...t.stack],o={state:a.pop(),alt:t.alt,stack:a};dc(o,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);const n=r.transitions.length;for(let a=0;a1)return!0;return!1}s(rI,"hasConflictingAltSet");function nI(t){for(const e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}s(nI,"hasStateAssociatedWithOneAlt");mc();var Ji,aI=(Ji=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new Hg(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const r=new cd;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){const n=new tf(e.startOffset,e.image.length,Ql(e),e.tokenType,!r);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){const r=e.container;if(r){const n=r.content.indexOf(e);n>=0&&r.content.splice(n,1)}}addHiddenNodes(e){const r=[];for(const i of e){const o=new tf(i.startOffset,i.image.length,Ql(i),i.tokenType,!0);o.root=this.rootNode,r.push(o)}let n=this.current,a=!1;if(n.content.length>0){n.content.push(...r);return}for(;n.container;){const i=n.container.content.indexOf(n);if(i>0){n.container.content.splice(i,0,...r),a=!0;break}n=n.container}a||this.rootNode.content.unshift(...r)}construct(e){const r=this.current;typeof e.$type=="string"&&!e.$infix&&(this.current.astNode=e),e.$cstNode=r;const n=this.nodeStack.pop();(n==null?void 0:n.content.length)===0&&this.removeNode(n)}},s(Ji,"CstNodeBuilder"),Ji),Zi,Vg=(Zi=class{get hidden(){return!1}get astNode(){var r,n;const e=typeof((r=this._astNode)==null?void 0:r.$type)=="string"?this._astNode:(n=this.container)==null?void 0:n.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},s(Zi,"AbstractCstNode"),Zi),Qi,tf=(Qi=class extends Vg{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,r,n,a,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=a,this._length=r,this._range=n}},s(Qi,"LeafCstNodeImpl"),Qi),es,cd=(es=class extends Vg{constructor(){super(...arguments),this.content=new mj(this)}get offset(){var e;return((e=this.firstNonHiddenNode)==null?void 0:e.offset)??0}get length(){return this.end-this.offset}get end(){var e;return((e=this.lastNonHiddenNode)==null?void 0:e.end)??0}get range(){const e=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(e&&r){if(this._rangeCache===void 0){const{range:n}=e,{range:a}=r;this._rangeCache={start:n.start,end:a.end.line=0;e--){const r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},s(es,"CompositeCstNodeImpl"),es),xn,mj=(xn=class extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,xn.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(const r of e)r.container=this.parent}},s(xn,"CstNodeContainer"),xn),ts,Hg=(ts=class extends cd{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},s(ts,"RootCstNodeImpl"),ts),rf=Symbol("Datatype");function vu(t){return t.$type===rf}s(vu,"isDataTypeNode");var qv="​",iI=s(t=>t.endsWith(qv)?t:t+qv,"withRuleSuffix"),rs,Yg=(rs=class{constructor(e){var a;this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const r=this.lexer.definition,n=e.LanguageMetaData.mode==="production";(a=e.shared.profilers.LangiumProfiler)!=null&&a.isActive("parsing")?this.wrapper=new yj(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new cI(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,r){this.wrapper.wrapOr(e,r)}optional(e,r){this.wrapper.wrapOption(e,r)}many(e,r){this.wrapper.wrapMany(e,r)}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},s(rs,"AbstractLangiumParser"),rs),ns,sI=(ns=class extends Yg{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new aI,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,r){const n=this.computeRuleType(e);let a;Po(e)&&(a=e.name,this.registerPrecedenceMap(e));const i=this.wrapper.DEFINE_RULE(iI(e.name),this.startImplementation(n,a,r).bind(this));return this.allRules.set(e.name,i),ot(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){const r=e.name,n=new Map;for(let a=0;a0&&(r=this.construct()),r===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return r}startImplementation(e,r,n){return a=>{const i=!this.isRecording()&&e!==void 0;if(i){const o={$type:e};this.stack.push(o),e===rf?o.value="":r!==void 0&&(o.$infixName=r)}return n(a),i?this.construct():void 0}}extractHiddenTokens(e){const r=this.lexerResult.hidden;if(!r.length)return[];const n=e.startOffset;for(let a=0;an)return r.splice(0,a);return r.splice(0,r.length)}consume(e,r,n){const a=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(a)){const i=this.extractHiddenTokens(a);this.nodeBuilder.addHiddenNodes(i);const o=this.nodeBuilder.buildLeafNode(a,n),{assignment:c,crossRef:l}=this.getAssignment(n),u=this.current;if(c){const f=br(n)?a.image:this.converter.convert(a.image,o);this.assign(c.operator,c.feature,f,o,l)}else if(vu(u)){let f=a.image;br(n)||(f=this.converter.convert(f,o).toString()),u.value+=f}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,a,i){let o;!this.isRecording()&&!n&&(o=this.nodeBuilder.buildCompositeNode(a));let c;try{c=this.wrapper.wrapSubrule(e,r,i)}finally{this.isRecording()||(c===void 0&&!n&&(c=this.construct()),c!==void 0&&o&&o.length>0&&this.performSubruleAssignment(c,a,o))}}performSubruleAssignment(e,r,n){const{assignment:a,crossRef:i}=this.getAssignment(r);if(a)this.assign(a.operator,a.feature,e,n,i);else if(!a){const o=this.current;if(vu(o))o.value+=e.toString();else if(typeof e=="object"&&e){const l=this.assignWithoutOverride(e,o);this.stack.pop(),this.stack.push(l)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(r.feature&&r.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(n.$cstNode);const i={$type:e};this.stack.push(i),this.assign(r.operator,r.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):vu(e)?this.converter.convert(e.value,e.$cstNode):(Vh(this.astReflection,e),e)}constructInfix(e,r){const n=e.parts;if(!Array.isArray(n)||n.length===0)return;const a=e.operators;if(!Array.isArray(a)||n.length<2)return n[0];let i=0,o=-1;for(let v=0;vo?(o=T.precedence,i=v):T.precedence===o&&(T.rightAssoc||(i=v))}const c=a.slice(0,i),l=a.slice(i+1),u=n.slice(0,i+1),f=n.slice(i+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:c},p={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:f,operators:l},m=this.constructInfix(d,r),g=this.constructInfix(p,r);return{$type:e.$type,$cstNode:e.$cstNode,left:m,operator:a[i],right:g}}getAssignment(e){if(!this.assignmentMap.has(e)){const r=Kn(e,Sr);this.assignmentMap.set(e,{assignment:r,crossRef:r&&Wn(r.terminal)?r.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,r,n,a,i){const o=this.current;let c;switch(i==="single"&&typeof n=="string"?c=this.linker.buildReference(o,r,a,n):i==="multi"&&typeof n=="string"?c=this.linker.buildMultiReference(o,r,a,n):c=n,e){case"=":{o[r]=c;break}case"?=":{o[r]=!0;break}case"+=":Array.isArray(o[r])||(o[r]=[]),o[r].push(c)}}assignWithoutOverride(e,r){for(const[a,i]of Object.entries(r)){const o=e[a];o===void 0?e[a]=i:Array.isArray(o)&&Array.isArray(i)&&(i.push(...o),e[a]=i)}const n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},s(ns,"LangiumParser"),ns),as,oI=(as=class{buildMismatchTokenMessage(e){return Fa.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Fa.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Fa.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Fa.buildEarlyExitMessage(e)}},s(as,"AbstractParserErrorMessageProvider"),as),is,Xg=(is=class extends oI{buildMismatchTokenMessage({expected:e,actual:r}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},s(is,"LangiumParserErrorMessageProvider"),is),ss,lI=(ss=class extends Yg{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const r=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,r){const n=this.wrapper.DEFINE_RULE(iI(e.name),this.startImplementation(r).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return r=>{const n=this.keepStackSize();try{e(r)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,r,n,a,i){this.before(a),this.wrapper.wrapSubrule(e,r,i),this.after(a)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},s(ss,"LangiumCompletionParser"),ss),gj={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Xg},os,cI=(os=class extends rx{constructor(e,r){const n=r&&"maxLookahead"in r;super(e,{...gj,lookaheadStrategy:n?new Cg({maxLookahead:r.maxLookahead}):new hj({logging:r.skipValidations?()=>{}:void 0}),...r})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,r,n){return this.RULE(e,r,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,r){return this.consume(e,r,void 0)}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]})}wrapOr(e,r){this.or(e,r)}wrapOption(e,r){this.option(e,r)}wrapMany(e,r){this.many(e,r)}wrapAtLeastOne(e,r){this.atLeastOne(e,r)}rule(e){return e.call(this,{})}},s(os,"ChevrotainWrapper"),os),ls,yj=(ls=class extends cI{constructor(e,r,n){super(e,r),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,r,n){this.task.startSubTask(this.ruleName(r));try{return super.subrule(e,r,n)}finally{this.task.stopSubTask(this.ruleName(r))}}},s(ls,"ProfilerWrapper"),ls);function ud(t,e,r){return uI({parser:e,tokens:r,ruleNames:new Map},t),e}s(ud,"createParser");function uI(t,e){const r=Cf(e,!1),n=ue(e.rules).filter(ot).filter(i=>r.has(i));for(const i of n){const o={...t,consume:1,optional:1,subrule:1,many:1,or:1};t.parser.rule(i,Zr(o,i.definition))}const a=ue(e.rules).filter(Po).filter(i=>r.has(i));for(const i of a)t.parser.rule(i,fI(t,i))}s(uI,"buildRules");function fI(t,e){const r=e.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if(xt(r))throw new Error("Cannot use terminal rule in infix expression");const n=e.operators.precedences.flatMap(m=>m.operators),a={$type:"Group",elements:[]},i={$container:a,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},o={$container:a,$type:"Group",elements:[],cardinality:"*"};a.elements.push(i,o);const l={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},u={...i,$container:o};o.elements.push(l,u);const d=n.map(m=>t.tokens[m.value]).map((m,g)=>({ALT:s(()=>t.parser.consume(g,m,l),"ALT")}));let p;return m=>{p??(p=fd(t,r)),t.parser.subrule(0,p,!1,i,m),t.parser.many(0,{DEF:s(()=>{t.parser.alternatives(0,d),t.parser.subrule(1,p,!1,u,m)},"DEF")})}}s(fI,"buildInfixRule");function Zr(t,e,r=!1){let n;if(br(e))n=vI(t,e);else if(Hr(e))n=dI(t,e);else if(Sr(e))n=Zr(t,e.terminal);else if(Wn(e))n=Jg(t,e);else if(wr(e))n=pI(t,e);else if(gf(e))n=mI(t,e);else if(Rf(e))n=gI(t,e);else if(Vn(e))n=yI(t,e);else if(em(e)){const a=t.consume++;n=s(()=>t.parser.consume(a,Xr,e),"method")}else throw new Af(e.$cstNode,`Unexpected element type: ${e.$type}`);return Zg(t,r?void 0:pc(e),n,e.cardinality)}s(Zr,"buildElement");function dI(t,e){const r=Fn(e);return()=>t.parser.action(r,e)}s(dI,"buildAction");function pI(t,e){const r=e.rule.ref;if(qn(r)){const n=t.subrule++,a=ot(r)&&r.fragment,i=e.arguments.length>0?hI(r,e.arguments):()=>({});let o;return c=>{o??(o=fd(t,r)),t.parser.subrule(n,o,a,e,i(c))}}else if(xt(r)){const n=t.consume++,a=nf(t,r.name);return()=>t.parser.consume(n,a,e)}else if(r)en();else throw new Af(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}s(pI,"buildRuleCall");function hI(t,e){if(e.some(n=>n.calledByName)){const n=e.map(a=>{var i,o;return{parameterName:(o=(i=a.parameter)==null?void 0:i.ref)==null?void 0:o.name,predicate:zt(a.value)}});return a=>{const i={};for(const{parameterName:o,predicate:c}of n)o&&(i[o]=c(a));return i}}else{const n=e.map(a=>zt(a.value));return a=>{const i={};for(let o=0;oe(n)||r(n)}else if(Zh(t)){const e=zt(t.left),r=zt(t.right);return n=>e(n)&&r(n)}else if(nm(t)){const e=zt(t.value);return r=>!e(r)}else if(am(t)){const e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(Xh(t)){const e=!!t.true;return()=>e}en()}s(zt,"buildPredicate");function mI(t,e){if(e.elements.length===1)return Zr(t,e.elements[0]);{const r=[];for(const a of e.elements){const i={ALT:Zr(t,a,!0)},o=pc(a);o&&(i.GATE=zt(o)),r.push(i)}const n=t.or++;return a=>t.parser.alternatives(n,r.map(i=>{const o={ALT:s(()=>i.ALT(a),"ALT")},c=i.GATE;return c&&(o.GATE=()=>c(a)),o}))}}s(mI,"buildAlternatives");function gI(t,e){if(e.elements.length===1)return Zr(t,e.elements[0]);const r=[];for(const c of e.elements){const l={ALT:Zr(t,c,!0)},u=pc(c);u&&(l.GATE=zt(u)),r.push(l)}const n=t.or++,a=s((c,l)=>{const u=l.getRuleStack().join("-");return`uGroup_${c}_${u}`},"idFunc"),i=s(c=>t.parser.alternatives(n,r.map((l,u)=>{const f={ALT:s(()=>!0,"ALT")},d=t.parser;f.ALT=()=>{if(l.ALT(c),!d.isRecording()){const m=a(n,d);d.unorderedGroups.get(m)||d.unorderedGroups.set(m,[]);const g=d.unorderedGroups.get(m);typeof(g==null?void 0:g[u])>"u"&&(g[u]=!0)}};const p=l.GATE;return p?f.GATE=()=>p(c):f.GATE=()=>{const m=d.unorderedGroups.get(a(n,d));return!(m!=null&&m[u])},f})),"alternatives"),o=Zg(t,pc(e),i,"*");return c=>{o(c),t.parser.isRecording()||t.parser.unorderedGroups.delete(a(n,t.parser))}}s(gI,"buildUnorderedGroup");function yI(t,e){const r=e.elements.map(n=>Zr(t,n));return n=>r.forEach(a=>a(n))}s(yI,"buildGroup");function pc(t){if(Vn(t))return t.guardCondition}s(pc,"getGuardCondition");function Jg(t,e,r=e.terminal){if(r)if(wr(r)&&ot(r.rule.ref)){const n=r.rule.ref,a=t.subrule++;let i;return o=>{i??(i=fd(t,n)),t.parser.subrule(a,i,!1,e,o)}}else if(wr(r)&&xt(r.rule.ref)){const n=t.consume++,a=nf(t,r.rule.ref.name);return()=>t.parser.consume(n,a,e)}else if(br(r)){const n=t.consume++,a=nf(t,r.value);return()=>t.parser.consume(n,a,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const n=If(e.type.ref),a=n==null?void 0:n.terminal;if(!a)throw new Error("Could not find name assignment for type: "+Fn(e.type.ref));return Jg(t,e,a)}}s(Jg,"buildCrossReference");function vI(t,e){const r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}s(vI,"buildKeyword");function Zg(t,e,r,n){const a=e&&zt(e);if(!n)if(a){const i=t.or++;return o=>t.parser.alternatives(i,[{ALT:s(()=>r(o),"ALT"),GATE:s(()=>a(o),"GATE")},{ALT:dh(),GATE:s(()=>!a(o),"GATE")}])}else return r;if(n==="*"){const i=t.many++;return o=>t.parser.many(i,{DEF:s(()=>r(o),"DEF"),GATE:a?()=>a(o):void 0})}else if(n==="+"){const i=t.many++;if(a){const o=t.or++;return c=>t.parser.alternatives(o,[{ALT:s(()=>t.parser.atLeastOne(i,{DEF:s(()=>r(c),"DEF")}),"ALT"),GATE:s(()=>a(c),"GATE")},{ALT:dh(),GATE:s(()=>!a(c),"GATE")}])}else return o=>t.parser.atLeastOne(i,{DEF:s(()=>r(o),"DEF")})}else if(n==="?"){const i=t.optional++;return o=>t.parser.optional(i,{DEF:s(()=>r(o),"DEF"),GATE:a?()=>a(o):void 0})}else en()}s(Zg,"wrap");function fd(t,e){const r=TI(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}s(fd,"getRule");function TI(t,e){if(qn(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,a=e.$type;for(;!ot(n);)(Vn(n)||gf(n)||Rf(n))&&(a=n.elements.indexOf(r).toString()+":"+a),r=n,n=n.$container;return a=n.name+":"+a,t.ruleNames.set(e,a),a}}s(TI,"getRuleName");function nf(t,e){const r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}s(nf,"getToken");function Qg(t){const e=t.Grammar,r=t.parser.Lexer,n=new lI(t);return ud(e,n,r.definition),n.finalize(),n}s(Qg,"createCompletionParser");function ey(t){const e=ty(t);return e.finalize(),e}s(ey,"createLangiumParser");function ty(t){const e=t.Grammar,r=t.parser.Lexer,n=new sI(t);return ud(e,n,r.definition)}s(ty,"prepareLangiumParser");var cs,dd=(cs=class{constructor(){this.diagnostics=[]}buildTokens(e,r){const n=ue(Cf(e,!1)),a=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,a,r);return i.push(...a),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(xt).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){const r=$c(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,a={name:e.name,PATTERN:n};return typeof n=="function"&&(a.LINE_BREAKS=!0),e.hidden&&(a.GROUP=_f(r)?st.SKIPPED:"hidden"),a}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){const r=new RegExp(e,e.flags+"y");return(n,a)=>(r.lastIndex=a,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(qn).flatMap(a=>Dr(a).filter(br)).distinct(a=>a.value).toArray().sort((a,i)=>i.value.length-a.value.length).map(a=>this.buildKeywordToken(a,r,!!(n!=null&&n.caseInsensitive)))}buildKeywordToken(e,r,n){const a=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:a,LONGER_ALT:this.findLongerAlt(e,r)};return typeof a=="function"&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,r){return r?new RegExp(zo(e.value),"i"):e.value}findLongerAlt(e,r){return r.reduce((n,a)=>{const i=a==null?void 0:a.PATTERN;return i!=null&&i.source&&Sm("^"+i.source+"$",e.value)&&n.push(a),n},[])}},s(cs,"DefaultTokenBuilder"),cs),us,ry=(us=class{convert(e,r){let n=r.grammarSource;if(Wn(n)&&(n=km(n)),wr(n)){const a=n.rule.ref;if(!a)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(a,e,r)}return e}runConverter(e,r,n){var a;switch(e.name.toUpperCase()){case"INT":return ar.convertInt(r);case"STRING":return ar.convertString(r);case"ID":return ar.convertID(r)}switch((a=jm(e))==null?void 0:a.toLowerCase()){case"number":return ar.convertNumber(r);case"boolean":return ar.convertBoolean(r);case"bigint":return ar.convertBigint(r);case"date":return ar.convertDate(r);default:return r}}},s(us,"DefaultValueConverter"),us),ar;(function(t){function e(u){let f="";for(let d=1;d{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}s(pd,"delayNextTick");var Tu=0,RI=10;function hd(){return Tu=performance.now(),new Ae.CancellationTokenSource}s(hd,"startCancelableOperation");function ny(t){RI=t}s(ny,"setInterruptionPeriod");var or=Symbol("OperationCancelled");function la(t){return t===or}s(la,"isOperationCancelled");async function Ye(t){if(t===Ae.CancellationToken.None)return;const e=performance.now();if(e-Tu>=RI&&(Tu=e,await pd(),Tu=performance.now()),t.isCancellationRequested)throw or}s(Ye,"interruptAndCheck");var fs,Or=(fs=class{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}},s(fs,"Deferred"),fs),Vr,Wv=(Vr=class{constructor(e,r,n,a){this._uri=e,this._languageId=r,this._version=n,this._content=a,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(const n of e)if(Vr.isIncremental(n)){const a=iy(n.range),i=this.offsetAt(a.start),o=this.offsetAt(a.end);this._content=this._content.substring(0,i)+n.text+this._content.substring(o,this._content.length);const c=Math.max(a.start.line,0),l=Math.max(a.end.line,0);let u=this._lineOffsets;const f=Rh(n.text,!1,i);if(l-c===f.length)for(let p=0,m=f.length;pe?a=o:n=o+1}const i=n-1;return e=this.ensureBeforeEOL(e,r[i]),{line:i,character:e-r[i]}}offsetAt(e){const r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;const n=r[e.line];if(e.character<=0)return n;const a=e.line+1r&&ay(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){const r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}},s(Vr,"FullTextDocument"),Vr),af;(function(t){function e(a,i,o,c){return new Wv(a,i,o,c)}s(e,"create"),t.create=e;function r(a,i,o){if(a instanceof Wv)return a.update(i,o),a;throw new Error("TextDocument.update: document must be created by TextDocument.create")}s(r,"update"),t.update=r;function n(a,i){const o=a.getText(),c=sf(i.map($I),(f,d)=>{const p=f.range.start.line-d.range.start.line;return p===0?f.range.start.character-d.range.start.character:p});let l=0;const u=[];for(const f of c){const d=a.offsetAt(f.range.start);if(dl&&u.push(o.substring(l,d)),f.newText.length&&u.push(f.newText),l=a.offsetAt(f.range.end)}return u.push(o.substr(l)),u.join("")}s(n,"applyEdits"),t.applyEdits=n})(af||(af={}));function sf(t,e){if(t.length<=1)return t;const r=t.length/2|0,n=t.slice(0,r),a=t.slice(r);sf(n,e),sf(a,e);let i=0,o=0,c=0;for(;ir.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}s(iy,"getWellformedRange");function $I(t){const e=iy(t.range);return e!==t.range?{newText:t.newText,range:e}:t}s($I,"getWellformedEdit");var AI;(()=>{var t={975:P=>{function S($){if(typeof $!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify($))}s(S,"e");function R($,A){for(var b,O="",M=0,L=-1,j=0,F=0;F<=$.length;++F){if(F<$.length)b=$.charCodeAt(F);else{if(b===47)break;b=47}if(b===47){if(!(L===F-1||j===1))if(L!==F-1&&j===2){if(O.length<2||M!==2||O.charCodeAt(O.length-1)!==46||O.charCodeAt(O.length-2)!==46){if(O.length>2){var te=O.lastIndexOf("/");if(te!==O.length-1){te===-1?(O="",M=0):M=(O=O.slice(0,te)).length-1-O.lastIndexOf("/"),L=F,j=0;continue}}else if(O.length===2||O.length===1){O="",M=0,L=F,j=0;continue}}A&&(O.length>0?O+="/..":O="..",M=2)}else O.length>0?O+="/"+$.slice(L+1,F):O=$.slice(L+1,F),M=F-L-1;L=F,j=0}else b===46&&j!==-1?++j:j=-1}return O}s(R,"r");var I={resolve:s(function(){for(var $,A="",b=!1,O=arguments.length-1;O>=-1&&!b;O--){var M;O>=0?M=arguments[O]:($===void 0&&($=process.cwd()),M=$),S(M),M.length!==0&&(A=M+"/"+A,b=M.charCodeAt(0)===47)}return A=R(A,!b),b?A.length>0?"/"+A:"/":A.length>0?A:"."},"resolve"),normalize:s(function($){if(S($),$.length===0)return".";var A=$.charCodeAt(0)===47,b=$.charCodeAt($.length-1)===47;return($=R($,!A)).length!==0||A||($="."),$.length>0&&b&&($+="/"),A?"/"+$:$},"normalize"),isAbsolute:s(function($){return S($),$.length>0&&$.charCodeAt(0)===47},"isAbsolute"),join:s(function(){if(arguments.length===0)return".";for(var $,A=0;A0&&($===void 0?$=b:$+="/"+b)}return $===void 0?".":I.normalize($)},"join"),relative:s(function($,A){if(S($),S(A),$===A||($=I.resolve($))===(A=I.resolve(A)))return"";for(var b=1;b<$.length&&$.charCodeAt(b)===47;++b);for(var O=$.length,M=O-b,L=1;LF){if(A.charCodeAt(L+U)===47)return A.slice(L+U+1);if(U===0)return A.slice(L+U)}else M>F&&($.charCodeAt(b+U)===47?te=U:U===0&&(te=0));break}var Q=$.charCodeAt(b+U);if(Q!==A.charCodeAt(L+U))break;Q===47&&(te=U)}var fe="";for(U=b+te+1;U<=O;++U)U!==O&&$.charCodeAt(U)!==47||(fe.length===0?fe+="..":fe+="/..");return fe.length>0?fe+A.slice(L+te):(L+=te,A.charCodeAt(L)===47&&++L,A.slice(L))},"relative"),_makeLong:s(function($){return $},"_makeLong"),dirname:s(function($){if(S($),$.length===0)return".";for(var A=$.charCodeAt(0),b=A===47,O=-1,M=!0,L=$.length-1;L>=1;--L)if((A=$.charCodeAt(L))===47){if(!M){O=L;break}}else M=!1;return O===-1?b?"/":".":b&&O===1?"//":$.slice(0,O)},"dirname"),basename:s(function($,A){if(A!==void 0&&typeof A!="string")throw new TypeError('"ext" argument must be a string');S($);var b,O=0,M=-1,L=!0;if(A!==void 0&&A.length>0&&A.length<=$.length){if(A.length===$.length&&A===$)return"";var j=A.length-1,F=-1;for(b=$.length-1;b>=0;--b){var te=$.charCodeAt(b);if(te===47){if(!L){O=b+1;break}}else F===-1&&(L=!1,F=b+1),j>=0&&(te===A.charCodeAt(j)?--j==-1&&(M=b):(j=-1,M=F))}return O===M?M=F:M===-1&&(M=$.length),$.slice(O,M)}for(b=$.length-1;b>=0;--b)if($.charCodeAt(b)===47){if(!L){O=b+1;break}}else M===-1&&(L=!1,M=b+1);return M===-1?"":$.slice(O,M)},"basename"),extname:s(function($){S($);for(var A=-1,b=0,O=-1,M=!0,L=0,j=$.length-1;j>=0;--j){var F=$.charCodeAt(j);if(F!==47)O===-1&&(M=!1,O=j+1),F===46?A===-1?A=j:L!==1&&(L=1):A!==-1&&(L=-1);else if(!M){b=j+1;break}}return A===-1||O===-1||L===0||L===1&&A===O-1&&A===b+1?"":$.slice(A,O)},"extname"),format:s(function($){if($===null||typeof $!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof $);return function(A,b){var O=b.dir||b.root,M=b.base||(b.name||"")+(b.ext||"");return O?O===b.root?O+M:O+"/"+M:M}(0,$)},"format"),parse:s(function($){S($);var A={root:"",dir:"",base:"",ext:"",name:""};if($.length===0)return A;var b,O=$.charCodeAt(0),M=O===47;M?(A.root="/",b=1):b=0;for(var L=-1,j=0,F=-1,te=!0,U=$.length-1,Q=0;U>=b;--U)if((O=$.charCodeAt(U))!==47)F===-1&&(te=!1,F=U+1),O===46?L===-1?L=U:Q!==1&&(Q=1):L!==-1&&(Q=-1);else if(!te){j=U+1;break}return L===-1||F===-1||Q===0||Q===1&&L===F-1&&L===j+1?F!==-1&&(A.base=A.name=j===0&&M?$.slice(1,F):$.slice(j,F)):(j===0&&M?(A.name=$.slice(1,L),A.base=$.slice(1,F)):(A.name=$.slice(j,L),A.base=$.slice(j,F)),A.ext=$.slice(L,F)),j>0?A.dir=$.slice(0,j-1):M&&(A.dir="/"),A},"parse"),sep:"/",delimiter:":",win32:null,posix:null};I.posix=I,P.exports=I}},e={};function r(P){var S=e[P];if(S!==void 0)return S.exports;var R=e[P]={exports:{}};return t[P](R,R.exports,r),R.exports}s(r,"r"),r.d=(P,S)=>{for(var R in S)r.o(S,R)&&!r.o(P,R)&&Object.defineProperty(P,R,{enumerable:!0,get:S[R]})},r.o=(P,S)=>Object.prototype.hasOwnProperty.call(P,S),r.r=P=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})};var n={};let a;r.r(n),r.d(n,{URI:s(()=>p,"URI"),Utils:s(()=>Ie,"Utils")}),typeof process=="object"?a=process.platform==="win32":typeof navigator=="object"&&(a=navigator.userAgent.indexOf("Windows")>=0);const i=/^\w[\w\d+.-]*$/,o=/^\//,c=/^\/\//;function l(P,S){if(!P.scheme&&S)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${P.authority}", path: "${P.path}", query: "${P.query}", fragment: "${P.fragment}"}`);if(P.scheme&&!i.test(P.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(P.path){if(P.authority){if(!o.test(P.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(c.test(P.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}s(l,"a");const u="",f="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,oe=class oe{constructor(S,R,I,$,A,b=!1){jr(this,"scheme");jr(this,"authority");jr(this,"path");jr(this,"query");jr(this,"fragment");typeof S=="object"?(this.scheme=S.scheme||u,this.authority=S.authority||u,this.path=S.path||u,this.query=S.query||u,this.fragment=S.fragment||u):(this.scheme=function(O,M){return O||M?O:"file"}(S,b),this.authority=R||u,this.path=function(O,M){switch(O){case"https":case"http":case"file":M?M[0]!==f&&(M=f+M):M=f}return M}(this.scheme,I||u),this.query=$||u,this.fragment=A||u,l(this,b))}static isUri(S){return S instanceof oe||!!S&&typeof S.authority=="string"&&typeof S.fragment=="string"&&typeof S.path=="string"&&typeof S.query=="string"&&typeof S.scheme=="string"&&typeof S.fsPath=="string"&&typeof S.with=="function"&&typeof S.toString=="function"}get fsPath(){return w(this,!1)}with(S){if(!S)return this;let{scheme:R,authority:I,path:$,query:A,fragment:b}=S;return R===void 0?R=this.scheme:R===null&&(R=u),I===void 0?I=this.authority:I===null&&(I=u),$===void 0?$=this.path:$===null&&($=u),A===void 0?A=this.query:A===null&&(A=u),b===void 0?b=this.fragment:b===null&&(b=u),R===this.scheme&&I===this.authority&&$===this.path&&A===this.query&&b===this.fragment?this:new g(R,I,$,A,b)}static parse(S,R=!1){const I=d.exec(S);return I?new g(I[2]||u,re(I[4]||u),re(I[5]||u),re(I[7]||u),re(I[9]||u),R):new g(u,u,u,u,u)}static file(S){let R=u;if(a&&(S=S.replace(/\\/g,f)),S[0]===f&&S[1]===f){const I=S.indexOf(f,2);I===-1?(R=S.substring(2),S=f):(R=S.substring(2,I),S=S.substring(I)||f)}return new g("file",R,S,u,u)}static from(S){const R=new g(S.scheme,S.authority,S.path,S.query,S.fragment);return l(R,!0),R}toString(S=!1){return C(this,S)}toJSON(){return this}static revive(S){if(S){if(S instanceof oe)return S;{const R=new g(S);return R._formatted=S.external,R._fsPath=S._sep===m?S.fsPath:null,R}}return S}};s(oe,"l");let p=oe;const m=a?1:void 0,tt=class tt extends p{constructor(){super(...arguments);jr(this,"_formatted",null);jr(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath}toString(R=!1){return R?C(this,!0):(this._formatted||(this._formatted=C(this,!1)),this._formatted)}toJSON(){const R={$mid:1};return this._fsPath&&(R.fsPath=this._fsPath,R._sep=m),this._formatted&&(R.external=this._formatted),this.path&&(R.path=this.path),this.scheme&&(R.scheme=this.scheme),this.authority&&(R.authority=this.authority),this.query&&(R.query=this.query),this.fragment&&(R.fragment=this.fragment),R}};s(tt,"d");let g=tt;const v={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function E(P,S,R){let I,$=-1;for(let A=0;A=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45||b===46||b===95||b===126||S&&b===47||R&&b===91||R&&b===93||R&&b===58)$!==-1&&(I+=encodeURIComponent(P.substring($,A)),$=-1),I!==void 0&&(I+=P.charAt(A));else{I===void 0&&(I=P.substr(0,A));const O=v[b];O!==void 0?($!==-1&&(I+=encodeURIComponent(P.substring($,A)),$=-1),I+=O):$===-1&&($=A)}}return $!==-1&&(I+=encodeURIComponent(P.substring($))),I!==void 0?I:P}s(E,"m");function T(P){let S;for(let R=0;R1&&P.scheme==="file"?`//${P.authority}${P.path}`:P.path.charCodeAt(0)===47&&(P.path.charCodeAt(1)>=65&&P.path.charCodeAt(1)<=90||P.path.charCodeAt(1)>=97&&P.path.charCodeAt(1)<=122)&&P.path.charCodeAt(2)===58?S?P.path.substr(1):P.path[1].toLowerCase()+P.path.substr(2):P.path,a&&(R=R.replace(/\//g,"\\")),R}s(w,"v");function C(P,S){const R=S?T:E;let I="",{scheme:$,authority:A,path:b,query:O,fragment:M}=P;if($&&(I+=$,I+=":"),(A||$==="file")&&(I+=f,I+=f),A){let L=A.indexOf("@");if(L!==-1){const j=A.substr(0,L);A=A.substr(L+1),L=j.lastIndexOf(":"),L===-1?I+=R(j,!1,!1):(I+=R(j.substr(0,L),!1,!1),I+=":",I+=R(j.substr(L+1),!1,!0)),I+="@"}A=A.toLowerCase(),L=A.lastIndexOf(":"),L===-1?I+=R(A,!1,!0):(I+=R(A.substr(0,L),!1,!0),I+=A.substr(L))}if(b){if(b.length>=3&&b.charCodeAt(0)===47&&b.charCodeAt(2)===58){const L=b.charCodeAt(1);L>=65&&L<=90&&(b=`/${String.fromCharCode(L+32)}:${b.substr(3)}`)}else if(b.length>=2&&b.charCodeAt(1)===58){const L=b.charCodeAt(0);L>=65&&L<=90&&(b=`${String.fromCharCode(L+32)}:${b.substr(2)}`)}I+=R(b,!0,!1)}return O&&(I+="?",I+=R(O,!1,!1)),M&&(I+="#",I+=S?M:E(M,!1,!1)),I}s(C,"b");function k(P){try{return decodeURIComponent(P)}catch{return P.length>3?P.substr(0,3)+k(P.substr(3)):P}}s(k,"C");const B=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function re(P){return P.match(B)?P.replace(B,S=>k(S)):P}s(re,"w");var X=r(975);const ge=X.posix||X,_e="/";var Ie;(function(P){P.joinPath=function(S,...R){return S.with({path:ge.join(S.path,...R)})},P.resolvePath=function(S,...R){let I=S.path,$=!1;I[0]!==_e&&(I=_e+I,$=!0);let A=ge.resolve(I,...R);return $&&A[0]===_e&&!S.authority&&(A=A.substring(1)),S.with({path:A})},P.dirname=function(S){if(S.path.length===0||S.path===_e)return S;let R=ge.dirname(S.path);return R.length===1&&R.charCodeAt(0)===46&&(R=""),S.with({path:R})},P.basename=function(S){return ge.basename(S.path)},P.extname=function(S){return ge.extname(S.path)}})(Ie||(Ie={})),AI=n})();var{URI:Rt,Utils:yl}=AI,it;(function(t){t.basename=yl.basename,t.dirname=yl.dirname,t.extname=yl.extname,t.joinPath=yl.joinPath,t.resolvePath=yl.resolvePath;const e=typeof process=="object"&&(process==null?void 0:process.platform)==="win32";function r(o,c){return(o==null?void 0:o.toString())===(c==null?void 0:c.toString())}s(r,"equals"),t.equals=r;function n(o,c){const l=typeof o=="string"?Rt.parse(o).path:o.path,u=typeof c=="string"?Rt.parse(c).path:c.path,f=l.split("/").filter(v=>v.length>0),d=u.split("/").filter(v=>v.length>0);if(e){const v=/^[A-Z]:$/;if(f[0]&&v.test(f[0])&&(f[0]=f[0].toLowerCase()),d[0]&&v.test(d[0])&&(d[0]=d[0].toLowerCase()),f[0]!==d[0])return u.substring(1)}let p=0;for(;p({name:a.name,uri:it.joinPath(Rt.parse(r),a.name).toString(),element:a.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const r=this.getNode(it.normalize(e),!1);return r?this.collectValues(r):[]}getNode(e,r){const n=e.split("/");e.charAt(e.length-1)==="/"&&n.pop();let a=this.root;for(const i of n){let o=a.children.get(i);if(!o)if(r)o={name:i,children:new Map,parent:a},a.children.set(i,o);else return;a=o}return a}collectValues(e){const r=[];e.element&&r.push(e.element);for(const n of e.children.values())r.push(...this.collectValues(n));return r}},s(ds,"UriTrie"),ds),Z;(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(Z||(Z={}));var ps,EI=(ps=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=Ae.CancellationToken.None){const n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r)}fromTextDocument(e,r,n){return r=r??Rt.parse(e.uri),Ae.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromString(e,r,n){return Ae.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r,n){if(typeof r=="string"){const a=this.parse(e,r,n);return this.createLangiumDocument(a,e,void 0,r)}else if("$model"in r){const a={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(a,e)}else{const a=this.parse(e,r.getText(),n);return this.createLangiumDocument(a,e,r)}}async createAsync(e,r,n){if(typeof r=="string"){const a=await this.parseAsync(e,r,n);return this.createLangiumDocument(a,e,void 0,r)}else{const a=await this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(a,e,r)}}createLangiumDocument(e,r,n,a){let i;if(n)i={parseResult:e,uri:r,state:Z.Parsed,references:[],textDocument:n};else{const o=this.createTextDocumentGetter(r,a);i={parseResult:e,uri:r,state:Z.Parsed,references:[],get textDocument(){return o()}}}return e.value.$document=i,i}async update(e,r){var o,c;const n=(o=e.parseResult.value.$cstNode)==null?void 0:o.root.fullText,a=(c=this.textDocuments)==null?void 0:c.get(e.uri.toString()),i=a?a.getText():await this.fileSystemProvider.readFile(e.uri);if(a)Object.defineProperty(e,"textDocument",{value:a});else{const l=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:l})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,r),e.parseResult.value.$document=e),e.state=Z.Parsed,e}parse(e,r,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r,n)}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(e,r){const n=this.serviceRegistry;let a;return()=>a??(a=af.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},s(ps,"DefaultLangiumDocumentFactory"),ps),hs,_I=(hs=class{constructor(e){this.documentTrie=new sy,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return ue(this.documentTrie.all())}addDocument(e){const r=e.uri.toString();if(this.documentTrie.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentTrie.insert(r,e)}getDocument(e){const r=e.toString();return this.documentTrie.find(r)}getDocuments(e){const r=e.toString();return this.documentTrie.findAll(r)}async getOrCreateDocument(e,r){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n)}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(a=>(this.addDocument(a),a));{const a=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(a),a}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const r=e.toString(),n=this.documentTrie.find(r);return n&&this.documentBuilder().resetToState(n,Z.Changed),n}deleteDocument(e){const r=e.toString(),n=this.documentTrie.find(r);return n&&(n.state=Z.Changed,this.documentTrie.delete(r)),n}deleteDocuments(e){const r=e.toString(),n=this.documentTrie.findAll(r);for(const a of n)a.state=Z.Changed;return this.documentTrie.delete(r),n}},s(hs,"DefaultLangiumDocuments"),hs),mn=Symbol("RefResolving"),ms,CI=(ms=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,r=Ae.CancellationToken.None){var n;if((n=this.profiler)!=null&&n.isActive("linking")){const a=this.profiler.createTask("linking",this.languageId);a.start();try{for(const i of Kt(e.parseResult.value))await Ye(r),ko(i).forEach(o=>{const c=`${i.$type}:${o.property}`;a.startSubTask(c);try{this.doLink(o,e)}finally{a.stopSubTask(c)}})}finally{a.stop()}}else for(const a of Kt(e.parseResult.value))await Ye(r),ko(a).forEach(i=>this.doLink(i,e))}doLink(e,r){const n=e.reference;if("_ref"in n&&n._ref===void 0){n._ref=mn;try{const a=this.getCandidate(e);if(vn(a))n._ref=a;else{n._nodeDescription=a;const i=this.loadAstNode(a);n._ref=i??this.createLinkingError(e,a)}}catch(a){console.error(`An error occurred while resolving reference to '${n.$refText}':`,a);const i=a.message??String(a);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${i}`}}r.references.push(n)}else if("_items"in n&&n._items===void 0){n._items=mn;try{const a=this.getCandidates(e),i=[];if(vn(a))n._linkingError=a;else for(const o of a){const c=this.loadAstNode(o);c&&i.push({ref:c,$nodeDescription:o})}n._items=i}catch(a){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${a}`},n._items=[]}r.references.push(n)}}unlink(e){for(const r of e.references)"_ref"in r?(r._ref=void 0,delete r._nodeDescription):"_items"in r&&(r._items=void 0,delete r._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){const n=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(a=>`${a.documentUri}#${a.path}`).toArray();return n.length>0?n:this.createLinkingError(e)}buildReference(e,r,n,a){const i=this,o={$refNode:n,$refText:a,_ref:void 0,get ref(){if(Be(this._ref))return this._ref;if(Kh(this._nodeDescription)){const c=i.loadAstNode(this._nodeDescription);this._ref=c??i.createLinkingError({reference:o,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){this._ref=mn;const c=Ga(e).$document,l=i.getLinkedNode({reference:o,container:e,property:r});if(l.error&&c&&c.state0))return this._linkingError=i.createLinkingError({reference:o,container:e,property:r})}};return o}throwCyclicReferenceError(e,r,n){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${r} (symbol '${n}')`)}getLinkedNode(e){try{const r=this.getCandidate(e);if(vn(r))return{error:r};const n=this.loadAstNode(r);return n?{node:n,descr:r}:{descr:r,error:this.createLinkingError(e,r)}}catch(r){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,r);const n=r.message??String(r);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;const r=this.langiumDocuments().getDocument(e.documentUri);if(r)return this.astNodeLocator.getAstNode(r.parseResult.value,e.path)}createLinkingError(e,r){const n=Ga(e.container).$document;n&&n.stateWn(r)&&r.isMulti)}findDeclarations(e){if(e){const r=Dm(e),n=e.astNode;if(r&&n){const a=n[r.feature];if(at(a)||lr(a))return Eu(a);if(Array.isArray(a)){for(const i of a)if((at(i)||lr(i))&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return Eu(i)}}if(n){const a=this.nameProvider.getNameNode(n);if(a&&(a===e||hm(e,a)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(r.head());if(n){for(const a of ko(n))if(lr(a.reference)&&a.reference.items.some(i=>i.ref===e))return a.reference.items.map(i=>i.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;const r=this.documents.getDocument(e.sourceUri);if(r)return this.nodeLocator.getAstNode(r.parseResult.value,e.sourcePath)}findDeclarationNodes(e){const r=this.findDeclarations(e),n=[];for(const a of r){const i=this.nameProvider.getNameNode(a)??a.$cstNode;i&&n.push(i)}return n}findReferences(e,r){const n=[];r.includeDeclaration&&n.push(...this.getSelfReferences(e));let a=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(a=a.filter(i=>it.equals(i.sourceUri,r.documentUri))),n.push(...a),ue(n)}getSelfReferences(e){const r=this.getSelfNodes(e),n=[];for(const a of r){const i=this.nameProvider.getNameNode(a);if(i){const o=Bt(a),c=this.nodeLocator.getAstNodePath(a);n.push({sourceUri:o.uri,sourcePath:c,targetUri:o.uri,targetPath:c,segment:Lo(i),local:!0})}}return n}},s(ys,"DefaultReferences"),ys),vs,Lr=(vs=class{constructor(e){if(this.map=new Map,e)for(const[r,n]of e)this.add(r,n)}get size(){return Zl.sum(ue(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,r){if(r===void 0)return this.map.delete(e);{const n=this.map.get(e);if(n){const a=n.indexOf(r);if(a>=0)return n.length===1?this.map.delete(e):n.splice(a,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const r=this.map.get(e);return r?ue(r):wo}has(e,r){if(r===void 0)return this.map.has(e);{const n=this.map.get(e);return n?n.indexOf(r)>=0:!1}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this}forEach(e){this.map.forEach((r,n)=>r.forEach(a=>e(a,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return ue(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return ue(this.map.keys())}values(){return ue(this.map.values()).flat()}entriesGroupedByKey(){return ue(this.map.entries())}},s(vs,"MultiMap"),vs),Ts,of=(Ts=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[r,n]of e)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1}},s(Ts,"BiMap"),Ts),Rs,wI=(Rs=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,r=Ae.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,r)}async collectExportedSymbolsForNode(e,r,n=yc,a=Ae.CancellationToken.None){const i=[];this.addExportedSymbol(e,i,r);for(const o of n(e))await Ye(a),this.addExportedSymbol(o,i,r);return i}addExportedSymbol(e,r,n){const a=this.nameProvider.getName(e);a&&r.push(this.descriptions.createDescription(e,a,n))}async collectLocalSymbols(e,r=Ae.CancellationToken.None){const n=e.parseResult.value,a=new Lr;for(const i of Dr(n))await Ye(r),this.addLocalSymbol(i,e,a);return a}addLocalSymbol(e,r,n){const a=e.$container;if(a){const i=this.nameProvider.getName(e);i&&n.add(a,this.descriptions.createDescription(e,i,r))}}},s(Rs,"DefaultScopeComputation"),Rs),$s,$h=($s=class{constructor(e,r,n){this.elements=e,this.outerScope=r,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(a=>a.name.toLowerCase()===r):this.elements.find(a=>a.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(a=>a.name.toLowerCase()===r):this.elements.filter(a=>a.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},s($s,"StreamScope"),$s),As,vj=(As=class{constructor(e,r,n){this.elements=new Map,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0;for(const a of e){const i=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.set(i,a)}this.outerScope=r}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r),a=n?[n]:[];return(this.concatOuterScope||a.length>0)&&this.outerScope?ue(a).concat(this.outerScope.getElements(e)):ue(a)}getAllElements(){let e=ue(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},s(As,"MapScope"),As),Es,II=(Es=class{constructor(e,r,n){this.elements=new Lr,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0;for(const a of e){const i=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.add(i,a)}this.outerScope=r}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);return(this.concatOuterScope||n.length===0)&&this.outerScope?ue(n).concat(this.outerScope.getElements(e)):ue(n)}getAllElements(){let e=ue(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},s(Es,"MultiMapScope"),Es),Tj={getElement(){},getElements(){return wo},getAllElements(){return wo}},_s,md=(_s=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},s(_s,"DisposableCache"),_s),Cs,ly=(Cs=class extends md{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,r){this.throwIfDisposed(),this.cache.set(e,r)}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){const n=r();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},s(Cs,"SimpleCache"),Cs),Ss,gd=(Ss=class extends md{constructor(e){super(),this.cache=new Map,this.converter=e??(r=>r)}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r)}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n)}get(e,r,n){this.throwIfDisposed();const a=this.cacheForContext(e);if(a.has(r))return a.get(r);if(n){const i=n();return a.set(r,i),i}else return}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r)}clear(e){if(this.throwIfDisposed(),e){const r=this.converter(e);this.cache.delete(r)}else this.cache.clear()}cacheForContext(e){const r=this.converter(e);let n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},s(Ss,"ContextCache"),Ss),bs,NI=(bs=class extends gd{constructor(e,r){super(n=>n.toString()),r?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(r,n=>{this.clear(n.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{for(const i of a)this.clear(i)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{const i=n.concat(a);for(const o of i)this.clear(o)}))}},s(bs,"DocumentCache"),bs),ws,cy=(ws=class extends ly{constructor(e,r){super(),r?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(r,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{a.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},s(ws,"WorkspaceCache"),ws),Is,kI=(Is=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new cy(e.shared)}getScope(e){const r=[],n=this.reflection.getReferenceType(e),a=Bt(e.container).localSymbols;if(a){let o=e.container;do a.has(o)&&r.push(a.getStream(o).filter(c=>this.reflection.isSubtype(c.type,n))),o=o.$container;while(o)}let i=this.getGlobalScope(n,e);for(let o=r.length-1;o>=0;o--)i=this.createScope(r[o],i);return i}createScope(e,r,n){return new $h(ue(e),r,n)}createScopeForNodes(e,r,n){const a=ue(e).map(i=>{const o=this.nameProvider.getName(i);if(o)return this.descriptions.createDescription(i,o)}).nonNullable();return new $h(a,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new II(this.indexManager.allElements(e)))}},s(Is,"DefaultScopeProvider"),Is);function uy(t){return typeof t.$comment=="string"}s(uy,"isAstNodeWithComment");function Ah(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}s(Ah,"isIntermediateReference");var Ns,PI=(Ns=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r){const n=r??{},a=r==null?void 0:r.replacer,i=s((c,l)=>this.replacer(c,l,n),"defaultReplacer"),o=a?(c,l)=>a(c,l,i):i;try{return this.currentDocument=Bt(e),JSON.stringify(e,o,r==null?void 0:r.space)}finally{this.currentDocument=void 0}}deserialize(e,r){const n=r??{},a=JSON.parse(e);return this.linkNode(a,a,n),a}replacer(e,r,{refText:n,sourceText:a,textRegions:i,comments:o,uriConverter:c}){var l,u,f;if(!this.ignoreProperties.has(e))if(at(r)){const d=r.ref,p=n?r.$refText:void 0;if(d){const m=Bt(d);let g="";this.currentDocument&&this.currentDocument!==m&&(c?g=c(m.uri,d):g=m.uri.toString());const v=this.astNodeLocator.getAstNodePath(d);return{$ref:`${g}#${v}`,$refText:p}}else return{$error:((l=r.error)==null?void 0:l.message)??"Could not resolve reference",$refText:p}}else if(lr(r)){const d=n?r.$refText:void 0,p=[];for(const m of r.items){const g=m.ref,v=Bt(m.ref);let E="";this.currentDocument&&this.currentDocument!==v&&(c?E=c(v.uri,g):E=v.uri.toString());const T=this.astNodeLocator.getAstNodePath(g);p.push(`${E}#${T}`)}return{$refs:p,$refText:d}}else if(Be(r)){let d;if(i&&(d=this.addAstNodeRegionWithAssignmentsTo({...r}),(!e||r.$document)&&(d!=null&&d.$textRegion)&&(d.$textRegion.documentURI=(u=this.currentDocument)==null?void 0:u.uri.toString())),a&&!e&&(d??(d={...r}),d.$sourceText=(f=r.$cstNode)==null?void 0:f.text),o){d??(d={...r});const p=this.commentProvider.getComment(r);p&&(d.$comment=p.replace(/\r/g,""))}return d??r}else return r}addAstNodeRegionWithAssignmentsTo(e){const r=s(n=>({offset:n.offset,end:n.end,length:n.length,range:n.range}),"createDocumentSegment");if(e.$cstNode){const n=e.$textRegion=r(e.$cstNode),a=n.assignments={};return Object.keys(e).filter(i=>!i.startsWith("$")).forEach(i=>{const o=Om(e.$cstNode,i).map(r);o.length!==0&&(a[i]=o)}),e}}linkNode(e,r,n,a,i,o){for(const[l,u]of Object.entries(e))if(Array.isArray(u))for(let f=0;f{await this.handleException(()=>e.call(r,n,a,i),"An error occurred during validation",a,n)}}async handleException(e,r,n,a){try{await e()}catch(i){if(la(i))throw i;console.error(`${r}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);const o=i instanceof Error?i.message:String(i);n("error",`${r}: ${o}`,{node:a})}}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return}for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,r)}getChecks(e,r){let n=ue(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(a=>r.includes(a.category))),n.map(a=>a.check)}registerBeforeDocument(e,r=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",r))}registerAfterDocument(e,r=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",r))}wrapPreparationException(e,r,n){return async(a,i,o,c)=>{await this.handleException(()=>e.call(n,a,i,o,c),r,i,a)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},s(Ps,"ValidationRegistry"),Ps),DI=Object.freeze({validateNode:!0,validateChildren:!0}),Os,MI=(Os=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,r={},n=Ae.CancellationToken.None){const a=e.parseResult,i=[];if(await Ye(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(a,i,r),r.stopAfterLexingErrors&&i.some(o=>{var c;return((c=o.data)==null?void 0:c.code)===Ot.LexingError})||(this.processParsingErrors(a,i,r),r.stopAfterParsingErrors&&i.some(o=>{var c;return((c=o.data)==null?void 0:c.code)===Ot.ParsingError}))||(this.processLinkingErrors(e,i,r),r.stopAfterLinkingErrors&&i.some(o=>{var c;return((c=o.data)==null?void 0:c.code)===Ot.LinkingError}))))return i;try{i.push(...await this.validateAst(a.value,r,n))}catch(o){if(la(o))throw o;console.error("An error occurred during validation:",o)}return await Ye(n),i}processLexingErrors(e,r,n){var i;const a=[...e.lexerErrors,...((i=e.lexerReport)==null?void 0:i.diagnostics)??[]];for(const o of a){const c=o.severity??"error",l={severity:Xl(c),range:{start:{line:o.line-1,character:o.column-1},end:{line:o.line-1,character:o.column+o.length-1}},message:o.message,data:dy(c),source:this.getSource()};r.push(l)}}processParsingErrors(e,r,n){for(const a of e.parserErrors){let i;if(isNaN(a.token.startOffset)){if("previousToken"in a){const o=a.previousToken;if(isNaN(o.startOffset)){const c={line:0,character:0};i={start:c,end:c}}else{const c={line:o.endLine-1,character:o.endColumn};i={start:c,end:c}}}}else i=Ql(a.token);if(i){const o={severity:Xl("error"),range:i,message:a.message,data:Pn(Ot.ParsingError),source:this.getSource()};r.push(o)}}}processLinkingErrors(e,r,n){var a;for(const i of e.references){const o=i.error;if(o){const c={node:o.info.container,range:(a=i.$refNode)==null?void 0:a.range,property:o.info.property,index:o.info.index,data:{code:Ot.LinkingError,containerType:o.info.container.$type,property:o.info.property,refText:o.info.reference.$refText}};r.push(this.toDiagnostic("error",o.message,c))}}}async validateAst(e,r,n=Ae.CancellationToken.None){const a=[],i=s((o,c,l)=>{a.push(this.toDiagnostic(o,c,l))},"acceptor");return await this.validateAstBefore(e,r,i,n),await this.validateAstNodes(e,r,i,n),await this.validateAstAfter(e,r,i,n),a}async validateAstBefore(e,r,n,a=Ae.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const o of i)await Ye(a),await o(e,n,r.categories??[],a)}async validateAstNodes(e,r,n,a=Ae.CancellationToken.None){var i;if((i=this.profiler)!=null&&i.isActive("validating")){const o=this.profiler.createTask("validating",this.languageId);o.start();try{const c=Kt(e).iterator();for(const l of c){o.startSubTask(l.$type);const u=this.validateSingleNodeOptions(l,r);if(u.validateNode)try{const f=this.validationRegistry.getChecks(l.$type,r.categories);for(const d of f)await d(l,n,a)}finally{o.stopSubTask(l.$type)}u.validateChildren||c.prune()}}finally{o.stop()}}else{const o=Kt(e).iterator();for(const c of o){await Ye(a);const l=this.validateSingleNodeOptions(c,r);if(l.validateNode){const u=this.validationRegistry.getChecks(c.$type,r.categories);for(const f of u)await f(c,n,a)}l.validateChildren||o.prune()}}}validateSingleNodeOptions(e,r){return DI}async validateAstAfter(e,r,n,a=Ae.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const o of i)await Ye(a),await o(e,n,r.categories??[],a)}toDiagnostic(e,r,n){return{message:r,range:fy(n),severity:Xl(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},s(Os,"DefaultDocumentValidator"),Os);function fy(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=Sf(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=Lm(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}s(fy,"getDiagnosticRange");function Xl(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}s(Xl,"toDiagnosticSeverity");function dy(t){switch(t){case"error":return Pn(Ot.LexingError);case"warning":return Pn(Ot.LexingWarning);case"info":return Pn(Ot.LexingInfo);case"hint":return Pn(Ot.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}s(dy,"toDiagnosticData");var Ot;(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(Ot||(Ot={}));var Ls,xI=(Ls=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n){const a=n??Bt(e);r??(r=this.nameProvider.getName(e));const i=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${i} has no name.`);let o;const c=s(()=>o??(o=Lo(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:r,get nameSegment(){return c()},selectionSegment:Lo(e.$cstNode),type:e.$type,documentUri:a.uri,path:i}}},s(Ls,"DefaultAstNodeDescriptionProvider"),Ls),Ds,FI=(Ds=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=Ae.CancellationToken.None){const n=[],a=e.parseResult.value;for(const i of Kt(a))await Ye(r),ko(i).forEach(o=>{o.reference.error||n.push(...this.createInfoDescriptions(o))});return n}createInfoDescriptions(e){const r=e.reference;if(r.error||!r.$refNode)return[];let n=[];at(r)&&r.$nodeDescription?n=[r.$nodeDescription]:lr(r)&&(n=r.items.map(l=>l.$nodeDescription).filter(l=>l!==void 0));const a=Bt(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),o=[],c=Lo(r.$refNode);for(const l of n)o.push({sourceUri:a,sourcePath:i,targetUri:l.documentUri,targetPath:l.path,segment:c,local:it.equals(l.documentUri,a)});return o}},s(Ds,"DefaultReferenceDescriptionProvider"),Ds),Ms,GI=(Ms=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?e+this.indexSeparator+r:e}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((a,i)=>{if(!a||i.length===0)return a;const o=i.indexOf(this.indexSeparator);if(o>0){const c=i.substring(0,o),l=parseInt(i.substring(o+1)),u=a[c];return u==null?void 0:u[l]}return a[i]},e)}},s(Ms,"DefaultAstNodeLocator"),Ms),yd={};ff(yd,jh(jo()));var xs,jI=(xs=class{constructor(e){this._ready=new Or,this.onConfigurationSectionUpdateEmitter=new yd.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var r;this.workspaceConfig=((r=e.capabilities.workspace)==null?void 0:r.configuration)??!1}async initialized(e){if(this.workspaceConfig){if(e.register){const r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const r=this.serviceRegistry.all.map(a=>({section:this.toSectionName(a.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(r);r.forEach((a,i)=>{this.updateSectionConfiguration(a.section,n[i])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!="object"||e.settings===null||Object.entries(e.settings).forEach(([r,n])=>{this.updateSectionConfiguration(r,n),this.onConfigurationSectionUpdateEmitter.fire({section:r,configuration:n})})}updateSectionConfiguration(e,r){this.settings[e]=r}async getConfiguration(e,r){await this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},s(xs,"DefaultConfigurationProvider"),xs),zc=jh(QN()),Dn;(function(t){function e(r){return{dispose:s(async()=>await r(),"dispose")}}s(e,"create"),t.create=e})(Dn||(Dn={}));var Fs,UI=(Fs=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Lr,this.documentPhaseListeners=new Lr,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Z.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},n=Ae.CancellationToken.None){var a;for(const i of e){const o=i.uri.toString();if(i.state===Z.Validated){if(typeof r.validation=="boolean"&&r.validation)this.resetToState(i,Z.IndexedReferences);else if(typeof r.validation=="object"){const c=this.findMissingValidationCategories(i,r);c.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:{categories:c}},result:(a=this.buildState.get(o))==null?void 0:a.result}),i.state=Z.IndexedReferences)}}else this.buildState.delete(o)}this.currentState=Z.Changed,await this.emitUpdate(e.map(i=>i.uri),[]),await this.buildDocuments(e,r,n)}async update(e,r,n=Ae.CancellationToken.None){this.currentState=Z.Changed;const a=[];for(const l of r){const u=this.langiumDocuments.deleteDocuments(l);for(const f of u)a.push(f.uri),this.cleanUpDeleted(f)}const i=(await Promise.all(e.map(l=>this.findChangedUris(l)))).flat();for(const l of i){let u=this.langiumDocuments.getDocument(l);u===void 0&&(u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},l),u.state=Z.Changed,this.langiumDocuments.addDocument(u)),this.resetToState(u,Z.Changed)}const o=ue(i).concat(a).map(l=>l.toString()).toSet();this.langiumDocuments.all.filter(l=>!o.has(l.uri.toString())&&this.shouldRelink(l,o)).forEach(l=>this.resetToState(l,Z.ComputedScopes)),await this.emitUpdate(i,a),await Ye(n);const c=this.sortDocuments(this.langiumDocuments.all.filter(l=>{var u;return l.state=1}findMissingValidationCategories(e,r){var c,l;const n=this.buildState.get(e.uri.toString()),a=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=(c=n==null?void 0:n.result)!=null&&c.validationChecks?new Set((l=n==null?void 0:n.result)==null?void 0:l.validationChecks):n!=null&&n.completed?a:new Set,o=r===void 0||r.validation===!0?a:typeof r.validation=="object"?r.validation.categories??a:[];return ue(o).filter(u=>!i.has(u)).toArray()}async findChangedUris(e){var n;if(this.langiumDocuments.getDocument(e)??((n=this.textDocuments)==null?void 0:n.get(e)))return[e];try{const a=await this.fileSystemProvider.stat(e);if(a.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(a))return[e]}catch{}return[]}async emitUpdate(e,r){await Promise.all(this.updateListeners.map(n=>n(e,r)))}sortDocuments(e){let r=0,n=e.length-1;for(;r=0&&!this.hasTextDocument(e[n]);)n--;rn.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),Dn.create(()=>{const r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1)})}resetToState(e,r){switch(r){case Z.Changed:case Z.Parsed:this.indexManager.removeContent(e.uri);case Z.IndexedContent:e.localSymbols=void 0;case Z.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Z.Linked:this.indexManager.removeReferences(e.uri);case Z.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Z.Validated:}e.state>r&&(e.state=r)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Z.Changed}async buildDocuments(e,r,n){this.prepareBuild(e,r),await this.runCancelable(e,Z.Parsed,n,o=>this.langiumDocumentFactory.update(o,n)),await this.runCancelable(e,Z.IndexedContent,n,o=>this.indexManager.updateContent(o,n)),await this.runCancelable(e,Z.ComputedScopes,n,async o=>{const c=this.serviceRegistry.getServices(o.uri).references.ScopeComputation;o.localSymbols=await c.collectLocalSymbols(o,n)});const a=e.filter(o=>this.shouldLink(o));await this.runCancelable(a,Z.Linked,n,o=>this.serviceRegistry.getServices(o.uri).references.Linker.link(o,n)),await this.runCancelable(a,Z.IndexedReferences,n,o=>this.indexManager.updateReferences(o,n));const i=e.filter(o=>this.shouldValidate(o)?!0:(this.markAsCompleted(o),!1));await this.runCancelable(i,Z.Validated,n,async o=>{await this.validate(o,n),this.markAsCompleted(o)})}markAsCompleted(e){const r=this.buildState.get(e.uri.toString());r&&(r.completed=!0)}prepareBuild(e,r){for(const n of e){const a=n.uri.toString(),i=this.buildState.get(a);(!i||i.completed)&&this.buildState.set(a,{completed:!1,options:r,result:i==null?void 0:i.result})}}async runCancelable(e,r,n,a){for(const o of e)o.stateo.state===r);await this.notifyBuildPhase(i,r,n),this.currentState=r}onBuildPhase(e,r){return this.buildPhaseListeners.add(e,r),Dn.create(()=>{this.buildPhaseListeners.delete(e,r)})}onDocumentPhase(e,r){return this.documentPhaseListeners.add(e,r),Dn.create(()=>{this.documentPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let a;return r&&"path"in r?a=r:n=r,n??(n=Ae.CancellationToken.None),a?this.awaitDocumentState(e,a,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,r,n){const a=this.langiumDocuments.getDocument(r);if(a){if(a.state>=e)return Promise.resolve(r);if(n.isCancellationRequested)return Promise.reject(or);if(this.currentState>=e&&e>a.state)return Promise.reject(new zc.ResponseError(zc.LSPErrorCodes.RequestFailed,`Document state of ${r.toString()} is ${Z[a.state]}, requiring ${Z[e]}, but workspace state is already ${Z[this.currentState]}. Returning undefined.`))}else return Promise.reject(new zc.ResponseError(zc.LSPErrorCodes.ServerCancelled,`No document found for URI: ${r.toString()}`));return new Promise((i,o)=>{const c=this.onDocumentPhase(e,u=>{it.equals(u.uri,r)&&(c.dispose(),l.dispose(),i(u.uri))}),l=n.onCancellationRequested(()=>{c.dispose(),l.dispose(),o(or)})})}awaitBuilderState(e,r){return this.currentState>=e?Promise.resolve():r.isCancellationRequested?Promise.reject(or):new Promise((n,a)=>{const i=this.onBuildPhase(e,()=>{i.dispose(),o.dispose(),n()}),o=r.onCancellationRequested(()=>{i.dispose(),o.dispose(),a(or)})})}async notifyDocumentPhase(e,r,n){const i=this.documentPhaseListeners.get(r).slice();for(const o of i)try{await Ye(n),await o(e,n)}catch(c){if(!la(c))throw c}}async notifyBuildPhase(e,r,n){if(e.length===0)return;const i=this.buildPhaseListeners.get(r).slice();for(const o of i)await Ye(n),await o(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,r){const n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,a=this.getBuildOptions(e),i=typeof a.validation=="object"?{...a.validation}:{};i.categories=this.findMissingValidationCategories(e,a);const o=await n.validateDocument(e,i,r);e.diagnostics?e.diagnostics.push(...o):e.diagnostics=o;const c=this.buildState.get(e.uri.toString());c&&(c.result??(c.result={}),c.result.validationChecks?c.result.validationChecks=ue(c.result.validationChecks).concat(i.categories).distinct().toArray():c.result.validationChecks=[...i.categories])}getBuildOptions(e){var r;return((r=this.buildState.get(e.uri.toString()))==null?void 0:r.options)??{}}},s(Fs,"DefaultDocumentBuilder"),Fs),Gs,zI=(Gs=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new gd,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){const n=Bt(e).uri,a=[];return this.referenceIndex.forEach(i=>{i.forEach(o=>{it.equals(o.targetUri,n)&&o.targetPath===r&&a.push(o)})}),ue(a)}allElements(e,r){let n=ue(this.symbolIndex.keys());return r&&(n=n.filter(a=>!r||r.has(a))),n.map(a=>this.getFileDescriptions(a,e)).flat()}getFileDescriptions(e,r){return r?this.symbolByTypeIndex.get(e,r,()=>(this.symbolIndex.get(e)??[]).filter(i=>this.astReflection.isSubtype(i.type,r))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r)}removeReferences(e){const r=e.toString();this.referenceIndex.delete(r)}async updateContent(e,r=Ae.CancellationToken.None){const a=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,r),i=e.uri.toString();this.symbolIndex.set(i,a),this.symbolByTypeIndex.clear(i)}async updateReferences(e,r=Ae.CancellationToken.None){const a=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),a)}isAffected(e,r){const n=this.referenceIndex.get(e.uri.toString());return n?n.some(a=>!a.local&&r.has(a.targetUri.toString())):!1}},s(Gs,"DefaultIndexManager"),Gs),js,BI=(js=class{constructor(e){this.initialBuildOptions={},this._ready=new Or,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(r=>this.initializeWorkspace(this.folders??[],r))}async initializeWorkspace(e,r=Ae.CancellationToken.None){const n=await this.performStartup(e);await Ye(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(e){const r=[],n=s(o=>{r.push(o),this.langiumDocuments.hasDocument(o.uri)||this.langiumDocuments.addDocument(o)},"collector");await this.loadAdditionalDocuments(e,n);const a=[];await Promise.all(e.map(o=>this.getRootFolder(o)).map(async o=>this.traverseFolder(o,a)));const i=ue(a).distinct(o=>o.toString()).filter(o=>!this.langiumDocuments.hasDocument(o));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),r}async loadWorkspaceDocuments(e,r){await Promise.all(e.map(async n=>{const a=await this.langiumDocuments.getOrCreateDocument(n);r(a)}))}loadAdditionalDocuments(e,r){return Promise.resolve()}getRootFolder(e){return Rt.parse(e.uri)}async traverseFolder(e,r){try{const n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async a=>{this.shouldIncludeEntry(a)&&(a.isDirectory?await this.traverseFolder(a.uri,r):a.isFile&&r.push(a.uri))}))}catch(n){console.error("Failure to read directory content of "+e.toString(!0),n)}}async searchFolder(e){const r=[];return await this.traverseFolder(e,r),r}shouldIncludeEntry(e){const r=it.basename(e.uri);return r.startsWith(".")?!1:e.isDirectory?r!=="node_modules"&&r!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},s(js,"DefaultWorkspaceManager"),js),Us,KI=(Us=class{buildUnexpectedCharactersMessage(e,r,n,a,i){return rh.buildUnexpectedCharactersMessage(e,r,n,a,i)}buildUnableToPopLexerModeMessage(e){return rh.buildUnableToPopLexerModeMessage(e)}},s(Us,"DefaultLexerErrorMessageProvider"),Us),py={mode:"full"},zs,hy=(zs=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const r=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);const n=cf(r)?Object.values(r):r,a=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new st(n,{positionTracking:"full",skipValidations:a,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,r=py){var a,i;const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:(i=(a=this.tokenBuilder).flushLexingReport)==null?void 0:i.call(a,e)}}toTokenTypeDictionary(e){if(cf(e))return e;const r=Td(e)?Object.values(e.modes).flat():e,n={};return r.forEach(a=>n[a.name]=a),n}},s(zs,"DefaultLexer"),zs);function vd(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}s(vd,"isTokenTypeArray");function Td(t){return t&&"modes"in t&&"defaultMode"in t}s(Td,"isIMultiModeLexerDefinition");function cf(t){return!vd(t)&&!Td(t)}s(cf,"isTokenTypeDictionary");mc();function my(t,e,r){let n,a;typeof t=="string"?(a=e,n=r):(a=t.range.start,n=e),a||(a=ie.create(0,0));const i=yy(t),o=Rd(n),c=qI({lines:i,position:a,options:o});return HI({index:0,tokens:c,position:a})}s(my,"parseJSDoc");function gy(t,e){const r=Rd(e),n=yy(t);if(n.length===0)return!1;const a=n[0],i=n[n.length-1],o=r.start,c=r.end;return!!(o!=null&&o.exec(a))&&!!(c!=null&&c.exec(i))}s(gy,"isJSDoc");function yy(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(HT)}s(yy,"getLines");var Vv=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Rj=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function qI(t){var a,i,o;const e=[];let r=t.position.line,n=t.position.character;for(let c=0;c=f.length){if(e.length>0){const m=ie.create(r,n);e.push({type:"break",content:"",range:ee.create(m,m)})}}else{Vv.lastIndex=d;const m=Vv.exec(f);if(m){const g=m[0],v=m[1],E=ie.create(r,n+d),T=ie.create(r,n+d+g.length);e.push({type:"tag",content:v,range:ee.create(E,T)}),d+=g.length,d=uf(f,d)}if(d0&&e[e.length-1].type==="break"?e.slice(0,-1):e}s(qI,"tokenize");function WI(t,e,r,n){const a=[];if(t.length===0){const i=ie.create(r,n),o=ie.create(r,n+e.length);a.push({type:"text",content:e,range:ee.create(i,o)})}else{let i=0;for(const c of t){const l=c.index,u=e.substring(i,l);u.length>0&&a.push({type:"text",content:e.substring(i,l),range:ee.create(ie.create(r,i+n),ie.create(r,l+n))});let f=u.length+1;const d=c[1];if(a.push({type:"inline-tag",content:d,range:ee.create(ie.create(r,i+f+n),ie.create(r,i+f+d.length+n))}),f+=d.length,c.length===4){f+=c[2].length;const p=c[3];a.push({type:"text",content:p,range:ee.create(ie.create(r,i+f+n),ie.create(r,i+f+p.length+n))})}else a.push({type:"text",content:"",range:ee.create(ie.create(r,i+f+n),ie.create(r,i+f+n))});i=l+c[0].length}const o=e.substring(i);o.length>0&&a.push({type:"text",content:o,range:ee.create(ie.create(r,i+n),ie.create(r,i+n+o.length))})}return a}s(WI,"buildInlineTokens");var $j=/\S/,Aj=/\s*$/;function uf(t,e){const r=t.substring(e).match($j);return r?e+r.index:t.length}s(uf,"skipWhitespace");function VI(t){const e=t.match(Aj);if(e&&typeof e.index=="number")return e.index}s(VI,"lastCharacter");function HI(t){var i,o;const e=ie.create(t.position.line,t.position.character);if(t.tokens.length===0)return new Hv([],ee.create(e,e));const r=[];for(;t.indexr.name===e)}getTags(e){return this.getAllTags().filter(r=>r.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const r of this.elements)if(e.length===0)e=r.toString();else{const n=r.toString();e+=_h(e)+n}return e.trim()}toMarkdown(e){let r="";for(const n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{const a=n.toMarkdown(e);r+=_h(r)+a}return r.trim()}},s(Bs,"JSDocCommentImpl"),Bs),Ks,Nd=(Ks=class{constructor(e,r,n,a){this.name=e,this.content=r,this.inline=n,this.range=a}toString(){let e=`@${this.name}`;const r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e} +${r}`),this.inline?`{${e}}`:e}toMarkdown(e){var r;return((r=e==null?void 0:e.renderTag)==null?void 0:r.call(e,this))??this.toMarkdownDefault(e)}toMarkdownDefault(e){const r=this.content.toMarkdown(e);if(this.inline){const i=ZI(this.name,r,e??{});if(typeof i=="string")return i}let n="";(e==null?void 0:e.tag)==="italic"||(e==null?void 0:e.tag)===void 0?n="*":(e==null?void 0:e.tag)==="bold"?n="**":(e==null?void 0:e.tag)==="bold-italic"&&(n="***");let a=`${n}@${this.name}${n}`;return this.content.inlines.length===1?a=`${a} — ${r}`:this.content.inlines.length>1&&(a=`${a} +${r}`),this.inline?`{${a}}`:a}},s(Ks,"JSDocTagImpl"),Ks);function ZI(t,e,r){var n;if(t==="linkplain"||t==="linkcode"||t==="link"){const a=e.indexOf(" ");let i=e;if(a>0){const c=uf(e,a);i=e.substring(c),e=e.substring(0,a)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(i=`\`${i}\``),((n=r.renderLink)==null?void 0:n.call(r,e,i))??QI(e,i)}}s(ZI,"renderInlineTag");function QI(t,e){try{return Rt.parse(t,!0),`[${e}](${t})`}catch{return t}}s(QI,"renderLinkDefault");var qs,Eh=(qs=class{constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;rn.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let r="";for(let n=0;na.range.start.line&&(r+=` +`)}return r}},s(qs,"JSDocTextImpl"),qs),Ws,eN=(Ws=class{constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}},s(Ws,"JSDocLineImpl"),Ws);function _h(t){return t.endsWith(` +`)?` +`:` + +`}s(_h,"fillNewlines");var Vs,tN=(Vs=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const r=this.commentProvider.getComment(e);if(r&&gy(r))return my(r).toMarkdown({renderLink:s((a,i)=>this.documentationLinkRenderer(e,a,i),"renderLink"),renderTag:s(a=>this.documentationTagRenderer(e,a),"renderTag")})}documentationLinkRenderer(e,r,n){const a=this.findNameInLocalSymbols(e,r)??this.findNameInGlobalScope(e,r);if(a&&a.nameSegment){const i=a.nameSegment.range.start.line+1,o=a.nameSegment.range.start.character+1,c=a.documentUri.with({fragment:`L${i},${o}`});return`[${n}](${c.toString()})`}else return}documentationTagRenderer(e,r){}findNameInLocalSymbols(e,r){const a=Bt(e).localSymbols;if(!a)return;let i=e;do{const c=a.getStream(i).find(l=>l.name===r);if(c)return c;i=i.$container}while(i)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(a=>a.name===r)}},s(Vs,"JSDocDocumentationProvider"),Vs),Hs,rN=(Hs=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return uy(e)?e.$comment:(r=vm(e.$cstNode,this.grammarConfig().multilineCommentRules))==null?void 0:r.text}},s(Hs,"DefaultCommentProvider"),Hs),Ys,nN=(Ys=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,r){return Promise.resolve(this.syncParser.parse(e))}},s(Ys,"DefaultAsyncParser"),Ys),Xs,Ej=(Xs=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){const r=this.queue.shift();r&&(e.lock(),r.resolve(e))}}),this.workerPool.push(e)}}async parse(e,r){const n=await this.acquireParserWorker(r),a=new Or;let i;const o=r.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(c=>{const l=this.hydrator.hydrate(c);a.resolve(l)}).catch(c=>{a.reject(c)}).finally(()=>{o.dispose(),clearTimeout(i)}),a.promise}terminateWorker(e){e.terminate();const r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(e){this.initializeWorkers();for(const n of this.workerPool)if(n.ready)return n.lock(),n;const r=new Or;return e.onCancellationRequested(()=>{const n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(or)}),this.queue.push(r),r.promise}},s(Xs,"AbstractThreadedAsyncParser"),Xs),Js,_j=(Js=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,a){this.onReadyEmitter=new yd.Emitter,this.deferred=new Or,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=a,r(i=>{const o=i;this.deferred.resolve(o),this.unlock()}),n(i=>{this.deferred.reject(i),this.unlock()})}terminate(){this.deferred.reject(or),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Or,this.sendMessage(e),this.deferred.promise}},s(Js,"ParserWorker"),Js),Zs,aN=(Zs=class{constructor(){this.previousTokenSource=new Ae.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const r=hd();return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n=Ae.CancellationToken.None){const a=new Or,i={action:r,deferred:a,cancellationToken:n};return e.push(i),this.performNextOperation(),a.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:r,deferred:n,cancellationToken:a})=>{try{const i=await Promise.resolve().then(()=>r(a));n.resolve(i)}catch(i){la(i)?n.resolve(void 0):n.reject(i)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},s(Zs,"DefaultWorkspaceLock"),Zs),Qs,iN=(Qs=class{constructor(e){this.grammarElementIdMap=new of,this.tokenTypeIdMap=new of,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(r=>({...r,message:r.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const r=new Map,n=new Map;for(const a of Kt(e))r.set(a,{});if(e.$cstNode)for(const a of Oo(e.$cstNode))n.set(a,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,r){const n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(const[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Array.isArray(i)){const o=[];n[a]=o;for(const c of i)Be(c)?o.push(this.dehydrateAstNode(c,r)):at(c)?o.push(this.dehydrateReference(c,r)):o.push(c)}else Be(i)?n[a]=this.dehydrateAstNode(i,r):at(i)?n[a]=this.dehydrateReference(i,r):i!==void 0&&(n[a]=i);return n}dehydrateReference(e,r){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,r){const n=r.cstNodes.get(e);return hf(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),Cr(e)?n.content=e.content.map(a=>this.dehydrateCstNode(a,r)):Bn(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){const r=new Map,n=new Map;for(const i of Kt(e))r.set(i,{});let a;if(e.$cstNode)for(const i of Oo(e.$cstNode)){let o;"fullText"in i?(o=new Hg(i.fullText),a=o):"content"in i?o=new cd:"tokenType"in i&&(o=this.hydrateCstLeafNode(i)),o&&(n.set(i,o),o.root=a)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,r){const n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(const[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Array.isArray(i)){const o=[];n[a]=o;for(const c of i)Be(c)?o.push(this.setParent(this.hydrateAstNode(c,r),n)):at(c)?o.push(this.hydrateReference(c,n,a,r)):o.push(c)}else Be(i)?n[a]=this.setParent(this.hydrateAstNode(i,r),n):at(i)?n[a]=this.hydrateReference(i,n,a,r):i!==void 0&&(n[a]=i);return n}setParent(e,r){return e.$container=r,e}hydrateReference(e,r,n,a){return this.linker.buildReference(r,n,a.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,r,n=0){const a=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(a.grammarSource=this.getGrammarElement(e.grammarSource)),a.astNode=r.astNodes.get(e.astNode),Cr(a))for(const i of e.content){const o=this.hydrateCstNode(i,r,n++);a.content.push(o)}return a}hydrateCstLeafNode(e){const r=this.getTokenType(e.tokenType),n=e.offset,a=e.length,i=e.startLine,o=e.startColumn,c=e.endLine,l=e.endColumn,u=e.hidden;return new tf(n,a,{start:{line:i,character:o},end:{line:c,character:l}},r,u)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const r of Kt(this.grammar))mf(r)&&this.grammarElementIdMap.set(r,e++)}},s(Qs,"DefaultHydrator"),Qs);function St(t){return{documentation:{CommentProvider:s(e=>new rN(e),"CommentProvider"),DocumentationProvider:s(e=>new tN(e),"DocumentationProvider")},parser:{AsyncParser:s(e=>new nN(e),"AsyncParser"),GrammarConfig:s(e=>zm(e),"GrammarConfig"),LangiumParser:s(e=>ey(e),"LangiumParser"),CompletionParser:s(e=>Qg(e),"CompletionParser"),ValueConverter:s(()=>new ry,"ValueConverter"),TokenBuilder:s(()=>new dd,"TokenBuilder"),Lexer:s(e=>new hy(e),"Lexer"),ParserErrorMessageProvider:s(()=>new Xg,"ParserErrorMessageProvider"),LexerErrorMessageProvider:s(()=>new KI,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:s(()=>new GI,"AstNodeLocator"),AstNodeDescriptionProvider:s(e=>new xI(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:s(e=>new FI(e),"ReferenceDescriptionProvider")},references:{Linker:s(e=>new CI(e),"Linker"),NameProvider:s(()=>new SI,"NameProvider"),ScopeProvider:s(e=>new kI(e),"ScopeProvider"),ScopeComputation:s(e=>new wI(e),"ScopeComputation"),References:s(e=>new bI(e),"References")},serializer:{Hydrator:s(e=>new iN(e),"Hydrator"),JsonSerializer:s(e=>new PI(e),"JsonSerializer")},validation:{DocumentValidator:s(e=>new MI(e),"DocumentValidator"),ValidationRegistry:s(e=>new LI(e),"ValidationRegistry")},shared:s(()=>t.shared,"shared")}}s(St,"createDefaultCoreModule");function bt(t){return{ServiceRegistry:s(e=>new OI(e),"ServiceRegistry"),workspace:{LangiumDocuments:s(e=>new _I(e),"LangiumDocuments"),LangiumDocumentFactory:s(e=>new EI(e),"LangiumDocumentFactory"),DocumentBuilder:s(e=>new UI(e),"DocumentBuilder"),IndexManager:s(e=>new zI(e),"IndexManager"),WorkspaceManager:s(e=>new BI(e),"WorkspaceManager"),FileSystemProvider:s(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:s(()=>new aN,"WorkspaceLock"),ConfigurationProvider:s(e=>new jI(e),"ConfigurationProvider")},profilers:{}}}s(bt,"createDefaultSharedCoreModule");var Ch;(function(t){t.merge=(e,r)=>Go(Go({},e),r)})(Ch||(Ch={}));function Pe(t,e,r,n,a,i,o,c,l){const u=[t,e,r,n,a,i,o,c,l].reduce(Go,{});return Ay(u)}s(Pe,"inject");var sN=Symbol("isProxy");function $y(t){if(t&&t[sN])for(const e of Object.values(t))$y(e);return t}s($y,"eagerLoad");function Ay(t,e){const r=new Proxy({},{deleteProperty:s(()=>!1,"deleteProperty"),set:s(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:s((n,a)=>a===sN?!0:Sh(n,a,t,e||r),"get"),getOwnPropertyDescriptor:s((n,a)=>(Sh(n,a,t,e||r),Object.getOwnPropertyDescriptor(n,a)),"getOwnPropertyDescriptor"),has:s((n,a)=>a in t,"has"),ownKeys:s(()=>[...Object.getOwnPropertyNames(t)],"ownKeys")});return r}s(Ay,"_inject");var Yv=Symbol();function Sh(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+t[e]);if(t[e]===Yv)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in r){const a=r[e];t[e]=Yv;try{t[e]=typeof a=="function"?a(n):Ay(a,n)}catch(i){throw t[e]=i instanceof Error?i:void 0,i}return t[e]}else return}s(Sh,"_resolve");function Go(t,e){if(e){for(const[r,n]of Object.entries(e))if(n!=null)if(typeof n=="object"){const a=t[r];typeof a=="object"&&a!==null?t[r]=Go(a,n):t[r]=Go({},n)}else t[r]=n}return t}s(Go,"_merge");var bh={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},On;(function(t){t.REGULAR="indentation-sensitive",t.IGNORE_INDENTATION="ignore-indentation"})(On||(On={}));var eo,oN=(eo=class extends dd{constructor(e=bh){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...bh,...e},this.indentTokenType=Ua({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Ua({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,r){const n=super.buildTokens(e,r);if(!vd(n))throw new Error("Invalid tokens built by default builder");const{indentTokenName:a,dedentTokenName:i,whitespaceTokenName:o,ignoreIndentationDelimiters:c}=this.options;let l,u,f;const d=[];for(const p of n){for(const[m,g]of c)p.name===m?p.PUSH_MODE=On.IGNORE_INDENTATION:p.name===g&&(p.POP_MODE=!0);p.name===i?l=p:p.name===a?u=p:p.name===o?f=p:d.push(p)}if(!l||!u||!f)throw new Error("Some indentation/whitespace tokens not found!");return c.length>0?{modes:{[On.REGULAR]:[l,u,...d,f],[On.IGNORE_INDENTATION]:[...d,f]},defaultMode:On.REGULAR}:[l,u,f,...d]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,r){return r===0||`\r +`.includes(e[r-1])}matchWhitespace(e,r,n,a){this.whitespaceRegExp.lastIndex=r;const i=this.whitespaceRegExp.exec(e);return{currIndentLevel:(i==null?void 0:i[0].length)??0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(e,r,n,a){const i=this.getLineNumber(r,a);return kc(e,n,a,a+n.length,i,i,1,n.length)}getLineNumber(e,r){return e.substring(0,r).split(/\r\n|\r|\n/).length}indentMatcher(e,r,n,a){if(!this.isStartOfLine(e,r))return null;const{currIndentLevel:i,prevIndentLevel:o,match:c}=this.matchWhitespace(e,r,n,a);return i<=o?null:(this.indentationStack.push(i),c)}dedentMatcher(e,r,n,a){var d,p;if(!this.isStartOfLine(e,r))return null;const{currIndentLevel:i,prevIndentLevel:o,match:c}=this.matchWhitespace(e,r,n,a);if(i>=o)return null;const l=this.indentationStack.lastIndexOf(i);if(l===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${i} at offset: ${r}. Current indentation stack: ${this.indentationStack}`,offset:r,length:((d=c==null?void 0:c[0])==null?void 0:d.length)??0,line:this.getLineNumber(e,r),column:1}),null;const u=this.indentationStack.length-l-1,f=((p=e.substring(0,r).match(/[\r\n]+$/))==null?void 0:p[0].length)??1;for(let m=0;m1;)r.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],r}},s(eo,"IndentationAwareTokenBuilder"),eo),to,Cj=(to=class extends hy{constructor(e){if(super(e),e.parser.TokenBuilder instanceof oN)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,r=py){const n=super.tokenize(e),a=n.report;(r==null?void 0:r.mode)==="full"&&n.tokens.push(...a.remainingDedents),a.remainingDedents=[];const{indentTokenType:i,dedentTokenType:o}=this.indentationTokenBuilder,c=i.tokenTypeIdx,l=o.tokenTypeIdx,u=[],f=n.tokens.length-1;for(let d=0;d=0&&u.push(n.tokens[f]),n.tokens=u,n}},s(to,"IndentationAwareLexer"),to),Ey={};Qr(Ey,{AstUtils:()=>Wh,BiMap:()=>of,Cancellation:()=>Ae,ContextCache:()=>gd,CstUtils:()=>Bh,DONE_RESULT:()=>nt,Deferred:()=>Or,Disposable:()=>Dn,DisposableCache:()=>md,DocumentCache:()=>NI,EMPTY_STREAM:()=>wo,ErrorWithLocation:()=>Af,GrammarUtils:()=>Am,MultiMap:()=>Lr,OperationCancelled:()=>or,Reduction:()=>Zl,RegExpUtils:()=>_m,SimpleCache:()=>ly,StreamImpl:()=>sr,TreeStreamImpl:()=>Io,URI:()=>Rt,UriTrie:()=>sy,UriUtils:()=>it,WorkspaceCache:()=>cy,assertCondition:()=>Em,assertUnreachable:()=>en,delayNextTick:()=>pd,interruptAndCheck:()=>Ye,isOperationCancelled:()=>la,loadGrammarFromJson:()=>wt,setInterruptionPeriod:()=>ny,startCancelableOperation:()=>hd,stream:()=>ue});ff(Ey,yd);var ro,lN=(ro=class{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},s(ro,"EmptyFileSystemProvider"),ro),Gt={fileSystemProvider:s(()=>new lN,"fileSystemProvider")},Sj={Grammar:s(()=>{},"Grammar"),LanguageMetaData:s(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},bj={AstReflection:s(()=>new pm,"AstReflection")};function cN(){const t=Pe(bt(Gt),bj),e=Pe(St({shared:t}),Sj);return t.ServiceRegistry.register(e),e}s(cN,"createMinimalGrammarServices");function wt(t){const e=cN(),r=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(r,Rt.parse(`memory:/${r.name??"grammar"}.langium`)),r}s(wt,"loadGrammarFromJson");ff(TT,Ey);var no,wj=(no=class{constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new Lr}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(r=>this.activeCategories.add(r)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(r=>this.activeCategories.delete(r)):this.activeCategories.clear()}createTask(e,r){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${r}'.`),new uN(n=>this.records.add(e,this.dumpRecord(e,n)),r)}dumpRecord(e,r){console.info(`Task ${e}.${r.identifier} executed in ${r.duration.toFixed(2)}ms and ended at ${r.date.toISOString()}`);const n=[];for(const o of r.entries.keys()){const c=r.entries.get(o),l=c.reduce((u,f)=>u+f);n.push({name:`${r.identifier}.${o}`,count:c.length,duration:l})}const a=r.duration-n.map(o=>o.duration).reduce((o,c)=>o+c,0);n.push({name:r.identifier,count:1,duration:a}),n.sort((o,c)=>c.duration-o.duration);function i(o){return Math.round(100*o)/100}return s(i,"Round"),console.table(n.map(o=>({Element:o.name,Count:o.count,"Self %":i(100*o.duration/r.duration),"Time (ms)":i(o.duration)}))),r}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(r=>e.some(n=>n===r[0])).flatMap(r=>r[1])}},s(no,"DefaultLangiumProfiler"),no),ao,uN=(ao=class{constructor(e,r){this.stack=[],this.entries=new Lr,this.addRecord=e,this.identifier=r}start(){if(this.startTime!==void 0)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw new Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(r=>r.id).join(", ")}.`);const e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){const r=this.stack.pop();if(!r)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(r.id!==e)throw new Error(`Sub-Task "${r.id}" is not already stopped.`);const n=performance.now()-r.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=n);const a=n-r.content;this.entries.add(e,a)}},s(ao,"ProfilingTask"),ao),wh;(t=>{t.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(wh||(wh={}));var Ih;(t=>{t.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(Ih||(Ih={}));var Nh;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(Nh||(Nh={}));var kh;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(kh||(kh={}));var Ph;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Ph||(Ph={}));var Oh;(t=>{t.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Oh||(Oh={}));var Lh;(t=>{t.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Lh||(Lh={}));var Dh;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(Dh||(Dh={}));var Mh;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/}})(Mh||(Mh={}));var xh;(t=>{t.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(xh||(xh={}));({...wh.Terminals,...Ih.Terminals,...Nh.Terminals,...kh.Terminals,...Ph.Terminals,...Oh.Terminals,...Lh.Terminals,...Mh.Terminals,...Dh.Terminals,...xh.Terminals});var Bc={$type:"Accelerator",name:"name",x:"x",y:"y"},Kc={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},vl={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},kd={$type:"Annotations",x:"x",y:"y"},Rr={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function Ij(t){return It.isInstance(t,Rr.$type)}s(Ij,"isArchitecture");var qc={$type:"Axis",label:"label",name:"name"},$u={$type:"Branch",name:"name",order:"order"};function Nj(t){return It.isInstance(t,$u.$type)}s(Nj,"isBranch");var Xv={$type:"Checkout",branch:"branch"},Wc={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},Pd={$type:"ClassDefStatement",className:"className",styleText:"styleText"},Sa={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function kj(t){return It.isInstance(t,Sa.$type)}s(kj,"isCommit");var Vc={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},sn={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},Hc={$type:"Curve",entries:"entries",label:"label",name:"name"},Yc={$type:"Deaccelerator",name:"name",x:"x",y:"y"},Jv={$type:"Decorator",strategy:"strategy"},ga={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},tr={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},ya={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},on={$type:"EmFrame"},Tl={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},Zv={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},Od={$type:"EmModelEntity",name:"name"};function Pj(t){return t==="rmo"||t==="readmodel"||t==="ui"||t==="cmd"||t==="command"||t==="evt"||t==="event"||t==="pcr"||t==="processor"}s(Pj,"isEmModelEntityType");var Xc={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},$r={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};function Oj(t){return It.isInstance(t,$r.$type)}s(Oj,"isEmResetFrame");var Ur={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},Ld={$type:"Entry",axis:"axis",value:"value"},vr={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},Qv={$type:"Evolution",stages:"stages"},Jc={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},Dd={$type:"Evolve",component:"component",target:"target"},gn={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function Lj(t){return It.isInstance(t,gn.$type)}s(Lj,"isGitGraph");var Rl={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},Dl={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function Dj(t){return It.isInstance(t,Dl.$type)}s(Dj,"isInfo");var $l={$type:"Item",classSelector:"classSelector",name:"name"},Md={$type:"Junction",id:"id",in:"in"},Al={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},Zc={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},ln={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},ba={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function Mj(t){return It.isInstance(t,ba.$type)}s(Mj,"isMerge");var Qc={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},xd={$type:"Option",name:"name",value:"value"},wa={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function xj(t){return It.isInstance(t,wa.$type)}s(xj,"isPacket");var Ia={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function Fj(t){return It.isInstance(t,Ia.$type)}s(Fj,"isPacketBlock");var yn={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function Gj(t){return It.isInstance(t,yn.$type)}s(Gj,"isPie");var Au={$type:"PieSection",label:"label",value:"value"};function jj(t){return It.isInstance(t,Au.$type)}s(jj,"isPieSection");var Fd={$type:"Pipeline",components:"components",parent:"parent"},eu={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},cn={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},Gd={$type:"Section",classSelector:"classSelector",name:"name"},va={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},jd={$type:"Size",height:"height",width:"width"},Ta={$type:"Statement"},Na={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function Uj(t){return It.isInstance(t,Na.$type)}s(Uj,"isTreemap");var Ud={$type:"TreemapRow",indent:"indent",item:"item"},zd={$type:"TreeNode",indent:"indent",name:"name"},El={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},Je={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"};function zj(t){return It.isInstance(t,Je.$type)}s(zj,"isWardley");var io,fN=(io=class extends qh{constructor(){super(...arguments),this.types={Accelerator:{name:Bc.$type,properties:{name:{name:Bc.name},x:{name:Bc.x},y:{name:Bc.y}},superTypes:[]},Anchor:{name:Kc.$type,properties:{evolution:{name:Kc.evolution},name:{name:Kc.name},visibility:{name:Kc.visibility}},superTypes:[]},Annotation:{name:vl.$type,properties:{number:{name:vl.number},text:{name:vl.text},x:{name:vl.x},y:{name:vl.y}},superTypes:[]},Annotations:{name:kd.$type,properties:{x:{name:kd.x},y:{name:kd.y}},superTypes:[]},Architecture:{name:Rr.$type,properties:{accDescr:{name:Rr.accDescr},accTitle:{name:Rr.accTitle},edges:{name:Rr.edges,defaultValue:[]},groups:{name:Rr.groups,defaultValue:[]},junctions:{name:Rr.junctions,defaultValue:[]},services:{name:Rr.services,defaultValue:[]},title:{name:Rr.title}},superTypes:[]},Axis:{name:qc.$type,properties:{label:{name:qc.label},name:{name:qc.name}},superTypes:[]},Branch:{name:$u.$type,properties:{name:{name:$u.name},order:{name:$u.order}},superTypes:[Ta.$type]},Checkout:{name:Xv.$type,properties:{branch:{name:Xv.branch}},superTypes:[Ta.$type]},CherryPicking:{name:Wc.$type,properties:{id:{name:Wc.id},parent:{name:Wc.parent},tags:{name:Wc.tags,defaultValue:[]}},superTypes:[Ta.$type]},ClassDefStatement:{name:Pd.$type,properties:{className:{name:Pd.className},styleText:{name:Pd.styleText}},superTypes:[]},Commit:{name:Sa.$type,properties:{id:{name:Sa.id},message:{name:Sa.message},tags:{name:Sa.tags,defaultValue:[]},type:{name:Sa.type}},superTypes:[Ta.$type]},Common:{name:Vc.$type,properties:{accDescr:{name:Vc.accDescr},accTitle:{name:Vc.accTitle},title:{name:Vc.title}},superTypes:[]},Component:{name:sn.$type,properties:{decorator:{name:sn.decorator},evolution:{name:sn.evolution},inertia:{name:sn.inertia,defaultValue:!1},label:{name:sn.label},name:{name:sn.name},visibility:{name:sn.visibility}},superTypes:[]},Curve:{name:Hc.$type,properties:{entries:{name:Hc.entries,defaultValue:[]},label:{name:Hc.label},name:{name:Hc.name}},superTypes:[]},Deaccelerator:{name:Yc.$type,properties:{name:{name:Yc.name},x:{name:Yc.x},y:{name:Yc.y}},superTypes:[]},Decorator:{name:Jv.$type,properties:{strategy:{name:Jv.strategy}},superTypes:[]},Direction:{name:ga.$type,properties:{accDescr:{name:ga.accDescr},accTitle:{name:ga.accTitle},dir:{name:ga.dir},statements:{name:ga.statements,defaultValue:[]},title:{name:ga.title}},superTypes:[gn.$type]},Edge:{name:tr.$type,properties:{lhsDir:{name:tr.lhsDir},lhsGroup:{name:tr.lhsGroup,defaultValue:!1},lhsId:{name:tr.lhsId},lhsInto:{name:tr.lhsInto,defaultValue:!1},rhsDir:{name:tr.rhsDir},rhsGroup:{name:tr.rhsGroup,defaultValue:!1},rhsId:{name:tr.rhsId},rhsInto:{name:tr.rhsInto,defaultValue:!1},title:{name:tr.title}},superTypes:[]},EmDataEntity:{name:ya.$type,properties:{dataBlockValue:{name:ya.dataBlockValue},dataType:{name:ya.dataType},name:{name:ya.name}},superTypes:[]},EmFrame:{name:on.$type,properties:{},superTypes:[]},EmGwt:{name:Tl.$type,properties:{givenStatements:{name:Tl.givenStatements,defaultValue:[]},sourceFrame:{name:Tl.sourceFrame,referenceType:on.$type},thenStatements:{name:Tl.thenStatements,defaultValue:[]},whenStatements:{name:Tl.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:Zv.$type,properties:{entityIdentifier:{name:Zv.entityIdentifier,referenceType:Od.$type}},superTypes:[]},EmModelEntity:{name:Od.$type,properties:{name:{name:Od.name}},superTypes:[]},EmNoteEntity:{name:Xc.$type,properties:{dataBlockValue:{name:Xc.dataBlockValue},dataType:{name:Xc.dataType},sourceFrame:{name:Xc.sourceFrame,referenceType:on.$type}},superTypes:[]},EmResetFrame:{name:$r.$type,properties:{dataInlineValue:{name:$r.dataInlineValue},dataReference:{name:$r.dataReference,referenceType:ya.$type},dataType:{name:$r.dataType},entityIdentifier:{name:$r.entityIdentifier},modelEntityType:{name:$r.modelEntityType},name:{name:$r.name},sourceFrames:{name:$r.sourceFrames,defaultValue:[],referenceType:on.$type}},superTypes:[on.$type]},EmTimeFrame:{name:Ur.$type,properties:{dataInlineValue:{name:Ur.dataInlineValue},dataReference:{name:Ur.dataReference,referenceType:ya.$type},dataType:{name:Ur.dataType},entityIdentifier:{name:Ur.entityIdentifier},modelEntityType:{name:Ur.modelEntityType},name:{name:Ur.name},sourceFrames:{name:Ur.sourceFrames,defaultValue:[],referenceType:on.$type}},superTypes:[on.$type]},Entry:{name:Ld.$type,properties:{axis:{name:Ld.axis,referenceType:qc.$type},value:{name:Ld.value}},superTypes:[]},EventModel:{name:vr.$type,properties:{accDescr:{name:vr.accDescr},accTitle:{name:vr.accTitle},dataEntities:{name:vr.dataEntities,defaultValue:[]},frames:{name:vr.frames,defaultValue:[]},gwtEntities:{name:vr.gwtEntities,defaultValue:[]},modelEntities:{name:vr.modelEntities,defaultValue:[]},noteEntities:{name:vr.noteEntities,defaultValue:[]},title:{name:vr.title}},superTypes:[]},Evolution:{name:Qv.$type,properties:{stages:{name:Qv.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:Jc.$type,properties:{boundary:{name:Jc.boundary},name:{name:Jc.name},secondName:{name:Jc.secondName}},superTypes:[]},Evolve:{name:Dd.$type,properties:{component:{name:Dd.component},target:{name:Dd.target}},superTypes:[]},GitGraph:{name:gn.$type,properties:{accDescr:{name:gn.accDescr},accTitle:{name:gn.accTitle},statements:{name:gn.statements,defaultValue:[]},title:{name:gn.title}},superTypes:[]},Group:{name:Rl.$type,properties:{icon:{name:Rl.icon},id:{name:Rl.id},in:{name:Rl.in},title:{name:Rl.title}},superTypes:[]},Info:{name:Dl.$type,properties:{accDescr:{name:Dl.accDescr},accTitle:{name:Dl.accTitle},title:{name:Dl.title}},superTypes:[]},Item:{name:$l.$type,properties:{classSelector:{name:$l.classSelector},name:{name:$l.name}},superTypes:[]},Junction:{name:Md.$type,properties:{id:{name:Md.id},in:{name:Md.in}},superTypes:[]},Label:{name:Al.$type,properties:{negX:{name:Al.negX,defaultValue:!1},negY:{name:Al.negY,defaultValue:!1},offsetX:{name:Al.offsetX},offsetY:{name:Al.offsetY}},superTypes:[]},Leaf:{name:Zc.$type,properties:{classSelector:{name:Zc.classSelector},name:{name:Zc.name},value:{name:Zc.value}},superTypes:[$l.$type]},Link:{name:ln.$type,properties:{arrow:{name:ln.arrow},from:{name:ln.from},fromPort:{name:ln.fromPort},linkLabel:{name:ln.linkLabel},to:{name:ln.to},toPort:{name:ln.toPort}},superTypes:[]},Merge:{name:ba.$type,properties:{branch:{name:ba.branch},id:{name:ba.id},tags:{name:ba.tags,defaultValue:[]},type:{name:ba.type}},superTypes:[Ta.$type]},Note:{name:Qc.$type,properties:{evolution:{name:Qc.evolution},text:{name:Qc.text},visibility:{name:Qc.visibility}},superTypes:[]},Option:{name:xd.$type,properties:{name:{name:xd.name},value:{name:xd.value,defaultValue:!1}},superTypes:[]},Packet:{name:wa.$type,properties:{accDescr:{name:wa.accDescr},accTitle:{name:wa.accTitle},blocks:{name:wa.blocks,defaultValue:[]},title:{name:wa.title}},superTypes:[]},PacketBlock:{name:Ia.$type,properties:{bits:{name:Ia.bits},end:{name:Ia.end},label:{name:Ia.label},start:{name:Ia.start}},superTypes:[]},Pie:{name:yn.$type,properties:{accDescr:{name:yn.accDescr},accTitle:{name:yn.accTitle},sections:{name:yn.sections,defaultValue:[]},showData:{name:yn.showData,defaultValue:!1},title:{name:yn.title}},superTypes:[]},PieSection:{name:Au.$type,properties:{label:{name:Au.label},value:{name:Au.value}},superTypes:[]},Pipeline:{name:Fd.$type,properties:{components:{name:Fd.components,defaultValue:[]},parent:{name:Fd.parent}},superTypes:[]},PipelineComponent:{name:eu.$type,properties:{evolution:{name:eu.evolution},label:{name:eu.label},name:{name:eu.name}},superTypes:[]},Radar:{name:cn.$type,properties:{accDescr:{name:cn.accDescr},accTitle:{name:cn.accTitle},axes:{name:cn.axes,defaultValue:[]},curves:{name:cn.curves,defaultValue:[]},options:{name:cn.options,defaultValue:[]},title:{name:cn.title}},superTypes:[]},Section:{name:Gd.$type,properties:{classSelector:{name:Gd.classSelector},name:{name:Gd.name}},superTypes:[$l.$type]},Service:{name:va.$type,properties:{icon:{name:va.icon},iconText:{name:va.iconText},id:{name:va.id},in:{name:va.in},title:{name:va.title}},superTypes:[]},Size:{name:jd.$type,properties:{height:{name:jd.height},width:{name:jd.width}},superTypes:[]},Statement:{name:Ta.$type,properties:{},superTypes:[]},TreeNode:{name:zd.$type,properties:{indent:{name:zd.indent},name:{name:zd.name}},superTypes:[]},TreeView:{name:El.$type,properties:{accDescr:{name:El.accDescr},accTitle:{name:El.accTitle},nodes:{name:El.nodes,defaultValue:[]},title:{name:El.title}},superTypes:[]},Treemap:{name:Na.$type,properties:{accDescr:{name:Na.accDescr},accTitle:{name:Na.accTitle},title:{name:Na.title},TreemapRows:{name:Na.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Ud.$type,properties:{indent:{name:Ud.indent},item:{name:Ud.item}},superTypes:[]},Wardley:{name:Je.$type,properties:{accDescr:{name:Je.accDescr},accelerators:{name:Je.accelerators,defaultValue:[]},accTitle:{name:Je.accTitle},anchors:{name:Je.anchors,defaultValue:[]},annotation:{name:Je.annotation,defaultValue:[]},annotations:{name:Je.annotations,defaultValue:[]},components:{name:Je.components,defaultValue:[]},deaccelerators:{name:Je.deaccelerators,defaultValue:[]},evolution:{name:Je.evolution},evolves:{name:Je.evolves,defaultValue:[]},links:{name:Je.links,defaultValue:[]},notes:{name:Je.notes,defaultValue:[]},pipelines:{name:Je.pipelines,defaultValue:[]},size:{name:Je.size},title:{name:Je.title}},superTypes:[]}}}},s(io,"MermaidAstReflection"),io),It=new fN,eT,Bj=s(()=>eT??(eT=wt(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),tT,Kj=s(()=>tT??(tT=wt('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),"EventModelingGrammar"),rT,qj=s(()=>rT??(rT=wt(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"GitGraphGrammarGrammar"),nT,Wj=s(()=>nT??(nT=wt(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"InfoGrammarGrammar"),aT,Vj=s(()=>aT??(aT=wt(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PacketGrammarGrammar"),iT,Hj=s(()=>iT??(iT=wt(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PieGrammarGrammar"),sT,Yj=s(()=>sT??(sT=wt(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`)),"RadarGrammarGrammar"),oT,Xj=s(()=>oT??(oT=wt(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`)),"TreemapGrammarGrammar"),lT,Jj=s(()=>lT??(lT=wt(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`)),"TreeViewGrammarGrammar"),cT,Zj=s(()=>cT??(cT=wt(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"WardleyGrammarGrammar"),Qj={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},eU={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},tU={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},rU={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},nU={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},aU={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},iU={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},sU={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},oU={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},lU={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},mr={AstReflection:s(()=>new fN,"AstReflection")},cU={Grammar:s(()=>Bj(),"Grammar"),LanguageMetaData:s(()=>Qj,"LanguageMetaData"),parser:{}},uU={Grammar:s(()=>Kj(),"Grammar"),LanguageMetaData:s(()=>eU,"LanguageMetaData"),parser:{}},fU={Grammar:s(()=>qj(),"Grammar"),LanguageMetaData:s(()=>tU,"LanguageMetaData"),parser:{}},dU={Grammar:s(()=>Wj(),"Grammar"),LanguageMetaData:s(()=>rU,"LanguageMetaData"),parser:{}},pU={Grammar:s(()=>Vj(),"Grammar"),LanguageMetaData:s(()=>nU,"LanguageMetaData"),parser:{}},hU={Grammar:s(()=>Hj(),"Grammar"),LanguageMetaData:s(()=>aU,"LanguageMetaData"),parser:{}},mU={Grammar:s(()=>Yj(),"Grammar"),LanguageMetaData:s(()=>iU,"LanguageMetaData"),parser:{}},gU={Grammar:s(()=>Xj(),"Grammar"),LanguageMetaData:s(()=>sU,"LanguageMetaData"),parser:{}},yU={Grammar:s(()=>Jj(),"Grammar"),LanguageMetaData:s(()=>oU,"LanguageMetaData"),parser:{}},vU={Grammar:s(()=>Zj(),"Grammar"),LanguageMetaData:s(()=>lU,"LanguageMetaData"),parser:{}},TU=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,RU=/accTitle[\t ]*:([^\n\r]*)/,$U=/title([\t ][^\n\r]*|)/,AU={ACC_DESCR:TU,ACC_TITLE:RU,TITLE:$U},so,Xo=(so=class extends ry{runConverter(e,r,n){let a=this.runCommonConverter(e,r,n);return a===void 0&&(a=this.runCustomConverter(e,r,n)),a===void 0?super.runConverter(e,r,n):a}runCommonConverter(e,r,n){const a=AU[e.name];if(a===void 0)return;const i=a.exec(r);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},s(so,"AbstractMermaidValueConverter"),so),oo,Dc=(oo=class extends Xo{runCustomConverter(e,r,n){}},s(oo,"CommonValueConverter"),oo),lo,gr=(lo=class extends dd{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,r,n){const a=super.buildKeywordTokens(e,r,n);return a.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),a}},s(lo,"AbstractMermaidTokenBuilder"),lo),co;co=class extends gr{},s(co,"CommonTokenBuilder");/*! Bundled license information: + +lodash-es/lodash.js: + (** + * @license + * Lodash (Custom Build) + * Build: `lodash modularize exports="es" -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) +*/var uo,EU=(uo=class extends gr{constructor(){super(["radar-beta"])}},s(uo,"RadarTokenBuilder"),uo),_U={parser:{TokenBuilder:s(()=>new EU,"TokenBuilder"),ValueConverter:s(()=>new Dc,"ValueConverter")}};function CU(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),mU,_U);return e.ServiceRegistry.register(r),{shared:e,Radar:r}}s(CU,"createRadarServices");var fo,SU=(fo=class extends gr{constructor(){super(["treemap"])}},s(fo,"TreemapTokenBuilder"),fo),bU=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,po,wU=(po=class extends Xo{runCustomConverter(e,r,n){if(e.name==="NUMBER2")return parseFloat(r.replace(/,/g,""));if(e.name==="SEPARATOR")return r.substring(1,r.length-1);if(e.name==="STRING2")return r.substring(1,r.length-1);if(e.name==="INDENTATION")return r.length;if(e.name==="ClassDef"){if(typeof r!="string")return r;const a=bU.exec(r);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}},s(po,"TreemapValueConverter"),po);function dN(t){const e=t.validation.TreemapValidator,r=t.validation.ValidationRegistry;if(r){const n={Treemap:e.checkSingleRoot.bind(e)};r.register(n,e)}}s(dN,"registerValidationChecks");var ho,IU=(ho=class{checkSingleRoot(e,r){let n;for(const a of e.TreemapRows)a.item&&(n===void 0&&a.indent===void 0?n=0:a.indent===void 0?r("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}):n!==void 0&&n>=parseInt(a.indent,10)&&r("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},s(ho,"TreemapValidator"),ho),NU={parser:{TokenBuilder:s(()=>new SU,"TokenBuilder"),ValueConverter:s(()=>new wU,"ValueConverter")},validation:{TreemapValidator:s(()=>new IU,"TreemapValidator")}};function kU(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),gU,NU);return e.ServiceRegistry.register(r),dN(r),{shared:e,Treemap:r}}s(kU,"createTreemapServices");var mo,PU=(mo=class extends Xo{runCustomConverter(e,r,n){switch(e.name.toUpperCase()){case"LINK_LABEL":return r.substring(1).trim();default:return}}},s(mo,"WardleyValueConverter"),mo),OU={parser:{ValueConverter:s(()=>new PU,"ValueConverter")}};function LU(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),vU,OU);return e.ServiceRegistry.register(r),{shared:e,Wardley:r}}s(LU,"createWardleyServices");var go,DU=(go=class extends gr{constructor(){super(["gitGraph"])}},s(go,"GitGraphTokenBuilder"),go),MU={parser:{TokenBuilder:s(()=>new DU,"TokenBuilder"),ValueConverter:s(()=>new Dc,"ValueConverter")}};function xU(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),fU,MU);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}s(xU,"createGitGraphServices");var yo,FU=(yo=class extends gr{constructor(){super(["info","showInfo"])}},s(yo,"InfoTokenBuilder"),yo),GU={parser:{TokenBuilder:s(()=>new FU,"TokenBuilder"),ValueConverter:s(()=>new Dc,"ValueConverter")}};function jU(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),dU,GU);return e.ServiceRegistry.register(r),{shared:e,Info:r}}s(jU,"createInfoServices");var vo,UU=(vo=class extends gr{constructor(){super(["packet"])}},s(vo,"PacketTokenBuilder"),vo),zU={parser:{TokenBuilder:s(()=>new UU,"TokenBuilder"),ValueConverter:s(()=>new Dc,"ValueConverter")}};function BU(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),pU,zU);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}s(BU,"createPacketServices");var To,KU=(To=class extends gr{constructor(){super(["pie","showData"])}},s(To,"PieTokenBuilder"),To),Ro,qU=(Ro=class extends Xo{runCustomConverter(e,r,n){if(e.name==="PIE_SECTION_LABEL")return r.replace(/"/g,"").trim()}},s(Ro,"PieValueConverter"),Ro),WU={parser:{TokenBuilder:s(()=>new KU,"TokenBuilder"),ValueConverter:s(()=>new qU,"ValueConverter")}};function VU(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),hU,WU);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}s(VU,"createPieServices");var $o,HU=($o=class extends Xo{runCustomConverter(e,r,n){if(e.name==="INDENTATION")return(r==null?void 0:r.length)||0;if(e.name==="STRING2")return r.substring(1,r.length-1)}},s($o,"TreeViewValueConverter"),$o),Ao,YU=(Ao=class extends gr{constructor(){super(["treeView-beta"])}},s(Ao,"TreeViewTokenBuilder"),Ao),XU={parser:{TokenBuilder:s(()=>new YU,"TokenBuilder"),ValueConverter:s(()=>new HU,"ValueConverter")}};function JU(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),yU,XU);return e.ServiceRegistry.register(r),{shared:e,TreeView:r}}s(JU,"createTreeViewServices");var Eo,ZU=(Eo=class extends gr{constructor(){super(["architecture"])}},s(Eo,"ArchitectureTokenBuilder"),Eo),_o,QU=(_o=class extends Xo{runCustomConverter(e,r,n){if(e.name==="ARCH_ICON")return r.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return r.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let a=r.replace(/^\[|]$/g,"").trim();return(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))&&(a=a.slice(1,-1),a=a.replace(/\\"/g,'"').replace(/\\'/g,"'")),a.trim()}}},s(_o,"ArchitectureValueConverter"),_o),ez={parser:{TokenBuilder:s(()=>new ZU,"TokenBuilder"),ValueConverter:s(()=>new QU,"ValueConverter")}};function tz(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),cU,ez);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}s(tz,"createArchitectureServices");var Co,rz=(Co=class extends gr{constructor(){super(["eventmodeling"])}},s(Co,"EventModelingTokenBuilder"),Co),uT=new Set(["cmd","command"]),fT=new Set(["evt","event"]),Bd=new Set(["rmo","readmodel"]),dT=new Set(["pcr","processor"]),pT=new Set(["ui"]);function pN(t){const e=t.validation.EventModelingValidator,r=t.validation.ValidationRegistry;if(r){const n={EmTimeFrame:e.checkSourceFrameTypes.bind(e),EmResetFrame:e.checkSourceFrameTypes.bind(e)};r.register(n,e)}}s(pN,"registerValidationChecks");var So,nz=(So=class{checkSourceFrameTypes(e,r){e.sourceFrames.length!==0&&(uT.has(e.modelEntityType)?this.validateSources(e,new Set([...pT,...dT]),"command","ui or processor",r):fT.has(e.modelEntityType)?this.validateSources(e,uT,"event","command",r):Bd.has(e.modelEntityType)?this.validateSources(e,fT,"read model","event",r):dT.has(e.modelEntityType)?this.validateSources(e,Bd,"processor","read model",r):pT.has(e.modelEntityType)&&this.validateSources(e,Bd,"ui","read model",r))}validateSources(e,r,n,a,i){for(const o of e.sourceFrames){const c=o.ref;c!==void 0&&!r.has(c.modelEntityType)&&i("error",`A ${n} can only receive input from a ${a}, not from '${c.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},s(So,"EventModelingValidator"),So),az={parser:{TokenBuilder:s(()=>new rz,"TokenBuilder"),ValueConverter:s(()=>new Dc,"ValueConverter")},validation:{EventModelingValidator:s(()=>new nz,"EventModelingValidator")}};function iz(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),uU,az);return e.ServiceRegistry.register(r),pN(r),{shared:e,EventModel:r}}s(iz,"createEventModelingServices");var Pt={},sz={info:s(async()=>{const{createInfoServices:t}=await er(async()=>{const{createInfoServices:r}=await import("./info-J43DQDTF-ByKsUPcs.js");return{createInfoServices:r}},__vite__mapDeps([0,1])),e=t().Info.parser.LangiumParser;Pt.info=e},"info"),packet:s(async()=>{const{createPacketServices:t}=await er(async()=>{const{createPacketServices:r}=await import("./packet-YPE3B663-DxWH_D8P.js");return{createPacketServices:r}},__vite__mapDeps([2,1])),e=t().Packet.parser.LangiumParser;Pt.packet=e},"packet"),pie:s(async()=>{const{createPieServices:t}=await er(async()=>{const{createPieServices:r}=await import("./pie-LRSECV5Y-hrQnKzWO.js");return{createPieServices:r}},__vite__mapDeps([3,1])),e=t().Pie.parser.LangiumParser;Pt.pie=e},"pie"),treeView:s(async()=>{const{createTreeViewServices:t}=await er(async()=>{const{createTreeViewServices:r}=await import("./treeView-BLDUP644-C9ezM3fm.js");return{createTreeViewServices:r}},__vite__mapDeps([4,1])),e=t().TreeView.parser.LangiumParser;Pt.treeView=e},"treeView"),architecture:s(async()=>{const{createArchitectureServices:t}=await er(async()=>{const{createArchitectureServices:r}=await import("./architecture-7EHR7CIX-CH2wXeGZ.js");return{createArchitectureServices:r}},__vite__mapDeps([5,1])),e=t().Architecture.parser.LangiumParser;Pt.architecture=e},"architecture"),gitGraph:s(async()=>{const{createGitGraphServices:t}=await er(async()=>{const{createGitGraphServices:r}=await import("./gitGraph-WXDBUCRP-BECHaw36.js");return{createGitGraphServices:r}},__vite__mapDeps([6,1])),e=t().GitGraph.parser.LangiumParser;Pt.gitGraph=e},"gitGraph"),eventmodeling:s(async()=>{const{createEventModelingServices:t}=await er(async()=>{const{createEventModelingServices:r}=await import("./eventmodeling-FCH6USID-DKM4hpFU.js");return{createEventModelingServices:r}},__vite__mapDeps([7,1])),e=t().EventModel.parser.LangiumParser;Pt.eventmodeling=e},"eventmodeling"),radar:s(async()=>{const{createRadarServices:t}=await er(async()=>{const{createRadarServices:r}=await import("./radar-GUYGQ44K-DhvxoL3l.js");return{createRadarServices:r}},__vite__mapDeps([8,1])),e=t().Radar.parser.LangiumParser;Pt.radar=e},"radar"),treemap:s(async()=>{const{createTreemapServices:t}=await er(async()=>{const{createTreemapServices:r}=await import("./treemap-LRROVOQU-OJPVKysv.js");return{createTreemapServices:r}},__vite__mapDeps([9,1])),e=t().Treemap.parser.LangiumParser;Pt.treemap=e},"treemap"),wardley:s(async()=>{const{createWardleyServices:t}=await er(async()=>{const{createWardleyServices:r}=await import("./wardley-L42UT6IY-BXdEa5-p.js");return{createWardleyServices:r}},__vite__mapDeps([10,1])),e=t().Wardley.parser.LangiumParser;Pt.wardley=e},"wardley")};async function oz(t,e){const r=sz[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);Pt[t]||await r();const a=Pt[t].parse(e);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new lz(a);return a.value}s(oz,"parse");var bo,lz=(bo=class extends Error{constructor(e){const r=e.lexerErrors.map(a=>{const i=a.line!==void 0&&!isNaN(a.line)?a.line:"?",o=a.column!==void 0&&!isNaN(a.column)?a.column:"?";return`Lexer error on line ${i}, column ${o}: ${a.message}`}).join(` +`),n=e.parserErrors.map(a=>{const i=a.token.startLine!==void 0&&!isNaN(a.token.startLine)?a.token.startLine:"?",o=a.token.startColumn!==void 0&&!isNaN(a.token.startColumn)?a.token.startColumn:"?";return`Parse error on line ${i}, column ${o}: ${a.message}`}).join(` +`);super(`Parsing failed: ${r} ${n}`),this.result=e}},s(bo,"MermaidParseError"),bo);export{ez as A,az as E,MU as G,GU as I,zU as P,_U as R,XU as T,OU as W,BU as a,VU as b,jU as c,WU as d,JU as e,tz as f,xU as g,iz as h,CU as i,kU as j,NU as k,LU as l,Oj as m,oz as p}; diff --git a/dist/assets/mindmap-definition-RKZ34NQL-R9rEr1y5.js b/dist/assets/mindmap-definition-RKZ34NQL-R9rEr1y5.js new file mode 100644 index 0000000..ab30f21 --- /dev/null +++ b/dist/assets/mindmap-definition-RKZ34NQL-R9rEr1y5.js @@ -0,0 +1,96 @@ +import{g as oe}from"./chunk-55IACEB6-DT6mN9fZ.js";import{s as ce}from"./chunk-2J33WTMH-CsIyCw5_.js";import{_ as h,l as R,o as le,r as he,D as de,G as W,c as U,i as H,b3 as ge,V as ue,W as pe,X as fe}from"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function me(t,e=0){return(_[t[e+0]]+_[t[e+1]]+_[t[e+2]]+_[t[e+3]]+"-"+_[t[e+4]]+_[t[e+5]]+"-"+_[t[e+6]]+_[t[e+7]]+"-"+_[t[e+8]]+_[t[e+9]]+"-"+_[t[e+10]]+_[t[e+11]]+_[t[e+12]]+_[t[e+13]]+_[t[e+14]]+_[t[e+15]]).toLowerCase()}const ye=new Uint8Array(16);function Ee(){return crypto.getRandomValues(ye)}function _e(t,e,o){return crypto.randomUUID?crypto.randomUUID():be(t)}function be(t,e,o){var n;t=t||{};const l=t.random??((n=t.rng)==null?void 0:n.call(t))??Ee();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,me(l)}var K=function(){var t=h(function(O,s,i,a){for(i=i||{},a=O.length;a--;i[O[a]]=s);return i},"o"),e=[1,4],o=[1,13],l=[1,12],n=[1,15],d=[1,16],p=[1,20],y=[1,19],E=[6,7,8],k=[1,26],L=[1,24],D=[1,25],b=[6,7,11],$=[1,6,13,15,16,19,22],f=[1,33],B=[1,34],P=[1,6,7,11,13,15,16,19,22],X={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:h(function(s,i,a,c,u,r,M){var g=r.length-1;switch(u){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[g].id),c.addNode(r[g-1].length,r[g].id,r[g].descr,r[g].type);break;case 16:c.getLogger().trace("Icon: ",r[g]),c.decorateNode({icon:r[g]});break;case 17:case 21:c.decorateNode({class:r[g]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[g].id),c.addNode(0,r[g].id,r[g].descr,r[g].type);break;case 20:c.decorateNode({icon:r[g]});break;case 25:c.getLogger().trace("node found ..",r[g-2]),this.$={id:r[g-1],descr:r[g-1],type:c.getType(r[g-2],r[g])};break;case 26:this.$={id:r[g],descr:r[g],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[g-3]),this.$={id:r[g-3],descr:r[g-1],type:c.getType(r[g-2],r[g])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:o,7:[1,10],9:9,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},t(E,[2,3]),{1:[2,2]},t(E,[2,4]),t(E,[2,5]),{1:[2,6],6:o,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},{6:o,9:22,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},{6:k,7:L,10:23,11:D},t(b,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:p,22:y}),t(b,[2,18]),t(b,[2,19]),t(b,[2,20]),t(b,[2,21]),t(b,[2,23]),t(b,[2,24]),t(b,[2,26],{19:[1,30]}),{20:[1,31]},{6:k,7:L,10:32,11:D},{1:[2,7],6:o,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},t($,[2,14],{7:f,11:B}),t(P,[2,8]),t(P,[2,9]),t(P,[2,10]),t(b,[2,15]),t(b,[2,16]),t(b,[2,17]),{20:[1,35]},{21:[1,36]},t($,[2,13],{7:f,11:B}),t(P,[2,11]),t(P,[2,12]),{21:[1,37]},t(b,[2,25]),t(b,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,i){if(i.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=i,a}},"parseError"),parse:h(function(s){var i=this,a=[0],c=[],u=[null],r=[],M=this.table,g="",F=0,Q=0,ie=2,Z=1,se=r.slice.call(arguments,1),m=Object.create(this.lexer),C={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(C.yy[z]=this.yy[z]);m.setInput(s,C.yy),C.yy.lexer=m,C.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Y=m.yylloc;r.push(Y);var re=m.options&&m.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(x){a.length=a.length-2*x,u.length=u.length-x,r.length=r.length-x}h(ae,"popStack");function ee(){var x;return x=c.pop()||m.lex()||Z,typeof x!="number"&&(x instanceof Array&&(c=x,x=c.pop()),x=i.symbols_[x]||x),x}h(ee,"lex");for(var S,I,N,q,w={},G,v,te,j;;){if(I=a[a.length-1],this.defaultActions[I]?N=this.defaultActions[I]:((S===null||typeof S>"u")&&(S=ee()),N=M[I]&&M[I][S]),typeof N>"u"||!N.length||!N[0]){var J="";j=[];for(G in M[I])this.terminals_[G]&&G>ie&&j.push("'"+this.terminals_[G]+"'");m.showPosition?J="Parse error on line "+(F+1)+`: +`+m.showPosition()+` +Expecting `+j.join(", ")+", got '"+(this.terminals_[S]||S)+"'":J="Parse error on line "+(F+1)+": Unexpected "+(S==Z?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(J,{text:m.match,token:this.terminals_[S]||S,line:m.yylineno,loc:Y,expected:j})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+S);switch(N[0]){case 1:a.push(S),u.push(m.yytext),r.push(m.yylloc),a.push(N[1]),S=null,Q=m.yyleng,g=m.yytext,F=m.yylineno,Y=m.yylloc;break;case 2:if(v=this.productions_[N[1]][1],w.$=u[u.length-v],w._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},re&&(w._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),q=this.performAction.apply(w,[g,Q,F,C.yy,N[1],u,r].concat(se)),typeof q<"u")return q;v&&(a=a.slice(0,-1*v*2),u=u.slice(0,-1*v),r=r.slice(0,-1*v)),a.push(this.productions_[N[1]][0]),u.push(w.$),r.push(w._$),te=M[a[a.length-2]][a[a.length-1]],a.push(te);break;case 3:return!0}}return!0},"parse")},ne=function(){var O={EOF:1,parseError:h(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:h(function(s,i){return this.yy=i||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.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),s},"input"),unput:h(function(s){var i=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=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),a.length-1&&(this.yylineno-=a.length-1);var u=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:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(s){this.unput(this.match.slice(s))},"less"),pastInput:h(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+` +`+i+"^"},"showPosition"),test_match:h(function(s,i){var a,c,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),c=s[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],a=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var r in u)this[r]=u[r];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,i,a,c;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),r=0;ri[0].length)){if(i=a,c=r,this.options.backtrack_lexer){if(s=this.test_match(a,u[r]),s!==!1)return s;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(s=this.test_match(i,u[c]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var i=this.next();return i||this.lex()},"lex"),begin:h(function(i){this.conditionStack.push(i)},"begin"),popState:h(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:h(function(i){this.begin(i)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(i,a,c,u){switch(c){case 0:return i.getLogger().trace("Found comment",a.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",a.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",a.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",a.yytext),20;case 36:return i.getLogger().trace("Long description:",a.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return O}();X.lexer=ne;function V(){this.yy={}}return h(V,"Parser"),V.prototype=X,X.Parser=V,new V}();K.parser=K;var ke=K,Se=12,T={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},A,xe=(A=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=T,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let o=this.nodes.length-1;o>=0;o--)if(this.nodes[o].level0?this.nodes[0]:null}addNode(e,o,l,n){var L,D;R.info("addNode",e,o,l,n);let d=!1;this.nodes.length===0?(this.baseLevel=e,e=0,d=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,d=!1);const p=U();let y=((L=p.mindmap)==null?void 0:L.padding)??W.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const E={id:this.count++,nodeId:H(o,p),level:e,descr:H(l,p),type:n,children:[],width:((D=p.mindmap)==null?void 0:D.maxNodeWidth)??W.mindmap.maxNodeWidth,padding:y,isRoot:d},k=this.getParent(e);if(k)k.children.push(E),this.nodes.push(E);else if(d)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,o){switch(R.debug("In get type",e,o),e){case"[":return this.nodeType.RECT;case"(":return o===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,o){this.elements[e]=o}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const o=U(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=H(e.icon,o)),e.class&&(l.class=H(e.class,o))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,o){if(e.level===0?e.section=void 0:e.section=o,e.children)for(const[l,n]of e.children.entries()){const d=e.level===0?l%(Se-1):o;this.assignSections(n,d)}}flattenNodes(e,o){const l=U(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);const d=n.join(" "),p=h(E=>{var D;const L=(((D=l.theme)==null?void 0:D.toLowerCase())??"").includes("redux");switch(E){case T.CIRCLE:return"mindmapCircle";case T.RECT:return"rect";case T.ROUNDED_RECT:return"rounded";case T.CLOUD:return"cloud";case T.BANG:return"bang";case T.HEXAGON:return"hexagon";case T.DEFAULT:return L?"rounded":"defaultMindmapNode";case T.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:p(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:d,cssStyles:[],look:l.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(o.push(y),e.children)for(const E of e.children)this.flattenNodes(E,o)}generateEdges(e,o){if(!e.children)return;const l=U();for(const n of e.children){let d="edge";n.section!==void 0&&(d+=` section-edge-${n.section}`);const p=e.level+1;d+=` edge-depth-${p}`;const y={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:l.look,classes:d,depth:e.level,section:n.section};o.push(y),this.generateEdges(n,o)}}getData(){const e=this.getMindmap(),o=U(),n=ge().layout!==void 0,d=o;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};R.debug("getData: mindmapRoot",e,o),this.assignSections(e);const p=[],y=[];this.flattenNodes(e,p),this.generateEdges(e,y),R.debug(`getData: processed ${p.length} nodes and ${y.length} edges`);const E=new Map;for(const k of p)E.set(k.id,{shape:k.shape,width:k.width,height:k.height,padding:k.padding});return{nodes:p,edges:y,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+_e()}}getLogger(){return R}},h(A,"MindmapDB"),A),Ne=h(async(t,e,o,l)=>{var b,$;R.debug(`Rendering mindmap diagram +`+t);const n=l.db,d=n.getData(),p=oe(e,d.config.securityLevel);if(d.type=l.type,d.layoutAlgorithm=le(d.config.layout,{fallback:"cose-bilkent"}),d.diagramId=e,!n.getMindmap())return;d.nodes.forEach(f=>{f.shape==="rounded"?(f.radius=15,f.taper=15,f.stroke="none",f.width=0,f.padding=15):f.shape==="circle"?f.padding=10:f.shape==="rect"?(f.width=0,f.padding=10):f.shape==="hexagon"&&(f.width=0,f.height=0)}),await he(d,p);const{themeVariables:E}=de(),{useGradient:k,gradientStart:L,gradientStop:D}=E;if(k&&L&&D){const f=p.attr("id"),B=p.append("defs").append("linearGradient").attr("id",`${f}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");B.append("stop").attr("offset","0%").attr("stop-color",L).attr("stop-opacity",1),B.append("stop").attr("offset","100%").attr("stop-color",D).attr("stop-opacity",1)}ce(p,((b=d.config.mindmap)==null?void 0:b.padding)??W.mindmap.padding,"mindmapDiagram",(($=d.config.mindmap)==null?void 0:$.useMaxWidth)??W.mindmap.useMaxWidth)},"draw"),De={draw:Ne},Le=h(t=>{const{theme:e,look:o}=t;let l="";for(let n=0;n{let l="";for(let n=0;n{const{theme:e}=t,o=t.svgId,l=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none";return` + .edge { + stroke-width: 3; + } + ${Le(t)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .section-root span { + color: ${e!=null&&e.includes("redux")?t.nodeBorder:t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } + [data-look="neo"].mindmap-node { + filter: ${l}; + } + [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon { + fill: ${e!=null&&e.includes("redux")?t.mainBkg:t.git0}; + } + [data-look="neo"].mindmap-node.section-root .text-inner-tspan { + fill: ${e!=null&&e.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]}; + } + ${t.useGradient&&o&&t.mainBkg?ve(t.THEME_COLOR_LIMIT,o,t.mainBkg):""} +`},"getStyles"),Oe=Te,Ae={get db(){return new xe},renderer:De,parser:ke,styles:Oe};export{Ae as diagram}; diff --git a/dist/assets/ordinal-Cboi1Yqb.js b/dist/assets/ordinal-Cboi1Yqb.js new file mode 100644 index 0000000..de7dd9e --- /dev/null +++ b/dist/assets/ordinal-Cboi1Yqb.js @@ -0,0 +1 @@ +import{i as a}from"./init-Gi6I4Gst.js";class o extends Map{constructor(n,t=g){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(l(this,n),t)}delete(n){return super.delete(p(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function l({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function p({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function g(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function h(){var e=new o,n=[],t=[],r=f;function s(u){let i=e.get(u);if(i===void 0){if(r!==f)return r;e.set(u,i=n.push(u)-1)}return t[i%t.length]}return s.domain=function(u){if(!arguments.length)return n.slice();n=[],e=new o;for(const i of u)e.has(i)||e.set(i,n.push(i)-1);return s},s.range=function(u){return arguments.length?(t=Array.from(u),s):t.slice()},s.unknown=function(u){return arguments.length?(r=u,s):r},s.copy=function(){return h(n,t).unknown(r)},a.apply(s,arguments),s}export{h as o}; diff --git a/dist/assets/packet-YPE3B663-DxWH_D8P.js b/dist/assets/packet-YPE3B663-DxWH_D8P.js new file mode 100644 index 0000000..48d87fc --- /dev/null +++ b/dist/assets/packet-YPE3B663-DxWH_D8P.js @@ -0,0 +1 @@ +import{a as r}from"./mermaid-parser.core-D9g22YKo.js";import{P as p}from"./mermaid-parser.core-D9g22YKo.js";import"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";export{p as PacketModule,r as createPacketServices}; diff --git a/dist/assets/pie-LRSECV5Y-hrQnKzWO.js b/dist/assets/pie-LRSECV5Y-hrQnKzWO.js new file mode 100644 index 0000000..3573a42 --- /dev/null +++ b/dist/assets/pie-LRSECV5Y-hrQnKzWO.js @@ -0,0 +1 @@ +import{b as r}from"./mermaid-parser.core-D9g22YKo.js";import{d as p}from"./mermaid-parser.core-D9g22YKo.js";import"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";export{p as PieModule,r as createPieServices}; diff --git a/dist/assets/pieDiagram-4H26LBE5-DbOHoVVN.js b/dist/assets/pieDiagram-4H26LBE5-DbOHoVVN.js new file mode 100644 index 0000000..17d8875 --- /dev/null +++ b/dist/assets/pieDiagram-4H26LBE5-DbOHoVVN.js @@ -0,0 +1,30 @@ +import{ab as S,a3 as R,b2 as Q,g as Y,s as tt,a as et,b as at,q as rt,p as nt,_ as p,l as z,c as it,F as st,I as lt,N as ot,e as ct,z as ut,G as pt}from"./index-mLPbTfpz.js";import{p as gt}from"./chunk-4BX2VUAB-DTW3NaPN.js";import{p as dt}from"./mermaid-parser.core-D9g22YKo.js";import{d as _}from"./arc-XpyNnWh5.js";import{o as ft}from"./ordinal-Cboi1Yqb.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";import"./init-Gi6I4Gst.js";function ht(t,a){return at?1:a>=t?0:NaN}function mt(t){return t}function vt(){var t=mt,a=ht,f=null,y=S(0),s=S(R),g=S(0);function l(e){var n,o=(e=Q(e)).length,d,h,v=0,c=new Array(o),i=new Array(o),x=+y.apply(this,arguments),w=Math.min(R,Math.max(-R,s.apply(this,arguments)-x)),m,D=Math.min(Math.abs(w)/o,g.apply(this,arguments)),$=D*(w<0?-1:1),u;for(n=0;n0&&(v+=u);for(a!=null?c.sort(function(A,C){return a(i[A],i[C])}):f!=null&&c.sort(function(A,C){return f(e[A],e[C])}),n=0,h=v?(w-o*$)/v:0;n0?u*h:0)+$,i[d]={data:e[d],index:n,value:u,startAngle:x,endAngle:m,padAngle:D};return i}return l.value=function(e){return arguments.length?(t=typeof e=="function"?e:S(+e),l):t},l.sortValues=function(e){return arguments.length?(a=e,f=null,l):a},l.sort=function(e){return arguments.length?(f=e,a=null,l):f},l.startAngle=function(e){return arguments.length?(y=typeof e=="function"?e:S(+e),l):y},l.endAngle=function(e){return arguments.length?(s=typeof e=="function"?e:S(+e),l):s},l.padAngle=function(e){return arguments.length?(g=typeof e=="function"?e:S(+e),l):g},l}var xt=pt.pie,F={sections:new Map,showData:!1},T=F.sections,W=F.showData,St=structuredClone(xt),yt=p(()=>structuredClone(St),"getConfig"),wt=p(()=>{T=new Map,W=F.showData,ut()},"clear"),At=p(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(t)||(T.set(t,a),z.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),Ct=p(()=>T,"getSections"),Dt=p(t=>{W=t},"setShowData"),$t=p(()=>W,"getShowData"),V={getConfig:yt,clear:wt,setDiagramTitle:nt,getDiagramTitle:rt,setAccTitle:at,getAccTitle:et,setAccDescription:tt,getAccDescription:Y,addSection:At,getSections:Ct,setShowData:Dt,getShowData:$t},Tt=p((t,a)=>{gt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),bt={parse:p(async t=>{const a=await dt("pie",t);z.debug(a),Tt(a,V)},"parse")},kt=p(t=>` + .pieCircle{ + stroke: ${t.pieStrokeColor}; + stroke-width : ${t.pieStrokeWidth}; + opacity : ${t.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${t.pieOuterStrokeColor}; + stroke-width: ${t.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${t.pieTitleTextSize}; + fill: ${t.pieTitleTextColor}; + font-family: ${t.fontFamily}; + } + .slice { + font-family: ${t.fontFamily}; + fill: ${t.pieSectionTextColor}; + font-size:${t.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${t.pieLegendTextColor}; + font-family: ${t.fontFamily}; + font-size: ${t.pieLegendTextSize}; + } +`,"getStyles"),Et=kt,Mt=p(t=>{const a=[...t.values()].reduce((s,g)=>s+g,0),f=[...t.entries()].map(([s,g])=>({label:s,value:g})).filter(s=>s.value/a*100>=1);return vt().value(s=>s.value).sort(null)(f)},"createPieArcs"),Rt=p((t,a,f,y)=>{var O;z.debug(`rendering pie chart +`+t);const s=y.db,g=it(),l=st(s.getConfig(),g.pie),e=40,n=18,o=4,d=450,h=d,v=lt(a),c=v.append("g");c.attr("transform","translate("+h/2+","+d/2+")");const{themeVariables:i}=g;let[x]=ot(i.pieOuterStrokeWidth);x??(x=2);const w=l.textPosition,m=Math.min(h,d)/2-e,D=_().innerRadius(0).outerRadius(m),$=_().innerRadius(m*w).outerRadius(m*w);c.append("circle").attr("cx",0).attr("cy",0).attr("r",m+x/2).attr("class","pieOuterCircle");const u=s.getSections(),A=Mt(u),C=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let b=0;u.forEach(r=>{b+=r});const G=A.filter(r=>(r.data.value/b*100).toFixed(0)!=="0"),k=ft(C).domain([...u.keys()]);c.selectAll("mySlices").data(G).enter().append("path").attr("d",D).attr("fill",r=>k(r.data.label)).attr("class","pieCircle"),c.selectAll("mySlices").data(G).enter().append("text").text(r=>(r.data.value/b*100).toFixed(0)+"%").attr("transform",r=>"translate("+$.centroid(r)+")").style("text-anchor","middle").attr("class","slice");const U=c.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),N=[...u.entries()].map(([r,M])=>({label:r,value:M})),E=c.selectAll(".legend").data(N).enter().append("g").attr("class","legend").attr("transform",(r,M)=>{const P=n+o,H=P*N.length/2,J=12*n,K=M*P-H;return"translate("+J+","+K+")"});E.append("rect").attr("width",n).attr("height",n).style("fill",r=>k(r.label)).style("stroke",r=>k(r.label)),E.append("text").attr("x",n+o).attr("y",n-o).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const j=Math.max(...E.selectAll("text").nodes().map(r=>(r==null?void 0:r.getBoundingClientRect().width)??0)),q=h+e+n+o+j,L=((O=U.node())==null?void 0:O.getBoundingClientRect().width)??0,X=h/2-L/2,Z=h/2+L/2,B=Math.min(0,X),I=Math.max(q,Z)-B;v.attr("viewBox",`${B} 0 ${I} ${d}`),ct(v,d,I,l.useMaxWidth)},"draw"),zt={draw:Rt},Pt={parser:bt,db:V,renderer:zt,styles:Et};export{Pt as diagram}; diff --git a/dist/assets/quadrantDiagram-W4KKPZXB-DEXrGMHs.js b/dist/assets/quadrantDiagram-W4KKPZXB-DEXrGMHs.js new file mode 100644 index 0000000..01171a6 --- /dev/null +++ b/dist/assets/quadrantDiagram-W4KKPZXB-DEXrGMHs.js @@ -0,0 +1,7 @@ +import{s as Ae,g as ke,q as ae,p as Fe,a as Pe,b as ve,_ as o,c as wt,l as At,d as zt,e as Ce,z as Le,G as z,i as Ee,K as De}from"./index-mLPbTfpz.js";import{l as ie}from"./linear-CvhoBmDn.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Vt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],k=[2,36],d=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],x=[1,41],_=[1,45],Y=[1,14],G=[1,23],yt=[1,18],Tt=[1,19],dt=[1,20],Ft=[1,21],ut=[1,22],xt=[1,24],ft=[1,25],gt=[1,26],i=[1,27],Bt=[1,28],Rt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,91],$=[1,92],tt=[1,93],et=[1,100],it=[1,94],at=[1,97],nt=[1,95],st=[1,96],rt=[1,98],ot=[1,99],Pt=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,g,f,A,e,pt){var s=e.length-1;switch(A){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:q,12:m,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:c,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:T,10:q,12:m,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:d,5:T,10:q,12:m,13:b,14:x,15:_,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:d,5:T,10:q,12:m,13:b,14:x,15:_,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,102]},t(a,[2,29],{10:Pt}),t(Zt,[2,27],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:89,16:90,23:105,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:106},t(N,[2,26]),t(a,[2,50],{10:Pt}),t(Zt,[2,28],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],A=[null],e=[],pt=this.table,s="",mt=0,Jt=0,me=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);D.setInput(r,K.yy),K.yy.lexer=D,K.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Lt=D.yylloc;e.push(Lt);var Se=D.options&&D.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){g.length=g.length-2*R,A.length=A.length-R,e.length=e.length-R}o(_e,"popStack");function te(){var R;return R=f.pop()||D.lex()||$t,typeof R!="number"&&(R instanceof Array&&(f=R,R=f.pop()),R=l.symbols_[R]||R),R}o(te,"lex");for(var B,Z,W,Et,lt={},bt,M,ee,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?W=this.defaultActions[Z]:((B===null||typeof B>"u")&&(B=te()),W=pt[Z]&&pt[Z][B]),typeof W>"u"||!W.length||!W[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>me&&St.push("'"+this.terminals_[bt]+"'");D.showPosition?Dt="Parse error on line "+(mt+1)+`: +`+D.showPosition()+` +Expecting `+St.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Dt="Parse error on line "+(mt+1)+": Unexpected "+(B==$t?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Dt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Lt,expected:St})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+B);switch(W[0]){case 1:g.push(B),A.push(D.yytext),e.push(D.yylloc),g.push(W[1]),B=null,Jt=D.yyleng,s=D.yytext,mt=D.yylineno,Lt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],lt.$=A[A.length-M],lt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Se&&(lt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Et=this.performAction.apply(lt,[s,Jt,mt,K.yy,W[1],A,e].concat(be)),typeof Et<"u")return Et;M&&(g=g.slice(0,-1*M*2),A=A.slice(0,-1*M),e=e.slice(0,-1*M)),g.push(this.productions_[W[1]][0]),A.push(lt.$),e.push(lt._$),ee=pt[g[g.length-2]][g[g.length-1]],g.push(ee);break;case 3:return!0}}return!0},"parse")},qe=function(){var j={EOF:1,parseError:o(function(l,g){if(this.yy.parser)this.yy.parser.parseError(l,g);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var f=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 A=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===f.length?this.yylloc.first_column:0)+f[f.length-g.length].length-g[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+` +`+l+"^"},"showPosition"),test_match:o(function(r,l){var g,f,A;if(this.options.backtrack_lexer&&(A={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&&(A.yylloc.range=this.yylloc.range.slice(0))),f=r[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],g=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var e in A)this[e]=A[e];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,l,g,f;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),e=0;el[0].length)){if(l=g,f=e,this.options.backtrack_lexer){if(r=this.test_match(g,A[e]),r!==!1)return r;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(r=this.test_match(l,A[f]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var l=this.next();return l||this.lex()},"lex"),begin:o(function(l){this.conditionStack.push(l)},"begin"),popState:o(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:o(function(l){this.begin(l)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(l,g,f,A){switch(f){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return j}();vt.lexer=qe;function qt(){this.yy={}}return o(qt,"Parser"),qt.prototype=vt,vt.Parser=qt,new qt}();Vt.parser=Vt;var ze=Vt,I=De(),ht,Ve=(ht=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var n,u,c,h,p,y,S,a,k,d,T,q,m,b,x,_,Y,G;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((n=z.quadrantChart)==null?void 0:n.chartWidth)||500,chartWidth:((u=z.quadrantChart)==null?void 0:u.chartHeight)||500,titlePadding:((c=z.quadrantChart)==null?void 0:c.titlePadding)||10,titleFontSize:((h=z.quadrantChart)==null?void 0:h.titleFontSize)||20,quadrantPadding:((p=z.quadrantChart)==null?void 0:p.quadrantPadding)||5,xAxisLabelPadding:((y=z.quadrantChart)==null?void 0:y.xAxisLabelPadding)||5,yAxisLabelPadding:((S=z.quadrantChart)==null?void 0:S.yAxisLabelPadding)||5,xAxisLabelFontSize:((a=z.quadrantChart)==null?void 0:a.xAxisLabelFontSize)||16,yAxisLabelFontSize:((k=z.quadrantChart)==null?void 0:k.yAxisLabelFontSize)||16,quadrantLabelFontSize:((d=z.quadrantChart)==null?void 0:d.quadrantLabelFontSize)||16,quadrantTextTopPadding:((T=z.quadrantChart)==null?void 0:T.quadrantTextTopPadding)||5,pointTextPadding:((q=z.quadrantChart)==null?void 0:q.pointTextPadding)||5,pointLabelFontSize:((m=z.quadrantChart)==null?void 0:m.pointLabelFontSize)||12,pointRadius:((b=z.quadrantChart)==null?void 0:b.pointRadius)||5,xAxisPosition:((x=z.quadrantChart)==null?void 0:x.xAxisPosition)||"top",yAxisPosition:((_=z.quadrantChart)==null?void 0:_.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((Y=z.quadrantChart)==null?void 0:Y.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((G=z.quadrantChart)==null?void 0:G.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:I.quadrant1Fill,quadrant2Fill:I.quadrant2Fill,quadrant3Fill:I.quadrant3Fill,quadrant4Fill:I.quadrant4Fill,quadrant1TextFill:I.quadrant1TextFill,quadrant2TextFill:I.quadrant2TextFill,quadrant3TextFill:I.quadrant3TextFill,quadrant4TextFill:I.quadrant4TextFill,quadrantPointFill:I.quadrantPointFill,quadrantPointTextFill:I.quadrantPointTextFill,quadrantXAxisTextFill:I.quadrantXAxisTextFill,quadrantYAxisTextFill:I.quadrantYAxisTextFill,quadrantTitleFill:I.quadrantTitleFill,quadrantInternalBorderStrokeFill:I.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:I.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,At.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,u){this.classes.set(n,u)}setConfig(n){At.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){At.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,u,c,h){const p=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,y={top:n==="top"&&u?p:0,bottom:n==="bottom"&&u?p:0},S=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&c?S:0,right:this.config.yAxisPosition==="right"&&c?S:0},k=this.config.titleFontSize+this.config.titlePadding*2,d={top:h?k:0},T=this.config.quadrantPadding+a.left,q=this.config.quadrantPadding+y.top+d.top,m=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,b=this.config.chartHeight-this.config.quadrantPadding*2-y.top-y.bottom-d.top,x=m/2,_=b/2;return{xAxisSpace:y,yAxisSpace:a,titleSpace:d,quadrantSpace:{quadrantLeft:T,quadrantTop:q,quadrantWidth:m,quadrantHalfWidth:x,quadrantHeight:b,quadrantHalfHeight:_}}}getAxisLabels(n,u,c,h){const{quadrantSpace:p,titleSpace:y}=h,{quadrantHalfHeight:S,quadrantHeight:a,quadrantLeft:k,quadrantHalfWidth:d,quadrantTop:T,quadrantWidth:q}=p,m=!!this.data.xAxisRightText,b=!!this.data.yAxisTopText,x=[];return this.data.xAxisLeftText&&u&&x.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:k+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&u&&x.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:k+d+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&c&&x.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+k+q+this.config.quadrantPadding,y:T+a-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&c&&x.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+k+q+this.config.quadrantPadding,y:T+S-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),x}getQuadrants(n){const{quadrantSpace:u}=n,{quadrantHalfHeight:c,quadrantLeft:h,quadrantHalfWidth:p,quadrantTop:y}=u,S=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y,width:p,height:c,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y,width:p,height:c,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant4Fill}];for(const a of S)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return S}getQuadrantPoints(n){const{quadrantSpace:u}=n,{quadrantHeight:c,quadrantLeft:h,quadrantTop:p,quadrantWidth:y}=u,S=ie().domain([0,1]).range([h,y+h]),a=ie().domain([0,1]).range([c+p,p]);return this.data.points.map(d=>{const T=this.classes.get(d.className);return T&&(d={...T,...d}),{x:S(d.x),y:a(d.y),fill:d.color??this.themeConfig.quadrantPointFill,radius:d.radius??this.config.pointRadius,text:{text:d.text,fill:this.themeConfig.quadrantPointTextFill,x:S(d.x),y:a(d.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:d.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:d.strokeWidth??"0px"}})}getBorders(n){const u=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:c}=n,{quadrantHalfHeight:h,quadrantHeight:p,quadrantLeft:y,quadrantHalfWidth:S,quadrantTop:a,quadrantWidth:k}=c;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a,x2:y+k+u,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y+k,y1:a+u,x2:y+k,y2:a+p-u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a+p,x2:y+k+u,y2:a+p},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y,y1:a+u,x2:y,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+S,y1:a+u,x2:y+S,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+u,y1:a+h,x2:y+k-u,y2:a+h}]}getTitle(n){if(n)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),u=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),c=this.config.showTitle&&!!this.data.titleText,h=this.data.points.length>0?"bottom":this.config.xAxisPosition,p=this.calculateSpace(h,n,u,c);return{points:this.getQuadrantPoints(p),quadrants:this.getQuadrants(p),axisLabels:this.getAxisLabels(h,n,u,p),borderLines:this.getBorders(p),title:this.getTitle(c)}}},o(ht,"QuadrantBuilder"),ht),ct,_t=(ct=class extends Error{constructor(n,u,c){super(`value for ${n} ${u} is invalid, please use a valid ${c}`),this.name="InvalidStyleError"}},o(ct,"InvalidStyleError"),ct);function It(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}o(It,"validateHexCode");function ne(t){return!/^\d+$/.test(t)}o(ne,"validateNumber");function se(t){return!/^\d+px$/.test(t)}o(se,"validateSizeInPixels");var Ie=wt();function O(t){return Ee(t.trim(),Ie)}o(O,"textSanitizer");var V=new Ve;function re(t){V.setData({quadrant1Text:O(t.text)})}o(re,"setQuadrant1Text");function oe(t){V.setData({quadrant2Text:O(t.text)})}o(oe,"setQuadrant2Text");function le(t){V.setData({quadrant3Text:O(t.text)})}o(le,"setQuadrant3Text");function he(t){V.setData({quadrant4Text:O(t.text)})}o(he,"setQuadrant4Text");function ce(t){V.setData({xAxisLeftText:O(t.text)})}o(ce,"setXAxisLeftText");function de(t){V.setData({xAxisRightText:O(t.text)})}o(de,"setXAxisRightText");function ue(t){V.setData({yAxisTopText:O(t.text)})}o(ue,"setYAxisTopText");function xe(t){V.setData({yAxisBottomText:O(t.text)})}o(xe,"setYAxisBottomText");function kt(t){const n={};for(const u of t){const[c,h]=u.trim().split(/\s*:\s*/);if(c==="radius"){if(ne(h))throw new _t(c,h,"number");n.radius=parseInt(h)}else if(c==="color"){if(It(h))throw new _t(c,h,"hex code");n.color=h}else if(c==="stroke-color"){if(It(h))throw new _t(c,h,"hex code");n.strokeColor=h}else if(c==="stroke-width"){if(se(h))throw new _t(c,h,"number of pixels (eg. 10px)");n.strokeWidth=h}else throw new Error(`style named ${c} is not supported.`)}return n}o(kt,"parseStyles");function fe(t,n,u,c,h){const p=kt(h);V.addPoints([{x:u,y:c,text:O(t.text),className:n,...p}])}o(fe,"addPoint");function ge(t,n){V.addClass(t,kt(n))}o(ge,"addClass");function pe(t){V.setConfig({chartWidth:t})}o(pe,"setWidth");function ye(t){V.setConfig({chartHeight:t})}o(ye,"setHeight");function Te(){const t=wt(),{themeVariables:n,quadrantChart:u}=t;return u&&V.setConfig(u),V.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),V.setData({titleText:ae()}),V.build()}o(Te,"getQuadrantData");var we=o(function(){V.clear(),Le()},"clear"),Be={setWidth:pe,setHeight:ye,setQuadrant1Text:re,setQuadrant2Text:oe,setQuadrant3Text:le,setQuadrant4Text:he,setXAxisLeftText:ce,setXAxisRightText:de,setYAxisTopText:ue,setYAxisBottomText:xe,parseStyles:kt,addPoint:fe,addClass:ge,getQuadrantData:Te,clear:we,setAccTitle:ve,getAccTitle:Pe,setDiagramTitle:Fe,getDiagramTitle:ae,getAccDescription:ke,setAccDescription:Ae},Re=o((t,n,u,c)=>{var xt,ft,gt;function h(i){return i==="top"?"hanging":"middle"}o(h,"getDominantBaseLine");function p(i){return i==="left"?"start":"middle"}o(p,"getTextAnchor");function y(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}o(y,"getTransformation");const S=wt();At.debug(`Rendering quadrant chart +`+t);const a=S.securityLevel;let k;a==="sandbox"&&(k=zt("#i"+n));const T=(a==="sandbox"?zt(k.nodes()[0].contentDocument.body):zt("body")).select(`[id="${n}"]`),q=T.append("g").attr("class","main"),m=((xt=S.quadrantChart)==null?void 0:xt.chartWidth)??500,b=((ft=S.quadrantChart)==null?void 0:ft.chartHeight)??500;Ce(T,b,m,((gt=S.quadrantChart)==null?void 0:gt.useMaxWidth)??!0),T.attr("viewBox","0 0 "+m+" "+b),c.db.setHeight(b),c.db.setWidth(m);const x=c.db.getQuadrantData(),_=q.append("g").attr("class","quadrants"),Y=q.append("g").attr("class","border"),G=q.append("g").attr("class","data-points"),yt=q.append("g").attr("class","labels"),Tt=q.append("g").attr("class","title");x.title&&Tt.append("text").attr("x",0).attr("y",0).attr("fill",x.title.fill).attr("font-size",x.title.fontSize).attr("dominant-baseline",h(x.title.horizontalPos)).attr("text-anchor",p(x.title.verticalPos)).attr("transform",y(x.title)).text(x.title.text),x.borderLines&&Y.selectAll("line").data(x.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);const dt=_.selectAll("g.quadrant").data(x.quadrants).enter().append("g").attr("class","quadrant");dt.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),dt.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text)).text(i=>i.text.text),yt.selectAll("g.label").data(x.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>h(i.horizontalPos)).attr("text-anchor",i=>p(i.verticalPos)).attr("transform",i=>y(i));const ut=G.selectAll("g.data-point").data(x.points).enter().append("g").attr("class","data-point");ut.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),ut.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text))},"draw"),Ne={draw:Re},Xe={parser:ze,db:Be,renderer:Ne,styles:o(()=>"","styles")};export{Xe as diagram}; diff --git a/dist/assets/radar-GUYGQ44K-DhvxoL3l.js b/dist/assets/radar-GUYGQ44K-DhvxoL3l.js new file mode 100644 index 0000000..be54454 --- /dev/null +++ b/dist/assets/radar-GUYGQ44K-DhvxoL3l.js @@ -0,0 +1 @@ +import{i as o}from"./mermaid-parser.core-D9g22YKo.js";import{R as m}from"./mermaid-parser.core-D9g22YKo.js";import"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";export{m as RadarModule,o as createRadarServices}; diff --git a/dist/assets/requirementDiagram-4Y6WPE33-C9L6Ib86.js b/dist/assets/requirementDiagram-4Y6WPE33-C9L6Ib86.js new file mode 100644 index 0000000..ed45ae9 --- /dev/null +++ b/dist/assets/requirementDiagram-4Y6WPE33-C9L6Ib86.js @@ -0,0 +1,84 @@ +import{g as Ge}from"./chunk-55IACEB6-DT6mN9fZ.js";import{s as Xe}from"./chunk-2J33WTMH-CsIyCw5_.js";import{_ as d,D as Be,b as Je,a as Ze,s as et,g as tt,p as st,q as it,c as Ne,l as qe,z as rt,C as nt,o as at,r as lt,u as ct}from"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var Ce=function(){var e=d(function($,i,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],o=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],p=[2,7],f=[1,26],m=[1,27],b=[1,28],k=[1,29],C=[1,33],V=[1,34],A=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],y=[1,39],_=[1,40],g=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ve=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ae=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],we=[1,75],De=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],N=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:d(function(i,n,l,s,R,t,de){var a=t.length-1;switch(R){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:o},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:o},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:o},{1:[2,2]},{4:17,5:E,7:13,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:43,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:44,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:45,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:46,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:47,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:48,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:49,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:50,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),{30:60,33:62,75:P,89:y,90:_},{30:63,33:62,75:P,89:y,90:_},{30:64,33:62,75:P,89:y,90:_},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ve,[2,81]),e(Ve,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{62:77,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{30:78,33:62,75:P,89:y,90:_},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:y,90:_},{5:[1,95]},{30:96,33:62,75:P,89:y,90:_},{5:[1,97]},{30:98,33:62,75:P,89:y,90:_},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(g,[2,59],{76:U}),e(g,[2,64],{76:Me}),{33:103,75:[1,102],89:y,90:_},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(N,[2,67]),e(N,[2,69]),e(N,[2,70]),e(N,[2,71]),e(N,[2,72]),e(N,[2,73]),e(N,[2,74]),e(N,[2,75]),e(N,[2,76]),e(N,[2,77]),e(N,[2,78]),e(g,[2,57],{76:Me}),e(g,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:y,90:_},{33:120,89:y,90:_},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(N,[2,68]),e(g,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(g,[2,28]),{5:[1,127]},e(g,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(g,[2,47]),{5:[1,131]},e(g,[2,48]),e(g,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:y,90:_},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(g,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(g,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(g,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(g,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,44]),e(g,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:d(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:d(function(i){var n=this,l=[0],s=[],R=[null],t=[],de=this.table,a="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),S=Object.create(this.lexer),z={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(z.yy[be]=this.yy[be]);S.setInput(i,z.yy),z.yy.lexer=S,z.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var Ie=S.yylloc;t.push(Ie);var je=S.options&&S.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ze(T){l.length=l.length-2*T,R.length=R.length-T,t.length=t.length-T}d(ze,"popStack");function Ue(){var T;return T=s.pop()||S.lex()||Pe,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=n.symbols_[T]||T),T}d(Ue,"lex");for(var I,G,q,Te,J={},ye,F,Ye,_e;;){if(G=l[l.length-1],this.defaultActions[G]?q=this.defaultActions[G]:((I===null||typeof I>"u")&&(I=Ue()),q=de[G]&&de[G][I]),typeof q>"u"||!q.length||!q[0]){var ke="";_e=[];for(ye in de[G])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");S.showPosition?ke="Parse error on line "+(ge+1)+`: +`+S.showPosition()+` +Expecting `+_e.join(", ")+", got '"+(this.terminals_[I]||I)+"'":ke="Parse error on line "+(ge+1)+": Unexpected "+(I==Pe?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(ke,{text:S.match,token:this.terminals_[I]||I,line:S.yylineno,loc:Ie,expected:_e})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+I);switch(q[0]){case 1:l.push(I),R.push(S.yytext),t.push(S.yylloc),l.push(q[1]),I=null,$e=S.yyleng,a=S.yytext,ge=S.yylineno,Ie=S.yylloc;break;case 2:if(F=this.productions_[q[1]][1],J.$=R[R.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},je&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(J,[a,$e,ge,z.yy,q[1],R,t].concat(We)),typeof Te<"u")return Te;F&&(l=l.slice(0,-1*F*2),R=R.slice(0,-1*F),t=t.slice(0,-1*F)),l.push(this.productions_[q[1]][0]),R.push(J.$),t.push(J._$),Ye=de[l[l.length-2]][l[l.length-1]],l.push(Ye);break;case 3:return!0}}return!0},"parse")},He=function(){var $={EOF:1,parseError:d(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:d(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:d(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),l.length-1&&(this.yylineno-=l.length-1);var R=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:l?(l.length===s.length?this.yylloc.first_column:0)+s[s.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(i){this.unput(this.match.slice(i))},"less"),pastInput:d(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+n+"^"},"showPosition"),test_match:d(function(i,n){var l,s,R;if(this.options.backtrack_lexer&&(R={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&&(R.yylloc.range=this.yylloc.range.slice(0))),s=i[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+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var t in R)this[t]=R[t];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,l,s;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),t=0;tn[0].length)){if(n=l,s=t,this.options.backtrack_lexer){if(i=this.test_match(l,R[t]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,R[s]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var n=this.next();return n||this.lex()},"lex"),begin:d(function(n){this.conditionStack.push(n)},"begin"),popState:d(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:d(function(n){this.begin(n)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(n,l,s,R){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;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:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return l.yytext=l.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return $}();Se.lexer=He;function Re(){this.yy={}}return d(Re,"Parser"),Re.prototype=Se,Se.Parser=Re,new Re}();Ce.parser=Ce;var ot=Ce,Z,ht=(Z=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=Je,this.getAccTitle=Ze,this.setAccDescription=et,this.getAccDescription=tt,this.setDiagramTitle=st,this.getDiagramTitle=it,this.getConfig=d(()=>Ne().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(r){this.direction=r}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(r,u){return this.requirements.has(r)||this.requirements.set(r,{name:r,type:u,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(r)}getRequirements(){return this.requirements}setNewReqId(r){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=r)}setNewReqText(r){this.latestRequirement!==void 0&&(this.latestRequirement.text=r)}setNewReqRisk(r){this.latestRequirement!==void 0&&(this.latestRequirement.risk=r)}setNewReqVerifyMethod(r){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=r)}addElement(r){return this.elements.has(r)||(this.elements.set(r,{name:r,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),qe.info("Added new element: ",r)),this.resetLatestElement(),this.elements.get(r)}getElements(){return this.elements}setNewElementType(r){this.latestElement!==void 0&&(this.latestElement.type=r)}setNewElementDocRef(r){this.latestElement!==void 0&&(this.latestElement.docRef=r)}addRelationship(r,u,h){this.relations.push({type:r,src:u,dst:h})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,rt()}setCssStyle(r,u){for(const h of r){const o=this.requirements.get(h)??this.elements.get(h);if(!u||!o)return;for(const c of u)c.includes(",")?o.cssStyles.push(...c.split(",")):o.cssStyles.push(c)}}setClass(r,u){var h;for(const o of r){const c=this.requirements.get(o)??this.elements.get(o);if(c)for(const E of u){c.classes.push(E);const p=(h=this.classes.get(E))==null?void 0:h.styles;p&&c.cssStyles.push(...p)}}}defineClass(r,u){for(const h of r){let o=this.classes.get(h);o===void 0&&(o={id:h,styles:[],textStyles:[]},this.classes.set(h,o)),u&&u.forEach(function(c){if(/color/.exec(c)){const E=c.replace("fill","bgFill");o.textStyles.push(E)}o.styles.push(c)}),this.requirements.forEach(c=>{c.classes.includes(h)&&c.cssStyles.push(...u.flatMap(E=>E.split(",")))}),this.elements.forEach(c=>{c.classes.includes(h)&&c.cssStyles.push(...u.flatMap(E=>E.split(",")))})}}getClasses(){return this.classes}getData(){var o,c,E,p;const r=Ne(),u=[],h=[];for(const f of this.requirements.values()){const m=f;m.id=f.name,m.cssStyles=f.cssStyles,m.cssClasses=f.classes.join(" "),m.shape="requirementBox",m.look=r.look,m.colorIndex=u.length,u.push(m)}for(const f of this.elements.values()){const m=f;m.shape="requirementBox",m.look=r.look,m.id=f.name,m.cssStyles=f.cssStyles,m.cssClasses=f.classes.join(" "),m.colorIndex=u.length,u.push(m)}for(const f of this.relations){let m=0;const b=f.type===this.Relationships.CONTAINS,k={id:`${f.src}-${f.dst}-${m}`,start:((o=this.requirements.get(f.src))==null?void 0:o.name)??((c=this.elements.get(f.src))==null?void 0:c.name),end:((E=this.requirements.get(f.dst))==null?void 0:E.name)??((p=this.elements.get(f.dst))==null?void 0:p.name),label:`<<${f.type}>>`,classes:"relationshipLine",style:["fill:none",b?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:b?"normal":"dashed",arrowTypeStart:b?"requirement_contains":"",arrowTypeEnd:b?"":"requirement_arrow",look:r.look,labelType:"markdown"};h.push(k),m++}return{nodes:u,edges:h,other:{},config:r,direction:this.getDirection()}}},d(Z,"RequirementDB"),Z),ut=d(e=>{const r=Be(),{themeVariables:u,look:h}=r,{bkgColorArray:o,borderColorArray:c}=u;if(!(c!=null&&c.length))return"";let E="";for(let p=0;p{const r=Be(),{look:u,themeVariables:h}=r,{requirementEdgeLabelBackground:o}=h;return` + ${ut(e)} + marker { + fill: ${e.relationColor}; + stroke: ${e.relationColor}; + } + + marker.cross { + stroke: ${e.lineColor}; + } + + svg { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + } + + .reqBox { + fill: ${e.requirementBackground}; + fill-opacity: 1.0; + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${e.requirementTextColor}; + } + .reqLabelBox { + fill: ${e.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + .relationshipLine { + stroke: ${e.relationColor}; + stroke-width: ${u==="neo"?e.strokeWidth:"1px"}; + } + .relationshipLabel { + fill: ${e.relationLabelColor}; + } + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${e.edgeLabelBackground}; + } + .edgeLabel .label text { + fill: ${e.relationLabelColor}; + } + .divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; + } + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + .labelBkg { + background-color: ${o??e.edgeLabelBackground}; + } + +`},"getStyles"),mt=ft,Qe={};nt(Qe,{draw:()=>dt});var dt=d(async function(e,r,u,h){qe.info("REF0:"),qe.info("Drawing requirement diagram (unified)",r);const{securityLevel:o,state:c,layout:E,look:p}=Ne(),f=h.db.getData(),m=Ge(r,o);f.type=h.type,f.layoutAlgorithm=at(E),f.nodeSpacing=(c==null?void 0:c.nodeSpacing)??50,f.rankSpacing=(c==null?void 0:c.rankSpacing)??50,f.markers=p==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],f.diagramId=r,await lt(f,m);const b=8;ct.insertTitle(m,"requirementDiagramTitleText",(c==null?void 0:c.titleTopMargin)??25,h.db.getDiagramTitle()),Xe(m,b,"requirementDiagram",(c==null?void 0:c.useMaxWidth)??!0)},"draw"),yt={parser:ot,get db(){return new ht},renderer:Qe,styles:mt};export{yt as diagram}; diff --git a/dist/assets/sankeyDiagram-5OEKKPKP-DsxkSyuQ.js b/dist/assets/sankeyDiagram-5OEKKPKP-DsxkSyuQ.js new file mode 100644 index 0000000..13d4623 --- /dev/null +++ b/dist/assets/sankeyDiagram-5OEKKPKP-DsxkSyuQ.js @@ -0,0 +1,40 @@ +import{p as xt,q as _t,s as vt,g as bt,b as St,a as wt,_ as d,c as lt,A as Lt,d as H,Y as Et,z as At,k as Tt}from"./index-mLPbTfpz.js";import{o as Mt}from"./ordinal-Cboi1Yqb.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";import"./init-Gi6I4Gst.js";function Nt(t){for(var n=t.length/6|0,s=new Array(n),a=0;a=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s=u)&&(s=u)}return s}function pt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,n){return n-1-t.height}function kt(t,n){return t.sourceLinks.length?t.depth:n-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,n){return Q(t.source,n.source)||t.index-n.index}function ht(t,n){return Q(t.target,n.target)||t.index-n.index}function Q(t,n){return t.y0-n.y0}function it(t){return t.value}function zt(t){return t.index}function Dt(t){return t.nodes}function jt(t){return t.links}function ft(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function yt({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Bt(){let t=0,n=0,s=1,a=1,u=24,y=8,p,m=zt,o=kt,l,h,x=Dt,_=jt,g=6;function v(){const i={nodes:x.apply(null,arguments),links:_.apply(null,arguments)};return T(i),A(i),M(i),I(i),S(i),yt(i),i}v.update=function(i){return yt(i),i},v.nodeId=function(i){return arguments.length?(m=typeof i=="function"?i:X(i),v):m},v.nodeAlign=function(i){return arguments.length?(o=typeof i=="function"?i:X(i),v):o},v.nodeSort=function(i){return arguments.length?(l=i,v):l},v.nodeWidth=function(i){return arguments.length?(u=+i,v):u},v.nodePadding=function(i){return arguments.length?(y=p=+i,v):y},v.nodes=function(i){return arguments.length?(x=typeof i=="function"?i:X(i),v):x},v.links=function(i){return arguments.length?(_=typeof i=="function"?i:X(i),v):_},v.linkSort=function(i){return arguments.length?(h=i,v):h},v.size=function(i){return arguments.length?(t=n=0,s=+i[0],a=+i[1],v):[s-t,a-n]},v.extent=function(i){return arguments.length?(t=+i[0][0],s=+i[1][0],n=+i[0][1],a=+i[1][1],v):[[t,n],[s,a]]},v.iterations=function(i){return arguments.length?(g=+i,v):g};function T({nodes:i,links:f}){for(const[e,r]of i.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(i.map((e,r)=>[m(e,r,i),e]));for(const[e,r]of f.entries()){r.index=e;let{source:k,target:b}=r;typeof k!="object"&&(k=r.source=ft(c,k)),typeof b!="object"&&(b=r.target=ft(c,b)),k.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of i)e.sort(h),r.sort(h)}function A({nodes:i}){for(const f of i)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.depth=r;for(const{target:b}of k.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.height=r;for(const{source:b}of k.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:i}){const f=ct(i,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of i){const k=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=k,r.x0=t+k*c,r.x1=r.x0+u,e[k]?e[k].push(r):e[k]=[r]}if(l)for(const r of e)r.sort(l);return e}function z(i){const f=pt(i,c=>(a-n-(c.length-1)*p)/nt(c,it));for(const c of i){let e=n;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}e=(a-e+p)/(c.length+1);for(let r=0;rc.length)-1)),z(f);for(let c=0;c0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,j(b)}l===void 0&&k.sort(Q),D(k,c)}}function R(i,f,c){for(let e=i.length,r=e-2;r>=0;--r){const k=i[r];for(const b of k){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let q=et*(Y.layer-b.layer);L+=E(b,Y)*q,B+=q}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,j(b)}l===void 0&&k.sort(Q),D(k,c)}}function D(i,f){const c=i.length>>1,e=i[c];O(i,e.y0-p,c-1,f),V(i,e.y1+p,c+1,f),O(i,a,i.length-1,f),V(i,n,0,f)}function V(i,f,c,e){for(;c1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function O(i,f,c,e){for(;c>=0;--c){const r=i[c],k=(r.y1-f)*e;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function j({sourceLinks:i,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of i)c.sort(ut)}}function w(i){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of i)f.sort(ht),c.sort(ut)}function P(i,f){let c=i.y0-(i.sourceLinks.length-1)*p/2;for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c+=r+p}for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c-=r}return c}function E(i,f){let c=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c+=r+p}for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function mt(){return new ot}ot.prototype=mt.prototype={constructor:ot,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,y){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+y)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var y=this._x1,p=this._y1,m=s-t,o=a-n,l=y-t,h=p-n,x=l*l+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(x>F)if(!(Math.abs(h*m-o*l)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var _=s-y,g=a-p,v=m*m+o*o,T=_*_+g*g,A=Math.sqrt(v),M=Math.sqrt(x),I=u*Math.tan((rt-Math.acos((v+x-T)/(2*A*M)))/2),N=I/M,z=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*l)+","+(n+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>l*g)+","+(this._x1=t+z*m)+","+(this._y1=n+z*o)}},arc:function(t,n,s,a,u,y){t=+t,n=+n,s=+s,y=!!y;var p=s*Math.cos(a),m=s*Math.sin(a),o=t+p,l=n+m,h=1^y,x=y?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+l:(Math.abs(this._x1-o)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+o+","+l),s&&(x<0&&(x=x%st+st),x>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-p)+","+(n-m)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=l):x>F&&(this._+="A"+s+","+s+",0,"+ +(x>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Rt(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var n=Gt,s=Ut,a=Rt,u=Vt,y=null;function p(){var m,o=Wt.call(arguments),l=n.apply(this,o),h=s.apply(this,o);if(y||(y=m=mt()),t(y,+a.apply(this,(o[0]=l,o)),+u.apply(this,o),+a.apply(this,(o[0]=h,o)),+u.apply(this,o)),m)return y=null,m+""||null}return p.source=function(m){return arguments.length?(n=m,p):n},p.target=function(m){return arguments.length?(s=m,p):s},p.x=function(m){return arguments.length?(a=typeof m=="function"?m:dt(+m),p):a},p.y=function(m){return arguments.length?(u=typeof m=="function"?m:dt(+m),p):u},p.context=function(m){return arguments.length?(y=m??null,p):y},p}function qt(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=d(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:d(function(o,l,h,x,_,g,v){var T=g.length-1;switch(_){case 7:const A=x.findOrCreateNode(g[T-4].trim().replaceAll('""','"')),M=x.findOrCreateNode(g[T-2].trim().replaceAll('""','"')),I=parseFloat(g[T].trim());x.addLink(A,M,I);break;case 8:case 9:case 11:this.$=g[T];break;case 10:this.$=g[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:d(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:d(function(o){var l=this,h=[0],x=[],_=[null],g=[],v=this.table,T="",A=0,M=0,I=2,N=1,z=g.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(C.yy[R]=this.yy[R]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;g.push(D);var V=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,g.length=g.length-L}d(O,"popStack");function j(){var L;return L=x.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=l.symbols_[L]||L),L}d(j,"lex");for(var w,P,E,i,f={},c,e,r,k;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=j()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";k=[];for(c in v[P])this.terminals_[c]&&c>I&&k.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: +`+S.showPosition()+` +Expecting `+k.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:D,expected:k})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),g.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,D=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:g[g.length-(e||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(e||1)].first_column,last_column:g[g.length-1].last_column},V&&(f._$.range=[g[g.length-(e||1)].range[0],g[g.length-1].range[1]]),i=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,g].concat(z)),typeof i<"u")return i;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),g=g.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),g.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},y=function(){var m={EOF:1,parseError:d(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);else throw new Error(l)},"parseError"),setInput:d(function(o,l){return this.yy=l||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},"setInput"),input:d(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:d(function(o){var l=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var x=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),h.length-1&&(this.yylineno-=h.length-1);var _=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:h?(h.length===x.length?this.yylloc.first_column:0)+x[x.length-h.length].length-h[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(o){this.unput(this.match.slice(o))},"less"),pastInput:d(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(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,"")},"upcomingInput"),showPosition:d(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+l+"^"},"showPosition"),test_match:d(function(o,l){var h,x,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),x=o[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.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],h=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var g in _)this[g]=_[g];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,l,h,x;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),g=0;g<_.length;g++)if(h=this._input.match(this.rules[_[g]]),h&&(!l||h[0].length>l[0].length)){if(l=h,x=g,this.options.backtrack_lexer){if(o=this.test_match(h,_[g]),o!==!1)return o;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(o=this.test_match(l,_[x]),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})},"next"),lex:d(function(){var l=this.next();return l||this.lex()},"lex"),begin:d(function(l){this.conditionStack.push(l)},"begin"),popState:d(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:d(function(l){this.begin(l)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(l,h,x,_){switch(x){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return m}();u.lexer=y;function p(){this.yy={}}return d(p,"Parser"),p.prototype=u,u.Parser=p,new p}();at.parser=at;var K=at,J=[],tt=[],Z=new Map,Zt=d(()=>{J=[],tt=[],Z=new Map,At()},"clear"),W,Jt=(W=class{constructor(n,s,a=0){this.source=n,this.target=s,this.value=a}},d(W,"SankeyLink"),W),te=d((t,n,s)=>{J.push(new Jt(t,n,s))},"addLink"),G,ee=(G=class{constructor(n){this.ID=n}},d(G,"SankeyNode"),G),ne=d(t=>{t=Tt.sanitizeText(t,lt());let n=Z.get(t);return n===void 0&&(n=new ee(t),Z.set(t,n),tt.push(n)),n},"findOrCreateNode"),ie=d(()=>tt,"getNodes"),re=d(()=>J,"getLinks"),se=d(()=>({nodes:tt.map(t=>({id:t.ID})),links:J.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),oe={nodesMap:Z,getConfig:d(()=>lt().sankey,"getConfig"),getNodes:ie,getLinks:re,getGraph:se,addLink:te,findOrCreateNode:ne,getAccTitle:wt,setAccTitle:St,getAccDescription:bt,setAccDescription:vt,getDiagramTitle:_t,setDiagramTitle:xt,clear:Zt},$,gt=($=class{static next(n){return new $(n+ ++$.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}},d($,"Uid"),$.count=0,$),ae={left:It,right:Ot,center:$t,justify:kt},le=d(t=>{let n=0,s=0;for(const a of t){const u=a.value??0;u>n&&(n=u,s=a.layer??0)}return s},"findCentralNodeLayer"),ce=d(function(t,n,s,a){const{securityLevel:u,sankey:y}=lt(),p=Lt.sankey;let m;u==="sandbox"&&(m=H("#i"+n));const o=u==="sandbox"?H(m.nodes()[0].contentDocument.body):H("body"),l=u==="sandbox"?o.select(`[id="${n}"]`):H(`[id="${n}"]`),h=(y==null?void 0:y.width)??p.width,x=(y==null?void 0:y.height)??p.width,_=(y==null?void 0:y.useMaxWidth)??p.useMaxWidth,g=(y==null?void 0:y.nodeAlignment)??p.nodeAlignment,v=(y==null?void 0:y.prefix)??p.prefix,T=(y==null?void 0:y.suffix)??p.suffix,A=(y==null?void 0:y.showValues)??p.showValues,M=(y==null?void 0:y.nodeWidth)??p.nodeWidth??10,I=(y==null?void 0:y.nodePadding)??p.nodePadding??12,N=(y==null?void 0:y.labelStyle)??p.labelStyle??"legacy",z=(y==null?void 0:y.nodeColors)??{},S=a.db.getGraph(),C=ae[g];Bt().nodeId(e=>e.id).nodeWidth(M).nodePadding(I+(A?15:0)).nodeAlign(C).extent([[0,0],[h,x]])(S);const D=le(S.nodes),V=Mt(Ct),O=d(e=>z[e]??V(e),"getNodeColor");l.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",e=>(e.uid=gt.next("node-")).id).attr("transform",function(e){return"translate("+e.x0+","+e.y0+")"}).attr("x",e=>e.x0).attr("y",e=>e.y0).append("rect").attr("height",e=>e.y1-e.y0).attr("width",e=>e.x1-e.x0).attr("fill",e=>O(e.id));const j=d(({id:e,value:r})=>A?`${e} +${v}${Math.round(r*100)/100}${T}`:e,"getText"),w=d(e=>N==="outlined"?(e.layer??0)P.selectAll(e?`.${e}`:"text").data(S.nodes).join("text").attr("class",e??null).attr("x",r=>w(r).x).attr("y",r=>(r.y1+r.y0)/2).attr("dy",`${A?"0":"0.35"}em`).attr("text-anchor",r=>w(r).anchor).text(j),"appendLabel");N==="outlined"?(E("sankey-label-bg"),E("sankey-label-fg")):E();const i=l.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(S.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),f=(y==null?void 0:y.linkColor)??"gradient";if(f==="gradient"){const e=i.append("linearGradient").attr("id",r=>(r.uid=gt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",r=>r.source.x1).attr("x2",r=>r.target.x0);e.append("stop").attr("offset","0%").attr("stop-color",r=>O(r.source.id)),e.append("stop").attr("offset","100%").attr("stop-color",r=>O(r.target.id))}let c;switch(f){case"gradient":c=d(e=>e.uid,"coloring");break;case"source":c=d(e=>O(e.source.id),"coloring");break;case"target":c=d(e=>O(e.target.id),"coloring");break;default:c=f}i.append("path").attr("d",Kt()).attr("stroke",c).attr("stroke-width",e=>Math.max(1,e.width)),Et(void 0,l,0,_)},"draw"),ue={draw:ce},he=d(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing"),fe=d(t=>`.label { + font-family: ${t.fontFamily}; + } + + .node-labels { + font-family: ${t.fontFamily}; + } + + /* Outlined label style - background stroke for better readability */ + .sankey-label-bg { + stroke: ${t.mainBkg||t.background||"#fff"}; + stroke-width: 4px; + stroke-linejoin: round; + paint-order: stroke; + } + + /* Foreground label text */ + .sankey-label-fg { + fill: ${t.textColor}; + } + + /* Node styling */ + .node rect { + shape-rendering: crispEdges; + } + + /* Link styling */ + .link { + fill: none; + stroke-opacity: 0.5; + mix-blend-mode: multiply; + } +`,"getStyles"),ye=fe,de=K.parse.bind(K);K.parse=t=>de(he(t));var xe={styles:ye,parser:K,db:oe,renderer:ue};export{xe as diagram}; diff --git a/dist/assets/sequenceDiagram-3UESZ5HK-D_-m6WNS.js b/dist/assets/sequenceDiagram-3UESZ5HK-D_-m6WNS.js new file mode 100644 index 0000000..c80338d --- /dev/null +++ b/dist/assets/sequenceDiagram-3UESZ5HK-D_-m6WNS.js @@ -0,0 +1,162 @@ +import{_ as g,n as er,c as j,d as Bt,l as st,j as Me,e as rr,f as ar,k as P,b as De,s as sr,p as ir,a as nr,g as or,q as cr,t as lr,J as hr,z as dr,i as Vt,u as Z,L as $,M as mt,N as Be,Z as Tr,D as Wt,O as pr,P as Ve}from"./index-mLPbTfpz.js";import{a as Er,b as re,g as dt,d as ur,e as ae,f as se}from"./chunk-ND2GUHAM-DRVGyKsL.js";import{I as fr}from"./chunk-QZHKN3VN-DFJ7UdTp.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var jt=function(){var e=g(function(ut,N,v,k){for(v=v||{},k=ut.length;k--;v[ut[k]]=N);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],E=[1,14],d=[1,15],l=[1,17],x=[1,18],u=[1,19],O=[1,25],p=[1,26],f=[1,27],_=[1,28],I=[1,29],L=[1,30],b=[1,31],m=[1,32],w=[1,33],S=[1,34],Y=[1,35],M=[1,36],V=[1,37],G=[1,38],W=[1,39],X=[1,40],Q=[1,42],z=[1,43],it=[1,44],tt=[1,45],nt=[1,46],K=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Pt=[1,74],A=[1,80],D=[1,81],et=[1,82],rt=[1,83],F=[1,84],ie=[1,85],ne=[1,86],oe=[1,87],ce=[1,88],le=[1,89],he=[1,90],de=[1,91],Te=[1,92],pe=[1,93],Ee=[1,94],ue=[1,95],fe=[1,96],_e=[1,97],ge=[1,98],xe=[1,99],Ie=[1,100],ye=[1,101],Re=[1,102],Oe=[1,103],Le=[1,104],be=[1,105],Ae=[2,78],St=[4,5,17,51,53,54],kt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],zt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],we=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ut=[5,52],q=[70,71,72,73],ct=[1,151],Gt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:g(function(N,v,k,y,U,c,wt){var T=c.length-1;switch(U){case 3:return y.apply(c[T]),c[T];case 4:case 10:this.$=[];break;case 5:case 11:c[T-1].push(c[T]),this.$=c[T-1];break;case 6:case 7:case 12:case 13:this.$=c[T];break;case 8:case 9:case 14:this.$=[];break;case 16:c[T].type="createParticipant",this.$=c[T];break;case 17:c[T-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[T-2])}),c[T-1].push({type:"boxEnd",boxText:c[T-2]}),this.$=c[T-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[T-2]),sequenceIndexStep:Number(c[T-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[T-1].actor};break;case 30:y.setDiagramTitle(c[T].substring(6)),this.$=c[T].substring(6);break;case 31:y.setDiagramTitle(c[T].substring(7)),this.$=c[T].substring(7);break;case 32:this.$=c[T].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[T].trim(),y.setAccDescription(this.$);break;case 35:c[T-1].unshift({type:"loopStart",loopText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.LOOP_START}),c[T-1].push({type:"loopEnd",loopText:c[T-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[T-1];break;case 36:c[T-1].unshift({type:"rectStart",color:y.parseMessage(c[T-2]),signalType:y.LINETYPE.RECT_START}),c[T-1].push({type:"rectEnd",color:y.parseMessage(c[T-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[T-1];break;case 37:c[T-1].unshift({type:"optStart",optText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.OPT_START}),c[T-1].push({type:"optEnd",optText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[T-1];break;case 38:c[T-1].unshift({type:"altStart",altText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.ALT_START}),c[T-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[T-1];break;case 39:c[T-1].unshift({type:"parStart",parText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.PAR_START}),c[T-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[T-1];break;case 40:c[T-1].unshift({type:"parStart",parText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[T-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[T-1];break;case 41:c[T-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.CRITICAL_START}),c[T-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[T-1];break;case 42:c[T-1].unshift({type:"breakStart",breakText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.BREAK_START}),c[T-1].push({type:"breakEnd",optText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[T-1];break;case 44:this.$=c[T-3].concat([{type:"option",optionText:y.parseMessage(c[T-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[T]]);break;case 46:this.$=c[T-3].concat([{type:"and",parText:y.parseMessage(c[T-1]),signalType:y.LINETYPE.PAR_AND},c[T]]);break;case 48:this.$=c[T-3].concat([{type:"else",altText:y.parseMessage(c[T-1]),signalType:y.LINETYPE.ALT_ELSE},c[T]]);break;case 49:c[T-3].draw="participant",c[T-3].type="addParticipant",c[T-3].description=y.parseMessage(c[T-1]),this.$=c[T-3];break;case 50:c[T-1].draw="participant",c[T-1].type="addParticipant",this.$=c[T-1];break;case 51:c[T-3].draw="actor",c[T-3].type="addParticipant",c[T-3].description=y.parseMessage(c[T-1]),this.$=c[T-3];break;case 52:case 57:c[T-1].draw="actor",c[T-1].type="addParticipant",this.$=c[T-1];break;case 53:c[T-1].type="destroyParticipant",this.$=c[T-1];break;case 54:c[T-3].draw="participant",c[T-3].type="addParticipant",c[T-3].description=y.parseMessage(c[T-1]),this.$=c[T-3];break;case 55:c[T-1].draw="participant",c[T-1].type="addParticipant",this.$=c[T-1];break;case 56:c[T-3].draw="actor",c[T-3].type="addParticipant",c[T-3].description=y.parseMessage(c[T-1]),this.$=c[T-3];break;case 58:this.$=[c[T-1],{type:"addNote",placement:c[T-2],actor:c[T-1].actor,text:c[T]}];break;case 59:c[T-2]=[].concat(c[T-1],c[T-1]).slice(0,2),c[T-2][0]=c[T-2][0].actor,c[T-2][1]=c[T-2][1].actor,this.$=[c[T-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[T-2].slice(0,2),text:c[T]}];break;case 60:this.$=[c[T-1],{type:"addLinks",actor:c[T-1].actor,text:c[T]}];break;case 61:this.$=[c[T-1],{type:"addALink",actor:c[T-1].actor,text:c[T]}];break;case 62:this.$=[c[T-1],{type:"addProperties",actor:c[T-1].actor,text:c[T]}];break;case 63:this.$=[c[T-1],{type:"addDetails",actor:c[T-1].actor,text:c[T]}];break;case 66:this.$=[c[T-2],c[T]];break;case 67:this.$=c[T];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[T-1].actor}];break;case 71:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[T-4].actor}];break;case 72:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[T-1].actor}];break;case 73:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-2],msg:c[T],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[T-4].actor}];break;case 74:this.$=[c[T-5],c[T-1],{type:"addMessage",from:c[T-5].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[T-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[T-5].actor}];break;case 75:this.$=[c[T-3],c[T-1],{type:"addMessage",from:c[T-3].actor,to:c[T-1].actor,signalType:c[T-2],msg:c[T]}];break;case 76:this.$={type:"addParticipant",actor:c[T-1],config:c[T]};break;case 77:this.$=c[T-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[T]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},e(C,[2,5]),{9:48,13:13,14:E,15:d,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:G,53:W,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:K},{23:56,73:K},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Pt},{23:75,55:76,73:Pt},{23:77,73:K},{69:78,72:[1,79],78:A,79:D,80:et,81:rt,82:F,83:ie,84:ne,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:K},{23:111,73:K},{23:112,73:K},{23:113,73:K},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Ae),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(kt,i,{7:120}),e(kt,i,{7:121}),e(kt,i,{7:122}),e(Se,i,{41:123,7:124}),e(zt,i,{43:125,7:126}),e(zt,i,{7:126,43:127}),e(we,i,{46:128,7:129}),e(kt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ut,Ae,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:K},{69:146,78:A,79:D,80:et,81:rt,82:F,83:ie,84:ne,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:K},{23:149,60:148,73:K},{73:[2,68]},{73:[2,69]},{58:150,104:ct},{58:152,104:ct},{58:153,104:ct},{58:154,104:ct},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:G,53:W,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[1,161],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[1,162],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[1,163],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[2,47],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,50:[1,165],51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[2,45],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,49:[1,167],51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[2,43],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,48:[1,170],51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[1,171],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Ut,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:K},{23:178,73:K},{23:179,73:K},{58:180,104:ct},{23:181,72:[1,182],73:K},{58:183,104:ct},{58:184,104:ct},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:G,53:W,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ct},{58:196,104:ct},{58:197,104:ct},{5:[2,75]},{58:198,104:ct},{23:199,73:K},{5:[2,58]},{5:[2,59]},{23:200,73:K},e(St,[2,12]),e(Se,i,{7:124,41:201}),e(zt,i,{7:126,43:202}),e(we,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Ut,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ct},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:g(function(N,v){if(v.recoverable)this.trace(N);else{var k=new Error(N);throw k.hash=v,k}},"parseError"),parse:g(function(N){var v=this,k=[0],y=[],U=[null],c=[],wt=this.table,T="",vt=0,Ne=0,Qe=2,me=1,$e=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(gt.yy[Xt]=this.yy[Xt]);J.setInput(N,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Jt=J.yylloc;c.push(Jt);var je=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tr(ot){k.length=k.length-2*ot,U.length=U.length-ot,c.length=c.length-ot}g(tr,"popStack");function Pe(){var ot;return ot=y.pop()||J.lex()||me,typeof ot!="number"&&(ot instanceof Array&&(y=ot,ot=y.pop()),ot=v.symbols_[ot]||ot),ot}g(Pe,"lex");for(var at,xt,lt,Zt,Ot={},Ct,Tt,ke,Mt;;){if(xt=k[k.length-1],this.defaultActions[xt]?lt=this.defaultActions[xt]:((at===null||typeof at>"u")&&(at=Pe()),lt=wt[xt]&&wt[xt][at]),typeof lt>"u"||!lt.length||!lt[0]){var Qt="";Mt=[];for(Ct in wt[xt])this.terminals_[Ct]&&Ct>Qe&&Mt.push("'"+this.terminals_[Ct]+"'");J.showPosition?Qt="Parse error on line "+(vt+1)+`: +`+J.showPosition()+` +Expecting `+Mt.join(", ")+", got '"+(this.terminals_[at]||at)+"'":Qt="Parse error on line "+(vt+1)+": Unexpected "+(at==me?"end of input":"'"+(this.terminals_[at]||at)+"'"),this.parseError(Qt,{text:J.match,token:this.terminals_[at]||at,line:J.yylineno,loc:Jt,expected:Mt})}if(lt[0]instanceof Array&<.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+at);switch(lt[0]){case 1:k.push(at),U.push(J.yytext),c.push(J.yylloc),k.push(lt[1]),at=null,Ne=J.yyleng,T=J.yytext,vt=J.yylineno,Jt=J.yylloc;break;case 2:if(Tt=this.productions_[lt[1]][1],Ot.$=U[U.length-Tt],Ot._$={first_line:c[c.length-(Tt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Tt||1)].first_column,last_column:c[c.length-1].last_column},je&&(Ot._$.range=[c[c.length-(Tt||1)].range[0],c[c.length-1].range[1]]),Zt=this.performAction.apply(Ot,[T,Ne,vt,gt.yy,lt[1],U,c].concat($e)),typeof Zt<"u")return Zt;Tt&&(k=k.slice(0,-1*Tt*2),U=U.slice(0,-1*Tt),c=c.slice(0,-1*Tt)),k.push(this.productions_[lt[1]][0]),U.push(Ot.$),c.push(Ot._$),ke=wt[k[k.length-2]][k[k.length-1]],k.push(ke);break;case 3:return!0}}return!0},"parse")},Ze=function(){var ut={EOF:1,parseError:g(function(v,k){if(this.yy.parser)this.yy.parser.parseError(v,k);else throw new Error(v)},"parseError"),setInput:g(function(N,v){return this.yy=v||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var v=N.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},"input"),unput:g(function(N){var v=N.length,k=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var y=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),k.length-1&&(this.yylineno-=k.length-1);var U=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:k?(k.length===y.length?this.yylloc.first_column:0)+y[y.length-k.length].length-k[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[U[0],U[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(N){this.unput(this.match.slice(N))},"less"),pastInput:g(function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var N=this.pastInput(),v=new Array(N.length+1).join("-");return N+this.upcomingInput()+` +`+v+"^"},"showPosition"),test_match:g(function(N,v){var k,y,U;if(this.options.backtrack_lexer&&(U={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&&(U.yylloc.range=this.yylloc.range.slice(0))),y=N[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,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(N[0].length),this.matched+=N[0],k=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var c in U)this[c]=U[c];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,v,k,y;this._more||(this.yytext="",this.match="");for(var U=this._currentRules(),c=0;cv[0].length)){if(v=k,y=c,this.options.backtrack_lexer){if(N=this.test_match(k,U[c]),N!==!1)return N;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(N=this.test_match(v,U[y]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var v=this.next();return v||this.lex()},"lex"),begin:g(function(v){this.conditionStack.push(v)},"begin"),popState:g(function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),pushState:g(function(v){this.begin(v)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:g(function(v,k,y,U){switch(y){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:return k.yytext=k.yytext.trim(),73;case 12:return k.yytext=k.yytext.trim(),this.begin("ALIAS"),73;case 13:return k.yytext=k.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return k.yytext=k.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return k.yytext=k.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return ut}();Gt.lexer=Ze;function Dt(){this.yy={}}return g(Dt,"Parser"),Dt.prototype=Gt,Gt.Parser=Dt,new Dt}();jt.parser=jt;var _r=jt,gr={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},xr={FILLED:0,OPEN:1},Ir={LEFTOF:0,RIGHTOF:1,OVER:2},Yt={ACTOR:"actor",CONTROL:"control",DATABASE:"database",ENTITY:"entity"},bt,yr=(bt=class{constructor(){this.state=new fr(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=De,this.setAccDescription=sr,this.setDiagramTitle=ir,this.getAccTitle=nr,this.getAccDescription=or,this.getDiagramTitle=cr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(j().wrap),this.LINETYPE=gr,this.ARROWTYPE=xr,this.PLACEMENT=Ir}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,a,r,i,n){let s=this.state.records.currentBox,o;if(n!==void 0){let d;n.includes(` +`)?d=n+` +`:d=`{ +`+n+` +}`,o=lr(d,{schema:hr})}i=(o==null?void 0:o.type)??i,o!=null&&o.alias&&(!r||r.text===a)&&(r={text:o.alias,wrap:r==null?void 0:r.wrap,type:i});const E=this.state.records.actors.get(t);if(E){if(this.state.records.currentBox&&E.box&&this.state.records.currentBox!==E.box)throw new Error(`A same participant should only be defined in one Box: ${E.name} can't be in '${E.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(s=E.box?E.box:this.state.records.currentBox,E.box=s,E&&a===E.name&&r==null)return}if((r==null?void 0:r.text)==null&&(r={text:a,type:i}),(i==null||r.text==null)&&(r={text:a,type:i}),this.state.records.actors.set(t,{box:s,name:a,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){const d=this.state.records.actors.get(this.state.records.prevActor);d&&(d.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let a,r=0;if(!t)return 0;for(a=0;a>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},E}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:a,message:(r==null?void 0:r.text)??"",wrap:(r==null?void 0:r.wrap)??this.autoWrap(),type:i,activate:n,centralConnection:s??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();const a=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(a===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:a}}autoWrap(){var t;return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:((t=j().sequence)==null?void 0:t.wrap)??!1}clear(){this.state.reset(),dr()}parseMessage(t){const a=t.trim(),{wrap:r,cleanedText:i}=this.extractWrap(a),n={text:i,wrap:r};return st.debug(`parseMessage: ${JSON.stringify(n)}`),n}parseBoxData(t){const a=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let r=a!=null&&a[1]?a[1].trim():"transparent",i=a!=null&&a[2]?a[2].trim():void 0;if(window!=null&&window.CSS)window.CSS.supports("color",r)||(r="transparent",i=t.trim());else{const o=new Option().style;o.color=r,o.color!==r&&(r="transparent",i=t.trim())}const{wrap:n,cleanedText:s}=this.extractWrap(i);return{text:s?Vt(s,j()):void 0,color:r,wrap:n}}addNote(t,a,r){const i={actor:t,placement:a,message:r.text,wrap:r.wrap??this.autoWrap()},n=[].concat(t,t);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:n[0],to:n[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:a})}addLinks(t,a){const r=this.getActor(t);try{let i=Vt(a.text,j());i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");const n=JSON.parse(i);this.insertLinks(r,n)}catch(i){st.error("error while parsing actor link text",i)}}addALink(t,a){const r=this.getActor(t);try{const i={};let n=Vt(a.text,j());const s=n.indexOf("@");n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");const o=n.slice(0,s-1).trim(),E=n.slice(s+1).trim();i[o]=E,this.insertLinks(r,i)}catch(i){st.error("error while parsing actor link text",i)}}insertLinks(t,a){if(t.links==null)t.links=a;else for(const r in a)t.links[r]=a[r]}addProperties(t,a){const r=this.getActor(t);try{const i=Vt(a.text,j()),n=JSON.parse(i);this.insertProperties(r,n)}catch(i){st.error("error while parsing actor properties text",i)}}insertProperties(t,a){if(t.properties==null)t.properties=a;else for(const r in a)t.properties[r]=a[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,a){const r=this.getActor(t),i=document.getElementById(a.text);try{const n=i.innerHTML,s=JSON.parse(n);s.properties&&this.insertProperties(r,s.properties),s.links&&this.insertLinks(r,s.links)}catch(n){st.error("error while parsing actor details text",n)}}getActorProperty(t,a){if((t==null?void 0:t.properties)!==void 0)return t.properties[a]}apply(t){if(Array.isArray(t))t.forEach(a=>{this.apply(a)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnection":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnectionReverse":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":De(t.text);break;case"parStart":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break}}getConfig(){return j().sequence}},g(bt,"SequenceDB"),bt),Rr=g(e=>{const t=e.dropShadow??"none",{look:a}=j();return`.actor { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + stroke-width: ${e.strokeWidth??1}; + } + + rect.actor.outer-path[data-look="neo"] { + filter: ${t}; + } + + rect.note[data-look="neo"] { + stroke:${e.noteBorderColor}; + fill:${e.noteBkgColor}; + filter: ${t}; + } + + text.actor > tspan { + fill: ${e.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${e.actorLineColor}; + } + + .innerArc { + stroke-width: 1.5; + stroke-dasharray: none; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${e.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${e.signalColor}; + } + + [id$="-arrowhead"] path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .sequenceNumber { + fill: ${e.sequenceNumberColor}; + } + + [id$="-sequencenumber"] { + fill: ${e.signalColor}; + } + + [id$="-crosshead"] path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .messageText { + fill: ${e.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBkgColor}; + filter: ${a==="neo"?t:"none"}; + } + + .labelText, .labelText > tspan { + fill: ${e.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${e.loopTextColor}; + stroke: none; + } + + .sectionTitle, .sectionTitle > tspan { + fill: ${e.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${e.noteTextColor}; + stroke: none; + ${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:""} + } + + .activation0 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation1 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation2 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${e.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man circle, line { + fill: ${e.actorBkg}; + stroke-width: 2px; + } + + g rect.rect { + filter: ${t}; + stroke: ${e.nodeBorder}; + } +`},"getStyles"),Or=Rr,It=18*2,ft="actor-top",_t="actor-bottom",Ft="actor-box",yt="actor-man",pt=new Set(["redux-color","redux-dark-color"]),Nt=g(function(e,t){const a=ur(e,t);return Wt().look==="neo"&&a.attr("data-look","neo"),a},"drawRect"),Lr=g(function(e,t,a,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const n=t.links,s=t.actorCnt,o=t.rectData;var E="none";i&&(E="block !important");const d=e.append("g");d.attr("id","actor"+s+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",E);var l="";o.class!==void 0&&(l=" "+o.class);let x=o.width>a?o.width:a;const u=d.append("rect");if(u.attr("class","actorPopupMenuPanel"+l),u.attr("x",o.x),u.attr("y",o.height),u.attr("fill",o.fill),u.attr("stroke",o.stroke),u.attr("width",x),u.attr("height",o.height),u.attr("rx",o.rx),u.attr("ry",o.ry),n!=null){var O=20;for(let _ in n){var p=d.append("a"),f=Me.sanitizeUrl(n[_]);p.attr("xlink:href",f),p.attr("target","_blank"),Gr(r)(_,p,o.x+10,o.height+O,x,20,{class:"actor"},r),O+=30}}return u.attr("height",O),{height:o.height+O,width:x}},"drawPopup"),qt=g(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Kt=g(async function(e,t,a=null){let r=e.append("foreignObject");const i=await Ve(t.text,Wt()),s=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(r.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),t.class==="noteText"){const o=e.node().firstChild;o.setAttribute("height",s.height+2*t.textMargin);const E=o.getBBox();r.attr("x",Math.round(E.x+E.width/2-s.width/2)).attr("y",Math.round(E.y+E.height/2-s.height/2))}else if(a){let{startx:o,stopx:E,starty:d}=a;if(o>E){const l=o;o=E,E=l}r.attr("x",Math.round(o+Math.abs(o-E)/2-s.width/2)),t.class==="loopText"?r.attr("y",Math.round(d)):r.attr("y",Math.round(d-s.height))}return[r]},"drawKatex"),At=g(function(e,t){let a=0,r=0;const i=t.text.split(P.lineBreakRegex),[n,s]=Be(t.fontSize);let o=[],E=0,d=g(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":d=g(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":d=g(()=>Math.round(t.y+(a+r+t.textMargin)/2),"yfunc");break;case"bottom":case"end":d=g(()=>Math.round(t.y+(a+r+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[l,x]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&n!==void 0&&(E=l*n);const u=e.append("text");u.attr("x",t.x),u.attr("y",d()),t.anchor!==void 0&&u.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&u.style("font-family",t.fontFamily),s!==void 0&&u.style("font-size",s),t.fontWeight!==void 0&&u.style("font-weight",t.fontWeight),t.fill!==void 0&&u.attr("fill",t.fill),t.class!==void 0&&u.attr("class",t.class),t.dy!==void 0?u.attr("dy",t.dy):E!==0&&u.attr("dy",E);const O=x||Tr;if(t.tspan){const p=u.append("tspan");p.attr("x",t.x),t.fill!==void 0&&p.attr("fill",t.fill),p.text(O)}else u.text(O);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(u._groups||u)[0][0].getBBox().height,a=r),o.push(u)}return o},"drawText"),Ye=g(function(e,t){function a(i,n,s,o,E){return i+","+n+" "+(i+s)+","+n+" "+(i+s)+","+(n+o-E)+" "+(i+s-E*1.2)+","+(n+o)+" "+i+","+(n+o)}g(a,"genPoints");const r=e.append("polygon");return r.attr("points",a(t.x,t.y,t.width,t.height,7)),r.attr("class","labelBox"),t.y=t.y+t.height/2,At(e,t),r},"drawLabel"),B=-1,We=g((e,t,a,r)=>{e.select&&a.forEach(i=>{const n=t.get(i),s=e.select("#actor"+n.actorCnt);!r.mirrorActors&&n.stopy?s.attr("y2",n.stopy+n.height/2):r.mirrorActors&&s.attr("y2",n.stopy)})},"fixLifeLineHeights"),br=g(function(e,t,a,r,i){var m,w;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height,{look:E,theme:d,themeVariables:l}=a,{bkgColorArray:x,borderColorArray:u}=l,O=e.append("g").lower();var p=O;r||(B++,Object.keys(t.links||{}).length&&!a.forceMenus&&p.attr("onclick",qt(`actor${B}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+B).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),p=O.append("g"),t.actorCnt=B,t.links!=null&&p.attr("id","root-"+B),E==="neo"&&p.attr("data-look","neo"));const f=dt();var _="actor";(m=t.properties)!=null&&m.class?_=t.properties.class:f.fill="#eaeaea",r?_+=` ${_t}`:_+=` ${ft}`,f.x=t.x,f.y=n,f.width=t.width,f.height=t.height,f.class=_,f.rx=3,f.ry=3,f.name=t.name,E==="neo"&&(f.rx=6,f.ry=6);const I=Nt(p,f),L=i.get(t.name)??0;if(pt.has(d)&&(I.style("stroke",u[L%u.length]),I.style("fill",x[L%u.length])),E==="neo"&&I.attr("filter","url(#drop-shadow)"),t.rectData=f,(w=t.properties)!=null&&w.icon){const S=t.properties.icon.trim();S.charAt(0)==="@"?ae(p,f.x+f.width-20,f.y+10,S.substr(1)):se(p,f.x+f.width-20,f.y+10,S)}r||(p.attr("data-et","participant"),p.attr("data-type","participant"),p.attr("data-id",t.name)),Et(a,$(t.description))(t.description,p,f.x,f.y,f.width,f.height,{class:`actor ${Ft}`},a);let b=t.height;if(I.node){const S=I.node().getBBox();t.height=S.height,b=S.height}return b},"drawActorTypeParticipant"),Ar=g(function(e,t,a,r,i){var Y,M;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height,{look:E,theme:d,themeVariables:l}=a,{bkgColorArray:x,borderColorArray:u}=l,O=e.append("g").lower();var p=O;r||(B++,Object.keys(t.links||{}).length&&!a.forceMenus&&p.attr("onclick",qt(`actor${B}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+B).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),p=O.append("g"),t.actorCnt=B,t.links!=null&&p.attr("id","root-"+B),E==="neo"&&p.attr("data-look","neo"));const f=dt();var _="actor";(Y=t.properties)!=null&&Y.class?_=t.properties.class:f.fill="#eaeaea",r?_+=` ${_t}`:_+=` ${ft}`,f.x=t.x,f.y=n,f.width=t.width,f.height=t.height,f.class=_,f.name=t.name;const I=6,L={...f,x:f.x+-I,y:f.y+ +I,class:"actor"},b=Nt(p,f),m=Nt(p,L);t.rectData=f,E==="neo"&&p.attr("filter","url(#drop-shadow)");const w=i.get(t.name)??0;if(pt.has(d)&&(b.style("stroke",u[w%u.length]),b.style("fill",x[w%u.length]),m.style("stroke",u[w%u.length]),m.style("fill",x[w%u.length])),(M=t.properties)!=null&&M.icon){const V=t.properties.icon.trim();V.charAt(0)==="@"?ae(p,f.x+f.width-20,f.y+10,V.substr(1)):se(p,f.x+f.width-20,f.y+10,V)}Et(a,$(t.description))(t.description,p,f.x-I,f.y+I,f.width,f.height,{class:`actor ${Ft}`},a);let S=t.height;if(b.node){const V=b.node().getBBox();t.height=V.height,S=V.height}return r||(p.attr("data-et","participant"),p.attr("data-type","collections"),p.attr("data-id",t.name)),S},"drawActorTypeCollections"),Sr=g(function(e,t,a,r,i){var V,G;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height,{look:E,theme:d,themeVariables:l}=a,{bkgColorArray:x,borderColorArray:u}=l,O=e.append("g").lower();let p=O;r||(B++,Object.keys(t.links||{}).length&&!a.forceMenus&&p.attr("onclick",qt(`actor${B}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+B).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),p=O.append("g"),t.actorCnt=B,t.links!=null&&p.attr("id","root-"+B),E==="neo"&&p.attr("data-look","neo"));const f=dt();let _="actor";(V=t.properties)!=null&&V.class?_=t.properties.class:f.fill="#eaeaea",r?_+=` ${_t}`:_+=` ${ft}`,p.attr("class",_),f.x=t.x,f.y=n,f.width=t.width,f.height=t.height,f.name=t.name;const I=f.height/2,L=I/(2.5+f.height/50),b=p.append("g"),m=p.append("g"),w=`M ${f.x},${f.y+I} + a ${L},${I} 0 0 0 0,${f.height} + h ${f.width-2*L} + a ${L},${I} 0 0 0 0,-${f.height} + Z + `;b.append("path").attr("d",w),m.append("path").attr("d",`M ${f.x},${f.y+I} + a ${L},${I} 0 0 0 0,${f.height}`),b.attr("transform",`translate(${L}, ${-(f.height/2)})`),m.attr("transform",`translate(${f.width-L}, ${-f.height/2})`),t.rectData=f,E==="neo"&&b.attr("filter","url(#drop-shadow)");const S=i.get(t.name)??0;if(pt.has(d)&&(b.style("stroke",u[S%u.length]),b.style("fill",x[S%u.length]),m.style("stroke",u[S%u.length]),m.style("fill",x[S%u.length])),(G=t.properties)!=null&&G.icon){const W=t.properties.icon.trim(),X=f.x+f.width-20,Q=f.y+10;W.charAt(0)==="@"?ae(p,X,Q,W.substr(1)):se(p,X,Q,W)}Et(a,$(t.description))(t.description,p,f.x,f.y,f.width,f.height,{class:`actor ${Ft}`},a);let Y=t.height;const M=b.select("path:last-child");if(M.node()){const W=M.node().getBBox();t.height=W.height,Y=W.height}return r||(p.attr("data-et","participant"),p.attr("data-type","queue"),p.attr("data-id",t.name)),Y},"drawActorTypeQueue"),wr=g(function(e,t,a,r,i,n){var V;const s=r?t.stopy:t.starty,o=t.x+t.width/2,E=s+75,{look:d,theme:l,themeVariables:x}=a,{bkgColorArray:u,borderColorArray:O,actorBorder:p,actorBkg:f}=x,_=e.append("g").lower();r||(B++,_.append("line").attr("id","actor"+B).attr("x1",o).attr("y1",E).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);const I=e.append("g");let L=yt;r?L+=` ${_t}`:L+=` ${ft}`,I.attr("class",L),I.attr("name",t.name);const b=dt();b.x=t.x,b.y=s,b.fill="#eaeaea",b.width=t.width,b.height=t.height,b.class="actor";const m=t.x+t.width/2,w=s+32,S=22;I.append("defs").append("marker").attr("id",i+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),I.append("circle").attr("cx",m).attr("cy",w).attr("r",S).attr("filter",`${d==="neo"?"url(#drop-shadow)":""}`),I.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${m}, ${w-S})`);const Y=n.get(t.name)??0;pt.has(l)?(I.style("stroke",O[Y%O.length]),I.style("fill",u[Y%O.length])):(I.style("stroke",p),I.style("fill",f));const M=I.node().getBBox();return t.height=M.height+2*(((V=a==null?void 0:a.sequence)==null?void 0:V.labelBoxHeight)??0),Et(a,$(t.description))(t.description,I,b.x,b.y+S+(r?5:12),b.width,b.height,{class:`actor ${yt}`},a),r||(I.attr("data-et","participant"),I.attr("data-type","control"),I.attr("data-id",t.name)),t.height},"drawActorTypeControl"),Nr=g(function(e,t,a,r,i){var S;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+75,{look:E,theme:d,themeVariables:l}=a,{bkgColorArray:x,borderColorArray:u}=l,O=e.append("g").lower(),p=e.append("g");let f="actor";r?f+=` ${_t}`:f+=` ${ft}`,p.attr("class",f),p.attr("name",t.name);const _=dt();_.x=t.x,_.y=n,_.fill="#eaeaea",_.width=t.width,_.height=t.height,_.class="actor";const I=t.x+t.width/2,L=n+(r?10:25),b=22;p.append("circle").attr("cx",I).attr("cy",L).attr("r",b).attr("width",t.width).attr("height",t.height),p.append("line").attr("x1",I-b).attr("x2",I+b).attr("y1",L+b).attr("y2",L+b).attr("stroke-width",2),E==="neo"&&p.attr("filter","url(#drop-shadow)");const m=i.get(t.name)??0;pt.has(d)&&(p.style("stroke",u[m%u.length]),p.style("fill",x[m%u.length]));const w=p.node().getBBox();return t.height=w.height+(((S=a==null?void 0:a.sequence)==null?void 0:S.labelBoxHeight)??0),r||(B++,O.append("line").attr("id","actor"+B).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B),Et(a,$(t.description))(t.description,p,_.x,_.y+(r?15:30),_.width,_.height,{class:`actor ${yt}`},a),r?p.attr("transform",`translate(0, ${b})`):(p.attr("transform",`translate(0, ${b/2-5})`),p.attr("data-et","participant"),p.attr("data-type","entity"),p.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),mr=g(function(e,t,a,r,i){var G;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height+2*a.boxTextMargin,{theme:E,themeVariables:d,look:l}=a,{bkgColorArray:x,borderColorArray:u,actorBorder:O}=d,p=e.append("g").lower();let f=p;r||(B++,Object.keys(t.links||{}).length&&!a.forceMenus&&f.attr("onclick",qt(`actor${B}_popup`)).attr("cursor","pointer"),f.append("line").attr("id","actor"+B).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),f=p.append("g"),t.actorCnt=B,t.links!=null&&f.attr("id","root-"+B),l==="neo"&&f.attr("data-look","neo"));const _=dt();let I="actor";(G=t.properties)!=null&&G.class?I=t.properties.class:_.fill="#eaeaea",r?I+=` ${_t}`:I+=` ${ft}`,_.x=t.x,_.y=n,_.width=t.width,_.height=t.height,_.class=I,_.name=t.name,_.x=t.x,_.y=n;const L=_.width/3,b=_.width/3,m=L/2,w=m/(2.5+L/50),S=f.append("g");S.attr("class",I);const Y=` + M ${_.x},${_.y+w} + a ${m},${w} 0 0 0 ${L},0 + a ${m},${w} 0 0 0 -${L},0 + l 0,${b-2*w} + a ${m},${w} 0 0 0 ${L},0 + l 0,-${b-2*w} +`;S.append("path").attr("d",Y),l==="neo"&&S.attr("filter","url(#drop-shadow)");const M=i.get(t.name)??0;pt.has(E)?(S.style("stroke",u[M%u.length]),S.style("fill",x[M%u.length])):S.style("stroke",O),S.attr("transform",`translate(${L}, ${w})`),t.rectData=_,Et(a,$(t.description))(t.description,f,_.x,_.y+35,_.width,_.height,{class:`actor ${Ft}`},a);const V=S.select("path:last-child");if(V.node()){const W=V.node().getBBox();t.height=W.height+(a.sequence.labelBoxHeight??0)}return r||(f.attr("data-et","participant"),f.attr("data-type","database"),f.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),Pr=g(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+80,E=22,d=e.append("g").lower(),{look:l,theme:x,themeVariables:u}=a,{bkgColorArray:O,borderColorArray:p,actorBorder:f}=u;r||(B++,d.append("line").attr("id","actor"+B).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);const _=e.append("g");let I=yt;r?I+=` ${_t}`:I+=` ${ft}`,_.attr("class",I),_.attr("name",t.name);const L=dt();L.x=t.x,L.y=n,L.fill="#eaeaea",L.width=t.width,L.height=t.height,L.class="actor",_.append("line").attr("id","actor-man-torso"+B).attr("x1",t.x+t.width/2-E*2.5).attr("y1",n+12).attr("x2",t.x+t.width/2-15).attr("y2",n+12),_.append("line").attr("id","actor-man-arms"+B).attr("x1",t.x+t.width/2-E*2.5).attr("y1",n+2).attr("x2",t.x+t.width/2-E*2.5).attr("y2",n+22),_.append("circle").attr("cx",t.x+t.width/2).attr("cy",n+12).attr("r",E),l==="neo"&&_.attr("filter","url(#drop-shadow)");const b=i.get(t.name)??0;pt.has(x)?(_.style("stroke",p[b%p.length]),_.style("fill",O[b%p.length])):_.style("stroke",f);const m=_.node().getBBox();return t.height=m.height+(a.sequence.labelBoxHeight??0),Et(a,$(t.description))(t.description,_,L.x,L.y+15,L.width,L.height,{class:`actor ${yt}`},a),_.attr("transform",`translate(0,${E/2+10})`),r||(_.attr("data-et","participant"),_.attr("data-type","boundary"),_.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),kr=g(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+80,{look:E,theme:d,themeVariables:l}=a,{bkgColorArray:x,borderColorArray:u,actorBorder:O}=l,p=e.append("g").lower();r||(B++,p.append("line").attr("id","actor"+B).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);const f=e.append("g");let _=yt;r?_+=` ${_t}`:_+=` ${ft}`,f.attr("class",_),f.attr("name",t.name),r||f.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);const I=E==="neo"?.5:1,L=E==="neo"?n+(1-I)*30:n;f.append("line").attr("id","actor-man-torso"+B).attr("x1",s).attr("y1",L+25*I).attr("x2",s).attr("y2",L+45*I),f.append("line").attr("id","actor-man-arms"+B).attr("x1",s-It/2*I).attr("y1",L+33*I).attr("x2",s+It/2*I).attr("y2",L+33*I),f.append("line").attr("x1",s-It/2*I).attr("y1",L+60*I).attr("x2",s).attr("y2",L+45*I),f.append("line").attr("x1",s).attr("y1",L+45*I).attr("x2",s+(It/2-2)*I).attr("y2",L+60*I);const b=f.append("circle");b.attr("cx",t.x+t.width/2),b.attr("cy",L+10*I),b.attr("r",15*I),b.attr("width",t.width*I),b.attr("height",t.height*I);const m=f.node().getBBox();t.height=m.height;const w=dt();w.x=t.x,w.y=L,w.fill="#eaeaea",w.width=t.width,w.height=t.height/I,w.class="actor",w.rx=3,w.ry=3;const S=i.get(t.name)??0;return pt.has(d)?(f.style("stroke",u[S%u.length]),f.style("fill",x[S%u.length])):f.style("stroke",O),Et(a,$(t.description))(t.description,f,w.x,L+35*I-(E==="neo"?10:0),w.width,w.height,{class:`actor ${yt}`},a),t.height},"drawActorTypeActor"),Dr=g(async function(e,t,a,r,i,n,s){const o=s??new Map([...n.db.getActors().values()].map((E,d)=>[E.name,d]));switch(t.type){case"actor":return await kr(e,t,a,r,o);case"participant":return await br(e,t,a,r,o);case"boundary":return await Pr(e,t,a,r,o);case"control":return await wr(e,t,a,r,i,o);case"entity":return await Nr(e,t,a,r,o);case"database":return await mr(e,t,a,r,o);case"collections":return await Ar(e,t,a,r,o);case"queue":return await Sr(e,t,a,r,o)}},"drawActor"),vr=g(function(e,t,a){const i=e.append("g");Ke(i,t),t.name&&Et(a)(t.name,i,t.x,t.y+a.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},a),i.lower()},"drawBox"),Cr=g(function(e){return e.append("g")},"anchorElement"),Mr=g(function(e,t,a,r,i,n,s){const{theme:o,themeVariables:E}=r,{bkgColorArray:d,borderColorArray:l,mainBkg:x}=E,u=dt(),O=t.anchored,p=t.actor;u.x=t.startx,u.y=t.starty,u.class="activation"+i%3,u.width=t.stopx-t.startx,u.height=a-t.starty;const f=Nt(O,u),I=(s??new Map([...n.db.getActors().values()].map((L,b)=>[L.name,b]))).get(p)??0;pt.has(o)&&(f.style("stroke",l[I%l.length]),f.style("fill",d[I%l.length]??x))},"drawActivation"),Br=g(async function(e,t,a,r,i){const{boxMargin:n,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:E,messageFontFamily:d,messageFontSize:l,messageFontWeight:x}=r,u=e.append("g").attr("data-et","control-structure").attr("data-id","i"+i.id),O=g(function(_,I,L,b){return u.append("line").attr("x1",_).attr("y1",I).attr("x2",L).attr("y2",b).attr("class","loopLine")},"drawLoopLine");O(t.startx,t.starty,t.stopx,t.starty),O(t.stopx,t.starty,t.stopx,t.stopy),O(t.startx,t.stopy,t.stopx,t.stopy),O(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(_){O(t.startx,_.y,t.stopx,_.y).style("stroke-dasharray","3, 3")});let p=re();p.text=a,p.x=t.startx,p.y=t.starty,p.fontFamily=d,p.fontSize=l,p.fontWeight=x,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=Math.max(E??0,50),p.height=o+(r.look==="neo"?15:0)||20,p.textMargin=s,p.class="labelText",Ye(u,p),p=Fe(),p.text=t.title,p.x=t.startx+E/2+(t.stopx-t.startx)/2,p.y=t.starty+n+s,p.anchor="middle",p.valign="middle",p.textMargin=s,p.class="loopText",p.fontFamily=d,p.fontSize=l,p.fontWeight=x,p.wrap=!0;let f=$(p.text)?await Kt(u,p,t):At(u,p);if(t.sectionTitles!==void 0){for(const[_,I]of Object.entries(t.sectionTitles))if(I.message){p.text=I.message,p.x=t.startx+(t.stopx-t.startx)/2,p.y=t.sections[_].y+n+s,p.class="sectionTitle",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=d,p.fontSize=l,p.fontWeight=x,p.wrap=t.wrap,$(p.text)?(t.starty=t.sections[_].y,await Kt(u,p,t)):At(u,p);let L=Math.round(f.map(b=>(b._groups||b)[0][0].getBBox().height).reduce((b,m)=>b+m));t.sections[_].height+=L-(n+s)}}return t.height=Math.round(t.stopy-t.starty),u},"drawLoop"),Ke=g(function(e,t){Er(e,t)},"drawBackgroundRect"),Vr=g(function(e,t){e.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Yr=g(function(e,t){e.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Wr=g(function(e,t){e.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Kr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Fr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),qr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),Hr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),zr=g(function(e,t){const{theme:a}=t;e.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a==="redux"||a==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),Fe=g(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),Ur=g(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Et=function(){function e(n,s,o,E,d,l,x){const u=s.append("text").attr("x",o+d/2).attr("y",E+l/2+5).style("text-anchor","middle").text(n);i(u,x)}g(e,"byText");function t(n,s,o,E,d,l,x,u){const{actorFontSize:O,actorFontFamily:p,actorFontWeight:f}=u,[_,I]=Be(O),L=n.split(P.lineBreakRegex);for(let b=0;be.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:g(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:g(function(e){this.boxes.push(e)},"addBox"),addActor:g(function(e){this.actors.push(e)},"addActor"),addLoop:g(function(e){this.loops.push(e)},"addLoop"),addMessage:g(function(e){this.messages.push(e)},"addMessage"),addNote:g(function(e){this.notes.push(e)},"addNote"),lastActor:g(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:g(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:g(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:g(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:g(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,ze(j())},"init"),updateVal:g(function(e,t,a,r){e[t]===void 0?e[t]=a:e[t]=r(a,e[t])},"updateVal"),updateBounds:g(function(e,t,a,r){const i=this;let n=0;function s(o){return g(function(d){n++;const l=i.sequenceItems.length-n+1;i.updateVal(d,"starty",t-l*h.boxMargin,Math.min),i.updateVal(d,"stopy",r+l*h.boxMargin,Math.max),i.updateVal(R.data,"startx",e-l*h.boxMargin,Math.min),i.updateVal(R.data,"stopx",a+l*h.boxMargin,Math.max),o!=="activation"&&(i.updateVal(d,"startx",e-l*h.boxMargin,Math.min),i.updateVal(d,"stopx",a+l*h.boxMargin,Math.max),i.updateVal(R.data,"starty",t-l*h.boxMargin,Math.min),i.updateVal(R.data,"stopy",r+l*h.boxMargin,Math.max))},"updateItemBounds")}g(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:g(function(e,t,a,r){const i=P.getMin(e,a),n=P.getMax(e,a),s=P.getMin(t,r),o=P.getMax(t,r);this.updateVal(R.data,"startx",i,Math.min),this.updateVal(R.data,"starty",s,Math.min),this.updateVal(R.data,"stopx",n,Math.max),this.updateVal(R.data,"stopy",o,Math.max),this.updateBounds(i,s,n,o)},"insert"),newActivation:g(function(e,t,a){const r=a.get(e.from),i=Ht(e.from).length||0,n=r.x+r.width/2+(i-1)*h.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+h.activationWidth,stopy:void 0,actor:e.from,anchored:H.anchorElement(t)})},"newActivation"),endActivation:g(function(e){const t=this.activations.map(function(a){return a.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:g(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:g(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:g(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:g(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:g(function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:R.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:g(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:g(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:g(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=P.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:g(function(){return this.verticalPos},"getVerticalPos"),getBounds:g(function(){return{bounds:this.data,models:this.models}},"getBounds")},$r=g(async function(e,t,a){R.bumpVerticalPos(h.boxMargin),t.height=h.boxMargin,t.starty=R.getVerticalPos();const r=dt();r.x=t.startx,r.y=t.starty,r.width=t.width||h.width,r.class="note";const i=e.append("g");i.attr("data-et","note"),i.attr("data-id","i"+a);const n=H.drawRect(i,r),s=re();s.x=t.startx,s.y=t.starty,s.width=r.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=h.noteFontFamily,s.fontSize=h.noteFontSize,s.fontWeight=h.noteFontWeight,s.anchor=h.noteAlign,s.textMargin=h.noteMargin,s.valign="center";const o=$(s.text)?await Kt(i,s):At(i,s),E=Math.round(o.map(d=>(d._groups||d)[0][0].getBBox().height).reduce((d,l)=>d+l));n.attr("height",E+2*h.noteMargin),t.height+=E+2*h.noteMargin,R.bumpVerticalPos(E+2*h.noteMargin),t.stopy=t.starty+E+2*h.noteMargin,t.stopx=t.startx+r.width,R.insert(t.startx,t.starty,t.stopx,t.stopy),R.models.addNote(t)},"drawNote"),ve=g(function(e,t,a,r,i,n,s){const o=r.db.getActors(),E=o.get(t.from),d=o.get(t.to),l=a.sequenceVisible;let x=E.x+E.width/2,u=d.x+d.width/2;const O=x<=u,p=Je(t,r),f=e.append("g"),_=16.5,I=g((S,Y)=>{const M=S?_:-_;return Y?-M:M},"getCircleOffset"),L=g(S=>{f.append("circle").attr("cx",S).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:b,CENTRAL_CONNECTION_REVERSE:m,CENTRAL_CONNECTION_DUAL:w}=r.db.LINETYPE;if(l)switch(t.centralConnection){case b:p&&(u+=I(O,!0));break;case m:p||(x+=I(O,!1));break;case w:p?u+=I(O,!0):x+=I(O,!1);break}switch(t.centralConnection){case b:L(u);break;case m:L(x);break;case w:L(x),L(u);break}},"drawCentralConnection"),Rt=g(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),Lt=g(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),te=g(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function qe(e,t){R.bumpVerticalPos(10);const{startx:a,stopx:r,message:i}=t,n=P.splitBreaks(i).length,s=$(i),o=s?await mt(i,j()):Z.calculateTextDimensions(i,Rt(h));if(!s){const x=o.height/n;t.height+=x,R.bumpVerticalPos(x)}let E,d=o.height-10;const l=o.width;if(a===r){E=R.getVerticalPos()+d,h.rightAngles||(d+=h.boxMargin,E=R.getVerticalPos()+d),d+=30;const x=P.getMax(l/2,h.width/2);R.insert(a-x,R.getVerticalPos()-10+d,r+x,R.getVerticalPos()+30+d)}else d+=h.boxMargin,E=R.getVerticalPos()+d,R.insert(a,E-10,r,E);return R.bumpVerticalPos(d),t.height+=d,t.stopy=t.starty+t.height,R.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),E}g(qe,"boundMessage");var jr=g(async function(e,t,a,r,i,n){const{startx:s,stopx:o,starty:E,message:d,type:l,sequenceIndex:x,sequenceVisible:u}=t,O=Z.calculateTextDimensions(d,Rt(h)),p=re();p.x=Math.min(s,o),p.y=E+10,p.width=Math.abs(o-s),p.class="messageText",p.dy="1em",p.text=d,p.fontFamily=h.messageFontFamily,p.fontSize=h.messageFontSize,p.fontWeight=h.messageFontWeight,p.anchor=h.messageAlign,p.valign="center",p.textMargin=h.wrapPadding,p.tspan=!1,$(p.text)?await Kt(e,p,{startx:s,stopx:o,starty:a}):At(e,p);const f=O.width;let _;if(s===o){const L=u||h.showSequenceNumbers,b=Je(i,r),m=na(i,r),w=s+(L&&(b||m)?10:0);h.rightAngles?_=e.append("path").attr("d",`M ${w},${a} H ${s+P.getMax(h.width/2,f/2)} V ${a+25} H ${s}`):_=e.append("path").attr("d","M "+w+","+a+" C "+(w+60)+","+(a-10)+" "+(s+60)+","+(a+30)+" "+s+","+(a+20)),$t(i,r)&&ve(e,i,t,r,s,o,a)}else _=e.append("line"),_.attr("x1",s),_.attr("y1",a),_.attr("x2",o),_.attr("y2",a),$t(i,r)&&ve(e,i,t,r,s,o,a);l===r.db.LINETYPE.DOTTED||l===r.db.LINETYPE.DOTTED_CROSS||l===r.db.LINETYPE.DOTTED_POINT||l===r.db.LINETYPE.DOTTED_OPEN||l===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||l===r.db.LINETYPE.SOLID_TOP_DOTTED||l===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||l===r.db.LINETYPE.STICK_TOP_DOTTED||l===r.db.LINETYPE.STICK_BOTTOM_DOTTED||l===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||l===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||l===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||l===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(_.style("stroke-dasharray","3, 3"),_.attr("class","messageLine1")):_.attr("class","messageLine0"),_.attr("data-et","message"),_.attr("data-id","i"+t.id),_.attr("data-from",t.from),_.attr("data-to",t.to);let I="";if(h.arrowMarkerAbsolute&&(I=pr(!0)),_.attr("stroke-width",2),_.attr("stroke","none"),_.style("fill","none"),(l===r.db.LINETYPE.SOLID_TOP||l===r.db.LINETYPE.SOLID_TOP_DOTTED)&&_.attr("marker-end","url("+I+"#"+n+"-solidTopArrowHead)"),(l===r.db.LINETYPE.SOLID_BOTTOM||l===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&_.attr("marker-end","url("+I+"#"+n+"-solidBottomArrowHead)"),(l===r.db.LINETYPE.STICK_TOP||l===r.db.LINETYPE.STICK_TOP_DOTTED)&&_.attr("marker-end","url("+I+"#"+n+"-stickTopArrowHead)"),(l===r.db.LINETYPE.STICK_BOTTOM||l===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&_.attr("marker-end","url("+I+"#"+n+"-stickBottomArrowHead)"),(l===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||l===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&_.attr("marker-start","url("+I+"#"+n+"-solidBottomArrowHead)"),(l===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||l===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&_.attr("marker-start","url("+I+"#"+n+"-solidTopArrowHead)"),(l===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||l===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&_.attr("marker-start","url("+I+"#"+n+"-stickBottomArrowHead)"),(l===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||l===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&_.attr("marker-start","url("+I+"#"+n+"-stickTopArrowHead)"),(l===r.db.LINETYPE.SOLID||l===r.db.LINETYPE.DOTTED)&&_.attr("marker-end","url("+I+"#"+n+"-arrowhead)"),(l===r.db.LINETYPE.BIDIRECTIONAL_SOLID||l===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(_.attr("marker-start","url("+I+"#"+n+"-arrowhead)"),_.attr("marker-end","url("+I+"#"+n+"-arrowhead)")),(l===r.db.LINETYPE.SOLID_POINT||l===r.db.LINETYPE.DOTTED_POINT)&&_.attr("marker-end","url("+I+"#"+n+"-filled-head)"),(l===r.db.LINETYPE.SOLID_CROSS||l===r.db.LINETYPE.DOTTED_CROSS)&&_.attr("marker-end","url("+I+"#"+n+"-crosshead)"),u||h.showSequenceNumbers){const L=l===r.db.LINETYPE.BIDIRECTIONAL_SOLID||l===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,b=l===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||l===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||l===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||l===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||l===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||l===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||l===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||l===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,m=6,w=$t(i,r);let S=s,Y=o;L?(ss?Y=o-2*m:(Y=o-m,S+=(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),Y+=w?15:0,_.attr("x2",Y),_.attr("x1",S)):_.attr("x1",s+m);let M=0;const V=s===o,G=s<=o;V?M=t.fromBounds+1:b?M=G?t.toBounds-1:t.fromBounds+1:M=G?t.fromBounds+1:t.toBounds-1;let W="12px";const X=x.toString().length;X>5?W="7px":X>3&&(W="9px"),e.append("line").attr("x1",M).attr("y1",a).attr("x2",M).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+I+"#"+n+"-sequencenumber)"),e.append("text").attr("x",M).attr("y",a+4).attr("font-family","sans-serif").attr("font-size",W).attr("text-anchor","middle").attr("class","sequenceNumber").text(x)}},"drawMessage"),ta=g(function(e,t,a,r,i,n,s){let o=0,E=0,d,l=0;for(const x of r){const u=t.get(x),O=u.box;d&&d!=O&&(s||R.models.addBox(d),E+=h.boxMargin+d.margin),O&&O!=d&&(s||(O.x=o+E,O.y=i),E+=O.margin),u.width=P.getMax(u.width||h.width,h.width),u.height=P.getMax(u.height||h.height,h.height),u.margin=u.margin||h.actorMargin,l=P.getMax(l,u.height),a.get(u.name)&&(E+=u.width/2),u.x=o+E,u.starty=R.getVerticalPos(),R.insert(u.x,i,u.x+u.width,u.height),o+=u.width+E,u.box&&(u.box.width=o+O.margin-u.box.x),E=u.margin,d=u.box,R.models.addActor(u)}d&&!s&&R.models.addBox(d),R.bumpVerticalPos(l)},"addActorRenderingData"),ee=g(async function(e,t,a,r,i,n,s){if(r){let o=0;R.bumpVerticalPos(h.boxMargin*2);for(const E of a){const d=t.get(E);d.stopy||(d.stopy=R.getVerticalPos());const l=await H.drawActor(e,d,h,!0,i,n,s);o=P.getMax(o,l)}R.bumpVerticalPos(o+h.boxMargin)}else for(const o of a){const E=t.get(o);await H.drawActor(e,E,h,!1,i,n,s)}},"drawActors"),He=g(function(e,t,a,r){let i=0,n=0;for(const s of a){const o=t.get(s),E=ra(o),d=H.drawPopup(e,o,E,h,h.forceMenus,r);d.height>i&&(i=d.height),d.width+o.x>n&&(n=d.width+o.x)}return{maxHeight:i,maxWidth:n}},"drawActorsPopup"),ze=g(function(e){ar(h,e),e.fontFamily&&(h.actorFontFamily=h.noteFontFamily=h.messageFontFamily=e.fontFamily),e.fontSize&&(h.actorFontSize=h.noteFontSize=h.messageFontSize=e.fontSize),e.fontWeight&&(h.actorFontWeight=h.noteFontWeight=h.messageFontWeight=e.fontWeight)},"setConf"),Ht=g(function(e){return R.activations.filter(function(t){return t.actor===e})},"actorActivations"),Ce=g(function(e,t){const a=t.get(e),r=Ht(e),i=r.reduce(function(s,o){return P.getMin(s,o.startx)},a.x+a.width/2-1),n=r.reduce(function(s,o){return P.getMax(s,o.stopx)},a.x+a.width/2+1);return[i,n]},"activationBounds");function ht(e,t,a,r,i){R.bumpVerticalPos(a);let n=r;if(t.id&&t.message&&e[t.id]){const s=e[t.id].width,o=Rt(h);t.message=Z.wrapLabel(`[${t.message}]`,s-2*h.wrapPadding,o),t.width=s,t.wrap=!0;const E=Z.calculateTextDimensions(t.message,o),d=P.getMax(E.height,h.labelBoxHeight);n=r+d,st.debug(`${d} - ${t.message}`)}i(t),R.bumpVerticalPos(n)}g(ht,"adjustLoopHeightForWrap");function Ue(e,t,a,r,i,n,s){function o(l,x){l.x{A.add(D.from),A.add(D.to)}),f=f.filter(D=>A.has(D))}const w=new Map(f.map((A,D)=>{var et;return[((et=x.get(A))==null?void 0:et.name)??A,D]}));ta(l,x,u,f,0,_,!1);const S=await ca(_,x,m,r);H.insertArrowHead(l,t),H.insertArrowCrossHead(l,t),H.insertArrowFilledHead(l,t),H.insertSequenceNumber(l,t),H.insertSolidTopArrowHead(l,t),H.insertSolidBottomArrowHead(l,t),H.insertStickTopArrowHead(l,t),H.insertStickBottomArrowHead(l,t),s==="neo"&&H.insertDropShadow(l,h);function Y(A,D){const et=R.endActivation(A);et.starty+18>D&&(et.starty=D-6,D+=12),H.drawActivation(l,et,D,h,Ht(A.from).length,r,w),R.insert(et.startx,D-10,et.stopx,D)}g(Y,"activeEnd");let M=1,V=1;const G=[],W=[];let X=0;for(const A of _){let D,et,rt;switch(A.type){case r.db.LINETYPE.NOTE:R.resetVerticalPos(),et=A.noteModel,await $r(l,et,A.id);break;case r.db.LINETYPE.ACTIVE_START:R.newActivation(A,l,x);break;case r.db.LINETYPE.CENTRAL_CONNECTION:R.newActivation(A,l,x);break;case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:R.newActivation(A,l,x);break;case r.db.LINETYPE.ACTIVE_END:Y(A,R.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F));break;case r.db.LINETYPE.LOOP_END:D=R.endLoop(),await H.drawLoop(l,D,"loop",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.RECT_START:ht(S,A,h.boxMargin,h.boxMargin,F=>R.newLoop(void 0,F.message));break;case r.db.LINETYPE.RECT_END:D=R.endLoop(),W.push(D),R.models.addLoop(D),R.bumpVerticalPos(D.stopy-R.getVerticalPos());break;case r.db.LINETYPE.OPT_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F));break;case r.db.LINETYPE.OPT_END:D=R.endLoop(),await H.drawLoop(l,D,"opt",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.ALT_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F));break;case r.db.LINETYPE.ALT_ELSE:ht(S,A,h.boxMargin+h.boxTextMargin,h.boxMargin,F=>R.addSectionToLoop(F));break;case r.db.LINETYPE.ALT_END:D=R.endLoop(),await H.drawLoop(l,D,"alt",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F)),R.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:ht(S,A,h.boxMargin+h.boxTextMargin,h.boxMargin,F=>R.addSectionToLoop(F));break;case r.db.LINETYPE.PAR_END:D=R.endLoop(),await H.drawLoop(l,D,"par",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.AUTONUMBER:M=A.message.start||M,V=A.message.step||V,A.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F));break;case r.db.LINETYPE.CRITICAL_OPTION:ht(S,A,h.boxMargin+h.boxTextMargin,h.boxMargin,F=>R.addSectionToLoop(F));break;case r.db.LINETYPE.CRITICAL_END:D=R.endLoop(),await H.drawLoop(l,D,"critical",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.BREAK_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F));break;case r.db.LINETYPE.BREAK_END:D=R.endLoop(),await H.drawLoop(l,D,"break",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;default:try{rt=A.msgModel,rt.starty=R.getVerticalPos(),rt.sequenceIndex=M,rt.sequenceVisible=r.db.showSequenceNumbers(),rt.id=A.id,rt.from=A.from,rt.to=A.to;const F=await qe(l,rt);Ue(A,rt,F,X,x,u,O),G.push({messageModel:rt,lineStartY:F,msg:A}),R.models.addMessage(rt)}catch(F){st.error("error while drawing message",F)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(A.type)&&(M=Math.round((M+V)*100)/100),X++}st.debug("createdActors",u),st.debug("destroyedActors",O),await ee(l,x,f,!1,t,r,w);for(const A of G)await jr(l,A.messageModel,A.lineStartY,r,A.msg,t);h.mirrorActors&&await ee(l,x,f,!0,t,r,w),W.forEach(A=>H.drawBackgroundRect(l,A)),We(l,x,f,h);for(const A of R.models.boxes){A.height=R.getVerticalPos()-A.y,R.insert(A.x,A.y,A.x+A.width,A.height);const D=h.boxMargin*2;A.startx=A.x-D,A.starty=A.y-D*.25,A.stopx=A.startx+A.width+2*D,A.stopy=A.starty+A.height+D*.75,A.stroke="rgb(0,0,0, 0.5)",H.drawBox(l,A,h)}L&&R.bumpVerticalPos(h.boxMargin);const Q=He(l,x,f,d),{bounds:z}=R.getBounds();z.startx===void 0&&(z.startx=0),z.starty===void 0&&(z.starty=0),z.stopx===void 0&&(z.stopx=0),z.stopy===void 0&&(z.stopy=0);let it=z.stopy-z.starty;it{const s=Rt(h);let o=n.actorKeys.reduce((x,u)=>x+=e.get(u).width+(e.get(u).margin||0),0);const E=h.boxMargin*8;o+=E,o-=2*h.boxTextMargin,n.wrap&&(n.name=Z.wrapLabel(n.name,o-2*h.wrapPadding,s));const d=Z.calculateTextDimensions(n.name,s);i=P.getMax(d.height,i);const l=P.getMax(o,d.width+2*h.wrapPadding);if(n.margin=h.boxTextMargin,on.textMaxHeight=i),P.getMax(r,h.height)}g(Xe,"calculateActorMargins");var aa=g(async function(e,t,a){const r=t.get(e.from),i=t.get(e.to),n=r.x,s=i.x,o=e.wrap&&e.message;let E=$(e.message)?await mt(e.message,j()):Z.calculateTextDimensions(o?Z.wrapLabel(e.message,h.width,Lt(h)):e.message,Lt(h));const d={width:o?h.width:P.getMax(h.width,E.width+2*h.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===a.db.PLACEMENT.RIGHTOF?(d.width=o?P.getMax(h.width,E.width):P.getMax(r.width/2+i.width/2,E.width+2*h.noteMargin),d.startx=n+(r.width+h.actorMargin)/2):e.placement===a.db.PLACEMENT.LEFTOF?(d.width=o?P.getMax(h.width,E.width+2*h.noteMargin):P.getMax(r.width/2+i.width/2,E.width+2*h.noteMargin),d.startx=n-d.width+(r.width-h.actorMargin)/2):e.to===e.from?(E=Z.calculateTextDimensions(o?Z.wrapLabel(e.message,P.getMax(h.width,r.width),Lt(h)):e.message,Lt(h)),d.width=o?P.getMax(h.width,r.width):P.getMax(r.width,h.width,E.width+2*h.noteMargin),d.startx=n+(r.width-d.width)/2):(d.width=Math.abs(n+r.width/2-(s+i.width/2))+h.actorMargin,d.startx=n2,u=g(_=>E?-_:_,"adjustValue");e.from===e.to?l=d:(e.activate&&!x&&(l+=u(h.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(l+=u(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(d-=u(3)));const O=[i,n,s,o],p=Math.abs(d-l);e.wrap&&e.message&&(e.message=Z.wrapLabel(e.message,P.getMax(p+2*h.wrapPadding,h.width),Rt(h)));const f=Z.calculateTextDimensions(e.message,Rt(h));return{width:P.getMax(e.wrap?0:f.width+2*h.wrapPadding,p+2*h.wrapPadding,h.width),height:0,startx:d,stopx:l,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,O),toBounds:Math.max.apply(null,O)}},"buildMessageModel"),ca=g(async function(e,t,a,r){const i={},n=[];let s,o,E;for(const d of e){switch(d.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:n.push({id:d.id,msg:d.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:d.message&&(s=n.pop(),i[s.id]=s,i[d.id]=s,n.push(s));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:s=n.pop(),i[s.id]=s;break;case r.db.LINETYPE.ACTIVE_START:{const x=t.get(d.from?d.from:d.to.actor),u=Ht(d.from?d.from:d.to.actor).length,O=x.x+x.width/2+(u-1)*h.activationWidth/2,p={startx:O,stopx:O+h.activationWidth,actor:d.from,enabled:!0};R.activations.push(p)}break;case r.db.LINETYPE.ACTIVE_END:{const x=R.activations.map(u=>u.actor).lastIndexOf(d.from);R.activations.splice(x,1).splice(0,1)}break}d.placement!==void 0?(o=await aa(d,t,r),d.noteModel=o,n.forEach(x=>{s=x,s.from=P.getMin(s.from,o.startx),s.to=P.getMax(s.to,o.startx+o.width),s.width=P.getMax(s.width,Math.abs(s.from-s.to))-h.labelBoxWidth})):(E=oa(d,t,r),d.msgModel=E,E.startx&&E.stopx&&n.length>0&&n.forEach(x=>{if(s=x,E.startx===E.stopx){const u=t.get(d.from),O=t.get(d.to);s.from=P.getMin(u.x-E.width/2,u.x-u.width/2,s.from),s.to=P.getMax(O.x+E.width/2,O.x+u.width/2,s.to),s.width=P.getMax(s.width,Math.abs(s.to-s.from))-h.labelBoxWidth}else s.from=P.getMin(E.startx,s.from),s.to=P.getMax(E.stopx,s.to),s.width=P.getMax(s.width,E.width)-h.labelBoxWidth}))}return R.activations=[],st.debug("Loop type widths:",i),i},"calculateLoopBounds"),la={bounds:R,drawActors:ee,drawActorsPopup:He,setConf:ze,draw:ea},Ea={parser:_r,get db(){return new yr},renderer:la,styles:Or,init:g(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,er({sequence:{wrap:e.wrap}}))},"init")};export{Ea as diagram}; diff --git a/dist/assets/stateDiagram-AJRCARHV-DSD_0bJU.js b/dist/assets/stateDiagram-AJRCARHV-DSD_0bJU.js new file mode 100644 index 0000000..6a374a5 --- /dev/null +++ b/dist/assets/stateDiagram-AJRCARHV-DSD_0bJU.js @@ -0,0 +1 @@ +import{s as A,a as W,S as N}from"./chunk-AQP2D5EJ-B3_Jw0pD.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,R as _,S as U,O as C,u as F}from"./index-mLPbTfpz.js";import{G as O}from"./graph-BlwPajkw.js";import{l as J}from"./layout-Boy8vhSP.js";import"./chunk-55IACEB6-DT6mN9fZ.js";import"./chunk-2J33WTMH-CsIyCw5_.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"
    ");p=p.replace(/\n/g,"
    ");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");R(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},lt={parser:W,get db(){return new N(1)},renderer:it,styles:A,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{lt as diagram}; diff --git a/dist/assets/stateDiagram-v2-BHNVJYJU-Bj5k-FXZ.js b/dist/assets/stateDiagram-v2-BHNVJYJU-Bj5k-FXZ.js new file mode 100644 index 0000000..3617b1a --- /dev/null +++ b/dist/assets/stateDiagram-v2-BHNVJYJU-Bj5k-FXZ.js @@ -0,0 +1 @@ +import{s as e,b as r,a,S as s}from"./chunk-AQP2D5EJ-B3_Jw0pD.js";import{_ as i}from"./index-mLPbTfpz.js";import"./chunk-55IACEB6-DT6mN9fZ.js";import"./chunk-2J33WTMH-CsIyCw5_.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var p={parser:a,get db(){return new s(2)},renderer:r,styles:e,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{p as diagram}; diff --git a/dist/assets/timeline-definition-PNZ67QCA-DuNinMEh.js b/dist/assets/timeline-definition-PNZ67QCA-DuNinMEh.js new file mode 100644 index 0000000..e5f900f --- /dev/null +++ b/dist/assets/timeline-definition-PNZ67QCA-DuNinMEh.js @@ -0,0 +1,120 @@ +import{_ as l,D as pt,V as Wt,W as Pt,X as Bt,c as gt,l as S,I as Vt,N as Ft,Y as ft,d as J,C as zt,$ as Gt,z as Ot}from"./index-mLPbTfpz.js";import{d as ot}from"./arc-XpyNnWh5.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var tt=function(){var e=l(function(k,s,d,h){for(d=d||{},h=k.length;h--;d[k[h]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],c=[1,15],a=[1,16],o=[1,19],p=[1,20],y={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:l(function(s,d,h,g,m,u,w){var v=u.length-1;switch(m){case 1:return u[v-1];case 3:g.setDirection("LR");break;case 4:g.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:g.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),g.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),g.getCommonDb().setAccDescription(this.$);break;case 15:g.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:g.addTask(u[v],0,""),this.$=u[v];break;case 19:g.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:c,20:a,21:17,22:18,23:o,24:p},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:c,20:a,21:17,22:18,23:o,24:p},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:l(function(s,d){if(d.recoverable)this.trace(s);else{var h=new Error(s);throw h.hash=d,h}},"parseError"),parse:l(function(s){var d=this,h=[0],g=[],m=[null],u=[],w=this.table,v="",M=0,R=0,P=2,V=1,L=u.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);_.setInput(s,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var z=_.yylloc;u.push(z);var q=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(A){h.length=h.length-2*A,m.length=m.length-A,u.length=u.length-A}l(X,"popStack");function O(){var A;return A=g.pop()||_.lex()||V,typeof A!="number"&&(A instanceof Array&&(g=A,A=g.pop()),A=d.symbols_[A]||A),A}l(O,"lex");for(var $,N,b,T,E={},H,I,B,D;;){if(N=h[h.length-1],this.defaultActions[N]?b=this.defaultActions[N]:(($===null||typeof $>"u")&&($=O()),b=w[N]&&w[N][$]),typeof b>"u"||!b.length||!b[0]){var K="";D=[];for(H in w[N])this.terminals_[H]&&H>P&&D.push("'"+this.terminals_[H]+"'");_.showPosition?K="Parse error on line "+(M+1)+`: +`+_.showPosition()+` +Expecting `+D.join(", ")+", got '"+(this.terminals_[$]||$)+"'":K="Parse error on line "+(M+1)+": Unexpected "+($==V?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(K,{text:_.match,token:this.terminals_[$]||$,line:_.yylineno,loc:z,expected:D})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+$);switch(b[0]){case 1:h.push($),m.push(_.yytext),u.push(_.yylloc),h.push(b[1]),$=null,R=_.yyleng,v=_.yytext,M=_.yylineno,z=_.yylloc;break;case 2:if(I=this.productions_[b[1]][1],E.$=m[m.length-I],E._$={first_line:u[u.length-(I||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(I||1)].first_column,last_column:u[u.length-1].last_column},q&&(E._$.range=[u[u.length-(I||1)].range[0],u[u.length-1].range[1]]),T=this.performAction.apply(E,[v,R,M,C.yy,b[1],m,u].concat(L)),typeof T<"u")return T;I&&(h=h.slice(0,-1*I*2),m=m.slice(0,-1*I),u=u.slice(0,-1*I)),h.push(this.productions_[b[1]][0]),m.push(E.$),u.push(E._$),B=w[h[h.length-2]][h[h.length-1]],h.push(B);break;case 3:return!0}}return!0},"parse")},x=function(){var k={EOF:1,parseError:l(function(d,h){if(this.yy.parser)this.yy.parser.parseError(d,h);else throw new Error(d)},"parseError"),setInput:l(function(s,d){return this.yy=d||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.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),s},"input"),unput:l(function(s){var d=s.length,h=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var g=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),h.length-1&&(this.yylineno-=h.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:h?(h.length===g.length?this.yylloc.first_column:0)+g[g.length-h.length].length-h[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+` +`+d+"^"},"showPosition"),test_match:l(function(s,d){var h,g,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))),g=s[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],h=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var u in m)this[u]=m[u];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,d,h,g;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),u=0;ud[0].length)){if(d=h,g=u,this.options.backtrack_lexer){if(s=this.test_match(h,m[u]),s!==!1)return s;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(s=this.test_match(d,m[g]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var d=this.next();return d||this.lex()},"lex"),begin:l(function(d){this.conditionStack.push(d)},"begin"),popState:l(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:l(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:l(function(d){this.begin(d)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(d,h,g,m){switch(g){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return k}();y.lexer=x;function f(){this.yy={}}return l(f,"Parser"),f.prototype=y,y.Parser=f,new f}();tt.parser=tt;var Dt=tt,yt={};zt(yt,{addEvent:()=>Tt,addSection:()=>_t,addTask:()=>Et,addTaskOrg:()=>$t,clear:()=>kt,default:()=>Xt,getCommonDb:()=>xt,getDirection:()=>bt,getSections:()=>wt,getTasks:()=>St,setDirection:()=>vt});var U="",mt=0,nt="LR",rt=[],Q=[],Z=[],xt=l(()=>Gt,"getCommonDb"),kt=l(function(){rt.length=0,Q.length=0,U="",Z.length=0,nt="LR",Ot()},"clear"),vt=l(function(e){nt=e},"setDirection"),bt=l(function(){return nt},"getDirection"),_t=l(function(e){U=e,rt.push(e)},"addSection"),wt=l(function(){return rt},"getSections"),St=l(function(){let e=ct();const t=100;let n=0;for(;!e&&nn.id===mt-1).events.push(e)},"addEvent"),$t=l(function(e){const t={section:U,type:U,description:e,task:e,classes:[]};Q.push(t)},"addTaskOrg"),ct=l(function(){const e=l(function(n){return Z[n].processed},"compileTask");let t=!0;for(const[n,i]of Z.entries())e(n),t=t&&i.processed;return t},"compileTasks"),Xt={clear:kt,getCommonDb:xt,getDirection:bt,setDirection:vt,addSection:_t,getSections:wt,getTasks:St,addTask:Et,addTaskOrg:$t,addEvent:Tt},Nt=0,j=l(function(e,t){const n=e.append("rect");return n.attr("x",t.x),n.attr("y",t.y),n.attr("fill",t.fill),n.attr("stroke",t.stroke),n.attr("width",t.width),n.attr("height",t.height),n.attr("rx",t.rx),n.attr("ry",t.ry),t.class!==void 0&&n.attr("class",t.class),n},"drawRect"),Kt=l(function(e,t){const i=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=e.append("g");r.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function c(p){const y=ot().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);p.append("path").attr("class","mouth").attr("d",y).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}l(c,"smile");function a(p){const y=ot().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);p.append("path").attr("class","mouth").attr("d",y).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}l(a,"sad");function o(p){p.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return l(o,"ambivalent"),t.score>3?c(r):t.score<3?a(r):o(r),i},"drawFace"),Ut=l(function(e,t){const n=e.append("circle");return n.attr("cx",t.cx),n.attr("cy",t.cy),n.attr("class","actor-"+t.pos),n.attr("fill",t.fill),n.attr("stroke",t.stroke),n.attr("r",t.r),n.class!==void 0&&n.attr("class",n.class),t.title!==void 0&&n.append("title").text(t.title),n},"drawCircle"),It=l(function(e,t){const n=t.text.replace(//gi," "),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.attr("class","legend"),i.style("text-anchor",t.anchor),t.class!==void 0&&i.attr("class",t.class);const r=i.append("tspan");return r.attr("x",t.x+t.textMargin*2),r.text(n),i},"drawText"),Zt=l(function(e,t){function n(r,c,a,o,p){return r+","+c+" "+(r+a)+","+c+" "+(r+a)+","+(c+o-p)+" "+(r+a-p*1.2)+","+(c+o)+" "+r+","+(c+o)}l(n,"genPoints");const i=e.append("polygon");i.attr("points",n(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,It(e,t)},"drawLabel"),qt=l(function(e,t,n){const i=e.append("g"),r=st();r.x=t.x,r.y=t.y,r.fill=t.fill,r.width=n.width,r.height=n.height,r.class="journey-section section-type-"+t.num,r.rx=3,r.ry=3,j(i,r),Ht(n)(t.text,i,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+t.num},n,t.colour)},"drawSection"),et=-1,Jt=l(function(e,t,n,i){const r=t.x+n.width/2,c=e.append("g");et++;const a=300+5*30;c.append("line").attr("id",i+"-task"+et).attr("x1",r).attr("y1",t.y).attr("x2",r).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Kt(c,{cx:r,cy:300+(5-t.score)*30,score:t.score});const o=st();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class="task task-type-"+t.num,o.rx=3,o.ry=3,j(c,o),Ht(n)(t.task,c,o.x,o.y,o.width,o.height,{class:"task"},n,t.colour)},"drawTask"),Qt=l(function(e,t){j(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),jt=l(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),st=l(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ht=function(){function e(r,c,a,o,p,y,x,f){const k=c.append("text").attr("x",a+p/2).attr("y",o+y/2+5).style("font-color",f).style("text-anchor","middle").text(r);i(k,x)}l(e,"byText");function t(r,c,a,o,p,y,x,f,k){const{taskFontSize:s,taskFontFamily:d}=f,h=r.split(//gi);for(let g=0;g)/).reverse(),r,c=[],a=1.1,o=n.attr("y"),p=parseFloat(n.attr("dy")),y=n.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",p+"em");for(let x=0;xt||r==="
    ")&&(c.pop(),y.text(c.join(" ").trim()),r==="
    "?c=[""]:c=[r],y=n.append("tspan").attr("x",0).attr("y",o).attr("dy",a+"em").text(r))})}l(it,"wrap");var te=l(function(e,t,n,i,r,c=!1){var m,u,w;const{theme:a,look:o}=i,p=a==null?void 0:a.includes("redux"),y=((m=i==null?void 0:i.themeVariables)==null?void 0:m.THEME_COLOR_LIMIT)??12,x=n%y-1,f=e.append("g");t.section=x,f.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+x));const k=f.append("g"),s=f.append("g"),h=s.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(it,t.width).node().getBBox(),g=(u=i.fontSize)!=null&&u.replace?i.fontSize.replace("px",""):i.fontSize;if(t.height=h.height+g*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,s.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),p&&s.attr("transform",`translate(${t.width/2}, ${c?t.padding/2+3:t.padding})`),ne(k,t,x,r,i),o==="neo"&&(f.attr("data-look","neo"),p)){const v=a.includes("dark"),M=((w=e.node())==null?void 0:w.ownerSVGElement)??e.node(),R=J(M),P=R.attr("id")??"",V=P?`${P}-drop-shadow`:"drop-shadow";if(R.select(`#${V}`).empty()){const L=R.select("defs");(L.empty()?R.append("defs"):L).append("filter").attr("id",V).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",v?"0.2":"0.06").attr("flood-color",v?"#FFFFFF":"#000000")}}return t},"drawNode"),ee=l(function(e,t,n){var o;const i=e.append("g"),c=i.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(it,t.width).node().getBBox(),a=(o=n.fontSize)!=null&&o.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),c.height+a*1.1*.5+t.padding},"getVirtualNodeHeight"),ne=l(function(e,t,n,i,r){const{theme:c}=r,a=c!=null&&c.includes("redux")?0:5,o=5,p=a>0?`M0 ${t.height-o} v${-t.height+2*o} q0,-${a},${a},-${a} h${t.width-2*o} q${a},0,${a},${a} v${t.height-o} H0 Z`:`M0 ${t.height-o} v${-(t.height-o)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",i+"-node-"+Nt++).attr("class","node-bkg node-"+t.type).attr("d",p),c!=null&&c.includes("redux")||e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),W={drawRect:j,drawCircle:Ut,drawSection:qt,drawText:It,drawLabel:Zt,drawTask:Jt,drawBackgroundRect:Qt,getTextObj:jt,getNoteRect:st,initGraphics:Yt,drawNode:te,getVirtualNodeHeight:ee},re=l(function(e,t,n,i){var X,O,$;const r=gt(),{look:c,theme:a,themeVariables:o}=r,{useGradient:p,gradientStart:y,gradientStop:x}=o,f=((X=r.timeline)==null?void 0:X.leftMargin)??50;S.debug("timeline",i.db);const k=r.securityLevel;let s;k==="sandbox"&&(s=J("#i"+t));const h=(k==="sandbox"?J(s.nodes()[0].contentDocument.body):J("body")).select("#"+t);h.append("g");const g=i.db.getTasks(),m=i.db.getCommonDb().getDiagramTitle();S.debug("task",g),W.initGraphics(h,t);const u=i.db.getSections();S.debug("sections",u);let w=0,v=0,M=0,R=0,P=50+f,V=50;R=50;let L=0,_=!0;u.forEach(function(N){const b={number:L,descr:N,section:L,width:150,padding:20,maxHeight:w},T=W.getVirtualNodeHeight(h,b,r);S.debug("sectionHeight before draw",T),w=Math.max(w,T+20)});let C=0,F=0;S.debug("tasks.length",g.length);for(const[N,b]of g.entries()){const T={number:N,descr:b,section:b.section,width:150,padding:20,maxHeight:v},E=W.getVirtualNodeHeight(h,T,r);S.debug("taskHeight before draw",E),v=Math.max(v,E+20),C=Math.max(C,b.events.length);let H=0;for(const I of b.events){const B={descr:I,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};H+=W.getVirtualNodeHeight(h,B,r)}b.events.length>0&&(H+=(b.events.length-1)*10),F=Math.max(F,H)}S.debug("maxSectionHeight before draw",w),S.debug("maxTaskHeight before draw",v),u&&u.length>0?u.forEach(N=>{const b=g.filter(I=>I.section===N),T={number:L,descr:N,section:L,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:w};S.debug("sectionNode",T);const E=h.append("g"),H=W.drawNode(E,T,L,r,t);S.debug("sectionNode output",H),E.attr("transform",`translate(${P}, ${R})`),V+=w+50,b.length>0&<(h,b,L,P,V,v,r,C,F,w,!1,t),P+=200*Math.max(b.length,1),V=R,L++}):(_=!1,lt(h,g,L,P,V,v,r,C,F,w,!0,t));const z=h.node().getBBox();if(S.debug("bounds",z),m&&h.append("text").text(m).attr("x",c==="neo"?z.x*2+f:z.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),M=_?w+v+150:v+100,h.append("g").attr("class","lineWrapper").append("line").attr("x1",f).attr("y1",M).attr("x2",z.width+3*f).attr("y2",M).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),c==="neo"&&p&&a!=="neutral"){const N=h.select("defs"),T=(N.empty()?h.append("defs"):N).append("linearGradient").attr("id",h.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");T.append("stop").attr("offset","0%").attr("stop-color",y).attr("stop-opacity",1),T.append("stop").attr("offset","100%").attr("stop-color",x).attr("stop-opacity",1)}ft(void 0,h,((O=r.timeline)==null?void 0:O.padding)??50,(($=r.timeline)==null?void 0:$.useMaxWidth)??!1)},"draw"),lt=l(function(e,t,n,i,r,c,a,o,p,y,x,f){var k;for(const s of t){const d={descr:s.task,section:n,number:n,width:150,padding:20,maxHeight:c};S.debug("taskNode",d);const h=e.append("g").attr("class","taskWrapper"),m=W.drawNode(h,d,n,a,f).height;if(S.debug("taskHeight after draw",m),h.attr("transform",`translate(${i}, ${r})`),c=Math.max(c,m),s.events){const u=e.append("g").attr("class","lineWrapper");let w=c;r+=100,w=w+se(e,s.events,n,i,r,a,f),r-=100,u.append("line").attr("x1",i+190/2).attr("y1",r+c).attr("x2",i+190/2).attr("y2",r+c+100+p+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${f}-arrowhead)`).attr("stroke-dasharray","5,5")}i=i+200,x&&!((k=a.timeline)!=null&&k.disableMulticolor)&&n++}r=r-10},"drawTasks"),se=l(function(e,t,n,i,r,c,a){let o=0;const p=r;r=r+100;for(const y of t){const x={descr:y,section:n,number:n,width:150,padding:20,maxHeight:50};S.debug("eventNode",x);const f=e.append("g").attr("class","eventWrapper"),s=W.drawNode(f,x,n,c,a,!0).height;o=o+s,f.attr("transform",`translate(${i}, ${r})`),r=r+10+s}return r=p,o},"drawEvents"),ie={setConf:l(()=>{},"setConf"),draw:re},Y=200,G=5,ae=Y+G*2,at=Y+100,oe=at+G*2,Lt=10,ce=0,ht=20,Mt=20,dt=30,At=50,le=l(function(e,t,n,i){var X,O,$,N,b;const r=gt(),c=((X=r.timeline)==null?void 0:X.leftMargin)??50;S.debug("timeline",i.db);const a=Vt(t);a.append("g");const o=i.db.getTasks(),p=i.db.getCommonDb().getDiagramTitle();S.debug("task",o),W.initGraphics(a);const y=i.db.getSections();S.debug("sections",y);let x=0,f=0;const k=50+c;let s=50;const d=s,h=k,g=ae+Mt,m=oe+At,u=h+g;let w=0;const v=y&&y.length>0,M=v?u:k+g,R=Math.max(50,g+m-G*2);y.forEach(function(T){const E={number:w,descr:T,section:w,width:R,padding:G,maxHeight:x},H=W.getVirtualNodeHeight(a,E,r);S.debug("sectionHeight before draw",H),x=Math.max(x,H)});let P=0;S.debug("tasks.length",o.length);for(const[T,E]of o.entries()){const H={number:T,descr:E,section:E.section,width:Y,padding:G,maxHeight:f},I=W.getVirtualNodeHeight(a,H,r);S.debug("taskHeight before draw",I),f=Math.max(f,I);let B=0;for(const D of E.events){const K={descr:D,section:E.section,number:E.section,width:at,padding:G,maxHeight:50};B+=W.getVirtualNodeHeight(a,K,r)}E.events.length>0&&(B+=(E.events.length-1)*Lt),P=Math.max(P,B)+ce}S.debug("maxSectionHeight before draw",x),S.debug("maxTaskHeight before draw",f);const L=Math.max(f,P)+dt;v?y.forEach(T=>{const E=o.filter(Rt=>Rt.section===T),H={number:w,descr:T,section:w,width:R,padding:G,maxHeight:x};S.debug("sectionNode",H);const I=a.append("g"),B=W.drawNode(I,H,w,r);S.debug("sectionNode output",B);const D=M-g;I.attr("transform",`translate(${D}, ${s})`);const K=s+B.height+ht;E.length>0&&ut(a,E,w,M,K,f,r,L,!1);const A=E.length,Ct=B.height+ht+L*Math.max(A,1)-(A>0?dt*2:0);s+=Ct,w++}):ut(a,o,w,M,s,f,r,L,!0);let _=(O=a.node())==null?void 0:O.getBBox();if(!_)throw new Error("bbox not found");if(S.debug("bounds",_),p){if(a.append("text").text(p).attr("x",_.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),_=($=a.node())==null?void 0:$.getBBox(),!_)throw new Error("bbox not found");S.debug("bounds after title",_)}const[C]=Ft(r.fontSize),F=(C??16)*2,z=(C??16)*.5+20,q=a.append("g").attr("class","lineWrapper");q.append("line").attr("x1",M).attr("y1",d-F).attr("x2",M).attr("y2",_.y+_.height+z).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),q.lower(),ft(void 0,a,((N=r.timeline)==null?void 0:N.padding)??50,((b=r.timeline)==null?void 0:b.useMaxWidth)??!1)},"draw"),ut=l(function(e,t,n,i,r,c,a,o,p){var y;for(const x of t){const f={descr:x.task,section:n,number:n,width:Y,padding:G,maxHeight:c};S.debug("taskNode",f);const k=e.append("g").attr("class","taskWrapper"),s=W.drawNode(k,f,n,a),d=s.height;S.debug("taskHeight after draw",d);const h=i-Mt-s.width;if(k.attr("transform",`translate(${h}, ${r})`),c=Math.max(c,d),x.events&&x.events.length>0){const g=r,m=i+At;he(e,x.events,n,i,m,g,a)}r=r+o,p&&!((y=a.timeline)!=null&&y.disableMulticolor)&&n++}},"drawTasks"),he=l(function(e,t,n,i,r,c,a){let o=c;for(const p of t){const y={descr:p,section:n,number:n,width:at,padding:G,maxHeight:0};S.debug("eventNode",y);const x=e.append("g").attr("class","eventWrapper"),k=W.drawNode(x,y,n,a).height;x.attr("transform",`translate(${r}, ${o})`);const s=e.append("g").attr("class","lineWrapper"),d=o+k/2;s.append("line").attr("x1",i).attr("y1",d).attr("x2",r).attr("y2",d).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),o=o+k+Lt}return o-c},"drawEvents"),de={setConf:l(()=>{},"setConf"),draw:le},ue=l(e=>{var o;const{theme:t}=pt(),n=t==null?void 0:t.includes("dark"),i=t==null?void 0:t.includes("color"),r=((o=e.svgId)==null?void 0:o.replace(/^#/,""))??"",c=r?`url(#${r}-drop-shadow)`:e.dropShadow??"none";let a="";for(let p=0;p{let t="";for(let n=0;n{var a;const{theme:t}=pt(),n=t==null?void 0:t.includes("redux"),i=t==="neutral",r=((a=e.svgId)==null?void 0:a.replace(/^#/,""))??"";let c="";if(e.useGradient&&r&&e.THEME_COLOR_LIMIT&&!i)for(let o=0;o{},"setConf"),draw:l((e,t,n,i)=>{var c,a;return(((a=(c=i==null?void 0:i.db)==null?void 0:c.getDirection)==null?void 0:a.call(c))??"LR")==="TD"?de.draw(e,t,n,i):ie.draw(e,t,n,i)},"draw")},ve={db:yt,renderer:ye,parser:Dt,styles:fe};export{ve as diagram}; diff --git a/dist/assets/treeView-BLDUP644-C9ezM3fm.js b/dist/assets/treeView-BLDUP644-C9ezM3fm.js new file mode 100644 index 0000000..75362dd --- /dev/null +++ b/dist/assets/treeView-BLDUP644-C9ezM3fm.js @@ -0,0 +1 @@ +import{e as r}from"./mermaid-parser.core-D9g22YKo.js";import{T as p}from"./mermaid-parser.core-D9g22YKo.js";import"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";export{p as TreeViewModule,r as createTreeViewServices}; diff --git a/dist/assets/treemap-LRROVOQU-OJPVKysv.js b/dist/assets/treemap-LRROVOQU-OJPVKysv.js new file mode 100644 index 0000000..a222129 --- /dev/null +++ b/dist/assets/treemap-LRROVOQU-OJPVKysv.js @@ -0,0 +1 @@ +import{j as r}from"./mermaid-parser.core-D9g22YKo.js";import{k as a}from"./mermaid-parser.core-D9g22YKo.js";import"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";export{a as TreemapModule,r as createTreemapServices}; diff --git a/dist/assets/vennDiagram-CIIHVFJN-CJlbgw-f.js b/dist/assets/vennDiagram-CIIHVFJN-CJlbgw-f.js new file mode 100644 index 0000000..2534c63 --- /dev/null +++ b/dist/assets/vennDiagram-CIIHVFJN-CJlbgw-f.js @@ -0,0 +1,34 @@ +import{aU as Gt,s as Wt,g as Kt,q as Ht,p as Xt,a as Yt,b as Zt,_ as S,D as St,I as Jt,d as rt,al as Qt,V as $t,W as te,X as ee,e as ne,z as se,F as ie,G as re}from"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Et(e);for(let u=0;ua.angle-u.angle);let f=e[e.length-1];for(let u=0;ux.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;uMath.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>W(t,s)=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=W(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u=0&&(n=a),Math.abs(f)ct(n))}function tt(t,n){let s=0;for(let e=0;ev.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx=1)break;for(let h=1;hc+r*i*f||u>=E)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,E=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a{const y={};for(let d=0;dxt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;uc===f?0:cr.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;dy.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const m=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;mt[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=xt(c.radius,f.radius,W(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&W(t[0],t[1])1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in E)return E[p];var h=E[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Ct(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const X={};h.forEach(I=>{I.label&&(X[I.sets]=I.label)});function B(I){if(I.sets in X)return X[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const G=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(G,x)}}const D=U.selectAll(".venn-area").data(h,I=>I.sets),O=D.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function R(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let T=p;z&&typeof T.transition=="function"?(T=R(p),T.selectAll("path").attrTween("d",A)):T.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=T.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const C=R(D.exit()).remove();typeof D.transition=="function"&&C.selectAll("path").attrTween("d",A);const Y=C.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),Y.style("font-size","0px")),{circles:k,textCentres:N,nodes:D,enter:O,update:T,exit:C}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Dt:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const E=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-W(n[0],t);for(let i=1;i=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(W(c,a)>a.radius){f=!1;break}for(const a of n)if(W(c,a)a.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(` +M`,t,n),e.push(` +m`,-s,0),e.push(` +a`,s,s,0,1,0,s*2,0),e.push(` +a`,s,s,0,1,0,-s*2,0),e.join(" ")}function ke(t){const n=t.split(" ");return{x:Number.parseFloat(n[1]),y:Number.parseFloat(n[2]),radius:-Number.parseFloat(n[4])}}function Pt(t){if(t.length===0)return[];const n={};return st(t,n),n.arcs}function Vt(t,n){if(t.length===0)return"M 0 0";const s=Math.pow(10,n||0),e=n!=null?r=>Math.round(r*s)/s:r=>r;if(t.length==1){const r=t[0].circle;return Ie(e(r.x),e(r.y),e(r.radius))}const i=[` +M`,e(t[0].p2.x),e(t[0].p2.y)];for(const r of t){const o=e(r.circle.radius);i.push(` +A`,o,o,0,r.large?1:0,r.sweep?1:0,e(r.p1.x),e(r.p1.y))}return i.join(" ")}function wt(t,n){return Vt(Pt(t),n)}function Me(t,n={}){const{lossFunction:s,layoutFunction:e=At,normalize:i=!0,orientation:r=Math.PI/2,orientationOrder:o,width:c=600,height:f=350,padding:u=15,scaleToFit:a=!1,symmetricalTextCentre:y=!1,distinct:d,round:m=2}=n;let x=e(t,{lossFunction:s==="default"||!s?et:s==="logRatio"?Dt:s,distinct:d});i&&(x=Ct(x,r,o));const M=Nt(x,c,f,u,a),E=jt(M,t,y),_=new Map(Object.keys(M).map(b=>[b,{set:b,x:M[b].x,y:M[b].y,radius:M[b].radius}])),w=t.map(b=>{const v=b.sets.map(h=>_.get(h)),l=Pt(v),p=Vt(l,m);return{circles:v,arcs:l,path:p,area:b,has:new Set(b.sets)}});function g(b){let v="";for(const l of w)l.has.size>b.length&&b.every(p=>l.has.has(p))&&(v+=" "+l.path);return v}return w.map(({circles:b,arcs:v,path:l,area:p})=>({data:p,text:E[p.sets],circles:b,arcs:v,path:l,distinctPath:l+g(p.sets)}))}var gt=function(){var t=S(function(w,g,b,v){for(b=b||{},v=w.length;v--;b[w[v]]=g);return b},"o"),n=[5,8],s=[7,8,11,12,17,19,22,24],e=[1,17],i=[1,18],r=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],c=[1,39],f=[7,8,11,12,17,19,22,24,27],u=[1,57],a=[1,56],y=[1,58],d=[1,59],m=[1,60],x=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],M={trace:S(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:S(function(g,b,v,l,p,h,j){var k=h.length-1;switch(p){case 1:return h[k-1];case 2:case 3:case 4:this.$=[];break;case 5:h[k-1].push(h[k]),this.$=h[k-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=h[k];break;case 8:l.setDiagramTitle(h[k].substr(6)),this.$=h[k].substr(6);break;case 9:l.addSubsetData([h[k]],void 0,void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 10:l.addSubsetData([h[k-1]],h[k],void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 11:l.addSubsetData([h[k-2]],void 0,parseFloat(h[k])),l.setIndentMode&&l.setIndentMode(!0);break;case 12:l.addSubsetData([h[k-3]],h[k-2],parseFloat(h[k])),l.setIndentMode&&l.setIndentMode(!0);break;case 13:if(h[k].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(h[k]),l.addSubsetData(h[k],void 0,void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 14:if(h[k-1].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(h[k-1]),l.addSubsetData(h[k-1],h[k],void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 15:if(h[k-2].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(h[k-2]),l.addSubsetData(h[k-2],void 0,parseFloat(h[k])),l.setIndentMode&&l.setIndentMode(!0);break;case 16:if(h[k-3].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(h[k-3]),l.addSubsetData(h[k-3],h[k-2],parseFloat(h[k])),l.setIndentMode&&l.setIndentMode(!0);break;case 17:case 18:case 19:l.addTextData(h[k-1],h[k],void 0);break;case 20:case 21:l.addTextData(h[k-2],h[k-1],h[k]);break;case 23:l.addStyleData(h[k-1],h[k]);break;case 24:case 25:case 26:var N=l.getCurrentSets();if(!N)throw new Error("text requires set");l.addTextData(N,h[k],void 0);break;case 27:case 28:var N=l.getCurrentSets();if(!N)throw new Error("text requires set");l.addTextData(N,h[k-1],h[k]);break;case 29:case 41:this.$=[h[k]];break;case 30:case 42:this.$=[...h[k-2],h[k]];break;case 31:this.$=[h[k-2],h[k]];break;case 33:this.$=h[k].join(" ");break;case 34:this.$=[h[k]];break;case 35:h[k-1].push(h[k]),this.$=h[k-1];break;case 43:case 44:this.$=h[k];break}},"anonymous"),table:[t(n,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(s,[2,4],{6:5}),t(n,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(s,[2,5]),t(s,[2,6]),t(s,[2,7]),t(s,[2,8]),{13:16,20:e,21:i},{13:20,18:19,20:e,21:i},{13:20,18:21,20:e,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:e,21:i},t(s,[2,9],{14:[1,27],15:[1,28]}),t(r,[2,43]),t(r,[2,44]),t(s,[2,13],{14:[1,29],15:[1,30],27:o}),t(r,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},t(s,[2,22]),t(s,[2,24],{14:[1,35]}),t(s,[2,25],{14:[1,36]}),t(s,[2,26]),{20:c,25:37,26:38,27:o},t(s,[2,10],{15:[1,40]}),{16:[1,41]},t(s,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:e,21:i},t(s,[2,17],{14:[1,45]}),t(s,[2,18],{14:[1,46]}),t(s,[2,19]),t(s,[2,27]),t(s,[2,28]),t(s,[2,23],{27:[1,47]}),t(f,[2,29]),{15:[1,48]},{16:[1,49]},t(s,[2,11]),{16:[1,50]},t(s,[2,15]),t(r,[2,42]),t(s,[2,20]),t(s,[2,21]),{20:c,26:51},{16:u,20:a,21:[1,53],28:52,29:54,30:55,31:y,32:d,33:m},t(s,[2,12]),t(s,[2,16]),t(f,[2,30]),t(f,[2,31]),t(f,[2,32]),t(f,[2,33],{30:61,16:u,20:a,31:y,32:d,33:m}),t(x,[2,34]),t(x,[2,36]),t(x,[2,37]),t(x,[2,38]),t(x,[2,39]),t(x,[2,40]),t(x,[2,35])],defaultActions:{6:[2,1]},parseError:S(function(g,b){if(b.recoverable)this.trace(g);else{var v=new Error(g);throw v.hash=b,v}},"parseError"),parse:S(function(g){var b=this,v=[0],l=[],p=[null],h=[],j=this.table,k="",N=0,X=0,B=2,U=1,q=h.slice.call(arguments,1),z=Object.create(this.lexer),A={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(A.yy[D]=this.yy[D]);z.setInput(g,A.yy),A.yy.lexer=z,A.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var O=z.yylloc;h.push(O);var P=z.options&&z.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function V(K){v.length=v.length-2*K,p.length=p.length-K,h.length=h.length-K}S(V,"popStack");function R(){var K;return K=l.pop()||z.lex()||U,typeof K!="number"&&(K instanceof Array&&(l=K,K=l.pop()),K=b.symbols_[K]||K),K}S(R,"lex");for(var T,F,C,Y,I={},L,G,Z,H;;){if(F=v[v.length-1],this.defaultActions[F]?C=this.defaultActions[F]:((T===null||typeof T>"u")&&(T=R()),C=j[F]&&j[F][T]),typeof C>"u"||!C.length||!C[0]){var J="";H=[];for(L in j[F])this.terminals_[L]&&L>B&&H.push("'"+this.terminals_[L]+"'");z.showPosition?J="Parse error on line "+(N+1)+`: +`+z.showPosition()+` +Expecting `+H.join(", ")+", got '"+(this.terminals_[T]||T)+"'":J="Parse error on line "+(N+1)+": Unexpected "+(T==U?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(J,{text:z.match,token:this.terminals_[T]||T,line:z.yylineno,loc:O,expected:H})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+T);switch(C[0]){case 1:v.push(T),p.push(z.yytext),h.push(z.yylloc),v.push(C[1]),T=null,X=z.yyleng,k=z.yytext,N=z.yylineno,O=z.yylloc;break;case 2:if(G=this.productions_[C[1]][1],I.$=p[p.length-G],I._$={first_line:h[h.length-(G||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(G||1)].first_column,last_column:h[h.length-1].last_column},P&&(I._$.range=[h[h.length-(G||1)].range[0],h[h.length-1].range[1]]),Y=this.performAction.apply(I,[k,X,N,A.yy,C[1],p,h].concat(q)),typeof Y<"u")return Y;G&&(v=v.slice(0,-1*G*2),p=p.slice(0,-1*G),h=h.slice(0,-1*G)),v.push(this.productions_[C[1]][0]),p.push(I.$),h.push(I._$),Z=j[v[v.length-2]][v[v.length-1]],v.push(Z);break;case 3:return!0}}return!0},"parse")},E=function(){var w={EOF:1,parseError:S(function(b,v){if(this.yy.parser)this.yy.parser.parseError(b,v);else throw new Error(b)},"parseError"),setInput:S(function(g,b){return this.yy=b||this.yy||{},this._input=g,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:S(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var b=g.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},"input"),unput:S(function(g){var b=g.length,v=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var l=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),v.length-1&&(this.yylineno-=v.length-1);var p=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:v?(v.length===l.length?this.yylloc.first_column:0)+l[l.length-v.length].length-v[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:S(function(){return this._more=!0,this},"more"),reject:S(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:S(function(g){this.unput(this.match.slice(g))},"less"),pastInput:S(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:S(function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:S(function(){var g=this.pastInput(),b=new Array(g.length+1).join("-");return g+this.upcomingInput()+` +`+b+"^"},"showPosition"),test_match:S(function(g,b){var v,l,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),l=g[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+g[0].length},this.yytext+=g[0],this.match+=g[0],this.matches=g,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(g[0].length),this.matched+=g[0],v=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var h in p)this[h]=p[h];return!1}return!1},"test_match"),next:S(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var g,b,v,l;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),h=0;hb[0].length)){if(b=v,l=h,this.options.backtrack_lexer){if(g=this.test_match(v,p[h]),g!==!1)return g;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(g=this.test_match(b,p[l]),g!==!1?g:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:S(function(){var b=this.next();return b||this.lex()},"lex"),begin:S(function(b){this.conditionStack.push(b)},"begin"),popState:S(function(){var b=this.conditionStack.length-1;return b>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:S(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:S(function(b){return b=this.conditionStack.length-1-Math.abs(b||0),b>=0?this.conditionStack[b]:"INITIAL"},"topState"),pushState:S(function(b){this.begin(b)},"pushState"),stateStackSize:S(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:S(function(b,v,l,p){switch(l){case 0:break;case 1:break;case 2:break;case 3:if(b.getIndentMode&&b.getIndentMode())return b.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:b.setIndentMode&&b.setIndentMode(!1),this.begin("INITIAL"),this.unput(v.yytext);break;case 6:return this.begin("bol"),8;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(b.consumeIndentText)b.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return v.yytext=v.yytext.slice(2,-2),14;case 17:return v.yytext=v.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return w}();M.lexer=E;function _(){this.yy={}}return S(_,"Parser"),_.prototype=M,M.Parser=_,new _}();gt.parser=gt;var we=gt,yt=[],pt=[],mt=[],bt=new Set,vt,It=!1,Se=S((t,n,s)=>{const e=it(t).sort(),i=s??10/Math.pow(t.length,2);vt=e,e.length===1&&bt.add(e[0]),yt.push({sets:e,size:i,label:n?nt(n):void 0})},"addSubsetData"),_e=S(()=>yt,"getSubsetData"),nt=S(t=>{const n=t.trim();return n.length>=2&&n.startsWith('"')&&n.endsWith('"')?n.slice(1,-1):n},"normalizeText"),Te=S(t=>t&&nt(t),"normalizeStyleValue"),Ee=S((t,n,s)=>{const e=nt(n);pt.push({sets:it(t).sort(),id:e,label:s?nt(s):void 0})},"addTextData"),ze=S((t,n)=>{const s=it(t).sort(),e={};for(const[i,r]of n)e[i]=Te(r)??r;mt.push({targets:s,styles:e})},"addStyleData"),Ae=S(()=>mt,"getStyleData"),it=S(t=>t.map(n=>nt(n)),"normalizeIdentifierList"),Re=S(t=>{const s=it(t).filter(e=>!bt.has(e));if(s.length>0)throw new Error(`unknown set identifier: ${s.join(", ")}`)},"validateUnionIdentifiers"),De=S(()=>pt,"getTextData"),Ce=S(()=>vt,"getCurrentSets"),Ne=S(()=>It,"getIndentMode"),Oe=S(t=>{It=t},"setIndentMode"),Fe=re.venn;function Bt(){return ie(Fe,St().venn)}S(Bt,"getConfig");var Le=S(()=>{se(),yt.length=0,pt.length=0,mt.length=0,bt.clear(),vt=void 0,It=!1},"customClear"),je={getConfig:Bt,clear:Le,setAccTitle:Zt,getAccTitle:Yt,setDiagramTitle:Xt,getDiagramTitle:Ht,getAccDescription:Kt,setAccDescription:Wt,addSubsetData:Se,getSubsetData:_e,addTextData:Ee,addStyleData:ze,validateUnionIdentifiers:Re,getTextData:De,getStyleData:Ae,getCurrentSets:Ce,getIndentMode:Ne,setIndentMode:Oe},Pe=S(t=>` + .venn-title { + font-size: 32px; + fill: ${t.vennTitleTextColor}; + font-family: ${t.fontFamily}; + } + + .venn-circle text { + font-size: 48px; + font-family: ${t.fontFamily}; + } + + .venn-intersection text { + font-size: 48px; + fill: ${t.vennSetTextColor}; + font-family: ${t.fontFamily}; + } + + .venn-text-node { + font-family: ${t.fontFamily}; + color: ${t.vennSetTextColor}; + } +`,"getStyles"),Ve=Pe;function qt(t){const n=new Map;for(const s of t){const e=s.targets.join("|"),i=n.get(e);i?Object.assign(i,s.styles):n.set(e,{...s.styles})}return n}S(qt,"buildStyleByKey");var Be=S((t,n,s,e)=>{var U,q,z;const i=e.db,r=(U=i.getConfig)==null?void 0:U.call(i),{themeVariables:o,look:c,handDrawnSeed:f}=St(),u=c==="handDrawn",a=[o.venn1,o.venn2,o.venn3,o.venn4,o.venn5,o.venn6,o.venn7,o.venn8].filter(Boolean),y=(q=i.getDiagramTitle)==null?void 0:q.call(i),d=i.getSubsetData(),m=i.getTextData(),x=qt(i.getStyleData()),M=(r==null?void 0:r.width)??800,E=(r==null?void 0:r.height)??450,w=M/1600,g=y?48*w:0,b=o.primaryTextColor??o.textColor,v=Jt(n);v.attr("viewBox",`0 0 ${M} ${E}`),y&&v.append("text").text(y).attr("class","venn-title").attr("font-size",`${32*w}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*w).style("fill",o.vennTitleTextColor||o.titleColor);const l=rt(document.createElement("div")),p=be().width(M).height(E-g);l.datum(d).call(p);const h=u?Qt.svg(l.select("svg").node()):void 0,j=Me(d,{width:M,height:E-g,padding:(r==null?void 0:r.padding)??15}),k=new Map;for(const A of j){const D=$([...A.data.sets].sort());k.set(D,A)}m.length>0&&Ut(r,k,l,m,w,x);const N=$t(o.background||"#f4f4f4");l.selectAll(".venn-circle").each(function(A,D){var L;const O=rt(this),V=$([...A.sets].sort()),R=x.get(V),T=(R==null?void 0:R.fill)||a[D%a.length]||o.primaryColor;O.classed(`venn-set-${D%8}`,!0);const F=(R==null?void 0:R["fill-opacity"])??.1,C=(R==null?void 0:R.stroke)||T,Y=(R==null?void 0:R["stroke-width"])||`${5*w}`;if(u&&h){const G=k.get(V);if(G&&G.circles.length>0){const Z=G.circles[0],H=h.circle(Z.x,Z.y,Z.radius*2,{roughness:.7,seed:f,fill:kt(T,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+D*60,stroke:C,strokeWidth:parseFloat(String(Y))});O.select("path").remove(),(L=O.node())==null||L.insertBefore(H,O.select("text").node())}}else O.select("path").style("fill",T).style("fill-opacity",F).style("stroke",C).style("stroke-width",Y).style("stroke-opacity",.95);const I=(R==null?void 0:R.color)||(N?te(T,30):ee(T,30));O.select("text").style("font-size",`${48*w}px`).style("fill",I)}),u&&h?l.selectAll(".venn-intersection").each(function(A){var T;const D=rt(this),P=$([...A.sets].sort()),V=x.get(P),R=V==null?void 0:V.fill;if(R){const F=D.select("path"),C=F.attr("d");if(C){const Y=h.path(C,{roughness:.7,seed:f,fill:kt(R,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),I=F.node();(T=I==null?void 0:I.parentNode)==null||T.insertBefore(Y,I),F.remove()}}else D.select("path").style("fill-opacity",0);D.select("text").style("font-size",`${48*w}px`).style("fill",(V==null?void 0:V.color)??o.vennSetTextColor??b)}):(l.selectAll(".venn-intersection text").style("font-size",`${48*w}px`).style("fill",A=>{var P;const O=$([...A.sets].sort());return((P=x.get(O))==null?void 0:P.color)??o.vennSetTextColor??b}),l.selectAll(".venn-intersection path").style("fill-opacity",A=>{var P;const O=$([...A.sets].sort());return(P=x.get(O))!=null&&P.fill?1:0}).style("fill",A=>{var P;const O=$([...A.sets].sort());return((P=x.get(O))==null?void 0:P.fill)??"transparent"}));const X=v.append("g").attr("transform",`translate(0, ${g})`),B=l.select("svg").node();if(B&&"childNodes"in B)for(const A of[...B.childNodes])(z=X.node())==null||z.appendChild(A);ne(v,E,M,(r==null?void 0:r.useMaxWidth)??!0)},"draw");function $(t){return t.join("|")}S($,"stableSetsKey");function Ut(t,n,s,e,i,r){var a;const o=(t==null?void 0:t.useDebugLayout)??!1,f=s.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(const y of e){const d=$(y.sets),m=u.get(d);m?m.push(y):u.set(d,[y])}for(const[y,d]of u.entries()){const m=n.get(y);if(!(m!=null&&m.text))continue;const x=m.text.x,M=m.text.y,E=Math.min(...m.circles.map(q=>q.radius)),_=Math.min(...m.circles.map(q=>q.radius-Math.hypot(x-q.x,M-q.y)));let w=Number.isFinite(_)?Math.max(0,_):0;w===0&&Number.isFinite(E)&&(w=E*.6);const g=f.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);o&&g.append("circle").attr("class","venn-text-debug-circle").attr("cx",x).attr("cy",M).attr("r",w).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const b=Math.max(80*i,w*2*.95),v=Math.max(60*i,w*2*.95),h=(m.data.label&&m.data.label.length>0?Math.min(32*i,w*.25):0)+(d.length<=2?30*i:0),j=x-b/2,k=M-v/2+h,N=Math.max(1,Math.ceil(Math.sqrt(d.length))),X=Math.max(1,Math.ceil(d.length/N)),B=b/N,U=v/X;for(const[q,z]of d.entries()){const A=q%N,D=Math.floor(q/N),O=j+B*(A+.5),P=k+U*(D+.5);o&&g.append("rect").attr("class","venn-text-debug-cell").attr("x",j+B*A).attr("y",k+U*D).attr("width",B).attr("height",U).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const V=B*.9,R=U*.9,T=g.append("foreignObject").attr("class","venn-text-node-fo").attr("width",V).attr("height",R).attr("x",O-V/2).attr("y",P-R/2).attr("overflow","visible"),F=(a=r.get(z.id))==null?void 0:a.color,C=T.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(z.label??z.id);F&&C.style("color",F)}}}S(Ut,"renderTextNodes");var qe={draw:Be},We={parser:we,db:je,renderer:qe,styles:Ve};export{We as diagram}; diff --git a/dist/assets/wardley-L42UT6IY-BXdEa5-p.js b/dist/assets/wardley-L42UT6IY-BXdEa5-p.js new file mode 100644 index 0000000..f8534e0 --- /dev/null +++ b/dist/assets/wardley-L42UT6IY-BXdEa5-p.js @@ -0,0 +1 @@ +import{l as e}from"./mermaid-parser.core-D9g22YKo.js";import{W as p}from"./mermaid-parser.core-D9g22YKo.js";import"./index-mLPbTfpz.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";export{p as WardleyModule,e as createWardleyServices}; diff --git a/dist/assets/wardleyDiagram-YWT4CUSO-D-feaV5C.js b/dist/assets/wardleyDiagram-YWT4CUSO-D-feaV5C.js new file mode 100644 index 0000000..09fdd7d --- /dev/null +++ b/dist/assets/wardleyDiagram-YWT4CUSO-D-feaV5C.js @@ -0,0 +1,78 @@ +import{s as zt,g as Lt,q as Tt,p as At,a as Xt,b as Et,_ as y,K as Yt,D as It,F as Q,l as et,I as Ft,e as Bt,z as Rt,c as V}from"./index-mLPbTfpz.js";import{p as Ot}from"./chunk-4BX2VUAB-DTW3NaPN.js";import{p as Wt}from"./mermaid-parser.core-D9g22YKo.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";var G=y((a,o)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),E=y((a,o,e)=>({x:G(o,`${e} evolution`),y:G(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Dt=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(a),e=o==null?void 0:o[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Gt=y((a,o)=>{if(Ot(a,o),a.size&&o.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),p=a.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);o.updateAxes({stages:e,stageBoundaries:p})}if(a.anchors.forEach(e=>{const p=E(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,p.x,p.y,"anchor")}),a.components.forEach(e=>{var v;const p=E(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;o.addNode(e.name,e.name,p.x,p.y,"component",r,d,e.inertia,m)}),a.notes.forEach(e=>{const p=E(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,p.x,p.y)}),a.pipelines.forEach(e=>{const p=o.getNode(e.parent);if(!p||typeof p.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const r=p.y;o.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,L=G(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(m,d.name,L,r,"pipeline-component",v,g),o.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const p=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let r=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Dt(e.arrow);!r&&d&&(r=d);const v=e.linkLabel,g=m??v;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),p,g,r)}),a.evolves.forEach(e=>{const p=o.getNode(e.component);if((p==null?void 0:p.y)!==void 0){const r=G(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,r,p.y)}}),a.annotations.length>0){const e=a.annotations[0],p=E(e.x,e.y,"Annotations box");o.setAnnotationsBox(p.x,p.y)}a.annotation.forEach(e=>{const p=E(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:p.x,y:p.y}],e.text)}),a.accelerators.forEach(e=>{const p=E(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,p.x,p.y)}),a.deaccelerators.forEach(e=>{const p=E(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,p.x,p.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var p;const o=await Wt("wardley",a);et.debug(o);const e=(p=at.parser)==null?void 0:p.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Gt(o,e)},"parse")},I,qt=(I=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(o){const e=this.nodes.get(o.id)??{id:o.id,label:o.label},p={...e,...o,className:o.className??e.className,labelOffsetX:o.labelOffsetX??e.labelOffsetX,labelOffsetY:o.labelOffsetY??e.labelOffsetY};this.nodes.set(o.id,p)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const p=this.pipelines.get(o);p&&p.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,p]of this.nodes)if(p.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(I,"WardleyBuilder"),I),b=new qt;function rt(){return V()["wardley-beta"]}y(rt,"getConfig");function ot(a,o,e,p,r,d,m,v,g){b.addNode({id:a,label:o,x:e,y:p,className:r,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,o,e=!1,p,r){b.addLink({source:a,target:o,dashed:e,label:p,flow:r})}y(st,"addLink");function nt(a,o,e){b.addTrend({nodeId:a,targetX:o,targetY:e})}y(nt,"addTrend");function it(a,o,e){b.addAnnotation({number:a,coordinates:o,text:e})}y(it,"addAnnotation");function dt(a,o,e){b.addNote({text:a,x:o,y:e})}y(dt,"addNote");function lt(a,o,e){b.addAccelerator({name:a,x:o,y:e})}y(lt,"addAccelerator");function ct(a,o,e){b.addDeaccelerator({name:a,x:o,y:e})}y(ct,"addDeaccelerator");function pt(a,o){b.setAnnotationsBox(a,o)}y(pt,"setAnnotationsBox");function ht(a,o){b.setSize(a,o)}y(ht,"setSize");function xt(a){b.startPipeline(a)}y(xt,"startPipeline");function ft(a,o){b.addPipelineComponent(a,o)}y(ft,"addPipelineComponent");function gt(a){b.setAxes(a)}y(gt,"updateAxes");function ut(a){return b.getNode(a)}y(ut,"getNode");function yt(a){return b.resolveNodeId(a)}y(yt,"resolveNodeId");function mt(){return b.build()}y(mt,"getWardleyData");function wt(){b.clear(),Rt()}y(wt,"clear");var Ht={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,resolveNodeId:yt,getWardleyData:mt,clear:wt,setAccTitle:Et,getAccTitle:Xt,setDiagramTitle:At,getDiagramTitle:Tt,getAccDescription:Lt,setAccDescription:zt},jt=["Genesis","Custom Built","Product","Commodity"],Vt=y(()=>{var o,e,p,r,d,m,v,g,L,M,k,N;const{themeVariables:a}=V();return{backgroundColor:((o=a.wardley)==null?void 0:o.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((p=a.wardley)==null?void 0:p.axisTextColor)??a.primaryTextColor??"#222",gridColor:((r=a.wardley)==null?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((L=a.wardley)==null?void 0:L.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((k=a.wardley)==null?void 0:k.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),_t=y(()=>{const a=V()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),Zt=y((a,o,e,p)=>{var U,J;et.debug(`Rendering Wardley map +`+a);const r=_t(),d=Vt(),m=r.nodeRadius*1.6,v=p.db,g=v.getWardleyData(),L=v.getDiagramTitle(),M=((U=g.size)==null?void 0:U.width)??r.width,k=((J=g.size)==null?void 0:J.height)??r.height,N=Ft(o);N.selectAll("*").remove(),Bt(N,k,M,r.useMaxWidth),N.attr("viewBox",`0 0 ${M} ${k}`);const P=N.append("g").attr("class","wardley-map"),q=N.append("defs");q.append("marker").attr("id",`arrow-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${o}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),P.append("rect").attr("class","wardley-background").attr("width",M).attr("height",k).attr("fill",d.backgroundColor);const F=M-r.padding*2,B=k-r.padding*2;L&&P.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",r.padding/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(L);const T=y(t=>r.padding+t/100*F,"projectX"),A=y(t=>k-r.padding-t/100*B,"projectY"),O=P.append("g").attr("class","wardley-axes");O.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const kt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+F/2).attr("y",k-r.padding/4).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(kt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+B/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+B/2})`).text(bt);const R=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:jt;if(R.length>0){const t=P.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===R.length){let i=0;n.forEach(h=>{s.push({start:i,end:h}),i=h})}else{const i=1/R.length;R.forEach((h,l)=>{s.push({start:l*i,end:(l+1)*i})})}R.forEach((i,h)=>{const l=s[h],x=r.padding+l.start*F,f=r.padding+l.end*F,u=(x+f)/2;h>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",k-r.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(r.showGrid){const t=P.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=r.padding+F*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding-B*s).attr("y2",k-r.padding-B*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:T(t.x),y:A(t.y),node:t})}),g.pipelines.length>0){const t=P.append("g").attr("class","wardley-pipelines"),n=P.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f{const u=c.get(f);u&&(h=Math.min(h,u.x),l=Math.max(l,u.x),x=u.y)}),h!==1/0&&l!==-1/0){const u=r.nodeRadius*4,w=x-u/2,S=c.get(s.nodeId);if(S){const z=(h+l)/2;S.x=z,S.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",h-15).attr("y",w).attr("width",l-h+15*2).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=P.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const K=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=Z.get(t.target);return!(n!=null&&n.has(t.source))});_.selectAll("line").data(K).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*h}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*h}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*h}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*h}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${o})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${o})`:null),_.selectAll("text").data(K.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+h*h),f=8,u=h/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,h=s.x-n.x,l=s.y-n.y,x=Math.sqrt(h*h+l*l),f=8,u=-h/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,S=-l/f,z=i+w*u,W=h+S*u;let Y=Math.atan2(x,l)*180/Math.PI;return(Y>90||Y<-90)&&(Y+=180),`rotate(${Y} ${z} ${W})`}).text(t=>t.label);const $t=P.append("g").attr("class","wardley-trends"),vt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=T(t.targetX),i=A(t.targetY),h=s-n.x,l=i-n.y,x=Math.sqrt(h*h+l*l),f=r.nodeRadius+2,u=x>f?s-h/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);$t.selectAll("line").data(vt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${o})`);const C=P.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));C.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const X=C.filter(t=>t.sourceStrategy==="market");X.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=r.nodeRadius*.7,$=r.nodeRadius*1.2;if(X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),C.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),C.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",r.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=P.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:T(i.x),y:A(i.y)}));if(s.length>1)for(let i=0;i{const h=t.append("g").attr("class","wardley-annotation");h.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),h.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=T(g.annotationsBox.x),s=A(g.annotationsBox.y);const i=10,h=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,S)=>w.number-S.number),u=[];if(f.forEach((w,S)=>{const z=x.append("text").attr("x",n+i).attr("y",s+i+(S+1)*h).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(z)}),u.length>0){let w=0,S=0;u.forEach(j=>{const D=j.node(),Nt=D.getComputedTextLength();w=Math.max(w,Nt);const Ct=D.getBBox();S=Math.max(S,Ct.height)});const z=w+i*2+105,W=f.length*h+i*2+S/2,Y=r.padding,Pt=M-r.padding-z,St=r.padding,Mt=k-r.padding-W;n=Math.max(Y,Math.min(n,Pt)),s=Math.max(St,Math.min(s,Mt)),u.forEach((j,D)=>{j.attr("x",n+i).attr("y",s+i+(D+1)*h)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",z).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=P.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=T(n.x),i=A(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=P.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=T(n.x),i=A(n.y),h=60,l=30,x=20,f=` + M ${s} ${i-l/2} + L ${s+h-x} ${i-l/2} + L ${s+h-x} ${i-l/2-8} + L ${s+h} ${i} + L ${s+h-x} ${i+l/2+8} + L ${s+h-x} ${i+l/2} + L ${s} ${i+l/2} + Z + `;t.append("path").attr("d",f).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+h/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.name)})}if(g.deaccelerators.length>0){const t=P.append("g").attr("class","wardley-deaccelerators");g.deaccelerators.forEach(n=>{const s=T(n.x),i=A(n.y),h=60,l=30,x=20,f=` + M ${s+h} ${i-l/2} + L ${s+x} ${i-l/2} + L ${s+x} ${i-l/2-8} + L ${s} ${i} + L ${s+x} ${i+l/2+8} + L ${s+x} ${i+l/2} + L ${s+h} ${i+l/2} + Z + `;t.append("path").attr("d",f).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+h/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.name)})}},"draw"),Kt={draw:Zt},Ut=y(({wardley:a}={})=>{const o=Yt(),e=It(),p=Q(o,e.themeVariables),r=Q(p.wardley,a);return` + .wardley-background { + fill: ${r.backgroundColor}; + } + .wardley-axes line, .wardley-axes path { + stroke: ${r.axisColor}; + } + .wardley-axis-label { + fill: ${r.axisTextColor}; + } + .wardley-stage-label { + fill: ${r.axisTextColor}; + } + .wardley-grid line { + stroke: ${r.gridColor}; + } + .wardley-node circle { + fill: ${r.componentFill}; + stroke: ${r.componentStroke}; + } + .wardley-node-label { + fill: ${r.componentLabelColor}; + } + .wardley-link { + stroke: ${r.linkStroke}; + } + .wardley-link--dashed { + stroke-dasharray: 4 4; + } + .wardley-link-label { + fill: ${r.axisTextColor}; + } + .wardley-trend line { + stroke: ${r.evolutionStroke}; + } + .wardley-annotation-line { + stroke: ${r.annotationStroke}; + } + .wardley-annotation circle { + fill: ${r.annotationFill}; + stroke: ${r.annotationStroke}; + } + .wardley-annotation text { + fill: ${r.annotationTextColor}; + } + .wardley-annotations-box rect { + fill: ${r.annotationFill}; + stroke: ${r.annotationStroke}; + } + .wardley-annotations-box text { + fill: ${r.annotationTextColor}; + } + .wardley-pipeline-box { + stroke: ${r.componentStroke}; + } + .wardley-notes text { + fill: ${r.axisTextColor}; + } + `},"styles"),re={parser:at,db:Ht,renderer:Kt,styles:Ut};export{re as diagram}; diff --git a/dist/assets/xychartDiagram-2RQKCTM6-D123ylb3.js b/dist/assets/xychartDiagram-2RQKCTM6-D123ylb3.js new file mode 100644 index 0000000..2ad4dc7 --- /dev/null +++ b/dist/assets/xychartDiagram-2RQKCTM6-D123ylb3.js @@ -0,0 +1,7 @@ +import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,am as Si,R as Wt}from"./index-mLPbTfpz.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-CvhoBmDn.js";import"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&>.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`: +`+D.showPosition()+` +Expecting `+gt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:pt,expected:gt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+M);switch(z[0]){case 1:g.push(M),C.push(D.yytext),r.push(D.yylloc),g.push(z[1]),M=null,It=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=C[C.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ci&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(G,[d,It,ct,$.yy,z[1],C,r].concat(li)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},k=function(){var F={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=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 C=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===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+` +`+c+"^"},"showPosition"),test_match:a(function(h,c){var g,x,C;if(this.options.backtrack_lexer&&(C={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&&(C.yylloc.range=this.yylloc.range.slice(0))),x=h[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var r in C)this[r]=C[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,c,g,x;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),r=0;rc[0].length)){if(c=g,x=r,this.options.backtrack_lexer){if(h=this.test_match(g,C[r]),h!==!1)return h;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(h=this.test_match(c,C[x]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var c=this.next();return c||this.lex()},"lex"),begin:a(function(c){this.conditionStack.push(c)},"begin"),popState:a(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:a(function(c){this.begin(c)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(c,g,x,C){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return F}();V.lexer=k;function H(){this.yy={}}return a(H,"Parser"),H.prototype=V,V.Parser=H,new H}();At.parser=At;var Ti=At;function wt(e){return e.type==="bar"}a(wt,"isBarPlot");function kt(e){return e.type==="band"}a(kt,"isBandAxisData");function j(e){return e.type==="linear"}a(j,"isLinearAxisData");var Q,Ht=(Q=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,u)=>Math.max(u.length,o),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const u=Si(n,1,o),p=u?u.width:o.length*i,f=u?u.height:i;s.width=Math.max(s.width,p),s.height=Math.max(s.height,f)}return n.remove(),s}},a(Q,"TextDimensionCalculatorWithFont"),Q),Ot=.7,Ft=.2,K,Ut=(K=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ot*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ot*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ft*t.width;this.outerPadding=Math.min(s.width/2,n);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ft*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(K,"BaseAxis"),K),Z,Di=(Z=class extends Ut{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=bt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=bt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Yt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(Z,"BandAxis"),Z),J,vi=(J=class extends Ut{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=zt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=zt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(J,"LinearAxis"),J);function Ct(e,t,i,s){const n=new Ht(s);return kt(e)?new Di(t,i,e.categories,e.title,n):new vi(t,i,[e.min,e.max],e.title,n)}a(Ct,"getAxis");var tt,Pi=(tt=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(tt,"ChartTitle"),tt);function $t(e,t,i,s){const n=new Ht(s);return new Pi(n,e,t,i)}a($t,"getChartTitleComponent");var it,Li=(it=class{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return this.orientation==="horizontal"?i=Wt().y(s=>s[0]).x(s=>s[1])(t):i=Wt().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a(it,"LinePlot"),it),et,Ei=(et=class{constructor(t,i,s,n,o,u){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=u}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(et,"BarPlot"),et),st,Ii=(st=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Li(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Ei(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}},a(st,"BasePlot"),st);function qt(e,t,i){return new Ii(e,t,i)}a(qt,"getPlotComponent");var nt,Mi=(nt=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:$t(t,i,s,n),plot:qt(t,i,s),xAxis:Ct(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Ct(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:o,height:u});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("bottom"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=p.height,this.componentStore.yAxis.setAxisPosition("left"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=p.width,t-=p.width,t>0&&(o+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+u}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(f=>wt(f))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,u=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:u,height:p});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=f.height,o=s+f.height,t>0&&(u+=t,t=0),i>0&&(p+=i,i=0),this.componentStore.plot.calculateSpace({width:u,height:p}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+p]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(T=>wt(T))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(nt,"Orchestrator"),nt),at,Vi=(at=class{static build(t,i,s,n){return new Mi(t,i,s,n).getDrawableElement()}},a(at,"XYChartBuilder"),at),ot=0,Gt,ht=Dt(),lt=Tt(),A=vt(),St=lt.plotColorPalette.split(",").map(e=>e.trim()),xt=!1,Rt=!1;function Tt(){const e=Ci(),t=_t();return Nt(e.xyChart,t.themeVariables.xyChart)}a(Tt,"getChartDefaultThemeConfig");function Dt(){const e=_t();return Nt(wi.xyChart,e.xyChart)}a(Dt,"getChartDefaultConfig");function vt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(vt,"getChartDefaultData");function dt(e){const t=_t();return Ai(e.trim(),t)}a(dt,"textSanitizer");function jt(e){Gt=e}a(jt,"setTmpSVGG");function Qt(e){e==="horizontal"?ht.chartOrientation="horizontal":ht.chartOrientation="vertical"}a(Qt,"setOrientation");function Kt(e){A.xAxis.title=dt(e.text)}a(Kt,"setXAxisTitle");function Pt(e,t){A.xAxis={type:"linear",title:A.xAxis.title,min:e,max:t},xt=!0}a(Pt,"setXAxisRangeData");function Zt(e){A.xAxis={type:"band",title:A.xAxis.title,categories:e.map(t=>dt(t.text))},xt=!0}a(Zt,"setXAxisBand");function Jt(e){A.yAxis.title=dt(e.text)}a(Jt,"setYAxisTitle");function ti(e,t){A.yAxis={type:"linear",title:A.yAxis.title,min:e,max:t},Rt=!0}a(ti,"setYAxisRangeData");function ii(e){const t=Math.min(...e),i=Math.max(...e),s=j(A.yAxis)?A.yAxis.min:1/0,n=j(A.yAxis)?A.yAxis.max:-1/0;A.yAxis={type:"linear",title:A.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}a(ii,"setYAxisRangeFromPlotData");function Lt(e){let t=[];if(e.length===0)return t;if(!xt){const i=j(A.xAxis)?A.xAxis.min:1/0,s=j(A.xAxis)?A.xAxis.max:-1/0;Pt(Math.min(i,1),Math.max(s,e.length))}if(Rt||ii(e),kt(A.xAxis)&&(t=A.xAxis.categories.map((i,s)=>[i,e[s]])),j(A.xAxis)){const i=A.xAxis.min,s=A.xAxis.max,n=(s-i)/(e.length-1),o=[];for(let u=i;u<=s;u+=n)o.push(`${u}`);t=o.map((u,p)=>[u,e[p]])}return t}a(Lt,"transformDataWithoutCategory");function Et(e){return St[e===0?0:e%St.length]}a(Et,"getPlotColorFromPalette");function ei(e,t){const i=Lt(t);A.plots.push({type:"line",strokeFill:Et(ot),strokeWidth:2,data:i}),ot++}a(ei,"setLineData");function si(e,t){const i=Lt(t);A.plots.push({type:"bar",fill:Et(ot),data:i}),ot++}a(si,"setBarData");function ni(){if(A.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return A.title=Xt(),Vi.build(ht,A,lt,Gt)}a(ni,"getDrawableElem");function ai(){return lt}a(ai,"getChartThemeConfig");function ri(){return ht}a(ri,"getChartConfig");function oi(){return A}a(oi,"getXYChartData");var Bi=a(function(){bi(),ot=0,ht=Dt(),A=vt(),lt=Tt(),St=lt.plotColorPalette.split(",").map(e=>e.trim()),xt=!1,Rt=!1},"clear"),Wi={getDrawableElem:ni,clear:Bi,setAccTitle:pi,getAccTitle:fi,setDiagramTitle:di,getDiagramTitle:Xt,getAccDescription:xi,setAccDescription:gi,setOrientation:Qt,setXAxisTitle:Kt,setXAxisRangeData:Pt,setXAxisBand:Zt,setYAxisTitle:Jt,setYAxisRangeData:ti,setLineData:ei,setBarData:si,setTmpSVGG:jt,getChartThemeConfig:ai,getChartConfig:ri,getXYChartData:oi},zi=a((e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),u=n.getChartConfig(),p=n.getXYChartData().plots[0].data.map(m=>m[1]);function f(m){return m==="top"?"text-before-edge":"middle"}a(f,"getDominantBaseLine");function T(m){return m==="left"?"start":m==="right"?"end":"middle"}a(T,"getTextAnchor");function P(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}a(P,"getTextTransformation"),Yt.debug(`Rendering xychart chart +`+e);const _=mi(t),y=_.append("g").attr("class","main"),E=y.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");yi(_,u.height,u.width,!0),_.attr("viewBox",`0 0 ${u.width} ${u.height}`),E.attr("fill",o.backgroundColor),n.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));const v=n.getDrawableElem(),L={};function I(m){let R=y,l="";for(const[W]of m.entries()){let O=y;W>0&&L[l]&&(O=L[l]),l+=m[W],R=L[l],R||(R=L[l]=O.append("g").attr("class",m[W]))}return R}a(I,"getGroup");for(const m of v){if(m.data.length===0)continue;const R=I(m.groupTexts);switch(m.type){case"rect":if(R.selectAll("rect").data(m.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),u.showDataLabel){const l=u.showDataLabelOutsideBar;if(u.chartOrientation==="horizontal"){let W=function(w,V){const{data:k,label:H}=w;return V*H.length*O<=k.width-X};a(W,"fitsHorizontally");const O=.7,X=10,Y=m.data.map((w,V)=>({data:w,label:p[V].toString()})).filter(w=>w.data.width>0&&w.data.height>0),S=Y.map(w=>{const{data:V}=w;let k=V.height*.7;for(;!W(w,k)&&k>0;)k-=1;return k}),U=Math.floor(Math.min(...S)),b=a(w=>l?w.data.x+w.data.width+X:w.data.x+w.data.width-X,"determineLabelXPosition");R.selectAll("text").data(Y).enter().append("text").attr("x",b).attr("y",w=>w.data.y+w.data.height/2).attr("text-anchor",l?"start":"end").attr("dominant-baseline","middle").attr("fill",o.dataLabelColor).attr("font-size",`${U}px`).text(w=>w.label)}else{let W=function(b,w,V){const{data:k,label:H}=b,h=w*H.length*.7,c=k.x+k.width/2,g=c-h/2,x=c+h/2,C=g>=k.x&&x<=k.x+k.width,r=k.y+V+w<=k.y+k.height;return C&&r};a(W,"fitsInBar");const O=10,X=m.data.map((b,w)=>({data:b,label:p[w].toString()})).filter(b=>b.data.width>0&&b.data.height>0),Y=X.map(b=>{const{data:w,label:V}=b;let k=w.width/(V.length*.7);for(;!W(b,k,O)&&k>0;)k-=1;return k}),S=Math.floor(Math.min(...Y)),U=a(b=>l?b.data.y-O:b.data.y+O,"determineLabelYPosition");R.selectAll("text").data(X).enter().append("text").attr("x",b=>b.data.x+b.data.width/2).attr("y",U).attr("text-anchor","middle").attr("dominant-baseline",l?"auto":"hanging").attr("fill",o.dataLabelColor).attr("font-size",`${S}px`).text(b=>b.label)}}break;case"text":R.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>f(l.verticalPos)).attr("text-anchor",l=>T(l.horizontalPos)).attr("transform",l=>P(l)).text(l=>l.text);break;case"path":R.selectAll("path").data(m.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Oi={draw:zi},$i={parser:Ti,db:Wi,renderer:Oi};export{$i as diagram}; diff --git a/dist/css/style.css b/dist/css/style.css index e607c7b..dd9a1ed 100644 --- a/dist/css/style.css +++ b/dist/css/style.css @@ -148,6 +148,29 @@ footer { white-space: normal; } +.markdown-body .mermaid { + overflow-x: auto; + padding: 16px; + text-align: center; +} + +.markdown-body .mermaid svg { + display: block; + max-width: 100%; + height: auto; + margin: 0 auto; +} + +.markdown-body .mermaid-error { + color: #cf222e; + white-space: pre-wrap; + text-align: left; +} + +[data-theme="dark"] .markdown-body .mermaid-error { + color: #ff7b72; +} + .split-container { display: flex; height: 100%; diff --git a/dist/index.html b/dist/index.html index e15e328..ebac8b3 100644 --- a/dist/index.html +++ b/dist/index.html @@ -15,8 +15,8 @@ var useDark = raw === 'dark'; document.documentElement.setAttribute('data-theme', useDark ? 'dark' : 'light'); - var PREVIEW_CSS_LIGHT = 'css/github-markdown-light.css?v=1.11.0'; - var PREVIEW_CSS_DARK = 'css/github-markdown-dark_dimmed.css?v=1.11.0'; + var PREVIEW_CSS_LIGHT = 'css/github-markdown-light.css?v=1.13.0'; + var PREVIEW_CSS_DARK = 'css/github-markdown-dark_dimmed.css?v=1.13.0'; var href = useDark ? PREVIEW_CSS_DARK : PREVIEW_CSS_LIGHT; var link = document.createElement('link'); @@ -30,11 +30,11 @@ } })(); - + Markdown Live Preview - + diff --git a/index.html b/index.html index e6cdd05..9fce8aa 100644 --- a/index.html +++ b/index.html @@ -15,8 +15,8 @@ var useDark = raw === 'dark'; document.documentElement.setAttribute('data-theme', useDark ? 'dark' : 'light'); - var PREVIEW_CSS_LIGHT = 'css/github-markdown-light.css?v=1.11.0'; - var PREVIEW_CSS_DARK = 'css/github-markdown-dark_dimmed.css?v=1.11.0'; + var PREVIEW_CSS_LIGHT = 'css/github-markdown-light.css?v=1.13.0'; + var PREVIEW_CSS_DARK = 'css/github-markdown-dark_dimmed.css?v=1.13.0'; var href = useDark ? PREVIEW_CSS_DARK : PREVIEW_CSS_LIGHT; var link = document.createElement('link'); @@ -30,10 +30,10 @@ } })(); - + - + Markdown Live Preview diff --git a/package-lock.json b/package-lock.json index d92caa0..29dcff7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "dompurify": "^3.4.0", "github-markdown-css": "^5.8.1", "marked": "^15.0.7", + "mermaid": "^11.15.0", "monaco-editor": "^0.52.2", "storehouse-js": "github:tanabe/Storehouse-js" }, @@ -20,6 +21,31 @@ "vite": "^6.4.2" } }, + "node_modules/@antfu/install-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.1.0.tgz", + "integrity": "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==", + "license": "MIT", + "dependencies": { + "package-manager-detector": "^1.3.0", + "tinyexec": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@braintree/sanitize-url": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.2.tgz", + "integrity": "sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==", + "license": "MIT" + }, + "node_modules/@chevrotain/types": { + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.1.2.tgz", + "integrity": "sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw==", + "license": "Apache-2.0" + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz", @@ -445,6 +471,32 @@ "node": ">=18" } }, + "node_modules/@iconify/types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", + "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==", + "license": "MIT" + }, + "node_modules/@iconify/utils": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.3.tgz", + "integrity": "sha512-LPKOXPn/zV+zis1oOfGWogaXVpqUybF3ZS6SCZIsz8vg0ivVp9+fVqyYB7xq0aiST/VhUQYGO1qo6uoYSiEJqw==", + "license": "MIT", + "dependencies": { + "@antfu/install-pkg": "^1.1.0", + "@iconify/types": "^2.0.0", + "import-meta-resolve": "^4.2.0" + } + }, + "node_modules/@mermaid-js/parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-1.1.1.tgz", + "integrity": "sha512-VuHdsYMK1bT6X2JbcAaWAhugTRvRBRyuZgd+c22swUeI9g/ntaxF7CY7dYarhZovofCbUNO0G7JesfmNtjYOCw==", + "license": "MIT", + "dependencies": { + "@chevrotain/types": "~11.1.1" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.59.0", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", @@ -795,6 +847,259 @@ "win32" ] }, + "node_modules/@types/d3": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz", + "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==", + "license": "MIT", + "dependencies": { + "@types/d3-array": "*", + "@types/d3-axis": "*", + "@types/d3-brush": "*", + "@types/d3-chord": "*", + "@types/d3-color": "*", + "@types/d3-contour": "*", + "@types/d3-delaunay": "*", + "@types/d3-dispatch": "*", + "@types/d3-drag": "*", + "@types/d3-dsv": "*", + "@types/d3-ease": "*", + "@types/d3-fetch": "*", + "@types/d3-force": "*", + "@types/d3-format": "*", + "@types/d3-geo": "*", + "@types/d3-hierarchy": "*", + "@types/d3-interpolate": "*", + "@types/d3-path": "*", + "@types/d3-polygon": "*", + "@types/d3-quadtree": "*", + "@types/d3-random": "*", + "@types/d3-scale": "*", + "@types/d3-scale-chromatic": "*", + "@types/d3-selection": "*", + "@types/d3-shape": "*", + "@types/d3-time": "*", + "@types/d3-time-format": "*", + "@types/d3-timer": "*", + "@types/d3-transition": "*", + "@types/d3-zoom": "*" + } + }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "license": "MIT" + }, + "node_modules/@types/d3-axis": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz", + "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-brush": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz", + "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-chord": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz", + "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-contour": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz", + "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==", + "license": "MIT", + "dependencies": { + "@types/d3-array": "*", + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-delaunay": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz", + "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==", + "license": "MIT" + }, + "node_modules/@types/d3-dispatch": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.7.tgz", + "integrity": "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==", + "license": "MIT" + }, + "node_modules/@types/d3-drag": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz", + "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-dsv": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz", + "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT" + }, + "node_modules/@types/d3-fetch": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz", + "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==", + "license": "MIT", + "dependencies": { + "@types/d3-dsv": "*" + } + }, + "node_modules/@types/d3-force": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz", + "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==", + "license": "MIT" + }, + "node_modules/@types/d3-format": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz", + "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==", + "license": "MIT" + }, + "node_modules/@types/d3-geo": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz", + "integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==", + "license": "MIT", + "dependencies": { + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-hierarchy": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz", + "integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "license": "MIT" + }, + "node_modules/@types/d3-polygon": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz", + "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==", + "license": "MIT" + }, + "node_modules/@types/d3-quadtree": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz", + "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==", + "license": "MIT" + }, + "node_modules/@types/d3-random": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.3.tgz", + "integrity": "sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==", + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", + "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-scale-chromatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", + "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==", + "license": "MIT" + }, + "node_modules/@types/d3-selection": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz", + "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==", + "license": "MIT" + }, + "node_modules/@types/d3-shape": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz", + "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", + "license": "MIT" + }, + "node_modules/@types/d3-time-format": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz", + "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT" + }, + "node_modules/@types/d3-transition": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz", + "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-zoom": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz", + "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==", + "license": "MIT", + "dependencies": { + "@types/d3-interpolate": "*", + "@types/d3-selection": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", @@ -802,6 +1107,12 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/geojson": { + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", + "license": "MIT" + }, "node_modules/@types/trusted-types": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", @@ -809,6 +1120,16 @@ "license": "MIT", "optional": true }, + "node_modules/@upsetjs/venn.js": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@upsetjs/venn.js/-/venn.js-2.0.0.tgz", + "integrity": "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==", + "license": "MIT", + "optionalDependencies": { + "d3-selection": "^3.0.0", + "d3-transition": "^3.0.1" + } + }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -913,6 +1234,15 @@ "dev": true, "license": "MIT" }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, "node_modules/corser": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", @@ -923,6 +1253,520 @@ "node": ">= 0.4.0" } }, + "node_modules/cose-base": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz", + "integrity": "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==", + "license": "MIT", + "dependencies": { + "layout-base": "^1.0.0" + } + }, + "node_modules/cytoscape": { + "version": "3.33.4", + "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.33.4.tgz", + "integrity": "sha512-HIN5Pmd9MrX9BkV7tDwnOcEJCSFvCpc8X97h3f508J6I5FsqAY65wKOCvgH2CuP42CaahWaz4tuh32SOOIH7ww==", + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/cytoscape-cose-bilkent": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz", + "integrity": "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==", + "license": "MIT", + "dependencies": { + "cose-base": "^1.0.0" + }, + "peerDependencies": { + "cytoscape": "^3.2.0" + } + }, + "node_modules/cytoscape-fcose": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz", + "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==", + "license": "MIT", + "dependencies": { + "cose-base": "^2.2.0" + }, + "peerDependencies": { + "cytoscape": "^3.2.0" + } + }, + "node_modules/cytoscape-fcose/node_modules/cose-base": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz", + "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==", + "license": "MIT", + "dependencies": { + "layout-base": "^2.0.0" + } + }, + "node_modules/cytoscape-fcose/node_modules/layout-base": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz", + "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==", + "license": "MIT" + }, + "node_modules/d3": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz", + "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==", + "license": "ISC", + "dependencies": { + "d3-array": "3", + "d3-axis": "3", + "d3-brush": "3", + "d3-chord": "3", + "d3-color": "3", + "d3-contour": "4", + "d3-delaunay": "6", + "d3-dispatch": "3", + "d3-drag": "3", + "d3-dsv": "3", + "d3-ease": "3", + "d3-fetch": "3", + "d3-force": "3", + "d3-format": "3", + "d3-geo": "3", + "d3-hierarchy": "3", + "d3-interpolate": "3", + "d3-path": "3", + "d3-polygon": "3", + "d3-quadtree": "3", + "d3-random": "3", + "d3-scale": "4", + "d3-scale-chromatic": "3", + "d3-selection": "3", + "d3-shape": "3", + "d3-time": "3", + "d3-time-format": "4", + "d3-timer": "3", + "d3-transition": "3", + "d3-zoom": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-axis": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz", + "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-brush": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", + "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "3", + "d3-transition": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-chord": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", + "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", + "license": "ISC", + "dependencies": { + "d3-path": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-contour": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz", + "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==", + "license": "ISC", + "dependencies": { + "d3-array": "^3.2.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-delaunay": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", + "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", + "license": "ISC", + "dependencies": { + "delaunator": "5" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dispatch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", + "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-drag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", + "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-selection": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dsv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", + "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", + "license": "ISC", + "dependencies": { + "commander": "7", + "iconv-lite": "0.6", + "rw": "1" + }, + "bin": { + "csv2json": "bin/dsv2json.js", + "csv2tsv": "bin/dsv2dsv.js", + "dsv2dsv": "bin/dsv2dsv.js", + "dsv2json": "bin/dsv2json.js", + "json2csv": "bin/json2dsv.js", + "json2dsv": "bin/json2dsv.js", + "json2tsv": "bin/json2dsv.js", + "tsv2csv": "bin/dsv2dsv.js", + "tsv2json": "bin/dsv2json.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-fetch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz", + "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==", + "license": "ISC", + "dependencies": { + "d3-dsv": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-force": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", + "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-quadtree": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", + "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-geo": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz", + "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2.5.0 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-hierarchy": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", + "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-polygon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", + "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-quadtree": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", + "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-random": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", + "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-sankey": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz", + "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-array": "1 - 2", + "d3-shape": "^1.2.0" + } + }, + "node_modules/d3-sankey/node_modules/d3-array": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", + "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==", + "license": "BSD-3-Clause", + "dependencies": { + "internmap": "^1.0.0" + } + }, + "node_modules/d3-sankey/node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==", + "license": "BSD-3-Clause" + }, + "node_modules/d3-sankey/node_modules/d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-path": "1" + } + }, + "node_modules/d3-sankey/node_modules/internmap": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", + "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==", + "license": "ISC" + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale-chromatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", + "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3", + "d3-interpolate": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-selection": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", + "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-transition": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", + "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3", + "d3-dispatch": "1 - 3", + "d3-ease": "1 - 3", + "d3-interpolate": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "d3-selection": "2 - 3" + } + }, + "node_modules/d3-zoom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", + "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "2 - 3", + "d3-transition": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/dagre-d3-es": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.14.tgz", + "integrity": "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==", + "license": "MIT", + "dependencies": { + "d3": "^7.9.0", + "lodash-es": "^4.17.21" + } + }, + "node_modules/dayjs": { + "version": "1.11.20", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.20.tgz", + "integrity": "sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ==", + "license": "MIT" + }, "node_modules/debug": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", @@ -941,6 +1785,15 @@ } } }, + "node_modules/delaunator": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.1.0.tgz", + "integrity": "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==", + "license": "ISC", + "dependencies": { + "robust-predicates": "^3.0.2" + } + }, "node_modules/dompurify": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.0.tgz", @@ -998,6 +1851,16 @@ "node": ">= 0.4" } }, + "node_modules/es-toolkit": { + "version": "1.46.1", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.46.1.tgz", + "integrity": "sha512-5eNtXOs3tbfxXOj04tjjseeWkRWaoCjdEI+96DgwzZoe6c9juL49pXlzAFTI72aWC9Y8p7168g6XIKjh7k6pyQ==", + "license": "MIT", + "workspaces": [ + "docs", + "benchmarks" + ] + }, "node_modules/esbuild": { "version": "0.25.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz", @@ -1174,6 +2037,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hachure-fill": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz", + "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==", + "license": "MIT" + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1280,7 +2149,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -1289,6 +2157,67 @@ "node": ">=0.10.0" } }, + "node_modules/import-meta-resolve": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz", + "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/katex": { + "version": "0.16.47", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.47.tgz", + "integrity": "sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, + "node_modules/katex/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/khroma": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz", + "integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==" + }, + "node_modules/layout-base": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz", + "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==", + "license": "MIT" + }, + "node_modules/lodash-es": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz", + "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==", + "license": "MIT" + }, "node_modules/marked": { "version": "15.0.7", "resolved": "https://registry.npmjs.org/marked/-/marked-15.0.7.tgz", @@ -1311,6 +2240,47 @@ "node": ">= 0.4" } }, + "node_modules/mermaid": { + "version": "11.15.0", + "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.15.0.tgz", + "integrity": "sha512-pTMbcf3rWdtLiYGpmoTjHEpeY8seiy6sR+9nD7LOs8KfUbHE4lOUAprTRqRAcWSQ6MQpdX+YEsxShtGsINtPtw==", + "license": "MIT", + "dependencies": { + "@braintree/sanitize-url": "^7.1.1", + "@iconify/utils": "^3.0.2", + "@mermaid-js/parser": "^1.1.1", + "@types/d3": "^7.4.3", + "@upsetjs/venn.js": "^2.0.0", + "cytoscape": "^3.33.1", + "cytoscape-cose-bilkent": "^4.1.0", + "cytoscape-fcose": "^2.2.0", + "d3": "^7.9.0", + "d3-sankey": "^0.12.3", + "dagre-d3-es": "7.0.14", + "dayjs": "^1.11.19", + "dompurify": "^3.3.1", + "es-toolkit": "^1.45.1", + "katex": "^0.16.25", + "khroma": "^2.1.0", + "marked": "^16.3.0", + "roughjs": "^4.6.6", + "stylis": "^4.3.6", + "ts-dedent": "^2.2.0", + "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0" + } + }, + "node_modules/mermaid/node_modules/marked": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz", + "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -1348,9 +2318,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", + "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", "dev": true, "funding": [ { @@ -1389,6 +2359,18 @@ "opener": "bin/opener-bin.js" } }, + "node_modules/package-manager-detector": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.6.0.tgz", + "integrity": "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==", + "license": "MIT" + }, + "node_modules/path-data-parser": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz", + "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==", + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -1409,6 +2391,22 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/points-on-curve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", + "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==", + "license": "MIT" + }, + "node_modules/points-on-path": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz", + "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==", + "license": "MIT", + "dependencies": { + "path-data-parser": "0.1.0", + "points-on-curve": "0.2.0" + } + }, "node_modules/portfinder": { "version": "1.0.35", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.35.tgz", @@ -1424,9 +2422,9 @@ } }, "node_modules/postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "version": "8.5.15", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", + "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", "dev": true, "funding": [ { @@ -1444,7 +2442,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.8", + "nanoid": "^3.3.12", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -1453,9 +2451,9 @@ } }, "node_modules/qs": { - "version": "6.14.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", - "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "version": "6.15.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz", + "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -1475,6 +2473,12 @@ "dev": true, "license": "MIT" }, + "node_modules/robust-predicates": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz", + "integrity": "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==", + "license": "Unlicense" + }, "node_modules/rollup": { "version": "4.59.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz", @@ -1520,6 +2524,24 @@ "fsevents": "~2.3.2" } }, + "node_modules/roughjs": { + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz", + "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==", + "license": "MIT", + "dependencies": { + "hachure-fill": "^0.5.2", + "path-data-parser": "^0.1.0", + "points-on-curve": "^0.2.0", + "points-on-path": "^0.2.1" + } + }, + "node_modules/rw": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==", + "license": "BSD-3-Clause" + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -1531,7 +2553,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, "license": "MIT" }, "node_modules/secure-compare": { @@ -1632,6 +2653,12 @@ "resolved": "git+ssh://git@github.com/tanabe/Storehouse-js.git#b00842f12eb5cff267892d0e1a897e6b83f40d92", "license": "MIT" }, + "node_modules/stylis": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.4.0.tgz", + "integrity": "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==", + "license": "MIT" + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -1645,6 +2672,15 @@ "node": ">=8" } }, + "node_modules/tinyexec": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.2.tgz", + "integrity": "sha512-M/Q0B2cp4K7kynaT/vnED1j8TlLY+Pp7C6Wl2bl/7u/F0mUVwdyOpwomQb8JpYLitHUssAJRmLZdMCGsrx7i+g==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/tinyglobby": { "version": "0.2.15", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", @@ -1662,6 +2698,15 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, + "node_modules/ts-dedent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", + "integrity": "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==", + "license": "MIT", + "engines": { + "node": ">=6.10" + } + }, "node_modules/union": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", @@ -1681,6 +2726,19 @@ "dev": true, "license": "MIT" }, + "node_modules/uuid": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", + "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist-node/bin/uuid" + } + }, "node_modules/vite": { "version": "6.4.2", "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.2.tgz", diff --git a/package.json b/package.json index f34e481..132a353 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "dompurify": "^3.4.0", "github-markdown-css": "^5.8.1", "marked": "^15.0.7", + "mermaid": "^11.15.0", "monaco-editor": "^0.52.2", "storehouse-js": "github:tanabe/Storehouse-js" } diff --git a/public/css/style.css b/public/css/style.css index e607c7b..dd9a1ed 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -148,6 +148,29 @@ footer { white-space: normal; } +.markdown-body .mermaid { + overflow-x: auto; + padding: 16px; + text-align: center; +} + +.markdown-body .mermaid svg { + display: block; + max-width: 100%; + height: auto; + margin: 0 auto; +} + +.markdown-body .mermaid-error { + color: #cf222e; + white-space: pre-wrap; + text-align: left; +} + +[data-theme="dark"] .markdown-body .mermaid-error { + color: #ff7b72; +} + .split-container { display: flex; height: 100%; diff --git a/src/main.js b/src/main.js index 64c180d..9e02d96 100644 --- a/src/main.js +++ b/src/main.js @@ -2,6 +2,7 @@ import Storehouse from 'storehouse-js'; import * as monaco from 'https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm'; import { marked } from 'marked'; import DOMPurify from 'dompurify'; +import mermaid from 'mermaid'; const init = () => { let hasEdited = false; @@ -12,6 +13,8 @@ const init = () => { const localStorageScrollBarKey = 'scroll_bar_settings'; const localStorageThemeKey = 'theme_settings'; const confirmationMessage = 'Are you sure you want to reset? Your changes will be lost.'; + let mermaidRenderTimer = null; + let mermaidRenderVersion = 0; // default template const defaultInput = `# Markdown syntax guide @@ -79,6 +82,14 @@ let message = 'Hello world'; alert(message); ${"`"}${"`"}${"`"} +## Mermaid diagrams +${"`"}${"`"}${"`"}mermaid +graph TD + A[Start] --> B{Decision} + B -->|Yes| C[Finish] + B -->|No| D[Alternate] +${"`"}${"`"}${"`"} + ## Inline code This web site is using ${"`"}markedjs/marked${"`"}. @@ -138,15 +149,117 @@ This web site is using ${"`"}markedjs/marked${"`"}. return editor; }; + let escapeHtml = (value) => { + return value + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }; + + let createMarkedRenderer = () => { + const renderer = new marked.Renderer(); + const renderCode = renderer.code.bind(renderer); + + renderer.code = (token) => { + const lang = (token.lang || '').match(/^\S*/)?.[0].toLowerCase(); + if (lang !== 'mermaid') { + return renderCode(token); + } + + return `
    ${escapeHtml(token.text)}
    \n`; + }; + + return renderer; + }; + + let configureMermaid = (theme) => { + mermaid.initialize({ + startOnLoad: false, + securityLevel: 'strict', + theme + }); + }; + + let showMermaidError = (element, error) => { + const message = error && error.message ? error.message : 'Unable to render Mermaid chart.'; + element.classList.add('mermaid-error'); + element.textContent = `Mermaid render error: ${message}`; + }; + + let getMermaidTheme = () => { + return document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'default'; + }; + + let renderMermaidDiagramsNow = async (theme = getMermaidTheme()) => { + const outputElement = document.querySelector('#output'); + if (!outputElement) { + return; + } + + const version = ++mermaidRenderVersion; + configureMermaid(theme); + + const elements = Array.from(outputElement.querySelectorAll('.mermaid')); + for (const [index, element] of elements.entries()) { + if (version !== mermaidRenderVersion) { + return; + } + + const source = element.dataset.mermaidSource || element.textContent; + element.dataset.mermaidSource = source; + element.classList.remove('mermaid-error'); + + try { + const renderId = `mermaid-${Date.now()}-${version}-${index}`; + const { svg, bindFunctions } = await mermaid.render(renderId, source); + if (version !== mermaidRenderVersion) { + return; + } + element.innerHTML = svg; + if (typeof bindFunctions === 'function') { + bindFunctions(element); + } + } catch (error) { + showMermaidError(element, error); + } + } + }; + + let scheduleMermaidRender = () => { + if (mermaidRenderTimer) { + clearTimeout(mermaidRenderTimer); + } + + mermaidRenderTimer = setTimeout(() => { + mermaidRenderTimer = null; + renderMermaidDiagramsNow(); + }, 150); + }; + + let renderMermaidDiagrams = (theme) => { + if (mermaidRenderTimer) { + clearTimeout(mermaidRenderTimer); + mermaidRenderTimer = null; + } + + return renderMermaidDiagramsNow(theme); + }; + + let renderer = createMarkedRenderer(); + // Render markdown text as html let convert = (markdown) => { let options = { headerIds: false, - mangle: false + mangle: false, + renderer }; let html = marked.parse(markdown, options); let sanitized = DOMPurify.sanitize(html); document.querySelector('#output').innerHTML = sanitized; + scheduleMermaidRender(); }; // Reset input text @@ -234,6 +347,7 @@ This web site is using ${"`"}markedjs/marked${"`"}. if (monaco && monaco.editor && typeof monaco.editor.setTheme === 'function') { monaco.editor.setTheme(checked ? 'vs-dark' : 'vs'); } + renderMermaidDiagrams(); }); }; @@ -303,7 +417,9 @@ This web site is using ${"`"}markedjs/marked${"`"}. return; } - getLightMarkdownCss().then((lightCss) => { + const restoreDarkMermaid = getMermaidTheme() === 'dark'; + + renderMermaidDiagrams('default').then(() => getLightMarkdownCss()).then((lightCss) => { const options = { margin: 10, filename: 'markdown-preview.pdf', @@ -357,6 +473,11 @@ This web site is using ${"`"}markedjs/marked${"`"}. .catch((error) => { // eslint-disable-next-line no-console console.error('Failed to export PDF', error); + }) + .finally(() => { + if (restoreDarkMermaid) { + renderMermaidDiagrams(); + } }); }); };